From 5539a51dbade249cc8bfdde16ba039be61789dda Mon Sep 17 00:00:00 2001 From: Austen Collins Date: Sun, 26 Jul 2015 11:51:35 -0700 Subject: [PATCH] remove node modules folder --- .gitignore | 1 + cli/node_modules/.bin/_mocha | 1 - cli/node_modules/.bin/mocha | 1 - cli/node_modules/.bin/ncp | 1 - cli/node_modules/.bin/nodezip | 1 - cli/node_modules/.bin/rimraf | 1 - cli/node_modules/.bin/uuid | 1 - cli/node_modules/adm-zip/README.md | 64 - cli/node_modules/adm-zip/adm-zip.js | 475 - .../adm-zip/headers/entryHeader.js | 261 - cli/node_modules/adm-zip/headers/index.js | 2 - .../adm-zip/headers/mainHeader.js | 80 - cli/node_modules/adm-zip/methods/deflater.js | 1578 -- cli/node_modules/adm-zip/methods/index.js | 2 - cli/node_modules/adm-zip/methods/inflater.js | 448 - cli/node_modules/adm-zip/package.json | 67 - cli/node_modules/adm-zip/util/constants.js | 115 - cli/node_modules/adm-zip/util/errors.js | 35 - cli/node_modules/adm-zip/util/fattr.js | 84 - cli/node_modules/adm-zip/util/index.js | 4 - cli/node_modules/adm-zip/util/utils.js | 199 - cli/node_modules/adm-zip/zipEntry.js | 284 - cli/node_modules/adm-zip/zipFile.js | 311 - cli/node_modules/async/.travis.yml | 5 - cli/node_modules/async/LICENSE | 19 - cli/node_modules/async/README.md | 1647 --- cli/node_modules/async/bower.json | 38 - cli/node_modules/async/component.json | 16 - cli/node_modules/async/lib/async.js | 1123 -- cli/node_modules/async/package.json | 84 - .../async/support/sync-package-managers.js | 53 - cli/node_modules/aws-sdk/.jshintrc | 68 - cli/node_modules/aws-sdk/.npmignore | 19 - cli/node_modules/aws-sdk/CONTRIBUTING.md | 84 - cli/node_modules/aws-sdk/LICENSE.txt | 201 - cli/node_modules/aws-sdk/NOTICE.txt | 5 - cli/node_modules/aws-sdk/README.md | 124 - cli/node_modules/aws-sdk/UPGRADING.md | 157 - .../apis/autoscaling-2011-01-01.min.json | 1468 -- .../autoscaling-2011-01-01.paginators.json | 52 - .../apis/cloudformation-2010-05-15.min.json | 592 - .../cloudformation-2010-05-15.paginators.json | 27 - .../apis/cloudfront-2015-04-17.min.json | 1537 -- .../cloudfront-2015-04-17.paginators.json | 32 - .../apis/cloudfront-2015-04-17.waiters.json | 29 - .../aws-sdk/apis/cloudhsm-2014-05-30.min.json | 433 - .../apis/cloudsearch-2011-02-01.min.json | 837 -- .../cloudsearch-2011-02-01.paginators.json | 13 - .../apis/cloudsearch-2013-01-01.min.json | 1086 -- .../cloudsearch-2013-01-01.paginators.json | 20 - .../cloudsearchdomain-2013-01-01.min.json | 266 - .../apis/cloudtrail-2013-11-01.min.json | 260 - .../cloudtrail-2013-11-01.paginators.json | 7 - .../apis/codecommit-2015-04-13.min.json | 243 - .../codecommit-2015-04-13.paginators.json | 14 - .../apis/codedeploy-2014-10-06.min.json | 919 -- .../apis/codepipeline-2015-07-09.min.json | 956 -- .../apis/cognito-identity-2014-06-30.min.json | 460 - .../apis/cognito-sync-2014-06-30.min.json | 745 - .../aws-sdk/apis/config-2014-11-12.min.json | 339 - .../apis/config-2014-11-12.paginators.json | 10 - .../apis/datapipeline-2012-10-29.min.json | 666 - .../datapipeline-2012-10-29.paginators.json | 26 - .../apis/devicefarm-2015-06-23.min.json | 903 -- .../devicefarm-2015-06-23.paginators.json | 64 - .../apis/directconnect-2012-10-25.min.json | 506 - .../directconnect-2012-10-25.paginators.json | 22 - .../aws-sdk/apis/ds-2015-04-16.min.json | 557 - .../aws-sdk/apis/dynamodb-2011-12-05.min.json | 662 - .../apis/dynamodb-2011-12-05.paginators.json | 26 - .../apis/dynamodb-2011-12-05.waiters.json | 27 - .../aws-sdk/apis/dynamodb-2012-08-10.min.json | 1028 -- .../apis/dynamodb-2012-08-10.paginators.json | 26 - .../apis/dynamodb-2012-08-10.waiters.json | 25 - .../aws-sdk/apis/ec2-2015-04-15.min.json | 8999 ----------- .../apis/ec2-2015-04-15.paginators.json | 125 - .../aws-sdk/apis/ec2-2015-04-15.waiters.json | 181 - .../aws-sdk/apis/ecs-2014-11-13.min.json | 989 -- .../apis/ecs-2014-11-13.paginators.json | 40 - .../aws-sdk/apis/efs-2015-02-01.min.json | 391 - .../apis/elasticache-2015-02-02.min.json | 1509 -- .../elasticache-2015-02-02.paginators.json | 76 - .../apis/elasticbeanstalk-2010-12-01.min.json | 912 -- ...lasticbeanstalk-2010-12-01.paginators.json | 25 - .../elasticloadbalancing-2012-06-01.min.json | 973 -- ...icloadbalancing-2012-06-01.paginators.json | 18 - .../apis/elasticmapreduce-2009-03-31.min.json | 1039 -- ...lasticmapreduce-2009-03-31.paginators.json | 32 - .../elastictranscoder-2012-09-25.min.json | 1019 -- ...astictranscoder-2012-09-25.paginators.json | 24 - .../elastictranscoder-2012-09-25.waiters.json | 16 - .../aws-sdk/apis/email-2010-12-01.min.json | 599 - .../apis/email-2010-12-01.paginators.json | 13 - .../apis/email-2010-12-01.waiters.json | 14 - .../aws-sdk/apis/glacier-2012-06-01.min.json | 1215 -- .../apis/glacier-2012-06-01.paginators.json | 28 - .../apis/glacier-2012-06-01.waiters.json | 23 - .../aws-sdk/apis/iam-2010-05-08.min.json | 2701 ---- .../apis/iam-2010-05-08.paginators.json | 164 - .../apis/importexport-2010-06-01.min.json | 241 - .../importexport-2010-06-01.paginators.json | 11 - .../aws-sdk/apis/kinesis-2013-12-02.min.json | 398 - .../apis/kinesis-2013-12-02.paginators.json | 18 - .../aws-sdk/apis/kms-2014-11-01.min.json | 605 - .../aws-sdk/apis/lambda-2014-11-11.min.json | 423 - .../apis/lambda-2014-11-11.paginators.json | 16 - .../aws-sdk/apis/lambda-2015-03-31.min.json | 575 - .../apis/lambda-2015-03-31.paginators.json | 16 - .../aws-sdk/apis/logs-2014-03-28.min.json | 539 - .../apis/logs-2014-03-28.paginators.json | 28 - .../apis/machinelearning-2014-12-12.min.json | 940 -- ...machinelearning-2014-12-12.paginators.json | 28 - cli/node_modules/aws-sdk/apis/metadata.json | 176 - .../apis/mobileanalytics-2014-06-05.min.json | 74 - .../apis/monitoring-2010-08-01.min.json | 500 - .../monitoring-2010-08-01.paginators.json | 24 - .../aws-sdk/apis/opsworks-2013-02-18.min.json | 2068 --- .../apis/opsworks-2013-02-18.paginators.json | 49 - .../aws-sdk/apis/rds-2013-01-10.min.json | 1920 --- .../apis/rds-2013-01-10.paginators.json | 97 - .../aws-sdk/apis/rds-2013-02-12.min.json | 2052 --- .../apis/rds-2013-02-12.paginators.json | 110 - .../aws-sdk/apis/rds-2013-09-09.min.json | 2188 --- .../apis/rds-2013-09-09.paginators.json | 110 - .../aws-sdk/apis/rds-2013-09-09.waiters.json | 36 - .../aws-sdk/apis/rds-2014-10-31.min.json | 2435 --- .../apis/rds-2014-10-31.paginators.json | 110 - .../aws-sdk/apis/rds-2014-10-31.waiters.json | 36 - .../aws-sdk/apis/redshift-2012-12-01.min.json | 2173 --- .../apis/redshift-2012-12-01.paginators.json | 94 - .../apis/redshift-2012-12-01.waiters.json | 43 - .../aws-sdk/apis/route53-2013-04-01.min.json | 1333 -- .../apis/route53-2013-04-01.paginators.json | 33 - .../apis/route53domains-2014-05-15.min.json | 613 - .../route53domains-2014-05-15.paginators.json | 17 - .../aws-sdk/apis/s3-2006-03-01.min.json | 3421 ----- .../apis/s3-2006-03-01.paginators.json | 57 - .../aws-sdk/apis/s3-2006-03-01.waiters.json | 32 - .../aws-sdk/apis/sdb-2009-04-15.min.json | 336 - .../apis/sdb-2009-04-15.paginators.json | 15 - .../aws-sdk/apis/sns-2010-03-31.min.json | 527 - .../apis/sns-2010-03-31.paginators.json | 29 - .../aws-sdk/apis/sqs-2012-11-05.min.json | 582 - .../apis/sqs-2012-11-05.paginators.json | 7 - .../aws-sdk/apis/ssm-2014-11-06.min.json | 352 - .../apis/storagegateway-2013-06-30.min.json | 1316 -- .../storagegateway-2013-06-30.paginators.json | 52 - .../apis/streams.dynamodb-2012-08-10.min.json | 236 - .../aws-sdk/apis/sts-2011-06-15.min.json | 234 - .../aws-sdk/apis/support-2013-04-15.min.json | 569 - .../apis/support-2013-04-15.paginators.json | 25 - .../aws-sdk/apis/swf-2012-01-25.min.json | 2086 --- .../apis/swf-2012-01-25.paginators.json | 46 - .../apis/workspaces-2015-04-08.min.json | 319 - cli/node_modules/aws-sdk/bower.json | 9 - .../aws-sdk/dist-tools/browser-builder.js | 87 - .../aws-sdk/dist-tools/service-collector.js | 149 - .../aws-sdk/dist-tools/transform.js | 19 - cli/node_modules/aws-sdk/index.js | 2 - cli/node_modules/aws-sdk/lib/api_loader.js | 139 - cli/node_modules/aws-sdk/lib/aws.js | 52 - cli/node_modules/aws-sdk/lib/browser.js | 20 - cli/node_modules/aws-sdk/lib/config.js | 415 - cli/node_modules/aws-sdk/lib/core.js | 107 - cli/node_modules/aws-sdk/lib/credentials.js | 150 - .../cognito_identity_credentials.js | 306 - .../credentials/credential_provider_chain.js | 113 - .../credentials/ec2_metadata_credentials.js | 69 - .../credentials/environment_credentials.js | 85 - .../credentials/file_system_credentials.js | 65 - .../lib/credentials/saml_credentials.js | 88 - .../shared_ini_file_credentials.js | 102 - .../lib/credentials/temporary_credentials.js | 111 - .../credentials/web_identity_credentials.js | 95 - .../aws-sdk/lib/event_listeners.js | 460 - cli/node_modules/aws-sdk/lib/http.js | 204 - cli/node_modules/aws-sdk/lib/http/node.js | 141 - cli/node_modules/aws-sdk/lib/http/xhr.js | 122 - cli/node_modules/aws-sdk/lib/json/builder.js | 56 - cli/node_modules/aws-sdk/lib/json/parser.js | 62 - .../aws-sdk/lib/metadata_service.js | 127 - cli/node_modules/aws-sdk/lib/model/api.js | 63 - .../aws-sdk/lib/model/collection.js | 20 - .../aws-sdk/lib/model/operation.js | 52 - .../aws-sdk/lib/model/paginator.js | 11 - .../aws-sdk/lib/model/resource_waiter.js | 49 - cli/node_modules/aws-sdk/lib/model/shape.js | 342 - .../aws-sdk/lib/param_validator.js | 175 - cli/node_modules/aws-sdk/lib/protocol/json.js | 62 - .../aws-sdk/lib/protocol/query.js | 97 - cli/node_modules/aws-sdk/lib/protocol/rest.js | 120 - .../aws-sdk/lib/protocol/rest_json.js | 67 - .../aws-sdk/lib/protocol/rest_xml.js | 87 - .../lib/query/query_param_serializer.js | 81 - cli/node_modules/aws-sdk/lib/region_config.js | 63 - .../aws-sdk/lib/region_config.json | 61 - cli/node_modules/aws-sdk/lib/request.js | 674 - .../aws-sdk/lib/resource_waiter.js | 198 - cli/node_modules/aws-sdk/lib/response.js | 200 - .../aws-sdk/lib/s3/managed_upload.js | 565 - .../aws-sdk/lib/sequential_executor.js | 231 - cli/node_modules/aws-sdk/lib/service.js | 508 - cli/node_modules/aws-sdk/lib/services.js | 15 - .../aws-sdk/lib/services/cloudfront.js | 9 - .../aws-sdk/lib/services/cloudsearchdomain.js | 103 - .../aws-sdk/lib/services/cognitoidentity.js | 15 - .../aws-sdk/lib/services/dynamodb.js | 55 - cli/node_modules/aws-sdk/lib/services/ec2.js | 60 - .../aws-sdk/lib/services/glacier.js | 114 - .../aws-sdk/lib/services/machinelearning.js | 24 - .../aws-sdk/lib/services/route53.js | 18 - cli/node_modules/aws-sdk/lib/services/s3.js | 447 - cli/node_modules/aws-sdk/lib/services/sqs.js | 131 - cli/node_modules/aws-sdk/lib/services/sts.js | 47 - cli/node_modules/aws-sdk/lib/services/swf.js | 10 - .../aws-sdk/lib/signers/presign.js | 109 - .../aws-sdk/lib/signers/request_signer.js | 29 - cli/node_modules/aws-sdk/lib/signers/s3.js | 166 - cli/node_modules/aws-sdk/lib/signers/v2.js | 45 - cli/node_modules/aws-sdk/lib/signers/v3.js | 74 - .../aws-sdk/lib/signers/v3https.js | 22 - cli/node_modules/aws-sdk/lib/signers/v4.js | 199 - cli/node_modules/aws-sdk/lib/state_machine.js | 42 - cli/node_modules/aws-sdk/lib/util.js | 774 - .../aws-sdk/lib/xml/browser_parser.js | 167 - cli/node_modules/aws-sdk/lib/xml/builder.js | 86 - .../aws-sdk/lib/xml/node_parser.js | 159 - .../aws-sdk/node_modules/sax/AUTHORS | 10 - .../aws-sdk/node_modules/sax/LICENSE | 32 - .../aws-sdk/node_modules/sax/LICENSE-W3C.html | 188 - .../aws-sdk/node_modules/sax/README.md | 216 - .../aws-sdk/node_modules/sax/component.json | 12 - .../sax/examples/big-not-pretty.xml | 8002 ---------- .../node_modules/sax/examples/example.js | 29 - .../node_modules/sax/examples/get-products.js | 58 - .../node_modules/sax/examples/hello-world.js | 4 - .../node_modules/sax/examples/not-pretty.xml | 8 - .../node_modules/sax/examples/pretty-print.js | 74 - .../node_modules/sax/examples/shopping.xml | 2 - .../node_modules/sax/examples/strict.dtd | 870 -- .../node_modules/sax/examples/test.html | 15 - .../node_modules/sax/examples/test.xml | 1254 -- .../aws-sdk/node_modules/sax/lib/sax.js | 1315 -- .../aws-sdk/node_modules/sax/package.json | 82 - .../node_modules/sax/test/attribute-name.js | 33 - .../node_modules/sax/test/buffer-overrun.js | 26 - .../aws-sdk/node_modules/sax/test/case.js | 50 - .../node_modules/sax/test/cdata-chunked.js | 11 - .../node_modules/sax/test/cdata-end-split.js | 15 - .../node_modules/sax/test/cdata-fake-end.js | 28 - .../node_modules/sax/test/cdata-multiple.js | 15 - .../aws-sdk/node_modules/sax/test/cdata.js | 10 - .../aws-sdk/node_modules/sax/test/cyrillic.js | 8 - .../sax/test/duplicate-attribute.js | 13 - .../aws-sdk/node_modules/sax/test/entities.js | 10 - .../node_modules/sax/test/entity-mega.js | 16 - .../aws-sdk/node_modules/sax/test/index.js | 86 - .../aws-sdk/node_modules/sax/test/issue-23.js | 43 - .../aws-sdk/node_modules/sax/test/issue-30.js | 24 - .../aws-sdk/node_modules/sax/test/issue-35.js | 15 - .../aws-sdk/node_modules/sax/test/issue-47.js | 12 - .../aws-sdk/node_modules/sax/test/issue-49.js | 31 - .../aws-sdk/node_modules/sax/test/issue-84.js | 13 - .../node_modules/sax/test/parser-position.js | 28 - .../sax/test/script-close-better.js | 12 - .../aws-sdk/node_modules/sax/test/script.js | 12 - .../sax/test/self-closing-child-strict.js | 44 - .../sax/test/self-closing-child.js | 44 - .../node_modules/sax/test/self-closing-tag.js | 25 - .../node_modules/sax/test/stray-ending.js | 17 - .../sax/test/trailing-attribute-no-value.js | 10 - .../sax/test/trailing-non-whitespace.js | 18 - .../node_modules/sax/test/unclosed-root.js | 11 - .../aws-sdk/node_modules/sax/test/unquoted.js | 18 - .../node_modules/sax/test/xmlns-issue-41.js | 68 - .../node_modules/sax/test/xmlns-rebinding.js | 63 - .../node_modules/sax/test/xmlns-strict.js | 74 - .../node_modules/sax/test/xmlns-unbound.js | 15 - .../sax/test/xmlns-xml-default-ns.js | 31 - .../xmlns-xml-default-prefix-attribute.js | 36 - .../sax/test/xmlns-xml-default-prefix.js | 21 - .../sax/test/xmlns-xml-default-redefine.js | 41 - .../aws-sdk/node_modules/xml2js/.npmignore | 6 - .../aws-sdk/node_modules/xml2js/.travis.yml | 5 - .../aws-sdk/node_modules/xml2js/83.coffee | 6 - .../aws-sdk/node_modules/xml2js/LICENSE | 19 - .../aws-sdk/node_modules/xml2js/README.md | 248 - .../aws-sdk/node_modules/xml2js/canon.xml | 482 - .../aws-sdk/node_modules/xml2js/lib/xml2js.js | 299 - .../aws-sdk/node_modules/xml2js/package.json | 141 - .../aws-sdk/node_modules/xml2js/text.coffee | 11 - .../aws-sdk/node_modules/xml2js/text.xml | 485 - .../node_modules/xmlbuilder/.npmignore | 8 - .../aws-sdk/node_modules/xmlbuilder/README.md | 73 - .../node_modules/xmlbuilder/lib/XMLBuilder.js | 119 - .../xmlbuilder/lib/XMLFragment.js | 422 - .../node_modules/xmlbuilder/lib/index.js | 15 - .../node_modules/xmlbuilder/package.json | 62 - cli/node_modules/aws-sdk/package.json | 126 - cli/node_modules/aws-sdk/scripts/console | 75 - .../aws-sdk/scripts/lib/translator.js | 153 - .../aws-sdk/scripts/translate-api | 19 - cli/node_modules/aws-sdk/testem.json | 3 - cli/node_modules/chai/.npmignore | 14 - cli/node_modules/chai/CONTRIBUTING.md | 202 - cli/node_modules/chai/History.md | 1052 -- cli/node_modules/chai/README.md | 130 - cli/node_modules/chai/ReleaseNotes.md | 730 - cli/node_modules/chai/bower.json | 27 - cli/node_modules/chai/chai.js | 5430 ------- cli/node_modules/chai/index.js | 1 - cli/node_modules/chai/karma.conf.js | 28 - cli/node_modules/chai/karma.sauce.js | 41 - cli/node_modules/chai/lib/chai.js | 93 - cli/node_modules/chai/lib/chai/assertion.js | 131 - cli/node_modules/chai/lib/chai/config.js | 55 - .../chai/lib/chai/core/assertions.js | 1601 -- .../chai/lib/chai/interface/assert.js | 1263 -- .../chai/lib/chai/interface/expect.js | 33 - .../chai/lib/chai/interface/should.js | 98 - .../chai/lib/chai/utils/addChainableMethod.js | 111 - .../chai/lib/chai/utils/addMethod.js | 43 - .../chai/lib/chai/utils/addProperty.js | 40 - cli/node_modules/chai/lib/chai/utils/flag.js | 32 - .../chai/lib/chai/utils/getActual.js | 18 - .../lib/chai/utils/getEnumerableProperties.js | 25 - .../chai/lib/chai/utils/getMessage.js | 50 - .../chai/lib/chai/utils/getName.js | 20 - .../chai/lib/chai/utils/getPathInfo.js | 110 - .../chai/lib/chai/utils/getPathValue.js | 42 - .../chai/lib/chai/utils/getProperties.js | 35 - .../chai/lib/chai/utils/hasProperty.js | 63 - cli/node_modules/chai/lib/chai/utils/index.js | 126 - .../chai/lib/chai/utils/inspect.js | 333 - .../chai/lib/chai/utils/objDisplay.js | 49 - .../chai/utils/overwriteChainableMethod.js | 53 - .../chai/lib/chai/utils/overwriteMethod.js | 51 - .../chai/lib/chai/utils/overwriteProperty.js | 54 - cli/node_modules/chai/lib/chai/utils/test.js | 26 - .../chai/lib/chai/utils/transferFlags.js | 44 - cli/node_modules/chai/lib/chai/utils/type.js | 45 - .../node_modules/assertion-error/.npmignore | 11 - .../node_modules/assertion-error/History.md | 14 - .../node_modules/assertion-error/README.md | 41 - .../node_modules/assertion-error/index.js | 110 - .../node_modules/assertion-error/package.json | 56 - .../chai/node_modules/deep-eql/.npmignore | 11 - .../chai/node_modules/deep-eql/History.md | 28 - .../chai/node_modules/deep-eql/README.md | 52 - .../chai/node_modules/deep-eql/index.js | 1 - .../chai/node_modules/deep-eql/karma.conf.js | 20 - .../chai/node_modules/deep-eql/lib/eql.js | 257 - .../node_modules/type-detect/.npmignore | 11 - .../node_modules/type-detect/History.md | 18 - .../node_modules/type-detect/README.md | 193 - .../node_modules/type-detect/index.js | 1 - .../node_modules/type-detect/lib/type.js | 142 - .../node_modules/type-detect/package.json | 58 - .../chai/node_modules/deep-eql/package.json | 65 - cli/node_modules/chai/package.json | 92 - cli/node_modules/chai/sauce.browsers.js | 128 - cli/node_modules/commander/Readme.md | 204 - cli/node_modules/commander/index.js | 922 -- cli/node_modules/commander/package.json | 69 - cli/node_modules/del/index.js | 78 - cli/node_modules/del/license | 21 - .../del/node_modules/each-async/index.js | 46 - .../del/node_modules/each-async/license | 21 - .../each-async/node_modules/onetime/index.js | 24 - .../node_modules/onetime/package.json | 61 - .../each-async/node_modules/onetime/readme.md | 54 - .../node_modules/set-immediate-shim/index.js | 7 - .../set-immediate-shim/package.json | 63 - .../node_modules/set-immediate-shim/readme.md | 31 - .../del/node_modules/each-async/package.json | 72 - .../del/node_modules/each-async/readme.md | 62 - .../del/node_modules/globby/index.js | 88 - .../del/node_modules/globby/license | 21 - .../globby/node_modules/array-union/index.js | 6 - .../node_modules/array-uniq/index.js | 60 - .../node_modules/array-uniq/package.json | 66 - .../node_modules/array-uniq/readme.md | 30 - .../node_modules/array-union/package.json | 69 - .../globby/node_modules/array-union/readme.md | 28 - .../globby/node_modules/async/.jscsrc | 3 - .../globby/node_modules/async/CHANGELOG.md | 81 - .../globby/node_modules/async/LICENSE | 19 - .../globby/node_modules/async/README.md | 1789 --- .../globby/node_modules/async/lib/async.js | 1216 -- .../globby/node_modules/async/package.json | 106 - .../async/support/sync-package-managers.js | 53 - .../globby/node_modules/glob/LICENSE | 15 - .../globby/node_modules/glob/README.md | 377 - .../globby/node_modules/glob/common.js | 245 - .../globby/node_modules/glob/glob.js | 752 - .../glob/node_modules/inflight/.eslintrc | 17 - .../glob/node_modules/inflight/LICENSE | 15 - .../glob/node_modules/inflight/README.md | 37 - .../glob/node_modules/inflight/inflight.js | 44 - .../inflight/node_modules/wrappy/LICENSE | 15 - .../inflight/node_modules/wrappy/README.md | 36 - .../inflight/node_modules/wrappy/package.json | 52 - .../node_modules/wrappy/test/basic.js | 51 - .../inflight/node_modules/wrappy/wrappy.js | 33 - .../glob/node_modules/inflight/package.json | 61 - .../glob/node_modules/inflight/test.js | 97 - .../glob/node_modules/inherits/LICENSE | 16 - .../glob/node_modules/inherits/README.md | 42 - .../glob/node_modules/inherits/inherits.js | 1 - .../node_modules/inherits/inherits_browser.js | 23 - .../glob/node_modules/inherits/package.json | 50 - .../glob/node_modules/inherits/test.js | 25 - .../glob/node_modules/minimatch/LICENSE | 15 - .../glob/node_modules/minimatch/README.md | 216 - .../glob/node_modules/minimatch/browser.js | 1159 -- .../glob/node_modules/minimatch/minimatch.js | 912 -- .../node_modules/brace-expansion/.npmignore | 2 - .../node_modules/brace-expansion/.travis.yml | 3 - .../node_modules/brace-expansion/README.md | 121 - .../node_modules/brace-expansion/example.js | 8 - .../node_modules/brace-expansion/index.js | 191 - .../node_modules/balanced-match/.npmignore | 2 - .../node_modules/balanced-match/.travis.yml | 4 - .../node_modules/balanced-match/Makefile | 6 - .../node_modules/balanced-match/README.md | 80 - .../node_modules/balanced-match/example.js | 5 - .../node_modules/balanced-match/index.js | 38 - .../node_modules/balanced-match/package.json | 73 - .../balanced-match/test/balanced.js | 56 - .../node_modules/concat-map/.travis.yml | 4 - .../node_modules/concat-map/LICENSE | 18 - .../node_modules/concat-map/README.markdown | 62 - .../node_modules/concat-map/example/map.js | 6 - .../node_modules/concat-map/index.js | 13 - .../node_modules/concat-map/package.json | 83 - .../node_modules/concat-map/test/map.js | 39 - .../node_modules/brace-expansion/package.json | 75 - .../brace-expansion/test/bash-comparison.js | 32 - .../brace-expansion/test/bash-results.txt | 1075 -- .../brace-expansion/test/cases.txt | 182 - .../brace-expansion/test/dollar.js | 9 - .../brace-expansion/test/empty-option.js | 10 - .../brace-expansion/test/generate.sh | 24 - .../test/negative-increment.js | 15 - .../brace-expansion/test/nested.js | 16 - .../brace-expansion/test/order.js | 10 - .../node_modules/brace-expansion/test/pad.js | 13 - .../brace-expansion/test/same-type.js | 7 - .../brace-expansion/test/sequence.js | 50 - .../glob/node_modules/minimatch/package.json | 63 - .../glob/node_modules/once/LICENSE | 15 - .../glob/node_modules/once/README.md | 51 - .../once/node_modules/wrappy/LICENSE | 15 - .../once/node_modules/wrappy/README.md | 36 - .../once/node_modules/wrappy/package.json | 52 - .../once/node_modules/wrappy/test/basic.js | 51 - .../once/node_modules/wrappy/wrappy.js | 33 - .../glob/node_modules/once/once.js | 21 - .../glob/node_modules/once/package.json | 60 - .../glob/node_modules/once/test/once.js | 23 - .../node_modules/path-is-absolute/index.js | 20 - .../node_modules/path-is-absolute/license | 21 - .../path-is-absolute/package.json | 70 - .../node_modules/path-is-absolute/readme.md | 51 - .../globby/node_modules/glob/package.json | 73 - .../globby/node_modules/glob/sync.js | 460 - .../node_modules/object-assign/index.js | 39 - .../globby/node_modules/object-assign/license | 21 - .../node_modules/object-assign/package.json | 68 - .../node_modules/object-assign/readme.md | 51 - .../del/node_modules/globby/package.json | 96 - .../del/node_modules/globby/readme.md | 74 - .../del/node_modules/is-path-cwd/index.js | 6 - .../del/node_modules/is-path-cwd/package.json | 62 - .../del/node_modules/is-path-cwd/readme.md | 28 - .../del/node_modules/is-path-in-cwd/index.js | 6 - .../node_modules/is-path-inside/index.js | 14 - .../node_modules/path-is-inside/LICENSE.txt | 19 - .../node_modules/path-is-inside/README.md | 35 - .../path-is-inside/lib/path-is-inside.js | 28 - .../node_modules/path-is-inside/package.json | 56 - .../node_modules/is-path-inside/package.json | 65 - .../node_modules/is-path-inside/readme.md | 31 - .../node_modules/is-path-in-cwd/package.json | 67 - .../del/node_modules/is-path-in-cwd/readme.md | 28 - .../del/node_modules/object-assign/index.js | 26 - .../del/node_modules/object-assign/license | 21 - .../node_modules/object-assign/package.json | 68 - .../del/node_modules/object-assign/readme.md | 51 - cli/node_modules/del/package.json | 88 - cli/node_modules/del/readme.md | 65 - cli/node_modules/dotenv/.env.development | 2 - cli/node_modules/dotenv/.env.production | 1 - cli/node_modules/dotenv/.env.staging | 6 - cli/node_modules/dotenv/.npmignore | 1 - cli/node_modules/dotenv/.travis.yml | 6 - cli/node_modules/dotenv/README.md | 109 - cli/node_modules/dotenv/lib/main.js | 112 - cli/node_modules/dotenv/package.json | 61 - cli/node_modules/dotenv/test/main.js | 159 - cli/node_modules/hoek/.npmignore | 18 - cli/node_modules/hoek/.travis.yml | 7 - cli/node_modules/hoek/CONTRIBUTING.md | 1 - cli/node_modules/hoek/LICENSE | 31 - cli/node_modules/hoek/Makefile | 8 - cli/node_modules/hoek/README.md | 574 - cli/node_modules/hoek/images/hoek.png | Bin 37939 -> 0 bytes cli/node_modules/hoek/index.js | 1 - cli/node_modules/hoek/lib/escape.js | 132 - cli/node_modules/hoek/lib/index.js | 977 -- cli/node_modules/hoek/package.json | 60 - cli/node_modules/hoek/test/escaper.js | 88 - cli/node_modules/hoek/test/index.js | 2425 --- cli/node_modules/hoek/test/modules/ignore.txt | 0 cli/node_modules/hoek/test/modules/test1.js | 1 - cli/node_modules/hoek/test/modules/test2.js | 1 - cli/node_modules/hoek/test/modules/test3.js | 1 - cli/node_modules/jsonfile/.npmignore | 2 - cli/node_modules/jsonfile/CHANGELOG.md | 57 - cli/node_modules/jsonfile/LICENSE | 15 - cli/node_modules/jsonfile/README.md | 165 - cli/node_modules/jsonfile/index.js | 84 - cli/node_modules/jsonfile/package.json | 59 - cli/node_modules/jsonfile/test.js | 343 - cli/node_modules/lodash/LICENSE | 22 - cli/node_modules/lodash/README.md | 121 - cli/node_modules/lodash/array.js | 44 - cli/node_modules/lodash/array/chunk.js | 46 - cli/node_modules/lodash/array/compact.js | 30 - cli/node_modules/lodash/array/difference.js | 29 - cli/node_modules/lodash/array/drop.js | 39 - cli/node_modules/lodash/array/dropRight.js | 40 - .../lodash/array/dropRightWhile.js | 59 - cli/node_modules/lodash/array/dropWhile.js | 59 - cli/node_modules/lodash/array/fill.js | 44 - cli/node_modules/lodash/array/findIndex.js | 53 - .../lodash/array/findLastIndex.js | 53 - cli/node_modules/lodash/array/first.js | 22 - cli/node_modules/lodash/array/flatten.js | 32 - cli/node_modules/lodash/array/flattenDeep.js | 21 - cli/node_modules/lodash/array/head.js | 1 - cli/node_modules/lodash/array/indexOf.js | 53 - cli/node_modules/lodash/array/initial.js | 20 - cli/node_modules/lodash/array/intersection.js | 58 - cli/node_modules/lodash/array/last.js | 19 - cli/node_modules/lodash/array/lastIndexOf.js | 60 - cli/node_modules/lodash/array/object.js | 1 - cli/node_modules/lodash/array/pull.js | 52 - cli/node_modules/lodash/array/pullAt.js | 40 - cli/node_modules/lodash/array/remove.js | 64 - cli/node_modules/lodash/array/rest.js | 21 - cli/node_modules/lodash/array/slice.js | 30 - cli/node_modules/lodash/array/sortedIndex.js | 53 - .../lodash/array/sortedLastIndex.js | 25 - cli/node_modules/lodash/array/tail.js | 1 - cli/node_modules/lodash/array/take.js | 39 - cli/node_modules/lodash/array/takeRight.js | 40 - .../lodash/array/takeRightWhile.js | 59 - cli/node_modules/lodash/array/takeWhile.js | 59 - cli/node_modules/lodash/array/union.js | 24 - cli/node_modules/lodash/array/uniq.js | 71 - cli/node_modules/lodash/array/unique.js | 1 - cli/node_modules/lodash/array/unzip.js | 47 - cli/node_modules/lodash/array/unzipWith.js | 41 - cli/node_modules/lodash/array/without.js | 27 - cli/node_modules/lodash/array/xor.js | 35 - cli/node_modules/lodash/array/zip.js | 21 - cli/node_modules/lodash/array/zipObject.js | 43 - cli/node_modules/lodash/array/zipWith.js | 36 - cli/node_modules/lodash/chain.js | 16 - cli/node_modules/lodash/chain/chain.js | 35 - cli/node_modules/lodash/chain/commit.js | 1 - cli/node_modules/lodash/chain/concat.js | 1 - cli/node_modules/lodash/chain/lodash.js | 125 - cli/node_modules/lodash/chain/plant.js | 1 - cli/node_modules/lodash/chain/reverse.js | 1 - cli/node_modules/lodash/chain/run.js | 1 - cli/node_modules/lodash/chain/tap.js | 29 - cli/node_modules/lodash/chain/thru.js | 26 - cli/node_modules/lodash/chain/toJSON.js | 1 - cli/node_modules/lodash/chain/toString.js | 1 - cli/node_modules/lodash/chain/value.js | 1 - cli/node_modules/lodash/chain/valueOf.js | 1 - cli/node_modules/lodash/chain/wrapperChain.js | 32 - .../lodash/chain/wrapperCommit.js | 32 - .../lodash/chain/wrapperConcat.js | 34 - cli/node_modules/lodash/chain/wrapperPlant.js | 45 - .../lodash/chain/wrapperReverse.js | 43 - .../lodash/chain/wrapperToString.js | 17 - cli/node_modules/lodash/chain/wrapperValue.js | 20 - cli/node_modules/lodash/collection.js | 44 - cli/node_modules/lodash/collection/all.js | 1 - cli/node_modules/lodash/collection/any.js | 1 - cli/node_modules/lodash/collection/at.js | 29 - cli/node_modules/lodash/collection/collect.js | 1 - .../lodash/collection/contains.js | 1 - cli/node_modules/lodash/collection/countBy.js | 54 - cli/node_modules/lodash/collection/detect.js | 1 - cli/node_modules/lodash/collection/each.js | 1 - .../lodash/collection/eachRight.js | 1 - cli/node_modules/lodash/collection/every.js | 66 - cli/node_modules/lodash/collection/filter.js | 61 - cli/node_modules/lodash/collection/find.js | 56 - .../lodash/collection/findLast.js | 25 - .../lodash/collection/findWhere.js | 37 - cli/node_modules/lodash/collection/foldl.js | 1 - cli/node_modules/lodash/collection/foldr.js | 1 - cli/node_modules/lodash/collection/forEach.js | 37 - .../lodash/collection/forEachRight.js | 26 - cli/node_modules/lodash/collection/groupBy.js | 59 - cli/node_modules/lodash/collection/include.js | 1 - .../lodash/collection/includes.js | 57 - cli/node_modules/lodash/collection/indexBy.js | 53 - cli/node_modules/lodash/collection/inject.js | 1 - cli/node_modules/lodash/collection/invoke.js | 42 - cli/node_modules/lodash/collection/map.js | 68 - cli/node_modules/lodash/collection/max.js | 1 - cli/node_modules/lodash/collection/min.js | 1 - .../lodash/collection/partition.js | 66 - cli/node_modules/lodash/collection/pluck.js | 31 - cli/node_modules/lodash/collection/reduce.js | 44 - .../lodash/collection/reduceRight.js | 29 - cli/node_modules/lodash/collection/reject.js | 50 - cli/node_modules/lodash/collection/sample.js | 50 - cli/node_modules/lodash/collection/select.js | 1 - cli/node_modules/lodash/collection/shuffle.js | 24 - cli/node_modules/lodash/collection/size.js | 30 - cli/node_modules/lodash/collection/some.js | 67 - cli/node_modules/lodash/collection/sortBy.js | 71 - .../lodash/collection/sortByAll.js | 52 - .../lodash/collection/sortByOrder.js | 55 - cli/node_modules/lodash/collection/sum.js | 1 - cli/node_modules/lodash/collection/where.js | 37 - cli/node_modules/lodash/date.js | 3 - cli/node_modules/lodash/date/now.js | 24 - cli/node_modules/lodash/function.js | 28 - cli/node_modules/lodash/function/after.js | 48 - cli/node_modules/lodash/function/ary.js | 34 - cli/node_modules/lodash/function/backflow.js | 1 - cli/node_modules/lodash/function/before.js | 42 - cli/node_modules/lodash/function/bind.js | 56 - cli/node_modules/lodash/function/bindAll.js | 50 - cli/node_modules/lodash/function/bindKey.js | 66 - cli/node_modules/lodash/function/compose.js | 1 - cli/node_modules/lodash/function/curry.js | 51 - .../lodash/function/curryRight.js | 48 - cli/node_modules/lodash/function/debounce.js | 181 - cli/node_modules/lodash/function/defer.js | 25 - cli/node_modules/lodash/function/delay.js | 26 - cli/node_modules/lodash/function/flow.js | 25 - cli/node_modules/lodash/function/flowRight.js | 25 - cli/node_modules/lodash/function/memoize.js | 80 - cli/node_modules/lodash/function/modArgs.js | 58 - cli/node_modules/lodash/function/negate.js | 32 - cli/node_modules/lodash/function/once.js | 24 - cli/node_modules/lodash/function/partial.js | 43 - .../lodash/function/partialRight.js | 42 - cli/node_modules/lodash/function/rearg.js | 40 - cli/node_modules/lodash/function/restParam.js | 58 - cli/node_modules/lodash/function/spread.js | 44 - cli/node_modules/lodash/function/throttle.js | 62 - cli/node_modules/lodash/function/wrap.js | 33 - cli/node_modules/lodash/index.js | 12351 ---------------- .../lodash/internal/LazyWrapper.js | 26 - .../lodash/internal/LodashWrapper.js | 21 - cli/node_modules/lodash/internal/MapCache.js | 24 - cli/node_modules/lodash/internal/SetCache.js | 29 - .../lodash/internal/arrayConcat.js | 25 - cli/node_modules/lodash/internal/arrayCopy.js | 20 - cli/node_modules/lodash/internal/arrayEach.js | 22 - .../lodash/internal/arrayEachRight.js | 21 - .../lodash/internal/arrayEvery.js | 23 - .../lodash/internal/arrayExtremum.js | 30 - .../lodash/internal/arrayFilter.js | 25 - cli/node_modules/lodash/internal/arrayMap.js | 21 - cli/node_modules/lodash/internal/arrayPush.js | 20 - .../lodash/internal/arrayReduce.js | 26 - .../lodash/internal/arrayReduceRight.js | 24 - cli/node_modules/lodash/internal/arraySome.js | 23 - cli/node_modules/lodash/internal/arraySum.js | 20 - .../lodash/internal/assignDefaults.js | 13 - .../lodash/internal/assignOwnDefaults.js | 26 - .../lodash/internal/assignWith.js | 32 - .../lodash/internal/baseAssign.js | 19 - cli/node_modules/lodash/internal/baseAt.js | 32 - .../lodash/internal/baseCallback.js | 35 - cli/node_modules/lodash/internal/baseClone.js | 128 - .../lodash/internal/baseCompareAscending.js | 34 - cli/node_modules/lodash/internal/baseCopy.js | 23 - .../lodash/internal/baseCreate.js | 23 - cli/node_modules/lodash/internal/baseDelay.js | 21 - .../lodash/internal/baseDifference.js | 55 - cli/node_modules/lodash/internal/baseEach.js | 15 - .../lodash/internal/baseEachRight.js | 15 - cli/node_modules/lodash/internal/baseEvery.js | 22 - .../lodash/internal/baseExtremum.js | 29 - cli/node_modules/lodash/internal/baseFill.js | 31 - .../lodash/internal/baseFilter.js | 22 - cli/node_modules/lodash/internal/baseFind.js | 25 - .../lodash/internal/baseFindIndex.js | 23 - .../lodash/internal/baseFlatten.js | 41 - cli/node_modules/lodash/internal/baseFor.js | 17 - cli/node_modules/lodash/internal/baseForIn.js | 17 - .../lodash/internal/baseForOwn.js | 17 - .../lodash/internal/baseForOwnRight.js | 17 - .../lodash/internal/baseForRight.js | 15 - .../lodash/internal/baseFunctions.js | 27 - cli/node_modules/lodash/internal/baseGet.js | 29 - .../lodash/internal/baseIndexOf.js | 27 - .../lodash/internal/baseIsEqual.js | 28 - .../lodash/internal/baseIsEqualDeep.js | 102 - .../lodash/internal/baseIsFunction.js | 15 - .../lodash/internal/baseIsMatch.js | 52 - .../lodash/internal/baseLodash.js | 10 - cli/node_modules/lodash/internal/baseMap.js | 23 - .../lodash/internal/baseMatches.js | 30 - .../lodash/internal/baseMatchesProperty.js | 45 - cli/node_modules/lodash/internal/baseMerge.js | 56 - .../lodash/internal/baseMergeDeep.js | 67 - .../lodash/internal/baseProperty.js | 14 - .../lodash/internal/basePropertyDeep.js | 19 - .../lodash/internal/basePullAt.js | 30 - .../lodash/internal/baseRandom.js | 18 - .../lodash/internal/baseReduce.js | 24 - .../lodash/internal/baseSetData.js | 17 - cli/node_modules/lodash/internal/baseSlice.js | 32 - cli/node_modules/lodash/internal/baseSome.js | 23 - .../lodash/internal/baseSortBy.js | 21 - .../lodash/internal/baseSortByOrder.js | 31 - cli/node_modules/lodash/internal/baseSum.js | 20 - .../lodash/internal/baseToString.js | 13 - cli/node_modules/lodash/internal/baseUniq.js | 60 - .../lodash/internal/baseValues.js | 22 - cli/node_modules/lodash/internal/baseWhile.js | 24 - .../lodash/internal/baseWrapperValue.js | 29 - .../lodash/internal/binaryIndex.js | 39 - .../lodash/internal/binaryIndexBy.js | 57 - .../lodash/internal/bindCallback.js | 39 - .../lodash/internal/bufferClone.js | 20 - .../lodash/internal/cacheIndexOf.js | 19 - cli/node_modules/lodash/internal/cachePush.js | 20 - .../lodash/internal/charsLeftIndex.js | 18 - .../lodash/internal/charsRightIndex.js | 17 - .../lodash/internal/compareAscending.js | 16 - .../lodash/internal/compareMultiple.js | 44 - .../lodash/internal/composeArgs.js | 34 - .../lodash/internal/composeArgsRight.js | 36 - .../lodash/internal/createAggregator.js | 35 - .../lodash/internal/createAssigner.js | 41 - .../lodash/internal/createBaseEach.js | 31 - .../lodash/internal/createBaseFor.js | 27 - .../lodash/internal/createBindWrapper.js | 22 - .../lodash/internal/createCache.js | 21 - .../lodash/internal/createCompounder.js | 26 - .../lodash/internal/createCtorWrapper.js | 37 - .../lodash/internal/createCurry.js | 23 - .../lodash/internal/createDefaults.js | 22 - .../lodash/internal/createExtremum.js | 33 - .../lodash/internal/createFind.js | 25 - .../lodash/internal/createFindIndex.js | 21 - .../lodash/internal/createFindKey.js | 18 - .../lodash/internal/createFlow.js | 74 - .../lodash/internal/createForEach.js | 20 - .../lodash/internal/createForIn.js | 20 - .../lodash/internal/createForOwn.js | 19 - .../lodash/internal/createHybridWrapper.js | 111 - .../lodash/internal/createObjectMapper.js | 26 - .../lodash/internal/createPadDir.js | 18 - .../lodash/internal/createPadding.js | 29 - .../lodash/internal/createPartial.js | 20 - .../lodash/internal/createPartialWrapper.js | 43 - .../lodash/internal/createReduce.js | 22 - .../lodash/internal/createRound.js | 23 - .../lodash/internal/createSortedIndex.js | 20 - .../lodash/internal/createWrapper.js | 86 - .../lodash/internal/deburrLetter.js | 33 - .../lodash/internal/equalArrays.js | 51 - .../lodash/internal/equalByTag.js | 48 - .../lodash/internal/equalObjects.js | 67 - .../lodash/internal/escapeHtmlChar.js | 22 - .../lodash/internal/escapeRegExpChar.js | 38 - .../lodash/internal/escapeStringChar.js | 22 - cli/node_modules/lodash/internal/getData.js | 15 - .../lodash/internal/getFuncName.js | 25 - cli/node_modules/lodash/internal/getLength.js | 15 - .../lodash/internal/getMatchData.js | 21 - cli/node_modules/lodash/internal/getNative.js | 16 - cli/node_modules/lodash/internal/getView.js | 33 - .../lodash/internal/indexOfNaN.js | 23 - .../lodash/internal/initCloneArray.js | 26 - .../lodash/internal/initCloneByTag.js | 63 - .../lodash/internal/initCloneObject.js | 16 - .../lodash/internal/invokePath.js | 26 - .../lodash/internal/isArrayLike.js | 15 - cli/node_modules/lodash/internal/isIndex.js | 24 - .../lodash/internal/isIterateeCall.js | 28 - cli/node_modules/lodash/internal/isKey.js | 28 - .../lodash/internal/isLaziable.js | 26 - cli/node_modules/lodash/internal/isLength.js | 20 - .../lodash/internal/isObjectLike.js | 12 - cli/node_modules/lodash/internal/isSpace.js | 14 - .../lodash/internal/isStrictComparable.js | 15 - cli/node_modules/lodash/internal/lazyClone.js | 23 - .../lodash/internal/lazyReverse.js | 23 - cli/node_modules/lodash/internal/lazyValue.js | 72 - cli/node_modules/lodash/internal/mapDelete.js | 14 - cli/node_modules/lodash/internal/mapGet.js | 14 - cli/node_modules/lodash/internal/mapHas.js | 20 - cli/node_modules/lodash/internal/mapSet.js | 18 - cli/node_modules/lodash/internal/mergeData.js | 89 - .../lodash/internal/mergeDefaults.js | 15 - cli/node_modules/lodash/internal/metaMap.js | 9 - .../lodash/internal/pickByArray.js | 28 - .../lodash/internal/pickByCallback.js | 22 - cli/node_modules/lodash/internal/reEscape.js | 4 - .../lodash/internal/reEvaluate.js | 4 - .../lodash/internal/reInterpolate.js | 4 - cli/node_modules/lodash/internal/realNames.js | 4 - cli/node_modules/lodash/internal/reorder.js | 29 - .../lodash/internal/replaceHolders.js | 28 - cli/node_modules/lodash/internal/setData.js | 41 - cli/node_modules/lodash/internal/shimKeys.js | 41 - .../lodash/internal/sortedUniq.js | 29 - .../lodash/internal/toIterable.js | 22 - cli/node_modules/lodash/internal/toObject.js | 14 - cli/node_modules/lodash/internal/toPath.js | 28 - .../lodash/internal/trimmedLeftIndex.js | 19 - .../lodash/internal/trimmedRightIndex.js | 18 - .../lodash/internal/unescapeHtmlChar.js | 22 - .../lodash/internal/wrapperClone.js | 18 - cli/node_modules/lodash/lang.js | 32 - cli/node_modules/lodash/lang/clone.js | 70 - cli/node_modules/lodash/lang/cloneDeep.js | 55 - cli/node_modules/lodash/lang/eq.js | 1 - cli/node_modules/lodash/lang/gt.js | 25 - cli/node_modules/lodash/lang/gte.js | 25 - cli/node_modules/lodash/lang/isArguments.js | 34 - cli/node_modules/lodash/lang/isArray.js | 40 - cli/node_modules/lodash/lang/isBoolean.js | 35 - cli/node_modules/lodash/lang/isDate.js | 35 - cli/node_modules/lodash/lang/isElement.js | 24 - cli/node_modules/lodash/lang/isEmpty.js | 47 - cli/node_modules/lodash/lang/isEqual.js | 54 - cli/node_modules/lodash/lang/isError.js | 36 - cli/node_modules/lodash/lang/isFinite.js | 35 - cli/node_modules/lodash/lang/isFunction.js | 38 - cli/node_modules/lodash/lang/isMatch.js | 49 - cli/node_modules/lodash/lang/isNaN.js | 34 - cli/node_modules/lodash/lang/isNative.js | 48 - cli/node_modules/lodash/lang/isNull.js | 21 - cli/node_modules/lodash/lang/isNumber.js | 41 - cli/node_modules/lodash/lang/isObject.js | 28 - cli/node_modules/lodash/lang/isPlainObject.js | 71 - cli/node_modules/lodash/lang/isRegExp.js | 35 - cli/node_modules/lodash/lang/isString.js | 35 - cli/node_modules/lodash/lang/isTypedArray.js | 74 - cli/node_modules/lodash/lang/isUndefined.js | 21 - cli/node_modules/lodash/lang/lt.js | 25 - cli/node_modules/lodash/lang/lte.js | 25 - cli/node_modules/lodash/lang/toArray.js | 32 - cli/node_modules/lodash/lang/toPlainObject.js | 31 - cli/node_modules/lodash/math.js | 9 - cli/node_modules/lodash/math/add.js | 19 - cli/node_modules/lodash/math/ceil.js | 25 - cli/node_modules/lodash/math/floor.js | 25 - cli/node_modules/lodash/math/max.js | 56 - cli/node_modules/lodash/math/min.js | 56 - cli/node_modules/lodash/math/round.js | 25 - cli/node_modules/lodash/math/sum.js | 50 - cli/node_modules/lodash/number.js | 4 - cli/node_modules/lodash/number/inRange.js | 47 - cli/node_modules/lodash/number/random.js | 70 - cli/node_modules/lodash/object.js | 31 - cli/node_modules/lodash/object/assign.js | 43 - cli/node_modules/lodash/object/create.js | 47 - cli/node_modules/lodash/object/defaults.js | 25 - .../lodash/object/defaultsDeep.js | 25 - cli/node_modules/lodash/object/extend.js | 1 - cli/node_modules/lodash/object/findKey.js | 54 - cli/node_modules/lodash/object/findLastKey.js | 54 - cli/node_modules/lodash/object/forIn.js | 33 - cli/node_modules/lodash/object/forInRight.js | 31 - cli/node_modules/lodash/object/forOwn.js | 33 - cli/node_modules/lodash/object/forOwnRight.js | 31 - cli/node_modules/lodash/object/functions.js | 23 - cli/node_modules/lodash/object/get.js | 33 - cli/node_modules/lodash/object/has.js | 57 - cli/node_modules/lodash/object/invert.js | 60 - cli/node_modules/lodash/object/keys.js | 45 - cli/node_modules/lodash/object/keysIn.js | 64 - cli/node_modules/lodash/object/mapKeys.js | 25 - cli/node_modules/lodash/object/mapValues.js | 46 - cli/node_modules/lodash/object/merge.js | 54 - cli/node_modules/lodash/object/methods.js | 1 - cli/node_modules/lodash/object/omit.js | 47 - cli/node_modules/lodash/object/pairs.js | 33 - cli/node_modules/lodash/object/pick.js | 42 - cli/node_modules/lodash/object/result.js | 49 - cli/node_modules/lodash/object/set.js | 55 - cli/node_modules/lodash/object/transform.js | 61 - cli/node_modules/lodash/object/values.js | 33 - cli/node_modules/lodash/object/valuesIn.js | 31 - cli/node_modules/lodash/package.json | 94 - cli/node_modules/lodash/string.js | 25 - cli/node_modules/lodash/string/camelCase.js | 27 - cli/node_modules/lodash/string/capitalize.js | 21 - cli/node_modules/lodash/string/deburr.js | 29 - cli/node_modules/lodash/string/endsWith.js | 40 - cli/node_modules/lodash/string/escape.js | 48 - .../lodash/string/escapeRegExp.js | 32 - cli/node_modules/lodash/string/kebabCase.js | 26 - cli/node_modules/lodash/string/pad.js | 47 - cli/node_modules/lodash/string/padLeft.js | 27 - cli/node_modules/lodash/string/padRight.js | 27 - cli/node_modules/lodash/string/parseInt.js | 46 - cli/node_modules/lodash/string/repeat.js | 47 - cli/node_modules/lodash/string/snakeCase.js | 26 - cli/node_modules/lodash/string/startCase.js | 26 - cli/node_modules/lodash/string/startsWith.js | 36 - cli/node_modules/lodash/string/template.js | 226 - .../lodash/string/templateSettings.js | 67 - cli/node_modules/lodash/string/trim.js | 42 - cli/node_modules/lodash/string/trimLeft.js | 36 - cli/node_modules/lodash/string/trimRight.js | 36 - cli/node_modules/lodash/string/trunc.js | 105 - cli/node_modules/lodash/string/unescape.js | 33 - cli/node_modules/lodash/string/words.js | 38 - cli/node_modules/lodash/support.js | 10 - cli/node_modules/lodash/utility.js | 18 - cli/node_modules/lodash/utility/attempt.js | 32 - cli/node_modules/lodash/utility/callback.js | 53 - cli/node_modules/lodash/utility/constant.js | 23 - cli/node_modules/lodash/utility/identity.js | 20 - cli/node_modules/lodash/utility/iteratee.js | 1 - cli/node_modules/lodash/utility/matches.js | 33 - .../lodash/utility/matchesProperty.js | 32 - cli/node_modules/lodash/utility/method.js | 33 - cli/node_modules/lodash/utility/methodOf.js | 32 - cli/node_modules/lodash/utility/mixin.js | 82 - cli/node_modules/lodash/utility/noop.js | 19 - cli/node_modules/lodash/utility/property.js | 31 - cli/node_modules/lodash/utility/propertyOf.js | 30 - cli/node_modules/lodash/utility/range.js | 66 - cli/node_modules/lodash/utility/times.js | 60 - cli/node_modules/lodash/utility/uniqueId.js | 27 - cli/node_modules/mocha/LICENSE | 22 - cli/node_modules/mocha/README.md | 11 - cli/node_modules/mocha/bin/_mocha | 492 - cli/node_modules/mocha/bin/mocha | 76 - cli/node_modules/mocha/bin/options.js | 36 - cli/node_modules/mocha/images/error.png | Bin 412 -> 0 bytes cli/node_modules/mocha/images/ok.png | Bin 388 -> 0 bytes cli/node_modules/mocha/index.js | 3 - cli/node_modules/mocha/lib/browser/debug.js | 4 - .../mocha/lib/browser/escape-string-regexp.js | 11 - cli/node_modules/mocha/lib/browser/events.js | 177 - cli/node_modules/mocha/lib/browser/fs.js | 0 cli/node_modules/mocha/lib/browser/glob.js | 0 cli/node_modules/mocha/lib/browser/path.js | 0 .../mocha/lib/browser/progress.js | 125 - cli/node_modules/mocha/lib/browser/tty.js | 12 - cli/node_modules/mocha/lib/context.js | 95 - cli/node_modules/mocha/lib/hook.js | 48 - cli/node_modules/mocha/lib/interfaces/bdd.js | 115 - .../mocha/lib/interfaces/common.js | 58 - .../mocha/lib/interfaces/exports.js | 61 - .../mocha/lib/interfaces/index.js | 4 - .../mocha/lib/interfaces/qunit.js | 94 - cli/node_modules/mocha/lib/interfaces/tdd.js | 109 - cli/node_modules/mocha/lib/mocha.js | 446 - cli/node_modules/mocha/lib/ms.js | 109 - cli/node_modules/mocha/lib/pending.js | 16 - cli/node_modules/mocha/lib/reporters/base.js | 466 - cli/node_modules/mocha/lib/reporters/doc.js | 62 - cli/node_modules/mocha/lib/reporters/dot.js | 62 - .../mocha/lib/reporters/html-cov.js | 50 - cli/node_modules/mocha/lib/reporters/html.js | 287 - cli/node_modules/mocha/lib/reporters/index.js | 17 - .../mocha/lib/reporters/json-cov.js | 152 - .../mocha/lib/reporters/json-stream.js | 62 - cli/node_modules/mocha/lib/reporters/json.js | 92 - .../mocha/lib/reporters/landing.js | 96 - cli/node_modules/mocha/lib/reporters/list.js | 63 - .../mocha/lib/reporters/markdown.js | 100 - cli/node_modules/mocha/lib/reporters/min.js | 37 - cli/node_modules/mocha/lib/reporters/nyan.js | 260 - .../mocha/lib/reporters/progress.js | 92 - cli/node_modules/mocha/lib/reporters/spec.js | 82 - cli/node_modules/mocha/lib/reporters/tap.js | 72 - .../lib/reporters/templates/coverage.jade | 51 - .../mocha/lib/reporters/templates/menu.jade | 13 - .../mocha/lib/reporters/templates/script.html | 34 - .../mocha/lib/reporters/templates/style.html | 324 - cli/node_modules/mocha/lib/reporters/xunit.js | 149 - cli/node_modules/mocha/lib/runnable.js | 280 - cli/node_modules/mocha/lib/runner.js | 716 - cli/node_modules/mocha/lib/suite.js | 355 - cli/node_modules/mocha/lib/template.html | 18 - cli/node_modules/mocha/lib/test.js | 31 - cli/node_modules/mocha/lib/utils.js | 710 - cli/node_modules/mocha/mocha.css | 270 - cli/node_modules/mocha/mocha.js | 6564 -------- cli/node_modules/mocha/node_modules/.bin/jade | 1 - .../mocha/node_modules/.bin/mkdirp | 1 - .../mocha/node_modules/.bin/supports-color | 1 - .../mocha/node_modules/commander/Readme.md | 208 - .../mocha/node_modules/commander/index.js | 876 -- .../mocha/node_modules/commander/package.json | 71 - .../mocha/node_modules/debug/.jshintrc | 3 - .../mocha/node_modules/debug/.npmignore | 6 - .../mocha/node_modules/debug/History.md | 150 - .../mocha/node_modules/debug/Makefile | 33 - .../mocha/node_modules/debug/Readme.md | 156 - .../mocha/node_modules/debug/browser.js | 147 - .../mocha/node_modules/debug/component.json | 19 - .../mocha/node_modules/debug/debug.js | 197 - .../mocha/node_modules/debug/node.js | 129 - .../debug/node_modules/ms/.npmignore | 5 - .../debug/node_modules/ms/README.md | 33 - .../debug/node_modules/ms/index.js | 111 - .../debug/node_modules/ms/package.json | 45 - .../mocha/node_modules/debug/package.json | 71 - .../mocha/node_modules/diff/README.md | 181 - .../mocha/node_modules/diff/diff.js | 619 - .../mocha/node_modules/diff/package.json | 63 - .../escape-string-regexp/index.js | 11 - .../escape-string-regexp/package.json | 69 - .../escape-string-regexp/readme.md | 27 - .../mocha/node_modules/glob/.npmignore | 2 - .../mocha/node_modules/glob/.travis.yml | 3 - .../mocha/node_modules/glob/LICENSE | 27 - .../mocha/node_modules/glob/README.md | 250 - .../mocha/node_modules/glob/examples/g.js | 9 - .../node_modules/glob/examples/usr-local.js | 9 - .../mocha/node_modules/glob/glob.js | 675 - .../glob/node_modules/graceful-fs/.npmignore | 1 - .../glob/node_modules/graceful-fs/LICENSE | 27 - .../glob/node_modules/graceful-fs/README.md | 26 - .../node_modules/graceful-fs/graceful-fs.js | 160 - .../node_modules/graceful-fs/package.json | 65 - .../node_modules/graceful-fs/polyfills.js | 228 - .../node_modules/graceful-fs/test/open.js | 39 - .../graceful-fs/test/readdir-sort.js | 21 - .../glob/node_modules/inherits/LICENSE | 16 - .../glob/node_modules/inherits/README.md | 42 - .../glob/node_modules/inherits/inherits.js | 1 - .../node_modules/inherits/inherits_browser.js | 23 - .../glob/node_modules/inherits/package.json | 50 - .../glob/node_modules/inherits/test.js | 25 - .../glob/node_modules/minimatch/.npmignore | 1 - .../glob/node_modules/minimatch/LICENSE | 23 - .../glob/node_modules/minimatch/README.md | 218 - .../glob/node_modules/minimatch/minimatch.js | 1055 -- .../node_modules/lru-cache/.npmignore | 1 - .../node_modules/lru-cache/.travis.yml | 8 - .../node_modules/lru-cache/CONTRIBUTORS | 14 - .../minimatch/node_modules/lru-cache/LICENSE | 15 - .../node_modules/lru-cache/README.md | 109 - .../node_modules/lru-cache/lib/lru-cache.js | 274 - .../node_modules/lru-cache/package.json | 58 - .../node_modules/lru-cache/test/basic.js | 395 - .../node_modules/lru-cache/test/foreach.js | 120 - .../lru-cache/test/memory-leak.js | 51 - .../minimatch/node_modules/sigmund/LICENSE | 15 - .../minimatch/node_modules/sigmund/README.md | 53 - .../minimatch/node_modules/sigmund/bench.js | 283 - .../node_modules/sigmund/package.json | 60 - .../minimatch/node_modules/sigmund/sigmund.js | 39 - .../node_modules/sigmund/test/basic.js | 24 - .../glob/node_modules/minimatch/package.json | 57 - .../glob/node_modules/minimatch/test/basic.js | 399 - .../minimatch/test/brace-expand.js | 33 - .../node_modules/minimatch/test/caching.js | 14 - .../node_modules/minimatch/test/defaults.js | 274 - .../test/extglob-ending-with-state-char.js | 8 - .../mocha/node_modules/glob/package.json | 57 - .../mocha/node_modules/glob/test/00-setup.js | 176 - .../node_modules/glob/test/bash-comparison.js | 63 - .../node_modules/glob/test/bash-results.json | 350 - .../mocha/node_modules/glob/test/cwd-test.js | 55 - .../node_modules/glob/test/globstar-match.js | 19 - .../mocha/node_modules/glob/test/mark.js | 74 - .../node_modules/glob/test/nocase-nomagic.js | 113 - .../node_modules/glob/test/pause-resume.js | 73 - .../node_modules/glob/test/root-nomount.js | 39 - .../mocha/node_modules/glob/test/root.js | 46 - .../mocha/node_modules/glob/test/stat.js | 32 - .../node_modules/glob/test/zz-cleanup.js | 11 - .../mocha/node_modules/growl/History.md | 63 - .../mocha/node_modules/growl/Readme.md | 99 - .../mocha/node_modules/growl/lib/growl.js | 234 - .../mocha/node_modules/growl/package.json | 45 - .../mocha/node_modules/growl/test.js | 20 - .../mocha/node_modules/jade/.npmignore | 15 - .../mocha/node_modules/jade/LICENSE | 22 - .../mocha/node_modules/jade/bin/jade | 147 - .../mocha/node_modules/jade/index.js | 4 - .../mocha/node_modules/jade/jade.js | 3586 ----- .../mocha/node_modules/jade/jade.md | 510 - .../mocha/node_modules/jade/jade.min.js | 2 - .../mocha/node_modules/jade/lib/compiler.js | 642 - .../mocha/node_modules/jade/lib/doctypes.js | 18 - .../mocha/node_modules/jade/lib/filters.js | 97 - .../node_modules/jade/lib/inline-tags.js | 28 - .../mocha/node_modules/jade/lib/jade.js | 237 - .../mocha/node_modules/jade/lib/lexer.js | 771 - .../node_modules/jade/lib/nodes/attrs.js | 77 - .../jade/lib/nodes/block-comment.js | 33 - .../node_modules/jade/lib/nodes/block.js | 121 - .../mocha/node_modules/jade/lib/nodes/case.js | 43 - .../mocha/node_modules/jade/lib/nodes/code.js | 35 - .../node_modules/jade/lib/nodes/comment.js | 32 - .../node_modules/jade/lib/nodes/doctype.js | 29 - .../mocha/node_modules/jade/lib/nodes/each.js | 35 - .../node_modules/jade/lib/nodes/filter.js | 35 - .../node_modules/jade/lib/nodes/index.js | 20 - .../node_modules/jade/lib/nodes/literal.js | 32 - .../node_modules/jade/lib/nodes/mixin.js | 36 - .../mocha/node_modules/jade/lib/nodes/node.js | 25 - .../mocha/node_modules/jade/lib/nodes/tag.js | 95 - .../mocha/node_modules/jade/lib/nodes/text.js | 36 - .../mocha/node_modules/jade/lib/parser.js | 710 - .../mocha/node_modules/jade/lib/runtime.js | 174 - .../node_modules/jade/lib/self-closing.js | 19 - .../mocha/node_modules/jade/lib/utils.js | 49 - .../jade/node_modules/commander/.npmignore | 4 - .../jade/node_modules/commander/.travis.yml | 4 - .../jade/node_modules/commander/History.md | 107 - .../jade/node_modules/commander/Makefile | 7 - .../jade/node_modules/commander/Readme.md | 262 - .../jade/node_modules/commander/index.js | 2 - .../node_modules/commander/lib/commander.js | 1026 -- .../jade/node_modules/commander/package.json | 60 - .../jade/node_modules/mkdirp/.gitignore.orig | 2 - .../jade/node_modules/mkdirp/.gitignore.rej | 5 - .../jade/node_modules/mkdirp/.npmignore | 2 - .../jade/node_modules/mkdirp/LICENSE | 21 - .../jade/node_modules/mkdirp/README.markdown | 54 - .../jade/node_modules/mkdirp/examples/pow.js | 6 - .../node_modules/mkdirp/examples/pow.js.orig | 6 - .../node_modules/mkdirp/examples/pow.js.rej | 19 - .../jade/node_modules/mkdirp/index.js | 79 - .../jade/node_modules/mkdirp/package.json | 58 - .../jade/node_modules/mkdirp/test/chmod.js | 38 - .../jade/node_modules/mkdirp/test/clobber.js | 37 - .../jade/node_modules/mkdirp/test/mkdirp.js | 28 - .../jade/node_modules/mkdirp/test/perm.js | 32 - .../node_modules/mkdirp/test/perm_sync.js | 39 - .../jade/node_modules/mkdirp/test/race.js | 41 - .../jade/node_modules/mkdirp/test/rel.js | 32 - .../jade/node_modules/mkdirp/test/sync.js | 27 - .../jade/node_modules/mkdirp/test/umask.js | 28 - .../node_modules/mkdirp/test/umask_sync.js | 27 - .../mocha/node_modules/jade/package.json | 56 - .../mocha/node_modules/jade/runtime.js | 179 - .../mocha/node_modules/jade/runtime.min.js | 1 - .../mocha/node_modules/jade/test.jade | 7 - .../mocha/node_modules/jade/testing/head.jade | 5 - .../node_modules/jade/testing/index.jade | 22 - .../mocha/node_modules/jade/testing/index.js | 11 - .../node_modules/jade/testing/layout.jade | 6 - .../mocha/node_modules/jade/testing/user.jade | 7 - .../mocha/node_modules/jade/testing/user.js | 27 - .../mocha/node_modules/mkdirp/.npmignore | 2 - .../mocha/node_modules/mkdirp/.travis.yml | 5 - .../mocha/node_modules/mkdirp/LICENSE | 21 - .../mocha/node_modules/mkdirp/bin/cmd.js | 33 - .../mocha/node_modules/mkdirp/bin/usage.txt | 12 - .../mocha/node_modules/mkdirp/examples/pow.js | 6 - .../mocha/node_modules/mkdirp/index.js | 97 - .../mkdirp/node_modules/minimist/.travis.yml | 4 - .../mkdirp/node_modules/minimist/LICENSE | 18 - .../node_modules/minimist/example/parse.js | 2 - .../mkdirp/node_modules/minimist/index.js | 187 - .../mkdirp/node_modules/minimist/package.json | 67 - .../node_modules/minimist/readme.markdown | 73 - .../mkdirp/node_modules/minimist/test/dash.js | 24 - .../minimist/test/default_bool.js | 20 - .../node_modules/minimist/test/dotted.js | 16 - .../mkdirp/node_modules/minimist/test/long.js | 31 - .../node_modules/minimist/test/parse.js | 318 - .../minimist/test/parse_modified.js | 9 - .../node_modules/minimist/test/short.js | 67 - .../node_modules/minimist/test/whitespace.js | 8 - .../mocha/node_modules/mkdirp/package.json | 58 - .../mocha/node_modules/mkdirp/readme.markdown | 100 - .../mocha/node_modules/mkdirp/test/chmod.js | 38 - .../mocha/node_modules/mkdirp/test/clobber.js | 37 - .../mocha/node_modules/mkdirp/test/mkdirp.js | 26 - .../mocha/node_modules/mkdirp/test/opts_fs.js | 27 - .../node_modules/mkdirp/test/opts_fs_sync.js | 25 - .../mocha/node_modules/mkdirp/test/perm.js | 30 - .../node_modules/mkdirp/test/perm_sync.js | 34 - .../mocha/node_modules/mkdirp/test/race.js | 40 - .../mocha/node_modules/mkdirp/test/rel.js | 30 - .../mocha/node_modules/mkdirp/test/return.js | 25 - .../node_modules/mkdirp/test/return_sync.js | 24 - .../mocha/node_modules/mkdirp/test/root.js | 18 - .../mocha/node_modules/mkdirp/test/sync.js | 30 - .../mocha/node_modules/mkdirp/test/umask.js | 26 - .../node_modules/mkdirp/test/umask_sync.js | 30 - .../mocha/node_modules/supports-color/cli.js | 29 - .../node_modules/supports-color/index.js | 39 - .../mocha/node_modules/supports-color/license | 21 - .../node_modules/supports-color/package.json | 85 - .../node_modules/supports-color/readme.md | 44 - cli/node_modules/mocha/package.json | 130 - cli/node_modules/node-uuid/.npmignore | 2 - cli/node_modules/node-uuid/LICENSE.md | 21 - cli/node_modules/node-uuid/README.md | 243 - .../node-uuid/benchmark/README.md | 53 - .../node-uuid/benchmark/bench.gnu | 174 - cli/node_modules/node-uuid/benchmark/bench.sh | 34 - .../node-uuid/benchmark/benchmark-native.c | 34 - .../node-uuid/benchmark/benchmark.js | 84 - cli/node_modules/node-uuid/bin/uuid | 26 - cli/node_modules/node-uuid/bower.json | 23 - cli/node_modules/node-uuid/component.json | 18 - cli/node_modules/node-uuid/package.json | 65 - cli/node_modules/node-uuid/test/compare_v1.js | 63 - cli/node_modules/node-uuid/test/test.html | 17 - cli/node_modules/node-uuid/test/test.js | 228 - cli/node_modules/node-uuid/uuid.js | 247 - cli/node_modules/node-zip/.npmignore | 15 - cli/node_modules/node-zip/Makefile | 2 - cli/node_modules/node-zip/README.md | 64 - cli/node_modules/node-zip/bin/nodezip | 2 - cli/node_modules/node-zip/bin/packer | 8 - cli/node_modules/node-zip/lib/nodezip-cli.js | 92 - cli/node_modules/node-zip/lib/nodezip.js | 5 - .../node-zip/node_modules/jszip/.jshintignore | 2 - .../node-zip/node_modules/jszip/.jshintrc | 12 - .../node-zip/node_modules/jszip/.npmignore | 9 - .../node-zip/node_modules/jszip/.travis.yml | 11 - .../node-zip/node_modules/jszip/CHANGES.md | 69 - .../node_modules/jszip/CHANGES.md.orig | 49 - .../node_modules/jszip/LICENSE.markdown | 651 - .../node_modules/jszip/README.markdown | 41 - .../node_modules/jszip/index.html.orig | 702 - .../node-zip/node_modules/jszip/lib/base64.js | 70 - .../jszip/lib/compressedObject.js | 28 - .../node_modules/jszip/lib/compressions.js | 13 - .../node-zip/node_modules/jszip/lib/crc32.js | 102 - .../node_modules/jszip/lib/dataReader.js | 107 - .../node_modules/jszip/lib/defaults.js | 11 - .../jszip/lib/deprecatedPublicUtils.js | 105 - .../node-zip/node_modules/jszip/lib/flate.js | 16 - .../node-zip/node_modules/jszip/lib/index.js | 79 - .../node_modules/jszip/lib/license_header.js | 11 - .../node-zip/node_modules/jszip/lib/load.js | 31 - .../node_modules/jszip/lib/nodeBuffer.js | 7 - .../jszip/lib/nodeBufferReader.js | 20 - .../node-zip/node_modules/jszip/lib/object.js | 883 -- .../node_modules/jszip/lib/signature.js | 7 - .../node_modules/jszip/lib/stringReader.js | 36 - .../node_modules/jszip/lib/stringWriter.js | 30 - .../node_modules/jszip/lib/support.js | 34 - .../jszip/lib/uint8ArrayReader.js | 47 - .../jszip/lib/uint8ArrayWriter.js | 36 - .../node-zip/node_modules/jszip/lib/utf8.js | 207 - .../node-zip/node_modules/jszip/lib/utils.js | 326 - .../node_modules/jszip/lib/zipEntries.js | 221 - .../node_modules/jszip/lib/zipEntry.js | 310 - .../jszip/node_modules/pako/Gruntfile.js | 78 - .../jszip/node_modules/pako/HISTORY.md | 62 - .../jszip/node_modules/pako/LICENSE | 21 - .../jszip/node_modules/pako/README.md | 171 - .../jszip/node_modules/pako/bower.json | 23 - .../jszip/node_modules/pako/dist/pako.js | 6411 -------- .../jszip/node_modules/pako/dist/pako.min.js | 3 - .../node_modules/pako/dist/pako_deflate.js | 3762 ----- .../pako/dist/pako_deflate.min.js | 2 - .../node_modules/pako/dist/pako_inflate.js | 3049 ---- .../pako/dist/pako_inflate.min.js | 2 - .../jszip/node_modules/pako/doc/index.html | 1626 -- .../jszip/node_modules/pako/index.js | 14 - .../jszip/node_modules/pako/lib/deflate.js | 376 - .../jszip/node_modules/pako/lib/inflate.js | 379 - .../node_modules/pako/lib/utils/common.js | 102 - .../node_modules/pako/lib/utils/strings.js | 185 - .../node_modules/pako/lib/zlib/adler32.js | 32 - .../node_modules/pako/lib/zlib/constants.js | 47 - .../jszip/node_modules/pako/lib/zlib/crc32.js | 41 - .../node_modules/pako/lib/zlib/deflate.js | 1765 --- .../node_modules/pako/lib/zlib/gzheader.js | 40 - .../node_modules/pako/lib/zlib/inffast.js | 325 - .../node_modules/pako/lib/zlib/inflate.js | 1503 -- .../node_modules/pako/lib/zlib/inftrees.js | 327 - .../node_modules/pako/lib/zlib/messages.js | 13 - .../jszip/node_modules/pako/lib/zlib/trees.js | 1199 -- .../node_modules/pako/lib/zlib/zstream.js | 29 - .../jszip/node_modules/pako/package.json | 74 - .../node-zip/node_modules/jszip/package.json | 87 - .../node_modules/jszip/vendor/FileSaver.js | 247 - cli/node_modules/node-zip/package.json | 66 - .../node-zip/test/nodezip_spec.js | 41 - cli/node_modules/rimraf/LICENSE | 15 - cli/node_modules/rimraf/README.md | 38 - cli/node_modules/rimraf/bin.js | 40 - .../rimraf/node_modules/glob/LICENSE | 15 - .../rimraf/node_modules/glob/README.md | 377 - .../rimraf/node_modules/glob/common.js | 245 - .../rimraf/node_modules/glob/glob.js | 752 - .../glob/node_modules/inflight/.eslintrc | 17 - .../glob/node_modules/inflight/LICENSE | 15 - .../glob/node_modules/inflight/README.md | 37 - .../glob/node_modules/inflight/inflight.js | 44 - .../inflight/node_modules/wrappy/LICENSE | 15 - .../inflight/node_modules/wrappy/README.md | 36 - .../inflight/node_modules/wrappy/package.json | 52 - .../node_modules/wrappy/test/basic.js | 51 - .../inflight/node_modules/wrappy/wrappy.js | 33 - .../glob/node_modules/inflight/package.json | 61 - .../glob/node_modules/inflight/test.js | 97 - .../glob/node_modules/inherits/LICENSE | 16 - .../glob/node_modules/inherits/README.md | 42 - .../glob/node_modules/inherits/inherits.js | 1 - .../node_modules/inherits/inherits_browser.js | 23 - .../glob/node_modules/inherits/package.json | 50 - .../glob/node_modules/inherits/test.js | 25 - .../glob/node_modules/minimatch/LICENSE | 15 - .../glob/node_modules/minimatch/README.md | 216 - .../glob/node_modules/minimatch/browser.js | 1159 -- .../glob/node_modules/minimatch/minimatch.js | 912 -- .../node_modules/brace-expansion/.npmignore | 2 - .../node_modules/brace-expansion/.travis.yml | 3 - .../node_modules/brace-expansion/README.md | 121 - .../node_modules/brace-expansion/example.js | 8 - .../node_modules/brace-expansion/index.js | 191 - .../node_modules/balanced-match/.npmignore | 2 - .../node_modules/balanced-match/.travis.yml | 4 - .../node_modules/balanced-match/Makefile | 6 - .../node_modules/balanced-match/README.md | 80 - .../node_modules/balanced-match/example.js | 5 - .../node_modules/balanced-match/index.js | 38 - .../node_modules/balanced-match/package.json | 73 - .../balanced-match/test/balanced.js | 56 - .../node_modules/concat-map/.travis.yml | 4 - .../node_modules/concat-map/LICENSE | 18 - .../node_modules/concat-map/README.markdown | 62 - .../node_modules/concat-map/example/map.js | 6 - .../node_modules/concat-map/index.js | 13 - .../node_modules/concat-map/package.json | 83 - .../node_modules/concat-map/test/map.js | 39 - .../node_modules/brace-expansion/package.json | 75 - .../brace-expansion/test/bash-comparison.js | 32 - .../brace-expansion/test/bash-results.txt | 1075 -- .../brace-expansion/test/cases.txt | 182 - .../brace-expansion/test/dollar.js | 9 - .../brace-expansion/test/empty-option.js | 10 - .../brace-expansion/test/generate.sh | 24 - .../test/negative-increment.js | 15 - .../brace-expansion/test/nested.js | 16 - .../brace-expansion/test/order.js | 10 - .../node_modules/brace-expansion/test/pad.js | 13 - .../brace-expansion/test/same-type.js | 7 - .../brace-expansion/test/sequence.js | 50 - .../glob/node_modules/minimatch/package.json | 63 - .../glob/node_modules/once/LICENSE | 15 - .../glob/node_modules/once/README.md | 51 - .../once/node_modules/wrappy/LICENSE | 15 - .../once/node_modules/wrappy/README.md | 36 - .../once/node_modules/wrappy/package.json | 52 - .../once/node_modules/wrappy/test/basic.js | 51 - .../once/node_modules/wrappy/wrappy.js | 33 - .../glob/node_modules/once/once.js | 21 - .../glob/node_modules/once/package.json | 60 - .../glob/node_modules/once/test/once.js | 23 - .../node_modules/path-is-absolute/index.js | 20 - .../node_modules/path-is-absolute/license | 21 - .../path-is-absolute/package.json | 70 - .../node_modules/path-is-absolute/readme.md | 51 - .../rimraf/node_modules/glob/package.json | 73 - .../rimraf/node_modules/glob/sync.js | 460 - cli/node_modules/rimraf/package.json | 62 - cli/node_modules/rimraf/rimraf.js | 333 - cli/node_modules/shortid/.npmignore | 7 - cli/node_modules/shortid/Gruntfile.js | 65 - cli/node_modules/shortid/LICENSE | 34 - cli/node_modules/shortid/README.md | 255 - cli/node_modules/shortid/lib/alphabet.js | 98 - cli/node_modules/shortid/lib/decode.js | 17 - cli/node_modules/shortid/lib/encode.js | 19 - cli/node_modules/shortid/lib/index.js | 100 - cli/node_modules/shortid/lib/is-valid.js | 19 - .../shortid/lib/random/random-byte-browser.js | 14 - .../shortid/lib/random/random-byte.js | 10 - .../shortid/lib/random/random-from-seed.js | 25 - .../lib/util/cluster-worker-id-browser.js | 3 - .../shortid/lib/util/cluster-worker-id.js | 3 - cli/node_modules/shortid/package.json | 77 - cli/node_modules/should/.eslintrc | 17 - cli/node_modules/should/.npmignore | 3 - cli/node_modules/should/.travis.yml | 10 - cli/node_modules/should/.zuul.yml | 10 - cli/node_modules/should/CONTRIBUTING.md | 14 - cli/node_modules/should/History.md | 459 - cli/node_modules/should/LICENSE | 19 - cli/node_modules/should/Readme.md | 216 - cli/node_modules/should/as-function.js | 1 - cli/node_modules/should/bower.json | 28 - cli/node_modules/should/gulpfile.js | 40 - cli/node_modules/should/index.js | 14 - .../should/lib/assertion-error.js | 86 - cli/node_modules/should/lib/assertion.js | 206 - cli/node_modules/should/lib/config.js | 11 - cli/node_modules/should/lib/ext/_assert.js | 279 - cli/node_modules/should/lib/ext/assert.js | 70 - cli/node_modules/should/lib/ext/bool.js | 67 - cli/node_modules/should/lib/ext/chain.js | 24 - cli/node_modules/should/lib/ext/contain.js | 158 - cli/node_modules/should/lib/ext/eql.js | 75 - cli/node_modules/should/lib/ext/error.js | 109 - cli/node_modules/should/lib/ext/match.js | 191 - cli/node_modules/should/lib/ext/number.js | 123 - cli/node_modules/should/lib/ext/property.js | 370 - cli/node_modules/should/lib/ext/string.js | 41 - cli/node_modules/should/lib/ext/type.js | 224 - cli/node_modules/should/lib/should.js | 158 - cli/node_modules/should/lib/util.js | 135 - .../node_modules/should-equal/.eslintrc | 12 - .../node_modules/should-equal/.npmignore | 1 - .../node_modules/should-equal/.travis.yml | 6 - .../should/node_modules/should-equal/LICENSE | 21 - .../node_modules/should-equal/README.md | 20 - .../node_modules/should-equal/format.js | 7 - .../should/node_modules/should-equal/index.js | 340 - .../node_modules/should-equal/package.json | 57 - .../should/node_modules/should-equal/test.js | 420 - .../node_modules/should-format/.eslintrc | 13 - .../node_modules/should-format/.npmignore | 1 - .../node_modules/should-format/.travis.yml | 6 - .../should/node_modules/should-format/LICENSE | 22 - .../node_modules/should-format/README.md | 6 - .../node_modules/should-format/index.js | 455 - .../node_modules/should-format/package.json | 58 - .../should-format/tests/browser/index.html | 18 - .../should-format/tests/browser/mocha.css | 270 - .../should-format/tests/browser/mocha.js | 6069 -------- .../should-format/tests/browser/tests.js | 3417 ----- .../node_modules/should-format/tests/test.js | 195 - .../should/node_modules/should-format/util.js | 28 - .../node_modules/should-type/.npmignore | 30 - .../should/node_modules/should-type/LICENSE | 22 - .../should/node_modules/should-type/README.md | 4 - .../should/node_modules/should-type/index.js | 159 - .../node_modules/should-type/package.json | 47 - .../should/node_modules/should-type/types.js | 41 - cli/node_modules/should/package.json | 82 - cli/node_modules/should/should.js | 3425 ----- cli/node_modules/should/should.min.js | 9 - cli/node_modules/wrench/.npmignore | 3 - cli/node_modules/wrench/LICENSE | 21 - cli/node_modules/wrench/lib/wrench.js | 531 - cli/node_modules/wrench/package.json | 57 - cli/node_modules/wrench/readme.md | 103 - .../wrench/tests/copydirsync_unix.js | 242 - cli/node_modules/wrench/tests/mkdir.js | 26 - cli/node_modules/wrench/tests/readdir.js | 61 - cli/node_modules/wrench/tests/readdir/bar.txt | 0 .../wrench/tests/readdir/foo/bar/ipsum.js | 0 .../wrench/tests/readdir/foo/dolor.md | 0 .../wrench/tests/readdir/foo/lorem.txt | 0 .../wrench/tests/rmdirSyncRecursive.js | 74 - cli/node_modules/wrench/tests/runner.js | 9 - .../wrench/tests/shown/.hidden.txt | 1 - .../wrench/tests/shown/.hidden/dolor.md | 0 cli/node_modules/wrench/tests/shown/bar.txt | 1 - .../wrench/tests/shown/foo/bar/ipsum.js | 0 .../wrench/tests/shown/foo/dolor.md | 0 .../wrench/tests/shown/foo/lorem.txt | 0 .../wrench/tests/withsymlinks/test | 1 - 1472 files changed, 1 insertion(+), 252085 deletions(-) delete mode 120000 cli/node_modules/.bin/_mocha delete mode 120000 cli/node_modules/.bin/mocha delete mode 120000 cli/node_modules/.bin/ncp delete mode 120000 cli/node_modules/.bin/nodezip delete mode 120000 cli/node_modules/.bin/rimraf delete mode 120000 cli/node_modules/.bin/uuid delete mode 100644 cli/node_modules/adm-zip/README.md delete mode 100644 cli/node_modules/adm-zip/adm-zip.js delete mode 100644 cli/node_modules/adm-zip/headers/entryHeader.js delete mode 100644 cli/node_modules/adm-zip/headers/index.js delete mode 100644 cli/node_modules/adm-zip/headers/mainHeader.js delete mode 100644 cli/node_modules/adm-zip/methods/deflater.js delete mode 100644 cli/node_modules/adm-zip/methods/index.js delete mode 100644 cli/node_modules/adm-zip/methods/inflater.js delete mode 100644 cli/node_modules/adm-zip/package.json delete mode 100644 cli/node_modules/adm-zip/util/constants.js delete mode 100644 cli/node_modules/adm-zip/util/errors.js delete mode 100644 cli/node_modules/adm-zip/util/fattr.js delete mode 100644 cli/node_modules/adm-zip/util/index.js delete mode 100644 cli/node_modules/adm-zip/util/utils.js delete mode 100644 cli/node_modules/adm-zip/zipEntry.js delete mode 100644 cli/node_modules/adm-zip/zipFile.js delete mode 100644 cli/node_modules/async/.travis.yml delete mode 100644 cli/node_modules/async/LICENSE delete mode 100644 cli/node_modules/async/README.md delete mode 100644 cli/node_modules/async/bower.json delete mode 100644 cli/node_modules/async/component.json delete mode 100644 cli/node_modules/async/lib/async.js delete mode 100644 cli/node_modules/async/package.json delete mode 100755 cli/node_modules/async/support/sync-package-managers.js delete mode 100644 cli/node_modules/aws-sdk/.jshintrc delete mode 100644 cli/node_modules/aws-sdk/.npmignore delete mode 100644 cli/node_modules/aws-sdk/CONTRIBUTING.md delete mode 100644 cli/node_modules/aws-sdk/LICENSE.txt delete mode 100644 cli/node_modules/aws-sdk/NOTICE.txt delete mode 100644 cli/node_modules/aws-sdk/README.md delete mode 100644 cli/node_modules/aws-sdk/UPGRADING.md delete mode 100644 cli/node_modules/aws-sdk/apis/autoscaling-2011-01-01.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/autoscaling-2011-01-01.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/cloudformation-2010-05-15.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/cloudformation-2010-05-15.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/cloudfront-2015-04-17.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/cloudfront-2015-04-17.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/cloudfront-2015-04-17.waiters.json delete mode 100644 cli/node_modules/aws-sdk/apis/cloudhsm-2014-05-30.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/cloudsearch-2011-02-01.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/cloudsearch-2011-02-01.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/cloudsearch-2013-01-01.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/cloudsearch-2013-01-01.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/cloudsearchdomain-2013-01-01.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/cloudtrail-2013-11-01.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/cloudtrail-2013-11-01.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/codecommit-2015-04-13.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/codecommit-2015-04-13.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/codedeploy-2014-10-06.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/codepipeline-2015-07-09.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/cognito-identity-2014-06-30.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/cognito-sync-2014-06-30.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/config-2014-11-12.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/config-2014-11-12.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/datapipeline-2012-10-29.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/datapipeline-2012-10-29.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/devicefarm-2015-06-23.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/devicefarm-2015-06-23.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/directconnect-2012-10-25.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/directconnect-2012-10-25.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/ds-2015-04-16.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/dynamodb-2011-12-05.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/dynamodb-2011-12-05.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/dynamodb-2011-12-05.waiters.json delete mode 100644 cli/node_modules/aws-sdk/apis/dynamodb-2012-08-10.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/dynamodb-2012-08-10.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/dynamodb-2012-08-10.waiters.json delete mode 100644 cli/node_modules/aws-sdk/apis/ec2-2015-04-15.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/ec2-2015-04-15.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/ec2-2015-04-15.waiters.json delete mode 100644 cli/node_modules/aws-sdk/apis/ecs-2014-11-13.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/ecs-2014-11-13.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/efs-2015-02-01.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/elasticache-2015-02-02.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/elasticache-2015-02-02.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/elasticbeanstalk-2010-12-01.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/elasticbeanstalk-2010-12-01.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/elasticloadbalancing-2012-06-01.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/elasticloadbalancing-2012-06-01.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/elasticmapreduce-2009-03-31.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/elasticmapreduce-2009-03-31.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/elastictranscoder-2012-09-25.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/elastictranscoder-2012-09-25.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/elastictranscoder-2012-09-25.waiters.json delete mode 100644 cli/node_modules/aws-sdk/apis/email-2010-12-01.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/email-2010-12-01.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/email-2010-12-01.waiters.json delete mode 100644 cli/node_modules/aws-sdk/apis/glacier-2012-06-01.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/glacier-2012-06-01.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/glacier-2012-06-01.waiters.json delete mode 100644 cli/node_modules/aws-sdk/apis/iam-2010-05-08.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/iam-2010-05-08.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/importexport-2010-06-01.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/importexport-2010-06-01.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/kinesis-2013-12-02.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/kinesis-2013-12-02.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/kms-2014-11-01.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/lambda-2014-11-11.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/lambda-2014-11-11.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/lambda-2015-03-31.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/lambda-2015-03-31.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/logs-2014-03-28.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/logs-2014-03-28.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/machinelearning-2014-12-12.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/machinelearning-2014-12-12.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/metadata.json delete mode 100644 cli/node_modules/aws-sdk/apis/mobileanalytics-2014-06-05.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/monitoring-2010-08-01.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/monitoring-2010-08-01.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/opsworks-2013-02-18.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/opsworks-2013-02-18.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/rds-2013-01-10.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/rds-2013-01-10.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/rds-2013-02-12.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/rds-2013-02-12.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/rds-2013-09-09.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/rds-2013-09-09.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/rds-2013-09-09.waiters.json delete mode 100644 cli/node_modules/aws-sdk/apis/rds-2014-10-31.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/rds-2014-10-31.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/rds-2014-10-31.waiters.json delete mode 100644 cli/node_modules/aws-sdk/apis/redshift-2012-12-01.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/redshift-2012-12-01.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/redshift-2012-12-01.waiters.json delete mode 100644 cli/node_modules/aws-sdk/apis/route53-2013-04-01.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/route53-2013-04-01.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/route53domains-2014-05-15.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/route53domains-2014-05-15.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/s3-2006-03-01.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/s3-2006-03-01.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/s3-2006-03-01.waiters.json delete mode 100644 cli/node_modules/aws-sdk/apis/sdb-2009-04-15.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/sdb-2009-04-15.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/sns-2010-03-31.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/sns-2010-03-31.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/sqs-2012-11-05.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/sqs-2012-11-05.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/ssm-2014-11-06.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/storagegateway-2013-06-30.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/storagegateway-2013-06-30.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/streams.dynamodb-2012-08-10.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/sts-2011-06-15.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/support-2013-04-15.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/support-2013-04-15.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/swf-2012-01-25.min.json delete mode 100644 cli/node_modules/aws-sdk/apis/swf-2012-01-25.paginators.json delete mode 100644 cli/node_modules/aws-sdk/apis/workspaces-2015-04-08.min.json delete mode 100644 cli/node_modules/aws-sdk/bower.json delete mode 100755 cli/node_modules/aws-sdk/dist-tools/browser-builder.js delete mode 100644 cli/node_modules/aws-sdk/dist-tools/service-collector.js delete mode 100644 cli/node_modules/aws-sdk/dist-tools/transform.js delete mode 100644 cli/node_modules/aws-sdk/index.js delete mode 100644 cli/node_modules/aws-sdk/lib/api_loader.js delete mode 100644 cli/node_modules/aws-sdk/lib/aws.js delete mode 100644 cli/node_modules/aws-sdk/lib/browser.js delete mode 100644 cli/node_modules/aws-sdk/lib/config.js delete mode 100644 cli/node_modules/aws-sdk/lib/core.js delete mode 100644 cli/node_modules/aws-sdk/lib/credentials.js delete mode 100644 cli/node_modules/aws-sdk/lib/credentials/cognito_identity_credentials.js delete mode 100644 cli/node_modules/aws-sdk/lib/credentials/credential_provider_chain.js delete mode 100644 cli/node_modules/aws-sdk/lib/credentials/ec2_metadata_credentials.js delete mode 100644 cli/node_modules/aws-sdk/lib/credentials/environment_credentials.js delete mode 100644 cli/node_modules/aws-sdk/lib/credentials/file_system_credentials.js delete mode 100644 cli/node_modules/aws-sdk/lib/credentials/saml_credentials.js delete mode 100644 cli/node_modules/aws-sdk/lib/credentials/shared_ini_file_credentials.js delete mode 100644 cli/node_modules/aws-sdk/lib/credentials/temporary_credentials.js delete mode 100644 cli/node_modules/aws-sdk/lib/credentials/web_identity_credentials.js delete mode 100644 cli/node_modules/aws-sdk/lib/event_listeners.js delete mode 100644 cli/node_modules/aws-sdk/lib/http.js delete mode 100644 cli/node_modules/aws-sdk/lib/http/node.js delete mode 100644 cli/node_modules/aws-sdk/lib/http/xhr.js delete mode 100644 cli/node_modules/aws-sdk/lib/json/builder.js delete mode 100644 cli/node_modules/aws-sdk/lib/json/parser.js delete mode 100644 cli/node_modules/aws-sdk/lib/metadata_service.js delete mode 100644 cli/node_modules/aws-sdk/lib/model/api.js delete mode 100644 cli/node_modules/aws-sdk/lib/model/collection.js delete mode 100644 cli/node_modules/aws-sdk/lib/model/operation.js delete mode 100644 cli/node_modules/aws-sdk/lib/model/paginator.js delete mode 100644 cli/node_modules/aws-sdk/lib/model/resource_waiter.js delete mode 100644 cli/node_modules/aws-sdk/lib/model/shape.js delete mode 100644 cli/node_modules/aws-sdk/lib/param_validator.js delete mode 100644 cli/node_modules/aws-sdk/lib/protocol/json.js delete mode 100644 cli/node_modules/aws-sdk/lib/protocol/query.js delete mode 100644 cli/node_modules/aws-sdk/lib/protocol/rest.js delete mode 100644 cli/node_modules/aws-sdk/lib/protocol/rest_json.js delete mode 100644 cli/node_modules/aws-sdk/lib/protocol/rest_xml.js delete mode 100644 cli/node_modules/aws-sdk/lib/query/query_param_serializer.js delete mode 100644 cli/node_modules/aws-sdk/lib/region_config.js delete mode 100644 cli/node_modules/aws-sdk/lib/region_config.json delete mode 100644 cli/node_modules/aws-sdk/lib/request.js delete mode 100644 cli/node_modules/aws-sdk/lib/resource_waiter.js delete mode 100644 cli/node_modules/aws-sdk/lib/response.js delete mode 100644 cli/node_modules/aws-sdk/lib/s3/managed_upload.js delete mode 100644 cli/node_modules/aws-sdk/lib/sequential_executor.js delete mode 100644 cli/node_modules/aws-sdk/lib/service.js delete mode 100644 cli/node_modules/aws-sdk/lib/services.js delete mode 100644 cli/node_modules/aws-sdk/lib/services/cloudfront.js delete mode 100644 cli/node_modules/aws-sdk/lib/services/cloudsearchdomain.js delete mode 100644 cli/node_modules/aws-sdk/lib/services/cognitoidentity.js delete mode 100644 cli/node_modules/aws-sdk/lib/services/dynamodb.js delete mode 100644 cli/node_modules/aws-sdk/lib/services/ec2.js delete mode 100644 cli/node_modules/aws-sdk/lib/services/glacier.js delete mode 100644 cli/node_modules/aws-sdk/lib/services/machinelearning.js delete mode 100644 cli/node_modules/aws-sdk/lib/services/route53.js delete mode 100644 cli/node_modules/aws-sdk/lib/services/s3.js delete mode 100644 cli/node_modules/aws-sdk/lib/services/sqs.js delete mode 100644 cli/node_modules/aws-sdk/lib/services/sts.js delete mode 100644 cli/node_modules/aws-sdk/lib/services/swf.js delete mode 100644 cli/node_modules/aws-sdk/lib/signers/presign.js delete mode 100644 cli/node_modules/aws-sdk/lib/signers/request_signer.js delete mode 100644 cli/node_modules/aws-sdk/lib/signers/s3.js delete mode 100644 cli/node_modules/aws-sdk/lib/signers/v2.js delete mode 100644 cli/node_modules/aws-sdk/lib/signers/v3.js delete mode 100644 cli/node_modules/aws-sdk/lib/signers/v3https.js delete mode 100644 cli/node_modules/aws-sdk/lib/signers/v4.js delete mode 100644 cli/node_modules/aws-sdk/lib/state_machine.js delete mode 100644 cli/node_modules/aws-sdk/lib/util.js delete mode 100644 cli/node_modules/aws-sdk/lib/xml/browser_parser.js delete mode 100644 cli/node_modules/aws-sdk/lib/xml/builder.js delete mode 100644 cli/node_modules/aws-sdk/lib/xml/node_parser.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/AUTHORS delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/LICENSE delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/LICENSE-W3C.html delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/README.md delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/component.json delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/examples/big-not-pretty.xml delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/examples/example.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/examples/get-products.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/examples/hello-world.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/examples/not-pretty.xml delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/examples/pretty-print.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/examples/shopping.xml delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/examples/strict.dtd delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/examples/test.html delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/examples/test.xml delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/lib/sax.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/package.json delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/attribute-name.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/buffer-overrun.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/case.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/cdata-chunked.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/cdata-end-split.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/cdata-fake-end.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/cdata-multiple.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/cdata.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/cyrillic.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/duplicate-attribute.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/entities.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/entity-mega.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/index.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/issue-23.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/issue-30.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/issue-35.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/issue-47.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/issue-49.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/issue-84.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/parser-position.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/script-close-better.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/script.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/self-closing-child-strict.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/self-closing-child.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/self-closing-tag.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/stray-ending.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/trailing-attribute-no-value.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/trailing-non-whitespace.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/unclosed-root.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/unquoted.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-issue-41.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-rebinding.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-strict.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-unbound.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-xml-default-ns.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-xml-default-prefix.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-xml-default-redefine.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/xml2js/.npmignore delete mode 100644 cli/node_modules/aws-sdk/node_modules/xml2js/.travis.yml delete mode 100644 cli/node_modules/aws-sdk/node_modules/xml2js/83.coffee delete mode 100644 cli/node_modules/aws-sdk/node_modules/xml2js/LICENSE delete mode 100644 cli/node_modules/aws-sdk/node_modules/xml2js/README.md delete mode 100644 cli/node_modules/aws-sdk/node_modules/xml2js/canon.xml delete mode 100644 cli/node_modules/aws-sdk/node_modules/xml2js/lib/xml2js.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/xml2js/package.json delete mode 100644 cli/node_modules/aws-sdk/node_modules/xml2js/text.coffee delete mode 100644 cli/node_modules/aws-sdk/node_modules/xml2js/text.xml delete mode 100644 cli/node_modules/aws-sdk/node_modules/xmlbuilder/.npmignore delete mode 100644 cli/node_modules/aws-sdk/node_modules/xmlbuilder/README.md delete mode 100644 cli/node_modules/aws-sdk/node_modules/xmlbuilder/lib/XMLBuilder.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/xmlbuilder/lib/XMLFragment.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/xmlbuilder/lib/index.js delete mode 100644 cli/node_modules/aws-sdk/node_modules/xmlbuilder/package.json delete mode 100644 cli/node_modules/aws-sdk/package.json delete mode 100755 cli/node_modules/aws-sdk/scripts/console delete mode 100644 cli/node_modules/aws-sdk/scripts/lib/translator.js delete mode 100755 cli/node_modules/aws-sdk/scripts/translate-api delete mode 100644 cli/node_modules/aws-sdk/testem.json delete mode 100644 cli/node_modules/chai/.npmignore delete mode 100644 cli/node_modules/chai/CONTRIBUTING.md delete mode 100644 cli/node_modules/chai/History.md delete mode 100644 cli/node_modules/chai/README.md delete mode 100644 cli/node_modules/chai/ReleaseNotes.md delete mode 100644 cli/node_modules/chai/bower.json delete mode 100644 cli/node_modules/chai/chai.js delete mode 100644 cli/node_modules/chai/index.js delete mode 100644 cli/node_modules/chai/karma.conf.js delete mode 100644 cli/node_modules/chai/karma.sauce.js delete mode 100644 cli/node_modules/chai/lib/chai.js delete mode 100644 cli/node_modules/chai/lib/chai/assertion.js delete mode 100644 cli/node_modules/chai/lib/chai/config.js delete mode 100644 cli/node_modules/chai/lib/chai/core/assertions.js delete mode 100644 cli/node_modules/chai/lib/chai/interface/assert.js delete mode 100644 cli/node_modules/chai/lib/chai/interface/expect.js delete mode 100644 cli/node_modules/chai/lib/chai/interface/should.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/addChainableMethod.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/addMethod.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/addProperty.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/flag.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/getActual.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/getEnumerableProperties.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/getMessage.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/getName.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/getPathInfo.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/getPathValue.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/getProperties.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/hasProperty.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/index.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/inspect.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/objDisplay.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/overwriteMethod.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/overwriteProperty.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/test.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/transferFlags.js delete mode 100644 cli/node_modules/chai/lib/chai/utils/type.js delete mode 100644 cli/node_modules/chai/node_modules/assertion-error/.npmignore delete mode 100644 cli/node_modules/chai/node_modules/assertion-error/History.md delete mode 100644 cli/node_modules/chai/node_modules/assertion-error/README.md delete mode 100644 cli/node_modules/chai/node_modules/assertion-error/index.js delete mode 100644 cli/node_modules/chai/node_modules/assertion-error/package.json delete mode 100644 cli/node_modules/chai/node_modules/deep-eql/.npmignore delete mode 100644 cli/node_modules/chai/node_modules/deep-eql/History.md delete mode 100644 cli/node_modules/chai/node_modules/deep-eql/README.md delete mode 100644 cli/node_modules/chai/node_modules/deep-eql/index.js delete mode 100644 cli/node_modules/chai/node_modules/deep-eql/karma.conf.js delete mode 100644 cli/node_modules/chai/node_modules/deep-eql/lib/eql.js delete mode 100644 cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/.npmignore delete mode 100644 cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/History.md delete mode 100644 cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/README.md delete mode 100644 cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/index.js delete mode 100644 cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/lib/type.js delete mode 100644 cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/package.json delete mode 100644 cli/node_modules/chai/node_modules/deep-eql/package.json delete mode 100644 cli/node_modules/chai/package.json delete mode 100644 cli/node_modules/chai/sauce.browsers.js delete mode 100644 cli/node_modules/commander/Readme.md delete mode 100644 cli/node_modules/commander/index.js delete mode 100644 cli/node_modules/commander/package.json delete mode 100644 cli/node_modules/del/index.js delete mode 100644 cli/node_modules/del/license delete mode 100644 cli/node_modules/del/node_modules/each-async/index.js delete mode 100644 cli/node_modules/del/node_modules/each-async/license delete mode 100644 cli/node_modules/del/node_modules/each-async/node_modules/onetime/index.js delete mode 100644 cli/node_modules/del/node_modules/each-async/node_modules/onetime/package.json delete mode 100644 cli/node_modules/del/node_modules/each-async/node_modules/onetime/readme.md delete mode 100644 cli/node_modules/del/node_modules/each-async/node_modules/set-immediate-shim/index.js delete mode 100644 cli/node_modules/del/node_modules/each-async/node_modules/set-immediate-shim/package.json delete mode 100644 cli/node_modules/del/node_modules/each-async/node_modules/set-immediate-shim/readme.md delete mode 100644 cli/node_modules/del/node_modules/each-async/package.json delete mode 100644 cli/node_modules/del/node_modules/each-async/readme.md delete mode 100644 cli/node_modules/del/node_modules/globby/index.js delete mode 100644 cli/node_modules/del/node_modules/globby/license delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/array-union/index.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/array-union/node_modules/array-uniq/index.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/array-union/node_modules/array-uniq/package.json delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/array-union/node_modules/array-uniq/readme.md delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/array-union/package.json delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/array-union/readme.md delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/async/.jscsrc delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/async/CHANGELOG.md delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/async/LICENSE delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/async/README.md delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/async/lib/async.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/async/package.json delete mode 100755 cli/node_modules/del/node_modules/globby/node_modules/async/support/sync-package-managers.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/LICENSE delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/README.md delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/common.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/glob.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/inflight/.eslintrc delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/inflight/LICENSE delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/inflight/README.md delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/inflight/inflight.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/inflight/package.json delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/inflight/test.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/inherits/LICENSE delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/inherits/README.md delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/inherits/inherits.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/inherits/inherits_browser.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/inherits/package.json delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/inherits/test.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/LICENSE delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/README.md delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/browser.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/minimatch.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.travis.yml delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/minimatch/package.json delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/once/LICENSE delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/once/README.md delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/once/node_modules/wrappy/README.md delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/once/node_modules/wrappy/package.json delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/once/once.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/once/package.json delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/once/test/once.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/path-is-absolute/index.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/path-is-absolute/license delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/path-is-absolute/package.json delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/node_modules/path-is-absolute/readme.md delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/package.json delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/glob/sync.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/object-assign/index.js delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/object-assign/license delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/object-assign/package.json delete mode 100644 cli/node_modules/del/node_modules/globby/node_modules/object-assign/readme.md delete mode 100644 cli/node_modules/del/node_modules/globby/package.json delete mode 100644 cli/node_modules/del/node_modules/globby/readme.md delete mode 100644 cli/node_modules/del/node_modules/is-path-cwd/index.js delete mode 100644 cli/node_modules/del/node_modules/is-path-cwd/package.json delete mode 100644 cli/node_modules/del/node_modules/is-path-cwd/readme.md delete mode 100644 cli/node_modules/del/node_modules/is-path-in-cwd/index.js delete mode 100644 cli/node_modules/del/node_modules/is-path-in-cwd/node_modules/is-path-inside/index.js delete mode 100644 cli/node_modules/del/node_modules/is-path-in-cwd/node_modules/is-path-inside/node_modules/path-is-inside/LICENSE.txt delete mode 100644 cli/node_modules/del/node_modules/is-path-in-cwd/node_modules/is-path-inside/node_modules/path-is-inside/README.md delete mode 100644 cli/node_modules/del/node_modules/is-path-in-cwd/node_modules/is-path-inside/node_modules/path-is-inside/lib/path-is-inside.js delete mode 100644 cli/node_modules/del/node_modules/is-path-in-cwd/node_modules/is-path-inside/node_modules/path-is-inside/package.json delete mode 100644 cli/node_modules/del/node_modules/is-path-in-cwd/node_modules/is-path-inside/package.json delete mode 100644 cli/node_modules/del/node_modules/is-path-in-cwd/node_modules/is-path-inside/readme.md delete mode 100644 cli/node_modules/del/node_modules/is-path-in-cwd/package.json delete mode 100644 cli/node_modules/del/node_modules/is-path-in-cwd/readme.md delete mode 100644 cli/node_modules/del/node_modules/object-assign/index.js delete mode 100644 cli/node_modules/del/node_modules/object-assign/license delete mode 100644 cli/node_modules/del/node_modules/object-assign/package.json delete mode 100644 cli/node_modules/del/node_modules/object-assign/readme.md delete mode 100644 cli/node_modules/del/package.json delete mode 100644 cli/node_modules/del/readme.md delete mode 100644 cli/node_modules/dotenv/.env.development delete mode 100644 cli/node_modules/dotenv/.env.production delete mode 100644 cli/node_modules/dotenv/.env.staging delete mode 100644 cli/node_modules/dotenv/.npmignore delete mode 100644 cli/node_modules/dotenv/.travis.yml delete mode 100644 cli/node_modules/dotenv/README.md delete mode 100644 cli/node_modules/dotenv/lib/main.js delete mode 100644 cli/node_modules/dotenv/package.json delete mode 100644 cli/node_modules/dotenv/test/main.js delete mode 100644 cli/node_modules/hoek/.npmignore delete mode 100755 cli/node_modules/hoek/.travis.yml delete mode 100644 cli/node_modules/hoek/CONTRIBUTING.md delete mode 100755 cli/node_modules/hoek/LICENSE delete mode 100755 cli/node_modules/hoek/Makefile delete mode 100755 cli/node_modules/hoek/README.md delete mode 100755 cli/node_modules/hoek/images/hoek.png delete mode 100755 cli/node_modules/hoek/index.js delete mode 100755 cli/node_modules/hoek/lib/escape.js delete mode 100755 cli/node_modules/hoek/lib/index.js delete mode 100644 cli/node_modules/hoek/package.json delete mode 100755 cli/node_modules/hoek/test/escaper.js delete mode 100755 cli/node_modules/hoek/test/index.js delete mode 100644 cli/node_modules/hoek/test/modules/ignore.txt delete mode 100755 cli/node_modules/hoek/test/modules/test1.js delete mode 100755 cli/node_modules/hoek/test/modules/test2.js delete mode 100755 cli/node_modules/hoek/test/modules/test3.js delete mode 100644 cli/node_modules/jsonfile/.npmignore delete mode 100644 cli/node_modules/jsonfile/CHANGELOG.md delete mode 100644 cli/node_modules/jsonfile/LICENSE delete mode 100644 cli/node_modules/jsonfile/README.md delete mode 100644 cli/node_modules/jsonfile/index.js delete mode 100644 cli/node_modules/jsonfile/package.json delete mode 100644 cli/node_modules/jsonfile/test.js delete mode 100644 cli/node_modules/lodash/LICENSE delete mode 100644 cli/node_modules/lodash/README.md delete mode 100644 cli/node_modules/lodash/array.js delete mode 100644 cli/node_modules/lodash/array/chunk.js delete mode 100644 cli/node_modules/lodash/array/compact.js delete mode 100644 cli/node_modules/lodash/array/difference.js delete mode 100644 cli/node_modules/lodash/array/drop.js delete mode 100644 cli/node_modules/lodash/array/dropRight.js delete mode 100644 cli/node_modules/lodash/array/dropRightWhile.js delete mode 100644 cli/node_modules/lodash/array/dropWhile.js delete mode 100644 cli/node_modules/lodash/array/fill.js delete mode 100644 cli/node_modules/lodash/array/findIndex.js delete mode 100644 cli/node_modules/lodash/array/findLastIndex.js delete mode 100644 cli/node_modules/lodash/array/first.js delete mode 100644 cli/node_modules/lodash/array/flatten.js delete mode 100644 cli/node_modules/lodash/array/flattenDeep.js delete mode 100644 cli/node_modules/lodash/array/head.js delete mode 100644 cli/node_modules/lodash/array/indexOf.js delete mode 100644 cli/node_modules/lodash/array/initial.js delete mode 100644 cli/node_modules/lodash/array/intersection.js delete mode 100644 cli/node_modules/lodash/array/last.js delete mode 100644 cli/node_modules/lodash/array/lastIndexOf.js delete mode 100644 cli/node_modules/lodash/array/object.js delete mode 100644 cli/node_modules/lodash/array/pull.js delete mode 100644 cli/node_modules/lodash/array/pullAt.js delete mode 100644 cli/node_modules/lodash/array/remove.js delete mode 100644 cli/node_modules/lodash/array/rest.js delete mode 100644 cli/node_modules/lodash/array/slice.js delete mode 100644 cli/node_modules/lodash/array/sortedIndex.js delete mode 100644 cli/node_modules/lodash/array/sortedLastIndex.js delete mode 100644 cli/node_modules/lodash/array/tail.js delete mode 100644 cli/node_modules/lodash/array/take.js delete mode 100644 cli/node_modules/lodash/array/takeRight.js delete mode 100644 cli/node_modules/lodash/array/takeRightWhile.js delete mode 100644 cli/node_modules/lodash/array/takeWhile.js delete mode 100644 cli/node_modules/lodash/array/union.js delete mode 100644 cli/node_modules/lodash/array/uniq.js delete mode 100644 cli/node_modules/lodash/array/unique.js delete mode 100644 cli/node_modules/lodash/array/unzip.js delete mode 100644 cli/node_modules/lodash/array/unzipWith.js delete mode 100644 cli/node_modules/lodash/array/without.js delete mode 100644 cli/node_modules/lodash/array/xor.js delete mode 100644 cli/node_modules/lodash/array/zip.js delete mode 100644 cli/node_modules/lodash/array/zipObject.js delete mode 100644 cli/node_modules/lodash/array/zipWith.js delete mode 100644 cli/node_modules/lodash/chain.js delete mode 100644 cli/node_modules/lodash/chain/chain.js delete mode 100644 cli/node_modules/lodash/chain/commit.js delete mode 100644 cli/node_modules/lodash/chain/concat.js delete mode 100644 cli/node_modules/lodash/chain/lodash.js delete mode 100644 cli/node_modules/lodash/chain/plant.js delete mode 100644 cli/node_modules/lodash/chain/reverse.js delete mode 100644 cli/node_modules/lodash/chain/run.js delete mode 100644 cli/node_modules/lodash/chain/tap.js delete mode 100644 cli/node_modules/lodash/chain/thru.js delete mode 100644 cli/node_modules/lodash/chain/toJSON.js delete mode 100644 cli/node_modules/lodash/chain/toString.js delete mode 100644 cli/node_modules/lodash/chain/value.js delete mode 100644 cli/node_modules/lodash/chain/valueOf.js delete mode 100644 cli/node_modules/lodash/chain/wrapperChain.js delete mode 100644 cli/node_modules/lodash/chain/wrapperCommit.js delete mode 100644 cli/node_modules/lodash/chain/wrapperConcat.js delete mode 100644 cli/node_modules/lodash/chain/wrapperPlant.js delete mode 100644 cli/node_modules/lodash/chain/wrapperReverse.js delete mode 100644 cli/node_modules/lodash/chain/wrapperToString.js delete mode 100644 cli/node_modules/lodash/chain/wrapperValue.js delete mode 100644 cli/node_modules/lodash/collection.js delete mode 100644 cli/node_modules/lodash/collection/all.js delete mode 100644 cli/node_modules/lodash/collection/any.js delete mode 100644 cli/node_modules/lodash/collection/at.js delete mode 100644 cli/node_modules/lodash/collection/collect.js delete mode 100644 cli/node_modules/lodash/collection/contains.js delete mode 100644 cli/node_modules/lodash/collection/countBy.js delete mode 100644 cli/node_modules/lodash/collection/detect.js delete mode 100644 cli/node_modules/lodash/collection/each.js delete mode 100644 cli/node_modules/lodash/collection/eachRight.js delete mode 100644 cli/node_modules/lodash/collection/every.js delete mode 100644 cli/node_modules/lodash/collection/filter.js delete mode 100644 cli/node_modules/lodash/collection/find.js delete mode 100644 cli/node_modules/lodash/collection/findLast.js delete mode 100644 cli/node_modules/lodash/collection/findWhere.js delete mode 100644 cli/node_modules/lodash/collection/foldl.js delete mode 100644 cli/node_modules/lodash/collection/foldr.js delete mode 100644 cli/node_modules/lodash/collection/forEach.js delete mode 100644 cli/node_modules/lodash/collection/forEachRight.js delete mode 100644 cli/node_modules/lodash/collection/groupBy.js delete mode 100644 cli/node_modules/lodash/collection/include.js delete mode 100644 cli/node_modules/lodash/collection/includes.js delete mode 100644 cli/node_modules/lodash/collection/indexBy.js delete mode 100644 cli/node_modules/lodash/collection/inject.js delete mode 100644 cli/node_modules/lodash/collection/invoke.js delete mode 100644 cli/node_modules/lodash/collection/map.js delete mode 100644 cli/node_modules/lodash/collection/max.js delete mode 100644 cli/node_modules/lodash/collection/min.js delete mode 100644 cli/node_modules/lodash/collection/partition.js delete mode 100644 cli/node_modules/lodash/collection/pluck.js delete mode 100644 cli/node_modules/lodash/collection/reduce.js delete mode 100644 cli/node_modules/lodash/collection/reduceRight.js delete mode 100644 cli/node_modules/lodash/collection/reject.js delete mode 100644 cli/node_modules/lodash/collection/sample.js delete mode 100644 cli/node_modules/lodash/collection/select.js delete mode 100644 cli/node_modules/lodash/collection/shuffle.js delete mode 100644 cli/node_modules/lodash/collection/size.js delete mode 100644 cli/node_modules/lodash/collection/some.js delete mode 100644 cli/node_modules/lodash/collection/sortBy.js delete mode 100644 cli/node_modules/lodash/collection/sortByAll.js delete mode 100644 cli/node_modules/lodash/collection/sortByOrder.js delete mode 100644 cli/node_modules/lodash/collection/sum.js delete mode 100644 cli/node_modules/lodash/collection/where.js delete mode 100644 cli/node_modules/lodash/date.js delete mode 100644 cli/node_modules/lodash/date/now.js delete mode 100644 cli/node_modules/lodash/function.js delete mode 100644 cli/node_modules/lodash/function/after.js delete mode 100644 cli/node_modules/lodash/function/ary.js delete mode 100644 cli/node_modules/lodash/function/backflow.js delete mode 100644 cli/node_modules/lodash/function/before.js delete mode 100644 cli/node_modules/lodash/function/bind.js delete mode 100644 cli/node_modules/lodash/function/bindAll.js delete mode 100644 cli/node_modules/lodash/function/bindKey.js delete mode 100644 cli/node_modules/lodash/function/compose.js delete mode 100644 cli/node_modules/lodash/function/curry.js delete mode 100644 cli/node_modules/lodash/function/curryRight.js delete mode 100644 cli/node_modules/lodash/function/debounce.js delete mode 100644 cli/node_modules/lodash/function/defer.js delete mode 100644 cli/node_modules/lodash/function/delay.js delete mode 100644 cli/node_modules/lodash/function/flow.js delete mode 100644 cli/node_modules/lodash/function/flowRight.js delete mode 100644 cli/node_modules/lodash/function/memoize.js delete mode 100644 cli/node_modules/lodash/function/modArgs.js delete mode 100644 cli/node_modules/lodash/function/negate.js delete mode 100644 cli/node_modules/lodash/function/once.js delete mode 100644 cli/node_modules/lodash/function/partial.js delete mode 100644 cli/node_modules/lodash/function/partialRight.js delete mode 100644 cli/node_modules/lodash/function/rearg.js delete mode 100644 cli/node_modules/lodash/function/restParam.js delete mode 100644 cli/node_modules/lodash/function/spread.js delete mode 100644 cli/node_modules/lodash/function/throttle.js delete mode 100644 cli/node_modules/lodash/function/wrap.js delete mode 100644 cli/node_modules/lodash/index.js delete mode 100644 cli/node_modules/lodash/internal/LazyWrapper.js delete mode 100644 cli/node_modules/lodash/internal/LodashWrapper.js delete mode 100644 cli/node_modules/lodash/internal/MapCache.js delete mode 100644 cli/node_modules/lodash/internal/SetCache.js delete mode 100644 cli/node_modules/lodash/internal/arrayConcat.js delete mode 100644 cli/node_modules/lodash/internal/arrayCopy.js delete mode 100644 cli/node_modules/lodash/internal/arrayEach.js delete mode 100644 cli/node_modules/lodash/internal/arrayEachRight.js delete mode 100644 cli/node_modules/lodash/internal/arrayEvery.js delete mode 100644 cli/node_modules/lodash/internal/arrayExtremum.js delete mode 100644 cli/node_modules/lodash/internal/arrayFilter.js delete mode 100644 cli/node_modules/lodash/internal/arrayMap.js delete mode 100644 cli/node_modules/lodash/internal/arrayPush.js delete mode 100644 cli/node_modules/lodash/internal/arrayReduce.js delete mode 100644 cli/node_modules/lodash/internal/arrayReduceRight.js delete mode 100644 cli/node_modules/lodash/internal/arraySome.js delete mode 100644 cli/node_modules/lodash/internal/arraySum.js delete mode 100644 cli/node_modules/lodash/internal/assignDefaults.js delete mode 100644 cli/node_modules/lodash/internal/assignOwnDefaults.js delete mode 100644 cli/node_modules/lodash/internal/assignWith.js delete mode 100644 cli/node_modules/lodash/internal/baseAssign.js delete mode 100644 cli/node_modules/lodash/internal/baseAt.js delete mode 100644 cli/node_modules/lodash/internal/baseCallback.js delete mode 100644 cli/node_modules/lodash/internal/baseClone.js delete mode 100644 cli/node_modules/lodash/internal/baseCompareAscending.js delete mode 100644 cli/node_modules/lodash/internal/baseCopy.js delete mode 100644 cli/node_modules/lodash/internal/baseCreate.js delete mode 100644 cli/node_modules/lodash/internal/baseDelay.js delete mode 100644 cli/node_modules/lodash/internal/baseDifference.js delete mode 100644 cli/node_modules/lodash/internal/baseEach.js delete mode 100644 cli/node_modules/lodash/internal/baseEachRight.js delete mode 100644 cli/node_modules/lodash/internal/baseEvery.js delete mode 100644 cli/node_modules/lodash/internal/baseExtremum.js delete mode 100644 cli/node_modules/lodash/internal/baseFill.js delete mode 100644 cli/node_modules/lodash/internal/baseFilter.js delete mode 100644 cli/node_modules/lodash/internal/baseFind.js delete mode 100644 cli/node_modules/lodash/internal/baseFindIndex.js delete mode 100644 cli/node_modules/lodash/internal/baseFlatten.js delete mode 100644 cli/node_modules/lodash/internal/baseFor.js delete mode 100644 cli/node_modules/lodash/internal/baseForIn.js delete mode 100644 cli/node_modules/lodash/internal/baseForOwn.js delete mode 100644 cli/node_modules/lodash/internal/baseForOwnRight.js delete mode 100644 cli/node_modules/lodash/internal/baseForRight.js delete mode 100644 cli/node_modules/lodash/internal/baseFunctions.js delete mode 100644 cli/node_modules/lodash/internal/baseGet.js delete mode 100644 cli/node_modules/lodash/internal/baseIndexOf.js delete mode 100644 cli/node_modules/lodash/internal/baseIsEqual.js delete mode 100644 cli/node_modules/lodash/internal/baseIsEqualDeep.js delete mode 100644 cli/node_modules/lodash/internal/baseIsFunction.js delete mode 100644 cli/node_modules/lodash/internal/baseIsMatch.js delete mode 100644 cli/node_modules/lodash/internal/baseLodash.js delete mode 100644 cli/node_modules/lodash/internal/baseMap.js delete mode 100644 cli/node_modules/lodash/internal/baseMatches.js delete mode 100644 cli/node_modules/lodash/internal/baseMatchesProperty.js delete mode 100644 cli/node_modules/lodash/internal/baseMerge.js delete mode 100644 cli/node_modules/lodash/internal/baseMergeDeep.js delete mode 100644 cli/node_modules/lodash/internal/baseProperty.js delete mode 100644 cli/node_modules/lodash/internal/basePropertyDeep.js delete mode 100644 cli/node_modules/lodash/internal/basePullAt.js delete mode 100644 cli/node_modules/lodash/internal/baseRandom.js delete mode 100644 cli/node_modules/lodash/internal/baseReduce.js delete mode 100644 cli/node_modules/lodash/internal/baseSetData.js delete mode 100644 cli/node_modules/lodash/internal/baseSlice.js delete mode 100644 cli/node_modules/lodash/internal/baseSome.js delete mode 100644 cli/node_modules/lodash/internal/baseSortBy.js delete mode 100644 cli/node_modules/lodash/internal/baseSortByOrder.js delete mode 100644 cli/node_modules/lodash/internal/baseSum.js delete mode 100644 cli/node_modules/lodash/internal/baseToString.js delete mode 100644 cli/node_modules/lodash/internal/baseUniq.js delete mode 100644 cli/node_modules/lodash/internal/baseValues.js delete mode 100644 cli/node_modules/lodash/internal/baseWhile.js delete mode 100644 cli/node_modules/lodash/internal/baseWrapperValue.js delete mode 100644 cli/node_modules/lodash/internal/binaryIndex.js delete mode 100644 cli/node_modules/lodash/internal/binaryIndexBy.js delete mode 100644 cli/node_modules/lodash/internal/bindCallback.js delete mode 100644 cli/node_modules/lodash/internal/bufferClone.js delete mode 100644 cli/node_modules/lodash/internal/cacheIndexOf.js delete mode 100644 cli/node_modules/lodash/internal/cachePush.js delete mode 100644 cli/node_modules/lodash/internal/charsLeftIndex.js delete mode 100644 cli/node_modules/lodash/internal/charsRightIndex.js delete mode 100644 cli/node_modules/lodash/internal/compareAscending.js delete mode 100644 cli/node_modules/lodash/internal/compareMultiple.js delete mode 100644 cli/node_modules/lodash/internal/composeArgs.js delete mode 100644 cli/node_modules/lodash/internal/composeArgsRight.js delete mode 100644 cli/node_modules/lodash/internal/createAggregator.js delete mode 100644 cli/node_modules/lodash/internal/createAssigner.js delete mode 100644 cli/node_modules/lodash/internal/createBaseEach.js delete mode 100644 cli/node_modules/lodash/internal/createBaseFor.js delete mode 100644 cli/node_modules/lodash/internal/createBindWrapper.js delete mode 100644 cli/node_modules/lodash/internal/createCache.js delete mode 100644 cli/node_modules/lodash/internal/createCompounder.js delete mode 100644 cli/node_modules/lodash/internal/createCtorWrapper.js delete mode 100644 cli/node_modules/lodash/internal/createCurry.js delete mode 100644 cli/node_modules/lodash/internal/createDefaults.js delete mode 100644 cli/node_modules/lodash/internal/createExtremum.js delete mode 100644 cli/node_modules/lodash/internal/createFind.js delete mode 100644 cli/node_modules/lodash/internal/createFindIndex.js delete mode 100644 cli/node_modules/lodash/internal/createFindKey.js delete mode 100644 cli/node_modules/lodash/internal/createFlow.js delete mode 100644 cli/node_modules/lodash/internal/createForEach.js delete mode 100644 cli/node_modules/lodash/internal/createForIn.js delete mode 100644 cli/node_modules/lodash/internal/createForOwn.js delete mode 100644 cli/node_modules/lodash/internal/createHybridWrapper.js delete mode 100644 cli/node_modules/lodash/internal/createObjectMapper.js delete mode 100644 cli/node_modules/lodash/internal/createPadDir.js delete mode 100644 cli/node_modules/lodash/internal/createPadding.js delete mode 100644 cli/node_modules/lodash/internal/createPartial.js delete mode 100644 cli/node_modules/lodash/internal/createPartialWrapper.js delete mode 100644 cli/node_modules/lodash/internal/createReduce.js delete mode 100644 cli/node_modules/lodash/internal/createRound.js delete mode 100644 cli/node_modules/lodash/internal/createSortedIndex.js delete mode 100644 cli/node_modules/lodash/internal/createWrapper.js delete mode 100644 cli/node_modules/lodash/internal/deburrLetter.js delete mode 100644 cli/node_modules/lodash/internal/equalArrays.js delete mode 100644 cli/node_modules/lodash/internal/equalByTag.js delete mode 100644 cli/node_modules/lodash/internal/equalObjects.js delete mode 100644 cli/node_modules/lodash/internal/escapeHtmlChar.js delete mode 100644 cli/node_modules/lodash/internal/escapeRegExpChar.js delete mode 100644 cli/node_modules/lodash/internal/escapeStringChar.js delete mode 100644 cli/node_modules/lodash/internal/getData.js delete mode 100644 cli/node_modules/lodash/internal/getFuncName.js delete mode 100644 cli/node_modules/lodash/internal/getLength.js delete mode 100644 cli/node_modules/lodash/internal/getMatchData.js delete mode 100644 cli/node_modules/lodash/internal/getNative.js delete mode 100644 cli/node_modules/lodash/internal/getView.js delete mode 100644 cli/node_modules/lodash/internal/indexOfNaN.js delete mode 100644 cli/node_modules/lodash/internal/initCloneArray.js delete mode 100644 cli/node_modules/lodash/internal/initCloneByTag.js delete mode 100644 cli/node_modules/lodash/internal/initCloneObject.js delete mode 100644 cli/node_modules/lodash/internal/invokePath.js delete mode 100644 cli/node_modules/lodash/internal/isArrayLike.js delete mode 100644 cli/node_modules/lodash/internal/isIndex.js delete mode 100644 cli/node_modules/lodash/internal/isIterateeCall.js delete mode 100644 cli/node_modules/lodash/internal/isKey.js delete mode 100644 cli/node_modules/lodash/internal/isLaziable.js delete mode 100644 cli/node_modules/lodash/internal/isLength.js delete mode 100644 cli/node_modules/lodash/internal/isObjectLike.js delete mode 100644 cli/node_modules/lodash/internal/isSpace.js delete mode 100644 cli/node_modules/lodash/internal/isStrictComparable.js delete mode 100644 cli/node_modules/lodash/internal/lazyClone.js delete mode 100644 cli/node_modules/lodash/internal/lazyReverse.js delete mode 100644 cli/node_modules/lodash/internal/lazyValue.js delete mode 100644 cli/node_modules/lodash/internal/mapDelete.js delete mode 100644 cli/node_modules/lodash/internal/mapGet.js delete mode 100644 cli/node_modules/lodash/internal/mapHas.js delete mode 100644 cli/node_modules/lodash/internal/mapSet.js delete mode 100644 cli/node_modules/lodash/internal/mergeData.js delete mode 100644 cli/node_modules/lodash/internal/mergeDefaults.js delete mode 100644 cli/node_modules/lodash/internal/metaMap.js delete mode 100644 cli/node_modules/lodash/internal/pickByArray.js delete mode 100644 cli/node_modules/lodash/internal/pickByCallback.js delete mode 100644 cli/node_modules/lodash/internal/reEscape.js delete mode 100644 cli/node_modules/lodash/internal/reEvaluate.js delete mode 100644 cli/node_modules/lodash/internal/reInterpolate.js delete mode 100644 cli/node_modules/lodash/internal/realNames.js delete mode 100644 cli/node_modules/lodash/internal/reorder.js delete mode 100644 cli/node_modules/lodash/internal/replaceHolders.js delete mode 100644 cli/node_modules/lodash/internal/setData.js delete mode 100644 cli/node_modules/lodash/internal/shimKeys.js delete mode 100644 cli/node_modules/lodash/internal/sortedUniq.js delete mode 100644 cli/node_modules/lodash/internal/toIterable.js delete mode 100644 cli/node_modules/lodash/internal/toObject.js delete mode 100644 cli/node_modules/lodash/internal/toPath.js delete mode 100644 cli/node_modules/lodash/internal/trimmedLeftIndex.js delete mode 100644 cli/node_modules/lodash/internal/trimmedRightIndex.js delete mode 100644 cli/node_modules/lodash/internal/unescapeHtmlChar.js delete mode 100644 cli/node_modules/lodash/internal/wrapperClone.js delete mode 100644 cli/node_modules/lodash/lang.js delete mode 100644 cli/node_modules/lodash/lang/clone.js delete mode 100644 cli/node_modules/lodash/lang/cloneDeep.js delete mode 100644 cli/node_modules/lodash/lang/eq.js delete mode 100644 cli/node_modules/lodash/lang/gt.js delete mode 100644 cli/node_modules/lodash/lang/gte.js delete mode 100644 cli/node_modules/lodash/lang/isArguments.js delete mode 100644 cli/node_modules/lodash/lang/isArray.js delete mode 100644 cli/node_modules/lodash/lang/isBoolean.js delete mode 100644 cli/node_modules/lodash/lang/isDate.js delete mode 100644 cli/node_modules/lodash/lang/isElement.js delete mode 100644 cli/node_modules/lodash/lang/isEmpty.js delete mode 100644 cli/node_modules/lodash/lang/isEqual.js delete mode 100644 cli/node_modules/lodash/lang/isError.js delete mode 100644 cli/node_modules/lodash/lang/isFinite.js delete mode 100644 cli/node_modules/lodash/lang/isFunction.js delete mode 100644 cli/node_modules/lodash/lang/isMatch.js delete mode 100644 cli/node_modules/lodash/lang/isNaN.js delete mode 100644 cli/node_modules/lodash/lang/isNative.js delete mode 100644 cli/node_modules/lodash/lang/isNull.js delete mode 100644 cli/node_modules/lodash/lang/isNumber.js delete mode 100644 cli/node_modules/lodash/lang/isObject.js delete mode 100644 cli/node_modules/lodash/lang/isPlainObject.js delete mode 100644 cli/node_modules/lodash/lang/isRegExp.js delete mode 100644 cli/node_modules/lodash/lang/isString.js delete mode 100644 cli/node_modules/lodash/lang/isTypedArray.js delete mode 100644 cli/node_modules/lodash/lang/isUndefined.js delete mode 100644 cli/node_modules/lodash/lang/lt.js delete mode 100644 cli/node_modules/lodash/lang/lte.js delete mode 100644 cli/node_modules/lodash/lang/toArray.js delete mode 100644 cli/node_modules/lodash/lang/toPlainObject.js delete mode 100644 cli/node_modules/lodash/math.js delete mode 100644 cli/node_modules/lodash/math/add.js delete mode 100644 cli/node_modules/lodash/math/ceil.js delete mode 100644 cli/node_modules/lodash/math/floor.js delete mode 100644 cli/node_modules/lodash/math/max.js delete mode 100644 cli/node_modules/lodash/math/min.js delete mode 100644 cli/node_modules/lodash/math/round.js delete mode 100644 cli/node_modules/lodash/math/sum.js delete mode 100644 cli/node_modules/lodash/number.js delete mode 100644 cli/node_modules/lodash/number/inRange.js delete mode 100644 cli/node_modules/lodash/number/random.js delete mode 100644 cli/node_modules/lodash/object.js delete mode 100644 cli/node_modules/lodash/object/assign.js delete mode 100644 cli/node_modules/lodash/object/create.js delete mode 100644 cli/node_modules/lodash/object/defaults.js delete mode 100644 cli/node_modules/lodash/object/defaultsDeep.js delete mode 100644 cli/node_modules/lodash/object/extend.js delete mode 100644 cli/node_modules/lodash/object/findKey.js delete mode 100644 cli/node_modules/lodash/object/findLastKey.js delete mode 100644 cli/node_modules/lodash/object/forIn.js delete mode 100644 cli/node_modules/lodash/object/forInRight.js delete mode 100644 cli/node_modules/lodash/object/forOwn.js delete mode 100644 cli/node_modules/lodash/object/forOwnRight.js delete mode 100644 cli/node_modules/lodash/object/functions.js delete mode 100644 cli/node_modules/lodash/object/get.js delete mode 100644 cli/node_modules/lodash/object/has.js delete mode 100644 cli/node_modules/lodash/object/invert.js delete mode 100644 cli/node_modules/lodash/object/keys.js delete mode 100644 cli/node_modules/lodash/object/keysIn.js delete mode 100644 cli/node_modules/lodash/object/mapKeys.js delete mode 100644 cli/node_modules/lodash/object/mapValues.js delete mode 100644 cli/node_modules/lodash/object/merge.js delete mode 100644 cli/node_modules/lodash/object/methods.js delete mode 100644 cli/node_modules/lodash/object/omit.js delete mode 100644 cli/node_modules/lodash/object/pairs.js delete mode 100644 cli/node_modules/lodash/object/pick.js delete mode 100644 cli/node_modules/lodash/object/result.js delete mode 100644 cli/node_modules/lodash/object/set.js delete mode 100644 cli/node_modules/lodash/object/transform.js delete mode 100644 cli/node_modules/lodash/object/values.js delete mode 100644 cli/node_modules/lodash/object/valuesIn.js delete mode 100644 cli/node_modules/lodash/package.json delete mode 100644 cli/node_modules/lodash/string.js delete mode 100644 cli/node_modules/lodash/string/camelCase.js delete mode 100644 cli/node_modules/lodash/string/capitalize.js delete mode 100644 cli/node_modules/lodash/string/deburr.js delete mode 100644 cli/node_modules/lodash/string/endsWith.js delete mode 100644 cli/node_modules/lodash/string/escape.js delete mode 100644 cli/node_modules/lodash/string/escapeRegExp.js delete mode 100644 cli/node_modules/lodash/string/kebabCase.js delete mode 100644 cli/node_modules/lodash/string/pad.js delete mode 100644 cli/node_modules/lodash/string/padLeft.js delete mode 100644 cli/node_modules/lodash/string/padRight.js delete mode 100644 cli/node_modules/lodash/string/parseInt.js delete mode 100644 cli/node_modules/lodash/string/repeat.js delete mode 100644 cli/node_modules/lodash/string/snakeCase.js delete mode 100644 cli/node_modules/lodash/string/startCase.js delete mode 100644 cli/node_modules/lodash/string/startsWith.js delete mode 100644 cli/node_modules/lodash/string/template.js delete mode 100644 cli/node_modules/lodash/string/templateSettings.js delete mode 100644 cli/node_modules/lodash/string/trim.js delete mode 100644 cli/node_modules/lodash/string/trimLeft.js delete mode 100644 cli/node_modules/lodash/string/trimRight.js delete mode 100644 cli/node_modules/lodash/string/trunc.js delete mode 100644 cli/node_modules/lodash/string/unescape.js delete mode 100644 cli/node_modules/lodash/string/words.js delete mode 100644 cli/node_modules/lodash/support.js delete mode 100644 cli/node_modules/lodash/utility.js delete mode 100644 cli/node_modules/lodash/utility/attempt.js delete mode 100644 cli/node_modules/lodash/utility/callback.js delete mode 100644 cli/node_modules/lodash/utility/constant.js delete mode 100644 cli/node_modules/lodash/utility/identity.js delete mode 100644 cli/node_modules/lodash/utility/iteratee.js delete mode 100644 cli/node_modules/lodash/utility/matches.js delete mode 100644 cli/node_modules/lodash/utility/matchesProperty.js delete mode 100644 cli/node_modules/lodash/utility/method.js delete mode 100644 cli/node_modules/lodash/utility/methodOf.js delete mode 100644 cli/node_modules/lodash/utility/mixin.js delete mode 100644 cli/node_modules/lodash/utility/noop.js delete mode 100644 cli/node_modules/lodash/utility/property.js delete mode 100644 cli/node_modules/lodash/utility/propertyOf.js delete mode 100644 cli/node_modules/lodash/utility/range.js delete mode 100644 cli/node_modules/lodash/utility/times.js delete mode 100644 cli/node_modules/lodash/utility/uniqueId.js delete mode 100644 cli/node_modules/mocha/LICENSE delete mode 100644 cli/node_modules/mocha/README.md delete mode 100755 cli/node_modules/mocha/bin/_mocha delete mode 100755 cli/node_modules/mocha/bin/mocha delete mode 100644 cli/node_modules/mocha/bin/options.js delete mode 100644 cli/node_modules/mocha/images/error.png delete mode 100644 cli/node_modules/mocha/images/ok.png delete mode 100644 cli/node_modules/mocha/index.js delete mode 100644 cli/node_modules/mocha/lib/browser/debug.js delete mode 100644 cli/node_modules/mocha/lib/browser/escape-string-regexp.js delete mode 100644 cli/node_modules/mocha/lib/browser/events.js delete mode 100644 cli/node_modules/mocha/lib/browser/fs.js delete mode 100644 cli/node_modules/mocha/lib/browser/glob.js delete mode 100644 cli/node_modules/mocha/lib/browser/path.js delete mode 100644 cli/node_modules/mocha/lib/browser/progress.js delete mode 100644 cli/node_modules/mocha/lib/browser/tty.js delete mode 100644 cli/node_modules/mocha/lib/context.js delete mode 100644 cli/node_modules/mocha/lib/hook.js delete mode 100644 cli/node_modules/mocha/lib/interfaces/bdd.js delete mode 100644 cli/node_modules/mocha/lib/interfaces/common.js delete mode 100644 cli/node_modules/mocha/lib/interfaces/exports.js delete mode 100644 cli/node_modules/mocha/lib/interfaces/index.js delete mode 100644 cli/node_modules/mocha/lib/interfaces/qunit.js delete mode 100644 cli/node_modules/mocha/lib/interfaces/tdd.js delete mode 100644 cli/node_modules/mocha/lib/mocha.js delete mode 100644 cli/node_modules/mocha/lib/ms.js delete mode 100644 cli/node_modules/mocha/lib/pending.js delete mode 100644 cli/node_modules/mocha/lib/reporters/base.js delete mode 100644 cli/node_modules/mocha/lib/reporters/doc.js delete mode 100644 cli/node_modules/mocha/lib/reporters/dot.js delete mode 100644 cli/node_modules/mocha/lib/reporters/html-cov.js delete mode 100644 cli/node_modules/mocha/lib/reporters/html.js delete mode 100644 cli/node_modules/mocha/lib/reporters/index.js delete mode 100644 cli/node_modules/mocha/lib/reporters/json-cov.js delete mode 100644 cli/node_modules/mocha/lib/reporters/json-stream.js delete mode 100644 cli/node_modules/mocha/lib/reporters/json.js delete mode 100644 cli/node_modules/mocha/lib/reporters/landing.js delete mode 100644 cli/node_modules/mocha/lib/reporters/list.js delete mode 100644 cli/node_modules/mocha/lib/reporters/markdown.js delete mode 100644 cli/node_modules/mocha/lib/reporters/min.js delete mode 100644 cli/node_modules/mocha/lib/reporters/nyan.js delete mode 100644 cli/node_modules/mocha/lib/reporters/progress.js delete mode 100644 cli/node_modules/mocha/lib/reporters/spec.js delete mode 100644 cli/node_modules/mocha/lib/reporters/tap.js delete mode 100644 cli/node_modules/mocha/lib/reporters/templates/coverage.jade delete mode 100644 cli/node_modules/mocha/lib/reporters/templates/menu.jade delete mode 100644 cli/node_modules/mocha/lib/reporters/templates/script.html delete mode 100644 cli/node_modules/mocha/lib/reporters/templates/style.html delete mode 100644 cli/node_modules/mocha/lib/reporters/xunit.js delete mode 100644 cli/node_modules/mocha/lib/runnable.js delete mode 100644 cli/node_modules/mocha/lib/runner.js delete mode 100644 cli/node_modules/mocha/lib/suite.js delete mode 100644 cli/node_modules/mocha/lib/template.html delete mode 100644 cli/node_modules/mocha/lib/test.js delete mode 100644 cli/node_modules/mocha/lib/utils.js delete mode 100644 cli/node_modules/mocha/mocha.css delete mode 100644 cli/node_modules/mocha/mocha.js delete mode 120000 cli/node_modules/mocha/node_modules/.bin/jade delete mode 120000 cli/node_modules/mocha/node_modules/.bin/mkdirp delete mode 120000 cli/node_modules/mocha/node_modules/.bin/supports-color delete mode 100644 cli/node_modules/mocha/node_modules/commander/Readme.md delete mode 100644 cli/node_modules/mocha/node_modules/commander/index.js delete mode 100644 cli/node_modules/mocha/node_modules/commander/package.json delete mode 100644 cli/node_modules/mocha/node_modules/debug/.jshintrc delete mode 100644 cli/node_modules/mocha/node_modules/debug/.npmignore delete mode 100644 cli/node_modules/mocha/node_modules/debug/History.md delete mode 100644 cli/node_modules/mocha/node_modules/debug/Makefile delete mode 100644 cli/node_modules/mocha/node_modules/debug/Readme.md delete mode 100644 cli/node_modules/mocha/node_modules/debug/browser.js delete mode 100644 cli/node_modules/mocha/node_modules/debug/component.json delete mode 100644 cli/node_modules/mocha/node_modules/debug/debug.js delete mode 100644 cli/node_modules/mocha/node_modules/debug/node.js delete mode 100644 cli/node_modules/mocha/node_modules/debug/node_modules/ms/.npmignore delete mode 100644 cli/node_modules/mocha/node_modules/debug/node_modules/ms/README.md delete mode 100644 cli/node_modules/mocha/node_modules/debug/node_modules/ms/index.js delete mode 100644 cli/node_modules/mocha/node_modules/debug/node_modules/ms/package.json delete mode 100644 cli/node_modules/mocha/node_modules/debug/package.json delete mode 100644 cli/node_modules/mocha/node_modules/diff/README.md delete mode 100644 cli/node_modules/mocha/node_modules/diff/diff.js delete mode 100644 cli/node_modules/mocha/node_modules/diff/package.json delete mode 100644 cli/node_modules/mocha/node_modules/escape-string-regexp/index.js delete mode 100644 cli/node_modules/mocha/node_modules/escape-string-regexp/package.json delete mode 100644 cli/node_modules/mocha/node_modules/escape-string-regexp/readme.md delete mode 100644 cli/node_modules/mocha/node_modules/glob/.npmignore delete mode 100644 cli/node_modules/mocha/node_modules/glob/.travis.yml delete mode 100644 cli/node_modules/mocha/node_modules/glob/LICENSE delete mode 100644 cli/node_modules/mocha/node_modules/glob/README.md delete mode 100644 cli/node_modules/mocha/node_modules/glob/examples/g.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/examples/usr-local.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/glob.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/.npmignore delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/LICENSE delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/README.md delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/graceful-fs.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/package.json delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/polyfills.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/test/open.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/test/readdir-sort.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/inherits/LICENSE delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/inherits/README.md delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits_browser.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/inherits/package.json delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/inherits/test.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/.npmignore delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/LICENSE delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/README.md delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/minimatch.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.travis.yml delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/package.json delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/basic.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/brace-expand.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/caching.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/defaults.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/package.json delete mode 100644 cli/node_modules/mocha/node_modules/glob/test/00-setup.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/test/bash-comparison.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/test/bash-results.json delete mode 100644 cli/node_modules/mocha/node_modules/glob/test/cwd-test.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/test/globstar-match.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/test/mark.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/test/nocase-nomagic.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/test/pause-resume.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/test/root-nomount.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/test/root.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/test/stat.js delete mode 100644 cli/node_modules/mocha/node_modules/glob/test/zz-cleanup.js delete mode 100644 cli/node_modules/mocha/node_modules/growl/History.md delete mode 100644 cli/node_modules/mocha/node_modules/growl/Readme.md delete mode 100644 cli/node_modules/mocha/node_modules/growl/lib/growl.js delete mode 100644 cli/node_modules/mocha/node_modules/growl/package.json delete mode 100644 cli/node_modules/mocha/node_modules/growl/test.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/.npmignore delete mode 100644 cli/node_modules/mocha/node_modules/jade/LICENSE delete mode 100755 cli/node_modules/mocha/node_modules/jade/bin/jade delete mode 100644 cli/node_modules/mocha/node_modules/jade/index.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/jade.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/jade.md delete mode 100644 cli/node_modules/mocha/node_modules/jade/jade.min.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/compiler.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/doctypes.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/filters.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/inline-tags.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/jade.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/lexer.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/nodes/attrs.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/nodes/block-comment.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/nodes/block.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/nodes/case.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/nodes/code.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/nodes/comment.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/nodes/doctype.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/nodes/each.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/nodes/filter.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/nodes/index.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/nodes/literal.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/nodes/mixin.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/nodes/node.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/nodes/tag.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/nodes/text.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/parser.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/runtime.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/self-closing.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/lib/utils.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/commander/.npmignore delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/commander/.travis.yml delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/commander/History.md delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/commander/Makefile delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/commander/Readme.md delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/commander/index.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/commander/lib/commander.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/commander/package.json delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.orig delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.rej delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.npmignore delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/LICENSE delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/README.markdown delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.orig delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.rej delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/index.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/package.json delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/chmod.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/clobber.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/mkdirp.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm_sync.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/race.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/rel.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/sync.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask_sync.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/package.json delete mode 100644 cli/node_modules/mocha/node_modules/jade/runtime.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/runtime.min.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/test.jade delete mode 100644 cli/node_modules/mocha/node_modules/jade/testing/head.jade delete mode 100644 cli/node_modules/mocha/node_modules/jade/testing/index.jade delete mode 100644 cli/node_modules/mocha/node_modules/jade/testing/index.js delete mode 100644 cli/node_modules/mocha/node_modules/jade/testing/layout.jade delete mode 100644 cli/node_modules/mocha/node_modules/jade/testing/user.jade delete mode 100644 cli/node_modules/mocha/node_modules/jade/testing/user.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/.npmignore delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/.travis.yml delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/LICENSE delete mode 100755 cli/node_modules/mocha/node_modules/mkdirp/bin/cmd.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/bin/usage.txt delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/examples/pow.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/index.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/.travis.yml delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/LICENSE delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/example/parse.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/index.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/package.json delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/readme.markdown delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/dash.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/default_bool.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/dotted.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/long.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/parse.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/short.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/whitespace.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/package.json delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/readme.markdown delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/test/chmod.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/test/clobber.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/test/mkdirp.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/test/opts_fs.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/test/opts_fs_sync.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/test/perm.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/test/perm_sync.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/test/race.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/test/rel.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/test/return.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/test/return_sync.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/test/root.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/test/sync.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/test/umask.js delete mode 100644 cli/node_modules/mocha/node_modules/mkdirp/test/umask_sync.js delete mode 100755 cli/node_modules/mocha/node_modules/supports-color/cli.js delete mode 100644 cli/node_modules/mocha/node_modules/supports-color/index.js delete mode 100644 cli/node_modules/mocha/node_modules/supports-color/license delete mode 100644 cli/node_modules/mocha/node_modules/supports-color/package.json delete mode 100644 cli/node_modules/mocha/node_modules/supports-color/readme.md delete mode 100644 cli/node_modules/mocha/package.json delete mode 100644 cli/node_modules/node-uuid/.npmignore delete mode 100644 cli/node_modules/node-uuid/LICENSE.md delete mode 100644 cli/node_modules/node-uuid/README.md delete mode 100644 cli/node_modules/node-uuid/benchmark/README.md delete mode 100644 cli/node_modules/node-uuid/benchmark/bench.gnu delete mode 100755 cli/node_modules/node-uuid/benchmark/bench.sh delete mode 100644 cli/node_modules/node-uuid/benchmark/benchmark-native.c delete mode 100644 cli/node_modules/node-uuid/benchmark/benchmark.js delete mode 100755 cli/node_modules/node-uuid/bin/uuid delete mode 100644 cli/node_modules/node-uuid/bower.json delete mode 100644 cli/node_modules/node-uuid/component.json delete mode 100644 cli/node_modules/node-uuid/package.json delete mode 100644 cli/node_modules/node-uuid/test/compare_v1.js delete mode 100644 cli/node_modules/node-uuid/test/test.html delete mode 100644 cli/node_modules/node-uuid/test/test.js delete mode 100644 cli/node_modules/node-uuid/uuid.js delete mode 100644 cli/node_modules/node-zip/.npmignore delete mode 100644 cli/node_modules/node-zip/Makefile delete mode 100644 cli/node_modules/node-zip/README.md delete mode 100755 cli/node_modules/node-zip/bin/nodezip delete mode 100755 cli/node_modules/node-zip/bin/packer delete mode 100644 cli/node_modules/node-zip/lib/nodezip-cli.js delete mode 100644 cli/node_modules/node-zip/lib/nodezip.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/.jshintignore delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/.jshintrc delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/.npmignore delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/.travis.yml delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/CHANGES.md delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/CHANGES.md.orig delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/LICENSE.markdown delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/README.markdown delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/index.html.orig delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/base64.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/compressedObject.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/compressions.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/crc32.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/dataReader.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/defaults.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/deprecatedPublicUtils.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/flate.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/index.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/license_header.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/load.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/nodeBuffer.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/nodeBufferReader.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/object.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/signature.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/stringReader.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/stringWriter.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/support.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/uint8ArrayReader.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/uint8ArrayWriter.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/utf8.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/utils.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/zipEntries.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/lib/zipEntry.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/Gruntfile.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/HISTORY.md delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/LICENSE delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/README.md delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/bower.json delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako.min.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako_deflate.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako_deflate.min.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako_inflate.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako_inflate.min.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/doc/index.html delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/index.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/deflate.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/inflate.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/utils/common.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/utils/strings.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/adler32.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/constants.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/crc32.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/deflate.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/gzheader.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/inffast.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/inflate.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/inftrees.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/messages.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/trees.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/zstream.js delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/package.json delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/package.json delete mode 100644 cli/node_modules/node-zip/node_modules/jszip/vendor/FileSaver.js delete mode 100644 cli/node_modules/node-zip/package.json delete mode 100644 cli/node_modules/node-zip/test/nodezip_spec.js delete mode 100644 cli/node_modules/rimraf/LICENSE delete mode 100644 cli/node_modules/rimraf/README.md delete mode 100755 cli/node_modules/rimraf/bin.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/LICENSE delete mode 100644 cli/node_modules/rimraf/node_modules/glob/README.md delete mode 100644 cli/node_modules/rimraf/node_modules/glob/common.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/glob.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/LICENSE delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/README.md delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/inflight.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/LICENSE delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/README.md delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits_browser.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/test.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/LICENSE delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/README.md delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/browser.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.travis.yml delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/once/LICENSE delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/once/README.md delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/once/once.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/once/package.json delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/once/test/once.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/index.js delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/license delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json delete mode 100644 cli/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/readme.md delete mode 100644 cli/node_modules/rimraf/node_modules/glob/package.json delete mode 100644 cli/node_modules/rimraf/node_modules/glob/sync.js delete mode 100644 cli/node_modules/rimraf/package.json delete mode 100644 cli/node_modules/rimraf/rimraf.js delete mode 100644 cli/node_modules/shortid/.npmignore delete mode 100644 cli/node_modules/shortid/Gruntfile.js delete mode 100644 cli/node_modules/shortid/LICENSE delete mode 100644 cli/node_modules/shortid/README.md delete mode 100644 cli/node_modules/shortid/lib/alphabet.js delete mode 100644 cli/node_modules/shortid/lib/decode.js delete mode 100644 cli/node_modules/shortid/lib/encode.js delete mode 100644 cli/node_modules/shortid/lib/index.js delete mode 100644 cli/node_modules/shortid/lib/is-valid.js delete mode 100644 cli/node_modules/shortid/lib/random/random-byte-browser.js delete mode 100644 cli/node_modules/shortid/lib/random/random-byte.js delete mode 100644 cli/node_modules/shortid/lib/random/random-from-seed.js delete mode 100644 cli/node_modules/shortid/lib/util/cluster-worker-id-browser.js delete mode 100644 cli/node_modules/shortid/lib/util/cluster-worker-id.js delete mode 100644 cli/node_modules/shortid/package.json delete mode 100644 cli/node_modules/should/.eslintrc delete mode 100644 cli/node_modules/should/.npmignore delete mode 100644 cli/node_modules/should/.travis.yml delete mode 100644 cli/node_modules/should/.zuul.yml delete mode 100644 cli/node_modules/should/CONTRIBUTING.md delete mode 100644 cli/node_modules/should/History.md delete mode 100644 cli/node_modules/should/LICENSE delete mode 100644 cli/node_modules/should/Readme.md delete mode 100644 cli/node_modules/should/as-function.js delete mode 100644 cli/node_modules/should/bower.json delete mode 100644 cli/node_modules/should/gulpfile.js delete mode 100644 cli/node_modules/should/index.js delete mode 100644 cli/node_modules/should/lib/assertion-error.js delete mode 100644 cli/node_modules/should/lib/assertion.js delete mode 100644 cli/node_modules/should/lib/config.js delete mode 100644 cli/node_modules/should/lib/ext/_assert.js delete mode 100644 cli/node_modules/should/lib/ext/assert.js delete mode 100644 cli/node_modules/should/lib/ext/bool.js delete mode 100644 cli/node_modules/should/lib/ext/chain.js delete mode 100644 cli/node_modules/should/lib/ext/contain.js delete mode 100644 cli/node_modules/should/lib/ext/eql.js delete mode 100644 cli/node_modules/should/lib/ext/error.js delete mode 100644 cli/node_modules/should/lib/ext/match.js delete mode 100644 cli/node_modules/should/lib/ext/number.js delete mode 100644 cli/node_modules/should/lib/ext/property.js delete mode 100644 cli/node_modules/should/lib/ext/string.js delete mode 100644 cli/node_modules/should/lib/ext/type.js delete mode 100644 cli/node_modules/should/lib/should.js delete mode 100644 cli/node_modules/should/lib/util.js delete mode 100644 cli/node_modules/should/node_modules/should-equal/.eslintrc delete mode 100644 cli/node_modules/should/node_modules/should-equal/.npmignore delete mode 100644 cli/node_modules/should/node_modules/should-equal/.travis.yml delete mode 100644 cli/node_modules/should/node_modules/should-equal/LICENSE delete mode 100644 cli/node_modules/should/node_modules/should-equal/README.md delete mode 100644 cli/node_modules/should/node_modules/should-equal/format.js delete mode 100644 cli/node_modules/should/node_modules/should-equal/index.js delete mode 100644 cli/node_modules/should/node_modules/should-equal/package.json delete mode 100644 cli/node_modules/should/node_modules/should-equal/test.js delete mode 100644 cli/node_modules/should/node_modules/should-format/.eslintrc delete mode 100644 cli/node_modules/should/node_modules/should-format/.npmignore delete mode 100644 cli/node_modules/should/node_modules/should-format/.travis.yml delete mode 100644 cli/node_modules/should/node_modules/should-format/LICENSE delete mode 100644 cli/node_modules/should/node_modules/should-format/README.md delete mode 100644 cli/node_modules/should/node_modules/should-format/index.js delete mode 100644 cli/node_modules/should/node_modules/should-format/package.json delete mode 100644 cli/node_modules/should/node_modules/should-format/tests/browser/index.html delete mode 100644 cli/node_modules/should/node_modules/should-format/tests/browser/mocha.css delete mode 100644 cli/node_modules/should/node_modules/should-format/tests/browser/mocha.js delete mode 100644 cli/node_modules/should/node_modules/should-format/tests/browser/tests.js delete mode 100644 cli/node_modules/should/node_modules/should-format/tests/test.js delete mode 100644 cli/node_modules/should/node_modules/should-format/util.js delete mode 100644 cli/node_modules/should/node_modules/should-type/.npmignore delete mode 100644 cli/node_modules/should/node_modules/should-type/LICENSE delete mode 100644 cli/node_modules/should/node_modules/should-type/README.md delete mode 100644 cli/node_modules/should/node_modules/should-type/index.js delete mode 100644 cli/node_modules/should/node_modules/should-type/package.json delete mode 100644 cli/node_modules/should/node_modules/should-type/types.js delete mode 100644 cli/node_modules/should/package.json delete mode 100644 cli/node_modules/should/should.js delete mode 100644 cli/node_modules/should/should.min.js delete mode 100644 cli/node_modules/wrench/.npmignore delete mode 100644 cli/node_modules/wrench/LICENSE delete mode 100644 cli/node_modules/wrench/lib/wrench.js delete mode 100644 cli/node_modules/wrench/package.json delete mode 100644 cli/node_modules/wrench/readme.md delete mode 100644 cli/node_modules/wrench/tests/copydirsync_unix.js delete mode 100644 cli/node_modules/wrench/tests/mkdir.js delete mode 100644 cli/node_modules/wrench/tests/readdir.js delete mode 100644 cli/node_modules/wrench/tests/readdir/bar.txt delete mode 100644 cli/node_modules/wrench/tests/readdir/foo/bar/ipsum.js delete mode 100644 cli/node_modules/wrench/tests/readdir/foo/dolor.md delete mode 100644 cli/node_modules/wrench/tests/readdir/foo/lorem.txt delete mode 100644 cli/node_modules/wrench/tests/rmdirSyncRecursive.js delete mode 100644 cli/node_modules/wrench/tests/runner.js delete mode 100644 cli/node_modules/wrench/tests/shown/.hidden.txt delete mode 100644 cli/node_modules/wrench/tests/shown/.hidden/dolor.md delete mode 100644 cli/node_modules/wrench/tests/shown/bar.txt delete mode 100644 cli/node_modules/wrench/tests/shown/foo/bar/ipsum.js delete mode 100644 cli/node_modules/wrench/tests/shown/foo/dolor.md delete mode 100644 cli/node_modules/wrench/tests/shown/foo/lorem.txt delete mode 100644 cli/node_modules/wrench/tests/withsymlinks/test diff --git a/.gitignore b/.gitignore index 2d0abfb2b..a0beef039 100755 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,5 @@ npm-debug.log server/public/libs server/node_modules +cli/node_modules diff --git a/cli/node_modules/.bin/_mocha b/cli/node_modules/.bin/_mocha deleted file mode 120000 index f2a54ffda..000000000 --- a/cli/node_modules/.bin/_mocha +++ /dev/null @@ -1 +0,0 @@ -../mocha/bin/_mocha \ No newline at end of file diff --git a/cli/node_modules/.bin/mocha b/cli/node_modules/.bin/mocha deleted file mode 120000 index 43c668d9a..000000000 --- a/cli/node_modules/.bin/mocha +++ /dev/null @@ -1 +0,0 @@ -../mocha/bin/mocha \ No newline at end of file diff --git a/cli/node_modules/.bin/ncp b/cli/node_modules/.bin/ncp deleted file mode 120000 index 1c026480a..000000000 --- a/cli/node_modules/.bin/ncp +++ /dev/null @@ -1 +0,0 @@ -../ncp/bin/ncp \ No newline at end of file diff --git a/cli/node_modules/.bin/nodezip b/cli/node_modules/.bin/nodezip deleted file mode 120000 index 3543ce807..000000000 --- a/cli/node_modules/.bin/nodezip +++ /dev/null @@ -1 +0,0 @@ -../node-zip/bin/nodezip \ No newline at end of file diff --git a/cli/node_modules/.bin/rimraf b/cli/node_modules/.bin/rimraf deleted file mode 120000 index 4cd49a49d..000000000 --- a/cli/node_modules/.bin/rimraf +++ /dev/null @@ -1 +0,0 @@ -../rimraf/bin.js \ No newline at end of file diff --git a/cli/node_modules/.bin/uuid b/cli/node_modules/.bin/uuid deleted file mode 120000 index 80eb14aa1..000000000 --- a/cli/node_modules/.bin/uuid +++ /dev/null @@ -1 +0,0 @@ -../node-uuid/bin/uuid \ No newline at end of file diff --git a/cli/node_modules/adm-zip/README.md b/cli/node_modules/adm-zip/README.md deleted file mode 100644 index dd94d4797..000000000 --- a/cli/node_modules/adm-zip/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# ADM-ZIP for NodeJS - -ADM-ZIP is a pure JavaScript implementation for zip data compression for [NodeJS](http://nodejs.org/). - -# Installation - -With [npm](http://npmjs.org) do: - - $ npm install adm-zip - -## What is it good for? -The library allows you to: - -* decompress zip files directly to disk or in memory buffers -* compress files and store them to disk in .zip format or in compressed buffers -* update content of/add new/delete files from an existing .zip - -# Dependencies -There are no other nodeJS libraries that ADM-ZIP is dependent of - -# Examples - -## Basic usage -```javascript - - var AdmZip = require('adm-zip'); - - // reading archives - var zip = new AdmZip("./my_file.zip"); - var zipEntries = zip.getEntries(); // an array of ZipEntry records - - zipEntries.forEach(function(zipEntry) { - console.log(zipEntry.toString()); // outputs zip entries information - if (zipEntry.entryName == "my_file.txt") { - console.log(zipEntry.data.toString('utf8')); - } - }); - // outputs the content of some_folder/my_file.txt - console.log(zip.readAsText("some_folder/my_file.txt")); - // extracts the specified file to the specified location - zip.extractEntryTo(/*entry name*/"some_folder/my_file.txt", /*target path*/"/home/me/tempfolder", /*maintainEntryPath*/false, /*overwrite*/true); - // extracts everything - zip.extractAllTo(/*target path*/"/home/me/zipcontent/", /*overwrite*/true); - - - // creating archives - var zip = new AdmZip(); - - // add file directly - zip.addFile("test.txt", new Buffer("inner content of the file"), "entry comment goes here"); - // add local file - zip.addLocalFile("/home/me/some_picture.png"); - // get everything as a buffer - var willSendthis = zip.toBuffer(); - // or write everything to disk - zip.writeZip(/*target file name*/"/home/me/files.zip"); - - - // ... more examples in the wiki -``` - -For more detailed information please check out the [wiki](https://github.com/cthackers/adm-zip/wiki). - -[![build status](https://secure.travis-ci.org/cthackers/adm-zip.png)](http://travis-ci.org/cthackers/adm-zip) diff --git a/cli/node_modules/adm-zip/adm-zip.js b/cli/node_modules/adm-zip/adm-zip.js deleted file mode 100644 index 9ba4bd0fa..000000000 --- a/cli/node_modules/adm-zip/adm-zip.js +++ /dev/null @@ -1,475 +0,0 @@ -var fs = require("fs"), - pth = require("path"); - -fs.existsSync = fs.existsSync || pth.existsSync; - -var ZipEntry = require("./zipEntry"), - ZipFile = require("./zipFile"), - Utils = require("./util"); - -module.exports = function(/*String*/input) { - var _zip = undefined, - _filename = ""; - - if (input && typeof input === "string") { // load zip file - if (fs.existsSync(input)) { - _filename = input; - _zip = new ZipFile(input, Utils.Constants.FILE); - } else { - throw Utils.Errors.INVALID_FILENAME; - } - } else if(input && Buffer.isBuffer(input)) { // load buffer - _zip = new ZipFile(input, Utils.Constants.BUFFER); - } else { // create new zip file - _zip = new ZipFile(null, Utils.Constants.NONE); - } - - function getEntry(/*Object*/entry) { - if (entry && _zip) { - var item; - // If entry was given as a file name - if (typeof entry === "string") - item = _zip.getEntry(entry); - // if entry was given as a ZipEntry object - if (typeof entry === "object" && entry.entryName != undefined && entry.header != undefined) - item = _zip.getEntry(entry.entryName); - - if (item) { - return item; - } - } - return null; - } - - return { - /** - * Extracts the given entry from the archive and returns the content as a Buffer object - * @param entry ZipEntry object or String with the full path of the entry - * - * @return Buffer or Null in case of error - */ - readFile : function(/*Object*/entry) { - var item = getEntry(entry); - return item && item.getData() || null; - }, - - /** - * Asynchronous readFile - * @param entry ZipEntry object or String with the full path of the entry - * @param callback - * - * @return Buffer or Null in case of error - */ - readFileAsync : function(/*Object*/entry, /*Function*/callback) { - var item = getEntry(entry); - if (item) { - item.getDataAsync(callback); - } else { - callback(null,"getEntry failed for:" + entry) - } - }, - - /** - * Extracts the given entry from the archive and returns the content as plain text in the given encoding - * @param entry ZipEntry object or String with the full path of the entry - * @param encoding Optional. If no encoding is specified utf8 is used - * - * @return String - */ - readAsText : function(/*Object*/entry, /*String - Optional*/encoding) { - var item = getEntry(entry); - if (item) { - var data = item.getData(); - if (data && data.length) { - return data.toString(encoding || "utf8"); - } - } - return ""; - }, - - /** - * Asynchronous readAsText - * @param entry ZipEntry object or String with the full path of the entry - * @param callback - * @param encoding Optional. If no encoding is specified utf8 is used - * - * @return String - */ - readAsTextAsync : function(/*Object*/entry, /*Function*/callback, /*String - Optional*/encoding) { - var item = getEntry(entry); - if (item) { - item.getDataAsync(function(data) { - if (data && data.length) { - callback(data.toString(encoding || "utf8")); - } else { - callback(""); - } - }) - } else { - callback(""); - } - }, - - /** - * Remove the entry from the file or the entry and all it's nested directories and files if the given entry is a directory - * - * @param entry - */ - deleteFile : function(/*Object*/entry) { // @TODO: test deleteFile - var item = getEntry(entry); - if (item) { - _zip.deleteEntry(item.entryName); - } - }, - - /** - * Adds a comment to the zip. The zip must be rewritten after adding the comment. - * - * @param comment - */ - addZipComment : function(/*String*/comment) { // @TODO: test addZipComment - _zip.comment = comment; - }, - - /** - * Returns the zip comment - * - * @return String - */ - getZipComment : function() { - return _zip.comment || ''; - }, - - /** - * Adds a comment to a specified zipEntry. The zip must be rewritten after adding the comment - * The comment cannot exceed 65535 characters in length - * - * @param entry - * @param comment - */ - addZipEntryComment : function(/*Object*/entry,/*String*/comment) { - var item = getEntry(entry); - if (item) { - item.comment = comment; - } - }, - - /** - * Returns the comment of the specified entry - * - * @param entry - * @return String - */ - getZipEntryComment : function(/*Object*/entry) { - var item = getEntry(entry); - if (item) { - return item.comment || ''; - } - return '' - }, - - /** - * Updates the content of an existing entry inside the archive. The zip must be rewritten after updating the content - * - * @param entry - * @param content - */ - updateFile : function(/*Object*/entry, /*Buffer*/content) { - var item = getEntry(entry); - if (item) { - item.setData(content); - } - }, - - /** - * Adds a file from the disk to the archive - * - * @param localPath - */ - addLocalFile : function(/*String*/localPath, /*String*/zipPath, /*String*/zipName) { - if (fs.existsSync(localPath)) { - if(zipPath){ - zipPath=zipPath.split("\\").join("/"); - if(zipPath.charAt(zipPath.length - 1) != "/"){ - zipPath += "/"; - } - }else{ - zipPath=""; - } - var p = localPath.split("\\").join("/").split("/").pop(); - - if(zipName){ - this.addFile(zipPath+zipName, fs.readFileSync(localPath), "", 0) - }else{ - this.addFile(zipPath+p, fs.readFileSync(localPath), "", 0) - } - } else { - throw Utils.Errors.FILE_NOT_FOUND.replace("%s", localPath); - } - }, - - /** - * Adds a local directory and all its nested files and directories to the archive - * - * @param localPath - * @param zipPath optional path inside zip - * @param filter optional RegExp or Function if files match will - * be included. - */ - addLocalFolder : function(/*String*/localPath, /*String*/zipPath, /*RegExp|Function*/filter) { - if (filter === undefined) { - filter = function() { return true; }; - } else if (filter instanceof RegExp) { - filter = function(filter) { - return function(filename) { - return filter.test(filename); - } - }(filter); - } - - if(zipPath){ - zipPath=zipPath.split("\\").join("/"); - if(zipPath.charAt(zipPath.length - 1) != "/"){ - zipPath += "/"; - } - }else{ - zipPath=""; - } - localPath = localPath.split("\\").join("/"); //windows fix - localPath = pth.normalize(localPath); - if (localPath.charAt(localPath.length - 1) != "/") - localPath += "/"; - - if (fs.existsSync(localPath)) { - - var items = Utils.findFiles(localPath), - self = this; - - if (items.length) { - items.forEach(function(path) { - var p = path.split("\\").join("/").replace( new RegExp(localPath, 'i'), ""); //windows fix - if (filter(p)) { - if (p.charAt(p.length - 1) !== "/") { - self.addFile(zipPath+p, fs.readFileSync(path), "", 0) - } else { - self.addFile(zipPath+p, new Buffer(0), "", 0) - } - } - }); - } - } else { - throw Utils.Errors.FILE_NOT_FOUND.replace("%s", localPath); - } - }, - - /** - * Allows you to create a entry (file or directory) in the zip file. - * If you want to create a directory the entryName must end in / and a null buffer should be provided. - * Comment and attributes are optional - * - * @param entryName - * @param content - * @param comment - * @param attr - */ - addFile : function(/*String*/entryName, /*Buffer*/content, /*String*/comment, /*Number*/attr) { - var entry = new ZipEntry(); - entry.entryName = entryName; - entry.comment = comment || ""; - entry.attr = attr || 438; //0666; - if (entry.isDirectory && content.length) { - // throw Utils.Errors.DIRECTORY_CONTENT_ERROR; - } - entry.setData(content); - _zip.setEntry(entry); - }, - - /** - * Returns an array of ZipEntry objects representing the files and folders inside the archive - * - * @return Array - */ - getEntries : function() { - if (_zip) { - return _zip.entries; - } else { - return []; - } - }, - - /** - * Returns a ZipEntry object representing the file or folder specified by ``name``. - * - * @param name - * @return ZipEntry - */ - getEntry : function(/*String*/name) { - return getEntry(name); - }, - - /** - * Extracts the given entry to the given targetPath - * If the entry is a directory inside the archive, the entire directory and it's subdirectories will be extracted - * - * @param entry ZipEntry object or String with the full path of the entry - * @param targetPath Target folder where to write the file - * @param maintainEntryPath If maintainEntryPath is true and the entry is inside a folder, the entry folder - * will be created in targetPath as well. Default is TRUE - * @param overwrite If the file already exists at the target path, the file will be overwriten if this is true. - * Default is FALSE - * - * @return Boolean - */ - extractEntryTo : function(/*Object*/entry, /*String*/targetPath, /*Boolean*/maintainEntryPath, /*Boolean*/overwrite) { - overwrite = overwrite || false; - maintainEntryPath = typeof maintainEntryPath == "undefined" ? true : maintainEntryPath; - - var item = getEntry(entry); - if (!item) { - throw Utils.Errors.NO_ENTRY; - } - - var target = pth.resolve(targetPath, maintainEntryPath ? item.entryName : pth.basename(item.entryName)); - - if (item.isDirectory) { - target = pth.resolve(target, ".."); - var children = _zip.getEntryChildren(item); - children.forEach(function(child) { - if (child.isDirectory) return; - var content = child.getData(); - if (!content) { - throw Utils.Errors.CANT_EXTRACT_FILE; - } - Utils.writeFileTo(pth.resolve(targetPath, maintainEntryPath ? child.entryName : child.entryName.substr(item.entryName.length)), content, overwrite); - }); - return true; - } - - var content = item.getData(); - if (!content) throw Utils.Errors.CANT_EXTRACT_FILE; - - if (fs.existsSync(target) && !overwrite) { - throw Utils.Errors.CANT_OVERRIDE; - } - Utils.writeFileTo(target, content, overwrite); - - return true; - }, - - /** - * Extracts the entire archive to the given location - * - * @param targetPath Target location - * @param overwrite If the file already exists at the target path, the file will be overwriten if this is true. - * Default is FALSE - */ - extractAllTo : function(/*String*/targetPath, /*Boolean*/overwrite) { - overwrite = overwrite || false; - if (!_zip) { - throw Utils.Errors.NO_ZIP; - } - - _zip.entries.forEach(function(entry) { - if (entry.isDirectory) { - Utils.makeDir(pth.resolve(targetPath, entry.entryName.toString())); - return; - } - var content = entry.getData(); - if (!content) { - throw Utils.Errors.CANT_EXTRACT_FILE + "2"; - } - Utils.writeFileTo(pth.resolve(targetPath, entry.entryName.toString()), content, overwrite); - }) - }, - - /** - * Asynchronous extractAllTo - * - * @param targetPath Target location - * @param overwrite If the file already exists at the target path, the file will be overwriten if this is true. - * Default is FALSE - * @param callback - */ - extractAllToAsync : function(/*String*/targetPath, /*Boolean*/overwrite, /*Function*/callback) { - overwrite = overwrite || false; - if (!_zip) { - callback(new Error(Utils.Errors.NO_ZIP)); - return; - } - - var entries = _zip.entries; - var i = entries.length; - entries.forEach(function(entry) { - if(i <= 0) return; // Had an error already - - if (entry.isDirectory) { - Utils.makeDir(pth.resolve(targetPath, entry.entryName.toString())); - if(--i == 0) - callback(undefined); - return; - } - entry.getDataAsync(function(content) { - if(i <= 0) return; - if (!content) { - i = 0; - callback(new Error(Utils.Errors.CANT_EXTRACT_FILE + "2")); - return; - } - Utils.writeFileToAsync(pth.resolve(targetPath, entry.entryName.toString()), content, overwrite, function(succ) { - if(i <= 0) return; - - if(!succ) { - i = 0; - callback(new Error('Unable to write')); - return; - } - - if(--i == 0) - callback(undefined); - }); - - }); - }) - }, - - /** - * Writes the newly created zip file to disk at the specified location or if a zip was opened and no ``targetFileName`` is provided, it will overwrite the opened zip - * - * @param targetFileName - * @param callback - */ - writeZip : function(/*String*/targetFileName, /*Function*/callback) { - if (arguments.length == 1) { - if (typeof targetFileName == "function") { - callback = targetFileName; - targetFileName = ""; - } - } - - if (!targetFileName && _filename) { - targetFileName = _filename; - } - if (!targetFileName) return; - - var zipData = _zip.compressToBuffer(); - if (zipData) { - var ok = Utils.writeFileTo(targetFileName, zipData, true); - if (typeof callback == 'function') callback(!ok? new Error("failed"): null, ""); - } - }, - - /** - * Returns the content of the entire zip file as a Buffer object - * - * @return Buffer - */ - toBuffer : function(/*Function*/onSuccess,/*Function*/onFail,/*Function*/onItemStart,/*Function*/onItemEnd) { - this.valueOf = 2; - if (typeof onSuccess == "function") { - _zip.toAsyncBuffer(onSuccess,onFail,onItemStart,onItemEnd); - return null; - } - return _zip.compressToBuffer() - } - } -}; diff --git a/cli/node_modules/adm-zip/headers/entryHeader.js b/cli/node_modules/adm-zip/headers/entryHeader.js deleted file mode 100644 index 9a0e1bdf2..000000000 --- a/cli/node_modules/adm-zip/headers/entryHeader.js +++ /dev/null @@ -1,261 +0,0 @@ -var Utils = require("../util"), - Constants = Utils.Constants; - -/* The central directory file header */ -module.exports = function () { - var _verMade = 0x0A, - _version = 0x0A, - _flags = 0, - _method = 0, - _time = 0, - _crc = 0, - _compressedSize = 0, - _size = 0, - _fnameLen = 0, - _extraLen = 0, - - _comLen = 0, - _diskStart = 0, - _inattr = 0, - _attr = 0, - _offset = 0; - - var _dataHeader = {}; - - function setTime(val) { - var val = new Date(val); - _time = (val.getFullYear() - 1980 & 0x7f) << 25 // b09-16 years from 1980 - | (val.getMonth() + 1) << 21 // b05-08 month - | val.getDay() << 16 // b00-04 hour - - // 2 bytes time - | val.getHours() << 11 // b11-15 hour - | val.getMinutes() << 5 // b05-10 minute - | val.getSeconds() >> 1; // b00-04 seconds divided by 2 - } - - setTime(+new Date()); - - return { - get made () { return _verMade; }, - set made (val) { _verMade = val; }, - - get version () { return _version; }, - set version (val) { _version = val }, - - get flags () { return _flags }, - set flags (val) { _flags = val; }, - - get method () { return _method; }, - set method (val) { _method = val; }, - - get time () { return new Date( - ((_time >> 25) & 0x7f) + 1980, - ((_time >> 21) & 0x0f) - 1, - (_time >> 16) & 0x1f, - (_time >> 11) & 0x1f, - (_time >> 5) & 0x3f, - (_time & 0x1f) << 1 - ); - }, - set time (val) { - setTime(val); - }, - - get crc () { return _crc; }, - set crc (val) { _crc = val; }, - - get compressedSize () { return _compressedSize; }, - set compressedSize (val) { _compressedSize = val; }, - - get size () { return _size; }, - set size (val) { _size = val; }, - - get fileNameLength () { return _fnameLen; }, - set fileNameLength (val) { _fnameLen = val; }, - - get extraLength () { return _extraLen }, - set extraLength (val) { _extraLen = val; }, - - get commentLength () { return _comLen }, - set commentLength (val) { _comLen = val }, - - get diskNumStart () { return _diskStart }, - set diskNumStart (val) { _diskStart = val }, - - get inAttr () { return _inattr }, - set inAttr (val) { _inattr = val }, - - get attr () { return _attr }, - set attr (val) { _attr = val }, - - get offset () { return _offset }, - set offset (val) { _offset = val }, - - get encripted () { return (_flags & 1) == 1 }, - - get entryHeaderSize () { - return Constants.CENHDR + _fnameLen + _extraLen + _comLen; - }, - - get realDataOffset () { - return _offset + Constants.LOCHDR + _dataHeader.fnameLen + _dataHeader.extraLen; - }, - - get dataHeader () { - return _dataHeader; - }, - - loadDataHeaderFromBinary : function(/*Buffer*/input) { - var data = input.slice(_offset, _offset + Constants.LOCHDR); - // 30 bytes and should start with "PK\003\004" - if (data.readUInt32LE(0) != Constants.LOCSIG) { - throw Utils.Errors.INVALID_LOC; - } - _dataHeader = { - // version needed to extract - version : data.readUInt16LE(Constants.LOCVER), - // general purpose bit flag - flags : data.readUInt16LE(Constants.LOCFLG), - // compression method - method : data.readUInt16LE(Constants.LOCHOW), - // modification time (2 bytes time, 2 bytes date) - time : data.readUInt32LE(Constants.LOCTIM), - // uncompressed file crc-32 value - crc : data.readUInt32LE(Constants.LOCCRC), - // compressed size - compressedSize : data.readUInt32LE(Constants.LOCSIZ), - // uncompressed size - size : data.readUInt32LE(Constants.LOCLEN), - // filename length - fnameLen : data.readUInt16LE(Constants.LOCNAM), - // extra field length - extraLen : data.readUInt16LE(Constants.LOCEXT) - } - }, - - loadFromBinary : function(/*Buffer*/data) { - // data should be 46 bytes and start with "PK 01 02" - if (data.length != Constants.CENHDR || data.readUInt32LE(0) != Constants.CENSIG) { - throw Utils.Errors.INVALID_CEN; - } - // version made by - _verMade = data.readUInt16LE(Constants.CENVEM); - // version needed to extract - _version = data.readUInt16LE(Constants.CENVER); - // encrypt, decrypt flags - _flags = data.readUInt16LE(Constants.CENFLG); - // compression method - _method = data.readUInt16LE(Constants.CENHOW); - // modification time (2 bytes time, 2 bytes date) - _time = data.readUInt32LE(Constants.CENTIM); - // uncompressed file crc-32 value - _crc = data.readUInt32LE(Constants.CENCRC); - // compressed size - _compressedSize = data.readUInt32LE(Constants.CENSIZ); - // uncompressed size - _size = data.readUInt32LE(Constants.CENLEN); - // filename length - _fnameLen = data.readUInt16LE(Constants.CENNAM); - // extra field length - _extraLen = data.readUInt16LE(Constants.CENEXT); - // file comment length - _comLen = data.readUInt16LE(Constants.CENCOM); - // volume number start - _diskStart = data.readUInt16LE(Constants.CENDSK); - // internal file attributes - _inattr = data.readUInt16LE(Constants.CENATT); - // external file attributes - _attr = data.readUInt32LE(Constants.CENATX); - // LOC header offset - _offset = data.readUInt32LE(Constants.CENOFF); - }, - - dataHeaderToBinary : function() { - // LOC header size (30 bytes) - var data = new Buffer(Constants.LOCHDR); - // "PK\003\004" - data.writeUInt32LE(Constants.LOCSIG, 0); - // version needed to extract - data.writeUInt16LE(_version, Constants.LOCVER); - // general purpose bit flag - data.writeUInt16LE(_flags, Constants.LOCFLG); - // compression method - data.writeUInt16LE(_method, Constants.LOCHOW); - // modification time (2 bytes time, 2 bytes date) - data.writeUInt32LE(_time, Constants.LOCTIM); - // uncompressed file crc-32 value - data.writeUInt32LE(_crc, Constants.LOCCRC); - // compressed size - data.writeUInt32LE(_compressedSize, Constants.LOCSIZ); - // uncompressed size - data.writeUInt32LE(_size, Constants.LOCLEN); - // filename length - data.writeUInt16LE(_fnameLen, Constants.LOCNAM); - // extra field length - data.writeUInt16LE(_extraLen, Constants.LOCEXT); - return data; - }, - - entryHeaderToBinary : function() { - // CEN header size (46 bytes) - var data = new Buffer(Constants.CENHDR + _fnameLen + _extraLen + _comLen); - // "PK\001\002" - data.writeUInt32LE(Constants.CENSIG, 0); - // version made by - data.writeUInt16LE(_verMade, Constants.CENVEM); - // version needed to extract - data.writeUInt16LE(_version, Constants.CENVER); - // encrypt, decrypt flags - data.writeUInt16LE(_flags, Constants.CENFLG); - // compression method - data.writeUInt16LE(_method, Constants.CENHOW); - // modification time (2 bytes time, 2 bytes date) - data.writeUInt32LE(_time, Constants.CENTIM); - // uncompressed file crc-32 value - data.writeInt32LE(_crc, Constants.CENCRC, true); - // compressed size - data.writeUInt32LE(_compressedSize, Constants.CENSIZ); - // uncompressed size - data.writeUInt32LE(_size, Constants.CENLEN); - // filename length - data.writeUInt16LE(_fnameLen, Constants.CENNAM); - // extra field length - data.writeUInt16LE(_extraLen, Constants.CENEXT); - // file comment length - data.writeUInt16LE(_comLen, Constants.CENCOM); - // volume number start - data.writeUInt16LE(_diskStart, Constants.CENDSK); - // internal file attributes - data.writeUInt16LE(_inattr, Constants.CENATT); - // external file attributes - data.writeUInt32LE(_attr, Constants.CENATX); - // LOC header offset - data.writeUInt32LE(_offset, Constants.CENOFF); - // fill all with - data.fill(0x00, Constants.CENHDR); - return data; - }, - - toString : function() { - return '{\n' + - '\t"made" : ' + _verMade + ",\n" + - '\t"version" : ' + _version + ",\n" + - '\t"flags" : ' + _flags + ",\n" + - '\t"method" : ' + Utils.methodToString(_method) + ",\n" + - '\t"time" : ' + _time + ",\n" + - '\t"crc" : 0x' + _crc.toString(16).toUpperCase() + ",\n" + - '\t"compressedSize" : ' + _compressedSize + " bytes,\n" + - '\t"size" : ' + _size + " bytes,\n" + - '\t"fileNameLength" : ' + _fnameLen + ",\n" + - '\t"extraLength" : ' + _extraLen + " bytes,\n" + - '\t"commentLength" : ' + _comLen + " bytes,\n" + - '\t"diskNumStart" : ' + _diskStart + ",\n" + - '\t"inAttr" : ' + _inattr + ",\n" + - '\t"attr" : ' + _attr + ",\n" + - '\t"offset" : ' + _offset + ",\n" + - '\t"entryHeaderSize" : ' + (Constants.CENHDR + _fnameLen + _extraLen + _comLen) + " bytes\n" + - '}'; - } - } -}; diff --git a/cli/node_modules/adm-zip/headers/index.js b/cli/node_modules/adm-zip/headers/index.js deleted file mode 100644 index b54a7222f..000000000 --- a/cli/node_modules/adm-zip/headers/index.js +++ /dev/null @@ -1,2 +0,0 @@ -exports.EntryHeader = require("./entryHeader"); -exports.MainHeader = require("./mainHeader"); diff --git a/cli/node_modules/adm-zip/headers/mainHeader.js b/cli/node_modules/adm-zip/headers/mainHeader.js deleted file mode 100644 index de8ae1a96..000000000 --- a/cli/node_modules/adm-zip/headers/mainHeader.js +++ /dev/null @@ -1,80 +0,0 @@ -var Utils = require("../util"), - Constants = Utils.Constants; - -/* The entries in the end of central directory */ -module.exports = function () { - var _volumeEntries = 0, - _totalEntries = 0, - _size = 0, - _offset = 0, - _commentLength = 0; - - return { - get diskEntries () { return _volumeEntries }, - set diskEntries (/*Number*/val) { _volumeEntries = _totalEntries = val; }, - - get totalEntries () { return _totalEntries }, - set totalEntries (/*Number*/val) { _totalEntries = _volumeEntries = val; }, - - get size () { return _size }, - set size (/*Number*/val) { _size = val; }, - - get offset () { return _offset }, - set offset (/*Number*/val) { _offset = val; }, - - get commentLength () { return _commentLength }, - set commentLength (/*Number*/val) { _commentLength = val; }, - - get mainHeaderSize () { - return Constants.ENDHDR + _commentLength; - }, - - loadFromBinary : function(/*Buffer*/data) { - // data should be 22 bytes and start with "PK 05 06" - if (data.length != Constants.ENDHDR || data.readUInt32LE(0) != Constants.ENDSIG) - throw Utils.Errors.INVALID_END; - - // number of entries on this volume - _volumeEntries = data.readUInt16LE(Constants.ENDSUB); - // total number of entries - _totalEntries = data.readUInt16LE(Constants.ENDTOT); - // central directory size in bytes - _size = data.readUInt32LE(Constants.ENDSIZ); - // offset of first CEN header - _offset = data.readUInt32LE(Constants.ENDOFF); - // zip file comment length - _commentLength = data.readUInt16LE(Constants.ENDCOM); - }, - - toBinary : function() { - var b = new Buffer(Constants.ENDHDR + _commentLength); - // "PK 05 06" signature - b.writeUInt32LE(Constants.ENDSIG, 0); - b.writeUInt32LE(0, 4); - // number of entries on this volume - b.writeUInt16LE(_volumeEntries, Constants.ENDSUB); - // total number of entries - b.writeUInt16LE(_totalEntries, Constants.ENDTOT); - // central directory size in bytes - b.writeUInt32LE(_size, Constants.ENDSIZ); - // offset of first CEN header - b.writeUInt32LE(_offset, Constants.ENDOFF); - // zip file comment length - b.writeUInt16LE(_commentLength, Constants.ENDCOM); - // fill comment memory with spaces so no garbage is left there - b.fill(" ", Constants.ENDHDR); - - return b; - }, - - toString : function() { - return '{\n' + - '\t"diskEntries" : ' + _volumeEntries + ",\n" + - '\t"totalEntries" : ' + _totalEntries + ",\n" + - '\t"size" : ' + _size + " bytes,\n" + - '\t"offset" : 0x' + _offset.toString(16).toUpperCase() + ",\n" + - '\t"commentLength" : 0x' + _commentLength + "\n" + - '}'; - } - } -}; \ No newline at end of file diff --git a/cli/node_modules/adm-zip/methods/deflater.js b/cli/node_modules/adm-zip/methods/deflater.js deleted file mode 100644 index 34ef297fc..000000000 --- a/cli/node_modules/adm-zip/methods/deflater.js +++ /dev/null @@ -1,1578 +0,0 @@ -/* - * $Id: rawdeflate.js,v 0.5 2013/04/09 14:25:38 dankogai Exp dankogai $ - * - * GNU General Public License, version 2 (GPL-2.0) - * http://opensource.org/licenses/GPL-2.0 - * Original: - * http://www.onicos.com/staff/iz/amuse/javascript/expert/deflate.txt - */ -function JSDeflater(/*inbuff*/inbuf) { - - /* Copyright (C) 1999 Masanao Izumo - * Version: 1.0.1 - * LastModified: Dec 25 1999 - */ - - var WSIZE = 32768, // Sliding Window size - zip_STORED_BLOCK = 0, - zip_STATIC_TREES = 1, - zip_DYN_TREES = 2, - zip_DEFAULT_LEVEL = 6, - zip_FULL_SEARCH = true, - zip_INBUFSIZ = 32768, // Input buffer size - zip_INBUF_EXTRA = 64, // Extra buffer - zip_OUTBUFSIZ = 1024 * 8, - zip_window_size = 2 * WSIZE, - MIN_MATCH = 3, - MAX_MATCH = 258, - zip_BITS = 16, - LIT_BUFSIZE = 0x2000, - zip_HASH_BITS = 13, - zip_DIST_BUFSIZE = LIT_BUFSIZE, - zip_HASH_SIZE = 1 << zip_HASH_BITS, - zip_HASH_MASK = zip_HASH_SIZE - 1, - zip_WMASK = WSIZE - 1, - zip_NIL = 0, // Tail of hash chains - zip_TOO_FAR = 4096, - zip_MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1, - zip_MAX_DIST = WSIZE - zip_MIN_LOOKAHEAD, - zip_SMALLEST = 1, - zip_MAX_BITS = 15, - zip_MAX_BL_BITS = 7, - zip_LENGTH_CODES = 29, - zip_LITERALS = 256, - zip_END_BLOCK = 256, - zip_L_CODES = zip_LITERALS + 1 + zip_LENGTH_CODES, - zip_D_CODES = 30, - zip_BL_CODES = 19, - zip_REP_3_6 = 16, - zip_REPZ_3_10 = 17, - zip_REPZ_11_138 = 18, - zip_HEAP_SIZE = 2 * zip_L_CODES + 1, - zip_H_SHIFT = parseInt((zip_HASH_BITS + MIN_MATCH - 1) / MIN_MATCH); - - var zip_free_queue, zip_qhead, zip_qtail, zip_initflag, zip_outbuf = null, zip_outcnt, zip_outoff, zip_complete, - zip_window, zip_d_buf, zip_l_buf, zip_prev, zip_bi_buf, zip_bi_valid, zip_block_start, zip_ins_h, zip_hash_head, - zip_prev_match, zip_match_available, zip_match_length, zip_prev_length, zip_strstart, zip_match_start, zip_eofile, - zip_lookahead, zip_max_chain_length, zip_max_lazy_match, zip_compr_level, zip_good_match, zip_nice_match, - zip_dyn_ltree, zip_dyn_dtree, zip_static_ltree, zip_static_dtree, zip_bl_tree, zip_l_desc, zip_d_desc, zip_bl_desc, - zip_bl_count, zip_heap, zip_heap_len, zip_heap_max, zip_depth, zip_length_code, zip_dist_code, zip_base_length, - zip_base_dist, zip_flag_buf, zip_last_lit, zip_last_dist, zip_last_flags, zip_flags, zip_flag_bit, zip_opt_len, - zip_static_len, zip_deflate_data, zip_deflate_pos; - - var zip_DeflateCT = function () { - this.fc = 0; // frequency count or bit string - this.dl = 0; // father node in Huffman tree or length of bit string - }; - - var zip_DeflateTreeDesc = function () { - this.dyn_tree = null; // the dynamic tree - this.static_tree = null; // corresponding static tree or NULL - this.extra_bits = null; // extra bits for each code or NULL - this.extra_base = 0; // base index for extra_bits - this.elems = 0; // max number of elements in the tree - this.max_length = 0; // max bit length for the codes - this.max_code = 0; // largest code with non zero frequency - }; - - /* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ - var zip_DeflateConfiguration = function (a, b, c, d) { - this.good_length = a; // reduce lazy search above this match length - this.max_lazy = b; // do not perform lazy search above this match length - this.nice_length = c; // quit search above this match length - this.max_chain = d; - }; - - var zip_DeflateBuffer = function () { - this.next = null; - this.len = 0; - this.ptr = new Array(zip_OUTBUFSIZ); - this.off = 0; - }; - - /* constant tables */ - var zip_extra_lbits = new Array( - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0); - var zip_extra_dbits = new Array( - 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13); - var zip_extra_blbits = new Array( - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7); - var zip_bl_order = new Array( - 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15); - var zip_configuration_table = new Array( - new zip_DeflateConfiguration(0, 0, 0, 0), - new zip_DeflateConfiguration(4, 4, 8, 4), - new zip_DeflateConfiguration(4, 5, 16, 8), - new zip_DeflateConfiguration(4, 6, 32, 32), - new zip_DeflateConfiguration(4, 4, 16, 16), - new zip_DeflateConfiguration(8, 16, 32, 32), - new zip_DeflateConfiguration(8, 16, 128, 128), - new zip_DeflateConfiguration(8, 32, 128, 256), - new zip_DeflateConfiguration(32, 128, 258, 1024), - new zip_DeflateConfiguration(32, 258, 258, 4096)); - - - /* routines (deflate) */ - - var zip_deflate_start = function (level) { - var i; - - if (!level) - level = zip_DEFAULT_LEVEL; - else if (level < 1) - level = 1; - else if (level > 9) - level = 9; - - zip_compr_level = level; - zip_initflag = false; - zip_eofile = false; - if (zip_outbuf != null) - return; - - zip_free_queue = zip_qhead = zip_qtail = null; - zip_outbuf = new Array(zip_OUTBUFSIZ); - zip_window = new Array(zip_window_size); - zip_d_buf = new Array(zip_DIST_BUFSIZE); - zip_l_buf = new Array(zip_INBUFSIZ + zip_INBUF_EXTRA); - zip_prev = new Array(1 << zip_BITS); - zip_dyn_ltree = new Array(zip_HEAP_SIZE); - for (i = 0; i < zip_HEAP_SIZE; i++) zip_dyn_ltree[i] = new zip_DeflateCT(); - zip_dyn_dtree = new Array(2 * zip_D_CODES + 1); - for (i = 0; i < 2 * zip_D_CODES + 1; i++) zip_dyn_dtree[i] = new zip_DeflateCT(); - zip_static_ltree = new Array(zip_L_CODES + 2); - for (i = 0; i < zip_L_CODES + 2; i++) zip_static_ltree[i] = new zip_DeflateCT(); - zip_static_dtree = new Array(zip_D_CODES); - for (i = 0; i < zip_D_CODES; i++) zip_static_dtree[i] = new zip_DeflateCT(); - zip_bl_tree = new Array(2 * zip_BL_CODES + 1); - for (i = 0; i < 2 * zip_BL_CODES + 1; i++) zip_bl_tree[i] = new zip_DeflateCT(); - zip_l_desc = new zip_DeflateTreeDesc(); - zip_d_desc = new zip_DeflateTreeDesc(); - zip_bl_desc = new zip_DeflateTreeDesc(); - zip_bl_count = new Array(zip_MAX_BITS + 1); - zip_heap = new Array(2 * zip_L_CODES + 1); - zip_depth = new Array(2 * zip_L_CODES + 1); - zip_length_code = new Array(MAX_MATCH - MIN_MATCH + 1); - zip_dist_code = new Array(512); - zip_base_length = new Array(zip_LENGTH_CODES); - zip_base_dist = new Array(zip_D_CODES); - zip_flag_buf = new Array(parseInt(LIT_BUFSIZE / 8)); - }; - - var zip_deflate_end = function () { - zip_free_queue = zip_qhead = zip_qtail = null; - zip_outbuf = null; - zip_window = null; - zip_d_buf = null; - zip_l_buf = null; - zip_prev = null; - zip_dyn_ltree = null; - zip_dyn_dtree = null; - zip_static_ltree = null; - zip_static_dtree = null; - zip_bl_tree = null; - zip_l_desc = null; - zip_d_desc = null; - zip_bl_desc = null; - zip_bl_count = null; - zip_heap = null; - zip_depth = null; - zip_length_code = null; - zip_dist_code = null; - zip_base_length = null; - zip_base_dist = null; - zip_flag_buf = null; - }; - - var zip_reuse_queue = function (p) { - p.next = zip_free_queue; - zip_free_queue = p; - }; - - var zip_new_queue = function () { - var p; - - if (zip_free_queue != null) { - p = zip_free_queue; - zip_free_queue = zip_free_queue.next; - } - else - p = new zip_DeflateBuffer(); - p.next = null; - p.len = p.off = 0; - - return p; - }; - - var zip_head1 = function (i) { - return zip_prev[WSIZE + i]; - }; - - var zip_head2 = function (i, val) { - return zip_prev[WSIZE + i] = val; - }; - - /* put_byte is used for the compressed output, put_ubyte for the - * uncompressed output. However unlzw() uses window for its - * suffix table instead of its output buffer, so it does not use put_ubyte - * (to be cleaned up). - */ - var zip_put_byte = function (c) { - zip_outbuf[zip_outoff + zip_outcnt++] = c; - if (zip_outoff + zip_outcnt == zip_OUTBUFSIZ) - zip_qoutbuf(); - }; - - /* Output a 16 bit value, lsb first */ - var zip_put_short = function (w) { - w &= 0xffff; - if (zip_outoff + zip_outcnt < zip_OUTBUFSIZ - 2) { - zip_outbuf[zip_outoff + zip_outcnt++] = (w & 0xff); - zip_outbuf[zip_outoff + zip_outcnt++] = (w >>> 8); - } else { - zip_put_byte(w & 0xff); - zip_put_byte(w >>> 8); - } - }; - - /* ========================================================================== - * Insert string s in the dictionary and set match_head to the previous head - * of the hash chain (the most recent string with same hash key). Return - * the previous length of the hash chain. - * IN assertion: all calls to to INSERT_STRING are made with consecutive - * input characters and the first MIN_MATCH bytes of s are valid - * (except for the last MIN_MATCH-1 bytes of the input file). - */ - var zip_INSERT_STRING = function () { - zip_ins_h = ((zip_ins_h << zip_H_SHIFT) - ^ (zip_window[zip_strstart + MIN_MATCH - 1] & 0xff)) - & zip_HASH_MASK; - zip_hash_head = zip_head1(zip_ins_h); - zip_prev[zip_strstart & zip_WMASK] = zip_hash_head; - zip_head2(zip_ins_h, zip_strstart); - }; - - /* Send a code of the given tree. c and tree must not have side effects */ - var zip_SEND_CODE = function (c, tree) { - zip_send_bits(tree[c].fc, tree[c].dl); - }; - - /* Mapping from a distance to a distance code. dist is the distance - 1 and - * must not have side effects. dist_code[256] and dist_code[257] are never - * used. - */ - var zip_D_CODE = function (dist) { - return (dist < 256 ? zip_dist_code[dist] - : zip_dist_code[256 + (dist >> 7)]) & 0xff; - }; - - /* ========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ - var zip_SMALLER = function (tree, n, m) { - return tree[n].fc < tree[m].fc || - (tree[n].fc == tree[m].fc && zip_depth[n] <= zip_depth[m]); - }; - - /* ========================================================================== - * read string data - */ - var zip_read_buff = function (buff, offset, n) { - var i; - for (i = 0; i < n && zip_deflate_pos < zip_deflate_data.length; i++) - buff[offset + i] = - zip_deflate_data[zip_deflate_pos++] & 0xff; - return i; - }; - - /* ========================================================================== - * Initialize the "longest match" routines for a new file - */ - var zip_lm_init = function () { - var j; - - /* Initialize the hash table. */ - for (j = 0; j < zip_HASH_SIZE; j++) - zip_prev[WSIZE + j] = 0; - zip_max_lazy_match = zip_configuration_table[zip_compr_level].max_lazy; - zip_good_match = zip_configuration_table[zip_compr_level].good_length; - if (!zip_FULL_SEARCH) - zip_nice_match = zip_configuration_table[zip_compr_level].nice_length; - zip_max_chain_length = zip_configuration_table[zip_compr_level].max_chain; - - zip_strstart = 0; - zip_block_start = 0; - - zip_lookahead = zip_read_buff(zip_window, 0, 2 * WSIZE); - if (zip_lookahead <= 0) { - zip_eofile = true; - zip_lookahead = 0; - return; - } - zip_eofile = false; - /* Make sure that we always have enough lookahead. This is important - * if input comes from a device such as a tty. - */ - while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile) - zip_fill_window(); - - /* If lookahead < MIN_MATCH, ins_h is garbage, but this is - * not important since only literal bytes will be emitted. - */ - zip_ins_h = 0; - for (j = 0; j < MIN_MATCH - 1; j++) { - zip_ins_h = ((zip_ins_h << zip_H_SHIFT) ^ (zip_window[j] & 0xff)) & zip_HASH_MASK; - } - }; - - /* ========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - */ - var zip_longest_match = function (cur_match) { - var chain_length = zip_max_chain_length; // max hash chain length - var scanp = zip_strstart; // current string - var matchp; // matched string - var len; // length of current match - var best_len = zip_prev_length; // best match length so far - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - var limit = (zip_strstart > zip_MAX_DIST ? zip_strstart - zip_MAX_DIST : zip_NIL); - - var strendp = zip_strstart + MAX_MATCH; - var scan_end1 = zip_window[scanp + best_len - 1]; - var scan_end = zip_window[scanp + best_len]; - - /* Do not waste too much time if we already have a good match: */ - if (zip_prev_length >= zip_good_match) - chain_length >>= 2; - - do { - matchp = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2: - */ - if (zip_window[matchp + best_len] != scan_end || - zip_window[matchp + best_len - 1] != scan_end1 || - zip_window[matchp] != zip_window[scanp] || - zip_window[++matchp] != zip_window[scanp + 1]) { - continue; - } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scanp += 2; - matchp++; - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - } while (zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - scanp < strendp); - - len = MAX_MATCH - (strendp - scanp); - scanp = strendp - MAX_MATCH; - - if (len > best_len) { - zip_match_start = cur_match; - best_len = len; - if (zip_FULL_SEARCH) { - if (len >= MAX_MATCH) break; - } else { - if (len >= zip_nice_match) break; - } - - scan_end1 = zip_window[scanp + best_len - 1]; - scan_end = zip_window[scanp + best_len]; - } - } while ((cur_match = zip_prev[cur_match & zip_WMASK]) > limit - && --chain_length != 0); - - return best_len; - }; - - /* ========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead, and sets eofile if end of input file. - * IN assertion: lookahead < MIN_LOOKAHEAD && strstart + lookahead > 0 - * OUT assertions: at least one byte has been read, or eofile is set; - * file reads are performed for at least two bytes (required for the - * translate_eol option). - */ - var zip_fill_window = function () { - var n, m; - - // Amount of free space at the end of the window. - var more = zip_window_size - zip_lookahead - zip_strstart; - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (more == -1) { - /* Very unlikely, but possible on 16 bit machine if strstart == 0 - * and lookahead == 1 (input done one byte at time) - */ - more--; - } else if (zip_strstart >= WSIZE + zip_MAX_DIST) { - /* By the IN assertion, the window is not empty so we can't confuse - * more == 0 with more == 64K on a 16 bit machine. - */ - for (n = 0; n < WSIZE; n++) - zip_window[n] = zip_window[n + WSIZE]; - - zip_match_start -= WSIZE; - zip_strstart -= WSIZE; - /* we now have strstart >= MAX_DIST: */ - zip_block_start -= WSIZE; - - for (n = 0; n < zip_HASH_SIZE; n++) { - m = zip_head1(n); - zip_head2(n, m >= WSIZE ? m - WSIZE : zip_NIL); - } - for (n = 0; n < WSIZE; n++) { - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - m = zip_prev[n]; - zip_prev[n] = (m >= WSIZE ? m - WSIZE : zip_NIL); - } - more += WSIZE; - } - // At this point, more >= 2 - if (!zip_eofile) { - n = zip_read_buff(zip_window, zip_strstart + zip_lookahead, more); - if (n <= 0) - zip_eofile = true; - else - zip_lookahead += n; - } - }; - - /* ========================================================================== - * Processes a new input file and return its compressed length. This - * function does not perform lazy evaluationof matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ - var zip_deflate_fast = function () { - while (zip_lookahead != 0 && zip_qhead == null) { - var flush; // set if current block must be flushed - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - zip_INSERT_STRING(); - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (zip_hash_head != zip_NIL && - zip_strstart - zip_hash_head <= zip_MAX_DIST) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - zip_match_length = zip_longest_match(zip_hash_head); - /* longest_match() sets match_start */ - if (zip_match_length > zip_lookahead) - zip_match_length = zip_lookahead; - } - if (zip_match_length >= MIN_MATCH) { - flush = zip_ct_tally(zip_strstart - zip_match_start, - zip_match_length - MIN_MATCH); - zip_lookahead -= zip_match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (zip_match_length <= zip_max_lazy_match) { - zip_match_length--; // string at strstart already in hash table - do { - zip_strstart++; - zip_INSERT_STRING(); - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH - * these bytes are garbage, but it does not matter since - * the next lookahead bytes will be emitted as literals. - */ - } while (--zip_match_length != 0); - zip_strstart++; - } else { - zip_strstart += zip_match_length; - zip_match_length = 0; - zip_ins_h = zip_window[zip_strstart] & 0xff; - zip_ins_h = ((zip_ins_h << zip_H_SHIFT) ^ (zip_window[zip_strstart + 1] & 0xff)) & zip_HASH_MASK; - } - } else { - /* No match, output a literal byte */ - flush = zip_ct_tally(0, zip_window[zip_strstart] & 0xff); - zip_lookahead--; - zip_strstart++; - } - if (flush) { - zip_flush_block(0); - zip_block_start = zip_strstart; - } - - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile) - zip_fill_window(); - } - }; - - var zip_deflate_better = function () { - /* Process the input block. */ - while (zip_lookahead != 0 && zip_qhead == null) { - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - zip_INSERT_STRING(); - - /* Find the longest match, discarding those <= prev_length. - */ - zip_prev_length = zip_match_length; - zip_prev_match = zip_match_start; - zip_match_length = MIN_MATCH - 1; - - if (zip_hash_head != zip_NIL && - zip_prev_length < zip_max_lazy_match && - zip_strstart - zip_hash_head <= zip_MAX_DIST) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - zip_match_length = zip_longest_match(zip_hash_head); - /* longest_match() sets match_start */ - if (zip_match_length > zip_lookahead) - zip_match_length = zip_lookahead; - - /* Ignore a length 3 match if it is too distant: */ - if (zip_match_length == MIN_MATCH && - zip_strstart - zip_match_start > zip_TOO_FAR) { - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - zip_match_length--; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (zip_prev_length >= MIN_MATCH && - zip_match_length <= zip_prev_length) { - var flush; // set if current block must be flushed - flush = zip_ct_tally(zip_strstart - 1 - zip_prev_match, - zip_prev_length - MIN_MATCH); - - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. - */ - zip_lookahead -= zip_prev_length - 1; - zip_prev_length -= 2; - do { - zip_strstart++; - zip_INSERT_STRING(); - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH - * these bytes are garbage, but it does not matter since the - * next lookahead bytes will always be emitted as literals. - */ - } while (--zip_prev_length != 0); - zip_match_available = 0; - zip_match_length = MIN_MATCH - 1; - zip_strstart++; - if (flush) { - zip_flush_block(0); - zip_block_start = zip_strstart; - } - } else if (zip_match_available != 0) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - if (zip_ct_tally(0, zip_window[zip_strstart - 1] & 0xff)) { - zip_flush_block(0); - zip_block_start = zip_strstart; - } - zip_strstart++; - zip_lookahead--; - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - zip_match_available = 1; - zip_strstart++; - zip_lookahead--; - } - - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile) - zip_fill_window(); - } - }; - - var zip_init_deflate = function () { - if (zip_eofile) - return; - zip_bi_buf = 0; - zip_bi_valid = 0; - zip_ct_init(); - zip_lm_init(); - - zip_qhead = null; - zip_outcnt = 0; - zip_outoff = 0; - zip_match_available = 0; - - if (zip_compr_level <= 3) { - zip_prev_length = MIN_MATCH - 1; - zip_match_length = 0; - } - else { - zip_match_length = MIN_MATCH - 1; - zip_match_available = 0; - zip_match_available = 0; - } - - zip_complete = false; - }; - - /* ========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ - var zip_deflate_internal = function (buff, off, buff_size) { - var n; - - if (!zip_initflag) { - zip_init_deflate(); - zip_initflag = true; - if (zip_lookahead == 0) { // empty - zip_complete = true; - return 0; - } - } - - if ((n = zip_qcopy(buff, off, buff_size)) == buff_size) - return buff_size; - - if (zip_complete) - return n; - - if (zip_compr_level <= 3) // optimized for speed - zip_deflate_fast(); - else - zip_deflate_better(); - if (zip_lookahead == 0) { - if (zip_match_available != 0) - zip_ct_tally(0, zip_window[zip_strstart - 1] & 0xff); - zip_flush_block(1); - zip_complete = true; - } - return n + zip_qcopy(buff, n + off, buff_size - n); - }; - - var zip_qcopy = function (buff, off, buff_size) { - var n, i, j; - - n = 0; - while (zip_qhead != null && n < buff_size) { - i = buff_size - n; - if (i > zip_qhead.len) - i = zip_qhead.len; - for (j = 0; j < i; j++) - buff[off + n + j] = zip_qhead.ptr[zip_qhead.off + j]; - - zip_qhead.off += i; - zip_qhead.len -= i; - n += i; - if (zip_qhead.len == 0) { - var p; - p = zip_qhead; - zip_qhead = zip_qhead.next; - zip_reuse_queue(p); - } - } - - if (n == buff_size) - return n; - - if (zip_outoff < zip_outcnt) { - i = buff_size - n; - if (i > zip_outcnt - zip_outoff) - i = zip_outcnt - zip_outoff; - // System.arraycopy(outbuf, outoff, buff, off + n, i); - for (j = 0; j < i; j++) - buff[off + n + j] = zip_outbuf[zip_outoff + j]; - zip_outoff += i; - n += i; - if (zip_outcnt == zip_outoff) - zip_outcnt = zip_outoff = 0; - } - return n; - }; - - /* ========================================================================== - * Allocate the match buffer, initialize the various tables and save the - * location of the internal file attribute (ascii/binary) and method - * (DEFLATE/STORE). - */ - var zip_ct_init = function () { - var n; // iterates over tree elements - var bits; // bit counter - var length; // length value - var code; // code value - var dist; // distance index - - if (zip_static_dtree[0].dl != 0) return; // ct_init already called - - zip_l_desc.dyn_tree = zip_dyn_ltree; - zip_l_desc.static_tree = zip_static_ltree; - zip_l_desc.extra_bits = zip_extra_lbits; - zip_l_desc.extra_base = zip_LITERALS + 1; - zip_l_desc.elems = zip_L_CODES; - zip_l_desc.max_length = zip_MAX_BITS; - zip_l_desc.max_code = 0; - - zip_d_desc.dyn_tree = zip_dyn_dtree; - zip_d_desc.static_tree = zip_static_dtree; - zip_d_desc.extra_bits = zip_extra_dbits; - zip_d_desc.extra_base = 0; - zip_d_desc.elems = zip_D_CODES; - zip_d_desc.max_length = zip_MAX_BITS; - zip_d_desc.max_code = 0; - - zip_bl_desc.dyn_tree = zip_bl_tree; - zip_bl_desc.static_tree = null; - zip_bl_desc.extra_bits = zip_extra_blbits; - zip_bl_desc.extra_base = 0; - zip_bl_desc.elems = zip_BL_CODES; - zip_bl_desc.max_length = zip_MAX_BL_BITS; - zip_bl_desc.max_code = 0; - - // Initialize the mapping length (0..255) -> length code (0..28) - length = 0; - for (code = 0; code < zip_LENGTH_CODES - 1; code++) { - zip_base_length[code] = length; - for (n = 0; n < (1 << zip_extra_lbits[code]); n++) - zip_length_code[length++] = code; - } - /* Note that the length 255 (match length 258) can be represented - * in two different ways: code 284 + 5 bits or code 285, so we - * overwrite length_code[255] to use the best encoding: - */ - zip_length_code[length - 1] = code; - - /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ - dist = 0; - for (code = 0; code < 16; code++) { - zip_base_dist[code] = dist; - for (n = 0; n < (1 << zip_extra_dbits[code]); n++) { - zip_dist_code[dist++] = code; - } - } - dist >>= 7; // from now on, all distances are divided by 128 - for (; code < zip_D_CODES; code++) { - zip_base_dist[code] = dist << 7; - for (n = 0; n < (1 << (zip_extra_dbits[code] - 7)); n++) - zip_dist_code[256 + dist++] = code; - } - // Construct the codes of the static literal tree - for (bits = 0; bits <= zip_MAX_BITS; bits++) - zip_bl_count[bits] = 0; - n = 0; - while (n <= 143) { - zip_static_ltree[n++].dl = 8; - zip_bl_count[8]++; - } - while (n <= 255) { - zip_static_ltree[n++].dl = 9; - zip_bl_count[9]++; - } - while (n <= 279) { - zip_static_ltree[n++].dl = 7; - zip_bl_count[7]++; - } - while (n <= 287) { - zip_static_ltree[n++].dl = 8; - zip_bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - zip_gen_codes(zip_static_ltree, zip_L_CODES + 1); - - /* The static distance tree is trivial: */ - for (n = 0; n < zip_D_CODES; n++) { - zip_static_dtree[n].dl = 5; - zip_static_dtree[n].fc = zip_bi_reverse(n, 5); - } - - // Initialize the first block of the first file: - zip_init_block(); - }; - - /* ========================================================================== - * Initialize a new block. - */ - var zip_init_block = function () { - var n; // iterates over tree elements - - // Initialize the trees. - for (n = 0; n < zip_L_CODES; n++) zip_dyn_ltree[n].fc = 0; - for (n = 0; n < zip_D_CODES; n++) zip_dyn_dtree[n].fc = 0; - for (n = 0; n < zip_BL_CODES; n++) zip_bl_tree[n].fc = 0; - - zip_dyn_ltree[zip_END_BLOCK].fc = 1; - zip_opt_len = zip_static_len = 0; - zip_last_lit = zip_last_dist = zip_last_flags = 0; - zip_flags = 0; - zip_flag_bit = 1; - }; - - /* ========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ - var zip_pqdownheap = function (tree, // the tree to restore - k) { // node to move down - var v = zip_heap[k]; - var j = k << 1; // left son of k - - while (j <= zip_heap_len) { - // Set j to the smallest of the two sons: - if (j < zip_heap_len && - zip_SMALLER(tree, zip_heap[j + 1], zip_heap[j])) - j++; - - // Exit if v is smaller than both sons - if (zip_SMALLER(tree, v, zip_heap[j])) - break; - - // Exchange v with the smallest son - zip_heap[k] = zip_heap[j]; - k = j; - - // And continue down the tree, setting j to the left son of k - j <<= 1; - } - zip_heap[k] = v; - }; - - /* ========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ - var zip_gen_bitlen = function (desc) { // the tree descriptor - var tree = desc.dyn_tree; - var extra = desc.extra_bits; - var base = desc.extra_base; - var max_code = desc.max_code; - var max_length = desc.max_length; - var stree = desc.static_tree; - var h; // heap index - var n, m; // iterate over the tree elements - var bits; // bit length - var xbits; // extra bits - var f; // frequency - var overflow = 0; // number of elements with bit length too large - - for (bits = 0; bits <= zip_MAX_BITS; bits++) - zip_bl_count[bits] = 0; - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[zip_heap[zip_heap_max]].dl = 0; // root of the heap - - for (h = zip_heap_max + 1; h < zip_HEAP_SIZE; h++) { - n = zip_heap[h]; - bits = tree[tree[n].dl].dl + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n].dl = bits; - // We overwrite tree[n].dl which is no longer needed - - if (n > max_code) - continue; // not a leaf node - - zip_bl_count[bits]++; - xbits = 0; - if (n >= base) - xbits = extra[n - base]; - f = tree[n].fc; - zip_opt_len += f * (bits + xbits); - if (stree != null) - zip_static_len += f * (stree[n].dl + xbits); - } - if (overflow == 0) - return; - - // This happens for example on obj2 and pic of the Calgary corpus - - // Find the first bit length which could increase: - do { - bits = max_length - 1; - while (zip_bl_count[bits] == 0) - bits--; - zip_bl_count[bits]--; // move one leaf down the tree - zip_bl_count[bits + 1] += 2; // move one overflow item as its brother - zip_bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits != 0; bits--) { - n = zip_bl_count[bits]; - while (n != 0) { - m = zip_heap[--h]; - if (m > max_code) - continue; - if (tree[m].dl != bits) { - zip_opt_len += (bits - tree[m].dl) * tree[m].fc; - tree[m].fc = bits; - } - n--; - } - } - }; - - /* ========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ - var zip_gen_codes = function (tree, // the tree to decorate - max_code) { // largest code with non zero frequency - var next_code = new Array(zip_MAX_BITS + 1); // next code value for each bit length - var code = 0; // running code value - var bits; // bit index - var n; // code index - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= zip_MAX_BITS; bits++) { - code = ((code + zip_bl_count[bits - 1]) << 1); - next_code[bits] = code; - } - - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - for (n = 0; n <= max_code; n++) { - var len = tree[n].dl; - if (len == 0) - continue; - // Now reverse the bits - tree[n].fc = zip_bi_reverse(next_code[len]++, len); - } - }; - - /* ========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ - var zip_build_tree = function (desc) { // the tree descriptor - var tree = desc.dyn_tree; - var stree = desc.static_tree; - var elems = desc.elems; - var n, m; // iterate over heap elements - var max_code = -1; // largest code with non zero frequency - var node = elems; // next internal node of the tree - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - zip_heap_len = 0; - zip_heap_max = zip_HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n].fc != 0) { - zip_heap[++zip_heap_len] = max_code = n; - zip_depth[n] = 0; - } else - tree[n].dl = 0; - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (zip_heap_len < 2) { - var xnew = zip_heap[++zip_heap_len] = (max_code < 2 ? ++max_code : 0); - tree[xnew].fc = 1; - zip_depth[xnew] = 0; - zip_opt_len--; - if (stree != null) - zip_static_len -= stree[xnew].dl; - // new is 0 or 1 so it does not have extra bits - } - desc.max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = zip_heap_len >> 1; n >= 1; n--) - zip_pqdownheap(tree, n); - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - do { - n = zip_heap[zip_SMALLEST]; - zip_heap[zip_SMALLEST] = zip_heap[zip_heap_len--]; - zip_pqdownheap(tree, zip_SMALLEST); - - m = zip_heap[zip_SMALLEST]; // m = node of next least frequency - - // keep the nodes sorted by frequency - zip_heap[--zip_heap_max] = n; - zip_heap[--zip_heap_max] = m; - - // Create a new node father of n and m - tree[node].fc = tree[n].fc + tree[m].fc; - if (zip_depth[n] > zip_depth[m] + 1) - zip_depth[node] = zip_depth[n]; - else - zip_depth[node] = zip_depth[m] + 1; - tree[n].dl = tree[m].dl = node; - - // and insert the new node in the heap - zip_heap[zip_SMALLEST] = node++; - zip_pqdownheap(tree, zip_SMALLEST); - - } while (zip_heap_len >= 2); - - zip_heap[--zip_heap_max] = zip_heap[zip_SMALLEST]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - zip_gen_bitlen(desc); - - // The field len is now set, we can generate the bit codes - zip_gen_codes(tree, max_code); - }; - - /* ========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. Updates opt_len to take into account the repeat - * counts. (The contribution of the bit length codes will be added later - * during the construction of bl_tree.) - */ - var zip_scan_tree = function (tree,// the tree to be scanned - max_code) { // and its largest code of non zero frequency - var n; // iterates over all tree elements - var prevlen = -1; // last emitted length - var curlen; // length of current code - var nextlen = tree[0].dl; // length of next code - var count = 0; // repeat count of the current code - var max_count = 7; // max repeat count - var min_count = 4; // min repeat count - - if (nextlen == 0) { - max_count = 138; - min_count = 3; - } - tree[max_code + 1].dl = 0xffff; // guard - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[n + 1].dl; - if (++count < max_count && curlen == nextlen) - continue; - else if (count < min_count) - zip_bl_tree[curlen].fc += count; - else if (curlen != 0) { - if (curlen != prevlen) - zip_bl_tree[curlen].fc++; - zip_bl_tree[zip_REP_3_6].fc++; - } else if (count <= 10) - zip_bl_tree[zip_REPZ_3_10].fc++; - else - zip_bl_tree[zip_REPZ_11_138].fc++; - count = 0; - prevlen = curlen; - if (nextlen == 0) { - max_count = 138; - min_count = 3; - } else if (curlen == nextlen) { - max_count = 6; - min_count = 3; - } else { - max_count = 7; - min_count = 4; - } - } - }; - - /* ========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ - var zip_send_tree = function (tree, // the tree to be scanned - max_code) { // and its largest code of non zero frequency - var n; // iterates over all tree elements - var prevlen = -1; // last emitted length - var curlen; // length of current code - var nextlen = tree[0].dl; // length of next code - var count = 0; // repeat count of the current code - var max_count = 7; // max repeat count - var min_count = 4; // min repeat count - - /* tree[max_code+1].dl = -1; */ - /* guard already set */ - if (nextlen == 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[n + 1].dl; - if (++count < max_count && curlen == nextlen) { - continue; - } else if (count < min_count) { - do { - zip_SEND_CODE(curlen, zip_bl_tree); - } while (--count != 0); - } else if (curlen != 0) { - if (curlen != prevlen) { - zip_SEND_CODE(curlen, zip_bl_tree); - count--; - } - // Assert(count >= 3 && count <= 6, " 3_6?"); - zip_SEND_CODE(zip_REP_3_6, zip_bl_tree); - zip_send_bits(count - 3, 2); - } else if (count <= 10) { - zip_SEND_CODE(zip_REPZ_3_10, zip_bl_tree); - zip_send_bits(count - 3, 3); - } else { - zip_SEND_CODE(zip_REPZ_11_138, zip_bl_tree); - zip_send_bits(count - 11, 7); - } - count = 0; - prevlen = curlen; - if (nextlen == 0) { - max_count = 138; - min_count = 3; - } else if (curlen == nextlen) { - max_count = 6; - min_count = 3; - } else { - max_count = 7; - min_count = 4; - } - } - }; - - /* ========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ - var zip_build_bl_tree = function () { - var max_blindex; // index of last bit length code of non zero freq - - // Determine the bit length frequencies for literal and distance trees - zip_scan_tree(zip_dyn_ltree, zip_l_desc.max_code); - zip_scan_tree(zip_dyn_dtree, zip_d_desc.max_code); - - // Build the bit length tree: - zip_build_tree(zip_bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = zip_BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (zip_bl_tree[zip_bl_order[max_blindex]].dl != 0) break; - } - /* Update opt_len to include the bit length tree and counts */ - zip_opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - return max_blindex; - }; - - /* ========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ - var zip_send_all_trees = function (lcodes, dcodes, blcodes) { // number of codes for each tree - var rank; // index in bl_order - zip_send_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt - zip_send_bits(dcodes - 1, 5); - zip_send_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt - for (rank = 0; rank < blcodes; rank++) { - zip_send_bits(zip_bl_tree[zip_bl_order[rank]].dl, 3); - } - - // send the literal tree - zip_send_tree(zip_dyn_ltree, lcodes - 1); - - // send the distance tree - zip_send_tree(zip_dyn_dtree, dcodes - 1); - }; - - /* ========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ - var zip_flush_block = function (eof) { // true if this is the last block for a file - var opt_lenb, static_lenb; // opt_len and static_len in bytes - var max_blindex; // index of last bit length code of non zero freq - var stored_len; // length of input block - - stored_len = zip_strstart - zip_block_start; - zip_flag_buf[zip_last_flags] = zip_flags; // Save the flags for the last 8 items - - // Construct the literal and distance trees - zip_build_tree(zip_l_desc); - zip_build_tree(zip_d_desc); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = zip_build_bl_tree(); - - // Determine the best encoding. Compute first the block length in bytes - opt_lenb = (zip_opt_len + 3 + 7) >> 3; - static_lenb = (zip_static_len + 3 + 7) >> 3; - if (static_lenb <= opt_lenb) - opt_lenb = static_lenb; - if (stored_len + 4 <= opt_lenb // 4: two words for the lengths - && zip_block_start >= 0) { - var i; - - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - zip_send_bits((zip_STORED_BLOCK << 1) + eof, 3); - /* send block type */ - zip_bi_windup(); - /* align on byte boundary */ - zip_put_short(stored_len); - zip_put_short(~stored_len); - - // copy block - for (i = 0; i < stored_len; i++) - zip_put_byte(zip_window[zip_block_start + i]); - - } else if (static_lenb == opt_lenb) { - zip_send_bits((zip_STATIC_TREES << 1) + eof, 3); - zip_compress_block(zip_static_ltree, zip_static_dtree); - } else { - zip_send_bits((zip_DYN_TREES << 1) + eof, 3); - zip_send_all_trees(zip_l_desc.max_code + 1, - zip_d_desc.max_code + 1, - max_blindex + 1); - zip_compress_block(zip_dyn_ltree, zip_dyn_dtree); - } - - zip_init_block(); - - if (eof != 0) - zip_bi_windup(); - }; - - /* ========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ - var zip_ct_tally = function (dist, // distance of matched string - lc) { // match length-MIN_MATCH or unmatched char (if dist==0) - zip_l_buf[zip_last_lit++] = lc; - if (dist == 0) { - // lc is the unmatched char - zip_dyn_ltree[lc].fc++; - } else { - // Here, lc is the match length - MIN_MATCH - dist--; // dist = match distance - 1 - zip_dyn_ltree[zip_length_code[lc] + zip_LITERALS + 1].fc++; - zip_dyn_dtree[zip_D_CODE(dist)].fc++; - - zip_d_buf[zip_last_dist++] = dist; - zip_flags |= zip_flag_bit; - } - zip_flag_bit <<= 1; - - // Output the flags if they fill a byte - if ((zip_last_lit & 7) == 0) { - zip_flag_buf[zip_last_flags++] = zip_flags; - zip_flags = 0; - zip_flag_bit = 1; - } - // Try to guess if it is profitable to stop the current block here - if (zip_compr_level > 2 && (zip_last_lit & 0xfff) == 0) { - // Compute an upper bound for the compressed length - var out_length = zip_last_lit * 8; - var in_length = zip_strstart - zip_block_start; - var dcode; - - for (dcode = 0; dcode < zip_D_CODES; dcode++) { - out_length += zip_dyn_dtree[dcode].fc * (5 + zip_extra_dbits[dcode]); - } - out_length >>= 3; - if (zip_last_dist < parseInt(zip_last_lit / 2) && - out_length < parseInt(in_length / 2)) - return true; - } - return (zip_last_lit == LIT_BUFSIZE - 1 || - zip_last_dist == zip_DIST_BUFSIZE); - /* We avoid equality with LIT_BUFSIZE because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ - }; - - /* ========================================================================== - * Send the block data compressed using the given Huffman trees - */ - var zip_compress_block = function (ltree, // literal tree - dtree) { // distance tree - var dist; // distance of matched string - var lc; // match length or unmatched char (if dist == 0) - var lx = 0; // running index in l_buf - var dx = 0; // running index in d_buf - var fx = 0; // running index in flag_buf - var flag = 0; // current flags - var code; // the code to send - var extra; // number of extra bits to send - - if (zip_last_lit != 0) do { - if ((lx & 7) == 0) - flag = zip_flag_buf[fx++]; - lc = zip_l_buf[lx++] & 0xff; - if ((flag & 1) == 0) { - zip_SEND_CODE(lc, ltree); - /* send a literal byte */ - } else { - // Here, lc is the match length - MIN_MATCH - code = zip_length_code[lc]; - zip_SEND_CODE(code + zip_LITERALS + 1, ltree); // send the length code - extra = zip_extra_lbits[code]; - if (extra != 0) { - lc -= zip_base_length[code]; - zip_send_bits(lc, extra); // send the extra length bits - } - dist = zip_d_buf[dx++]; - // Here, dist is the match distance - 1 - code = zip_D_CODE(dist); - zip_SEND_CODE(code, dtree); // send the distance code - extra = zip_extra_dbits[code]; - if (extra != 0) { - dist -= zip_base_dist[code]; - zip_send_bits(dist, extra); // send the extra distance bits - } - } // literal or match pair ? - flag >>= 1; - } while (lx < zip_last_lit); - - zip_SEND_CODE(zip_END_BLOCK, ltree); - }; - - /* ========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ - var zip_Buf_size = 16; // bit size of bi_buf - var zip_send_bits = function (value, // value to send - length) { // number of bits - /* If not enough room in bi_buf, use (valid) bits from bi_buf and - * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid)) - * unused bits in value. - */ - if (zip_bi_valid > zip_Buf_size - length) { - zip_bi_buf |= (value << zip_bi_valid); - zip_put_short(zip_bi_buf); - zip_bi_buf = (value >> (zip_Buf_size - zip_bi_valid)); - zip_bi_valid += length - zip_Buf_size; - } else { - zip_bi_buf |= value << zip_bi_valid; - zip_bi_valid += length; - } - }; - - /* ========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ - var zip_bi_reverse = function (code, // the value to invert - len) { // its bit length - var res = 0; - do { - res |= code & 1; - code >>= 1; - res <<= 1; - } while (--len > 0); - return res >> 1; - }; - - /* ========================================================================== - * Write out any remaining bits in an incomplete byte. - */ - var zip_bi_windup = function () { - if (zip_bi_valid > 8) { - zip_put_short(zip_bi_buf); - } else if (zip_bi_valid > 0) { - zip_put_byte(zip_bi_buf); - } - zip_bi_buf = 0; - zip_bi_valid = 0; - }; - - var zip_qoutbuf = function () { - if (zip_outcnt != 0) { - var q, i; - q = zip_new_queue(); - if (zip_qhead == null) - zip_qhead = zip_qtail = q; - else - zip_qtail = zip_qtail.next = q; - q.len = zip_outcnt - zip_outoff; - for (i = 0; i < q.len; i++) - q.ptr[i] = zip_outbuf[zip_outoff + i]; - zip_outcnt = zip_outoff = 0; - } - }; - - function deflate(buffData, level) { - zip_deflate_data = buffData; - zip_deflate_pos = 0; - zip_deflate_start(level); - - var buff = new Array(1024), - pages = [], - totalSize = 0, - i; - - for (i = 0; i < 1024; i++) buff[i] = 0; - while ((i = zip_deflate_internal(buff, 0, buff.length)) > 0) { - var buf = new Buffer(buff.slice(0, i)); - pages.push(buf); - totalSize += buf.length; - } - - if (pages.length == 1) { - return pages[0]; - } - - var result = new Buffer(totalSize), - index = 0; - - for (i = 0; i < pages.length; i++) { - pages[i].copy(result, index); - index = index + pages[i].length - } - - return result; - } - - return { - deflate: function () { - return deflate(inbuf, 8); - } - } -} - -module.exports = function (/*Buffer*/inbuf) { - - var zlib = require("zlib"); - - return { - deflate: function () { - return new JSDeflater(inbuf).deflate(); - }, - - deflateAsync: function (/*Function*/callback) { - var tmp = zlib.createDeflateRaw({chunkSize:(parseInt(inbuf.length / 1024) + 1)*1024}), - parts = [], total = 0; - tmp.on('data', function(data) { - parts.push(data); - total += data.length; - }); - tmp.on('end', function() { - var buf = new Buffer(total), written = 0; - buf.fill(0); - - for (var i = 0; i < parts.length; i++) { - var part = parts[i]; - part.copy(buf, written); - written += part.length; - } - callback && callback(buf); - }); - tmp.end(inbuf); - } - } -}; diff --git a/cli/node_modules/adm-zip/methods/index.js b/cli/node_modules/adm-zip/methods/index.js deleted file mode 100644 index 58c718da6..000000000 --- a/cli/node_modules/adm-zip/methods/index.js +++ /dev/null @@ -1,2 +0,0 @@ -exports.Deflater = require("./deflater"); -exports.Inflater = require("./inflater"); \ No newline at end of file diff --git a/cli/node_modules/adm-zip/methods/inflater.js b/cli/node_modules/adm-zip/methods/inflater.js deleted file mode 100644 index 3739d98a8..000000000 --- a/cli/node_modules/adm-zip/methods/inflater.js +++ /dev/null @@ -1,448 +0,0 @@ -var Buffer = require("buffer").Buffer; - -function JSInflater(/*Buffer*/input) { - - var WSIZE = 0x8000, - slide = new Buffer(0x10000), - windowPos = 0, - fixedTableList = null, - fixedTableDist, - fixedLookup, - bitBuf = 0, - bitLen = 0, - method = -1, - eof = false, - copyLen = 0, - copyDist = 0, - tblList, tblDist, bitList, bitdist, - - inputPosition = 0, - - MASK_BITS = [0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff], - LENS = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], - LEXT = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99], - DISTS = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577], - DEXT = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], - BITORDER = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - - function HuffTable(clen, cnum, cval, blist, elist, lookupm) { - - this.status = 0; - this.root = null; - this.maxbit = 0; - - var el, f, tail, - offsets = [], - countTbl = [], - sTbl = [], - values = [], - tentry = {extra: 0, bitcnt: 0, lbase: 0, next: null}; - - tail = this.root = null; - for(var i = 0; i < 0x11; i++) { countTbl[i] = 0; sTbl[i] = 0; offsets[i] = 0; } - for(i = 0; i < 0x120; i++) values[i] = 0; - - el = cnum > 256 ? clen[256] : 16; - - var pidx = -1; - while (++pidx < cnum) countTbl[clen[pidx]]++; - - if(countTbl[0] == cnum) return; - - for(var j = 1; j <= 16; j++) if(countTbl[j] != 0) break; - var bitLen = j; - for(i = 16; i != 0; i--) if(countTbl[i] != 0) break; - var maxLen = i; - - lookupm < j && (lookupm = j); - - var dCodes = 1 << j; - for(; j < i; j++, dCodes <<= 1) - if((dCodes -= countTbl[j]) < 0) { - this.status = 2; - this.maxbit = lookupm; - return; - } - - if((dCodes -= countTbl[i]) < 0) { - this.status = 2; - this.maxbit = lookupm; - return; - } - - countTbl[i] += dCodes; - offsets[1] = j = 0; - pidx = 1; - var xp = 2; - while(--i > 0) offsets[xp++] = (j += countTbl[pidx++]); - pidx = 0; - i = 0; - do { - (j = clen[pidx++]) && (values[offsets[j]++] = i); - } while(++i < cnum); - cnum = offsets[maxLen]; - offsets[0] = i = 0; - pidx = 0; - - var level = -1, - w = sTbl[0] = 0, - cnode = null, - tblCnt = 0, - tblStack = []; - - for(; bitLen <= maxLen; bitLen++) { - var kccnt = countTbl[bitLen]; - while(kccnt-- > 0) { - while(bitLen > w + sTbl[1 + level]) { - w += sTbl[1 + level]; - level++; - tblCnt = (tblCnt = maxLen - w) > lookupm ? lookupm : tblCnt; - if((f = 1 << (j = bitLen - w)) > kccnt + 1) { - f -= kccnt + 1; - xp = bitLen; - while(++j < tblCnt) { - if((f <<= 1) <= countTbl[++xp]) break; - f -= countTbl[xp]; - } - } - if(w + j > el && w < el) j = el - w; - tblCnt = 1 << j; - sTbl[1 + level] = j; - cnode = []; - while (cnode.length < tblCnt) cnode.push({extra: 0, bitcnt: 0, lbase: 0, next: null}); - if (tail == null) { - tail = this.root = {next:null, list:null}; - } else { - tail = tail.next = {next:null, list:null} - } - tail.next = null; - tail.list = cnode; - - tblStack[level] = cnode; - - if(level > 0) { - offsets[level] = i; - tentry.bitcnt = sTbl[level]; - tentry.extra = 16 + j; - tentry.next = cnode; - j = (i & ((1 << w) - 1)) >> (w - sTbl[level]); - - tblStack[level-1][j].extra = tentry.extra; - tblStack[level-1][j].bitcnt = tentry.bitcnt; - tblStack[level-1][j].lbase = tentry.lbase; - tblStack[level-1][j].next = tentry.next; - } - } - tentry.bitcnt = bitLen - w; - if(pidx >= cnum) - tentry.extra = 99; - else if(values[pidx] < cval) { - tentry.extra = (values[pidx] < 256 ? 16 : 15); - tentry.lbase = values[pidx++]; - } else { - tentry.extra = elist[values[pidx] - cval]; - tentry.lbase = blist[values[pidx++] - cval]; - } - - f = 1 << (bitLen - w); - for(j = i >> w; j < tblCnt; j += f) { - cnode[j].extra = tentry.extra; - cnode[j].bitcnt = tentry.bitcnt; - cnode[j].lbase = tentry.lbase; - cnode[j].next = tentry.next; - } - for(j = 1 << (bitLen - 1); (i & j) != 0; j >>= 1) - i ^= j; - i ^= j; - while((i & ((1 << w) - 1)) != offsets[level]) { - w -= sTbl[level]; - level--; - } - } - } - - this.maxbit = sTbl[1]; - this.status = ((dCodes != 0 && maxLen != 1) ? 1 : 0); - } - - function addBits(n) { - while(bitLen < n) { - bitBuf |= input[inputPosition++] << bitLen; - bitLen += 8; - } - return bitBuf; - } - - function cutBits(n) { - bitLen -= n; - return bitBuf >>= n; - } - - function maskBits(n) { - while(bitLen < n) { - bitBuf |= input[inputPosition++] << bitLen; - bitLen += 8; - } - var res = bitBuf & MASK_BITS[n]; - bitBuf >>= n; - bitLen -= n; - return res; - } - - function codes(buff, off, size) { - var e, t; - if(size == 0) return 0; - - var n = 0; - for(;;) { - t = tblList.list[addBits(bitList) & MASK_BITS[bitList]]; - e = t.extra; - while(e > 16) { - if(e == 99) return -1; - cutBits(t.bitcnt); - e -= 16; - t = t.next[addBits(e) & MASK_BITS[e]]; - e = t.extra; - } - cutBits(t.bitcnt); - if(e == 16) { - windowPos &= WSIZE - 1; - buff[off + n++] = slide[windowPos++] = t.lbase; - if(n == size) return size; - continue; - } - if(e == 15) break; - - copyLen = t.lbase + maskBits(e); - t = tblDist.list[addBits(bitdist) & MASK_BITS[bitdist]]; - e = t.extra; - - while(e > 16) { - if(e == 99) return -1; - cutBits(t.bitcnt); - e -= 16; - t = t.next[addBits(e) & MASK_BITS[e]]; - e = t.extra - } - cutBits(t.bitcnt); - copyDist = windowPos - t.lbase - maskBits(e); - - while(copyLen > 0 && n < size) { - copyLen--; - copyDist &= WSIZE - 1; - windowPos &= WSIZE - 1; - buff[off + n++] = slide[windowPos++] = slide[copyDist++]; - } - - if(n == size) return size; - } - - method = -1; // done - return n; - } - - function stored(buff, off, size) { - cutBits(bitLen & 7); - var n = maskBits(0x10); - if(n != ((~maskBits(0x10)) & 0xffff)) return -1; - copyLen = n; - - n = 0; - while(copyLen > 0 && n < size) { - copyLen--; - windowPos &= WSIZE - 1; - buff[off + n++] = slide[windowPos++] = maskBits(8); - } - - if(copyLen == 0) method = -1; - return n; - } - - function fixed(buff, off, size) { - var fixed_bd = 0; - if(fixedTableList == null) { - var lengths = []; - - for(var symbol = 0; symbol < 144; symbol++) lengths[symbol] = 8; - for(; symbol < 256; symbol++) lengths[symbol] = 9; - for(; symbol < 280; symbol++) lengths[symbol] = 7; - for(; symbol < 288; symbol++) lengths[symbol] = 8; - - fixedLookup = 7; - - var htbl = new HuffTable(lengths, 288, 257, LENS, LEXT, fixedLookup); - - if(htbl.status != 0) return -1; - - fixedTableList = htbl.root; - fixedLookup = htbl.maxbit; - - for(symbol = 0; symbol < 30; symbol++) lengths[symbol] = 5; - fixed_bd = 5; - - htbl = new HuffTable(lengths, 30, 0, DISTS, DEXT, fixed_bd); - if(htbl.status > 1) { - fixedTableList = null; - return -1; - } - fixedTableDist = htbl.root; - fixed_bd = htbl.maxbit; - } - - tblList = fixedTableList; - tblDist = fixedTableDist; - bitList = fixedLookup; - bitdist = fixed_bd; - return codes(buff, off, size); - } - - function dynamic(buff, off, size) { - var ll = new Array(0x023C); - - for (var m = 0; m < 0x023C; m++) ll[m] = 0; - - var llencnt = 257 + maskBits(5), - dcodescnt = 1 + maskBits(5), - bitlencnt = 4 + maskBits(4); - - if(llencnt > 286 || dcodescnt > 30) return -1; - - for(var j = 0; j < bitlencnt; j++) ll[BITORDER[j]] = maskBits(3); - for(; j < 19; j++) ll[BITORDER[j]] = 0; - - // build decoding table for trees--single level, 7 bit lookup - bitList = 7; - var hufTable = new HuffTable(ll, 19, 19, null, null, bitList); - if(hufTable.status != 0) - return -1; // incomplete code set - - tblList = hufTable.root; - bitList = hufTable.maxbit; - var lencnt = llencnt + dcodescnt, - i = 0, - lastLen = 0; - while(i < lencnt) { - var hufLcode = tblList.list[addBits(bitList) & MASK_BITS[bitList]]; - j = hufLcode.bitcnt; - cutBits(j); - j = hufLcode.lbase; - if(j < 16) - ll[i++] = lastLen = j; - else if(j == 16) { - j = 3 + maskBits(2); - if(i + j > lencnt) return -1; - while(j-- > 0) ll[i++] = lastLen; - } else if(j == 17) { - j = 3 + maskBits(3); - if(i + j > lencnt) return -1; - while(j-- > 0) ll[i++] = 0; - lastLen = 0; - } else { - j = 11 + maskBits(7); - if(i + j > lencnt) return -1; - while(j-- > 0) ll[i++] = 0; - lastLen = 0; - } - } - bitList = 9; - hufTable = new HuffTable(ll, llencnt, 257, LENS, LEXT, bitList); - bitList == 0 && (hufTable.status = 1); - - if (hufTable.status != 0) return -1; - - tblList = hufTable.root; - bitList = hufTable.maxbit; - - for(i = 0; i < dcodescnt; i++) ll[i] = ll[i + llencnt]; - bitdist = 6; - hufTable = new HuffTable(ll, dcodescnt, 0, DISTS, DEXT, bitdist); - tblDist = hufTable.root; - bitdist = hufTable.maxbit; - - if((bitdist == 0 && llencnt > 257) || hufTable.status != 0) return -1; - - return codes(buff, off, size); - } - - return { - inflate : function(/*Buffer*/outputBuffer) { - tblList = null; - - var size = outputBuffer.length, - offset = 0, i; - - while(offset < size) { - if(eof && method == -1) return; - if(copyLen > 0) { - if(method != 0) { - while(copyLen > 0 && offset < size) { - copyLen--; - copyDist &= WSIZE - 1; - windowPos &= WSIZE - 1; - outputBuffer[offset++] = (slide[windowPos++] = slide[copyDist++]); - } - } else { - while(copyLen > 0 && offset < size) { - copyLen--; - windowPos &= WSIZE - 1; - outputBuffer[offset++] = (slide[windowPos++] = maskBits(8)); - } - copyLen == 0 && (method = -1); // done - } - if (offset == size) return; - } - - if(method == -1) { - if(eof) break; - eof = maskBits(1) != 0; - method = maskBits(2); - tblList = null; - copyLen = 0; - } - switch(method) { - case 0: i = stored(outputBuffer, offset, size - offset); break; - case 1: i = tblList != null ? codes(outputBuffer, offset, size - offset) : fixed(outputBuffer, offset, size - offset); break; - case 2: i = tblList != null ? codes(outputBuffer, offset, size - offset) : dynamic(outputBuffer, offset, size - offset); break; - default: i = -1; break; - } - - if(i == -1) return; - offset += i; - } - } - }; -} - -module.exports = function(/*Buffer*/inbuf) { - var zlib = require("zlib"); - return { - inflateAsync : function(/*Function*/callback) { - var tmp = zlib.createInflateRaw(), - parts = [], total = 0; - tmp.on('data', function(data) { - parts.push(data); - total += data.length; - }); - tmp.on('end', function() { - var buf = new Buffer(total), written = 0; - buf.fill(0); - - for (var i = 0; i < parts.length; i++) { - var part = parts[i]; - part.copy(buf, written); - written += part.length; - } - callback && callback(buf); - }); - tmp.end(inbuf) - }, - - inflate : function(/*Buffer*/outputBuffer) { - var x = { - x: new JSInflater(inbuf) - }; - x.x.inflate(outputBuffer); - delete(x.x); - } - } -}; diff --git a/cli/node_modules/adm-zip/package.json b/cli/node_modules/adm-zip/package.json deleted file mode 100644 index 3249c6241..000000000 --- a/cli/node_modules/adm-zip/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "adm-zip", - "version": "0.4.7", - "description": "A Javascript implementation of zip for nodejs. Allows user to create or extract zip files both in memory or to/from disk", - "keywords": [ - "zip", - "methods", - "archive", - "unzip" - ], - "homepage": "http://github.com/cthackers/adm-zip", - "author": { - "name": "Nasca Iacob", - "email": "sy@another-d-mention.ro", - "url": "https://github.com/cthackers" - }, - "bugs": { - "url": "https://github.com/cthackers/adm-zip/issues", - "email": "sy@another-d-mention.ro" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://raw.github.com/cthackers/adm-zip/master/MIT-LICENSE.txt" - } - ], - "files": [ - "adm-zip.js", - "headers", - "methods", - "util", - "zipEntry.js", - "zipFile.js" - ], - "main": "adm-zip.js", - "repository": { - "type": "git", - "url": "https://github.com/cthackers/adm-zip.git" - }, - "engines": { - "node": ">=0.3.0" - }, - "gitHead": "6708a3e5788ff9e67ddba288397f7788a5c02855", - "_id": "adm-zip@0.4.7", - "scripts": {}, - "_shasum": "8606c2cbf1c426ce8c8ec00174447fd49b6eafc1", - "_from": "adm-zip@>=0.4.7 <0.5.0", - "_resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.7.tgz", - "_npmVersion": "2.5.1", - "_nodeVersion": "0.12.0", - "_npmUser": { - "name": "cthackers", - "email": "iacob.campia@gmail.com" - }, - "maintainers": [ - { - "name": "cthackers", - "email": "sy@another-d-mention.ro" - } - ], - "dist": { - "shasum": "8606c2cbf1c426ce8c8ec00174447fd49b6eafc1", - "tarball": "http://registry.npmjs.org/adm-zip/-/adm-zip-0.4.7.tgz" - }, - "directories": {}, - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/adm-zip/util/constants.js b/cli/node_modules/adm-zip/util/constants.js deleted file mode 100644 index 02de1e9ad..000000000 --- a/cli/node_modules/adm-zip/util/constants.js +++ /dev/null @@ -1,115 +0,0 @@ -module.exports = { - /* The local file header */ - LOCHDR : 30, // LOC header size - LOCSIG : 0x04034b50, // "PK\003\004" - LOCVER : 4, // version needed to extract - LOCFLG : 6, // general purpose bit flag - LOCHOW : 8, // compression method - LOCTIM : 10, // modification time (2 bytes time, 2 bytes date) - LOCCRC : 14, // uncompressed file crc-32 value - LOCSIZ : 18, // compressed size - LOCLEN : 22, // uncompressed size - LOCNAM : 26, // filename length - LOCEXT : 28, // extra field length - - /* The Data descriptor */ - EXTSIG : 0x08074b50, // "PK\007\008" - EXTHDR : 16, // EXT header size - EXTCRC : 4, // uncompressed file crc-32 value - EXTSIZ : 8, // compressed size - EXTLEN : 12, // uncompressed size - - /* The central directory file header */ - CENHDR : 46, // CEN header size - CENSIG : 0x02014b50, // "PK\001\002" - CENVEM : 4, // version made by - CENVER : 6, // version needed to extract - CENFLG : 8, // encrypt, decrypt flags - CENHOW : 10, // compression method - CENTIM : 12, // modification time (2 bytes time, 2 bytes date) - CENCRC : 16, // uncompressed file crc-32 value - CENSIZ : 20, // compressed size - CENLEN : 24, // uncompressed size - CENNAM : 28, // filename length - CENEXT : 30, // extra field length - CENCOM : 32, // file comment length - CENDSK : 34, // volume number start - CENATT : 36, // internal file attributes - CENATX : 38, // external file attributes (host system dependent) - CENOFF : 42, // LOC header offset - - /* The entries in the end of central directory */ - ENDHDR : 22, // END header size - ENDSIG : 0x06054b50, // "PK\005\006" - ENDSUB : 8, // number of entries on this disk - ENDTOT : 10, // total number of entries - ENDSIZ : 12, // central directory size in bytes - ENDOFF : 16, // offset of first CEN header - ENDCOM : 20, // zip file comment length - - /* Compression methods */ - STORED : 0, // no compression - SHRUNK : 1, // shrunk - REDUCED1 : 2, // reduced with compression factor 1 - REDUCED2 : 3, // reduced with compression factor 2 - REDUCED3 : 4, // reduced with compression factor 3 - REDUCED4 : 5, // reduced with compression factor 4 - IMPLODED : 6, // imploded - // 7 reserved - DEFLATED : 8, // deflated - ENHANCED_DEFLATED: 9, // enhanced deflated - PKWARE : 10,// PKWare DCL imploded - // 11 reserved - BZIP2 : 12, // compressed using BZIP2 - // 13 reserved - LZMA : 14, // LZMA - // 15-17 reserved - IBM_TERSE : 18, // compressed using IBM TERSE - IBM_LZ77 : 19, //IBM LZ77 z - - /* General purpose bit flag */ - FLG_ENC : 0, // encripted file - FLG_COMP1 : 1, // compression option - FLG_COMP2 : 2, // compression option - FLG_DESC : 4, // data descriptor - FLG_ENH : 8, // enhanced deflation - FLG_STR : 16, // strong encryption - FLG_LNG : 1024, // language encoding - FLG_MSK : 4096, // mask header values - - /* Load type */ - FILE : 0, - BUFFER : 1, - NONE : 2, - - /* 4.5 Extensible data fields */ - EF_ID : 0, - EF_SIZE : 2, - - /* Header IDs */ - ID_ZIP64 : 0x0001, - ID_AVINFO : 0x0007, - ID_PFS : 0x0008, - ID_OS2 : 0x0009, - ID_NTFS : 0x000a, - ID_OPENVMS : 0x000c, - ID_UNIX : 0x000d, - ID_FORK : 0x000e, - ID_PATCH : 0x000f, - ID_X509_PKCS7 : 0x0014, - ID_X509_CERTID_F : 0x0015, - ID_X509_CERTID_C : 0x0016, - ID_STRONGENC : 0x0017, - ID_RECORD_MGT : 0x0018, - ID_X509_PKCS7_RL : 0x0019, - ID_IBM1 : 0x0065, - ID_IBM2 : 0x0066, - ID_POSZIP : 0x4690, - - EF_ZIP64_OR_32 : 0xffffffff, - EF_ZIP64_OR_16 : 0xffff, - EF_ZIP64_SUNCOMP : 0, - EF_ZIP64_SCOMP : 8, - EF_ZIP64_RHO : 16, - EF_ZIP64_DSN : 24 -}; diff --git a/cli/node_modules/adm-zip/util/errors.js b/cli/node_modules/adm-zip/util/errors.js deleted file mode 100644 index 50931c318..000000000 --- a/cli/node_modules/adm-zip/util/errors.js +++ /dev/null @@ -1,35 +0,0 @@ -module.exports = { - /* Header error messages */ - "INVALID_LOC" : "Invalid LOC header (bad signature)", - "INVALID_CEN" : "Invalid CEN header (bad signature)", - "INVALID_END" : "Invalid END header (bad signature)", - - /* ZipEntry error messages*/ - "NO_DATA" : "Nothing to decompress", - "BAD_CRC" : "CRC32 checksum failed", - "FILE_IN_THE_WAY" : "There is a file in the way: %s", - "UNKNOWN_METHOD" : "Invalid/unsupported compression method", - - /* Inflater error messages */ - "AVAIL_DATA" : "inflate::Available inflate data did not terminate", - "INVALID_DISTANCE" : "inflate::Invalid literal/length or distance code in fixed or dynamic block", - "TO_MANY_CODES" : "inflate::Dynamic block code description: too many length or distance codes", - "INVALID_REPEAT_LEN" : "inflate::Dynamic block code description: repeat more than specified lengths", - "INVALID_REPEAT_FIRST" : "inflate::Dynamic block code description: repeat lengths with no first length", - "INCOMPLETE_CODES" : "inflate::Dynamic block code description: code lengths codes incomplete", - "INVALID_DYN_DISTANCE": "inflate::Dynamic block code description: invalid distance code lengths", - "INVALID_CODES_LEN": "inflate::Dynamic block code description: invalid literal/length code lengths", - "INVALID_STORE_BLOCK" : "inflate::Stored block length did not match one's complement", - "INVALID_BLOCK_TYPE" : "inflate::Invalid block type (type == 3)", - - /* ADM-ZIP error messages */ - "CANT_EXTRACT_FILE" : "Could not extract the file", - "CANT_OVERRIDE" : "Target file already exists", - "NO_ZIP" : "No zip file was loaded", - "NO_ENTRY" : "Entry doesn't exist", - "DIRECTORY_CONTENT_ERROR" : "A directory cannot have content", - "FILE_NOT_FOUND" : "File not found: %s", - "NOT_IMPLEMENTED" : "Not implemented", - "INVALID_FILENAME" : "Invalid filename", - "INVALID_FORMAT" : "Invalid or unsupported zip format. No END header found" -}; \ No newline at end of file diff --git a/cli/node_modules/adm-zip/util/fattr.js b/cli/node_modules/adm-zip/util/fattr.js deleted file mode 100644 index 4f247eacb..000000000 --- a/cli/node_modules/adm-zip/util/fattr.js +++ /dev/null @@ -1,84 +0,0 @@ -var fs = require("fs"), - pth = require("path"); - -fs.existsSync = fs.existsSync || pth.existsSync; - -module.exports = function(/*String*/path) { - - var _path = path || "", - _permissions = 0, - _obj = newAttr(), - _stat = null; - - function newAttr() { - return { - directory : false, - readonly : false, - hidden : false, - executable : false, - mtime : 0, - atime : 0 - } - } - - if (_path && fs.existsSync(_path)) { - _stat = fs.statSync(_path); - _obj.directory = _stat.isDirectory(); - _obj.mtime = _stat.mtime; - _obj.atime = _stat.atime; - _obj.executable = !!(1 & parseInt ((_stat.mode & parseInt ("777", 8)).toString (8)[0])); - _obj.readonly = !!(2 & parseInt ((_stat.mode & parseInt ("777", 8)).toString (8)[0])); - _obj.hidden = pth.basename(_path)[0] === "."; - } else { - console.warn("Invalid path: " + _path) - } - - return { - - get directory () { - return _obj.directory; - }, - - get readOnly () { - return _obj.readonly; - }, - - get hidden () { - return _obj.hidden; - }, - - get mtime () { - return _obj.mtime; - }, - - get atime () { - return _obj.atime; - }, - - - get executable () { - return _obj.executable; - }, - - decodeAttributes : function(val) { - - }, - - encodeAttributes : function (val) { - - }, - - toString : function() { - return '{\n' + - '\t"path" : "' + _path + ",\n" + - '\t"isDirectory" : ' + _obj.directory + ",\n" + - '\t"isReadOnly" : ' + _obj.readonly + ",\n" + - '\t"isHidden" : ' + _obj.hidden + ",\n" + - '\t"isExecutable" : ' + _obj.executable + ",\n" + - '\t"mTime" : ' + _obj.mtime + "\n" + - '\t"aTime" : ' + _obj.atime + "\n" + - '}'; - } - } - -}; diff --git a/cli/node_modules/adm-zip/util/index.js b/cli/node_modules/adm-zip/util/index.js deleted file mode 100644 index d77b98098..000000000 --- a/cli/node_modules/adm-zip/util/index.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = require("./utils"); -module.exports.Constants = require("./constants"); -module.exports.Errors = require("./errors"); -module.exports.FileAttr = require("./fattr"); \ No newline at end of file diff --git a/cli/node_modules/adm-zip/util/utils.js b/cli/node_modules/adm-zip/util/utils.js deleted file mode 100644 index 52a8ed9a1..000000000 --- a/cli/node_modules/adm-zip/util/utils.js +++ /dev/null @@ -1,199 +0,0 @@ -var fs = require("fs"), - pth = require('path'); - -fs.existsSync = fs.existsSync || pth.existsSync; - -module.exports = (function() { - - var crcTable = [], - Constants = require('./constants'), - Errors = require('./errors'), - - PATH_SEPARATOR = pth.normalize("/"); - - - function mkdirSync(/*String*/path) { - var resolvedPath = path.split(PATH_SEPARATOR)[0]; - path.split(PATH_SEPARATOR).forEach(function(name) { - if (!name || name.substr(-1,1) == ":") return; - resolvedPath += PATH_SEPARATOR + name; - var stat; - try { - stat = fs.statSync(resolvedPath); - } catch (e) { - fs.mkdirSync(resolvedPath); - } - if (stat && stat.isFile()) - throw Errors.FILE_IN_THE_WAY.replace("%s", resolvedPath); - }); - } - - function findSync(/*String*/root, /*RegExp*/pattern, /*Boolean*/recoursive) { - if (typeof pattern === 'boolean') { - recoursive = pattern; - pattern = undefined; - } - var files = []; - fs.readdirSync(root).forEach(function(file) { - var path = pth.join(root, file); - - if (fs.statSync(path).isDirectory() && recoursive) - files = files.concat(findSync(path, pattern, recoursive)); - - if (!pattern || pattern.test(path)) { - files.push(pth.normalize(path) + (fs.statSync(path).isDirectory() ? PATH_SEPARATOR : "")); - } - - }); - return files; - } - - return { - makeDir : function(/*String*/path) { - mkdirSync(path); - }, - - crc32 : function(buf) { - var b = new Buffer(4); - if (!crcTable.length) { - for (var n = 0; n < 256; n++) { - var c = n; - for (var k = 8; --k >= 0;) // - if ((c & 1) != 0) { c = 0xedb88320 ^ (c >>> 1); } else { c = c >>> 1; } - if (c < 0) { - b.writeInt32LE(c, 0); - c = b.readUInt32LE(0); - } - crcTable[n] = c; - } - } - var crc = 0, off = 0, len = buf.length, c1 = ~crc; - while(--len >= 0) c1 = crcTable[(c1 ^ buf[off++]) & 0xff] ^ (c1 >>> 8); - crc = ~c1; - b.writeInt32LE(crc & 0xffffffff, 0); - return b.readUInt32LE(0); - }, - - methodToString : function(/*Number*/method) { - switch (method) { - case Constants.STORED: - return 'STORED (' + method + ')'; - case Constants.DEFLATED: - return 'DEFLATED (' + method + ')'; - default: - return 'UNSUPPORTED (' + method + ')'; - } - - }, - - writeFileTo : function(/*String*/path, /*Buffer*/content, /*Boolean*/overwrite, /*Number*/attr) { - if (fs.existsSync(path)) { - if (!overwrite) - return false; // cannot overwite - - var stat = fs.statSync(path); - if (stat.isDirectory()) { - return false; - } - } - var folder = pth.dirname(path); - if (!fs.existsSync(folder)) { - mkdirSync(folder); - } - - var fd; - try { - fd = fs.openSync(path, 'w', 438); // 0666 - } catch(e) { - fs.chmodSync(path, 438); - fd = fs.openSync(path, 'w', 438); - } - if (fd) { - fs.writeSync(fd, content, 0, content.length, 0); - fs.closeSync(fd); - } - fs.chmodSync(path, attr || 438); - return true; - }, - - writeFileToAsync : function(/*String*/path, /*Buffer*/content, /*Boolean*/overwrite, /*Number*/attr, /*Function*/callback) { - if(typeof attr === 'function') { - callback = attr; - attr = undefined; - } - - fs.exists(path, function(exists) { - if(exists && !overwrite) - return callback(false); - - fs.stat(path, function(err, stat) { - if(exists &&stat.isDirectory()) { - return callback(false); - } - - var folder = pth.dirname(path); - fs.exists(folder, function(exists) { - if(!exists) - mkdirSync(folder); - - fs.open(path, 'w', 438, function(err, fd) { - if(err) { - fs.chmod(path, 438, function(err) { - fs.open(path, 'w', 438, function(err, fd) { - fs.write(fd, content, 0, content.length, 0, function(err, written, buffer) { - fs.close(fd, function(err) { - fs.chmod(path, attr || 438, function() { - callback(true); - }) - }); - }); - }); - }) - } else { - if(fd) { - fs.write(fd, content, 0, content.length, 0, function(err, written, buffer) { - fs.close(fd, function(err) { - fs.chmod(path, attr || 438, function() { - callback(true); - }) - }); - }); - } else { - fs.chmod(path, attr || 438, function() { - callback(true); - }) - } - } - }); - }) - }) - }) - }, - - findFiles : function(/*String*/path) { - return findSync(path, true); - }, - - getAttributes : function(/*String*/path) { - - }, - - setAttributes : function(/*String*/path) { - - }, - - toBuffer : function(input) { - if (Buffer.isBuffer(input)) { - return input; - } else { - if (input.length == 0) { - return new Buffer(0) - } - return new Buffer(input, 'utf8'); - } - }, - - Constants : Constants, - Errors : Errors - } -})(); diff --git a/cli/node_modules/adm-zip/zipEntry.js b/cli/node_modules/adm-zip/zipEntry.js deleted file mode 100644 index 6b1309bc4..000000000 --- a/cli/node_modules/adm-zip/zipEntry.js +++ /dev/null @@ -1,284 +0,0 @@ -var Utils = require("./util"), - Headers = require("./headers"), - Constants = Utils.Constants, - Methods = require("./methods"); - -module.exports = function (/*Buffer*/input) { - - var _entryHeader = new Headers.EntryHeader(), - _entryName = new Buffer(0), - _comment = new Buffer(0), - _isDirectory = false, - uncompressedData = null, - _extra = new Buffer(0); - - function getCompressedDataFromZip() { - if (!input || !Buffer.isBuffer(input)) { - return new Buffer(0); - } - _entryHeader.loadDataHeaderFromBinary(input); - return input.slice(_entryHeader.realDataOffset, _entryHeader.realDataOffset + _entryHeader.compressedSize) - } - - function crc32OK(data) { - // if bit 3 (0x08) of the general-purpose flags field is set, then the CRC-32 and file sizes are not known when the header is written - if (_entryHeader.flags & 0x8 != 0x8) { - if (Utils.crc32(data) != _entryHeader.crc) { - return false; - } - } else { - // @TODO: load and check data descriptor header - // The fields in the local header are filled with zero, and the CRC-32 and size are appended in a 12-byte structure - // (optionally preceded by a 4-byte signature) immediately after the compressed data: - } - return true; - } - - function decompress(/*Boolean*/async, /*Function*/callback, /*String*/pass) { - if(typeof callback === 'undefined' && typeof async === 'string') { - pass=async; - async=void 0; - } - if (_isDirectory) { - if (async && callback) { - callback(new Buffer(0), Utils.Errors.DIRECTORY_CONTENT_ERROR); //si added error. - } - return new Buffer(0); - } - - var compressedData = getCompressedDataFromZip(); - - if (compressedData.length == 0) { - if (async && callback) callback(compressedData, Utils.Errors.NO_DATA);//si added error. - return compressedData; - } - - var data = new Buffer(_entryHeader.size); - data.fill(0); - - switch (_entryHeader.method) { - case Utils.Constants.STORED: - compressedData.copy(data); - if (!crc32OK(data)) { - if (async && callback) callback(data, Utils.Errors.BAD_CRC);//si added error - return Utils.Errors.BAD_CRC; - } else {//si added otherwise did not seem to return data. - if (async && callback) callback(data); - return data; - } - break; - case Utils.Constants.DEFLATED: - var inflater = new Methods.Inflater(compressedData); - if (!async) { - inflater.inflate(data); - if (!crc32OK(data)) { - console.warn(Utils.Errors.BAD_CRC + " " + _entryName.toString()) - } - return data; - } else { - inflater.inflateAsync(function(result) { - result.copy(data, 0); - if (!crc32OK(data)) { - if (callback) callback(data, Utils.Errors.BAD_CRC); //si added error - } else { //si added otherwise did not seem to return data. - if (callback) callback(data); - } - }) - } - break; - default: - if (async && callback) callback(new Buffer(0), Utils.Errors.UNKNOWN_METHOD); - return Utils.Errors.UNKNOWN_METHOD; - } - } - - function compress(/*Boolean*/async, /*Function*/callback) { - if ((!uncompressedData || !uncompressedData.length) && Buffer.isBuffer(input)) { - // no data set or the data wasn't changed to require recompression - if (async && callback) callback(getCompressedDataFromZip()); - return getCompressedDataFromZip(); - } - - if (uncompressedData.length && !_isDirectory) { - var compressedData; - // Local file header - switch (_entryHeader.method) { - case Utils.Constants.STORED: - _entryHeader.compressedSize = _entryHeader.size; - - compressedData = new Buffer(uncompressedData.length); - uncompressedData.copy(compressedData); - - if (async && callback) callback(compressedData); - return compressedData; - - break; - default: - case Utils.Constants.DEFLATED: - - var deflater = new Methods.Deflater(uncompressedData); - if (!async) { - var deflated = deflater.deflate(); - _entryHeader.compressedSize = deflated.length; - return deflated; - } else { - deflater.deflateAsync(function(data) { - compressedData = new Buffer(data.length); - _entryHeader.compressedSize = data.length; - data.copy(compressedData); - callback && callback(compressedData); - }) - } - deflater = null; - break; - } - } else { - if (async && callback) { - callback(new Buffer(0)); - } else { - return new Buffer(0); - } - } - } - - function readUInt64LE(buffer, offset) { - return (buffer.readUInt32LE(offset + 4) << 4) + buffer.readUInt32LE(offset); - } - - function parseExtra(data) { - var offset = 0; - var signature, size, part; - while(offset= Constants.EF_ZIP64_SCOMP) { - size = readUInt64LE(data, Constants.EF_ZIP64_SUNCOMP); - if(_entryHeader.size === Constants.EF_ZIP64_OR_32) { - _entryHeader.size = size; - } - } - if(data.length >= Constants.EF_ZIP64_RHO) { - compressedSize = readUInt64LE(data, Constants.EF_ZIP64_SCOMP); - if(_entryHeader.compressedSize === Constants.EF_ZIP64_OR_32) { - _entryHeader.compressedSize = compressedSize; - } - } - if(data.length >= Constants.EF_ZIP64_DSN) { - offset = readUInt64LE(data, Constants.EF_ZIP64_RHO); - if(_entryHeader.offset === Constants.EF_ZIP64_OR_32) { - _entryHeader.offset = offset; - } - } - if(data.length >= Constants.EF_ZIP64_DSN+4) { - diskNumStart = data.readUInt32LE(Constants.EF_ZIP64_DSN); - if(_entryHeader.diskNumStart === Constants.EF_ZIP64_OR_16) { - _entryHeader.diskNumStart = diskNumStart; - } - } - } - - - return { - get entryName () { return _entryName.toString(); }, - get rawEntryName() { return _entryName; }, - set entryName (val) { - _entryName = Utils.toBuffer(val); - var lastChar = _entryName[_entryName.length - 1]; - _isDirectory = (lastChar == 47) || (lastChar == 92); - _entryHeader.fileNameLength = _entryName.length; - }, - - get extra () { return _extra; }, - set extra (val) { - _extra = val; - _entryHeader.extraLength = val.length; - parseExtra(val); - }, - - get comment () { return _comment.toString(); }, - set comment (val) { - _comment = Utils.toBuffer(val); - _entryHeader.commentLength = _comment.length; - }, - - get name () { var n = _entryName.toString(); return _isDirectory ? n.substr(n.length - 1).split("/").pop() : n.split("/").pop(); }, - get isDirectory () { return _isDirectory }, - - getCompressedData : function() { - return compress(false, null) - }, - - getCompressedDataAsync : function(/*Function*/callback) { - compress(true, callback) - }, - - setData : function(value) { - uncompressedData = Utils.toBuffer(value); - if (!_isDirectory && uncompressedData.length) { - _entryHeader.size = uncompressedData.length; - _entryHeader.method = Utils.Constants.DEFLATED; - _entryHeader.crc = Utils.crc32(value); - } else { // folders and blank files should be stored - _entryHeader.method = Utils.Constants.STORED; - } - }, - - getData : function(pass) { - return decompress(false, null, pass); - }, - - getDataAsync : function(/*Function*/callback, pass) { - decompress(true, callback, pass) - }, - - set attr(attr) { _entryHeader.attr = attr; }, - get attr() { return _entryHeader.attr; }, - - set header(/*Buffer*/data) { - _entryHeader.loadFromBinary(data); - }, - - get header() { - return _entryHeader; - }, - - packHeader : function() { - var header = _entryHeader.entryHeaderToBinary(); - // add - _entryName.copy(header, Utils.Constants.CENHDR); - if (_entryHeader.extraLength) { - _extra.copy(header, Utils.Constants.CENHDR + _entryName.length) - } - if (_entryHeader.commentLength) { - _comment.copy(header, Utils.Constants.CENHDR + _entryName.length + _entryHeader.extraLength, _comment.length); - } - return header; - }, - - toString : function() { - return '{\n' + - '\t"entryName" : "' + _entryName.toString() + "\",\n" + - '\t"name" : "' + _entryName.toString().split("/").pop() + "\",\n" + - '\t"comment" : "' + _comment.toString() + "\",\n" + - '\t"isDirectory" : ' + _isDirectory + ",\n" + - '\t"header" : ' + _entryHeader.toString().replace(/\t/mg, "\t\t") + ",\n" + - '\t"compressedData" : <' + (input && input.length + " bytes buffer" || "null") + ">\n" + - '\t"data" : <' + (uncompressedData && uncompressedData.length + " bytes buffer" || "null") + ">\n" + - '}'; - } - } -}; diff --git a/cli/node_modules/adm-zip/zipFile.js b/cli/node_modules/adm-zip/zipFile.js deleted file mode 100644 index 794afdb83..000000000 --- a/cli/node_modules/adm-zip/zipFile.js +++ /dev/null @@ -1,311 +0,0 @@ -var ZipEntry = require("./zipEntry"), - Headers = require("./headers"), - Utils = require("./util"); - -module.exports = function(/*String|Buffer*/input, /*Number*/inputType) { - var entryList = [], - entryTable = {}, - _comment = new Buffer(0), - filename = "", - fs = require("fs"), - inBuffer = null, - mainHeader = new Headers.MainHeader(); - - if (inputType == Utils.Constants.FILE) { - // is a filename - filename = input; - inBuffer = fs.readFileSync(filename); - readMainHeader(); - } else if (inputType == Utils.Constants.BUFFER) { - // is a memory buffer - inBuffer = input; - readMainHeader(); - } else { - // none. is a new file - } - - function readEntries() { - entryTable = {}; - entryList = new Array(mainHeader.diskEntries); // total number of entries - var index = mainHeader.offset; // offset of first CEN header - for(var i = 0; i < entryList.length; i++) { - - var tmp = index, - entry = new ZipEntry(inBuffer); - entry.header = inBuffer.slice(tmp, tmp += Utils.Constants.CENHDR); - - entry.entryName = inBuffer.slice(tmp, tmp += entry.header.fileNameLength); - - if (entry.header.extraLength) { - entry.extra = inBuffer.slice(tmp, tmp += entry.header.extraLength); - } - - if (entry.header.commentLength) - entry.comment = inBuffer.slice(tmp, tmp + entry.header.commentLength); - - index += entry.header.entryHeaderSize; - - entryList[i] = entry; - entryTable[entry.entryName] = entry; - } - } - - function readMainHeader() { - var i = inBuffer.length - Utils.Constants.ENDHDR, // END header size - n = Math.max(0, i - 0xFFFF), // 0xFFFF is the max zip file comment length - endOffset = -1; // Start offset of the END header - - for (i; i >= n; i--) { - if (inBuffer[i] != 0x50) continue; // quick check that the byte is 'P' - if (inBuffer.readUInt32LE(i) == Utils.Constants.ENDSIG) { // "PK\005\006" - endOffset = i; - break; - } - } - if (!~endOffset) - throw Utils.Errors.INVALID_FORMAT; - - mainHeader.loadFromBinary(inBuffer.slice(endOffset, endOffset + Utils.Constants.ENDHDR)); - if (mainHeader.commentLength) { - _comment = inBuffer.slice(endOffset + Utils.Constants.ENDHDR); - } - readEntries(); - } - - return { - /** - * Returns an array of ZipEntry objects existent in the current opened archive - * @return Array - */ - get entries () { - return entryList; - }, - - /** - * Archive comment - * @return {String} - */ - get comment () { return _comment.toString(); }, - set comment(val) { - mainHeader.commentLength = val.length; - _comment = val; - }, - - /** - * Returns a reference to the entry with the given name or null if entry is inexistent - * - * @param entryName - * @return ZipEntry - */ - getEntry : function(/*String*/entryName) { - return entryTable[entryName] || null; - }, - - /** - * Adds the given entry to the entry list - * - * @param entry - */ - setEntry : function(/*ZipEntry*/entry) { - entryList.push(entry); - entryTable[entry.entryName] = entry; - mainHeader.totalEntries = entryList.length; - }, - - /** - * Removes the entry with the given name from the entry list. - * - * If the entry is a directory, then all nested files and directories will be removed - * @param entryName - */ - deleteEntry : function(/*String*/entryName) { - var entry = entryTable[entryName]; - if (entry && entry.isDirectory) { - var _self = this; - this.getEntryChildren(entry).forEach(function(child) { - if (child.entryName != entryName) { - _self.deleteEntry(child.entryName) - } - }) - } - entryList.splice(entryList.indexOf(entry), 1); - delete(entryTable[entryName]); - mainHeader.totalEntries = entryList.length; - }, - - /** - * Iterates and returns all nested files and directories of the given entry - * - * @param entry - * @return Array - */ - getEntryChildren : function(/*ZipEntry*/entry) { - if (entry.isDirectory) { - var list = [], - name = entry.entryName, - len = name.length; - - entryList.forEach(function(zipEntry) { - if (zipEntry.entryName.substr(0, len) == name) { - list.push(zipEntry); - } - }); - return list; - } - return [] - }, - - /** - * Returns the zip file - * - * @return Buffer - */ - compressToBuffer : function() { - if (entryList.length > 1) { - entryList.sort(function(a, b) { - var nameA = a.entryName.toLowerCase(); - var nameB = b.entryName.toLowerCase(); - if (nameA < nameB) {return -1} - if (nameA > nameB) {return 1} - return 0; - }); - } - - var totalSize = 0, - dataBlock = [], - entryHeaders = [], - dindex = 0; - - mainHeader.size = 0; - mainHeader.offset = 0; - - entryList.forEach(function(entry) { - entry.header.offset = dindex; - - // compress data and set local and entry header accordingly. Reason why is called first - var compressedData = entry.getCompressedData(); - // data header - var dataHeader = entry.header.dataHeaderToBinary(); - var postHeader = new Buffer(entry.entryName + entry.extra.toString()); - var dataLength = dataHeader.length + postHeader.length + compressedData.length; - - dindex += dataLength; - - dataBlock.push(dataHeader); - dataBlock.push(postHeader); - dataBlock.push(compressedData); - - var entryHeader = entry.packHeader(); - entryHeaders.push(entryHeader); - mainHeader.size += entryHeader.length; - totalSize += (dataLength + entryHeader.length); - }); - - totalSize += mainHeader.mainHeaderSize; // also includes zip file comment length - // point to end of data and begining of central directory first record - mainHeader.offset = dindex; - - dindex = 0; - var outBuffer = new Buffer(totalSize); - dataBlock.forEach(function(content) { - content.copy(outBuffer, dindex); // write data blocks - dindex += content.length; - }); - entryHeaders.forEach(function(content) { - content.copy(outBuffer, dindex); // write central directory entries - dindex += content.length; - }); - - var mh = mainHeader.toBinary(); - if (_comment) { - _comment.copy(mh, Utils.Constants.ENDHDR); // add zip file comment - } - - mh.copy(outBuffer, dindex); // write main header - - return outBuffer - }, - - toAsyncBuffer : function(/*Function*/onSuccess,/*Function*/onFail,/*Function*/onItemStart,/*Function*/onItemEnd) { - if (entryList.length > 1) { - entryList.sort(function(a, b) { - var nameA = a.entryName.toLowerCase(); - var nameB = b.entryName.toLowerCase(); - if (nameA > nameB) {return -1} - if (nameA < nameB) {return 1} - return 0; - }); - } - - var totalSize = 0, - dataBlock = [], - entryHeaders = [], - dindex = 0; - - mainHeader.size = 0; - mainHeader.offset = 0; - - var compress=function(entryList){ - var self=arguments.callee; - var entry; - if(entryList.length){ - var entry=entryList.pop(); - var name=entry.entryName + entry.extra.toString(); - if(onItemStart)onItemStart(name); - entry.getCompressedDataAsync(function(compressedData){ - if(onItemEnd)onItemEnd(name); - - entry.header.offset = dindex; - // data header - var dataHeader = entry.header.dataHeaderToBinary(); - var postHeader = new Buffer(name); - var dataLength = dataHeader.length + postHeader.length + compressedData.length; - - dindex += dataLength; - - dataBlock.push(dataHeader); - dataBlock.push(postHeader); - dataBlock.push(compressedData); - - var entryHeader = entry.packHeader(); - entryHeaders.push(entryHeader); - mainHeader.size += entryHeader.length; - totalSize += (dataLength + entryHeader.length); - - if(entryList.length){ - self(entryList); - }else{ - - - totalSize += mainHeader.mainHeaderSize; // also includes zip file comment length - // point to end of data and begining of central directory first record - mainHeader.offset = dindex; - - dindex = 0; - var outBuffer = new Buffer(totalSize); - dataBlock.forEach(function(content) { - content.copy(outBuffer, dindex); // write data blocks - dindex += content.length; - }); - entryHeaders.forEach(function(content) { - content.copy(outBuffer, dindex); // write central directory entries - dindex += content.length; - }); - - var mh = mainHeader.toBinary(); - if (_comment) { - _comment.copy(mh, Utils.Constants.ENDHDR); // add zip file comment - } - - mh.copy(outBuffer, dindex); // write main header - - onSuccess(outBuffer); - } - }); - } - }; - - compress(entryList); - } - } -}; diff --git a/cli/node_modules/async/.travis.yml b/cli/node_modules/async/.travis.yml deleted file mode 100644 index 6064ca092..000000000 --- a/cli/node_modules/async/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.12" - - "iojs" diff --git a/cli/node_modules/async/LICENSE b/cli/node_modules/async/LICENSE deleted file mode 100644 index 8f2969858..000000000 --- a/cli/node_modules/async/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010-2014 Caolan McMahon - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/cli/node_modules/async/README.md b/cli/node_modules/async/README.md deleted file mode 100644 index 6cfb922c5..000000000 --- a/cli/node_modules/async/README.md +++ /dev/null @@ -1,1647 +0,0 @@ -# Async.js - -[![Build Status via Travis CI](https://travis-ci.org/caolan/async.svg?branch=master)](https://travis-ci.org/caolan/async) - - -Async is a utility module which provides straight-forward, powerful functions -for working with asynchronous JavaScript. Although originally designed for -use with [Node.js](http://nodejs.org) and installable via `npm install async`, -it can also be used directly in the browser. - -Async is also installable via: - -- [bower](http://bower.io/): `bower install async` -- [component](https://github.com/component/component): `component install - caolan/async` -- [jam](http://jamjs.org/): `jam install async` -- [spm](http://spmjs.io/): `spm install async` - -Async provides around 20 functions that include the usual 'functional' -suspects (`map`, `reduce`, `filter`, `each`…) as well as some common patterns -for asynchronous control flow (`parallel`, `series`, `waterfall`…). All these -functions assume you follow the Node.js convention of providing a single -callback as the last argument of your `async` function. - - -## Quick Examples - -```javascript -async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file -}); - -async.filter(['file1','file2','file3'], fs.exists, function(results){ - // results now equals an array of the existing files -}); - -async.parallel([ - function(){ ... }, - function(){ ... } -], callback); - -async.series([ - function(){ ... }, - function(){ ... } -]); -``` - -There are many more functions available so take a look at the docs below for a -full list. This module aims to be comprehensive, so if you feel anything is -missing please create a GitHub issue for it. - -## Common Pitfalls - -### Binding a context to an iterator - -This section is really about `bind`, not about `async`. If you are wondering how to -make `async` execute your iterators in a given context, or are confused as to why -a method of another library isn't working as an iterator, study this example: - -```js -// Here is a simple object with an (unnecessarily roundabout) squaring method -var AsyncSquaringLibrary = { - squareExponent: 2, - square: function(number, callback){ - var result = Math.pow(number, this.squareExponent); - setTimeout(function(){ - callback(null, result); - }, 200); - } -}; - -async.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){ - // result is [NaN, NaN, NaN] - // This fails because the `this.squareExponent` expression in the square - // function is not evaluated in the context of AsyncSquaringLibrary, and is - // therefore undefined. -}); - -async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){ - // result is [1, 4, 9] - // With the help of bind we can attach a context to the iterator before - // passing it to async. Now the square function will be executed in its - // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent` - // will be as expected. -}); -``` - -## Download - -The source is available for download from -[GitHub](http://github.com/caolan/async). -Alternatively, you can install using Node Package Manager (`npm`): - - npm install async - -__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed - -## In the Browser - -So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. - -Usage: - -```html - - -``` - -## Documentation - -### Collections - -* [`each`](#each) -* [`eachSeries`](#eachSeries) -* [`eachLimit`](#eachLimit) -* [`map`](#map) -* [`mapSeries`](#mapSeries) -* [`mapLimit`](#mapLimit) -* [`filter`](#filter) -* [`filterSeries`](#filterSeries) -* [`reject`](#reject) -* [`rejectSeries`](#rejectSeries) -* [`reduce`](#reduce) -* [`reduceRight`](#reduceRight) -* [`detect`](#detect) -* [`detectSeries`](#detectSeries) -* [`sortBy`](#sortBy) -* [`some`](#some) -* [`every`](#every) -* [`concat`](#concat) -* [`concatSeries`](#concatSeries) - -### Control Flow - -* [`series`](#seriestasks-callback) -* [`parallel`](#parallel) -* [`parallelLimit`](#parallellimittasks-limit-callback) -* [`whilst`](#whilst) -* [`doWhilst`](#doWhilst) -* [`until`](#until) -* [`doUntil`](#doUntil) -* [`forever`](#forever) -* [`waterfall`](#waterfall) -* [`compose`](#compose) -* [`seq`](#seq) -* [`applyEach`](#applyEach) -* [`applyEachSeries`](#applyEachSeries) -* [`queue`](#queue) -* [`priorityQueue`](#priorityQueue) -* [`cargo`](#cargo) -* [`auto`](#auto) -* [`retry`](#retry) -* [`iterator`](#iterator) -* [`apply`](#apply) -* [`nextTick`](#nextTick) -* [`times`](#times) -* [`timesSeries`](#timesSeries) - -### Utils - -* [`memoize`](#memoize) -* [`unmemoize`](#unmemoize) -* [`log`](#log) -* [`dir`](#dir) -* [`noConflict`](#noConflict) - - -## Collections - - - -### each(arr, iterator, callback) - -Applies the function `iterator` to each item in `arr`, in parallel. -The `iterator` is called with an item from the list, and a callback for when it -has finished. If the `iterator` passes an error to its `callback`, the main -`callback` (for the `each` function) is immediately called with the error. - -Note, that since this function applies `iterator` to each item in parallel, -there is no guarantee that the iterator functions will complete in order. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A function to apply to each item in `arr`. - The iterator is passed a `callback(err)` which must be called once it has - completed. If no error has occurred, the `callback` should be run without - arguments or with an explicit `null` argument. -* `callback(err)` - A callback which is called when all `iterator` functions - have finished, or an error occurs. - -__Examples__ - - -```js -// assuming openFiles is an array of file names and saveFile is a function -// to save the modified contents of that file: - -async.each(openFiles, saveFile, function(err){ - // if any of the saves produced an error, err would equal that error -}); -``` - -```js -// assuming openFiles is an array of file names - -async.each(openFiles, function(file, callback) { - - // Perform operation on file here. - console.log('Processing file ' + file); - - if( file.length > 32 ) { - console.log('This file name is too long'); - callback('File name too long'); - } else { - // Do work to process file here - console.log('File processed'); - callback(); - } -}, function(err){ - // if any of the file processing produced an error, err would equal that error - if( err ) { - // One of the iterations produced an error. - // All processing will now stop. - console.log('A file failed to process'); - } else { - console.log('All files have been processed successfully'); - } -}); -``` - ---------------------------------------- - - - -### eachSeries(arr, iterator, callback) - -The same as [`each`](#each), only `iterator` is applied to each item in `arr` in -series. The next `iterator` is only called once the current one has completed. -This means the `iterator` functions will complete in order. - - ---------------------------------------- - - - -### eachLimit(arr, limit, iterator, callback) - -The same as [`each`](#each), only no more than `limit` `iterator`s will be simultaneously -running at any time. - -Note that the items in `arr` are not processed in batches, so there is no guarantee that -the first `limit` `iterator` functions will complete before any others are started. - -__Arguments__ - -* `arr` - An array to iterate over. -* `limit` - The maximum number of `iterator`s to run at any time. -* `iterator(item, callback)` - A function to apply to each item in `arr`. - The iterator is passed a `callback(err)` which must be called once it has - completed. If no error has occurred, the callback should be run without - arguments or with an explicit `null` argument. -* `callback(err)` - A callback which is called when all `iterator` functions - have finished, or an error occurs. - -__Example__ - -```js -// Assume documents is an array of JSON objects and requestApi is a -// function that interacts with a rate-limited REST api. - -async.eachLimit(documents, 20, requestApi, function(err){ - // if any of the saves produced an error, err would equal that error -}); -``` - ---------------------------------------- - - -### map(arr, iterator, callback) - -Produces a new array of values by mapping each value in `arr` through -the `iterator` function. The `iterator` is called with an item from `arr` and a -callback for when it has finished processing. Each of these callback takes 2 arguments: -an `error`, and the transformed item from `arr`. If `iterator` passes an error to his -callback, the main `callback` (for the `map` function) is immediately called with the error. - -Note, that since this function applies the `iterator` to each item in parallel, -there is no guarantee that the `iterator` functions will complete in order. -However, the results array will be in the same order as the original `arr`. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A function to apply to each item in `arr`. - The iterator is passed a `callback(err, transformed)` which must be called once - it has completed with an error (which can be `null`) and a transformed item. -* `callback(err, results)` - A callback which is called when all `iterator` - functions have finished, or an error occurs. Results is an array of the - transformed items from the `arr`. - -__Example__ - -```js -async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file -}); -``` - ---------------------------------------- - - -### mapSeries(arr, iterator, callback) - -The same as [`map`](#map), only the `iterator` is applied to each item in `arr` in -series. The next `iterator` is only called once the current one has completed. -The results array will be in the same order as the original. - - ---------------------------------------- - - -### mapLimit(arr, limit, iterator, callback) - -The same as [`map`](#map), only no more than `limit` `iterator`s will be simultaneously -running at any time. - -Note that the items are not processed in batches, so there is no guarantee that -the first `limit` `iterator` functions will complete before any others are started. - -__Arguments__ - -* `arr` - An array to iterate over. -* `limit` - The maximum number of `iterator`s to run at any time. -* `iterator(item, callback)` - A function to apply to each item in `arr`. - The iterator is passed a `callback(err, transformed)` which must be called once - it has completed with an error (which can be `null`) and a transformed item. -* `callback(err, results)` - A callback which is called when all `iterator` - calls have finished, or an error occurs. The result is an array of the - transformed items from the original `arr`. - -__Example__ - -```js -async.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){ - // results is now an array of stats for each file -}); -``` - ---------------------------------------- - - - -### filter(arr, iterator, callback) - -__Alias:__ `select` - -Returns a new array of all the values in `arr` which pass an async truth test. -_The callback for each `iterator` call only accepts a single argument of `true` or -`false`; it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like `fs.exists`. This operation is -performed in parallel, but the results array will be in the same order as the -original. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A truth test to apply to each item in `arr`. - The `iterator` is passed a `callback(truthValue)`, which must be called with a - boolean argument once it has completed. -* `callback(results)` - A callback which is called after all the `iterator` - functions have finished. - -__Example__ - -```js -async.filter(['file1','file2','file3'], fs.exists, function(results){ - // results now equals an array of the existing files -}); -``` - ---------------------------------------- - - - -### filterSeries(arr, iterator, callback) - -__Alias:__ `selectSeries` - -The same as [`filter`](#filter) only the `iterator` is applied to each item in `arr` in -series. The next `iterator` is only called once the current one has completed. -The results array will be in the same order as the original. - ---------------------------------------- - - -### reject(arr, iterator, callback) - -The opposite of [`filter`](#filter). Removes values that pass an `async` truth test. - ---------------------------------------- - - -### rejectSeries(arr, iterator, callback) - -The same as [`reject`](#reject), only the `iterator` is applied to each item in `arr` -in series. - - ---------------------------------------- - - -### reduce(arr, memo, iterator, callback) - -__Aliases:__ `inject`, `foldl` - -Reduces `arr` into a single value using an async `iterator` to return -each successive step. `memo` is the initial state of the reduction. -This function only operates in series. - -For performance reasons, it may make sense to split a call to this function into -a parallel map, and then use the normal `Array.prototype.reduce` on the results. -This function is for situations where each step in the reduction needs to be async; -if you can get the data before reducing it, then it's probably a good idea to do so. - -__Arguments__ - -* `arr` - An array to iterate over. -* `memo` - The initial state of the reduction. -* `iterator(memo, item, callback)` - A function applied to each item in the - array to produce the next step in the reduction. The `iterator` is passed a - `callback(err, reduction)` which accepts an optional error as its first - argument, and the state of the reduction as the second. If an error is - passed to the callback, the reduction is stopped and the main `callback` is - immediately called with the error. -* `callback(err, result)` - A callback which is called after all the `iterator` - functions have finished. Result is the reduced value. - -__Example__ - -```js -async.reduce([1,2,3], 0, function(memo, item, callback){ - // pointless async: - process.nextTick(function(){ - callback(null, memo + item) - }); -}, function(err, result){ - // result is now equal to the last value of memo, which is 6 -}); -``` - ---------------------------------------- - - -### reduceRight(arr, memo, iterator, callback) - -__Alias:__ `foldr` - -Same as [`reduce`](#reduce), only operates on `arr` in reverse order. - - ---------------------------------------- - - -### detect(arr, iterator, callback) - -Returns the first value in `arr` that passes an async truth test. The -`iterator` is applied in parallel, meaning the first iterator to return `true` will -fire the detect `callback` with that result. That means the result might not be -the first item in the original `arr` (in terms of order) that passes the test. - -If order within the original `arr` is important, then look at [`detectSeries`](#detectSeries). - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A truth test to apply to each item in `arr`. - The iterator is passed a `callback(truthValue)` which must be called with a - boolean argument once it has completed. -* `callback(result)` - A callback which is called as soon as any iterator returns - `true`, or after all the `iterator` functions have finished. Result will be - the first item in the array that passes the truth test (iterator) or the - value `undefined` if none passed. - -__Example__ - -```js -async.detect(['file1','file2','file3'], fs.exists, function(result){ - // result now equals the first file in the list that exists -}); -``` - ---------------------------------------- - - -### detectSeries(arr, iterator, callback) - -The same as [`detect`](#detect), only the `iterator` is applied to each item in `arr` -in series. This means the result is always the first in the original `arr` (in -terms of array order) that passes the truth test. - - ---------------------------------------- - - -### sortBy(arr, iterator, callback) - -Sorts a list by the results of running each `arr` value through an async `iterator`. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A function to apply to each item in `arr`. - The iterator is passed a `callback(err, sortValue)` which must be called once it - has completed with an error (which can be `null`) and a value to use as the sort - criteria. -* `callback(err, results)` - A callback which is called after all the `iterator` - functions have finished, or an error occurs. Results is the items from - the original `arr` sorted by the values returned by the `iterator` calls. - -__Example__ - -```js -async.sortBy(['file1','file2','file3'], function(file, callback){ - fs.stat(file, function(err, stats){ - callback(err, stats.mtime); - }); -}, function(err, results){ - // results is now the original array of files sorted by - // modified date -}); -``` - -__Sort Order__ - -By modifying the callback parameter the sorting order can be influenced: - -```js -//ascending order -async.sortBy([1,9,3,5], function(x, callback){ - callback(null, x); -}, function(err,result){ - //result callback -} ); - -//descending order -async.sortBy([1,9,3,5], function(x, callback){ - callback(null, x*-1); //<- x*-1 instead of x, turns the order around -}, function(err,result){ - //result callback -} ); -``` - ---------------------------------------- - - -### some(arr, iterator, callback) - -__Alias:__ `any` - -Returns `true` if at least one element in the `arr` satisfies an async test. -_The callback for each iterator call only accepts a single argument of `true` or -`false`; it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like `fs.exists`. Once any iterator -call returns `true`, the main `callback` is immediately called. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A truth test to apply to each item in the array - in parallel. The iterator is passed a callback(truthValue) which must be - called with a boolean argument once it has completed. -* `callback(result)` - A callback which is called as soon as any iterator returns - `true`, or after all the iterator functions have finished. Result will be - either `true` or `false` depending on the values of the async tests. - -__Example__ - -```js -async.some(['file1','file2','file3'], fs.exists, function(result){ - // if result is true then at least one of the files exists -}); -``` - ---------------------------------------- - - -### every(arr, iterator, callback) - -__Alias:__ `all` - -Returns `true` if every element in `arr` satisfies an async test. -_The callback for each `iterator` call only accepts a single argument of `true` or -`false`; it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like `fs.exists`. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A truth test to apply to each item in the array - in parallel. The iterator is passed a callback(truthValue) which must be - called with a boolean argument once it has completed. -* `callback(result)` - A callback which is called after all the `iterator` - functions have finished. Result will be either `true` or `false` depending on - the values of the async tests. - -__Example__ - -```js -async.every(['file1','file2','file3'], fs.exists, function(result){ - // if result is true then every file exists -}); -``` - ---------------------------------------- - - -### concat(arr, iterator, callback) - -Applies `iterator` to each item in `arr`, concatenating the results. Returns the -concatenated list. The `iterator`s are called in parallel, and the results are -concatenated as they return. There is no guarantee that the results array will -be returned in the original order of `arr` passed to the `iterator` function. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A function to apply to each item in `arr`. - The iterator is passed a `callback(err, results)` which must be called once it - has completed with an error (which can be `null`) and an array of results. -* `callback(err, results)` - A callback which is called after all the `iterator` - functions have finished, or an error occurs. Results is an array containing - the concatenated results of the `iterator` function. - -__Example__ - -```js -async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ - // files is now a list of filenames that exist in the 3 directories -}); -``` - ---------------------------------------- - - -### concatSeries(arr, iterator, callback) - -Same as [`concat`](#concat), but executes in series instead of parallel. - - -## Control Flow - - -### series(tasks, [callback]) - -Run the functions in the `tasks` array in series, each one running once the previous -function has completed. If any functions in the series pass an error to its -callback, no more functions are run, and `callback` is immediately called with the value of the error. -Otherwise, `callback` receives an array of results when `tasks` have completed. - -It is also possible to use an object instead of an array. Each property will be -run as a function, and the results will be passed to the final `callback` as an object -instead of an array. This can be a more readable way of handling results from -[`series`](#series). - -**Note** that while many implementations preserve the order of object properties, the -[ECMAScript Language Specifcation](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) -explicitly states that - -> The mechanics and order of enumerating the properties is not specified. - -So if you rely on the order in which your series of functions are executed, and want -this to work on all platforms, consider using an array. - -__Arguments__ - -* `tasks` - An array or object containing functions to run, each function is passed - a `callback(err, result)` it must call on completion with an error `err` (which can - be `null`) and an optional `result` value. -* `callback(err, results)` - An optional callback to run once all the functions - have completed. This function gets a results array (or object) containing all - the result arguments passed to the `task` callbacks. - -__Example__ - -```js -async.series([ - function(callback){ - // do some stuff ... - callback(null, 'one'); - }, - function(callback){ - // do some more stuff ... - callback(null, 'two'); - } -], -// optional callback -function(err, results){ - // results is now equal to ['one', 'two'] -}); - - -// an example using an object instead of an array -async.series({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - } -}, -function(err, results) { - // results is now equal to: {one: 1, two: 2} -}); -``` - ---------------------------------------- - - -### parallel(tasks, [callback]) - -Run the `tasks` array of functions in parallel, without waiting until the previous -function has completed. If any of the functions pass an error to its -callback, the main `callback` is immediately called with the value of the error. -Once the `tasks` have completed, the results are passed to the final `callback` as an -array. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final `callback` as an object -instead of an array. This can be a more readable way of handling results from -[`parallel`](#parallel). - - -__Arguments__ - -* `tasks` - An array or object containing functions to run. Each function is passed - a `callback(err, result)` which it must call on completion with an error `err` - (which can be `null`) and an optional `result` value. -* `callback(err, results)` - An optional callback to run once all the functions - have completed. This function gets a results array (or object) containing all - the result arguments passed to the task callbacks. - -__Example__ - -```js -async.parallel([ - function(callback){ - setTimeout(function(){ - callback(null, 'one'); - }, 200); - }, - function(callback){ - setTimeout(function(){ - callback(null, 'two'); - }, 100); - } -], -// optional callback -function(err, results){ - // the results array will equal ['one','two'] even though - // the second function had a shorter timeout. -}); - - -// an example using an object instead of an array -async.parallel({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - } -}, -function(err, results) { - // results is now equals to: {one: 1, two: 2} -}); -``` - ---------------------------------------- - - -### parallelLimit(tasks, limit, [callback]) - -The same as [`parallel`](#parallel), only `tasks` are executed in parallel -with a maximum of `limit` tasks executing at any time. - -Note that the `tasks` are not executed in batches, so there is no guarantee that -the first `limit` tasks will complete before any others are started. - -__Arguments__ - -* `tasks` - An array or object containing functions to run, each function is passed - a `callback(err, result)` it must call on completion with an error `err` (which can - be `null`) and an optional `result` value. -* `limit` - The maximum number of `tasks` to run at any time. -* `callback(err, results)` - An optional callback to run once all the functions - have completed. This function gets a results array (or object) containing all - the result arguments passed to the `task` callbacks. - ---------------------------------------- - - -### whilst(test, fn, callback) - -Repeatedly call `fn`, while `test` returns `true`. Calls `callback` when stopped, -or an error occurs. - -__Arguments__ - -* `test()` - synchronous truth test to perform before each execution of `fn`. -* `fn(callback)` - A function which is called each time `test` passes. The function is - passed a `callback(err)`, which must be called once it has completed with an - optional `err` argument. -* `callback(err)` - A callback which is called after the test fails and repeated - execution of `fn` has stopped. - -__Example__ - -```js -var count = 0; - -async.whilst( - function () { return count < 5; }, - function (callback) { - count++; - setTimeout(callback, 1000); - }, - function (err) { - // 5 seconds have passed - } -); -``` - ---------------------------------------- - - -### doWhilst(fn, test, callback) - -The post-check version of [`whilst`](#whilst). To reflect the difference in -the order of operations, the arguments `test` and `fn` are switched. - -`doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. - ---------------------------------------- - - -### until(test, fn, callback) - -Repeatedly call `fn` until `test` returns `true`. Calls `callback` when stopped, -or an error occurs. - -The inverse of [`whilst`](#whilst). - ---------------------------------------- - - -### doUntil(fn, test, callback) - -Like [`doWhilst`](#doWhilst), except the `test` is inverted. Note the argument ordering differs from `until`. - ---------------------------------------- - - -### forever(fn, errback) - -Calls the asynchronous function `fn` with a callback parameter that allows it to -call itself again, in series, indefinitely. - -If an error is passed to the callback then `errback` is called with the -error, and execution stops, otherwise it will never be called. - -```js -async.forever( - function(next) { - // next is suitable for passing to things that need a callback(err [, whatever]); - // it will result in this function being called again. - }, - function(err) { - // if next is called with a value in its first parameter, it will appear - // in here as 'err', and execution will stop. - } -); -``` - ---------------------------------------- - - -### waterfall(tasks, [callback]) - -Runs the `tasks` array of functions in series, each passing their results to the next in -the array. However, if any of the `tasks` pass an error to their own callback, the -next function is not executed, and the main `callback` is immediately called with -the error. - -__Arguments__ - -* `tasks` - An array of functions to run, each function is passed a - `callback(err, result1, result2, ...)` it must call on completion. The first - argument is an error (which can be `null`) and any further arguments will be - passed as arguments in order to the next task. -* `callback(err, [results])` - An optional callback to run once all the functions - have completed. This will be passed the results of the last task's callback. - - - -__Example__ - -```js -async.waterfall([ - function(callback) { - callback(null, 'one', 'two'); - }, - function(arg1, arg2, callback) { - // arg1 now equals 'one' and arg2 now equals 'two' - callback(null, 'three'); - }, - function(arg1, callback) { - // arg1 now equals 'three' - callback(null, 'done'); - } -], function (err, result) { - // result now equals 'done' -}); -``` - ---------------------------------------- - -### compose(fn1, fn2...) - -Creates a function which is a composition of the passed asynchronous -functions. Each function consumes the return value of the function that -follows. Composing functions `f()`, `g()`, and `h()` would produce the result of -`f(g(h()))`, only this version uses callbacks to obtain the return values. - -Each function is executed with the `this` binding of the composed function. - -__Arguments__ - -* `functions...` - the asynchronous functions to compose - - -__Example__ - -```js -function add1(n, callback) { - setTimeout(function () { - callback(null, n + 1); - }, 10); -} - -function mul3(n, callback) { - setTimeout(function () { - callback(null, n * 3); - }, 10); -} - -var add1mul3 = async.compose(mul3, add1); - -add1mul3(4, function (err, result) { - // result now equals 15 -}); -``` - ---------------------------------------- - -### seq(fn1, fn2...) - -Version of the compose function that is more natural to read. -Each function consumes the return value of the previous function. -It is the equivalent of [`compose`](#compose) with the arguments reversed. - -Each function is executed with the `this` binding of the composed function. - -__Arguments__ - -* functions... - the asynchronous functions to compose - - -__Example__ - -```js -// Requires lodash (or underscore), express3 and dresende's orm2. -// Part of an app, that fetches cats of the logged user. -// This example uses `seq` function to avoid overnesting and error -// handling clutter. -app.get('/cats', function(request, response) { - var User = request.models.User; - async.seq( - _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data)) - function(user, fn) { - user.getCats(fn); // 'getCats' has signature (callback(err, data)) - } - )(req.session.user_id, function (err, cats) { - if (err) { - console.error(err); - response.json({ status: 'error', message: err.message }); - } else { - response.json({ status: 'ok', message: 'Cats found', data: cats }); - } - }); -}); -``` - ---------------------------------------- - -### applyEach(fns, args..., callback) - -Applies the provided arguments to each function in the array, calling -`callback` after all functions have completed. If you only provide the first -argument, then it will return a function which lets you pass in the -arguments as if it were a single function call. - -__Arguments__ - -* `fns` - the asynchronous functions to all call with the same arguments -* `args...` - any number of separate arguments to pass to the function -* `callback` - the final argument should be the callback, called when all - functions have completed processing - - -__Example__ - -```js -async.applyEach([enableSearch, updateSchema], 'bucket', callback); - -// partial application example: -async.each( - buckets, - async.applyEach([enableSearch, updateSchema]), - callback -); -``` - ---------------------------------------- - - -### applyEachSeries(arr, iterator, callback) - -The same as [`applyEach`](#applyEach) only the functions are applied in series. - ---------------------------------------- - - -### queue(worker, concurrency) - -Creates a `queue` object with the specified `concurrency`. Tasks added to the -`queue` are processed in parallel (up to the `concurrency` limit). If all -`worker`s are in progress, the task is queued until one becomes available. -Once a `worker` completes a `task`, that `task`'s callback is called. - -__Arguments__ - -* `worker(task, callback)` - An asynchronous function for processing a queued - task, which must call its `callback(err)` argument when finished, with an - optional `error` as an argument. -* `concurrency` - An `integer` for determining how many `worker` functions should be - run in parallel. - -__Queue objects__ - -The `queue` object returned by this function has the following properties and -methods: - -* `length()` - a function returning the number of items waiting to be processed. -* `started` - a function returning whether or not any items have been pushed and processed by the queue -* `running()` - a function returning the number of items currently being processed. -* `idle()` - a function returning false if there are items waiting or being processed, or true if not. -* `concurrency` - an integer for determining how many `worker` functions should be - run in parallel. This property can be changed after a `queue` is created to - alter the concurrency on-the-fly. -* `push(task, [callback])` - add a new task to the `queue`. Calls `callback` once - the `worker` has finished processing the task. Instead of a single task, a `tasks` array - can be submitted. The respective callback is used for every task in the list. -* `unshift(task, [callback])` - add a new task to the front of the `queue`. -* `saturated` - a callback that is called when the `queue` length hits the `concurrency` limit, - and further tasks will be queued. -* `empty` - a callback that is called when the last item from the `queue` is given to a `worker`. -* `drain` - a callback that is called when the last item from the `queue` has returned from the `worker`. -* `paused` - a boolean for determining whether the queue is in a paused state -* `pause()` - a function that pauses the processing of tasks until `resume()` is called. -* `resume()` - a function that resumes the processing of queued tasks when the queue is paused. -* `kill()` - a function that removes the `drain` callback and empties remaining tasks from the queue forcing it to go idle. - -__Example__ - -```js -// create a queue object with concurrency 2 - -var q = async.queue(function (task, callback) { - console.log('hello ' + task.name); - callback(); -}, 2); - - -// assign a callback -q.drain = function() { - console.log('all items have been processed'); -} - -// add some items to the queue - -q.push({name: 'foo'}, function (err) { - console.log('finished processing foo'); -}); -q.push({name: 'bar'}, function (err) { - console.log('finished processing bar'); -}); - -// add some items to the queue (batch-wise) - -q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { - console.log('finished processing item'); -}); - -// add some items to the front of the queue - -q.unshift({name: 'bar'}, function (err) { - console.log('finished processing bar'); -}); -``` - - ---------------------------------------- - - -### priorityQueue(worker, concurrency) - -The same as [`queue`](#queue) only tasks are assigned a priority and completed in ascending priority order. There are two differences between `queue` and `priorityQueue` objects: - -* `push(task, priority, [callback])` - `priority` should be a number. If an array of - `tasks` is given, all tasks will be assigned the same priority. -* The `unshift` method was removed. - ---------------------------------------- - - -### cargo(worker, [payload]) - -Creates a `cargo` object with the specified payload. Tasks added to the -cargo will be processed altogether (up to the `payload` limit). If the -`worker` is in progress, the task is queued until it becomes available. Once -the `worker` has completed some tasks, each callback of those tasks is called. -Check out [this animation](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) for how `cargo` and `queue` work. - -While [queue](#queue) passes only one task to one of a group of workers -at a time, cargo passes an array of tasks to a single worker, repeating -when the worker is finished. - -__Arguments__ - -* `worker(tasks, callback)` - An asynchronous function for processing an array of - queued tasks, which must call its `callback(err)` argument when finished, with - an optional `err` argument. -* `payload` - An optional `integer` for determining how many tasks should be - processed per round; if omitted, the default is unlimited. - -__Cargo objects__ - -The `cargo` object returned by this function has the following properties and -methods: - -* `length()` - A function returning the number of items waiting to be processed. -* `payload` - An `integer` for determining how many tasks should be - process per round. This property can be changed after a `cargo` is created to - alter the payload on-the-fly. -* `push(task, [callback])` - Adds `task` to the `queue`. The callback is called - once the `worker` has finished processing the task. Instead of a single task, an array of `tasks` - can be submitted. The respective callback is used for every task in the list. -* `saturated` - A callback that is called when the `queue.length()` hits the concurrency and further tasks will be queued. -* `empty` - A callback that is called when the last item from the `queue` is given to a `worker`. -* `drain` - A callback that is called when the last item from the `queue` has returned from the `worker`. - -__Example__ - -```js -// create a cargo object with payload 2 - -var cargo = async.cargo(function (tasks, callback) { - for(var i=0; i -### auto(tasks, [callback]) - -Determines the best order for running the functions in `tasks`, based on their -requirements. Each function can optionally depend on other functions being completed -first, and each function is run as soon as its requirements are satisfied. - -If any of the functions pass an error to their callback, it will not -complete (so any other functions depending on it will not run), and the main -`callback` is immediately called with the error. Functions also receive an -object containing the results of functions which have completed so far. - -Note, all functions are called with a `results` object as a second argument, -so it is unsafe to pass functions in the `tasks` object which cannot handle the -extra argument. - -For example, this snippet of code: - -```js -async.auto({ - readData: async.apply(fs.readFile, 'data.txt', 'utf-8') -}, callback); -``` - -will have the effect of calling `readFile` with the results object as the last -argument, which will fail: - -```js -fs.readFile('data.txt', 'utf-8', cb, {}); -``` - -Instead, wrap the call to `readFile` in a function which does not forward the -`results` object: - -```js -async.auto({ - readData: function(cb, results){ - fs.readFile('data.txt', 'utf-8', cb); - } -}, callback); -``` - -__Arguments__ - -* `tasks` - An object. Each of its properties is either a function or an array of - requirements, with the function itself the last item in the array. The object's key - of a property serves as the name of the task defined by that property, - i.e. can be used when specifying requirements for other tasks. - The function receives two arguments: (1) a `callback(err, result)` which must be - called when finished, passing an `error` (which can be `null`) and the result of - the function's execution, and (2) a `results` object, containing the results of - the previously executed functions. -* `callback(err, results)` - An optional callback which is called when all the - tasks have been completed. It receives the `err` argument if any `tasks` - pass an error to their callback. Results are always returned; however, if - an error occurs, no further `tasks` will be performed, and the results - object will only contain partial results. - - -__Example__ - -```js -async.auto({ - get_data: function(callback){ - console.log('in get_data'); - // async code to get some data - callback(null, 'data', 'converted to array'); - }, - make_folder: function(callback){ - console.log('in make_folder'); - // async code to create a directory to store a file in - // this is run at the same time as getting the data - callback(null, 'folder'); - }, - write_file: ['get_data', 'make_folder', function(callback, results){ - console.log('in write_file', JSON.stringify(results)); - // once there is some data and the directory exists, - // write the data to a file in the directory - callback(null, 'filename'); - }], - email_link: ['write_file', function(callback, results){ - console.log('in email_link', JSON.stringify(results)); - // once the file is written let's email a link to it... - // results.write_file contains the filename returned by write_file. - callback(null, {'file':results.write_file, 'email':'user@example.com'}); - }] -}, function(err, results) { - console.log('err = ', err); - console.log('results = ', results); -}); -``` - -This is a fairly trivial example, but to do this using the basic parallel and -series functions would look like this: - -```js -async.parallel([ - function(callback){ - console.log('in get_data'); - // async code to get some data - callback(null, 'data', 'converted to array'); - }, - function(callback){ - console.log('in make_folder'); - // async code to create a directory to store a file in - // this is run at the same time as getting the data - callback(null, 'folder'); - } -], -function(err, results){ - async.series([ - function(callback){ - console.log('in write_file', JSON.stringify(results)); - // once there is some data and the directory exists, - // write the data to a file in the directory - results.push('filename'); - callback(null); - }, - function(callback){ - console.log('in email_link', JSON.stringify(results)); - // once the file is written let's email a link to it... - callback(null, {'file':results.pop(), 'email':'user@example.com'}); - } - ]); -}); -``` - -For a complicated series of `async` tasks, using the [`auto`](#auto) function makes adding -new tasks much easier (and the code more readable). - - ---------------------------------------- - - -### retry([times = 5], task, [callback]) - -Attempts to get a successful response from `task` no more than `times` times before -returning an error. If the task is successful, the `callback` will be passed the result -of the successful task. If all attempts fail, the callback will be passed the error and -result (if any) of the final attempt. - -__Arguments__ - -* `times` - An integer indicating how many times to attempt the `task` before giving up. Defaults to 5. -* `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)` - which must be called when finished, passing `err` (which can be `null`) and the `result` of - the function's execution, and (2) a `results` object, containing the results of - the previously executed functions (if nested inside another control flow). -* `callback(err, results)` - An optional callback which is called when the - task has succeeded, or after the final failed attempt. It receives the `err` and `result` arguments of the last attempt at completing the `task`. - -The [`retry`](#retry) function can be used as a stand-alone control flow by passing a -callback, as shown below: - -```js -async.retry(3, apiMethod, function(err, result) { - // do something with the result -}); -``` - -It can also be embeded within other control flow functions to retry individual methods -that are not as reliable, like this: - -```js -async.auto({ - users: api.getUsers.bind(api), - payments: async.retry(3, api.getPayments.bind(api)) -}, function(err, results) { - // do something with the results -}); -``` - - ---------------------------------------- - - -### iterator(tasks) - -Creates an iterator function which calls the next function in the `tasks` array, -returning a continuation to call the next one after that. It's also possible to -“peek” at the next iterator with `iterator.next()`. - -This function is used internally by the `async` module, but can be useful when -you want to manually control the flow of functions in series. - -__Arguments__ - -* `tasks` - An array of functions to run. - -__Example__ - -```js -var iterator = async.iterator([ - function(){ sys.p('one'); }, - function(){ sys.p('two'); }, - function(){ sys.p('three'); } -]); - -node> var iterator2 = iterator(); -'one' -node> var iterator3 = iterator2(); -'two' -node> iterator3(); -'three' -node> var nextfn = iterator2.next(); -node> nextfn(); -'three' -``` - ---------------------------------------- - - -### apply(function, arguments..) - -Creates a continuation function with some arguments already applied. - -Useful as a shorthand when combined with other control flow functions. Any arguments -passed to the returned function are added to the arguments originally passed -to apply. - -__Arguments__ - -* `function` - The function you want to eventually apply all arguments to. -* `arguments...` - Any number of arguments to automatically apply when the - continuation is called. - -__Example__ - -```js -// using apply - -async.parallel([ - async.apply(fs.writeFile, 'testfile1', 'test1'), - async.apply(fs.writeFile, 'testfile2', 'test2'), -]); - - -// the same process without using apply - -async.parallel([ - function(callback){ - fs.writeFile('testfile1', 'test1', callback); - }, - function(callback){ - fs.writeFile('testfile2', 'test2', callback); - } -]); -``` - -It's possible to pass any number of additional arguments when calling the -continuation: - -```js -node> var fn = async.apply(sys.puts, 'one'); -node> fn('two', 'three'); -one -two -three -``` - ---------------------------------------- - - -### nextTick(callback), setImmediate(callback) - -Calls `callback` on a later loop around the event loop. In Node.js this just -calls `process.nextTick`; in the browser it falls back to `setImmediate(callback)` -if available, otherwise `setTimeout(callback, 0)`, which means other higher priority -events may precede the execution of `callback`. - -This is used internally for browser-compatibility purposes. - -__Arguments__ - -* `callback` - The function to call on a later loop around the event loop. - -__Example__ - -```js -var call_order = []; -async.nextTick(function(){ - call_order.push('two'); - // call_order now equals ['one','two'] -}); -call_order.push('one') -``` - - -### times(n, callback) - -Calls the `callback` function `n` times, and accumulates results in the same manner -you would use with [`map`](#map). - -__Arguments__ - -* `n` - The number of times to run the function. -* `callback` - The function to call `n` times. - -__Example__ - -```js -// Pretend this is some complicated async factory -var createUser = function(id, callback) { - callback(null, { - id: 'user' + id - }) -} -// generate 5 users -async.times(5, function(n, next){ - createUser(n, function(err, user) { - next(err, user) - }) -}, function(err, users) { - // we should now have 5 users -}); -``` - - -### timesSeries(n, callback) - -The same as [`times`](#times), only the iterator is applied to each item in `arr` in -series. The next `iterator` is only called once the current one has completed. -The results array will be in the same order as the original. - - -## Utils - - -### memoize(fn, [hasher]) - -Caches the results of an `async` function. When creating a hash to store function -results against, the callback is omitted from the hash and an optional hash -function can be used. - -The cache of results is exposed as the `memo` property of the function returned -by `memoize`. - -__Arguments__ - -* `fn` - The function to proxy and cache results from. -* `hasher` - Tn optional function for generating a custom hash for storing - results. It has all the arguments applied to it apart from the callback, and - must be synchronous. - -__Example__ - -```js -var slow_fn = function (name, callback) { - // do something - callback(null, result); -}; -var fn = async.memoize(slow_fn); - -// fn can now be used as if it were slow_fn -fn('some name', function () { - // callback -}); -``` - - -### unmemoize(fn) - -Undoes a [`memoize`](#memoize)d function, reverting it to the original, unmemoized -form. Handy for testing. - -__Arguments__ - -* `fn` - the memoized function - - -### log(function, arguments) - -Logs the result of an `async` function to the `console`. Only works in Node.js or -in browsers that support `console.log` and `console.error` (such as FF and Chrome). -If multiple arguments are returned from the async function, `console.log` is -called on each argument in order. - -__Arguments__ - -* `function` - The function you want to eventually apply all arguments to. -* `arguments...` - Any number of arguments to apply to the function. - -__Example__ - -```js -var hello = function(name, callback){ - setTimeout(function(){ - callback(null, 'hello ' + name); - }, 1000); -}; -``` -```js -node> async.log(hello, 'world'); -'hello world' -``` - ---------------------------------------- - - -### dir(function, arguments) - -Logs the result of an `async` function to the `console` using `console.dir` to -display the properties of the resulting object. Only works in Node.js or -in browsers that support `console.dir` and `console.error` (such as FF and Chrome). -If multiple arguments are returned from the async function, `console.dir` is -called on each argument in order. - -__Arguments__ - -* `function` - The function you want to eventually apply all arguments to. -* `arguments...` - Any number of arguments to apply to the function. - -__Example__ - -```js -var hello = function(name, callback){ - setTimeout(function(){ - callback(null, {hello: name}); - }, 1000); -}; -``` -```js -node> async.dir(hello, 'world'); -{hello: 'world'} -``` - ---------------------------------------- - - -### noConflict() - -Changes the value of `async` back to its original value, returning a reference to the -`async` object. diff --git a/cli/node_modules/async/bower.json b/cli/node_modules/async/bower.json deleted file mode 100644 index 18176881e..000000000 --- a/cli/node_modules/async/bower.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "async", - "description": "Higher-order functions and common patterns for asynchronous code", - "version": "0.9.2", - "main": "lib/async.js", - "keywords": [ - "async", - "callback", - "utility", - "module" - ], - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/caolan/async.git" - }, - "devDependencies": { - "nodeunit": ">0.0.0", - "uglify-js": "1.2.x", - "nodelint": ">0.0.0", - "lodash": ">=2.4.1" - }, - "moduleType": [ - "amd", - "globals", - "node" - ], - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ], - "authors": [ - "Caolan McMahon" - ] -} \ No newline at end of file diff --git a/cli/node_modules/async/component.json b/cli/node_modules/async/component.json deleted file mode 100644 index 5003a7c52..000000000 --- a/cli/node_modules/async/component.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "async", - "description": "Higher-order functions and common patterns for asynchronous code", - "version": "0.9.2", - "keywords": [ - "async", - "callback", - "utility", - "module" - ], - "license": "MIT", - "repository": "caolan/async", - "scripts": [ - "lib/async.js" - ] -} \ No newline at end of file diff --git a/cli/node_modules/async/lib/async.js b/cli/node_modules/async/lib/async.js deleted file mode 100644 index 394c41cad..000000000 --- a/cli/node_modules/async/lib/async.js +++ /dev/null @@ -1,1123 +0,0 @@ -/*! - * async - * https://github.com/caolan/async - * - * Copyright 2010-2014 Caolan McMahon - * Released under the MIT license - */ -/*jshint onevar: false, indent:4 */ -/*global setImmediate: false, setTimeout: false, console: false */ -(function () { - - var async = {}; - - // global on the server, window in the browser - var root, previous_async; - - root = this; - if (root != null) { - previous_async = root.async; - } - - async.noConflict = function () { - root.async = previous_async; - return async; - }; - - function only_once(fn) { - var called = false; - return function() { - if (called) throw new Error("Callback was already called."); - called = true; - fn.apply(root, arguments); - } - } - - //// cross-browser compatiblity functions //// - - var _toString = Object.prototype.toString; - - var _isArray = Array.isArray || function (obj) { - return _toString.call(obj) === '[object Array]'; - }; - - var _each = function (arr, iterator) { - for (var i = 0; i < arr.length; i += 1) { - iterator(arr[i], i, arr); - } - }; - - var _map = function (arr, iterator) { - if (arr.map) { - return arr.map(iterator); - } - var results = []; - _each(arr, function (x, i, a) { - results.push(iterator(x, i, a)); - }); - return results; - }; - - var _reduce = function (arr, iterator, memo) { - if (arr.reduce) { - return arr.reduce(iterator, memo); - } - _each(arr, function (x, i, a) { - memo = iterator(memo, x, i, a); - }); - return memo; - }; - - var _keys = function (obj) { - if (Object.keys) { - return Object.keys(obj); - } - var keys = []; - for (var k in obj) { - if (obj.hasOwnProperty(k)) { - keys.push(k); - } - } - return keys; - }; - - //// exported async module functions //// - - //// nextTick implementation with browser-compatible fallback //// - if (typeof process === 'undefined' || !(process.nextTick)) { - if (typeof setImmediate === 'function') { - async.nextTick = function (fn) { - // not a direct alias for IE10 compatibility - setImmediate(fn); - }; - async.setImmediate = async.nextTick; - } - else { - async.nextTick = function (fn) { - setTimeout(fn, 0); - }; - async.setImmediate = async.nextTick; - } - } - else { - async.nextTick = process.nextTick; - if (typeof setImmediate !== 'undefined') { - async.setImmediate = function (fn) { - // not a direct alias for IE10 compatibility - setImmediate(fn); - }; - } - else { - async.setImmediate = async.nextTick; - } - } - - async.each = function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length) { - return callback(); - } - var completed = 0; - _each(arr, function (x) { - iterator(x, only_once(done) ); - }); - function done(err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed >= arr.length) { - callback(); - } - } - } - }; - async.forEach = async.each; - - async.eachSeries = function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length) { - return callback(); - } - var completed = 0; - var iterate = function () { - iterator(arr[completed], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed >= arr.length) { - callback(); - } - else { - iterate(); - } - } - }); - }; - iterate(); - }; - async.forEachSeries = async.eachSeries; - - async.eachLimit = function (arr, limit, iterator, callback) { - var fn = _eachLimit(limit); - fn.apply(null, [arr, iterator, callback]); - }; - async.forEachLimit = async.eachLimit; - - var _eachLimit = function (limit) { - - return function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length || limit <= 0) { - return callback(); - } - var completed = 0; - var started = 0; - var running = 0; - - (function replenish () { - if (completed >= arr.length) { - return callback(); - } - - while (running < limit && started < arr.length) { - started += 1; - running += 1; - iterator(arr[started - 1], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - running -= 1; - if (completed >= arr.length) { - callback(); - } - else { - replenish(); - } - } - }); - } - })(); - }; - }; - - - var doParallel = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.each].concat(args)); - }; - }; - var doParallelLimit = function(limit, fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [_eachLimit(limit)].concat(args)); - }; - }; - var doSeries = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.eachSeries].concat(args)); - }; - }; - - - var _asyncMap = function (eachfn, arr, iterator, callback) { - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - if (!callback) { - eachfn(arr, function (x, callback) { - iterator(x.value, function (err) { - callback(err); - }); - }); - } else { - var results = []; - eachfn(arr, function (x, callback) { - iterator(x.value, function (err, v) { - results[x.index] = v; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - async.map = doParallel(_asyncMap); - async.mapSeries = doSeries(_asyncMap); - async.mapLimit = function (arr, limit, iterator, callback) { - return _mapLimit(limit)(arr, iterator, callback); - }; - - var _mapLimit = function(limit) { - return doParallelLimit(limit, _asyncMap); - }; - - // reduce only has a series version, as doing reduce in parallel won't - // work in many situations. - async.reduce = function (arr, memo, iterator, callback) { - async.eachSeries(arr, function (x, callback) { - iterator(memo, x, function (err, v) { - memo = v; - callback(err); - }); - }, function (err) { - callback(err, memo); - }); - }; - // inject alias - async.inject = async.reduce; - // foldl alias - async.foldl = async.reduce; - - async.reduceRight = function (arr, memo, iterator, callback) { - var reversed = _map(arr, function (x) { - return x; - }).reverse(); - async.reduce(reversed, memo, iterator, callback); - }; - // foldr alias - async.foldr = async.reduceRight; - - var _filter = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.filter = doParallel(_filter); - async.filterSeries = doSeries(_filter); - // select alias - async.select = async.filter; - async.selectSeries = async.filterSeries; - - var _reject = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (!v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.reject = doParallel(_reject); - async.rejectSeries = doSeries(_reject); - - var _detect = function (eachfn, arr, iterator, main_callback) { - eachfn(arr, function (x, callback) { - iterator(x, function (result) { - if (result) { - main_callback(x); - main_callback = function () {}; - } - else { - callback(); - } - }); - }, function (err) { - main_callback(); - }); - }; - async.detect = doParallel(_detect); - async.detectSeries = doSeries(_detect); - - async.some = function (arr, iterator, main_callback) { - async.each(arr, function (x, callback) { - iterator(x, function (v) { - if (v) { - main_callback(true); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(false); - }); - }; - // any alias - async.any = async.some; - - async.every = function (arr, iterator, main_callback) { - async.each(arr, function (x, callback) { - iterator(x, function (v) { - if (!v) { - main_callback(false); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(true); - }); - }; - // all alias - async.all = async.every; - - async.sortBy = function (arr, iterator, callback) { - async.map(arr, function (x, callback) { - iterator(x, function (err, criteria) { - if (err) { - callback(err); - } - else { - callback(null, {value: x, criteria: criteria}); - } - }); - }, function (err, results) { - if (err) { - return callback(err); - } - else { - var fn = function (left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }; - callback(null, _map(results.sort(fn), function (x) { - return x.value; - })); - } - }); - }; - - async.auto = function (tasks, callback) { - callback = callback || function () {}; - var keys = _keys(tasks); - var remainingTasks = keys.length - if (!remainingTasks) { - return callback(); - } - - var results = {}; - - var listeners = []; - var addListener = function (fn) { - listeners.unshift(fn); - }; - var removeListener = function (fn) { - for (var i = 0; i < listeners.length; i += 1) { - if (listeners[i] === fn) { - listeners.splice(i, 1); - return; - } - } - }; - var taskComplete = function () { - remainingTasks-- - _each(listeners.slice(0), function (fn) { - fn(); - }); - }; - - addListener(function () { - if (!remainingTasks) { - var theCallback = callback; - // prevent final callback from calling itself if it errors - callback = function () {}; - - theCallback(null, results); - } - }); - - _each(keys, function (k) { - var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]]; - var taskCallback = function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - if (err) { - var safeResults = {}; - _each(_keys(results), function(rkey) { - safeResults[rkey] = results[rkey]; - }); - safeResults[k] = args; - callback(err, safeResults); - // stop subsequent errors hitting callback multiple times - callback = function () {}; - } - else { - results[k] = args; - async.setImmediate(taskComplete); - } - }; - var requires = task.slice(0, Math.abs(task.length - 1)) || []; - var ready = function () { - return _reduce(requires, function (a, x) { - return (a && results.hasOwnProperty(x)); - }, true) && !results.hasOwnProperty(k); - }; - if (ready()) { - task[task.length - 1](taskCallback, results); - } - else { - var listener = function () { - if (ready()) { - removeListener(listener); - task[task.length - 1](taskCallback, results); - } - }; - addListener(listener); - } - }); - }; - - async.retry = function(times, task, callback) { - var DEFAULT_TIMES = 5; - var attempts = []; - // Use defaults if times not passed - if (typeof times === 'function') { - callback = task; - task = times; - times = DEFAULT_TIMES; - } - // Make sure times is a number - times = parseInt(times, 10) || DEFAULT_TIMES; - var wrappedTask = function(wrappedCallback, wrappedResults) { - var retryAttempt = function(task, finalAttempt) { - return function(seriesCallback) { - task(function(err, result){ - seriesCallback(!err || finalAttempt, {err: err, result: result}); - }, wrappedResults); - }; - }; - while (times) { - attempts.push(retryAttempt(task, !(times-=1))); - } - async.series(attempts, function(done, data){ - data = data[data.length - 1]; - (wrappedCallback || callback)(data.err, data.result); - }); - } - // If a callback is passed, run this as a controll flow - return callback ? wrappedTask() : wrappedTask - }; - - async.waterfall = function (tasks, callback) { - callback = callback || function () {}; - if (!_isArray(tasks)) { - var err = new Error('First argument to waterfall must be an array of functions'); - return callback(err); - } - if (!tasks.length) { - return callback(); - } - var wrapIterator = function (iterator) { - return function (err) { - if (err) { - callback.apply(null, arguments); - callback = function () {}; - } - else { - var args = Array.prototype.slice.call(arguments, 1); - var next = iterator.next(); - if (next) { - args.push(wrapIterator(next)); - } - else { - args.push(callback); - } - async.setImmediate(function () { - iterator.apply(null, args); - }); - } - }; - }; - wrapIterator(async.iterator(tasks))(); - }; - - var _parallel = function(eachfn, tasks, callback) { - callback = callback || function () {}; - if (_isArray(tasks)) { - eachfn.map(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - eachfn.each(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.parallel = function (tasks, callback) { - _parallel({ map: async.map, each: async.each }, tasks, callback); - }; - - async.parallelLimit = function(tasks, limit, callback) { - _parallel({ map: _mapLimit(limit), each: _eachLimit(limit) }, tasks, callback); - }; - - async.series = function (tasks, callback) { - callback = callback || function () {}; - if (_isArray(tasks)) { - async.mapSeries(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - async.eachSeries(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.iterator = function (tasks) { - var makeCallback = function (index) { - var fn = function () { - if (tasks.length) { - tasks[index].apply(null, arguments); - } - return fn.next(); - }; - fn.next = function () { - return (index < tasks.length - 1) ? makeCallback(index + 1): null; - }; - return fn; - }; - return makeCallback(0); - }; - - async.apply = function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - return function () { - return fn.apply( - null, args.concat(Array.prototype.slice.call(arguments)) - ); - }; - }; - - var _concat = function (eachfn, arr, fn, callback) { - var r = []; - eachfn(arr, function (x, cb) { - fn(x, function (err, y) { - r = r.concat(y || []); - cb(err); - }); - }, function (err) { - callback(err, r); - }); - }; - async.concat = doParallel(_concat); - async.concatSeries = doSeries(_concat); - - async.whilst = function (test, iterator, callback) { - if (test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.whilst(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.doWhilst = function (iterator, test, callback) { - iterator(function (err) { - if (err) { - return callback(err); - } - var args = Array.prototype.slice.call(arguments, 1); - if (test.apply(null, args)) { - async.doWhilst(iterator, test, callback); - } - else { - callback(); - } - }); - }; - - async.until = function (test, iterator, callback) { - if (!test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.until(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.doUntil = function (iterator, test, callback) { - iterator(function (err) { - if (err) { - return callback(err); - } - var args = Array.prototype.slice.call(arguments, 1); - if (!test.apply(null, args)) { - async.doUntil(iterator, test, callback); - } - else { - callback(); - } - }); - }; - - async.queue = function (worker, concurrency) { - if (concurrency === undefined) { - concurrency = 1; - } - function _insert(q, data, pos, callback) { - if (!q.started){ - q.started = true; - } - if (!_isArray(data)) { - data = [data]; - } - if(data.length == 0) { - // call drain immediately if there are no tasks - return async.setImmediate(function() { - if (q.drain) { - q.drain(); - } - }); - } - _each(data, function(task) { - var item = { - data: task, - callback: typeof callback === 'function' ? callback : null - }; - - if (pos) { - q.tasks.unshift(item); - } else { - q.tasks.push(item); - } - - if (q.saturated && q.tasks.length === q.concurrency) { - q.saturated(); - } - async.setImmediate(q.process); - }); - } - - var workers = 0; - var q = { - tasks: [], - concurrency: concurrency, - saturated: null, - empty: null, - drain: null, - started: false, - paused: false, - push: function (data, callback) { - _insert(q, data, false, callback); - }, - kill: function () { - q.drain = null; - q.tasks = []; - }, - unshift: function (data, callback) { - _insert(q, data, true, callback); - }, - process: function () { - if (!q.paused && workers < q.concurrency && q.tasks.length) { - var task = q.tasks.shift(); - if (q.empty && q.tasks.length === 0) { - q.empty(); - } - workers += 1; - var next = function () { - workers -= 1; - if (task.callback) { - task.callback.apply(task, arguments); - } - if (q.drain && q.tasks.length + workers === 0) { - q.drain(); - } - q.process(); - }; - var cb = only_once(next); - worker(task.data, cb); - } - }, - length: function () { - return q.tasks.length; - }, - running: function () { - return workers; - }, - idle: function() { - return q.tasks.length + workers === 0; - }, - pause: function () { - if (q.paused === true) { return; } - q.paused = true; - }, - resume: function () { - if (q.paused === false) { return; } - q.paused = false; - // Need to call q.process once per concurrent - // worker to preserve full concurrency after pause - for (var w = 1; w <= q.concurrency; w++) { - async.setImmediate(q.process); - } - } - }; - return q; - }; - - async.priorityQueue = function (worker, concurrency) { - - function _compareTasks(a, b){ - return a.priority - b.priority; - }; - - function _binarySearch(sequence, item, compare) { - var beg = -1, - end = sequence.length - 1; - while (beg < end) { - var mid = beg + ((end - beg + 1) >>> 1); - if (compare(item, sequence[mid]) >= 0) { - beg = mid; - } else { - end = mid - 1; - } - } - return beg; - } - - function _insert(q, data, priority, callback) { - if (!q.started){ - q.started = true; - } - if (!_isArray(data)) { - data = [data]; - } - if(data.length == 0) { - // call drain immediately if there are no tasks - return async.setImmediate(function() { - if (q.drain) { - q.drain(); - } - }); - } - _each(data, function(task) { - var item = { - data: task, - priority: priority, - callback: typeof callback === 'function' ? callback : null - }; - - q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item); - - if (q.saturated && q.tasks.length === q.concurrency) { - q.saturated(); - } - async.setImmediate(q.process); - }); - } - - // Start with a normal queue - var q = async.queue(worker, concurrency); - - // Override push to accept second parameter representing priority - q.push = function (data, priority, callback) { - _insert(q, data, priority, callback); - }; - - // Remove unshift function - delete q.unshift; - - return q; - }; - - async.cargo = function (worker, payload) { - var working = false, - tasks = []; - - var cargo = { - tasks: tasks, - payload: payload, - saturated: null, - empty: null, - drain: null, - drained: true, - push: function (data, callback) { - if (!_isArray(data)) { - data = [data]; - } - _each(data, function(task) { - tasks.push({ - data: task, - callback: typeof callback === 'function' ? callback : null - }); - cargo.drained = false; - if (cargo.saturated && tasks.length === payload) { - cargo.saturated(); - } - }); - async.setImmediate(cargo.process); - }, - process: function process() { - if (working) return; - if (tasks.length === 0) { - if(cargo.drain && !cargo.drained) cargo.drain(); - cargo.drained = true; - return; - } - - var ts = typeof payload === 'number' - ? tasks.splice(0, payload) - : tasks.splice(0, tasks.length); - - var ds = _map(ts, function (task) { - return task.data; - }); - - if(cargo.empty) cargo.empty(); - working = true; - worker(ds, function () { - working = false; - - var args = arguments; - _each(ts, function (data) { - if (data.callback) { - data.callback.apply(null, args); - } - }); - - process(); - }); - }, - length: function () { - return tasks.length; - }, - running: function () { - return working; - } - }; - return cargo; - }; - - var _console_fn = function (name) { - return function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - fn.apply(null, args.concat([function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (typeof console !== 'undefined') { - if (err) { - if (console.error) { - console.error(err); - } - } - else if (console[name]) { - _each(args, function (x) { - console[name](x); - }); - } - } - }])); - }; - }; - async.log = _console_fn('log'); - async.dir = _console_fn('dir'); - /*async.info = _console_fn('info'); - async.warn = _console_fn('warn'); - async.error = _console_fn('error');*/ - - async.memoize = function (fn, hasher) { - var memo = {}; - var queues = {}; - hasher = hasher || function (x) { - return x; - }; - var memoized = function () { - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - var key = hasher.apply(null, args); - if (key in memo) { - async.nextTick(function () { - callback.apply(null, memo[key]); - }); - } - else if (key in queues) { - queues[key].push(callback); - } - else { - queues[key] = [callback]; - fn.apply(null, args.concat([function () { - memo[key] = arguments; - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i].apply(null, arguments); - } - }])); - } - }; - memoized.memo = memo; - memoized.unmemoized = fn; - return memoized; - }; - - async.unmemoize = function (fn) { - return function () { - return (fn.unmemoized || fn).apply(null, arguments); - }; - }; - - async.times = function (count, iterator, callback) { - var counter = []; - for (var i = 0; i < count; i++) { - counter.push(i); - } - return async.map(counter, iterator, callback); - }; - - async.timesSeries = function (count, iterator, callback) { - var counter = []; - for (var i = 0; i < count; i++) { - counter.push(i); - } - return async.mapSeries(counter, iterator, callback); - }; - - async.seq = function (/* functions... */) { - var fns = arguments; - return function () { - var that = this; - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - async.reduce(fns, args, function (newargs, fn, cb) { - fn.apply(that, newargs.concat([function () { - var err = arguments[0]; - var nextargs = Array.prototype.slice.call(arguments, 1); - cb(err, nextargs); - }])) - }, - function (err, results) { - callback.apply(that, [err].concat(results)); - }); - }; - }; - - async.compose = function (/* functions... */) { - return async.seq.apply(null, Array.prototype.reverse.call(arguments)); - }; - - var _applyEach = function (eachfn, fns /*args...*/) { - var go = function () { - var that = this; - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - return eachfn(fns, function (fn, cb) { - fn.apply(that, args.concat([cb])); - }, - callback); - }; - if (arguments.length > 2) { - var args = Array.prototype.slice.call(arguments, 2); - return go.apply(this, args); - } - else { - return go; - } - }; - async.applyEach = doParallel(_applyEach); - async.applyEachSeries = doSeries(_applyEach); - - async.forever = function (fn, callback) { - function next(err) { - if (err) { - if (callback) { - return callback(err); - } - throw err; - } - fn(next); - } - next(); - }; - - // Node.js - if (typeof module !== 'undefined' && module.exports) { - module.exports = async; - } - // AMD / RequireJS - else if (typeof define !== 'undefined' && define.amd) { - define([], function () { - return async; - }); - } - // included directly via - -The AWS SDK is also compatible with [browserify](http://browserify.org). - -### In Node.js - -The preferred way to install the AWS SDK for Node.js is to use the -[npm](http://npmjs.org) package manager for Node.js. Simply type the following -into a terminal window: - -```sh -npm install aws-sdk -``` - -### Using Bower - -You can also use [Bower](http://bower.io) to install the SDK by typing the -following into a terminal window: - -```sh -bower install aws-sdk-js -``` - -## Usage and Getting Started - -You can find a getting started guide at: - -http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/ - -## Supported Services - -

Note: -Although all services are supported in the browser version of the SDK, -not all of the services are available in the default hosted build (using the -script tag provided above). A list of services in the hosted build are provided -in the "Working With Services" -section of the browser SDK guide, including instructions on how to build a -custom version of the SDK with extra services. -

- -The SDK currently supports the following services: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Service NameClass NameAPI Version
Amazon CloudFrontAWS.CloudFront2014-10-21
Amazon CloudSearchAWS.CloudSearch2013-01-01
Amazon CloudSearch DomainAWS.CloudSearchDomain2013-01-01
Amazon CloudWatchAWS.CloudWatch2010-08-01
Amazon CloudWatch LogsAWS.CloudWatchLogs2014-03-28
Amazon Cognito IdentityAWS.CognitoIdentity2014-06-30
Amazon Cognito SyncAWS.CognitoSync2014-06-30
Amazon DynamoDBAWS.DynamoDB2012-08-10
Amazon Elastic Compute CloudAWS.EC22014-10-01
Amazon Elastic MapReduceAWS.EMR2009-03-31
Amazon Elastic TranscoderAWS.ElasticTranscoder2012-09-25
Amazon ElastiCacheAWS.ElastiCache2014-09-30
Amazon GlacierAWS.Glacier2012-06-01
Amazon KinesisAWS.Kinesis2013-12-02
Amazon RedshiftAWS.Redshift2012-12-01
Amazon Relational Database ServiceAWS.RDS2014-09-01
Amazon Route 53AWS.Route532013-04-01
Amazon Route 53 DomainsAWS.Route53Domains2014-05-15
Amazon Simple Email ServiceAWS.SES2010-12-01
Amazon Simple Notification ServiceAWS.SNS2010-03-31
Amazon Simple Queue ServiceAWS.SQS2012-11-05
Amazon Simple Storage ServiceAWS.S32006-03-01
Amazon Simple Workflow ServiceAWS.SWF2012-01-25
Amazon SimpleDBAWS.SimpleDB2009-04-15
Auto ScalingAWS.AutoScaling2011-01-01
AWS CloudFormationAWS.CloudFormation2010-05-15
AWS CloudTrailAWS.CloudTrail2013-11-01
AWS CodeDeployAWS.CodeDeploy2014-10-06
AWS ConfigAWS.ConfigService2014-11-12
AWS Data PipelineAWS.DataPipeline2012-10-29
AWS Direct ConnectAWS.DirectConnect2012-10-25
AWS Elastic BeanstalkAWS.ElasticBeanstalk2010-12-01
AWS Identity and Access ManagementAWS.IAM2010-05-08
AWS Import/ExportAWS.ImportExport2010-06-01
AWS Key Management ServiceAWS.KMS2014-11-01
AWS LambdaAWS.Lambda2014-11-11
AWS OpsWorksAWS.OpsWorks2013-02-18
AWS Security Token ServiceAWS.STS2011-06-15
AWS Storage GatewayAWS.StorageGateway2013-06-30
AWS SupportAWS.Support2013-04-15
Elastic Load BalancingAWS.ELB2012-06-01
- -## License - -This SDK is distributed under the -[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), -see LICENSE.txt and NOTICE.txt for more information. diff --git a/cli/node_modules/aws-sdk/UPGRADING.md b/cli/node_modules/aws-sdk/UPGRADING.md deleted file mode 100644 index f67fd9149..000000000 --- a/cli/node_modules/aws-sdk/UPGRADING.md +++ /dev/null @@ -1,157 +0,0 @@ -# @!title Upgrading Notes (1.x to 2.0) - -# Upgrading Notes (1.x to 2.0) - -This document captures breaking changes from 1.x versions to the first -stable 2.x (non-RC) release of the AWS SDK for JavaScript. - -## 1. Automatic Conversion of Base64 and Timestamp Types on Input/Output - -The SDK will now automatically encode and decode base64-encoded values, as well -as timestamp values, on the user's behalf. This change affects any operation -where Base64 or Timestamp values were sent by a request or returned in a -response, i.e., `AWS.DynamoDB` and `AWS.SQS`, which allow for Base64 -encoded values. - -User code that previously did base64 conversion no longer requires this. -Furthermore, values encoded as base64 are now returned as Buffer objects -from server responses (and can also be passed as Buffer input). For -example, the following 1.x `SQS.sendMessage()` parameters: - -```javascript -var params = { - MessageBody: 'Some Message', - MessageAttributes: { - attrName: { - DataType: 'Binary', - BinaryValue: new Buffer('example text').toString('base64') - } - } -}; -``` - -Can be rewritten as: - -```javascript -var params = { - MessageBody: 'Some Message', - MessageAttributes: { - attrName: { - DataType: 'Binary', - BinaryValue: 'example text' - } - } -}; -``` - -And the message will be read as: - -```javascript -sqs.receiveMessage(params, function(err, data) { - // buf is - var buf = data.Messages[0].MessageAttributes.attrName.BinaryValue; - console.log(buf.toString()); // "example text" -}); -``` - -## 2. Moved response.data.RequestId to response.requestId - -The SDK now stores request IDs for all services in a consistent place on the -response object, rather than inside the response.data property. This is to -improve consistency across services that expose request IDs in different ways. -Note that this is also a breaking change that renames the -`response.data.RequestId` property to `response.requestId` -(or `this.requestId` inside of a callback). - -To migrate your code, change: - -```javascript -svc.operation(params, function (err, data) { - console.log('Request ID:', data.RequestId); -}); -``` - -To the following: - -```javascript -svc.operation(params, function () { - console.log('Request ID:', this.requestId); -}); -``` - -## 3. Exposed Wrapper Elements - -If you use {AWS.ElastiCache}, {AWS.RDS}, or {AWS.Redshift}, you must now access -the response through the top-level output property in the response for certain -operations. This change corrects the SDK to behave according to documentation -output, which was previously listing this wrapper element. - -Example: - -`RDS.describeEngineDefaultParameters()` used to return: - -```javascript -{ Parameters: [ ... ] } -``` - -This operation now returns: - -```javascript -{ EngineDefaults: { Parameters: [ ... ] } } -``` - -The full list of affected operations for each service are: - -**AWS.ElastiCache**: authorizeCacheSecurityGroupIngress, createCacheCluster, -createCacheParameterGroup, createCacheSecurityGroup, createCacheSubnetGroup, -createReplicationGroup, deleteCacheCluster, deleteReplicationGroup, -describeEngineDefaultParameters, modifyCacheCluster, modifyCacheSubnetGroup, -modifyReplicationGroup, purchaseReservedCacheNodesOffering, rebootCacheCluster, -revokeCacheSecurityGroupIngress - -**AWS.RDS**: addSourceIdentifierToSubscription, authorizeDBSecurityGroupIngress, -copyDBSnapshot, createDBInstance, createDBInstanceReadReplica, -createDBParameterGroup, createDBSecurityGroup, createDBSnapshot, -createDBSubnetGroup, createEventSubscription, createOptionGroup, -deleteDBInstance, deleteDBSnapshot, deleteEventSubscription, -describeEngineDefaultParameters, modifyDBInstance, modifyDBSubnetGroup, -modifyEventSubscription, modifyOptionGroup, promoteReadReplica, -purchaseReservedDBInstancesOffering, rebootDBInstance, -removeSourceIdentifierFromSubscription, restoreDBInstanceFromDBSnapshot, -restoreDBInstanceToPointInTime, revokeDBSecurityGroupIngress - -**AWS.Redshift**: authorizeClusterSecurityGroupIngress, authorizeSnapshotAccess, -copyClusterSnapshot, createCluster, createClusterParameterGroup, -createClusterSecurityGroup, createClusterSnapshot, createClusterSubnetGroup, -createEventSubscription, createHsmClientCertificate, createHsmConfiguration, -deleteCluster, deleteClusterSnapshot, describeDefaultClusterParameters, -disableSnapshotCopy, enableSnapshotCopy, modifyCluster, -modifyClusterSubnetGroup, modifyEventSubscription, -modifySnapshotCopyRetentionPeriod, purchaseReservedNodeOffering, rebootCluster, -restoreFromClusterSnapshot, revokeClusterSecurityGroupIngress, -revokeSnapshotAccess, rotateEncryptionKey - -## 4. Dropped `.Client` and `.client` Properties - -The `.Client` and `.client` properties have been removed from Service objects. -If you are using the `.Client` property on a Service class or a `.client` -property on an instance of the service, remove these properties from your code. - -Upgrading example: - -The following 1.x code: - -``` -var sts = new AWS.STS.Client(); -// or -var sts = new AWS.STS(); - -sts.client.operation(...); -``` - -Should be changed to the following: - -``` -var sts = new AWS.STS(); -sts.operation(...) -``` diff --git a/cli/node_modules/aws-sdk/apis/autoscaling-2011-01-01.min.json b/cli/node_modules/aws-sdk/apis/autoscaling-2011-01-01.min.json deleted file mode 100644 index 6a8964220..000000000 --- a/cli/node_modules/aws-sdk/apis/autoscaling-2011-01-01.min.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2011-01-01", - "endpointPrefix": "autoscaling", - "serviceFullName": "Auto Scaling", - "signatureVersion": "v4", - "xmlNamespace": "http://autoscaling.amazonaws.com/doc/2011-01-01/", - "protocol": "query" - }, - "operations": { - "AttachInstances": { - "input": { - "type": "structure", - "required": [ - "AutoScalingGroupName" - ], - "members": { - "InstanceIds": { - "shape": "S2" - }, - "AutoScalingGroupName": {} - } - } - }, - "AttachLoadBalancers": { - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": {}, - "LoadBalancerNames": { - "shape": "S6" - } - } - }, - "output": { - "resultWrapper": "AttachLoadBalancersResult", - "type": "structure", - "members": {} - } - }, - "CompleteLifecycleAction": { - "input": { - "type": "structure", - "required": [ - "LifecycleHookName", - "AutoScalingGroupName", - "LifecycleActionToken", - "LifecycleActionResult" - ], - "members": { - "LifecycleHookName": {}, - "AutoScalingGroupName": {}, - "LifecycleActionToken": {}, - "LifecycleActionResult": {} - } - }, - "output": { - "resultWrapper": "CompleteLifecycleActionResult", - "type": "structure", - "members": {} - } - }, - "CreateAutoScalingGroup": { - "input": { - "type": "structure", - "required": [ - "AutoScalingGroupName", - "MinSize", - "MaxSize" - ], - "members": { - "AutoScalingGroupName": {}, - "LaunchConfigurationName": {}, - "InstanceId": {}, - "MinSize": { - "type": "integer" - }, - "MaxSize": { - "type": "integer" - }, - "DesiredCapacity": { - "type": "integer" - }, - "DefaultCooldown": { - "type": "integer" - }, - "AvailabilityZones": { - "shape": "Sj" - }, - "LoadBalancerNames": { - "shape": "S6" - }, - "HealthCheckType": {}, - "HealthCheckGracePeriod": { - "type": "integer" - }, - "PlacementGroup": {}, - "VPCZoneIdentifier": {}, - "TerminationPolicies": { - "shape": "Sm" - }, - "Tags": { - "shape": "So" - } - } - } - }, - "CreateLaunchConfiguration": { - "input": { - "type": "structure", - "required": [ - "LaunchConfigurationName" - ], - "members": { - "LaunchConfigurationName": {}, - "ImageId": {}, - "KeyName": {}, - "SecurityGroups": { - "shape": "Sv" - }, - "ClassicLinkVPCId": {}, - "ClassicLinkVPCSecurityGroups": { - "shape": "Sw" - }, - "UserData": {}, - "InstanceId": {}, - "InstanceType": {}, - "KernelId": {}, - "RamdiskId": {}, - "BlockDeviceMappings": { - "shape": "Sy" - }, - "InstanceMonitoring": { - "shape": "S16" - }, - "SpotPrice": {}, - "IamInstanceProfile": {}, - "EbsOptimized": { - "type": "boolean" - }, - "AssociatePublicIpAddress": { - "type": "boolean" - }, - "PlacementTenancy": {} - } - } - }, - "CreateOrUpdateTags": { - "input": { - "type": "structure", - "required": [ - "Tags" - ], - "members": { - "Tags": { - "shape": "So" - } - } - } - }, - "DeleteAutoScalingGroup": { - "input": { - "type": "structure", - "required": [ - "AutoScalingGroupName" - ], - "members": { - "AutoScalingGroupName": {}, - "ForceDelete": { - "type": "boolean" - } - } - } - }, - "DeleteLaunchConfiguration": { - "input": { - "type": "structure", - "required": [ - "LaunchConfigurationName" - ], - "members": { - "LaunchConfigurationName": {} - } - } - }, - "DeleteLifecycleHook": { - "input": { - "type": "structure", - "required": [ - "LifecycleHookName", - "AutoScalingGroupName" - ], - "members": { - "LifecycleHookName": {}, - "AutoScalingGroupName": {} - } - }, - "output": { - "resultWrapper": "DeleteLifecycleHookResult", - "type": "structure", - "members": {} - } - }, - "DeleteNotificationConfiguration": { - "input": { - "type": "structure", - "required": [ - "AutoScalingGroupName", - "TopicARN" - ], - "members": { - "AutoScalingGroupName": {}, - "TopicARN": {} - } - } - }, - "DeletePolicy": { - "input": { - "type": "structure", - "required": [ - "PolicyName" - ], - "members": { - "AutoScalingGroupName": {}, - "PolicyName": {} - } - } - }, - "DeleteScheduledAction": { - "input": { - "type": "structure", - "required": [ - "ScheduledActionName" - ], - "members": { - "AutoScalingGroupName": {}, - "ScheduledActionName": {} - } - } - }, - "DeleteTags": { - "input": { - "type": "structure", - "required": [ - "Tags" - ], - "members": { - "Tags": { - "shape": "So" - } - } - } - }, - "DescribeAccountLimits": { - "output": { - "resultWrapper": "DescribeAccountLimitsResult", - "type": "structure", - "members": { - "MaxNumberOfAutoScalingGroups": { - "type": "integer" - }, - "MaxNumberOfLaunchConfigurations": { - "type": "integer" - } - } - } - }, - "DescribeAdjustmentTypes": { - "output": { - "resultWrapper": "DescribeAdjustmentTypesResult", - "type": "structure", - "members": { - "AdjustmentTypes": { - "type": "list", - "member": { - "type": "structure", - "members": { - "AdjustmentType": {} - } - } - } - } - } - }, - "DescribeAutoScalingGroups": { - "input": { - "type": "structure", - "members": { - "AutoScalingGroupNames": { - "shape": "S1t" - }, - "NextToken": {}, - "MaxRecords": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "DescribeAutoScalingGroupsResult", - "type": "structure", - "required": [ - "AutoScalingGroups" - ], - "members": { - "AutoScalingGroups": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "AutoScalingGroupName", - "LaunchConfigurationName", - "MinSize", - "MaxSize", - "DesiredCapacity", - "DefaultCooldown", - "AvailabilityZones", - "HealthCheckType", - "CreatedTime" - ], - "members": { - "AutoScalingGroupName": {}, - "AutoScalingGroupARN": {}, - "LaunchConfigurationName": {}, - "MinSize": { - "type": "integer" - }, - "MaxSize": { - "type": "integer" - }, - "DesiredCapacity": { - "type": "integer" - }, - "DefaultCooldown": { - "type": "integer" - }, - "AvailabilityZones": { - "shape": "Sj" - }, - "LoadBalancerNames": { - "shape": "S6" - }, - "HealthCheckType": {}, - "HealthCheckGracePeriod": { - "type": "integer" - }, - "Instances": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "InstanceId", - "AvailabilityZone", - "LifecycleState", - "HealthStatus", - "LaunchConfigurationName" - ], - "members": { - "InstanceId": {}, - "AvailabilityZone": {}, - "LifecycleState": {}, - "HealthStatus": {}, - "LaunchConfigurationName": {} - } - } - }, - "CreatedTime": { - "type": "timestamp" - }, - "SuspendedProcesses": { - "type": "list", - "member": { - "type": "structure", - "members": { - "ProcessName": {}, - "SuspensionReason": {} - } - } - }, - "PlacementGroup": {}, - "VPCZoneIdentifier": {}, - "EnabledMetrics": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Metric": {}, - "Granularity": {} - } - } - }, - "Status": {}, - "Tags": { - "shape": "S26" - }, - "TerminationPolicies": { - "shape": "Sm" - } - } - } - }, - "NextToken": {} - } - } - }, - "DescribeAutoScalingInstances": { - "input": { - "type": "structure", - "members": { - "InstanceIds": { - "shape": "S2" - }, - "MaxRecords": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "resultWrapper": "DescribeAutoScalingInstancesResult", - "type": "structure", - "members": { - "AutoScalingInstances": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "InstanceId", - "AutoScalingGroupName", - "AvailabilityZone", - "LifecycleState", - "HealthStatus", - "LaunchConfigurationName" - ], - "members": { - "InstanceId": {}, - "AutoScalingGroupName": {}, - "AvailabilityZone": {}, - "LifecycleState": {}, - "HealthStatus": {}, - "LaunchConfigurationName": {} - } - } - }, - "NextToken": {} - } - } - }, - "DescribeAutoScalingNotificationTypes": { - "output": { - "resultWrapper": "DescribeAutoScalingNotificationTypesResult", - "type": "structure", - "members": { - "AutoScalingNotificationTypes": { - "shape": "S2d" - } - } - } - }, - "DescribeLaunchConfigurations": { - "input": { - "type": "structure", - "members": { - "LaunchConfigurationNames": { - "type": "list", - "member": {} - }, - "NextToken": {}, - "MaxRecords": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "DescribeLaunchConfigurationsResult", - "type": "structure", - "required": [ - "LaunchConfigurations" - ], - "members": { - "LaunchConfigurations": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "LaunchConfigurationName", - "ImageId", - "InstanceType", - "CreatedTime" - ], - "members": { - "LaunchConfigurationName": {}, - "LaunchConfigurationARN": {}, - "ImageId": {}, - "KeyName": {}, - "SecurityGroups": { - "shape": "Sv" - }, - "ClassicLinkVPCId": {}, - "ClassicLinkVPCSecurityGroups": { - "shape": "Sw" - }, - "UserData": {}, - "InstanceType": {}, - "KernelId": {}, - "RamdiskId": {}, - "BlockDeviceMappings": { - "shape": "Sy" - }, - "InstanceMonitoring": { - "shape": "S16" - }, - "SpotPrice": {}, - "IamInstanceProfile": {}, - "CreatedTime": { - "type": "timestamp" - }, - "EbsOptimized": { - "type": "boolean" - }, - "AssociatePublicIpAddress": { - "type": "boolean" - }, - "PlacementTenancy": {} - } - } - }, - "NextToken": {} - } - } - }, - "DescribeLifecycleHookTypes": { - "output": { - "resultWrapper": "DescribeLifecycleHookTypesResult", - "type": "structure", - "members": { - "LifecycleHookTypes": { - "shape": "S2d" - } - } - } - }, - "DescribeLifecycleHooks": { - "input": { - "type": "structure", - "required": [ - "AutoScalingGroupName" - ], - "members": { - "AutoScalingGroupName": {}, - "LifecycleHookNames": { - "type": "list", - "member": {} - } - } - }, - "output": { - "resultWrapper": "DescribeLifecycleHooksResult", - "type": "structure", - "members": { - "LifecycleHooks": { - "type": "list", - "member": { - "type": "structure", - "members": { - "LifecycleHookName": {}, - "AutoScalingGroupName": {}, - "LifecycleTransition": {}, - "NotificationTargetARN": {}, - "RoleARN": {}, - "NotificationMetadata": {}, - "HeartbeatTimeout": { - "type": "integer" - }, - "GlobalTimeout": { - "type": "integer" - }, - "DefaultResult": {} - } - } - } - } - } - }, - "DescribeLoadBalancers": { - "input": { - "type": "structure", - "required": [ - "AutoScalingGroupName" - ], - "members": { - "AutoScalingGroupName": {}, - "NextToken": {}, - "MaxRecords": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "DescribeLoadBalancersResult", - "type": "structure", - "members": { - "LoadBalancers": { - "type": "list", - "member": { - "type": "structure", - "members": { - "LoadBalancerName": {}, - "State": {} - } - } - }, - "NextToken": {} - } - } - }, - "DescribeMetricCollectionTypes": { - "output": { - "resultWrapper": "DescribeMetricCollectionTypesResult", - "type": "structure", - "members": { - "Metrics": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Metric": {} - } - } - }, - "Granularities": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Granularity": {} - } - } - } - } - } - }, - "DescribeNotificationConfigurations": { - "input": { - "type": "structure", - "members": { - "AutoScalingGroupNames": { - "shape": "S1t" - }, - "NextToken": {}, - "MaxRecords": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "DescribeNotificationConfigurationsResult", - "type": "structure", - "required": [ - "NotificationConfigurations" - ], - "members": { - "NotificationConfigurations": { - "type": "list", - "member": { - "type": "structure", - "members": { - "AutoScalingGroupName": {}, - "TopicARN": {}, - "NotificationType": {} - } - } - }, - "NextToken": {} - } - } - }, - "DescribePolicies": { - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": {}, - "PolicyNames": { - "type": "list", - "member": {} - }, - "PolicyTypes": { - "type": "list", - "member": {} - }, - "NextToken": {}, - "MaxRecords": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "DescribePoliciesResult", - "type": "structure", - "members": { - "ScalingPolicies": { - "type": "list", - "member": { - "type": "structure", - "members": { - "AutoScalingGroupName": {}, - "PolicyName": {}, - "PolicyARN": {}, - "PolicyType": {}, - "AdjustmentType": {}, - "MinAdjustmentStep": { - "shape": "S3c" - }, - "MinAdjustmentMagnitude": { - "type": "integer" - }, - "ScalingAdjustment": { - "type": "integer" - }, - "Cooldown": { - "type": "integer" - }, - "StepAdjustments": { - "shape": "S3f" - }, - "MetricAggregationType": {}, - "EstimatedInstanceWarmup": { - "type": "integer" - }, - "Alarms": { - "type": "list", - "member": { - "type": "structure", - "members": { - "AlarmName": {}, - "AlarmARN": {} - } - } - } - } - } - }, - "NextToken": {} - } - } - }, - "DescribeScalingActivities": { - "input": { - "type": "structure", - "members": { - "ActivityIds": { - "type": "list", - "member": {} - }, - "AutoScalingGroupName": {}, - "MaxRecords": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "resultWrapper": "DescribeScalingActivitiesResult", - "type": "structure", - "required": [ - "Activities" - ], - "members": { - "Activities": { - "shape": "S3o" - }, - "NextToken": {} - } - } - }, - "DescribeScalingProcessTypes": { - "output": { - "resultWrapper": "DescribeScalingProcessTypesResult", - "type": "structure", - "members": { - "Processes": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "ProcessName" - ], - "members": { - "ProcessName": {} - } - } - } - } - } - }, - "DescribeScheduledActions": { - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": {}, - "ScheduledActionNames": { - "type": "list", - "member": {} - }, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "NextToken": {}, - "MaxRecords": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "DescribeScheduledActionsResult", - "type": "structure", - "members": { - "ScheduledUpdateGroupActions": { - "type": "list", - "member": { - "type": "structure", - "members": { - "AutoScalingGroupName": {}, - "ScheduledActionName": {}, - "ScheduledActionARN": {}, - "Time": { - "type": "timestamp" - }, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "Recurrence": {}, - "MinSize": { - "type": "integer" - }, - "MaxSize": { - "type": "integer" - }, - "DesiredCapacity": { - "type": "integer" - } - } - } - }, - "NextToken": {} - } - } - }, - "DescribeTags": { - "input": { - "type": "structure", - "members": { - "Filters": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "member": {} - } - } - } - }, - "NextToken": {}, - "MaxRecords": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "DescribeTagsResult", - "type": "structure", - "members": { - "Tags": { - "shape": "S26" - }, - "NextToken": {} - } - } - }, - "DescribeTerminationPolicyTypes": { - "output": { - "resultWrapper": "DescribeTerminationPolicyTypesResult", - "type": "structure", - "members": { - "TerminationPolicyTypes": { - "shape": "Sm" - } - } - } - }, - "DetachInstances": { - "input": { - "type": "structure", - "required": [ - "AutoScalingGroupName", - "ShouldDecrementDesiredCapacity" - ], - "members": { - "InstanceIds": { - "shape": "S2" - }, - "AutoScalingGroupName": {}, - "ShouldDecrementDesiredCapacity": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "DetachInstancesResult", - "type": "structure", - "members": { - "Activities": { - "shape": "S3o" - } - } - } - }, - "DetachLoadBalancers": { - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": {}, - "LoadBalancerNames": { - "shape": "S6" - } - } - }, - "output": { - "resultWrapper": "DetachLoadBalancersResult", - "type": "structure", - "members": {} - } - }, - "DisableMetricsCollection": { - "input": { - "type": "structure", - "required": [ - "AutoScalingGroupName" - ], - "members": { - "AutoScalingGroupName": {}, - "Metrics": { - "shape": "S4c" - } - } - } - }, - "EnableMetricsCollection": { - "input": { - "type": "structure", - "required": [ - "AutoScalingGroupName", - "Granularity" - ], - "members": { - "AutoScalingGroupName": {}, - "Metrics": { - "shape": "S4c" - }, - "Granularity": {} - } - } - }, - "EnterStandby": { - "input": { - "type": "structure", - "required": [ - "AutoScalingGroupName", - "ShouldDecrementDesiredCapacity" - ], - "members": { - "InstanceIds": { - "shape": "S2" - }, - "AutoScalingGroupName": {}, - "ShouldDecrementDesiredCapacity": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "EnterStandbyResult", - "type": "structure", - "members": { - "Activities": { - "shape": "S3o" - } - } - } - }, - "ExecutePolicy": { - "input": { - "type": "structure", - "required": [ - "PolicyName" - ], - "members": { - "AutoScalingGroupName": {}, - "PolicyName": {}, - "HonorCooldown": { - "type": "boolean" - }, - "MetricValue": { - "type": "double" - }, - "BreachThreshold": { - "type": "double" - } - } - } - }, - "ExitStandby": { - "input": { - "type": "structure", - "required": [ - "AutoScalingGroupName" - ], - "members": { - "InstanceIds": { - "shape": "S2" - }, - "AutoScalingGroupName": {} - } - }, - "output": { - "resultWrapper": "ExitStandbyResult", - "type": "structure", - "members": { - "Activities": { - "shape": "S3o" - } - } - } - }, - "PutLifecycleHook": { - "input": { - "type": "structure", - "required": [ - "LifecycleHookName", - "AutoScalingGroupName" - ], - "members": { - "LifecycleHookName": {}, - "AutoScalingGroupName": {}, - "LifecycleTransition": {}, - "RoleARN": {}, - "NotificationTargetARN": {}, - "NotificationMetadata": {}, - "HeartbeatTimeout": { - "type": "integer" - }, - "DefaultResult": {} - } - }, - "output": { - "resultWrapper": "PutLifecycleHookResult", - "type": "structure", - "members": {} - } - }, - "PutNotificationConfiguration": { - "input": { - "type": "structure", - "required": [ - "AutoScalingGroupName", - "TopicARN", - "NotificationTypes" - ], - "members": { - "AutoScalingGroupName": {}, - "TopicARN": {}, - "NotificationTypes": { - "shape": "S2d" - } - } - } - }, - "PutScalingPolicy": { - "input": { - "type": "structure", - "required": [ - "AutoScalingGroupName", - "PolicyName", - "AdjustmentType" - ], - "members": { - "AutoScalingGroupName": {}, - "PolicyName": {}, - "PolicyType": {}, - "AdjustmentType": {}, - "MinAdjustmentStep": { - "shape": "S3c" - }, - "MinAdjustmentMagnitude": { - "type": "integer" - }, - "ScalingAdjustment": { - "type": "integer" - }, - "Cooldown": { - "type": "integer" - }, - "MetricAggregationType": {}, - "StepAdjustments": { - "shape": "S3f" - }, - "EstimatedInstanceWarmup": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "PutScalingPolicyResult", - "type": "structure", - "members": { - "PolicyARN": {} - } - } - }, - "PutScheduledUpdateGroupAction": { - "input": { - "type": "structure", - "required": [ - "AutoScalingGroupName", - "ScheduledActionName" - ], - "members": { - "AutoScalingGroupName": {}, - "ScheduledActionName": {}, - "Time": { - "type": "timestamp" - }, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "Recurrence": {}, - "MinSize": { - "type": "integer" - }, - "MaxSize": { - "type": "integer" - }, - "DesiredCapacity": { - "type": "integer" - } - } - } - }, - "RecordLifecycleActionHeartbeat": { - "input": { - "type": "structure", - "required": [ - "LifecycleHookName", - "AutoScalingGroupName", - "LifecycleActionToken" - ], - "members": { - "LifecycleHookName": {}, - "AutoScalingGroupName": {}, - "LifecycleActionToken": {} - } - }, - "output": { - "resultWrapper": "RecordLifecycleActionHeartbeatResult", - "type": "structure", - "members": {} - } - }, - "ResumeProcesses": { - "input": { - "shape": "S4s" - } - }, - "SetDesiredCapacity": { - "input": { - "type": "structure", - "required": [ - "AutoScalingGroupName", - "DesiredCapacity" - ], - "members": { - "AutoScalingGroupName": {}, - "DesiredCapacity": { - "type": "integer" - }, - "HonorCooldown": { - "type": "boolean" - } - } - } - }, - "SetInstanceHealth": { - "input": { - "type": "structure", - "required": [ - "InstanceId", - "HealthStatus" - ], - "members": { - "InstanceId": {}, - "HealthStatus": {}, - "ShouldRespectGracePeriod": { - "type": "boolean" - } - } - } - }, - "SuspendProcesses": { - "input": { - "shape": "S4s" - } - }, - "TerminateInstanceInAutoScalingGroup": { - "input": { - "type": "structure", - "required": [ - "InstanceId", - "ShouldDecrementDesiredCapacity" - ], - "members": { - "InstanceId": {}, - "ShouldDecrementDesiredCapacity": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "TerminateInstanceInAutoScalingGroupResult", - "type": "structure", - "members": { - "Activity": { - "shape": "S3p" - } - } - } - }, - "UpdateAutoScalingGroup": { - "input": { - "type": "structure", - "required": [ - "AutoScalingGroupName" - ], - "members": { - "AutoScalingGroupName": {}, - "LaunchConfigurationName": {}, - "MinSize": { - "type": "integer" - }, - "MaxSize": { - "type": "integer" - }, - "DesiredCapacity": { - "type": "integer" - }, - "DefaultCooldown": { - "type": "integer" - }, - "AvailabilityZones": { - "shape": "Sj" - }, - "HealthCheckType": {}, - "HealthCheckGracePeriod": { - "type": "integer" - }, - "PlacementGroup": {}, - "VPCZoneIdentifier": {}, - "TerminationPolicies": { - "shape": "Sm" - } - } - } - } - }, - "shapes": { - "S2": { - "type": "list", - "member": {} - }, - "S6": { - "type": "list", - "member": {} - }, - "Sj": { - "type": "list", - "member": {} - }, - "Sm": { - "type": "list", - "member": {} - }, - "So": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "Key" - ], - "members": { - "ResourceId": {}, - "ResourceType": {}, - "Key": {}, - "Value": {}, - "PropagateAtLaunch": { - "type": "boolean" - } - } - } - }, - "Sv": { - "type": "list", - "member": {} - }, - "Sw": { - "type": "list", - "member": {} - }, - "Sy": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "DeviceName" - ], - "members": { - "VirtualName": {}, - "DeviceName": {}, - "Ebs": { - "type": "structure", - "members": { - "SnapshotId": {}, - "VolumeSize": { - "type": "integer" - }, - "VolumeType": {}, - "DeleteOnTermination": { - "type": "boolean" - }, - "Iops": { - "type": "integer" - } - } - }, - "NoDevice": { - "type": "boolean" - } - } - } - }, - "S16": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - } - } - }, - "S1t": { - "type": "list", - "member": {} - }, - "S26": { - "type": "list", - "member": { - "type": "structure", - "members": { - "ResourceId": {}, - "ResourceType": {}, - "Key": {}, - "Value": {}, - "PropagateAtLaunch": { - "type": "boolean" - } - } - } - }, - "S2d": { - "type": "list", - "member": {} - }, - "S3c": { - "type": "integer", - "deprecated": true - }, - "S3f": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "ScalingAdjustment" - ], - "members": { - "MetricIntervalLowerBound": { - "type": "double" - }, - "MetricIntervalUpperBound": { - "type": "double" - }, - "ScalingAdjustment": { - "type": "integer" - } - } - } - }, - "S3o": { - "type": "list", - "member": { - "shape": "S3p" - } - }, - "S3p": { - "type": "structure", - "required": [ - "ActivityId", - "AutoScalingGroupName", - "Cause", - "StartTime", - "StatusCode" - ], - "members": { - "ActivityId": {}, - "AutoScalingGroupName": {}, - "Description": {}, - "Cause": {}, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "StatusCode": {}, - "StatusMessage": {}, - "Progress": { - "type": "integer" - }, - "Details": {} - } - }, - "S4c": { - "type": "list", - "member": {} - }, - "S4s": { - "type": "structure", - "required": [ - "AutoScalingGroupName" - ], - "members": { - "AutoScalingGroupName": {}, - "ScalingProcesses": { - "type": "list", - "member": {} - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/autoscaling-2011-01-01.paginators.json b/cli/node_modules/aws-sdk/apis/autoscaling-2011-01-01.paginators.json deleted file mode 100644 index 31bc09445..000000000 --- a/cli/node_modules/aws-sdk/apis/autoscaling-2011-01-01.paginators.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "pagination": { - "DescribeAutoScalingGroups": { - "input_token": "NextToken", - "output_token": "NextToken", - "limit_key": "MaxRecords", - "result_key": "AutoScalingGroups" - }, - "DescribeAutoScalingInstances": { - "input_token": "NextToken", - "output_token": "NextToken", - "limit_key": "MaxRecords", - "result_key": "AutoScalingInstances" - }, - "DescribeLaunchConfigurations": { - "input_token": "NextToken", - "output_token": "NextToken", - "limit_key": "MaxRecords", - "result_key": "LaunchConfigurations" - }, - "DescribeNotificationConfigurations": { - "input_token": "NextToken", - "output_token": "NextToken", - "limit_key": "MaxRecords", - "result_key": "NotificationConfigurations" - }, - "DescribePolicies": { - "input_token": "NextToken", - "output_token": "NextToken", - "limit_key": "MaxRecords", - "result_key": "ScalingPolicies" - }, - "DescribeScalingActivities": { - "input_token": "NextToken", - "output_token": "NextToken", - "limit_key": "MaxRecords", - "result_key": "Activities" - }, - "DescribeScheduledActions": { - "input_token": "NextToken", - "output_token": "NextToken", - "limit_key": "MaxRecords", - "result_key": "ScheduledUpdateGroupActions" - }, - "DescribeTags": { - "input_token": "NextToken", - "output_token": "NextToken", - "limit_key": "MaxRecords", - "result_key": "Tags" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/cloudformation-2010-05-15.min.json b/cli/node_modules/aws-sdk/apis/cloudformation-2010-05-15.min.json deleted file mode 100644 index da136bcd2..000000000 --- a/cli/node_modules/aws-sdk/apis/cloudformation-2010-05-15.min.json +++ /dev/null @@ -1,592 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2010-05-15", - "endpointPrefix": "cloudformation", - "serviceFullName": "AWS CloudFormation", - "signatureVersion": "v4", - "xmlNamespace": "http://cloudformation.amazonaws.com/doc/2010-05-15/", - "protocol": "query" - }, - "operations": { - "CancelUpdateStack": { - "input": { - "type": "structure", - "required": [ - "StackName" - ], - "members": { - "StackName": {} - } - } - }, - "CreateStack": { - "input": { - "type": "structure", - "required": [ - "StackName" - ], - "members": { - "StackName": {}, - "TemplateBody": {}, - "TemplateURL": {}, - "Parameters": { - "shape": "S6" - }, - "DisableRollback": { - "type": "boolean" - }, - "TimeoutInMinutes": { - "type": "integer" - }, - "NotificationARNs": { - "shape": "Sd" - }, - "Capabilities": { - "shape": "Sf" - }, - "OnFailure": {}, - "StackPolicyBody": {}, - "StackPolicyURL": {}, - "Tags": { - "shape": "Sk" - } - } - }, - "output": { - "resultWrapper": "CreateStackResult", - "type": "structure", - "members": { - "StackId": {} - } - } - }, - "DeleteStack": { - "input": { - "type": "structure", - "required": [ - "StackName" - ], - "members": { - "StackName": {} - } - } - }, - "DescribeStackEvents": { - "input": { - "type": "structure", - "members": { - "StackName": {}, - "NextToken": {} - } - }, - "output": { - "resultWrapper": "DescribeStackEventsResult", - "type": "structure", - "members": { - "StackEvents": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "StackId", - "EventId", - "StackName", - "Timestamp" - ], - "members": { - "StackId": {}, - "EventId": {}, - "StackName": {}, - "LogicalResourceId": {}, - "PhysicalResourceId": {}, - "ResourceType": {}, - "Timestamp": { - "type": "timestamp" - }, - "ResourceStatus": {}, - "ResourceStatusReason": {}, - "ResourceProperties": {} - } - } - }, - "NextToken": {} - } - } - }, - "DescribeStackResource": { - "input": { - "type": "structure", - "required": [ - "StackName", - "LogicalResourceId" - ], - "members": { - "StackName": {}, - "LogicalResourceId": {} - } - }, - "output": { - "resultWrapper": "DescribeStackResourceResult", - "type": "structure", - "members": { - "StackResourceDetail": { - "type": "structure", - "required": [ - "LogicalResourceId", - "ResourceType", - "LastUpdatedTimestamp", - "ResourceStatus" - ], - "members": { - "StackName": {}, - "StackId": {}, - "LogicalResourceId": {}, - "PhysicalResourceId": {}, - "ResourceType": {}, - "LastUpdatedTimestamp": { - "type": "timestamp" - }, - "ResourceStatus": {}, - "ResourceStatusReason": {}, - "Description": {}, - "Metadata": {} - } - } - } - } - }, - "DescribeStackResources": { - "input": { - "type": "structure", - "members": { - "StackName": {}, - "LogicalResourceId": {}, - "PhysicalResourceId": {} - } - }, - "output": { - "resultWrapper": "DescribeStackResourcesResult", - "type": "structure", - "members": { - "StackResources": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "LogicalResourceId", - "ResourceType", - "Timestamp", - "ResourceStatus" - ], - "members": { - "StackName": {}, - "StackId": {}, - "LogicalResourceId": {}, - "PhysicalResourceId": {}, - "ResourceType": {}, - "Timestamp": { - "type": "timestamp" - }, - "ResourceStatus": {}, - "ResourceStatusReason": {}, - "Description": {} - } - } - } - } - } - }, - "DescribeStacks": { - "input": { - "type": "structure", - "members": { - "StackName": {}, - "NextToken": {} - } - }, - "output": { - "resultWrapper": "DescribeStacksResult", - "type": "structure", - "members": { - "Stacks": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "StackName", - "CreationTime", - "StackStatus" - ], - "members": { - "StackId": {}, - "StackName": {}, - "Description": {}, - "Parameters": { - "shape": "S6" - }, - "CreationTime": { - "type": "timestamp" - }, - "LastUpdatedTime": { - "type": "timestamp" - }, - "StackStatus": {}, - "StackStatusReason": {}, - "DisableRollback": { - "type": "boolean" - }, - "NotificationARNs": { - "shape": "Sd" - }, - "TimeoutInMinutes": { - "type": "integer" - }, - "Capabilities": { - "shape": "Sf" - }, - "Outputs": { - "type": "list", - "member": { - "type": "structure", - "members": { - "OutputKey": {}, - "OutputValue": {}, - "Description": {} - } - } - }, - "Tags": { - "shape": "Sk" - } - } - } - }, - "NextToken": {} - } - } - }, - "EstimateTemplateCost": { - "input": { - "type": "structure", - "members": { - "TemplateBody": {}, - "TemplateURL": {}, - "Parameters": { - "shape": "S6" - } - } - }, - "output": { - "resultWrapper": "EstimateTemplateCostResult", - "type": "structure", - "members": { - "Url": {} - } - } - }, - "GetStackPolicy": { - "input": { - "type": "structure", - "required": [ - "StackName" - ], - "members": { - "StackName": {} - } - }, - "output": { - "resultWrapper": "GetStackPolicyResult", - "type": "structure", - "members": { - "StackPolicyBody": {} - } - } - }, - "GetTemplate": { - "input": { - "type": "structure", - "required": [ - "StackName" - ], - "members": { - "StackName": {} - } - }, - "output": { - "resultWrapper": "GetTemplateResult", - "type": "structure", - "members": { - "TemplateBody": {} - } - } - }, - "GetTemplateSummary": { - "input": { - "type": "structure", - "members": { - "TemplateBody": {}, - "TemplateURL": {}, - "StackName": {} - } - }, - "output": { - "resultWrapper": "GetTemplateSummaryResult", - "type": "structure", - "members": { - "Parameters": { - "type": "list", - "member": { - "type": "structure", - "members": { - "ParameterKey": {}, - "DefaultValue": {}, - "ParameterType": {}, - "NoEcho": { - "type": "boolean" - }, - "Description": {}, - "ParameterConstraints": { - "type": "structure", - "members": { - "AllowedValues": { - "type": "list", - "member": {} - } - } - } - } - } - }, - "Description": {}, - "Capabilities": { - "shape": "Sf" - }, - "CapabilitiesReason": {}, - "Version": {}, - "Metadata": {} - } - } - }, - "ListStackResources": { - "input": { - "type": "structure", - "required": [ - "StackName" - ], - "members": { - "StackName": {}, - "NextToken": {} - } - }, - "output": { - "resultWrapper": "ListStackResourcesResult", - "type": "structure", - "members": { - "StackResourceSummaries": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "LogicalResourceId", - "ResourceType", - "LastUpdatedTimestamp", - "ResourceStatus" - ], - "members": { - "LogicalResourceId": {}, - "PhysicalResourceId": {}, - "ResourceType": {}, - "LastUpdatedTimestamp": { - "type": "timestamp" - }, - "ResourceStatus": {}, - "ResourceStatusReason": {} - } - } - }, - "NextToken": {} - } - } - }, - "ListStacks": { - "input": { - "type": "structure", - "members": { - "NextToken": {}, - "StackStatusFilter": { - "type": "list", - "member": {} - } - } - }, - "output": { - "resultWrapper": "ListStacksResult", - "type": "structure", - "members": { - "StackSummaries": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "StackName", - "CreationTime", - "StackStatus" - ], - "members": { - "StackId": {}, - "StackName": {}, - "TemplateDescription": {}, - "CreationTime": { - "type": "timestamp" - }, - "LastUpdatedTime": { - "type": "timestamp" - }, - "DeletionTime": { - "type": "timestamp" - }, - "StackStatus": {}, - "StackStatusReason": {} - } - } - }, - "NextToken": {} - } - } - }, - "SetStackPolicy": { - "input": { - "type": "structure", - "required": [ - "StackName" - ], - "members": { - "StackName": {}, - "StackPolicyBody": {}, - "StackPolicyURL": {} - } - } - }, - "SignalResource": { - "input": { - "type": "structure", - "required": [ - "StackName", - "LogicalResourceId", - "UniqueId", - "Status" - ], - "members": { - "StackName": {}, - "LogicalResourceId": {}, - "UniqueId": {}, - "Status": {} - } - } - }, - "UpdateStack": { - "input": { - "type": "structure", - "required": [ - "StackName" - ], - "members": { - "StackName": {}, - "TemplateBody": {}, - "TemplateURL": {}, - "UsePreviousTemplate": { - "type": "boolean" - }, - "StackPolicyDuringUpdateBody": {}, - "StackPolicyDuringUpdateURL": {}, - "Parameters": { - "shape": "S6" - }, - "Capabilities": { - "shape": "Sf" - }, - "StackPolicyBody": {}, - "StackPolicyURL": {}, - "NotificationARNs": { - "shape": "Sd" - } - } - }, - "output": { - "resultWrapper": "UpdateStackResult", - "type": "structure", - "members": { - "StackId": {} - } - } - }, - "ValidateTemplate": { - "input": { - "type": "structure", - "members": { - "TemplateBody": {}, - "TemplateURL": {} - } - }, - "output": { - "resultWrapper": "ValidateTemplateResult", - "type": "structure", - "members": { - "Parameters": { - "type": "list", - "member": { - "type": "structure", - "members": { - "ParameterKey": {}, - "DefaultValue": {}, - "NoEcho": { - "type": "boolean" - }, - "Description": {} - } - } - }, - "Description": {}, - "Capabilities": { - "shape": "Sf" - }, - "CapabilitiesReason": {} - } - } - } - }, - "shapes": { - "S6": { - "type": "list", - "member": { - "type": "structure", - "members": { - "ParameterKey": {}, - "ParameterValue": {}, - "UsePreviousValue": { - "type": "boolean" - } - } - } - }, - "Sd": { - "type": "list", - "member": {} - }, - "Sf": { - "type": "list", - "member": {} - }, - "Sk": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/cloudformation-2010-05-15.paginators.json b/cli/node_modules/aws-sdk/apis/cloudformation-2010-05-15.paginators.json deleted file mode 100644 index da6c17d42..000000000 --- a/cli/node_modules/aws-sdk/apis/cloudformation-2010-05-15.paginators.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "pagination": { - "DescribeStackEvents": { - "input_token": "NextToken", - "output_token": "NextToken", - "result_key": "StackEvents" - }, - "DescribeStackResources": { - "result_key": "StackResources" - }, - "DescribeStacks": { - "input_token": "NextToken", - "output_token": "NextToken", - "result_key": "Stacks" - }, - "ListStackResources": { - "input_token": "NextToken", - "output_token": "NextToken", - "result_key": "StackResourceSummaries" - }, - "ListStacks": { - "input_token": "NextToken", - "output_token": "NextToken", - "result_key": "StackSummaries" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/cloudfront-2015-04-17.min.json b/cli/node_modules/aws-sdk/apis/cloudfront-2015-04-17.min.json deleted file mode 100644 index f3beda017..000000000 --- a/cli/node_modules/aws-sdk/apis/cloudfront-2015-04-17.min.json +++ /dev/null @@ -1,1537 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2015-04-17", - "endpointPrefix": "cloudfront", - "globalEndpoint": "cloudfront.amazonaws.com", - "serviceAbbreviation": "CloudFront", - "serviceFullName": "Amazon CloudFront", - "signatureVersion": "v4", - "protocol": "rest-xml" - }, - "operations": { - "CreateCloudFrontOriginAccessIdentity": { - "http": { - "requestUri": "/2015-04-17/origin-access-identity/cloudfront", - "responseCode": 201 - }, - "input": { - "type": "structure", - "required": [ - "CloudFrontOriginAccessIdentityConfig" - ], - "members": { - "CloudFrontOriginAccessIdentityConfig": { - "shape": "S2", - "xmlNamespace": { - "uri": "http://cloudfront.amazonaws.com/doc/2015-04-17/" - }, - "locationName": "CloudFrontOriginAccessIdentityConfig" - } - }, - "payload": "CloudFrontOriginAccessIdentityConfig" - }, - "output": { - "type": "structure", - "members": { - "CloudFrontOriginAccessIdentity": { - "shape": "S5" - }, - "Location": { - "location": "header", - "locationName": "Location" - }, - "ETag": { - "location": "header", - "locationName": "ETag" - } - }, - "payload": "CloudFrontOriginAccessIdentity" - } - }, - "CreateDistribution": { - "http": { - "requestUri": "/2015-04-17/distribution", - "responseCode": 201 - }, - "input": { - "type": "structure", - "required": [ - "DistributionConfig" - ], - "members": { - "DistributionConfig": { - "shape": "S7", - "xmlNamespace": { - "uri": "http://cloudfront.amazonaws.com/doc/2015-04-17/" - }, - "locationName": "DistributionConfig" - } - }, - "payload": "DistributionConfig" - }, - "output": { - "type": "structure", - "members": { - "Distribution": { - "shape": "S1e" - }, - "Location": { - "location": "header", - "locationName": "Location" - }, - "ETag": { - "location": "header", - "locationName": "ETag" - } - }, - "payload": "Distribution" - } - }, - "CreateInvalidation": { - "http": { - "requestUri": "/2015-04-17/distribution/{DistributionId}/invalidation", - "responseCode": 201 - }, - "input": { - "type": "structure", - "required": [ - "DistributionId", - "InvalidationBatch" - ], - "members": { - "DistributionId": { - "location": "uri", - "locationName": "DistributionId" - }, - "InvalidationBatch": { - "shape": "S1m", - "xmlNamespace": { - "uri": "http://cloudfront.amazonaws.com/doc/2015-04-17/" - }, - "locationName": "InvalidationBatch" - } - }, - "payload": "InvalidationBatch" - }, - "output": { - "type": "structure", - "members": { - "Location": { - "location": "header", - "locationName": "Location" - }, - "Invalidation": { - "shape": "S1q" - } - }, - "payload": "Invalidation" - } - }, - "CreateStreamingDistribution": { - "http": { - "requestUri": "/2015-04-17/streaming-distribution", - "responseCode": 201 - }, - "input": { - "type": "structure", - "required": [ - "StreamingDistributionConfig" - ], - "members": { - "StreamingDistributionConfig": { - "shape": "S1s", - "xmlNamespace": { - "uri": "http://cloudfront.amazonaws.com/doc/2015-04-17/" - }, - "locationName": "StreamingDistributionConfig" - } - }, - "payload": "StreamingDistributionConfig" - }, - "output": { - "type": "structure", - "members": { - "StreamingDistribution": { - "shape": "S1w" - }, - "Location": { - "location": "header", - "locationName": "Location" - }, - "ETag": { - "location": "header", - "locationName": "ETag" - } - }, - "payload": "StreamingDistribution" - } - }, - "DeleteCloudFrontOriginAccessIdentity": { - "http": { - "method": "DELETE", - "requestUri": "/2015-04-17/origin-access-identity/cloudfront/{Id}", - "responseCode": 204 - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - }, - "IfMatch": { - "location": "header", - "locationName": "If-Match" - } - }, - "required": [ - "Id" - ] - } - }, - "DeleteDistribution": { - "http": { - "method": "DELETE", - "requestUri": "/2015-04-17/distribution/{Id}", - "responseCode": 204 - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - }, - "IfMatch": { - "location": "header", - "locationName": "If-Match" - } - }, - "required": [ - "Id" - ] - } - }, - "DeleteStreamingDistribution": { - "http": { - "method": "DELETE", - "requestUri": "/2015-04-17/streaming-distribution/{Id}", - "responseCode": 204 - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - }, - "IfMatch": { - "location": "header", - "locationName": "If-Match" - } - }, - "required": [ - "Id" - ] - } - }, - "GetCloudFrontOriginAccessIdentity": { - "http": { - "method": "GET", - "requestUri": "/2015-04-17/origin-access-identity/cloudfront/{Id}" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - } - }, - "required": [ - "Id" - ] - }, - "output": { - "type": "structure", - "members": { - "CloudFrontOriginAccessIdentity": { - "shape": "S5" - }, - "ETag": { - "location": "header", - "locationName": "ETag" - } - }, - "payload": "CloudFrontOriginAccessIdentity" - } - }, - "GetCloudFrontOriginAccessIdentityConfig": { - "http": { - "method": "GET", - "requestUri": "/2015-04-17/origin-access-identity/cloudfront/{Id}/config" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - } - }, - "required": [ - "Id" - ] - }, - "output": { - "type": "structure", - "members": { - "CloudFrontOriginAccessIdentityConfig": { - "shape": "S2" - }, - "ETag": { - "location": "header", - "locationName": "ETag" - } - }, - "payload": "CloudFrontOriginAccessIdentityConfig" - } - }, - "GetDistribution": { - "http": { - "method": "GET", - "requestUri": "/2015-04-17/distribution/{Id}" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - } - }, - "required": [ - "Id" - ] - }, - "output": { - "type": "structure", - "members": { - "Distribution": { - "shape": "S1e" - }, - "ETag": { - "location": "header", - "locationName": "ETag" - } - }, - "payload": "Distribution" - } - }, - "GetDistributionConfig": { - "http": { - "method": "GET", - "requestUri": "/2015-04-17/distribution/{Id}/config" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - } - }, - "required": [ - "Id" - ] - }, - "output": { - "type": "structure", - "members": { - "DistributionConfig": { - "shape": "S7" - }, - "ETag": { - "location": "header", - "locationName": "ETag" - } - }, - "payload": "DistributionConfig" - } - }, - "GetInvalidation": { - "http": { - "method": "GET", - "requestUri": "/2015-04-17/distribution/{DistributionId}/invalidation/{Id}" - }, - "input": { - "type": "structure", - "required": [ - "DistributionId", - "Id" - ], - "members": { - "DistributionId": { - "location": "uri", - "locationName": "DistributionId" - }, - "Id": { - "location": "uri", - "locationName": "Id" - } - } - }, - "output": { - "type": "structure", - "members": { - "Invalidation": { - "shape": "S1q" - } - }, - "payload": "Invalidation" - } - }, - "GetStreamingDistribution": { - "http": { - "method": "GET", - "requestUri": "/2015-04-17/streaming-distribution/{Id}" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - } - }, - "required": [ - "Id" - ] - }, - "output": { - "type": "structure", - "members": { - "StreamingDistribution": { - "shape": "S1w" - }, - "ETag": { - "location": "header", - "locationName": "ETag" - } - }, - "payload": "StreamingDistribution" - } - }, - "GetStreamingDistributionConfig": { - "http": { - "method": "GET", - "requestUri": "/2015-04-17/streaming-distribution/{Id}/config" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - } - }, - "required": [ - "Id" - ] - }, - "output": { - "type": "structure", - "members": { - "StreamingDistributionConfig": { - "shape": "S1s" - }, - "ETag": { - "location": "header", - "locationName": "ETag" - } - }, - "payload": "StreamingDistributionConfig" - } - }, - "ListCloudFrontOriginAccessIdentities": { - "http": { - "method": "GET", - "requestUri": "/2015-04-17/origin-access-identity/cloudfront" - }, - "input": { - "type": "structure", - "members": { - "Marker": { - "location": "querystring", - "locationName": "Marker" - }, - "MaxItems": { - "location": "querystring", - "locationName": "MaxItems" - } - } - }, - "output": { - "type": "structure", - "members": { - "CloudFrontOriginAccessIdentityList": { - "type": "structure", - "required": [ - "Marker", - "MaxItems", - "IsTruncated", - "Quantity" - ], - "members": { - "Marker": {}, - "NextMarker": {}, - "MaxItems": { - "type": "integer" - }, - "IsTruncated": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "member": { - "locationName": "CloudFrontOriginAccessIdentitySummary", - "type": "structure", - "required": [ - "Id", - "S3CanonicalUserId", - "Comment" - ], - "members": { - "Id": {}, - "S3CanonicalUserId": {}, - "Comment": {} - } - } - } - } - } - }, - "payload": "CloudFrontOriginAccessIdentityList" - } - }, - "ListDistributions": { - "http": { - "method": "GET", - "requestUri": "/2015-04-17/distribution" - }, - "input": { - "type": "structure", - "members": { - "Marker": { - "location": "querystring", - "locationName": "Marker" - }, - "MaxItems": { - "location": "querystring", - "locationName": "MaxItems" - } - } - }, - "output": { - "type": "structure", - "members": { - "DistributionList": { - "type": "structure", - "required": [ - "Marker", - "MaxItems", - "IsTruncated", - "Quantity" - ], - "members": { - "Marker": {}, - "NextMarker": {}, - "MaxItems": { - "type": "integer" - }, - "IsTruncated": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "member": { - "locationName": "DistributionSummary", - "type": "structure", - "required": [ - "Id", - "Status", - "LastModifiedTime", - "DomainName", - "Aliases", - "Origins", - "DefaultCacheBehavior", - "CacheBehaviors", - "CustomErrorResponses", - "Comment", - "PriceClass", - "Enabled", - "ViewerCertificate", - "Restrictions" - ], - "members": { - "Id": {}, - "Status": {}, - "LastModifiedTime": { - "type": "timestamp" - }, - "DomainName": {}, - "Aliases": { - "shape": "S8" - }, - "Origins": { - "shape": "Sb" - }, - "DefaultCacheBehavior": { - "shape": "Sh" - }, - "CacheBehaviors": { - "shape": "Sy" - }, - "CustomErrorResponses": { - "shape": "S11" - }, - "Comment": {}, - "PriceClass": {}, - "Enabled": { - "type": "boolean" - }, - "ViewerCertificate": { - "shape": "S16" - }, - "Restrictions": { - "shape": "S19" - } - } - } - } - } - } - }, - "payload": "DistributionList" - } - }, - "ListInvalidations": { - "http": { - "method": "GET", - "requestUri": "/2015-04-17/distribution/{DistributionId}/invalidation" - }, - "input": { - "type": "structure", - "required": [ - "DistributionId" - ], - "members": { - "DistributionId": { - "location": "uri", - "locationName": "DistributionId" - }, - "Marker": { - "location": "querystring", - "locationName": "Marker" - }, - "MaxItems": { - "location": "querystring", - "locationName": "MaxItems" - } - } - }, - "output": { - "type": "structure", - "members": { - "InvalidationList": { - "type": "structure", - "required": [ - "Marker", - "MaxItems", - "IsTruncated", - "Quantity" - ], - "members": { - "Marker": {}, - "NextMarker": {}, - "MaxItems": { - "type": "integer" - }, - "IsTruncated": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "member": { - "locationName": "InvalidationSummary", - "type": "structure", - "required": [ - "Id", - "CreateTime", - "Status" - ], - "members": { - "Id": {}, - "CreateTime": { - "type": "timestamp" - }, - "Status": {} - } - } - } - } - } - }, - "payload": "InvalidationList" - } - }, - "ListStreamingDistributions": { - "http": { - "method": "GET", - "requestUri": "/2015-04-17/streaming-distribution" - }, - "input": { - "type": "structure", - "members": { - "Marker": { - "location": "querystring", - "locationName": "Marker" - }, - "MaxItems": { - "location": "querystring", - "locationName": "MaxItems" - } - } - }, - "output": { - "type": "structure", - "members": { - "StreamingDistributionList": { - "type": "structure", - "required": [ - "Marker", - "MaxItems", - "IsTruncated", - "Quantity" - ], - "members": { - "Marker": {}, - "NextMarker": {}, - "MaxItems": { - "type": "integer" - }, - "IsTruncated": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "member": { - "locationName": "StreamingDistributionSummary", - "type": "structure", - "required": [ - "Id", - "Status", - "LastModifiedTime", - "DomainName", - "S3Origin", - "Aliases", - "TrustedSigners", - "Comment", - "PriceClass", - "Enabled" - ], - "members": { - "Id": {}, - "Status": {}, - "LastModifiedTime": { - "type": "timestamp" - }, - "DomainName": {}, - "S3Origin": { - "shape": "S1t" - }, - "Aliases": { - "shape": "S8" - }, - "TrustedSigners": { - "shape": "Sq" - }, - "Comment": {}, - "PriceClass": {}, - "Enabled": { - "type": "boolean" - } - } - } - } - } - } - }, - "payload": "StreamingDistributionList" - } - }, - "UpdateCloudFrontOriginAccessIdentity": { - "http": { - "method": "PUT", - "requestUri": "/2015-04-17/origin-access-identity/cloudfront/{Id}/config" - }, - "input": { - "type": "structure", - "required": [ - "CloudFrontOriginAccessIdentityConfig", - "Id" - ], - "members": { - "CloudFrontOriginAccessIdentityConfig": { - "shape": "S2", - "xmlNamespace": { - "uri": "http://cloudfront.amazonaws.com/doc/2015-04-17/" - }, - "locationName": "CloudFrontOriginAccessIdentityConfig" - }, - "Id": { - "location": "uri", - "locationName": "Id" - }, - "IfMatch": { - "location": "header", - "locationName": "If-Match" - } - }, - "payload": "CloudFrontOriginAccessIdentityConfig" - }, - "output": { - "type": "structure", - "members": { - "CloudFrontOriginAccessIdentity": { - "shape": "S5" - }, - "ETag": { - "location": "header", - "locationName": "ETag" - } - }, - "payload": "CloudFrontOriginAccessIdentity" - } - }, - "UpdateDistribution": { - "http": { - "method": "PUT", - "requestUri": "/2015-04-17/distribution/{Id}/config" - }, - "input": { - "type": "structure", - "required": [ - "DistributionConfig", - "Id" - ], - "members": { - "DistributionConfig": { - "shape": "S7", - "xmlNamespace": { - "uri": "http://cloudfront.amazonaws.com/doc/2015-04-17/" - }, - "locationName": "DistributionConfig" - }, - "Id": { - "location": "uri", - "locationName": "Id" - }, - "IfMatch": { - "location": "header", - "locationName": "If-Match" - } - }, - "payload": "DistributionConfig" - }, - "output": { - "type": "structure", - "members": { - "Distribution": { - "shape": "S1e" - }, - "ETag": { - "location": "header", - "locationName": "ETag" - } - }, - "payload": "Distribution" - } - }, - "UpdateStreamingDistribution": { - "http": { - "method": "PUT", - "requestUri": "/2015-04-17/streaming-distribution/{Id}/config" - }, - "input": { - "type": "structure", - "required": [ - "StreamingDistributionConfig", - "Id" - ], - "members": { - "StreamingDistributionConfig": { - "shape": "S1s", - "xmlNamespace": { - "uri": "http://cloudfront.amazonaws.com/doc/2015-04-17/" - }, - "locationName": "StreamingDistributionConfig" - }, - "Id": { - "location": "uri", - "locationName": "Id" - }, - "IfMatch": { - "location": "header", - "locationName": "If-Match" - } - }, - "payload": "StreamingDistributionConfig" - }, - "output": { - "type": "structure", - "members": { - "StreamingDistribution": { - "shape": "S1w" - }, - "ETag": { - "location": "header", - "locationName": "ETag" - } - }, - "payload": "StreamingDistribution" - } - } - }, - "shapes": { - "S2": { - "type": "structure", - "required": [ - "CallerReference", - "Comment" - ], - "members": { - "CallerReference": {}, - "Comment": {} - } - }, - "S5": { - "type": "structure", - "required": [ - "Id", - "S3CanonicalUserId" - ], - "members": { - "Id": {}, - "S3CanonicalUserId": {}, - "CloudFrontOriginAccessIdentityConfig": { - "shape": "S2" - } - } - }, - "S7": { - "type": "structure", - "required": [ - "CallerReference", - "Origins", - "DefaultCacheBehavior", - "Comment", - "Enabled" - ], - "members": { - "CallerReference": {}, - "Aliases": { - "shape": "S8" - }, - "DefaultRootObject": {}, - "Origins": { - "shape": "Sb" - }, - "DefaultCacheBehavior": { - "shape": "Sh" - }, - "CacheBehaviors": { - "shape": "Sy" - }, - "CustomErrorResponses": { - "shape": "S11" - }, - "Comment": {}, - "Logging": { - "type": "structure", - "required": [ - "Enabled", - "IncludeCookies", - "Bucket", - "Prefix" - ], - "members": { - "Enabled": { - "type": "boolean" - }, - "IncludeCookies": { - "type": "boolean" - }, - "Bucket": {}, - "Prefix": {} - } - }, - "PriceClass": {}, - "Enabled": { - "type": "boolean" - }, - "ViewerCertificate": { - "shape": "S16" - }, - "Restrictions": { - "shape": "S19" - } - } - }, - "S8": { - "type": "structure", - "required": [ - "Quantity" - ], - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "member": { - "locationName": "CNAME" - } - } - } - }, - "Sb": { - "type": "structure", - "required": [ - "Quantity" - ], - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "member": { - "locationName": "Origin", - "type": "structure", - "required": [ - "Id", - "DomainName" - ], - "members": { - "Id": {}, - "DomainName": {}, - "OriginPath": {}, - "S3OriginConfig": { - "type": "structure", - "required": [ - "OriginAccessIdentity" - ], - "members": { - "OriginAccessIdentity": {} - } - }, - "CustomOriginConfig": { - "type": "structure", - "required": [ - "HTTPPort", - "HTTPSPort", - "OriginProtocolPolicy" - ], - "members": { - "HTTPPort": { - "type": "integer" - }, - "HTTPSPort": { - "type": "integer" - }, - "OriginProtocolPolicy": {} - } - } - } - } - } - } - }, - "Sh": { - "type": "structure", - "required": [ - "TargetOriginId", - "ForwardedValues", - "TrustedSigners", - "ViewerProtocolPolicy", - "MinTTL" - ], - "members": { - "TargetOriginId": {}, - "ForwardedValues": { - "shape": "Si" - }, - "TrustedSigners": { - "shape": "Sq" - }, - "ViewerProtocolPolicy": {}, - "MinTTL": { - "type": "long" - }, - "AllowedMethods": { - "shape": "Su" - }, - "SmoothStreaming": { - "type": "boolean" - }, - "DefaultTTL": { - "type": "long" - }, - "MaxTTL": { - "type": "long" - } - } - }, - "Si": { - "type": "structure", - "required": [ - "QueryString", - "Cookies" - ], - "members": { - "QueryString": { - "type": "boolean" - }, - "Cookies": { - "type": "structure", - "required": [ - "Forward" - ], - "members": { - "Forward": {}, - "WhitelistedNames": { - "type": "structure", - "required": [ - "Quantity" - ], - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "member": { - "locationName": "Name" - } - } - } - } - } - }, - "Headers": { - "type": "structure", - "required": [ - "Quantity" - ], - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "member": { - "locationName": "Name" - } - } - } - } - } - }, - "Sq": { - "type": "structure", - "required": [ - "Enabled", - "Quantity" - ], - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "member": { - "locationName": "AwsAccountNumber" - } - } - } - }, - "Su": { - "type": "structure", - "required": [ - "Quantity", - "Items" - ], - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "shape": "Sv" - }, - "CachedMethods": { - "type": "structure", - "required": [ - "Quantity", - "Items" - ], - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "shape": "Sv" - } - } - } - } - }, - "Sv": { - "type": "list", - "member": { - "locationName": "Method" - } - }, - "Sy": { - "type": "structure", - "required": [ - "Quantity" - ], - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "member": { - "locationName": "CacheBehavior", - "type": "structure", - "required": [ - "PathPattern", - "TargetOriginId", - "ForwardedValues", - "TrustedSigners", - "ViewerProtocolPolicy", - "MinTTL" - ], - "members": { - "PathPattern": {}, - "TargetOriginId": {}, - "ForwardedValues": { - "shape": "Si" - }, - "TrustedSigners": { - "shape": "Sq" - }, - "ViewerProtocolPolicy": {}, - "MinTTL": { - "type": "long" - }, - "AllowedMethods": { - "shape": "Su" - }, - "SmoothStreaming": { - "type": "boolean" - }, - "DefaultTTL": { - "type": "long" - }, - "MaxTTL": { - "type": "long" - } - } - } - } - } - }, - "S11": { - "type": "structure", - "required": [ - "Quantity" - ], - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "member": { - "locationName": "CustomErrorResponse", - "type": "structure", - "required": [ - "ErrorCode" - ], - "members": { - "ErrorCode": { - "type": "integer" - }, - "ResponsePagePath": {}, - "ResponseCode": {}, - "ErrorCachingMinTTL": { - "type": "long" - } - } - } - } - } - }, - "S16": { - "type": "structure", - "members": { - "IAMCertificateId": {}, - "CloudFrontDefaultCertificate": { - "type": "boolean" - }, - "SSLSupportMethod": {}, - "MinimumProtocolVersion": {} - } - }, - "S19": { - "type": "structure", - "required": [ - "GeoRestriction" - ], - "members": { - "GeoRestriction": { - "type": "structure", - "required": [ - "RestrictionType", - "Quantity" - ], - "members": { - "RestrictionType": {}, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "member": { - "locationName": "Location" - } - } - } - } - } - }, - "S1e": { - "type": "structure", - "required": [ - "Id", - "Status", - "LastModifiedTime", - "InProgressInvalidationBatches", - "DomainName", - "ActiveTrustedSigners", - "DistributionConfig" - ], - "members": { - "Id": {}, - "Status": {}, - "LastModifiedTime": { - "type": "timestamp" - }, - "InProgressInvalidationBatches": { - "type": "integer" - }, - "DomainName": {}, - "ActiveTrustedSigners": { - "shape": "S1g" - }, - "DistributionConfig": { - "shape": "S7" - } - } - }, - "S1g": { - "type": "structure", - "required": [ - "Enabled", - "Quantity" - ], - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "member": { - "locationName": "Signer", - "type": "structure", - "members": { - "AwsAccountNumber": {}, - "KeyPairIds": { - "type": "structure", - "required": [ - "Quantity" - ], - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "member": { - "locationName": "KeyPairId" - } - } - } - } - } - } - } - } - }, - "S1m": { - "type": "structure", - "required": [ - "Paths", - "CallerReference" - ], - "members": { - "Paths": { - "type": "structure", - "required": [ - "Quantity" - ], - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "member": { - "locationName": "Path" - } - } - } - }, - "CallerReference": {} - } - }, - "S1q": { - "type": "structure", - "required": [ - "Id", - "Status", - "CreateTime", - "InvalidationBatch" - ], - "members": { - "Id": {}, - "Status": {}, - "CreateTime": { - "type": "timestamp" - }, - "InvalidationBatch": { - "shape": "S1m" - } - } - }, - "S1s": { - "type": "structure", - "required": [ - "CallerReference", - "S3Origin", - "Comment", - "TrustedSigners", - "Enabled" - ], - "members": { - "CallerReference": {}, - "S3Origin": { - "shape": "S1t" - }, - "Aliases": { - "shape": "S8" - }, - "Comment": {}, - "Logging": { - "type": "structure", - "required": [ - "Enabled", - "Bucket", - "Prefix" - ], - "members": { - "Enabled": { - "type": "boolean" - }, - "Bucket": {}, - "Prefix": {} - } - }, - "TrustedSigners": { - "shape": "Sq" - }, - "PriceClass": {}, - "Enabled": { - "type": "boolean" - } - } - }, - "S1t": { - "type": "structure", - "required": [ - "DomainName", - "OriginAccessIdentity" - ], - "members": { - "DomainName": {}, - "OriginAccessIdentity": {} - } - }, - "S1w": { - "type": "structure", - "required": [ - "Id", - "Status", - "DomainName", - "ActiveTrustedSigners", - "StreamingDistributionConfig" - ], - "members": { - "Id": {}, - "Status": {}, - "LastModifiedTime": { - "type": "timestamp" - }, - "DomainName": {}, - "ActiveTrustedSigners": { - "shape": "S1g" - }, - "StreamingDistributionConfig": { - "shape": "S1s" - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/cloudfront-2015-04-17.paginators.json b/cli/node_modules/aws-sdk/apis/cloudfront-2015-04-17.paginators.json deleted file mode 100644 index 51fbb907f..000000000 --- a/cli/node_modules/aws-sdk/apis/cloudfront-2015-04-17.paginators.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "pagination": { - "ListCloudFrontOriginAccessIdentities": { - "input_token": "Marker", - "output_token": "CloudFrontOriginAccessIdentityList.NextMarker", - "limit_key": "MaxItems", - "more_results": "CloudFrontOriginAccessIdentityList.IsTruncated", - "result_key": "CloudFrontOriginAccessIdentityList.Items" - }, - "ListDistributions": { - "input_token": "Marker", - "output_token": "DistributionList.NextMarker", - "limit_key": "MaxItems", - "more_results": "DistributionList.IsTruncated", - "result_key": "DistributionList.Items" - }, - "ListInvalidations": { - "input_token": "Marker", - "output_token": "InvalidationList.NextMarker", - "limit_key": "MaxItems", - "more_results": "InvalidationList.IsTruncated", - "result_key": "InvalidationList.Items" - }, - "ListStreamingDistributions": { - "input_token": "Marker", - "output_token": "StreamingDistributionList.NextMarker", - "limit_key": "MaxItems", - "more_results": "StreamingDistributionList.IsTruncated", - "result_key": "StreamingDistributionList.Items" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/cloudfront-2015-04-17.waiters.json b/cli/node_modules/aws-sdk/apis/cloudfront-2015-04-17.waiters.json deleted file mode 100644 index e4dc1f4b9..000000000 --- a/cli/node_modules/aws-sdk/apis/cloudfront-2015-04-17.waiters.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "waiters": { - "__default__": { - "success_type": "output", - "success_path": "Status" - }, - "StreamingDistributionDeployed": { - "operation": "GetStreamingDistribution", - "description": "Wait until a streaming distribution is deployed.", - "interval": 60, - "max_attempts": 25, - "success_value": "Deployed" - }, - "DistributionDeployed": { - "operation": "GetDistribution", - "description": "Wait until a distribution is deployed.", - "interval": 60, - "max_attempts": 25, - "success_value": "Deployed" - }, - "InvalidationCompleted": { - "operation": "GetInvalidation", - "description": "Wait until an invalidation has completed.", - "interval": 20, - "max_attempts": 30, - "success_value": "Completed" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/cloudhsm-2014-05-30.min.json b/cli/node_modules/aws-sdk/apis/cloudhsm-2014-05-30.min.json deleted file mode 100644 index 3b0527c2a..000000000 --- a/cli/node_modules/aws-sdk/apis/cloudhsm-2014-05-30.min.json +++ /dev/null @@ -1,433 +0,0 @@ -{ - "metadata": { - "apiVersion": "2014-05-30", - "endpointPrefix": "cloudhsm", - "jsonVersion": "1.1", - "serviceAbbreviation": "CloudHSM", - "serviceFullName": "Amazon CloudHSM", - "signatureVersion": "v4", - "targetPrefix": "CloudHsmFrontendService", - "protocol": "json" - }, - "operations": { - "CreateHapg": { - "input": { - "type": "structure", - "required": [ - "Label" - ], - "members": { - "Label": {} - } - }, - "output": { - "type": "structure", - "members": { - "HapgArn": {} - } - } - }, - "CreateHsm": { - "input": { - "locationName": "CreateHsmRequest", - "type": "structure", - "required": [ - "SubnetId", - "SshKey", - "IamRoleArn", - "SubscriptionType" - ], - "members": { - "SubnetId": { - "locationName": "SubnetId" - }, - "SshKey": { - "locationName": "SshKey" - }, - "EniIp": { - "locationName": "EniIp" - }, - "IamRoleArn": { - "locationName": "IamRoleArn" - }, - "ExternalId": { - "locationName": "ExternalId" - }, - "SubscriptionType": { - "locationName": "SubscriptionType" - }, - "ClientToken": { - "locationName": "ClientToken" - }, - "SyslogIp": { - "locationName": "SyslogIp" - } - } - }, - "output": { - "type": "structure", - "members": { - "HsmArn": {} - } - } - }, - "CreateLunaClient": { - "input": { - "type": "structure", - "required": [ - "Certificate" - ], - "members": { - "Label": {}, - "Certificate": {} - } - }, - "output": { - "type": "structure", - "members": { - "ClientArn": {} - } - } - }, - "DeleteHapg": { - "input": { - "type": "structure", - "required": [ - "HapgArn" - ], - "members": { - "HapgArn": {} - } - }, - "output": { - "type": "structure", - "required": [ - "Status" - ], - "members": { - "Status": {} - } - } - }, - "DeleteHsm": { - "input": { - "locationName": "DeleteHsmRequest", - "type": "structure", - "required": [ - "HsmArn" - ], - "members": { - "HsmArn": { - "locationName": "HsmArn" - } - } - }, - "output": { - "type": "structure", - "required": [ - "Status" - ], - "members": { - "Status": {} - } - } - }, - "DeleteLunaClient": { - "input": { - "type": "structure", - "required": [ - "ClientArn" - ], - "members": { - "ClientArn": {} - } - }, - "output": { - "type": "structure", - "required": [ - "Status" - ], - "members": { - "Status": {} - } - } - }, - "DescribeHapg": { - "input": { - "type": "structure", - "required": [ - "HapgArn" - ], - "members": { - "HapgArn": {} - } - }, - "output": { - "type": "structure", - "members": { - "HapgArn": {}, - "HapgSerial": {}, - "HsmsLastActionFailed": { - "shape": "St" - }, - "HsmsPendingDeletion": { - "shape": "St" - }, - "HsmsPendingRegistration": { - "shape": "St" - }, - "Label": {}, - "LastModifiedTimestamp": {}, - "PartitionSerialList": { - "shape": "Sv" - }, - "State": {} - } - } - }, - "DescribeHsm": { - "input": { - "type": "structure", - "members": { - "HsmArn": {}, - "HsmSerialNumber": {} - } - }, - "output": { - "type": "structure", - "members": { - "HsmArn": {}, - "Status": {}, - "StatusDetails": {}, - "AvailabilityZone": {}, - "EniId": {}, - "EniIp": {}, - "SubscriptionType": {}, - "SubscriptionStartDate": {}, - "SubscriptionEndDate": {}, - "VpcId": {}, - "SubnetId": {}, - "IamRoleArn": {}, - "SerialNumber": {}, - "VendorName": {}, - "HsmType": {}, - "SoftwareVersion": {}, - "SshPublicKey": {}, - "SshKeyLastUpdated": {}, - "ServerCertUri": {}, - "ServerCertLastUpdated": {}, - "Partitions": { - "type": "list", - "member": {} - } - } - } - }, - "DescribeLunaClient": { - "input": { - "type": "structure", - "members": { - "ClientArn": {}, - "CertificateFingerprint": {} - } - }, - "output": { - "type": "structure", - "members": { - "ClientArn": {}, - "Certificate": {}, - "CertificateFingerprint": {}, - "LastModifiedTimestamp": {}, - "Label": {} - } - } - }, - "GetConfig": { - "input": { - "type": "structure", - "required": [ - "ClientArn", - "ClientVersion", - "HapgList" - ], - "members": { - "ClientArn": {}, - "ClientVersion": {}, - "HapgList": { - "shape": "S1c" - } - } - }, - "output": { - "type": "structure", - "members": { - "ConfigType": {}, - "ConfigFile": {}, - "ConfigCred": {} - } - } - }, - "ListAvailableZones": { - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "AZList": { - "type": "list", - "member": {} - } - } - } - }, - "ListHapgs": { - "input": { - "type": "structure", - "members": { - "NextToken": {} - } - }, - "output": { - "type": "structure", - "required": [ - "HapgList" - ], - "members": { - "HapgList": { - "shape": "S1c" - }, - "NextToken": {} - } - } - }, - "ListHsms": { - "input": { - "type": "structure", - "members": { - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "HsmList": { - "shape": "St" - }, - "NextToken": {} - } - } - }, - "ListLunaClients": { - "input": { - "type": "structure", - "members": { - "NextToken": {} - } - }, - "output": { - "type": "structure", - "required": [ - "ClientList" - ], - "members": { - "ClientList": { - "type": "list", - "member": {} - }, - "NextToken": {} - } - } - }, - "ModifyHapg": { - "input": { - "type": "structure", - "required": [ - "HapgArn" - ], - "members": { - "HapgArn": {}, - "Label": {}, - "PartitionSerialList": { - "shape": "Sv" - } - } - }, - "output": { - "type": "structure", - "members": { - "HapgArn": {} - } - } - }, - "ModifyHsm": { - "input": { - "locationName": "ModifyHsmRequest", - "type": "structure", - "required": [ - "HsmArn" - ], - "members": { - "HsmArn": { - "locationName": "HsmArn" - }, - "SubnetId": { - "locationName": "SubnetId" - }, - "EniIp": { - "locationName": "EniIp" - }, - "IamRoleArn": { - "locationName": "IamRoleArn" - }, - "ExternalId": { - "locationName": "ExternalId" - }, - "SyslogIp": { - "locationName": "SyslogIp" - } - } - }, - "output": { - "type": "structure", - "members": { - "HsmArn": {} - } - } - }, - "ModifyLunaClient": { - "input": { - "type": "structure", - "required": [ - "ClientArn", - "Certificate" - ], - "members": { - "ClientArn": {}, - "Certificate": {} - } - }, - "output": { - "type": "structure", - "members": { - "ClientArn": {} - } - } - } - }, - "shapes": { - "St": { - "type": "list", - "member": {} - }, - "Sv": { - "type": "list", - "member": {} - }, - "S1c": { - "type": "list", - "member": {} - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/cloudsearch-2011-02-01.min.json b/cli/node_modules/aws-sdk/apis/cloudsearch-2011-02-01.min.json deleted file mode 100644 index 5db90f233..000000000 --- a/cli/node_modules/aws-sdk/apis/cloudsearch-2011-02-01.min.json +++ /dev/null @@ -1,837 +0,0 @@ -{ - "metadata": { - "apiVersion": "2011-02-01", - "endpointPrefix": "cloudsearch", - "serviceFullName": "Amazon CloudSearch", - "signatureVersion": "v4", - "xmlNamespace": "http://cloudsearch.amazonaws.com/doc/2011-02-01/", - "protocol": "query" - }, - "operations": { - "CreateDomain": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "resultWrapper": "CreateDomainResult", - "type": "structure", - "members": { - "DomainStatus": { - "shape": "S4" - } - } - } - }, - "DefineIndexField": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "IndexField" - ], - "members": { - "DomainName": {}, - "IndexField": { - "shape": "Sf" - } - } - }, - "output": { - "resultWrapper": "DefineIndexFieldResult", - "type": "structure", - "required": [ - "IndexField" - ], - "members": { - "IndexField": { - "shape": "Sx" - } - } - } - }, - "DefineRankExpression": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "RankExpression" - ], - "members": { - "DomainName": {}, - "RankExpression": { - "shape": "S12" - } - } - }, - "output": { - "resultWrapper": "DefineRankExpressionResult", - "type": "structure", - "required": [ - "RankExpression" - ], - "members": { - "RankExpression": { - "shape": "S15" - } - } - } - }, - "DeleteDomain": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "resultWrapper": "DeleteDomainResult", - "type": "structure", - "members": { - "DomainStatus": { - "shape": "S4" - } - } - } - }, - "DeleteIndexField": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "IndexFieldName" - ], - "members": { - "DomainName": {}, - "IndexFieldName": {} - } - }, - "output": { - "resultWrapper": "DeleteIndexFieldResult", - "type": "structure", - "required": [ - "IndexField" - ], - "members": { - "IndexField": { - "shape": "Sx" - } - } - } - }, - "DeleteRankExpression": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "RankName" - ], - "members": { - "DomainName": {}, - "RankName": {} - } - }, - "output": { - "resultWrapper": "DeleteRankExpressionResult", - "type": "structure", - "required": [ - "RankExpression" - ], - "members": { - "RankExpression": { - "shape": "S15" - } - } - } - }, - "DescribeAvailabilityOptions": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "resultWrapper": "DescribeAvailabilityOptionsResult", - "type": "structure", - "members": { - "AvailabilityOptions": { - "shape": "S1e" - } - } - } - }, - "DescribeDefaultSearchField": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "resultWrapper": "DescribeDefaultSearchFieldResult", - "type": "structure", - "required": [ - "DefaultSearchField" - ], - "members": { - "DefaultSearchField": { - "shape": "S1i" - } - } - } - }, - "DescribeDomains": { - "input": { - "type": "structure", - "members": { - "DomainNames": { - "type": "list", - "member": {} - } - } - }, - "output": { - "resultWrapper": "DescribeDomainsResult", - "type": "structure", - "required": [ - "DomainStatusList" - ], - "members": { - "DomainStatusList": { - "type": "list", - "member": { - "shape": "S4" - } - } - } - } - }, - "DescribeIndexFields": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {}, - "FieldNames": { - "shape": "S1o" - } - } - }, - "output": { - "resultWrapper": "DescribeIndexFieldsResult", - "type": "structure", - "required": [ - "IndexFields" - ], - "members": { - "IndexFields": { - "type": "list", - "member": { - "shape": "Sx" - } - } - } - } - }, - "DescribeRankExpressions": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {}, - "RankNames": { - "shape": "S1o" - } - } - }, - "output": { - "resultWrapper": "DescribeRankExpressionsResult", - "type": "structure", - "required": [ - "RankExpressions" - ], - "members": { - "RankExpressions": { - "type": "list", - "member": { - "shape": "S15" - } - } - } - } - }, - "DescribeServiceAccessPolicies": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "resultWrapper": "DescribeServiceAccessPoliciesResult", - "type": "structure", - "required": [ - "AccessPolicies" - ], - "members": { - "AccessPolicies": { - "shape": "S1w" - } - } - } - }, - "DescribeStemmingOptions": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "resultWrapper": "DescribeStemmingOptionsResult", - "type": "structure", - "required": [ - "Stems" - ], - "members": { - "Stems": { - "shape": "S20" - } - } - } - }, - "DescribeStopwordOptions": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "resultWrapper": "DescribeStopwordOptionsResult", - "type": "structure", - "required": [ - "Stopwords" - ], - "members": { - "Stopwords": { - "shape": "S24" - } - } - } - }, - "DescribeSynonymOptions": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "resultWrapper": "DescribeSynonymOptionsResult", - "type": "structure", - "required": [ - "Synonyms" - ], - "members": { - "Synonyms": { - "shape": "S28" - } - } - } - }, - "IndexDocuments": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "resultWrapper": "IndexDocumentsResult", - "type": "structure", - "members": { - "FieldNames": { - "shape": "S1o" - } - } - } - }, - "UpdateAvailabilityOptions": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "MultiAZ" - ], - "members": { - "DomainName": {}, - "MultiAZ": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "UpdateAvailabilityOptionsResult", - "type": "structure", - "members": { - "AvailabilityOptions": { - "shape": "S1e" - } - } - } - }, - "UpdateDefaultSearchField": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "DefaultSearchField" - ], - "members": { - "DomainName": {}, - "DefaultSearchField": {} - } - }, - "output": { - "resultWrapper": "UpdateDefaultSearchFieldResult", - "type": "structure", - "required": [ - "DefaultSearchField" - ], - "members": { - "DefaultSearchField": { - "shape": "S1i" - } - } - } - }, - "UpdateServiceAccessPolicies": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "AccessPolicies" - ], - "members": { - "DomainName": {}, - "AccessPolicies": {} - } - }, - "output": { - "resultWrapper": "UpdateServiceAccessPoliciesResult", - "type": "structure", - "required": [ - "AccessPolicies" - ], - "members": { - "AccessPolicies": { - "shape": "S1w" - } - } - } - }, - "UpdateStemmingOptions": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "Stems" - ], - "members": { - "DomainName": {}, - "Stems": {} - } - }, - "output": { - "resultWrapper": "UpdateStemmingOptionsResult", - "type": "structure", - "required": [ - "Stems" - ], - "members": { - "Stems": { - "shape": "S20" - } - } - } - }, - "UpdateStopwordOptions": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "Stopwords" - ], - "members": { - "DomainName": {}, - "Stopwords": {} - } - }, - "output": { - "resultWrapper": "UpdateStopwordOptionsResult", - "type": "structure", - "required": [ - "Stopwords" - ], - "members": { - "Stopwords": { - "shape": "S24" - } - } - } - }, - "UpdateSynonymOptions": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "Synonyms" - ], - "members": { - "DomainName": {}, - "Synonyms": {} - } - }, - "output": { - "resultWrapper": "UpdateSynonymOptionsResult", - "type": "structure", - "required": [ - "Synonyms" - ], - "members": { - "Synonyms": { - "shape": "S28" - } - } - } - } - }, - "shapes": { - "S4": { - "type": "structure", - "required": [ - "DomainId", - "DomainName", - "RequiresIndexDocuments" - ], - "members": { - "DomainId": {}, - "DomainName": {}, - "Created": { - "type": "boolean" - }, - "Deleted": { - "type": "boolean" - }, - "NumSearchableDocs": { - "type": "long" - }, - "DocService": { - "shape": "S8" - }, - "SearchService": { - "shape": "S8" - }, - "RequiresIndexDocuments": { - "type": "boolean" - }, - "Processing": { - "type": "boolean" - }, - "SearchInstanceType": {}, - "SearchPartitionCount": { - "type": "integer" - }, - "SearchInstanceCount": { - "type": "integer" - } - } - }, - "S8": { - "type": "structure", - "members": { - "Arn": {}, - "Endpoint": {} - } - }, - "Sf": { - "type": "structure", - "required": [ - "IndexFieldName", - "IndexFieldType" - ], - "members": { - "IndexFieldName": {}, - "IndexFieldType": {}, - "UIntOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "integer" - } - } - }, - "LiteralOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SearchEnabled": { - "type": "boolean" - }, - "FacetEnabled": { - "type": "boolean" - }, - "ResultEnabled": { - "type": "boolean" - } - } - }, - "TextOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "FacetEnabled": { - "type": "boolean" - }, - "ResultEnabled": { - "type": "boolean" - }, - "TextProcessor": {} - } - }, - "SourceAttributes": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "SourceDataFunction" - ], - "members": { - "SourceDataFunction": {}, - "SourceDataCopy": { - "type": "structure", - "required": [ - "SourceName" - ], - "members": { - "SourceName": {}, - "DefaultValue": {} - } - }, - "SourceDataTrimTitle": { - "type": "structure", - "required": [ - "SourceName" - ], - "members": { - "SourceName": {}, - "DefaultValue": {}, - "Separator": {}, - "Language": {} - } - }, - "SourceDataMap": { - "type": "structure", - "required": [ - "SourceName" - ], - "members": { - "SourceName": {}, - "DefaultValue": {}, - "Cases": { - "type": "map", - "key": {}, - "value": {} - } - } - } - } - } - } - } - }, - "Sx": { - "type": "structure", - "required": [ - "Options", - "Status" - ], - "members": { - "Options": { - "shape": "Sf" - }, - "Status": { - "shape": "Sy" - } - } - }, - "Sy": { - "type": "structure", - "required": [ - "CreationDate", - "UpdateDate", - "State" - ], - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - }, - "S12": { - "type": "structure", - "required": [ - "RankName", - "RankExpression" - ], - "members": { - "RankName": {}, - "RankExpression": {} - } - }, - "S15": { - "type": "structure", - "required": [ - "Options", - "Status" - ], - "members": { - "Options": { - "shape": "S12" - }, - "Status": { - "shape": "Sy" - } - } - }, - "S1e": { - "type": "structure", - "required": [ - "Options", - "Status" - ], - "members": { - "Options": { - "type": "boolean" - }, - "Status": { - "shape": "Sy" - } - } - }, - "S1i": { - "type": "structure", - "required": [ - "Options", - "Status" - ], - "members": { - "Options": {}, - "Status": { - "shape": "Sy" - } - } - }, - "S1o": { - "type": "list", - "member": {} - }, - "S1w": { - "type": "structure", - "required": [ - "Options", - "Status" - ], - "members": { - "Options": {}, - "Status": { - "shape": "Sy" - } - } - }, - "S20": { - "type": "structure", - "required": [ - "Options", - "Status" - ], - "members": { - "Options": {}, - "Status": { - "shape": "Sy" - } - } - }, - "S24": { - "type": "structure", - "required": [ - "Options", - "Status" - ], - "members": { - "Options": {}, - "Status": { - "shape": "Sy" - } - } - }, - "S28": { - "type": "structure", - "required": [ - "Options", - "Status" - ], - "members": { - "Options": {}, - "Status": { - "shape": "Sy" - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/cloudsearch-2011-02-01.paginators.json b/cli/node_modules/aws-sdk/apis/cloudsearch-2011-02-01.paginators.json deleted file mode 100644 index 52164452b..000000000 --- a/cli/node_modules/aws-sdk/apis/cloudsearch-2011-02-01.paginators.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "pagination": { - "DescribeDomains": { - "result_key": "DomainStatusList" - }, - "DescribeIndexFields": { - "result_key": "IndexFields" - }, - "DescribeRankExpressions": { - "result_key": "RankExpressions" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/cloudsearch-2013-01-01.min.json b/cli/node_modules/aws-sdk/apis/cloudsearch-2013-01-01.min.json deleted file mode 100644 index 7ab2a3e09..000000000 --- a/cli/node_modules/aws-sdk/apis/cloudsearch-2013-01-01.min.json +++ /dev/null @@ -1,1086 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2013-01-01", - "endpointPrefix": "cloudsearch", - "serviceFullName": "Amazon CloudSearch", - "signatureVersion": "v4", - "xmlNamespace": "http://cloudsearch.amazonaws.com/doc/2013-01-01/", - "protocol": "query" - }, - "operations": { - "BuildSuggesters": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "resultWrapper": "BuildSuggestersResult", - "type": "structure", - "members": { - "FieldNames": { - "shape": "S4" - } - } - } - }, - "CreateDomain": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "resultWrapper": "CreateDomainResult", - "type": "structure", - "members": { - "DomainStatus": { - "shape": "S8" - } - } - } - }, - "DefineAnalysisScheme": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "AnalysisScheme" - ], - "members": { - "DomainName": {}, - "AnalysisScheme": { - "shape": "Sl" - } - } - }, - "output": { - "resultWrapper": "DefineAnalysisSchemeResult", - "type": "structure", - "required": [ - "AnalysisScheme" - ], - "members": { - "AnalysisScheme": { - "shape": "Ss" - } - } - } - }, - "DefineExpression": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "Expression" - ], - "members": { - "DomainName": {}, - "Expression": { - "shape": "Sy" - } - } - }, - "output": { - "resultWrapper": "DefineExpressionResult", - "type": "structure", - "required": [ - "Expression" - ], - "members": { - "Expression": { - "shape": "S11" - } - } - } - }, - "DefineIndexField": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "IndexField" - ], - "members": { - "DomainName": {}, - "IndexField": { - "shape": "S13" - } - } - }, - "output": { - "resultWrapper": "DefineIndexFieldResult", - "type": "structure", - "required": [ - "IndexField" - ], - "members": { - "IndexField": { - "shape": "S1n" - } - } - } - }, - "DefineSuggester": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "Suggester" - ], - "members": { - "DomainName": {}, - "Suggester": { - "shape": "S1p" - } - } - }, - "output": { - "resultWrapper": "DefineSuggesterResult", - "type": "structure", - "required": [ - "Suggester" - ], - "members": { - "Suggester": { - "shape": "S1t" - } - } - } - }, - "DeleteAnalysisScheme": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "AnalysisSchemeName" - ], - "members": { - "DomainName": {}, - "AnalysisSchemeName": {} - } - }, - "output": { - "resultWrapper": "DeleteAnalysisSchemeResult", - "type": "structure", - "required": [ - "AnalysisScheme" - ], - "members": { - "AnalysisScheme": { - "shape": "Ss" - } - } - } - }, - "DeleteDomain": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "resultWrapper": "DeleteDomainResult", - "type": "structure", - "members": { - "DomainStatus": { - "shape": "S8" - } - } - } - }, - "DeleteExpression": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "ExpressionName" - ], - "members": { - "DomainName": {}, - "ExpressionName": {} - } - }, - "output": { - "resultWrapper": "DeleteExpressionResult", - "type": "structure", - "required": [ - "Expression" - ], - "members": { - "Expression": { - "shape": "S11" - } - } - } - }, - "DeleteIndexField": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "IndexFieldName" - ], - "members": { - "DomainName": {}, - "IndexFieldName": {} - } - }, - "output": { - "resultWrapper": "DeleteIndexFieldResult", - "type": "structure", - "required": [ - "IndexField" - ], - "members": { - "IndexField": { - "shape": "S1n" - } - } - } - }, - "DeleteSuggester": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "SuggesterName" - ], - "members": { - "DomainName": {}, - "SuggesterName": {} - } - }, - "output": { - "resultWrapper": "DeleteSuggesterResult", - "type": "structure", - "required": [ - "Suggester" - ], - "members": { - "Suggester": { - "shape": "S1t" - } - } - } - }, - "DescribeAnalysisSchemes": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {}, - "AnalysisSchemeNames": { - "shape": "S25" - }, - "Deployed": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "DescribeAnalysisSchemesResult", - "type": "structure", - "required": [ - "AnalysisSchemes" - ], - "members": { - "AnalysisSchemes": { - "type": "list", - "member": { - "shape": "Ss" - } - } - } - } - }, - "DescribeAvailabilityOptions": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {}, - "Deployed": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "DescribeAvailabilityOptionsResult", - "type": "structure", - "members": { - "AvailabilityOptions": { - "shape": "S2a" - } - } - } - }, - "DescribeDomains": { - "input": { - "type": "structure", - "members": { - "DomainNames": { - "type": "list", - "member": {} - } - } - }, - "output": { - "resultWrapper": "DescribeDomainsResult", - "type": "structure", - "required": [ - "DomainStatusList" - ], - "members": { - "DomainStatusList": { - "type": "list", - "member": { - "shape": "S8" - } - } - } - } - }, - "DescribeExpressions": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {}, - "ExpressionNames": { - "shape": "S25" - }, - "Deployed": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "DescribeExpressionsResult", - "type": "structure", - "required": [ - "Expressions" - ], - "members": { - "Expressions": { - "type": "list", - "member": { - "shape": "S11" - } - } - } - } - }, - "DescribeIndexFields": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {}, - "FieldNames": { - "type": "list", - "member": {} - }, - "Deployed": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "DescribeIndexFieldsResult", - "type": "structure", - "required": [ - "IndexFields" - ], - "members": { - "IndexFields": { - "type": "list", - "member": { - "shape": "S1n" - } - } - } - } - }, - "DescribeScalingParameters": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "resultWrapper": "DescribeScalingParametersResult", - "type": "structure", - "required": [ - "ScalingParameters" - ], - "members": { - "ScalingParameters": { - "shape": "S2p" - } - } - } - }, - "DescribeServiceAccessPolicies": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {}, - "Deployed": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "DescribeServiceAccessPoliciesResult", - "type": "structure", - "required": [ - "AccessPolicies" - ], - "members": { - "AccessPolicies": { - "shape": "S2u" - } - } - } - }, - "DescribeSuggesters": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {}, - "SuggesterNames": { - "shape": "S25" - }, - "Deployed": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "DescribeSuggestersResult", - "type": "structure", - "required": [ - "Suggesters" - ], - "members": { - "Suggesters": { - "type": "list", - "member": { - "shape": "S1t" - } - } - } - } - }, - "IndexDocuments": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "resultWrapper": "IndexDocumentsResult", - "type": "structure", - "members": { - "FieldNames": { - "shape": "S4" - } - } - } - }, - "ListDomainNames": { - "output": { - "resultWrapper": "ListDomainNamesResult", - "type": "structure", - "members": { - "DomainNames": { - "type": "map", - "key": {}, - "value": {} - } - } - } - }, - "UpdateAvailabilityOptions": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "MultiAZ" - ], - "members": { - "DomainName": {}, - "MultiAZ": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "UpdateAvailabilityOptionsResult", - "type": "structure", - "members": { - "AvailabilityOptions": { - "shape": "S2a" - } - } - } - }, - "UpdateScalingParameters": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "ScalingParameters" - ], - "members": { - "DomainName": {}, - "ScalingParameters": { - "shape": "S2q" - } - } - }, - "output": { - "resultWrapper": "UpdateScalingParametersResult", - "type": "structure", - "required": [ - "ScalingParameters" - ], - "members": { - "ScalingParameters": { - "shape": "S2p" - } - } - } - }, - "UpdateServiceAccessPolicies": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "AccessPolicies" - ], - "members": { - "DomainName": {}, - "AccessPolicies": {} - } - }, - "output": { - "resultWrapper": "UpdateServiceAccessPoliciesResult", - "type": "structure", - "required": [ - "AccessPolicies" - ], - "members": { - "AccessPolicies": { - "shape": "S2u" - } - } - } - } - }, - "shapes": { - "S4": { - "type": "list", - "member": {} - }, - "S8": { - "type": "structure", - "required": [ - "DomainId", - "DomainName", - "RequiresIndexDocuments" - ], - "members": { - "DomainId": {}, - "DomainName": {}, - "ARN": {}, - "Created": { - "type": "boolean" - }, - "Deleted": { - "type": "boolean" - }, - "DocService": { - "shape": "Sc" - }, - "SearchService": { - "shape": "Sc" - }, - "RequiresIndexDocuments": { - "type": "boolean" - }, - "Processing": { - "type": "boolean" - }, - "SearchInstanceType": {}, - "SearchPartitionCount": { - "type": "integer" - }, - "SearchInstanceCount": { - "type": "integer" - }, - "Limits": { - "type": "structure", - "required": [ - "MaximumReplicationCount", - "MaximumPartitionCount" - ], - "members": { - "MaximumReplicationCount": { - "type": "integer" - }, - "MaximumPartitionCount": { - "type": "integer" - } - } - } - } - }, - "Sc": { - "type": "structure", - "members": { - "Endpoint": {} - } - }, - "Sl": { - "type": "structure", - "required": [ - "AnalysisSchemeName", - "AnalysisSchemeLanguage" - ], - "members": { - "AnalysisSchemeName": {}, - "AnalysisSchemeLanguage": {}, - "AnalysisOptions": { - "type": "structure", - "members": { - "Synonyms": {}, - "Stopwords": {}, - "StemmingDictionary": {}, - "JapaneseTokenizationDictionary": {}, - "AlgorithmicStemming": {} - } - } - } - }, - "Ss": { - "type": "structure", - "required": [ - "Options", - "Status" - ], - "members": { - "Options": { - "shape": "Sl" - }, - "Status": { - "shape": "St" - } - } - }, - "St": { - "type": "structure", - "required": [ - "CreationDate", - "UpdateDate", - "State" - ], - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - }, - "Sy": { - "type": "structure", - "required": [ - "ExpressionName", - "ExpressionValue" - ], - "members": { - "ExpressionName": {}, - "ExpressionValue": {} - } - }, - "S11": { - "type": "structure", - "required": [ - "Options", - "Status" - ], - "members": { - "Options": { - "shape": "Sy" - }, - "Status": { - "shape": "St" - } - } - }, - "S13": { - "type": "structure", - "required": [ - "IndexFieldName", - "IndexFieldType" - ], - "members": { - "IndexFieldName": {}, - "IndexFieldType": {}, - "IntOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "long" - }, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "DoubleOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "double" - }, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "LiteralOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "TextOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceField": {}, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - }, - "HighlightEnabled": { - "type": "boolean" - }, - "AnalysisScheme": {} - } - }, - "DateOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "LatLonOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "IntArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "long" - }, - "SourceFields": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - } - } - }, - "DoubleArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "double" - }, - "SourceFields": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - } - } - }, - "LiteralArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceFields": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - } - } - }, - "TextArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceFields": {}, - "ReturnEnabled": { - "type": "boolean" - }, - "HighlightEnabled": { - "type": "boolean" - }, - "AnalysisScheme": {} - } - }, - "DateArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceFields": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - } - } - } - } - }, - "S1n": { - "type": "structure", - "required": [ - "Options", - "Status" - ], - "members": { - "Options": { - "shape": "S13" - }, - "Status": { - "shape": "St" - } - } - }, - "S1p": { - "type": "structure", - "required": [ - "SuggesterName", - "DocumentSuggesterOptions" - ], - "members": { - "SuggesterName": {}, - "DocumentSuggesterOptions": { - "type": "structure", - "required": [ - "SourceField" - ], - "members": { - "SourceField": {}, - "FuzzyMatching": {}, - "SortExpression": {} - } - } - } - }, - "S1t": { - "type": "structure", - "required": [ - "Options", - "Status" - ], - "members": { - "Options": { - "shape": "S1p" - }, - "Status": { - "shape": "St" - } - } - }, - "S25": { - "type": "list", - "member": {} - }, - "S2a": { - "type": "structure", - "required": [ - "Options", - "Status" - ], - "members": { - "Options": { - "type": "boolean" - }, - "Status": { - "shape": "St" - } - } - }, - "S2p": { - "type": "structure", - "required": [ - "Options", - "Status" - ], - "members": { - "Options": { - "shape": "S2q" - }, - "Status": { - "shape": "St" - } - } - }, - "S2q": { - "type": "structure", - "members": { - "DesiredInstanceType": {}, - "DesiredReplicationCount": { - "type": "integer" - }, - "DesiredPartitionCount": { - "type": "integer" - } - } - }, - "S2u": { - "type": "structure", - "required": [ - "Options", - "Status" - ], - "members": { - "Options": {}, - "Status": { - "shape": "St" - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/cloudsearch-2013-01-01.paginators.json b/cli/node_modules/aws-sdk/apis/cloudsearch-2013-01-01.paginators.json deleted file mode 100644 index 82fa804ab..000000000 --- a/cli/node_modules/aws-sdk/apis/cloudsearch-2013-01-01.paginators.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "pagination": { - "DescribeAnalysisSchemes": { - "result_key": "AnalysisSchemes" - }, - "DescribeDomains": { - "result_key": "DomainStatusList" - }, - "DescribeExpressions": { - "result_key": "Expressions" - }, - "DescribeIndexFields": { - "result_key": "IndexFields" - }, - "DescribeSuggesters": { - "result_key": "Suggesters" - } - } -} - diff --git a/cli/node_modules/aws-sdk/apis/cloudsearchdomain-2013-01-01.min.json b/cli/node_modules/aws-sdk/apis/cloudsearchdomain-2013-01-01.min.json deleted file mode 100644 index 260e043e7..000000000 --- a/cli/node_modules/aws-sdk/apis/cloudsearchdomain-2013-01-01.min.json +++ /dev/null @@ -1,266 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2013-01-01", - "endpointPrefix": "cloudsearchdomain", - "jsonVersion": "1.1", - "serviceFullName": "Amazon CloudSearch Domain", - "signatureVersion": "v4", - "signingName": "cloudsearch", - "protocol": "rest-json" - }, - "operations": { - "Search": { - "http": { - "method": "GET", - "requestUri": "/2013-01-01/search?format=sdk&pretty=true" - }, - "input": { - "type": "structure", - "required": [ - "query" - ], - "members": { - "cursor": { - "location": "querystring", - "locationName": "cursor" - }, - "expr": { - "location": "querystring", - "locationName": "expr" - }, - "facet": { - "location": "querystring", - "locationName": "facet" - }, - "filterQuery": { - "location": "querystring", - "locationName": "fq" - }, - "highlight": { - "location": "querystring", - "locationName": "highlight" - }, - "partial": { - "location": "querystring", - "locationName": "partial", - "type": "boolean" - }, - "query": { - "location": "querystring", - "locationName": "q" - }, - "queryOptions": { - "location": "querystring", - "locationName": "q.options" - }, - "queryParser": { - "location": "querystring", - "locationName": "q.parser" - }, - "return": { - "location": "querystring", - "locationName": "return" - }, - "size": { - "location": "querystring", - "locationName": "size", - "type": "long" - }, - "sort": { - "location": "querystring", - "locationName": "sort" - }, - "start": { - "location": "querystring", - "locationName": "start", - "type": "long" - } - } - }, - "output": { - "type": "structure", - "members": { - "status": { - "type": "structure", - "members": { - "timems": { - "type": "long" - }, - "rid": {} - } - }, - "hits": { - "type": "structure", - "members": { - "found": { - "type": "long" - }, - "start": { - "type": "long" - }, - "cursor": {}, - "hit": { - "type": "list", - "member": { - "type": "structure", - "members": { - "id": {}, - "fields": { - "type": "map", - "key": {}, - "value": { - "type": "list", - "member": {} - } - }, - "exprs": { - "type": "map", - "key": {}, - "value": {} - }, - "highlights": { - "type": "map", - "key": {}, - "value": {} - } - } - } - } - } - }, - "facets": { - "type": "map", - "key": {}, - "value": { - "type": "structure", - "members": { - "buckets": { - "type": "list", - "member": { - "type": "structure", - "members": { - "value": {}, - "count": { - "type": "long" - } - } - } - } - } - } - } - } - } - }, - "Suggest": { - "http": { - "method": "GET", - "requestUri": "/2013-01-01/suggest?format=sdk&pretty=true" - }, - "input": { - "type": "structure", - "required": [ - "query", - "suggester" - ], - "members": { - "query": { - "location": "querystring", - "locationName": "q" - }, - "suggester": { - "location": "querystring", - "locationName": "suggester" - }, - "size": { - "location": "querystring", - "locationName": "size", - "type": "long" - } - } - }, - "output": { - "type": "structure", - "members": { - "status": { - "type": "structure", - "members": { - "timems": { - "type": "long" - }, - "rid": {} - } - }, - "suggest": { - "type": "structure", - "members": { - "query": {}, - "found": { - "type": "long" - }, - "suggestions": { - "type": "list", - "member": { - "type": "structure", - "members": { - "suggestion": {}, - "score": { - "type": "long" - }, - "id": {} - } - } - } - } - } - } - } - }, - "UploadDocuments": { - "http": { - "requestUri": "/2013-01-01/documents/batch?format=sdk" - }, - "input": { - "type": "structure", - "required": [ - "documents", - "contentType" - ], - "members": { - "documents": { - "type": "blob", - "streaming": true - }, - "contentType": { - "location": "header", - "locationName": "Content-Type" - } - }, - "payload": "documents" - }, - "output": { - "type": "structure", - "members": { - "status": {}, - "adds": { - "type": "long" - }, - "deletes": { - "type": "long" - }, - "warnings": { - "type": "list", - "member": { - "type": "structure", - "members": { - "message": {} - } - } - } - } - } - } - }, - "shapes": {} -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/cloudtrail-2013-11-01.min.json b/cli/node_modules/aws-sdk/apis/cloudtrail-2013-11-01.min.json deleted file mode 100644 index 2075f3812..000000000 --- a/cli/node_modules/aws-sdk/apis/cloudtrail-2013-11-01.min.json +++ /dev/null @@ -1,260 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2013-11-01", - "endpointPrefix": "cloudtrail", - "jsonVersion": "1.1", - "serviceAbbreviation": "CloudTrail", - "serviceFullName": "AWS CloudTrail", - "signatureVersion": "v4", - "targetPrefix": "com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101", - "protocol": "json" - }, - "operations": { - "CreateTrail": { - "input": { - "type": "structure", - "required": [ - "Name", - "S3BucketName" - ], - "members": { - "Name": {}, - "S3BucketName": {}, - "S3KeyPrefix": {}, - "SnsTopicName": {}, - "IncludeGlobalServiceEvents": { - "type": "boolean" - }, - "CloudWatchLogsLogGroupArn": {}, - "CloudWatchLogsRoleArn": {} - } - }, - "output": { - "type": "structure", - "members": { - "Name": {}, - "S3BucketName": {}, - "S3KeyPrefix": {}, - "SnsTopicName": {}, - "IncludeGlobalServiceEvents": { - "type": "boolean" - }, - "CloudWatchLogsLogGroupArn": {}, - "CloudWatchLogsRoleArn": {} - } - } - }, - "DeleteTrail": { - "input": { - "type": "structure", - "required": [ - "Name" - ], - "members": { - "Name": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "DescribeTrails": { - "input": { - "type": "structure", - "members": { - "trailNameList": { - "type": "list", - "member": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "trailList": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Name": {}, - "S3BucketName": {}, - "S3KeyPrefix": {}, - "SnsTopicName": {}, - "IncludeGlobalServiceEvents": { - "type": "boolean" - }, - "CloudWatchLogsLogGroupArn": {}, - "CloudWatchLogsRoleArn": {} - } - } - } - } - } - }, - "GetTrailStatus": { - "input": { - "type": "structure", - "required": [ - "Name" - ], - "members": { - "Name": {} - } - }, - "output": { - "type": "structure", - "members": { - "IsLogging": { - "type": "boolean" - }, - "LatestDeliveryError": {}, - "LatestNotificationError": {}, - "LatestDeliveryTime": { - "type": "timestamp" - }, - "LatestNotificationTime": { - "type": "timestamp" - }, - "StartLoggingTime": { - "type": "timestamp" - }, - "StopLoggingTime": { - "type": "timestamp" - }, - "LatestCloudWatchLogsDeliveryError": {}, - "LatestCloudWatchLogsDeliveryTime": { - "type": "timestamp" - } - } - } - }, - "LookupEvents": { - "input": { - "type": "structure", - "members": { - "LookupAttributes": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "AttributeKey", - "AttributeValue" - ], - "members": { - "AttributeKey": {}, - "AttributeValue": {} - } - } - }, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "MaxResults": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "Events": { - "type": "list", - "member": { - "type": "structure", - "members": { - "EventId": {}, - "EventName": {}, - "EventTime": { - "type": "timestamp" - }, - "Username": {}, - "Resources": { - "type": "list", - "member": { - "type": "structure", - "members": { - "ResourceType": {}, - "ResourceName": {} - } - } - }, - "CloudTrailEvent": {} - } - } - }, - "NextToken": {} - } - } - }, - "StartLogging": { - "input": { - "type": "structure", - "required": [ - "Name" - ], - "members": { - "Name": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "StopLogging": { - "input": { - "type": "structure", - "required": [ - "Name" - ], - "members": { - "Name": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "UpdateTrail": { - "input": { - "type": "structure", - "required": [ - "Name" - ], - "members": { - "Name": {}, - "S3BucketName": {}, - "S3KeyPrefix": {}, - "SnsTopicName": {}, - "IncludeGlobalServiceEvents": { - "type": "boolean" - }, - "CloudWatchLogsLogGroupArn": {}, - "CloudWatchLogsRoleArn": {} - } - }, - "output": { - "type": "structure", - "members": { - "Name": {}, - "S3BucketName": {}, - "S3KeyPrefix": {}, - "SnsTopicName": {}, - "IncludeGlobalServiceEvents": { - "type": "boolean" - }, - "CloudWatchLogsLogGroupArn": {}, - "CloudWatchLogsRoleArn": {} - } - } - } - }, - "shapes": {} -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/cloudtrail-2013-11-01.paginators.json b/cli/node_modules/aws-sdk/apis/cloudtrail-2013-11-01.paginators.json deleted file mode 100644 index a11f43616..000000000 --- a/cli/node_modules/aws-sdk/apis/cloudtrail-2013-11-01.paginators.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "pagination": { - "DescribeTrails": { - "result_key": "trailList" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/codecommit-2015-04-13.min.json b/cli/node_modules/aws-sdk/apis/codecommit-2015-04-13.min.json deleted file mode 100644 index deab1700e..000000000 --- a/cli/node_modules/aws-sdk/apis/codecommit-2015-04-13.min.json +++ /dev/null @@ -1,243 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2015-04-13", - "endpointPrefix": "codecommit", - "jsonVersion": "1.1", - "serviceAbbreviation": "CodeCommit", - "serviceFullName": "AWS CodeCommit", - "signatureVersion": "v4", - "targetPrefix": "CodeCommit_20150413", - "protocol": "json" - }, - "operations": { - "BatchGetRepositories": { - "input": { - "type": "structure", - "required": [ - "repositoryNames" - ], - "members": { - "repositoryNames": { - "type": "list", - "member": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "repositories": { - "type": "list", - "member": { - "shape": "S6" - } - }, - "repositoriesNotFound": { - "type": "list", - "member": {} - } - } - } - }, - "CreateBranch": { - "input": { - "type": "structure", - "required": [ - "repositoryName", - "branchName", - "commitId" - ], - "members": { - "repositoryName": {}, - "branchName": {}, - "commitId": {} - } - } - }, - "CreateRepository": { - "input": { - "type": "structure", - "required": [ - "repositoryName" - ], - "members": { - "repositoryName": {}, - "repositoryDescription": {} - } - }, - "output": { - "type": "structure", - "members": { - "repositoryMetadata": { - "shape": "S6" - } - } - } - }, - "DeleteRepository": { - "input": { - "type": "structure", - "required": [ - "repositoryName" - ], - "members": { - "repositoryName": {} - } - }, - "output": { - "type": "structure", - "members": { - "repositoryId": {} - } - } - }, - "GetBranch": { - "input": { - "type": "structure", - "members": { - "repositoryName": {}, - "branchName": {} - } - }, - "output": { - "type": "structure", - "members": { - "branch": { - "type": "structure", - "members": { - "branchName": {}, - "commitId": {} - } - } - } - } - }, - "GetRepository": { - "input": { - "type": "structure", - "required": [ - "repositoryName" - ], - "members": { - "repositoryName": {} - } - }, - "output": { - "type": "structure", - "members": { - "repositoryMetadata": { - "shape": "S6" - } - } - } - }, - "ListBranches": { - "input": { - "type": "structure", - "required": [ - "repositoryName" - ], - "members": { - "repositoryName": {}, - "nextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "branches": { - "type": "list", - "member": {} - }, - "nextToken": {} - } - } - }, - "ListRepositories": { - "input": { - "type": "structure", - "members": { - "nextToken": {}, - "sortBy": {}, - "order": {} - } - }, - "output": { - "type": "structure", - "members": { - "repositories": { - "type": "list", - "member": { - "type": "structure", - "members": { - "repositoryName": {}, - "repositoryId": {} - } - } - }, - "nextToken": {} - } - } - }, - "UpdateDefaultBranch": { - "input": { - "type": "structure", - "required": [ - "repositoryName", - "defaultBranchName" - ], - "members": { - "repositoryName": {}, - "defaultBranchName": {} - } - } - }, - "UpdateRepositoryDescription": { - "input": { - "type": "structure", - "required": [ - "repositoryName" - ], - "members": { - "repositoryName": {}, - "repositoryDescription": {} - } - } - }, - "UpdateRepositoryName": { - "input": { - "type": "structure", - "required": [ - "oldName", - "newName" - ], - "members": { - "oldName": {}, - "newName": {} - } - } - } - }, - "shapes": { - "S6": { - "type": "structure", - "members": { - "accountId": {}, - "repositoryId": {}, - "repositoryName": {}, - "repositoryDescription": {}, - "defaultBranch": {}, - "lastModifiedDate": { - "type": "timestamp" - }, - "creationDate": { - "type": "timestamp" - }, - "cloneUrlHttp": {}, - "cloneUrlSsh": {}, - "Arn": {} - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/codecommit-2015-04-13.paginators.json b/cli/node_modules/aws-sdk/apis/codecommit-2015-04-13.paginators.json deleted file mode 100644 index e4c9a9038..000000000 --- a/cli/node_modules/aws-sdk/apis/codecommit-2015-04-13.paginators.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "pagination": { - "ListBranches": { - "input_token": "nextToken", - "output_token": "nextToken", - "result_key": "branches" - }, - "ListRepositories": { - "input_token": "nextToken", - "output_token": "nextToken", - "result_key": "repositories" - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/codedeploy-2014-10-06.min.json b/cli/node_modules/aws-sdk/apis/codedeploy-2014-10-06.min.json deleted file mode 100644 index d5aa21ab1..000000000 --- a/cli/node_modules/aws-sdk/apis/codedeploy-2014-10-06.min.json +++ /dev/null @@ -1,919 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2014-10-06", - "endpointPrefix": "codedeploy", - "jsonVersion": "1.1", - "serviceAbbreviation": "codedeploy", - "serviceFullName": "AWS CodeDeploy", - "signatureVersion": "v4", - "targetPrefix": "CodeDeploy_20141006", - "timestampFormat": "unixTimestamp", - "protocol": "json" - }, - "operations": { - "AddTagsToOnPremisesInstances": { - "input": { - "type": "structure", - "required": [ - "tags", - "instanceNames" - ], - "members": { - "tags": { - "shape": "S2" - }, - "instanceNames": { - "shape": "S6" - } - } - } - }, - "BatchGetApplications": { - "input": { - "type": "structure", - "members": { - "applicationNames": { - "shape": "S9" - } - } - }, - "output": { - "type": "structure", - "members": { - "applicationsInfo": { - "type": "list", - "member": { - "shape": "Sd" - } - } - } - } - }, - "BatchGetDeployments": { - "input": { - "type": "structure", - "members": { - "deploymentIds": { - "shape": "Si" - } - } - }, - "output": { - "type": "structure", - "members": { - "deploymentsInfo": { - "type": "list", - "member": { - "shape": "Sm" - } - } - } - } - }, - "BatchGetOnPremisesInstances": { - "input": { - "type": "structure", - "members": { - "instanceNames": { - "shape": "S6" - } - } - }, - "output": { - "type": "structure", - "members": { - "instanceInfos": { - "type": "list", - "member": { - "shape": "S1b" - } - } - } - } - }, - "CreateApplication": { - "input": { - "type": "structure", - "required": [ - "applicationName" - ], - "members": { - "applicationName": {} - } - }, - "output": { - "type": "structure", - "members": { - "applicationId": {} - } - } - }, - "CreateDeployment": { - "input": { - "type": "structure", - "required": [ - "applicationName" - ], - "members": { - "applicationName": {}, - "deploymentGroupName": {}, - "revision": { - "shape": "Sp" - }, - "deploymentConfigName": {}, - "description": {}, - "ignoreApplicationStopFailures": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "deploymentId": {} - } - } - }, - "CreateDeploymentConfig": { - "input": { - "type": "structure", - "required": [ - "deploymentConfigName" - ], - "members": { - "deploymentConfigName": {}, - "minimumHealthyHosts": { - "shape": "S1j" - } - } - }, - "output": { - "type": "structure", - "members": { - "deploymentConfigId": {} - } - } - }, - "CreateDeploymentGroup": { - "input": { - "type": "structure", - "required": [ - "applicationName", - "deploymentGroupName", - "serviceRoleArn" - ], - "members": { - "applicationName": {}, - "deploymentGroupName": {}, - "deploymentConfigName": {}, - "ec2TagFilters": { - "shape": "S1p" - }, - "onPremisesInstanceTagFilters": { - "shape": "S1s" - }, - "autoScalingGroups": { - "shape": "S1v" - }, - "serviceRoleArn": {} - } - }, - "output": { - "type": "structure", - "members": { - "deploymentGroupId": {} - } - } - }, - "DeleteApplication": { - "input": { - "type": "structure", - "required": [ - "applicationName" - ], - "members": { - "applicationName": {} - } - } - }, - "DeleteDeploymentConfig": { - "input": { - "type": "structure", - "required": [ - "deploymentConfigName" - ], - "members": { - "deploymentConfigName": {} - } - } - }, - "DeleteDeploymentGroup": { - "input": { - "type": "structure", - "required": [ - "applicationName", - "deploymentGroupName" - ], - "members": { - "applicationName": {}, - "deploymentGroupName": {} - } - }, - "output": { - "type": "structure", - "members": { - "hooksNotCleanedUp": { - "shape": "S24" - } - } - } - }, - "DeregisterOnPremisesInstance": { - "input": { - "type": "structure", - "required": [ - "instanceName" - ], - "members": { - "instanceName": {} - } - } - }, - "GetApplication": { - "input": { - "type": "structure", - "required": [ - "applicationName" - ], - "members": { - "applicationName": {} - } - }, - "output": { - "type": "structure", - "members": { - "application": { - "shape": "Sd" - } - } - } - }, - "GetApplicationRevision": { - "input": { - "type": "structure", - "required": [ - "applicationName", - "revision" - ], - "members": { - "applicationName": {}, - "revision": { - "shape": "Sp" - } - } - }, - "output": { - "type": "structure", - "members": { - "applicationName": {}, - "revision": { - "shape": "Sp" - }, - "revisionInfo": { - "type": "structure", - "members": { - "description": {}, - "deploymentGroups": { - "shape": "S2d" - }, - "firstUsedTime": { - "type": "timestamp" - }, - "lastUsedTime": { - "type": "timestamp" - }, - "registerTime": { - "type": "timestamp" - } - } - } - } - } - }, - "GetDeployment": { - "input": { - "type": "structure", - "required": [ - "deploymentId" - ], - "members": { - "deploymentId": {} - } - }, - "output": { - "type": "structure", - "members": { - "deploymentInfo": { - "shape": "Sm" - } - } - } - }, - "GetDeploymentConfig": { - "input": { - "type": "structure", - "required": [ - "deploymentConfigName" - ], - "members": { - "deploymentConfigName": {} - } - }, - "output": { - "type": "structure", - "members": { - "deploymentConfigInfo": { - "type": "structure", - "members": { - "deploymentConfigId": {}, - "deploymentConfigName": {}, - "minimumHealthyHosts": { - "shape": "S1j" - }, - "createTime": { - "type": "timestamp" - } - } - } - } - } - }, - "GetDeploymentGroup": { - "input": { - "type": "structure", - "required": [ - "applicationName", - "deploymentGroupName" - ], - "members": { - "applicationName": {}, - "deploymentGroupName": {} - } - }, - "output": { - "type": "structure", - "members": { - "deploymentGroupInfo": { - "type": "structure", - "members": { - "applicationName": {}, - "deploymentGroupId": {}, - "deploymentGroupName": {}, - "deploymentConfigName": {}, - "ec2TagFilters": { - "shape": "S1p" - }, - "onPremisesInstanceTagFilters": { - "shape": "S1s" - }, - "autoScalingGroups": { - "shape": "S24" - }, - "serviceRoleArn": {}, - "targetRevision": { - "shape": "Sp" - } - } - } - } - } - }, - "GetDeploymentInstance": { - "input": { - "type": "structure", - "required": [ - "deploymentId", - "instanceId" - ], - "members": { - "deploymentId": {}, - "instanceId": {} - } - }, - "output": { - "type": "structure", - "members": { - "instanceSummary": { - "type": "structure", - "members": { - "deploymentId": {}, - "instanceId": {}, - "status": {}, - "lastUpdatedAt": { - "type": "timestamp" - }, - "lifecycleEvents": { - "type": "list", - "member": { - "type": "structure", - "members": { - "lifecycleEventName": {}, - "diagnostics": { - "type": "structure", - "members": { - "errorCode": {}, - "scriptName": {}, - "message": {}, - "logTail": {} - } - }, - "startTime": { - "type": "timestamp" - }, - "endTime": { - "type": "timestamp" - }, - "status": {} - } - } - } - } - } - } - } - }, - "GetOnPremisesInstance": { - "input": { - "type": "structure", - "required": [ - "instanceName" - ], - "members": { - "instanceName": {} - } - }, - "output": { - "type": "structure", - "members": { - "instanceInfo": { - "shape": "S1b" - } - } - } - }, - "ListApplicationRevisions": { - "input": { - "type": "structure", - "required": [ - "applicationName" - ], - "members": { - "applicationName": {}, - "sortBy": {}, - "sortOrder": {}, - "s3Bucket": {}, - "s3KeyPrefix": {}, - "deployed": {}, - "nextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "revisions": { - "type": "list", - "member": { - "shape": "Sp" - } - }, - "nextToken": {} - } - } - }, - "ListApplications": { - "input": { - "type": "structure", - "members": { - "nextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "applications": { - "shape": "S9" - }, - "nextToken": {} - } - } - }, - "ListDeploymentConfigs": { - "input": { - "type": "structure", - "members": { - "nextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "deploymentConfigsList": { - "type": "list", - "member": {} - }, - "nextToken": {} - } - } - }, - "ListDeploymentGroups": { - "input": { - "type": "structure", - "required": [ - "applicationName" - ], - "members": { - "applicationName": {}, - "nextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "applicationName": {}, - "deploymentGroups": { - "shape": "S2d" - }, - "nextToken": {} - } - } - }, - "ListDeploymentInstances": { - "input": { - "type": "structure", - "required": [ - "deploymentId" - ], - "members": { - "deploymentId": {}, - "nextToken": {}, - "instanceStatusFilter": { - "type": "list", - "member": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "instancesList": { - "type": "list", - "member": {} - }, - "nextToken": {} - } - } - }, - "ListDeployments": { - "input": { - "type": "structure", - "members": { - "applicationName": {}, - "deploymentGroupName": {}, - "includeOnlyStatuses": { - "type": "list", - "member": {} - }, - "createTimeRange": { - "type": "structure", - "members": { - "start": { - "type": "timestamp" - }, - "end": { - "type": "timestamp" - } - } - }, - "nextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "deployments": { - "shape": "Si" - }, - "nextToken": {} - } - } - }, - "ListOnPremisesInstances": { - "input": { - "type": "structure", - "members": { - "registrationStatus": {}, - "tagFilters": { - "shape": "S1s" - }, - "nextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "instanceNames": { - "shape": "S6" - }, - "nextToken": {} - } - } - }, - "RegisterApplicationRevision": { - "input": { - "type": "structure", - "required": [ - "applicationName", - "revision" - ], - "members": { - "applicationName": {}, - "description": {}, - "revision": { - "shape": "Sp" - } - } - } - }, - "RegisterOnPremisesInstance": { - "input": { - "type": "structure", - "required": [ - "instanceName", - "iamUserArn" - ], - "members": { - "instanceName": {}, - "iamUserArn": {} - } - } - }, - "RemoveTagsFromOnPremisesInstances": { - "input": { - "type": "structure", - "required": [ - "tags", - "instanceNames" - ], - "members": { - "tags": { - "shape": "S2" - }, - "instanceNames": { - "shape": "S6" - } - } - } - }, - "StopDeployment": { - "input": { - "type": "structure", - "required": [ - "deploymentId" - ], - "members": { - "deploymentId": {} - } - }, - "output": { - "type": "structure", - "members": { - "status": {}, - "statusMessage": {} - } - } - }, - "UpdateApplication": { - "input": { - "type": "structure", - "members": { - "applicationName": {}, - "newApplicationName": {} - } - } - }, - "UpdateDeploymentGroup": { - "input": { - "type": "structure", - "required": [ - "applicationName", - "currentDeploymentGroupName" - ], - "members": { - "applicationName": {}, - "currentDeploymentGroupName": {}, - "newDeploymentGroupName": {}, - "deploymentConfigName": {}, - "ec2TagFilters": { - "shape": "S1p" - }, - "onPremisesInstanceTagFilters": { - "shape": "S1s" - }, - "autoScalingGroups": { - "shape": "S1v" - }, - "serviceRoleArn": {} - } - }, - "output": { - "type": "structure", - "members": { - "hooksNotCleanedUp": { - "shape": "S24" - } - } - } - } - }, - "shapes": { - "S2": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - }, - "S6": { - "type": "list", - "member": {} - }, - "S9": { - "type": "list", - "member": {} - }, - "Sd": { - "type": "structure", - "members": { - "applicationId": {}, - "applicationName": {}, - "createTime": { - "type": "timestamp" - }, - "linkedToGitHub": { - "type": "boolean" - } - } - }, - "Si": { - "type": "list", - "member": {} - }, - "Sm": { - "type": "structure", - "members": { - "applicationName": {}, - "deploymentGroupName": {}, - "deploymentConfigName": {}, - "deploymentId": {}, - "revision": { - "shape": "Sp" - }, - "status": {}, - "errorInformation": { - "type": "structure", - "members": { - "code": {}, - "message": {} - } - }, - "createTime": { - "type": "timestamp" - }, - "startTime": { - "type": "timestamp" - }, - "completeTime": { - "type": "timestamp" - }, - "deploymentOverview": { - "type": "structure", - "members": { - "Pending": { - "type": "long" - }, - "InProgress": { - "type": "long" - }, - "Succeeded": { - "type": "long" - }, - "Failed": { - "type": "long" - }, - "Skipped": { - "type": "long" - } - } - }, - "description": {}, - "creator": {}, - "ignoreApplicationStopFailures": { - "type": "boolean" - } - } - }, - "Sp": { - "type": "structure", - "members": { - "revisionType": {}, - "s3Location": { - "type": "structure", - "members": { - "bucket": {}, - "key": {}, - "bundleType": {}, - "version": {}, - "eTag": {} - } - }, - "gitHubLocation": { - "type": "structure", - "members": { - "repository": {}, - "commitId": {} - } - } - } - }, - "S1b": { - "type": "structure", - "members": { - "instanceName": {}, - "iamUserArn": {}, - "instanceArn": {}, - "registerTime": { - "type": "timestamp" - }, - "deregisterTime": { - "type": "timestamp" - }, - "tags": { - "shape": "S2" - } - } - }, - "S1j": { - "type": "structure", - "members": { - "value": { - "type": "integer" - }, - "type": {} - } - }, - "S1p": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Key": {}, - "Value": {}, - "Type": {} - } - } - }, - "S1s": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Key": {}, - "Value": {}, - "Type": {} - } - } - }, - "S1v": { - "type": "list", - "member": {} - }, - "S24": { - "type": "list", - "member": { - "type": "structure", - "members": { - "name": {}, - "hook": {} - } - } - }, - "S2d": { - "type": "list", - "member": {} - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/codepipeline-2015-07-09.min.json b/cli/node_modules/aws-sdk/apis/codepipeline-2015-07-09.min.json deleted file mode 100644 index d80c56b61..000000000 --- a/cli/node_modules/aws-sdk/apis/codepipeline-2015-07-09.min.json +++ /dev/null @@ -1,956 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2015-07-09", - "endpointPrefix": "codepipeline", - "jsonVersion": "1.1", - "serviceAbbreviation": "CodePipeline", - "serviceFullName": "AWS CodePipeline", - "signatureVersion": "v4", - "targetPrefix": "CodePipeline_20150709", - "protocol": "json" - }, - "operations": { - "AcknowledgeJob": { - "input": { - "type": "structure", - "required": [ - "jobId", - "nonce" - ], - "members": { - "jobId": {}, - "nonce": {} - } - }, - "output": { - "type": "structure", - "members": { - "status": {} - } - } - }, - "AcknowledgeThirdPartyJob": { - "input": { - "type": "structure", - "required": [ - "jobId", - "nonce", - "clientToken" - ], - "members": { - "jobId": {}, - "nonce": {}, - "clientToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "status": {} - } - } - }, - "CreateCustomActionType": { - "input": { - "type": "structure", - "required": [ - "category", - "provider", - "version", - "inputArtifactDetails", - "outputArtifactDetails" - ], - "members": { - "category": {}, - "provider": {}, - "version": {}, - "settings": { - "shape": "Se" - }, - "configurationProperties": { - "shape": "Sh" - }, - "inputArtifactDetails": { - "shape": "Sn" - }, - "outputArtifactDetails": { - "shape": "Sn" - } - } - }, - "output": { - "type": "structure", - "required": [ - "actionType" - ], - "members": { - "actionType": { - "shape": "Sr" - } - } - } - }, - "CreatePipeline": { - "input": { - "type": "structure", - "required": [ - "pipeline" - ], - "members": { - "pipeline": { - "shape": "Sv" - } - } - }, - "output": { - "type": "structure", - "members": { - "pipeline": { - "shape": "Sv" - } - } - } - }, - "DeleteCustomActionType": { - "input": { - "type": "structure", - "required": [ - "category", - "provider", - "version" - ], - "members": { - "category": {}, - "provider": {}, - "version": {} - } - } - }, - "DeletePipeline": { - "input": { - "type": "structure", - "required": [ - "name" - ], - "members": { - "name": {} - } - } - }, - "DisableStageTransition": { - "input": { - "type": "structure", - "required": [ - "pipelineName", - "stageName", - "transitionType", - "reason" - ], - "members": { - "pipelineName": {}, - "stageName": {}, - "transitionType": {}, - "reason": {} - } - } - }, - "EnableStageTransition": { - "input": { - "type": "structure", - "required": [ - "pipelineName", - "stageName", - "transitionType" - ], - "members": { - "pipelineName": {}, - "stageName": {}, - "transitionType": {} - } - } - }, - "GetJobDetails": { - "input": { - "type": "structure", - "required": [ - "jobId" - ], - "members": { - "jobId": {} - } - }, - "output": { - "type": "structure", - "members": { - "jobDetails": { - "type": "structure", - "members": { - "id": {}, - "data": { - "shape": "S1u" - }, - "accountId": {} - } - } - } - } - }, - "GetPipeline": { - "input": { - "type": "structure", - "required": [ - "name" - ], - "members": { - "name": {}, - "version": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "pipeline": { - "shape": "Sv" - } - } - } - }, - "GetPipelineState": { - "input": { - "type": "structure", - "required": [ - "name" - ], - "members": { - "name": {} - } - }, - "output": { - "type": "structure", - "members": { - "pipelineName": {}, - "pipelineVersion": { - "type": "integer" - }, - "stageStates": { - "type": "list", - "member": { - "type": "structure", - "members": { - "stageName": {}, - "inboundTransitionState": { - "type": "structure", - "members": { - "enabled": { - "type": "boolean" - }, - "lastChangedBy": {}, - "lastChangedAt": { - "type": "timestamp" - }, - "disabledReason": {} - } - }, - "actionStates": { - "type": "list", - "member": { - "type": "structure", - "members": { - "actionName": {}, - "currentRevision": { - "shape": "S2p" - }, - "latestExecution": { - "type": "structure", - "members": { - "status": {}, - "summary": {}, - "lastStatusChange": { - "type": "timestamp" - }, - "externalExecutionId": {}, - "externalExecutionUrl": {}, - "percentComplete": { - "type": "integer" - }, - "errorDetails": { - "type": "structure", - "members": { - "code": {}, - "message": {} - } - } - } - }, - "entityUrl": {}, - "revisionUrl": {} - } - } - } - } - } - }, - "created": { - "type": "timestamp" - }, - "updated": { - "type": "timestamp" - } - } - } - }, - "GetThirdPartyJobDetails": { - "input": { - "type": "structure", - "required": [ - "jobId", - "clientToken" - ], - "members": { - "jobId": {}, - "clientToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "jobDetails": { - "type": "structure", - "members": { - "id": {}, - "data": { - "type": "structure", - "members": { - "actionTypeId": { - "shape": "Ss" - }, - "actionConfiguration": { - "shape": "S1v" - }, - "pipelineContext": { - "shape": "S1w" - }, - "inputArtifacts": { - "shape": "S1z" - }, - "outputArtifacts": { - "shape": "S1z" - }, - "artifactCredentials": { - "shape": "S27" - }, - "continuationToken": {} - } - }, - "nonce": {} - } - } - } - } - }, - "ListActionTypes": { - "input": { - "type": "structure", - "members": { - "actionOwnerFilter": {}, - "nextToken": {} - } - }, - "output": { - "type": "structure", - "required": [ - "actionTypes" - ], - "members": { - "actionTypes": { - "type": "list", - "member": { - "shape": "Sr" - } - }, - "nextToken": {} - } - } - }, - "ListPipelines": { - "input": { - "type": "structure", - "members": { - "nextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "pipelines": { - "type": "list", - "member": { - "type": "structure", - "members": { - "name": {}, - "version": { - "type": "integer" - }, - "created": { - "type": "timestamp" - }, - "updated": { - "type": "timestamp" - } - } - } - }, - "nextToken": {} - } - } - }, - "PollForJobs": { - "input": { - "type": "structure", - "required": [ - "actionTypeId" - ], - "members": { - "actionTypeId": { - "shape": "Ss" - }, - "maxBatchSize": { - "type": "integer" - }, - "queryParam": { - "type": "map", - "key": {}, - "value": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "jobs": { - "type": "list", - "member": { - "type": "structure", - "members": { - "id": {}, - "data": { - "shape": "S1u" - }, - "nonce": {}, - "accountId": {} - } - } - } - } - } - }, - "PollForThirdPartyJobs": { - "input": { - "type": "structure", - "required": [ - "actionTypeId" - ], - "members": { - "actionTypeId": { - "shape": "Ss" - }, - "maxBatchSize": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "jobs": { - "type": "list", - "member": { - "type": "structure", - "members": { - "clientId": {}, - "jobId": {} - } - } - } - } - } - }, - "PutActionRevision": { - "input": { - "type": "structure", - "required": [ - "pipelineName", - "stageName", - "actionName", - "actionRevision" - ], - "members": { - "pipelineName": {}, - "stageName": {}, - "actionName": {}, - "actionRevision": { - "shape": "S2p" - } - } - }, - "output": { - "type": "structure", - "members": { - "newRevision": { - "type": "boolean" - }, - "pipelineExecutionId": {} - } - } - }, - "PutJobFailureResult": { - "input": { - "type": "structure", - "required": [ - "jobId", - "failureDetails" - ], - "members": { - "jobId": {}, - "failureDetails": { - "shape": "S3t" - } - } - } - }, - "PutJobSuccessResult": { - "input": { - "type": "structure", - "required": [ - "jobId" - ], - "members": { - "jobId": {}, - "currentRevision": { - "shape": "S3w" - }, - "continuationToken": {}, - "executionDetails": { - "shape": "S3y" - } - } - } - }, - "PutThirdPartyJobFailureResult": { - "input": { - "type": "structure", - "required": [ - "jobId", - "clientToken", - "failureDetails" - ], - "members": { - "jobId": {}, - "clientToken": {}, - "failureDetails": { - "shape": "S3t" - } - } - } - }, - "PutThirdPartyJobSuccessResult": { - "input": { - "type": "structure", - "required": [ - "jobId", - "clientToken" - ], - "members": { - "jobId": {}, - "clientToken": {}, - "currentRevision": { - "shape": "S3w" - }, - "continuationToken": {}, - "executionDetails": { - "shape": "S3y" - } - } - } - }, - "StartPipelineExecution": { - "input": { - "type": "structure", - "required": [ - "name" - ], - "members": { - "name": {} - } - }, - "output": { - "type": "structure", - "members": { - "pipelineExecutionId": {} - } - } - }, - "UpdatePipeline": { - "input": { - "type": "structure", - "required": [ - "pipeline" - ], - "members": { - "pipeline": { - "shape": "Sv" - } - } - }, - "output": { - "type": "structure", - "members": { - "pipeline": { - "shape": "Sv" - } - } - } - } - }, - "shapes": { - "Se": { - "type": "structure", - "members": { - "thirdPartyConfigurationUrl": {}, - "entityUrlTemplate": {}, - "executionUrlTemplate": {}, - "revisionUrlTemplate": {} - } - }, - "Sh": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "name", - "required", - "key", - "secret" - ], - "members": { - "name": {}, - "required": { - "type": "boolean" - }, - "key": { - "type": "boolean" - }, - "secret": { - "type": "boolean" - }, - "queryable": { - "type": "boolean" - }, - "description": {}, - "type": {} - } - } - }, - "Sn": { - "type": "structure", - "required": [ - "minimumCount", - "maximumCount" - ], - "members": { - "minimumCount": { - "type": "integer" - }, - "maximumCount": { - "type": "integer" - } - } - }, - "Sr": { - "type": "structure", - "required": [ - "id", - "inputArtifactDetails", - "outputArtifactDetails" - ], - "members": { - "id": { - "shape": "Ss" - }, - "settings": { - "shape": "Se" - }, - "actionConfigurationProperties": { - "shape": "Sh" - }, - "inputArtifactDetails": { - "shape": "Sn" - }, - "outputArtifactDetails": { - "shape": "Sn" - } - } - }, - "Ss": { - "type": "structure", - "required": [ - "category", - "owner", - "provider", - "version" - ], - "members": { - "category": {}, - "owner": {}, - "provider": {}, - "version": {} - } - }, - "Sv": { - "type": "structure", - "required": [ - "name", - "roleArn", - "artifactStore", - "stages" - ], - "members": { - "name": {}, - "roleArn": {}, - "artifactStore": { - "type": "structure", - "required": [ - "type", - "location" - ], - "members": { - "type": {}, - "location": {} - } - }, - "stages": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "name", - "actions" - ], - "members": { - "name": {}, - "blockers": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "name", - "type" - ], - "members": { - "name": {}, - "type": {} - } - } - }, - "actions": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "name", - "actionTypeId" - ], - "members": { - "name": {}, - "actionTypeId": { - "shape": "Ss" - }, - "runOrder": { - "type": "integer" - }, - "configuration": { - "shape": "S1c" - }, - "outputArtifacts": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "name" - ], - "members": { - "name": {} - } - } - }, - "inputArtifacts": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "name" - ], - "members": { - "name": {} - } - } - }, - "roleArn": {} - } - } - } - } - } - }, - "version": { - "type": "integer" - } - } - }, - "S1c": { - "type": "map", - "key": {}, - "value": {} - }, - "S1u": { - "type": "structure", - "members": { - "actionTypeId": { - "shape": "Ss" - }, - "actionConfiguration": { - "shape": "S1v" - }, - "pipelineContext": { - "shape": "S1w" - }, - "inputArtifacts": { - "shape": "S1z" - }, - "outputArtifacts": { - "shape": "S1z" - }, - "artifactCredentials": { - "shape": "S27" - }, - "continuationToken": {} - } - }, - "S1v": { - "type": "structure", - "members": { - "configuration": { - "shape": "S1c" - } - } - }, - "S1w": { - "type": "structure", - "members": { - "pipelineName": {}, - "stage": { - "type": "structure", - "members": { - "name": {} - } - }, - "action": { - "type": "structure", - "members": { - "name": {} - } - } - } - }, - "S1z": { - "type": "list", - "member": { - "type": "structure", - "members": { - "name": {}, - "revision": {}, - "location": { - "type": "structure", - "members": { - "type": {}, - "s3Location": { - "type": "structure", - "required": [ - "bucketName", - "objectKey" - ], - "members": { - "bucketName": {}, - "objectKey": {} - } - } - } - } - } - } - }, - "S27": { - "type": "structure", - "required": [ - "accessKeyId", - "secretAccessKey", - "sessionToken" - ], - "members": { - "accessKeyId": {}, - "secretAccessKey": {}, - "sessionToken": {} - }, - "sensitive": true - }, - "S2p": { - "type": "structure", - "required": [ - "revisionId", - "created" - ], - "members": { - "revisionId": {}, - "revisionChangeId": {}, - "created": { - "type": "timestamp" - } - } - }, - "S3t": { - "type": "structure", - "required": [ - "type" - ], - "members": { - "type": {}, - "message": {}, - "externalExecutionId": {} - } - }, - "S3w": { - "type": "structure", - "required": [ - "revision", - "changeIdentifier" - ], - "members": { - "revision": {}, - "changeIdentifier": {} - } - }, - "S3y": { - "type": "structure", - "members": { - "summary": {}, - "externalExecutionId": {}, - "percentComplete": { - "type": "integer" - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/cognito-identity-2014-06-30.min.json b/cli/node_modules/aws-sdk/apis/cognito-identity-2014-06-30.min.json deleted file mode 100644 index 9679a1bd7..000000000 --- a/cli/node_modules/aws-sdk/apis/cognito-identity-2014-06-30.min.json +++ /dev/null @@ -1,460 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2014-06-30", - "endpointPrefix": "cognito-identity", - "jsonVersion": "1.1", - "serviceFullName": "Amazon Cognito Identity", - "signatureVersion": "v4", - "targetPrefix": "AWSCognitoIdentityService", - "protocol": "json" - }, - "operations": { - "CreateIdentityPool": { - "input": { - "type": "structure", - "required": [ - "IdentityPoolName", - "AllowUnauthenticatedIdentities" - ], - "members": { - "IdentityPoolName": {}, - "AllowUnauthenticatedIdentities": { - "type": "boolean" - }, - "SupportedLoginProviders": { - "shape": "S4" - }, - "DeveloperProviderName": {}, - "OpenIdConnectProviderARNs": { - "shape": "S8" - } - } - }, - "output": { - "shape": "Sa" - } - }, - "DeleteIdentities": { - "input": { - "type": "structure", - "required": [ - "IdentityIdsToDelete" - ], - "members": { - "IdentityIdsToDelete": { - "type": "list", - "member": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "UnprocessedIdentityIds": { - "type": "list", - "member": { - "type": "structure", - "members": { - "IdentityId": {}, - "ErrorCode": {} - } - } - } - } - } - }, - "DeleteIdentityPool": { - "input": { - "type": "structure", - "required": [ - "IdentityPoolId" - ], - "members": { - "IdentityPoolId": {} - } - } - }, - "DescribeIdentity": { - "input": { - "type": "structure", - "required": [ - "IdentityId" - ], - "members": { - "IdentityId": {} - } - }, - "output": { - "shape": "Sl" - } - }, - "DescribeIdentityPool": { - "input": { - "type": "structure", - "required": [ - "IdentityPoolId" - ], - "members": { - "IdentityPoolId": {} - } - }, - "output": { - "shape": "Sa" - } - }, - "GetCredentialsForIdentity": { - "input": { - "type": "structure", - "required": [ - "IdentityId" - ], - "members": { - "IdentityId": {}, - "Logins": { - "shape": "Sq" - } - } - }, - "output": { - "type": "structure", - "members": { - "IdentityId": {}, - "Credentials": { - "type": "structure", - "members": { - "AccessKeyId": {}, - "SecretKey": {}, - "SessionToken": {}, - "Expiration": { - "type": "timestamp" - } - } - } - } - } - }, - "GetId": { - "input": { - "type": "structure", - "required": [ - "IdentityPoolId" - ], - "members": { - "AccountId": {}, - "IdentityPoolId": {}, - "Logins": { - "shape": "Sq" - } - } - }, - "output": { - "type": "structure", - "members": { - "IdentityId": {} - } - } - }, - "GetIdentityPoolRoles": { - "input": { - "type": "structure", - "required": [ - "IdentityPoolId" - ], - "members": { - "IdentityPoolId": {} - } - }, - "output": { - "type": "structure", - "members": { - "IdentityPoolId": {}, - "Roles": { - "shape": "S12" - } - } - } - }, - "GetOpenIdToken": { - "input": { - "type": "structure", - "required": [ - "IdentityId" - ], - "members": { - "IdentityId": {}, - "Logins": { - "shape": "Sq" - } - } - }, - "output": { - "type": "structure", - "members": { - "IdentityId": {}, - "Token": {} - } - } - }, - "GetOpenIdTokenForDeveloperIdentity": { - "input": { - "type": "structure", - "required": [ - "IdentityPoolId", - "Logins" - ], - "members": { - "IdentityPoolId": {}, - "IdentityId": {}, - "Logins": { - "shape": "Sq" - }, - "TokenDuration": { - "type": "long" - } - } - }, - "output": { - "type": "structure", - "members": { - "IdentityId": {}, - "Token": {} - } - } - }, - "ListIdentities": { - "input": { - "type": "structure", - "required": [ - "IdentityPoolId", - "MaxResults" - ], - "members": { - "IdentityPoolId": {}, - "MaxResults": { - "type": "integer" - }, - "NextToken": {}, - "HideDisabled": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "IdentityPoolId": {}, - "Identities": { - "type": "list", - "member": { - "shape": "Sl" - } - }, - "NextToken": {} - } - } - }, - "ListIdentityPools": { - "input": { - "type": "structure", - "required": [ - "MaxResults" - ], - "members": { - "MaxResults": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "IdentityPools": { - "type": "list", - "member": { - "type": "structure", - "members": { - "IdentityPoolId": {}, - "IdentityPoolName": {} - } - } - }, - "NextToken": {} - } - } - }, - "LookupDeveloperIdentity": { - "input": { - "type": "structure", - "required": [ - "IdentityPoolId" - ], - "members": { - "IdentityPoolId": {}, - "IdentityId": {}, - "DeveloperUserIdentifier": {}, - "MaxResults": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "IdentityId": {}, - "DeveloperUserIdentifierList": { - "type": "list", - "member": {} - }, - "NextToken": {} - } - } - }, - "MergeDeveloperIdentities": { - "input": { - "type": "structure", - "required": [ - "SourceUserIdentifier", - "DestinationUserIdentifier", - "DeveloperProviderName", - "IdentityPoolId" - ], - "members": { - "SourceUserIdentifier": {}, - "DestinationUserIdentifier": {}, - "DeveloperProviderName": {}, - "IdentityPoolId": {} - } - }, - "output": { - "type": "structure", - "members": { - "IdentityId": {} - } - } - }, - "SetIdentityPoolRoles": { - "input": { - "type": "structure", - "required": [ - "IdentityPoolId", - "Roles" - ], - "members": { - "IdentityPoolId": {}, - "Roles": { - "shape": "S12" - } - } - } - }, - "UnlinkDeveloperIdentity": { - "input": { - "type": "structure", - "required": [ - "IdentityId", - "IdentityPoolId", - "DeveloperProviderName", - "DeveloperUserIdentifier" - ], - "members": { - "IdentityId": {}, - "IdentityPoolId": {}, - "DeveloperProviderName": {}, - "DeveloperUserIdentifier": {} - } - } - }, - "UnlinkIdentity": { - "input": { - "type": "structure", - "required": [ - "IdentityId", - "Logins", - "LoginsToRemove" - ], - "members": { - "IdentityId": {}, - "Logins": { - "shape": "Sq" - }, - "LoginsToRemove": { - "shape": "Sm" - } - } - } - }, - "UpdateIdentityPool": { - "input": { - "shape": "Sa" - }, - "output": { - "shape": "Sa" - } - } - }, - "shapes": { - "S4": { - "type": "map", - "key": {}, - "value": {} - }, - "S8": { - "type": "list", - "member": {} - }, - "Sa": { - "type": "structure", - "required": [ - "IdentityPoolId", - "IdentityPoolName", - "AllowUnauthenticatedIdentities" - ], - "members": { - "IdentityPoolId": {}, - "IdentityPoolName": {}, - "AllowUnauthenticatedIdentities": { - "type": "boolean" - }, - "SupportedLoginProviders": { - "shape": "S4" - }, - "DeveloperProviderName": {}, - "OpenIdConnectProviderARNs": { - "shape": "S8" - } - } - }, - "Sl": { - "type": "structure", - "members": { - "IdentityId": {}, - "Logins": { - "shape": "Sm" - }, - "CreationDate": { - "type": "timestamp" - }, - "LastModifiedDate": { - "type": "timestamp" - } - } - }, - "Sm": { - "type": "list", - "member": {} - }, - "Sq": { - "type": "map", - "key": {}, - "value": {} - }, - "S12": { - "type": "map", - "key": {}, - "value": {} - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/cognito-sync-2014-06-30.min.json b/cli/node_modules/aws-sdk/apis/cognito-sync-2014-06-30.min.json deleted file mode 100644 index 9e17139a1..000000000 --- a/cli/node_modules/aws-sdk/apis/cognito-sync-2014-06-30.min.json +++ /dev/null @@ -1,745 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2014-06-30", - "endpointPrefix": "cognito-sync", - "jsonVersion": "1.1", - "serviceFullName": "Amazon Cognito Sync", - "signatureVersion": "v4", - "protocol": "rest-json" - }, - "operations": { - "BulkPublish": { - "http": { - "requestUri": "/identitypools/{IdentityPoolId}/bulkpublish", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "IdentityPoolId" - ], - "members": { - "IdentityPoolId": { - "location": "uri", - "locationName": "IdentityPoolId" - } - } - }, - "output": { - "type": "structure", - "members": { - "IdentityPoolId": {} - } - } - }, - "DeleteDataset": { - "http": { - "method": "DELETE", - "requestUri": "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "IdentityPoolId", - "IdentityId", - "DatasetName" - ], - "members": { - "IdentityPoolId": { - "location": "uri", - "locationName": "IdentityPoolId" - }, - "IdentityId": { - "location": "uri", - "locationName": "IdentityId" - }, - "DatasetName": { - "location": "uri", - "locationName": "DatasetName" - } - } - }, - "output": { - "type": "structure", - "members": { - "Dataset": { - "shape": "S8" - } - } - } - }, - "DescribeDataset": { - "http": { - "method": "GET", - "requestUri": "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "IdentityPoolId", - "IdentityId", - "DatasetName" - ], - "members": { - "IdentityPoolId": { - "location": "uri", - "locationName": "IdentityPoolId" - }, - "IdentityId": { - "location": "uri", - "locationName": "IdentityId" - }, - "DatasetName": { - "location": "uri", - "locationName": "DatasetName" - } - } - }, - "output": { - "type": "structure", - "members": { - "Dataset": { - "shape": "S8" - } - } - } - }, - "DescribeIdentityPoolUsage": { - "http": { - "method": "GET", - "requestUri": "/identitypools/{IdentityPoolId}", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "IdentityPoolId" - ], - "members": { - "IdentityPoolId": { - "location": "uri", - "locationName": "IdentityPoolId" - } - } - }, - "output": { - "type": "structure", - "members": { - "IdentityPoolUsage": { - "shape": "Sg" - } - } - } - }, - "DescribeIdentityUsage": { - "http": { - "method": "GET", - "requestUri": "/identitypools/{IdentityPoolId}/identities/{IdentityId}", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "IdentityPoolId", - "IdentityId" - ], - "members": { - "IdentityPoolId": { - "location": "uri", - "locationName": "IdentityPoolId" - }, - "IdentityId": { - "location": "uri", - "locationName": "IdentityId" - } - } - }, - "output": { - "type": "structure", - "members": { - "IdentityUsage": { - "type": "structure", - "members": { - "IdentityId": {}, - "IdentityPoolId": {}, - "LastModifiedDate": { - "type": "timestamp" - }, - "DatasetCount": { - "type": "integer" - }, - "DataStorage": { - "type": "long" - } - } - } - } - } - }, - "GetBulkPublishDetails": { - "http": { - "requestUri": "/identitypools/{IdentityPoolId}/getBulkPublishDetails", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "IdentityPoolId" - ], - "members": { - "IdentityPoolId": { - "location": "uri", - "locationName": "IdentityPoolId" - } - } - }, - "output": { - "type": "structure", - "members": { - "IdentityPoolId": {}, - "BulkPublishStartTime": { - "type": "timestamp" - }, - "BulkPublishCompleteTime": { - "type": "timestamp" - }, - "BulkPublishStatus": {}, - "FailureMessage": {} - } - } - }, - "GetCognitoEvents": { - "http": { - "method": "GET", - "requestUri": "/identitypools/{IdentityPoolId}/events", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "IdentityPoolId" - ], - "members": { - "IdentityPoolId": { - "location": "uri", - "locationName": "IdentityPoolId" - } - } - }, - "output": { - "type": "structure", - "members": { - "Events": { - "shape": "Sq" - } - } - } - }, - "GetIdentityPoolConfiguration": { - "http": { - "method": "GET", - "requestUri": "/identitypools/{IdentityPoolId}/configuration", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "IdentityPoolId" - ], - "members": { - "IdentityPoolId": { - "location": "uri", - "locationName": "IdentityPoolId" - } - } - }, - "output": { - "type": "structure", - "members": { - "IdentityPoolId": {}, - "PushSync": { - "shape": "Sv" - }, - "CognitoStreams": { - "shape": "Sz" - } - } - } - }, - "ListDatasets": { - "http": { - "method": "GET", - "requestUri": "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "IdentityId", - "IdentityPoolId" - ], - "members": { - "IdentityPoolId": { - "location": "uri", - "locationName": "IdentityPoolId" - }, - "IdentityId": { - "location": "uri", - "locationName": "IdentityId" - }, - "NextToken": { - "location": "querystring", - "locationName": "nextToken" - }, - "MaxResults": { - "location": "querystring", - "locationName": "maxResults", - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Datasets": { - "type": "list", - "member": { - "shape": "S8" - } - }, - "Count": { - "type": "integer" - }, - "NextToken": {} - } - } - }, - "ListIdentityPoolUsage": { - "http": { - "method": "GET", - "requestUri": "/identitypools", - "responseCode": 200 - }, - "input": { - "type": "structure", - "members": { - "NextToken": { - "location": "querystring", - "locationName": "nextToken" - }, - "MaxResults": { - "location": "querystring", - "locationName": "maxResults", - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "IdentityPoolUsages": { - "type": "list", - "member": { - "shape": "Sg" - } - }, - "MaxResults": { - "type": "integer" - }, - "Count": { - "type": "integer" - }, - "NextToken": {} - } - } - }, - "ListRecords": { - "http": { - "method": "GET", - "requestUri": "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/records", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "IdentityPoolId", - "IdentityId", - "DatasetName" - ], - "members": { - "IdentityPoolId": { - "location": "uri", - "locationName": "IdentityPoolId" - }, - "IdentityId": { - "location": "uri", - "locationName": "IdentityId" - }, - "DatasetName": { - "location": "uri", - "locationName": "DatasetName" - }, - "LastSyncCount": { - "location": "querystring", - "locationName": "lastSyncCount", - "type": "long" - }, - "NextToken": { - "location": "querystring", - "locationName": "nextToken" - }, - "MaxResults": { - "location": "querystring", - "locationName": "maxResults", - "type": "integer" - }, - "SyncSessionToken": { - "location": "querystring", - "locationName": "syncSessionToken" - } - } - }, - "output": { - "type": "structure", - "members": { - "Records": { - "shape": "S1c" - }, - "NextToken": {}, - "Count": { - "type": "integer" - }, - "DatasetSyncCount": { - "type": "long" - }, - "LastModifiedBy": {}, - "MergedDatasetNames": { - "type": "list", - "member": {} - }, - "DatasetExists": { - "type": "boolean" - }, - "DatasetDeletedAfterRequestedSyncCount": { - "type": "boolean" - }, - "SyncSessionToken": {} - } - } - }, - "RegisterDevice": { - "http": { - "requestUri": "/identitypools/{IdentityPoolId}/identity/{IdentityId}/device", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "IdentityPoolId", - "IdentityId", - "Platform", - "Token" - ], - "members": { - "IdentityPoolId": { - "location": "uri", - "locationName": "IdentityPoolId" - }, - "IdentityId": { - "location": "uri", - "locationName": "IdentityId" - }, - "Platform": {}, - "Token": {} - } - }, - "output": { - "type": "structure", - "members": { - "DeviceId": {} - } - } - }, - "SetCognitoEvents": { - "http": { - "requestUri": "/identitypools/{IdentityPoolId}/events", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "IdentityPoolId", - "Events" - ], - "members": { - "IdentityPoolId": { - "location": "uri", - "locationName": "IdentityPoolId" - }, - "Events": { - "shape": "Sq" - } - } - } - }, - "SetIdentityPoolConfiguration": { - "http": { - "requestUri": "/identitypools/{IdentityPoolId}/configuration", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "IdentityPoolId" - ], - "members": { - "IdentityPoolId": { - "location": "uri", - "locationName": "IdentityPoolId" - }, - "PushSync": { - "shape": "Sv" - }, - "CognitoStreams": { - "shape": "Sz" - } - } - }, - "output": { - "type": "structure", - "members": { - "IdentityPoolId": {}, - "PushSync": { - "shape": "Sv" - }, - "CognitoStreams": { - "shape": "Sz" - } - } - } - }, - "SubscribeToDataset": { - "http": { - "requestUri": "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "IdentityPoolId", - "IdentityId", - "DatasetName", - "DeviceId" - ], - "members": { - "IdentityPoolId": { - "location": "uri", - "locationName": "IdentityPoolId" - }, - "IdentityId": { - "location": "uri", - "locationName": "IdentityId" - }, - "DatasetName": { - "location": "uri", - "locationName": "DatasetName" - }, - "DeviceId": { - "location": "uri", - "locationName": "DeviceId" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "UnsubscribeFromDataset": { - "http": { - "method": "DELETE", - "requestUri": "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "IdentityPoolId", - "IdentityId", - "DatasetName", - "DeviceId" - ], - "members": { - "IdentityPoolId": { - "location": "uri", - "locationName": "IdentityPoolId" - }, - "IdentityId": { - "location": "uri", - "locationName": "IdentityId" - }, - "DatasetName": { - "location": "uri", - "locationName": "DatasetName" - }, - "DeviceId": { - "location": "uri", - "locationName": "DeviceId" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "UpdateRecords": { - "http": { - "requestUri": "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "IdentityPoolId", - "IdentityId", - "DatasetName", - "SyncSessionToken" - ], - "members": { - "IdentityPoolId": { - "location": "uri", - "locationName": "IdentityPoolId" - }, - "IdentityId": { - "location": "uri", - "locationName": "IdentityId" - }, - "DatasetName": { - "location": "uri", - "locationName": "DatasetName" - }, - "DeviceId": {}, - "RecordPatches": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "Op", - "Key", - "SyncCount" - ], - "members": { - "Op": {}, - "Key": {}, - "Value": {}, - "SyncCount": { - "type": "long" - }, - "DeviceLastModifiedDate": { - "type": "timestamp" - } - } - } - }, - "SyncSessionToken": {}, - "ClientContext": { - "location": "header", - "locationName": "x-amz-Client-Context" - } - } - }, - "output": { - "type": "structure", - "members": { - "Records": { - "shape": "S1c" - } - } - } - } - }, - "shapes": { - "S8": { - "type": "structure", - "members": { - "IdentityId": {}, - "DatasetName": {}, - "CreationDate": { - "type": "timestamp" - }, - "LastModifiedDate": { - "type": "timestamp" - }, - "LastModifiedBy": {}, - "DataStorage": { - "type": "long" - }, - "NumRecords": { - "type": "long" - } - } - }, - "Sg": { - "type": "structure", - "members": { - "IdentityPoolId": {}, - "SyncSessionsCount": { - "type": "long" - }, - "DataStorage": { - "type": "long" - }, - "LastModifiedDate": { - "type": "timestamp" - } - } - }, - "Sq": { - "type": "map", - "key": {}, - "value": {} - }, - "Sv": { - "type": "structure", - "members": { - "ApplicationArns": { - "type": "list", - "member": {} - }, - "RoleArn": {} - } - }, - "Sz": { - "type": "structure", - "members": { - "StreamName": {}, - "RoleArn": {}, - "StreamingStatus": {} - } - }, - "S1c": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Key": {}, - "Value": {}, - "SyncCount": { - "type": "long" - }, - "LastModifiedDate": { - "type": "timestamp" - }, - "LastModifiedBy": {}, - "DeviceLastModifiedDate": { - "type": "timestamp" - } - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/config-2014-11-12.min.json b/cli/node_modules/aws-sdk/apis/config-2014-11-12.min.json deleted file mode 100644 index c0b7681bb..000000000 --- a/cli/node_modules/aws-sdk/apis/config-2014-11-12.min.json +++ /dev/null @@ -1,339 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2014-11-12", - "endpointPrefix": "config", - "jsonVersion": "1.1", - "serviceAbbreviation": "Config Service", - "serviceFullName": "AWS Config", - "signatureVersion": "v4", - "targetPrefix": "StarlingDoveService", - "protocol": "json" - }, - "operations": { - "DeleteDeliveryChannel": { - "input": { - "type": "structure", - "required": [ - "DeliveryChannelName" - ], - "members": { - "DeliveryChannelName": {} - } - } - }, - "DeliverConfigSnapshot": { - "input": { - "type": "structure", - "required": [ - "deliveryChannelName" - ], - "members": { - "deliveryChannelName": {} - } - }, - "output": { - "type": "structure", - "members": { - "configSnapshotId": {} - } - } - }, - "DescribeConfigurationRecorderStatus": { - "input": { - "type": "structure", - "members": { - "ConfigurationRecorderNames": { - "shape": "S7" - } - } - }, - "output": { - "type": "structure", - "members": { - "ConfigurationRecordersStatus": { - "type": "list", - "member": { - "type": "structure", - "members": { - "name": {}, - "lastStartTime": { - "type": "timestamp" - }, - "lastStopTime": { - "type": "timestamp" - }, - "recording": { - "type": "boolean" - }, - "lastStatus": {}, - "lastErrorCode": {}, - "lastErrorMessage": {}, - "lastStatusChangeTime": { - "type": "timestamp" - } - } - } - } - } - } - }, - "DescribeConfigurationRecorders": { - "input": { - "type": "structure", - "members": { - "ConfigurationRecorderNames": { - "shape": "S7" - } - } - }, - "output": { - "type": "structure", - "members": { - "ConfigurationRecorders": { - "type": "list", - "member": { - "shape": "Si" - } - } - } - } - }, - "DescribeDeliveryChannelStatus": { - "input": { - "type": "structure", - "members": { - "DeliveryChannelNames": { - "shape": "So" - } - } - }, - "output": { - "type": "structure", - "members": { - "DeliveryChannelsStatus": { - "type": "list", - "member": { - "type": "structure", - "members": { - "name": {}, - "configSnapshotDeliveryInfo": { - "shape": "Ss" - }, - "configHistoryDeliveryInfo": { - "shape": "Ss" - }, - "configStreamDeliveryInfo": { - "type": "structure", - "members": { - "lastStatus": {}, - "lastErrorCode": {}, - "lastErrorMessage": {}, - "lastStatusChangeTime": { - "type": "timestamp" - } - } - } - } - } - } - } - } - }, - "DescribeDeliveryChannels": { - "input": { - "type": "structure", - "members": { - "DeliveryChannelNames": { - "shape": "So" - } - } - }, - "output": { - "type": "structure", - "members": { - "DeliveryChannels": { - "type": "list", - "member": { - "shape": "Sy" - } - } - } - } - }, - "GetResourceConfigHistory": { - "input": { - "type": "structure", - "required": [ - "resourceType", - "resourceId" - ], - "members": { - "resourceType": {}, - "resourceId": {}, - "laterTime": { - "type": "timestamp" - }, - "earlierTime": { - "type": "timestamp" - }, - "chronologicalOrder": {}, - "limit": { - "type": "integer" - }, - "nextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "configurationItems": { - "type": "list", - "member": { - "type": "structure", - "members": { - "version": {}, - "accountId": {}, - "configurationItemCaptureTime": { - "type": "timestamp" - }, - "configurationItemStatus": {}, - "configurationStateId": {}, - "configurationItemMD5Hash": {}, - "arn": {}, - "resourceType": {}, - "resourceId": {}, - "availabilityZone": {}, - "resourceCreationTime": { - "type": "timestamp" - }, - "tags": { - "type": "map", - "key": {}, - "value": {} - }, - "relatedEvents": { - "type": "list", - "member": {} - }, - "relationships": { - "type": "list", - "member": { - "type": "structure", - "members": { - "resourceType": {}, - "resourceId": {}, - "relationshipName": {} - } - } - }, - "configuration": {} - } - } - }, - "nextToken": {} - } - } - }, - "PutConfigurationRecorder": { - "input": { - "type": "structure", - "required": [ - "ConfigurationRecorder" - ], - "members": { - "ConfigurationRecorder": { - "shape": "Si" - } - } - } - }, - "PutDeliveryChannel": { - "input": { - "type": "structure", - "required": [ - "DeliveryChannel" - ], - "members": { - "DeliveryChannel": { - "shape": "Sy" - } - } - } - }, - "StartConfigurationRecorder": { - "input": { - "type": "structure", - "required": [ - "ConfigurationRecorderName" - ], - "members": { - "ConfigurationRecorderName": {} - } - } - }, - "StopConfigurationRecorder": { - "input": { - "type": "structure", - "required": [ - "ConfigurationRecorderName" - ], - "members": { - "ConfigurationRecorderName": {} - } - } - } - }, - "shapes": { - "S7": { - "type": "list", - "member": {} - }, - "Si": { - "type": "structure", - "members": { - "name": {}, - "roleARN": {}, - "recordingGroup": { - "type": "structure", - "members": { - "allSupported": { - "type": "boolean" - }, - "resourceTypes": { - "type": "list", - "member": {} - } - } - } - } - }, - "So": { - "type": "list", - "member": {} - }, - "Ss": { - "type": "structure", - "members": { - "lastStatus": {}, - "lastErrorCode": {}, - "lastErrorMessage": {}, - "lastAttemptTime": { - "type": "timestamp" - }, - "lastSuccessfulTime": { - "type": "timestamp" - } - } - }, - "Sy": { - "type": "structure", - "members": { - "name": {}, - "s3BucketName": {}, - "s3KeyPrefix": {}, - "snsTopicARN": {} - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/config-2014-11-12.paginators.json b/cli/node_modules/aws-sdk/apis/config-2014-11-12.paginators.json deleted file mode 100644 index 45c365ec3..000000000 --- a/cli/node_modules/aws-sdk/apis/config-2014-11-12.paginators.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "pagination": { - "GetResourceConfigHistory": { - "input_token": "nextToken", - "output_token": "nextToken", - "limit_key": "limit", - "result_key": "configurationItems" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/datapipeline-2012-10-29.min.json b/cli/node_modules/aws-sdk/apis/datapipeline-2012-10-29.min.json deleted file mode 100644 index 88f505fef..000000000 --- a/cli/node_modules/aws-sdk/apis/datapipeline-2012-10-29.min.json +++ /dev/null @@ -1,666 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2012-10-29", - "endpointPrefix": "datapipeline", - "jsonVersion": "1.1", - "serviceFullName": "AWS Data Pipeline", - "signatureVersion": "v4", - "targetPrefix": "DataPipeline", - "protocol": "json" - }, - "operations": { - "ActivatePipeline": { - "input": { - "type": "structure", - "required": [ - "pipelineId" - ], - "members": { - "pipelineId": {}, - "parameterValues": { - "shape": "S3" - }, - "startTimestamp": { - "type": "timestamp" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "AddTags": { - "input": { - "type": "structure", - "required": [ - "pipelineId", - "tags" - ], - "members": { - "pipelineId": {}, - "tags": { - "shape": "Sa" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "CreatePipeline": { - "input": { - "type": "structure", - "required": [ - "name", - "uniqueId" - ], - "members": { - "name": {}, - "uniqueId": {}, - "description": {}, - "tags": { - "shape": "Sa" - } - } - }, - "output": { - "type": "structure", - "required": [ - "pipelineId" - ], - "members": { - "pipelineId": {} - } - } - }, - "DeactivatePipeline": { - "input": { - "type": "structure", - "required": [ - "pipelineId" - ], - "members": { - "pipelineId": {}, - "cancelActive": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "DeletePipeline": { - "input": { - "type": "structure", - "required": [ - "pipelineId" - ], - "members": { - "pipelineId": {} - } - } - }, - "DescribeObjects": { - "input": { - "type": "structure", - "required": [ - "pipelineId", - "objectIds" - ], - "members": { - "pipelineId": {}, - "objectIds": { - "shape": "Sn" - }, - "evaluateExpressions": { - "type": "boolean" - }, - "marker": {} - } - }, - "output": { - "type": "structure", - "required": [ - "pipelineObjects" - ], - "members": { - "pipelineObjects": { - "shape": "Sq" - }, - "marker": {}, - "hasMoreResults": { - "type": "boolean" - } - } - } - }, - "DescribePipelines": { - "input": { - "type": "structure", - "required": [ - "pipelineIds" - ], - "members": { - "pipelineIds": { - "shape": "Sn" - } - } - }, - "output": { - "type": "structure", - "required": [ - "pipelineDescriptionList" - ], - "members": { - "pipelineDescriptionList": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "pipelineId", - "name", - "fields" - ], - "members": { - "pipelineId": {}, - "name": {}, - "fields": { - "shape": "Ss" - }, - "description": {}, - "tags": { - "shape": "Sa" - } - } - } - } - } - } - }, - "EvaluateExpression": { - "input": { - "type": "structure", - "required": [ - "pipelineId", - "objectId", - "expression" - ], - "members": { - "pipelineId": {}, - "objectId": {}, - "expression": {} - } - }, - "output": { - "type": "structure", - "required": [ - "evaluatedExpression" - ], - "members": { - "evaluatedExpression": {} - } - } - }, - "GetPipelineDefinition": { - "input": { - "type": "structure", - "required": [ - "pipelineId" - ], - "members": { - "pipelineId": {}, - "version": {} - } - }, - "output": { - "type": "structure", - "members": { - "pipelineObjects": { - "shape": "Sq" - }, - "parameterObjects": { - "shape": "S13" - }, - "parameterValues": { - "shape": "S3" - } - } - } - }, - "ListPipelines": { - "input": { - "type": "structure", - "members": { - "marker": {} - } - }, - "output": { - "type": "structure", - "required": [ - "pipelineIdList" - ], - "members": { - "pipelineIdList": { - "type": "list", - "member": { - "type": "structure", - "members": { - "id": {}, - "name": {} - } - } - }, - "marker": {}, - "hasMoreResults": { - "type": "boolean" - } - } - } - }, - "PollForTask": { - "input": { - "type": "structure", - "required": [ - "workerGroup" - ], - "members": { - "workerGroup": {}, - "hostname": {}, - "instanceIdentity": { - "type": "structure", - "members": { - "document": {}, - "signature": {} - } - } - } - }, - "output": { - "type": "structure", - "members": { - "taskObject": { - "type": "structure", - "members": { - "taskId": {}, - "pipelineId": {}, - "attemptId": {}, - "objects": { - "type": "map", - "key": {}, - "value": { - "shape": "Sr" - } - } - } - } - } - } - }, - "PutPipelineDefinition": { - "input": { - "type": "structure", - "required": [ - "pipelineId", - "pipelineObjects" - ], - "members": { - "pipelineId": {}, - "pipelineObjects": { - "shape": "Sq" - }, - "parameterObjects": { - "shape": "S13" - }, - "parameterValues": { - "shape": "S3" - } - } - }, - "output": { - "type": "structure", - "required": [ - "errored" - ], - "members": { - "validationErrors": { - "shape": "S1l" - }, - "validationWarnings": { - "shape": "S1p" - }, - "errored": { - "type": "boolean" - } - } - } - }, - "QueryObjects": { - "input": { - "type": "structure", - "required": [ - "pipelineId", - "sphere" - ], - "members": { - "pipelineId": {}, - "query": { - "type": "structure", - "members": { - "selectors": { - "type": "list", - "member": { - "type": "structure", - "members": { - "fieldName": {}, - "operator": { - "type": "structure", - "members": { - "type": {}, - "values": { - "shape": "S1x" - } - } - } - } - } - } - } - }, - "sphere": {}, - "marker": {}, - "limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "ids": { - "shape": "Sn" - }, - "marker": {}, - "hasMoreResults": { - "type": "boolean" - } - } - } - }, - "RemoveTags": { - "input": { - "type": "structure", - "required": [ - "pipelineId", - "tagKeys" - ], - "members": { - "pipelineId": {}, - "tagKeys": { - "shape": "S1x" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "ReportTaskProgress": { - "input": { - "type": "structure", - "required": [ - "taskId" - ], - "members": { - "taskId": {}, - "fields": { - "shape": "Ss" - } - } - }, - "output": { - "type": "structure", - "required": [ - "canceled" - ], - "members": { - "canceled": { - "type": "boolean" - } - } - } - }, - "ReportTaskRunnerHeartbeat": { - "input": { - "type": "structure", - "required": [ - "taskrunnerId" - ], - "members": { - "taskrunnerId": {}, - "workerGroup": {}, - "hostname": {} - } - }, - "output": { - "type": "structure", - "required": [ - "terminate" - ], - "members": { - "terminate": { - "type": "boolean" - } - } - } - }, - "SetStatus": { - "input": { - "type": "structure", - "required": [ - "pipelineId", - "objectIds", - "status" - ], - "members": { - "pipelineId": {}, - "objectIds": { - "shape": "Sn" - }, - "status": {} - } - } - }, - "SetTaskStatus": { - "input": { - "type": "structure", - "required": [ - "taskId", - "taskStatus" - ], - "members": { - "taskId": {}, - "taskStatus": {}, - "errorId": {}, - "errorMessage": {}, - "errorStackTrace": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "ValidatePipelineDefinition": { - "input": { - "type": "structure", - "required": [ - "pipelineId", - "pipelineObjects" - ], - "members": { - "pipelineId": {}, - "pipelineObjects": { - "shape": "Sq" - }, - "parameterObjects": { - "shape": "S13" - }, - "parameterValues": { - "shape": "S3" - } - } - }, - "output": { - "type": "structure", - "required": [ - "errored" - ], - "members": { - "validationErrors": { - "shape": "S1l" - }, - "validationWarnings": { - "shape": "S1p" - }, - "errored": { - "type": "boolean" - } - } - } - } - }, - "shapes": { - "S3": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "id", - "stringValue" - ], - "members": { - "id": {}, - "stringValue": {} - } - } - }, - "Sa": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "key", - "value" - ], - "members": { - "key": {}, - "value": {} - } - } - }, - "Sn": { - "type": "list", - "member": {} - }, - "Sq": { - "type": "list", - "member": { - "shape": "Sr" - } - }, - "Sr": { - "type": "structure", - "required": [ - "id", - "name", - "fields" - ], - "members": { - "id": {}, - "name": {}, - "fields": { - "shape": "Ss" - } - } - }, - "Ss": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "key" - ], - "members": { - "key": {}, - "stringValue": {}, - "refValue": {} - } - } - }, - "S13": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "id", - "attributes" - ], - "members": { - "id": {}, - "attributes": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "key", - "stringValue" - ], - "members": { - "key": {}, - "stringValue": {} - } - } - } - } - } - }, - "S1l": { - "type": "list", - "member": { - "type": "structure", - "members": { - "id": {}, - "errors": { - "shape": "S1n" - } - } - } - }, - "S1n": { - "type": "list", - "member": {} - }, - "S1p": { - "type": "list", - "member": { - "type": "structure", - "members": { - "id": {}, - "warnings": { - "shape": "S1n" - } - } - } - }, - "S1x": { - "type": "list", - "member": {} - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/datapipeline-2012-10-29.paginators.json b/cli/node_modules/aws-sdk/apis/datapipeline-2012-10-29.paginators.json deleted file mode 100644 index db941936b..000000000 --- a/cli/node_modules/aws-sdk/apis/datapipeline-2012-10-29.paginators.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "pagination": { - "ListPipelines": { - "input_token": "marker", - "output_token": "marker", - "more_results": "hasMoreResults", - "result_key": "pipelineIdList" - }, - "DescribeObjects": { - "input_token": "marker", - "output_token": "marker", - "more_results": "hasMoreResults", - "result_key": "pipelineObjects" - }, - "DescribePipelines": { - "result_key": "pipelineDescriptionList" - }, - "QueryObjects": { - "input_token": "marker", - "output_token": "marker", - "more_results": "hasMoreResults", - "limit_key": "limit", - "result_key": "ids" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/devicefarm-2015-06-23.min.json b/cli/node_modules/aws-sdk/apis/devicefarm-2015-06-23.min.json deleted file mode 100644 index 358749812..000000000 --- a/cli/node_modules/aws-sdk/apis/devicefarm-2015-06-23.min.json +++ /dev/null @@ -1,903 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2015-06-23", - "endpointPrefix": "devicefarm", - "jsonVersion": "1.1", - "serviceFullName": "AWS Device Farm", - "signatureVersion": "v4", - "targetPrefix": "DeviceFarm_20150623", - "protocol": "json" - }, - "operations": { - "CreateDevicePool": { - "input": { - "type": "structure", - "required": [ - "projectArn", - "name", - "rules" - ], - "members": { - "projectArn": {}, - "name": {}, - "description": {}, - "rules": { - "shape": "S5" - } - } - }, - "output": { - "type": "structure", - "members": { - "devicePool": { - "shape": "Sb" - } - } - } - }, - "CreateProject": { - "input": { - "type": "structure", - "required": [ - "name" - ], - "members": { - "name": {} - } - }, - "output": { - "type": "structure", - "members": { - "project": { - "shape": "Sf" - } - } - } - }, - "CreateUpload": { - "input": { - "type": "structure", - "required": [ - "projectArn", - "name", - "type" - ], - "members": { - "projectArn": {}, - "name": {}, - "type": {}, - "contentType": {} - } - }, - "output": { - "type": "structure", - "members": { - "upload": { - "shape": "Sl" - } - } - } - }, - "GetDevice": { - "input": { - "type": "structure", - "required": [ - "arn" - ], - "members": { - "arn": {} - } - }, - "output": { - "type": "structure", - "members": { - "device": { - "shape": "Sr" - } - } - } - }, - "GetDevicePool": { - "input": { - "type": "structure", - "required": [ - "arn" - ], - "members": { - "arn": {} - } - }, - "output": { - "type": "structure", - "members": { - "devicePool": { - "shape": "Sb" - } - } - } - }, - "GetDevicePoolCompatibility": { - "input": { - "type": "structure", - "required": [ - "devicePoolArn", - "appArn" - ], - "members": { - "devicePoolArn": {}, - "appArn": {}, - "testType": {} - } - }, - "output": { - "type": "structure", - "members": { - "compatibleDevices": { - "shape": "S14" - }, - "incompatibleDevices": { - "shape": "S14" - } - } - } - }, - "GetJob": { - "input": { - "type": "structure", - "required": [ - "arn" - ], - "members": { - "arn": {} - } - }, - "output": { - "type": "structure", - "members": { - "job": { - "shape": "S1b" - } - } - } - }, - "GetProject": { - "input": { - "type": "structure", - "required": [ - "arn" - ], - "members": { - "arn": {} - } - }, - "output": { - "type": "structure", - "members": { - "project": { - "shape": "Sf" - } - } - } - }, - "GetRun": { - "input": { - "type": "structure", - "required": [ - "arn" - ], - "members": { - "arn": {} - } - }, - "output": { - "type": "structure", - "members": { - "run": { - "shape": "S1j" - } - } - } - }, - "GetSuite": { - "input": { - "type": "structure", - "required": [ - "arn" - ], - "members": { - "arn": {} - } - }, - "output": { - "type": "structure", - "members": { - "suite": { - "shape": "S1m" - } - } - } - }, - "GetTest": { - "input": { - "type": "structure", - "required": [ - "arn" - ], - "members": { - "arn": {} - } - }, - "output": { - "type": "structure", - "members": { - "test": { - "shape": "S1p" - } - } - } - }, - "GetUpload": { - "input": { - "type": "structure", - "required": [ - "arn" - ], - "members": { - "arn": {} - } - }, - "output": { - "type": "structure", - "members": { - "upload": { - "shape": "Sl" - } - } - } - }, - "ListArtifacts": { - "input": { - "type": "structure", - "required": [ - "arn", - "type" - ], - "members": { - "arn": {}, - "type": {}, - "nextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "artifacts": { - "type": "list", - "member": { - "type": "structure", - "members": { - "arn": {}, - "name": {}, - "type": {}, - "extension": {}, - "url": {} - } - } - }, - "nextToken": {} - } - } - }, - "ListDevicePools": { - "input": { - "type": "structure", - "required": [ - "arn" - ], - "members": { - "arn": {}, - "type": {}, - "nextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "devicePools": { - "type": "list", - "member": { - "shape": "Sb" - } - }, - "nextToken": {} - } - } - }, - "ListDevices": { - "input": { - "type": "structure", - "members": { - "arn": {}, - "nextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "devices": { - "type": "list", - "member": { - "shape": "Sr" - } - }, - "nextToken": {} - } - } - }, - "ListJobs": { - "input": { - "type": "structure", - "required": [ - "arn" - ], - "members": { - "arn": {}, - "nextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "jobs": { - "type": "list", - "member": { - "shape": "S1b" - } - }, - "nextToken": {} - } - } - }, - "ListProjects": { - "input": { - "type": "structure", - "members": { - "arn": {}, - "nextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "projects": { - "type": "list", - "member": { - "shape": "Sf" - } - }, - "nextToken": {} - } - } - }, - "ListRuns": { - "input": { - "type": "structure", - "required": [ - "arn" - ], - "members": { - "arn": {}, - "nextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "runs": { - "type": "list", - "member": { - "shape": "S1j" - } - }, - "nextToken": {} - } - } - }, - "ListSamples": { - "input": { - "type": "structure", - "required": [ - "arn" - ], - "members": { - "arn": {}, - "nextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "samples": { - "type": "list", - "member": { - "type": "structure", - "members": { - "arn": {}, - "type": {}, - "url": {} - } - } - }, - "nextToken": {} - } - } - }, - "ListSuites": { - "input": { - "type": "structure", - "required": [ - "arn" - ], - "members": { - "arn": {}, - "nextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "suites": { - "type": "list", - "member": { - "shape": "S1m" - } - }, - "nextToken": {} - } - } - }, - "ListTests": { - "input": { - "type": "structure", - "required": [ - "arn" - ], - "members": { - "arn": {}, - "nextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "tests": { - "type": "list", - "member": { - "shape": "S1p" - } - }, - "nextToken": {} - } - } - }, - "ListUniqueProblems": { - "input": { - "type": "structure", - "required": [ - "arn" - ], - "members": { - "arn": {}, - "nextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "uniqueProblems": { - "type": "map", - "key": {}, - "value": { - "type": "list", - "member": { - "type": "structure", - "members": { - "message": {}, - "problems": { - "type": "list", - "member": { - "type": "structure", - "members": { - "run": { - "shape": "S2w" - }, - "job": { - "shape": "S2w" - }, - "suite": { - "shape": "S2w" - }, - "test": { - "shape": "S2w" - }, - "device": { - "shape": "Sr" - }, - "result": {}, - "message": {} - } - } - } - } - } - } - }, - "nextToken": {} - } - } - }, - "ListUploads": { - "input": { - "type": "structure", - "required": [ - "arn" - ], - "members": { - "arn": {}, - "nextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "uploads": { - "type": "list", - "member": { - "shape": "Sl" - } - }, - "nextToken": {} - } - } - }, - "ScheduleRun": { - "input": { - "type": "structure", - "required": [ - "projectArn", - "appArn", - "devicePoolArn", - "test" - ], - "members": { - "projectArn": {}, - "appArn": {}, - "devicePoolArn": {}, - "name": {}, - "test": { - "type": "structure", - "required": [ - "type" - ], - "members": { - "type": {}, - "testPackageArn": {}, - "filter": {}, - "parameters": { - "type": "map", - "key": {}, - "value": {} - } - } - }, - "configuration": { - "type": "structure", - "members": { - "extraDataPackageArn": {}, - "networkProfileArn": {}, - "locale": {}, - "location": { - "type": "structure", - "required": [ - "latitude", - "longitude" - ], - "members": { - "latitude": { - "type": "double" - }, - "longitude": { - "type": "double" - } - } - }, - "radios": { - "type": "structure", - "members": { - "wifi": { - "type": "boolean" - }, - "bluetooth": { - "type": "boolean" - }, - "nfc": { - "type": "boolean" - }, - "gps": { - "type": "boolean" - } - } - }, - "auxiliaryApps": { - "type": "list", - "member": {} - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "run": { - "shape": "S1j" - } - } - } - } - }, - "shapes": { - "S5": { - "type": "list", - "member": { - "type": "structure", - "members": { - "attribute": {}, - "operator": {}, - "value": {} - } - } - }, - "Sb": { - "type": "structure", - "members": { - "arn": {}, - "name": {}, - "description": {}, - "type": {}, - "rules": { - "shape": "S5" - } - } - }, - "Sf": { - "type": "structure", - "members": { - "arn": {}, - "name": {}, - "created": { - "type": "timestamp" - } - } - }, - "Sl": { - "type": "structure", - "members": { - "arn": {}, - "name": {}, - "created": { - "type": "timestamp" - }, - "type": {}, - "status": {}, - "url": {}, - "metadata": {}, - "contentType": {}, - "message": {} - } - }, - "Sr": { - "type": "structure", - "members": { - "arn": {}, - "name": {}, - "manufacturer": {}, - "model": {}, - "formFactor": {}, - "platform": {}, - "os": {}, - "cpu": { - "type": "structure", - "members": { - "frequency": {}, - "architecture": {}, - "clock": { - "type": "double" - } - } - }, - "resolution": { - "type": "structure", - "members": { - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - } - }, - "heapSize": { - "type": "long" - }, - "memory": { - "type": "long" - }, - "image": {}, - "carrier": {}, - "radio": {} - } - }, - "S14": { - "type": "list", - "member": { - "type": "structure", - "members": { - "device": { - "shape": "Sr" - }, - "compatible": { - "type": "boolean" - }, - "incompatibilityMessages": { - "type": "list", - "member": { - "type": "structure", - "members": { - "message": {}, - "type": {} - } - } - } - } - } - }, - "S1b": { - "type": "structure", - "members": { - "arn": {}, - "name": {}, - "type": {}, - "created": { - "type": "timestamp" - }, - "status": {}, - "result": {}, - "started": { - "type": "timestamp" - }, - "stopped": { - "type": "timestamp" - }, - "counters": { - "shape": "S1e" - }, - "message": {}, - "device": { - "shape": "Sr" - } - } - }, - "S1e": { - "type": "structure", - "members": { - "total": { - "type": "integer" - }, - "passed": { - "type": "integer" - }, - "failed": { - "type": "integer" - }, - "warned": { - "type": "integer" - }, - "errored": { - "type": "integer" - }, - "stopped": { - "type": "integer" - }, - "skipped": { - "type": "integer" - } - } - }, - "S1j": { - "type": "structure", - "members": { - "arn": {}, - "name": {}, - "type": {}, - "platform": {}, - "created": { - "type": "timestamp" - }, - "status": {}, - "result": {}, - "started": { - "type": "timestamp" - }, - "stopped": { - "type": "timestamp" - }, - "counters": { - "shape": "S1e" - }, - "message": {}, - "totalJobs": { - "type": "integer" - }, - "completedJobs": { - "type": "integer" - } - } - }, - "S1m": { - "type": "structure", - "members": { - "arn": {}, - "name": {}, - "type": {}, - "created": { - "type": "timestamp" - }, - "status": {}, - "result": {}, - "started": { - "type": "timestamp" - }, - "stopped": { - "type": "timestamp" - }, - "counters": { - "shape": "S1e" - }, - "message": {} - } - }, - "S1p": { - "type": "structure", - "members": { - "arn": {}, - "name": {}, - "type": {}, - "created": { - "type": "timestamp" - }, - "status": {}, - "result": {}, - "started": { - "type": "timestamp" - }, - "stopped": { - "type": "timestamp" - }, - "counters": { - "shape": "S1e" - }, - "message": {} - } - }, - "S2w": { - "type": "structure", - "members": { - "arn": {}, - "name": {} - } - } - }, - "examples": {} -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/devicefarm-2015-06-23.paginators.json b/cli/node_modules/aws-sdk/apis/devicefarm-2015-06-23.paginators.json deleted file mode 100644 index dd41ad1ff..000000000 --- a/cli/node_modules/aws-sdk/apis/devicefarm-2015-06-23.paginators.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "pagination": { - "ListArtifacts": { - "input_token": "nextToken", - "output_token": "nextToken", - "result_key": "artifacts" - }, - "ListDevicePools": { - "input_token": "nextToken", - "output_token": "nextToken", - "result_key": "devicePools" - }, - "ListDevices": { - "input_token": "nextToken", - "output_token": "nextToken", - "result_key": "devices" - }, - "ListDevices": { - "input_token": "nextToken", - "output_token": "nextToken", - "result_key": "devices" - }, - "ListJobs": { - "input_token": "nextToken", - "output_token": "nextToken", - "result_key": "jobs" - }, - "ListProjects": { - "input_token": "nextToken", - "output_token": "nextToken", - "result_key": "projects" - }, - "ListRuns": { - "input_token": "nextToken", - "output_token": "nextToken", - "result_key": "runs" - }, - "ListSamples": { - "input_token": "nextToken", - "output_token": "nextToken", - "result_key": "samples" - }, - "ListSuites": { - "input_token": "nextToken", - "output_token": "nextToken", - "result_key": "suites" - }, - "ListTests": { - "input_token": "nextToken", - "output_token": "nextToken", - "result_key": "tests" - }, - "ListUniqueProblems": { - "input_token": "nextToken", - "output_token": "nextToken", - "result_key": "uniqueProblems" - }, - "ListUploads": { - "input_token": "nextToken", - "output_token": "nextToken", - "result_key": "uploads" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/directconnect-2012-10-25.min.json b/cli/node_modules/aws-sdk/apis/directconnect-2012-10-25.min.json deleted file mode 100644 index ff02cb474..000000000 --- a/cli/node_modules/aws-sdk/apis/directconnect-2012-10-25.min.json +++ /dev/null @@ -1,506 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2012-10-25", - "endpointPrefix": "directconnect", - "jsonVersion": "1.1", - "serviceFullName": "AWS Direct Connect", - "signatureVersion": "v4", - "targetPrefix": "OvertureService", - "protocol": "json" - }, - "operations": { - "AllocateConnectionOnInterconnect": { - "input": { - "type": "structure", - "required": [ - "bandwidth", - "connectionName", - "ownerAccount", - "interconnectId", - "vlan" - ], - "members": { - "bandwidth": {}, - "connectionName": {}, - "ownerAccount": {}, - "interconnectId": {}, - "vlan": { - "type": "integer" - } - } - }, - "output": { - "shape": "S7" - } - }, - "AllocatePrivateVirtualInterface": { - "input": { - "type": "structure", - "required": [ - "connectionId", - "ownerAccount", - "newPrivateVirtualInterfaceAllocation" - ], - "members": { - "connectionId": {}, - "ownerAccount": {}, - "newPrivateVirtualInterfaceAllocation": { - "type": "structure", - "required": [ - "virtualInterfaceName", - "vlan", - "asn" - ], - "members": { - "virtualInterfaceName": {}, - "vlan": { - "type": "integer" - }, - "asn": { - "type": "integer" - }, - "authKey": {}, - "amazonAddress": {}, - "customerAddress": {} - } - } - } - }, - "output": { - "shape": "Sk" - } - }, - "AllocatePublicVirtualInterface": { - "input": { - "type": "structure", - "required": [ - "connectionId", - "ownerAccount", - "newPublicVirtualInterfaceAllocation" - ], - "members": { - "connectionId": {}, - "ownerAccount": {}, - "newPublicVirtualInterfaceAllocation": { - "type": "structure", - "required": [ - "virtualInterfaceName", - "vlan", - "asn", - "amazonAddress", - "customerAddress", - "routeFilterPrefixes" - ], - "members": { - "virtualInterfaceName": {}, - "vlan": { - "type": "integer" - }, - "asn": { - "type": "integer" - }, - "authKey": {}, - "amazonAddress": {}, - "customerAddress": {}, - "routeFilterPrefixes": { - "shape": "Sq" - } - } - } - } - }, - "output": { - "shape": "Sk" - } - }, - "ConfirmConnection": { - "input": { - "type": "structure", - "required": [ - "connectionId" - ], - "members": { - "connectionId": {} - } - }, - "output": { - "type": "structure", - "members": { - "connectionState": {} - } - } - }, - "ConfirmPrivateVirtualInterface": { - "input": { - "type": "structure", - "required": [ - "virtualInterfaceId", - "virtualGatewayId" - ], - "members": { - "virtualInterfaceId": {}, - "virtualGatewayId": {} - } - }, - "output": { - "type": "structure", - "members": { - "virtualInterfaceState": {} - } - } - }, - "ConfirmPublicVirtualInterface": { - "input": { - "type": "structure", - "required": [ - "virtualInterfaceId" - ], - "members": { - "virtualInterfaceId": {} - } - }, - "output": { - "type": "structure", - "members": { - "virtualInterfaceState": {} - } - } - }, - "CreateConnection": { - "input": { - "type": "structure", - "required": [ - "location", - "bandwidth", - "connectionName" - ], - "members": { - "location": {}, - "bandwidth": {}, - "connectionName": {} - } - }, - "output": { - "shape": "S7" - } - }, - "CreateInterconnect": { - "input": { - "type": "structure", - "required": [ - "interconnectName", - "bandwidth", - "location" - ], - "members": { - "interconnectName": {}, - "bandwidth": {}, - "location": {} - } - }, - "output": { - "shape": "S14" - } - }, - "CreatePrivateVirtualInterface": { - "input": { - "type": "structure", - "required": [ - "connectionId", - "newPrivateVirtualInterface" - ], - "members": { - "connectionId": {}, - "newPrivateVirtualInterface": { - "type": "structure", - "required": [ - "virtualInterfaceName", - "vlan", - "asn", - "virtualGatewayId" - ], - "members": { - "virtualInterfaceName": {}, - "vlan": { - "type": "integer" - }, - "asn": { - "type": "integer" - }, - "authKey": {}, - "amazonAddress": {}, - "customerAddress": {}, - "virtualGatewayId": {} - } - } - } - }, - "output": { - "shape": "Sk" - } - }, - "CreatePublicVirtualInterface": { - "input": { - "type": "structure", - "required": [ - "connectionId", - "newPublicVirtualInterface" - ], - "members": { - "connectionId": {}, - "newPublicVirtualInterface": { - "type": "structure", - "required": [ - "virtualInterfaceName", - "vlan", - "asn", - "amazonAddress", - "customerAddress", - "routeFilterPrefixes" - ], - "members": { - "virtualInterfaceName": {}, - "vlan": { - "type": "integer" - }, - "asn": { - "type": "integer" - }, - "authKey": {}, - "amazonAddress": {}, - "customerAddress": {}, - "routeFilterPrefixes": { - "shape": "Sq" - } - } - } - } - }, - "output": { - "shape": "Sk" - } - }, - "DeleteConnection": { - "input": { - "type": "structure", - "required": [ - "connectionId" - ], - "members": { - "connectionId": {} - } - }, - "output": { - "shape": "S7" - } - }, - "DeleteInterconnect": { - "input": { - "type": "structure", - "required": [ - "interconnectId" - ], - "members": { - "interconnectId": {} - } - }, - "output": { - "type": "structure", - "members": { - "interconnectState": {} - } - } - }, - "DeleteVirtualInterface": { - "input": { - "type": "structure", - "required": [ - "virtualInterfaceId" - ], - "members": { - "virtualInterfaceId": {} - } - }, - "output": { - "type": "structure", - "members": { - "virtualInterfaceState": {} - } - } - }, - "DescribeConnections": { - "input": { - "type": "structure", - "members": { - "connectionId": {} - } - }, - "output": { - "shape": "S1g" - } - }, - "DescribeConnectionsOnInterconnect": { - "input": { - "type": "structure", - "required": [ - "interconnectId" - ], - "members": { - "interconnectId": {} - } - }, - "output": { - "shape": "S1g" - } - }, - "DescribeInterconnects": { - "input": { - "type": "structure", - "members": { - "interconnectId": {} - } - }, - "output": { - "type": "structure", - "members": { - "interconnects": { - "type": "list", - "member": { - "shape": "S14" - } - } - } - } - }, - "DescribeLocations": { - "output": { - "type": "structure", - "members": { - "locations": { - "type": "list", - "member": { - "type": "structure", - "members": { - "locationCode": {}, - "locationName": {} - } - } - } - } - } - }, - "DescribeVirtualGateways": { - "output": { - "type": "structure", - "members": { - "virtualGateways": { - "type": "list", - "member": { - "type": "structure", - "members": { - "virtualGatewayId": {}, - "virtualGatewayState": {} - } - } - } - } - } - }, - "DescribeVirtualInterfaces": { - "input": { - "type": "structure", - "members": { - "connectionId": {}, - "virtualInterfaceId": {} - } - }, - "output": { - "type": "structure", - "members": { - "virtualInterfaces": { - "type": "list", - "member": { - "shape": "Sk" - } - } - } - } - } - }, - "shapes": { - "S7": { - "type": "structure", - "members": { - "ownerAccount": {}, - "connectionId": {}, - "connectionName": {}, - "connectionState": {}, - "region": {}, - "location": {}, - "bandwidth": {}, - "vlan": { - "type": "integer" - }, - "partnerName": {} - } - }, - "Sk": { - "type": "structure", - "members": { - "ownerAccount": {}, - "virtualInterfaceId": {}, - "location": {}, - "connectionId": {}, - "virtualInterfaceType": {}, - "virtualInterfaceName": {}, - "vlan": { - "type": "integer" - }, - "asn": { - "type": "integer" - }, - "authKey": {}, - "amazonAddress": {}, - "customerAddress": {}, - "virtualInterfaceState": {}, - "customerRouterConfig": {}, - "virtualGatewayId": {}, - "routeFilterPrefixes": { - "shape": "Sq" - } - } - }, - "Sq": { - "type": "list", - "member": { - "type": "structure", - "members": { - "cidr": {} - } - } - }, - "S14": { - "type": "structure", - "members": { - "interconnectId": {}, - "interconnectName": {}, - "interconnectState": {}, - "region": {}, - "location": {}, - "bandwidth": {} - } - }, - "S1g": { - "type": "structure", - "members": { - "connections": { - "type": "list", - "member": { - "shape": "S7" - } - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/directconnect-2012-10-25.paginators.json b/cli/node_modules/aws-sdk/apis/directconnect-2012-10-25.paginators.json deleted file mode 100644 index cc93bedd4..000000000 --- a/cli/node_modules/aws-sdk/apis/directconnect-2012-10-25.paginators.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "pagination": { - "DescribeConnections": { - "result_key": "connections" - }, - "DescribeConnectionsOnInterconnect": { - "result_key": "connections" - }, - "DescribeInterconnects": { - "result_key": "interconnects" - }, - "DescribeLocations": { - "result_key": "locations" - }, - "DescribeVirtualGateways": { - "result_key": "virtualGateways" - }, - "DescribeVirtualInterfaces": { - "result_key": "virtualInterfaces" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/ds-2015-04-16.min.json b/cli/node_modules/aws-sdk/apis/ds-2015-04-16.min.json deleted file mode 100644 index 2289ad57d..000000000 --- a/cli/node_modules/aws-sdk/apis/ds-2015-04-16.min.json +++ /dev/null @@ -1,557 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2015-04-16", - "endpointPrefix": "ds", - "jsonVersion": "1.1", - "serviceAbbreviation": "Directory Service", - "serviceFullName": "AWS Directory Service", - "signatureVersion": "v4", - "targetPrefix": "DirectoryService_20150416", - "protocol": "json" - }, - "operations": { - "ConnectDirectory": { - "input": { - "type": "structure", - "required": [ - "Name", - "Password", - "Size", - "ConnectSettings" - ], - "members": { - "Name": {}, - "ShortName": {}, - "Password": { - "shape": "S4" - }, - "Description": {}, - "Size": {}, - "ConnectSettings": { - "type": "structure", - "required": [ - "VpcId", - "SubnetIds", - "CustomerDnsIps", - "CustomerUserName" - ], - "members": { - "VpcId": {}, - "SubnetIds": { - "shape": "S9" - }, - "CustomerDnsIps": { - "shape": "Sb" - }, - "CustomerUserName": {} - } - } - } - }, - "output": { - "type": "structure", - "members": { - "DirectoryId": {} - } - } - }, - "CreateAlias": { - "input": { - "type": "structure", - "required": [ - "DirectoryId", - "Alias" - ], - "members": { - "DirectoryId": {}, - "Alias": {} - } - }, - "output": { - "type": "structure", - "members": { - "DirectoryId": {}, - "Alias": {} - } - } - }, - "CreateComputer": { - "input": { - "type": "structure", - "required": [ - "DirectoryId", - "ComputerName", - "Password" - ], - "members": { - "DirectoryId": {}, - "ComputerName": {}, - "Password": { - "type": "string", - "sensitive": true - }, - "OrganizationalUnitDistinguishedName": {}, - "ComputerAttributes": { - "shape": "Sn" - } - } - }, - "output": { - "type": "structure", - "members": { - "Computer": { - "type": "structure", - "members": { - "ComputerId": {}, - "ComputerName": {}, - "ComputerAttributes": { - "shape": "Sn" - } - } - } - } - } - }, - "CreateDirectory": { - "input": { - "type": "structure", - "required": [ - "Name", - "Password", - "Size" - ], - "members": { - "Name": {}, - "ShortName": {}, - "Password": { - "type": "string", - "sensitive": true - }, - "Description": {}, - "Size": {}, - "VpcSettings": { - "type": "structure", - "required": [ - "VpcId", - "SubnetIds" - ], - "members": { - "VpcId": {}, - "SubnetIds": { - "shape": "S9" - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "DirectoryId": {} - } - } - }, - "CreateSnapshot": { - "input": { - "type": "structure", - "required": [ - "DirectoryId" - ], - "members": { - "DirectoryId": {}, - "Name": {} - } - }, - "output": { - "type": "structure", - "members": { - "SnapshotId": {} - } - } - }, - "DeleteDirectory": { - "input": { - "type": "structure", - "required": [ - "DirectoryId" - ], - "members": { - "DirectoryId": {} - } - }, - "output": { - "type": "structure", - "members": { - "DirectoryId": {} - } - } - }, - "DeleteSnapshot": { - "input": { - "type": "structure", - "required": [ - "SnapshotId" - ], - "members": { - "SnapshotId": {} - } - }, - "output": { - "type": "structure", - "members": { - "SnapshotId": {} - } - } - }, - "DescribeDirectories": { - "input": { - "type": "structure", - "members": { - "DirectoryIds": { - "type": "list", - "member": {} - }, - "NextToken": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "DirectoryDescriptions": { - "type": "list", - "member": { - "type": "structure", - "members": { - "DirectoryId": {}, - "Name": {}, - "ShortName": {}, - "Size": {}, - "Alias": {}, - "AccessUrl": {}, - "Description": {}, - "DnsIpAddrs": { - "shape": "Sb" - }, - "Stage": {}, - "LaunchTime": { - "type": "timestamp" - }, - "StageLastUpdatedDateTime": { - "type": "timestamp" - }, - "Type": {}, - "VpcSettings": { - "type": "structure", - "members": { - "VpcId": {}, - "SubnetIds": { - "shape": "S9" - }, - "SecurityGroupId": {}, - "AvailabilityZones": { - "shape": "S1k" - } - } - }, - "ConnectSettings": { - "type": "structure", - "members": { - "VpcId": {}, - "SubnetIds": { - "shape": "S9" - }, - "CustomerUserName": {}, - "SecurityGroupId": {}, - "AvailabilityZones": { - "shape": "S1k" - }, - "ConnectIps": { - "type": "list", - "member": {} - } - } - }, - "RadiusSettings": { - "shape": "S1o" - }, - "RadiusStatus": {}, - "StageReason": {}, - "SsoEnabled": { - "type": "boolean" - } - } - } - }, - "NextToken": {} - } - } - }, - "DescribeSnapshots": { - "input": { - "type": "structure", - "members": { - "DirectoryId": {}, - "SnapshotIds": { - "type": "list", - "member": {} - }, - "NextToken": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Snapshots": { - "type": "list", - "member": { - "type": "structure", - "members": { - "DirectoryId": {}, - "SnapshotId": {}, - "Type": {}, - "Name": {}, - "Status": {}, - "StartTime": { - "type": "timestamp" - } - } - } - }, - "NextToken": {} - } - } - }, - "DisableRadius": { - "input": { - "type": "structure", - "required": [ - "DirectoryId" - ], - "members": { - "DirectoryId": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "DisableSso": { - "input": { - "type": "structure", - "required": [ - "DirectoryId" - ], - "members": { - "DirectoryId": {}, - "UserName": {}, - "Password": { - "shape": "S4" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "EnableRadius": { - "input": { - "type": "structure", - "required": [ - "DirectoryId", - "RadiusSettings" - ], - "members": { - "DirectoryId": {}, - "RadiusSettings": { - "shape": "S1o" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "EnableSso": { - "input": { - "type": "structure", - "required": [ - "DirectoryId" - ], - "members": { - "DirectoryId": {}, - "UserName": {}, - "Password": { - "shape": "S4" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "GetDirectoryLimits": { - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "DirectoryLimits": { - "type": "structure", - "members": { - "CloudOnlyDirectoriesLimit": { - "type": "integer" - }, - "CloudOnlyDirectoriesCurrentCount": { - "type": "integer" - }, - "CloudOnlyDirectoriesLimitReached": { - "type": "boolean" - }, - "ConnectedDirectoriesLimit": { - "type": "integer" - }, - "ConnectedDirectoriesCurrentCount": { - "type": "integer" - }, - "ConnectedDirectoriesLimitReached": { - "type": "boolean" - } - } - } - } - } - }, - "GetSnapshotLimits": { - "input": { - "type": "structure", - "required": [ - "DirectoryId" - ], - "members": { - "DirectoryId": {} - } - }, - "output": { - "type": "structure", - "members": { - "SnapshotLimits": { - "type": "structure", - "members": { - "ManualSnapshotsLimit": { - "type": "integer" - }, - "ManualSnapshotsCurrentCount": { - "type": "integer" - }, - "ManualSnapshotsLimitReached": { - "type": "boolean" - } - } - } - } - } - }, - "RestoreFromSnapshot": { - "input": { - "type": "structure", - "required": [ - "SnapshotId" - ], - "members": { - "SnapshotId": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "UpdateRadius": { - "input": { - "type": "structure", - "required": [ - "DirectoryId", - "RadiusSettings" - ], - "members": { - "DirectoryId": {}, - "RadiusSettings": { - "shape": "S1o" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - } - }, - "shapes": { - "S4": { - "type": "string", - "sensitive": true - }, - "S9": { - "type": "list", - "member": {} - }, - "Sb": { - "type": "list", - "member": {} - }, - "Sn": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Name": {}, - "Value": {} - } - } - }, - "S1k": { - "type": "list", - "member": {} - }, - "S1o": { - "type": "structure", - "members": { - "RadiusServers": { - "type": "list", - "member": {} - }, - "RadiusPort": { - "type": "integer" - }, - "RadiusTimeout": { - "type": "integer" - }, - "RadiusRetries": { - "type": "integer" - }, - "SharedSecret": { - "type": "string", - "sensitive": true - }, - "AuthenticationProtocol": {}, - "DisplayLabel": {}, - "UseSameUsername": { - "type": "boolean" - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/dynamodb-2011-12-05.min.json b/cli/node_modules/aws-sdk/apis/dynamodb-2011-12-05.min.json deleted file mode 100644 index 16000c181..000000000 --- a/cli/node_modules/aws-sdk/apis/dynamodb-2011-12-05.min.json +++ /dev/null @@ -1,662 +0,0 @@ -{ - "metadata": { - "apiVersion": "2011-12-05", - "endpointPrefix": "dynamodb", - "jsonVersion": "1.0", - "serviceAbbreviation": "DynamoDB", - "serviceFullName": "Amazon DynamoDB", - "signatureVersion": "v4", - "targetPrefix": "DynamoDB_20111205", - "protocol": "json" - }, - "operations": { - "BatchGetItem": { - "input": { - "type": "structure", - "required": [ - "RequestItems" - ], - "members": { - "RequestItems": { - "shape": "S2" - } - } - }, - "output": { - "type": "structure", - "members": { - "Responses": { - "type": "map", - "key": {}, - "value": { - "type": "structure", - "members": { - "Items": { - "shape": "Sk" - }, - "ConsumedCapacityUnits": { - "type": "double" - } - } - } - }, - "UnprocessedKeys": { - "shape": "S2" - } - } - } - }, - "BatchWriteItem": { - "input": { - "type": "structure", - "required": [ - "RequestItems" - ], - "members": { - "RequestItems": { - "shape": "So" - } - } - }, - "output": { - "type": "structure", - "members": { - "Responses": { - "type": "map", - "key": {}, - "value": { - "type": "structure", - "members": { - "ConsumedCapacityUnits": { - "type": "double" - } - } - } - }, - "UnprocessedItems": { - "shape": "So" - } - } - } - }, - "CreateTable": { - "input": { - "type": "structure", - "required": [ - "TableName", - "KeySchema", - "ProvisionedThroughput" - ], - "members": { - "TableName": {}, - "KeySchema": { - "shape": "Sy" - }, - "ProvisionedThroughput": { - "shape": "S12" - } - } - }, - "output": { - "type": "structure", - "members": { - "TableDescription": { - "shape": "S15" - } - } - } - }, - "DeleteItem": { - "input": { - "type": "structure", - "required": [ - "TableName", - "Key" - ], - "members": { - "TableName": {}, - "Key": { - "shape": "S6" - }, - "Expected": { - "shape": "S1b" - }, - "ReturnValues": {} - } - }, - "output": { - "type": "structure", - "members": { - "Attributes": { - "shape": "Sl" - }, - "ConsumedCapacityUnits": { - "type": "double" - } - } - } - }, - "DeleteTable": { - "input": { - "type": "structure", - "required": [ - "TableName" - ], - "members": { - "TableName": {} - } - }, - "output": { - "type": "structure", - "members": { - "TableDescription": { - "shape": "S15" - } - } - } - }, - "DescribeTable": { - "input": { - "type": "structure", - "required": [ - "TableName" - ], - "members": { - "TableName": {} - } - }, - "output": { - "type": "structure", - "members": { - "Table": { - "shape": "S15" - } - } - } - }, - "GetItem": { - "input": { - "type": "structure", - "required": [ - "TableName", - "Key" - ], - "members": { - "TableName": {}, - "Key": { - "shape": "S6" - }, - "AttributesToGet": { - "shape": "Se" - }, - "ConsistentRead": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "Item": { - "shape": "Sl" - }, - "ConsumedCapacityUnits": { - "type": "double" - } - } - } - }, - "ListTables": { - "input": { - "type": "structure", - "members": { - "ExclusiveStartTableName": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "TableNames": { - "type": "list", - "member": {} - }, - "LastEvaluatedTableName": {} - } - } - }, - "PutItem": { - "input": { - "type": "structure", - "required": [ - "TableName", - "Item" - ], - "members": { - "TableName": {}, - "Item": { - "shape": "Ss" - }, - "Expected": { - "shape": "S1b" - }, - "ReturnValues": {} - } - }, - "output": { - "type": "structure", - "members": { - "Attributes": { - "shape": "Sl" - }, - "ConsumedCapacityUnits": { - "type": "double" - } - } - } - }, - "Query": { - "input": { - "type": "structure", - "required": [ - "TableName", - "HashKeyValue" - ], - "members": { - "TableName": {}, - "AttributesToGet": { - "shape": "Se" - }, - "Limit": { - "type": "integer" - }, - "ConsistentRead": { - "type": "boolean" - }, - "Count": { - "type": "boolean" - }, - "HashKeyValue": { - "shape": "S7" - }, - "RangeKeyCondition": { - "shape": "S1u" - }, - "ScanIndexForward": { - "type": "boolean" - }, - "ExclusiveStartKey": { - "shape": "S6" - } - } - }, - "output": { - "type": "structure", - "members": { - "Items": { - "shape": "Sk" - }, - "Count": { - "type": "integer" - }, - "LastEvaluatedKey": { - "shape": "S6" - }, - "ConsumedCapacityUnits": { - "type": "double" - } - } - } - }, - "Scan": { - "input": { - "type": "structure", - "required": [ - "TableName" - ], - "members": { - "TableName": {}, - "AttributesToGet": { - "shape": "Se" - }, - "Limit": { - "type": "integer" - }, - "Count": { - "type": "boolean" - }, - "ScanFilter": { - "type": "map", - "key": {}, - "value": { - "shape": "S1u" - } - }, - "ExclusiveStartKey": { - "shape": "S6" - } - } - }, - "output": { - "type": "structure", - "members": { - "Items": { - "shape": "Sk" - }, - "Count": { - "type": "integer" - }, - "ScannedCount": { - "type": "integer" - }, - "LastEvaluatedKey": { - "shape": "S6" - }, - "ConsumedCapacityUnits": { - "type": "double" - } - } - } - }, - "UpdateItem": { - "input": { - "type": "structure", - "required": [ - "TableName", - "Key", - "AttributeUpdates" - ], - "members": { - "TableName": {}, - "Key": { - "shape": "S6" - }, - "AttributeUpdates": { - "type": "map", - "key": {}, - "value": { - "type": "structure", - "members": { - "Value": { - "shape": "S7" - }, - "Action": {} - } - } - }, - "Expected": { - "shape": "S1b" - }, - "ReturnValues": {} - } - }, - "output": { - "type": "structure", - "members": { - "Attributes": { - "shape": "Sl" - }, - "ConsumedCapacityUnits": { - "type": "double" - } - } - } - }, - "UpdateTable": { - "input": { - "type": "structure", - "required": [ - "TableName", - "ProvisionedThroughput" - ], - "members": { - "TableName": {}, - "ProvisionedThroughput": { - "shape": "S12" - } - } - }, - "output": { - "type": "structure", - "members": { - "TableDescription": { - "shape": "S15" - } - } - } - } - }, - "shapes": { - "S2": { - "type": "map", - "key": {}, - "value": { - "type": "structure", - "required": [ - "Keys" - ], - "members": { - "Keys": { - "type": "list", - "member": { - "shape": "S6" - } - }, - "AttributesToGet": { - "shape": "Se" - }, - "ConsistentRead": { - "type": "boolean" - } - } - } - }, - "S6": { - "type": "structure", - "required": [ - "HashKeyElement" - ], - "members": { - "HashKeyElement": { - "shape": "S7" - }, - "RangeKeyElement": { - "shape": "S7" - } - } - }, - "S7": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "blob" - }, - "SS": { - "type": "list", - "member": {} - }, - "NS": { - "type": "list", - "member": {} - }, - "BS": { - "type": "list", - "member": { - "type": "blob" - } - } - } - }, - "Se": { - "type": "list", - "member": {} - }, - "Sk": { - "type": "list", - "member": { - "shape": "Sl" - } - }, - "Sl": { - "type": "map", - "key": {}, - "value": { - "shape": "S7" - } - }, - "So": { - "type": "map", - "key": {}, - "value": { - "type": "list", - "member": { - "type": "structure", - "members": { - "PutRequest": { - "type": "structure", - "required": [ - "Item" - ], - "members": { - "Item": { - "shape": "Ss" - } - } - }, - "DeleteRequest": { - "type": "structure", - "required": [ - "Key" - ], - "members": { - "Key": { - "shape": "S6" - } - } - } - } - } - } - }, - "Ss": { - "type": "map", - "key": {}, - "value": { - "shape": "S7" - } - }, - "Sy": { - "type": "structure", - "required": [ - "HashKeyElement" - ], - "members": { - "HashKeyElement": { - "shape": "Sz" - }, - "RangeKeyElement": { - "shape": "Sz" - } - } - }, - "Sz": { - "type": "structure", - "required": [ - "AttributeName", - "AttributeType" - ], - "members": { - "AttributeName": {}, - "AttributeType": {} - } - }, - "S12": { - "type": "structure", - "required": [ - "ReadCapacityUnits", - "WriteCapacityUnits" - ], - "members": { - "ReadCapacityUnits": { - "type": "long" - }, - "WriteCapacityUnits": { - "type": "long" - } - } - }, - "S15": { - "type": "structure", - "members": { - "TableName": {}, - "KeySchema": { - "shape": "Sy" - }, - "TableStatus": {}, - "CreationDateTime": { - "type": "timestamp" - }, - "ProvisionedThroughput": { - "type": "structure", - "members": { - "LastIncreaseDateTime": { - "type": "timestamp" - }, - "LastDecreaseDateTime": { - "type": "timestamp" - }, - "NumberOfDecreasesToday": { - "type": "long" - }, - "ReadCapacityUnits": { - "type": "long" - }, - "WriteCapacityUnits": { - "type": "long" - } - } - }, - "TableSizeBytes": { - "type": "long" - }, - "ItemCount": { - "type": "long" - } - } - }, - "S1b": { - "type": "map", - "key": {}, - "value": { - "type": "structure", - "members": { - "Value": { - "shape": "S7" - }, - "Exists": { - "type": "boolean" - } - } - } - }, - "S1u": { - "type": "structure", - "required": [ - "ComparisonOperator" - ], - "members": { - "AttributeValueList": { - "type": "list", - "member": { - "shape": "S7" - } - }, - "ComparisonOperator": {} - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/dynamodb-2011-12-05.paginators.json b/cli/node_modules/aws-sdk/apis/dynamodb-2011-12-05.paginators.json deleted file mode 100644 index d4075e120..000000000 --- a/cli/node_modules/aws-sdk/apis/dynamodb-2011-12-05.paginators.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "pagination": { - "BatchGetItem": { - "input_token": "RequestItems", - "output_token": "UnprocessedKeys" - }, - "ListTables": { - "input_token": "ExclusiveStartTableName", - "output_token": "LastEvaluatedTableName", - "limit_key": "Limit", - "result_key": "TableNames" - }, - "Query": { - "input_token": "ExclusiveStartKey", - "output_token": "LastEvaluatedKey", - "limit_key": "Limit", - "result_key": "Items" - }, - "Scan": { - "input_token": "ExclusiveStartKey", - "output_token": "LastEvaluatedKey", - "limit_key": "Limit", - "result_key": "Items" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/dynamodb-2011-12-05.waiters.json b/cli/node_modules/aws-sdk/apis/dynamodb-2011-12-05.waiters.json deleted file mode 100644 index 50a2b217d..000000000 --- a/cli/node_modules/aws-sdk/apis/dynamodb-2011-12-05.waiters.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "waiters": { - "__default__": { - "interval": 20, - "max_attempts": 25 - }, - "__TableState": { - "operation": "DescribeTable" - }, - "TableExists": { - "extends": "__TableState", - "description": "Wait until a table exists and can be accessed", - "ignore_errors": [ - "ResourceNotFoundException" - ], - "success_type": "output", - "success_path": "Table.TableStatus", - "success_value": "ACTIVE" - }, - "TableNotExists": { - "extends": "__TableState", - "description": "Wait until a table is deleted", - "success_type": "error", - "success_value": "ResourceNotFoundException" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/dynamodb-2012-08-10.min.json b/cli/node_modules/aws-sdk/apis/dynamodb-2012-08-10.min.json deleted file mode 100644 index 8e42e9887..000000000 --- a/cli/node_modules/aws-sdk/apis/dynamodb-2012-08-10.min.json +++ /dev/null @@ -1,1028 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2012-08-10", - "endpointPrefix": "dynamodb", - "jsonVersion": "1.0", - "serviceAbbreviation": "DynamoDB", - "serviceFullName": "Amazon DynamoDB", - "signatureVersion": "v4", - "targetPrefix": "DynamoDB_20120810", - "protocol": "json" - }, - "operations": { - "BatchGetItem": { - "input": { - "type": "structure", - "required": [ - "RequestItems" - ], - "members": { - "RequestItems": { - "shape": "S2" - }, - "ReturnConsumedCapacity": {} - } - }, - "output": { - "type": "structure", - "members": { - "Responses": { - "type": "map", - "key": {}, - "value": { - "shape": "Sr" - } - }, - "UnprocessedKeys": { - "shape": "S2" - }, - "ConsumedCapacity": { - "shape": "St" - } - } - } - }, - "BatchWriteItem": { - "input": { - "type": "structure", - "required": [ - "RequestItems" - ], - "members": { - "RequestItems": { - "shape": "S10" - }, - "ReturnConsumedCapacity": {}, - "ReturnItemCollectionMetrics": {} - } - }, - "output": { - "type": "structure", - "members": { - "UnprocessedItems": { - "shape": "S10" - }, - "ItemCollectionMetrics": { - "type": "map", - "key": {}, - "value": { - "type": "list", - "member": { - "shape": "S1a" - } - } - }, - "ConsumedCapacity": { - "shape": "St" - } - } - } - }, - "CreateTable": { - "input": { - "type": "structure", - "required": [ - "AttributeDefinitions", - "TableName", - "KeySchema", - "ProvisionedThroughput" - ], - "members": { - "AttributeDefinitions": { - "shape": "S1f" - }, - "TableName": {}, - "KeySchema": { - "shape": "S1j" - }, - "LocalSecondaryIndexes": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "IndexName", - "KeySchema", - "Projection" - ], - "members": { - "IndexName": {}, - "KeySchema": { - "shape": "S1j" - }, - "Projection": { - "shape": "S1o" - } - } - } - }, - "GlobalSecondaryIndexes": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "IndexName", - "KeySchema", - "Projection", - "ProvisionedThroughput" - ], - "members": { - "IndexName": {}, - "KeySchema": { - "shape": "S1j" - }, - "Projection": { - "shape": "S1o" - }, - "ProvisionedThroughput": { - "shape": "S1u" - } - } - } - }, - "ProvisionedThroughput": { - "shape": "S1u" - }, - "StreamSpecification": { - "shape": "S1w" - } - } - }, - "output": { - "type": "structure", - "members": { - "TableDescription": { - "shape": "S20" - } - } - } - }, - "DeleteItem": { - "input": { - "type": "structure", - "required": [ - "TableName", - "Key" - ], - "members": { - "TableName": {}, - "Key": { - "shape": "S6" - }, - "Expected": { - "shape": "S2e" - }, - "ConditionalOperator": {}, - "ReturnValues": {}, - "ReturnConsumedCapacity": {}, - "ReturnItemCollectionMetrics": {}, - "ConditionExpression": {}, - "ExpressionAttributeNames": { - "shape": "Sm" - }, - "ExpressionAttributeValues": { - "shape": "S2m" - } - } - }, - "output": { - "type": "structure", - "members": { - "Attributes": { - "shape": "Ss" - }, - "ConsumedCapacity": { - "shape": "Su" - }, - "ItemCollectionMetrics": { - "shape": "S1a" - } - } - } - }, - "DeleteTable": { - "input": { - "type": "structure", - "required": [ - "TableName" - ], - "members": { - "TableName": {} - } - }, - "output": { - "type": "structure", - "members": { - "TableDescription": { - "shape": "S20" - } - } - } - }, - "DescribeTable": { - "input": { - "type": "structure", - "required": [ - "TableName" - ], - "members": { - "TableName": {} - } - }, - "output": { - "type": "structure", - "members": { - "Table": { - "shape": "S20" - } - } - } - }, - "GetItem": { - "input": { - "type": "structure", - "required": [ - "TableName", - "Key" - ], - "members": { - "TableName": {}, - "Key": { - "shape": "S6" - }, - "AttributesToGet": { - "shape": "Sj" - }, - "ConsistentRead": { - "type": "boolean" - }, - "ReturnConsumedCapacity": {}, - "ProjectionExpression": {}, - "ExpressionAttributeNames": { - "shape": "Sm" - } - } - }, - "output": { - "type": "structure", - "members": { - "Item": { - "shape": "Ss" - }, - "ConsumedCapacity": { - "shape": "Su" - } - } - } - }, - "ListTables": { - "input": { - "type": "structure", - "members": { - "ExclusiveStartTableName": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "TableNames": { - "type": "list", - "member": {} - }, - "LastEvaluatedTableName": {} - } - } - }, - "PutItem": { - "input": { - "type": "structure", - "required": [ - "TableName", - "Item" - ], - "members": { - "TableName": {}, - "Item": { - "shape": "S14" - }, - "Expected": { - "shape": "S2e" - }, - "ReturnValues": {}, - "ReturnConsumedCapacity": {}, - "ReturnItemCollectionMetrics": {}, - "ConditionalOperator": {}, - "ConditionExpression": {}, - "ExpressionAttributeNames": { - "shape": "Sm" - }, - "ExpressionAttributeValues": { - "shape": "S2m" - } - } - }, - "output": { - "type": "structure", - "members": { - "Attributes": { - "shape": "Ss" - }, - "ConsumedCapacity": { - "shape": "Su" - }, - "ItemCollectionMetrics": { - "shape": "S1a" - } - } - } - }, - "Query": { - "input": { - "type": "structure", - "required": [ - "TableName" - ], - "members": { - "TableName": {}, - "IndexName": {}, - "Select": {}, - "AttributesToGet": { - "shape": "Sj" - }, - "Limit": { - "type": "integer" - }, - "ConsistentRead": { - "type": "boolean" - }, - "KeyConditions": { - "type": "map", - "key": {}, - "value": { - "shape": "S35" - } - }, - "QueryFilter": { - "shape": "S36" - }, - "ConditionalOperator": {}, - "ScanIndexForward": { - "type": "boolean" - }, - "ExclusiveStartKey": { - "shape": "S6" - }, - "ReturnConsumedCapacity": {}, - "ProjectionExpression": {}, - "FilterExpression": {}, - "KeyConditionExpression": {}, - "ExpressionAttributeNames": { - "shape": "Sm" - }, - "ExpressionAttributeValues": { - "shape": "S2m" - } - } - }, - "output": { - "type": "structure", - "members": { - "Items": { - "shape": "Sr" - }, - "Count": { - "type": "integer" - }, - "ScannedCount": { - "type": "integer" - }, - "LastEvaluatedKey": { - "shape": "S6" - }, - "ConsumedCapacity": { - "shape": "Su" - } - } - } - }, - "Scan": { - "input": { - "type": "structure", - "required": [ - "TableName" - ], - "members": { - "TableName": {}, - "IndexName": {}, - "AttributesToGet": { - "shape": "Sj" - }, - "Limit": { - "type": "integer" - }, - "Select": {}, - "ScanFilter": { - "shape": "S36" - }, - "ConditionalOperator": {}, - "ExclusiveStartKey": { - "shape": "S6" - }, - "ReturnConsumedCapacity": {}, - "TotalSegments": { - "type": "integer" - }, - "Segment": { - "type": "integer" - }, - "ProjectionExpression": {}, - "FilterExpression": {}, - "ExpressionAttributeNames": { - "shape": "Sm" - }, - "ExpressionAttributeValues": { - "shape": "S2m" - }, - "ConsistentRead": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "Items": { - "shape": "Sr" - }, - "Count": { - "type": "integer" - }, - "ScannedCount": { - "type": "integer" - }, - "LastEvaluatedKey": { - "shape": "S6" - }, - "ConsumedCapacity": { - "shape": "Su" - } - } - } - }, - "UpdateItem": { - "input": { - "type": "structure", - "required": [ - "TableName", - "Key" - ], - "members": { - "TableName": {}, - "Key": { - "shape": "S6" - }, - "AttributeUpdates": { - "type": "map", - "key": {}, - "value": { - "type": "structure", - "members": { - "Value": { - "shape": "S8" - }, - "Action": {} - } - } - }, - "Expected": { - "shape": "S2e" - }, - "ConditionalOperator": {}, - "ReturnValues": {}, - "ReturnConsumedCapacity": {}, - "ReturnItemCollectionMetrics": {}, - "UpdateExpression": {}, - "ConditionExpression": {}, - "ExpressionAttributeNames": { - "shape": "Sm" - }, - "ExpressionAttributeValues": { - "shape": "S2m" - } - } - }, - "output": { - "type": "structure", - "members": { - "Attributes": { - "shape": "Ss" - }, - "ConsumedCapacity": { - "shape": "Su" - }, - "ItemCollectionMetrics": { - "shape": "S1a" - } - } - } - }, - "UpdateTable": { - "input": { - "type": "structure", - "required": [ - "TableName" - ], - "members": { - "AttributeDefinitions": { - "shape": "S1f" - }, - "TableName": {}, - "ProvisionedThroughput": { - "shape": "S1u" - }, - "GlobalSecondaryIndexUpdates": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Update": { - "type": "structure", - "required": [ - "IndexName", - "ProvisionedThroughput" - ], - "members": { - "IndexName": {}, - "ProvisionedThroughput": { - "shape": "S1u" - } - } - }, - "Create": { - "type": "structure", - "required": [ - "IndexName", - "KeySchema", - "Projection", - "ProvisionedThroughput" - ], - "members": { - "IndexName": {}, - "KeySchema": { - "shape": "S1j" - }, - "Projection": { - "shape": "S1o" - }, - "ProvisionedThroughput": { - "shape": "S1u" - } - } - }, - "Delete": { - "type": "structure", - "required": [ - "IndexName" - ], - "members": { - "IndexName": {} - } - } - } - } - }, - "StreamSpecification": { - "shape": "S1w" - } - } - }, - "output": { - "type": "structure", - "members": { - "TableDescription": { - "shape": "S20" - } - } - } - } - }, - "shapes": { - "S2": { - "type": "map", - "key": {}, - "value": { - "type": "structure", - "required": [ - "Keys" - ], - "members": { - "Keys": { - "type": "list", - "member": { - "shape": "S6" - } - }, - "AttributesToGet": { - "shape": "Sj" - }, - "ConsistentRead": { - "type": "boolean" - }, - "ProjectionExpression": {}, - "ExpressionAttributeNames": { - "shape": "Sm" - } - } - } - }, - "S6": { - "type": "map", - "key": {}, - "value": { - "shape": "S8" - } - }, - "S8": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "blob" - }, - "SS": { - "type": "list", - "member": {} - }, - "NS": { - "type": "list", - "member": {} - }, - "BS": { - "type": "list", - "member": { - "type": "blob" - } - }, - "M": { - "type": "map", - "key": {}, - "value": { - "shape": "S8" - } - }, - "L": { - "type": "list", - "member": { - "shape": "S8" - } - }, - "NULL": { - "type": "boolean" - }, - "BOOL": { - "type": "boolean" - } - } - }, - "Sj": { - "type": "list", - "member": {} - }, - "Sm": { - "type": "map", - "key": {}, - "value": {} - }, - "Sr": { - "type": "list", - "member": { - "shape": "Ss" - } - }, - "Ss": { - "type": "map", - "key": {}, - "value": { - "shape": "S8" - } - }, - "St": { - "type": "list", - "member": { - "shape": "Su" - } - }, - "Su": { - "type": "structure", - "members": { - "TableName": {}, - "CapacityUnits": { - "type": "double" - }, - "Table": { - "shape": "Sw" - }, - "LocalSecondaryIndexes": { - "shape": "Sx" - }, - "GlobalSecondaryIndexes": { - "shape": "Sx" - } - } - }, - "Sw": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "double" - } - } - }, - "Sx": { - "type": "map", - "key": {}, - "value": { - "shape": "Sw" - } - }, - "S10": { - "type": "map", - "key": {}, - "value": { - "type": "list", - "member": { - "type": "structure", - "members": { - "PutRequest": { - "type": "structure", - "required": [ - "Item" - ], - "members": { - "Item": { - "shape": "S14" - } - } - }, - "DeleteRequest": { - "type": "structure", - "required": [ - "Key" - ], - "members": { - "Key": { - "shape": "S6" - } - } - } - } - } - } - }, - "S14": { - "type": "map", - "key": {}, - "value": { - "shape": "S8" - } - }, - "S1a": { - "type": "structure", - "members": { - "ItemCollectionKey": { - "type": "map", - "key": {}, - "value": { - "shape": "S8" - } - }, - "SizeEstimateRangeGB": { - "type": "list", - "member": { - "type": "double" - } - } - } - }, - "S1f": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "AttributeName", - "AttributeType" - ], - "members": { - "AttributeName": {}, - "AttributeType": {} - } - } - }, - "S1j": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "AttributeName", - "KeyType" - ], - "members": { - "AttributeName": {}, - "KeyType": {} - } - } - }, - "S1o": { - "type": "structure", - "members": { - "ProjectionType": {}, - "NonKeyAttributes": { - "type": "list", - "member": {} - } - } - }, - "S1u": { - "type": "structure", - "required": [ - "ReadCapacityUnits", - "WriteCapacityUnits" - ], - "members": { - "ReadCapacityUnits": { - "type": "long" - }, - "WriteCapacityUnits": { - "type": "long" - } - } - }, - "S1w": { - "type": "structure", - "members": { - "StreamEnabled": { - "type": "boolean" - }, - "StreamViewType": {} - } - }, - "S20": { - "type": "structure", - "members": { - "AttributeDefinitions": { - "shape": "S1f" - }, - "TableName": {}, - "KeySchema": { - "shape": "S1j" - }, - "TableStatus": {}, - "CreationDateTime": { - "type": "timestamp" - }, - "ProvisionedThroughput": { - "shape": "S23" - }, - "TableSizeBytes": { - "type": "long" - }, - "ItemCount": { - "type": "long" - }, - "TableArn": {}, - "LocalSecondaryIndexes": { - "type": "list", - "member": { - "type": "structure", - "members": { - "IndexName": {}, - "KeySchema": { - "shape": "S1j" - }, - "Projection": { - "shape": "S1o" - }, - "IndexSizeBytes": { - "type": "long" - }, - "ItemCount": { - "type": "long" - }, - "IndexArn": {} - } - } - }, - "GlobalSecondaryIndexes": { - "type": "list", - "member": { - "type": "structure", - "members": { - "IndexName": {}, - "KeySchema": { - "shape": "S1j" - }, - "Projection": { - "shape": "S1o" - }, - "IndexStatus": {}, - "Backfilling": { - "type": "boolean" - }, - "ProvisionedThroughput": { - "shape": "S23" - }, - "IndexSizeBytes": { - "type": "long" - }, - "ItemCount": { - "type": "long" - }, - "IndexArn": {} - } - } - }, - "StreamSpecification": { - "shape": "S1w" - }, - "LatestStreamLabel": {}, - "LatestStreamArn": {} - } - }, - "S23": { - "type": "structure", - "members": { - "LastIncreaseDateTime": { - "type": "timestamp" - }, - "LastDecreaseDateTime": { - "type": "timestamp" - }, - "NumberOfDecreasesToday": { - "type": "long" - }, - "ReadCapacityUnits": { - "type": "long" - }, - "WriteCapacityUnits": { - "type": "long" - } - } - }, - "S2e": { - "type": "map", - "key": {}, - "value": { - "type": "structure", - "members": { - "Value": { - "shape": "S8" - }, - "Exists": { - "type": "boolean" - }, - "ComparisonOperator": {}, - "AttributeValueList": { - "shape": "S2i" - } - } - } - }, - "S2i": { - "type": "list", - "member": { - "shape": "S8" - } - }, - "S2m": { - "type": "map", - "key": {}, - "value": { - "shape": "S8" - } - }, - "S35": { - "type": "structure", - "required": [ - "ComparisonOperator" - ], - "members": { - "AttributeValueList": { - "shape": "S2i" - }, - "ComparisonOperator": {} - } - }, - "S36": { - "type": "map", - "key": {}, - "value": { - "shape": "S35" - } - } - }, - "examples": {} -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/dynamodb-2012-08-10.paginators.json b/cli/node_modules/aws-sdk/apis/dynamodb-2012-08-10.paginators.json deleted file mode 100644 index d4075e120..000000000 --- a/cli/node_modules/aws-sdk/apis/dynamodb-2012-08-10.paginators.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "pagination": { - "BatchGetItem": { - "input_token": "RequestItems", - "output_token": "UnprocessedKeys" - }, - "ListTables": { - "input_token": "ExclusiveStartTableName", - "output_token": "LastEvaluatedTableName", - "limit_key": "Limit", - "result_key": "TableNames" - }, - "Query": { - "input_token": "ExclusiveStartKey", - "output_token": "LastEvaluatedKey", - "limit_key": "Limit", - "result_key": "Items" - }, - "Scan": { - "input_token": "ExclusiveStartKey", - "output_token": "LastEvaluatedKey", - "limit_key": "Limit", - "result_key": "Items" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/dynamodb-2012-08-10.waiters.json b/cli/node_modules/aws-sdk/apis/dynamodb-2012-08-10.waiters.json deleted file mode 100644 index 6e0e1045a..000000000 --- a/cli/node_modules/aws-sdk/apis/dynamodb-2012-08-10.waiters.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "waiters": { - "__default__": { - "interval": 20, - "max_attempts": 25 - }, - "__TableState": { - "operation": "DescribeTable" - }, - "TableExists": { - "extends": "__TableState", - "ignore_errors": [ - "ResourceNotFoundException" - ], - "success_type": "output", - "success_path": "Table.TableStatus", - "success_value": "ACTIVE" - }, - "TableNotExists": { - "extends": "__TableState", - "success_type": "error", - "success_value": "ResourceNotFoundException" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/ec2-2015-04-15.min.json b/cli/node_modules/aws-sdk/apis/ec2-2015-04-15.min.json deleted file mode 100644 index 79e76b9a2..000000000 --- a/cli/node_modules/aws-sdk/apis/ec2-2015-04-15.min.json +++ /dev/null @@ -1,8999 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2015-04-15", - "endpointPrefix": "ec2", - "serviceAbbreviation": "Amazon EC2", - "serviceFullName": "Amazon Elastic Compute Cloud", - "signatureVersion": "v4", - "xmlNamespace": "http://ec2.amazonaws.com/doc/2015-04-15", - "protocol": "ec2" - }, - "operations": { - "AcceptVpcPeeringConnection": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VpcPeeringConnectionId": { - "locationName": "vpcPeeringConnectionId" - } - } - }, - "output": { - "type": "structure", - "members": { - "VpcPeeringConnection": { - "shape": "S5", - "locationName": "vpcPeeringConnection" - } - } - } - }, - "AllocateAddress": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "Domain": {} - } - }, - "output": { - "type": "structure", - "members": { - "PublicIp": { - "locationName": "publicIp" - }, - "Domain": { - "locationName": "domain" - }, - "AllocationId": { - "locationName": "allocationId" - } - } - } - }, - "AssignPrivateIpAddresses": { - "input": { - "type": "structure", - "required": [ - "NetworkInterfaceId" - ], - "members": { - "NetworkInterfaceId": { - "locationName": "networkInterfaceId" - }, - "PrivateIpAddresses": { - "shape": "Sg", - "locationName": "privateIpAddress" - }, - "SecondaryPrivateIpAddressCount": { - "locationName": "secondaryPrivateIpAddressCount", - "type": "integer" - }, - "AllowReassignment": { - "locationName": "allowReassignment", - "type": "boolean" - } - } - } - }, - "AssociateAddress": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InstanceId": {}, - "PublicIp": {}, - "AllocationId": {}, - "NetworkInterfaceId": { - "locationName": "networkInterfaceId" - }, - "PrivateIpAddress": { - "locationName": "privateIpAddress" - }, - "AllowReassociation": { - "locationName": "allowReassociation", - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "AssociationId": { - "locationName": "associationId" - } - } - } - }, - "AssociateDhcpOptions": { - "input": { - "type": "structure", - "required": [ - "DhcpOptionsId", - "VpcId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "DhcpOptionsId": {}, - "VpcId": {} - } - } - }, - "AssociateRouteTable": { - "input": { - "type": "structure", - "required": [ - "SubnetId", - "RouteTableId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "SubnetId": { - "locationName": "subnetId" - }, - "RouteTableId": { - "locationName": "routeTableId" - } - } - }, - "output": { - "type": "structure", - "members": { - "AssociationId": { - "locationName": "associationId" - } - } - } - }, - "AttachClassicLinkVpc": { - "input": { - "type": "structure", - "required": [ - "InstanceId", - "VpcId", - "Groups" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InstanceId": { - "locationName": "instanceId" - }, - "VpcId": { - "locationName": "vpcId" - }, - "Groups": { - "shape": "So", - "locationName": "SecurityGroupId" - } - } - }, - "output": { - "type": "structure", - "members": { - "Return": { - "locationName": "return", - "type": "boolean" - } - } - } - }, - "AttachInternetGateway": { - "input": { - "type": "structure", - "required": [ - "InternetGatewayId", - "VpcId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InternetGatewayId": { - "locationName": "internetGatewayId" - }, - "VpcId": { - "locationName": "vpcId" - } - } - } - }, - "AttachNetworkInterface": { - "input": { - "type": "structure", - "required": [ - "NetworkInterfaceId", - "InstanceId", - "DeviceIndex" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "NetworkInterfaceId": { - "locationName": "networkInterfaceId" - }, - "InstanceId": { - "locationName": "instanceId" - }, - "DeviceIndex": { - "locationName": "deviceIndex", - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "AttachmentId": { - "locationName": "attachmentId" - } - } - } - }, - "AttachVolume": { - "input": { - "type": "structure", - "required": [ - "VolumeId", - "InstanceId", - "Device" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VolumeId": {}, - "InstanceId": {}, - "Device": {} - } - }, - "output": { - "shape": "Su", - "locationName": "attachment" - } - }, - "AttachVpnGateway": { - "input": { - "type": "structure", - "required": [ - "VpnGatewayId", - "VpcId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VpnGatewayId": {}, - "VpcId": {} - } - }, - "output": { - "type": "structure", - "members": { - "VpcAttachment": { - "shape": "Sy", - "locationName": "attachment" - } - } - } - }, - "AuthorizeSecurityGroupEgress": { - "input": { - "type": "structure", - "required": [ - "GroupId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "GroupId": { - "locationName": "groupId" - }, - "SourceSecurityGroupName": { - "locationName": "sourceSecurityGroupName" - }, - "SourceSecurityGroupOwnerId": { - "locationName": "sourceSecurityGroupOwnerId" - }, - "IpProtocol": { - "locationName": "ipProtocol" - }, - "FromPort": { - "locationName": "fromPort", - "type": "integer" - }, - "ToPort": { - "locationName": "toPort", - "type": "integer" - }, - "CidrIp": { - "locationName": "cidrIp" - }, - "IpPermissions": { - "shape": "S11", - "locationName": "ipPermissions" - } - } - } - }, - "AuthorizeSecurityGroupIngress": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "GroupName": {}, - "GroupId": {}, - "SourceSecurityGroupName": {}, - "SourceSecurityGroupOwnerId": {}, - "IpProtocol": {}, - "FromPort": { - "type": "integer" - }, - "ToPort": { - "type": "integer" - }, - "CidrIp": {}, - "IpPermissions": { - "shape": "S11" - } - } - } - }, - "BundleInstance": { - "input": { - "type": "structure", - "required": [ - "InstanceId", - "Storage" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InstanceId": {}, - "Storage": { - "shape": "S1b" - } - } - }, - "output": { - "type": "structure", - "members": { - "BundleTask": { - "shape": "S1f", - "locationName": "bundleInstanceTask" - } - } - } - }, - "CancelBundleTask": { - "input": { - "type": "structure", - "required": [ - "BundleId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "BundleId": {} - } - }, - "output": { - "type": "structure", - "members": { - "BundleTask": { - "shape": "S1f", - "locationName": "bundleInstanceTask" - } - } - } - }, - "CancelConversionTask": { - "input": { - "type": "structure", - "required": [ - "ConversionTaskId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "ConversionTaskId": { - "locationName": "conversionTaskId" - }, - "ReasonMessage": { - "locationName": "reasonMessage" - } - } - } - }, - "CancelExportTask": { - "input": { - "type": "structure", - "required": [ - "ExportTaskId" - ], - "members": { - "ExportTaskId": { - "locationName": "exportTaskId" - } - } - } - }, - "CancelImportTask": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "ImportTaskId": {}, - "CancelReason": {} - } - }, - "output": { - "type": "structure", - "members": { - "ImportTaskId": { - "locationName": "importTaskId" - }, - "State": { - "locationName": "state" - }, - "PreviousState": { - "locationName": "previousState" - } - } - } - }, - "CancelReservedInstancesListing": { - "input": { - "type": "structure", - "required": [ - "ReservedInstancesListingId" - ], - "members": { - "ReservedInstancesListingId": { - "locationName": "reservedInstancesListingId" - } - } - }, - "output": { - "type": "structure", - "members": { - "ReservedInstancesListings": { - "shape": "S1q", - "locationName": "reservedInstancesListingsSet" - } - } - } - }, - "CancelSpotFleetRequests": { - "input": { - "type": "structure", - "required": [ - "SpotFleetRequestIds", - "TerminateInstances" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "SpotFleetRequestIds": { - "shape": "S22", - "locationName": "spotFleetRequestId" - }, - "TerminateInstances": { - "locationName": "terminateInstances", - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "UnsuccessfulFleetRequests": { - "locationName": "unsuccessfulFleetRequestSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "required": [ - "SpotFleetRequestId", - "Error" - ], - "members": { - "SpotFleetRequestId": { - "locationName": "spotFleetRequestId" - }, - "Error": { - "locationName": "error", - "type": "structure", - "required": [ - "Code", - "Message" - ], - "members": { - "Code": { - "locationName": "code" - }, - "Message": { - "locationName": "message" - } - } - } - } - } - }, - "SuccessfulFleetRequests": { - "locationName": "successfulFleetRequestSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "required": [ - "SpotFleetRequestId", - "CurrentSpotFleetRequestState", - "PreviousSpotFleetRequestState" - ], - "members": { - "SpotFleetRequestId": { - "locationName": "spotFleetRequestId" - }, - "CurrentSpotFleetRequestState": { - "locationName": "currentSpotFleetRequestState" - }, - "PreviousSpotFleetRequestState": { - "locationName": "previousSpotFleetRequestState" - } - } - } - } - } - } - }, - "CancelSpotInstanceRequests": { - "input": { - "type": "structure", - "required": [ - "SpotInstanceRequestIds" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "SpotInstanceRequestIds": { - "shape": "S2c", - "locationName": "SpotInstanceRequestId" - } - } - }, - "output": { - "type": "structure", - "members": { - "CancelledSpotInstanceRequests": { - "locationName": "spotInstanceRequestSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "SpotInstanceRequestId": { - "locationName": "spotInstanceRequestId" - }, - "State": { - "locationName": "state" - } - } - } - } - } - } - }, - "ConfirmProductInstance": { - "input": { - "type": "structure", - "required": [ - "ProductCode", - "InstanceId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "ProductCode": {}, - "InstanceId": {} - } - }, - "output": { - "type": "structure", - "members": { - "OwnerId": { - "locationName": "ownerId" - }, - "Return": { - "locationName": "return", - "type": "boolean" - } - } - } - }, - "CopyImage": { - "input": { - "type": "structure", - "required": [ - "SourceRegion", - "SourceImageId", - "Name" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "SourceRegion": {}, - "SourceImageId": {}, - "Name": {}, - "Description": {}, - "ClientToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "ImageId": { - "locationName": "imageId" - } - } - } - }, - "CopySnapshot": { - "input": { - "type": "structure", - "required": [ - "SourceRegion", - "SourceSnapshotId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "SourceRegion": {}, - "SourceSnapshotId": {}, - "Description": {}, - "DestinationRegion": { - "locationName": "destinationRegion" - }, - "PresignedUrl": { - "locationName": "presignedUrl" - }, - "Encrypted": { - "locationName": "encrypted", - "type": "boolean" - }, - "KmsKeyId": { - "locationName": "kmsKeyId" - } - } - }, - "output": { - "type": "structure", - "members": { - "SnapshotId": { - "locationName": "snapshotId" - } - } - } - }, - "CreateCustomerGateway": { - "input": { - "type": "structure", - "required": [ - "Type", - "PublicIp", - "BgpAsn" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "Type": {}, - "PublicIp": { - "locationName": "IpAddress" - }, - "BgpAsn": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "CustomerGateway": { - "shape": "S2q", - "locationName": "customerGateway" - } - } - } - }, - "CreateDhcpOptions": { - "input": { - "type": "structure", - "required": [ - "DhcpConfigurations" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "DhcpConfigurations": { - "locationName": "dhcpConfiguration", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "Key": { - "locationName": "key" - }, - "Values": { - "shape": "S22", - "locationName": "Value" - } - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "DhcpOptions": { - "shape": "S2v", - "locationName": "dhcpOptions" - } - } - } - }, - "CreateFlowLogs": { - "input": { - "type": "structure", - "required": [ - "ResourceIds", - "ResourceType", - "TrafficType", - "LogGroupName", - "DeliverLogsPermissionArn" - ], - "members": { - "ResourceIds": { - "shape": "S22", - "locationName": "ResourceId" - }, - "ResourceType": {}, - "TrafficType": {}, - "LogGroupName": {}, - "DeliverLogsPermissionArn": {}, - "ClientToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "FlowLogIds": { - "shape": "S22", - "locationName": "flowLogIdSet" - }, - "ClientToken": { - "locationName": "clientToken" - }, - "Unsuccessful": { - "shape": "S34", - "locationName": "unsuccessful" - } - } - } - }, - "CreateImage": { - "input": { - "type": "structure", - "required": [ - "InstanceId", - "Name" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InstanceId": { - "locationName": "instanceId" - }, - "Name": { - "locationName": "name" - }, - "Description": { - "locationName": "description" - }, - "NoReboot": { - "locationName": "noReboot", - "type": "boolean" - }, - "BlockDeviceMappings": { - "shape": "S38", - "locationName": "blockDeviceMapping" - } - } - }, - "output": { - "type": "structure", - "members": { - "ImageId": { - "locationName": "imageId" - } - } - } - }, - "CreateInstanceExportTask": { - "input": { - "type": "structure", - "required": [ - "InstanceId" - ], - "members": { - "Description": { - "locationName": "description" - }, - "InstanceId": { - "locationName": "instanceId" - }, - "TargetEnvironment": { - "locationName": "targetEnvironment" - }, - "ExportToS3Task": { - "locationName": "exportToS3", - "type": "structure", - "members": { - "DiskImageFormat": { - "locationName": "diskImageFormat" - }, - "ContainerFormat": { - "locationName": "containerFormat" - }, - "S3Bucket": { - "locationName": "s3Bucket" - }, - "S3Prefix": { - "locationName": "s3Prefix" - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "ExportTask": { - "shape": "S3j", - "locationName": "exportTask" - } - } - } - }, - "CreateInternetGateway": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "InternetGateway": { - "shape": "S3p", - "locationName": "internetGateway" - } - } - } - }, - "CreateKeyPair": { - "input": { - "type": "structure", - "required": [ - "KeyName" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "KeyName": {} - } - }, - "output": { - "locationName": "keyPair", - "type": "structure", - "members": { - "KeyName": { - "locationName": "keyName" - }, - "KeyFingerprint": { - "locationName": "keyFingerprint" - }, - "KeyMaterial": { - "locationName": "keyMaterial" - } - } - } - }, - "CreateNetworkAcl": { - "input": { - "type": "structure", - "required": [ - "VpcId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VpcId": { - "locationName": "vpcId" - } - } - }, - "output": { - "type": "structure", - "members": { - "NetworkAcl": { - "shape": "S3w", - "locationName": "networkAcl" - } - } - } - }, - "CreateNetworkAclEntry": { - "input": { - "type": "structure", - "required": [ - "NetworkAclId", - "RuleNumber", - "Protocol", - "RuleAction", - "Egress", - "CidrBlock" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "NetworkAclId": { - "locationName": "networkAclId" - }, - "RuleNumber": { - "locationName": "ruleNumber", - "type": "integer" - }, - "Protocol": { - "locationName": "protocol" - }, - "RuleAction": { - "locationName": "ruleAction" - }, - "Egress": { - "locationName": "egress", - "type": "boolean" - }, - "CidrBlock": { - "locationName": "cidrBlock" - }, - "IcmpTypeCode": { - "shape": "S40", - "locationName": "Icmp" - }, - "PortRange": { - "shape": "S41", - "locationName": "portRange" - } - } - } - }, - "CreateNetworkInterface": { - "input": { - "type": "structure", - "required": [ - "SubnetId" - ], - "members": { - "SubnetId": { - "locationName": "subnetId" - }, - "Description": { - "locationName": "description" - }, - "PrivateIpAddress": { - "locationName": "privateIpAddress" - }, - "Groups": { - "shape": "S46", - "locationName": "SecurityGroupId" - }, - "PrivateIpAddresses": { - "shape": "S47", - "locationName": "privateIpAddresses" - }, - "SecondaryPrivateIpAddressCount": { - "locationName": "secondaryPrivateIpAddressCount", - "type": "integer" - }, - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "NetworkInterface": { - "shape": "S4a", - "locationName": "networkInterface" - } - } - } - }, - "CreatePlacementGroup": { - "input": { - "type": "structure", - "required": [ - "GroupName", - "Strategy" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "GroupName": { - "locationName": "groupName" - }, - "Strategy": { - "locationName": "strategy" - } - } - } - }, - "CreateReservedInstancesListing": { - "input": { - "type": "structure", - "required": [ - "ReservedInstancesId", - "InstanceCount", - "PriceSchedules", - "ClientToken" - ], - "members": { - "ReservedInstancesId": { - "locationName": "reservedInstancesId" - }, - "InstanceCount": { - "locationName": "instanceCount", - "type": "integer" - }, - "PriceSchedules": { - "locationName": "priceSchedules", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "Term": { - "locationName": "term", - "type": "long" - }, - "Price": { - "locationName": "price", - "type": "double" - }, - "CurrencyCode": { - "locationName": "currencyCode" - } - } - } - }, - "ClientToken": { - "locationName": "clientToken" - } - } - }, - "output": { - "type": "structure", - "members": { - "ReservedInstancesListings": { - "shape": "S1q", - "locationName": "reservedInstancesListingsSet" - } - } - } - }, - "CreateRoute": { - "input": { - "type": "structure", - "required": [ - "RouteTableId", - "DestinationCidrBlock" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "RouteTableId": { - "locationName": "routeTableId" - }, - "DestinationCidrBlock": { - "locationName": "destinationCidrBlock" - }, - "GatewayId": { - "locationName": "gatewayId" - }, - "InstanceId": { - "locationName": "instanceId" - }, - "NetworkInterfaceId": { - "locationName": "networkInterfaceId" - }, - "VpcPeeringConnectionId": { - "locationName": "vpcPeeringConnectionId" - } - } - }, - "output": { - "type": "structure", - "members": { - "Return": { - "locationName": "return", - "type": "boolean" - } - } - } - }, - "CreateRouteTable": { - "input": { - "type": "structure", - "required": [ - "VpcId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VpcId": { - "locationName": "vpcId" - } - } - }, - "output": { - "type": "structure", - "members": { - "RouteTable": { - "shape": "S4s", - "locationName": "routeTable" - } - } - } - }, - "CreateSecurityGroup": { - "input": { - "type": "structure", - "required": [ - "GroupName", - "Description" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "GroupName": {}, - "Description": { - "locationName": "GroupDescription" - }, - "VpcId": {} - } - }, - "output": { - "type": "structure", - "members": { - "GroupId": { - "locationName": "groupId" - } - } - } - }, - "CreateSnapshot": { - "input": { - "type": "structure", - "required": [ - "VolumeId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VolumeId": {}, - "Description": {} - } - }, - "output": { - "shape": "S54", - "locationName": "snapshot" - } - }, - "CreateSpotDatafeedSubscription": { - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "Bucket": { - "locationName": "bucket" - }, - "Prefix": { - "locationName": "prefix" - } - } - }, - "output": { - "type": "structure", - "members": { - "SpotDatafeedSubscription": { - "shape": "S58", - "locationName": "spotDatafeedSubscription" - } - } - } - }, - "CreateSubnet": { - "input": { - "type": "structure", - "required": [ - "VpcId", - "CidrBlock" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VpcId": {}, - "CidrBlock": {}, - "AvailabilityZone": {} - } - }, - "output": { - "type": "structure", - "members": { - "Subnet": { - "shape": "S5d", - "locationName": "subnet" - } - } - } - }, - "CreateTags": { - "input": { - "type": "structure", - "required": [ - "Resources", - "Tags" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "Resources": { - "shape": "S5g", - "locationName": "ResourceId" - }, - "Tags": { - "shape": "Sa", - "locationName": "Tag" - } - } - } - }, - "CreateVolume": { - "input": { - "type": "structure", - "required": [ - "AvailabilityZone" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "Size": { - "type": "integer" - }, - "SnapshotId": {}, - "AvailabilityZone": {}, - "VolumeType": {}, - "Iops": { - "type": "integer" - }, - "Encrypted": { - "locationName": "encrypted", - "type": "boolean" - }, - "KmsKeyId": {} - } - }, - "output": { - "shape": "S5i", - "locationName": "volume" - } - }, - "CreateVpc": { - "input": { - "type": "structure", - "required": [ - "CidrBlock" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "CidrBlock": {}, - "InstanceTenancy": { - "locationName": "instanceTenancy" - } - } - }, - "output": { - "type": "structure", - "members": { - "Vpc": { - "shape": "S5o", - "locationName": "vpc" - } - } - } - }, - "CreateVpcEndpoint": { - "input": { - "type": "structure", - "required": [ - "VpcId", - "ServiceName" - ], - "members": { - "DryRun": { - "type": "boolean" - }, - "VpcId": {}, - "ServiceName": {}, - "PolicyDocument": {}, - "RouteTableIds": { - "shape": "S22", - "locationName": "RouteTableId" - }, - "ClientToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "VpcEndpoint": { - "shape": "S5s", - "locationName": "vpcEndpoint" - }, - "ClientToken": { - "locationName": "clientToken" - } - } - } - }, - "CreateVpcPeeringConnection": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VpcId": { - "locationName": "vpcId" - }, - "PeerVpcId": { - "locationName": "peerVpcId" - }, - "PeerOwnerId": { - "locationName": "peerOwnerId" - } - } - }, - "output": { - "type": "structure", - "members": { - "VpcPeeringConnection": { - "shape": "S5", - "locationName": "vpcPeeringConnection" - } - } - } - }, - "CreateVpnConnection": { - "input": { - "type": "structure", - "required": [ - "Type", - "CustomerGatewayId", - "VpnGatewayId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "Type": {}, - "CustomerGatewayId": {}, - "VpnGatewayId": {}, - "Options": { - "locationName": "options", - "type": "structure", - "members": { - "StaticRoutesOnly": { - "locationName": "staticRoutesOnly", - "type": "boolean" - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "VpnConnection": { - "shape": "S5z", - "locationName": "vpnConnection" - } - } - } - }, - "CreateVpnConnectionRoute": { - "input": { - "type": "structure", - "required": [ - "VpnConnectionId", - "DestinationCidrBlock" - ], - "members": { - "VpnConnectionId": {}, - "DestinationCidrBlock": {} - } - } - }, - "CreateVpnGateway": { - "input": { - "type": "structure", - "required": [ - "Type" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "Type": {}, - "AvailabilityZone": {} - } - }, - "output": { - "type": "structure", - "members": { - "VpnGateway": { - "shape": "S6b", - "locationName": "vpnGateway" - } - } - } - }, - "DeleteCustomerGateway": { - "input": { - "type": "structure", - "required": [ - "CustomerGatewayId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "CustomerGatewayId": {} - } - } - }, - "DeleteDhcpOptions": { - "input": { - "type": "structure", - "required": [ - "DhcpOptionsId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "DhcpOptionsId": {} - } - } - }, - "DeleteFlowLogs": { - "input": { - "type": "structure", - "required": [ - "FlowLogIds" - ], - "members": { - "FlowLogIds": { - "shape": "S22", - "locationName": "FlowLogId" - } - } - }, - "output": { - "type": "structure", - "members": { - "Unsuccessful": { - "shape": "S34", - "locationName": "unsuccessful" - } - } - } - }, - "DeleteInternetGateway": { - "input": { - "type": "structure", - "required": [ - "InternetGatewayId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InternetGatewayId": { - "locationName": "internetGatewayId" - } - } - } - }, - "DeleteKeyPair": { - "input": { - "type": "structure", - "required": [ - "KeyName" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "KeyName": {} - } - } - }, - "DeleteNetworkAcl": { - "input": { - "type": "structure", - "required": [ - "NetworkAclId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "NetworkAclId": { - "locationName": "networkAclId" - } - } - } - }, - "DeleteNetworkAclEntry": { - "input": { - "type": "structure", - "required": [ - "NetworkAclId", - "RuleNumber", - "Egress" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "NetworkAclId": { - "locationName": "networkAclId" - }, - "RuleNumber": { - "locationName": "ruleNumber", - "type": "integer" - }, - "Egress": { - "locationName": "egress", - "type": "boolean" - } - } - } - }, - "DeleteNetworkInterface": { - "input": { - "type": "structure", - "required": [ - "NetworkInterfaceId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "NetworkInterfaceId": { - "locationName": "networkInterfaceId" - } - } - } - }, - "DeletePlacementGroup": { - "input": { - "type": "structure", - "required": [ - "GroupName" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "GroupName": { - "locationName": "groupName" - } - } - } - }, - "DeleteRoute": { - "input": { - "type": "structure", - "required": [ - "RouteTableId", - "DestinationCidrBlock" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "RouteTableId": { - "locationName": "routeTableId" - }, - "DestinationCidrBlock": { - "locationName": "destinationCidrBlock" - } - } - } - }, - "DeleteRouteTable": { - "input": { - "type": "structure", - "required": [ - "RouteTableId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "RouteTableId": { - "locationName": "routeTableId" - } - } - } - }, - "DeleteSecurityGroup": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "GroupName": {}, - "GroupId": {} - } - } - }, - "DeleteSnapshot": { - "input": { - "type": "structure", - "required": [ - "SnapshotId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "SnapshotId": {} - } - } - }, - "DeleteSpotDatafeedSubscription": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - } - } - } - }, - "DeleteSubnet": { - "input": { - "type": "structure", - "required": [ - "SubnetId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "SubnetId": {} - } - } - }, - "DeleteTags": { - "input": { - "type": "structure", - "required": [ - "Resources" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "Resources": { - "shape": "S5g", - "locationName": "resourceId" - }, - "Tags": { - "shape": "Sa", - "locationName": "tag" - } - } - } - }, - "DeleteVolume": { - "input": { - "type": "structure", - "required": [ - "VolumeId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VolumeId": {} - } - } - }, - "DeleteVpc": { - "input": { - "type": "structure", - "required": [ - "VpcId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VpcId": {} - } - } - }, - "DeleteVpcEndpoints": { - "input": { - "type": "structure", - "required": [ - "VpcEndpointIds" - ], - "members": { - "DryRun": { - "type": "boolean" - }, - "VpcEndpointIds": { - "shape": "S22", - "locationName": "VpcEndpointId" - } - } - }, - "output": { - "type": "structure", - "members": { - "Unsuccessful": { - "shape": "S34", - "locationName": "unsuccessful" - } - } - } - }, - "DeleteVpcPeeringConnection": { - "input": { - "type": "structure", - "required": [ - "VpcPeeringConnectionId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VpcPeeringConnectionId": { - "locationName": "vpcPeeringConnectionId" - } - } - }, - "output": { - "type": "structure", - "members": { - "Return": { - "locationName": "return", - "type": "boolean" - } - } - } - }, - "DeleteVpnConnection": { - "input": { - "type": "structure", - "required": [ - "VpnConnectionId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VpnConnectionId": {} - } - } - }, - "DeleteVpnConnectionRoute": { - "input": { - "type": "structure", - "required": [ - "VpnConnectionId", - "DestinationCidrBlock" - ], - "members": { - "VpnConnectionId": {}, - "DestinationCidrBlock": {} - } - } - }, - "DeleteVpnGateway": { - "input": { - "type": "structure", - "required": [ - "VpnGatewayId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VpnGatewayId": {} - } - } - }, - "DeregisterImage": { - "input": { - "type": "structure", - "required": [ - "ImageId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "ImageId": {} - } - } - }, - "DescribeAccountAttributes": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "AttributeNames": { - "locationName": "attributeName", - "type": "list", - "member": { - "locationName": "attributeName" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "AccountAttributes": { - "locationName": "accountAttributeSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "AttributeName": { - "locationName": "attributeName" - }, - "AttributeValues": { - "locationName": "attributeValueSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "AttributeValue": { - "locationName": "attributeValue" - } - } - } - } - } - } - } - } - } - }, - "DescribeAddresses": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "PublicIps": { - "locationName": "PublicIp", - "type": "list", - "member": { - "locationName": "PublicIp" - } - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - }, - "AllocationIds": { - "locationName": "AllocationId", - "type": "list", - "member": { - "locationName": "AllocationId" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "Addresses": { - "locationName": "addressesSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "InstanceId": { - "locationName": "instanceId" - }, - "PublicIp": { - "locationName": "publicIp" - }, - "AllocationId": { - "locationName": "allocationId" - }, - "AssociationId": { - "locationName": "associationId" - }, - "Domain": { - "locationName": "domain" - }, - "NetworkInterfaceId": { - "locationName": "networkInterfaceId" - }, - "NetworkInterfaceOwnerId": { - "locationName": "networkInterfaceOwnerId" - }, - "PrivateIpAddress": { - "locationName": "privateIpAddress" - } - } - } - } - } - } - }, - "DescribeAvailabilityZones": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "ZoneNames": { - "locationName": "ZoneName", - "type": "list", - "member": { - "locationName": "ZoneName" - } - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "AvailabilityZones": { - "locationName": "availabilityZoneInfo", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "ZoneName": { - "locationName": "zoneName" - }, - "State": { - "locationName": "zoneState" - }, - "RegionName": { - "locationName": "regionName" - }, - "Messages": { - "locationName": "messageSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "Message": { - "locationName": "message" - } - } - } - } - } - } - } - } - } - }, - "DescribeBundleTasks": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "BundleIds": { - "locationName": "BundleId", - "type": "list", - "member": { - "locationName": "BundleId" - } - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "BundleTasks": { - "locationName": "bundleInstanceTasksSet", - "type": "list", - "member": { - "shape": "S1f", - "locationName": "item" - } - } - } - } - }, - "DescribeClassicLinkInstances": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InstanceIds": { - "shape": "S7x", - "locationName": "InstanceId" - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - }, - "NextToken": { - "locationName": "nextToken" - }, - "MaxResults": { - "locationName": "maxResults", - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Instances": { - "locationName": "instancesSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "InstanceId": { - "locationName": "instanceId" - }, - "VpcId": { - "locationName": "vpcId" - }, - "Groups": { - "shape": "S4c", - "locationName": "groupSet" - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - } - } - } - }, - "NextToken": { - "locationName": "nextToken" - } - } - } - }, - "DescribeConversionTasks": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "Filters": { - "shape": "S7e", - "locationName": "filter" - }, - "ConversionTaskIds": { - "locationName": "conversionTaskId", - "type": "list", - "member": { - "locationName": "item" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "ConversionTasks": { - "locationName": "conversionTasks", - "type": "list", - "member": { - "shape": "S85", - "locationName": "item" - } - } - } - } - }, - "DescribeCustomerGateways": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "CustomerGatewayIds": { - "locationName": "CustomerGatewayId", - "type": "list", - "member": { - "locationName": "CustomerGatewayId" - } - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "CustomerGateways": { - "locationName": "customerGatewaySet", - "type": "list", - "member": { - "shape": "S2q", - "locationName": "item" - } - } - } - } - }, - "DescribeDhcpOptions": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "DhcpOptionsIds": { - "locationName": "DhcpOptionsId", - "type": "list", - "member": { - "locationName": "DhcpOptionsId" - } - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "DhcpOptions": { - "locationName": "dhcpOptionsSet", - "type": "list", - "member": { - "shape": "S2v", - "locationName": "item" - } - } - } - } - }, - "DescribeExportTasks": { - "input": { - "type": "structure", - "members": { - "ExportTaskIds": { - "locationName": "exportTaskId", - "type": "list", - "member": { - "locationName": "ExportTaskId" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "ExportTasks": { - "locationName": "exportTaskSet", - "type": "list", - "member": { - "shape": "S3j", - "locationName": "item" - } - } - } - } - }, - "DescribeFlowLogs": { - "input": { - "type": "structure", - "members": { - "FlowLogIds": { - "shape": "S22", - "locationName": "FlowLogId" - }, - "Filter": { - "shape": "S7e" - }, - "NextToken": {}, - "MaxResults": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "FlowLogs": { - "locationName": "flowLogSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "CreationTime": { - "locationName": "creationTime", - "type": "timestamp" - }, - "FlowLogId": { - "locationName": "flowLogId" - }, - "FlowLogStatus": { - "locationName": "flowLogStatus" - }, - "ResourceId": { - "locationName": "resourceId" - }, - "TrafficType": { - "locationName": "trafficType" - }, - "LogGroupName": { - "locationName": "logGroupName" - }, - "DeliverLogsStatus": { - "locationName": "deliverLogsStatus" - }, - "DeliverLogsErrorMessage": { - "locationName": "deliverLogsErrorMessage" - }, - "DeliverLogsPermissionArn": { - "locationName": "deliverLogsPermissionArn" - } - } - } - }, - "NextToken": { - "locationName": "nextToken" - } - } - } - }, - "DescribeImageAttribute": { - "input": { - "type": "structure", - "required": [ - "ImageId", - "Attribute" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "ImageId": {}, - "Attribute": {} - } - }, - "output": { - "locationName": "imageAttribute", - "type": "structure", - "members": { - "ImageId": { - "locationName": "imageId" - }, - "LaunchPermissions": { - "shape": "S8x", - "locationName": "launchPermission" - }, - "ProductCodes": { - "shape": "S90", - "locationName": "productCodes" - }, - "KernelId": { - "shape": "S2z", - "locationName": "kernel" - }, - "RamdiskId": { - "shape": "S2z", - "locationName": "ramdisk" - }, - "Description": { - "shape": "S2z", - "locationName": "description" - }, - "SriovNetSupport": { - "shape": "S2z", - "locationName": "sriovNetSupport" - }, - "BlockDeviceMappings": { - "shape": "S93", - "locationName": "blockDeviceMapping" - } - } - } - }, - "DescribeImages": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "ImageIds": { - "locationName": "ImageId", - "type": "list", - "member": { - "locationName": "ImageId" - } - }, - "Owners": { - "shape": "S96", - "locationName": "Owner" - }, - "ExecutableUsers": { - "locationName": "ExecutableBy", - "type": "list", - "member": { - "locationName": "ExecutableBy" - } - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "Images": { - "locationName": "imagesSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "ImageId": { - "locationName": "imageId" - }, - "ImageLocation": { - "locationName": "imageLocation" - }, - "State": { - "locationName": "imageState" - }, - "OwnerId": { - "locationName": "imageOwnerId" - }, - "CreationDate": { - "locationName": "creationDate" - }, - "Public": { - "locationName": "isPublic", - "type": "boolean" - }, - "ProductCodes": { - "shape": "S90", - "locationName": "productCodes" - }, - "Architecture": { - "locationName": "architecture" - }, - "ImageType": { - "locationName": "imageType" - }, - "KernelId": { - "locationName": "kernelId" - }, - "RamdiskId": { - "locationName": "ramdiskId" - }, - "Platform": { - "locationName": "platform" - }, - "SriovNetSupport": { - "locationName": "sriovNetSupport" - }, - "StateReason": { - "shape": "S9e", - "locationName": "stateReason" - }, - "ImageOwnerAlias": { - "locationName": "imageOwnerAlias" - }, - "Name": { - "locationName": "name" - }, - "Description": { - "locationName": "description" - }, - "RootDeviceType": { - "locationName": "rootDeviceType" - }, - "RootDeviceName": { - "locationName": "rootDeviceName" - }, - "BlockDeviceMappings": { - "shape": "S93", - "locationName": "blockDeviceMapping" - }, - "VirtualizationType": { - "locationName": "virtualizationType" - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - }, - "Hypervisor": { - "locationName": "hypervisor" - } - } - } - } - } - } - }, - "DescribeImportImageTasks": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "ImportTaskIds": { - "shape": "S9j", - "locationName": "ImportTaskId" - }, - "NextToken": {}, - "MaxResults": { - "type": "integer" - }, - "Filters": { - "shape": "S7e" - } - } - }, - "output": { - "type": "structure", - "members": { - "ImportImageTasks": { - "locationName": "importImageTaskSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "ImportTaskId": { - "locationName": "importTaskId" - }, - "Architecture": { - "locationName": "architecture" - }, - "LicenseType": { - "locationName": "licenseType" - }, - "Platform": { - "locationName": "platform" - }, - "Hypervisor": { - "locationName": "hypervisor" - }, - "Description": { - "locationName": "description" - }, - "SnapshotDetails": { - "shape": "S9n", - "locationName": "snapshotDetailSet" - }, - "ImageId": { - "locationName": "imageId" - }, - "Progress": { - "locationName": "progress" - }, - "StatusMessage": { - "locationName": "statusMessage" - }, - "Status": { - "locationName": "status" - } - } - } - }, - "NextToken": { - "locationName": "nextToken" - } - } - } - }, - "DescribeImportSnapshotTasks": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "ImportTaskIds": { - "shape": "S9j", - "locationName": "ImportTaskId" - }, - "NextToken": {}, - "MaxResults": { - "type": "integer" - }, - "Filters": { - "shape": "S7e" - } - } - }, - "output": { - "type": "structure", - "members": { - "ImportSnapshotTasks": { - "locationName": "importSnapshotTaskSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "ImportTaskId": { - "locationName": "importTaskId" - }, - "SnapshotTaskDetail": { - "shape": "S9u", - "locationName": "snapshotTaskDetail" - }, - "Description": { - "locationName": "description" - } - } - } - }, - "NextToken": { - "locationName": "nextToken" - } - } - } - }, - "DescribeInstanceAttribute": { - "input": { - "type": "structure", - "required": [ - "InstanceId", - "Attribute" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InstanceId": { - "locationName": "instanceId" - }, - "Attribute": { - "locationName": "attribute" - } - } - }, - "output": { - "type": "structure", - "members": { - "InstanceId": { - "locationName": "instanceId" - }, - "InstanceType": { - "shape": "S2z", - "locationName": "instanceType" - }, - "KernelId": { - "shape": "S2z", - "locationName": "kernel" - }, - "RamdiskId": { - "shape": "S2z", - "locationName": "ramdisk" - }, - "UserData": { - "shape": "S2z", - "locationName": "userData" - }, - "DisableApiTermination": { - "shape": "S9y", - "locationName": "disableApiTermination" - }, - "InstanceInitiatedShutdownBehavior": { - "shape": "S2z", - "locationName": "instanceInitiatedShutdownBehavior" - }, - "RootDeviceName": { - "shape": "S2z", - "locationName": "rootDeviceName" - }, - "BlockDeviceMappings": { - "shape": "S9z", - "locationName": "blockDeviceMapping" - }, - "ProductCodes": { - "shape": "S90", - "locationName": "productCodes" - }, - "EbsOptimized": { - "shape": "S9y", - "locationName": "ebsOptimized" - }, - "SriovNetSupport": { - "shape": "S2z", - "locationName": "sriovNetSupport" - }, - "SourceDestCheck": { - "shape": "S9y", - "locationName": "sourceDestCheck" - }, - "Groups": { - "shape": "S4c", - "locationName": "groupSet" - } - } - } - }, - "DescribeInstanceStatus": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InstanceIds": { - "shape": "S7x", - "locationName": "InstanceId" - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - }, - "NextToken": {}, - "MaxResults": { - "type": "integer" - }, - "IncludeAllInstances": { - "locationName": "includeAllInstances", - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "InstanceStatuses": { - "locationName": "instanceStatusSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "InstanceId": { - "locationName": "instanceId" - }, - "AvailabilityZone": { - "locationName": "availabilityZone" - }, - "Events": { - "locationName": "eventsSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "Code": { - "locationName": "code" - }, - "Description": { - "locationName": "description" - }, - "NotBefore": { - "locationName": "notBefore", - "type": "timestamp" - }, - "NotAfter": { - "locationName": "notAfter", - "type": "timestamp" - } - } - } - }, - "InstanceState": { - "shape": "Sa9", - "locationName": "instanceState" - }, - "SystemStatus": { - "shape": "Sab", - "locationName": "systemStatus" - }, - "InstanceStatus": { - "shape": "Sab", - "locationName": "instanceStatus" - } - } - } - }, - "NextToken": { - "locationName": "nextToken" - } - } - } - }, - "DescribeInstances": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InstanceIds": { - "shape": "S7x", - "locationName": "InstanceId" - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - }, - "NextToken": { - "locationName": "nextToken" - }, - "MaxResults": { - "locationName": "maxResults", - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Reservations": { - "locationName": "reservationSet", - "type": "list", - "member": { - "shape": "Sak", - "locationName": "item" - } - }, - "NextToken": { - "locationName": "nextToken" - } - } - } - }, - "DescribeInternetGateways": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InternetGatewayIds": { - "shape": "S22", - "locationName": "internetGatewayId" - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "InternetGateways": { - "locationName": "internetGatewaySet", - "type": "list", - "member": { - "shape": "S3p", - "locationName": "item" - } - } - } - } - }, - "DescribeKeyPairs": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "KeyNames": { - "locationName": "KeyName", - "type": "list", - "member": { - "locationName": "KeyName" - } - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "KeyPairs": { - "locationName": "keySet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "KeyName": { - "locationName": "keyName" - }, - "KeyFingerprint": { - "locationName": "keyFingerprint" - } - } - } - } - } - } - }, - "DescribeMovingAddresses": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "PublicIps": { - "shape": "S22", - "locationName": "publicIp" - }, - "NextToken": { - "locationName": "nextToken" - }, - "Filters": { - "shape": "S7e", - "locationName": "filter" - }, - "MaxResults": { - "locationName": "maxResults", - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "MovingAddressStatuses": { - "locationName": "movingAddressStatusSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "PublicIp": { - "locationName": "publicIp" - }, - "MoveStatus": { - "locationName": "moveStatus" - } - } - } - }, - "NextToken": { - "locationName": "nextToken" - } - } - } - }, - "DescribeNetworkAcls": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "NetworkAclIds": { - "shape": "S22", - "locationName": "NetworkAclId" - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "NetworkAcls": { - "locationName": "networkAclSet", - "type": "list", - "member": { - "shape": "S3w", - "locationName": "item" - } - } - } - } - }, - "DescribeNetworkInterfaceAttribute": { - "input": { - "type": "structure", - "required": [ - "NetworkInterfaceId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "NetworkInterfaceId": { - "locationName": "networkInterfaceId" - }, - "Attribute": { - "locationName": "attribute" - } - } - }, - "output": { - "type": "structure", - "members": { - "NetworkInterfaceId": { - "locationName": "networkInterfaceId" - }, - "Description": { - "shape": "S2z", - "locationName": "description" - }, - "SourceDestCheck": { - "shape": "S9y", - "locationName": "sourceDestCheck" - }, - "Groups": { - "shape": "S4c", - "locationName": "groupSet" - }, - "Attachment": { - "shape": "S4e", - "locationName": "attachment" - } - } - } - }, - "DescribeNetworkInterfaces": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "NetworkInterfaceIds": { - "locationName": "NetworkInterfaceId", - "type": "list", - "member": { - "locationName": "item" - } - }, - "Filters": { - "shape": "S7e", - "locationName": "filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "NetworkInterfaces": { - "locationName": "networkInterfaceSet", - "type": "list", - "member": { - "shape": "S4a", - "locationName": "item" - } - } - } - } - }, - "DescribePlacementGroups": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "GroupNames": { - "locationName": "groupName", - "type": "list", - "member": {} - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "PlacementGroups": { - "locationName": "placementGroupSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "GroupName": { - "locationName": "groupName" - }, - "Strategy": { - "locationName": "strategy" - }, - "State": { - "locationName": "state" - } - } - } - } - } - } - }, - "DescribePrefixLists": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "PrefixListIds": { - "shape": "S22", - "locationName": "PrefixListId" - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - }, - "MaxResults": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "PrefixLists": { - "locationName": "prefixListSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "PrefixListId": { - "locationName": "prefixListId" - }, - "PrefixListName": { - "locationName": "prefixListName" - }, - "Cidrs": { - "shape": "S22", - "locationName": "cidrSet" - } - } - } - }, - "NextToken": { - "locationName": "nextToken" - } - } - } - }, - "DescribeRegions": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "RegionNames": { - "locationName": "RegionName", - "type": "list", - "member": { - "locationName": "RegionName" - } - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "Regions": { - "locationName": "regionInfo", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "RegionName": { - "locationName": "regionName" - }, - "Endpoint": { - "locationName": "regionEndpoint" - } - } - } - } - } - } - }, - "DescribeReservedInstances": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "ReservedInstancesIds": { - "shape": "Sc2", - "locationName": "ReservedInstancesId" - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - }, - "OfferingType": { - "locationName": "offeringType" - } - } - }, - "output": { - "type": "structure", - "members": { - "ReservedInstances": { - "locationName": "reservedInstancesSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "ReservedInstancesId": { - "locationName": "reservedInstancesId" - }, - "InstanceType": { - "locationName": "instanceType" - }, - "AvailabilityZone": { - "locationName": "availabilityZone" - }, - "Start": { - "locationName": "start", - "type": "timestamp" - }, - "End": { - "locationName": "end", - "type": "timestamp" - }, - "Duration": { - "locationName": "duration", - "type": "long" - }, - "UsagePrice": { - "locationName": "usagePrice", - "type": "float" - }, - "FixedPrice": { - "locationName": "fixedPrice", - "type": "float" - }, - "InstanceCount": { - "locationName": "instanceCount", - "type": "integer" - }, - "ProductDescription": { - "locationName": "productDescription" - }, - "State": { - "locationName": "state" - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - }, - "InstanceTenancy": { - "locationName": "instanceTenancy" - }, - "CurrencyCode": { - "locationName": "currencyCode" - }, - "OfferingType": { - "locationName": "offeringType" - }, - "RecurringCharges": { - "shape": "Sca", - "locationName": "recurringCharges" - } - } - } - } - } - } - }, - "DescribeReservedInstancesListings": { - "input": { - "type": "structure", - "members": { - "ReservedInstancesId": { - "locationName": "reservedInstancesId" - }, - "ReservedInstancesListingId": { - "locationName": "reservedInstancesListingId" - }, - "Filters": { - "shape": "S7e", - "locationName": "filters" - } - } - }, - "output": { - "type": "structure", - "members": { - "ReservedInstancesListings": { - "shape": "S1q", - "locationName": "reservedInstancesListingsSet" - } - } - } - }, - "DescribeReservedInstancesModifications": { - "input": { - "type": "structure", - "members": { - "ReservedInstancesModificationIds": { - "locationName": "ReservedInstancesModificationId", - "type": "list", - "member": { - "locationName": "ReservedInstancesModificationId" - } - }, - "NextToken": { - "locationName": "nextToken" - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "ReservedInstancesModifications": { - "locationName": "reservedInstancesModificationsSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "ReservedInstancesModificationId": { - "locationName": "reservedInstancesModificationId" - }, - "ReservedInstancesIds": { - "locationName": "reservedInstancesSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "ReservedInstancesId": { - "locationName": "reservedInstancesId" - } - } - } - }, - "ModificationResults": { - "locationName": "modificationResultSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "ReservedInstancesId": { - "locationName": "reservedInstancesId" - }, - "TargetConfiguration": { - "shape": "Sco", - "locationName": "targetConfiguration" - } - } - } - }, - "CreateDate": { - "locationName": "createDate", - "type": "timestamp" - }, - "UpdateDate": { - "locationName": "updateDate", - "type": "timestamp" - }, - "EffectiveDate": { - "locationName": "effectiveDate", - "type": "timestamp" - }, - "Status": { - "locationName": "status" - }, - "StatusMessage": { - "locationName": "statusMessage" - }, - "ClientToken": { - "locationName": "clientToken" - } - } - } - }, - "NextToken": { - "locationName": "nextToken" - } - } - } - }, - "DescribeReservedInstancesOfferings": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "ReservedInstancesOfferingIds": { - "locationName": "ReservedInstancesOfferingId", - "type": "list", - "member": {} - }, - "InstanceType": {}, - "AvailabilityZone": {}, - "ProductDescription": {}, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - }, - "InstanceTenancy": { - "locationName": "instanceTenancy" - }, - "OfferingType": { - "locationName": "offeringType" - }, - "NextToken": { - "locationName": "nextToken" - }, - "MaxResults": { - "locationName": "maxResults", - "type": "integer" - }, - "IncludeMarketplace": { - "type": "boolean" - }, - "MinDuration": { - "type": "long" - }, - "MaxDuration": { - "type": "long" - }, - "MaxInstanceCount": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "ReservedInstancesOfferings": { - "locationName": "reservedInstancesOfferingsSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "ReservedInstancesOfferingId": { - "locationName": "reservedInstancesOfferingId" - }, - "InstanceType": { - "locationName": "instanceType" - }, - "AvailabilityZone": { - "locationName": "availabilityZone" - }, - "Duration": { - "locationName": "duration", - "type": "long" - }, - "UsagePrice": { - "locationName": "usagePrice", - "type": "float" - }, - "FixedPrice": { - "locationName": "fixedPrice", - "type": "float" - }, - "ProductDescription": { - "locationName": "productDescription" - }, - "InstanceTenancy": { - "locationName": "instanceTenancy" - }, - "CurrencyCode": { - "locationName": "currencyCode" - }, - "OfferingType": { - "locationName": "offeringType" - }, - "RecurringCharges": { - "shape": "Sca", - "locationName": "recurringCharges" - }, - "Marketplace": { - "locationName": "marketplace", - "type": "boolean" - }, - "PricingDetails": { - "locationName": "pricingDetailsSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "Price": { - "locationName": "price", - "type": "double" - }, - "Count": { - "locationName": "count", - "type": "integer" - } - } - } - } - } - } - }, - "NextToken": { - "locationName": "nextToken" - } - } - } - }, - "DescribeRouteTables": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "RouteTableIds": { - "shape": "S22", - "locationName": "RouteTableId" - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "RouteTables": { - "locationName": "routeTableSet", - "type": "list", - "member": { - "shape": "S4s", - "locationName": "item" - } - } - } - } - }, - "DescribeSecurityGroups": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "GroupNames": { - "shape": "Sd0", - "locationName": "GroupName" - }, - "GroupIds": { - "shape": "So", - "locationName": "GroupId" - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "SecurityGroups": { - "locationName": "securityGroupInfo", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "OwnerId": { - "locationName": "ownerId" - }, - "GroupName": { - "locationName": "groupName" - }, - "GroupId": { - "locationName": "groupId" - }, - "Description": { - "locationName": "groupDescription" - }, - "IpPermissions": { - "shape": "S11", - "locationName": "ipPermissions" - }, - "IpPermissionsEgress": { - "shape": "S11", - "locationName": "ipPermissionsEgress" - }, - "VpcId": { - "locationName": "vpcId" - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - } - } - } - } - } - } - }, - "DescribeSnapshotAttribute": { - "input": { - "type": "structure", - "required": [ - "SnapshotId", - "Attribute" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "SnapshotId": {}, - "Attribute": {} - } - }, - "output": { - "type": "structure", - "members": { - "SnapshotId": { - "locationName": "snapshotId" - }, - "CreateVolumePermissions": { - "shape": "Sd7", - "locationName": "createVolumePermission" - }, - "ProductCodes": { - "shape": "S90", - "locationName": "productCodes" - } - } - } - }, - "DescribeSnapshots": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "SnapshotIds": { - "locationName": "SnapshotId", - "type": "list", - "member": { - "locationName": "SnapshotId" - } - }, - "OwnerIds": { - "shape": "S96", - "locationName": "Owner" - }, - "RestorableByUserIds": { - "locationName": "RestorableBy", - "type": "list", - "member": {} - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - }, - "NextToken": {}, - "MaxResults": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Snapshots": { - "locationName": "snapshotSet", - "type": "list", - "member": { - "shape": "S54", - "locationName": "item" - } - }, - "NextToken": { - "locationName": "nextToken" - } - } - } - }, - "DescribeSpotDatafeedSubscription": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "SpotDatafeedSubscription": { - "shape": "S58", - "locationName": "spotDatafeedSubscription" - } - } - } - }, - "DescribeSpotFleetInstances": { - "input": { - "type": "structure", - "required": [ - "SpotFleetRequestId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "SpotFleetRequestId": { - "locationName": "spotFleetRequestId" - }, - "NextToken": { - "locationName": "nextToken" - }, - "MaxResults": { - "locationName": "maxResults", - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "required": [ - "SpotFleetRequestId", - "ActiveInstances" - ], - "members": { - "SpotFleetRequestId": { - "locationName": "spotFleetRequestId" - }, - "ActiveInstances": { - "locationName": "activeInstanceSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "InstanceType": { - "locationName": "instanceType" - }, - "InstanceId": { - "locationName": "instanceId" - }, - "SpotInstanceRequestId": { - "locationName": "spotInstanceRequestId" - } - } - } - }, - "NextToken": { - "locationName": "nextToken" - } - } - } - }, - "DescribeSpotFleetRequestHistory": { - "input": { - "type": "structure", - "required": [ - "SpotFleetRequestId", - "StartTime" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "SpotFleetRequestId": { - "locationName": "spotFleetRequestId" - }, - "EventType": { - "locationName": "eventType" - }, - "StartTime": { - "locationName": "startTime", - "type": "timestamp" - }, - "NextToken": { - "locationName": "nextToken" - }, - "MaxResults": { - "locationName": "maxResults", - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "required": [ - "SpotFleetRequestId", - "StartTime", - "LastEvaluatedTime", - "HistoryRecords" - ], - "members": { - "SpotFleetRequestId": { - "locationName": "spotFleetRequestId" - }, - "StartTime": { - "locationName": "startTime", - "type": "timestamp" - }, - "LastEvaluatedTime": { - "locationName": "lastEvaluatedTime", - "type": "timestamp" - }, - "HistoryRecords": { - "locationName": "historyRecordSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "required": [ - "Timestamp", - "EventType", - "EventInformation" - ], - "members": { - "Timestamp": { - "locationName": "timestamp", - "type": "timestamp" - }, - "EventType": { - "locationName": "eventType" - }, - "EventInformation": { - "locationName": "eventInformation", - "type": "structure", - "members": { - "InstanceId": { - "locationName": "instanceId" - }, - "EventSubType": { - "locationName": "eventSubType" - }, - "EventDescription": { - "locationName": "eventDescription" - } - } - } - } - } - }, - "NextToken": { - "locationName": "nextToken" - } - } - } - }, - "DescribeSpotFleetRequests": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "SpotFleetRequestIds": { - "shape": "S22", - "locationName": "spotFleetRequestId" - }, - "NextToken": { - "locationName": "nextToken" - }, - "MaxResults": { - "locationName": "maxResults", - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "required": [ - "SpotFleetRequestConfigs" - ], - "members": { - "SpotFleetRequestConfigs": { - "locationName": "spotFleetRequestConfigSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "required": [ - "SpotFleetRequestId", - "SpotFleetRequestState", - "SpotFleetRequestConfig" - ], - "members": { - "SpotFleetRequestId": { - "locationName": "spotFleetRequestId" - }, - "SpotFleetRequestState": { - "locationName": "spotFleetRequestState" - }, - "SpotFleetRequestConfig": { - "shape": "Sdu", - "locationName": "spotFleetRequestConfig" - } - } - } - }, - "NextToken": { - "locationName": "nextToken" - } - } - } - }, - "DescribeSpotInstanceRequests": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "SpotInstanceRequestIds": { - "shape": "S2c", - "locationName": "SpotInstanceRequestId" - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "SpotInstanceRequests": { - "shape": "Se4", - "locationName": "spotInstanceRequestSet" - } - } - } - }, - "DescribeSpotPriceHistory": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "StartTime": { - "locationName": "startTime", - "type": "timestamp" - }, - "EndTime": { - "locationName": "endTime", - "type": "timestamp" - }, - "InstanceTypes": { - "locationName": "InstanceType", - "type": "list", - "member": {} - }, - "ProductDescriptions": { - "locationName": "ProductDescription", - "type": "list", - "member": {} - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - }, - "AvailabilityZone": { - "locationName": "availabilityZone" - }, - "MaxResults": { - "locationName": "maxResults", - "type": "integer" - }, - "NextToken": { - "locationName": "nextToken" - } - } - }, - "output": { - "type": "structure", - "members": { - "SpotPriceHistory": { - "locationName": "spotPriceHistorySet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "InstanceType": { - "locationName": "instanceType" - }, - "ProductDescription": { - "locationName": "productDescription" - }, - "SpotPrice": { - "locationName": "spotPrice" - }, - "Timestamp": { - "locationName": "timestamp", - "type": "timestamp" - }, - "AvailabilityZone": { - "locationName": "availabilityZone" - } - } - } - }, - "NextToken": { - "locationName": "nextToken" - } - } - } - }, - "DescribeSubnets": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "SubnetIds": { - "locationName": "SubnetId", - "type": "list", - "member": { - "locationName": "SubnetId" - } - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "Subnets": { - "locationName": "subnetSet", - "type": "list", - "member": { - "shape": "S5d", - "locationName": "item" - } - } - } - } - }, - "DescribeTags": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - }, - "MaxResults": { - "locationName": "maxResults", - "type": "integer" - }, - "NextToken": { - "locationName": "nextToken" - } - } - }, - "output": { - "type": "structure", - "members": { - "Tags": { - "locationName": "tagSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "ResourceId": { - "locationName": "resourceId" - }, - "ResourceType": { - "locationName": "resourceType" - }, - "Key": { - "locationName": "key" - }, - "Value": { - "locationName": "value" - } - } - } - }, - "NextToken": { - "locationName": "nextToken" - } - } - } - }, - "DescribeVolumeAttribute": { - "input": { - "type": "structure", - "required": [ - "VolumeId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VolumeId": {}, - "Attribute": {} - } - }, - "output": { - "type": "structure", - "members": { - "VolumeId": { - "locationName": "volumeId" - }, - "AutoEnableIO": { - "shape": "S9y", - "locationName": "autoEnableIO" - }, - "ProductCodes": { - "shape": "S90", - "locationName": "productCodes" - } - } - } - }, - "DescribeVolumeStatus": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VolumeIds": { - "shape": "Seu", - "locationName": "VolumeId" - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - }, - "NextToken": {}, - "MaxResults": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "VolumeStatuses": { - "locationName": "volumeStatusSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "VolumeId": { - "locationName": "volumeId" - }, - "AvailabilityZone": { - "locationName": "availabilityZone" - }, - "VolumeStatus": { - "locationName": "volumeStatus", - "type": "structure", - "members": { - "Status": { - "locationName": "status" - }, - "Details": { - "locationName": "details", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "Name": { - "locationName": "name" - }, - "Status": { - "locationName": "status" - } - } - } - } - } - }, - "Events": { - "locationName": "eventsSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "EventType": { - "locationName": "eventType" - }, - "Description": { - "locationName": "description" - }, - "NotBefore": { - "locationName": "notBefore", - "type": "timestamp" - }, - "NotAfter": { - "locationName": "notAfter", - "type": "timestamp" - }, - "EventId": { - "locationName": "eventId" - } - } - } - }, - "Actions": { - "locationName": "actionsSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "Code": { - "locationName": "code" - }, - "Description": { - "locationName": "description" - }, - "EventType": { - "locationName": "eventType" - }, - "EventId": { - "locationName": "eventId" - } - } - } - } - } - } - }, - "NextToken": { - "locationName": "nextToken" - } - } - } - }, - "DescribeVolumes": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VolumeIds": { - "shape": "Seu", - "locationName": "VolumeId" - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - }, - "NextToken": { - "locationName": "nextToken" - }, - "MaxResults": { - "locationName": "maxResults", - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Volumes": { - "locationName": "volumeSet", - "type": "list", - "member": { - "shape": "S5i", - "locationName": "item" - } - }, - "NextToken": { - "locationName": "nextToken" - } - } - } - }, - "DescribeVpcAttribute": { - "input": { - "type": "structure", - "required": [ - "VpcId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VpcId": {}, - "Attribute": {} - } - }, - "output": { - "type": "structure", - "members": { - "VpcId": { - "locationName": "vpcId" - }, - "EnableDnsSupport": { - "shape": "S9y", - "locationName": "enableDnsSupport" - }, - "EnableDnsHostnames": { - "shape": "S9y", - "locationName": "enableDnsHostnames" - } - } - } - }, - "DescribeVpcClassicLink": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VpcIds": { - "locationName": "VpcId", - "type": "list", - "member": { - "locationName": "VpcId" - } - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "Vpcs": { - "locationName": "vpcSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "VpcId": { - "locationName": "vpcId" - }, - "ClassicLinkEnabled": { - "locationName": "classicLinkEnabled", - "type": "boolean" - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - } - } - } - } - } - } - }, - "DescribeVpcEndpointServices": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "MaxResults": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "ServiceNames": { - "shape": "S22", - "locationName": "serviceNameSet" - }, - "NextToken": { - "locationName": "nextToken" - } - } - } - }, - "DescribeVpcEndpoints": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VpcEndpointIds": { - "shape": "S22", - "locationName": "VpcEndpointId" - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - }, - "MaxResults": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "VpcEndpoints": { - "locationName": "vpcEndpointSet", - "type": "list", - "member": { - "shape": "S5s", - "locationName": "item" - } - }, - "NextToken": { - "locationName": "nextToken" - } - } - } - }, - "DescribeVpcPeeringConnections": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VpcPeeringConnectionIds": { - "shape": "S22", - "locationName": "VpcPeeringConnectionId" - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "VpcPeeringConnections": { - "locationName": "vpcPeeringConnectionSet", - "type": "list", - "member": { - "shape": "S5", - "locationName": "item" - } - } - } - } - }, - "DescribeVpcs": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VpcIds": { - "locationName": "VpcId", - "type": "list", - "member": { - "locationName": "VpcId" - } - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "Vpcs": { - "locationName": "vpcSet", - "type": "list", - "member": { - "shape": "S5o", - "locationName": "item" - } - } - } - } - }, - "DescribeVpnConnections": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VpnConnectionIds": { - "locationName": "VpnConnectionId", - "type": "list", - "member": { - "locationName": "VpnConnectionId" - } - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "VpnConnections": { - "locationName": "vpnConnectionSet", - "type": "list", - "member": { - "shape": "S5z", - "locationName": "item" - } - } - } - } - }, - "DescribeVpnGateways": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VpnGatewayIds": { - "locationName": "VpnGatewayId", - "type": "list", - "member": { - "locationName": "VpnGatewayId" - } - }, - "Filters": { - "shape": "S7e", - "locationName": "Filter" - } - } - }, - "output": { - "type": "structure", - "members": { - "VpnGateways": { - "locationName": "vpnGatewaySet", - "type": "list", - "member": { - "shape": "S6b", - "locationName": "item" - } - } - } - } - }, - "DetachClassicLinkVpc": { - "input": { - "type": "structure", - "required": [ - "InstanceId", - "VpcId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InstanceId": { - "locationName": "instanceId" - }, - "VpcId": { - "locationName": "vpcId" - } - } - }, - "output": { - "type": "structure", - "members": { - "Return": { - "locationName": "return", - "type": "boolean" - } - } - } - }, - "DetachInternetGateway": { - "input": { - "type": "structure", - "required": [ - "InternetGatewayId", - "VpcId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InternetGatewayId": { - "locationName": "internetGatewayId" - }, - "VpcId": { - "locationName": "vpcId" - } - } - } - }, - "DetachNetworkInterface": { - "input": { - "type": "structure", - "required": [ - "AttachmentId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "AttachmentId": { - "locationName": "attachmentId" - }, - "Force": { - "locationName": "force", - "type": "boolean" - } - } - } - }, - "DetachVolume": { - "input": { - "type": "structure", - "required": [ - "VolumeId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VolumeId": {}, - "InstanceId": {}, - "Device": {}, - "Force": { - "type": "boolean" - } - } - }, - "output": { - "shape": "Su", - "locationName": "attachment" - } - }, - "DetachVpnGateway": { - "input": { - "type": "structure", - "required": [ - "VpnGatewayId", - "VpcId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VpnGatewayId": {}, - "VpcId": {} - } - } - }, - "DisableVgwRoutePropagation": { - "input": { - "type": "structure", - "required": [ - "RouteTableId", - "GatewayId" - ], - "members": { - "RouteTableId": {}, - "GatewayId": {} - } - } - }, - "DisableVpcClassicLink": { - "input": { - "type": "structure", - "required": [ - "VpcId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VpcId": { - "locationName": "vpcId" - } - } - }, - "output": { - "type": "structure", - "members": { - "Return": { - "locationName": "return", - "type": "boolean" - } - } - } - }, - "DisassociateAddress": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "PublicIp": {}, - "AssociationId": {} - } - } - }, - "DisassociateRouteTable": { - "input": { - "type": "structure", - "required": [ - "AssociationId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "AssociationId": { - "locationName": "associationId" - } - } - } - }, - "EnableVgwRoutePropagation": { - "input": { - "type": "structure", - "required": [ - "RouteTableId", - "GatewayId" - ], - "members": { - "RouteTableId": {}, - "GatewayId": {} - } - } - }, - "EnableVolumeIO": { - "input": { - "type": "structure", - "required": [ - "VolumeId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VolumeId": { - "locationName": "volumeId" - } - } - } - }, - "EnableVpcClassicLink": { - "input": { - "type": "structure", - "required": [ - "VpcId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VpcId": { - "locationName": "vpcId" - } - } - }, - "output": { - "type": "structure", - "members": { - "Return": { - "locationName": "return", - "type": "boolean" - } - } - } - }, - "GetConsoleOutput": { - "input": { - "type": "structure", - "required": [ - "InstanceId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InstanceId": {} - } - }, - "output": { - "type": "structure", - "members": { - "InstanceId": { - "locationName": "instanceId" - }, - "Timestamp": { - "locationName": "timestamp", - "type": "timestamp" - }, - "Output": { - "locationName": "output" - } - } - } - }, - "GetPasswordData": { - "input": { - "type": "structure", - "required": [ - "InstanceId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InstanceId": {} - } - }, - "output": { - "type": "structure", - "members": { - "InstanceId": { - "locationName": "instanceId" - }, - "Timestamp": { - "locationName": "timestamp", - "type": "timestamp" - }, - "PasswordData": { - "locationName": "passwordData" - } - } - } - }, - "ImportImage": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "Description": {}, - "DiskContainers": { - "locationName": "DiskContainer", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "Description": {}, - "Format": {}, - "Url": {}, - "UserBucket": { - "shape": "Sgo" - }, - "DeviceName": {}, - "SnapshotId": {} - } - } - }, - "LicenseType": {}, - "Hypervisor": {}, - "Architecture": {}, - "Platform": {}, - "ClientData": { - "shape": "Sgp" - }, - "ClientToken": {}, - "RoleName": {} - } - }, - "output": { - "type": "structure", - "members": { - "ImportTaskId": { - "locationName": "importTaskId" - }, - "Architecture": { - "locationName": "architecture" - }, - "LicenseType": { - "locationName": "licenseType" - }, - "Platform": { - "locationName": "platform" - }, - "Hypervisor": { - "locationName": "hypervisor" - }, - "Description": { - "locationName": "description" - }, - "SnapshotDetails": { - "shape": "S9n", - "locationName": "snapshotDetailSet" - }, - "ImageId": { - "locationName": "imageId" - }, - "Progress": { - "locationName": "progress" - }, - "StatusMessage": { - "locationName": "statusMessage" - }, - "Status": { - "locationName": "status" - } - } - } - }, - "ImportInstance": { - "input": { - "type": "structure", - "required": [ - "Platform" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "Description": { - "locationName": "description" - }, - "LaunchSpecification": { - "locationName": "launchSpecification", - "type": "structure", - "members": { - "Architecture": { - "locationName": "architecture" - }, - "GroupNames": { - "shape": "Sgt", - "locationName": "GroupName" - }, - "GroupIds": { - "shape": "S46", - "locationName": "GroupId" - }, - "AdditionalInfo": { - "locationName": "additionalInfo" - }, - "UserData": { - "locationName": "userData", - "type": "structure", - "members": { - "Data": { - "locationName": "data" - } - } - }, - "InstanceType": { - "locationName": "instanceType" - }, - "Placement": { - "shape": "Sao", - "locationName": "placement" - }, - "Monitoring": { - "locationName": "monitoring", - "type": "boolean" - }, - "SubnetId": { - "locationName": "subnetId" - }, - "InstanceInitiatedShutdownBehavior": { - "locationName": "instanceInitiatedShutdownBehavior" - }, - "PrivateIpAddress": { - "locationName": "privateIpAddress" - } - } - }, - "DiskImages": { - "locationName": "diskImage", - "type": "list", - "member": { - "type": "structure", - "members": { - "Image": { - "shape": "Sgy" - }, - "Description": {}, - "Volume": { - "shape": "Sgz" - } - } - } - }, - "Platform": { - "locationName": "platform" - } - } - }, - "output": { - "type": "structure", - "members": { - "ConversionTask": { - "shape": "S85", - "locationName": "conversionTask" - } - } - } - }, - "ImportKeyPair": { - "input": { - "type": "structure", - "required": [ - "KeyName", - "PublicKeyMaterial" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "KeyName": { - "locationName": "keyName" - }, - "PublicKeyMaterial": { - "locationName": "publicKeyMaterial", - "type": "blob" - } - } - }, - "output": { - "type": "structure", - "members": { - "KeyName": { - "locationName": "keyName" - }, - "KeyFingerprint": { - "locationName": "keyFingerprint" - } - } - } - }, - "ImportSnapshot": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "Description": {}, - "DiskContainer": { - "type": "structure", - "members": { - "Description": {}, - "Format": {}, - "Url": {}, - "UserBucket": { - "shape": "Sgo" - } - } - }, - "ClientData": { - "shape": "Sgp" - }, - "ClientToken": {}, - "RoleName": {} - } - }, - "output": { - "type": "structure", - "members": { - "ImportTaskId": { - "locationName": "importTaskId" - }, - "SnapshotTaskDetail": { - "shape": "S9u", - "locationName": "snapshotTaskDetail" - }, - "Description": { - "locationName": "description" - } - } - } - }, - "ImportVolume": { - "input": { - "type": "structure", - "required": [ - "AvailabilityZone", - "Image", - "Volume" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "AvailabilityZone": { - "locationName": "availabilityZone" - }, - "Image": { - "shape": "Sgy", - "locationName": "image" - }, - "Description": { - "locationName": "description" - }, - "Volume": { - "shape": "Sgz", - "locationName": "volume" - } - } - }, - "output": { - "type": "structure", - "members": { - "ConversionTask": { - "shape": "S85", - "locationName": "conversionTask" - } - } - } - }, - "ModifyImageAttribute": { - "input": { - "type": "structure", - "required": [ - "ImageId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "ImageId": {}, - "Attribute": {}, - "OperationType": {}, - "UserIds": { - "shape": "Sh9", - "locationName": "UserId" - }, - "UserGroups": { - "locationName": "UserGroup", - "type": "list", - "member": { - "locationName": "UserGroup" - } - }, - "ProductCodes": { - "locationName": "ProductCode", - "type": "list", - "member": { - "locationName": "ProductCode" - } - }, - "Value": {}, - "LaunchPermission": { - "type": "structure", - "members": { - "Add": { - "shape": "S8x" - }, - "Remove": { - "shape": "S8x" - } - } - }, - "Description": { - "shape": "S2z" - } - } - } - }, - "ModifyInstanceAttribute": { - "input": { - "type": "structure", - "required": [ - "InstanceId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InstanceId": { - "locationName": "instanceId" - }, - "Attribute": { - "locationName": "attribute" - }, - "Value": { - "locationName": "value" - }, - "BlockDeviceMappings": { - "locationName": "blockDeviceMapping", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "DeviceName": { - "locationName": "deviceName" - }, - "Ebs": { - "locationName": "ebs", - "type": "structure", - "members": { - "VolumeId": { - "locationName": "volumeId" - }, - "DeleteOnTermination": { - "locationName": "deleteOnTermination", - "type": "boolean" - } - } - }, - "VirtualName": { - "locationName": "virtualName" - }, - "NoDevice": { - "locationName": "noDevice" - } - } - } - }, - "SourceDestCheck": { - "shape": "S9y" - }, - "DisableApiTermination": { - "shape": "S9y", - "locationName": "disableApiTermination" - }, - "InstanceType": { - "shape": "S2z", - "locationName": "instanceType" - }, - "Kernel": { - "shape": "S2z", - "locationName": "kernel" - }, - "Ramdisk": { - "shape": "S2z", - "locationName": "ramdisk" - }, - "UserData": { - "locationName": "userData", - "type": "structure", - "members": { - "Value": { - "locationName": "value", - "type": "blob" - } - } - }, - "InstanceInitiatedShutdownBehavior": { - "shape": "S2z", - "locationName": "instanceInitiatedShutdownBehavior" - }, - "Groups": { - "shape": "So", - "locationName": "GroupId" - }, - "EbsOptimized": { - "shape": "S9y", - "locationName": "ebsOptimized" - }, - "SriovNetSupport": { - "shape": "S2z", - "locationName": "sriovNetSupport" - } - } - } - }, - "ModifyNetworkInterfaceAttribute": { - "input": { - "type": "structure", - "required": [ - "NetworkInterfaceId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "NetworkInterfaceId": { - "locationName": "networkInterfaceId" - }, - "Description": { - "shape": "S2z", - "locationName": "description" - }, - "SourceDestCheck": { - "shape": "S9y", - "locationName": "sourceDestCheck" - }, - "Groups": { - "shape": "S46", - "locationName": "SecurityGroupId" - }, - "Attachment": { - "locationName": "attachment", - "type": "structure", - "members": { - "AttachmentId": { - "locationName": "attachmentId" - }, - "DeleteOnTermination": { - "locationName": "deleteOnTermination", - "type": "boolean" - } - } - } - } - } - }, - "ModifyReservedInstances": { - "input": { - "type": "structure", - "required": [ - "ReservedInstancesIds", - "TargetConfigurations" - ], - "members": { - "ClientToken": { - "locationName": "clientToken" - }, - "ReservedInstancesIds": { - "shape": "Sc2", - "locationName": "ReservedInstancesId" - }, - "TargetConfigurations": { - "locationName": "ReservedInstancesConfigurationSetItemType", - "type": "list", - "member": { - "shape": "Sco", - "locationName": "item" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "ReservedInstancesModificationId": { - "locationName": "reservedInstancesModificationId" - } - } - } - }, - "ModifySnapshotAttribute": { - "input": { - "type": "structure", - "required": [ - "SnapshotId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "SnapshotId": {}, - "Attribute": {}, - "OperationType": {}, - "UserIds": { - "shape": "Sh9", - "locationName": "UserId" - }, - "GroupNames": { - "shape": "Sd0", - "locationName": "UserGroup" - }, - "CreateVolumePermission": { - "type": "structure", - "members": { - "Add": { - "shape": "Sd7" - }, - "Remove": { - "shape": "Sd7" - } - } - } - } - } - }, - "ModifySubnetAttribute": { - "input": { - "type": "structure", - "required": [ - "SubnetId" - ], - "members": { - "SubnetId": { - "locationName": "subnetId" - }, - "MapPublicIpOnLaunch": { - "shape": "S9y" - } - } - } - }, - "ModifyVolumeAttribute": { - "input": { - "type": "structure", - "required": [ - "VolumeId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VolumeId": {}, - "AutoEnableIO": { - "shape": "S9y" - } - } - } - }, - "ModifyVpcAttribute": { - "input": { - "type": "structure", - "required": [ - "VpcId" - ], - "members": { - "VpcId": { - "locationName": "vpcId" - }, - "EnableDnsSupport": { - "shape": "S9y" - }, - "EnableDnsHostnames": { - "shape": "S9y" - } - } - } - }, - "ModifyVpcEndpoint": { - "input": { - "type": "structure", - "required": [ - "VpcEndpointId" - ], - "members": { - "DryRun": { - "type": "boolean" - }, - "VpcEndpointId": {}, - "ResetPolicy": { - "type": "boolean" - }, - "PolicyDocument": {}, - "AddRouteTableIds": { - "shape": "S22", - "locationName": "AddRouteTableId" - }, - "RemoveRouteTableIds": { - "shape": "S22", - "locationName": "RemoveRouteTableId" - } - } - }, - "output": { - "type": "structure", - "members": { - "Return": { - "locationName": "return", - "type": "boolean" - } - } - } - }, - "MonitorInstances": { - "input": { - "type": "structure", - "required": [ - "InstanceIds" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InstanceIds": { - "shape": "S7x", - "locationName": "InstanceId" - } - } - }, - "output": { - "type": "structure", - "members": { - "InstanceMonitorings": { - "shape": "Shw", - "locationName": "instancesSet" - } - } - } - }, - "MoveAddressToVpc": { - "input": { - "type": "structure", - "required": [ - "PublicIp" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "PublicIp": { - "locationName": "publicIp" - } - } - }, - "output": { - "type": "structure", - "members": { - "AllocationId": { - "locationName": "allocationId" - }, - "Status": { - "locationName": "status" - } - } - } - }, - "PurchaseReservedInstancesOffering": { - "input": { - "type": "structure", - "required": [ - "ReservedInstancesOfferingId", - "InstanceCount" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "ReservedInstancesOfferingId": {}, - "InstanceCount": { - "type": "integer" - }, - "LimitPrice": { - "locationName": "limitPrice", - "type": "structure", - "members": { - "Amount": { - "locationName": "amount", - "type": "double" - }, - "CurrencyCode": { - "locationName": "currencyCode" - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "ReservedInstancesId": { - "locationName": "reservedInstancesId" - } - } - } - }, - "RebootInstances": { - "input": { - "type": "structure", - "required": [ - "InstanceIds" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InstanceIds": { - "shape": "S7x", - "locationName": "InstanceId" - } - } - } - }, - "RegisterImage": { - "input": { - "type": "structure", - "required": [ - "Name" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "ImageLocation": {}, - "Name": { - "locationName": "name" - }, - "Description": { - "locationName": "description" - }, - "Architecture": { - "locationName": "architecture" - }, - "KernelId": { - "locationName": "kernelId" - }, - "RamdiskId": { - "locationName": "ramdiskId" - }, - "RootDeviceName": { - "locationName": "rootDeviceName" - }, - "BlockDeviceMappings": { - "shape": "S38", - "locationName": "BlockDeviceMapping" - }, - "VirtualizationType": { - "locationName": "virtualizationType" - }, - "SriovNetSupport": { - "locationName": "sriovNetSupport" - } - } - }, - "output": { - "type": "structure", - "members": { - "ImageId": { - "locationName": "imageId" - } - } - } - }, - "RejectVpcPeeringConnection": { - "input": { - "type": "structure", - "required": [ - "VpcPeeringConnectionId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "VpcPeeringConnectionId": { - "locationName": "vpcPeeringConnectionId" - } - } - }, - "output": { - "type": "structure", - "members": { - "Return": { - "locationName": "return", - "type": "boolean" - } - } - } - }, - "ReleaseAddress": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "PublicIp": {}, - "AllocationId": {} - } - } - }, - "ReplaceNetworkAclAssociation": { - "input": { - "type": "structure", - "required": [ - "AssociationId", - "NetworkAclId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "AssociationId": { - "locationName": "associationId" - }, - "NetworkAclId": { - "locationName": "networkAclId" - } - } - }, - "output": { - "type": "structure", - "members": { - "NewAssociationId": { - "locationName": "newAssociationId" - } - } - } - }, - "ReplaceNetworkAclEntry": { - "input": { - "type": "structure", - "required": [ - "NetworkAclId", - "RuleNumber", - "Protocol", - "RuleAction", - "Egress", - "CidrBlock" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "NetworkAclId": { - "locationName": "networkAclId" - }, - "RuleNumber": { - "locationName": "ruleNumber", - "type": "integer" - }, - "Protocol": { - "locationName": "protocol" - }, - "RuleAction": { - "locationName": "ruleAction" - }, - "Egress": { - "locationName": "egress", - "type": "boolean" - }, - "CidrBlock": { - "locationName": "cidrBlock" - }, - "IcmpTypeCode": { - "shape": "S40", - "locationName": "Icmp" - }, - "PortRange": { - "shape": "S41", - "locationName": "portRange" - } - } - } - }, - "ReplaceRoute": { - "input": { - "type": "structure", - "required": [ - "RouteTableId", - "DestinationCidrBlock" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "RouteTableId": { - "locationName": "routeTableId" - }, - "DestinationCidrBlock": { - "locationName": "destinationCidrBlock" - }, - "GatewayId": { - "locationName": "gatewayId" - }, - "InstanceId": { - "locationName": "instanceId" - }, - "NetworkInterfaceId": { - "locationName": "networkInterfaceId" - }, - "VpcPeeringConnectionId": { - "locationName": "vpcPeeringConnectionId" - } - } - } - }, - "ReplaceRouteTableAssociation": { - "input": { - "type": "structure", - "required": [ - "AssociationId", - "RouteTableId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "AssociationId": { - "locationName": "associationId" - }, - "RouteTableId": { - "locationName": "routeTableId" - } - } - }, - "output": { - "type": "structure", - "members": { - "NewAssociationId": { - "locationName": "newAssociationId" - } - } - } - }, - "ReportInstanceStatus": { - "input": { - "type": "structure", - "required": [ - "Instances", - "Status", - "ReasonCodes" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "Instances": { - "shape": "S7x", - "locationName": "instanceId" - }, - "Status": { - "locationName": "status" - }, - "StartTime": { - "locationName": "startTime", - "type": "timestamp" - }, - "EndTime": { - "locationName": "endTime", - "type": "timestamp" - }, - "ReasonCodes": { - "locationName": "reasonCode", - "type": "list", - "member": { - "locationName": "item" - } - }, - "Description": { - "locationName": "description" - } - } - } - }, - "RequestSpotFleet": { - "input": { - "type": "structure", - "required": [ - "SpotFleetRequestConfig" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "SpotFleetRequestConfig": { - "shape": "Sdu", - "locationName": "spotFleetRequestConfig" - } - } - }, - "output": { - "type": "structure", - "required": [ - "SpotFleetRequestId" - ], - "members": { - "SpotFleetRequestId": { - "locationName": "spotFleetRequestId" - } - } - } - }, - "RequestSpotInstances": { - "input": { - "type": "structure", - "required": [ - "SpotPrice" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "SpotPrice": { - "locationName": "spotPrice" - }, - "ClientToken": { - "locationName": "clientToken" - }, - "InstanceCount": { - "locationName": "instanceCount", - "type": "integer" - }, - "Type": { - "locationName": "type" - }, - "ValidFrom": { - "locationName": "validFrom", - "type": "timestamp" - }, - "ValidUntil": { - "locationName": "validUntil", - "type": "timestamp" - }, - "LaunchGroup": { - "locationName": "launchGroup" - }, - "AvailabilityZoneGroup": { - "locationName": "availabilityZoneGroup" - }, - "LaunchSpecification": { - "type": "structure", - "members": { - "ImageId": { - "locationName": "imageId" - }, - "KeyName": { - "locationName": "keyName" - }, - "SecurityGroups": { - "shape": "S22", - "locationName": "SecurityGroup" - }, - "UserData": { - "locationName": "userData" - }, - "AddressingType": { - "locationName": "addressingType" - }, - "InstanceType": { - "locationName": "instanceType" - }, - "Placement": { - "shape": "Sdx", - "locationName": "placement" - }, - "KernelId": { - "locationName": "kernelId" - }, - "RamdiskId": { - "locationName": "ramdiskId" - }, - "BlockDeviceMappings": { - "shape": "S93", - "locationName": "blockDeviceMapping" - }, - "SubnetId": { - "locationName": "subnetId" - }, - "NetworkInterfaces": { - "shape": "Sdz", - "locationName": "NetworkInterface" - }, - "IamInstanceProfile": { - "shape": "Se1", - "locationName": "iamInstanceProfile" - }, - "EbsOptimized": { - "locationName": "ebsOptimized", - "type": "boolean" - }, - "Monitoring": { - "shape": "Sea", - "locationName": "monitoring" - }, - "SecurityGroupIds": { - "shape": "S22", - "locationName": "SecurityGroupId" - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "SpotInstanceRequests": { - "shape": "Se4", - "locationName": "spotInstanceRequestSet" - } - } - } - }, - "ResetImageAttribute": { - "input": { - "type": "structure", - "required": [ - "ImageId", - "Attribute" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "ImageId": {}, - "Attribute": {} - } - } - }, - "ResetInstanceAttribute": { - "input": { - "type": "structure", - "required": [ - "InstanceId", - "Attribute" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InstanceId": { - "locationName": "instanceId" - }, - "Attribute": { - "locationName": "attribute" - } - } - } - }, - "ResetNetworkInterfaceAttribute": { - "input": { - "type": "structure", - "required": [ - "NetworkInterfaceId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "NetworkInterfaceId": { - "locationName": "networkInterfaceId" - }, - "SourceDestCheck": { - "locationName": "sourceDestCheck" - } - } - } - }, - "ResetSnapshotAttribute": { - "input": { - "type": "structure", - "required": [ - "SnapshotId", - "Attribute" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "SnapshotId": {}, - "Attribute": {} - } - } - }, - "RestoreAddressToClassic": { - "input": { - "type": "structure", - "required": [ - "PublicIp" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "PublicIp": { - "locationName": "publicIp" - } - } - }, - "output": { - "type": "structure", - "members": { - "Status": { - "locationName": "status" - }, - "PublicIp": { - "locationName": "publicIp" - } - } - } - }, - "RevokeSecurityGroupEgress": { - "input": { - "type": "structure", - "required": [ - "GroupId" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "GroupId": { - "locationName": "groupId" - }, - "SourceSecurityGroupName": { - "locationName": "sourceSecurityGroupName" - }, - "SourceSecurityGroupOwnerId": { - "locationName": "sourceSecurityGroupOwnerId" - }, - "IpProtocol": { - "locationName": "ipProtocol" - }, - "FromPort": { - "locationName": "fromPort", - "type": "integer" - }, - "ToPort": { - "locationName": "toPort", - "type": "integer" - }, - "CidrIp": { - "locationName": "cidrIp" - }, - "IpPermissions": { - "shape": "S11", - "locationName": "ipPermissions" - } - } - } - }, - "RevokeSecurityGroupIngress": { - "input": { - "type": "structure", - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "GroupName": {}, - "GroupId": {}, - "SourceSecurityGroupName": {}, - "SourceSecurityGroupOwnerId": {}, - "IpProtocol": {}, - "FromPort": { - "type": "integer" - }, - "ToPort": { - "type": "integer" - }, - "CidrIp": {}, - "IpPermissions": { - "shape": "S11" - } - } - } - }, - "RunInstances": { - "input": { - "type": "structure", - "required": [ - "ImageId", - "MinCount", - "MaxCount" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "ImageId": {}, - "MinCount": { - "type": "integer" - }, - "MaxCount": { - "type": "integer" - }, - "KeyName": {}, - "SecurityGroups": { - "shape": "Sgt", - "locationName": "SecurityGroup" - }, - "SecurityGroupIds": { - "shape": "S46", - "locationName": "SecurityGroupId" - }, - "UserData": {}, - "InstanceType": {}, - "Placement": { - "shape": "Sao" - }, - "KernelId": {}, - "RamdiskId": {}, - "BlockDeviceMappings": { - "shape": "S38", - "locationName": "BlockDeviceMapping" - }, - "Monitoring": { - "shape": "Sea" - }, - "SubnetId": {}, - "DisableApiTermination": { - "locationName": "disableApiTermination", - "type": "boolean" - }, - "InstanceInitiatedShutdownBehavior": { - "locationName": "instanceInitiatedShutdownBehavior" - }, - "PrivateIpAddress": { - "locationName": "privateIpAddress" - }, - "ClientToken": { - "locationName": "clientToken" - }, - "AdditionalInfo": { - "locationName": "additionalInfo" - }, - "NetworkInterfaces": { - "shape": "Sdz", - "locationName": "networkInterface" - }, - "IamInstanceProfile": { - "shape": "Se1", - "locationName": "iamInstanceProfile" - }, - "EbsOptimized": { - "locationName": "ebsOptimized", - "type": "boolean" - } - } - }, - "output": { - "shape": "Sak", - "locationName": "reservation" - } - }, - "StartInstances": { - "input": { - "type": "structure", - "required": [ - "InstanceIds" - ], - "members": { - "InstanceIds": { - "shape": "S7x", - "locationName": "InstanceId" - }, - "AdditionalInfo": { - "locationName": "additionalInfo" - }, - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "StartingInstances": { - "shape": "Sj1", - "locationName": "instancesSet" - } - } - } - }, - "StopInstances": { - "input": { - "type": "structure", - "required": [ - "InstanceIds" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InstanceIds": { - "shape": "S7x", - "locationName": "InstanceId" - }, - "Force": { - "locationName": "force", - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "StoppingInstances": { - "shape": "Sj1", - "locationName": "instancesSet" - } - } - } - }, - "TerminateInstances": { - "input": { - "type": "structure", - "required": [ - "InstanceIds" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InstanceIds": { - "shape": "S7x", - "locationName": "InstanceId" - } - } - }, - "output": { - "type": "structure", - "members": { - "TerminatingInstances": { - "shape": "Sj1", - "locationName": "instancesSet" - } - } - } - }, - "UnassignPrivateIpAddresses": { - "input": { - "type": "structure", - "required": [ - "NetworkInterfaceId", - "PrivateIpAddresses" - ], - "members": { - "NetworkInterfaceId": { - "locationName": "networkInterfaceId" - }, - "PrivateIpAddresses": { - "shape": "Sg", - "locationName": "privateIpAddress" - } - } - } - }, - "UnmonitorInstances": { - "input": { - "type": "structure", - "required": [ - "InstanceIds" - ], - "members": { - "DryRun": { - "locationName": "dryRun", - "type": "boolean" - }, - "InstanceIds": { - "shape": "S7x", - "locationName": "InstanceId" - } - } - }, - "output": { - "type": "structure", - "members": { - "InstanceMonitorings": { - "shape": "Shw", - "locationName": "instancesSet" - } - } - } - } - }, - "shapes": { - "S5": { - "type": "structure", - "members": { - "AccepterVpcInfo": { - "shape": "S6", - "locationName": "accepterVpcInfo" - }, - "ExpirationTime": { - "locationName": "expirationTime", - "type": "timestamp" - }, - "RequesterVpcInfo": { - "shape": "S6", - "locationName": "requesterVpcInfo" - }, - "Status": { - "locationName": "status", - "type": "structure", - "members": { - "Code": { - "locationName": "code" - }, - "Message": { - "locationName": "message" - } - } - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - }, - "VpcPeeringConnectionId": { - "locationName": "vpcPeeringConnectionId" - } - } - }, - "S6": { - "type": "structure", - "members": { - "CidrBlock": { - "locationName": "cidrBlock" - }, - "OwnerId": { - "locationName": "ownerId" - }, - "VpcId": { - "locationName": "vpcId" - } - } - }, - "Sa": { - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "Key": { - "locationName": "key" - }, - "Value": { - "locationName": "value" - } - } - } - }, - "Sg": { - "type": "list", - "member": { - "locationName": "PrivateIpAddress" - } - }, - "So": { - "type": "list", - "member": { - "locationName": "groupId" - } - }, - "Su": { - "type": "structure", - "members": { - "VolumeId": { - "locationName": "volumeId" - }, - "InstanceId": { - "locationName": "instanceId" - }, - "Device": { - "locationName": "device" - }, - "State": { - "locationName": "status" - }, - "AttachTime": { - "locationName": "attachTime", - "type": "timestamp" - }, - "DeleteOnTermination": { - "locationName": "deleteOnTermination", - "type": "boolean" - } - } - }, - "Sy": { - "type": "structure", - "members": { - "VpcId": { - "locationName": "vpcId" - }, - "State": { - "locationName": "state" - } - } - }, - "S11": { - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "IpProtocol": { - "locationName": "ipProtocol" - }, - "FromPort": { - "locationName": "fromPort", - "type": "integer" - }, - "ToPort": { - "locationName": "toPort", - "type": "integer" - }, - "UserIdGroupPairs": { - "locationName": "groups", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "UserId": { - "locationName": "userId" - }, - "GroupName": { - "locationName": "groupName" - }, - "GroupId": { - "locationName": "groupId" - } - } - } - }, - "IpRanges": { - "locationName": "ipRanges", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "CidrIp": { - "locationName": "cidrIp" - } - } - } - }, - "PrefixListIds": { - "locationName": "prefixListIds", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "PrefixListId": { - "locationName": "prefixListId" - } - } - } - } - } - } - }, - "S1b": { - "type": "structure", - "members": { - "S3": { - "type": "structure", - "members": { - "Bucket": { - "locationName": "bucket" - }, - "Prefix": { - "locationName": "prefix" - }, - "AWSAccessKeyId": {}, - "UploadPolicy": { - "locationName": "uploadPolicy", - "type": "blob" - }, - "UploadPolicySignature": { - "locationName": "uploadPolicySignature" - } - } - } - } - }, - "S1f": { - "type": "structure", - "members": { - "InstanceId": { - "locationName": "instanceId" - }, - "BundleId": { - "locationName": "bundleId" - }, - "State": { - "locationName": "state" - }, - "StartTime": { - "locationName": "startTime", - "type": "timestamp" - }, - "UpdateTime": { - "locationName": "updateTime", - "type": "timestamp" - }, - "Storage": { - "shape": "S1b", - "locationName": "storage" - }, - "Progress": { - "locationName": "progress" - }, - "BundleTaskError": { - "locationName": "error", - "type": "structure", - "members": { - "Code": { - "locationName": "code" - }, - "Message": { - "locationName": "message" - } - } - } - } - }, - "S1q": { - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "ReservedInstancesListingId": { - "locationName": "reservedInstancesListingId" - }, - "ReservedInstancesId": { - "locationName": "reservedInstancesId" - }, - "CreateDate": { - "locationName": "createDate", - "type": "timestamp" - }, - "UpdateDate": { - "locationName": "updateDate", - "type": "timestamp" - }, - "Status": { - "locationName": "status" - }, - "StatusMessage": { - "locationName": "statusMessage" - }, - "InstanceCounts": { - "locationName": "instanceCounts", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "State": { - "locationName": "state" - }, - "InstanceCount": { - "locationName": "instanceCount", - "type": "integer" - } - } - } - }, - "PriceSchedules": { - "locationName": "priceSchedules", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "Term": { - "locationName": "term", - "type": "long" - }, - "Price": { - "locationName": "price", - "type": "double" - }, - "CurrencyCode": { - "locationName": "currencyCode" - }, - "Active": { - "locationName": "active", - "type": "boolean" - } - } - } - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - }, - "ClientToken": { - "locationName": "clientToken" - } - } - } - }, - "S22": { - "type": "list", - "member": { - "locationName": "item" - } - }, - "S2c": { - "type": "list", - "member": { - "locationName": "SpotInstanceRequestId" - } - }, - "S2q": { - "type": "structure", - "members": { - "CustomerGatewayId": { - "locationName": "customerGatewayId" - }, - "State": { - "locationName": "state" - }, - "Type": { - "locationName": "type" - }, - "IpAddress": { - "locationName": "ipAddress" - }, - "BgpAsn": { - "locationName": "bgpAsn" - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - } - } - }, - "S2v": { - "type": "structure", - "members": { - "DhcpOptionsId": { - "locationName": "dhcpOptionsId" - }, - "DhcpConfigurations": { - "locationName": "dhcpConfigurationSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "Key": { - "locationName": "key" - }, - "Values": { - "locationName": "valueSet", - "type": "list", - "member": { - "shape": "S2z", - "locationName": "item" - } - } - } - } - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - } - } - }, - "S2z": { - "type": "structure", - "members": { - "Value": { - "locationName": "value" - } - } - }, - "S34": { - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "required": [ - "Error" - ], - "members": { - "ResourceId": { - "locationName": "resourceId" - }, - "Error": { - "locationName": "error", - "type": "structure", - "required": [ - "Code", - "Message" - ], - "members": { - "Code": { - "locationName": "code" - }, - "Message": { - "locationName": "message" - } - } - } - } - } - }, - "S38": { - "type": "list", - "member": { - "shape": "S39", - "locationName": "BlockDeviceMapping" - } - }, - "S39": { - "type": "structure", - "members": { - "VirtualName": { - "locationName": "virtualName" - }, - "DeviceName": { - "locationName": "deviceName" - }, - "Ebs": { - "locationName": "ebs", - "type": "structure", - "members": { - "SnapshotId": { - "locationName": "snapshotId" - }, - "VolumeSize": { - "locationName": "volumeSize", - "type": "integer" - }, - "DeleteOnTermination": { - "locationName": "deleteOnTermination", - "type": "boolean" - }, - "VolumeType": { - "locationName": "volumeType" - }, - "Iops": { - "locationName": "iops", - "type": "integer" - }, - "Encrypted": { - "locationName": "encrypted", - "type": "boolean" - } - } - }, - "NoDevice": { - "locationName": "noDevice" - } - } - }, - "S3j": { - "type": "structure", - "members": { - "ExportTaskId": { - "locationName": "exportTaskId" - }, - "Description": { - "locationName": "description" - }, - "State": { - "locationName": "state" - }, - "StatusMessage": { - "locationName": "statusMessage" - }, - "InstanceExportDetails": { - "locationName": "instanceExport", - "type": "structure", - "members": { - "InstanceId": { - "locationName": "instanceId" - }, - "TargetEnvironment": { - "locationName": "targetEnvironment" - } - } - }, - "ExportToS3Task": { - "locationName": "exportToS3", - "type": "structure", - "members": { - "DiskImageFormat": { - "locationName": "diskImageFormat" - }, - "ContainerFormat": { - "locationName": "containerFormat" - }, - "S3Bucket": { - "locationName": "s3Bucket" - }, - "S3Key": { - "locationName": "s3Key" - } - } - } - } - }, - "S3p": { - "type": "structure", - "members": { - "InternetGatewayId": { - "locationName": "internetGatewayId" - }, - "Attachments": { - "locationName": "attachmentSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "VpcId": { - "locationName": "vpcId" - }, - "State": { - "locationName": "state" - } - } - } - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - } - } - }, - "S3w": { - "type": "structure", - "members": { - "NetworkAclId": { - "locationName": "networkAclId" - }, - "VpcId": { - "locationName": "vpcId" - }, - "IsDefault": { - "locationName": "default", - "type": "boolean" - }, - "Entries": { - "locationName": "entrySet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "RuleNumber": { - "locationName": "ruleNumber", - "type": "integer" - }, - "Protocol": { - "locationName": "protocol" - }, - "RuleAction": { - "locationName": "ruleAction" - }, - "Egress": { - "locationName": "egress", - "type": "boolean" - }, - "CidrBlock": { - "locationName": "cidrBlock" - }, - "IcmpTypeCode": { - "shape": "S40", - "locationName": "icmpTypeCode" - }, - "PortRange": { - "shape": "S41", - "locationName": "portRange" - } - } - } - }, - "Associations": { - "locationName": "associationSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "NetworkAclAssociationId": { - "locationName": "networkAclAssociationId" - }, - "NetworkAclId": { - "locationName": "networkAclId" - }, - "SubnetId": { - "locationName": "subnetId" - } - } - } - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - } - } - }, - "S40": { - "type": "structure", - "members": { - "Type": { - "locationName": "type", - "type": "integer" - }, - "Code": { - "locationName": "code", - "type": "integer" - } - } - }, - "S41": { - "type": "structure", - "members": { - "From": { - "locationName": "from", - "type": "integer" - }, - "To": { - "locationName": "to", - "type": "integer" - } - } - }, - "S46": { - "type": "list", - "member": { - "locationName": "SecurityGroupId" - } - }, - "S47": { - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "required": [ - "PrivateIpAddress" - ], - "members": { - "PrivateIpAddress": { - "locationName": "privateIpAddress" - }, - "Primary": { - "locationName": "primary", - "type": "boolean" - } - } - } - }, - "S4a": { - "type": "structure", - "members": { - "NetworkInterfaceId": { - "locationName": "networkInterfaceId" - }, - "SubnetId": { - "locationName": "subnetId" - }, - "VpcId": { - "locationName": "vpcId" - }, - "AvailabilityZone": { - "locationName": "availabilityZone" - }, - "Description": { - "locationName": "description" - }, - "OwnerId": { - "locationName": "ownerId" - }, - "RequesterId": { - "locationName": "requesterId" - }, - "RequesterManaged": { - "locationName": "requesterManaged", - "type": "boolean" - }, - "Status": { - "locationName": "status" - }, - "MacAddress": { - "locationName": "macAddress" - }, - "PrivateIpAddress": { - "locationName": "privateIpAddress" - }, - "PrivateDnsName": { - "locationName": "privateDnsName" - }, - "SourceDestCheck": { - "locationName": "sourceDestCheck", - "type": "boolean" - }, - "Groups": { - "shape": "S4c", - "locationName": "groupSet" - }, - "Attachment": { - "shape": "S4e", - "locationName": "attachment" - }, - "Association": { - "shape": "S4f", - "locationName": "association" - }, - "TagSet": { - "shape": "Sa", - "locationName": "tagSet" - }, - "PrivateIpAddresses": { - "locationName": "privateIpAddressesSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "PrivateIpAddress": { - "locationName": "privateIpAddress" - }, - "PrivateDnsName": { - "locationName": "privateDnsName" - }, - "Primary": { - "locationName": "primary", - "type": "boolean" - }, - "Association": { - "shape": "S4f", - "locationName": "association" - } - } - } - } - } - }, - "S4c": { - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "GroupName": { - "locationName": "groupName" - }, - "GroupId": { - "locationName": "groupId" - } - } - } - }, - "S4e": { - "type": "structure", - "members": { - "AttachmentId": { - "locationName": "attachmentId" - }, - "InstanceId": { - "locationName": "instanceId" - }, - "InstanceOwnerId": { - "locationName": "instanceOwnerId" - }, - "DeviceIndex": { - "locationName": "deviceIndex", - "type": "integer" - }, - "Status": { - "locationName": "status" - }, - "AttachTime": { - "locationName": "attachTime", - "type": "timestamp" - }, - "DeleteOnTermination": { - "locationName": "deleteOnTermination", - "type": "boolean" - } - } - }, - "S4f": { - "type": "structure", - "members": { - "PublicIp": { - "locationName": "publicIp" - }, - "PublicDnsName": { - "locationName": "publicDnsName" - }, - "IpOwnerId": { - "locationName": "ipOwnerId" - }, - "AllocationId": { - "locationName": "allocationId" - }, - "AssociationId": { - "locationName": "associationId" - } - } - }, - "S4s": { - "type": "structure", - "members": { - "RouteTableId": { - "locationName": "routeTableId" - }, - "VpcId": { - "locationName": "vpcId" - }, - "Routes": { - "locationName": "routeSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "DestinationCidrBlock": { - "locationName": "destinationCidrBlock" - }, - "DestinationPrefixListId": { - "locationName": "destinationPrefixListId" - }, - "GatewayId": { - "locationName": "gatewayId" - }, - "InstanceId": { - "locationName": "instanceId" - }, - "InstanceOwnerId": { - "locationName": "instanceOwnerId" - }, - "NetworkInterfaceId": { - "locationName": "networkInterfaceId" - }, - "VpcPeeringConnectionId": { - "locationName": "vpcPeeringConnectionId" - }, - "State": { - "locationName": "state" - }, - "Origin": { - "locationName": "origin" - } - } - } - }, - "Associations": { - "locationName": "associationSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "RouteTableAssociationId": { - "locationName": "routeTableAssociationId" - }, - "RouteTableId": { - "locationName": "routeTableId" - }, - "SubnetId": { - "locationName": "subnetId" - }, - "Main": { - "locationName": "main", - "type": "boolean" - } - } - } - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - }, - "PropagatingVgws": { - "locationName": "propagatingVgwSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "GatewayId": { - "locationName": "gatewayId" - } - } - } - } - } - }, - "S54": { - "type": "structure", - "members": { - "SnapshotId": { - "locationName": "snapshotId" - }, - "VolumeId": { - "locationName": "volumeId" - }, - "State": { - "locationName": "status" - }, - "StartTime": { - "locationName": "startTime", - "type": "timestamp" - }, - "Progress": { - "locationName": "progress" - }, - "OwnerId": { - "locationName": "ownerId" - }, - "Description": { - "locationName": "description" - }, - "VolumeSize": { - "locationName": "volumeSize", - "type": "integer" - }, - "OwnerAlias": { - "locationName": "ownerAlias" - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - }, - "Encrypted": { - "locationName": "encrypted", - "type": "boolean" - }, - "KmsKeyId": { - "locationName": "kmsKeyId" - } - } - }, - "S58": { - "type": "structure", - "members": { - "OwnerId": { - "locationName": "ownerId" - }, - "Bucket": { - "locationName": "bucket" - }, - "Prefix": { - "locationName": "prefix" - }, - "State": { - "locationName": "state" - }, - "Fault": { - "shape": "S5a", - "locationName": "fault" - } - } - }, - "S5a": { - "type": "structure", - "members": { - "Code": { - "locationName": "code" - }, - "Message": { - "locationName": "message" - } - } - }, - "S5d": { - "type": "structure", - "members": { - "SubnetId": { - "locationName": "subnetId" - }, - "State": { - "locationName": "state" - }, - "VpcId": { - "locationName": "vpcId" - }, - "CidrBlock": { - "locationName": "cidrBlock" - }, - "AvailableIpAddressCount": { - "locationName": "availableIpAddressCount", - "type": "integer" - }, - "AvailabilityZone": { - "locationName": "availabilityZone" - }, - "DefaultForAz": { - "locationName": "defaultForAz", - "type": "boolean" - }, - "MapPublicIpOnLaunch": { - "locationName": "mapPublicIpOnLaunch", - "type": "boolean" - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - } - } - }, - "S5g": { - "type": "list", - "member": {} - }, - "S5i": { - "type": "structure", - "members": { - "VolumeId": { - "locationName": "volumeId" - }, - "Size": { - "locationName": "size", - "type": "integer" - }, - "SnapshotId": { - "locationName": "snapshotId" - }, - "AvailabilityZone": { - "locationName": "availabilityZone" - }, - "State": { - "locationName": "status" - }, - "CreateTime": { - "locationName": "createTime", - "type": "timestamp" - }, - "Attachments": { - "locationName": "attachmentSet", - "type": "list", - "member": { - "shape": "Su", - "locationName": "item" - } - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - }, - "VolumeType": { - "locationName": "volumeType" - }, - "Iops": { - "locationName": "iops", - "type": "integer" - }, - "Encrypted": { - "locationName": "encrypted", - "type": "boolean" - }, - "KmsKeyId": { - "locationName": "kmsKeyId" - } - } - }, - "S5o": { - "type": "structure", - "members": { - "VpcId": { - "locationName": "vpcId" - }, - "State": { - "locationName": "state" - }, - "CidrBlock": { - "locationName": "cidrBlock" - }, - "DhcpOptionsId": { - "locationName": "dhcpOptionsId" - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - }, - "InstanceTenancy": { - "locationName": "instanceTenancy" - }, - "IsDefault": { - "locationName": "isDefault", - "type": "boolean" - } - } - }, - "S5s": { - "type": "structure", - "members": { - "VpcEndpointId": { - "locationName": "vpcEndpointId" - }, - "VpcId": { - "locationName": "vpcId" - }, - "ServiceName": { - "locationName": "serviceName" - }, - "State": { - "locationName": "state" - }, - "PolicyDocument": { - "locationName": "policyDocument" - }, - "RouteTableIds": { - "shape": "S22", - "locationName": "routeTableIdSet" - }, - "CreationTimestamp": { - "locationName": "creationTimestamp", - "type": "timestamp" - } - } - }, - "S5z": { - "type": "structure", - "members": { - "VpnConnectionId": { - "locationName": "vpnConnectionId" - }, - "State": { - "locationName": "state" - }, - "CustomerGatewayConfiguration": { - "locationName": "customerGatewayConfiguration" - }, - "Type": { - "locationName": "type" - }, - "CustomerGatewayId": { - "locationName": "customerGatewayId" - }, - "VpnGatewayId": { - "locationName": "vpnGatewayId" - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - }, - "VgwTelemetry": { - "locationName": "vgwTelemetry", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "OutsideIpAddress": { - "locationName": "outsideIpAddress" - }, - "Status": { - "locationName": "status" - }, - "LastStatusChange": { - "locationName": "lastStatusChange", - "type": "timestamp" - }, - "StatusMessage": { - "locationName": "statusMessage" - }, - "AcceptedRouteCount": { - "locationName": "acceptedRouteCount", - "type": "integer" - } - } - } - }, - "Options": { - "locationName": "options", - "type": "structure", - "members": { - "StaticRoutesOnly": { - "locationName": "staticRoutesOnly", - "type": "boolean" - } - } - }, - "Routes": { - "locationName": "routes", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "DestinationCidrBlock": { - "locationName": "destinationCidrBlock" - }, - "Source": { - "locationName": "source" - }, - "State": { - "locationName": "state" - } - } - } - } - } - }, - "S6b": { - "type": "structure", - "members": { - "VpnGatewayId": { - "locationName": "vpnGatewayId" - }, - "State": { - "locationName": "state" - }, - "Type": { - "locationName": "type" - }, - "AvailabilityZone": { - "locationName": "availabilityZone" - }, - "VpcAttachments": { - "locationName": "attachments", - "type": "list", - "member": { - "shape": "Sy", - "locationName": "item" - } - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - } - } - }, - "S7e": { - "type": "list", - "member": { - "locationName": "Filter", - "type": "structure", - "members": { - "Name": {}, - "Values": { - "shape": "S22", - "locationName": "Value" - } - } - } - }, - "S7x": { - "type": "list", - "member": { - "locationName": "InstanceId" - } - }, - "S85": { - "type": "structure", - "required": [ - "ConversionTaskId", - "State" - ], - "members": { - "ConversionTaskId": { - "locationName": "conversionTaskId" - }, - "ExpirationTime": { - "locationName": "expirationTime" - }, - "ImportInstance": { - "locationName": "importInstance", - "type": "structure", - "required": [ - "Volumes" - ], - "members": { - "Volumes": { - "locationName": "volumes", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "required": [ - "BytesConverted", - "AvailabilityZone", - "Image", - "Volume", - "Status" - ], - "members": { - "BytesConverted": { - "locationName": "bytesConverted", - "type": "long" - }, - "AvailabilityZone": { - "locationName": "availabilityZone" - }, - "Image": { - "shape": "S89", - "locationName": "image" - }, - "Volume": { - "shape": "S8a", - "locationName": "volume" - }, - "Status": { - "locationName": "status" - }, - "StatusMessage": { - "locationName": "statusMessage" - }, - "Description": { - "locationName": "description" - } - } - } - }, - "InstanceId": { - "locationName": "instanceId" - }, - "Platform": { - "locationName": "platform" - }, - "Description": { - "locationName": "description" - } - } - }, - "ImportVolume": { - "locationName": "importVolume", - "type": "structure", - "required": [ - "BytesConverted", - "AvailabilityZone", - "Image", - "Volume" - ], - "members": { - "BytesConverted": { - "locationName": "bytesConverted", - "type": "long" - }, - "AvailabilityZone": { - "locationName": "availabilityZone" - }, - "Description": { - "locationName": "description" - }, - "Image": { - "shape": "S89", - "locationName": "image" - }, - "Volume": { - "shape": "S8a", - "locationName": "volume" - } - } - }, - "State": { - "locationName": "state" - }, - "StatusMessage": { - "locationName": "statusMessage" - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - } - } - }, - "S89": { - "type": "structure", - "required": [ - "Format", - "Size", - "ImportManifestUrl" - ], - "members": { - "Format": { - "locationName": "format" - }, - "Size": { - "locationName": "size", - "type": "long" - }, - "ImportManifestUrl": { - "locationName": "importManifestUrl" - }, - "Checksum": { - "locationName": "checksum" - } - } - }, - "S8a": { - "type": "structure", - "required": [ - "Id" - ], - "members": { - "Size": { - "locationName": "size", - "type": "long" - }, - "Id": { - "locationName": "id" - } - } - }, - "S8x": { - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "UserId": { - "locationName": "userId" - }, - "Group": { - "locationName": "group" - } - } - } - }, - "S90": { - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "ProductCodeId": { - "locationName": "productCode" - }, - "ProductCodeType": { - "locationName": "type" - } - } - } - }, - "S93": { - "type": "list", - "member": { - "shape": "S39", - "locationName": "item" - } - }, - "S96": { - "type": "list", - "member": { - "locationName": "Owner" - } - }, - "S9e": { - "type": "structure", - "members": { - "Code": { - "locationName": "code" - }, - "Message": { - "locationName": "message" - } - } - }, - "S9j": { - "type": "list", - "member": { - "locationName": "ImportTaskId" - } - }, - "S9n": { - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "DiskImageSize": { - "locationName": "diskImageSize", - "type": "double" - }, - "Description": { - "locationName": "description" - }, - "Format": { - "locationName": "format" - }, - "Url": { - "locationName": "url" - }, - "UserBucket": { - "shape": "S9p", - "locationName": "userBucket" - }, - "DeviceName": { - "locationName": "deviceName" - }, - "SnapshotId": { - "locationName": "snapshotId" - }, - "Progress": { - "locationName": "progress" - }, - "StatusMessage": { - "locationName": "statusMessage" - }, - "Status": { - "locationName": "status" - } - } - } - }, - "S9p": { - "type": "structure", - "members": { - "S3Bucket": { - "locationName": "s3Bucket" - }, - "S3Key": { - "locationName": "s3Key" - } - } - }, - "S9u": { - "type": "structure", - "members": { - "DiskImageSize": { - "locationName": "diskImageSize", - "type": "double" - }, - "Description": { - "locationName": "description" - }, - "Format": { - "locationName": "format" - }, - "Url": { - "locationName": "url" - }, - "UserBucket": { - "shape": "S9p", - "locationName": "userBucket" - }, - "SnapshotId": { - "locationName": "snapshotId" - }, - "Progress": { - "locationName": "progress" - }, - "StatusMessage": { - "locationName": "statusMessage" - }, - "Status": { - "locationName": "status" - } - } - }, - "S9y": { - "type": "structure", - "members": { - "Value": { - "locationName": "value", - "type": "boolean" - } - } - }, - "S9z": { - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "DeviceName": { - "locationName": "deviceName" - }, - "Ebs": { - "locationName": "ebs", - "type": "structure", - "members": { - "VolumeId": { - "locationName": "volumeId" - }, - "Status": { - "locationName": "status" - }, - "AttachTime": { - "locationName": "attachTime", - "type": "timestamp" - }, - "DeleteOnTermination": { - "locationName": "deleteOnTermination", - "type": "boolean" - } - } - } - } - } - }, - "Sa9": { - "type": "structure", - "members": { - "Code": { - "locationName": "code", - "type": "integer" - }, - "Name": { - "locationName": "name" - } - } - }, - "Sab": { - "type": "structure", - "members": { - "Status": { - "locationName": "status" - }, - "Details": { - "locationName": "details", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "Name": { - "locationName": "name" - }, - "Status": { - "locationName": "status" - }, - "ImpairedSince": { - "locationName": "impairedSince", - "type": "timestamp" - } - } - } - } - } - }, - "Sak": { - "type": "structure", - "members": { - "ReservationId": { - "locationName": "reservationId" - }, - "OwnerId": { - "locationName": "ownerId" - }, - "RequesterId": { - "locationName": "requesterId" - }, - "Groups": { - "shape": "S4c", - "locationName": "groupSet" - }, - "Instances": { - "locationName": "instancesSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "InstanceId": { - "locationName": "instanceId" - }, - "ImageId": { - "locationName": "imageId" - }, - "State": { - "shape": "Sa9", - "locationName": "instanceState" - }, - "PrivateDnsName": { - "locationName": "privateDnsName" - }, - "PublicDnsName": { - "locationName": "dnsName" - }, - "StateTransitionReason": { - "locationName": "reason" - }, - "KeyName": { - "locationName": "keyName" - }, - "AmiLaunchIndex": { - "locationName": "amiLaunchIndex", - "type": "integer" - }, - "ProductCodes": { - "shape": "S90", - "locationName": "productCodes" - }, - "InstanceType": { - "locationName": "instanceType" - }, - "LaunchTime": { - "locationName": "launchTime", - "type": "timestamp" - }, - "Placement": { - "shape": "Sao", - "locationName": "placement" - }, - "KernelId": { - "locationName": "kernelId" - }, - "RamdiskId": { - "locationName": "ramdiskId" - }, - "Platform": { - "locationName": "platform" - }, - "Monitoring": { - "shape": "Sap", - "locationName": "monitoring" - }, - "SubnetId": { - "locationName": "subnetId" - }, - "VpcId": { - "locationName": "vpcId" - }, - "PrivateIpAddress": { - "locationName": "privateIpAddress" - }, - "PublicIpAddress": { - "locationName": "ipAddress" - }, - "StateReason": { - "shape": "S9e", - "locationName": "stateReason" - }, - "Architecture": { - "locationName": "architecture" - }, - "RootDeviceType": { - "locationName": "rootDeviceType" - }, - "RootDeviceName": { - "locationName": "rootDeviceName" - }, - "BlockDeviceMappings": { - "shape": "S9z", - "locationName": "blockDeviceMapping" - }, - "VirtualizationType": { - "locationName": "virtualizationType" - }, - "InstanceLifecycle": { - "locationName": "instanceLifecycle" - }, - "SpotInstanceRequestId": { - "locationName": "spotInstanceRequestId" - }, - "ClientToken": { - "locationName": "clientToken" - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - }, - "SecurityGroups": { - "shape": "S4c", - "locationName": "groupSet" - }, - "SourceDestCheck": { - "locationName": "sourceDestCheck", - "type": "boolean" - }, - "Hypervisor": { - "locationName": "hypervisor" - }, - "NetworkInterfaces": { - "locationName": "networkInterfaceSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "NetworkInterfaceId": { - "locationName": "networkInterfaceId" - }, - "SubnetId": { - "locationName": "subnetId" - }, - "VpcId": { - "locationName": "vpcId" - }, - "Description": { - "locationName": "description" - }, - "OwnerId": { - "locationName": "ownerId" - }, - "Status": { - "locationName": "status" - }, - "MacAddress": { - "locationName": "macAddress" - }, - "PrivateIpAddress": { - "locationName": "privateIpAddress" - }, - "PrivateDnsName": { - "locationName": "privateDnsName" - }, - "SourceDestCheck": { - "locationName": "sourceDestCheck", - "type": "boolean" - }, - "Groups": { - "shape": "S4c", - "locationName": "groupSet" - }, - "Attachment": { - "locationName": "attachment", - "type": "structure", - "members": { - "AttachmentId": { - "locationName": "attachmentId" - }, - "DeviceIndex": { - "locationName": "deviceIndex", - "type": "integer" - }, - "Status": { - "locationName": "status" - }, - "AttachTime": { - "locationName": "attachTime", - "type": "timestamp" - }, - "DeleteOnTermination": { - "locationName": "deleteOnTermination", - "type": "boolean" - } - } - }, - "Association": { - "shape": "Sav", - "locationName": "association" - }, - "PrivateIpAddresses": { - "locationName": "privateIpAddressesSet", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "PrivateIpAddress": { - "locationName": "privateIpAddress" - }, - "PrivateDnsName": { - "locationName": "privateDnsName" - }, - "Primary": { - "locationName": "primary", - "type": "boolean" - }, - "Association": { - "shape": "Sav", - "locationName": "association" - } - } - } - } - } - } - }, - "IamInstanceProfile": { - "locationName": "iamInstanceProfile", - "type": "structure", - "members": { - "Arn": { - "locationName": "arn" - }, - "Id": { - "locationName": "id" - } - } - }, - "EbsOptimized": { - "locationName": "ebsOptimized", - "type": "boolean" - }, - "SriovNetSupport": { - "locationName": "sriovNetSupport" - } - } - } - } - } - }, - "Sao": { - "type": "structure", - "members": { - "AvailabilityZone": { - "locationName": "availabilityZone" - }, - "GroupName": { - "locationName": "groupName" - }, - "Tenancy": { - "locationName": "tenancy" - } - } - }, - "Sap": { - "type": "structure", - "members": { - "State": { - "locationName": "state" - } - } - }, - "Sav": { - "type": "structure", - "members": { - "PublicIp": { - "locationName": "publicIp" - }, - "PublicDnsName": { - "locationName": "publicDnsName" - }, - "IpOwnerId": { - "locationName": "ipOwnerId" - } - } - }, - "Sc2": { - "type": "list", - "member": { - "locationName": "ReservedInstancesId" - } - }, - "Sca": { - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "Frequency": { - "locationName": "frequency" - }, - "Amount": { - "locationName": "amount", - "type": "double" - } - } - } - }, - "Sco": { - "type": "structure", - "members": { - "AvailabilityZone": { - "locationName": "availabilityZone" - }, - "Platform": { - "locationName": "platform" - }, - "InstanceCount": { - "locationName": "instanceCount", - "type": "integer" - }, - "InstanceType": { - "locationName": "instanceType" - } - } - }, - "Sd0": { - "type": "list", - "member": { - "locationName": "GroupName" - } - }, - "Sd7": { - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "UserId": { - "locationName": "userId" - }, - "Group": { - "locationName": "group" - } - } - } - }, - "Sdu": { - "type": "structure", - "required": [ - "SpotPrice", - "TargetCapacity", - "IamFleetRole", - "LaunchSpecifications" - ], - "members": { - "ClientToken": { - "locationName": "clientToken" - }, - "SpotPrice": { - "locationName": "spotPrice" - }, - "TargetCapacity": { - "locationName": "targetCapacity", - "type": "integer" - }, - "ValidFrom": { - "locationName": "validFrom", - "type": "timestamp" - }, - "ValidUntil": { - "locationName": "validUntil", - "type": "timestamp" - }, - "TerminateInstancesWithExpiration": { - "locationName": "terminateInstancesWithExpiration", - "type": "boolean" - }, - "IamFleetRole": { - "locationName": "iamFleetRole" - }, - "LaunchSpecifications": { - "locationName": "launchSpecifications", - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "ImageId": { - "locationName": "imageId" - }, - "KeyName": { - "locationName": "keyName" - }, - "SecurityGroups": { - "shape": "S4c", - "locationName": "groupSet" - }, - "UserData": { - "locationName": "userData" - }, - "AddressingType": { - "locationName": "addressingType" - }, - "InstanceType": { - "locationName": "instanceType" - }, - "Placement": { - "shape": "Sdx", - "locationName": "placement" - }, - "KernelId": { - "locationName": "kernelId" - }, - "RamdiskId": { - "locationName": "ramdiskId" - }, - "BlockDeviceMappings": { - "shape": "S93", - "locationName": "blockDeviceMapping" - }, - "Monitoring": { - "locationName": "monitoring", - "type": "structure", - "members": { - "Enabled": { - "locationName": "enabled", - "type": "boolean" - } - } - }, - "SubnetId": { - "locationName": "subnetId" - }, - "NetworkInterfaces": { - "shape": "Sdz", - "locationName": "networkInterfaceSet" - }, - "IamInstanceProfile": { - "shape": "Se1", - "locationName": "iamInstanceProfile" - }, - "EbsOptimized": { - "locationName": "ebsOptimized", - "type": "boolean" - } - } - } - } - } - }, - "Sdx": { - "type": "structure", - "members": { - "AvailabilityZone": { - "locationName": "availabilityZone" - }, - "GroupName": { - "locationName": "groupName" - } - } - }, - "Sdz": { - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "NetworkInterfaceId": { - "locationName": "networkInterfaceId" - }, - "DeviceIndex": { - "locationName": "deviceIndex", - "type": "integer" - }, - "SubnetId": { - "locationName": "subnetId" - }, - "Description": { - "locationName": "description" - }, - "PrivateIpAddress": { - "locationName": "privateIpAddress" - }, - "Groups": { - "shape": "S46", - "locationName": "SecurityGroupId" - }, - "DeleteOnTermination": { - "locationName": "deleteOnTermination", - "type": "boolean" - }, - "PrivateIpAddresses": { - "shape": "S47", - "locationName": "privateIpAddressesSet", - "queryName": "PrivateIpAddresses" - }, - "SecondaryPrivateIpAddressCount": { - "locationName": "secondaryPrivateIpAddressCount", - "type": "integer" - }, - "AssociatePublicIpAddress": { - "locationName": "associatePublicIpAddress", - "type": "boolean" - } - } - } - }, - "Se1": { - "type": "structure", - "members": { - "Arn": { - "locationName": "arn" - }, - "Name": { - "locationName": "name" - } - } - }, - "Se4": { - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "SpotInstanceRequestId": { - "locationName": "spotInstanceRequestId" - }, - "SpotPrice": { - "locationName": "spotPrice" - }, - "Type": { - "locationName": "type" - }, - "State": { - "locationName": "state" - }, - "Fault": { - "shape": "S5a", - "locationName": "fault" - }, - "Status": { - "locationName": "status", - "type": "structure", - "members": { - "Code": { - "locationName": "code" - }, - "UpdateTime": { - "locationName": "updateTime", - "type": "timestamp" - }, - "Message": { - "locationName": "message" - } - } - }, - "ValidFrom": { - "locationName": "validFrom", - "type": "timestamp" - }, - "ValidUntil": { - "locationName": "validUntil", - "type": "timestamp" - }, - "LaunchGroup": { - "locationName": "launchGroup" - }, - "AvailabilityZoneGroup": { - "locationName": "availabilityZoneGroup" - }, - "LaunchSpecification": { - "locationName": "launchSpecification", - "type": "structure", - "members": { - "ImageId": { - "locationName": "imageId" - }, - "KeyName": { - "locationName": "keyName" - }, - "SecurityGroups": { - "shape": "S4c", - "locationName": "groupSet" - }, - "UserData": { - "locationName": "userData" - }, - "AddressingType": { - "locationName": "addressingType" - }, - "InstanceType": { - "locationName": "instanceType" - }, - "Placement": { - "shape": "Sdx", - "locationName": "placement" - }, - "KernelId": { - "locationName": "kernelId" - }, - "RamdiskId": { - "locationName": "ramdiskId" - }, - "BlockDeviceMappings": { - "shape": "S93", - "locationName": "blockDeviceMapping" - }, - "SubnetId": { - "locationName": "subnetId" - }, - "NetworkInterfaces": { - "shape": "Sdz", - "locationName": "networkInterfaceSet" - }, - "IamInstanceProfile": { - "shape": "Se1", - "locationName": "iamInstanceProfile" - }, - "EbsOptimized": { - "locationName": "ebsOptimized", - "type": "boolean" - }, - "Monitoring": { - "shape": "Sea", - "locationName": "monitoring" - } - } - }, - "InstanceId": { - "locationName": "instanceId" - }, - "CreateTime": { - "locationName": "createTime", - "type": "timestamp" - }, - "ProductDescription": { - "locationName": "productDescription" - }, - "Tags": { - "shape": "Sa", - "locationName": "tagSet" - }, - "LaunchedAvailabilityZone": { - "locationName": "launchedAvailabilityZone" - } - } - } - }, - "Sea": { - "type": "structure", - "required": [ - "Enabled" - ], - "members": { - "Enabled": { - "locationName": "enabled", - "type": "boolean" - } - } - }, - "Seu": { - "type": "list", - "member": { - "locationName": "VolumeId" - } - }, - "Sgo": { - "type": "structure", - "members": { - "S3Bucket": {}, - "S3Key": {} - } - }, - "Sgp": { - "type": "structure", - "members": { - "UploadStart": { - "type": "timestamp" - }, - "UploadEnd": { - "type": "timestamp" - }, - "UploadSize": { - "type": "double" - }, - "Comment": {} - } - }, - "Sgt": { - "type": "list", - "member": { - "locationName": "SecurityGroup" - } - }, - "Sgy": { - "type": "structure", - "required": [ - "Format", - "Bytes", - "ImportManifestUrl" - ], - "members": { - "Format": { - "locationName": "format" - }, - "Bytes": { - "locationName": "bytes", - "type": "long" - }, - "ImportManifestUrl": { - "locationName": "importManifestUrl" - } - } - }, - "Sgz": { - "type": "structure", - "required": [ - "Size" - ], - "members": { - "Size": { - "locationName": "size", - "type": "long" - } - } - }, - "Sh9": { - "type": "list", - "member": { - "locationName": "UserId" - } - }, - "Shw": { - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "InstanceId": { - "locationName": "instanceId" - }, - "Monitoring": { - "shape": "Sap", - "locationName": "monitoring" - } - } - } - }, - "Sj1": { - "type": "list", - "member": { - "locationName": "item", - "type": "structure", - "members": { - "InstanceId": { - "locationName": "instanceId" - }, - "CurrentState": { - "shape": "Sa9", - "locationName": "currentState" - }, - "PreviousState": { - "shape": "Sa9", - "locationName": "previousState" - } - } - } - } - }, - "examples": {} -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/ec2-2015-04-15.paginators.json b/cli/node_modules/aws-sdk/apis/ec2-2015-04-15.paginators.json deleted file mode 100644 index 740f2e36a..000000000 --- a/cli/node_modules/aws-sdk/apis/ec2-2015-04-15.paginators.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "pagination": { - "DescribeAccountAttributes": { - "result_key": "AccountAttributes" - }, - "DescribeAddresses": { - "result_key": "Addresses" - }, - "DescribeAvailabilityZones": { - "result_key": "AvailabilityZones" - }, - "DescribeBundleTasks": { - "result_key": "BundleTasks" - }, - "DescribeConversionTasks": { - "result_key": "ConversionTasks" - }, - "DescribeCustomerGateways": { - "result_key": "CustomerGateways" - }, - "DescribeDhcpOptions": { - "result_key": "DhcpOptions" - }, - "DescribeExportTasks": { - "result_key": "ExportTasks" - }, - "DescribeImages": { - "result_key": "Images" - }, - "DescribeInstanceStatus": { - "input_token": "NextToken", - "output_token": "NextToken", - "limit_key": "MaxResults", - "result_key": "InstanceStatuses" - }, - "DescribeInstances": { - "input_token": "NextToken", - "output_token": "NextToken", - "limit_key": "MaxResults", - "result_key": "Reservations" - }, - "DescribeInternetGateways": { - "result_key": "InternetGateways" - }, - "DescribeKeyPairs": { - "result_key": "KeyPairs" - }, - "DescribeNetworkAcls": { - "result_key": "NetworkAcls" - }, - "DescribeNetworkInterfaces": { - "result_key": "NetworkInterfaces" - }, - "DescribePlacementGroups": { - "result_key": "PlacementGroups" - }, - "DescribeRegions": { - "result_key": "Regions" - }, - "DescribeReservedInstances": { - "result_key": "ReservedInstances" - }, - "DescribeReservedInstancesListings": { - "result_key": "ReservedInstancesListings" - }, - "DescribeReservedInstancesOfferings": { - "input_token": "NextToken", - "output_token": "NextToken", - "limit_key": "MaxResults", - "result_key": "ReservedInstancesOfferings" - }, - "DescribeReservedInstancesModifications": { - "input_token": "NextToken", - "output_token": "NextToken", - "result_key": "ReservedInstancesModifications" - }, - "DescribeRouteTables": { - "result_key": "RouteTables" - }, - "DescribeSecurityGroups": { - "result_key": "SecurityGroups" - }, - "DescribeSnapshots": { - "input_token": "NextToken", - "output_token": "NextToken", - "result_key": "Snapshots" - }, - "DescribeSpotInstanceRequests": { - "result_key": "SpotInstanceRequests" - }, - "DescribeSpotPriceHistory": { - "input_token": "NextToken", - "output_token": "NextToken", - "limit_key": "MaxResults", - "result_key": "SpotPriceHistory" - }, - "DescribeSubnets": { - "result_key": "Subnets" - }, - "DescribeTags": { - "result_key": "Tags" - }, - "DescribeVolumeStatus": { - "input_token": "NextToken", - "output_token": "NextToken", - "limit_key": "MaxResults", - "result_key": "VolumeStatuses" - }, - "DescribeVolumes": { - "input_token": "NextToken", - "output_token": "NextToken", - "limit_key": "MaxResults", - "result_key": "Volumes" - }, - "DescribeVpcs": { - "result_key": "Vpcs" - }, - "DescribeVpnConnections": { - "result_key": "VpnConnections" - }, - "DescribeVpnGateways": { - "result_key": "VpnGateways" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/ec2-2015-04-15.waiters.json b/cli/node_modules/aws-sdk/apis/ec2-2015-04-15.waiters.json deleted file mode 100644 index 939fdf9ef..000000000 --- a/cli/node_modules/aws-sdk/apis/ec2-2015-04-15.waiters.json +++ /dev/null @@ -1,181 +0,0 @@ -{ - "waiters": { - "__default__": { - "interval": 15, - "max_attempts": 40, - "acceptor_type": "output" - }, - "__InstanceState": { - "operation": "DescribeInstances", - "acceptor_path": "Reservations[].Instances[].State.Name" - }, - "__InstanceStatus": { - "operation": "DescribeInstanceStatus", - "success_value": "ok" - }, - "SystemStatusOk": { - "extends": "__InstanceStatus", - "acceptor_path": "InstanceStatuses[].SystemStatus.Status" - }, - "InstanceStatusOk": { - "extends": "__InstanceStatus", - "acceptor_path": "InstanceStatuses[].InstanceStatus.Status" - }, - "ImageAvailable": { - "operation": "DescribeImages", - "acceptor_path": "Images[].State", - "success_value": "available", - "failure_value": [ - "failed" - ] - }, - "InstanceRunning": { - "extends": "__InstanceState", - "success_value": "running", - "failure_value": [ - "shutting-down", - "terminated", - "stopping" - ] - }, - "InstanceStopped": { - "extends": "__InstanceState", - "success_value": "stopped", - "failure_value": [ - "pending", - "terminated" - ] - }, - "InstanceTerminated": { - "extends": "__InstanceState", - "success_value": "terminated", - "failure_value": [ - "pending", - "stopping" - ] - }, - "__ExportTaskState": { - "operation": "DescribeExportTasks", - "acceptor_path": "ExportTasks[].State" - }, - "ExportTaskCompleted": { - "extends": "__ExportTaskState", - "success_value": "completed" - }, - "ExportTaskCancelled": { - "extends": "__ExportTaskState", - "success_value": "cancelled" - }, - "SnapshotCompleted": { - "operation": "DescribeSnapshots", - "success_path": "Snapshots[].State", - "success_value": "completed" - }, - "SubnetAvailable": { - "operation": "DescribeSubnets", - "success_path": "Subnets[].State", - "success_value": "available" - }, - "__VolumeStatus": { - "operation": "DescribeVolumes", - "acceptor_path": "Volumes[].State" - }, - "VolumeAvailable": { - "extends": "__VolumeStatus", - "success_value": "available", - "failure_value": [ - "deleted" - ] - }, - "VolumeInUse": { - "extends": "__VolumeStatus", - "success_value": "in-use", - "failure_value": [ - "deleted" - ] - }, - "VolumeDeleted": { - "extends": "__VolumeStatus", - "success_type": "error", - "success_value": "InvalidVolume.NotFound" - }, - "VpcAvailable": { - "operation": "DescribeVpcs", - "success_path": "Vpcs[].State", - "success_value": "available" - }, - "__VpnConnectionState": { - "operation": "DescribeVpnConnections", - "acceptor_path": "VpnConnections[].State" - }, - "VpnConnectionAvailable": { - "extends": "__VpnConnectionState", - "success_value": "available", - "failure_value": [ - "deleting", - "deleted" - ] - }, - "VpnConnectionDeleted": { - "extends": "__VpnConnectionState", - "success_value": "deleted", - "failure_value": [ - "pending" - ] - }, - "BundleTaskComplete": { - "operation": "DescribeBundleTasks", - "acceptor_path": "BundleTasks[].State", - "success_value": "complete", - "failure_value": [ - "failed" - ] - }, - "__ConversionTaskState": { - "operation": "DescribeConversionTasks", - "acceptor_path": "ConversionTasks[].State" - }, - "ConversionTaskCompleted": { - "extends": "__ConversionTaskState", - "success_value": "completed", - "failure_value": [ - "cancelled", - "cancelling" - ] - }, - "ConversionTaskCancelled": { - "extends": "__ConversionTaskState", - "success_value": "cancelled" - }, - "__CustomerGatewayState": { - "operation": "DescribeCustomerGateways", - "acceptor_path": "CustomerGateways[].State" - }, - "CustomerGatewayAvailable": { - "extends": "__CustomerGatewayState", - "success_value": "available", - "failure_value": [ - "deleted", - "deleting" - ] - }, - "ConversionTaskDeleted": { - "extends": "__CustomerGatewayState", - "success_value": "deleted" - }, - "__SpotInstanceRequestState": { - "operation": "DescribeSpotInstanceRequests", - "acceptor_path": "SpotInstanceRequests[].Status.Code" - }, - "SpotInstanceRequestFulfilled": { - "extends": "__SpotInstanceRequestState", - "success_value": "fulfilled", - "failure_value": [ - "schedule-expired", - "canceled-before-fulfillment", - "bad-parameters", - "system-error" - ] - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/ecs-2014-11-13.min.json b/cli/node_modules/aws-sdk/apis/ecs-2014-11-13.min.json deleted file mode 100644 index df7ed5f96..000000000 --- a/cli/node_modules/aws-sdk/apis/ecs-2014-11-13.min.json +++ /dev/null @@ -1,989 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2014-11-13", - "endpointPrefix": "ecs", - "jsonVersion": "1.1", - "serviceAbbreviation": "Amazon ECS", - "serviceFullName": "Amazon EC2 Container Service", - "signatureVersion": "v4", - "targetPrefix": "AmazonEC2ContainerServiceV20141113", - "protocol": "json" - }, - "operations": { - "CreateCluster": { - "input": { - "type": "structure", - "members": { - "clusterName": {} - } - }, - "output": { - "type": "structure", - "members": { - "cluster": { - "shape": "S4" - } - } - } - }, - "CreateService": { - "input": { - "type": "structure", - "required": [ - "serviceName", - "taskDefinition", - "desiredCount" - ], - "members": { - "cluster": {}, - "serviceName": {}, - "taskDefinition": {}, - "loadBalancers": { - "shape": "S7" - }, - "desiredCount": { - "type": "integer" - }, - "clientToken": {}, - "role": {} - } - }, - "output": { - "type": "structure", - "members": { - "service": { - "shape": "Sb" - } - } - } - }, - "DeleteCluster": { - "input": { - "type": "structure", - "required": [ - "cluster" - ], - "members": { - "cluster": {} - } - }, - "output": { - "type": "structure", - "members": { - "cluster": { - "shape": "S4" - } - } - } - }, - "DeleteService": { - "input": { - "type": "structure", - "required": [ - "service" - ], - "members": { - "cluster": {}, - "service": {} - } - }, - "output": { - "type": "structure", - "members": { - "service": { - "shape": "Sb" - } - } - } - }, - "DeregisterContainerInstance": { - "input": { - "type": "structure", - "required": [ - "containerInstance" - ], - "members": { - "cluster": {}, - "containerInstance": {}, - "force": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "containerInstance": { - "shape": "So" - } - } - } - }, - "DeregisterTaskDefinition": { - "input": { - "type": "structure", - "required": [ - "taskDefinition" - ], - "members": { - "taskDefinition": {} - } - }, - "output": { - "type": "structure", - "members": { - "taskDefinition": { - "shape": "Sz" - } - } - } - }, - "DescribeClusters": { - "input": { - "type": "structure", - "members": { - "clusters": { - "shape": "Su" - } - } - }, - "output": { - "type": "structure", - "members": { - "clusters": { - "type": "list", - "member": { - "shape": "S4" - } - }, - "failures": { - "shape": "S1i" - } - } - } - }, - "DescribeContainerInstances": { - "input": { - "type": "structure", - "required": [ - "containerInstances" - ], - "members": { - "cluster": {}, - "containerInstances": { - "shape": "Su" - } - } - }, - "output": { - "type": "structure", - "members": { - "containerInstances": { - "type": "list", - "member": { - "shape": "So" - } - }, - "failures": { - "shape": "S1i" - } - } - } - }, - "DescribeServices": { - "input": { - "type": "structure", - "required": [ - "services" - ], - "members": { - "cluster": {}, - "services": { - "shape": "Su" - } - } - }, - "output": { - "type": "structure", - "members": { - "services": { - "type": "list", - "member": { - "shape": "Sb" - } - }, - "failures": { - "shape": "S1i" - } - } - } - }, - "DescribeTaskDefinition": { - "input": { - "type": "structure", - "required": [ - "taskDefinition" - ], - "members": { - "taskDefinition": {} - } - }, - "output": { - "type": "structure", - "members": { - "taskDefinition": { - "shape": "Sz" - } - } - } - }, - "DescribeTasks": { - "input": { - "type": "structure", - "required": [ - "tasks" - ], - "members": { - "cluster": {}, - "tasks": { - "shape": "Su" - } - } - }, - "output": { - "type": "structure", - "members": { - "tasks": { - "shape": "S1u" - }, - "failures": { - "shape": "S1i" - } - } - } - }, - "DiscoverPollEndpoint": { - "input": { - "type": "structure", - "members": { - "containerInstance": {}, - "cluster": {} - } - }, - "output": { - "type": "structure", - "members": { - "endpoint": {}, - "telemetryEndpoint": {} - } - } - }, - "ListClusters": { - "input": { - "type": "structure", - "members": { - "nextToken": {}, - "maxResults": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "clusterArns": { - "shape": "Su" - }, - "nextToken": {} - } - } - }, - "ListContainerInstances": { - "input": { - "type": "structure", - "members": { - "cluster": {}, - "nextToken": {}, - "maxResults": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "containerInstanceArns": { - "shape": "Su" - }, - "nextToken": {} - } - } - }, - "ListServices": { - "input": { - "type": "structure", - "members": { - "cluster": {}, - "nextToken": {}, - "maxResults": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "serviceArns": { - "shape": "Su" - }, - "nextToken": {} - } - } - }, - "ListTaskDefinitionFamilies": { - "input": { - "type": "structure", - "members": { - "familyPrefix": {}, - "nextToken": {}, - "maxResults": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "families": { - "shape": "Su" - }, - "nextToken": {} - } - } - }, - "ListTaskDefinitions": { - "input": { - "type": "structure", - "members": { - "familyPrefix": {}, - "status": {}, - "sort": {}, - "nextToken": {}, - "maxResults": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "taskDefinitionArns": { - "shape": "Su" - }, - "nextToken": {} - } - } - }, - "ListTasks": { - "input": { - "type": "structure", - "members": { - "cluster": {}, - "containerInstance": {}, - "family": {}, - "nextToken": {}, - "maxResults": { - "type": "integer" - }, - "startedBy": {}, - "serviceName": {}, - "desiredStatus": {} - } - }, - "output": { - "type": "structure", - "members": { - "taskArns": { - "shape": "Su" - }, - "nextToken": {} - } - } - }, - "RegisterContainerInstance": { - "input": { - "type": "structure", - "members": { - "cluster": {}, - "instanceIdentityDocument": {}, - "instanceIdentityDocumentSignature": {}, - "totalResources": { - "shape": "Sq" - }, - "versionInfo": { - "shape": "Sp" - }, - "containerInstanceArn": {} - } - }, - "output": { - "type": "structure", - "members": { - "containerInstance": { - "shape": "So" - } - } - } - }, - "RegisterTaskDefinition": { - "input": { - "type": "structure", - "required": [ - "family", - "containerDefinitions" - ], - "members": { - "family": {}, - "containerDefinitions": { - "shape": "S10" - }, - "volumes": { - "shape": "S1b" - } - } - }, - "output": { - "type": "structure", - "members": { - "taskDefinition": { - "shape": "Sz" - } - } - } - }, - "RunTask": { - "input": { - "type": "structure", - "required": [ - "taskDefinition" - ], - "members": { - "cluster": {}, - "taskDefinition": {}, - "overrides": { - "shape": "S1w" - }, - "count": { - "type": "integer" - }, - "startedBy": {} - } - }, - "output": { - "type": "structure", - "members": { - "tasks": { - "shape": "S1u" - }, - "failures": { - "shape": "S1i" - } - } - } - }, - "StartTask": { - "input": { - "type": "structure", - "required": [ - "taskDefinition", - "containerInstances" - ], - "members": { - "cluster": {}, - "taskDefinition": {}, - "overrides": { - "shape": "S1w" - }, - "containerInstances": { - "shape": "Su" - }, - "startedBy": {} - } - }, - "output": { - "type": "structure", - "members": { - "tasks": { - "shape": "S1u" - }, - "failures": { - "shape": "S1i" - } - } - } - }, - "StopTask": { - "input": { - "type": "structure", - "required": [ - "task" - ], - "members": { - "cluster": {}, - "task": {} - } - }, - "output": { - "type": "structure", - "members": { - "task": { - "shape": "S1v" - } - } - } - }, - "SubmitContainerStateChange": { - "input": { - "type": "structure", - "members": { - "cluster": {}, - "task": {}, - "containerName": {}, - "status": {}, - "exitCode": { - "type": "integer" - }, - "reason": {}, - "networkBindings": { - "shape": "S21" - } - } - }, - "output": { - "type": "structure", - "members": { - "acknowledgment": {} - } - } - }, - "SubmitTaskStateChange": { - "input": { - "type": "structure", - "members": { - "cluster": {}, - "task": {}, - "status": {}, - "reason": {} - } - }, - "output": { - "type": "structure", - "members": { - "acknowledgment": {} - } - } - }, - "UpdateContainerAgent": { - "input": { - "type": "structure", - "required": [ - "containerInstance" - ], - "members": { - "cluster": {}, - "containerInstance": {} - } - }, - "output": { - "type": "structure", - "members": { - "containerInstance": { - "shape": "So" - } - } - } - }, - "UpdateService": { - "input": { - "type": "structure", - "required": [ - "service" - ], - "members": { - "cluster": {}, - "service": {}, - "desiredCount": { - "type": "integer" - }, - "taskDefinition": {} - } - }, - "output": { - "type": "structure", - "members": { - "service": { - "shape": "Sb" - } - } - } - } - }, - "shapes": { - "S4": { - "type": "structure", - "members": { - "clusterArn": {}, - "clusterName": {}, - "status": {}, - "registeredContainerInstancesCount": { - "type": "integer" - }, - "runningTasksCount": { - "type": "integer" - }, - "pendingTasksCount": { - "type": "integer" - }, - "activeServicesCount": { - "type": "integer" - } - } - }, - "S7": { - "type": "list", - "member": { - "type": "structure", - "members": { - "loadBalancerName": {}, - "containerName": {}, - "containerPort": { - "type": "integer" - } - } - } - }, - "Sb": { - "type": "structure", - "members": { - "serviceArn": {}, - "serviceName": {}, - "clusterArn": {}, - "loadBalancers": { - "shape": "S7" - }, - "status": {}, - "desiredCount": { - "type": "integer" - }, - "runningCount": { - "type": "integer" - }, - "pendingCount": { - "type": "integer" - }, - "taskDefinition": {}, - "deployments": { - "type": "list", - "member": { - "type": "structure", - "members": { - "id": {}, - "status": {}, - "taskDefinition": {}, - "desiredCount": { - "type": "integer" - }, - "pendingCount": { - "type": "integer" - }, - "runningCount": { - "type": "integer" - }, - "createdAt": { - "type": "timestamp" - }, - "updatedAt": { - "type": "timestamp" - } - } - } - }, - "roleArn": {}, - "events": { - "type": "list", - "member": { - "type": "structure", - "members": { - "id": {}, - "createdAt": { - "type": "timestamp" - }, - "message": {} - } - } - } - } - }, - "So": { - "type": "structure", - "members": { - "containerInstanceArn": {}, - "ec2InstanceId": {}, - "versionInfo": { - "shape": "Sp" - }, - "remainingResources": { - "shape": "Sq" - }, - "registeredResources": { - "shape": "Sq" - }, - "status": {}, - "agentConnected": { - "type": "boolean" - }, - "runningTasksCount": { - "type": "integer" - }, - "pendingTasksCount": { - "type": "integer" - }, - "agentUpdateStatus": {} - } - }, - "Sp": { - "type": "structure", - "members": { - "agentVersion": {}, - "agentHash": {}, - "dockerVersion": {} - } - }, - "Sq": { - "type": "list", - "member": { - "type": "structure", - "members": { - "name": {}, - "type": {}, - "doubleValue": { - "type": "double" - }, - "longValue": { - "type": "long" - }, - "integerValue": { - "type": "integer" - }, - "stringSetValue": { - "shape": "Su" - } - } - } - }, - "Su": { - "type": "list", - "member": {} - }, - "Sz": { - "type": "structure", - "members": { - "taskDefinitionArn": {}, - "containerDefinitions": { - "shape": "S10" - }, - "family": {}, - "revision": { - "type": "integer" - }, - "volumes": { - "shape": "S1b" - }, - "status": {} - } - }, - "S10": { - "type": "list", - "member": { - "type": "structure", - "members": { - "name": {}, - "image": {}, - "cpu": { - "type": "integer" - }, - "memory": { - "type": "integer" - }, - "links": { - "shape": "Su" - }, - "portMappings": { - "type": "list", - "member": { - "type": "structure", - "members": { - "containerPort": { - "type": "integer" - }, - "hostPort": { - "type": "integer" - }, - "protocol": {} - } - } - }, - "essential": { - "type": "boolean" - }, - "entryPoint": { - "shape": "Su" - }, - "command": { - "shape": "Su" - }, - "environment": { - "shape": "S15" - }, - "mountPoints": { - "type": "list", - "member": { - "type": "structure", - "members": { - "sourceVolume": {}, - "containerPath": {}, - "readOnly": { - "type": "boolean" - } - } - } - }, - "volumesFrom": { - "type": "list", - "member": { - "type": "structure", - "members": { - "sourceContainer": {}, - "readOnly": { - "type": "boolean" - } - } - } - } - } - } - }, - "S15": { - "type": "list", - "member": { - "type": "structure", - "members": { - "name": {}, - "value": {} - } - } - }, - "S1b": { - "type": "list", - "member": { - "type": "structure", - "members": { - "name": {}, - "host": { - "type": "structure", - "members": { - "sourcePath": {} - } - } - } - } - }, - "S1i": { - "type": "list", - "member": { - "type": "structure", - "members": { - "arn": {}, - "reason": {} - } - } - }, - "S1u": { - "type": "list", - "member": { - "shape": "S1v" - } - }, - "S1v": { - "type": "structure", - "members": { - "taskArn": {}, - "clusterArn": {}, - "taskDefinitionArn": {}, - "containerInstanceArn": {}, - "overrides": { - "shape": "S1w" - }, - "lastStatus": {}, - "desiredStatus": {}, - "containers": { - "type": "list", - "member": { - "type": "structure", - "members": { - "containerArn": {}, - "taskArn": {}, - "name": {}, - "lastStatus": {}, - "exitCode": { - "type": "integer" - }, - "reason": {}, - "networkBindings": { - "shape": "S21" - } - } - } - }, - "startedBy": {} - } - }, - "S1w": { - "type": "structure", - "members": { - "containerOverrides": { - "type": "list", - "member": { - "type": "structure", - "members": { - "name": {}, - "command": { - "shape": "Su" - }, - "environment": { - "shape": "S15" - } - } - } - } - } - }, - "S21": { - "type": "list", - "member": { - "type": "structure", - "members": { - "bindIP": {}, - "containerPort": { - "type": "integer" - }, - "hostPort": { - "type": "integer" - }, - "protocol": {} - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/ecs-2014-11-13.paginators.json b/cli/node_modules/aws-sdk/apis/ecs-2014-11-13.paginators.json deleted file mode 100644 index 081a2df00..000000000 --- a/cli/node_modules/aws-sdk/apis/ecs-2014-11-13.paginators.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "pagination": { - "ListClusters": { - "input_token": "nextToken", - "output_token": "nextToken", - "limit_key": "maxResults", - "result_key": "clusterArns" - }, - "ListContainerInstances": { - "input_token": "nextToken", - "output_token": "nextToken", - "limit_key": "maxResults", - "result_key": "containerInstanceArns" - }, - "ListTaskDefinitions": { - "input_token": "nextToken", - "output_token": "nextToken", - "limit_key": "maxResults", - "result_key": "taskDefinitionArns" - }, - "ListTaskDefinitionFamilies": { - "input_token": "nextToken", - "output_token": "nextToken", - "limit_key": "maxResults", - "result_key": "families" - }, - "ListTasks": { - "input_token": "nextToken", - "output_token": "nextToken", - "limit_key": "maxResults", - "result_key": "taskArns" - }, - "ListServices": { - "input_token": "nextToken", - "output_token": "nextToken", - "limit_key": "maxResults", - "result_key": "serviceArns" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/efs-2015-02-01.min.json b/cli/node_modules/aws-sdk/apis/efs-2015-02-01.min.json deleted file mode 100644 index fb7675310..000000000 --- a/cli/node_modules/aws-sdk/apis/efs-2015-02-01.min.json +++ /dev/null @@ -1,391 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2015-02-01", - "endpointPrefix": "elasticfilesystem", - "serviceAbbreviation": "ElasticFileSystem", - "serviceFullName": "Amazon Elastic File System", - "signatureVersion": "v4", - "protocol": "rest-json" - }, - "operations": { - "CreateFileSystem": { - "http": { - "requestUri": "/2015-02-01/file-systems", - "responseCode": 201 - }, - "input": { - "type": "structure", - "required": [ - "CreationToken" - ], - "members": { - "CreationToken": {} - } - }, - "output": { - "shape": "S3" - } - }, - "CreateMountTarget": { - "http": { - "requestUri": "/2015-02-01/mount-targets", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "FileSystemId", - "SubnetId" - ], - "members": { - "FileSystemId": {}, - "SubnetId": {}, - "IpAddress": {}, - "SecurityGroups": { - "shape": "Sf" - } - } - }, - "output": { - "shape": "Sh" - } - }, - "CreateTags": { - "http": { - "requestUri": "/2015-02-01/create-tags/{FileSystemId}", - "responseCode": 204 - }, - "input": { - "type": "structure", - "required": [ - "FileSystemId", - "Tags" - ], - "members": { - "FileSystemId": { - "location": "uri", - "locationName": "FileSystemId" - }, - "Tags": { - "shape": "Sl" - } - } - } - }, - "DeleteFileSystem": { - "http": { - "method": "DELETE", - "requestUri": "/2015-02-01/file-systems/{FileSystemId}", - "responseCode": 204 - }, - "input": { - "type": "structure", - "required": [ - "FileSystemId" - ], - "members": { - "FileSystemId": { - "location": "uri", - "locationName": "FileSystemId" - } - } - } - }, - "DeleteMountTarget": { - "http": { - "method": "DELETE", - "requestUri": "/2015-02-01/mount-targets/{MountTargetId}", - "responseCode": 204 - }, - "input": { - "type": "structure", - "required": [ - "MountTargetId" - ], - "members": { - "MountTargetId": { - "location": "uri", - "locationName": "MountTargetId" - } - } - } - }, - "DeleteTags": { - "http": { - "requestUri": "/2015-02-01/delete-tags/{FileSystemId}", - "responseCode": 204 - }, - "input": { - "type": "structure", - "required": [ - "FileSystemId", - "TagKeys" - ], - "members": { - "FileSystemId": { - "location": "uri", - "locationName": "FileSystemId" - }, - "TagKeys": { - "type": "list", - "member": {} - } - } - } - }, - "DescribeFileSystems": { - "http": { - "method": "GET", - "requestUri": "/2015-02-01/file-systems", - "responseCode": 200 - }, - "input": { - "type": "structure", - "members": { - "MaxItems": { - "location": "querystring", - "locationName": "MaxItems", - "type": "integer" - }, - "Marker": { - "location": "querystring", - "locationName": "Marker" - }, - "CreationToken": { - "location": "querystring", - "locationName": "CreationToken" - }, - "FileSystemId": { - "location": "querystring", - "locationName": "FileSystemId" - } - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "FileSystems": { - "type": "list", - "member": { - "shape": "S3" - } - }, - "NextMarker": {} - } - } - }, - "DescribeMountTargetSecurityGroups": { - "http": { - "method": "GET", - "requestUri": "/2015-02-01/mount-targets/{MountTargetId}/security-groups", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "MountTargetId" - ], - "members": { - "MountTargetId": { - "location": "uri", - "locationName": "MountTargetId" - } - } - }, - "output": { - "type": "structure", - "required": [ - "SecurityGroups" - ], - "members": { - "SecurityGroups": { - "shape": "Sf" - } - } - } - }, - "DescribeMountTargets": { - "http": { - "method": "GET", - "requestUri": "/2015-02-01/mount-targets", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "FileSystemId" - ], - "members": { - "MaxItems": { - "location": "querystring", - "locationName": "MaxItems", - "type": "integer" - }, - "Marker": { - "location": "querystring", - "locationName": "Marker" - }, - "FileSystemId": { - "location": "querystring", - "locationName": "FileSystemId" - } - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "MountTargets": { - "type": "list", - "member": { - "shape": "Sh" - } - }, - "NextMarker": {} - } - } - }, - "DescribeTags": { - "http": { - "method": "GET", - "requestUri": "/2015-02-01/tags/{FileSystemId}/", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "FileSystemId" - ], - "members": { - "MaxItems": { - "location": "querystring", - "locationName": "MaxItems", - "type": "integer" - }, - "Marker": { - "location": "querystring", - "locationName": "Marker" - }, - "FileSystemId": { - "location": "uri", - "locationName": "FileSystemId" - } - } - }, - "output": { - "type": "structure", - "required": [ - "Tags" - ], - "members": { - "Marker": {}, - "Tags": { - "shape": "Sl" - }, - "NextMarker": {} - } - } - }, - "ModifyMountTargetSecurityGroups": { - "http": { - "method": "PUT", - "requestUri": "/2015-02-01/mount-targets/{MountTargetId}/security-groups", - "responseCode": 204 - }, - "input": { - "type": "structure", - "required": [ - "MountTargetId" - ], - "members": { - "MountTargetId": { - "location": "uri", - "locationName": "MountTargetId" - }, - "SecurityGroups": { - "shape": "Sf" - } - } - } - } - }, - "shapes": { - "S3": { - "type": "structure", - "required": [ - "OwnerId", - "CreationToken", - "FileSystemId", - "CreationTime", - "LifeCycleState", - "NumberOfMountTargets", - "SizeInBytes" - ], - "members": { - "OwnerId": {}, - "CreationToken": {}, - "FileSystemId": {}, - "CreationTime": { - "type": "timestamp" - }, - "LifeCycleState": {}, - "Name": {}, - "NumberOfMountTargets": { - "type": "integer" - }, - "SizeInBytes": { - "type": "structure", - "required": [ - "Value" - ], - "members": { - "Value": { - "type": "long" - }, - "Timestamp": { - "type": "timestamp" - } - } - } - } - }, - "Sf": { - "type": "list", - "member": {} - }, - "Sh": { - "type": "structure", - "required": [ - "MountTargetId", - "FileSystemId", - "SubnetId", - "LifeCycleState" - ], - "members": { - "OwnerId": {}, - "MountTargetId": {}, - "FileSystemId": {}, - "SubnetId": {}, - "LifeCycleState": {}, - "IpAddress": {}, - "NetworkInterfaceId": {} - } - }, - "Sl": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "Key", - "Value" - ], - "members": { - "Key": {}, - "Value": {} - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/elasticache-2015-02-02.min.json b/cli/node_modules/aws-sdk/apis/elasticache-2015-02-02.min.json deleted file mode 100644 index d509f995b..000000000 --- a/cli/node_modules/aws-sdk/apis/elasticache-2015-02-02.min.json +++ /dev/null @@ -1,1509 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2015-02-02", - "endpointPrefix": "elasticache", - "serviceFullName": "Amazon ElastiCache", - "signatureVersion": "v4", - "xmlNamespace": "http://elasticache.amazonaws.com/doc/2015-02-02/", - "protocol": "query" - }, - "operations": { - "AddTagsToResource": { - "input": { - "type": "structure", - "required": [ - "ResourceName", - "Tags" - ], - "members": { - "ResourceName": {}, - "Tags": { - "shape": "S3" - } - } - }, - "output": { - "shape": "S5", - "resultWrapper": "AddTagsToResourceResult" - } - }, - "AuthorizeCacheSecurityGroupIngress": { - "input": { - "type": "structure", - "required": [ - "CacheSecurityGroupName", - "EC2SecurityGroupName", - "EC2SecurityGroupOwnerId" - ], - "members": { - "CacheSecurityGroupName": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupOwnerId": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "AuthorizeCacheSecurityGroupIngressResult", - "type": "structure", - "members": { - "CacheSecurityGroup": { - "shape": "S8" - } - } - } - }, - "CopySnapshot": { - "input": { - "type": "structure", - "required": [ - "SourceSnapshotName", - "TargetSnapshotName" - ], - "members": { - "SourceSnapshotName": {}, - "TargetSnapshotName": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CopySnapshotResult", - "type": "structure", - "members": { - "Snapshot": { - "shape": "Sd" - } - } - } - }, - "CreateCacheCluster": { - "input": { - "type": "structure", - "required": [ - "CacheClusterId" - ], - "members": { - "CacheClusterId": {}, - "ReplicationGroupId": {}, - "AZMode": {}, - "PreferredAvailabilityZone": {}, - "PreferredAvailabilityZones": { - "shape": "Sl" - }, - "NumCacheNodes": { - "type": "integer" - }, - "CacheNodeType": {}, - "Engine": {}, - "EngineVersion": {}, - "CacheParameterGroupName": {}, - "CacheSubnetGroupName": {}, - "CacheSecurityGroupNames": { - "shape": "Sm" - }, - "SecurityGroupIds": { - "shape": "Sn" - }, - "Tags": { - "shape": "S3" - }, - "SnapshotArns": { - "shape": "So" - }, - "SnapshotName": {}, - "PreferredMaintenanceWindow": {}, - "Port": { - "type": "integer" - }, - "NotificationTopicArn": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "SnapshotRetentionLimit": { - "type": "integer" - }, - "SnapshotWindow": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateCacheClusterResult", - "type": "structure", - "members": { - "CacheCluster": { - "shape": "Sr" - } - } - } - }, - "CreateCacheParameterGroup": { - "input": { - "type": "structure", - "required": [ - "CacheParameterGroupName", - "CacheParameterGroupFamily", - "Description" - ], - "members": { - "CacheParameterGroupName": {}, - "CacheParameterGroupFamily": {}, - "Description": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateCacheParameterGroupResult", - "type": "structure", - "members": { - "CacheParameterGroup": { - "shape": "S16" - } - } - } - }, - "CreateCacheSecurityGroup": { - "input": { - "type": "structure", - "required": [ - "CacheSecurityGroupName", - "Description" - ], - "members": { - "CacheSecurityGroupName": {}, - "Description": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateCacheSecurityGroupResult", - "type": "structure", - "members": { - "CacheSecurityGroup": { - "shape": "S8" - } - } - } - }, - "CreateCacheSubnetGroup": { - "input": { - "type": "structure", - "required": [ - "CacheSubnetGroupName", - "CacheSubnetGroupDescription", - "SubnetIds" - ], - "members": { - "CacheSubnetGroupName": {}, - "CacheSubnetGroupDescription": {}, - "SubnetIds": { - "shape": "S1a" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateCacheSubnetGroupResult", - "type": "structure", - "members": { - "CacheSubnetGroup": { - "shape": "S1c" - } - } - } - }, - "CreateReplicationGroup": { - "input": { - "type": "structure", - "required": [ - "ReplicationGroupId", - "ReplicationGroupDescription" - ], - "members": { - "ReplicationGroupId": {}, - "ReplicationGroupDescription": {}, - "PrimaryClusterId": {}, - "AutomaticFailoverEnabled": { - "type": "boolean" - }, - "NumCacheClusters": { - "type": "integer" - }, - "PreferredCacheClusterAZs": { - "type": "list", - "member": { - "locationName": "AvailabilityZone" - } - }, - "CacheNodeType": {}, - "Engine": {}, - "EngineVersion": {}, - "CacheParameterGroupName": {}, - "CacheSubnetGroupName": {}, - "CacheSecurityGroupNames": { - "shape": "Sm" - }, - "SecurityGroupIds": { - "shape": "Sn" - }, - "Tags": { - "shape": "S3" - }, - "SnapshotArns": { - "shape": "So" - }, - "SnapshotName": {}, - "PreferredMaintenanceWindow": {}, - "Port": { - "type": "integer" - }, - "NotificationTopicArn": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "SnapshotRetentionLimit": { - "type": "integer" - }, - "SnapshotWindow": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateReplicationGroupResult", - "type": "structure", - "members": { - "ReplicationGroup": { - "shape": "S1j" - } - } - } - }, - "CreateSnapshot": { - "input": { - "type": "structure", - "required": [ - "CacheClusterId", - "SnapshotName" - ], - "members": { - "CacheClusterId": {}, - "SnapshotName": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateSnapshotResult", - "type": "structure", - "members": { - "Snapshot": { - "shape": "Sd" - } - } - } - }, - "DeleteCacheCluster": { - "input": { - "type": "structure", - "required": [ - "CacheClusterId" - ], - "members": { - "CacheClusterId": {}, - "FinalSnapshotIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DeleteCacheClusterResult", - "type": "structure", - "members": { - "CacheCluster": { - "shape": "Sr" - } - } - } - }, - "DeleteCacheParameterGroup": { - "input": { - "type": "structure", - "required": [ - "CacheParameterGroupName" - ], - "members": { - "CacheParameterGroupName": {} - } - } - }, - "DeleteCacheSecurityGroup": { - "input": { - "type": "structure", - "required": [ - "CacheSecurityGroupName" - ], - "members": { - "CacheSecurityGroupName": {} - } - } - }, - "DeleteCacheSubnetGroup": { - "input": { - "type": "structure", - "required": [ - "CacheSubnetGroupName" - ], - "members": { - "CacheSubnetGroupName": {} - } - } - }, - "DeleteReplicationGroup": { - "input": { - "type": "structure", - "required": [ - "ReplicationGroupId" - ], - "members": { - "ReplicationGroupId": {}, - "RetainPrimaryCluster": { - "type": "boolean" - }, - "FinalSnapshotIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DeleteReplicationGroupResult", - "type": "structure", - "members": { - "ReplicationGroup": { - "shape": "S1j" - } - } - } - }, - "DeleteSnapshot": { - "input": { - "type": "structure", - "required": [ - "SnapshotName" - ], - "members": { - "SnapshotName": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DeleteSnapshotResult", - "type": "structure", - "members": { - "Snapshot": { - "shape": "Sd" - } - } - } - }, - "DescribeCacheClusters": { - "input": { - "type": "structure", - "members": { - "CacheClusterId": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {}, - "ShowCacheNodeInfo": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "DescribeCacheClustersResult", - "type": "structure", - "members": { - "Marker": {}, - "CacheClusters": { - "type": "list", - "member": { - "shape": "Sr", - "locationName": "CacheCluster" - } - } - } - } - }, - "DescribeCacheEngineVersions": { - "input": { - "type": "structure", - "members": { - "Engine": {}, - "EngineVersion": {}, - "CacheParameterGroupFamily": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {}, - "DefaultOnly": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "DescribeCacheEngineVersionsResult", - "type": "structure", - "members": { - "Marker": {}, - "CacheEngineVersions": { - "type": "list", - "member": { - "locationName": "CacheEngineVersion", - "type": "structure", - "members": { - "Engine": {}, - "EngineVersion": {}, - "CacheParameterGroupFamily": {}, - "CacheEngineDescription": {}, - "CacheEngineVersionDescription": {} - } - } - } - } - } - }, - "DescribeCacheParameterGroups": { - "input": { - "type": "structure", - "members": { - "CacheParameterGroupName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeCacheParameterGroupsResult", - "type": "structure", - "members": { - "Marker": {}, - "CacheParameterGroups": { - "type": "list", - "member": { - "shape": "S16", - "locationName": "CacheParameterGroup" - } - } - } - } - }, - "DescribeCacheParameters": { - "input": { - "type": "structure", - "required": [ - "CacheParameterGroupName" - ], - "members": { - "CacheParameterGroupName": {}, - "Source": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeCacheParametersResult", - "type": "structure", - "members": { - "Marker": {}, - "Parameters": { - "shape": "S2f" - }, - "CacheNodeTypeSpecificParameters": { - "shape": "S2h" - } - } - } - }, - "DescribeCacheSecurityGroups": { - "input": { - "type": "structure", - "members": { - "CacheSecurityGroupName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeCacheSecurityGroupsResult", - "type": "structure", - "members": { - "Marker": {}, - "CacheSecurityGroups": { - "type": "list", - "member": { - "shape": "S8", - "locationName": "CacheSecurityGroup" - } - } - } - } - }, - "DescribeCacheSubnetGroups": { - "input": { - "type": "structure", - "members": { - "CacheSubnetGroupName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeCacheSubnetGroupsResult", - "type": "structure", - "members": { - "Marker": {}, - "CacheSubnetGroups": { - "type": "list", - "member": { - "shape": "S1c", - "locationName": "CacheSubnetGroup" - } - } - } - } - }, - "DescribeEngineDefaultParameters": { - "input": { - "type": "structure", - "required": [ - "CacheParameterGroupFamily" - ], - "members": { - "CacheParameterGroupFamily": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DescribeEngineDefaultParametersResult", - "type": "structure", - "members": { - "EngineDefaults": { - "type": "structure", - "members": { - "CacheParameterGroupFamily": {}, - "Marker": {}, - "Parameters": { - "shape": "S2f" - }, - "CacheNodeTypeSpecificParameters": { - "shape": "S2h" - } - }, - "wrapper": true - } - } - } - }, - "DescribeEvents": { - "input": { - "type": "structure", - "members": { - "SourceIdentifier": {}, - "SourceType": {}, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeEventsResult", - "type": "structure", - "members": { - "Marker": {}, - "Events": { - "type": "list", - "member": { - "locationName": "Event", - "type": "structure", - "members": { - "SourceIdentifier": {}, - "SourceType": {}, - "Message": {}, - "Date": { - "type": "timestamp" - } - } - } - } - } - } - }, - "DescribeReplicationGroups": { - "input": { - "type": "structure", - "members": { - "ReplicationGroupId": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeReplicationGroupsResult", - "type": "structure", - "members": { - "Marker": {}, - "ReplicationGroups": { - "type": "list", - "member": { - "shape": "S1j", - "locationName": "ReplicationGroup" - } - } - } - } - }, - "DescribeReservedCacheNodes": { - "input": { - "type": "structure", - "members": { - "ReservedCacheNodeId": {}, - "ReservedCacheNodesOfferingId": {}, - "CacheNodeType": {}, - "Duration": {}, - "ProductDescription": {}, - "OfferingType": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeReservedCacheNodesResult", - "type": "structure", - "members": { - "Marker": {}, - "ReservedCacheNodes": { - "type": "list", - "member": { - "shape": "S35", - "locationName": "ReservedCacheNode" - } - } - } - } - }, - "DescribeReservedCacheNodesOfferings": { - "input": { - "type": "structure", - "members": { - "ReservedCacheNodesOfferingId": {}, - "CacheNodeType": {}, - "Duration": {}, - "ProductDescription": {}, - "OfferingType": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeReservedCacheNodesOfferingsResult", - "type": "structure", - "members": { - "Marker": {}, - "ReservedCacheNodesOfferings": { - "type": "list", - "member": { - "locationName": "ReservedCacheNodesOffering", - "type": "structure", - "members": { - "ReservedCacheNodesOfferingId": {}, - "CacheNodeType": {}, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "double" - }, - "UsagePrice": { - "type": "double" - }, - "ProductDescription": {}, - "OfferingType": {}, - "RecurringCharges": { - "shape": "S37" - } - }, - "wrapper": true - } - } - } - } - }, - "DescribeSnapshots": { - "input": { - "type": "structure", - "members": { - "CacheClusterId": {}, - "SnapshotName": {}, - "SnapshotSource": {}, - "Marker": {}, - "MaxRecords": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "DescribeSnapshotsResult", - "type": "structure", - "members": { - "Marker": {}, - "Snapshots": { - "type": "list", - "member": { - "shape": "Sd", - "locationName": "Snapshot" - } - } - } - } - }, - "ListTagsForResource": { - "input": { - "type": "structure", - "required": [ - "ResourceName" - ], - "members": { - "ResourceName": {} - } - }, - "output": { - "shape": "S5", - "resultWrapper": "ListTagsForResourceResult" - } - }, - "ModifyCacheCluster": { - "input": { - "type": "structure", - "required": [ - "CacheClusterId" - ], - "members": { - "CacheClusterId": {}, - "NumCacheNodes": { - "type": "integer" - }, - "CacheNodeIdsToRemove": { - "shape": "Sv" - }, - "AZMode": {}, - "NewAvailabilityZones": { - "shape": "Sl" - }, - "CacheSecurityGroupNames": { - "shape": "Sm" - }, - "SecurityGroupIds": { - "shape": "Sn" - }, - "PreferredMaintenanceWindow": {}, - "NotificationTopicArn": {}, - "CacheParameterGroupName": {}, - "NotificationTopicStatus": {}, - "ApplyImmediately": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "SnapshotRetentionLimit": { - "type": "integer" - }, - "SnapshotWindow": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyCacheClusterResult", - "type": "structure", - "members": { - "CacheCluster": { - "shape": "Sr" - } - } - } - }, - "ModifyCacheParameterGroup": { - "input": { - "type": "structure", - "required": [ - "CacheParameterGroupName", - "ParameterNameValues" - ], - "members": { - "CacheParameterGroupName": {}, - "ParameterNameValues": { - "shape": "S3k" - } - } - }, - "output": { - "shape": "S3m", - "resultWrapper": "ModifyCacheParameterGroupResult" - } - }, - "ModifyCacheSubnetGroup": { - "input": { - "type": "structure", - "required": [ - "CacheSubnetGroupName" - ], - "members": { - "CacheSubnetGroupName": {}, - "CacheSubnetGroupDescription": {}, - "SubnetIds": { - "shape": "S1a" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyCacheSubnetGroupResult", - "type": "structure", - "members": { - "CacheSubnetGroup": { - "shape": "S1c" - } - } - } - }, - "ModifyReplicationGroup": { - "input": { - "type": "structure", - "required": [ - "ReplicationGroupId" - ], - "members": { - "ReplicationGroupId": {}, - "ReplicationGroupDescription": {}, - "PrimaryClusterId": {}, - "SnapshottingClusterId": {}, - "AutomaticFailoverEnabled": { - "type": "boolean" - }, - "CacheSecurityGroupNames": { - "shape": "Sm" - }, - "SecurityGroupIds": { - "shape": "Sn" - }, - "PreferredMaintenanceWindow": {}, - "NotificationTopicArn": {}, - "CacheParameterGroupName": {}, - "NotificationTopicStatus": {}, - "ApplyImmediately": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "SnapshotRetentionLimit": { - "type": "integer" - }, - "SnapshotWindow": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyReplicationGroupResult", - "type": "structure", - "members": { - "ReplicationGroup": { - "shape": "S1j" - } - } - } - }, - "PurchaseReservedCacheNodesOffering": { - "input": { - "type": "structure", - "required": [ - "ReservedCacheNodesOfferingId" - ], - "members": { - "ReservedCacheNodesOfferingId": {}, - "ReservedCacheNodeId": {}, - "CacheNodeCount": { - "type": "integer" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "PurchaseReservedCacheNodesOfferingResult", - "type": "structure", - "members": { - "ReservedCacheNode": { - "shape": "S35" - } - } - } - }, - "RebootCacheCluster": { - "input": { - "type": "structure", - "required": [ - "CacheClusterId", - "CacheNodeIdsToReboot" - ], - "members": { - "CacheClusterId": {}, - "CacheNodeIdsToReboot": { - "shape": "Sv" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RebootCacheClusterResult", - "type": "structure", - "members": { - "CacheCluster": { - "shape": "Sr" - } - } - } - }, - "RemoveTagsFromResource": { - "input": { - "type": "structure", - "required": [ - "ResourceName", - "TagKeys" - ], - "members": { - "ResourceName": {}, - "TagKeys": { - "type": "list", - "member": {} - } - } - }, - "output": { - "shape": "S5", - "resultWrapper": "RemoveTagsFromResourceResult" - } - }, - "ResetCacheParameterGroup": { - "input": { - "type": "structure", - "required": [ - "CacheParameterGroupName", - "ParameterNameValues" - ], - "members": { - "CacheParameterGroupName": {}, - "ResetAllParameters": { - "type": "boolean" - }, - "ParameterNameValues": { - "shape": "S3k" - } - } - }, - "output": { - "shape": "S3m", - "resultWrapper": "ResetCacheParameterGroupResult" - } - }, - "RevokeCacheSecurityGroupIngress": { - "input": { - "type": "structure", - "required": [ - "CacheSecurityGroupName", - "EC2SecurityGroupName", - "EC2SecurityGroupOwnerId" - ], - "members": { - "CacheSecurityGroupName": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupOwnerId": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RevokeCacheSecurityGroupIngressResult", - "type": "structure", - "members": { - "CacheSecurityGroup": { - "shape": "S8" - } - } - } - } - }, - "shapes": { - "S3": { - "type": "list", - "member": { - "locationName": "Tag", - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - }, - "S5": { - "type": "structure", - "members": { - "TagList": { - "shape": "S3" - } - } - }, - "S8": { - "type": "structure", - "members": { - "OwnerId": {}, - "CacheSecurityGroupName": {}, - "Description": {}, - "EC2SecurityGroups": { - "type": "list", - "member": { - "locationName": "EC2SecurityGroup", - "type": "structure", - "members": { - "Status": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupOwnerId": {} - } - } - } - }, - "wrapper": true - }, - "Sd": { - "type": "structure", - "members": { - "SnapshotName": {}, - "CacheClusterId": {}, - "SnapshotStatus": {}, - "SnapshotSource": {}, - "CacheNodeType": {}, - "Engine": {}, - "EngineVersion": {}, - "NumCacheNodes": { - "type": "integer" - }, - "PreferredAvailabilityZone": {}, - "CacheClusterCreateTime": { - "type": "timestamp" - }, - "PreferredMaintenanceWindow": {}, - "TopicArn": {}, - "Port": { - "type": "integer" - }, - "CacheParameterGroupName": {}, - "CacheSubnetGroupName": {}, - "VpcId": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "SnapshotRetentionLimit": { - "type": "integer" - }, - "SnapshotWindow": {}, - "NodeSnapshots": { - "type": "list", - "member": { - "locationName": "NodeSnapshot", - "type": "structure", - "members": { - "CacheNodeId": {}, - "CacheSize": {}, - "CacheNodeCreateTime": { - "type": "timestamp" - }, - "SnapshotCreateTime": { - "type": "timestamp" - } - }, - "wrapper": true - } - } - }, - "wrapper": true - }, - "Sl": { - "type": "list", - "member": { - "locationName": "PreferredAvailabilityZone" - } - }, - "Sm": { - "type": "list", - "member": { - "locationName": "CacheSecurityGroupName" - } - }, - "Sn": { - "type": "list", - "member": { - "locationName": "SecurityGroupId" - } - }, - "So": { - "type": "list", - "member": { - "locationName": "SnapshotArn" - } - }, - "Sr": { - "type": "structure", - "members": { - "CacheClusterId": {}, - "ConfigurationEndpoint": { - "shape": "Ss" - }, - "ClientDownloadLandingPage": {}, - "CacheNodeType": {}, - "Engine": {}, - "EngineVersion": {}, - "CacheClusterStatus": {}, - "NumCacheNodes": { - "type": "integer" - }, - "PreferredAvailabilityZone": {}, - "CacheClusterCreateTime": { - "type": "timestamp" - }, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "NumCacheNodes": { - "type": "integer" - }, - "CacheNodeIdsToRemove": { - "shape": "Sv" - }, - "EngineVersion": {} - } - }, - "NotificationConfiguration": { - "type": "structure", - "members": { - "TopicArn": {}, - "TopicStatus": {} - } - }, - "CacheSecurityGroups": { - "type": "list", - "member": { - "locationName": "CacheSecurityGroup", - "type": "structure", - "members": { - "CacheSecurityGroupName": {}, - "Status": {} - } - } - }, - "CacheParameterGroup": { - "type": "structure", - "members": { - "CacheParameterGroupName": {}, - "ParameterApplyStatus": {}, - "CacheNodeIdsToReboot": { - "shape": "Sv" - } - } - }, - "CacheSubnetGroupName": {}, - "CacheNodes": { - "type": "list", - "member": { - "locationName": "CacheNode", - "type": "structure", - "members": { - "CacheNodeId": {}, - "CacheNodeStatus": {}, - "CacheNodeCreateTime": { - "type": "timestamp" - }, - "Endpoint": { - "shape": "Ss" - }, - "ParameterGroupStatus": {}, - "SourceCacheNodeId": {}, - "CustomerAvailabilityZone": {} - } - } - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "SecurityGroups": { - "type": "list", - "member": { - "type": "structure", - "members": { - "SecurityGroupId": {}, - "Status": {} - } - } - }, - "ReplicationGroupId": {}, - "SnapshotRetentionLimit": { - "type": "integer" - }, - "SnapshotWindow": {} - }, - "wrapper": true - }, - "Ss": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "Sv": { - "type": "list", - "member": { - "locationName": "CacheNodeId" - } - }, - "S16": { - "type": "structure", - "members": { - "CacheParameterGroupName": {}, - "CacheParameterGroupFamily": {}, - "Description": {} - }, - "wrapper": true - }, - "S1a": { - "type": "list", - "member": { - "locationName": "SubnetIdentifier" - } - }, - "S1c": { - "type": "structure", - "members": { - "CacheSubnetGroupName": {}, - "CacheSubnetGroupDescription": {}, - "VpcId": {}, - "Subnets": { - "type": "list", - "member": { - "locationName": "Subnet", - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "type": "structure", - "members": { - "Name": {} - }, - "wrapper": true - } - } - } - } - }, - "wrapper": true - }, - "S1j": { - "type": "structure", - "members": { - "ReplicationGroupId": {}, - "Description": {}, - "Status": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "PrimaryClusterId": {}, - "AutomaticFailoverStatus": {} - } - }, - "MemberClusters": { - "type": "list", - "member": { - "locationName": "ClusterId" - } - }, - "NodeGroups": { - "type": "list", - "member": { - "locationName": "NodeGroup", - "type": "structure", - "members": { - "NodeGroupId": {}, - "Status": {}, - "PrimaryEndpoint": { - "shape": "Ss" - }, - "NodeGroupMembers": { - "type": "list", - "member": { - "locationName": "NodeGroupMember", - "type": "structure", - "members": { - "CacheClusterId": {}, - "CacheNodeId": {}, - "ReadEndpoint": { - "shape": "Ss" - }, - "PreferredAvailabilityZone": {}, - "CurrentRole": {} - } - } - } - } - } - }, - "SnapshottingClusterId": {}, - "AutomaticFailover": {} - }, - "wrapper": true - }, - "S2f": { - "type": "list", - "member": { - "locationName": "Parameter", - "type": "structure", - "members": { - "ParameterName": {}, - "ParameterValue": {}, - "Description": {}, - "Source": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "MinimumEngineVersion": {} - } - } - }, - "S2h": { - "type": "list", - "member": { - "locationName": "CacheNodeTypeSpecificParameter", - "type": "structure", - "members": { - "ParameterName": {}, - "Description": {}, - "Source": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "MinimumEngineVersion": {}, - "CacheNodeTypeSpecificValues": { - "type": "list", - "member": { - "locationName": "CacheNodeTypeSpecificValue", - "type": "structure", - "members": { - "CacheNodeType": {}, - "Value": {} - } - } - } - } - } - }, - "S35": { - "type": "structure", - "members": { - "ReservedCacheNodeId": {}, - "ReservedCacheNodesOfferingId": {}, - "CacheNodeType": {}, - "StartTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "double" - }, - "UsagePrice": { - "type": "double" - }, - "CacheNodeCount": { - "type": "integer" - }, - "ProductDescription": {}, - "OfferingType": {}, - "State": {}, - "RecurringCharges": { - "shape": "S37" - } - }, - "wrapper": true - }, - "S37": { - "type": "list", - "member": { - "locationName": "RecurringCharge", - "type": "structure", - "members": { - "RecurringChargeAmount": { - "type": "double" - }, - "RecurringChargeFrequency": {} - }, - "wrapper": true - } - }, - "S3k": { - "type": "list", - "member": { - "locationName": "ParameterNameValue", - "type": "structure", - "members": { - "ParameterName": {}, - "ParameterValue": {} - } - } - }, - "S3m": { - "type": "structure", - "members": { - "CacheParameterGroupName": {} - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/elasticache-2015-02-02.paginators.json b/cli/node_modules/aws-sdk/apis/elasticache-2015-02-02.paginators.json deleted file mode 100644 index 8724740d6..000000000 --- a/cli/node_modules/aws-sdk/apis/elasticache-2015-02-02.paginators.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "pagination": { - "DescribeCacheClusters": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "CacheClusters" - }, - "DescribeCacheEngineVersions": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "CacheEngineVersions" - }, - "DescribeCacheParameterGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "CacheParameterGroups" - }, - "DescribeCacheParameters": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "Parameters" - }, - "DescribeCacheSecurityGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "CacheSecurityGroups" - }, - "DescribeCacheSubnetGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "CacheSubnetGroups" - }, - "DescribeEngineDefaultParameters": { - "input_token": "Marker", - "output_token": "EngineDefaults.Marker", - "limit_key": "MaxRecords", - "result_key": "EngineDefaults.Parameters" - }, - "DescribeEvents": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "Events" - }, - "DescribeReservedCacheNodes": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "ReservedCacheNodes" - }, - "DescribeReservedCacheNodesOfferings": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "ReservedCacheNodesOfferings" - }, - "DescribeReplicationGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "ReplicationGroups" - }, - "DescribeSnapshots": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "Snapshots" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/elasticbeanstalk-2010-12-01.min.json b/cli/node_modules/aws-sdk/apis/elasticbeanstalk-2010-12-01.min.json deleted file mode 100644 index e7c00fbc9..000000000 --- a/cli/node_modules/aws-sdk/apis/elasticbeanstalk-2010-12-01.min.json +++ /dev/null @@ -1,912 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2010-12-01", - "endpointPrefix": "elasticbeanstalk", - "serviceAbbreviation": "Elastic Beanstalk", - "serviceFullName": "AWS Elastic Beanstalk", - "signatureVersion": "v4", - "xmlNamespace": "http://elasticbeanstalk.amazonaws.com/docs/2010-12-01/", - "protocol": "query" - }, - "operations": { - "AbortEnvironmentUpdate": { - "input": { - "type": "structure", - "members": { - "EnvironmentId": {}, - "EnvironmentName": {} - } - } - }, - "CheckDNSAvailability": { - "input": { - "type": "structure", - "required": [ - "CNAMEPrefix" - ], - "members": { - "CNAMEPrefix": {} - } - }, - "output": { - "resultWrapper": "CheckDNSAvailabilityResult", - "type": "structure", - "members": { - "Available": { - "type": "boolean" - }, - "FullyQualifiedCNAME": {} - } - } - }, - "CreateApplication": { - "input": { - "type": "structure", - "required": [ - "ApplicationName" - ], - "members": { - "ApplicationName": {}, - "Description": {} - } - }, - "output": { - "shape": "Sc", - "resultWrapper": "CreateApplicationResult" - } - }, - "CreateApplicationVersion": { - "input": { - "type": "structure", - "required": [ - "ApplicationName", - "VersionLabel" - ], - "members": { - "ApplicationName": {}, - "VersionLabel": {}, - "Description": {}, - "SourceBundle": { - "shape": "Sl" - }, - "AutoCreateApplication": { - "type": "boolean" - } - } - }, - "output": { - "shape": "Sp", - "resultWrapper": "CreateApplicationVersionResult" - } - }, - "CreateConfigurationTemplate": { - "input": { - "type": "structure", - "required": [ - "ApplicationName", - "TemplateName" - ], - "members": { - "ApplicationName": {}, - "TemplateName": {}, - "SolutionStackName": {}, - "SourceConfiguration": { - "type": "structure", - "members": { - "ApplicationName": {}, - "TemplateName": {} - } - }, - "EnvironmentId": {}, - "Description": {}, - "OptionSettings": { - "shape": "Su" - } - } - }, - "output": { - "shape": "S10", - "resultWrapper": "CreateConfigurationTemplateResult" - } - }, - "CreateEnvironment": { - "input": { - "type": "structure", - "required": [ - "ApplicationName", - "EnvironmentName" - ], - "members": { - "ApplicationName": {}, - "EnvironmentName": {}, - "Description": {}, - "CNAMEPrefix": {}, - "Tier": { - "shape": "S13" - }, - "Tags": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - }, - "VersionLabel": {}, - "TemplateName": {}, - "SolutionStackName": {}, - "OptionSettings": { - "shape": "Su" - }, - "OptionsToRemove": { - "shape": "S19" - } - } - }, - "output": { - "shape": "S1b", - "resultWrapper": "CreateEnvironmentResult" - } - }, - "CreateStorageLocation": { - "output": { - "resultWrapper": "CreateStorageLocationResult", - "type": "structure", - "members": { - "S3Bucket": {} - } - } - }, - "DeleteApplication": { - "input": { - "type": "structure", - "required": [ - "ApplicationName" - ], - "members": { - "ApplicationName": {}, - "TerminateEnvByForce": { - "type": "boolean" - } - } - } - }, - "DeleteApplicationVersion": { - "input": { - "type": "structure", - "required": [ - "ApplicationName", - "VersionLabel" - ], - "members": { - "ApplicationName": {}, - "VersionLabel": {}, - "DeleteSourceBundle": { - "type": "boolean" - } - } - } - }, - "DeleteConfigurationTemplate": { - "input": { - "type": "structure", - "required": [ - "ApplicationName", - "TemplateName" - ], - "members": { - "ApplicationName": {}, - "TemplateName": {} - } - } - }, - "DeleteEnvironmentConfiguration": { - "input": { - "type": "structure", - "required": [ - "ApplicationName", - "EnvironmentName" - ], - "members": { - "ApplicationName": {}, - "EnvironmentName": {} - } - } - }, - "DescribeApplicationVersions": { - "input": { - "type": "structure", - "members": { - "ApplicationName": {}, - "VersionLabels": { - "shape": "Sg" - } - } - }, - "output": { - "resultWrapper": "DescribeApplicationVersionsResult", - "type": "structure", - "members": { - "ApplicationVersions": { - "type": "list", - "member": { - "shape": "Sq" - } - } - } - } - }, - "DescribeApplications": { - "input": { - "type": "structure", - "members": { - "ApplicationNames": { - "type": "list", - "member": {} - } - } - }, - "output": { - "resultWrapper": "DescribeApplicationsResult", - "type": "structure", - "members": { - "Applications": { - "type": "list", - "member": { - "shape": "Sd" - } - } - } - } - }, - "DescribeConfigurationOptions": { - "input": { - "type": "structure", - "members": { - "ApplicationName": {}, - "TemplateName": {}, - "EnvironmentName": {}, - "SolutionStackName": {}, - "Options": { - "shape": "S19" - } - } - }, - "output": { - "resultWrapper": "DescribeConfigurationOptionsResult", - "type": "structure", - "members": { - "SolutionStackName": {}, - "Options": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Namespace": {}, - "Name": {}, - "DefaultValue": {}, - "ChangeSeverity": {}, - "UserDefined": { - "type": "boolean" - }, - "ValueType": {}, - "ValueOptions": { - "type": "list", - "member": {} - }, - "MinValue": { - "type": "integer" - }, - "MaxValue": { - "type": "integer" - }, - "MaxLength": { - "type": "integer" - }, - "Regex": { - "type": "structure", - "members": { - "Pattern": {}, - "Label": {} - } - } - } - } - } - } - } - }, - "DescribeConfigurationSettings": { - "input": { - "type": "structure", - "required": [ - "ApplicationName" - ], - "members": { - "ApplicationName": {}, - "TemplateName": {}, - "EnvironmentName": {} - } - }, - "output": { - "resultWrapper": "DescribeConfigurationSettingsResult", - "type": "structure", - "members": { - "ConfigurationSettings": { - "type": "list", - "member": { - "shape": "S10" - } - } - } - } - }, - "DescribeEnvironmentResources": { - "input": { - "type": "structure", - "members": { - "EnvironmentId": {}, - "EnvironmentName": {} - } - }, - "output": { - "resultWrapper": "DescribeEnvironmentResourcesResult", - "type": "structure", - "members": { - "EnvironmentResources": { - "type": "structure", - "members": { - "EnvironmentName": {}, - "AutoScalingGroups": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Name": {} - } - } - }, - "Instances": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Id": {} - } - } - }, - "LaunchConfigurations": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Name": {} - } - } - }, - "LoadBalancers": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Name": {} - } - } - }, - "Triggers": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Name": {} - } - } - }, - "Queues": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Name": {}, - "URL": {} - } - } - } - } - } - } - } - }, - "DescribeEnvironments": { - "input": { - "type": "structure", - "members": { - "ApplicationName": {}, - "VersionLabel": {}, - "EnvironmentIds": { - "type": "list", - "member": {} - }, - "EnvironmentNames": { - "type": "list", - "member": {} - }, - "IncludeDeleted": { - "type": "boolean" - }, - "IncludedDeletedBackTo": { - "type": "timestamp" - } - } - }, - "output": { - "resultWrapper": "DescribeEnvironmentsResult", - "type": "structure", - "members": { - "Environments": { - "type": "list", - "member": { - "shape": "S1b" - } - } - } - } - }, - "DescribeEvents": { - "input": { - "type": "structure", - "members": { - "ApplicationName": {}, - "VersionLabel": {}, - "TemplateName": {}, - "EnvironmentId": {}, - "EnvironmentName": {}, - "RequestId": {}, - "Severity": {}, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "MaxRecords": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "resultWrapper": "DescribeEventsResult", - "type": "structure", - "members": { - "Events": { - "type": "list", - "member": { - "type": "structure", - "members": { - "EventDate": { - "type": "timestamp" - }, - "Message": {}, - "ApplicationName": {}, - "VersionLabel": {}, - "TemplateName": {}, - "EnvironmentName": {}, - "RequestId": {}, - "Severity": {} - } - } - }, - "NextToken": {} - } - } - }, - "ListAvailableSolutionStacks": { - "output": { - "resultWrapper": "ListAvailableSolutionStacksResult", - "type": "structure", - "members": { - "SolutionStacks": { - "type": "list", - "member": {} - }, - "SolutionStackDetails": { - "type": "list", - "member": { - "type": "structure", - "members": { - "SolutionStackName": {}, - "PermittedFileTypes": { - "type": "list", - "member": {} - } - } - } - } - } - } - }, - "RebuildEnvironment": { - "input": { - "type": "structure", - "members": { - "EnvironmentId": {}, - "EnvironmentName": {} - } - } - }, - "RequestEnvironmentInfo": { - "input": { - "type": "structure", - "required": [ - "InfoType" - ], - "members": { - "EnvironmentId": {}, - "EnvironmentName": {}, - "InfoType": {} - } - } - }, - "RestartAppServer": { - "input": { - "type": "structure", - "members": { - "EnvironmentId": {}, - "EnvironmentName": {} - } - } - }, - "RetrieveEnvironmentInfo": { - "input": { - "type": "structure", - "required": [ - "InfoType" - ], - "members": { - "EnvironmentId": {}, - "EnvironmentName": {}, - "InfoType": {} - } - }, - "output": { - "resultWrapper": "RetrieveEnvironmentInfoResult", - "type": "structure", - "members": { - "EnvironmentInfo": { - "type": "list", - "member": { - "type": "structure", - "members": { - "InfoType": {}, - "Ec2InstanceId": {}, - "SampleTimestamp": { - "type": "timestamp" - }, - "Message": {} - } - } - } - } - } - }, - "SwapEnvironmentCNAMEs": { - "input": { - "type": "structure", - "members": { - "SourceEnvironmentId": {}, - "SourceEnvironmentName": {}, - "DestinationEnvironmentId": {}, - "DestinationEnvironmentName": {} - } - } - }, - "TerminateEnvironment": { - "input": { - "type": "structure", - "members": { - "EnvironmentId": {}, - "EnvironmentName": {}, - "TerminateResources": { - "type": "boolean" - } - } - }, - "output": { - "shape": "S1b", - "resultWrapper": "TerminateEnvironmentResult" - } - }, - "UpdateApplication": { - "input": { - "type": "structure", - "required": [ - "ApplicationName" - ], - "members": { - "ApplicationName": {}, - "Description": {} - } - }, - "output": { - "shape": "Sc", - "resultWrapper": "UpdateApplicationResult" - } - }, - "UpdateApplicationVersion": { - "input": { - "type": "structure", - "required": [ - "ApplicationName", - "VersionLabel" - ], - "members": { - "ApplicationName": {}, - "VersionLabel": {}, - "Description": {} - } - }, - "output": { - "shape": "Sp", - "resultWrapper": "UpdateApplicationVersionResult" - } - }, - "UpdateConfigurationTemplate": { - "input": { - "type": "structure", - "required": [ - "ApplicationName", - "TemplateName" - ], - "members": { - "ApplicationName": {}, - "TemplateName": {}, - "Description": {}, - "OptionSettings": { - "shape": "Su" - }, - "OptionsToRemove": { - "shape": "S19" - } - } - }, - "output": { - "shape": "S10", - "resultWrapper": "UpdateConfigurationTemplateResult" - } - }, - "UpdateEnvironment": { - "input": { - "type": "structure", - "members": { - "EnvironmentId": {}, - "EnvironmentName": {}, - "Description": {}, - "Tier": { - "shape": "S13" - }, - "VersionLabel": {}, - "TemplateName": {}, - "SolutionStackName": {}, - "OptionSettings": { - "shape": "Su" - }, - "OptionsToRemove": { - "shape": "S19" - } - } - }, - "output": { - "shape": "S1b", - "resultWrapper": "UpdateEnvironmentResult" - } - }, - "ValidateConfigurationSettings": { - "input": { - "type": "structure", - "required": [ - "ApplicationName", - "OptionSettings" - ], - "members": { - "ApplicationName": {}, - "TemplateName": {}, - "EnvironmentName": {}, - "OptionSettings": { - "shape": "Su" - } - } - }, - "output": { - "resultWrapper": "ValidateConfigurationSettingsResult", - "type": "structure", - "members": { - "Messages": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Message": {}, - "Severity": {}, - "Namespace": {}, - "OptionName": {} - } - } - } - } - } - } - }, - "shapes": { - "Sc": { - "type": "structure", - "members": { - "Application": { - "shape": "Sd" - } - } - }, - "Sd": { - "type": "structure", - "members": { - "ApplicationName": {}, - "Description": {}, - "DateCreated": { - "type": "timestamp" - }, - "DateUpdated": { - "type": "timestamp" - }, - "Versions": { - "shape": "Sg" - }, - "ConfigurationTemplates": { - "type": "list", - "member": {} - } - } - }, - "Sg": { - "type": "list", - "member": {} - }, - "Sl": { - "type": "structure", - "members": { - "S3Bucket": {}, - "S3Key": {} - } - }, - "Sp": { - "type": "structure", - "members": { - "ApplicationVersion": { - "shape": "Sq" - } - } - }, - "Sq": { - "type": "structure", - "members": { - "ApplicationName": {}, - "Description": {}, - "VersionLabel": {}, - "SourceBundle": { - "shape": "Sl" - }, - "DateCreated": { - "type": "timestamp" - }, - "DateUpdated": { - "type": "timestamp" - } - } - }, - "Su": { - "type": "list", - "member": { - "type": "structure", - "members": { - "ResourceName": {}, - "Namespace": {}, - "OptionName": {}, - "Value": {} - } - } - }, - "S10": { - "type": "structure", - "members": { - "SolutionStackName": {}, - "ApplicationName": {}, - "TemplateName": {}, - "Description": {}, - "EnvironmentName": {}, - "DeploymentStatus": {}, - "DateCreated": { - "type": "timestamp" - }, - "DateUpdated": { - "type": "timestamp" - }, - "OptionSettings": { - "shape": "Su" - } - } - }, - "S13": { - "type": "structure", - "members": { - "Name": {}, - "Type": {}, - "Version": {} - } - }, - "S19": { - "type": "list", - "member": { - "type": "structure", - "members": { - "ResourceName": {}, - "Namespace": {}, - "OptionName": {} - } - } - }, - "S1b": { - "type": "structure", - "members": { - "EnvironmentName": {}, - "EnvironmentId": {}, - "ApplicationName": {}, - "VersionLabel": {}, - "SolutionStackName": {}, - "TemplateName": {}, - "Description": {}, - "EndpointURL": {}, - "CNAME": {}, - "DateCreated": { - "type": "timestamp" - }, - "DateUpdated": { - "type": "timestamp" - }, - "Status": {}, - "AbortableOperationInProgress": { - "type": "boolean" - }, - "Health": {}, - "Resources": { - "type": "structure", - "members": { - "LoadBalancer": { - "type": "structure", - "members": { - "LoadBalancerName": {}, - "Domain": {}, - "Listeners": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Protocol": {}, - "Port": { - "type": "integer" - } - } - } - } - } - } - } - }, - "Tier": { - "shape": "S13" - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/elasticbeanstalk-2010-12-01.paginators.json b/cli/node_modules/aws-sdk/apis/elasticbeanstalk-2010-12-01.paginators.json deleted file mode 100644 index 383ce8d6f..000000000 --- a/cli/node_modules/aws-sdk/apis/elasticbeanstalk-2010-12-01.paginators.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "pagination": { - "DescribeApplicationVersions": { - "result_key": "ApplicationVersions" - }, - "DescribeApplications": { - "result_key": "Applications" - }, - "DescribeConfigurationOptions": { - "result_key": "Options" - }, - "DescribeEnvironments": { - "result_key": "Environments" - }, - "DescribeEvents": { - "input_token": "NextToken", - "output_token": "NextToken", - "limit_key": "MaxRecords", - "result_key": "Events" - }, - "ListAvailableSolutionStacks": { - "result_key": "SolutionStacks" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/elasticloadbalancing-2012-06-01.min.json b/cli/node_modules/aws-sdk/apis/elasticloadbalancing-2012-06-01.min.json deleted file mode 100644 index f56b6bbcc..000000000 --- a/cli/node_modules/aws-sdk/apis/elasticloadbalancing-2012-06-01.min.json +++ /dev/null @@ -1,973 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2012-06-01", - "endpointPrefix": "elasticloadbalancing", - "serviceFullName": "Elastic Load Balancing", - "signatureVersion": "v4", - "xmlNamespace": "http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/", - "protocol": "query" - }, - "operations": { - "AddTags": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerNames", - "Tags" - ], - "members": { - "LoadBalancerNames": { - "shape": "S2" - }, - "Tags": { - "shape": "S4" - } - } - }, - "output": { - "resultWrapper": "AddTagsResult", - "type": "structure", - "members": {} - } - }, - "ApplySecurityGroupsToLoadBalancer": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName", - "SecurityGroups" - ], - "members": { - "LoadBalancerName": {}, - "SecurityGroups": { - "shape": "Sa" - } - } - }, - "output": { - "resultWrapper": "ApplySecurityGroupsToLoadBalancerResult", - "type": "structure", - "members": { - "SecurityGroups": { - "shape": "Sa" - } - } - } - }, - "AttachLoadBalancerToSubnets": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName", - "Subnets" - ], - "members": { - "LoadBalancerName": {}, - "Subnets": { - "shape": "Se" - } - } - }, - "output": { - "resultWrapper": "AttachLoadBalancerToSubnetsResult", - "type": "structure", - "members": { - "Subnets": { - "shape": "Se" - } - } - } - }, - "ConfigureHealthCheck": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName", - "HealthCheck" - ], - "members": { - "LoadBalancerName": {}, - "HealthCheck": { - "shape": "Si" - } - } - }, - "output": { - "resultWrapper": "ConfigureHealthCheckResult", - "type": "structure", - "members": { - "HealthCheck": { - "shape": "Si" - } - } - } - }, - "CreateAppCookieStickinessPolicy": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName", - "PolicyName", - "CookieName" - ], - "members": { - "LoadBalancerName": {}, - "PolicyName": {}, - "CookieName": {} - } - }, - "output": { - "resultWrapper": "CreateAppCookieStickinessPolicyResult", - "type": "structure", - "members": {} - } - }, - "CreateLBCookieStickinessPolicy": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName", - "PolicyName" - ], - "members": { - "LoadBalancerName": {}, - "PolicyName": {}, - "CookieExpirationPeriod": { - "type": "long" - } - } - }, - "output": { - "resultWrapper": "CreateLBCookieStickinessPolicyResult", - "type": "structure", - "members": {} - } - }, - "CreateLoadBalancer": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName", - "Listeners" - ], - "members": { - "LoadBalancerName": {}, - "Listeners": { - "shape": "Sx" - }, - "AvailabilityZones": { - "shape": "S13" - }, - "Subnets": { - "shape": "Se" - }, - "SecurityGroups": { - "shape": "Sa" - }, - "Scheme": {}, - "Tags": { - "shape": "S4" - } - } - }, - "output": { - "resultWrapper": "CreateLoadBalancerResult", - "type": "structure", - "members": { - "DNSName": {} - } - } - }, - "CreateLoadBalancerListeners": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName", - "Listeners" - ], - "members": { - "LoadBalancerName": {}, - "Listeners": { - "shape": "Sx" - } - } - }, - "output": { - "resultWrapper": "CreateLoadBalancerListenersResult", - "type": "structure", - "members": {} - } - }, - "CreateLoadBalancerPolicy": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName", - "PolicyName", - "PolicyTypeName" - ], - "members": { - "LoadBalancerName": {}, - "PolicyName": {}, - "PolicyTypeName": {}, - "PolicyAttributes": { - "type": "list", - "member": { - "type": "structure", - "members": { - "AttributeName": {}, - "AttributeValue": {} - } - } - } - } - }, - "output": { - "resultWrapper": "CreateLoadBalancerPolicyResult", - "type": "structure", - "members": {} - } - }, - "DeleteLoadBalancer": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName" - ], - "members": { - "LoadBalancerName": {} - } - }, - "output": { - "resultWrapper": "DeleteLoadBalancerResult", - "type": "structure", - "members": {} - } - }, - "DeleteLoadBalancerListeners": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName", - "LoadBalancerPorts" - ], - "members": { - "LoadBalancerName": {}, - "LoadBalancerPorts": { - "type": "list", - "member": { - "type": "integer" - } - } - } - }, - "output": { - "resultWrapper": "DeleteLoadBalancerListenersResult", - "type": "structure", - "members": {} - } - }, - "DeleteLoadBalancerPolicy": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName", - "PolicyName" - ], - "members": { - "LoadBalancerName": {}, - "PolicyName": {} - } - }, - "output": { - "resultWrapper": "DeleteLoadBalancerPolicyResult", - "type": "structure", - "members": {} - } - }, - "DeregisterInstancesFromLoadBalancer": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName", - "Instances" - ], - "members": { - "LoadBalancerName": {}, - "Instances": { - "shape": "S1p" - } - } - }, - "output": { - "resultWrapper": "DeregisterInstancesFromLoadBalancerResult", - "type": "structure", - "members": { - "Instances": { - "shape": "S1p" - } - } - } - }, - "DescribeInstanceHealth": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName" - ], - "members": { - "LoadBalancerName": {}, - "Instances": { - "shape": "S1p" - } - } - }, - "output": { - "resultWrapper": "DescribeInstanceHealthResult", - "type": "structure", - "members": { - "InstanceStates": { - "type": "list", - "member": { - "type": "structure", - "members": { - "InstanceId": {}, - "State": {}, - "ReasonCode": {}, - "Description": {} - } - } - } - } - } - }, - "DescribeLoadBalancerAttributes": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName" - ], - "members": { - "LoadBalancerName": {} - } - }, - "output": { - "resultWrapper": "DescribeLoadBalancerAttributesResult", - "type": "structure", - "members": { - "LoadBalancerAttributes": { - "shape": "S22" - } - } - } - }, - "DescribeLoadBalancerPolicies": { - "input": { - "type": "structure", - "members": { - "LoadBalancerName": {}, - "PolicyNames": { - "shape": "S2j" - } - } - }, - "output": { - "resultWrapper": "DescribeLoadBalancerPoliciesResult", - "type": "structure", - "members": { - "PolicyDescriptions": { - "type": "list", - "member": { - "type": "structure", - "members": { - "PolicyName": {}, - "PolicyTypeName": {}, - "PolicyAttributeDescriptions": { - "type": "list", - "member": { - "type": "structure", - "members": { - "AttributeName": {}, - "AttributeValue": {} - } - } - } - } - } - } - } - } - }, - "DescribeLoadBalancerPolicyTypes": { - "input": { - "type": "structure", - "members": { - "PolicyTypeNames": { - "type": "list", - "member": {} - } - } - }, - "output": { - "resultWrapper": "DescribeLoadBalancerPolicyTypesResult", - "type": "structure", - "members": { - "PolicyTypeDescriptions": { - "type": "list", - "member": { - "type": "structure", - "members": { - "PolicyTypeName": {}, - "Description": {}, - "PolicyAttributeTypeDescriptions": { - "type": "list", - "member": { - "type": "structure", - "members": { - "AttributeName": {}, - "AttributeType": {}, - "Description": {}, - "DefaultValue": {}, - "Cardinality": {} - } - } - } - } - } - } - } - } - }, - "DescribeLoadBalancers": { - "input": { - "type": "structure", - "members": { - "LoadBalancerNames": { - "shape": "S2" - }, - "Marker": {}, - "PageSize": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "DescribeLoadBalancersResult", - "type": "structure", - "members": { - "LoadBalancerDescriptions": { - "type": "list", - "member": { - "type": "structure", - "members": { - "LoadBalancerName": {}, - "DNSName": {}, - "CanonicalHostedZoneName": {}, - "CanonicalHostedZoneNameID": {}, - "ListenerDescriptions": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Listener": { - "shape": "Sy" - }, - "PolicyNames": { - "shape": "S2j" - } - } - } - }, - "Policies": { - "type": "structure", - "members": { - "AppCookieStickinessPolicies": { - "type": "list", - "member": { - "type": "structure", - "members": { - "PolicyName": {}, - "CookieName": {} - } - } - }, - "LBCookieStickinessPolicies": { - "type": "list", - "member": { - "type": "structure", - "members": { - "PolicyName": {}, - "CookieExpirationPeriod": { - "type": "long" - } - } - } - }, - "OtherPolicies": { - "shape": "S2j" - } - } - }, - "BackendServerDescriptions": { - "type": "list", - "member": { - "type": "structure", - "members": { - "InstancePort": { - "type": "integer" - }, - "PolicyNames": { - "shape": "S2j" - } - } - } - }, - "AvailabilityZones": { - "shape": "S13" - }, - "Subnets": { - "shape": "Se" - }, - "VPCId": {}, - "Instances": { - "shape": "S1p" - }, - "HealthCheck": { - "shape": "Si" - }, - "SourceSecurityGroup": { - "type": "structure", - "members": { - "OwnerAlias": {}, - "GroupName": {} - } - }, - "SecurityGroups": { - "shape": "Sa" - }, - "CreatedTime": { - "type": "timestamp" - }, - "Scheme": {} - } - } - }, - "NextMarker": {} - } - } - }, - "DescribeTags": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerNames" - ], - "members": { - "LoadBalancerNames": { - "type": "list", - "member": {} - } - } - }, - "output": { - "resultWrapper": "DescribeTagsResult", - "type": "structure", - "members": { - "TagDescriptions": { - "type": "list", - "member": { - "type": "structure", - "members": { - "LoadBalancerName": {}, - "Tags": { - "shape": "S4" - } - } - } - } - } - } - }, - "DetachLoadBalancerFromSubnets": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName", - "Subnets" - ], - "members": { - "LoadBalancerName": {}, - "Subnets": { - "shape": "Se" - } - } - }, - "output": { - "resultWrapper": "DetachLoadBalancerFromSubnetsResult", - "type": "structure", - "members": { - "Subnets": { - "shape": "Se" - } - } - } - }, - "DisableAvailabilityZonesForLoadBalancer": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName", - "AvailabilityZones" - ], - "members": { - "LoadBalancerName": {}, - "AvailabilityZones": { - "shape": "S13" - } - } - }, - "output": { - "resultWrapper": "DisableAvailabilityZonesForLoadBalancerResult", - "type": "structure", - "members": { - "AvailabilityZones": { - "shape": "S13" - } - } - } - }, - "EnableAvailabilityZonesForLoadBalancer": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName", - "AvailabilityZones" - ], - "members": { - "LoadBalancerName": {}, - "AvailabilityZones": { - "shape": "S13" - } - } - }, - "output": { - "resultWrapper": "EnableAvailabilityZonesForLoadBalancerResult", - "type": "structure", - "members": { - "AvailabilityZones": { - "shape": "S13" - } - } - } - }, - "ModifyLoadBalancerAttributes": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName", - "LoadBalancerAttributes" - ], - "members": { - "LoadBalancerName": {}, - "LoadBalancerAttributes": { - "shape": "S22" - } - } - }, - "output": { - "resultWrapper": "ModifyLoadBalancerAttributesResult", - "type": "structure", - "members": { - "LoadBalancerName": {}, - "LoadBalancerAttributes": { - "shape": "S22" - } - } - } - }, - "RegisterInstancesWithLoadBalancer": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName", - "Instances" - ], - "members": { - "LoadBalancerName": {}, - "Instances": { - "shape": "S1p" - } - } - }, - "output": { - "resultWrapper": "RegisterInstancesWithLoadBalancerResult", - "type": "structure", - "members": { - "Instances": { - "shape": "S1p" - } - } - } - }, - "RemoveTags": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerNames", - "Tags" - ], - "members": { - "LoadBalancerNames": { - "shape": "S2" - }, - "Tags": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Key": {} - } - } - } - } - }, - "output": { - "resultWrapper": "RemoveTagsResult", - "type": "structure", - "members": {} - } - }, - "SetLoadBalancerListenerSSLCertificate": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName", - "LoadBalancerPort", - "SSLCertificateId" - ], - "members": { - "LoadBalancerName": {}, - "LoadBalancerPort": { - "type": "integer" - }, - "SSLCertificateId": {} - } - }, - "output": { - "resultWrapper": "SetLoadBalancerListenerSSLCertificateResult", - "type": "structure", - "members": {} - } - }, - "SetLoadBalancerPoliciesForBackendServer": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName", - "InstancePort", - "PolicyNames" - ], - "members": { - "LoadBalancerName": {}, - "InstancePort": { - "type": "integer" - }, - "PolicyNames": { - "shape": "S2j" - } - } - }, - "output": { - "resultWrapper": "SetLoadBalancerPoliciesForBackendServerResult", - "type": "structure", - "members": {} - } - }, - "SetLoadBalancerPoliciesOfListener": { - "input": { - "type": "structure", - "required": [ - "LoadBalancerName", - "LoadBalancerPort", - "PolicyNames" - ], - "members": { - "LoadBalancerName": {}, - "LoadBalancerPort": { - "type": "integer" - }, - "PolicyNames": { - "shape": "S2j" - } - } - }, - "output": { - "resultWrapper": "SetLoadBalancerPoliciesOfListenerResult", - "type": "structure", - "members": {} - } - } - }, - "shapes": { - "S2": { - "type": "list", - "member": {} - }, - "S4": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "Key" - ], - "members": { - "Key": {}, - "Value": {} - } - } - }, - "Sa": { - "type": "list", - "member": {} - }, - "Se": { - "type": "list", - "member": {} - }, - "Si": { - "type": "structure", - "required": [ - "Target", - "Interval", - "Timeout", - "UnhealthyThreshold", - "HealthyThreshold" - ], - "members": { - "Target": {}, - "Interval": { - "type": "integer" - }, - "Timeout": { - "type": "integer" - }, - "UnhealthyThreshold": { - "type": "integer" - }, - "HealthyThreshold": { - "type": "integer" - } - } - }, - "Sx": { - "type": "list", - "member": { - "shape": "Sy" - } - }, - "Sy": { - "type": "structure", - "required": [ - "Protocol", - "LoadBalancerPort", - "InstancePort" - ], - "members": { - "Protocol": {}, - "LoadBalancerPort": { - "type": "integer" - }, - "InstanceProtocol": {}, - "InstancePort": { - "type": "integer" - }, - "SSLCertificateId": {} - } - }, - "S13": { - "type": "list", - "member": {} - }, - "S1p": { - "type": "list", - "member": { - "type": "structure", - "members": { - "InstanceId": {} - } - } - }, - "S22": { - "type": "structure", - "members": { - "CrossZoneLoadBalancing": { - "type": "structure", - "required": [ - "Enabled" - ], - "members": { - "Enabled": { - "type": "boolean" - } - } - }, - "AccessLog": { - "type": "structure", - "required": [ - "Enabled" - ], - "members": { - "Enabled": { - "type": "boolean" - }, - "S3BucketName": {}, - "EmitInterval": { - "type": "integer" - }, - "S3BucketPrefix": {} - } - }, - "ConnectionDraining": { - "type": "structure", - "required": [ - "Enabled" - ], - "members": { - "Enabled": { - "type": "boolean" - }, - "Timeout": { - "type": "integer" - } - } - }, - "ConnectionSettings": { - "type": "structure", - "required": [ - "IdleTimeout" - ], - "members": { - "IdleTimeout": { - "type": "integer" - } - } - }, - "AdditionalAttributes": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - } - } - }, - "S2j": { - "type": "list", - "member": {} - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/elasticloadbalancing-2012-06-01.paginators.json b/cli/node_modules/aws-sdk/apis/elasticloadbalancing-2012-06-01.paginators.json deleted file mode 100644 index 82113a706..000000000 --- a/cli/node_modules/aws-sdk/apis/elasticloadbalancing-2012-06-01.paginators.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "pagination": { - "DescribeInstanceHealth": { - "result_key": "InstanceStates" - }, - "DescribeLoadBalancerPolicies": { - "result_key": "PolicyDescriptions" - }, - "DescribeLoadBalancerPolicyTypes": { - "result_key": "PolicyTypeDescriptions" - }, - "DescribeLoadBalancers": { - "input_token": "Marker", - "output_token": "NextMarker", - "result_key": "LoadBalancerDescriptions" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/elasticmapreduce-2009-03-31.min.json b/cli/node_modules/aws-sdk/apis/elasticmapreduce-2009-03-31.min.json deleted file mode 100644 index 6f184b8c5..000000000 --- a/cli/node_modules/aws-sdk/apis/elasticmapreduce-2009-03-31.min.json +++ /dev/null @@ -1,1039 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2009-03-31", - "endpointPrefix": "elasticmapreduce", - "jsonVersion": "1.1", - "serviceAbbreviation": "Amazon EMR", - "serviceFullName": "Amazon Elastic MapReduce", - "signatureVersion": "v4", - "targetPrefix": "ElasticMapReduce", - "timestampFormat": "unixTimestamp", - "protocol": "json" - }, - "operations": { - "AddInstanceGroups": { - "input": { - "type": "structure", - "required": [ - "InstanceGroups", - "JobFlowId" - ], - "members": { - "InstanceGroups": { - "shape": "S2" - }, - "JobFlowId": {} - } - }, - "output": { - "type": "structure", - "members": { - "JobFlowId": {}, - "InstanceGroupIds": { - "type": "list", - "member": {} - } - } - } - }, - "AddJobFlowSteps": { - "input": { - "type": "structure", - "required": [ - "JobFlowId", - "Steps" - ], - "members": { - "JobFlowId": {}, - "Steps": { - "shape": "Sg" - } - } - }, - "output": { - "type": "structure", - "members": { - "StepIds": { - "type": "list", - "member": {} - } - } - } - }, - "AddTags": { - "input": { - "type": "structure", - "required": [ - "ResourceId", - "Tags" - ], - "members": { - "ResourceId": {}, - "Tags": { - "shape": "Ss" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "DescribeCluster": { - "input": { - "type": "structure", - "required": [ - "ClusterId" - ], - "members": { - "ClusterId": {} - } - }, - "output": { - "type": "structure", - "members": { - "Cluster": { - "type": "structure", - "members": { - "Id": {}, - "Name": {}, - "Status": { - "shape": "Sz" - }, - "Ec2InstanceAttributes": { - "type": "structure", - "members": { - "Ec2KeyName": {}, - "Ec2SubnetId": {}, - "Ec2AvailabilityZone": {}, - "IamInstanceProfile": {}, - "EmrManagedMasterSecurityGroup": {}, - "EmrManagedSlaveSecurityGroup": {}, - "AdditionalMasterSecurityGroups": { - "shape": "S16" - }, - "AdditionalSlaveSecurityGroups": { - "shape": "S16" - } - } - }, - "LogUri": {}, - "RequestedAmiVersion": {}, - "RunningAmiVersion": {}, - "ReleaseLabel": {}, - "AutoTerminate": { - "type": "boolean" - }, - "TerminationProtected": { - "type": "boolean" - }, - "VisibleToAllUsers": { - "type": "boolean" - }, - "Applications": { - "shape": "S18" - }, - "Tags": { - "shape": "Ss" - }, - "ServiceRole": {}, - "NormalizedInstanceHours": { - "type": "integer" - }, - "MasterPublicDnsName": {}, - "Configurations": { - "shape": "S9" - } - } - } - } - } - }, - "DescribeJobFlows": { - "input": { - "type": "structure", - "members": { - "CreatedAfter": { - "type": "timestamp" - }, - "CreatedBefore": { - "type": "timestamp" - }, - "JobFlowIds": { - "shape": "Sn" - }, - "JobFlowStates": { - "type": "list", - "member": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "JobFlows": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "JobFlowId", - "Name", - "ExecutionStatusDetail", - "Instances" - ], - "members": { - "JobFlowId": {}, - "Name": {}, - "LogUri": {}, - "AmiVersion": {}, - "ExecutionStatusDetail": { - "type": "structure", - "required": [ - "State", - "CreationDateTime" - ], - "members": { - "State": {}, - "CreationDateTime": { - "type": "timestamp" - }, - "StartDateTime": { - "type": "timestamp" - }, - "ReadyDateTime": { - "type": "timestamp" - }, - "EndDateTime": { - "type": "timestamp" - }, - "LastStateChangeReason": {} - } - }, - "Instances": { - "type": "structure", - "required": [ - "MasterInstanceType", - "SlaveInstanceType", - "InstanceCount" - ], - "members": { - "MasterInstanceType": {}, - "MasterPublicDnsName": {}, - "MasterInstanceId": {}, - "SlaveInstanceType": {}, - "InstanceCount": { - "type": "integer" - }, - "InstanceGroups": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "Market", - "InstanceRole", - "InstanceType", - "InstanceRequestCount", - "InstanceRunningCount", - "State", - "CreationDateTime" - ], - "members": { - "InstanceGroupId": {}, - "Name": {}, - "Market": {}, - "InstanceRole": {}, - "BidPrice": {}, - "InstanceType": {}, - "InstanceRequestCount": { - "type": "integer" - }, - "InstanceRunningCount": { - "type": "integer" - }, - "State": {}, - "LastStateChangeReason": {}, - "CreationDateTime": { - "type": "timestamp" - }, - "StartDateTime": { - "type": "timestamp" - }, - "ReadyDateTime": { - "type": "timestamp" - }, - "EndDateTime": { - "type": "timestamp" - } - } - } - }, - "NormalizedInstanceHours": { - "type": "integer" - }, - "Ec2KeyName": {}, - "Ec2SubnetId": {}, - "Placement": { - "shape": "S1l" - }, - "KeepJobFlowAliveWhenNoSteps": { - "type": "boolean" - }, - "TerminationProtected": { - "type": "boolean" - }, - "HadoopVersion": {} - } - }, - "Steps": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "StepConfig", - "ExecutionStatusDetail" - ], - "members": { - "StepConfig": { - "shape": "Sh" - }, - "ExecutionStatusDetail": { - "type": "structure", - "required": [ - "State", - "CreationDateTime" - ], - "members": { - "State": {}, - "CreationDateTime": { - "type": "timestamp" - }, - "StartDateTime": { - "type": "timestamp" - }, - "EndDateTime": { - "type": "timestamp" - }, - "LastStateChangeReason": {} - } - } - } - } - }, - "BootstrapActions": { - "type": "list", - "member": { - "type": "structure", - "members": { - "BootstrapActionConfig": { - "shape": "S1s" - } - } - } - }, - "SupportedProducts": { - "shape": "S1u" - }, - "VisibleToAllUsers": { - "type": "boolean" - }, - "JobFlowRole": {}, - "ServiceRole": {} - } - } - } - } - }, - "deprecated": true - }, - "DescribeStep": { - "input": { - "type": "structure", - "required": [ - "ClusterId", - "StepId" - ], - "members": { - "ClusterId": {}, - "StepId": {} - } - }, - "output": { - "type": "structure", - "members": { - "Step": { - "type": "structure", - "members": { - "Id": {}, - "Name": {}, - "Config": { - "shape": "S1z" - }, - "ActionOnFailure": {}, - "Status": { - "shape": "S20" - } - } - } - } - } - }, - "ListBootstrapActions": { - "input": { - "type": "structure", - "required": [ - "ClusterId" - ], - "members": { - "ClusterId": {}, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "BootstrapActions": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Name": {}, - "ScriptPath": {}, - "Args": { - "shape": "S16" - } - } - } - }, - "Marker": {} - } - } - }, - "ListClusters": { - "input": { - "type": "structure", - "members": { - "CreatedAfter": { - "type": "timestamp" - }, - "CreatedBefore": { - "type": "timestamp" - }, - "ClusterStates": { - "type": "list", - "member": {} - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Clusters": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Id": {}, - "Name": {}, - "Status": { - "shape": "Sz" - }, - "NormalizedInstanceHours": { - "type": "integer" - } - } - } - }, - "Marker": {} - } - } - }, - "ListInstanceGroups": { - "input": { - "type": "structure", - "required": [ - "ClusterId" - ], - "members": { - "ClusterId": {}, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "InstanceGroups": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Id": {}, - "Name": {}, - "Market": {}, - "InstanceGroupType": {}, - "BidPrice": {}, - "InstanceType": {}, - "RequestedInstanceCount": { - "type": "integer" - }, - "RunningInstanceCount": { - "type": "integer" - }, - "Status": { - "type": "structure", - "members": { - "State": {}, - "StateChangeReason": { - "type": "structure", - "members": { - "Code": {}, - "Message": {} - } - }, - "Timeline": { - "type": "structure", - "members": { - "CreationDateTime": { - "type": "timestamp" - }, - "ReadyDateTime": { - "type": "timestamp" - }, - "EndDateTime": { - "type": "timestamp" - } - } - } - } - }, - "Configurations": { - "shape": "S9" - } - } - } - }, - "Marker": {} - } - } - }, - "ListInstances": { - "input": { - "type": "structure", - "required": [ - "ClusterId" - ], - "members": { - "ClusterId": {}, - "InstanceGroupId": {}, - "InstanceGroupTypes": { - "type": "list", - "member": {} - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Instances": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Id": {}, - "Ec2InstanceId": {}, - "PublicDnsName": {}, - "PublicIpAddress": {}, - "PrivateDnsName": {}, - "PrivateIpAddress": {}, - "Status": { - "type": "structure", - "members": { - "State": {}, - "StateChangeReason": { - "type": "structure", - "members": { - "Code": {}, - "Message": {} - } - }, - "Timeline": { - "type": "structure", - "members": { - "CreationDateTime": { - "type": "timestamp" - }, - "ReadyDateTime": { - "type": "timestamp" - }, - "EndDateTime": { - "type": "timestamp" - } - } - } - } - } - } - } - }, - "Marker": {} - } - } - }, - "ListSteps": { - "input": { - "type": "structure", - "required": [ - "ClusterId" - ], - "members": { - "ClusterId": {}, - "StepStates": { - "type": "list", - "member": {} - }, - "StepIds": { - "shape": "Sn" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Steps": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Id": {}, - "Name": {}, - "Config": { - "shape": "S1z" - }, - "ActionOnFailure": {}, - "Status": { - "shape": "S20" - } - } - } - }, - "Marker": {} - } - } - }, - "ModifyInstanceGroups": { - "input": { - "type": "structure", - "members": { - "InstanceGroups": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "InstanceGroupId" - ], - "members": { - "InstanceGroupId": {}, - "InstanceCount": { - "type": "integer" - }, - "EC2InstanceIdsToTerminate": { - "type": "list", - "member": {} - } - } - } - } - } - } - }, - "RemoveTags": { - "input": { - "type": "structure", - "required": [ - "ResourceId", - "TagKeys" - ], - "members": { - "ResourceId": {}, - "TagKeys": { - "shape": "S16" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "RunJobFlow": { - "input": { - "type": "structure", - "required": [ - "Name", - "Instances" - ], - "members": { - "Name": {}, - "LogUri": {}, - "AdditionalInfo": {}, - "AmiVersion": {}, - "ReleaseLabel": {}, - "Instances": { - "type": "structure", - "members": { - "MasterInstanceType": {}, - "SlaveInstanceType": {}, - "InstanceCount": { - "type": "integer" - }, - "InstanceGroups": { - "shape": "S2" - }, - "Ec2KeyName": {}, - "Placement": { - "shape": "S1l" - }, - "KeepJobFlowAliveWhenNoSteps": { - "type": "boolean" - }, - "TerminationProtected": { - "type": "boolean" - }, - "HadoopVersion": {}, - "Ec2SubnetId": {}, - "EmrManagedMasterSecurityGroup": {}, - "EmrManagedSlaveSecurityGroup": {}, - "AdditionalMasterSecurityGroups": { - "shape": "S3d" - }, - "AdditionalSlaveSecurityGroups": { - "shape": "S3d" - } - } - }, - "Steps": { - "shape": "Sg" - }, - "BootstrapActions": { - "type": "list", - "member": { - "shape": "S1s" - } - }, - "SupportedProducts": { - "shape": "S1u" - }, - "NewSupportedProducts": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Name": {}, - "Args": { - "shape": "Sn" - } - } - } - }, - "Applications": { - "shape": "S18" - }, - "Configurations": { - "shape": "S9" - }, - "VisibleToAllUsers": { - "type": "boolean" - }, - "JobFlowRole": {}, - "ServiceRole": {}, - "Tags": { - "shape": "Ss" - } - } - }, - "output": { - "type": "structure", - "members": { - "JobFlowId": {} - } - } - }, - "SetTerminationProtection": { - "input": { - "type": "structure", - "required": [ - "JobFlowIds", - "TerminationProtected" - ], - "members": { - "JobFlowIds": { - "shape": "Sn" - }, - "TerminationProtected": { - "type": "boolean" - } - } - } - }, - "SetVisibleToAllUsers": { - "input": { - "type": "structure", - "required": [ - "JobFlowIds", - "VisibleToAllUsers" - ], - "members": { - "JobFlowIds": { - "shape": "Sn" - }, - "VisibleToAllUsers": { - "type": "boolean" - } - } - } - }, - "TerminateJobFlows": { - "input": { - "type": "structure", - "required": [ - "JobFlowIds" - ], - "members": { - "JobFlowIds": { - "shape": "Sn" - } - } - } - } - }, - "shapes": { - "S2": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "InstanceRole", - "InstanceType", - "InstanceCount" - ], - "members": { - "Name": {}, - "Market": {}, - "InstanceRole": {}, - "BidPrice": {}, - "InstanceType": {}, - "InstanceCount": { - "type": "integer" - }, - "Configurations": { - "shape": "S9" - } - } - } - }, - "S9": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Classification": {}, - "Configurations": { - "shape": "S9" - }, - "Properties": { - "shape": "Sc" - } - } - } - }, - "Sc": { - "type": "map", - "key": {}, - "value": {} - }, - "Sg": { - "type": "list", - "member": { - "shape": "Sh" - } - }, - "Sh": { - "type": "structure", - "required": [ - "Name", - "HadoopJarStep" - ], - "members": { - "Name": {}, - "ActionOnFailure": {}, - "HadoopJarStep": { - "type": "structure", - "required": [ - "Jar" - ], - "members": { - "Properties": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - }, - "Jar": {}, - "MainClass": {}, - "Args": { - "shape": "Sn" - } - } - } - } - }, - "Sn": { - "type": "list", - "member": {} - }, - "Ss": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - }, - "Sz": { - "type": "structure", - "members": { - "State": {}, - "StateChangeReason": { - "type": "structure", - "members": { - "Code": {}, - "Message": {} - } - }, - "Timeline": { - "type": "structure", - "members": { - "CreationDateTime": { - "type": "timestamp" - }, - "ReadyDateTime": { - "type": "timestamp" - }, - "EndDateTime": { - "type": "timestamp" - } - } - } - } - }, - "S16": { - "type": "list", - "member": {} - }, - "S18": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Name": {}, - "Version": {}, - "Args": { - "shape": "S16" - }, - "AdditionalInfo": { - "shape": "Sc" - } - } - } - }, - "S1l": { - "type": "structure", - "required": [ - "AvailabilityZone" - ], - "members": { - "AvailabilityZone": {} - } - }, - "S1s": { - "type": "structure", - "required": [ - "Name", - "ScriptBootstrapAction" - ], - "members": { - "Name": {}, - "ScriptBootstrapAction": { - "type": "structure", - "required": [ - "Path" - ], - "members": { - "Path": {}, - "Args": { - "shape": "Sn" - } - } - } - } - }, - "S1u": { - "type": "list", - "member": {} - }, - "S1z": { - "type": "structure", - "members": { - "Jar": {}, - "Properties": { - "shape": "Sc" - }, - "MainClass": {}, - "Args": { - "shape": "S16" - } - } - }, - "S20": { - "type": "structure", - "members": { - "State": {}, - "StateChangeReason": { - "type": "structure", - "members": { - "Code": {}, - "Message": {} - } - }, - "Timeline": { - "type": "structure", - "members": { - "CreationDateTime": { - "type": "timestamp" - }, - "StartDateTime": { - "type": "timestamp" - }, - "EndDateTime": { - "type": "timestamp" - } - } - } - } - }, - "S3d": { - "type": "list", - "member": {} - } - }, - "examples": {} -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/elasticmapreduce-2009-03-31.paginators.json b/cli/node_modules/aws-sdk/apis/elasticmapreduce-2009-03-31.paginators.json deleted file mode 100644 index 87f282d77..000000000 --- a/cli/node_modules/aws-sdk/apis/elasticmapreduce-2009-03-31.paginators.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "pagination": { - "DescribeJobFlows": { - "result_key": "JobFlows" - }, - "ListBootstrapActions": { - "input_token": "Marker", - "output_token": "Marker", - "result_key": "BootstrapActions" - }, - "ListClusters": { - "input_token": "Marker", - "output_token": "Marker", - "result_key": "Clusters" - }, - "ListInstanceGroups": { - "input_token": "Marker", - "output_token": "Marker", - "result_key": "InstanceGroups" - }, - "ListInstances": { - "input_token": "Marker", - "output_token": "Marker", - "result_key": "Instances" - }, - "ListSteps": { - "input_token": "Marker", - "output_token": "Marker", - "result_key": "Steps" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/elastictranscoder-2012-09-25.min.json b/cli/node_modules/aws-sdk/apis/elastictranscoder-2012-09-25.min.json deleted file mode 100644 index 2a383fca3..000000000 --- a/cli/node_modules/aws-sdk/apis/elastictranscoder-2012-09-25.min.json +++ /dev/null @@ -1,1019 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2012-09-25", - "endpointPrefix": "elastictranscoder", - "serviceFullName": "Amazon Elastic Transcoder", - "signatureVersion": "v4", - "protocol": "rest-json" - }, - "operations": { - "CancelJob": { - "http": { - "method": "DELETE", - "requestUri": "/2012-09-25/jobs/{Id}", - "responseCode": 202 - }, - "input": { - "type": "structure", - "required": [ - "Id" - ], - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "CreateJob": { - "http": { - "requestUri": "/2012-09-25/jobs", - "responseCode": 201 - }, - "input": { - "type": "structure", - "required": [ - "PipelineId", - "Input" - ], - "members": { - "PipelineId": {}, - "Input": { - "shape": "S5" - }, - "Output": { - "shape": "Sk" - }, - "Outputs": { - "type": "list", - "member": { - "shape": "Sk" - } - }, - "OutputKeyPrefix": {}, - "Playlists": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Name": {}, - "Format": {}, - "OutputKeys": { - "shape": "S1i" - }, - "HlsContentProtection": { - "shape": "S1j" - }, - "PlayReadyDrm": { - "shape": "S1n" - } - } - } - }, - "UserMetadata": { - "shape": "S1s" - } - } - }, - "output": { - "type": "structure", - "members": { - "Job": { - "shape": "S1v" - } - } - } - }, - "CreatePipeline": { - "http": { - "requestUri": "/2012-09-25/pipelines", - "responseCode": 201 - }, - "input": { - "type": "structure", - "required": [ - "Name", - "InputBucket", - "Role" - ], - "members": { - "Name": {}, - "InputBucket": {}, - "OutputBucket": {}, - "Role": {}, - "AwsKmsKeyArn": {}, - "Notifications": { - "shape": "S27" - }, - "ContentConfig": { - "shape": "S29" - }, - "ThumbnailConfig": { - "shape": "S29" - } - } - }, - "output": { - "type": "structure", - "members": { - "Pipeline": { - "shape": "S2i" - }, - "Warnings": { - "shape": "S2k" - } - } - } - }, - "CreatePreset": { - "http": { - "requestUri": "/2012-09-25/presets", - "responseCode": 201 - }, - "input": { - "type": "structure", - "required": [ - "Name", - "Container" - ], - "members": { - "Name": {}, - "Description": {}, - "Container": {}, - "Video": { - "shape": "S2o" - }, - "Audio": { - "shape": "S34" - }, - "Thumbnails": { - "shape": "S3f" - } - } - }, - "output": { - "type": "structure", - "members": { - "Preset": { - "shape": "S3j" - }, - "Warning": {} - } - } - }, - "DeletePipeline": { - "http": { - "method": "DELETE", - "requestUri": "/2012-09-25/pipelines/{Id}", - "responseCode": 202 - }, - "input": { - "type": "structure", - "required": [ - "Id" - ], - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "DeletePreset": { - "http": { - "method": "DELETE", - "requestUri": "/2012-09-25/presets/{Id}", - "responseCode": 202 - }, - "input": { - "type": "structure", - "required": [ - "Id" - ], - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "ListJobsByPipeline": { - "http": { - "method": "GET", - "requestUri": "/2012-09-25/jobsByPipeline/{PipelineId}" - }, - "input": { - "type": "structure", - "required": [ - "PipelineId" - ], - "members": { - "PipelineId": { - "location": "uri", - "locationName": "PipelineId" - }, - "Ascending": { - "location": "querystring", - "locationName": "Ascending" - }, - "PageToken": { - "location": "querystring", - "locationName": "PageToken" - } - } - }, - "output": { - "type": "structure", - "members": { - "Jobs": { - "shape": "S3s" - }, - "NextPageToken": {} - } - } - }, - "ListJobsByStatus": { - "http": { - "method": "GET", - "requestUri": "/2012-09-25/jobsByStatus/{Status}" - }, - "input": { - "type": "structure", - "required": [ - "Status" - ], - "members": { - "Status": { - "location": "uri", - "locationName": "Status" - }, - "Ascending": { - "location": "querystring", - "locationName": "Ascending" - }, - "PageToken": { - "location": "querystring", - "locationName": "PageToken" - } - } - }, - "output": { - "type": "structure", - "members": { - "Jobs": { - "shape": "S3s" - }, - "NextPageToken": {} - } - } - }, - "ListPipelines": { - "http": { - "method": "GET", - "requestUri": "/2012-09-25/pipelines" - }, - "input": { - "type": "structure", - "members": { - "Ascending": { - "location": "querystring", - "locationName": "Ascending" - }, - "PageToken": { - "location": "querystring", - "locationName": "PageToken" - } - } - }, - "output": { - "type": "structure", - "members": { - "Pipelines": { - "type": "list", - "member": { - "shape": "S2i" - } - }, - "NextPageToken": {} - } - } - }, - "ListPresets": { - "http": { - "method": "GET", - "requestUri": "/2012-09-25/presets" - }, - "input": { - "type": "structure", - "members": { - "Ascending": { - "location": "querystring", - "locationName": "Ascending" - }, - "PageToken": { - "location": "querystring", - "locationName": "PageToken" - } - } - }, - "output": { - "type": "structure", - "members": { - "Presets": { - "type": "list", - "member": { - "shape": "S3j" - } - }, - "NextPageToken": {} - } - } - }, - "ReadJob": { - "http": { - "method": "GET", - "requestUri": "/2012-09-25/jobs/{Id}" - }, - "input": { - "type": "structure", - "required": [ - "Id" - ], - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - } - } - }, - "output": { - "type": "structure", - "members": { - "Job": { - "shape": "S1v" - } - } - } - }, - "ReadPipeline": { - "http": { - "method": "GET", - "requestUri": "/2012-09-25/pipelines/{Id}" - }, - "input": { - "type": "structure", - "required": [ - "Id" - ], - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - } - } - }, - "output": { - "type": "structure", - "members": { - "Pipeline": { - "shape": "S2i" - }, - "Warnings": { - "shape": "S2k" - } - } - } - }, - "ReadPreset": { - "http": { - "method": "GET", - "requestUri": "/2012-09-25/presets/{Id}" - }, - "input": { - "type": "structure", - "required": [ - "Id" - ], - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - } - } - }, - "output": { - "type": "structure", - "members": { - "Preset": { - "shape": "S3j" - } - } - } - }, - "TestRole": { - "http": { - "requestUri": "/2012-09-25/roleTests", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "Role", - "InputBucket", - "OutputBucket", - "Topics" - ], - "members": { - "Role": {}, - "InputBucket": {}, - "OutputBucket": {}, - "Topics": { - "type": "list", - "member": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "Success": {}, - "Messages": { - "type": "list", - "member": {} - } - } - } - }, - "UpdatePipeline": { - "http": { - "method": "PUT", - "requestUri": "/2012-09-25/pipelines/{Id}", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "Id" - ], - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - }, - "Name": {}, - "InputBucket": {}, - "Role": {}, - "AwsKmsKeyArn": {}, - "Notifications": { - "shape": "S27" - }, - "ContentConfig": { - "shape": "S29" - }, - "ThumbnailConfig": { - "shape": "S29" - } - } - }, - "output": { - "type": "structure", - "members": { - "Pipeline": { - "shape": "S2i" - }, - "Warnings": { - "shape": "S2k" - } - } - } - }, - "UpdatePipelineNotifications": { - "http": { - "requestUri": "/2012-09-25/pipelines/{Id}/notifications" - }, - "input": { - "type": "structure", - "required": [ - "Id", - "Notifications" - ], - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - }, - "Notifications": { - "shape": "S27" - } - } - }, - "output": { - "type": "structure", - "members": { - "Pipeline": { - "shape": "S2i" - } - } - } - }, - "UpdatePipelineStatus": { - "http": { - "requestUri": "/2012-09-25/pipelines/{Id}/status" - }, - "input": { - "type": "structure", - "required": [ - "Id", - "Status" - ], - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - }, - "Status": {} - } - }, - "output": { - "type": "structure", - "members": { - "Pipeline": { - "shape": "S2i" - } - } - } - } - }, - "shapes": { - "S5": { - "type": "structure", - "members": { - "Key": {}, - "FrameRate": {}, - "Resolution": {}, - "AspectRatio": {}, - "Interlaced": {}, - "Container": {}, - "Encryption": { - "shape": "Sc" - }, - "DetectedProperties": { - "type": "structure", - "members": { - "Width": { - "type": "integer" - }, - "Height": { - "type": "integer" - }, - "FrameRate": {}, - "FileSize": { - "type": "long" - }, - "DurationMillis": { - "type": "long" - } - } - } - } - }, - "Sc": { - "type": "structure", - "members": { - "Mode": {}, - "Key": {}, - "KeyMd5": {}, - "InitializationVector": {} - } - }, - "Sk": { - "type": "structure", - "members": { - "Key": {}, - "ThumbnailPattern": {}, - "ThumbnailEncryption": { - "shape": "Sc" - }, - "Rotate": {}, - "PresetId": {}, - "SegmentDuration": {}, - "Watermarks": { - "shape": "Sn" - }, - "AlbumArt": { - "shape": "Sr" - }, - "Composition": { - "shape": "Sz" - }, - "Captions": { - "shape": "S13" - }, - "Encryption": { - "shape": "Sc" - } - } - }, - "Sn": { - "type": "list", - "member": { - "type": "structure", - "members": { - "PresetWatermarkId": {}, - "InputKey": {}, - "Encryption": { - "shape": "Sc" - } - } - } - }, - "Sr": { - "type": "structure", - "members": { - "MergePolicy": {}, - "Artwork": { - "type": "list", - "member": { - "type": "structure", - "members": { - "InputKey": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "PaddingPolicy": {}, - "AlbumArtFormat": {}, - "Encryption": { - "shape": "Sc" - } - } - } - } - } - }, - "Sz": { - "type": "list", - "member": { - "type": "structure", - "members": { - "TimeSpan": { - "type": "structure", - "members": { - "StartTime": {}, - "Duration": {} - } - } - } - } - }, - "S13": { - "type": "structure", - "members": { - "MergePolicy": {}, - "CaptionSources": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Key": {}, - "Language": {}, - "TimeOffset": {}, - "Label": {}, - "Encryption": { - "shape": "Sc" - } - } - } - }, - "CaptionFormats": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Format": {}, - "Pattern": {}, - "Encryption": { - "shape": "Sc" - } - } - } - } - } - }, - "S1i": { - "type": "list", - "member": {} - }, - "S1j": { - "type": "structure", - "members": { - "Method": {}, - "Key": {}, - "KeyMd5": {}, - "InitializationVector": {}, - "LicenseAcquisitionUrl": {}, - "KeyStoragePolicy": {} - } - }, - "S1n": { - "type": "structure", - "members": { - "Format": {}, - "Key": {}, - "KeyMd5": {}, - "KeyId": {}, - "InitializationVector": {}, - "LicenseAcquisitionUrl": {} - } - }, - "S1s": { - "type": "map", - "key": {}, - "value": {} - }, - "S1v": { - "type": "structure", - "members": { - "Id": {}, - "Arn": {}, - "PipelineId": {}, - "Input": { - "shape": "S5" - }, - "Output": { - "shape": "S1w" - }, - "Outputs": { - "type": "list", - "member": { - "shape": "S1w" - } - }, - "OutputKeyPrefix": {}, - "Playlists": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Name": {}, - "Format": {}, - "OutputKeys": { - "shape": "S1i" - }, - "HlsContentProtection": { - "shape": "S1j" - }, - "PlayReadyDrm": { - "shape": "S1n" - }, - "Status": {}, - "StatusDetail": {} - } - } - }, - "Status": {}, - "UserMetadata": { - "shape": "S1s" - }, - "Timing": { - "type": "structure", - "members": { - "SubmitTimeMillis": { - "type": "long" - }, - "StartTimeMillis": { - "type": "long" - }, - "FinishTimeMillis": { - "type": "long" - } - } - } - } - }, - "S1w": { - "type": "structure", - "members": { - "Id": {}, - "Key": {}, - "ThumbnailPattern": {}, - "ThumbnailEncryption": { - "shape": "Sc" - }, - "Rotate": {}, - "PresetId": {}, - "SegmentDuration": {}, - "Status": {}, - "StatusDetail": {}, - "Duration": { - "type": "long" - }, - "Width": { - "type": "integer" - }, - "Height": { - "type": "integer" - }, - "FrameRate": {}, - "FileSize": { - "type": "long" - }, - "DurationMillis": { - "type": "long" - }, - "Watermarks": { - "shape": "Sn" - }, - "AlbumArt": { - "shape": "Sr" - }, - "Composition": { - "shape": "Sz" - }, - "Captions": { - "shape": "S13" - }, - "Encryption": { - "shape": "Sc" - }, - "AppliedColorSpaceConversion": {} - } - }, - "S27": { - "type": "structure", - "members": { - "Progressing": {}, - "Completed": {}, - "Warning": {}, - "Error": {} - } - }, - "S29": { - "type": "structure", - "members": { - "Bucket": {}, - "StorageClass": {}, - "Permissions": { - "type": "list", - "member": { - "type": "structure", - "members": { - "GranteeType": {}, - "Grantee": {}, - "Access": { - "type": "list", - "member": {} - } - } - } - } - } - }, - "S2i": { - "type": "structure", - "members": { - "Id": {}, - "Arn": {}, - "Name": {}, - "Status": {}, - "InputBucket": {}, - "OutputBucket": {}, - "Role": {}, - "AwsKmsKeyArn": {}, - "Notifications": { - "shape": "S27" - }, - "ContentConfig": { - "shape": "S29" - }, - "ThumbnailConfig": { - "shape": "S29" - } - } - }, - "S2k": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Code": {}, - "Message": {} - } - } - }, - "S2o": { - "type": "structure", - "members": { - "Codec": {}, - "CodecOptions": { - "type": "map", - "key": {}, - "value": {} - }, - "KeyframesMaxDist": {}, - "FixedGOP": {}, - "BitRate": {}, - "FrameRate": {}, - "MaxFrameRate": {}, - "Resolution": {}, - "AspectRatio": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "DisplayAspectRatio": {}, - "SizingPolicy": {}, - "PaddingPolicy": {}, - "Watermarks": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Id": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "HorizontalAlign": {}, - "HorizontalOffset": {}, - "VerticalAlign": {}, - "VerticalOffset": {}, - "Opacity": {}, - "Target": {} - } - } - } - } - }, - "S34": { - "type": "structure", - "members": { - "Codec": {}, - "SampleRate": {}, - "BitRate": {}, - "Channels": {}, - "AudioPackingMode": {}, - "CodecOptions": { - "type": "structure", - "members": { - "Profile": {}, - "BitDepth": {}, - "BitOrder": {}, - "Signed": {} - } - } - } - }, - "S3f": { - "type": "structure", - "members": { - "Format": {}, - "Interval": {}, - "Resolution": {}, - "AspectRatio": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "PaddingPolicy": {} - } - }, - "S3j": { - "type": "structure", - "members": { - "Id": {}, - "Arn": {}, - "Name": {}, - "Description": {}, - "Container": {}, - "Audio": { - "shape": "S34" - }, - "Video": { - "shape": "S2o" - }, - "Thumbnails": { - "shape": "S3f" - }, - "Type": {} - } - }, - "S3s": { - "type": "list", - "member": { - "shape": "S1v" - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/elastictranscoder-2012-09-25.paginators.json b/cli/node_modules/aws-sdk/apis/elastictranscoder-2012-09-25.paginators.json deleted file mode 100644 index 5a145d368..000000000 --- a/cli/node_modules/aws-sdk/apis/elastictranscoder-2012-09-25.paginators.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "pagination": { - "ListJobsByPipeline": { - "input_token": "PageToken", - "output_token": "NextPageToken", - "result_key": "Jobs" - }, - "ListJobsByStatus": { - "input_token": "PageToken", - "output_token": "NextPageToken", - "result_key": "Jobs" - }, - "ListPipelines": { - "input_token": "PageToken", - "output_token": "NextPageToken", - "result_key": "Pipelines" - }, - "ListPresets": { - "input_token": "PageToken", - "output_token": "NextPageToken", - "result_key": "Presets" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/elastictranscoder-2012-09-25.waiters.json b/cli/node_modules/aws-sdk/apis/elastictranscoder-2012-09-25.waiters.json deleted file mode 100644 index 109d16067..000000000 --- a/cli/node_modules/aws-sdk/apis/elastictranscoder-2012-09-25.waiters.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "waiters": { - "JobComplete": { - "operation": "ReadJob", - "success_type": "output", - "success_path": "Job.Status", - "interval": 30, - "max_attempts": 120, - "success_value": "Complete", - "failure_value": [ - "Canceled", - "Error" - ] - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/email-2010-12-01.min.json b/cli/node_modules/aws-sdk/apis/email-2010-12-01.min.json deleted file mode 100644 index 63d7534e5..000000000 --- a/cli/node_modules/aws-sdk/apis/email-2010-12-01.min.json +++ /dev/null @@ -1,599 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2010-12-01", - "endpointPrefix": "email", - "serviceAbbreviation": "Amazon SES", - "serviceFullName": "Amazon Simple Email Service", - "signatureVersion": "v4", - "signingName": "ses", - "xmlNamespace": "http://ses.amazonaws.com/doc/2010-12-01/", - "protocol": "query" - }, - "operations": { - "DeleteIdentity": { - "input": { - "type": "structure", - "required": [ - "Identity" - ], - "members": { - "Identity": {} - } - }, - "output": { - "resultWrapper": "DeleteIdentityResult", - "type": "structure", - "members": {} - } - }, - "DeleteIdentityPolicy": { - "input": { - "type": "structure", - "required": [ - "Identity", - "PolicyName" - ], - "members": { - "Identity": {}, - "PolicyName": {} - } - }, - "output": { - "resultWrapper": "DeleteIdentityPolicyResult", - "type": "structure", - "members": {} - } - }, - "DeleteVerifiedEmailAddress": { - "input": { - "type": "structure", - "required": [ - "EmailAddress" - ], - "members": { - "EmailAddress": {} - } - } - }, - "GetIdentityDkimAttributes": { - "input": { - "type": "structure", - "required": [ - "Identities" - ], - "members": { - "Identities": { - "shape": "Sa" - } - } - }, - "output": { - "resultWrapper": "GetIdentityDkimAttributesResult", - "type": "structure", - "required": [ - "DkimAttributes" - ], - "members": { - "DkimAttributes": { - "type": "map", - "key": {}, - "value": { - "type": "structure", - "required": [ - "DkimEnabled", - "DkimVerificationStatus" - ], - "members": { - "DkimEnabled": { - "type": "boolean" - }, - "DkimVerificationStatus": {}, - "DkimTokens": { - "shape": "Sg" - } - } - } - } - } - } - }, - "GetIdentityNotificationAttributes": { - "input": { - "type": "structure", - "required": [ - "Identities" - ], - "members": { - "Identities": { - "shape": "Sa" - } - } - }, - "output": { - "resultWrapper": "GetIdentityNotificationAttributesResult", - "type": "structure", - "required": [ - "NotificationAttributes" - ], - "members": { - "NotificationAttributes": { - "type": "map", - "key": {}, - "value": { - "type": "structure", - "required": [ - "BounceTopic", - "ComplaintTopic", - "DeliveryTopic", - "ForwardingEnabled" - ], - "members": { - "BounceTopic": {}, - "ComplaintTopic": {}, - "DeliveryTopic": {}, - "ForwardingEnabled": { - "type": "boolean" - } - } - } - } - } - } - }, - "GetIdentityPolicies": { - "input": { - "type": "structure", - "required": [ - "Identity", - "PolicyNames" - ], - "members": { - "Identity": {}, - "PolicyNames": { - "shape": "So" - } - } - }, - "output": { - "resultWrapper": "GetIdentityPoliciesResult", - "type": "structure", - "required": [ - "Policies" - ], - "members": { - "Policies": { - "type": "map", - "key": {}, - "value": {} - } - } - } - }, - "GetIdentityVerificationAttributes": { - "input": { - "type": "structure", - "required": [ - "Identities" - ], - "members": { - "Identities": { - "shape": "Sa" - } - } - }, - "output": { - "resultWrapper": "GetIdentityVerificationAttributesResult", - "type": "structure", - "required": [ - "VerificationAttributes" - ], - "members": { - "VerificationAttributes": { - "type": "map", - "key": {}, - "value": { - "type": "structure", - "required": [ - "VerificationStatus" - ], - "members": { - "VerificationStatus": {}, - "VerificationToken": {} - } - } - } - } - } - }, - "GetSendQuota": { - "output": { - "resultWrapper": "GetSendQuotaResult", - "type": "structure", - "members": { - "Max24HourSend": { - "type": "double" - }, - "MaxSendRate": { - "type": "double" - }, - "SentLast24Hours": { - "type": "double" - } - } - } - }, - "GetSendStatistics": { - "output": { - "resultWrapper": "GetSendStatisticsResult", - "type": "structure", - "members": { - "SendDataPoints": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Timestamp": { - "type": "timestamp" - }, - "DeliveryAttempts": { - "type": "long" - }, - "Bounces": { - "type": "long" - }, - "Complaints": { - "type": "long" - }, - "Rejects": { - "type": "long" - } - } - } - } - } - } - }, - "ListIdentities": { - "input": { - "type": "structure", - "members": { - "IdentityType": {}, - "NextToken": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListIdentitiesResult", - "type": "structure", - "required": [ - "Identities" - ], - "members": { - "Identities": { - "shape": "Sa" - }, - "NextToken": {} - } - } - }, - "ListIdentityPolicies": { - "input": { - "type": "structure", - "required": [ - "Identity" - ], - "members": { - "Identity": {} - } - }, - "output": { - "resultWrapper": "ListIdentityPoliciesResult", - "type": "structure", - "required": [ - "PolicyNames" - ], - "members": { - "PolicyNames": { - "shape": "So" - } - } - } - }, - "ListVerifiedEmailAddresses": { - "output": { - "resultWrapper": "ListVerifiedEmailAddressesResult", - "type": "structure", - "members": { - "VerifiedEmailAddresses": { - "shape": "S1d" - } - } - } - }, - "PutIdentityPolicy": { - "input": { - "type": "structure", - "required": [ - "Identity", - "PolicyName", - "Policy" - ], - "members": { - "Identity": {}, - "PolicyName": {}, - "Policy": {} - } - }, - "output": { - "resultWrapper": "PutIdentityPolicyResult", - "type": "structure", - "members": {} - } - }, - "SendEmail": { - "input": { - "type": "structure", - "required": [ - "Source", - "Destination", - "Message" - ], - "members": { - "Source": {}, - "Destination": { - "type": "structure", - "members": { - "ToAddresses": { - "shape": "S1d" - }, - "CcAddresses": { - "shape": "S1d" - }, - "BccAddresses": { - "shape": "S1d" - } - } - }, - "Message": { - "type": "structure", - "required": [ - "Subject", - "Body" - ], - "members": { - "Subject": { - "shape": "S1j" - }, - "Body": { - "type": "structure", - "members": { - "Text": { - "shape": "S1j" - }, - "Html": { - "shape": "S1j" - } - } - } - } - }, - "ReplyToAddresses": { - "shape": "S1d" - }, - "ReturnPath": {}, - "SourceArn": {}, - "ReturnPathArn": {} - } - }, - "output": { - "resultWrapper": "SendEmailResult", - "type": "structure", - "required": [ - "MessageId" - ], - "members": { - "MessageId": {} - } - } - }, - "SendRawEmail": { - "input": { - "type": "structure", - "required": [ - "RawMessage" - ], - "members": { - "Source": {}, - "Destinations": { - "shape": "S1d" - }, - "RawMessage": { - "type": "structure", - "required": [ - "Data" - ], - "members": { - "Data": { - "type": "blob" - } - } - }, - "FromArn": {}, - "SourceArn": {}, - "ReturnPathArn": {} - } - }, - "output": { - "resultWrapper": "SendRawEmailResult", - "type": "structure", - "required": [ - "MessageId" - ], - "members": { - "MessageId": {} - } - } - }, - "SetIdentityDkimEnabled": { - "input": { - "type": "structure", - "required": [ - "Identity", - "DkimEnabled" - ], - "members": { - "Identity": {}, - "DkimEnabled": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "SetIdentityDkimEnabledResult", - "type": "structure", - "members": {} - } - }, - "SetIdentityFeedbackForwardingEnabled": { - "input": { - "type": "structure", - "required": [ - "Identity", - "ForwardingEnabled" - ], - "members": { - "Identity": {}, - "ForwardingEnabled": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "SetIdentityFeedbackForwardingEnabledResult", - "type": "structure", - "members": {} - } - }, - "SetIdentityNotificationTopic": { - "input": { - "type": "structure", - "required": [ - "Identity", - "NotificationType" - ], - "members": { - "Identity": {}, - "NotificationType": {}, - "SnsTopic": {} - } - }, - "output": { - "resultWrapper": "SetIdentityNotificationTopicResult", - "type": "structure", - "members": {} - } - }, - "VerifyDomainDkim": { - "input": { - "type": "structure", - "required": [ - "Domain" - ], - "members": { - "Domain": {} - } - }, - "output": { - "resultWrapper": "VerifyDomainDkimResult", - "type": "structure", - "required": [ - "DkimTokens" - ], - "members": { - "DkimTokens": { - "shape": "Sg" - } - } - } - }, - "VerifyDomainIdentity": { - "input": { - "type": "structure", - "required": [ - "Domain" - ], - "members": { - "Domain": {} - } - }, - "output": { - "resultWrapper": "VerifyDomainIdentityResult", - "type": "structure", - "required": [ - "VerificationToken" - ], - "members": { - "VerificationToken": {} - } - } - }, - "VerifyEmailAddress": { - "input": { - "type": "structure", - "required": [ - "EmailAddress" - ], - "members": { - "EmailAddress": {} - } - } - }, - "VerifyEmailIdentity": { - "input": { - "type": "structure", - "required": [ - "EmailAddress" - ], - "members": { - "EmailAddress": {} - } - }, - "output": { - "resultWrapper": "VerifyEmailIdentityResult", - "type": "structure", - "members": {} - } - } - }, - "shapes": { - "Sa": { - "type": "list", - "member": {} - }, - "Sg": { - "type": "list", - "member": {} - }, - "So": { - "type": "list", - "member": {} - }, - "S1d": { - "type": "list", - "member": {} - }, - "S1j": { - "type": "structure", - "required": [ - "Data" - ], - "members": { - "Data": {}, - "Charset": {} - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/email-2010-12-01.paginators.json b/cli/node_modules/aws-sdk/apis/email-2010-12-01.paginators.json deleted file mode 100644 index e12811f5e..000000000 --- a/cli/node_modules/aws-sdk/apis/email-2010-12-01.paginators.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "pagination": { - "ListIdentities": { - "input_token": "NextToken", - "output_token": "NextToken", - "limit_key": "MaxItems", - "result_key": "Identities" - }, - "ListVerifiedEmailAddresses": { - "result_key": "VerifiedEmailAddresses" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/email-2010-12-01.waiters.json b/cli/node_modules/aws-sdk/apis/email-2010-12-01.waiters.json deleted file mode 100644 index e8724fc75..000000000 --- a/cli/node_modules/aws-sdk/apis/email-2010-12-01.waiters.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "waiters": { - "__default__": { - "interval": 3, - "max_attempts": 20 - }, - "IdentityExists": { - "operation": "GetIdentityVerificationAttributes", - "success_type": "output", - "success_path": "VerificationAttributes[].VerificationStatus", - "success_value": true - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/glacier-2012-06-01.min.json b/cli/node_modules/aws-sdk/apis/glacier-2012-06-01.min.json deleted file mode 100644 index 6db1a30c0..000000000 --- a/cli/node_modules/aws-sdk/apis/glacier-2012-06-01.min.json +++ /dev/null @@ -1,1215 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2012-06-01", - "checksumFormat": "sha256", - "endpointPrefix": "glacier", - "serviceFullName": "Amazon Glacier", - "signatureVersion": "v4", - "protocol": "rest-json" - }, - "operations": { - "AbortMultipartUpload": { - "http": { - "method": "DELETE", - "requestUri": "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}", - "responseCode": 204 - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - }, - "uploadId": { - "location": "uri", - "locationName": "uploadId" - } - }, - "required": [ - "accountId", - "vaultName", - "uploadId" - ] - } - }, - "AbortVaultLock": { - "http": { - "method": "DELETE", - "requestUri": "/{accountId}/vaults/{vaultName}/lock-policy", - "responseCode": 204 - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - } - }, - "required": [ - "accountId", - "vaultName" - ] - } - }, - "AddTagsToVault": { - "http": { - "requestUri": "/{accountId}/vaults/{vaultName}/tags?operation=add", - "responseCode": 204 - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - }, - "Tags": { - "shape": "S5" - } - }, - "required": [ - "accountId", - "vaultName" - ] - } - }, - "CompleteMultipartUpload": { - "http": { - "requestUri": "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}", - "responseCode": 201 - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - }, - "uploadId": { - "location": "uri", - "locationName": "uploadId" - }, - "archiveSize": { - "location": "header", - "locationName": "x-amz-archive-size" - }, - "checksum": { - "location": "header", - "locationName": "x-amz-sha256-tree-hash" - } - }, - "required": [ - "accountId", - "vaultName", - "uploadId" - ] - }, - "output": { - "shape": "S9" - } - }, - "CompleteVaultLock": { - "http": { - "requestUri": "/{accountId}/vaults/{vaultName}/lock-policy/{lockId}", - "responseCode": 204 - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - }, - "lockId": { - "location": "uri", - "locationName": "lockId" - } - }, - "required": [ - "accountId", - "vaultName", - "lockId" - ] - } - }, - "CreateVault": { - "http": { - "method": "PUT", - "requestUri": "/{accountId}/vaults/{vaultName}", - "responseCode": 201 - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - } - }, - "required": [ - "accountId", - "vaultName" - ] - }, - "output": { - "type": "structure", - "members": { - "location": { - "location": "header", - "locationName": "Location" - } - } - } - }, - "DeleteArchive": { - "http": { - "method": "DELETE", - "requestUri": "/{accountId}/vaults/{vaultName}/archives/{archiveId}", - "responseCode": 204 - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - }, - "archiveId": { - "location": "uri", - "locationName": "archiveId" - } - }, - "required": [ - "accountId", - "vaultName", - "archiveId" - ] - } - }, - "DeleteVault": { - "http": { - "method": "DELETE", - "requestUri": "/{accountId}/vaults/{vaultName}", - "responseCode": 204 - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - } - }, - "required": [ - "accountId", - "vaultName" - ] - } - }, - "DeleteVaultAccessPolicy": { - "http": { - "method": "DELETE", - "requestUri": "/{accountId}/vaults/{vaultName}/access-policy", - "responseCode": 204 - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - } - }, - "required": [ - "accountId", - "vaultName" - ] - } - }, - "DeleteVaultNotifications": { - "http": { - "method": "DELETE", - "requestUri": "/{accountId}/vaults/{vaultName}/notification-configuration", - "responseCode": 204 - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - } - }, - "required": [ - "accountId", - "vaultName" - ] - } - }, - "DescribeJob": { - "http": { - "method": "GET", - "requestUri": "/{accountId}/vaults/{vaultName}/jobs/{jobId}" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - }, - "jobId": { - "location": "uri", - "locationName": "jobId" - } - }, - "required": [ - "accountId", - "vaultName", - "jobId" - ] - }, - "output": { - "shape": "Si" - } - }, - "DescribeVault": { - "http": { - "method": "GET", - "requestUri": "/{accountId}/vaults/{vaultName}" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - } - }, - "required": [ - "accountId", - "vaultName" - ] - }, - "output": { - "shape": "Sq" - } - }, - "GetDataRetrievalPolicy": { - "http": { - "method": "GET", - "requestUri": "/{accountId}/policies/data-retrieval" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - } - }, - "required": [ - "accountId" - ] - }, - "output": { - "type": "structure", - "members": { - "Policy": { - "shape": "Su" - } - } - } - }, - "GetJobOutput": { - "http": { - "method": "GET", - "requestUri": "/{accountId}/vaults/{vaultName}/jobs/{jobId}/output" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - }, - "jobId": { - "location": "uri", - "locationName": "jobId" - }, - "range": { - "location": "header", - "locationName": "Range" - } - }, - "required": [ - "accountId", - "vaultName", - "jobId" - ] - }, - "output": { - "type": "structure", - "members": { - "body": { - "shape": "S10" - }, - "checksum": { - "location": "header", - "locationName": "x-amz-sha256-tree-hash" - }, - "status": { - "location": "statusCode", - "type": "integer" - }, - "contentRange": { - "location": "header", - "locationName": "Content-Range" - }, - "acceptRanges": { - "location": "header", - "locationName": "Accept-Ranges" - }, - "contentType": { - "location": "header", - "locationName": "Content-Type" - }, - "archiveDescription": { - "location": "header", - "locationName": "x-amz-archive-description" - } - }, - "payload": "body" - } - }, - "GetVaultAccessPolicy": { - "http": { - "method": "GET", - "requestUri": "/{accountId}/vaults/{vaultName}/access-policy" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - } - }, - "required": [ - "accountId", - "vaultName" - ] - }, - "output": { - "type": "structure", - "members": { - "policy": { - "shape": "S14" - } - }, - "payload": "policy" - } - }, - "GetVaultLock": { - "http": { - "method": "GET", - "requestUri": "/{accountId}/vaults/{vaultName}/lock-policy" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - } - }, - "required": [ - "accountId", - "vaultName" - ] - }, - "output": { - "type": "structure", - "members": { - "Policy": {}, - "State": {}, - "ExpirationDate": {}, - "CreationDate": {} - } - } - }, - "GetVaultNotifications": { - "http": { - "method": "GET", - "requestUri": "/{accountId}/vaults/{vaultName}/notification-configuration" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - } - }, - "required": [ - "accountId", - "vaultName" - ] - }, - "output": { - "type": "structure", - "members": { - "vaultNotificationConfig": { - "shape": "S19" - } - }, - "payload": "vaultNotificationConfig" - } - }, - "InitiateJob": { - "http": { - "requestUri": "/{accountId}/vaults/{vaultName}/jobs", - "responseCode": 202 - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - }, - "jobParameters": { - "type": "structure", - "members": { - "Format": {}, - "Type": {}, - "ArchiveId": {}, - "Description": {}, - "SNSTopic": {}, - "RetrievalByteRange": {}, - "InventoryRetrievalParameters": { - "type": "structure", - "members": { - "StartDate": {}, - "EndDate": {}, - "Limit": {}, - "Marker": {} - } - } - } - } - }, - "required": [ - "accountId", - "vaultName" - ], - "payload": "jobParameters" - }, - "output": { - "type": "structure", - "members": { - "location": { - "location": "header", - "locationName": "Location" - }, - "jobId": { - "location": "header", - "locationName": "x-amz-job-id" - } - } - } - }, - "InitiateMultipartUpload": { - "http": { - "requestUri": "/{accountId}/vaults/{vaultName}/multipart-uploads", - "responseCode": 201 - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - }, - "archiveDescription": { - "location": "header", - "locationName": "x-amz-archive-description" - }, - "partSize": { - "location": "header", - "locationName": "x-amz-part-size" - } - }, - "required": [ - "accountId", - "vaultName" - ] - }, - "output": { - "type": "structure", - "members": { - "location": { - "location": "header", - "locationName": "Location" - }, - "uploadId": { - "location": "header", - "locationName": "x-amz-multipart-upload-id" - } - } - } - }, - "InitiateVaultLock": { - "http": { - "requestUri": "/{accountId}/vaults/{vaultName}/lock-policy", - "responseCode": 201 - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - }, - "policy": { - "type": "structure", - "members": { - "Policy": {} - } - } - }, - "required": [ - "accountId", - "vaultName" - ], - "payload": "policy" - }, - "output": { - "type": "structure", - "members": { - "lockId": { - "location": "header", - "locationName": "x-amz-lock-id" - } - } - } - }, - "ListJobs": { - "http": { - "method": "GET", - "requestUri": "/{accountId}/vaults/{vaultName}/jobs" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - }, - "limit": { - "location": "querystring", - "locationName": "limit" - }, - "marker": { - "location": "querystring", - "locationName": "marker" - }, - "statuscode": { - "location": "querystring", - "locationName": "statuscode" - }, - "completed": { - "location": "querystring", - "locationName": "completed" - } - }, - "required": [ - "accountId", - "vaultName" - ] - }, - "output": { - "type": "structure", - "members": { - "JobList": { - "type": "list", - "member": { - "shape": "Si" - } - }, - "Marker": {} - } - } - }, - "ListMultipartUploads": { - "http": { - "method": "GET", - "requestUri": "/{accountId}/vaults/{vaultName}/multipart-uploads" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - }, - "marker": { - "location": "querystring", - "locationName": "marker" - }, - "limit": { - "location": "querystring", - "locationName": "limit" - } - }, - "required": [ - "accountId", - "vaultName" - ] - }, - "output": { - "type": "structure", - "members": { - "UploadsList": { - "type": "list", - "member": { - "type": "structure", - "members": { - "MultipartUploadId": {}, - "VaultARN": {}, - "ArchiveDescription": {}, - "PartSizeInBytes": { - "type": "long" - }, - "CreationDate": {} - } - } - }, - "Marker": {} - } - } - }, - "ListParts": { - "http": { - "method": "GET", - "requestUri": "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - }, - "uploadId": { - "location": "uri", - "locationName": "uploadId" - }, - "marker": { - "location": "querystring", - "locationName": "marker" - }, - "limit": { - "location": "querystring", - "locationName": "limit" - } - }, - "required": [ - "accountId", - "vaultName", - "uploadId" - ] - }, - "output": { - "type": "structure", - "members": { - "MultipartUploadId": {}, - "VaultARN": {}, - "ArchiveDescription": {}, - "PartSizeInBytes": { - "type": "long" - }, - "CreationDate": {}, - "Parts": { - "type": "list", - "member": { - "type": "structure", - "members": { - "RangeInBytes": {}, - "SHA256TreeHash": {} - } - } - }, - "Marker": {} - } - } - }, - "ListTagsForVault": { - "http": { - "method": "GET", - "requestUri": "/{accountId}/vaults/{vaultName}/tags" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - } - }, - "required": [ - "accountId", - "vaultName" - ] - }, - "output": { - "type": "structure", - "members": { - "Tags": { - "shape": "S5" - } - } - } - }, - "ListVaults": { - "http": { - "method": "GET", - "requestUri": "/{accountId}/vaults" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "marker": { - "location": "querystring", - "locationName": "marker" - }, - "limit": { - "location": "querystring", - "locationName": "limit" - } - }, - "required": [ - "accountId" - ] - }, - "output": { - "type": "structure", - "members": { - "VaultList": { - "type": "list", - "member": { - "shape": "Sq" - } - }, - "Marker": {} - } - } - }, - "RemoveTagsFromVault": { - "http": { - "requestUri": "/{accountId}/vaults/{vaultName}/tags?operation=remove", - "responseCode": 204 - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - }, - "TagKeys": { - "type": "list", - "member": {} - } - }, - "required": [ - "accountId", - "vaultName" - ] - } - }, - "SetDataRetrievalPolicy": { - "http": { - "method": "PUT", - "requestUri": "/{accountId}/policies/data-retrieval", - "responseCode": 204 - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "Policy": { - "shape": "Su" - } - }, - "required": [ - "accountId" - ] - } - }, - "SetVaultAccessPolicy": { - "http": { - "method": "PUT", - "requestUri": "/{accountId}/vaults/{vaultName}/access-policy", - "responseCode": 204 - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - }, - "policy": { - "shape": "S14" - } - }, - "required": [ - "accountId", - "vaultName" - ], - "payload": "policy" - } - }, - "SetVaultNotifications": { - "http": { - "method": "PUT", - "requestUri": "/{accountId}/vaults/{vaultName}/notification-configuration", - "responseCode": 204 - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - }, - "vaultNotificationConfig": { - "shape": "S19" - } - }, - "required": [ - "accountId", - "vaultName" - ], - "payload": "vaultNotificationConfig" - } - }, - "UploadArchive": { - "http": { - "requestUri": "/{accountId}/vaults/{vaultName}/archives", - "responseCode": 201 - }, - "input": { - "type": "structure", - "members": { - "vaultName": { - "location": "uri", - "locationName": "vaultName" - }, - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "archiveDescription": { - "location": "header", - "locationName": "x-amz-archive-description" - }, - "checksum": { - "location": "header", - "locationName": "x-amz-sha256-tree-hash" - }, - "body": { - "shape": "S10" - } - }, - "required": [ - "vaultName", - "accountId" - ], - "payload": "body" - }, - "output": { - "shape": "S9" - } - }, - "UploadMultipartPart": { - "http": { - "method": "PUT", - "requestUri": "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}", - "responseCode": 204 - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri", - "locationName": "accountId" - }, - "vaultName": { - "location": "uri", - "locationName": "vaultName" - }, - "uploadId": { - "location": "uri", - "locationName": "uploadId" - }, - "checksum": { - "location": "header", - "locationName": "x-amz-sha256-tree-hash" - }, - "range": { - "location": "header", - "locationName": "Content-Range" - }, - "body": { - "shape": "S10" - } - }, - "required": [ - "accountId", - "vaultName", - "uploadId" - ], - "payload": "body" - }, - "output": { - "type": "structure", - "members": { - "checksum": { - "location": "header", - "locationName": "x-amz-sha256-tree-hash" - } - } - } - } - }, - "shapes": { - "S5": { - "type": "map", - "key": {}, - "value": {} - }, - "S9": { - "type": "structure", - "members": { - "location": { - "location": "header", - "locationName": "Location" - }, - "checksum": { - "location": "header", - "locationName": "x-amz-sha256-tree-hash" - }, - "archiveId": { - "location": "header", - "locationName": "x-amz-archive-id" - } - } - }, - "Si": { - "type": "structure", - "members": { - "JobId": {}, - "JobDescription": {}, - "Action": {}, - "ArchiveId": {}, - "VaultARN": {}, - "CreationDate": {}, - "Completed": { - "type": "boolean" - }, - "StatusCode": {}, - "StatusMessage": {}, - "ArchiveSizeInBytes": { - "type": "long" - }, - "InventorySizeInBytes": { - "type": "long" - }, - "SNSTopic": {}, - "CompletionDate": {}, - "SHA256TreeHash": {}, - "ArchiveSHA256TreeHash": {}, - "RetrievalByteRange": {}, - "InventoryRetrievalParameters": { - "type": "structure", - "members": { - "Format": {}, - "StartDate": {}, - "EndDate": {}, - "Limit": {}, - "Marker": {} - } - } - } - }, - "Sq": { - "type": "structure", - "members": { - "VaultARN": {}, - "VaultName": {}, - "CreationDate": {}, - "LastInventoryDate": {}, - "NumberOfArchives": { - "type": "long" - }, - "SizeInBytes": { - "type": "long" - } - } - }, - "Su": { - "type": "structure", - "members": { - "Rules": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Strategy": {}, - "BytesPerHour": { - "type": "long" - } - } - } - } - } - }, - "S10": { - "type": "blob", - "streaming": true - }, - "S14": { - "type": "structure", - "members": { - "Policy": {} - } - }, - "S19": { - "type": "structure", - "members": { - "SNSTopic": {}, - "Events": { - "type": "list", - "member": {} - } - } - } - }, - "examples": {} -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/glacier-2012-06-01.paginators.json b/cli/node_modules/aws-sdk/apis/glacier-2012-06-01.paginators.json deleted file mode 100644 index 69691437e..000000000 --- a/cli/node_modules/aws-sdk/apis/glacier-2012-06-01.paginators.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "pagination": { - "ListJobs": { - "input_token": "marker", - "output_token": "Marker", - "limit_key": "limit", - "result_key": "JobList" - }, - "ListMultipartUploads": { - "input_token": "marker", - "output_token": "Marker", - "limit_key": "limit", - "result_key": "UploadsList" - }, - "ListParts": { - "input_token": "marker", - "output_token": "Marker", - "limit_key": "limit", - "result_key": "Parts" - }, - "ListVaults": { - "input_token": "marker", - "output_token": "Marker", - "limit_key": "limit", - "result_key": "VaultList" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/glacier-2012-06-01.waiters.json b/cli/node_modules/aws-sdk/apis/glacier-2012-06-01.waiters.json deleted file mode 100644 index 170c2c76d..000000000 --- a/cli/node_modules/aws-sdk/apis/glacier-2012-06-01.waiters.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "waiters": { - "__default__": { - "interval": 3, - "max_attempts": 15 - }, - "__VaultState": { - "operation": "DescribeVault" - }, - "VaultExists": { - "extends": "__VaultState", - "ignore_errors": [ - "ResourceNotFoundException" - ], - "success_type": "output" - }, - "VaultNotExists": { - "extends": "__VaultState", - "success_type": "error", - "success_value": "ResourceNotFoundException" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/iam-2010-05-08.min.json b/cli/node_modules/aws-sdk/apis/iam-2010-05-08.min.json deleted file mode 100644 index 5baa1becb..000000000 --- a/cli/node_modules/aws-sdk/apis/iam-2010-05-08.min.json +++ /dev/null @@ -1,2701 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2010-05-08", - "endpointPrefix": "iam", - "globalEndpoint": "iam.amazonaws.com", - "serviceAbbreviation": "IAM", - "serviceFullName": "AWS Identity and Access Management", - "signatureVersion": "v4", - "xmlNamespace": "https://iam.amazonaws.com/doc/2010-05-08/", - "protocol": "query" - }, - "operations": { - "AddClientIDToOpenIDConnectProvider": { - "input": { - "type": "structure", - "required": [ - "OpenIDConnectProviderArn", - "ClientID" - ], - "members": { - "OpenIDConnectProviderArn": {}, - "ClientID": {} - } - } - }, - "AddRoleToInstanceProfile": { - "input": { - "type": "structure", - "required": [ - "InstanceProfileName", - "RoleName" - ], - "members": { - "InstanceProfileName": {}, - "RoleName": {} - } - } - }, - "AddUserToGroup": { - "input": { - "type": "structure", - "required": [ - "GroupName", - "UserName" - ], - "members": { - "GroupName": {}, - "UserName": {} - } - } - }, - "AttachGroupPolicy": { - "input": { - "type": "structure", - "required": [ - "GroupName", - "PolicyArn" - ], - "members": { - "GroupName": {}, - "PolicyArn": {} - } - } - }, - "AttachRolePolicy": { - "input": { - "type": "structure", - "required": [ - "RoleName", - "PolicyArn" - ], - "members": { - "RoleName": {}, - "PolicyArn": {} - } - } - }, - "AttachUserPolicy": { - "input": { - "type": "structure", - "required": [ - "UserName", - "PolicyArn" - ], - "members": { - "UserName": {}, - "PolicyArn": {} - } - } - }, - "ChangePassword": { - "input": { - "type": "structure", - "required": [ - "OldPassword", - "NewPassword" - ], - "members": { - "OldPassword": { - "shape": "Sf" - }, - "NewPassword": { - "shape": "Sf" - } - } - } - }, - "CreateAccessKey": { - "input": { - "type": "structure", - "members": { - "UserName": {} - } - }, - "output": { - "resultWrapper": "CreateAccessKeyResult", - "type": "structure", - "required": [ - "AccessKey" - ], - "members": { - "AccessKey": { - "type": "structure", - "required": [ - "UserName", - "AccessKeyId", - "Status", - "SecretAccessKey" - ], - "members": { - "UserName": {}, - "AccessKeyId": {}, - "Status": {}, - "SecretAccessKey": { - "type": "string", - "sensitive": true - }, - "CreateDate": { - "type": "timestamp" - } - } - } - } - } - }, - "CreateAccountAlias": { - "input": { - "type": "structure", - "required": [ - "AccountAlias" - ], - "members": { - "AccountAlias": {} - } - } - }, - "CreateGroup": { - "input": { - "type": "structure", - "required": [ - "GroupName" - ], - "members": { - "Path": {}, - "GroupName": {} - } - }, - "output": { - "resultWrapper": "CreateGroupResult", - "type": "structure", - "required": [ - "Group" - ], - "members": { - "Group": { - "shape": "Ss" - } - } - } - }, - "CreateInstanceProfile": { - "input": { - "type": "structure", - "required": [ - "InstanceProfileName" - ], - "members": { - "InstanceProfileName": {}, - "Path": {} - } - }, - "output": { - "resultWrapper": "CreateInstanceProfileResult", - "type": "structure", - "required": [ - "InstanceProfile" - ], - "members": { - "InstanceProfile": { - "shape": "Sw" - } - } - } - }, - "CreateLoginProfile": { - "input": { - "type": "structure", - "required": [ - "UserName", - "Password" - ], - "members": { - "UserName": {}, - "Password": { - "shape": "Sf" - }, - "PasswordResetRequired": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "CreateLoginProfileResult", - "type": "structure", - "required": [ - "LoginProfile" - ], - "members": { - "LoginProfile": { - "shape": "S13" - } - } - } - }, - "CreateOpenIDConnectProvider": { - "input": { - "type": "structure", - "required": [ - "Url", - "ThumbprintList" - ], - "members": { - "Url": {}, - "ClientIDList": { - "shape": "S16" - }, - "ThumbprintList": { - "shape": "S17" - } - } - }, - "output": { - "resultWrapper": "CreateOpenIDConnectProviderResult", - "type": "structure", - "members": { - "OpenIDConnectProviderArn": {} - } - } - }, - "CreatePolicy": { - "input": { - "type": "structure", - "required": [ - "PolicyName", - "PolicyDocument" - ], - "members": { - "PolicyName": {}, - "Path": {}, - "PolicyDocument": {}, - "Description": {} - } - }, - "output": { - "resultWrapper": "CreatePolicyResult", - "type": "structure", - "members": { - "Policy": { - "shape": "S1f" - } - } - } - }, - "CreatePolicyVersion": { - "input": { - "type": "structure", - "required": [ - "PolicyArn", - "PolicyDocument" - ], - "members": { - "PolicyArn": {}, - "PolicyDocument": {}, - "SetAsDefault": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "CreatePolicyVersionResult", - "type": "structure", - "members": { - "PolicyVersion": { - "shape": "S1k" - } - } - } - }, - "CreateRole": { - "input": { - "type": "structure", - "required": [ - "RoleName", - "AssumeRolePolicyDocument" - ], - "members": { - "Path": {}, - "RoleName": {}, - "AssumeRolePolicyDocument": {} - } - }, - "output": { - "resultWrapper": "CreateRoleResult", - "type": "structure", - "required": [ - "Role" - ], - "members": { - "Role": { - "shape": "Sy" - } - } - } - }, - "CreateSAMLProvider": { - "input": { - "type": "structure", - "required": [ - "SAMLMetadataDocument", - "Name" - ], - "members": { - "SAMLMetadataDocument": {}, - "Name": {} - } - }, - "output": { - "resultWrapper": "CreateSAMLProviderResult", - "type": "structure", - "members": { - "SAMLProviderArn": {} - } - } - }, - "CreateUser": { - "input": { - "type": "structure", - "required": [ - "UserName" - ], - "members": { - "Path": {}, - "UserName": {} - } - }, - "output": { - "resultWrapper": "CreateUserResult", - "type": "structure", - "members": { - "User": { - "shape": "S1t" - } - } - } - }, - "CreateVirtualMFADevice": { - "input": { - "type": "structure", - "required": [ - "VirtualMFADeviceName" - ], - "members": { - "Path": {}, - "VirtualMFADeviceName": {} - } - }, - "output": { - "resultWrapper": "CreateVirtualMFADeviceResult", - "type": "structure", - "required": [ - "VirtualMFADevice" - ], - "members": { - "VirtualMFADevice": { - "shape": "S1x" - } - } - } - }, - "DeactivateMFADevice": { - "input": { - "type": "structure", - "required": [ - "UserName", - "SerialNumber" - ], - "members": { - "UserName": {}, - "SerialNumber": {} - } - } - }, - "DeleteAccessKey": { - "input": { - "type": "structure", - "required": [ - "AccessKeyId" - ], - "members": { - "UserName": {}, - "AccessKeyId": {} - } - } - }, - "DeleteAccountAlias": { - "input": { - "type": "structure", - "required": [ - "AccountAlias" - ], - "members": { - "AccountAlias": {} - } - } - }, - "DeleteAccountPasswordPolicy": {}, - "DeleteGroup": { - "input": { - "type": "structure", - "required": [ - "GroupName" - ], - "members": { - "GroupName": {} - } - } - }, - "DeleteGroupPolicy": { - "input": { - "type": "structure", - "required": [ - "GroupName", - "PolicyName" - ], - "members": { - "GroupName": {}, - "PolicyName": {} - } - } - }, - "DeleteInstanceProfile": { - "input": { - "type": "structure", - "required": [ - "InstanceProfileName" - ], - "members": { - "InstanceProfileName": {} - } - } - }, - "DeleteLoginProfile": { - "input": { - "type": "structure", - "required": [ - "UserName" - ], - "members": { - "UserName": {} - } - } - }, - "DeleteOpenIDConnectProvider": { - "input": { - "type": "structure", - "required": [ - "OpenIDConnectProviderArn" - ], - "members": { - "OpenIDConnectProviderArn": {} - } - } - }, - "DeletePolicy": { - "input": { - "type": "structure", - "required": [ - "PolicyArn" - ], - "members": { - "PolicyArn": {} - } - } - }, - "DeletePolicyVersion": { - "input": { - "type": "structure", - "required": [ - "PolicyArn", - "VersionId" - ], - "members": { - "PolicyArn": {}, - "VersionId": {} - } - } - }, - "DeleteRole": { - "input": { - "type": "structure", - "required": [ - "RoleName" - ], - "members": { - "RoleName": {} - } - } - }, - "DeleteRolePolicy": { - "input": { - "type": "structure", - "required": [ - "RoleName", - "PolicyName" - ], - "members": { - "RoleName": {}, - "PolicyName": {} - } - } - }, - "DeleteSAMLProvider": { - "input": { - "type": "structure", - "required": [ - "SAMLProviderArn" - ], - "members": { - "SAMLProviderArn": {} - } - } - }, - "DeleteSSHPublicKey": { - "input": { - "type": "structure", - "required": [ - "UserName", - "SSHPublicKeyId" - ], - "members": { - "UserName": {}, - "SSHPublicKeyId": {} - } - } - }, - "DeleteServerCertificate": { - "input": { - "type": "structure", - "required": [ - "ServerCertificateName" - ], - "members": { - "ServerCertificateName": {} - } - } - }, - "DeleteSigningCertificate": { - "input": { - "type": "structure", - "required": [ - "CertificateId" - ], - "members": { - "UserName": {}, - "CertificateId": {} - } - } - }, - "DeleteUser": { - "input": { - "type": "structure", - "required": [ - "UserName" - ], - "members": { - "UserName": {} - } - } - }, - "DeleteUserPolicy": { - "input": { - "type": "structure", - "required": [ - "UserName", - "PolicyName" - ], - "members": { - "UserName": {}, - "PolicyName": {} - } - } - }, - "DeleteVirtualMFADevice": { - "input": { - "type": "structure", - "required": [ - "SerialNumber" - ], - "members": { - "SerialNumber": {} - } - } - }, - "DetachGroupPolicy": { - "input": { - "type": "structure", - "required": [ - "GroupName", - "PolicyArn" - ], - "members": { - "GroupName": {}, - "PolicyArn": {} - } - } - }, - "DetachRolePolicy": { - "input": { - "type": "structure", - "required": [ - "RoleName", - "PolicyArn" - ], - "members": { - "RoleName": {}, - "PolicyArn": {} - } - } - }, - "DetachUserPolicy": { - "input": { - "type": "structure", - "required": [ - "UserName", - "PolicyArn" - ], - "members": { - "UserName": {}, - "PolicyArn": {} - } - } - }, - "EnableMFADevice": { - "input": { - "type": "structure", - "required": [ - "UserName", - "SerialNumber", - "AuthenticationCode1", - "AuthenticationCode2" - ], - "members": { - "UserName": {}, - "SerialNumber": {}, - "AuthenticationCode1": {}, - "AuthenticationCode2": {} - } - } - }, - "GenerateCredentialReport": { - "output": { - "resultWrapper": "GenerateCredentialReportResult", - "type": "structure", - "members": { - "State": {}, - "Description": {} - } - } - }, - "GetAccessKeyLastUsed": { - "input": { - "type": "structure", - "required": [ - "AccessKeyId" - ], - "members": { - "AccessKeyId": {} - } - }, - "output": { - "resultWrapper": "GetAccessKeyLastUsedResult", - "type": "structure", - "members": { - "UserName": {}, - "AccessKeyLastUsed": { - "type": "structure", - "required": [ - "LastUsedDate", - "ServiceName", - "Region" - ], - "members": { - "LastUsedDate": { - "type": "timestamp" - }, - "ServiceName": {}, - "Region": {} - } - } - } - } - }, - "GetAccountAuthorizationDetails": { - "input": { - "type": "structure", - "members": { - "Filter": { - "type": "list", - "member": {} - }, - "MaxItems": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "GetAccountAuthorizationDetailsResult", - "type": "structure", - "members": { - "UserDetailList": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Path": {}, - "UserName": {}, - "UserId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - }, - "UserPolicyList": { - "shape": "S36" - }, - "GroupList": { - "type": "list", - "member": {} - }, - "AttachedManagedPolicies": { - "shape": "S39" - } - } - } - }, - "GroupDetailList": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Path": {}, - "GroupName": {}, - "GroupId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - }, - "GroupPolicyList": { - "shape": "S36" - }, - "AttachedManagedPolicies": { - "shape": "S39" - } - } - } - }, - "RoleDetailList": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Path": {}, - "RoleName": {}, - "RoleId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - }, - "AssumeRolePolicyDocument": {}, - "InstanceProfileList": { - "shape": "S3f" - }, - "RolePolicyList": { - "shape": "S36" - }, - "AttachedManagedPolicies": { - "shape": "S39" - } - } - } - }, - "Policies": { - "type": "list", - "member": { - "type": "structure", - "members": { - "PolicyName": {}, - "PolicyId": {}, - "Arn": {}, - "Path": {}, - "DefaultVersionId": {}, - "AttachmentCount": { - "type": "integer" - }, - "IsAttachable": { - "type": "boolean" - }, - "Description": {}, - "CreateDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "PolicyVersionList": { - "shape": "S3i" - } - } - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "GetAccountPasswordPolicy": { - "output": { - "resultWrapper": "GetAccountPasswordPolicyResult", - "type": "structure", - "required": [ - "PasswordPolicy" - ], - "members": { - "PasswordPolicy": { - "type": "structure", - "members": { - "MinimumPasswordLength": { - "type": "integer" - }, - "RequireSymbols": { - "type": "boolean" - }, - "RequireNumbers": { - "type": "boolean" - }, - "RequireUppercaseCharacters": { - "type": "boolean" - }, - "RequireLowercaseCharacters": { - "type": "boolean" - }, - "AllowUsersToChangePassword": { - "type": "boolean" - }, - "ExpirePasswords": { - "type": "boolean" - }, - "MaxPasswordAge": { - "type": "integer" - }, - "PasswordReusePrevention": { - "type": "integer" - }, - "HardExpiry": { - "type": "boolean" - } - } - } - } - } - }, - "GetAccountSummary": { - "output": { - "resultWrapper": "GetAccountSummaryResult", - "type": "structure", - "members": { - "SummaryMap": { - "type": "map", - "key": {}, - "value": { - "type": "integer" - } - } - } - } - }, - "GetCredentialReport": { - "output": { - "resultWrapper": "GetCredentialReportResult", - "type": "structure", - "members": { - "Content": { - "type": "blob" - }, - "ReportFormat": {}, - "GeneratedTime": { - "type": "timestamp" - } - } - } - }, - "GetGroup": { - "input": { - "type": "structure", - "required": [ - "GroupName" - ], - "members": { - "GroupName": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "GetGroupResult", - "type": "structure", - "required": [ - "Group", - "Users" - ], - "members": { - "Group": { - "shape": "Ss" - }, - "Users": { - "shape": "S3y" - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "GetGroupPolicy": { - "input": { - "type": "structure", - "required": [ - "GroupName", - "PolicyName" - ], - "members": { - "GroupName": {}, - "PolicyName": {} - } - }, - "output": { - "resultWrapper": "GetGroupPolicyResult", - "type": "structure", - "required": [ - "GroupName", - "PolicyName", - "PolicyDocument" - ], - "members": { - "GroupName": {}, - "PolicyName": {}, - "PolicyDocument": {} - } - } - }, - "GetInstanceProfile": { - "input": { - "type": "structure", - "required": [ - "InstanceProfileName" - ], - "members": { - "InstanceProfileName": {} - } - }, - "output": { - "resultWrapper": "GetInstanceProfileResult", - "type": "structure", - "required": [ - "InstanceProfile" - ], - "members": { - "InstanceProfile": { - "shape": "Sw" - } - } - } - }, - "GetLoginProfile": { - "input": { - "type": "structure", - "required": [ - "UserName" - ], - "members": { - "UserName": {} - } - }, - "output": { - "resultWrapper": "GetLoginProfileResult", - "type": "structure", - "required": [ - "LoginProfile" - ], - "members": { - "LoginProfile": { - "shape": "S13" - } - } - } - }, - "GetOpenIDConnectProvider": { - "input": { - "type": "structure", - "required": [ - "OpenIDConnectProviderArn" - ], - "members": { - "OpenIDConnectProviderArn": {} - } - }, - "output": { - "resultWrapper": "GetOpenIDConnectProviderResult", - "type": "structure", - "members": { - "Url": {}, - "ClientIDList": { - "shape": "S16" - }, - "ThumbprintList": { - "shape": "S17" - }, - "CreateDate": { - "type": "timestamp" - } - } - } - }, - "GetPolicy": { - "input": { - "type": "structure", - "required": [ - "PolicyArn" - ], - "members": { - "PolicyArn": {} - } - }, - "output": { - "resultWrapper": "GetPolicyResult", - "type": "structure", - "members": { - "Policy": { - "shape": "S1f" - } - } - } - }, - "GetPolicyVersion": { - "input": { - "type": "structure", - "required": [ - "PolicyArn", - "VersionId" - ], - "members": { - "PolicyArn": {}, - "VersionId": {} - } - }, - "output": { - "resultWrapper": "GetPolicyVersionResult", - "type": "structure", - "members": { - "PolicyVersion": { - "shape": "S1k" - } - } - } - }, - "GetRole": { - "input": { - "type": "structure", - "required": [ - "RoleName" - ], - "members": { - "RoleName": {} - } - }, - "output": { - "resultWrapper": "GetRoleResult", - "type": "structure", - "required": [ - "Role" - ], - "members": { - "Role": { - "shape": "Sy" - } - } - } - }, - "GetRolePolicy": { - "input": { - "type": "structure", - "required": [ - "RoleName", - "PolicyName" - ], - "members": { - "RoleName": {}, - "PolicyName": {} - } - }, - "output": { - "resultWrapper": "GetRolePolicyResult", - "type": "structure", - "required": [ - "RoleName", - "PolicyName", - "PolicyDocument" - ], - "members": { - "RoleName": {}, - "PolicyName": {}, - "PolicyDocument": {} - } - } - }, - "GetSAMLProvider": { - "input": { - "type": "structure", - "required": [ - "SAMLProviderArn" - ], - "members": { - "SAMLProviderArn": {} - } - }, - "output": { - "resultWrapper": "GetSAMLProviderResult", - "type": "structure", - "members": { - "SAMLMetadataDocument": {}, - "CreateDate": { - "type": "timestamp" - }, - "ValidUntil": { - "type": "timestamp" - } - } - } - }, - "GetSSHPublicKey": { - "input": { - "type": "structure", - "required": [ - "UserName", - "SSHPublicKeyId", - "Encoding" - ], - "members": { - "UserName": {}, - "SSHPublicKeyId": {}, - "Encoding": {} - } - }, - "output": { - "resultWrapper": "GetSSHPublicKeyResult", - "type": "structure", - "members": { - "SSHPublicKey": { - "shape": "S4k" - } - } - } - }, - "GetServerCertificate": { - "input": { - "type": "structure", - "required": [ - "ServerCertificateName" - ], - "members": { - "ServerCertificateName": {} - } - }, - "output": { - "resultWrapper": "GetServerCertificateResult", - "type": "structure", - "required": [ - "ServerCertificate" - ], - "members": { - "ServerCertificate": { - "type": "structure", - "required": [ - "ServerCertificateMetadata", - "CertificateBody" - ], - "members": { - "ServerCertificateMetadata": { - "shape": "S4q" - }, - "CertificateBody": {}, - "CertificateChain": {} - } - } - } - } - }, - "GetUser": { - "input": { - "type": "structure", - "members": { - "UserName": {} - } - }, - "output": { - "resultWrapper": "GetUserResult", - "type": "structure", - "required": [ - "User" - ], - "members": { - "User": { - "shape": "S1t" - } - } - } - }, - "GetUserPolicy": { - "input": { - "type": "structure", - "required": [ - "UserName", - "PolicyName" - ], - "members": { - "UserName": {}, - "PolicyName": {} - } - }, - "output": { - "resultWrapper": "GetUserPolicyResult", - "type": "structure", - "required": [ - "UserName", - "PolicyName", - "PolicyDocument" - ], - "members": { - "UserName": {}, - "PolicyName": {}, - "PolicyDocument": {} - } - } - }, - "ListAccessKeys": { - "input": { - "type": "structure", - "members": { - "UserName": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListAccessKeysResult", - "type": "structure", - "required": [ - "AccessKeyMetadata" - ], - "members": { - "AccessKeyMetadata": { - "type": "list", - "member": { - "type": "structure", - "members": { - "UserName": {}, - "AccessKeyId": {}, - "Status": {}, - "CreateDate": { - "type": "timestamp" - } - } - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListAccountAliases": { - "input": { - "type": "structure", - "members": { - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListAccountAliasesResult", - "type": "structure", - "required": [ - "AccountAliases" - ], - "members": { - "AccountAliases": { - "type": "list", - "member": {} - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListAttachedGroupPolicies": { - "input": { - "type": "structure", - "required": [ - "GroupName" - ], - "members": { - "GroupName": {}, - "PathPrefix": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListAttachedGroupPoliciesResult", - "type": "structure", - "members": { - "AttachedPolicies": { - "shape": "S39" - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListAttachedRolePolicies": { - "input": { - "type": "structure", - "required": [ - "RoleName" - ], - "members": { - "RoleName": {}, - "PathPrefix": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListAttachedRolePoliciesResult", - "type": "structure", - "members": { - "AttachedPolicies": { - "shape": "S39" - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListAttachedUserPolicies": { - "input": { - "type": "structure", - "required": [ - "UserName" - ], - "members": { - "UserName": {}, - "PathPrefix": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListAttachedUserPoliciesResult", - "type": "structure", - "members": { - "AttachedPolicies": { - "shape": "S39" - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListEntitiesForPolicy": { - "input": { - "type": "structure", - "required": [ - "PolicyArn" - ], - "members": { - "PolicyArn": {}, - "EntityFilter": {}, - "PathPrefix": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListEntitiesForPolicyResult", - "type": "structure", - "members": { - "PolicyGroups": { - "type": "list", - "member": { - "type": "structure", - "members": { - "GroupName": {} - } - } - }, - "PolicyUsers": { - "type": "list", - "member": { - "type": "structure", - "members": { - "UserName": {} - } - } - }, - "PolicyRoles": { - "type": "list", - "member": { - "type": "structure", - "members": { - "RoleName": {} - } - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListGroupPolicies": { - "input": { - "type": "structure", - "required": [ - "GroupName" - ], - "members": { - "GroupName": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListGroupPoliciesResult", - "type": "structure", - "required": [ - "PolicyNames" - ], - "members": { - "PolicyNames": { - "shape": "S5k" - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListGroups": { - "input": { - "type": "structure", - "members": { - "PathPrefix": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListGroupsResult", - "type": "structure", - "required": [ - "Groups" - ], - "members": { - "Groups": { - "shape": "S5o" - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListGroupsForUser": { - "input": { - "type": "structure", - "required": [ - "UserName" - ], - "members": { - "UserName": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListGroupsForUserResult", - "type": "structure", - "required": [ - "Groups" - ], - "members": { - "Groups": { - "shape": "S5o" - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListInstanceProfiles": { - "input": { - "type": "structure", - "members": { - "PathPrefix": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListInstanceProfilesResult", - "type": "structure", - "required": [ - "InstanceProfiles" - ], - "members": { - "InstanceProfiles": { - "shape": "S3f" - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListInstanceProfilesForRole": { - "input": { - "type": "structure", - "required": [ - "RoleName" - ], - "members": { - "RoleName": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListInstanceProfilesForRoleResult", - "type": "structure", - "required": [ - "InstanceProfiles" - ], - "members": { - "InstanceProfiles": { - "shape": "S3f" - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListMFADevices": { - "input": { - "type": "structure", - "members": { - "UserName": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListMFADevicesResult", - "type": "structure", - "required": [ - "MFADevices" - ], - "members": { - "MFADevices": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "UserName", - "SerialNumber", - "EnableDate" - ], - "members": { - "UserName": {}, - "SerialNumber": {}, - "EnableDate": { - "type": "timestamp" - } - } - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListOpenIDConnectProviders": { - "input": { - "type": "structure", - "members": {} - }, - "output": { - "resultWrapper": "ListOpenIDConnectProvidersResult", - "type": "structure", - "members": { - "OpenIDConnectProviderList": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Arn": {} - } - } - } - } - } - }, - "ListPolicies": { - "input": { - "type": "structure", - "members": { - "Scope": {}, - "OnlyAttached": { - "type": "boolean" - }, - "PathPrefix": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListPoliciesResult", - "type": "structure", - "members": { - "Policies": { - "type": "list", - "member": { - "shape": "S1f" - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListPolicyVersions": { - "input": { - "type": "structure", - "required": [ - "PolicyArn" - ], - "members": { - "PolicyArn": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListPolicyVersionsResult", - "type": "structure", - "members": { - "Versions": { - "shape": "S3i" - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListRolePolicies": { - "input": { - "type": "structure", - "required": [ - "RoleName" - ], - "members": { - "RoleName": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListRolePoliciesResult", - "type": "structure", - "required": [ - "PolicyNames" - ], - "members": { - "PolicyNames": { - "shape": "S5k" - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListRoles": { - "input": { - "type": "structure", - "members": { - "PathPrefix": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListRolesResult", - "type": "structure", - "required": [ - "Roles" - ], - "members": { - "Roles": { - "shape": "Sx" - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListSAMLProviders": { - "input": { - "type": "structure", - "members": {} - }, - "output": { - "resultWrapper": "ListSAMLProvidersResult", - "type": "structure", - "members": { - "SAMLProviderList": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Arn": {}, - "ValidUntil": { - "type": "timestamp" - }, - "CreateDate": { - "type": "timestamp" - } - } - } - } - } - } - }, - "ListSSHPublicKeys": { - "input": { - "type": "structure", - "members": { - "UserName": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListSSHPublicKeysResult", - "type": "structure", - "members": { - "SSHPublicKeys": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "UserName", - "SSHPublicKeyId", - "Status", - "UploadDate" - ], - "members": { - "UserName": {}, - "SSHPublicKeyId": {}, - "Status": {}, - "UploadDate": { - "type": "timestamp" - } - } - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListServerCertificates": { - "input": { - "type": "structure", - "members": { - "PathPrefix": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListServerCertificatesResult", - "type": "structure", - "required": [ - "ServerCertificateMetadataList" - ], - "members": { - "ServerCertificateMetadataList": { - "type": "list", - "member": { - "shape": "S4q" - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListSigningCertificates": { - "input": { - "type": "structure", - "members": { - "UserName": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListSigningCertificatesResult", - "type": "structure", - "required": [ - "Certificates" - ], - "members": { - "Certificates": { - "type": "list", - "member": { - "shape": "S6r" - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListUserPolicies": { - "input": { - "type": "structure", - "required": [ - "UserName" - ], - "members": { - "UserName": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListUserPoliciesResult", - "type": "structure", - "required": [ - "PolicyNames" - ], - "members": { - "PolicyNames": { - "shape": "S5k" - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListUsers": { - "input": { - "type": "structure", - "members": { - "PathPrefix": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListUsersResult", - "type": "structure", - "required": [ - "Users" - ], - "members": { - "Users": { - "shape": "S3y" - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "ListVirtualMFADevices": { - "input": { - "type": "structure", - "members": { - "AssignmentStatus": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ListVirtualMFADevicesResult", - "type": "structure", - "required": [ - "VirtualMFADevices" - ], - "members": { - "VirtualMFADevices": { - "type": "list", - "member": { - "shape": "S1x" - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "PutGroupPolicy": { - "input": { - "type": "structure", - "required": [ - "GroupName", - "PolicyName", - "PolicyDocument" - ], - "members": { - "GroupName": {}, - "PolicyName": {}, - "PolicyDocument": {} - } - } - }, - "PutRolePolicy": { - "input": { - "type": "structure", - "required": [ - "RoleName", - "PolicyName", - "PolicyDocument" - ], - "members": { - "RoleName": {}, - "PolicyName": {}, - "PolicyDocument": {} - } - } - }, - "PutUserPolicy": { - "input": { - "type": "structure", - "required": [ - "UserName", - "PolicyName", - "PolicyDocument" - ], - "members": { - "UserName": {}, - "PolicyName": {}, - "PolicyDocument": {} - } - } - }, - "RemoveClientIDFromOpenIDConnectProvider": { - "input": { - "type": "structure", - "required": [ - "OpenIDConnectProviderArn", - "ClientID" - ], - "members": { - "OpenIDConnectProviderArn": {}, - "ClientID": {} - } - } - }, - "RemoveRoleFromInstanceProfile": { - "input": { - "type": "structure", - "required": [ - "InstanceProfileName", - "RoleName" - ], - "members": { - "InstanceProfileName": {}, - "RoleName": {} - } - } - }, - "RemoveUserFromGroup": { - "input": { - "type": "structure", - "required": [ - "GroupName", - "UserName" - ], - "members": { - "GroupName": {}, - "UserName": {} - } - } - }, - "ResyncMFADevice": { - "input": { - "type": "structure", - "required": [ - "UserName", - "SerialNumber", - "AuthenticationCode1", - "AuthenticationCode2" - ], - "members": { - "UserName": {}, - "SerialNumber": {}, - "AuthenticationCode1": {}, - "AuthenticationCode2": {} - } - } - }, - "SetDefaultPolicyVersion": { - "input": { - "type": "structure", - "required": [ - "PolicyArn", - "VersionId" - ], - "members": { - "PolicyArn": {}, - "VersionId": {} - } - } - }, - "UpdateAccessKey": { - "input": { - "type": "structure", - "required": [ - "AccessKeyId", - "Status" - ], - "members": { - "UserName": {}, - "AccessKeyId": {}, - "Status": {} - } - } - }, - "UpdateAccountPasswordPolicy": { - "input": { - "type": "structure", - "members": { - "MinimumPasswordLength": { - "type": "integer" - }, - "RequireSymbols": { - "type": "boolean" - }, - "RequireNumbers": { - "type": "boolean" - }, - "RequireUppercaseCharacters": { - "type": "boolean" - }, - "RequireLowercaseCharacters": { - "type": "boolean" - }, - "AllowUsersToChangePassword": { - "type": "boolean" - }, - "MaxPasswordAge": { - "type": "integer" - }, - "PasswordReusePrevention": { - "type": "integer" - }, - "HardExpiry": { - "type": "boolean" - } - } - } - }, - "UpdateAssumeRolePolicy": { - "input": { - "type": "structure", - "required": [ - "RoleName", - "PolicyDocument" - ], - "members": { - "RoleName": {}, - "PolicyDocument": {} - } - } - }, - "UpdateGroup": { - "input": { - "type": "structure", - "required": [ - "GroupName" - ], - "members": { - "GroupName": {}, - "NewPath": {}, - "NewGroupName": {} - } - } - }, - "UpdateLoginProfile": { - "input": { - "type": "structure", - "required": [ - "UserName" - ], - "members": { - "UserName": {}, - "Password": { - "shape": "Sf" - }, - "PasswordResetRequired": { - "type": "boolean" - } - } - } - }, - "UpdateOpenIDConnectProviderThumbprint": { - "input": { - "type": "structure", - "required": [ - "OpenIDConnectProviderArn", - "ThumbprintList" - ], - "members": { - "OpenIDConnectProviderArn": {}, - "ThumbprintList": { - "shape": "S17" - } - } - } - }, - "UpdateSAMLProvider": { - "input": { - "type": "structure", - "required": [ - "SAMLMetadataDocument", - "SAMLProviderArn" - ], - "members": { - "SAMLMetadataDocument": {}, - "SAMLProviderArn": {} - } - }, - "output": { - "resultWrapper": "UpdateSAMLProviderResult", - "type": "structure", - "members": { - "SAMLProviderArn": {} - } - } - }, - "UpdateSSHPublicKey": { - "input": { - "type": "structure", - "required": [ - "UserName", - "SSHPublicKeyId", - "Status" - ], - "members": { - "UserName": {}, - "SSHPublicKeyId": {}, - "Status": {} - } - } - }, - "UpdateServerCertificate": { - "input": { - "type": "structure", - "required": [ - "ServerCertificateName" - ], - "members": { - "ServerCertificateName": {}, - "NewPath": {}, - "NewServerCertificateName": {} - } - } - }, - "UpdateSigningCertificate": { - "input": { - "type": "structure", - "required": [ - "CertificateId", - "Status" - ], - "members": { - "UserName": {}, - "CertificateId": {}, - "Status": {} - } - } - }, - "UpdateUser": { - "input": { - "type": "structure", - "required": [ - "UserName" - ], - "members": { - "UserName": {}, - "NewPath": {}, - "NewUserName": {} - } - } - }, - "UploadSSHPublicKey": { - "input": { - "type": "structure", - "required": [ - "UserName", - "SSHPublicKeyBody" - ], - "members": { - "UserName": {}, - "SSHPublicKeyBody": {} - } - }, - "output": { - "resultWrapper": "UploadSSHPublicKeyResult", - "type": "structure", - "members": { - "SSHPublicKey": { - "shape": "S4k" - } - } - } - }, - "UploadServerCertificate": { - "input": { - "type": "structure", - "required": [ - "ServerCertificateName", - "CertificateBody", - "PrivateKey" - ], - "members": { - "Path": {}, - "ServerCertificateName": {}, - "CertificateBody": {}, - "PrivateKey": { - "type": "string", - "sensitive": true - }, - "CertificateChain": {} - } - }, - "output": { - "resultWrapper": "UploadServerCertificateResult", - "type": "structure", - "members": { - "ServerCertificateMetadata": { - "shape": "S4q" - } - } - } - }, - "UploadSigningCertificate": { - "input": { - "type": "structure", - "required": [ - "CertificateBody" - ], - "members": { - "UserName": {}, - "CertificateBody": {} - } - }, - "output": { - "resultWrapper": "UploadSigningCertificateResult", - "type": "structure", - "required": [ - "Certificate" - ], - "members": { - "Certificate": { - "shape": "S6r" - } - } - } - } - }, - "shapes": { - "Sf": { - "type": "string", - "sensitive": true - }, - "Ss": { - "type": "structure", - "required": [ - "Path", - "GroupName", - "GroupId", - "Arn", - "CreateDate" - ], - "members": { - "Path": {}, - "GroupName": {}, - "GroupId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - } - } - }, - "Sw": { - "type": "structure", - "required": [ - "Path", - "InstanceProfileName", - "InstanceProfileId", - "Arn", - "CreateDate", - "Roles" - ], - "members": { - "Path": {}, - "InstanceProfileName": {}, - "InstanceProfileId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - }, - "Roles": { - "shape": "Sx" - } - } - }, - "Sx": { - "type": "list", - "member": { - "shape": "Sy" - } - }, - "Sy": { - "type": "structure", - "required": [ - "Path", - "RoleName", - "RoleId", - "Arn", - "CreateDate" - ], - "members": { - "Path": {}, - "RoleName": {}, - "RoleId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - }, - "AssumeRolePolicyDocument": {} - } - }, - "S13": { - "type": "structure", - "required": [ - "UserName", - "CreateDate" - ], - "members": { - "UserName": {}, - "CreateDate": { - "type": "timestamp" - }, - "PasswordResetRequired": { - "type": "boolean" - } - } - }, - "S16": { - "type": "list", - "member": {} - }, - "S17": { - "type": "list", - "member": {} - }, - "S1f": { - "type": "structure", - "members": { - "PolicyName": {}, - "PolicyId": {}, - "Arn": {}, - "Path": {}, - "DefaultVersionId": {}, - "AttachmentCount": { - "type": "integer" - }, - "IsAttachable": { - "type": "boolean" - }, - "Description": {}, - "CreateDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - } - } - }, - "S1k": { - "type": "structure", - "members": { - "Document": {}, - "VersionId": {}, - "IsDefaultVersion": { - "type": "boolean" - }, - "CreateDate": { - "type": "timestamp" - } - } - }, - "S1t": { - "type": "structure", - "required": [ - "Path", - "UserName", - "UserId", - "Arn", - "CreateDate" - ], - "members": { - "Path": {}, - "UserName": {}, - "UserId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - }, - "PasswordLastUsed": { - "type": "timestamp" - } - } - }, - "S1x": { - "type": "structure", - "required": [ - "SerialNumber" - ], - "members": { - "SerialNumber": {}, - "Base32StringSeed": { - "shape": "S1z" - }, - "QRCodePNG": { - "shape": "S1z" - }, - "User": { - "shape": "S1t" - }, - "EnableDate": { - "type": "timestamp" - } - } - }, - "S1z": { - "type": "blob", - "sensitive": true - }, - "S36": { - "type": "list", - "member": { - "type": "structure", - "members": { - "PolicyName": {}, - "PolicyDocument": {} - } - } - }, - "S39": { - "type": "list", - "member": { - "type": "structure", - "members": { - "PolicyName": {}, - "PolicyArn": {} - } - } - }, - "S3f": { - "type": "list", - "member": { - "shape": "Sw" - } - }, - "S3i": { - "type": "list", - "member": { - "shape": "S1k" - } - }, - "S3y": { - "type": "list", - "member": { - "shape": "S1t" - } - }, - "S4k": { - "type": "structure", - "required": [ - "UserName", - "SSHPublicKeyId", - "Fingerprint", - "SSHPublicKeyBody", - "Status" - ], - "members": { - "UserName": {}, - "SSHPublicKeyId": {}, - "Fingerprint": {}, - "SSHPublicKeyBody": {}, - "Status": {}, - "UploadDate": { - "type": "timestamp" - } - } - }, - "S4q": { - "type": "structure", - "required": [ - "Path", - "ServerCertificateName", - "ServerCertificateId", - "Arn" - ], - "members": { - "Path": {}, - "ServerCertificateName": {}, - "ServerCertificateId": {}, - "Arn": {}, - "UploadDate": { - "type": "timestamp" - }, - "Expiration": { - "type": "timestamp" - } - } - }, - "S5k": { - "type": "list", - "member": {} - }, - "S5o": { - "type": "list", - "member": { - "shape": "Ss" - } - }, - "S6r": { - "type": "structure", - "required": [ - "UserName", - "CertificateId", - "CertificateBody", - "Status" - ], - "members": { - "UserName": {}, - "CertificateId": {}, - "CertificateBody": {}, - "Status": {}, - "UploadDate": { - "type": "timestamp" - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/iam-2010-05-08.paginators.json b/cli/node_modules/aws-sdk/apis/iam-2010-05-08.paginators.json deleted file mode 100644 index 4ea9de1a9..000000000 --- a/cli/node_modules/aws-sdk/apis/iam-2010-05-08.paginators.json +++ /dev/null @@ -1,164 +0,0 @@ -{ - "pagination": { - "GetGroup": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "Users" - }, - "ListAccessKeys": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "AccessKeyMetadata" - }, - "ListAccountAliases": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "AccountAliases" - }, - "ListAttachedGroupPolicies": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "AttachedPolicies" - }, - "ListAttachedRolePolicies": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "AttachedPolicies" - }, - "ListAttachedUserPolicies": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "AttachedPolicies" - }, - "ListEntitiesForPolicy": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": [ - "PolicyGroups", - "PolicyUsers", - "PolicyRoles" - ] - }, - "ListGroupPolicies": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "PolicyNames" - }, - "ListGroups": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "Groups" - }, - "ListGroupsForUser": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "Groups" - }, - "ListInstanceProfiles": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "InstanceProfiles" - }, - "ListInstanceProfilesForRole": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "InstanceProfiles" - }, - "ListMFADevices": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "MFADevices" - }, - "ListPolicies": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "Policies" - }, - "ListRolePolicies": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "PolicyNames" - }, - "ListRoles": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "Roles" - }, - "ListSAMLProviders": { - "result_key": "SAMLProviderList" - }, - "ListServerCertificates": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "ServerCertificateMetadataList" - }, - "ListSigningCertificates": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "Certificates" - }, - "ListUserPolicies": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "PolicyNames" - }, - "ListUsers": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "Users" - }, - "ListVirtualMFADevices": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "VirtualMFADevices" - }, - "GetAccountAuthorizationDetails": { - "input_token": "Marker", - "output_token": "Marker", - "more_results": "IsTruncated", - "limit_key": "MaxItems" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/importexport-2010-06-01.min.json b/cli/node_modules/aws-sdk/apis/importexport-2010-06-01.min.json deleted file mode 100644 index 5e4f2fb10..000000000 --- a/cli/node_modules/aws-sdk/apis/importexport-2010-06-01.min.json +++ /dev/null @@ -1,241 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2010-06-01", - "endpointPrefix": "importexport", - "globalEndpoint": "importexport.amazonaws.com", - "serviceFullName": "AWS Import/Export", - "signatureVersion": "v2", - "xmlNamespace": "http://importexport.amazonaws.com/doc/2010-06-01/", - "protocol": "query" - }, - "operations": { - "CancelJob": { - "http": { - "requestUri": "/?Operation=CancelJob" - }, - "input": { - "type": "structure", - "required": [ - "JobId" - ], - "members": { - "JobId": {}, - "APIVersion": {} - } - }, - "output": { - "resultWrapper": "CancelJobResult", - "type": "structure", - "members": { - "Success": { - "type": "boolean" - } - } - } - }, - "CreateJob": { - "http": { - "requestUri": "/?Operation=CreateJob" - }, - "input": { - "type": "structure", - "required": [ - "JobType", - "Manifest", - "ValidateOnly" - ], - "members": { - "JobType": {}, - "Manifest": {}, - "ManifestAddendum": {}, - "ValidateOnly": { - "type": "boolean" - }, - "APIVersion": {} - } - }, - "output": { - "resultWrapper": "CreateJobResult", - "type": "structure", - "members": { - "JobId": {}, - "JobType": {}, - "Signature": {}, - "SignatureFileContents": {}, - "WarningMessage": {}, - "ArtifactList": { - "shape": "Sf" - } - } - } - }, - "GetShippingLabel": { - "http": { - "requestUri": "/?Operation=GetShippingLabel" - }, - "input": { - "type": "structure", - "required": [ - "jobIds" - ], - "members": { - "jobIds": { - "type": "list", - "member": {} - }, - "name": {}, - "company": {}, - "phoneNumber": {}, - "country": {}, - "stateOrProvince": {}, - "city": {}, - "postalCode": {}, - "street1": {}, - "street2": {}, - "street3": {}, - "APIVersion": {} - } - }, - "output": { - "resultWrapper": "GetShippingLabelResult", - "type": "structure", - "members": { - "ShippingLabelURL": {}, - "Warning": {} - } - } - }, - "GetStatus": { - "http": { - "requestUri": "/?Operation=GetStatus" - }, - "input": { - "type": "structure", - "required": [ - "JobId" - ], - "members": { - "JobId": {}, - "APIVersion": {} - } - }, - "output": { - "resultWrapper": "GetStatusResult", - "type": "structure", - "members": { - "JobId": {}, - "JobType": {}, - "LocationCode": {}, - "LocationMessage": {}, - "ProgressCode": {}, - "ProgressMessage": {}, - "Carrier": {}, - "TrackingNumber": {}, - "LogBucket": {}, - "LogKey": {}, - "ErrorCount": { - "type": "integer" - }, - "Signature": {}, - "SignatureFileContents": {}, - "CurrentManifest": {}, - "CreationDate": { - "type": "timestamp" - }, - "ArtifactList": { - "shape": "Sf" - } - } - } - }, - "ListJobs": { - "http": { - "requestUri": "/?Operation=ListJobs" - }, - "input": { - "type": "structure", - "members": { - "MaxJobs": { - "type": "integer" - }, - "Marker": {}, - "APIVersion": {} - } - }, - "output": { - "resultWrapper": "ListJobsResult", - "type": "structure", - "members": { - "Jobs": { - "type": "list", - "member": { - "type": "structure", - "members": { - "JobId": {}, - "CreationDate": { - "type": "timestamp" - }, - "IsCanceled": { - "type": "boolean" - }, - "JobType": {} - } - } - }, - "IsTruncated": { - "type": "boolean" - } - } - } - }, - "UpdateJob": { - "http": { - "requestUri": "/?Operation=UpdateJob" - }, - "input": { - "type": "structure", - "required": [ - "JobId", - "Manifest", - "JobType", - "ValidateOnly" - ], - "members": { - "JobId": {}, - "Manifest": {}, - "JobType": {}, - "ValidateOnly": { - "type": "boolean" - }, - "APIVersion": {} - } - }, - "output": { - "resultWrapper": "UpdateJobResult", - "type": "structure", - "members": { - "Success": { - "type": "boolean" - }, - "WarningMessage": {}, - "ArtifactList": { - "shape": "Sf" - } - } - } - } - }, - "shapes": { - "Sf": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Description": {}, - "URL": {} - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/importexport-2010-06-01.paginators.json b/cli/node_modules/aws-sdk/apis/importexport-2010-06-01.paginators.json deleted file mode 100644 index 702385ea6..000000000 --- a/cli/node_modules/aws-sdk/apis/importexport-2010-06-01.paginators.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "pagination": { - "ListJobs": { - "input_token": "Marker", - "output_token": "Jobs[-1].JobId", - "more_results": "IsTruncated", - "limit_key": "MaxJobs", - "result_key": "Jobs" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/kinesis-2013-12-02.min.json b/cli/node_modules/aws-sdk/apis/kinesis-2013-12-02.min.json deleted file mode 100644 index 0d343fb21..000000000 --- a/cli/node_modules/aws-sdk/apis/kinesis-2013-12-02.min.json +++ /dev/null @@ -1,398 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2013-12-02", - "endpointPrefix": "kinesis", - "jsonVersion": "1.1", - "serviceAbbreviation": "Kinesis", - "serviceFullName": "Amazon Kinesis", - "signatureVersion": "v4", - "targetPrefix": "Kinesis_20131202", - "protocol": "json" - }, - "operations": { - "AddTagsToStream": { - "input": { - "type": "structure", - "required": [ - "StreamName", - "Tags" - ], - "members": { - "StreamName": {}, - "Tags": { - "type": "map", - "key": {}, - "value": {} - } - } - } - }, - "CreateStream": { - "input": { - "type": "structure", - "required": [ - "StreamName", - "ShardCount" - ], - "members": { - "StreamName": {}, - "ShardCount": { - "type": "integer" - } - } - } - }, - "DeleteStream": { - "input": { - "type": "structure", - "required": [ - "StreamName" - ], - "members": { - "StreamName": {} - } - } - }, - "DescribeStream": { - "input": { - "type": "structure", - "required": [ - "StreamName" - ], - "members": { - "StreamName": {}, - "Limit": { - "type": "integer" - }, - "ExclusiveStartShardId": {} - } - }, - "output": { - "type": "structure", - "required": [ - "StreamDescription" - ], - "members": { - "StreamDescription": { - "type": "structure", - "required": [ - "StreamName", - "StreamARN", - "StreamStatus", - "Shards", - "HasMoreShards" - ], - "members": { - "StreamName": {}, - "StreamARN": {}, - "StreamStatus": {}, - "Shards": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "ShardId", - "HashKeyRange", - "SequenceNumberRange" - ], - "members": { - "ShardId": {}, - "ParentShardId": {}, - "AdjacentParentShardId": {}, - "HashKeyRange": { - "type": "structure", - "required": [ - "StartingHashKey", - "EndingHashKey" - ], - "members": { - "StartingHashKey": {}, - "EndingHashKey": {} - } - }, - "SequenceNumberRange": { - "type": "structure", - "required": [ - "StartingSequenceNumber" - ], - "members": { - "StartingSequenceNumber": {}, - "EndingSequenceNumber": {} - } - } - } - } - }, - "HasMoreShards": { - "type": "boolean" - } - } - } - } - } - }, - "GetRecords": { - "input": { - "type": "structure", - "required": [ - "ShardIterator" - ], - "members": { - "ShardIterator": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "required": [ - "Records" - ], - "members": { - "Records": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "SequenceNumber", - "Data", - "PartitionKey" - ], - "members": { - "SequenceNumber": {}, - "Data": { - "type": "blob" - }, - "PartitionKey": {} - } - } - }, - "NextShardIterator": {}, - "MillisBehindLatest": { - "type": "long" - } - } - } - }, - "GetShardIterator": { - "input": { - "type": "structure", - "required": [ - "StreamName", - "ShardId", - "ShardIteratorType" - ], - "members": { - "StreamName": {}, - "ShardId": {}, - "ShardIteratorType": {}, - "StartingSequenceNumber": {} - } - }, - "output": { - "type": "structure", - "members": { - "ShardIterator": {} - } - } - }, - "ListStreams": { - "input": { - "type": "structure", - "members": { - "Limit": { - "type": "integer" - }, - "ExclusiveStartStreamName": {} - } - }, - "output": { - "type": "structure", - "required": [ - "StreamNames", - "HasMoreStreams" - ], - "members": { - "StreamNames": { - "type": "list", - "member": {} - }, - "HasMoreStreams": { - "type": "boolean" - } - } - } - }, - "ListTagsForStream": { - "input": { - "type": "structure", - "required": [ - "StreamName" - ], - "members": { - "StreamName": {}, - "ExclusiveStartTagKey": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "required": [ - "Tags", - "HasMoreTags" - ], - "members": { - "Tags": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "Key" - ], - "members": { - "Key": {}, - "Value": {} - } - } - }, - "HasMoreTags": { - "type": "boolean" - } - } - } - }, - "MergeShards": { - "input": { - "type": "structure", - "required": [ - "StreamName", - "ShardToMerge", - "AdjacentShardToMerge" - ], - "members": { - "StreamName": {}, - "ShardToMerge": {}, - "AdjacentShardToMerge": {} - } - } - }, - "PutRecord": { - "input": { - "type": "structure", - "required": [ - "StreamName", - "Data", - "PartitionKey" - ], - "members": { - "StreamName": {}, - "Data": { - "type": "blob" - }, - "PartitionKey": {}, - "ExplicitHashKey": {}, - "SequenceNumberForOrdering": {} - } - }, - "output": { - "type": "structure", - "required": [ - "ShardId", - "SequenceNumber" - ], - "members": { - "ShardId": {}, - "SequenceNumber": {} - } - } - }, - "PutRecords": { - "input": { - "type": "structure", - "required": [ - "Records", - "StreamName" - ], - "members": { - "Records": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "Data", - "PartitionKey" - ], - "members": { - "Data": { - "type": "blob" - }, - "ExplicitHashKey": {}, - "PartitionKey": {} - } - } - }, - "StreamName": {} - } - }, - "output": { - "type": "structure", - "required": [ - "Records" - ], - "members": { - "FailedRecordCount": { - "type": "integer" - }, - "Records": { - "type": "list", - "member": { - "type": "structure", - "members": { - "SequenceNumber": {}, - "ShardId": {}, - "ErrorCode": {}, - "ErrorMessage": {} - } - } - } - } - } - }, - "RemoveTagsFromStream": { - "input": { - "type": "structure", - "required": [ - "StreamName", - "TagKeys" - ], - "members": { - "StreamName": {}, - "TagKeys": { - "type": "list", - "member": {} - } - } - } - }, - "SplitShard": { - "input": { - "type": "structure", - "required": [ - "StreamName", - "ShardToSplit", - "NewStartingHashKey" - ], - "members": { - "StreamName": {}, - "ShardToSplit": {}, - "NewStartingHashKey": {} - } - } - } - }, - "shapes": {} -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/kinesis-2013-12-02.paginators.json b/cli/node_modules/aws-sdk/apis/kinesis-2013-12-02.paginators.json deleted file mode 100644 index 007f563b4..000000000 --- a/cli/node_modules/aws-sdk/apis/kinesis-2013-12-02.paginators.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "pagination": { - "DescribeStream": { - "input_token": "ExclusiveStartShardId", - "limit_key": "Limit", - "more_results": "StreamDescription.HasMoreShards", - "output_token": "StreamDescription.Shards[-1].ShardId", - "result_key": "StreamDescription.Shards" - }, - "ListStreams": { - "input_token": "ExclusiveStartStreamName", - "limit_key": "Limit", - "more_results": "HasMoreStreams", - "output_token": "StreamNames[-1]", - "result_key": "StreamNames" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/kms-2014-11-01.min.json b/cli/node_modules/aws-sdk/apis/kms-2014-11-01.min.json deleted file mode 100644 index 8468f3b65..000000000 --- a/cli/node_modules/aws-sdk/apis/kms-2014-11-01.min.json +++ /dev/null @@ -1,605 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2014-11-01", - "endpointPrefix": "kms", - "jsonVersion": "1.1", - "serviceAbbreviation": "KMS", - "serviceFullName": "AWS Key Management Service", - "signatureVersion": "v4", - "targetPrefix": "TrentService", - "protocol": "json" - }, - "operations": { - "CreateAlias": { - "input": { - "type": "structure", - "required": [ - "AliasName", - "TargetKeyId" - ], - "members": { - "AliasName": {}, - "TargetKeyId": {} - } - } - }, - "CreateGrant": { - "input": { - "type": "structure", - "required": [ - "KeyId", - "GranteePrincipal" - ], - "members": { - "KeyId": {}, - "GranteePrincipal": {}, - "RetiringPrincipal": {}, - "Operations": { - "shape": "S6" - }, - "Constraints": { - "shape": "S8" - }, - "GrantTokens": { - "shape": "Sc" - } - } - }, - "output": { - "type": "structure", - "members": { - "GrantToken": {}, - "GrantId": {} - } - } - }, - "CreateKey": { - "input": { - "type": "structure", - "members": { - "Policy": {}, - "Description": {}, - "KeyUsage": {} - } - }, - "output": { - "type": "structure", - "members": { - "KeyMetadata": { - "shape": "Sl" - } - } - } - }, - "Decrypt": { - "input": { - "type": "structure", - "required": [ - "CiphertextBlob" - ], - "members": { - "CiphertextBlob": { - "type": "blob" - }, - "EncryptionContext": { - "shape": "S9" - }, - "GrantTokens": { - "shape": "Sc" - } - } - }, - "output": { - "type": "structure", - "members": { - "KeyId": {}, - "Plaintext": { - "shape": "St" - } - } - } - }, - "DeleteAlias": { - "input": { - "type": "structure", - "required": [ - "AliasName" - ], - "members": { - "AliasName": {} - } - } - }, - "DescribeKey": { - "input": { - "type": "structure", - "required": [ - "KeyId" - ], - "members": { - "KeyId": {} - } - }, - "output": { - "type": "structure", - "members": { - "KeyMetadata": { - "shape": "Sl" - } - } - } - }, - "DisableKey": { - "input": { - "type": "structure", - "required": [ - "KeyId" - ], - "members": { - "KeyId": {} - } - } - }, - "DisableKeyRotation": { - "input": { - "type": "structure", - "required": [ - "KeyId" - ], - "members": { - "KeyId": {} - } - } - }, - "EnableKey": { - "input": { - "type": "structure", - "required": [ - "KeyId" - ], - "members": { - "KeyId": {} - } - } - }, - "EnableKeyRotation": { - "input": { - "type": "structure", - "required": [ - "KeyId" - ], - "members": { - "KeyId": {} - } - } - }, - "Encrypt": { - "input": { - "type": "structure", - "required": [ - "KeyId", - "Plaintext" - ], - "members": { - "KeyId": {}, - "Plaintext": { - "shape": "St" - }, - "EncryptionContext": { - "shape": "S9" - }, - "GrantTokens": { - "shape": "Sc" - } - } - }, - "output": { - "type": "structure", - "members": { - "CiphertextBlob": { - "type": "blob" - }, - "KeyId": {} - } - } - }, - "GenerateDataKey": { - "input": { - "type": "structure", - "required": [ - "KeyId" - ], - "members": { - "KeyId": {}, - "EncryptionContext": { - "shape": "S9" - }, - "NumberOfBytes": { - "type": "integer" - }, - "KeySpec": {}, - "GrantTokens": { - "shape": "Sc" - } - } - }, - "output": { - "type": "structure", - "members": { - "CiphertextBlob": { - "type": "blob" - }, - "Plaintext": { - "shape": "St" - }, - "KeyId": {} - } - } - }, - "GenerateDataKeyWithoutPlaintext": { - "input": { - "type": "structure", - "required": [ - "KeyId" - ], - "members": { - "KeyId": {}, - "EncryptionContext": { - "shape": "S9" - }, - "KeySpec": {}, - "NumberOfBytes": { - "type": "integer" - }, - "GrantTokens": { - "shape": "Sc" - } - } - }, - "output": { - "type": "structure", - "members": { - "CiphertextBlob": { - "type": "blob" - }, - "KeyId": {} - } - } - }, - "GenerateRandom": { - "input": { - "type": "structure", - "members": { - "NumberOfBytes": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Plaintext": { - "shape": "St" - } - } - } - }, - "GetKeyPolicy": { - "input": { - "type": "structure", - "required": [ - "KeyId", - "PolicyName" - ], - "members": { - "KeyId": {}, - "PolicyName": {} - } - }, - "output": { - "type": "structure", - "members": { - "Policy": {} - } - } - }, - "GetKeyRotationStatus": { - "input": { - "type": "structure", - "required": [ - "KeyId" - ], - "members": { - "KeyId": {} - } - }, - "output": { - "type": "structure", - "members": { - "KeyRotationEnabled": { - "type": "boolean" - } - } - } - }, - "ListAliases": { - "input": { - "type": "structure", - "members": { - "Limit": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Aliases": { - "type": "list", - "member": { - "type": "structure", - "members": { - "AliasName": {}, - "AliasArn": {}, - "TargetKeyId": {} - } - } - }, - "NextMarker": {}, - "Truncated": { - "type": "boolean" - } - } - } - }, - "ListGrants": { - "input": { - "type": "structure", - "required": [ - "KeyId" - ], - "members": { - "KeyId": {}, - "Limit": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Grants": { - "type": "list", - "member": { - "type": "structure", - "members": { - "GrantId": {}, - "GranteePrincipal": {}, - "RetiringPrincipal": {}, - "IssuingAccount": {}, - "Operations": { - "shape": "S6" - }, - "Constraints": { - "shape": "S8" - } - } - } - }, - "NextMarker": {}, - "Truncated": { - "type": "boolean" - } - } - } - }, - "ListKeyPolicies": { - "input": { - "type": "structure", - "required": [ - "KeyId" - ], - "members": { - "KeyId": {}, - "Limit": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "PolicyNames": { - "type": "list", - "member": {} - }, - "NextMarker": {}, - "Truncated": { - "type": "boolean" - } - } - } - }, - "ListKeys": { - "input": { - "type": "structure", - "members": { - "Limit": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Keys": { - "type": "list", - "member": { - "type": "structure", - "members": { - "KeyId": {}, - "KeyArn": {} - } - } - }, - "NextMarker": {}, - "Truncated": { - "type": "boolean" - } - } - } - }, - "PutKeyPolicy": { - "input": { - "type": "structure", - "required": [ - "KeyId", - "PolicyName", - "Policy" - ], - "members": { - "KeyId": {}, - "PolicyName": {}, - "Policy": {} - } - } - }, - "ReEncrypt": { - "input": { - "type": "structure", - "required": [ - "CiphertextBlob", - "DestinationKeyId" - ], - "members": { - "CiphertextBlob": { - "type": "blob" - }, - "SourceEncryptionContext": { - "shape": "S9" - }, - "DestinationKeyId": {}, - "DestinationEncryptionContext": { - "shape": "S9" - }, - "GrantTokens": { - "shape": "Sc" - } - } - }, - "output": { - "type": "structure", - "members": { - "CiphertextBlob": { - "type": "blob" - }, - "SourceKeyId": {}, - "KeyId": {} - } - } - }, - "RetireGrant": { - "input": { - "type": "structure", - "members": { - "GrantToken": {}, - "KeyId": {}, - "GrantId": {} - } - } - }, - "RevokeGrant": { - "input": { - "type": "structure", - "required": [ - "KeyId", - "GrantId" - ], - "members": { - "KeyId": {}, - "GrantId": {} - } - } - }, - "UpdateAlias": { - "input": { - "type": "structure", - "required": [ - "AliasName", - "TargetKeyId" - ], - "members": { - "AliasName": {}, - "TargetKeyId": {} - } - } - }, - "UpdateKeyDescription": { - "input": { - "type": "structure", - "required": [ - "KeyId", - "Description" - ], - "members": { - "KeyId": {}, - "Description": {} - } - } - } - }, - "shapes": { - "S6": { - "type": "list", - "member": {} - }, - "S8": { - "type": "structure", - "members": { - "EncryptionContextSubset": { - "shape": "S9" - }, - "EncryptionContextEquals": { - "shape": "S9" - } - } - }, - "S9": { - "type": "map", - "key": {}, - "value": {} - }, - "Sc": { - "type": "list", - "member": {} - }, - "Sl": { - "type": "structure", - "required": [ - "KeyId" - ], - "members": { - "AWSAccountId": {}, - "KeyId": {}, - "Arn": {}, - "CreationDate": { - "type": "timestamp" - }, - "Enabled": { - "type": "boolean" - }, - "Description": {}, - "KeyUsage": {} - } - }, - "St": { - "type": "blob", - "sensitive": true - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/lambda-2014-11-11.min.json b/cli/node_modules/aws-sdk/apis/lambda-2014-11-11.min.json deleted file mode 100644 index fc006a8be..000000000 --- a/cli/node_modules/aws-sdk/apis/lambda-2014-11-11.min.json +++ /dev/null @@ -1,423 +0,0 @@ -{ - "metadata": { - "apiVersion": "2014-11-11", - "endpointPrefix": "lambda", - "serviceFullName": "AWS Lambda", - "signatureVersion": "v4", - "protocol": "rest-json" - }, - "operations": { - "AddEventSource": { - "http": { - "requestUri": "/2014-11-13/event-source-mappings/" - }, - "input": { - "type": "structure", - "required": [ - "EventSource", - "FunctionName", - "Role" - ], - "members": { - "EventSource": {}, - "FunctionName": {}, - "Role": {}, - "BatchSize": { - "type": "integer" - }, - "Parameters": { - "shape": "S6" - } - } - }, - "output": { - "shape": "S7" - } - }, - "DeleteFunction": { - "http": { - "method": "DELETE", - "requestUri": "/2014-11-13/functions/{FunctionName}", - "responseCode": 204 - }, - "input": { - "type": "structure", - "required": [ - "FunctionName" - ], - "members": { - "FunctionName": { - "location": "uri", - "locationName": "FunctionName" - } - } - } - }, - "GetEventSource": { - "http": { - "method": "GET", - "requestUri": "/2014-11-13/event-source-mappings/{UUID}", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "UUID" - ], - "members": { - "UUID": { - "location": "uri", - "locationName": "UUID" - } - } - }, - "output": { - "shape": "S7" - } - }, - "GetFunction": { - "http": { - "method": "GET", - "requestUri": "/2014-11-13/functions/{FunctionName}", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "FunctionName" - ], - "members": { - "FunctionName": { - "location": "uri", - "locationName": "FunctionName" - } - } - }, - "output": { - "type": "structure", - "members": { - "Configuration": { - "shape": "Se" - }, - "Code": { - "type": "structure", - "members": { - "RepositoryType": {}, - "Location": {} - } - } - } - } - }, - "GetFunctionConfiguration": { - "http": { - "method": "GET", - "requestUri": "/2014-11-13/functions/{FunctionName}/configuration", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "FunctionName" - ], - "members": { - "FunctionName": { - "location": "uri", - "locationName": "FunctionName" - } - } - }, - "output": { - "shape": "Se" - } - }, - "InvokeAsync": { - "http": { - "requestUri": "/2014-11-13/functions/{FunctionName}/invoke-async/", - "responseCode": 202 - }, - "input": { - "type": "structure", - "required": [ - "FunctionName", - "InvokeArgs" - ], - "members": { - "FunctionName": { - "location": "uri", - "locationName": "FunctionName" - }, - "InvokeArgs": { - "shape": "Sq" - } - }, - "payload": "InvokeArgs" - }, - "output": { - "type": "structure", - "members": { - "Status": { - "location": "statusCode", - "type": "integer" - } - } - } - }, - "ListEventSources": { - "http": { - "method": "GET", - "requestUri": "/2014-11-13/event-source-mappings/", - "responseCode": 200 - }, - "input": { - "type": "structure", - "members": { - "EventSourceArn": { - "location": "querystring", - "locationName": "EventSource" - }, - "FunctionName": { - "location": "querystring", - "locationName": "FunctionName" - }, - "Marker": { - "location": "querystring", - "locationName": "Marker" - }, - "MaxItems": { - "location": "querystring", - "locationName": "MaxItems", - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "NextMarker": {}, - "EventSources": { - "type": "list", - "member": { - "shape": "S7" - } - } - } - } - }, - "ListFunctions": { - "http": { - "method": "GET", - "requestUri": "/2014-11-13/functions/", - "responseCode": 200 - }, - "input": { - "type": "structure", - "members": { - "Marker": { - "location": "querystring", - "locationName": "Marker" - }, - "MaxItems": { - "location": "querystring", - "locationName": "MaxItems", - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "NextMarker": {}, - "Functions": { - "type": "list", - "member": { - "shape": "Se" - } - } - } - } - }, - "RemoveEventSource": { - "http": { - "method": "DELETE", - "requestUri": "/2014-11-13/event-source-mappings/{UUID}", - "responseCode": 204 - }, - "input": { - "type": "structure", - "required": [ - "UUID" - ], - "members": { - "UUID": { - "location": "uri", - "locationName": "UUID" - } - } - } - }, - "UpdateFunctionConfiguration": { - "http": { - "method": "PUT", - "requestUri": "/2014-11-13/functions/{FunctionName}/configuration", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "FunctionName" - ], - "members": { - "FunctionName": { - "location": "uri", - "locationName": "FunctionName" - }, - "Role": { - "location": "querystring", - "locationName": "Role" - }, - "Handler": { - "location": "querystring", - "locationName": "Handler" - }, - "Description": { - "location": "querystring", - "locationName": "Description" - }, - "Timeout": { - "location": "querystring", - "locationName": "Timeout", - "type": "integer" - }, - "MemorySize": { - "location": "querystring", - "locationName": "MemorySize", - "type": "integer" - } - } - }, - "output": { - "shape": "Se" - } - }, - "UploadFunction": { - "http": { - "method": "PUT", - "requestUri": "/2014-11-13/functions/{FunctionName}", - "responseCode": 201 - }, - "input": { - "type": "structure", - "required": [ - "FunctionName", - "FunctionZip", - "Runtime", - "Role", - "Handler", - "Mode" - ], - "members": { - "FunctionName": { - "location": "uri", - "locationName": "FunctionName" - }, - "FunctionZip": { - "shape": "Sq" - }, - "Runtime": { - "location": "querystring", - "locationName": "Runtime" - }, - "Role": { - "location": "querystring", - "locationName": "Role" - }, - "Handler": { - "location": "querystring", - "locationName": "Handler" - }, - "Mode": { - "location": "querystring", - "locationName": "Mode" - }, - "Description": { - "location": "querystring", - "locationName": "Description" - }, - "Timeout": { - "location": "querystring", - "locationName": "Timeout", - "type": "integer" - }, - "MemorySize": { - "location": "querystring", - "locationName": "MemorySize", - "type": "integer" - } - }, - "payload": "FunctionZip" - }, - "output": { - "shape": "Se" - } - } - }, - "shapes": { - "S6": { - "type": "map", - "key": {}, - "value": {} - }, - "S7": { - "type": "structure", - "members": { - "UUID": {}, - "BatchSize": { - "type": "integer" - }, - "EventSource": {}, - "FunctionName": {}, - "Parameters": { - "shape": "S6" - }, - "Role": {}, - "LastModified": { - "type": "timestamp" - }, - "IsActive": { - "type": "boolean" - }, - "Status": {} - } - }, - "Se": { - "type": "structure", - "members": { - "FunctionName": {}, - "FunctionARN": {}, - "ConfigurationId": {}, - "Runtime": {}, - "Role": {}, - "Handler": {}, - "Mode": {}, - "CodeSize": { - "type": "long" - }, - "Description": {}, - "Timeout": { - "type": "integer" - }, - "MemorySize": { - "type": "integer" - }, - "LastModified": { - "type": "timestamp" - } - } - }, - "Sq": { - "type": "blob", - "streaming": true - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/lambda-2014-11-11.paginators.json b/cli/node_modules/aws-sdk/apis/lambda-2014-11-11.paginators.json deleted file mode 100644 index deaf07d38..000000000 --- a/cli/node_modules/aws-sdk/apis/lambda-2014-11-11.paginators.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "pagination": { - "ListEventSources": { - "input_token": "Marker", - "output_token": "NextMarker", - "limit_key": "MaxItems", - "result_key": "EventSources" - }, - "ListFunctions": { - "input_token": "Marker", - "output_token": "NextMarker", - "limit_key": "MaxItems", - "result_key": "Functions" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/lambda-2015-03-31.min.json b/cli/node_modules/aws-sdk/apis/lambda-2015-03-31.min.json deleted file mode 100644 index 4935949d7..000000000 --- a/cli/node_modules/aws-sdk/apis/lambda-2015-03-31.min.json +++ /dev/null @@ -1,575 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2015-03-31", - "endpointPrefix": "lambda", - "serviceFullName": "AWS Lambda", - "signatureVersion": "v4", - "protocol": "rest-json" - }, - "operations": { - "AddPermission": { - "http": { - "requestUri": "/2015-03-31/functions/{FunctionName}/versions/HEAD/policy", - "responseCode": 201 - }, - "input": { - "type": "structure", - "required": [ - "FunctionName", - "StatementId", - "Action", - "Principal" - ], - "members": { - "FunctionName": { - "location": "uri", - "locationName": "FunctionName" - }, - "StatementId": {}, - "Action": {}, - "Principal": {}, - "SourceArn": {}, - "SourceAccount": {} - } - }, - "output": { - "type": "structure", - "members": { - "Statement": {} - } - } - }, - "CreateEventSourceMapping": { - "http": { - "requestUri": "/2015-03-31/event-source-mappings/", - "responseCode": 202 - }, - "input": { - "type": "structure", - "required": [ - "EventSourceArn", - "FunctionName", - "StartingPosition" - ], - "members": { - "EventSourceArn": {}, - "FunctionName": {}, - "Enabled": { - "type": "boolean" - }, - "BatchSize": { - "type": "integer" - }, - "StartingPosition": {} - } - }, - "output": { - "shape": "Se" - } - }, - "CreateFunction": { - "http": { - "requestUri": "/2015-03-31/functions", - "responseCode": 201 - }, - "input": { - "type": "structure", - "required": [ - "FunctionName", - "Runtime", - "Role", - "Handler", - "Code" - ], - "members": { - "FunctionName": {}, - "Runtime": {}, - "Role": {}, - "Handler": {}, - "Description": {}, - "Timeout": { - "type": "integer" - }, - "MemorySize": { - "type": "integer" - }, - "Code": { - "type": "structure", - "members": { - "ZipFile": { - "type": "blob" - }, - "S3Bucket": {}, - "S3Key": {}, - "S3ObjectVersion": {} - } - } - } - }, - "output": { - "shape": "St" - } - }, - "DeleteEventSourceMapping": { - "http": { - "method": "DELETE", - "requestUri": "/2015-03-31/event-source-mappings/{UUID}", - "responseCode": 202 - }, - "input": { - "type": "structure", - "required": [ - "UUID" - ], - "members": { - "UUID": { - "location": "uri", - "locationName": "UUID" - } - } - }, - "output": { - "shape": "Se" - } - }, - "DeleteFunction": { - "http": { - "method": "DELETE", - "requestUri": "/2015-03-31/functions/{FunctionName}", - "responseCode": 204 - }, - "input": { - "type": "structure", - "required": [ - "FunctionName" - ], - "members": { - "FunctionName": { - "location": "uri", - "locationName": "FunctionName" - } - } - } - }, - "GetEventSourceMapping": { - "http": { - "method": "GET", - "requestUri": "/2015-03-31/event-source-mappings/{UUID}", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "UUID" - ], - "members": { - "UUID": { - "location": "uri", - "locationName": "UUID" - } - } - }, - "output": { - "shape": "Se" - } - }, - "GetFunction": { - "http": { - "method": "GET", - "requestUri": "/2015-03-31/functions/{FunctionName}/versions/HEAD", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "FunctionName" - ], - "members": { - "FunctionName": { - "location": "uri", - "locationName": "FunctionName" - } - } - }, - "output": { - "type": "structure", - "members": { - "Configuration": { - "shape": "St" - }, - "Code": { - "type": "structure", - "members": { - "RepositoryType": {}, - "Location": {} - } - } - } - } - }, - "GetFunctionConfiguration": { - "http": { - "method": "GET", - "requestUri": "/2015-03-31/functions/{FunctionName}/versions/HEAD/configuration", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "FunctionName" - ], - "members": { - "FunctionName": { - "location": "uri", - "locationName": "FunctionName" - } - } - }, - "output": { - "shape": "St" - } - }, - "GetPolicy": { - "http": { - "method": "GET", - "requestUri": "/2015-03-31/functions/{FunctionName}/versions/HEAD/policy", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "FunctionName" - ], - "members": { - "FunctionName": { - "location": "uri", - "locationName": "FunctionName" - } - } - }, - "output": { - "type": "structure", - "members": { - "Policy": {} - } - } - }, - "Invoke": { - "http": { - "requestUri": "/2015-03-31/functions/{FunctionName}/invocations" - }, - "input": { - "type": "structure", - "required": [ - "FunctionName" - ], - "members": { - "FunctionName": { - "location": "uri", - "locationName": "FunctionName" - }, - "InvocationType": { - "location": "header", - "locationName": "X-Amz-Invocation-Type" - }, - "LogType": { - "location": "header", - "locationName": "X-Amz-Log-Type" - }, - "ClientContext": { - "location": "header", - "locationName": "X-Amz-Client-Context" - }, - "Payload": { - "type": "blob" - } - }, - "payload": "Payload" - }, - "output": { - "type": "structure", - "members": { - "StatusCode": { - "location": "statusCode", - "type": "integer" - }, - "FunctionError": { - "location": "header", - "locationName": "X-Amz-Function-Error" - }, - "LogResult": { - "location": "header", - "locationName": "X-Amz-Log-Result" - }, - "Payload": { - "type": "blob" - } - }, - "payload": "Payload" - } - }, - "InvokeAsync": { - "http": { - "requestUri": "/2014-11-13/functions/{FunctionName}/invoke-async/", - "responseCode": 202 - }, - "input": { - "deprecated": true, - "type": "structure", - "required": [ - "FunctionName", - "InvokeArgs" - ], - "members": { - "FunctionName": { - "location": "uri", - "locationName": "FunctionName" - }, - "InvokeArgs": { - "type": "blob", - "streaming": true - } - }, - "payload": "InvokeArgs" - }, - "output": { - "deprecated": true, - "type": "structure", - "members": { - "Status": { - "location": "statusCode", - "type": "integer" - } - } - }, - "deprecated": true - }, - "ListEventSourceMappings": { - "http": { - "method": "GET", - "requestUri": "/2015-03-31/event-source-mappings/", - "responseCode": 200 - }, - "input": { - "type": "structure", - "members": { - "EventSourceArn": { - "location": "querystring", - "locationName": "EventSourceArn" - }, - "FunctionName": { - "location": "querystring", - "locationName": "FunctionName" - }, - "Marker": { - "location": "querystring", - "locationName": "Marker" - }, - "MaxItems": { - "location": "querystring", - "locationName": "MaxItems", - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "NextMarker": {}, - "EventSourceMappings": { - "type": "list", - "member": { - "shape": "Se" - } - } - } - } - }, - "ListFunctions": { - "http": { - "method": "GET", - "requestUri": "/2015-03-31/functions/", - "responseCode": 200 - }, - "input": { - "type": "structure", - "members": { - "Marker": { - "location": "querystring", - "locationName": "Marker" - }, - "MaxItems": { - "location": "querystring", - "locationName": "MaxItems", - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "NextMarker": {}, - "Functions": { - "type": "list", - "member": { - "shape": "St" - } - } - } - } - }, - "RemovePermission": { - "http": { - "method": "DELETE", - "requestUri": "/2015-03-31/functions/{FunctionName}/versions/HEAD/policy/{StatementId}", - "responseCode": 204 - }, - "input": { - "type": "structure", - "required": [ - "FunctionName", - "StatementId" - ], - "members": { - "FunctionName": { - "location": "uri", - "locationName": "FunctionName" - }, - "StatementId": { - "location": "uri", - "locationName": "StatementId" - } - } - } - }, - "UpdateEventSourceMapping": { - "http": { - "method": "PUT", - "requestUri": "/2015-03-31/event-source-mappings/{UUID}", - "responseCode": 202 - }, - "input": { - "type": "structure", - "required": [ - "UUID" - ], - "members": { - "UUID": { - "location": "uri", - "locationName": "UUID" - }, - "FunctionName": {}, - "Enabled": { - "type": "boolean" - }, - "BatchSize": { - "type": "integer" - } - } - }, - "output": { - "shape": "Se" - } - }, - "UpdateFunctionCode": { - "http": { - "method": "PUT", - "requestUri": "/2015-03-31/functions/{FunctionName}/versions/HEAD/code", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "FunctionName" - ], - "members": { - "FunctionName": { - "location": "uri", - "locationName": "FunctionName" - }, - "ZipFile": { - "type": "blob" - }, - "S3Bucket": {}, - "S3Key": {}, - "S3ObjectVersion": {} - } - }, - "output": { - "shape": "St" - } - }, - "UpdateFunctionConfiguration": { - "http": { - "method": "PUT", - "requestUri": "/2015-03-31/functions/{FunctionName}/versions/HEAD/configuration", - "responseCode": 200 - }, - "input": { - "type": "structure", - "required": [ - "FunctionName" - ], - "members": { - "FunctionName": { - "location": "uri", - "locationName": "FunctionName" - }, - "Role": {}, - "Handler": {}, - "Description": {}, - "Timeout": { - "type": "integer" - }, - "MemorySize": { - "type": "integer" - } - } - }, - "output": { - "shape": "St" - } - } - }, - "shapes": { - "Se": { - "type": "structure", - "members": { - "UUID": {}, - "BatchSize": { - "type": "integer" - }, - "EventSourceArn": {}, - "FunctionArn": {}, - "LastModified": { - "type": "timestamp" - }, - "LastProcessingResult": {}, - "State": {}, - "StateTransitionReason": {} - } - }, - "St": { - "type": "structure", - "members": { - "FunctionName": {}, - "FunctionArn": {}, - "Runtime": {}, - "Role": {}, - "Handler": {}, - "CodeSize": { - "type": "long" - }, - "Description": {}, - "Timeout": { - "type": "integer" - }, - "MemorySize": { - "type": "integer" - }, - "LastModified": {} - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/lambda-2015-03-31.paginators.json b/cli/node_modules/aws-sdk/apis/lambda-2015-03-31.paginators.json deleted file mode 100644 index da00fb78f..000000000 --- a/cli/node_modules/aws-sdk/apis/lambda-2015-03-31.paginators.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "pagination": { - "ListEventSourceMappings": { - "input_token": "Marker", - "output_token": "NextMarker", - "limit_key": "MaxItems", - "result_key": "EventSourceMappings" - }, - "ListFunctions": { - "input_token": "Marker", - "output_token": "NextMarker", - "limit_key": "MaxItems", - "result_key": "Functions" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/logs-2014-03-28.min.json b/cli/node_modules/aws-sdk/apis/logs-2014-03-28.min.json deleted file mode 100644 index ce02df3e6..000000000 --- a/cli/node_modules/aws-sdk/apis/logs-2014-03-28.min.json +++ /dev/null @@ -1,539 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2014-03-28", - "endpointPrefix": "logs", - "jsonVersion": "1.1", - "serviceFullName": "Amazon CloudWatch Logs", - "signatureVersion": "v4", - "targetPrefix": "Logs_20140328", - "protocol": "json" - }, - "operations": { - "CreateLogGroup": { - "input": { - "type": "structure", - "required": [ - "logGroupName" - ], - "members": { - "logGroupName": {} - } - } - }, - "CreateLogStream": { - "input": { - "type": "structure", - "required": [ - "logGroupName", - "logStreamName" - ], - "members": { - "logGroupName": {}, - "logStreamName": {} - } - } - }, - "DeleteLogGroup": { - "input": { - "type": "structure", - "required": [ - "logGroupName" - ], - "members": { - "logGroupName": {} - } - } - }, - "DeleteLogStream": { - "input": { - "type": "structure", - "required": [ - "logGroupName", - "logStreamName" - ], - "members": { - "logGroupName": {}, - "logStreamName": {} - } - } - }, - "DeleteMetricFilter": { - "input": { - "type": "structure", - "required": [ - "logGroupName", - "filterName" - ], - "members": { - "logGroupName": {}, - "filterName": {} - } - } - }, - "DeleteRetentionPolicy": { - "input": { - "type": "structure", - "required": [ - "logGroupName" - ], - "members": { - "logGroupName": {} - } - } - }, - "DeleteSubscriptionFilter": { - "input": { - "type": "structure", - "required": [ - "logGroupName", - "filterName" - ], - "members": { - "logGroupName": {}, - "filterName": {} - } - } - }, - "DescribeLogGroups": { - "input": { - "type": "structure", - "members": { - "logGroupNamePrefix": {}, - "nextToken": {}, - "limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "logGroups": { - "type": "list", - "member": { - "type": "structure", - "members": { - "logGroupName": {}, - "creationTime": { - "type": "long" - }, - "retentionInDays": { - "type": "integer" - }, - "metricFilterCount": { - "type": "integer" - }, - "arn": {}, - "storedBytes": { - "type": "long" - } - } - } - }, - "nextToken": {} - } - } - }, - "DescribeLogStreams": { - "input": { - "type": "structure", - "required": [ - "logGroupName" - ], - "members": { - "logGroupName": {}, - "logStreamNamePrefix": {}, - "orderBy": {}, - "descending": { - "type": "boolean" - }, - "nextToken": {}, - "limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "logStreams": { - "type": "list", - "member": { - "type": "structure", - "members": { - "logStreamName": {}, - "creationTime": { - "type": "long" - }, - "firstEventTimestamp": { - "type": "long" - }, - "lastEventTimestamp": { - "type": "long" - }, - "lastIngestionTime": { - "type": "long" - }, - "uploadSequenceToken": {}, - "arn": {}, - "storedBytes": { - "type": "long" - } - } - } - }, - "nextToken": {} - } - } - }, - "DescribeMetricFilters": { - "input": { - "type": "structure", - "required": [ - "logGroupName" - ], - "members": { - "logGroupName": {}, - "filterNamePrefix": {}, - "nextToken": {}, - "limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "metricFilters": { - "type": "list", - "member": { - "type": "structure", - "members": { - "filterName": {}, - "filterPattern": {}, - "metricTransformations": { - "shape": "Sy" - }, - "creationTime": { - "type": "long" - } - } - } - }, - "nextToken": {} - } - } - }, - "DescribeSubscriptionFilters": { - "input": { - "type": "structure", - "required": [ - "logGroupName" - ], - "members": { - "logGroupName": {}, - "filterNamePrefix": {}, - "nextToken": {}, - "limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "subscriptionFilters": { - "type": "list", - "member": { - "type": "structure", - "members": { - "filterName": {}, - "logGroupName": {}, - "filterPattern": {}, - "destinationArn": {}, - "roleArn": {}, - "creationTime": { - "type": "long" - } - } - } - }, - "nextToken": {} - } - } - }, - "FilterLogEvents": { - "input": { - "type": "structure", - "required": [ - "logGroupName" - ], - "members": { - "logGroupName": {}, - "logStreamNames": { - "type": "list", - "member": {} - }, - "startTime": { - "type": "long" - }, - "endTime": { - "type": "long" - }, - "filterPattern": {}, - "nextToken": {}, - "limit": { - "type": "integer" - }, - "interleaved": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "events": { - "type": "list", - "member": { - "type": "structure", - "members": { - "logStreamName": {}, - "timestamp": { - "type": "long" - }, - "message": {}, - "ingestionTime": { - "type": "long" - }, - "eventId": {} - } - } - }, - "searchedLogStreams": { - "type": "list", - "member": { - "type": "structure", - "members": { - "logStreamName": {}, - "searchedCompletely": { - "type": "boolean" - } - } - } - }, - "nextToken": {} - } - } - }, - "GetLogEvents": { - "input": { - "type": "structure", - "required": [ - "logGroupName", - "logStreamName" - ], - "members": { - "logGroupName": {}, - "logStreamName": {}, - "startTime": { - "type": "long" - }, - "endTime": { - "type": "long" - }, - "nextToken": {}, - "limit": { - "type": "integer" - }, - "startFromHead": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "events": { - "type": "list", - "member": { - "type": "structure", - "members": { - "timestamp": { - "type": "long" - }, - "message": {}, - "ingestionTime": { - "type": "long" - } - } - } - }, - "nextForwardToken": {}, - "nextBackwardToken": {} - } - } - }, - "PutLogEvents": { - "input": { - "type": "structure", - "required": [ - "logGroupName", - "logStreamName", - "logEvents" - ], - "members": { - "logGroupName": {}, - "logStreamName": {}, - "logEvents": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "timestamp", - "message" - ], - "members": { - "timestamp": { - "type": "long" - }, - "message": {} - } - } - }, - "sequenceToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "nextSequenceToken": {}, - "rejectedLogEventsInfo": { - "type": "structure", - "members": { - "tooNewLogEventStartIndex": { - "type": "integer" - }, - "tooOldLogEventEndIndex": { - "type": "integer" - }, - "expiredLogEventEndIndex": { - "type": "integer" - } - } - } - } - } - }, - "PutMetricFilter": { - "input": { - "type": "structure", - "required": [ - "logGroupName", - "filterName", - "filterPattern", - "metricTransformations" - ], - "members": { - "logGroupName": {}, - "filterName": {}, - "filterPattern": {}, - "metricTransformations": { - "shape": "Sy" - } - } - } - }, - "PutRetentionPolicy": { - "input": { - "type": "structure", - "required": [ - "logGroupName", - "retentionInDays" - ], - "members": { - "logGroupName": {}, - "retentionInDays": { - "type": "integer" - } - } - } - }, - "PutSubscriptionFilter": { - "input": { - "type": "structure", - "required": [ - "logGroupName", - "filterName", - "filterPattern", - "destinationArn", - "roleArn" - ], - "members": { - "logGroupName": {}, - "filterName": {}, - "filterPattern": {}, - "destinationArn": {}, - "roleArn": {} - } - } - }, - "TestMetricFilter": { - "input": { - "type": "structure", - "required": [ - "filterPattern", - "logEventMessages" - ], - "members": { - "filterPattern": {}, - "logEventMessages": { - "type": "list", - "member": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "matches": { - "type": "list", - "member": { - "type": "structure", - "members": { - "eventNumber": { - "type": "long" - }, - "eventMessage": {}, - "extractedValues": { - "type": "map", - "key": {}, - "value": {} - } - } - } - } - } - } - } - }, - "shapes": { - "Sy": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "metricName", - "metricNamespace", - "metricValue" - ], - "members": { - "metricName": {}, - "metricNamespace": {}, - "metricValue": {} - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/logs-2014-03-28.paginators.json b/cli/node_modules/aws-sdk/apis/logs-2014-03-28.paginators.json deleted file mode 100644 index 461b4a151..000000000 --- a/cli/node_modules/aws-sdk/apis/logs-2014-03-28.paginators.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "pagination": { - "DescribeLogGroups": { - "input_token": "nextToken", - "output_token": "nextToken", - "limit_key": "limit", - "result_key": "logGroups" - }, - "DescribeLogStreams": { - "input_token": "nextToken", - "output_token": "nextToken", - "limit_key": "limit", - "result_key": "logStreams" - }, - "DescribeMetricFilters": { - "input_token": "nextToken", - "output_token": "nextToken", - "limit_key": "limit", - "result_key": "metricFilters" - }, - "GetLogEvents": { - "input_token": "nextToken", - "output_token": "nextForwardToken", - "limit_key": "limit", - "result_key": "events" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/machinelearning-2014-12-12.min.json b/cli/node_modules/aws-sdk/apis/machinelearning-2014-12-12.min.json deleted file mode 100644 index 84ad58263..000000000 --- a/cli/node_modules/aws-sdk/apis/machinelearning-2014-12-12.min.json +++ /dev/null @@ -1,940 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2014-12-12", - "endpointPrefix": "machinelearning", - "jsonVersion": "1.1", - "serviceFullName": "Amazon Machine Learning", - "signatureVersion": "v4", - "targetPrefix": "AmazonML_20141212", - "protocol": "json" - }, - "operations": { - "CreateBatchPrediction": { - "input": { - "type": "structure", - "required": [ - "BatchPredictionId", - "MLModelId", - "BatchPredictionDataSourceId", - "OutputUri" - ], - "members": { - "BatchPredictionId": {}, - "BatchPredictionName": {}, - "MLModelId": {}, - "BatchPredictionDataSourceId": {}, - "OutputUri": {} - } - }, - "output": { - "type": "structure", - "members": { - "BatchPredictionId": {} - } - } - }, - "CreateDataSourceFromRDS": { - "input": { - "type": "structure", - "required": [ - "DataSourceId", - "RDSData", - "RoleARN" - ], - "members": { - "DataSourceId": {}, - "DataSourceName": {}, - "RDSData": { - "type": "structure", - "required": [ - "DatabaseInformation", - "SelectSqlQuery", - "DatabaseCredentials", - "S3StagingLocation", - "ResourceRole", - "ServiceRole", - "SubnetId", - "SecurityGroupIds" - ], - "members": { - "DatabaseInformation": { - "shape": "S8" - }, - "SelectSqlQuery": {}, - "DatabaseCredentials": { - "type": "structure", - "required": [ - "Username", - "Password" - ], - "members": { - "Username": {}, - "Password": {} - } - }, - "S3StagingLocation": {}, - "DataRearrangement": {}, - "DataSchema": {}, - "DataSchemaUri": {}, - "ResourceRole": {}, - "ServiceRole": {}, - "SubnetId": {}, - "SecurityGroupIds": { - "type": "list", - "member": {} - } - } - }, - "RoleARN": {}, - "ComputeStatistics": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "DataSourceId": {} - } - } - }, - "CreateDataSourceFromRedshift": { - "input": { - "type": "structure", - "required": [ - "DataSourceId", - "DataSpec", - "RoleARN" - ], - "members": { - "DataSourceId": {}, - "DataSourceName": {}, - "DataSpec": { - "type": "structure", - "required": [ - "DatabaseInformation", - "SelectSqlQuery", - "DatabaseCredentials", - "S3StagingLocation" - ], - "members": { - "DatabaseInformation": { - "shape": "Sr" - }, - "SelectSqlQuery": {}, - "DatabaseCredentials": { - "type": "structure", - "required": [ - "Username", - "Password" - ], - "members": { - "Username": {}, - "Password": {} - } - }, - "S3StagingLocation": {}, - "DataRearrangement": {}, - "DataSchema": {}, - "DataSchemaUri": {} - } - }, - "RoleARN": {}, - "ComputeStatistics": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "DataSourceId": {} - } - } - }, - "CreateDataSourceFromS3": { - "input": { - "type": "structure", - "required": [ - "DataSourceId", - "DataSpec" - ], - "members": { - "DataSourceId": {}, - "DataSourceName": {}, - "DataSpec": { - "type": "structure", - "required": [ - "DataLocationS3" - ], - "members": { - "DataLocationS3": {}, - "DataRearrangement": {}, - "DataSchema": {}, - "DataSchemaLocationS3": {} - } - }, - "ComputeStatistics": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "DataSourceId": {} - } - } - }, - "CreateEvaluation": { - "input": { - "type": "structure", - "required": [ - "EvaluationId", - "MLModelId", - "EvaluationDataSourceId" - ], - "members": { - "EvaluationId": {}, - "EvaluationName": {}, - "MLModelId": {}, - "EvaluationDataSourceId": {} - } - }, - "output": { - "type": "structure", - "members": { - "EvaluationId": {} - } - } - }, - "CreateMLModel": { - "input": { - "type": "structure", - "required": [ - "MLModelId", - "MLModelType", - "TrainingDataSourceId" - ], - "members": { - "MLModelId": {}, - "MLModelName": {}, - "MLModelType": {}, - "Parameters": { - "shape": "S16" - }, - "TrainingDataSourceId": {}, - "Recipe": {}, - "RecipeUri": {} - } - }, - "output": { - "type": "structure", - "members": { - "MLModelId": {} - } - } - }, - "CreateRealtimeEndpoint": { - "input": { - "type": "structure", - "required": [ - "MLModelId" - ], - "members": { - "MLModelId": {} - } - }, - "output": { - "type": "structure", - "members": { - "MLModelId": {}, - "RealtimeEndpointInfo": { - "shape": "S1c" - } - } - } - }, - "DeleteBatchPrediction": { - "input": { - "type": "structure", - "required": [ - "BatchPredictionId" - ], - "members": { - "BatchPredictionId": {} - } - }, - "output": { - "type": "structure", - "members": { - "BatchPredictionId": {} - } - } - }, - "DeleteDataSource": { - "input": { - "type": "structure", - "required": [ - "DataSourceId" - ], - "members": { - "DataSourceId": {} - } - }, - "output": { - "type": "structure", - "members": { - "DataSourceId": {} - } - } - }, - "DeleteEvaluation": { - "input": { - "type": "structure", - "required": [ - "EvaluationId" - ], - "members": { - "EvaluationId": {} - } - }, - "output": { - "type": "structure", - "members": { - "EvaluationId": {} - } - } - }, - "DeleteMLModel": { - "input": { - "type": "structure", - "required": [ - "MLModelId" - ], - "members": { - "MLModelId": {} - } - }, - "output": { - "type": "structure", - "members": { - "MLModelId": {} - } - } - }, - "DeleteRealtimeEndpoint": { - "input": { - "type": "structure", - "required": [ - "MLModelId" - ], - "members": { - "MLModelId": {} - } - }, - "output": { - "type": "structure", - "members": { - "MLModelId": {}, - "RealtimeEndpointInfo": { - "shape": "S1c" - } - } - } - }, - "DescribeBatchPredictions": { - "input": { - "type": "structure", - "members": { - "FilterVariable": {}, - "EQ": {}, - "GT": {}, - "LT": {}, - "GE": {}, - "LE": {}, - "NE": {}, - "Prefix": {}, - "SortOrder": {}, - "NextToken": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Results": { - "type": "list", - "member": { - "type": "structure", - "members": { - "BatchPredictionId": {}, - "MLModelId": {}, - "BatchPredictionDataSourceId": {}, - "InputDataLocationS3": {}, - "CreatedByIamUser": {}, - "CreatedAt": { - "type": "timestamp" - }, - "LastUpdatedAt": { - "type": "timestamp" - }, - "Name": {}, - "Status": {}, - "OutputUri": {}, - "Message": {} - } - } - }, - "NextToken": {} - } - } - }, - "DescribeDataSources": { - "input": { - "type": "structure", - "members": { - "FilterVariable": {}, - "EQ": {}, - "GT": {}, - "LT": {}, - "GE": {}, - "LE": {}, - "NE": {}, - "Prefix": {}, - "SortOrder": {}, - "NextToken": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Results": { - "type": "list", - "member": { - "type": "structure", - "members": { - "DataSourceId": {}, - "DataLocationS3": {}, - "DataRearrangement": {}, - "CreatedByIamUser": {}, - "CreatedAt": { - "type": "timestamp" - }, - "LastUpdatedAt": { - "type": "timestamp" - }, - "DataSizeInBytes": { - "type": "long" - }, - "NumberOfFiles": { - "type": "long" - }, - "Name": {}, - "Status": {}, - "Message": {}, - "RedshiftMetadata": { - "shape": "S28" - }, - "RDSMetadata": { - "shape": "S29" - }, - "RoleARN": {}, - "ComputeStatistics": { - "type": "boolean" - } - } - } - }, - "NextToken": {} - } - } - }, - "DescribeEvaluations": { - "input": { - "type": "structure", - "members": { - "FilterVariable": {}, - "EQ": {}, - "GT": {}, - "LT": {}, - "GE": {}, - "LE": {}, - "NE": {}, - "Prefix": {}, - "SortOrder": {}, - "NextToken": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Results": { - "type": "list", - "member": { - "type": "structure", - "members": { - "EvaluationId": {}, - "MLModelId": {}, - "EvaluationDataSourceId": {}, - "InputDataLocationS3": {}, - "CreatedByIamUser": {}, - "CreatedAt": { - "type": "timestamp" - }, - "LastUpdatedAt": { - "type": "timestamp" - }, - "Name": {}, - "Status": {}, - "PerformanceMetrics": { - "shape": "S2g" - }, - "Message": {} - } - } - }, - "NextToken": {} - } - } - }, - "DescribeMLModels": { - "input": { - "type": "structure", - "members": { - "FilterVariable": {}, - "EQ": {}, - "GT": {}, - "LT": {}, - "GE": {}, - "LE": {}, - "NE": {}, - "Prefix": {}, - "SortOrder": {}, - "NextToken": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Results": { - "type": "list", - "member": { - "type": "structure", - "members": { - "MLModelId": {}, - "TrainingDataSourceId": {}, - "CreatedByIamUser": {}, - "CreatedAt": { - "type": "timestamp" - }, - "LastUpdatedAt": { - "type": "timestamp" - }, - "Name": {}, - "Status": {}, - "SizeInBytes": { - "type": "long" - }, - "EndpointInfo": { - "shape": "S1c" - }, - "TrainingParameters": { - "shape": "S16" - }, - "InputDataLocationS3": {}, - "Algorithm": {}, - "MLModelType": {}, - "ScoreThreshold": { - "type": "float" - }, - "ScoreThresholdLastUpdatedAt": { - "type": "timestamp" - }, - "Message": {} - } - } - }, - "NextToken": {} - } - } - }, - "GetBatchPrediction": { - "input": { - "type": "structure", - "required": [ - "BatchPredictionId" - ], - "members": { - "BatchPredictionId": {} - } - }, - "output": { - "type": "structure", - "members": { - "BatchPredictionId": {}, - "MLModelId": {}, - "BatchPredictionDataSourceId": {}, - "InputDataLocationS3": {}, - "CreatedByIamUser": {}, - "CreatedAt": { - "type": "timestamp" - }, - "LastUpdatedAt": { - "type": "timestamp" - }, - "Name": {}, - "Status": {}, - "OutputUri": {}, - "LogUri": {}, - "Message": {} - } - } - }, - "GetDataSource": { - "input": { - "type": "structure", - "required": [ - "DataSourceId" - ], - "members": { - "DataSourceId": {}, - "Verbose": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "DataSourceId": {}, - "DataLocationS3": {}, - "DataRearrangement": {}, - "CreatedByIamUser": {}, - "CreatedAt": { - "type": "timestamp" - }, - "LastUpdatedAt": { - "type": "timestamp" - }, - "DataSizeInBytes": { - "type": "long" - }, - "NumberOfFiles": { - "type": "long" - }, - "Name": {}, - "Status": {}, - "LogUri": {}, - "Message": {}, - "RedshiftMetadata": { - "shape": "S28" - }, - "RDSMetadata": { - "shape": "S29" - }, - "RoleARN": {}, - "ComputeStatistics": { - "type": "boolean" - }, - "DataSourceSchema": {} - } - } - }, - "GetEvaluation": { - "input": { - "type": "structure", - "required": [ - "EvaluationId" - ], - "members": { - "EvaluationId": {} - } - }, - "output": { - "type": "structure", - "members": { - "EvaluationId": {}, - "MLModelId": {}, - "EvaluationDataSourceId": {}, - "InputDataLocationS3": {}, - "CreatedByIamUser": {}, - "CreatedAt": { - "type": "timestamp" - }, - "LastUpdatedAt": { - "type": "timestamp" - }, - "Name": {}, - "Status": {}, - "PerformanceMetrics": { - "shape": "S2g" - }, - "LogUri": {}, - "Message": {} - } - } - }, - "GetMLModel": { - "input": { - "type": "structure", - "required": [ - "MLModelId" - ], - "members": { - "MLModelId": {}, - "Verbose": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "MLModelId": {}, - "TrainingDataSourceId": {}, - "CreatedByIamUser": {}, - "CreatedAt": { - "type": "timestamp" - }, - "LastUpdatedAt": { - "type": "timestamp" - }, - "Name": {}, - "Status": {}, - "SizeInBytes": { - "type": "long" - }, - "EndpointInfo": { - "shape": "S1c" - }, - "TrainingParameters": { - "shape": "S16" - }, - "InputDataLocationS3": {}, - "MLModelType": {}, - "ScoreThreshold": { - "type": "float" - }, - "ScoreThresholdLastUpdatedAt": { - "type": "timestamp" - }, - "LogUri": {}, - "Message": {}, - "Recipe": {}, - "Schema": {} - } - } - }, - "Predict": { - "input": { - "type": "structure", - "required": [ - "MLModelId", - "Record", - "PredictEndpoint" - ], - "members": { - "MLModelId": {}, - "Record": { - "type": "map", - "key": {}, - "value": {} - }, - "PredictEndpoint": {} - } - }, - "output": { - "type": "structure", - "members": { - "Prediction": { - "type": "structure", - "members": { - "predictedLabel": {}, - "predictedValue": { - "type": "float" - }, - "predictedScores": { - "type": "map", - "key": {}, - "value": { - "type": "float" - } - }, - "details": { - "type": "map", - "key": {}, - "value": {} - } - } - } - } - } - }, - "UpdateBatchPrediction": { - "input": { - "type": "structure", - "required": [ - "BatchPredictionId", - "BatchPredictionName" - ], - "members": { - "BatchPredictionId": {}, - "BatchPredictionName": {} - } - }, - "output": { - "type": "structure", - "members": { - "BatchPredictionId": {} - } - } - }, - "UpdateDataSource": { - "input": { - "type": "structure", - "required": [ - "DataSourceId", - "DataSourceName" - ], - "members": { - "DataSourceId": {}, - "DataSourceName": {} - } - }, - "output": { - "type": "structure", - "members": { - "DataSourceId": {} - } - } - }, - "UpdateEvaluation": { - "input": { - "type": "structure", - "required": [ - "EvaluationId", - "EvaluationName" - ], - "members": { - "EvaluationId": {}, - "EvaluationName": {} - } - }, - "output": { - "type": "structure", - "members": { - "EvaluationId": {} - } - } - }, - "UpdateMLModel": { - "input": { - "type": "structure", - "required": [ - "MLModelId" - ], - "members": { - "MLModelId": {}, - "MLModelName": {}, - "ScoreThreshold": { - "type": "float" - } - } - }, - "output": { - "type": "structure", - "members": { - "MLModelId": {} - } - } - } - }, - "shapes": { - "S8": { - "type": "structure", - "required": [ - "InstanceIdentifier", - "DatabaseName" - ], - "members": { - "InstanceIdentifier": {}, - "DatabaseName": {} - } - }, - "Sr": { - "type": "structure", - "required": [ - "DatabaseName", - "ClusterIdentifier" - ], - "members": { - "DatabaseName": {}, - "ClusterIdentifier": {} - } - }, - "S16": { - "type": "map", - "key": {}, - "value": {} - }, - "S1c": { - "type": "structure", - "members": { - "PeakRequestsPerSecond": { - "type": "integer" - }, - "CreatedAt": { - "type": "timestamp" - }, - "EndpointUrl": {}, - "EndpointStatus": {} - } - }, - "S28": { - "type": "structure", - "members": { - "RedshiftDatabase": { - "shape": "Sr" - }, - "DatabaseUserName": {}, - "SelectSqlQuery": {} - } - }, - "S29": { - "type": "structure", - "members": { - "Database": { - "shape": "S8" - }, - "DatabaseUserName": {}, - "SelectSqlQuery": {}, - "ResourceRole": {}, - "ServiceRole": {}, - "DataPipelineId": {} - } - }, - "S2g": { - "type": "structure", - "members": { - "Properties": { - "type": "map", - "key": {}, - "value": {} - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/machinelearning-2014-12-12.paginators.json b/cli/node_modules/aws-sdk/apis/machinelearning-2014-12-12.paginators.json deleted file mode 100644 index c13ce65af..000000000 --- a/cli/node_modules/aws-sdk/apis/machinelearning-2014-12-12.paginators.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "pagination": { - "DescribeBatchPredictions": { - "limit_key": "Limit", - "output_token": "NextToken", - "input_token": "NextToken", - "result_key": "Results" - }, - "DescribeDataSources": { - "limit_key": "Limit", - "output_token": "NextToken", - "input_token": "NextToken", - "result_key": "Results" - }, - "DescribeEvaluations": { - "limit_key": "Limit", - "output_token": "NextToken", - "input_token": "NextToken", - "result_key": "Results" - }, - "DescribeMLModels": { - "limit_key": "Limit", - "output_token": "NextToken", - "input_token": "NextToken", - "result_key": "Results" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/metadata.json b/cli/node_modules/aws-sdk/apis/metadata.json deleted file mode 100644 index c80c7787f..000000000 --- a/cli/node_modules/aws-sdk/apis/metadata.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "autoscaling": { - "name": "AutoScaling" - }, - "cloudformation": { - "name": "CloudFormation" - }, - "cloudfront": { - "name": "CloudFront", - "versions": ["2013-05-12*", "2013-11-11*", "2014-05-31*", "2014-10-21*", "2014-11-06*"] - }, - "cloudhsm": { - "name": "CloudHSM" - }, - "cloudsearch": { - "name": "CloudSearch" - }, - "cloudsearchdomain": { - "name": "CloudSearchDomain" - }, - "cloudtrail": { - "name": "CloudTrail" - }, - "cloudwatch": { - "prefix": "monitoring", - "name": "CloudWatch" - }, - "cloudwatchlogs": { - "prefix": "logs", - "name": "CloudWatchLogs" - }, - "codecommit": { - "name": "CodeCommit" - }, - "codedeploy": { - "name": "CodeDeploy" - }, - "codepipeline": { - "name": "CodePipeline" - }, - "cognitoidentity": { - "prefix": "cognito-identity", - "name": "CognitoIdentity" - }, - "cognitosync": { - "prefix": "cognito-sync", - "name": "CognitoSync" - }, - "configservice": { - "prefix": "config", - "name": "ConfigService" - }, - "datapipeline": { - "name": "DataPipeline" - }, - "devicefarm": { - "name": "DeviceFarm" - }, - "directconnect": { - "name": "DirectConnect" - }, - "directoryservice": { - "prefix": "ds", - "name": "DirectoryService" - }, - "dynamodb": { - "name": "DynamoDB" - }, - "dynamodbstreams": { - "prefix": "streams.dynamodb", - "name": "DynamoDBStreams" - }, - "ec2": { - "name": "EC2", - "versions": ["2013-06-15*", "2013-10-15*", "2014-02-01*", "2014-05-01*", "2014-06-15*", "2014-09-01*", "2014-10-01*", "2015-03-01*"] - }, - "ecs": { - "name": "ECS" - }, - "efs": { - "name": "EFS" - }, - "elasticache": { - "name": "ElastiCache", - "versions": ["2012-11-15*", "2014-03-24*", "2014-07-15*", "2014-09-30*"] - }, - "elasticbeanstalk": { - "name": "ElasticBeanstalk" - }, - "elb": { - "prefix": "elasticloadbalancing", - "name": "ELB" - }, - "emr": { - "prefix": "elasticmapreduce", - "name": "EMR" - }, - "elastictranscoder": { - "name": "ElasticTranscoder" - }, - "glacier": { - "name": "Glacier" - }, - "iam": { - "name": "IAM" - }, - "importexport": { - "name": "ImportExport" - }, - "kinesis": { - "name": "Kinesis" - }, - "kms": { - "name": "KMS" - }, - "lambda": { - "name": "Lambda" - }, - "machinelearning": { - "name": "MachineLearning" - }, - "mobileanalytics": { - "name": "MobileAnalytics" - }, - "opsworks": { - "name": "OpsWorks" - }, - "rds": { - "name": "RDS", - "versions": ["2014-09-01*"] - }, - "redshift": { - "name": "Redshift" - }, - "route53": { - "name": "Route53" - }, - "route53domains": { - "name": "Route53Domains" - }, - "s3": { - "name": "S3" - }, - "ses": { - "prefix": "email", - "name": "SES" - }, - "simpledb": { - "prefix": "sdb", - "name": "SimpleDB" - }, - "sns": { - "name": "SNS" - }, - "sqs": { - "name": "SQS" - }, - "ssm": { - "name": "SSM" - }, - "storagegateway": { - "name": "StorageGateway" - }, - "sts": { - "name": "STS" - }, - "support": { - "name": "Support" - }, - "swf": { - "name": "SWF" - }, - "workspaces": { - "name": "WorkSpaces" - } -} diff --git a/cli/node_modules/aws-sdk/apis/mobileanalytics-2014-06-05.min.json b/cli/node_modules/aws-sdk/apis/mobileanalytics-2014-06-05.min.json deleted file mode 100644 index a327cb121..000000000 --- a/cli/node_modules/aws-sdk/apis/mobileanalytics-2014-06-05.min.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2014-06-05", - "endpointPrefix": "mobileanalytics", - "serviceFullName": "Amazon Mobile Analytics", - "signatureVersion": "v4", - "protocol": "rest-json" - }, - "operations": { - "PutEvents": { - "http": { - "requestUri": "/2014-06-05/events", - "responseCode": 202 - }, - "input": { - "type": "structure", - "required": [ - "events", - "clientContext" - ], - "members": { - "events": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "eventType", - "timestamp" - ], - "members": { - "eventType": {}, - "timestamp": {}, - "session": { - "type": "structure", - "members": { - "id": {}, - "duration": { - "type": "long" - }, - "startTimestamp": {}, - "stopTimestamp": {} - } - }, - "version": {}, - "attributes": { - "type": "map", - "key": {}, - "value": {} - }, - "metrics": { - "type": "map", - "key": {}, - "value": { - "type": "double" - } - } - } - } - }, - "clientContext": { - "location": "header", - "locationName": "x-amz-Client-Context" - }, - "clientContextEncoding": { - "location": "header", - "locationName": "x-amz-Client-Context-Encoding" - } - } - } - } - }, - "shapes": {} -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/monitoring-2010-08-01.min.json b/cli/node_modules/aws-sdk/apis/monitoring-2010-08-01.min.json deleted file mode 100644 index 8fe06d54d..000000000 --- a/cli/node_modules/aws-sdk/apis/monitoring-2010-08-01.min.json +++ /dev/null @@ -1,500 +0,0 @@ -{ - "metadata": { - "apiVersion": "2010-08-01", - "endpointPrefix": "monitoring", - "serviceAbbreviation": "CloudWatch", - "serviceFullName": "Amazon CloudWatch", - "signatureVersion": "v4", - "xmlNamespace": "http://monitoring.amazonaws.com/doc/2010-08-01/", - "protocol": "query" - }, - "operations": { - "DeleteAlarms": { - "input": { - "type": "structure", - "required": [ - "AlarmNames" - ], - "members": { - "AlarmNames": { - "shape": "S2" - } - } - } - }, - "DescribeAlarmHistory": { - "input": { - "type": "structure", - "members": { - "AlarmName": {}, - "HistoryItemType": {}, - "StartDate": { - "type": "timestamp" - }, - "EndDate": { - "type": "timestamp" - }, - "MaxRecords": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "resultWrapper": "DescribeAlarmHistoryResult", - "type": "structure", - "members": { - "AlarmHistoryItems": { - "type": "list", - "member": { - "type": "structure", - "members": { - "AlarmName": {}, - "Timestamp": { - "type": "timestamp" - }, - "HistoryItemType": {}, - "HistorySummary": {}, - "HistoryData": {} - } - } - }, - "NextToken": {} - } - } - }, - "DescribeAlarms": { - "input": { - "type": "structure", - "members": { - "AlarmNames": { - "shape": "S2" - }, - "AlarmNamePrefix": {}, - "StateValue": {}, - "ActionPrefix": {}, - "MaxRecords": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "resultWrapper": "DescribeAlarmsResult", - "type": "structure", - "members": { - "MetricAlarms": { - "shape": "Sj" - }, - "NextToken": {} - } - } - }, - "DescribeAlarmsForMetric": { - "input": { - "type": "structure", - "required": [ - "MetricName", - "Namespace" - ], - "members": { - "MetricName": {}, - "Namespace": {}, - "Statistic": {}, - "Dimensions": { - "shape": "Sv" - }, - "Period": { - "type": "integer" - }, - "Unit": {} - } - }, - "output": { - "resultWrapper": "DescribeAlarmsForMetricResult", - "type": "structure", - "members": { - "MetricAlarms": { - "shape": "Sj" - } - } - } - }, - "DisableAlarmActions": { - "input": { - "type": "structure", - "required": [ - "AlarmNames" - ], - "members": { - "AlarmNames": { - "shape": "S2" - } - } - } - }, - "EnableAlarmActions": { - "input": { - "type": "structure", - "required": [ - "AlarmNames" - ], - "members": { - "AlarmNames": { - "shape": "S2" - } - } - } - }, - "GetMetricStatistics": { - "input": { - "type": "structure", - "required": [ - "Namespace", - "MetricName", - "StartTime", - "EndTime", - "Period", - "Statistics" - ], - "members": { - "Namespace": {}, - "MetricName": {}, - "Dimensions": { - "shape": "Sv" - }, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "Period": { - "type": "integer" - }, - "Statistics": { - "type": "list", - "member": {} - }, - "Unit": {} - } - }, - "output": { - "resultWrapper": "GetMetricStatisticsResult", - "type": "structure", - "members": { - "Label": {}, - "Datapoints": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Timestamp": { - "type": "timestamp" - }, - "SampleCount": { - "type": "double" - }, - "Average": { - "type": "double" - }, - "Sum": { - "type": "double" - }, - "Minimum": { - "type": "double" - }, - "Maximum": { - "type": "double" - }, - "Unit": {} - }, - "xmlOrder": [ - "Timestamp", - "SampleCount", - "Average", - "Sum", - "Minimum", - "Maximum", - "Unit" - ] - } - } - } - } - }, - "ListMetrics": { - "input": { - "type": "structure", - "members": { - "Namespace": {}, - "MetricName": {}, - "Dimensions": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "Name" - ], - "members": { - "Name": {}, - "Value": {} - } - } - }, - "NextToken": {} - } - }, - "output": { - "xmlOrder": [ - "Metrics", - "NextToken" - ], - "resultWrapper": "ListMetricsResult", - "type": "structure", - "members": { - "Metrics": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Namespace": {}, - "MetricName": {}, - "Dimensions": { - "shape": "Sv" - } - }, - "xmlOrder": [ - "Namespace", - "MetricName", - "Dimensions" - ] - } - }, - "NextToken": {} - } - } - }, - "PutMetricAlarm": { - "input": { - "type": "structure", - "required": [ - "AlarmName", - "MetricName", - "Namespace", - "Statistic", - "Period", - "EvaluationPeriods", - "Threshold", - "ComparisonOperator" - ], - "members": { - "AlarmName": {}, - "AlarmDescription": {}, - "ActionsEnabled": { - "type": "boolean" - }, - "OKActions": { - "shape": "So" - }, - "AlarmActions": { - "shape": "So" - }, - "InsufficientDataActions": { - "shape": "So" - }, - "MetricName": {}, - "Namespace": {}, - "Statistic": {}, - "Dimensions": { - "shape": "Sv" - }, - "Period": { - "type": "integer" - }, - "Unit": {}, - "EvaluationPeriods": { - "type": "integer" - }, - "Threshold": { - "type": "double" - }, - "ComparisonOperator": {} - } - } - }, - "PutMetricData": { - "input": { - "type": "structure", - "required": [ - "Namespace", - "MetricData" - ], - "members": { - "Namespace": {}, - "MetricData": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "MetricName" - ], - "members": { - "MetricName": {}, - "Dimensions": { - "shape": "Sv" - }, - "Timestamp": { - "type": "timestamp" - }, - "Value": { - "type": "double" - }, - "StatisticValues": { - "type": "structure", - "required": [ - "SampleCount", - "Sum", - "Minimum", - "Maximum" - ], - "members": { - "SampleCount": { - "type": "double" - }, - "Sum": { - "type": "double" - }, - "Minimum": { - "type": "double" - }, - "Maximum": { - "type": "double" - } - } - }, - "Unit": {} - } - } - } - } - } - }, - "SetAlarmState": { - "input": { - "type": "structure", - "required": [ - "AlarmName", - "StateValue", - "StateReason" - ], - "members": { - "AlarmName": {}, - "StateValue": {}, - "StateReason": {}, - "StateReasonData": {} - } - } - } - }, - "shapes": { - "S2": { - "type": "list", - "member": {} - }, - "Sj": { - "type": "list", - "member": { - "type": "structure", - "members": { - "AlarmName": {}, - "AlarmArn": {}, - "AlarmDescription": {}, - "AlarmConfigurationUpdatedTimestamp": { - "type": "timestamp" - }, - "ActionsEnabled": { - "type": "boolean" - }, - "OKActions": { - "shape": "So" - }, - "AlarmActions": { - "shape": "So" - }, - "InsufficientDataActions": { - "shape": "So" - }, - "StateValue": {}, - "StateReason": {}, - "StateReasonData": {}, - "StateUpdatedTimestamp": { - "type": "timestamp" - }, - "MetricName": {}, - "Namespace": {}, - "Statistic": {}, - "Dimensions": { - "shape": "Sv" - }, - "Period": { - "type": "integer" - }, - "Unit": {}, - "EvaluationPeriods": { - "type": "integer" - }, - "Threshold": { - "type": "double" - }, - "ComparisonOperator": {} - }, - "xmlOrder": [ - "AlarmName", - "AlarmArn", - "AlarmDescription", - "AlarmConfigurationUpdatedTimestamp", - "ActionsEnabled", - "OKActions", - "AlarmActions", - "InsufficientDataActions", - "StateValue", - "StateReason", - "StateReasonData", - "StateUpdatedTimestamp", - "MetricName", - "Namespace", - "Statistic", - "Dimensions", - "Period", - "Unit", - "EvaluationPeriods", - "Threshold", - "ComparisonOperator" - ] - } - }, - "So": { - "type": "list", - "member": {} - }, - "Sv": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "Name", - "Value" - ], - "members": { - "Name": {}, - "Value": {} - }, - "xmlOrder": [ - "Name", - "Value" - ] - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/monitoring-2010-08-01.paginators.json b/cli/node_modules/aws-sdk/apis/monitoring-2010-08-01.paginators.json deleted file mode 100644 index 7bee28c28..000000000 --- a/cli/node_modules/aws-sdk/apis/monitoring-2010-08-01.paginators.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "pagination": { - "DescribeAlarmHistory": { - "input_token": "NextToken", - "output_token": "NextToken", - "limit_key": "MaxRecords", - "result_key": "AlarmHistoryItems" - }, - "DescribeAlarms": { - "input_token": "NextToken", - "output_token": "NextToken", - "limit_key": "MaxRecords", - "result_key": "MetricAlarms" - }, - "DescribeAlarmsForMetric": { - "result_key": "MetricAlarms" - }, - "ListMetrics": { - "input_token": "NextToken", - "output_token": "NextToken", - "result_key": "Metrics" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/opsworks-2013-02-18.min.json b/cli/node_modules/aws-sdk/apis/opsworks-2013-02-18.min.json deleted file mode 100644 index 69dccc7eb..000000000 --- a/cli/node_modules/aws-sdk/apis/opsworks-2013-02-18.min.json +++ /dev/null @@ -1,2068 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2013-02-18", - "endpointPrefix": "opsworks", - "jsonVersion": "1.1", - "serviceFullName": "AWS OpsWorks", - "signatureVersion": "v4", - "targetPrefix": "OpsWorks_20130218", - "protocol": "json" - }, - "operations": { - "AssignInstance": { - "input": { - "type": "structure", - "required": [ - "InstanceId", - "LayerIds" - ], - "members": { - "InstanceId": {}, - "LayerIds": { - "shape": "S3" - } - } - } - }, - "AssignVolume": { - "input": { - "type": "structure", - "required": [ - "VolumeId" - ], - "members": { - "VolumeId": {}, - "InstanceId": {} - } - } - }, - "AssociateElasticIp": { - "input": { - "type": "structure", - "required": [ - "ElasticIp" - ], - "members": { - "ElasticIp": {}, - "InstanceId": {} - } - } - }, - "AttachElasticLoadBalancer": { - "input": { - "type": "structure", - "required": [ - "ElasticLoadBalancerName", - "LayerId" - ], - "members": { - "ElasticLoadBalancerName": {}, - "LayerId": {} - } - } - }, - "CloneStack": { - "input": { - "type": "structure", - "required": [ - "SourceStackId", - "ServiceRoleArn" - ], - "members": { - "SourceStackId": {}, - "Name": {}, - "Region": {}, - "VpcId": {}, - "Attributes": { - "shape": "S8" - }, - "ServiceRoleArn": {}, - "DefaultInstanceProfileArn": {}, - "DefaultOs": {}, - "HostnameTheme": {}, - "DefaultAvailabilityZone": {}, - "DefaultSubnetId": {}, - "CustomJson": {}, - "ConfigurationManager": { - "shape": "Sa" - }, - "ChefConfiguration": { - "shape": "Sb" - }, - "UseCustomCookbooks": { - "type": "boolean" - }, - "UseOpsworksSecurityGroups": { - "type": "boolean" - }, - "CustomCookbooksSource": { - "shape": "Sd" - }, - "DefaultSshKeyName": {}, - "ClonePermissions": { - "type": "boolean" - }, - "CloneAppIds": { - "shape": "S3" - }, - "DefaultRootDeviceType": {}, - "AgentVersion": {} - } - }, - "output": { - "type": "structure", - "members": { - "StackId": {} - } - } - }, - "CreateApp": { - "input": { - "type": "structure", - "required": [ - "StackId", - "Name", - "Type" - ], - "members": { - "StackId": {}, - "Shortname": {}, - "Name": {}, - "Description": {}, - "DataSources": { - "shape": "Si" - }, - "Type": {}, - "AppSource": { - "shape": "Sd" - }, - "Domains": { - "shape": "S3" - }, - "EnableSsl": { - "type": "boolean" - }, - "SslConfiguration": { - "shape": "Sl" - }, - "Attributes": { - "shape": "Sm" - }, - "Environment": { - "shape": "So" - } - } - }, - "output": { - "type": "structure", - "members": { - "AppId": {} - } - } - }, - "CreateDeployment": { - "input": { - "type": "structure", - "required": [ - "StackId", - "Command" - ], - "members": { - "StackId": {}, - "AppId": {}, - "InstanceIds": { - "shape": "S3" - }, - "Command": { - "shape": "Ss" - }, - "Comment": {}, - "CustomJson": {} - } - }, - "output": { - "type": "structure", - "members": { - "DeploymentId": {} - } - } - }, - "CreateInstance": { - "input": { - "type": "structure", - "required": [ - "StackId", - "LayerIds", - "InstanceType" - ], - "members": { - "StackId": {}, - "LayerIds": { - "shape": "S3" - }, - "InstanceType": {}, - "AutoScalingType": {}, - "Hostname": {}, - "Os": {}, - "AmiId": {}, - "SshKeyName": {}, - "AvailabilityZone": {}, - "VirtualizationType": {}, - "SubnetId": {}, - "Architecture": {}, - "RootDeviceType": {}, - "BlockDeviceMappings": { - "shape": "Sz" - }, - "InstallUpdatesOnBoot": { - "type": "boolean" - }, - "EbsOptimized": { - "type": "boolean" - }, - "AgentVersion": {} - } - }, - "output": { - "type": "structure", - "members": { - "InstanceId": {} - } - } - }, - "CreateLayer": { - "input": { - "type": "structure", - "required": [ - "StackId", - "Type", - "Name", - "Shortname" - ], - "members": { - "StackId": {}, - "Type": {}, - "Name": {}, - "Shortname": {}, - "Attributes": { - "shape": "S17" - }, - "CustomInstanceProfileArn": {}, - "CustomSecurityGroupIds": { - "shape": "S3" - }, - "Packages": { - "shape": "S3" - }, - "VolumeConfigurations": { - "shape": "S19" - }, - "EnableAutoHealing": { - "type": "boolean" - }, - "AutoAssignElasticIps": { - "type": "boolean" - }, - "AutoAssignPublicIps": { - "type": "boolean" - }, - "CustomRecipes": { - "shape": "S1b" - }, - "InstallUpdatesOnBoot": { - "type": "boolean" - }, - "UseEbsOptimizedInstances": { - "type": "boolean" - }, - "LifecycleEventConfiguration": { - "shape": "S1c" - } - } - }, - "output": { - "type": "structure", - "members": { - "LayerId": {} - } - } - }, - "CreateStack": { - "input": { - "type": "structure", - "required": [ - "Name", - "Region", - "ServiceRoleArn", - "DefaultInstanceProfileArn" - ], - "members": { - "Name": {}, - "Region": {}, - "VpcId": {}, - "Attributes": { - "shape": "S8" - }, - "ServiceRoleArn": {}, - "DefaultInstanceProfileArn": {}, - "DefaultOs": {}, - "HostnameTheme": {}, - "DefaultAvailabilityZone": {}, - "DefaultSubnetId": {}, - "CustomJson": {}, - "ConfigurationManager": { - "shape": "Sa" - }, - "ChefConfiguration": { - "shape": "Sb" - }, - "UseCustomCookbooks": { - "type": "boolean" - }, - "UseOpsworksSecurityGroups": { - "type": "boolean" - }, - "CustomCookbooksSource": { - "shape": "Sd" - }, - "DefaultSshKeyName": {}, - "DefaultRootDeviceType": {}, - "AgentVersion": {} - } - }, - "output": { - "type": "structure", - "members": { - "StackId": {} - } - } - }, - "CreateUserProfile": { - "input": { - "type": "structure", - "required": [ - "IamUserArn" - ], - "members": { - "IamUserArn": {}, - "SshUsername": {}, - "SshPublicKey": {}, - "AllowSelfManagement": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "IamUserArn": {} - } - } - }, - "DeleteApp": { - "input": { - "type": "structure", - "required": [ - "AppId" - ], - "members": { - "AppId": {} - } - } - }, - "DeleteInstance": { - "input": { - "type": "structure", - "required": [ - "InstanceId" - ], - "members": { - "InstanceId": {}, - "DeleteElasticIp": { - "type": "boolean" - }, - "DeleteVolumes": { - "type": "boolean" - } - } - } - }, - "DeleteLayer": { - "input": { - "type": "structure", - "required": [ - "LayerId" - ], - "members": { - "LayerId": {} - } - } - }, - "DeleteStack": { - "input": { - "type": "structure", - "required": [ - "StackId" - ], - "members": { - "StackId": {} - } - } - }, - "DeleteUserProfile": { - "input": { - "type": "structure", - "required": [ - "IamUserArn" - ], - "members": { - "IamUserArn": {} - } - } - }, - "DeregisterElasticIp": { - "input": { - "type": "structure", - "required": [ - "ElasticIp" - ], - "members": { - "ElasticIp": {} - } - } - }, - "DeregisterInstance": { - "input": { - "type": "structure", - "required": [ - "InstanceId" - ], - "members": { - "InstanceId": {} - } - } - }, - "DeregisterRdsDbInstance": { - "input": { - "type": "structure", - "required": [ - "RdsDbInstanceArn" - ], - "members": { - "RdsDbInstanceArn": {} - } - } - }, - "DeregisterVolume": { - "input": { - "type": "structure", - "required": [ - "VolumeId" - ], - "members": { - "VolumeId": {} - } - } - }, - "DescribeAgentVersions": { - "input": { - "type": "structure", - "members": { - "StackId": {}, - "ConfigurationManager": { - "shape": "Sa" - } - } - }, - "output": { - "type": "structure", - "members": { - "AgentVersions": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Version": {}, - "ConfigurationManager": { - "shape": "Sa" - } - } - } - } - } - } - }, - "DescribeApps": { - "input": { - "type": "structure", - "members": { - "StackId": {}, - "AppIds": { - "shape": "S3" - } - } - }, - "output": { - "type": "structure", - "members": { - "Apps": { - "type": "list", - "member": { - "type": "structure", - "members": { - "AppId": {}, - "StackId": {}, - "Shortname": {}, - "Name": {}, - "Description": {}, - "DataSources": { - "shape": "Si" - }, - "Type": {}, - "AppSource": { - "shape": "Sd" - }, - "Domains": { - "shape": "S3" - }, - "EnableSsl": { - "type": "boolean" - }, - "SslConfiguration": { - "shape": "Sl" - }, - "Attributes": { - "shape": "Sm" - }, - "CreatedAt": {}, - "Environment": { - "shape": "So" - } - } - } - } - } - } - }, - "DescribeCommands": { - "input": { - "type": "structure", - "members": { - "DeploymentId": {}, - "InstanceId": {}, - "CommandIds": { - "shape": "S3" - } - } - }, - "output": { - "type": "structure", - "members": { - "Commands": { - "type": "list", - "member": { - "type": "structure", - "members": { - "CommandId": {}, - "InstanceId": {}, - "DeploymentId": {}, - "CreatedAt": {}, - "AcknowledgedAt": {}, - "CompletedAt": {}, - "Status": {}, - "ExitCode": { - "type": "integer" - }, - "LogUrl": {}, - "Type": {} - } - } - } - } - } - }, - "DescribeDeployments": { - "input": { - "type": "structure", - "members": { - "StackId": {}, - "AppId": {}, - "DeploymentIds": { - "shape": "S3" - } - } - }, - "output": { - "type": "structure", - "members": { - "Deployments": { - "type": "list", - "member": { - "type": "structure", - "members": { - "DeploymentId": {}, - "StackId": {}, - "AppId": {}, - "CreatedAt": {}, - "CompletedAt": {}, - "Duration": { - "type": "integer" - }, - "IamUserArn": {}, - "Comment": {}, - "Command": { - "shape": "Ss" - }, - "Status": {}, - "CustomJson": {}, - "InstanceIds": { - "shape": "S3" - } - } - } - } - } - } - }, - "DescribeElasticIps": { - "input": { - "type": "structure", - "members": { - "InstanceId": {}, - "StackId": {}, - "Ips": { - "shape": "S3" - } - } - }, - "output": { - "type": "structure", - "members": { - "ElasticIps": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Ip": {}, - "Name": {}, - "Domain": {}, - "Region": {}, - "InstanceId": {} - } - } - } - } - } - }, - "DescribeElasticLoadBalancers": { - "input": { - "type": "structure", - "members": { - "StackId": {}, - "LayerIds": { - "shape": "S3" - } - } - }, - "output": { - "type": "structure", - "members": { - "ElasticLoadBalancers": { - "type": "list", - "member": { - "type": "structure", - "members": { - "ElasticLoadBalancerName": {}, - "Region": {}, - "DnsName": {}, - "StackId": {}, - "LayerId": {}, - "VpcId": {}, - "AvailabilityZones": { - "shape": "S3" - }, - "SubnetIds": { - "shape": "S3" - }, - "Ec2InstanceIds": { - "shape": "S3" - } - } - } - } - } - } - }, - "DescribeInstances": { - "input": { - "type": "structure", - "members": { - "StackId": {}, - "LayerId": {}, - "InstanceIds": { - "shape": "S3" - } - } - }, - "output": { - "type": "structure", - "members": { - "Instances": { - "type": "list", - "member": { - "type": "structure", - "members": { - "AgentVersion": {}, - "AmiId": {}, - "Architecture": {}, - "AutoScalingType": {}, - "AvailabilityZone": {}, - "BlockDeviceMappings": { - "shape": "Sz" - }, - "CreatedAt": {}, - "EbsOptimized": { - "type": "boolean" - }, - "Ec2InstanceId": {}, - "ElasticIp": {}, - "Hostname": {}, - "InfrastructureClass": {}, - "InstallUpdatesOnBoot": { - "type": "boolean" - }, - "InstanceId": {}, - "InstanceProfileArn": {}, - "InstanceType": {}, - "LastServiceErrorId": {}, - "LayerIds": { - "shape": "S3" - }, - "Os": {}, - "Platform": {}, - "PrivateDns": {}, - "PrivateIp": {}, - "PublicDns": {}, - "PublicIp": {}, - "RegisteredBy": {}, - "ReportedAgentVersion": {}, - "ReportedOs": { - "type": "structure", - "members": { - "Family": {}, - "Name": {}, - "Version": {} - } - }, - "RootDeviceType": {}, - "RootDeviceVolumeId": {}, - "SecurityGroupIds": { - "shape": "S3" - }, - "SshHostDsaKeyFingerprint": {}, - "SshHostRsaKeyFingerprint": {}, - "SshKeyName": {}, - "StackId": {}, - "Status": {}, - "SubnetId": {}, - "VirtualizationType": {} - } - } - } - } - } - }, - "DescribeLayers": { - "input": { - "type": "structure", - "members": { - "StackId": {}, - "LayerIds": { - "shape": "S3" - } - } - }, - "output": { - "type": "structure", - "members": { - "Layers": { - "type": "list", - "member": { - "type": "structure", - "members": { - "StackId": {}, - "LayerId": {}, - "Type": {}, - "Name": {}, - "Shortname": {}, - "Attributes": { - "shape": "S17" - }, - "CustomInstanceProfileArn": {}, - "CustomSecurityGroupIds": { - "shape": "S3" - }, - "DefaultSecurityGroupNames": { - "shape": "S3" - }, - "Packages": { - "shape": "S3" - }, - "VolumeConfigurations": { - "shape": "S19" - }, - "EnableAutoHealing": { - "type": "boolean" - }, - "AutoAssignElasticIps": { - "type": "boolean" - }, - "AutoAssignPublicIps": { - "type": "boolean" - }, - "DefaultRecipes": { - "shape": "S1b" - }, - "CustomRecipes": { - "shape": "S1b" - }, - "CreatedAt": {}, - "InstallUpdatesOnBoot": { - "type": "boolean" - }, - "UseEbsOptimizedInstances": { - "type": "boolean" - }, - "LifecycleEventConfiguration": { - "shape": "S1c" - } - } - } - } - } - } - }, - "DescribeLoadBasedAutoScaling": { - "input": { - "type": "structure", - "required": [ - "LayerIds" - ], - "members": { - "LayerIds": { - "shape": "S3" - } - } - }, - "output": { - "type": "structure", - "members": { - "LoadBasedAutoScalingConfigurations": { - "type": "list", - "member": { - "type": "structure", - "members": { - "LayerId": {}, - "Enable": { - "type": "boolean" - }, - "UpScaling": { - "shape": "S2v" - }, - "DownScaling": { - "shape": "S2v" - } - } - } - } - } - } - }, - "DescribeMyUserProfile": { - "output": { - "type": "structure", - "members": { - "UserProfile": { - "type": "structure", - "members": { - "IamUserArn": {}, - "Name": {}, - "SshUsername": {}, - "SshPublicKey": {} - } - } - } - } - }, - "DescribePermissions": { - "input": { - "type": "structure", - "members": { - "IamUserArn": {}, - "StackId": {} - } - }, - "output": { - "type": "structure", - "members": { - "Permissions": { - "type": "list", - "member": { - "type": "structure", - "members": { - "StackId": {}, - "IamUserArn": {}, - "AllowSsh": { - "type": "boolean" - }, - "AllowSudo": { - "type": "boolean" - }, - "Level": {} - } - } - } - } - } - }, - "DescribeRaidArrays": { - "input": { - "type": "structure", - "members": { - "InstanceId": {}, - "StackId": {}, - "RaidArrayIds": { - "shape": "S3" - } - } - }, - "output": { - "type": "structure", - "members": { - "RaidArrays": { - "type": "list", - "member": { - "type": "structure", - "members": { - "RaidArrayId": {}, - "InstanceId": {}, - "Name": {}, - "RaidLevel": { - "type": "integer" - }, - "NumberOfDisks": { - "type": "integer" - }, - "Size": { - "type": "integer" - }, - "Device": {}, - "MountPoint": {}, - "AvailabilityZone": {}, - "CreatedAt": {}, - "StackId": {}, - "VolumeType": {}, - "Iops": { - "type": "integer" - } - } - } - } - } - } - }, - "DescribeRdsDbInstances": { - "input": { - "type": "structure", - "required": [ - "StackId" - ], - "members": { - "StackId": {}, - "RdsDbInstanceArns": { - "shape": "S3" - } - } - }, - "output": { - "type": "structure", - "members": { - "RdsDbInstances": { - "type": "list", - "member": { - "type": "structure", - "members": { - "RdsDbInstanceArn": {}, - "DbInstanceIdentifier": {}, - "DbUser": {}, - "DbPassword": {}, - "Region": {}, - "Address": {}, - "Engine": {}, - "StackId": {}, - "MissingOnRds": { - "type": "boolean" - } - } - } - } - } - } - }, - "DescribeServiceErrors": { - "input": { - "type": "structure", - "members": { - "StackId": {}, - "InstanceId": {}, - "ServiceErrorIds": { - "shape": "S3" - } - } - }, - "output": { - "type": "structure", - "members": { - "ServiceErrors": { - "type": "list", - "member": { - "type": "structure", - "members": { - "ServiceErrorId": {}, - "StackId": {}, - "InstanceId": {}, - "Type": {}, - "Message": {}, - "CreatedAt": {} - } - } - } - } - } - }, - "DescribeStackProvisioningParameters": { - "input": { - "type": "structure", - "required": [ - "StackId" - ], - "members": { - "StackId": {} - } - }, - "output": { - "type": "structure", - "members": { - "AgentInstallerUrl": {}, - "Parameters": { - "type": "map", - "key": {}, - "value": {} - } - } - } - }, - "DescribeStackSummary": { - "input": { - "type": "structure", - "required": [ - "StackId" - ], - "members": { - "StackId": {} - } - }, - "output": { - "type": "structure", - "members": { - "StackSummary": { - "type": "structure", - "members": { - "StackId": {}, - "Name": {}, - "Arn": {}, - "LayersCount": { - "type": "integer" - }, - "AppsCount": { - "type": "integer" - }, - "InstancesCount": { - "type": "structure", - "members": { - "Assigning": { - "type": "integer" - }, - "Booting": { - "type": "integer" - }, - "ConnectionLost": { - "type": "integer" - }, - "Deregistering": { - "type": "integer" - }, - "Online": { - "type": "integer" - }, - "Pending": { - "type": "integer" - }, - "Rebooting": { - "type": "integer" - }, - "Registered": { - "type": "integer" - }, - "Registering": { - "type": "integer" - }, - "Requested": { - "type": "integer" - }, - "RunningSetup": { - "type": "integer" - }, - "SetupFailed": { - "type": "integer" - }, - "ShuttingDown": { - "type": "integer" - }, - "StartFailed": { - "type": "integer" - }, - "Stopped": { - "type": "integer" - }, - "Stopping": { - "type": "integer" - }, - "Terminated": { - "type": "integer" - }, - "Terminating": { - "type": "integer" - }, - "Unassigning": { - "type": "integer" - } - } - } - } - } - } - } - }, - "DescribeStacks": { - "input": { - "type": "structure", - "members": { - "StackIds": { - "shape": "S3" - } - } - }, - "output": { - "type": "structure", - "members": { - "Stacks": { - "type": "list", - "member": { - "type": "structure", - "members": { - "StackId": {}, - "Name": {}, - "Arn": {}, - "Region": {}, - "VpcId": {}, - "Attributes": { - "shape": "S8" - }, - "ServiceRoleArn": {}, - "DefaultInstanceProfileArn": {}, - "DefaultOs": {}, - "HostnameTheme": {}, - "DefaultAvailabilityZone": {}, - "DefaultSubnetId": {}, - "CustomJson": {}, - "ConfigurationManager": { - "shape": "Sa" - }, - "ChefConfiguration": { - "shape": "Sb" - }, - "UseCustomCookbooks": { - "type": "boolean" - }, - "UseOpsworksSecurityGroups": { - "type": "boolean" - }, - "CustomCookbooksSource": { - "shape": "Sd" - }, - "DefaultSshKeyName": {}, - "CreatedAt": {}, - "DefaultRootDeviceType": {}, - "AgentVersion": {} - } - } - } - } - } - }, - "DescribeTimeBasedAutoScaling": { - "input": { - "type": "structure", - "required": [ - "InstanceIds" - ], - "members": { - "InstanceIds": { - "shape": "S3" - } - } - }, - "output": { - "type": "structure", - "members": { - "TimeBasedAutoScalingConfigurations": { - "type": "list", - "member": { - "type": "structure", - "members": { - "InstanceId": {}, - "AutoScalingSchedule": { - "shape": "S3v" - } - } - } - } - } - } - }, - "DescribeUserProfiles": { - "input": { - "type": "structure", - "members": { - "IamUserArns": { - "shape": "S3" - } - } - }, - "output": { - "type": "structure", - "members": { - "UserProfiles": { - "type": "list", - "member": { - "type": "structure", - "members": { - "IamUserArn": {}, - "Name": {}, - "SshUsername": {}, - "SshPublicKey": {}, - "AllowSelfManagement": { - "type": "boolean" - } - } - } - } - } - } - }, - "DescribeVolumes": { - "input": { - "type": "structure", - "members": { - "InstanceId": {}, - "StackId": {}, - "RaidArrayId": {}, - "VolumeIds": { - "shape": "S3" - } - } - }, - "output": { - "type": "structure", - "members": { - "Volumes": { - "type": "list", - "member": { - "type": "structure", - "members": { - "VolumeId": {}, - "Ec2VolumeId": {}, - "Name": {}, - "RaidArrayId": {}, - "InstanceId": {}, - "Status": {}, - "Size": { - "type": "integer" - }, - "Device": {}, - "MountPoint": {}, - "Region": {}, - "AvailabilityZone": {}, - "VolumeType": {}, - "Iops": { - "type": "integer" - } - } - } - } - } - } - }, - "DetachElasticLoadBalancer": { - "input": { - "type": "structure", - "required": [ - "ElasticLoadBalancerName", - "LayerId" - ], - "members": { - "ElasticLoadBalancerName": {}, - "LayerId": {} - } - } - }, - "DisassociateElasticIp": { - "input": { - "type": "structure", - "required": [ - "ElasticIp" - ], - "members": { - "ElasticIp": {} - } - } - }, - "GetHostnameSuggestion": { - "input": { - "type": "structure", - "required": [ - "LayerId" - ], - "members": { - "LayerId": {} - } - }, - "output": { - "type": "structure", - "members": { - "LayerId": {}, - "Hostname": {} - } - } - }, - "GrantAccess": { - "input": { - "type": "structure", - "required": [ - "InstanceId" - ], - "members": { - "InstanceId": {}, - "ValidForInMinutes": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "TemporaryCredential": { - "type": "structure", - "members": { - "Username": {}, - "Password": {}, - "ValidForInMinutes": { - "type": "integer" - }, - "InstanceId": {} - } - } - } - } - }, - "RebootInstance": { - "input": { - "type": "structure", - "required": [ - "InstanceId" - ], - "members": { - "InstanceId": {} - } - } - }, - "RegisterElasticIp": { - "input": { - "type": "structure", - "required": [ - "ElasticIp", - "StackId" - ], - "members": { - "ElasticIp": {}, - "StackId": {} - } - }, - "output": { - "type": "structure", - "members": { - "ElasticIp": {} - } - } - }, - "RegisterInstance": { - "input": { - "type": "structure", - "required": [ - "StackId" - ], - "members": { - "StackId": {}, - "Hostname": {}, - "PublicIp": {}, - "PrivateIp": {}, - "RsaPublicKey": {}, - "RsaPublicKeyFingerprint": {}, - "InstanceIdentity": { - "type": "structure", - "members": { - "Document": {}, - "Signature": {} - } - } - } - }, - "output": { - "type": "structure", - "members": { - "InstanceId": {} - } - } - }, - "RegisterRdsDbInstance": { - "input": { - "type": "structure", - "required": [ - "StackId", - "RdsDbInstanceArn", - "DbUser", - "DbPassword" - ], - "members": { - "StackId": {}, - "RdsDbInstanceArn": {}, - "DbUser": {}, - "DbPassword": {} - } - } - }, - "RegisterVolume": { - "input": { - "type": "structure", - "required": [ - "StackId" - ], - "members": { - "Ec2VolumeId": {}, - "StackId": {} - } - }, - "output": { - "type": "structure", - "members": { - "VolumeId": {} - } - } - }, - "SetLoadBasedAutoScaling": { - "input": { - "type": "structure", - "required": [ - "LayerId" - ], - "members": { - "LayerId": {}, - "Enable": { - "type": "boolean" - }, - "UpScaling": { - "shape": "S2v" - }, - "DownScaling": { - "shape": "S2v" - } - } - } - }, - "SetPermission": { - "input": { - "type": "structure", - "required": [ - "StackId", - "IamUserArn" - ], - "members": { - "StackId": {}, - "IamUserArn": {}, - "AllowSsh": { - "type": "boolean" - }, - "AllowSudo": { - "type": "boolean" - }, - "Level": {} - } - } - }, - "SetTimeBasedAutoScaling": { - "input": { - "type": "structure", - "required": [ - "InstanceId" - ], - "members": { - "InstanceId": {}, - "AutoScalingSchedule": { - "shape": "S3v" - } - } - } - }, - "StartInstance": { - "input": { - "type": "structure", - "required": [ - "InstanceId" - ], - "members": { - "InstanceId": {} - } - } - }, - "StartStack": { - "input": { - "type": "structure", - "required": [ - "StackId" - ], - "members": { - "StackId": {} - } - } - }, - "StopInstance": { - "input": { - "type": "structure", - "required": [ - "InstanceId" - ], - "members": { - "InstanceId": {} - } - } - }, - "StopStack": { - "input": { - "type": "structure", - "required": [ - "StackId" - ], - "members": { - "StackId": {} - } - } - }, - "UnassignInstance": { - "input": { - "type": "structure", - "required": [ - "InstanceId" - ], - "members": { - "InstanceId": {} - } - } - }, - "UnassignVolume": { - "input": { - "type": "structure", - "required": [ - "VolumeId" - ], - "members": { - "VolumeId": {} - } - } - }, - "UpdateApp": { - "input": { - "type": "structure", - "required": [ - "AppId" - ], - "members": { - "AppId": {}, - "Name": {}, - "Description": {}, - "DataSources": { - "shape": "Si" - }, - "Type": {}, - "AppSource": { - "shape": "Sd" - }, - "Domains": { - "shape": "S3" - }, - "EnableSsl": { - "type": "boolean" - }, - "SslConfiguration": { - "shape": "Sl" - }, - "Attributes": { - "shape": "Sm" - }, - "Environment": { - "shape": "So" - } - } - } - }, - "UpdateElasticIp": { - "input": { - "type": "structure", - "required": [ - "ElasticIp" - ], - "members": { - "ElasticIp": {}, - "Name": {} - } - } - }, - "UpdateInstance": { - "input": { - "type": "structure", - "required": [ - "InstanceId" - ], - "members": { - "InstanceId": {}, - "LayerIds": { - "shape": "S3" - }, - "InstanceType": {}, - "AutoScalingType": {}, - "Hostname": {}, - "Os": {}, - "AmiId": {}, - "SshKeyName": {}, - "Architecture": {}, - "InstallUpdatesOnBoot": { - "type": "boolean" - }, - "EbsOptimized": { - "type": "boolean" - }, - "AgentVersion": {} - } - } - }, - "UpdateLayer": { - "input": { - "type": "structure", - "required": [ - "LayerId" - ], - "members": { - "LayerId": {}, - "Name": {}, - "Shortname": {}, - "Attributes": { - "shape": "S17" - }, - "CustomInstanceProfileArn": {}, - "CustomSecurityGroupIds": { - "shape": "S3" - }, - "Packages": { - "shape": "S3" - }, - "VolumeConfigurations": { - "shape": "S19" - }, - "EnableAutoHealing": { - "type": "boolean" - }, - "AutoAssignElasticIps": { - "type": "boolean" - }, - "AutoAssignPublicIps": { - "type": "boolean" - }, - "CustomRecipes": { - "shape": "S1b" - }, - "InstallUpdatesOnBoot": { - "type": "boolean" - }, - "UseEbsOptimizedInstances": { - "type": "boolean" - }, - "LifecycleEventConfiguration": { - "shape": "S1c" - } - } - } - }, - "UpdateMyUserProfile": { - "input": { - "type": "structure", - "members": { - "SshPublicKey": {} - } - } - }, - "UpdateRdsDbInstance": { - "input": { - "type": "structure", - "required": [ - "RdsDbInstanceArn" - ], - "members": { - "RdsDbInstanceArn": {}, - "DbUser": {}, - "DbPassword": {} - } - } - }, - "UpdateStack": { - "input": { - "type": "structure", - "required": [ - "StackId" - ], - "members": { - "StackId": {}, - "Name": {}, - "Attributes": { - "shape": "S8" - }, - "ServiceRoleArn": {}, - "DefaultInstanceProfileArn": {}, - "DefaultOs": {}, - "HostnameTheme": {}, - "DefaultAvailabilityZone": {}, - "DefaultSubnetId": {}, - "CustomJson": {}, - "ConfigurationManager": { - "shape": "Sa" - }, - "ChefConfiguration": { - "shape": "Sb" - }, - "UseCustomCookbooks": { - "type": "boolean" - }, - "CustomCookbooksSource": { - "shape": "Sd" - }, - "DefaultSshKeyName": {}, - "DefaultRootDeviceType": {}, - "UseOpsworksSecurityGroups": { - "type": "boolean" - }, - "AgentVersion": {} - } - } - }, - "UpdateUserProfile": { - "input": { - "type": "structure", - "required": [ - "IamUserArn" - ], - "members": { - "IamUserArn": {}, - "SshUsername": {}, - "SshPublicKey": {}, - "AllowSelfManagement": { - "type": "boolean" - } - } - } - }, - "UpdateVolume": { - "input": { - "type": "structure", - "required": [ - "VolumeId" - ], - "members": { - "VolumeId": {}, - "Name": {}, - "MountPoint": {} - } - } - } - }, - "shapes": { - "S3": { - "type": "list", - "member": {} - }, - "S8": { - "type": "map", - "key": {}, - "value": {} - }, - "Sa": { - "type": "structure", - "members": { - "Name": {}, - "Version": {} - } - }, - "Sb": { - "type": "structure", - "members": { - "ManageBerkshelf": { - "type": "boolean" - }, - "BerkshelfVersion": {} - } - }, - "Sd": { - "type": "structure", - "members": { - "Type": {}, - "Url": {}, - "Username": {}, - "Password": {}, - "SshKey": {}, - "Revision": {} - } - }, - "Si": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Type": {}, - "Arn": {}, - "DatabaseName": {} - } - } - }, - "Sl": { - "type": "structure", - "required": [ - "Certificate", - "PrivateKey" - ], - "members": { - "Certificate": {}, - "PrivateKey": {}, - "Chain": {} - } - }, - "Sm": { - "type": "map", - "key": {}, - "value": {} - }, - "So": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "Key", - "Value" - ], - "members": { - "Key": {}, - "Value": {}, - "Secure": { - "type": "boolean" - } - } - } - }, - "Ss": { - "type": "structure", - "required": [ - "Name" - ], - "members": { - "Name": {}, - "Args": { - "type": "map", - "key": {}, - "value": { - "shape": "S3" - } - } - } - }, - "Sz": { - "type": "list", - "member": { - "type": "structure", - "members": { - "DeviceName": {}, - "NoDevice": {}, - "VirtualName": {}, - "Ebs": { - "type": "structure", - "members": { - "SnapshotId": {}, - "Iops": { - "type": "integer" - }, - "VolumeSize": { - "type": "integer" - }, - "VolumeType": {}, - "DeleteOnTermination": { - "type": "boolean" - } - } - } - } - } - }, - "S17": { - "type": "map", - "key": {}, - "value": {} - }, - "S19": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "MountPoint", - "NumberOfDisks", - "Size" - ], - "members": { - "MountPoint": {}, - "RaidLevel": { - "type": "integer" - }, - "NumberOfDisks": { - "type": "integer" - }, - "Size": { - "type": "integer" - }, - "VolumeType": {}, - "Iops": { - "type": "integer" - } - } - } - }, - "S1b": { - "type": "structure", - "members": { - "Setup": { - "shape": "S3" - }, - "Configure": { - "shape": "S3" - }, - "Deploy": { - "shape": "S3" - }, - "Undeploy": { - "shape": "S3" - }, - "Shutdown": { - "shape": "S3" - } - } - }, - "S1c": { - "type": "structure", - "members": { - "Shutdown": { - "type": "structure", - "members": { - "ExecutionTimeout": { - "type": "integer" - }, - "DelayUntilElbConnectionsDrained": { - "type": "boolean" - } - } - } - } - }, - "S2v": { - "type": "structure", - "members": { - "InstanceCount": { - "type": "integer" - }, - "ThresholdsWaitTime": { - "type": "integer" - }, - "IgnoreMetricsTime": { - "type": "integer" - }, - "CpuThreshold": { - "type": "double" - }, - "MemoryThreshold": { - "type": "double" - }, - "LoadThreshold": { - "type": "double" - }, - "Alarms": { - "shape": "S3" - } - } - }, - "S3v": { - "type": "structure", - "members": { - "Monday": { - "shape": "S3w" - }, - "Tuesday": { - "shape": "S3w" - }, - "Wednesday": { - "shape": "S3w" - }, - "Thursday": { - "shape": "S3w" - }, - "Friday": { - "shape": "S3w" - }, - "Saturday": { - "shape": "S3w" - }, - "Sunday": { - "shape": "S3w" - } - } - }, - "S3w": { - "type": "map", - "key": {}, - "value": {} - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/opsworks-2013-02-18.paginators.json b/cli/node_modules/aws-sdk/apis/opsworks-2013-02-18.paginators.json deleted file mode 100644 index c342768a6..000000000 --- a/cli/node_modules/aws-sdk/apis/opsworks-2013-02-18.paginators.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "pagination": { - "DescribeApps": { - "result_key": "Apps" - }, - "DescribeCommands": { - "result_key": "Commands" - }, - "DescribeDeployments": { - "result_key": "Deployments" - }, - "DescribeElasticIps": { - "result_key": "ElasticIps" - }, - "DescribeElasticLoadBalancers": { - "result_key": "ElasticLoadBalancers" - }, - "DescribeInstances": { - "result_key": "Instances" - }, - "DescribeLayers": { - "result_key": "Layers" - }, - "DescribeLoadBasedAutoScaling": { - "result_key": "LoadBasedAutoScalingConfigurations" - }, - "DescribePermissions": { - "result_key": "Permissions" - }, - "DescribeRaidArrays": { - "result_key": "RaidArrays" - }, - "DescribeServiceErrors": { - "result_key": "ServiceErrors" - }, - "DescribeStacks": { - "result_key": "Stacks" - }, - "DescribeTimeBasedAutoScaling": { - "result_key": "TimeBasedAutoScalingConfigurations" - }, - "DescribeUserProfiles": { - "result_key": "UserProfiles" - }, - "DescribeVolumes": { - "result_key": "Volumes" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/rds-2013-01-10.min.json b/cli/node_modules/aws-sdk/apis/rds-2013-01-10.min.json deleted file mode 100644 index e55d39a92..000000000 --- a/cli/node_modules/aws-sdk/apis/rds-2013-01-10.min.json +++ /dev/null @@ -1,1920 +0,0 @@ -{ - "metadata": { - "apiVersion": "2013-01-10", - "endpointPrefix": "rds", - "serviceAbbreviation": "Amazon RDS", - "serviceFullName": "Amazon Relational Database Service", - "signatureVersion": "v4", - "xmlNamespace": "http://rds.amazonaws.com/doc/2013-01-10/", - "protocol": "query" - }, - "operations": { - "AddSourceIdentifierToSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName", - "SourceIdentifier" - ], - "members": { - "SubscriptionName": {}, - "SourceIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "AddSourceIdentifierToSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S4" - } - } - } - }, - "AddTagsToResource": { - "input": { - "type": "structure", - "required": [ - "ResourceName", - "Tags" - ], - "members": { - "ResourceName": {}, - "Tags": { - "shape": "S9" - } - } - } - }, - "AuthorizeDBSecurityGroupIngress": { - "input": { - "type": "structure", - "required": [ - "DBSecurityGroupName" - ], - "members": { - "DBSecurityGroupName": {}, - "CIDRIP": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupId": {}, - "EC2SecurityGroupOwnerId": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "AuthorizeDBSecurityGroupIngressResult", - "type": "structure", - "members": { - "DBSecurityGroup": { - "shape": "Sd" - } - } - } - }, - "CopyDBSnapshot": { - "input": { - "type": "structure", - "required": [ - "SourceDBSnapshotIdentifier", - "TargetDBSnapshotIdentifier" - ], - "members": { - "SourceDBSnapshotIdentifier": {}, - "TargetDBSnapshotIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CopyDBSnapshotResult", - "type": "structure", - "members": { - "DBSnapshot": { - "shape": "Sk" - } - } - } - }, - "CreateDBInstance": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier", - "AllocatedStorage", - "DBInstanceClass", - "Engine", - "MasterUsername", - "MasterUserPassword" - ], - "members": { - "DBName": {}, - "DBInstanceIdentifier": {}, - "AllocatedStorage": { - "type": "integer" - }, - "DBInstanceClass": {}, - "Engine": {}, - "MasterUsername": {}, - "MasterUserPassword": {}, - "DBSecurityGroups": { - "shape": "Sp" - }, - "VpcSecurityGroupIds": { - "shape": "Sq" - }, - "AvailabilityZone": {}, - "DBSubnetGroupName": {}, - "PreferredMaintenanceWindow": {}, - "DBParameterGroupName": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "PreferredBackupWindow": {}, - "Port": { - "type": "integer" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "LicenseModel": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "CharacterSetName": {}, - "PubliclyAccessible": { - "type": "boolean" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBInstanceResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "CreateDBInstanceReadReplica": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier", - "SourceDBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "SourceDBInstanceIdentifier": {}, - "DBInstanceClass": {}, - "AvailabilityZone": {}, - "Port": { - "type": "integer" - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "PubliclyAccessible": { - "type": "boolean" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBInstanceReadReplicaResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "CreateDBParameterGroup": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupName", - "DBParameterGroupFamily", - "Description" - ], - "members": { - "DBParameterGroupName": {}, - "DBParameterGroupFamily": {}, - "Description": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBParameterGroupResult", - "type": "structure", - "members": { - "DBParameterGroup": { - "shape": "S1c" - } - } - } - }, - "CreateDBSecurityGroup": { - "input": { - "type": "structure", - "required": [ - "DBSecurityGroupName", - "DBSecurityGroupDescription" - ], - "members": { - "DBSecurityGroupName": {}, - "DBSecurityGroupDescription": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBSecurityGroupResult", - "type": "structure", - "members": { - "DBSecurityGroup": { - "shape": "Sd" - } - } - } - }, - "CreateDBSnapshot": { - "input": { - "type": "structure", - "required": [ - "DBSnapshotIdentifier", - "DBInstanceIdentifier" - ], - "members": { - "DBSnapshotIdentifier": {}, - "DBInstanceIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBSnapshotResult", - "type": "structure", - "members": { - "DBSnapshot": { - "shape": "Sk" - } - } - } - }, - "CreateDBSubnetGroup": { - "input": { - "type": "structure", - "required": [ - "DBSubnetGroupName", - "DBSubnetGroupDescription", - "SubnetIds" - ], - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "SubnetIds": { - "shape": "S1i" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBSubnetGroupResult", - "type": "structure", - "members": { - "DBSubnetGroup": { - "shape": "S11" - } - } - } - }, - "CreateEventSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName", - "SnsTopicArn" - ], - "members": { - "SubscriptionName": {}, - "SnsTopicArn": {}, - "SourceType": {}, - "EventCategories": { - "shape": "S6" - }, - "SourceIds": { - "shape": "S5" - }, - "Enabled": { - "type": "boolean" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateEventSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S4" - } - } - } - }, - "CreateOptionGroup": { - "input": { - "type": "structure", - "required": [ - "OptionGroupName", - "EngineName", - "MajorEngineVersion", - "OptionGroupDescription" - ], - "members": { - "OptionGroupName": {}, - "EngineName": {}, - "MajorEngineVersion": {}, - "OptionGroupDescription": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateOptionGroupResult", - "type": "structure", - "members": { - "OptionGroup": { - "shape": "S1o" - } - } - } - }, - "DeleteDBInstance": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "SkipFinalSnapshot": { - "type": "boolean" - }, - "FinalDBSnapshotIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DeleteDBInstanceResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "DeleteDBParameterGroup": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupName" - ], - "members": { - "DBParameterGroupName": {} - } - } - }, - "DeleteDBSecurityGroup": { - "input": { - "type": "structure", - "required": [ - "DBSecurityGroupName" - ], - "members": { - "DBSecurityGroupName": {} - } - } - }, - "DeleteDBSnapshot": { - "input": { - "type": "structure", - "required": [ - "DBSnapshotIdentifier" - ], - "members": { - "DBSnapshotIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DeleteDBSnapshotResult", - "type": "structure", - "members": { - "DBSnapshot": { - "shape": "Sk" - } - } - } - }, - "DeleteDBSubnetGroup": { - "input": { - "type": "structure", - "required": [ - "DBSubnetGroupName" - ], - "members": { - "DBSubnetGroupName": {} - } - } - }, - "DeleteEventSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName" - ], - "members": { - "SubscriptionName": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DeleteEventSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S4" - } - } - } - }, - "DeleteOptionGroup": { - "input": { - "type": "structure", - "required": [ - "OptionGroupName" - ], - "members": { - "OptionGroupName": {} - } - } - }, - "DescribeDBEngineVersions": { - "input": { - "type": "structure", - "members": { - "Engine": {}, - "EngineVersion": {}, - "DBParameterGroupFamily": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {}, - "DefaultOnly": { - "type": "boolean" - }, - "ListSupportedCharacterSets": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "DescribeDBEngineVersionsResult", - "type": "structure", - "members": { - "Marker": {}, - "DBEngineVersions": { - "type": "list", - "member": { - "locationName": "DBEngineVersion", - "type": "structure", - "members": { - "Engine": {}, - "EngineVersion": {}, - "DBParameterGroupFamily": {}, - "DBEngineDescription": {}, - "DBEngineVersionDescription": {}, - "DefaultCharacterSet": { - "shape": "S25" - }, - "SupportedCharacterSets": { - "type": "list", - "member": { - "shape": "S25", - "locationName": "CharacterSet" - } - } - } - } - } - } - } - }, - "DescribeDBInstances": { - "input": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBInstancesResult", - "type": "structure", - "members": { - "Marker": {}, - "DBInstances": { - "type": "list", - "member": { - "shape": "St", - "locationName": "DBInstance" - } - } - } - } - }, - "DescribeDBParameterGroups": { - "input": { - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBParameterGroupsResult", - "type": "structure", - "members": { - "Marker": {}, - "DBParameterGroups": { - "type": "list", - "member": { - "shape": "S1c", - "locationName": "DBParameterGroup" - } - } - } - } - }, - "DescribeDBParameters": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupName" - ], - "members": { - "DBParameterGroupName": {}, - "Source": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBParametersResult", - "type": "structure", - "members": { - "Parameters": { - "shape": "S2f" - }, - "Marker": {} - } - } - }, - "DescribeDBSecurityGroups": { - "input": { - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBSecurityGroupsResult", - "type": "structure", - "members": { - "Marker": {}, - "DBSecurityGroups": { - "type": "list", - "member": { - "shape": "Sd", - "locationName": "DBSecurityGroup" - } - } - } - } - }, - "DescribeDBSnapshots": { - "input": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "DBSnapshotIdentifier": {}, - "SnapshotType": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBSnapshotsResult", - "type": "structure", - "members": { - "Marker": {}, - "DBSnapshots": { - "type": "list", - "member": { - "shape": "Sk", - "locationName": "DBSnapshot" - } - } - } - } - }, - "DescribeDBSubnetGroups": { - "input": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBSubnetGroupsResult", - "type": "structure", - "members": { - "Marker": {}, - "DBSubnetGroups": { - "type": "list", - "member": { - "shape": "S11", - "locationName": "DBSubnetGroup" - } - } - } - } - }, - "DescribeEngineDefaultParameters": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupFamily" - ], - "members": { - "DBParameterGroupFamily": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DescribeEngineDefaultParametersResult", - "type": "structure", - "members": { - "EngineDefaults": { - "type": "structure", - "members": { - "DBParameterGroupFamily": {}, - "Marker": {}, - "Parameters": { - "shape": "S2f" - } - }, - "wrapper": true - } - } - } - }, - "DescribeEventCategories": { - "input": { - "type": "structure", - "members": { - "SourceType": {} - } - }, - "output": { - "resultWrapper": "DescribeEventCategoriesResult", - "type": "structure", - "members": { - "EventCategoriesMapList": { - "type": "list", - "member": { - "locationName": "EventCategoriesMap", - "type": "structure", - "members": { - "SourceType": {}, - "EventCategories": { - "shape": "S6" - } - }, - "wrapper": true - } - } - } - } - }, - "DescribeEventSubscriptions": { - "input": { - "type": "structure", - "members": { - "SubscriptionName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeEventSubscriptionsResult", - "type": "structure", - "members": { - "Marker": {}, - "EventSubscriptionsList": { - "type": "list", - "member": { - "shape": "S4", - "locationName": "EventSubscription" - } - } - } - } - }, - "DescribeEvents": { - "input": { - "type": "structure", - "members": { - "SourceIdentifier": {}, - "SourceType": {}, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "EventCategories": { - "shape": "S6" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeEventsResult", - "type": "structure", - "members": { - "Marker": {}, - "Events": { - "type": "list", - "member": { - "locationName": "Event", - "type": "structure", - "members": { - "SourceIdentifier": {}, - "SourceType": {}, - "Message": {}, - "EventCategories": { - "shape": "S6" - }, - "Date": { - "type": "timestamp" - } - } - } - } - } - } - }, - "DescribeOptionGroupOptions": { - "input": { - "type": "structure", - "required": [ - "EngineName" - ], - "members": { - "EngineName": {}, - "MajorEngineVersion": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeOptionGroupOptionsResult", - "type": "structure", - "members": { - "OptionGroupOptions": { - "type": "list", - "member": { - "locationName": "OptionGroupOption", - "type": "structure", - "members": { - "Name": {}, - "Description": {}, - "EngineName": {}, - "MajorEngineVersion": {}, - "MinimumRequiredMinorEngineVersion": {}, - "PortRequired": { - "type": "boolean" - }, - "DefaultPort": { - "type": "integer" - }, - "OptionsDependedOn": { - "type": "list", - "member": { - "locationName": "OptionName" - } - } - } - } - }, - "Marker": {} - } - } - }, - "DescribeOptionGroups": { - "input": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "Marker": {}, - "MaxRecords": { - "type": "integer" - }, - "EngineName": {}, - "MajorEngineVersion": {} - } - }, - "output": { - "resultWrapper": "DescribeOptionGroupsResult", - "type": "structure", - "members": { - "OptionGroupsList": { - "type": "list", - "member": { - "shape": "S1o", - "locationName": "OptionGroup" - } - }, - "Marker": {} - } - } - }, - "DescribeOrderableDBInstanceOptions": { - "input": { - "type": "structure", - "required": [ - "Engine" - ], - "members": { - "Engine": {}, - "EngineVersion": {}, - "DBInstanceClass": {}, - "LicenseModel": {}, - "Vpc": { - "type": "boolean" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeOrderableDBInstanceOptionsResult", - "type": "structure", - "members": { - "OrderableDBInstanceOptions": { - "type": "list", - "member": { - "locationName": "OrderableDBInstanceOption", - "type": "structure", - "members": { - "Engine": {}, - "EngineVersion": {}, - "DBInstanceClass": {}, - "LicenseModel": {}, - "AvailabilityZones": { - "type": "list", - "member": { - "shape": "S14", - "locationName": "AvailabilityZone" - } - }, - "MultiAZCapable": { - "type": "boolean" - }, - "ReadReplicaCapable": { - "type": "boolean" - }, - "Vpc": { - "type": "boolean" - } - }, - "wrapper": true - } - }, - "Marker": {} - } - } - }, - "DescribeReservedDBInstances": { - "input": { - "type": "structure", - "members": { - "ReservedDBInstanceId": {}, - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "Duration": {}, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeReservedDBInstancesResult", - "type": "structure", - "members": { - "Marker": {}, - "ReservedDBInstances": { - "type": "list", - "member": { - "shape": "S3m", - "locationName": "ReservedDBInstance" - } - } - } - } - }, - "DescribeReservedDBInstancesOfferings": { - "input": { - "type": "structure", - "members": { - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "Duration": {}, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeReservedDBInstancesOfferingsResult", - "type": "structure", - "members": { - "Marker": {}, - "ReservedDBInstancesOfferings": { - "type": "list", - "member": { - "locationName": "ReservedDBInstancesOffering", - "type": "structure", - "members": { - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "double" - }, - "UsagePrice": { - "type": "double" - }, - "CurrencyCode": {}, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "RecurringCharges": { - "shape": "S3o" - } - }, - "wrapper": true - } - } - } - } - }, - "ListTagsForResource": { - "input": { - "type": "structure", - "required": [ - "ResourceName" - ], - "members": { - "ResourceName": {} - } - }, - "output": { - "resultWrapper": "ListTagsForResourceResult", - "type": "structure", - "members": { - "TagList": { - "shape": "S9" - } - } - } - }, - "ModifyDBInstance": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "AllocatedStorage": { - "type": "integer" - }, - "DBInstanceClass": {}, - "DBSecurityGroups": { - "shape": "Sp" - }, - "VpcSecurityGroupIds": { - "shape": "Sq" - }, - "ApplyImmediately": { - "type": "boolean" - }, - "MasterUserPassword": {}, - "DBParameterGroupName": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "PreferredBackupWindow": {}, - "PreferredMaintenanceWindow": {}, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AllowMajorVersionUpgrade": { - "type": "boolean" - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "NewDBInstanceIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyDBInstanceResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "ModifyDBParameterGroup": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupName", - "Parameters" - ], - "members": { - "DBParameterGroupName": {}, - "Parameters": { - "shape": "S2f" - } - } - }, - "output": { - "shape": "S3z", - "resultWrapper": "ModifyDBParameterGroupResult" - } - }, - "ModifyDBSubnetGroup": { - "input": { - "type": "structure", - "required": [ - "DBSubnetGroupName", - "SubnetIds" - ], - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "SubnetIds": { - "shape": "S1i" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyDBSubnetGroupResult", - "type": "structure", - "members": { - "DBSubnetGroup": { - "shape": "S11" - } - } - } - }, - "ModifyEventSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName" - ], - "members": { - "SubscriptionName": {}, - "SnsTopicArn": {}, - "SourceType": {}, - "EventCategories": { - "shape": "S6" - }, - "Enabled": { - "type": "boolean" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyEventSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S4" - } - } - } - }, - "ModifyOptionGroup": { - "input": { - "type": "structure", - "required": [ - "OptionGroupName" - ], - "members": { - "OptionGroupName": {}, - "OptionsToInclude": { - "type": "list", - "member": { - "locationName": "OptionConfiguration", - "type": "structure", - "required": [ - "OptionName" - ], - "members": { - "OptionName": {}, - "Port": { - "type": "integer" - }, - "DBSecurityGroupMemberships": { - "shape": "Sp" - }, - "VpcSecurityGroupMemberships": { - "shape": "Sq" - } - } - } - }, - "OptionsToRemove": { - "type": "list", - "member": {} - }, - "ApplyImmediately": { - "type": "boolean" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyOptionGroupResult", - "type": "structure", - "members": { - "OptionGroup": { - "shape": "S1o" - } - } - } - }, - "PromoteReadReplica": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "PreferredBackupWindow": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "PromoteReadReplicaResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "PurchaseReservedDBInstancesOffering": { - "input": { - "type": "structure", - "required": [ - "ReservedDBInstancesOfferingId" - ], - "members": { - "ReservedDBInstancesOfferingId": {}, - "ReservedDBInstanceId": {}, - "DBInstanceCount": { - "type": "integer" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "PurchaseReservedDBInstancesOfferingResult", - "type": "structure", - "members": { - "ReservedDBInstance": { - "shape": "S3m" - } - } - } - }, - "RebootDBInstance": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "ForceFailover": { - "type": "boolean" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RebootDBInstanceResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "RemoveSourceIdentifierFromSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName", - "SourceIdentifier" - ], - "members": { - "SubscriptionName": {}, - "SourceIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RemoveSourceIdentifierFromSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S4" - } - } - } - }, - "RemoveTagsFromResource": { - "input": { - "type": "structure", - "required": [ - "ResourceName", - "TagKeys" - ], - "members": { - "ResourceName": {}, - "TagKeys": { - "type": "list", - "member": {} - } - } - } - }, - "ResetDBParameterGroup": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupName" - ], - "members": { - "DBParameterGroupName": {}, - "ResetAllParameters": { - "type": "boolean" - }, - "Parameters": { - "shape": "S2f" - } - } - }, - "output": { - "shape": "S3z", - "resultWrapper": "ResetDBParameterGroupResult" - } - }, - "RestoreDBInstanceFromDBSnapshot": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier", - "DBSnapshotIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "DBSnapshotIdentifier": {}, - "DBInstanceClass": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "DBSubnetGroupName": {}, - "MultiAZ": { - "type": "boolean" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "LicenseModel": {}, - "DBName": {}, - "Engine": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RestoreDBInstanceFromDBSnapshotResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "RestoreDBInstanceToPointInTime": { - "input": { - "type": "structure", - "required": [ - "SourceDBInstanceIdentifier", - "TargetDBInstanceIdentifier" - ], - "members": { - "SourceDBInstanceIdentifier": {}, - "TargetDBInstanceIdentifier": {}, - "RestoreTime": { - "type": "timestamp" - }, - "UseLatestRestorableTime": { - "type": "boolean" - }, - "DBInstanceClass": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "DBSubnetGroupName": {}, - "MultiAZ": { - "type": "boolean" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "LicenseModel": {}, - "DBName": {}, - "Engine": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RestoreDBInstanceToPointInTimeResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "RevokeDBSecurityGroupIngress": { - "input": { - "type": "structure", - "required": [ - "DBSecurityGroupName" - ], - "members": { - "DBSecurityGroupName": {}, - "CIDRIP": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupId": {}, - "EC2SecurityGroupOwnerId": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RevokeDBSecurityGroupIngressResult", - "type": "structure", - "members": { - "DBSecurityGroup": { - "shape": "Sd" - } - } - } - } - }, - "shapes": { - "S4": { - "type": "structure", - "members": { - "Id": {}, - "CustomerAwsId": {}, - "CustSubscriptionId": {}, - "SnsTopicArn": {}, - "Status": {}, - "SubscriptionCreationTime": {}, - "SourceType": {}, - "SourceIdsList": { - "shape": "S5" - }, - "EventCategoriesList": { - "shape": "S6" - }, - "Enabled": { - "type": "boolean" - } - }, - "wrapper": true - }, - "S5": { - "type": "list", - "member": { - "locationName": "SourceId" - } - }, - "S6": { - "type": "list", - "member": { - "locationName": "EventCategory" - } - }, - "S9": { - "type": "list", - "member": { - "locationName": "Tag", - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - }, - "Sd": { - "type": "structure", - "members": { - "OwnerId": {}, - "DBSecurityGroupName": {}, - "DBSecurityGroupDescription": {}, - "VpcId": {}, - "EC2SecurityGroups": { - "type": "list", - "member": { - "locationName": "EC2SecurityGroup", - "type": "structure", - "members": { - "Status": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupId": {}, - "EC2SecurityGroupOwnerId": {} - } - } - }, - "IPRanges": { - "type": "list", - "member": { - "locationName": "IPRange", - "type": "structure", - "members": { - "Status": {}, - "CIDRIP": {} - } - } - } - }, - "wrapper": true - }, - "Sk": { - "type": "structure", - "members": { - "DBSnapshotIdentifier": {}, - "DBInstanceIdentifier": {}, - "SnapshotCreateTime": { - "type": "timestamp" - }, - "Engine": {}, - "AllocatedStorage": { - "type": "integer" - }, - "Status": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "VpcId": {}, - "InstanceCreateTime": { - "type": "timestamp" - }, - "MasterUsername": {}, - "EngineVersion": {}, - "LicenseModel": {}, - "SnapshotType": {}, - "Iops": { - "type": "integer" - } - }, - "wrapper": true - }, - "Sp": { - "type": "list", - "member": { - "locationName": "DBSecurityGroupName" - } - }, - "Sq": { - "type": "list", - "member": { - "locationName": "VpcSecurityGroupId" - } - }, - "St": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "DBInstanceClass": {}, - "Engine": {}, - "DBInstanceStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "AllocatedStorage": { - "type": "integer" - }, - "InstanceCreateTime": { - "type": "timestamp" - }, - "PreferredBackupWindow": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "DBSecurityGroups": { - "shape": "Sv" - }, - "VpcSecurityGroups": { - "shape": "Sx" - }, - "DBParameterGroups": { - "type": "list", - "member": { - "locationName": "DBParameterGroup", - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "ParameterApplyStatus": {} - } - } - }, - "AvailabilityZone": {}, - "DBSubnetGroup": { - "shape": "S11" - }, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "DBInstanceClass": {}, - "AllocatedStorage": { - "type": "integer" - }, - "MasterUserPassword": {}, - "Port": { - "type": "integer" - }, - "BackupRetentionPeriod": { - "type": "integer" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "Iops": { - "type": "integer" - }, - "DBInstanceIdentifier": {} - } - }, - "LatestRestorableTime": { - "type": "timestamp" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "ReadReplicaSourceDBInstanceIdentifier": {}, - "ReadReplicaDBInstanceIdentifiers": { - "type": "list", - "member": { - "locationName": "ReadReplicaDBInstanceIdentifier" - } - }, - "LicenseModel": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupMembership": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "Status": {} - } - }, - "CharacterSetName": {}, - "SecondaryAvailabilityZone": {}, - "PubliclyAccessible": { - "type": "boolean" - } - }, - "wrapper": true - }, - "Sv": { - "type": "list", - "member": { - "locationName": "DBSecurityGroup", - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "Status": {} - } - } - }, - "Sx": { - "type": "list", - "member": { - "locationName": "VpcSecurityGroupMembership", - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - } - } - }, - "S11": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "VpcId": {}, - "SubnetGroupStatus": {}, - "Subnets": { - "type": "list", - "member": { - "locationName": "Subnet", - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "shape": "S14" - }, - "SubnetStatus": {} - } - } - } - }, - "wrapper": true - }, - "S14": { - "type": "structure", - "members": { - "Name": {}, - "ProvisionedIopsCapable": { - "type": "boolean" - } - }, - "wrapper": true - }, - "S1c": { - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "DBParameterGroupFamily": {}, - "Description": {} - }, - "wrapper": true - }, - "S1i": { - "type": "list", - "member": { - "locationName": "SubnetIdentifier" - } - }, - "S1o": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "OptionGroupDescription": {}, - "EngineName": {}, - "MajorEngineVersion": {}, - "Options": { - "type": "list", - "member": { - "locationName": "Option", - "type": "structure", - "members": { - "OptionName": {}, - "OptionDescription": {}, - "Port": { - "type": "integer" - }, - "DBSecurityGroupMemberships": { - "shape": "Sv" - }, - "VpcSecurityGroupMemberships": { - "shape": "Sx" - } - } - } - }, - "AllowsVpcAndNonVpcInstanceMemberships": { - "type": "boolean" - }, - "VpcId": {} - }, - "wrapper": true - }, - "S25": { - "type": "structure", - "members": { - "CharacterSetName": {}, - "CharacterSetDescription": {} - } - }, - "S2f": { - "type": "list", - "member": { - "locationName": "Parameter", - "type": "structure", - "members": { - "ParameterName": {}, - "ParameterValue": {}, - "Description": {}, - "Source": {}, - "ApplyType": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "MinimumEngineVersion": {}, - "ApplyMethod": {} - } - } - }, - "S3m": { - "type": "structure", - "members": { - "ReservedDBInstanceId": {}, - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "StartTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "double" - }, - "UsagePrice": { - "type": "double" - }, - "CurrencyCode": {}, - "DBInstanceCount": { - "type": "integer" - }, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "State": {}, - "RecurringCharges": { - "shape": "S3o" - } - }, - "wrapper": true - }, - "S3o": { - "type": "list", - "member": { - "locationName": "RecurringCharge", - "type": "structure", - "members": { - "RecurringChargeAmount": { - "type": "double" - }, - "RecurringChargeFrequency": {} - }, - "wrapper": true - } - }, - "S3z": { - "type": "structure", - "members": { - "DBParameterGroupName": {} - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/rds-2013-01-10.paginators.json b/cli/node_modules/aws-sdk/apis/rds-2013-01-10.paginators.json deleted file mode 100644 index e70d762e0..000000000 --- a/cli/node_modules/aws-sdk/apis/rds-2013-01-10.paginators.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "pagination": { - "DescribeDBEngineVersions": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBEngineVersions" - }, - "DescribeDBInstances": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBInstances" - }, - "DescribeDBParameterGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBParameterGroups" - }, - "DescribeDBParameters": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "Parameters" - }, - "DescribeDBSecurityGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBSecurityGroups" - }, - "DescribeDBSnapshots": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBSnapshots" - }, - "DescribeDBSubnetGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBSubnetGroups" - }, - "DescribeEngineDefaultParameters": { - "input_token": "Marker", - "output_token": "EngineDefaults.Marker", - "limit_key": "MaxRecords", - "result_key": "EngineDefaults.Parameters" - }, - "DescribeEventSubscriptions": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "EventSubscriptionsList" - }, - "DescribeEvents": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "Events" - }, - "DescribeOptionGroupOptions": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "OptionGroupOptions" - }, - "DescribeOptionGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "OptionGroupsList" - }, - "DescribeOrderableDBInstanceOptions": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "OrderableDBInstanceOptions" - }, - "DescribeReservedDBInstances": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "ReservedDBInstances" - }, - "DescribeReservedDBInstancesOfferings": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "ReservedDBInstancesOfferings" - }, - "ListTagsForResource": { - "result_key": "TagList" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/rds-2013-02-12.min.json b/cli/node_modules/aws-sdk/apis/rds-2013-02-12.min.json deleted file mode 100644 index 76c71720a..000000000 --- a/cli/node_modules/aws-sdk/apis/rds-2013-02-12.min.json +++ /dev/null @@ -1,2052 +0,0 @@ -{ - "metadata": { - "apiVersion": "2013-02-12", - "endpointPrefix": "rds", - "serviceAbbreviation": "Amazon RDS", - "serviceFullName": "Amazon Relational Database Service", - "signatureVersion": "v4", - "xmlNamespace": "http://rds.amazonaws.com/doc/2013-02-12/", - "protocol": "query" - }, - "operations": { - "AddSourceIdentifierToSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName", - "SourceIdentifier" - ], - "members": { - "SubscriptionName": {}, - "SourceIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "AddSourceIdentifierToSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S4" - } - } - } - }, - "AddTagsToResource": { - "input": { - "type": "structure", - "required": [ - "ResourceName", - "Tags" - ], - "members": { - "ResourceName": {}, - "Tags": { - "shape": "S9" - } - } - } - }, - "AuthorizeDBSecurityGroupIngress": { - "input": { - "type": "structure", - "required": [ - "DBSecurityGroupName" - ], - "members": { - "DBSecurityGroupName": {}, - "CIDRIP": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupId": {}, - "EC2SecurityGroupOwnerId": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "AuthorizeDBSecurityGroupIngressResult", - "type": "structure", - "members": { - "DBSecurityGroup": { - "shape": "Sd" - } - } - } - }, - "CopyDBSnapshot": { - "input": { - "type": "structure", - "required": [ - "SourceDBSnapshotIdentifier", - "TargetDBSnapshotIdentifier" - ], - "members": { - "SourceDBSnapshotIdentifier": {}, - "TargetDBSnapshotIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CopyDBSnapshotResult", - "type": "structure", - "members": { - "DBSnapshot": { - "shape": "Sk" - } - } - } - }, - "CreateDBInstance": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier", - "AllocatedStorage", - "DBInstanceClass", - "Engine", - "MasterUsername", - "MasterUserPassword" - ], - "members": { - "DBName": {}, - "DBInstanceIdentifier": {}, - "AllocatedStorage": { - "type": "integer" - }, - "DBInstanceClass": {}, - "Engine": {}, - "MasterUsername": {}, - "MasterUserPassword": {}, - "DBSecurityGroups": { - "shape": "Sp" - }, - "VpcSecurityGroupIds": { - "shape": "Sq" - }, - "AvailabilityZone": {}, - "DBSubnetGroupName": {}, - "PreferredMaintenanceWindow": {}, - "DBParameterGroupName": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "PreferredBackupWindow": {}, - "Port": { - "type": "integer" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "LicenseModel": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "CharacterSetName": {}, - "PubliclyAccessible": { - "type": "boolean" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBInstanceResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "CreateDBInstanceReadReplica": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier", - "SourceDBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "SourceDBInstanceIdentifier": {}, - "DBInstanceClass": {}, - "AvailabilityZone": {}, - "Port": { - "type": "integer" - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "PubliclyAccessible": { - "type": "boolean" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBInstanceReadReplicaResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "CreateDBParameterGroup": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupName", - "DBParameterGroupFamily", - "Description" - ], - "members": { - "DBParameterGroupName": {}, - "DBParameterGroupFamily": {}, - "Description": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBParameterGroupResult", - "type": "structure", - "members": { - "DBParameterGroup": { - "shape": "S1d" - } - } - } - }, - "CreateDBSecurityGroup": { - "input": { - "type": "structure", - "required": [ - "DBSecurityGroupName", - "DBSecurityGroupDescription" - ], - "members": { - "DBSecurityGroupName": {}, - "DBSecurityGroupDescription": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBSecurityGroupResult", - "type": "structure", - "members": { - "DBSecurityGroup": { - "shape": "Sd" - } - } - } - }, - "CreateDBSnapshot": { - "input": { - "type": "structure", - "required": [ - "DBSnapshotIdentifier", - "DBInstanceIdentifier" - ], - "members": { - "DBSnapshotIdentifier": {}, - "DBInstanceIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBSnapshotResult", - "type": "structure", - "members": { - "DBSnapshot": { - "shape": "Sk" - } - } - } - }, - "CreateDBSubnetGroup": { - "input": { - "type": "structure", - "required": [ - "DBSubnetGroupName", - "DBSubnetGroupDescription", - "SubnetIds" - ], - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "SubnetIds": { - "shape": "S1j" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBSubnetGroupResult", - "type": "structure", - "members": { - "DBSubnetGroup": { - "shape": "S11" - } - } - } - }, - "CreateEventSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName", - "SnsTopicArn" - ], - "members": { - "SubscriptionName": {}, - "SnsTopicArn": {}, - "SourceType": {}, - "EventCategories": { - "shape": "S6" - }, - "SourceIds": { - "shape": "S5" - }, - "Enabled": { - "type": "boolean" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateEventSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S4" - } - } - } - }, - "CreateOptionGroup": { - "input": { - "type": "structure", - "required": [ - "OptionGroupName", - "EngineName", - "MajorEngineVersion", - "OptionGroupDescription" - ], - "members": { - "OptionGroupName": {}, - "EngineName": {}, - "MajorEngineVersion": {}, - "OptionGroupDescription": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateOptionGroupResult", - "type": "structure", - "members": { - "OptionGroup": { - "shape": "S1p" - } - } - } - }, - "DeleteDBInstance": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "SkipFinalSnapshot": { - "type": "boolean" - }, - "FinalDBSnapshotIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DeleteDBInstanceResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "DeleteDBParameterGroup": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupName" - ], - "members": { - "DBParameterGroupName": {} - } - } - }, - "DeleteDBSecurityGroup": { - "input": { - "type": "structure", - "required": [ - "DBSecurityGroupName" - ], - "members": { - "DBSecurityGroupName": {} - } - } - }, - "DeleteDBSnapshot": { - "input": { - "type": "structure", - "required": [ - "DBSnapshotIdentifier" - ], - "members": { - "DBSnapshotIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DeleteDBSnapshotResult", - "type": "structure", - "members": { - "DBSnapshot": { - "shape": "Sk" - } - } - } - }, - "DeleteDBSubnetGroup": { - "input": { - "type": "structure", - "required": [ - "DBSubnetGroupName" - ], - "members": { - "DBSubnetGroupName": {} - } - } - }, - "DeleteEventSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName" - ], - "members": { - "SubscriptionName": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DeleteEventSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S4" - } - } - } - }, - "DeleteOptionGroup": { - "input": { - "type": "structure", - "required": [ - "OptionGroupName" - ], - "members": { - "OptionGroupName": {} - } - } - }, - "DescribeDBEngineVersions": { - "input": { - "type": "structure", - "members": { - "Engine": {}, - "EngineVersion": {}, - "DBParameterGroupFamily": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {}, - "DefaultOnly": { - "type": "boolean" - }, - "ListSupportedCharacterSets": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "DescribeDBEngineVersionsResult", - "type": "structure", - "members": { - "Marker": {}, - "DBEngineVersions": { - "type": "list", - "member": { - "locationName": "DBEngineVersion", - "type": "structure", - "members": { - "Engine": {}, - "EngineVersion": {}, - "DBParameterGroupFamily": {}, - "DBEngineDescription": {}, - "DBEngineVersionDescription": {}, - "DefaultCharacterSet": { - "shape": "S28" - }, - "SupportedCharacterSets": { - "type": "list", - "member": { - "shape": "S28", - "locationName": "CharacterSet" - } - } - } - } - } - } - } - }, - "DescribeDBInstances": { - "input": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBInstancesResult", - "type": "structure", - "members": { - "Marker": {}, - "DBInstances": { - "type": "list", - "member": { - "shape": "St", - "locationName": "DBInstance" - } - } - } - } - }, - "DescribeDBLogFiles": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "FilenameContains": {}, - "FileLastWritten": { - "type": "long" - }, - "FileSize": { - "type": "long" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBLogFilesResult", - "type": "structure", - "members": { - "DescribeDBLogFiles": { - "type": "list", - "member": { - "locationName": "DescribeDBLogFilesDetails", - "type": "structure", - "members": { - "LogFileName": {}, - "LastWritten": { - "type": "long" - }, - "Size": { - "type": "long" - } - } - } - }, - "Marker": {} - } - } - }, - "DescribeDBParameterGroups": { - "input": { - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBParameterGroupsResult", - "type": "structure", - "members": { - "Marker": {}, - "DBParameterGroups": { - "type": "list", - "member": { - "shape": "S1d", - "locationName": "DBParameterGroup" - } - } - } - } - }, - "DescribeDBParameters": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupName" - ], - "members": { - "DBParameterGroupName": {}, - "Source": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBParametersResult", - "type": "structure", - "members": { - "Parameters": { - "shape": "S2n" - }, - "Marker": {} - } - } - }, - "DescribeDBSecurityGroups": { - "input": { - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBSecurityGroupsResult", - "type": "structure", - "members": { - "Marker": {}, - "DBSecurityGroups": { - "type": "list", - "member": { - "shape": "Sd", - "locationName": "DBSecurityGroup" - } - } - } - } - }, - "DescribeDBSnapshots": { - "input": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "DBSnapshotIdentifier": {}, - "SnapshotType": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBSnapshotsResult", - "type": "structure", - "members": { - "Marker": {}, - "DBSnapshots": { - "type": "list", - "member": { - "shape": "Sk", - "locationName": "DBSnapshot" - } - } - } - } - }, - "DescribeDBSubnetGroups": { - "input": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBSubnetGroupsResult", - "type": "structure", - "members": { - "Marker": {}, - "DBSubnetGroups": { - "type": "list", - "member": { - "shape": "S11", - "locationName": "DBSubnetGroup" - } - } - } - } - }, - "DescribeEngineDefaultParameters": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupFamily" - ], - "members": { - "DBParameterGroupFamily": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DescribeEngineDefaultParametersResult", - "type": "structure", - "members": { - "EngineDefaults": { - "type": "structure", - "members": { - "DBParameterGroupFamily": {}, - "Marker": {}, - "Parameters": { - "shape": "S2n" - } - }, - "wrapper": true - } - } - } - }, - "DescribeEventCategories": { - "input": { - "type": "structure", - "members": { - "SourceType": {} - } - }, - "output": { - "resultWrapper": "DescribeEventCategoriesResult", - "type": "structure", - "members": { - "EventCategoriesMapList": { - "type": "list", - "member": { - "locationName": "EventCategoriesMap", - "type": "structure", - "members": { - "SourceType": {}, - "EventCategories": { - "shape": "S6" - } - }, - "wrapper": true - } - } - } - } - }, - "DescribeEventSubscriptions": { - "input": { - "type": "structure", - "members": { - "SubscriptionName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeEventSubscriptionsResult", - "type": "structure", - "members": { - "Marker": {}, - "EventSubscriptionsList": { - "type": "list", - "member": { - "shape": "S4", - "locationName": "EventSubscription" - } - } - } - } - }, - "DescribeEvents": { - "input": { - "type": "structure", - "members": { - "SourceIdentifier": {}, - "SourceType": {}, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "EventCategories": { - "shape": "S6" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeEventsResult", - "type": "structure", - "members": { - "Marker": {}, - "Events": { - "type": "list", - "member": { - "locationName": "Event", - "type": "structure", - "members": { - "SourceIdentifier": {}, - "SourceType": {}, - "Message": {}, - "EventCategories": { - "shape": "S6" - }, - "Date": { - "type": "timestamp" - } - } - } - } - } - } - }, - "DescribeOptionGroupOptions": { - "input": { - "type": "structure", - "required": [ - "EngineName" - ], - "members": { - "EngineName": {}, - "MajorEngineVersion": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeOptionGroupOptionsResult", - "type": "structure", - "members": { - "OptionGroupOptions": { - "type": "list", - "member": { - "locationName": "OptionGroupOption", - "type": "structure", - "members": { - "Name": {}, - "Description": {}, - "EngineName": {}, - "MajorEngineVersion": {}, - "MinimumRequiredMinorEngineVersion": {}, - "PortRequired": { - "type": "boolean" - }, - "DefaultPort": { - "type": "integer" - }, - "OptionsDependedOn": { - "type": "list", - "member": { - "locationName": "OptionName" - } - }, - "Persistent": { - "type": "boolean" - }, - "OptionGroupOptionSettings": { - "type": "list", - "member": { - "locationName": "OptionGroupOptionSetting", - "type": "structure", - "members": { - "SettingName": {}, - "SettingDescription": {}, - "DefaultValue": {}, - "ApplyType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - } - } - } - } - } - } - }, - "Marker": {} - } - } - }, - "DescribeOptionGroups": { - "input": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "Marker": {}, - "MaxRecords": { - "type": "integer" - }, - "EngineName": {}, - "MajorEngineVersion": {} - } - }, - "output": { - "resultWrapper": "DescribeOptionGroupsResult", - "type": "structure", - "members": { - "OptionGroupsList": { - "type": "list", - "member": { - "shape": "S1p", - "locationName": "OptionGroup" - } - }, - "Marker": {} - } - } - }, - "DescribeOrderableDBInstanceOptions": { - "input": { - "type": "structure", - "required": [ - "Engine" - ], - "members": { - "Engine": {}, - "EngineVersion": {}, - "DBInstanceClass": {}, - "LicenseModel": {}, - "Vpc": { - "type": "boolean" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeOrderableDBInstanceOptionsResult", - "type": "structure", - "members": { - "OrderableDBInstanceOptions": { - "type": "list", - "member": { - "locationName": "OrderableDBInstanceOption", - "type": "structure", - "members": { - "Engine": {}, - "EngineVersion": {}, - "DBInstanceClass": {}, - "LicenseModel": {}, - "AvailabilityZones": { - "type": "list", - "member": { - "shape": "S14", - "locationName": "AvailabilityZone" - } - }, - "MultiAZCapable": { - "type": "boolean" - }, - "ReadReplicaCapable": { - "type": "boolean" - }, - "Vpc": { - "type": "boolean" - } - }, - "wrapper": true - } - }, - "Marker": {} - } - } - }, - "DescribeReservedDBInstances": { - "input": { - "type": "structure", - "members": { - "ReservedDBInstanceId": {}, - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "Duration": {}, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeReservedDBInstancesResult", - "type": "structure", - "members": { - "Marker": {}, - "ReservedDBInstances": { - "type": "list", - "member": { - "shape": "S3w", - "locationName": "ReservedDBInstance" - } - } - } - } - }, - "DescribeReservedDBInstancesOfferings": { - "input": { - "type": "structure", - "members": { - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "Duration": {}, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeReservedDBInstancesOfferingsResult", - "type": "structure", - "members": { - "Marker": {}, - "ReservedDBInstancesOfferings": { - "type": "list", - "member": { - "locationName": "ReservedDBInstancesOffering", - "type": "structure", - "members": { - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "double" - }, - "UsagePrice": { - "type": "double" - }, - "CurrencyCode": {}, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "RecurringCharges": { - "shape": "S3y" - } - }, - "wrapper": true - } - } - } - } - }, - "DownloadDBLogFilePortion": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier", - "LogFileName" - ], - "members": { - "DBInstanceIdentifier": {}, - "LogFileName": {}, - "Marker": {}, - "NumberOfLines": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "DownloadDBLogFilePortionResult", - "type": "structure", - "members": { - "LogFileData": {}, - "Marker": {}, - "AdditionalDataPending": { - "type": "boolean" - } - } - } - }, - "ListTagsForResource": { - "input": { - "type": "structure", - "required": [ - "ResourceName" - ], - "members": { - "ResourceName": {} - } - }, - "output": { - "resultWrapper": "ListTagsForResourceResult", - "type": "structure", - "members": { - "TagList": { - "shape": "S9" - } - } - } - }, - "ModifyDBInstance": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "AllocatedStorage": { - "type": "integer" - }, - "DBInstanceClass": {}, - "DBSecurityGroups": { - "shape": "Sp" - }, - "VpcSecurityGroupIds": { - "shape": "Sq" - }, - "ApplyImmediately": { - "type": "boolean" - }, - "MasterUserPassword": {}, - "DBParameterGroupName": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "PreferredBackupWindow": {}, - "PreferredMaintenanceWindow": {}, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AllowMajorVersionUpgrade": { - "type": "boolean" - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "NewDBInstanceIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyDBInstanceResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "ModifyDBParameterGroup": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupName", - "Parameters" - ], - "members": { - "DBParameterGroupName": {}, - "Parameters": { - "shape": "S2n" - } - } - }, - "output": { - "shape": "S4b", - "resultWrapper": "ModifyDBParameterGroupResult" - } - }, - "ModifyDBSubnetGroup": { - "input": { - "type": "structure", - "required": [ - "DBSubnetGroupName", - "SubnetIds" - ], - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "SubnetIds": { - "shape": "S1j" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyDBSubnetGroupResult", - "type": "structure", - "members": { - "DBSubnetGroup": { - "shape": "S11" - } - } - } - }, - "ModifyEventSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName" - ], - "members": { - "SubscriptionName": {}, - "SnsTopicArn": {}, - "SourceType": {}, - "EventCategories": { - "shape": "S6" - }, - "Enabled": { - "type": "boolean" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyEventSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S4" - } - } - } - }, - "ModifyOptionGroup": { - "input": { - "type": "structure", - "required": [ - "OptionGroupName" - ], - "members": { - "OptionGroupName": {}, - "OptionsToInclude": { - "type": "list", - "member": { - "locationName": "OptionConfiguration", - "type": "structure", - "required": [ - "OptionName" - ], - "members": { - "OptionName": {}, - "Port": { - "type": "integer" - }, - "DBSecurityGroupMemberships": { - "shape": "Sp" - }, - "VpcSecurityGroupMemberships": { - "shape": "Sq" - }, - "OptionSettings": { - "type": "list", - "member": { - "shape": "S1t", - "locationName": "OptionSetting" - } - } - } - } - }, - "OptionsToRemove": { - "type": "list", - "member": {} - }, - "ApplyImmediately": { - "type": "boolean" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyOptionGroupResult", - "type": "structure", - "members": { - "OptionGroup": { - "shape": "S1p" - } - } - } - }, - "PromoteReadReplica": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "PreferredBackupWindow": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "PromoteReadReplicaResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "PurchaseReservedDBInstancesOffering": { - "input": { - "type": "structure", - "required": [ - "ReservedDBInstancesOfferingId" - ], - "members": { - "ReservedDBInstancesOfferingId": {}, - "ReservedDBInstanceId": {}, - "DBInstanceCount": { - "type": "integer" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "PurchaseReservedDBInstancesOfferingResult", - "type": "structure", - "members": { - "ReservedDBInstance": { - "shape": "S3w" - } - } - } - }, - "RebootDBInstance": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "ForceFailover": { - "type": "boolean" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RebootDBInstanceResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "RemoveSourceIdentifierFromSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName", - "SourceIdentifier" - ], - "members": { - "SubscriptionName": {}, - "SourceIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RemoveSourceIdentifierFromSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S4" - } - } - } - }, - "RemoveTagsFromResource": { - "input": { - "type": "structure", - "required": [ - "ResourceName", - "TagKeys" - ], - "members": { - "ResourceName": {}, - "TagKeys": { - "type": "list", - "member": {} - } - } - } - }, - "ResetDBParameterGroup": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupName" - ], - "members": { - "DBParameterGroupName": {}, - "ResetAllParameters": { - "type": "boolean" - }, - "Parameters": { - "shape": "S2n" - } - } - }, - "output": { - "shape": "S4b", - "resultWrapper": "ResetDBParameterGroupResult" - } - }, - "RestoreDBInstanceFromDBSnapshot": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier", - "DBSnapshotIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "DBSnapshotIdentifier": {}, - "DBInstanceClass": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "DBSubnetGroupName": {}, - "MultiAZ": { - "type": "boolean" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "LicenseModel": {}, - "DBName": {}, - "Engine": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RestoreDBInstanceFromDBSnapshotResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "RestoreDBInstanceToPointInTime": { - "input": { - "type": "structure", - "required": [ - "SourceDBInstanceIdentifier", - "TargetDBInstanceIdentifier" - ], - "members": { - "SourceDBInstanceIdentifier": {}, - "TargetDBInstanceIdentifier": {}, - "RestoreTime": { - "type": "timestamp" - }, - "UseLatestRestorableTime": { - "type": "boolean" - }, - "DBInstanceClass": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "DBSubnetGroupName": {}, - "MultiAZ": { - "type": "boolean" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "LicenseModel": {}, - "DBName": {}, - "Engine": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RestoreDBInstanceToPointInTimeResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "RevokeDBSecurityGroupIngress": { - "input": { - "type": "structure", - "required": [ - "DBSecurityGroupName" - ], - "members": { - "DBSecurityGroupName": {}, - "CIDRIP": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupId": {}, - "EC2SecurityGroupOwnerId": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RevokeDBSecurityGroupIngressResult", - "type": "structure", - "members": { - "DBSecurityGroup": { - "shape": "Sd" - } - } - } - } - }, - "shapes": { - "S4": { - "type": "structure", - "members": { - "CustomerAwsId": {}, - "CustSubscriptionId": {}, - "SnsTopicArn": {}, - "Status": {}, - "SubscriptionCreationTime": {}, - "SourceType": {}, - "SourceIdsList": { - "shape": "S5" - }, - "EventCategoriesList": { - "shape": "S6" - }, - "Enabled": { - "type": "boolean" - } - }, - "wrapper": true - }, - "S5": { - "type": "list", - "member": { - "locationName": "SourceId" - } - }, - "S6": { - "type": "list", - "member": { - "locationName": "EventCategory" - } - }, - "S9": { - "type": "list", - "member": { - "locationName": "Tag", - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - }, - "Sd": { - "type": "structure", - "members": { - "OwnerId": {}, - "DBSecurityGroupName": {}, - "DBSecurityGroupDescription": {}, - "VpcId": {}, - "EC2SecurityGroups": { - "type": "list", - "member": { - "locationName": "EC2SecurityGroup", - "type": "structure", - "members": { - "Status": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupId": {}, - "EC2SecurityGroupOwnerId": {} - } - } - }, - "IPRanges": { - "type": "list", - "member": { - "locationName": "IPRange", - "type": "structure", - "members": { - "Status": {}, - "CIDRIP": {} - } - } - } - }, - "wrapper": true - }, - "Sk": { - "type": "structure", - "members": { - "DBSnapshotIdentifier": {}, - "DBInstanceIdentifier": {}, - "SnapshotCreateTime": { - "type": "timestamp" - }, - "Engine": {}, - "AllocatedStorage": { - "type": "integer" - }, - "Status": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "VpcId": {}, - "InstanceCreateTime": { - "type": "timestamp" - }, - "MasterUsername": {}, - "EngineVersion": {}, - "LicenseModel": {}, - "SnapshotType": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {} - }, - "wrapper": true - }, - "Sp": { - "type": "list", - "member": { - "locationName": "DBSecurityGroupName" - } - }, - "Sq": { - "type": "list", - "member": { - "locationName": "VpcSecurityGroupId" - } - }, - "St": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "DBInstanceClass": {}, - "Engine": {}, - "DBInstanceStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "AllocatedStorage": { - "type": "integer" - }, - "InstanceCreateTime": { - "type": "timestamp" - }, - "PreferredBackupWindow": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "DBSecurityGroups": { - "shape": "Sv" - }, - "VpcSecurityGroups": { - "shape": "Sx" - }, - "DBParameterGroups": { - "type": "list", - "member": { - "locationName": "DBParameterGroup", - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "ParameterApplyStatus": {} - } - } - }, - "AvailabilityZone": {}, - "DBSubnetGroup": { - "shape": "S11" - }, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "DBInstanceClass": {}, - "AllocatedStorage": { - "type": "integer" - }, - "MasterUserPassword": {}, - "Port": { - "type": "integer" - }, - "BackupRetentionPeriod": { - "type": "integer" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "Iops": { - "type": "integer" - }, - "DBInstanceIdentifier": {} - } - }, - "LatestRestorableTime": { - "type": "timestamp" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "ReadReplicaSourceDBInstanceIdentifier": {}, - "ReadReplicaDBInstanceIdentifiers": { - "type": "list", - "member": { - "locationName": "ReadReplicaDBInstanceIdentifier" - } - }, - "LicenseModel": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupMemberships": { - "type": "list", - "member": { - "locationName": "OptionGroupMembership", - "type": "structure", - "members": { - "OptionGroupName": {}, - "Status": {} - } - } - }, - "CharacterSetName": {}, - "SecondaryAvailabilityZone": {}, - "PubliclyAccessible": { - "type": "boolean" - } - }, - "wrapper": true - }, - "Sv": { - "type": "list", - "member": { - "locationName": "DBSecurityGroup", - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "Status": {} - } - } - }, - "Sx": { - "type": "list", - "member": { - "locationName": "VpcSecurityGroupMembership", - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - } - } - }, - "S11": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "VpcId": {}, - "SubnetGroupStatus": {}, - "Subnets": { - "type": "list", - "member": { - "locationName": "Subnet", - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "shape": "S14" - }, - "SubnetStatus": {} - } - } - } - }, - "wrapper": true - }, - "S14": { - "type": "structure", - "members": { - "Name": {}, - "ProvisionedIopsCapable": { - "type": "boolean" - } - }, - "wrapper": true - }, - "S1d": { - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "DBParameterGroupFamily": {}, - "Description": {} - }, - "wrapper": true - }, - "S1j": { - "type": "list", - "member": { - "locationName": "SubnetIdentifier" - } - }, - "S1p": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "OptionGroupDescription": {}, - "EngineName": {}, - "MajorEngineVersion": {}, - "Options": { - "type": "list", - "member": { - "locationName": "Option", - "type": "structure", - "members": { - "OptionName": {}, - "OptionDescription": {}, - "Persistent": { - "type": "boolean" - }, - "Port": { - "type": "integer" - }, - "OptionSettings": { - "type": "list", - "member": { - "shape": "S1t", - "locationName": "OptionSetting" - } - }, - "DBSecurityGroupMemberships": { - "shape": "Sv" - }, - "VpcSecurityGroupMemberships": { - "shape": "Sx" - } - } - } - }, - "AllowsVpcAndNonVpcInstanceMemberships": { - "type": "boolean" - }, - "VpcId": {} - }, - "wrapper": true - }, - "S1t": { - "type": "structure", - "members": { - "Name": {}, - "Value": {}, - "DefaultValue": {}, - "Description": {}, - "ApplyType": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "IsCollection": { - "type": "boolean" - } - } - }, - "S28": { - "type": "structure", - "members": { - "CharacterSetName": {}, - "CharacterSetDescription": {} - } - }, - "S2n": { - "type": "list", - "member": { - "locationName": "Parameter", - "type": "structure", - "members": { - "ParameterName": {}, - "ParameterValue": {}, - "Description": {}, - "Source": {}, - "ApplyType": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "MinimumEngineVersion": {}, - "ApplyMethod": {} - } - } - }, - "S3w": { - "type": "structure", - "members": { - "ReservedDBInstanceId": {}, - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "StartTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "double" - }, - "UsagePrice": { - "type": "double" - }, - "CurrencyCode": {}, - "DBInstanceCount": { - "type": "integer" - }, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "State": {}, - "RecurringCharges": { - "shape": "S3y" - } - }, - "wrapper": true - }, - "S3y": { - "type": "list", - "member": { - "locationName": "RecurringCharge", - "type": "structure", - "members": { - "RecurringChargeAmount": { - "type": "double" - }, - "RecurringChargeFrequency": {} - }, - "wrapper": true - } - }, - "S4b": { - "type": "structure", - "members": { - "DBParameterGroupName": {} - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/rds-2013-02-12.paginators.json b/cli/node_modules/aws-sdk/apis/rds-2013-02-12.paginators.json deleted file mode 100644 index 662845c12..000000000 --- a/cli/node_modules/aws-sdk/apis/rds-2013-02-12.paginators.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "pagination": { - "DescribeDBEngineVersions": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBEngineVersions" - }, - "DescribeDBInstances": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBInstances" - }, - "DescribeDBLogFiles": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DescribeDBLogFiles" - }, - "DescribeDBParameterGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBParameterGroups" - }, - "DescribeDBParameters": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "Parameters" - }, - "DescribeDBSecurityGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBSecurityGroups" - }, - "DescribeDBSnapshots": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBSnapshots" - }, - "DescribeDBSubnetGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBSubnetGroups" - }, - "DescribeEngineDefaultParameters": { - "input_token": "Marker", - "output_token": "EngineDefaults.Marker", - "limit_key": "MaxRecords", - "result_key": "EngineDefaults.Parameters" - }, - "DescribeEventSubscriptions": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "EventSubscriptionsList" - }, - "DescribeEvents": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "Events" - }, - "DescribeOptionGroupOptions": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "OptionGroupOptions" - }, - "DescribeOptionGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "OptionGroupsList" - }, - "DescribeOrderableDBInstanceOptions": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "OrderableDBInstanceOptions" - }, - "DescribeReservedDBInstances": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "ReservedDBInstances" - }, - "DescribeReservedDBInstancesOfferings": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "ReservedDBInstancesOfferings" - }, - "DownloadDBLogFilePortion": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "NumberOfLines", - "more_results": "AdditionalDataPending", - "result_key": "LogFileData" - }, - "ListTagsForResource": { - "result_key": "TagList" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/rds-2013-09-09.min.json b/cli/node_modules/aws-sdk/apis/rds-2013-09-09.min.json deleted file mode 100644 index 8d02638fb..000000000 --- a/cli/node_modules/aws-sdk/apis/rds-2013-09-09.min.json +++ /dev/null @@ -1,2188 +0,0 @@ -{ - "metadata": { - "apiVersion": "2013-09-09", - "endpointPrefix": "rds", - "serviceAbbreviation": "Amazon RDS", - "serviceFullName": "Amazon Relational Database Service", - "signatureVersion": "v4", - "xmlNamespace": "http://rds.amazonaws.com/doc/2013-09-09/", - "protocol": "query" - }, - "operations": { - "AddSourceIdentifierToSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName", - "SourceIdentifier" - ], - "members": { - "SubscriptionName": {}, - "SourceIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "AddSourceIdentifierToSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S4" - } - } - } - }, - "AddTagsToResource": { - "input": { - "type": "structure", - "required": [ - "ResourceName", - "Tags" - ], - "members": { - "ResourceName": {}, - "Tags": { - "shape": "S9" - } - } - } - }, - "AuthorizeDBSecurityGroupIngress": { - "input": { - "type": "structure", - "required": [ - "DBSecurityGroupName" - ], - "members": { - "DBSecurityGroupName": {}, - "CIDRIP": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupId": {}, - "EC2SecurityGroupOwnerId": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "AuthorizeDBSecurityGroupIngressResult", - "type": "structure", - "members": { - "DBSecurityGroup": { - "shape": "Sd" - } - } - } - }, - "CopyDBSnapshot": { - "input": { - "type": "structure", - "required": [ - "SourceDBSnapshotIdentifier", - "TargetDBSnapshotIdentifier" - ], - "members": { - "SourceDBSnapshotIdentifier": {}, - "TargetDBSnapshotIdentifier": {}, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CopyDBSnapshotResult", - "type": "structure", - "members": { - "DBSnapshot": { - "shape": "Sk" - } - } - } - }, - "CreateDBInstance": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier", - "AllocatedStorage", - "DBInstanceClass", - "Engine", - "MasterUsername", - "MasterUserPassword" - ], - "members": { - "DBName": {}, - "DBInstanceIdentifier": {}, - "AllocatedStorage": { - "type": "integer" - }, - "DBInstanceClass": {}, - "Engine": {}, - "MasterUsername": {}, - "MasterUserPassword": {}, - "DBSecurityGroups": { - "shape": "Sp" - }, - "VpcSecurityGroupIds": { - "shape": "Sq" - }, - "AvailabilityZone": {}, - "DBSubnetGroupName": {}, - "PreferredMaintenanceWindow": {}, - "DBParameterGroupName": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "PreferredBackupWindow": {}, - "Port": { - "type": "integer" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "LicenseModel": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "CharacterSetName": {}, - "PubliclyAccessible": { - "type": "boolean" - }, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBInstanceResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "CreateDBInstanceReadReplica": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier", - "SourceDBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "SourceDBInstanceIdentifier": {}, - "DBInstanceClass": {}, - "AvailabilityZone": {}, - "Port": { - "type": "integer" - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "PubliclyAccessible": { - "type": "boolean" - }, - "Tags": { - "shape": "S9" - }, - "DBSubnetGroupName": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBInstanceReadReplicaResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "CreateDBParameterGroup": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupName", - "DBParameterGroupFamily", - "Description" - ], - "members": { - "DBParameterGroupName": {}, - "DBParameterGroupFamily": {}, - "Description": {}, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBParameterGroupResult", - "type": "structure", - "members": { - "DBParameterGroup": { - "shape": "S1f" - } - } - } - }, - "CreateDBSecurityGroup": { - "input": { - "type": "structure", - "required": [ - "DBSecurityGroupName", - "DBSecurityGroupDescription" - ], - "members": { - "DBSecurityGroupName": {}, - "DBSecurityGroupDescription": {}, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBSecurityGroupResult", - "type": "structure", - "members": { - "DBSecurityGroup": { - "shape": "Sd" - } - } - } - }, - "CreateDBSnapshot": { - "input": { - "type": "structure", - "required": [ - "DBSnapshotIdentifier", - "DBInstanceIdentifier" - ], - "members": { - "DBSnapshotIdentifier": {}, - "DBInstanceIdentifier": {}, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBSnapshotResult", - "type": "structure", - "members": { - "DBSnapshot": { - "shape": "Sk" - } - } - } - }, - "CreateDBSubnetGroup": { - "input": { - "type": "structure", - "required": [ - "DBSubnetGroupName", - "DBSubnetGroupDescription", - "SubnetIds" - ], - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "SubnetIds": { - "shape": "S1l" - }, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBSubnetGroupResult", - "type": "structure", - "members": { - "DBSubnetGroup": { - "shape": "S11" - } - } - } - }, - "CreateEventSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName", - "SnsTopicArn" - ], - "members": { - "SubscriptionName": {}, - "SnsTopicArn": {}, - "SourceType": {}, - "EventCategories": { - "shape": "S6" - }, - "SourceIds": { - "shape": "S5" - }, - "Enabled": { - "type": "boolean" - }, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateEventSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S4" - } - } - } - }, - "CreateOptionGroup": { - "input": { - "type": "structure", - "required": [ - "OptionGroupName", - "EngineName", - "MajorEngineVersion", - "OptionGroupDescription" - ], - "members": { - "OptionGroupName": {}, - "EngineName": {}, - "MajorEngineVersion": {}, - "OptionGroupDescription": {}, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateOptionGroupResult", - "type": "structure", - "members": { - "OptionGroup": { - "shape": "S1r" - } - } - } - }, - "DeleteDBInstance": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "SkipFinalSnapshot": { - "type": "boolean" - }, - "FinalDBSnapshotIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DeleteDBInstanceResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "DeleteDBParameterGroup": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupName" - ], - "members": { - "DBParameterGroupName": {} - } - } - }, - "DeleteDBSecurityGroup": { - "input": { - "type": "structure", - "required": [ - "DBSecurityGroupName" - ], - "members": { - "DBSecurityGroupName": {} - } - } - }, - "DeleteDBSnapshot": { - "input": { - "type": "structure", - "required": [ - "DBSnapshotIdentifier" - ], - "members": { - "DBSnapshotIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DeleteDBSnapshotResult", - "type": "structure", - "members": { - "DBSnapshot": { - "shape": "Sk" - } - } - } - }, - "DeleteDBSubnetGroup": { - "input": { - "type": "structure", - "required": [ - "DBSubnetGroupName" - ], - "members": { - "DBSubnetGroupName": {} - } - } - }, - "DeleteEventSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName" - ], - "members": { - "SubscriptionName": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DeleteEventSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S4" - } - } - } - }, - "DeleteOptionGroup": { - "input": { - "type": "structure", - "required": [ - "OptionGroupName" - ], - "members": { - "OptionGroupName": {} - } - } - }, - "DescribeDBEngineVersions": { - "input": { - "type": "structure", - "members": { - "Engine": {}, - "EngineVersion": {}, - "DBParameterGroupFamily": {}, - "Filters": { - "shape": "S27" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {}, - "DefaultOnly": { - "type": "boolean" - }, - "ListSupportedCharacterSets": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "DescribeDBEngineVersionsResult", - "type": "structure", - "members": { - "Marker": {}, - "DBEngineVersions": { - "type": "list", - "member": { - "locationName": "DBEngineVersion", - "type": "structure", - "members": { - "Engine": {}, - "EngineVersion": {}, - "DBParameterGroupFamily": {}, - "DBEngineDescription": {}, - "DBEngineVersionDescription": {}, - "DefaultCharacterSet": { - "shape": "S2d" - }, - "SupportedCharacterSets": { - "type": "list", - "member": { - "shape": "S2d", - "locationName": "CharacterSet" - } - } - } - } - } - } - } - }, - "DescribeDBInstances": { - "input": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "Filters": { - "shape": "S27" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBInstancesResult", - "type": "structure", - "members": { - "Marker": {}, - "DBInstances": { - "type": "list", - "member": { - "shape": "St", - "locationName": "DBInstance" - } - } - } - } - }, - "DescribeDBLogFiles": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "FilenameContains": {}, - "FileLastWritten": { - "type": "long" - }, - "FileSize": { - "type": "long" - }, - "Filters": { - "shape": "S27" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBLogFilesResult", - "type": "structure", - "members": { - "DescribeDBLogFiles": { - "type": "list", - "member": { - "locationName": "DescribeDBLogFilesDetails", - "type": "structure", - "members": { - "LogFileName": {}, - "LastWritten": { - "type": "long" - }, - "Size": { - "type": "long" - } - } - } - }, - "Marker": {} - } - } - }, - "DescribeDBParameterGroups": { - "input": { - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "Filters": { - "shape": "S27" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBParameterGroupsResult", - "type": "structure", - "members": { - "Marker": {}, - "DBParameterGroups": { - "type": "list", - "member": { - "shape": "S1f", - "locationName": "DBParameterGroup" - } - } - } - } - }, - "DescribeDBParameters": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupName" - ], - "members": { - "DBParameterGroupName": {}, - "Source": {}, - "Filters": { - "shape": "S27" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBParametersResult", - "type": "structure", - "members": { - "Parameters": { - "shape": "S2s" - }, - "Marker": {} - } - } - }, - "DescribeDBSecurityGroups": { - "input": { - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "Filters": { - "shape": "S27" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBSecurityGroupsResult", - "type": "structure", - "members": { - "Marker": {}, - "DBSecurityGroups": { - "type": "list", - "member": { - "shape": "Sd", - "locationName": "DBSecurityGroup" - } - } - } - } - }, - "DescribeDBSnapshots": { - "input": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "DBSnapshotIdentifier": {}, - "SnapshotType": {}, - "Filters": { - "shape": "S27" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBSnapshotsResult", - "type": "structure", - "members": { - "Marker": {}, - "DBSnapshots": { - "type": "list", - "member": { - "shape": "Sk", - "locationName": "DBSnapshot" - } - } - } - } - }, - "DescribeDBSubnetGroups": { - "input": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "Filters": { - "shape": "S27" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBSubnetGroupsResult", - "type": "structure", - "members": { - "Marker": {}, - "DBSubnetGroups": { - "type": "list", - "member": { - "shape": "S11", - "locationName": "DBSubnetGroup" - } - } - } - } - }, - "DescribeEngineDefaultParameters": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupFamily" - ], - "members": { - "DBParameterGroupFamily": {}, - "Filters": { - "shape": "S27" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DescribeEngineDefaultParametersResult", - "type": "structure", - "members": { - "EngineDefaults": { - "type": "structure", - "members": { - "DBParameterGroupFamily": {}, - "Marker": {}, - "Parameters": { - "shape": "S2s" - } - }, - "wrapper": true - } - } - } - }, - "DescribeEventCategories": { - "input": { - "type": "structure", - "members": { - "SourceType": {}, - "Filters": { - "shape": "S27" - } - } - }, - "output": { - "resultWrapper": "DescribeEventCategoriesResult", - "type": "structure", - "members": { - "EventCategoriesMapList": { - "type": "list", - "member": { - "locationName": "EventCategoriesMap", - "type": "structure", - "members": { - "SourceType": {}, - "EventCategories": { - "shape": "S6" - } - }, - "wrapper": true - } - } - } - } - }, - "DescribeEventSubscriptions": { - "input": { - "type": "structure", - "members": { - "SubscriptionName": {}, - "Filters": { - "shape": "S27" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeEventSubscriptionsResult", - "type": "structure", - "members": { - "Marker": {}, - "EventSubscriptionsList": { - "type": "list", - "member": { - "shape": "S4", - "locationName": "EventSubscription" - } - } - } - } - }, - "DescribeEvents": { - "input": { - "type": "structure", - "members": { - "SourceIdentifier": {}, - "SourceType": {}, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "EventCategories": { - "shape": "S6" - }, - "Filters": { - "shape": "S27" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeEventsResult", - "type": "structure", - "members": { - "Marker": {}, - "Events": { - "type": "list", - "member": { - "locationName": "Event", - "type": "structure", - "members": { - "SourceIdentifier": {}, - "SourceType": {}, - "Message": {}, - "EventCategories": { - "shape": "S6" - }, - "Date": { - "type": "timestamp" - } - } - } - } - } - } - }, - "DescribeOptionGroupOptions": { - "input": { - "type": "structure", - "required": [ - "EngineName" - ], - "members": { - "EngineName": {}, - "MajorEngineVersion": {}, - "Filters": { - "shape": "S27" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeOptionGroupOptionsResult", - "type": "structure", - "members": { - "OptionGroupOptions": { - "type": "list", - "member": { - "locationName": "OptionGroupOption", - "type": "structure", - "members": { - "Name": {}, - "Description": {}, - "EngineName": {}, - "MajorEngineVersion": {}, - "MinimumRequiredMinorEngineVersion": {}, - "PortRequired": { - "type": "boolean" - }, - "DefaultPort": { - "type": "integer" - }, - "OptionsDependedOn": { - "type": "list", - "member": { - "locationName": "OptionName" - } - }, - "Persistent": { - "type": "boolean" - }, - "Permanent": { - "type": "boolean" - }, - "OptionGroupOptionSettings": { - "type": "list", - "member": { - "locationName": "OptionGroupOptionSetting", - "type": "structure", - "members": { - "SettingName": {}, - "SettingDescription": {}, - "DefaultValue": {}, - "ApplyType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - } - } - } - } - } - } - }, - "Marker": {} - } - } - }, - "DescribeOptionGroups": { - "input": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "Filters": { - "shape": "S27" - }, - "Marker": {}, - "MaxRecords": { - "type": "integer" - }, - "EngineName": {}, - "MajorEngineVersion": {} - } - }, - "output": { - "resultWrapper": "DescribeOptionGroupsResult", - "type": "structure", - "members": { - "OptionGroupsList": { - "type": "list", - "member": { - "shape": "S1r", - "locationName": "OptionGroup" - } - }, - "Marker": {} - } - } - }, - "DescribeOrderableDBInstanceOptions": { - "input": { - "type": "structure", - "required": [ - "Engine" - ], - "members": { - "Engine": {}, - "EngineVersion": {}, - "DBInstanceClass": {}, - "LicenseModel": {}, - "Vpc": { - "type": "boolean" - }, - "Filters": { - "shape": "S27" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeOrderableDBInstanceOptionsResult", - "type": "structure", - "members": { - "OrderableDBInstanceOptions": { - "type": "list", - "member": { - "locationName": "OrderableDBInstanceOption", - "type": "structure", - "members": { - "Engine": {}, - "EngineVersion": {}, - "DBInstanceClass": {}, - "LicenseModel": {}, - "AvailabilityZones": { - "type": "list", - "member": { - "shape": "S14", - "locationName": "AvailabilityZone" - } - }, - "MultiAZCapable": { - "type": "boolean" - }, - "ReadReplicaCapable": { - "type": "boolean" - }, - "Vpc": { - "type": "boolean" - } - }, - "wrapper": true - } - }, - "Marker": {} - } - } - }, - "DescribeReservedDBInstances": { - "input": { - "type": "structure", - "members": { - "ReservedDBInstanceId": {}, - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "Duration": {}, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "Filters": { - "shape": "S27" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeReservedDBInstancesResult", - "type": "structure", - "members": { - "Marker": {}, - "ReservedDBInstances": { - "type": "list", - "member": { - "shape": "S41", - "locationName": "ReservedDBInstance" - } - } - } - } - }, - "DescribeReservedDBInstancesOfferings": { - "input": { - "type": "structure", - "members": { - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "Duration": {}, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "Filters": { - "shape": "S27" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeReservedDBInstancesOfferingsResult", - "type": "structure", - "members": { - "Marker": {}, - "ReservedDBInstancesOfferings": { - "type": "list", - "member": { - "locationName": "ReservedDBInstancesOffering", - "type": "structure", - "members": { - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "double" - }, - "UsagePrice": { - "type": "double" - }, - "CurrencyCode": {}, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "RecurringCharges": { - "shape": "S43" - } - }, - "wrapper": true - } - } - } - } - }, - "DownloadDBLogFilePortion": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier", - "LogFileName" - ], - "members": { - "DBInstanceIdentifier": {}, - "LogFileName": {}, - "Marker": {}, - "NumberOfLines": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "DownloadDBLogFilePortionResult", - "type": "structure", - "members": { - "LogFileData": {}, - "Marker": {}, - "AdditionalDataPending": { - "type": "boolean" - } - } - } - }, - "ListTagsForResource": { - "input": { - "type": "structure", - "required": [ - "ResourceName" - ], - "members": { - "ResourceName": {}, - "Filters": { - "shape": "S27" - } - } - }, - "output": { - "resultWrapper": "ListTagsForResourceResult", - "type": "structure", - "members": { - "TagList": { - "shape": "S9" - } - } - } - }, - "ModifyDBInstance": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "AllocatedStorage": { - "type": "integer" - }, - "DBInstanceClass": {}, - "DBSecurityGroups": { - "shape": "Sp" - }, - "VpcSecurityGroupIds": { - "shape": "Sq" - }, - "ApplyImmediately": { - "type": "boolean" - }, - "MasterUserPassword": {}, - "DBParameterGroupName": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "PreferredBackupWindow": {}, - "PreferredMaintenanceWindow": {}, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AllowMajorVersionUpgrade": { - "type": "boolean" - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "NewDBInstanceIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyDBInstanceResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "ModifyDBParameterGroup": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupName", - "Parameters" - ], - "members": { - "DBParameterGroupName": {}, - "Parameters": { - "shape": "S2s" - } - } - }, - "output": { - "shape": "S4g", - "resultWrapper": "ModifyDBParameterGroupResult" - } - }, - "ModifyDBSubnetGroup": { - "input": { - "type": "structure", - "required": [ - "DBSubnetGroupName", - "SubnetIds" - ], - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "SubnetIds": { - "shape": "S1l" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyDBSubnetGroupResult", - "type": "structure", - "members": { - "DBSubnetGroup": { - "shape": "S11" - } - } - } - }, - "ModifyEventSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName" - ], - "members": { - "SubscriptionName": {}, - "SnsTopicArn": {}, - "SourceType": {}, - "EventCategories": { - "shape": "S6" - }, - "Enabled": { - "type": "boolean" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyEventSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S4" - } - } - } - }, - "ModifyOptionGroup": { - "input": { - "type": "structure", - "required": [ - "OptionGroupName" - ], - "members": { - "OptionGroupName": {}, - "OptionsToInclude": { - "type": "list", - "member": { - "locationName": "OptionConfiguration", - "type": "structure", - "required": [ - "OptionName" - ], - "members": { - "OptionName": {}, - "Port": { - "type": "integer" - }, - "DBSecurityGroupMemberships": { - "shape": "Sp" - }, - "VpcSecurityGroupMemberships": { - "shape": "Sq" - }, - "OptionSettings": { - "type": "list", - "member": { - "shape": "S1v", - "locationName": "OptionSetting" - } - } - } - } - }, - "OptionsToRemove": { - "type": "list", - "member": {} - }, - "ApplyImmediately": { - "type": "boolean" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyOptionGroupResult", - "type": "structure", - "members": { - "OptionGroup": { - "shape": "S1r" - } - } - } - }, - "PromoteReadReplica": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "PreferredBackupWindow": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "PromoteReadReplicaResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "PurchaseReservedDBInstancesOffering": { - "input": { - "type": "structure", - "required": [ - "ReservedDBInstancesOfferingId" - ], - "members": { - "ReservedDBInstancesOfferingId": {}, - "ReservedDBInstanceId": {}, - "DBInstanceCount": { - "type": "integer" - }, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "PurchaseReservedDBInstancesOfferingResult", - "type": "structure", - "members": { - "ReservedDBInstance": { - "shape": "S41" - } - } - } - }, - "RebootDBInstance": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "ForceFailover": { - "type": "boolean" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RebootDBInstanceResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "RemoveSourceIdentifierFromSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName", - "SourceIdentifier" - ], - "members": { - "SubscriptionName": {}, - "SourceIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RemoveSourceIdentifierFromSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S4" - } - } - } - }, - "RemoveTagsFromResource": { - "input": { - "type": "structure", - "required": [ - "ResourceName", - "TagKeys" - ], - "members": { - "ResourceName": {}, - "TagKeys": { - "type": "list", - "member": {} - } - } - } - }, - "ResetDBParameterGroup": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupName" - ], - "members": { - "DBParameterGroupName": {}, - "ResetAllParameters": { - "type": "boolean" - }, - "Parameters": { - "shape": "S2s" - } - } - }, - "output": { - "shape": "S4g", - "resultWrapper": "ResetDBParameterGroupResult" - } - }, - "RestoreDBInstanceFromDBSnapshot": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier", - "DBSnapshotIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "DBSnapshotIdentifier": {}, - "DBInstanceClass": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "DBSubnetGroupName": {}, - "MultiAZ": { - "type": "boolean" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "LicenseModel": {}, - "DBName": {}, - "Engine": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RestoreDBInstanceFromDBSnapshotResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "RestoreDBInstanceToPointInTime": { - "input": { - "type": "structure", - "required": [ - "SourceDBInstanceIdentifier", - "TargetDBInstanceIdentifier" - ], - "members": { - "SourceDBInstanceIdentifier": {}, - "TargetDBInstanceIdentifier": {}, - "RestoreTime": { - "type": "timestamp" - }, - "UseLatestRestorableTime": { - "type": "boolean" - }, - "DBInstanceClass": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "DBSubnetGroupName": {}, - "MultiAZ": { - "type": "boolean" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "LicenseModel": {}, - "DBName": {}, - "Engine": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RestoreDBInstanceToPointInTimeResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "St" - } - } - } - }, - "RevokeDBSecurityGroupIngress": { - "input": { - "type": "structure", - "required": [ - "DBSecurityGroupName" - ], - "members": { - "DBSecurityGroupName": {}, - "CIDRIP": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupId": {}, - "EC2SecurityGroupOwnerId": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RevokeDBSecurityGroupIngressResult", - "type": "structure", - "members": { - "DBSecurityGroup": { - "shape": "Sd" - } - } - } - } - }, - "shapes": { - "S4": { - "type": "structure", - "members": { - "CustomerAwsId": {}, - "CustSubscriptionId": {}, - "SnsTopicArn": {}, - "Status": {}, - "SubscriptionCreationTime": {}, - "SourceType": {}, - "SourceIdsList": { - "shape": "S5" - }, - "EventCategoriesList": { - "shape": "S6" - }, - "Enabled": { - "type": "boolean" - } - }, - "wrapper": true - }, - "S5": { - "type": "list", - "member": { - "locationName": "SourceId" - } - }, - "S6": { - "type": "list", - "member": { - "locationName": "EventCategory" - } - }, - "S9": { - "type": "list", - "member": { - "locationName": "Tag", - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - }, - "Sd": { - "type": "structure", - "members": { - "OwnerId": {}, - "DBSecurityGroupName": {}, - "DBSecurityGroupDescription": {}, - "VpcId": {}, - "EC2SecurityGroups": { - "type": "list", - "member": { - "locationName": "EC2SecurityGroup", - "type": "structure", - "members": { - "Status": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupId": {}, - "EC2SecurityGroupOwnerId": {} - } - } - }, - "IPRanges": { - "type": "list", - "member": { - "locationName": "IPRange", - "type": "structure", - "members": { - "Status": {}, - "CIDRIP": {} - } - } - } - }, - "wrapper": true - }, - "Sk": { - "type": "structure", - "members": { - "DBSnapshotIdentifier": {}, - "DBInstanceIdentifier": {}, - "SnapshotCreateTime": { - "type": "timestamp" - }, - "Engine": {}, - "AllocatedStorage": { - "type": "integer" - }, - "Status": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "VpcId": {}, - "InstanceCreateTime": { - "type": "timestamp" - }, - "MasterUsername": {}, - "EngineVersion": {}, - "LicenseModel": {}, - "SnapshotType": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "PercentProgress": { - "type": "integer" - }, - "SourceRegion": {} - }, - "wrapper": true - }, - "Sp": { - "type": "list", - "member": { - "locationName": "DBSecurityGroupName" - } - }, - "Sq": { - "type": "list", - "member": { - "locationName": "VpcSecurityGroupId" - } - }, - "St": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "DBInstanceClass": {}, - "Engine": {}, - "DBInstanceStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "AllocatedStorage": { - "type": "integer" - }, - "InstanceCreateTime": { - "type": "timestamp" - }, - "PreferredBackupWindow": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "DBSecurityGroups": { - "shape": "Sv" - }, - "VpcSecurityGroups": { - "shape": "Sx" - }, - "DBParameterGroups": { - "type": "list", - "member": { - "locationName": "DBParameterGroup", - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "ParameterApplyStatus": {} - } - } - }, - "AvailabilityZone": {}, - "DBSubnetGroup": { - "shape": "S11" - }, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "DBInstanceClass": {}, - "AllocatedStorage": { - "type": "integer" - }, - "MasterUserPassword": {}, - "Port": { - "type": "integer" - }, - "BackupRetentionPeriod": { - "type": "integer" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "Iops": { - "type": "integer" - }, - "DBInstanceIdentifier": {} - } - }, - "LatestRestorableTime": { - "type": "timestamp" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "ReadReplicaSourceDBInstanceIdentifier": {}, - "ReadReplicaDBInstanceIdentifiers": { - "type": "list", - "member": { - "locationName": "ReadReplicaDBInstanceIdentifier" - } - }, - "LicenseModel": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupMemberships": { - "type": "list", - "member": { - "locationName": "OptionGroupMembership", - "type": "structure", - "members": { - "OptionGroupName": {}, - "Status": {} - } - } - }, - "CharacterSetName": {}, - "SecondaryAvailabilityZone": {}, - "PubliclyAccessible": { - "type": "boolean" - }, - "StatusInfos": { - "type": "list", - "member": { - "locationName": "DBInstanceStatusInfo", - "type": "structure", - "members": { - "StatusType": {}, - "Normal": { - "type": "boolean" - }, - "Status": {}, - "Message": {} - } - } - } - }, - "wrapper": true - }, - "Sv": { - "type": "list", - "member": { - "locationName": "DBSecurityGroup", - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "Status": {} - } - } - }, - "Sx": { - "type": "list", - "member": { - "locationName": "VpcSecurityGroupMembership", - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - } - } - }, - "S11": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "VpcId": {}, - "SubnetGroupStatus": {}, - "Subnets": { - "type": "list", - "member": { - "locationName": "Subnet", - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "shape": "S14" - }, - "SubnetStatus": {} - } - } - } - }, - "wrapper": true - }, - "S14": { - "type": "structure", - "members": { - "Name": {}, - "ProvisionedIopsCapable": { - "type": "boolean" - } - }, - "wrapper": true - }, - "S1f": { - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "DBParameterGroupFamily": {}, - "Description": {} - }, - "wrapper": true - }, - "S1l": { - "type": "list", - "member": { - "locationName": "SubnetIdentifier" - } - }, - "S1r": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "OptionGroupDescription": {}, - "EngineName": {}, - "MajorEngineVersion": {}, - "Options": { - "type": "list", - "member": { - "locationName": "Option", - "type": "structure", - "members": { - "OptionName": {}, - "OptionDescription": {}, - "Persistent": { - "type": "boolean" - }, - "Permanent": { - "type": "boolean" - }, - "Port": { - "type": "integer" - }, - "OptionSettings": { - "type": "list", - "member": { - "shape": "S1v", - "locationName": "OptionSetting" - } - }, - "DBSecurityGroupMemberships": { - "shape": "Sv" - }, - "VpcSecurityGroupMemberships": { - "shape": "Sx" - } - } - } - }, - "AllowsVpcAndNonVpcInstanceMemberships": { - "type": "boolean" - }, - "VpcId": {} - }, - "wrapper": true - }, - "S1v": { - "type": "structure", - "members": { - "Name": {}, - "Value": {}, - "DefaultValue": {}, - "Description": {}, - "ApplyType": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "IsCollection": { - "type": "boolean" - } - } - }, - "S27": { - "type": "list", - "member": { - "locationName": "Filter", - "type": "structure", - "required": [ - "Name", - "Values" - ], - "members": { - "Name": {}, - "Values": { - "type": "list", - "member": { - "locationName": "Value" - } - } - } - } - }, - "S2d": { - "type": "structure", - "members": { - "CharacterSetName": {}, - "CharacterSetDescription": {} - } - }, - "S2s": { - "type": "list", - "member": { - "locationName": "Parameter", - "type": "structure", - "members": { - "ParameterName": {}, - "ParameterValue": {}, - "Description": {}, - "Source": {}, - "ApplyType": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "MinimumEngineVersion": {}, - "ApplyMethod": {} - } - } - }, - "S41": { - "type": "structure", - "members": { - "ReservedDBInstanceId": {}, - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "StartTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "double" - }, - "UsagePrice": { - "type": "double" - }, - "CurrencyCode": {}, - "DBInstanceCount": { - "type": "integer" - }, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "State": {}, - "RecurringCharges": { - "shape": "S43" - } - }, - "wrapper": true - }, - "S43": { - "type": "list", - "member": { - "locationName": "RecurringCharge", - "type": "structure", - "members": { - "RecurringChargeAmount": { - "type": "double" - }, - "RecurringChargeFrequency": {} - }, - "wrapper": true - } - }, - "S4g": { - "type": "structure", - "members": { - "DBParameterGroupName": {} - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/rds-2013-09-09.paginators.json b/cli/node_modules/aws-sdk/apis/rds-2013-09-09.paginators.json deleted file mode 100644 index 662845c12..000000000 --- a/cli/node_modules/aws-sdk/apis/rds-2013-09-09.paginators.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "pagination": { - "DescribeDBEngineVersions": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBEngineVersions" - }, - "DescribeDBInstances": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBInstances" - }, - "DescribeDBLogFiles": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DescribeDBLogFiles" - }, - "DescribeDBParameterGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBParameterGroups" - }, - "DescribeDBParameters": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "Parameters" - }, - "DescribeDBSecurityGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBSecurityGroups" - }, - "DescribeDBSnapshots": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBSnapshots" - }, - "DescribeDBSubnetGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBSubnetGroups" - }, - "DescribeEngineDefaultParameters": { - "input_token": "Marker", - "output_token": "EngineDefaults.Marker", - "limit_key": "MaxRecords", - "result_key": "EngineDefaults.Parameters" - }, - "DescribeEventSubscriptions": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "EventSubscriptionsList" - }, - "DescribeEvents": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "Events" - }, - "DescribeOptionGroupOptions": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "OptionGroupOptions" - }, - "DescribeOptionGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "OptionGroupsList" - }, - "DescribeOrderableDBInstanceOptions": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "OrderableDBInstanceOptions" - }, - "DescribeReservedDBInstances": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "ReservedDBInstances" - }, - "DescribeReservedDBInstancesOfferings": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "ReservedDBInstancesOfferings" - }, - "DownloadDBLogFilePortion": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "NumberOfLines", - "more_results": "AdditionalDataPending", - "result_key": "LogFileData" - }, - "ListTagsForResource": { - "result_key": "TagList" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/rds-2013-09-09.waiters.json b/cli/node_modules/aws-sdk/apis/rds-2013-09-09.waiters.json deleted file mode 100644 index 643412798..000000000 --- a/cli/node_modules/aws-sdk/apis/rds-2013-09-09.waiters.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "waiters": { - "__default__": { - "interval": 30, - "max_attempts": 60 - }, - "__DBInstanceState": { - "operation": "DescribeDBInstances", - "acceptor_path": "DBInstances[].DBInstanceStatus", - "acceptor_type": "output" - }, - "DBInstanceAvailable": { - "extends": "__DBInstanceState", - "success_value": "available", - "failure_value": [ - "deleted", - "deleting", - "failed", - "incompatible-restore", - "incompatible-parameters", - "incompatible-parameters", - "incompatible-restore" - ] - }, - "DBInstanceDeleted": { - "extends": "__DBInstanceState", - "success_value": "deleted", - "failure_value": [ - "creating", - "modifying", - "rebooting", - "resetting-master-credentials" - ] - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/rds-2014-10-31.min.json b/cli/node_modules/aws-sdk/apis/rds-2014-10-31.min.json deleted file mode 100644 index 11cbf0078..000000000 --- a/cli/node_modules/aws-sdk/apis/rds-2014-10-31.min.json +++ /dev/null @@ -1,2435 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2014-10-31", - "endpointPrefix": "rds", - "serviceAbbreviation": "Amazon RDS", - "serviceFullName": "Amazon Relational Database Service", - "signatureVersion": "v4", - "xmlNamespace": "http://rds.amazonaws.com/doc/2014-10-31/", - "protocol": "query" - }, - "operations": { - "AddSourceIdentifierToSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName", - "SourceIdentifier" - ], - "members": { - "SubscriptionName": {}, - "SourceIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "AddSourceIdentifierToSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S4" - } - } - } - }, - "AddTagsToResource": { - "input": { - "type": "structure", - "required": [ - "ResourceName", - "Tags" - ], - "members": { - "ResourceName": {}, - "Tags": { - "shape": "S9" - } - } - } - }, - "ApplyPendingMaintenanceAction": { - "input": { - "type": "structure", - "required": [ - "ResourceIdentifier", - "ApplyAction", - "OptInType" - ], - "members": { - "ResourceIdentifier": {}, - "ApplyAction": {}, - "OptInType": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ApplyPendingMaintenanceActionResult", - "type": "structure", - "members": { - "ResourcePendingMaintenanceActions": { - "shape": "Sd" - } - } - } - }, - "AuthorizeDBSecurityGroupIngress": { - "input": { - "type": "structure", - "required": [ - "DBSecurityGroupName" - ], - "members": { - "DBSecurityGroupName": {}, - "CIDRIP": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupId": {}, - "EC2SecurityGroupOwnerId": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "AuthorizeDBSecurityGroupIngressResult", - "type": "structure", - "members": { - "DBSecurityGroup": { - "shape": "Sj" - } - } - } - }, - "CopyDBParameterGroup": { - "input": { - "type": "structure", - "required": [ - "SourceDBParameterGroupIdentifier", - "TargetDBParameterGroupIdentifier", - "TargetDBParameterGroupDescription" - ], - "members": { - "SourceDBParameterGroupIdentifier": {}, - "TargetDBParameterGroupIdentifier": {}, - "TargetDBParameterGroupDescription": {}, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CopyDBParameterGroupResult", - "type": "structure", - "members": { - "DBParameterGroup": { - "shape": "Sq" - } - } - } - }, - "CopyDBSnapshot": { - "input": { - "type": "structure", - "required": [ - "SourceDBSnapshotIdentifier", - "TargetDBSnapshotIdentifier" - ], - "members": { - "SourceDBSnapshotIdentifier": {}, - "TargetDBSnapshotIdentifier": {}, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CopyDBSnapshotResult", - "type": "structure", - "members": { - "DBSnapshot": { - "shape": "St" - } - } - } - }, - "CopyOptionGroup": { - "input": { - "type": "structure", - "required": [ - "SourceOptionGroupIdentifier", - "TargetOptionGroupIdentifier", - "TargetOptionGroupDescription" - ], - "members": { - "SourceOptionGroupIdentifier": {}, - "TargetOptionGroupIdentifier": {}, - "TargetOptionGroupDescription": {}, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CopyOptionGroupResult", - "type": "structure", - "members": { - "OptionGroup": { - "shape": "Sy" - } - } - } - }, - "CreateDBInstance": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier", - "AllocatedStorage", - "DBInstanceClass", - "Engine", - "MasterUsername", - "MasterUserPassword" - ], - "members": { - "DBName": {}, - "DBInstanceIdentifier": {}, - "AllocatedStorage": { - "type": "integer" - }, - "DBInstanceClass": {}, - "Engine": {}, - "MasterUsername": {}, - "MasterUserPassword": {}, - "DBSecurityGroups": { - "shape": "S18" - }, - "VpcSecurityGroupIds": { - "shape": "S19" - }, - "AvailabilityZone": {}, - "DBSubnetGroupName": {}, - "PreferredMaintenanceWindow": {}, - "DBParameterGroupName": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "PreferredBackupWindow": {}, - "Port": { - "type": "integer" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "LicenseModel": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "CharacterSetName": {}, - "PubliclyAccessible": { - "type": "boolean" - }, - "Tags": { - "shape": "S9" - }, - "StorageType": {}, - "TdeCredentialArn": {}, - "TdeCredentialPassword": {}, - "StorageEncrypted": { - "type": "boolean" - }, - "KmsKeyId": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBInstanceResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "S1c" - } - } - } - }, - "CreateDBInstanceReadReplica": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier", - "SourceDBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "SourceDBInstanceIdentifier": {}, - "DBInstanceClass": {}, - "AvailabilityZone": {}, - "Port": { - "type": "integer" - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "PubliclyAccessible": { - "type": "boolean" - }, - "Tags": { - "shape": "S9" - }, - "DBSubnetGroupName": {}, - "StorageType": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBInstanceReadReplicaResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "S1c" - } - } - } - }, - "CreateDBParameterGroup": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupName", - "DBParameterGroupFamily", - "Description" - ], - "members": { - "DBParameterGroupName": {}, - "DBParameterGroupFamily": {}, - "Description": {}, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBParameterGroupResult", - "type": "structure", - "members": { - "DBParameterGroup": { - "shape": "Sq" - } - } - } - }, - "CreateDBSecurityGroup": { - "input": { - "type": "structure", - "required": [ - "DBSecurityGroupName", - "DBSecurityGroupDescription" - ], - "members": { - "DBSecurityGroupName": {}, - "DBSecurityGroupDescription": {}, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBSecurityGroupResult", - "type": "structure", - "members": { - "DBSecurityGroup": { - "shape": "Sj" - } - } - } - }, - "CreateDBSnapshot": { - "input": { - "type": "structure", - "required": [ - "DBSnapshotIdentifier", - "DBInstanceIdentifier" - ], - "members": { - "DBSnapshotIdentifier": {}, - "DBInstanceIdentifier": {}, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBSnapshotResult", - "type": "structure", - "members": { - "DBSnapshot": { - "shape": "St" - } - } - } - }, - "CreateDBSubnetGroup": { - "input": { - "type": "structure", - "required": [ - "DBSubnetGroupName", - "DBSubnetGroupDescription", - "SubnetIds" - ], - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "SubnetIds": { - "shape": "S1z" - }, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateDBSubnetGroupResult", - "type": "structure", - "members": { - "DBSubnetGroup": { - "shape": "S1g" - } - } - } - }, - "CreateEventSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName", - "SnsTopicArn" - ], - "members": { - "SubscriptionName": {}, - "SnsTopicArn": {}, - "SourceType": {}, - "EventCategories": { - "shape": "S6" - }, - "SourceIds": { - "shape": "S5" - }, - "Enabled": { - "type": "boolean" - }, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateEventSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S4" - } - } - } - }, - "CreateOptionGroup": { - "input": { - "type": "structure", - "required": [ - "OptionGroupName", - "EngineName", - "MajorEngineVersion", - "OptionGroupDescription" - ], - "members": { - "OptionGroupName": {}, - "EngineName": {}, - "MajorEngineVersion": {}, - "OptionGroupDescription": {}, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateOptionGroupResult", - "type": "structure", - "members": { - "OptionGroup": { - "shape": "Sy" - } - } - } - }, - "DeleteDBInstance": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "SkipFinalSnapshot": { - "type": "boolean" - }, - "FinalDBSnapshotIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DeleteDBInstanceResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "S1c" - } - } - } - }, - "DeleteDBParameterGroup": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupName" - ], - "members": { - "DBParameterGroupName": {} - } - } - }, - "DeleteDBSecurityGroup": { - "input": { - "type": "structure", - "required": [ - "DBSecurityGroupName" - ], - "members": { - "DBSecurityGroupName": {} - } - } - }, - "DeleteDBSnapshot": { - "input": { - "type": "structure", - "required": [ - "DBSnapshotIdentifier" - ], - "members": { - "DBSnapshotIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DeleteDBSnapshotResult", - "type": "structure", - "members": { - "DBSnapshot": { - "shape": "St" - } - } - } - }, - "DeleteDBSubnetGroup": { - "input": { - "type": "structure", - "required": [ - "DBSubnetGroupName" - ], - "members": { - "DBSubnetGroupName": {} - } - } - }, - "DeleteEventSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName" - ], - "members": { - "SubscriptionName": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DeleteEventSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S4" - } - } - } - }, - "DeleteOptionGroup": { - "input": { - "type": "structure", - "required": [ - "OptionGroupName" - ], - "members": { - "OptionGroupName": {} - } - } - }, - "DescribeAccountAttributes": { - "input": { - "type": "structure", - "members": {} - }, - "output": { - "resultWrapper": "DescribeAccountAttributesResult", - "type": "structure", - "members": { - "AccountQuotas": { - "type": "list", - "member": { - "locationName": "AccountQuota", - "type": "structure", - "members": { - "AccountQuotaName": {}, - "Used": { - "type": "long" - }, - "Max": { - "type": "long" - } - }, - "wrapper": true - } - } - } - } - }, - "DescribeCertificates": { - "input": { - "type": "structure", - "members": { - "CertificateIdentifier": {}, - "Filters": { - "shape": "S2l" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeCertificatesResult", - "type": "structure", - "members": { - "Certificates": { - "type": "list", - "member": { - "locationName": "Certificate", - "type": "structure", - "members": { - "CertificateIdentifier": {}, - "CertificateType": {}, - "Thumbprint": {}, - "ValidFrom": { - "type": "timestamp" - }, - "ValidTill": { - "type": "timestamp" - } - }, - "wrapper": true - } - }, - "Marker": {} - } - } - }, - "DescribeDBEngineVersions": { - "input": { - "type": "structure", - "members": { - "Engine": {}, - "EngineVersion": {}, - "DBParameterGroupFamily": {}, - "Filters": { - "shape": "S2l" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {}, - "DefaultOnly": { - "type": "boolean" - }, - "ListSupportedCharacterSets": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "DescribeDBEngineVersionsResult", - "type": "structure", - "members": { - "Marker": {}, - "DBEngineVersions": { - "type": "list", - "member": { - "locationName": "DBEngineVersion", - "type": "structure", - "members": { - "Engine": {}, - "EngineVersion": {}, - "DBParameterGroupFamily": {}, - "DBEngineDescription": {}, - "DBEngineVersionDescription": {}, - "DefaultCharacterSet": { - "shape": "S2v" - }, - "SupportedCharacterSets": { - "type": "list", - "member": { - "shape": "S2v", - "locationName": "CharacterSet" - } - } - } - } - } - } - } - }, - "DescribeDBInstances": { - "input": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "Filters": { - "shape": "S2l" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBInstancesResult", - "type": "structure", - "members": { - "Marker": {}, - "DBInstances": { - "type": "list", - "member": { - "shape": "S1c", - "locationName": "DBInstance" - } - } - } - } - }, - "DescribeDBLogFiles": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "FilenameContains": {}, - "FileLastWritten": { - "type": "long" - }, - "FileSize": { - "type": "long" - }, - "Filters": { - "shape": "S2l" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBLogFilesResult", - "type": "structure", - "members": { - "DescribeDBLogFiles": { - "type": "list", - "member": { - "locationName": "DescribeDBLogFilesDetails", - "type": "structure", - "members": { - "LogFileName": {}, - "LastWritten": { - "type": "long" - }, - "Size": { - "type": "long" - } - } - } - }, - "Marker": {} - } - } - }, - "DescribeDBParameterGroups": { - "input": { - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "Filters": { - "shape": "S2l" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBParameterGroupsResult", - "type": "structure", - "members": { - "Marker": {}, - "DBParameterGroups": { - "type": "list", - "member": { - "shape": "Sq", - "locationName": "DBParameterGroup" - } - } - } - } - }, - "DescribeDBParameters": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupName" - ], - "members": { - "DBParameterGroupName": {}, - "Source": {}, - "Filters": { - "shape": "S2l" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBParametersResult", - "type": "structure", - "members": { - "Parameters": { - "shape": "S39" - }, - "Marker": {} - } - } - }, - "DescribeDBSecurityGroups": { - "input": { - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "Filters": { - "shape": "S2l" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBSecurityGroupsResult", - "type": "structure", - "members": { - "Marker": {}, - "DBSecurityGroups": { - "type": "list", - "member": { - "shape": "Sj", - "locationName": "DBSecurityGroup" - } - } - } - } - }, - "DescribeDBSnapshots": { - "input": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "DBSnapshotIdentifier": {}, - "SnapshotType": {}, - "Filters": { - "shape": "S2l" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBSnapshotsResult", - "type": "structure", - "members": { - "Marker": {}, - "DBSnapshots": { - "type": "list", - "member": { - "shape": "St", - "locationName": "DBSnapshot" - } - } - } - } - }, - "DescribeDBSubnetGroups": { - "input": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "Filters": { - "shape": "S2l" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeDBSubnetGroupsResult", - "type": "structure", - "members": { - "Marker": {}, - "DBSubnetGroups": { - "type": "list", - "member": { - "shape": "S1g", - "locationName": "DBSubnetGroup" - } - } - } - } - }, - "DescribeEngineDefaultParameters": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupFamily" - ], - "members": { - "DBParameterGroupFamily": {}, - "Filters": { - "shape": "S2l" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DescribeEngineDefaultParametersResult", - "type": "structure", - "members": { - "EngineDefaults": { - "type": "structure", - "members": { - "DBParameterGroupFamily": {}, - "Marker": {}, - "Parameters": { - "shape": "S39" - } - }, - "wrapper": true - } - } - } - }, - "DescribeEventCategories": { - "input": { - "type": "structure", - "members": { - "SourceType": {}, - "Filters": { - "shape": "S2l" - } - } - }, - "output": { - "resultWrapper": "DescribeEventCategoriesResult", - "type": "structure", - "members": { - "EventCategoriesMapList": { - "type": "list", - "member": { - "locationName": "EventCategoriesMap", - "type": "structure", - "members": { - "SourceType": {}, - "EventCategories": { - "shape": "S6" - } - }, - "wrapper": true - } - } - } - } - }, - "DescribeEventSubscriptions": { - "input": { - "type": "structure", - "members": { - "SubscriptionName": {}, - "Filters": { - "shape": "S2l" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeEventSubscriptionsResult", - "type": "structure", - "members": { - "Marker": {}, - "EventSubscriptionsList": { - "type": "list", - "member": { - "shape": "S4", - "locationName": "EventSubscription" - } - } - } - } - }, - "DescribeEvents": { - "input": { - "type": "structure", - "members": { - "SourceIdentifier": {}, - "SourceType": {}, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "EventCategories": { - "shape": "S6" - }, - "Filters": { - "shape": "S2l" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeEventsResult", - "type": "structure", - "members": { - "Marker": {}, - "Events": { - "type": "list", - "member": { - "locationName": "Event", - "type": "structure", - "members": { - "SourceIdentifier": {}, - "SourceType": {}, - "Message": {}, - "EventCategories": { - "shape": "S6" - }, - "Date": { - "type": "timestamp" - } - } - } - } - } - } - }, - "DescribeOptionGroupOptions": { - "input": { - "type": "structure", - "required": [ - "EngineName" - ], - "members": { - "EngineName": {}, - "MajorEngineVersion": {}, - "Filters": { - "shape": "S2l" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeOptionGroupOptionsResult", - "type": "structure", - "members": { - "OptionGroupOptions": { - "type": "list", - "member": { - "locationName": "OptionGroupOption", - "type": "structure", - "members": { - "Name": {}, - "Description": {}, - "EngineName": {}, - "MajorEngineVersion": {}, - "MinimumRequiredMinorEngineVersion": {}, - "PortRequired": { - "type": "boolean" - }, - "DefaultPort": { - "type": "integer" - }, - "OptionsDependedOn": { - "type": "list", - "member": { - "locationName": "OptionName" - } - }, - "Persistent": { - "type": "boolean" - }, - "Permanent": { - "type": "boolean" - }, - "OptionGroupOptionSettings": { - "type": "list", - "member": { - "locationName": "OptionGroupOptionSetting", - "type": "structure", - "members": { - "SettingName": {}, - "SettingDescription": {}, - "DefaultValue": {}, - "ApplyType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - } - } - } - } - } - } - }, - "Marker": {} - } - } - }, - "DescribeOptionGroups": { - "input": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "Filters": { - "shape": "S2l" - }, - "Marker": {}, - "MaxRecords": { - "type": "integer" - }, - "EngineName": {}, - "MajorEngineVersion": {} - } - }, - "output": { - "resultWrapper": "DescribeOptionGroupsResult", - "type": "structure", - "members": { - "OptionGroupsList": { - "type": "list", - "member": { - "shape": "Sy", - "locationName": "OptionGroup" - } - }, - "Marker": {} - } - } - }, - "DescribeOrderableDBInstanceOptions": { - "input": { - "type": "structure", - "required": [ - "Engine" - ], - "members": { - "Engine": {}, - "EngineVersion": {}, - "DBInstanceClass": {}, - "LicenseModel": {}, - "Vpc": { - "type": "boolean" - }, - "Filters": { - "shape": "S2l" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeOrderableDBInstanceOptionsResult", - "type": "structure", - "members": { - "OrderableDBInstanceOptions": { - "type": "list", - "member": { - "locationName": "OrderableDBInstanceOption", - "type": "structure", - "members": { - "Engine": {}, - "EngineVersion": {}, - "DBInstanceClass": {}, - "LicenseModel": {}, - "AvailabilityZones": { - "type": "list", - "member": { - "shape": "S1j", - "locationName": "AvailabilityZone" - } - }, - "MultiAZCapable": { - "type": "boolean" - }, - "ReadReplicaCapable": { - "type": "boolean" - }, - "Vpc": { - "type": "boolean" - }, - "SupportsStorageEncryption": { - "type": "boolean" - }, - "StorageType": {}, - "SupportsIops": { - "type": "boolean" - } - }, - "wrapper": true - } - }, - "Marker": {} - } - } - }, - "DescribePendingMaintenanceActions": { - "input": { - "type": "structure", - "members": { - "ResourceIdentifier": {}, - "Filters": { - "shape": "S2l" - }, - "Marker": {}, - "MaxRecords": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "DescribePendingMaintenanceActionsResult", - "type": "structure", - "members": { - "PendingMaintenanceActions": { - "type": "list", - "member": { - "shape": "Sd", - "locationName": "ResourcePendingMaintenanceActions" - } - }, - "Marker": {} - } - } - }, - "DescribeReservedDBInstances": { - "input": { - "type": "structure", - "members": { - "ReservedDBInstanceId": {}, - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "Duration": {}, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "Filters": { - "shape": "S2l" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeReservedDBInstancesResult", - "type": "structure", - "members": { - "Marker": {}, - "ReservedDBInstances": { - "type": "list", - "member": { - "shape": "S4l", - "locationName": "ReservedDBInstance" - } - } - } - } - }, - "DescribeReservedDBInstancesOfferings": { - "input": { - "type": "structure", - "members": { - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "Duration": {}, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "Filters": { - "shape": "S2l" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeReservedDBInstancesOfferingsResult", - "type": "structure", - "members": { - "Marker": {}, - "ReservedDBInstancesOfferings": { - "type": "list", - "member": { - "locationName": "ReservedDBInstancesOffering", - "type": "structure", - "members": { - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "double" - }, - "UsagePrice": { - "type": "double" - }, - "CurrencyCode": {}, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "RecurringCharges": { - "shape": "S4n" - } - }, - "wrapper": true - } - } - } - } - }, - "DownloadDBLogFilePortion": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier", - "LogFileName" - ], - "members": { - "DBInstanceIdentifier": {}, - "LogFileName": {}, - "Marker": {}, - "NumberOfLines": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "DownloadDBLogFilePortionResult", - "type": "structure", - "members": { - "LogFileData": {}, - "Marker": {}, - "AdditionalDataPending": { - "type": "boolean" - } - } - } - }, - "ListTagsForResource": { - "input": { - "type": "structure", - "required": [ - "ResourceName" - ], - "members": { - "ResourceName": {}, - "Filters": { - "shape": "S2l" - } - } - }, - "output": { - "resultWrapper": "ListTagsForResourceResult", - "type": "structure", - "members": { - "TagList": { - "shape": "S9" - } - } - } - }, - "ModifyDBInstance": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "AllocatedStorage": { - "type": "integer" - }, - "DBInstanceClass": {}, - "DBSecurityGroups": { - "shape": "S18" - }, - "VpcSecurityGroupIds": { - "shape": "S19" - }, - "ApplyImmediately": { - "type": "boolean" - }, - "MasterUserPassword": {}, - "DBParameterGroupName": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "PreferredBackupWindow": {}, - "PreferredMaintenanceWindow": {}, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AllowMajorVersionUpgrade": { - "type": "boolean" - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "NewDBInstanceIdentifier": {}, - "StorageType": {}, - "TdeCredentialArn": {}, - "TdeCredentialPassword": {}, - "CACertificateIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyDBInstanceResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "S1c" - } - } - } - }, - "ModifyDBParameterGroup": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupName", - "Parameters" - ], - "members": { - "DBParameterGroupName": {}, - "Parameters": { - "shape": "S39" - } - } - }, - "output": { - "shape": "S50", - "resultWrapper": "ModifyDBParameterGroupResult" - } - }, - "ModifyDBSubnetGroup": { - "input": { - "type": "structure", - "required": [ - "DBSubnetGroupName", - "SubnetIds" - ], - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "SubnetIds": { - "shape": "S1z" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyDBSubnetGroupResult", - "type": "structure", - "members": { - "DBSubnetGroup": { - "shape": "S1g" - } - } - } - }, - "ModifyEventSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName" - ], - "members": { - "SubscriptionName": {}, - "SnsTopicArn": {}, - "SourceType": {}, - "EventCategories": { - "shape": "S6" - }, - "Enabled": { - "type": "boolean" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyEventSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S4" - } - } - } - }, - "ModifyOptionGroup": { - "input": { - "type": "structure", - "required": [ - "OptionGroupName" - ], - "members": { - "OptionGroupName": {}, - "OptionsToInclude": { - "type": "list", - "member": { - "locationName": "OptionConfiguration", - "type": "structure", - "required": [ - "OptionName" - ], - "members": { - "OptionName": {}, - "Port": { - "type": "integer" - }, - "DBSecurityGroupMemberships": { - "shape": "S18" - }, - "VpcSecurityGroupMemberships": { - "shape": "S19" - }, - "OptionSettings": { - "type": "list", - "member": { - "shape": "S12", - "locationName": "OptionSetting" - } - } - } - } - }, - "OptionsToRemove": { - "type": "list", - "member": {} - }, - "ApplyImmediately": { - "type": "boolean" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyOptionGroupResult", - "type": "structure", - "members": { - "OptionGroup": { - "shape": "Sy" - } - } - } - }, - "PromoteReadReplica": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "PreferredBackupWindow": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "PromoteReadReplicaResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "S1c" - } - } - } - }, - "PurchaseReservedDBInstancesOffering": { - "input": { - "type": "structure", - "required": [ - "ReservedDBInstancesOfferingId" - ], - "members": { - "ReservedDBInstancesOfferingId": {}, - "ReservedDBInstanceId": {}, - "DBInstanceCount": { - "type": "integer" - }, - "Tags": { - "shape": "S9" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "PurchaseReservedDBInstancesOfferingResult", - "type": "structure", - "members": { - "ReservedDBInstance": { - "shape": "S4l" - } - } - } - }, - "RebootDBInstance": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "ForceFailover": { - "type": "boolean" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RebootDBInstanceResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "S1c" - } - } - } - }, - "RemoveSourceIdentifierFromSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName", - "SourceIdentifier" - ], - "members": { - "SubscriptionName": {}, - "SourceIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RemoveSourceIdentifierFromSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S4" - } - } - } - }, - "RemoveTagsFromResource": { - "input": { - "type": "structure", - "required": [ - "ResourceName", - "TagKeys" - ], - "members": { - "ResourceName": {}, - "TagKeys": { - "type": "list", - "member": {} - } - } - } - }, - "ResetDBParameterGroup": { - "input": { - "type": "structure", - "required": [ - "DBParameterGroupName" - ], - "members": { - "DBParameterGroupName": {}, - "ResetAllParameters": { - "type": "boolean" - }, - "Parameters": { - "shape": "S39" - } - } - }, - "output": { - "shape": "S50", - "resultWrapper": "ResetDBParameterGroupResult" - } - }, - "RestoreDBInstanceFromDBSnapshot": { - "input": { - "type": "structure", - "required": [ - "DBInstanceIdentifier", - "DBSnapshotIdentifier" - ], - "members": { - "DBInstanceIdentifier": {}, - "DBSnapshotIdentifier": {}, - "DBInstanceClass": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "DBSubnetGroupName": {}, - "MultiAZ": { - "type": "boolean" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "LicenseModel": {}, - "DBName": {}, - "Engine": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "Tags": { - "shape": "S9" - }, - "StorageType": {}, - "TdeCredentialArn": {}, - "TdeCredentialPassword": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RestoreDBInstanceFromDBSnapshotResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "S1c" - } - } - } - }, - "RestoreDBInstanceToPointInTime": { - "input": { - "type": "structure", - "required": [ - "SourceDBInstanceIdentifier", - "TargetDBInstanceIdentifier" - ], - "members": { - "SourceDBInstanceIdentifier": {}, - "TargetDBInstanceIdentifier": {}, - "RestoreTime": { - "type": "timestamp" - }, - "UseLatestRestorableTime": { - "type": "boolean" - }, - "DBInstanceClass": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "DBSubnetGroupName": {}, - "MultiAZ": { - "type": "boolean" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "LicenseModel": {}, - "DBName": {}, - "Engine": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "Tags": { - "shape": "S9" - }, - "StorageType": {}, - "TdeCredentialArn": {}, - "TdeCredentialPassword": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RestoreDBInstanceToPointInTimeResult", - "type": "structure", - "members": { - "DBInstance": { - "shape": "S1c" - } - } - } - }, - "RevokeDBSecurityGroupIngress": { - "input": { - "type": "structure", - "required": [ - "DBSecurityGroupName" - ], - "members": { - "DBSecurityGroupName": {}, - "CIDRIP": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupId": {}, - "EC2SecurityGroupOwnerId": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RevokeDBSecurityGroupIngressResult", - "type": "structure", - "members": { - "DBSecurityGroup": { - "shape": "Sj" - } - } - } - } - }, - "shapes": { - "S4": { - "type": "structure", - "members": { - "CustomerAwsId": {}, - "CustSubscriptionId": {}, - "SnsTopicArn": {}, - "Status": {}, - "SubscriptionCreationTime": {}, - "SourceType": {}, - "SourceIdsList": { - "shape": "S5" - }, - "EventCategoriesList": { - "shape": "S6" - }, - "Enabled": { - "type": "boolean" - } - }, - "wrapper": true - }, - "S5": { - "type": "list", - "member": { - "locationName": "SourceId" - } - }, - "S6": { - "type": "list", - "member": { - "locationName": "EventCategory" - } - }, - "S9": { - "type": "list", - "member": { - "locationName": "Tag", - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - }, - "Sd": { - "type": "structure", - "members": { - "ResourceIdentifier": {}, - "PendingMaintenanceActionDetails": { - "type": "list", - "member": { - "locationName": "PendingMaintenanceAction", - "type": "structure", - "members": { - "Action": {}, - "AutoAppliedAfterDate": { - "type": "timestamp" - }, - "ForcedApplyDate": { - "type": "timestamp" - }, - "OptInStatus": {}, - "CurrentApplyDate": { - "type": "timestamp" - }, - "Description": {} - } - } - } - }, - "wrapper": true - }, - "Sj": { - "type": "structure", - "members": { - "OwnerId": {}, - "DBSecurityGroupName": {}, - "DBSecurityGroupDescription": {}, - "VpcId": {}, - "EC2SecurityGroups": { - "type": "list", - "member": { - "locationName": "EC2SecurityGroup", - "type": "structure", - "members": { - "Status": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupId": {}, - "EC2SecurityGroupOwnerId": {} - } - } - }, - "IPRanges": { - "type": "list", - "member": { - "locationName": "IPRange", - "type": "structure", - "members": { - "Status": {}, - "CIDRIP": {} - } - } - } - }, - "wrapper": true - }, - "Sq": { - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "DBParameterGroupFamily": {}, - "Description": {} - }, - "wrapper": true - }, - "St": { - "type": "structure", - "members": { - "DBSnapshotIdentifier": {}, - "DBInstanceIdentifier": {}, - "SnapshotCreateTime": { - "type": "timestamp" - }, - "Engine": {}, - "AllocatedStorage": { - "type": "integer" - }, - "Status": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "VpcId": {}, - "InstanceCreateTime": { - "type": "timestamp" - }, - "MasterUsername": {}, - "EngineVersion": {}, - "LicenseModel": {}, - "SnapshotType": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "PercentProgress": { - "type": "integer" - }, - "SourceRegion": {}, - "StorageType": {}, - "TdeCredentialArn": {}, - "Encrypted": { - "type": "boolean" - }, - "KmsKeyId": {} - }, - "wrapper": true - }, - "Sy": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "OptionGroupDescription": {}, - "EngineName": {}, - "MajorEngineVersion": {}, - "Options": { - "type": "list", - "member": { - "locationName": "Option", - "type": "structure", - "members": { - "OptionName": {}, - "OptionDescription": {}, - "Persistent": { - "type": "boolean" - }, - "Permanent": { - "type": "boolean" - }, - "Port": { - "type": "integer" - }, - "OptionSettings": { - "type": "list", - "member": { - "shape": "S12", - "locationName": "OptionSetting" - } - }, - "DBSecurityGroupMemberships": { - "shape": "S13" - }, - "VpcSecurityGroupMemberships": { - "shape": "S15" - } - } - } - }, - "AllowsVpcAndNonVpcInstanceMemberships": { - "type": "boolean" - }, - "VpcId": {} - }, - "wrapper": true - }, - "S12": { - "type": "structure", - "members": { - "Name": {}, - "Value": {}, - "DefaultValue": {}, - "Description": {}, - "ApplyType": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "IsCollection": { - "type": "boolean" - } - } - }, - "S13": { - "type": "list", - "member": { - "locationName": "DBSecurityGroup", - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "Status": {} - } - } - }, - "S15": { - "type": "list", - "member": { - "locationName": "VpcSecurityGroupMembership", - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - } - } - }, - "S18": { - "type": "list", - "member": { - "locationName": "DBSecurityGroupName" - } - }, - "S19": { - "type": "list", - "member": { - "locationName": "VpcSecurityGroupId" - } - }, - "S1c": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "DBInstanceClass": {}, - "Engine": {}, - "DBInstanceStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "AllocatedStorage": { - "type": "integer" - }, - "InstanceCreateTime": { - "type": "timestamp" - }, - "PreferredBackupWindow": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "DBSecurityGroups": { - "shape": "S13" - }, - "VpcSecurityGroups": { - "shape": "S15" - }, - "DBParameterGroups": { - "type": "list", - "member": { - "locationName": "DBParameterGroup", - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "ParameterApplyStatus": {} - } - } - }, - "AvailabilityZone": {}, - "DBSubnetGroup": { - "shape": "S1g" - }, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "DBInstanceClass": {}, - "AllocatedStorage": { - "type": "integer" - }, - "MasterUserPassword": {}, - "Port": { - "type": "integer" - }, - "BackupRetentionPeriod": { - "type": "integer" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "Iops": { - "type": "integer" - }, - "DBInstanceIdentifier": {}, - "StorageType": {}, - "CACertificateIdentifier": {} - } - }, - "LatestRestorableTime": { - "type": "timestamp" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "ReadReplicaSourceDBInstanceIdentifier": {}, - "ReadReplicaDBInstanceIdentifiers": { - "type": "list", - "member": { - "locationName": "ReadReplicaDBInstanceIdentifier" - } - }, - "LicenseModel": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupMemberships": { - "type": "list", - "member": { - "locationName": "OptionGroupMembership", - "type": "structure", - "members": { - "OptionGroupName": {}, - "Status": {} - } - } - }, - "CharacterSetName": {}, - "SecondaryAvailabilityZone": {}, - "PubliclyAccessible": { - "type": "boolean" - }, - "StatusInfos": { - "type": "list", - "member": { - "locationName": "DBInstanceStatusInfo", - "type": "structure", - "members": { - "StatusType": {}, - "Normal": { - "type": "boolean" - }, - "Status": {}, - "Message": {} - } - } - }, - "StorageType": {}, - "TdeCredentialArn": {}, - "StorageEncrypted": { - "type": "boolean" - }, - "KmsKeyId": {}, - "DbiResourceId": {}, - "CACertificateIdentifier": {} - }, - "wrapper": true - }, - "S1g": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "VpcId": {}, - "SubnetGroupStatus": {}, - "Subnets": { - "type": "list", - "member": { - "locationName": "Subnet", - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "shape": "S1j" - }, - "SubnetStatus": {} - } - } - } - }, - "wrapper": true - }, - "S1j": { - "type": "structure", - "members": { - "Name": {} - }, - "wrapper": true - }, - "S1z": { - "type": "list", - "member": { - "locationName": "SubnetIdentifier" - } - }, - "S2l": { - "type": "list", - "member": { - "locationName": "Filter", - "type": "structure", - "required": [ - "Name", - "Values" - ], - "members": { - "Name": {}, - "Values": { - "type": "list", - "member": { - "locationName": "Value" - } - } - } - } - }, - "S2v": { - "type": "structure", - "members": { - "CharacterSetName": {}, - "CharacterSetDescription": {} - } - }, - "S39": { - "type": "list", - "member": { - "locationName": "Parameter", - "type": "structure", - "members": { - "ParameterName": {}, - "ParameterValue": {}, - "Description": {}, - "Source": {}, - "ApplyType": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "MinimumEngineVersion": {}, - "ApplyMethod": {} - } - } - }, - "S4l": { - "type": "structure", - "members": { - "ReservedDBInstanceId": {}, - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "StartTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "double" - }, - "UsagePrice": { - "type": "double" - }, - "CurrencyCode": {}, - "DBInstanceCount": { - "type": "integer" - }, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "State": {}, - "RecurringCharges": { - "shape": "S4n" - } - }, - "wrapper": true - }, - "S4n": { - "type": "list", - "member": { - "locationName": "RecurringCharge", - "type": "structure", - "members": { - "RecurringChargeAmount": { - "type": "double" - }, - "RecurringChargeFrequency": {} - }, - "wrapper": true - } - }, - "S50": { - "type": "structure", - "members": { - "DBParameterGroupName": {} - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/rds-2014-10-31.paginators.json b/cli/node_modules/aws-sdk/apis/rds-2014-10-31.paginators.json deleted file mode 100644 index 662845c12..000000000 --- a/cli/node_modules/aws-sdk/apis/rds-2014-10-31.paginators.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "pagination": { - "DescribeDBEngineVersions": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBEngineVersions" - }, - "DescribeDBInstances": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBInstances" - }, - "DescribeDBLogFiles": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DescribeDBLogFiles" - }, - "DescribeDBParameterGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBParameterGroups" - }, - "DescribeDBParameters": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "Parameters" - }, - "DescribeDBSecurityGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBSecurityGroups" - }, - "DescribeDBSnapshots": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBSnapshots" - }, - "DescribeDBSubnetGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "DBSubnetGroups" - }, - "DescribeEngineDefaultParameters": { - "input_token": "Marker", - "output_token": "EngineDefaults.Marker", - "limit_key": "MaxRecords", - "result_key": "EngineDefaults.Parameters" - }, - "DescribeEventSubscriptions": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "EventSubscriptionsList" - }, - "DescribeEvents": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "Events" - }, - "DescribeOptionGroupOptions": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "OptionGroupOptions" - }, - "DescribeOptionGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "OptionGroupsList" - }, - "DescribeOrderableDBInstanceOptions": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "OrderableDBInstanceOptions" - }, - "DescribeReservedDBInstances": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "ReservedDBInstances" - }, - "DescribeReservedDBInstancesOfferings": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "ReservedDBInstancesOfferings" - }, - "DownloadDBLogFilePortion": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "NumberOfLines", - "more_results": "AdditionalDataPending", - "result_key": "LogFileData" - }, - "ListTagsForResource": { - "result_key": "TagList" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/rds-2014-10-31.waiters.json b/cli/node_modules/aws-sdk/apis/rds-2014-10-31.waiters.json deleted file mode 100644 index 643412798..000000000 --- a/cli/node_modules/aws-sdk/apis/rds-2014-10-31.waiters.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "waiters": { - "__default__": { - "interval": 30, - "max_attempts": 60 - }, - "__DBInstanceState": { - "operation": "DescribeDBInstances", - "acceptor_path": "DBInstances[].DBInstanceStatus", - "acceptor_type": "output" - }, - "DBInstanceAvailable": { - "extends": "__DBInstanceState", - "success_value": "available", - "failure_value": [ - "deleted", - "deleting", - "failed", - "incompatible-restore", - "incompatible-parameters", - "incompatible-parameters", - "incompatible-restore" - ] - }, - "DBInstanceDeleted": { - "extends": "__DBInstanceState", - "success_value": "deleted", - "failure_value": [ - "creating", - "modifying", - "rebooting", - "resetting-master-credentials" - ] - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/redshift-2012-12-01.min.json b/cli/node_modules/aws-sdk/apis/redshift-2012-12-01.min.json deleted file mode 100644 index 8f637deb9..000000000 --- a/cli/node_modules/aws-sdk/apis/redshift-2012-12-01.min.json +++ /dev/null @@ -1,2173 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2012-12-01", - "endpointPrefix": "redshift", - "serviceFullName": "Amazon Redshift", - "signatureVersion": "v4", - "xmlNamespace": "http://redshift.amazonaws.com/doc/2012-12-01/", - "protocol": "query" - }, - "operations": { - "AuthorizeClusterSecurityGroupIngress": { - "input": { - "type": "structure", - "required": [ - "ClusterSecurityGroupName" - ], - "members": { - "ClusterSecurityGroupName": {}, - "CIDRIP": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupOwnerId": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "AuthorizeClusterSecurityGroupIngressResult", - "type": "structure", - "members": { - "ClusterSecurityGroup": { - "shape": "S4" - } - } - } - }, - "AuthorizeSnapshotAccess": { - "input": { - "type": "structure", - "required": [ - "SnapshotIdentifier", - "AccountWithRestoreAccess" - ], - "members": { - "SnapshotIdentifier": {}, - "SnapshotClusterIdentifier": {}, - "AccountWithRestoreAccess": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "AuthorizeSnapshotAccessResult", - "type": "structure", - "members": { - "Snapshot": { - "shape": "Sd" - } - } - } - }, - "CopyClusterSnapshot": { - "input": { - "type": "structure", - "required": [ - "SourceSnapshotIdentifier", - "TargetSnapshotIdentifier" - ], - "members": { - "SourceSnapshotIdentifier": {}, - "SourceSnapshotClusterIdentifier": {}, - "TargetSnapshotIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CopyClusterSnapshotResult", - "type": "structure", - "members": { - "Snapshot": { - "shape": "Sd" - } - } - } - }, - "CreateCluster": { - "input": { - "type": "structure", - "required": [ - "ClusterIdentifier", - "NodeType", - "MasterUsername", - "MasterUserPassword" - ], - "members": { - "DBName": {}, - "ClusterIdentifier": {}, - "ClusterType": {}, - "NodeType": {}, - "MasterUsername": {}, - "MasterUserPassword": {}, - "ClusterSecurityGroups": { - "shape": "Sp" - }, - "VpcSecurityGroupIds": { - "shape": "Sq" - }, - "ClusterSubnetGroupName": {}, - "AvailabilityZone": {}, - "PreferredMaintenanceWindow": {}, - "ClusterParameterGroupName": {}, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - }, - "Port": { - "type": "integer" - }, - "ClusterVersion": {}, - "AllowVersionUpgrade": { - "type": "boolean" - }, - "NumberOfNodes": { - "type": "integer" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "Encrypted": { - "type": "boolean" - }, - "HsmClientCertificateIdentifier": {}, - "HsmConfigurationIdentifier": {}, - "ElasticIp": {}, - "Tags": { - "shape": "S7" - }, - "KmsKeyId": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateClusterResult", - "type": "structure", - "members": { - "Cluster": { - "shape": "Su" - } - } - } - }, - "CreateClusterParameterGroup": { - "input": { - "type": "structure", - "required": [ - "ParameterGroupName", - "ParameterGroupFamily", - "Description" - ], - "members": { - "ParameterGroupName": {}, - "ParameterGroupFamily": {}, - "Description": {}, - "Tags": { - "shape": "S7" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateClusterParameterGroupResult", - "type": "structure", - "members": { - "ClusterParameterGroup": { - "shape": "S1d" - } - } - } - }, - "CreateClusterSecurityGroup": { - "input": { - "type": "structure", - "required": [ - "ClusterSecurityGroupName", - "Description" - ], - "members": { - "ClusterSecurityGroupName": {}, - "Description": {}, - "Tags": { - "shape": "S7" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateClusterSecurityGroupResult", - "type": "structure", - "members": { - "ClusterSecurityGroup": { - "shape": "S4" - } - } - } - }, - "CreateClusterSnapshot": { - "input": { - "type": "structure", - "required": [ - "SnapshotIdentifier", - "ClusterIdentifier" - ], - "members": { - "SnapshotIdentifier": {}, - "ClusterIdentifier": {}, - "Tags": { - "shape": "S7" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateClusterSnapshotResult", - "type": "structure", - "members": { - "Snapshot": { - "shape": "Sd" - } - } - } - }, - "CreateClusterSubnetGroup": { - "input": { - "type": "structure", - "required": [ - "ClusterSubnetGroupName", - "Description", - "SubnetIds" - ], - "members": { - "ClusterSubnetGroupName": {}, - "Description": {}, - "SubnetIds": { - "shape": "S1j" - }, - "Tags": { - "shape": "S7" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateClusterSubnetGroupResult", - "type": "structure", - "members": { - "ClusterSubnetGroup": { - "shape": "S1l" - } - } - } - }, - "CreateEventSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName", - "SnsTopicArn" - ], - "members": { - "SubscriptionName": {}, - "SnsTopicArn": {}, - "SourceType": {}, - "SourceIds": { - "shape": "S1q" - }, - "EventCategories": { - "shape": "S1r" - }, - "Severity": {}, - "Enabled": { - "type": "boolean" - }, - "Tags": { - "shape": "S7" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateEventSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S1t" - } - } - } - }, - "CreateHsmClientCertificate": { - "input": { - "type": "structure", - "required": [ - "HsmClientCertificateIdentifier" - ], - "members": { - "HsmClientCertificateIdentifier": {}, - "Tags": { - "shape": "S7" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateHsmClientCertificateResult", - "type": "structure", - "members": { - "HsmClientCertificate": { - "shape": "S1w" - } - } - } - }, - "CreateHsmConfiguration": { - "input": { - "type": "structure", - "required": [ - "HsmConfigurationIdentifier", - "Description", - "HsmIpAddress", - "HsmPartitionName", - "HsmPartitionPassword", - "HsmServerPublicCertificate" - ], - "members": { - "HsmConfigurationIdentifier": {}, - "Description": {}, - "HsmIpAddress": {}, - "HsmPartitionName": {}, - "HsmPartitionPassword": {}, - "HsmServerPublicCertificate": {}, - "Tags": { - "shape": "S7" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateHsmConfigurationResult", - "type": "structure", - "members": { - "HsmConfiguration": { - "shape": "S1z" - } - } - } - }, - "CreateSnapshotCopyGrant": { - "input": { - "type": "structure", - "required": [ - "SnapshotCopyGrantName" - ], - "members": { - "SnapshotCopyGrantName": {}, - "KmsKeyId": {}, - "Tags": { - "shape": "S7" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "CreateSnapshotCopyGrantResult", - "type": "structure", - "members": { - "SnapshotCopyGrant": { - "shape": "S22" - } - } - } - }, - "CreateTags": { - "input": { - "type": "structure", - "required": [ - "ResourceName", - "Tags" - ], - "members": { - "ResourceName": {}, - "Tags": { - "shape": "S7" - } - } - } - }, - "DeleteCluster": { - "input": { - "type": "structure", - "required": [ - "ClusterIdentifier" - ], - "members": { - "ClusterIdentifier": {}, - "SkipFinalClusterSnapshot": { - "type": "boolean" - }, - "FinalClusterSnapshotIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DeleteClusterResult", - "type": "structure", - "members": { - "Cluster": { - "shape": "Su" - } - } - } - }, - "DeleteClusterParameterGroup": { - "input": { - "type": "structure", - "required": [ - "ParameterGroupName" - ], - "members": { - "ParameterGroupName": {} - } - } - }, - "DeleteClusterSecurityGroup": { - "input": { - "type": "structure", - "required": [ - "ClusterSecurityGroupName" - ], - "members": { - "ClusterSecurityGroupName": {} - } - } - }, - "DeleteClusterSnapshot": { - "input": { - "type": "structure", - "required": [ - "SnapshotIdentifier" - ], - "members": { - "SnapshotIdentifier": {}, - "SnapshotClusterIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DeleteClusterSnapshotResult", - "type": "structure", - "members": { - "Snapshot": { - "shape": "Sd" - } - } - } - }, - "DeleteClusterSubnetGroup": { - "input": { - "type": "structure", - "required": [ - "ClusterSubnetGroupName" - ], - "members": { - "ClusterSubnetGroupName": {} - } - } - }, - "DeleteEventSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName" - ], - "members": { - "SubscriptionName": {} - } - } - }, - "DeleteHsmClientCertificate": { - "input": { - "type": "structure", - "required": [ - "HsmClientCertificateIdentifier" - ], - "members": { - "HsmClientCertificateIdentifier": {} - } - } - }, - "DeleteHsmConfiguration": { - "input": { - "type": "structure", - "required": [ - "HsmConfigurationIdentifier" - ], - "members": { - "HsmConfigurationIdentifier": {} - } - } - }, - "DeleteSnapshotCopyGrant": { - "input": { - "type": "structure", - "required": [ - "SnapshotCopyGrantName" - ], - "members": { - "SnapshotCopyGrantName": {} - } - } - }, - "DeleteTags": { - "input": { - "type": "structure", - "required": [ - "ResourceName", - "TagKeys" - ], - "members": { - "ResourceName": {}, - "TagKeys": { - "shape": "S2g" - } - } - } - }, - "DescribeClusterParameterGroups": { - "input": { - "type": "structure", - "members": { - "ParameterGroupName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {}, - "TagKeys": { - "shape": "S2g" - }, - "TagValues": { - "shape": "S2i" - } - } - }, - "output": { - "resultWrapper": "DescribeClusterParameterGroupsResult", - "type": "structure", - "members": { - "Marker": {}, - "ParameterGroups": { - "type": "list", - "member": { - "shape": "S1d", - "locationName": "ClusterParameterGroup" - } - } - } - } - }, - "DescribeClusterParameters": { - "input": { - "type": "structure", - "required": [ - "ParameterGroupName" - ], - "members": { - "ParameterGroupName": {}, - "Source": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeClusterParametersResult", - "type": "structure", - "members": { - "Parameters": { - "shape": "S2n" - }, - "Marker": {} - } - } - }, - "DescribeClusterSecurityGroups": { - "input": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {}, - "TagKeys": { - "shape": "S2g" - }, - "TagValues": { - "shape": "S2i" - } - } - }, - "output": { - "resultWrapper": "DescribeClusterSecurityGroupsResult", - "type": "structure", - "members": { - "Marker": {}, - "ClusterSecurityGroups": { - "type": "list", - "member": { - "shape": "S4", - "locationName": "ClusterSecurityGroup" - } - } - } - } - }, - "DescribeClusterSnapshots": { - "input": { - "type": "structure", - "members": { - "ClusterIdentifier": {}, - "SnapshotIdentifier": {}, - "SnapshotType": {}, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {}, - "OwnerAccount": {}, - "TagKeys": { - "shape": "S2g" - }, - "TagValues": { - "shape": "S2i" - } - } - }, - "output": { - "resultWrapper": "DescribeClusterSnapshotsResult", - "type": "structure", - "members": { - "Marker": {}, - "Snapshots": { - "type": "list", - "member": { - "shape": "Sd", - "locationName": "Snapshot" - } - } - } - } - }, - "DescribeClusterSubnetGroups": { - "input": { - "type": "structure", - "members": { - "ClusterSubnetGroupName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {}, - "TagKeys": { - "shape": "S2g" - }, - "TagValues": { - "shape": "S2i" - } - } - }, - "output": { - "resultWrapper": "DescribeClusterSubnetGroupsResult", - "type": "structure", - "members": { - "Marker": {}, - "ClusterSubnetGroups": { - "type": "list", - "member": { - "shape": "S1l", - "locationName": "ClusterSubnetGroup" - } - } - } - } - }, - "DescribeClusterVersions": { - "input": { - "type": "structure", - "members": { - "ClusterVersion": {}, - "ClusterParameterGroupFamily": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeClusterVersionsResult", - "type": "structure", - "members": { - "Marker": {}, - "ClusterVersions": { - "type": "list", - "member": { - "locationName": "ClusterVersion", - "type": "structure", - "members": { - "ClusterVersion": {}, - "ClusterParameterGroupFamily": {}, - "Description": {} - } - } - } - } - } - }, - "DescribeClusters": { - "input": { - "type": "structure", - "members": { - "ClusterIdentifier": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {}, - "TagKeys": { - "shape": "S2g" - }, - "TagValues": { - "shape": "S2i" - } - } - }, - "output": { - "resultWrapper": "DescribeClustersResult", - "type": "structure", - "members": { - "Marker": {}, - "Clusters": { - "type": "list", - "member": { - "shape": "Su", - "locationName": "Cluster" - } - } - } - } - }, - "DescribeDefaultClusterParameters": { - "input": { - "type": "structure", - "required": [ - "ParameterGroupFamily" - ], - "members": { - "ParameterGroupFamily": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DescribeDefaultClusterParametersResult", - "type": "structure", - "members": { - "DefaultClusterParameters": { - "type": "structure", - "members": { - "ParameterGroupFamily": {}, - "Marker": {}, - "Parameters": { - "shape": "S2n" - } - }, - "wrapper": true - } - } - } - }, - "DescribeEventCategories": { - "input": { - "type": "structure", - "members": { - "SourceType": {} - } - }, - "output": { - "resultWrapper": "DescribeEventCategoriesResult", - "type": "structure", - "members": { - "EventCategoriesMapList": { - "type": "list", - "member": { - "locationName": "EventCategoriesMap", - "type": "structure", - "members": { - "SourceType": {}, - "Events": { - "type": "list", - "member": { - "locationName": "EventInfoMap", - "type": "structure", - "members": { - "EventId": {}, - "EventCategories": { - "shape": "S1r" - }, - "EventDescription": {}, - "Severity": {} - }, - "wrapper": true - } - } - }, - "wrapper": true - } - } - } - } - }, - "DescribeEventSubscriptions": { - "input": { - "type": "structure", - "members": { - "SubscriptionName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeEventSubscriptionsResult", - "type": "structure", - "members": { - "Marker": {}, - "EventSubscriptionsList": { - "type": "list", - "member": { - "shape": "S1t", - "locationName": "EventSubscription" - } - } - } - } - }, - "DescribeEvents": { - "input": { - "type": "structure", - "members": { - "SourceIdentifier": {}, - "SourceType": {}, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeEventsResult", - "type": "structure", - "members": { - "Marker": {}, - "Events": { - "type": "list", - "member": { - "locationName": "Event", - "type": "structure", - "members": { - "SourceIdentifier": {}, - "SourceType": {}, - "Message": {}, - "EventCategories": { - "shape": "S1r" - }, - "Severity": {}, - "Date": { - "type": "timestamp" - }, - "EventId": {} - } - } - } - } - } - }, - "DescribeHsmClientCertificates": { - "input": { - "type": "structure", - "members": { - "HsmClientCertificateIdentifier": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {}, - "TagKeys": { - "shape": "S2g" - }, - "TagValues": { - "shape": "S2i" - } - } - }, - "output": { - "resultWrapper": "DescribeHsmClientCertificatesResult", - "type": "structure", - "members": { - "Marker": {}, - "HsmClientCertificates": { - "type": "list", - "member": { - "shape": "S1w", - "locationName": "HsmClientCertificate" - } - } - } - } - }, - "DescribeHsmConfigurations": { - "input": { - "type": "structure", - "members": { - "HsmConfigurationIdentifier": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {}, - "TagKeys": { - "shape": "S2g" - }, - "TagValues": { - "shape": "S2i" - } - } - }, - "output": { - "resultWrapper": "DescribeHsmConfigurationsResult", - "type": "structure", - "members": { - "Marker": {}, - "HsmConfigurations": { - "type": "list", - "member": { - "shape": "S1z", - "locationName": "HsmConfiguration" - } - } - } - } - }, - "DescribeLoggingStatus": { - "input": { - "type": "structure", - "required": [ - "ClusterIdentifier" - ], - "members": { - "ClusterIdentifier": {} - } - }, - "output": { - "shape": "S3u", - "resultWrapper": "DescribeLoggingStatusResult" - } - }, - "DescribeOrderableClusterOptions": { - "input": { - "type": "structure", - "members": { - "ClusterVersion": {}, - "NodeType": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeOrderableClusterOptionsResult", - "type": "structure", - "members": { - "OrderableClusterOptions": { - "type": "list", - "member": { - "locationName": "OrderableClusterOption", - "type": "structure", - "members": { - "ClusterVersion": {}, - "ClusterType": {}, - "NodeType": {}, - "AvailabilityZones": { - "type": "list", - "member": { - "shape": "S1o", - "locationName": "AvailabilityZone" - } - } - }, - "wrapper": true - } - }, - "Marker": {} - } - } - }, - "DescribeReservedNodeOfferings": { - "input": { - "type": "structure", - "members": { - "ReservedNodeOfferingId": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeReservedNodeOfferingsResult", - "type": "structure", - "members": { - "Marker": {}, - "ReservedNodeOfferings": { - "type": "list", - "member": { - "locationName": "ReservedNodeOffering", - "type": "structure", - "members": { - "ReservedNodeOfferingId": {}, - "NodeType": {}, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "double" - }, - "UsagePrice": { - "type": "double" - }, - "CurrencyCode": {}, - "OfferingType": {}, - "RecurringCharges": { - "shape": "S44" - } - }, - "wrapper": true - } - } - } - } - }, - "DescribeReservedNodes": { - "input": { - "type": "structure", - "members": { - "ReservedNodeId": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "resultWrapper": "DescribeReservedNodesResult", - "type": "structure", - "members": { - "Marker": {}, - "ReservedNodes": { - "type": "list", - "member": { - "shape": "S49", - "locationName": "ReservedNode" - } - } - } - } - }, - "DescribeResize": { - "input": { - "type": "structure", - "required": [ - "ClusterIdentifier" - ], - "members": { - "ClusterIdentifier": {} - } - }, - "output": { - "resultWrapper": "DescribeResizeResult", - "type": "structure", - "members": { - "TargetNodeType": {}, - "TargetNumberOfNodes": { - "type": "integer" - }, - "TargetClusterType": {}, - "Status": {}, - "ImportTablesCompleted": { - "type": "list", - "member": {} - }, - "ImportTablesInProgress": { - "type": "list", - "member": {} - }, - "ImportTablesNotStarted": { - "type": "list", - "member": {} - }, - "AvgResizeRateInMegaBytesPerSecond": { - "type": "double" - }, - "TotalResizeDataInMegaBytes": { - "type": "long" - }, - "ProgressInMegaBytes": { - "type": "long" - }, - "ElapsedTimeInSeconds": { - "type": "long" - }, - "EstimatedTimeToCompletionInSeconds": { - "type": "long" - } - } - } - }, - "DescribeSnapshotCopyGrants": { - "input": { - "type": "structure", - "members": { - "SnapshotCopyGrantName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {}, - "TagKeys": { - "shape": "S2g" - }, - "TagValues": { - "shape": "S2i" - } - } - }, - "output": { - "resultWrapper": "DescribeSnapshotCopyGrantsResult", - "type": "structure", - "members": { - "Marker": {}, - "SnapshotCopyGrants": { - "type": "list", - "member": { - "shape": "S22", - "locationName": "SnapshotCopyGrant" - } - } - } - } - }, - "DescribeTags": { - "input": { - "type": "structure", - "members": { - "ResourceName": {}, - "ResourceType": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {}, - "TagKeys": { - "shape": "S2g" - }, - "TagValues": { - "shape": "S2i" - } - } - }, - "output": { - "resultWrapper": "DescribeTagsResult", - "type": "structure", - "members": { - "TaggedResources": { - "type": "list", - "member": { - "locationName": "TaggedResource", - "type": "structure", - "members": { - "Tag": { - "shape": "S8" - }, - "ResourceName": {}, - "ResourceType": {} - } - } - }, - "Marker": {} - } - } - }, - "DisableLogging": { - "input": { - "type": "structure", - "required": [ - "ClusterIdentifier" - ], - "members": { - "ClusterIdentifier": {} - } - }, - "output": { - "shape": "S3u", - "resultWrapper": "DisableLoggingResult" - } - }, - "DisableSnapshotCopy": { - "input": { - "type": "structure", - "required": [ - "ClusterIdentifier" - ], - "members": { - "ClusterIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "DisableSnapshotCopyResult", - "type": "structure", - "members": { - "Cluster": { - "shape": "Su" - } - } - } - }, - "EnableLogging": { - "input": { - "type": "structure", - "required": [ - "ClusterIdentifier", - "BucketName" - ], - "members": { - "ClusterIdentifier": {}, - "BucketName": {}, - "S3KeyPrefix": {} - } - }, - "output": { - "shape": "S3u", - "resultWrapper": "EnableLoggingResult" - } - }, - "EnableSnapshotCopy": { - "input": { - "type": "structure", - "required": [ - "ClusterIdentifier", - "DestinationRegion" - ], - "members": { - "ClusterIdentifier": {}, - "DestinationRegion": {}, - "RetentionPeriod": { - "type": "integer" - }, - "SnapshotCopyGrantName": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "EnableSnapshotCopyResult", - "type": "structure", - "members": { - "Cluster": { - "shape": "Su" - } - } - } - }, - "ModifyCluster": { - "input": { - "type": "structure", - "required": [ - "ClusterIdentifier" - ], - "members": { - "ClusterIdentifier": {}, - "ClusterType": {}, - "NodeType": {}, - "NumberOfNodes": { - "type": "integer" - }, - "ClusterSecurityGroups": { - "shape": "Sp" - }, - "VpcSecurityGroupIds": { - "shape": "Sq" - }, - "MasterUserPassword": {}, - "ClusterParameterGroupName": {}, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - }, - "PreferredMaintenanceWindow": {}, - "ClusterVersion": {}, - "AllowVersionUpgrade": { - "type": "boolean" - }, - "HsmClientCertificateIdentifier": {}, - "HsmConfigurationIdentifier": {}, - "NewClusterIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyClusterResult", - "type": "structure", - "members": { - "Cluster": { - "shape": "Su" - } - } - } - }, - "ModifyClusterParameterGroup": { - "input": { - "type": "structure", - "required": [ - "ParameterGroupName", - "Parameters" - ], - "members": { - "ParameterGroupName": {}, - "Parameters": { - "shape": "S2n" - } - } - }, - "output": { - "shape": "S4x", - "resultWrapper": "ModifyClusterParameterGroupResult" - } - }, - "ModifyClusterSubnetGroup": { - "input": { - "type": "structure", - "required": [ - "ClusterSubnetGroupName", - "SubnetIds" - ], - "members": { - "ClusterSubnetGroupName": {}, - "Description": {}, - "SubnetIds": { - "shape": "S1j" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyClusterSubnetGroupResult", - "type": "structure", - "members": { - "ClusterSubnetGroup": { - "shape": "S1l" - } - } - } - }, - "ModifyEventSubscription": { - "input": { - "type": "structure", - "required": [ - "SubscriptionName" - ], - "members": { - "SubscriptionName": {}, - "SnsTopicArn": {}, - "SourceType": {}, - "SourceIds": { - "shape": "S1q" - }, - "EventCategories": { - "shape": "S1r" - }, - "Severity": {}, - "Enabled": { - "type": "boolean" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifyEventSubscriptionResult", - "type": "structure", - "members": { - "EventSubscription": { - "shape": "S1t" - } - } - } - }, - "ModifySnapshotCopyRetentionPeriod": { - "input": { - "type": "structure", - "required": [ - "ClusterIdentifier", - "RetentionPeriod" - ], - "members": { - "ClusterIdentifier": {}, - "RetentionPeriod": { - "type": "integer" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "ModifySnapshotCopyRetentionPeriodResult", - "type": "structure", - "members": { - "Cluster": { - "shape": "Su" - } - } - } - }, - "PurchaseReservedNodeOffering": { - "input": { - "type": "structure", - "required": [ - "ReservedNodeOfferingId" - ], - "members": { - "ReservedNodeOfferingId": {}, - "NodeCount": { - "type": "integer" - } - } - }, - "output": { - "wrapper": true, - "resultWrapper": "PurchaseReservedNodeOfferingResult", - "type": "structure", - "members": { - "ReservedNode": { - "shape": "S49" - } - } - } - }, - "RebootCluster": { - "input": { - "type": "structure", - "required": [ - "ClusterIdentifier" - ], - "members": { - "ClusterIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RebootClusterResult", - "type": "structure", - "members": { - "Cluster": { - "shape": "Su" - } - } - } - }, - "ResetClusterParameterGroup": { - "input": { - "type": "structure", - "required": [ - "ParameterGroupName" - ], - "members": { - "ParameterGroupName": {}, - "ResetAllParameters": { - "type": "boolean" - }, - "Parameters": { - "shape": "S2n" - } - } - }, - "output": { - "shape": "S4x", - "resultWrapper": "ResetClusterParameterGroupResult" - } - }, - "RestoreFromClusterSnapshot": { - "input": { - "type": "structure", - "required": [ - "ClusterIdentifier", - "SnapshotIdentifier" - ], - "members": { - "ClusterIdentifier": {}, - "SnapshotIdentifier": {}, - "SnapshotClusterIdentifier": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "AllowVersionUpgrade": { - "type": "boolean" - }, - "ClusterSubnetGroupName": {}, - "PubliclyAccessible": { - "type": "boolean" - }, - "OwnerAccount": {}, - "HsmClientCertificateIdentifier": {}, - "HsmConfigurationIdentifier": {}, - "ElasticIp": {}, - "ClusterParameterGroupName": {}, - "ClusterSecurityGroups": { - "shape": "Sp" - }, - "VpcSecurityGroupIds": { - "shape": "Sq" - }, - "PreferredMaintenanceWindow": {}, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - }, - "KmsKeyId": {}, - "NodeType": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RestoreFromClusterSnapshotResult", - "type": "structure", - "members": { - "Cluster": { - "shape": "Su" - } - } - } - }, - "RevokeClusterSecurityGroupIngress": { - "input": { - "type": "structure", - "required": [ - "ClusterSecurityGroupName" - ], - "members": { - "ClusterSecurityGroupName": {}, - "CIDRIP": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupOwnerId": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RevokeClusterSecurityGroupIngressResult", - "type": "structure", - "members": { - "ClusterSecurityGroup": { - "shape": "S4" - } - } - } - }, - "RevokeSnapshotAccess": { - "input": { - "type": "structure", - "required": [ - "SnapshotIdentifier", - "AccountWithRestoreAccess" - ], - "members": { - "SnapshotIdentifier": {}, - "SnapshotClusterIdentifier": {}, - "AccountWithRestoreAccess": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RevokeSnapshotAccessResult", - "type": "structure", - "members": { - "Snapshot": { - "shape": "Sd" - } - } - } - }, - "RotateEncryptionKey": { - "input": { - "type": "structure", - "required": [ - "ClusterIdentifier" - ], - "members": { - "ClusterIdentifier": {} - } - }, - "output": { - "wrapper": true, - "resultWrapper": "RotateEncryptionKeyResult", - "type": "structure", - "members": { - "Cluster": { - "shape": "Su" - } - } - } - } - }, - "shapes": { - "S4": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": {}, - "Description": {}, - "EC2SecurityGroups": { - "type": "list", - "member": { - "locationName": "EC2SecurityGroup", - "type": "structure", - "members": { - "Status": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupOwnerId": {}, - "Tags": { - "shape": "S7" - } - } - } - }, - "IPRanges": { - "type": "list", - "member": { - "locationName": "IPRange", - "type": "structure", - "members": { - "Status": {}, - "CIDRIP": {}, - "Tags": { - "shape": "S7" - } - } - } - }, - "Tags": { - "shape": "S7" - } - }, - "wrapper": true - }, - "S7": { - "type": "list", - "member": { - "shape": "S8", - "locationName": "Tag" - } - }, - "S8": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - }, - "Sd": { - "type": "structure", - "members": { - "SnapshotIdentifier": {}, - "ClusterIdentifier": {}, - "SnapshotCreateTime": { - "type": "timestamp" - }, - "Status": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "ClusterCreateTime": { - "type": "timestamp" - }, - "MasterUsername": {}, - "ClusterVersion": {}, - "SnapshotType": {}, - "NodeType": {}, - "NumberOfNodes": { - "type": "integer" - }, - "DBName": {}, - "VpcId": {}, - "Encrypted": { - "type": "boolean" - }, - "KmsKeyId": {}, - "EncryptedWithHSM": { - "type": "boolean" - }, - "AccountsWithRestoreAccess": { - "type": "list", - "member": { - "locationName": "AccountWithRestoreAccess", - "type": "structure", - "members": { - "AccountId": {} - } - } - }, - "OwnerAccount": {}, - "TotalBackupSizeInMegaBytes": { - "type": "double" - }, - "ActualIncrementalBackupSizeInMegaBytes": { - "type": "double" - }, - "BackupProgressInMegaBytes": { - "type": "double" - }, - "CurrentBackupRateInMegaBytesPerSecond": { - "type": "double" - }, - "EstimatedSecondsToCompletion": { - "type": "long" - }, - "ElapsedTimeInSeconds": { - "type": "long" - }, - "SourceRegion": {}, - "Tags": { - "shape": "S7" - }, - "RestorableNodeTypes": { - "type": "list", - "member": { - "locationName": "NodeType" - } - } - }, - "wrapper": true - }, - "Sp": { - "type": "list", - "member": { - "locationName": "ClusterSecurityGroupName" - } - }, - "Sq": { - "type": "list", - "member": { - "locationName": "VpcSecurityGroupId" - } - }, - "Su": { - "type": "structure", - "members": { - "ClusterIdentifier": {}, - "NodeType": {}, - "ClusterStatus": {}, - "ModifyStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ClusterCreateTime": { - "type": "timestamp" - }, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - }, - "ClusterSecurityGroups": { - "type": "list", - "member": { - "locationName": "ClusterSecurityGroup", - "type": "structure", - "members": { - "ClusterSecurityGroupName": {}, - "Status": {} - } - } - }, - "VpcSecurityGroups": { - "type": "list", - "member": { - "locationName": "VpcSecurityGroup", - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - } - } - }, - "ClusterParameterGroups": { - "type": "list", - "member": { - "locationName": "ClusterParameterGroup", - "type": "structure", - "members": { - "ParameterGroupName": {}, - "ParameterApplyStatus": {}, - "ClusterParameterStatusList": { - "type": "list", - "member": { - "type": "structure", - "members": { - "ParameterName": {}, - "ParameterApplyStatus": {}, - "ParameterApplyErrorDescription": {} - } - } - } - } - } - }, - "ClusterSubnetGroupName": {}, - "VpcId": {}, - "AvailabilityZone": {}, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "MasterUserPassword": {}, - "NodeType": {}, - "NumberOfNodes": { - "type": "integer" - }, - "ClusterType": {}, - "ClusterVersion": {}, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - }, - "ClusterIdentifier": {} - } - }, - "ClusterVersion": {}, - "AllowVersionUpgrade": { - "type": "boolean" - }, - "NumberOfNodes": { - "type": "integer" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "Encrypted": { - "type": "boolean" - }, - "RestoreStatus": { - "type": "structure", - "members": { - "Status": {}, - "CurrentRestoreRateInMegaBytesPerSecond": { - "type": "double" - }, - "SnapshotSizeInMegaBytes": { - "type": "long" - }, - "ProgressInMegaBytes": { - "type": "long" - }, - "ElapsedTimeInSeconds": { - "type": "long" - }, - "EstimatedTimeToCompletionInSeconds": { - "type": "long" - } - } - }, - "HsmStatus": { - "type": "structure", - "members": { - "HsmClientCertificateIdentifier": {}, - "HsmConfigurationIdentifier": {}, - "Status": {} - } - }, - "ClusterSnapshotCopyStatus": { - "type": "structure", - "members": { - "DestinationRegion": {}, - "RetentionPeriod": { - "type": "long" - }, - "SnapshotCopyGrantName": {} - } - }, - "ClusterPublicKey": {}, - "ClusterNodes": { - "type": "list", - "member": { - "type": "structure", - "members": { - "NodeRole": {}, - "PrivateIPAddress": {}, - "PublicIPAddress": {} - } - } - }, - "ElasticIpStatus": { - "type": "structure", - "members": { - "ElasticIp": {}, - "Status": {} - } - }, - "ClusterRevisionNumber": {}, - "Tags": { - "shape": "S7" - }, - "KmsKeyId": {} - }, - "wrapper": true - }, - "S1d": { - "type": "structure", - "members": { - "ParameterGroupName": {}, - "ParameterGroupFamily": {}, - "Description": {}, - "Tags": { - "shape": "S7" - } - }, - "wrapper": true - }, - "S1j": { - "type": "list", - "member": { - "locationName": "SubnetIdentifier" - } - }, - "S1l": { - "type": "structure", - "members": { - "ClusterSubnetGroupName": {}, - "Description": {}, - "VpcId": {}, - "SubnetGroupStatus": {}, - "Subnets": { - "type": "list", - "member": { - "locationName": "Subnet", - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "shape": "S1o" - }, - "SubnetStatus": {} - } - } - }, - "Tags": { - "shape": "S7" - } - }, - "wrapper": true - }, - "S1o": { - "type": "structure", - "members": { - "Name": {} - }, - "wrapper": true - }, - "S1q": { - "type": "list", - "member": { - "locationName": "SourceId" - } - }, - "S1r": { - "type": "list", - "member": { - "locationName": "EventCategory" - } - }, - "S1t": { - "type": "structure", - "members": { - "CustomerAwsId": {}, - "CustSubscriptionId": {}, - "SnsTopicArn": {}, - "Status": {}, - "SubscriptionCreationTime": { - "type": "timestamp" - }, - "SourceType": {}, - "SourceIdsList": { - "shape": "S1q" - }, - "EventCategoriesList": { - "shape": "S1r" - }, - "Severity": {}, - "Enabled": { - "type": "boolean" - }, - "Tags": { - "shape": "S7" - } - }, - "wrapper": true - }, - "S1w": { - "type": "structure", - "members": { - "HsmClientCertificateIdentifier": {}, - "HsmClientCertificatePublicKey": {}, - "Tags": { - "shape": "S7" - } - }, - "wrapper": true - }, - "S1z": { - "type": "structure", - "members": { - "HsmConfigurationIdentifier": {}, - "Description": {}, - "HsmIpAddress": {}, - "HsmPartitionName": {}, - "Tags": { - "shape": "S7" - } - }, - "wrapper": true - }, - "S22": { - "type": "structure", - "members": { - "SnapshotCopyGrantName": {}, - "KmsKeyId": {}, - "Tags": { - "shape": "S7" - } - }, - "wrapper": true - }, - "S2g": { - "type": "list", - "member": { - "locationName": "TagKey" - } - }, - "S2i": { - "type": "list", - "member": { - "locationName": "TagValue" - } - }, - "S2n": { - "type": "list", - "member": { - "locationName": "Parameter", - "type": "structure", - "members": { - "ParameterName": {}, - "ParameterValue": {}, - "Description": {}, - "Source": {}, - "DataType": {}, - "AllowedValues": {}, - "ApplyType": {}, - "IsModifiable": { - "type": "boolean" - }, - "MinimumEngineVersion": {} - } - } - }, - "S3u": { - "type": "structure", - "members": { - "LoggingEnabled": { - "type": "boolean" - }, - "BucketName": {}, - "S3KeyPrefix": {}, - "LastSuccessfulDeliveryTime": { - "type": "timestamp" - }, - "LastFailureTime": { - "type": "timestamp" - }, - "LastFailureMessage": {} - } - }, - "S44": { - "type": "list", - "member": { - "locationName": "RecurringCharge", - "type": "structure", - "members": { - "RecurringChargeAmount": { - "type": "double" - }, - "RecurringChargeFrequency": {} - }, - "wrapper": true - } - }, - "S49": { - "type": "structure", - "members": { - "ReservedNodeId": {}, - "ReservedNodeOfferingId": {}, - "NodeType": {}, - "StartTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "double" - }, - "UsagePrice": { - "type": "double" - }, - "CurrencyCode": {}, - "NodeCount": { - "type": "integer" - }, - "State": {}, - "OfferingType": {}, - "RecurringCharges": { - "shape": "S44" - } - }, - "wrapper": true - }, - "S4x": { - "type": "structure", - "members": { - "ParameterGroupName": {}, - "ParameterGroupStatus": {} - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/redshift-2012-12-01.paginators.json b/cli/node_modules/aws-sdk/apis/redshift-2012-12-01.paginators.json deleted file mode 100644 index 03027de35..000000000 --- a/cli/node_modules/aws-sdk/apis/redshift-2012-12-01.paginators.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "pagination": { - "DescribeClusterParameterGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "ParameterGroups" - }, - "DescribeClusterParameters": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "Parameters" - }, - "DescribeClusterSecurityGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "ClusterSecurityGroups" - }, - "DescribeClusterSnapshots": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "Snapshots" - }, - "DescribeClusterSubnetGroups": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "ClusterSubnetGroups" - }, - "DescribeClusterVersions": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "ClusterVersions" - }, - "DescribeClusters": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "Clusters" - }, - "DescribeDefaultClusterParameters": { - "input_token": "Marker", - "output_token": "DefaultClusterParameters.Marker", - "limit_key": "MaxRecords", - "result_key": "DefaultClusterParameters.Parameters" - }, - "DescribeEventSubscriptions": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "EventSubscriptionsList" - }, - "DescribeEvents": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "Events" - }, - "DescribeHsmClientCertificates": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "HsmClientCertificates" - }, - "DescribeHsmConfigurations": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "HsmConfigurations" - }, - "DescribeOrderableClusterOptions": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "OrderableClusterOptions" - }, - "DescribeReservedNodeOfferings": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "ReservedNodeOfferings" - }, - "DescribeReservedNodes": { - "input_token": "Marker", - "output_token": "Marker", - "limit_key": "MaxRecords", - "result_key": "ReservedNodes" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/redshift-2012-12-01.waiters.json b/cli/node_modules/aws-sdk/apis/redshift-2012-12-01.waiters.json deleted file mode 100644 index 8235a1d53..000000000 --- a/cli/node_modules/aws-sdk/apis/redshift-2012-12-01.waiters.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "waiters": { - "__default__": { - "acceptor_type": "output" - }, - "__ClusterState": { - "interval": 60, - "max_attempts": 30, - "operation": "DescribeClusters", - "acceptor_path": "Clusters[].ClusterStatus" - }, - "ClusterAvailable": { - "extends": "__ClusterState", - "ignore_errors": [ - "ClusterNotFound" - ], - "success_value": "available", - "failure_value": [ - "deleting" - ] - }, - "ClusterDeleted": { - "extends": "__ClusterState", - "success_type": "error", - "success_value": "ClusterNotFound", - "failure_value": [ - "creating", - "rebooting" - ] - }, - "SnapshotAvailable": { - "interval": 15, - "max_attempts": 20, - "operation": "DescribeClusterSnapshots", - "acceptor_path": "Snapshots[].Status", - "success_value": "available", - "failure_value": [ - "failed", - "deleted" - ] - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/route53-2013-04-01.min.json b/cli/node_modules/aws-sdk/apis/route53-2013-04-01.min.json deleted file mode 100644 index 4c7a32be8..000000000 --- a/cli/node_modules/aws-sdk/apis/route53-2013-04-01.min.json +++ /dev/null @@ -1,1333 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2013-04-01", - "endpointPrefix": "route53", - "globalEndpoint": "route53.amazonaws.com", - "serviceAbbreviation": "Route 53", - "serviceFullName": "Amazon Route 53", - "signatureVersion": "v3https", - "protocol": "rest-xml" - }, - "operations": { - "AssociateVPCWithHostedZone": { - "http": { - "requestUri": "/2013-04-01/hostedzone/{Id}/associatevpc" - }, - "input": { - "xmlNamespace": { - "uri": "https://route53.amazonaws.com/doc/2013-04-01/" - }, - "locationName": "AssociateVPCWithHostedZoneRequest", - "type": "structure", - "required": [ - "HostedZoneId", - "VPC" - ], - "members": { - "HostedZoneId": { - "location": "uri", - "locationName": "Id" - }, - "VPC": { - "shape": "S3" - }, - "Comment": {} - } - }, - "output": { - "type": "structure", - "required": [ - "ChangeInfo" - ], - "members": { - "ChangeInfo": { - "shape": "S8" - } - } - } - }, - "ChangeResourceRecordSets": { - "http": { - "requestUri": "/2013-04-01/hostedzone/{Id}/rrset/" - }, - "input": { - "xmlNamespace": { - "uri": "https://route53.amazonaws.com/doc/2013-04-01/" - }, - "locationName": "ChangeResourceRecordSetsRequest", - "type": "structure", - "required": [ - "HostedZoneId", - "ChangeBatch" - ], - "members": { - "HostedZoneId": { - "location": "uri", - "locationName": "Id" - }, - "ChangeBatch": { - "type": "structure", - "required": [ - "Changes" - ], - "members": { - "Comment": {}, - "Changes": { - "type": "list", - "member": { - "locationName": "Change", - "type": "structure", - "required": [ - "Action", - "ResourceRecordSet" - ], - "members": { - "Action": {}, - "ResourceRecordSet": { - "shape": "Sh" - } - } - } - } - } - } - } - }, - "output": { - "type": "structure", - "required": [ - "ChangeInfo" - ], - "members": { - "ChangeInfo": { - "shape": "S8" - } - } - } - }, - "ChangeTagsForResource": { - "http": { - "requestUri": "/2013-04-01/tags/{ResourceType}/{ResourceId}" - }, - "input": { - "xmlNamespace": { - "uri": "https://route53.amazonaws.com/doc/2013-04-01/" - }, - "locationName": "ChangeTagsForResourceRequest", - "type": "structure", - "required": [ - "ResourceType", - "ResourceId" - ], - "members": { - "ResourceType": { - "location": "uri", - "locationName": "ResourceType" - }, - "ResourceId": { - "location": "uri", - "locationName": "ResourceId" - }, - "AddTags": { - "shape": "S13" - }, - "RemoveTagKeys": { - "type": "list", - "member": { - "locationName": "Key" - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "CreateHealthCheck": { - "http": { - "requestUri": "/2013-04-01/healthcheck", - "responseCode": 201 - }, - "input": { - "xmlNamespace": { - "uri": "https://route53.amazonaws.com/doc/2013-04-01/" - }, - "locationName": "CreateHealthCheckRequest", - "type": "structure", - "required": [ - "CallerReference", - "HealthCheckConfig" - ], - "members": { - "CallerReference": {}, - "HealthCheckConfig": { - "shape": "S1b" - } - } - }, - "output": { - "type": "structure", - "required": [ - "HealthCheck", - "Location" - ], - "members": { - "HealthCheck": { - "shape": "S1l" - }, - "Location": { - "location": "header", - "locationName": "Location" - } - } - } - }, - "CreateHostedZone": { - "http": { - "requestUri": "/2013-04-01/hostedzone", - "responseCode": 201 - }, - "input": { - "xmlNamespace": { - "uri": "https://route53.amazonaws.com/doc/2013-04-01/" - }, - "locationName": "CreateHostedZoneRequest", - "type": "structure", - "required": [ - "Name", - "CallerReference" - ], - "members": { - "Name": {}, - "VPC": { - "shape": "S3" - }, - "CallerReference": {}, - "HostedZoneConfig": { - "shape": "S1q" - }, - "DelegationSetId": {} - } - }, - "output": { - "type": "structure", - "required": [ - "HostedZone", - "ChangeInfo", - "DelegationSet", - "Location" - ], - "members": { - "HostedZone": { - "shape": "S1t" - }, - "ChangeInfo": { - "shape": "S8" - }, - "DelegationSet": { - "shape": "S1v" - }, - "VPC": { - "shape": "S3" - }, - "Location": { - "location": "header", - "locationName": "Location" - } - } - } - }, - "CreateReusableDelegationSet": { - "http": { - "requestUri": "/2013-04-01/delegationset", - "responseCode": 201 - }, - "input": { - "xmlNamespace": { - "uri": "https://route53.amazonaws.com/doc/2013-04-01/" - }, - "locationName": "CreateReusableDelegationSetRequest", - "type": "structure", - "required": [ - "CallerReference" - ], - "members": { - "CallerReference": {}, - "HostedZoneId": {} - } - }, - "output": { - "type": "structure", - "required": [ - "DelegationSet", - "Location" - ], - "members": { - "DelegationSet": { - "shape": "S1v" - }, - "Location": { - "location": "header", - "locationName": "Location" - } - } - } - }, - "DeleteHealthCheck": { - "http": { - "method": "DELETE", - "requestUri": "/2013-04-01/healthcheck/{HealthCheckId}" - }, - "input": { - "type": "structure", - "required": [ - "HealthCheckId" - ], - "members": { - "HealthCheckId": { - "location": "uri", - "locationName": "HealthCheckId" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "DeleteHostedZone": { - "http": { - "method": "DELETE", - "requestUri": "/2013-04-01/hostedzone/{Id}" - }, - "input": { - "type": "structure", - "required": [ - "Id" - ], - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - } - } - }, - "output": { - "type": "structure", - "required": [ - "ChangeInfo" - ], - "members": { - "ChangeInfo": { - "shape": "S8" - } - } - } - }, - "DeleteReusableDelegationSet": { - "http": { - "method": "DELETE", - "requestUri": "/2013-04-01/delegationset/{Id}" - }, - "input": { - "type": "structure", - "required": [ - "Id" - ], - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "DisassociateVPCFromHostedZone": { - "http": { - "requestUri": "/2013-04-01/hostedzone/{Id}/disassociatevpc" - }, - "input": { - "xmlNamespace": { - "uri": "https://route53.amazonaws.com/doc/2013-04-01/" - }, - "locationName": "DisassociateVPCFromHostedZoneRequest", - "type": "structure", - "required": [ - "HostedZoneId", - "VPC" - ], - "members": { - "HostedZoneId": { - "location": "uri", - "locationName": "Id" - }, - "VPC": { - "shape": "S3" - }, - "Comment": {} - } - }, - "output": { - "type": "structure", - "required": [ - "ChangeInfo" - ], - "members": { - "ChangeInfo": { - "shape": "S8" - } - } - } - }, - "GetChange": { - "http": { - "method": "GET", - "requestUri": "/2013-04-01/change/{Id}" - }, - "input": { - "type": "structure", - "required": [ - "Id" - ], - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - } - } - }, - "output": { - "type": "structure", - "required": [ - "ChangeInfo" - ], - "members": { - "ChangeInfo": { - "shape": "S8" - } - } - } - }, - "GetCheckerIpRanges": { - "http": { - "method": "GET", - "requestUri": "/2013-04-01/checkeripranges" - }, - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "required": [ - "CheckerIpRanges" - ], - "members": { - "CheckerIpRanges": { - "type": "list", - "member": {} - } - } - } - }, - "GetGeoLocation": { - "http": { - "method": "GET", - "requestUri": "/2013-04-01/geolocation" - }, - "input": { - "type": "structure", - "members": { - "ContinentCode": { - "location": "querystring", - "locationName": "continentcode" - }, - "CountryCode": { - "location": "querystring", - "locationName": "countrycode" - }, - "SubdivisionCode": { - "location": "querystring", - "locationName": "subdivisioncode" - } - } - }, - "output": { - "type": "structure", - "required": [ - "GeoLocationDetails" - ], - "members": { - "GeoLocationDetails": { - "shape": "S2g" - } - } - } - }, - "GetHealthCheck": { - "http": { - "method": "GET", - "requestUri": "/2013-04-01/healthcheck/{HealthCheckId}" - }, - "input": { - "type": "structure", - "required": [ - "HealthCheckId" - ], - "members": { - "HealthCheckId": { - "location": "uri", - "locationName": "HealthCheckId" - } - } - }, - "output": { - "type": "structure", - "required": [ - "HealthCheck" - ], - "members": { - "HealthCheck": { - "shape": "S1l" - } - } - } - }, - "GetHealthCheckCount": { - "http": { - "method": "GET", - "requestUri": "/2013-04-01/healthcheckcount" - }, - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "required": [ - "HealthCheckCount" - ], - "members": { - "HealthCheckCount": { - "type": "long" - } - } - } - }, - "GetHealthCheckLastFailureReason": { - "http": { - "method": "GET", - "requestUri": "/2013-04-01/healthcheck/{HealthCheckId}/lastfailurereason" - }, - "input": { - "type": "structure", - "required": [ - "HealthCheckId" - ], - "members": { - "HealthCheckId": { - "location": "uri", - "locationName": "HealthCheckId" - } - } - }, - "output": { - "type": "structure", - "required": [ - "HealthCheckObservations" - ], - "members": { - "HealthCheckObservations": { - "shape": "S2r" - } - } - } - }, - "GetHealthCheckStatus": { - "http": { - "method": "GET", - "requestUri": "/2013-04-01/healthcheck/{HealthCheckId}/status" - }, - "input": { - "type": "structure", - "required": [ - "HealthCheckId" - ], - "members": { - "HealthCheckId": { - "location": "uri", - "locationName": "HealthCheckId" - } - } - }, - "output": { - "type": "structure", - "required": [ - "HealthCheckObservations" - ], - "members": { - "HealthCheckObservations": { - "shape": "S2r" - } - } - } - }, - "GetHostedZone": { - "http": { - "method": "GET", - "requestUri": "/2013-04-01/hostedzone/{Id}" - }, - "input": { - "type": "structure", - "required": [ - "Id" - ], - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - } - } - }, - "output": { - "type": "structure", - "required": [ - "HostedZone" - ], - "members": { - "HostedZone": { - "shape": "S1t" - }, - "DelegationSet": { - "shape": "S1v" - }, - "VPCs": { - "type": "list", - "member": { - "shape": "S3", - "locationName": "VPC" - } - } - } - } - }, - "GetHostedZoneCount": { - "http": { - "method": "GET", - "requestUri": "/2013-04-01/hostedzonecount" - }, - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "required": [ - "HostedZoneCount" - ], - "members": { - "HostedZoneCount": { - "type": "long" - } - } - } - }, - "GetReusableDelegationSet": { - "http": { - "method": "GET", - "requestUri": "/2013-04-01/delegationset/{Id}" - }, - "input": { - "type": "structure", - "required": [ - "Id" - ], - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - } - } - }, - "output": { - "type": "structure", - "required": [ - "DelegationSet" - ], - "members": { - "DelegationSet": { - "shape": "S1v" - } - } - } - }, - "ListGeoLocations": { - "http": { - "method": "GET", - "requestUri": "/2013-04-01/geolocations" - }, - "input": { - "type": "structure", - "members": { - "StartContinentCode": { - "location": "querystring", - "locationName": "startcontinentcode" - }, - "StartCountryCode": { - "location": "querystring", - "locationName": "startcountrycode" - }, - "StartSubdivisionCode": { - "location": "querystring", - "locationName": "startsubdivisioncode" - }, - "MaxItems": { - "location": "querystring", - "locationName": "maxitems" - } - } - }, - "output": { - "type": "structure", - "required": [ - "GeoLocationDetailsList", - "IsTruncated", - "MaxItems" - ], - "members": { - "GeoLocationDetailsList": { - "type": "list", - "member": { - "shape": "S2g", - "locationName": "GeoLocationDetails" - } - }, - "IsTruncated": { - "type": "boolean" - }, - "NextContinentCode": {}, - "NextCountryCode": {}, - "NextSubdivisionCode": {}, - "MaxItems": {} - } - } - }, - "ListHealthChecks": { - "http": { - "method": "GET", - "requestUri": "/2013-04-01/healthcheck" - }, - "input": { - "type": "structure", - "members": { - "Marker": { - "location": "querystring", - "locationName": "marker" - }, - "MaxItems": { - "location": "querystring", - "locationName": "maxitems" - } - } - }, - "output": { - "type": "structure", - "required": [ - "HealthChecks", - "Marker", - "IsTruncated", - "MaxItems" - ], - "members": { - "HealthChecks": { - "type": "list", - "member": { - "shape": "S1l", - "locationName": "HealthCheck" - } - }, - "Marker": {}, - "IsTruncated": { - "type": "boolean" - }, - "NextMarker": {}, - "MaxItems": {} - } - } - }, - "ListHostedZones": { - "http": { - "method": "GET", - "requestUri": "/2013-04-01/hostedzone" - }, - "input": { - "type": "structure", - "members": { - "Marker": { - "location": "querystring", - "locationName": "marker" - }, - "MaxItems": { - "location": "querystring", - "locationName": "maxitems" - }, - "DelegationSetId": { - "location": "querystring", - "locationName": "delegationsetid" - } - } - }, - "output": { - "type": "structure", - "required": [ - "HostedZones", - "Marker", - "IsTruncated", - "MaxItems" - ], - "members": { - "HostedZones": { - "shape": "S3g" - }, - "Marker": {}, - "IsTruncated": { - "type": "boolean" - }, - "NextMarker": {}, - "MaxItems": {} - } - } - }, - "ListHostedZonesByName": { - "http": { - "method": "GET", - "requestUri": "/2013-04-01/hostedzonesbyname" - }, - "input": { - "type": "structure", - "members": { - "DNSName": { - "location": "querystring", - "locationName": "dnsname" - }, - "HostedZoneId": { - "location": "querystring", - "locationName": "hostedzoneid" - }, - "MaxItems": { - "location": "querystring", - "locationName": "maxitems" - } - } - }, - "output": { - "type": "structure", - "required": [ - "HostedZones", - "IsTruncated", - "MaxItems" - ], - "members": { - "HostedZones": { - "shape": "S3g" - }, - "DNSName": {}, - "HostedZoneId": {}, - "IsTruncated": { - "type": "boolean" - }, - "NextDNSName": {}, - "NextHostedZoneId": {}, - "MaxItems": {} - } - } - }, - "ListResourceRecordSets": { - "http": { - "method": "GET", - "requestUri": "/2013-04-01/hostedzone/{Id}/rrset" - }, - "input": { - "type": "structure", - "required": [ - "HostedZoneId" - ], - "members": { - "HostedZoneId": { - "location": "uri", - "locationName": "Id" - }, - "StartRecordName": { - "location": "querystring", - "locationName": "name" - }, - "StartRecordType": { - "location": "querystring", - "locationName": "type" - }, - "StartRecordIdentifier": { - "location": "querystring", - "locationName": "identifier" - }, - "MaxItems": { - "location": "querystring", - "locationName": "maxitems" - } - } - }, - "output": { - "type": "structure", - "required": [ - "ResourceRecordSets", - "IsTruncated", - "MaxItems" - ], - "members": { - "ResourceRecordSets": { - "type": "list", - "member": { - "shape": "Sh", - "locationName": "ResourceRecordSet" - } - }, - "IsTruncated": { - "type": "boolean" - }, - "NextRecordName": {}, - "NextRecordType": {}, - "NextRecordIdentifier": {}, - "MaxItems": {} - } - } - }, - "ListReusableDelegationSets": { - "http": { - "method": "GET", - "requestUri": "/2013-04-01/delegationset" - }, - "input": { - "type": "structure", - "members": { - "Marker": { - "location": "querystring", - "locationName": "marker" - }, - "MaxItems": { - "location": "querystring", - "locationName": "maxitems" - } - } - }, - "output": { - "type": "structure", - "required": [ - "DelegationSets", - "Marker", - "IsTruncated", - "MaxItems" - ], - "members": { - "DelegationSets": { - "type": "list", - "member": { - "shape": "S1v", - "locationName": "DelegationSet" - } - }, - "Marker": {}, - "IsTruncated": { - "type": "boolean" - }, - "NextMarker": {}, - "MaxItems": {} - } - } - }, - "ListTagsForResource": { - "http": { - "method": "GET", - "requestUri": "/2013-04-01/tags/{ResourceType}/{ResourceId}" - }, - "input": { - "type": "structure", - "required": [ - "ResourceType", - "ResourceId" - ], - "members": { - "ResourceType": { - "location": "uri", - "locationName": "ResourceType" - }, - "ResourceId": { - "location": "uri", - "locationName": "ResourceId" - } - } - }, - "output": { - "type": "structure", - "required": [ - "ResourceTagSet" - ], - "members": { - "ResourceTagSet": { - "shape": "S3r" - } - } - } - }, - "ListTagsForResources": { - "http": { - "requestUri": "/2013-04-01/tags/{ResourceType}" - }, - "input": { - "xmlNamespace": { - "uri": "https://route53.amazonaws.com/doc/2013-04-01/" - }, - "locationName": "ListTagsForResourcesRequest", - "type": "structure", - "required": [ - "ResourceType", - "ResourceIds" - ], - "members": { - "ResourceType": { - "location": "uri", - "locationName": "ResourceType" - }, - "ResourceIds": { - "type": "list", - "member": { - "locationName": "ResourceId" - } - } - } - }, - "output": { - "type": "structure", - "required": [ - "ResourceTagSets" - ], - "members": { - "ResourceTagSets": { - "type": "list", - "member": { - "shape": "S3r", - "locationName": "ResourceTagSet" - } - } - } - } - }, - "UpdateHealthCheck": { - "http": { - "requestUri": "/2013-04-01/healthcheck/{HealthCheckId}" - }, - "input": { - "xmlNamespace": { - "uri": "https://route53.amazonaws.com/doc/2013-04-01/" - }, - "locationName": "UpdateHealthCheckRequest", - "type": "structure", - "required": [ - "HealthCheckId" - ], - "members": { - "HealthCheckId": { - "location": "uri", - "locationName": "HealthCheckId" - }, - "HealthCheckVersion": { - "type": "long" - }, - "IPAddress": {}, - "Port": { - "type": "integer" - }, - "ResourcePath": {}, - "FullyQualifiedDomainName": {}, - "SearchString": {}, - "FailureThreshold": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "required": [ - "HealthCheck" - ], - "members": { - "HealthCheck": { - "shape": "S1l" - } - } - } - }, - "UpdateHostedZoneComment": { - "http": { - "requestUri": "/2013-04-01/hostedzone/{Id}" - }, - "input": { - "xmlNamespace": { - "uri": "https://route53.amazonaws.com/doc/2013-04-01/" - }, - "locationName": "UpdateHostedZoneCommentRequest", - "type": "structure", - "required": [ - "Id" - ], - "members": { - "Id": { - "location": "uri", - "locationName": "Id" - }, - "Comment": {} - } - }, - "output": { - "type": "structure", - "required": [ - "HostedZone" - ], - "members": { - "HostedZone": { - "shape": "S1t" - } - } - } - } - }, - "shapes": { - "S3": { - "type": "structure", - "members": { - "VPCRegion": {}, - "VPCId": {} - } - }, - "S8": { - "type": "structure", - "required": [ - "Id", - "Status", - "SubmittedAt" - ], - "members": { - "Id": {}, - "Status": {}, - "SubmittedAt": { - "type": "timestamp" - }, - "Comment": {} - } - }, - "Sh": { - "type": "structure", - "required": [ - "Name", - "Type" - ], - "members": { - "Name": {}, - "Type": {}, - "SetIdentifier": {}, - "Weight": { - "type": "long" - }, - "Region": {}, - "GeoLocation": { - "type": "structure", - "members": { - "ContinentCode": {}, - "CountryCode": {}, - "SubdivisionCode": {} - } - }, - "Failover": {}, - "TTL": { - "type": "long" - }, - "ResourceRecords": { - "type": "list", - "member": { - "locationName": "ResourceRecord", - "type": "structure", - "required": [ - "Value" - ], - "members": { - "Value": {} - } - } - }, - "AliasTarget": { - "type": "structure", - "required": [ - "HostedZoneId", - "DNSName", - "EvaluateTargetHealth" - ], - "members": { - "HostedZoneId": {}, - "DNSName": {}, - "EvaluateTargetHealth": { - "type": "boolean" - } - } - }, - "HealthCheckId": {} - } - }, - "S13": { - "type": "list", - "member": { - "locationName": "Tag", - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - }, - "S1b": { - "type": "structure", - "required": [ - "Type" - ], - "members": { - "IPAddress": {}, - "Port": { - "type": "integer" - }, - "Type": {}, - "ResourcePath": {}, - "FullyQualifiedDomainName": {}, - "SearchString": {}, - "RequestInterval": { - "type": "integer" - }, - "FailureThreshold": { - "type": "integer" - } - } - }, - "S1l": { - "type": "structure", - "required": [ - "Id", - "CallerReference", - "HealthCheckConfig", - "HealthCheckVersion" - ], - "members": { - "Id": {}, - "CallerReference": {}, - "HealthCheckConfig": { - "shape": "S1b" - }, - "HealthCheckVersion": { - "type": "long" - } - } - }, - "S1q": { - "type": "structure", - "members": { - "Comment": {}, - "PrivateZone": { - "type": "boolean" - } - } - }, - "S1t": { - "type": "structure", - "required": [ - "Id", - "Name", - "CallerReference" - ], - "members": { - "Id": {}, - "Name": {}, - "CallerReference": {}, - "Config": { - "shape": "S1q" - }, - "ResourceRecordSetCount": { - "type": "long" - } - } - }, - "S1v": { - "type": "structure", - "required": [ - "NameServers" - ], - "members": { - "Id": {}, - "CallerReference": {}, - "NameServers": { - "type": "list", - "member": { - "locationName": "NameServer" - } - } - } - }, - "S2g": { - "type": "structure", - "members": { - "ContinentCode": {}, - "ContinentName": {}, - "CountryCode": {}, - "CountryName": {}, - "SubdivisionCode": {}, - "SubdivisionName": {} - } - }, - "S2r": { - "type": "list", - "member": { - "locationName": "HealthCheckObservation", - "type": "structure", - "members": { - "IPAddress": {}, - "StatusReport": { - "type": "structure", - "members": { - "Status": {}, - "CheckedTime": { - "type": "timestamp" - } - } - } - } - } - }, - "S3g": { - "type": "list", - "member": { - "shape": "S1t", - "locationName": "HostedZone" - } - }, - "S3r": { - "type": "structure", - "members": { - "ResourceType": {}, - "ResourceId": {}, - "Tags": { - "shape": "S13" - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/route53-2013-04-01.paginators.json b/cli/node_modules/aws-sdk/apis/route53-2013-04-01.paginators.json deleted file mode 100644 index d472f47a2..000000000 --- a/cli/node_modules/aws-sdk/apis/route53-2013-04-01.paginators.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "pagination": { - "ListHealthChecks": { - "input_token": "Marker", - "output_token": "NextMarker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "HealthChecks" - }, - "ListHostedZones": { - "input_token": "Marker", - "output_token": "NextMarker", - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "HostedZones" - }, - "ListResourceRecordSets": { - "more_results": "IsTruncated", - "limit_key": "MaxItems", - "result_key": "ResourceRecordSets", - "input_token": [ - "StartRecordName", - "StartRecordType", - "StartRecordIdentifier" - ], - "output_token": [ - "NextRecordName", - "NextRecordType", - "NextRecordIdentifier" - ] - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/route53domains-2014-05-15.min.json b/cli/node_modules/aws-sdk/apis/route53domains-2014-05-15.min.json deleted file mode 100644 index 944d268dd..000000000 --- a/cli/node_modules/aws-sdk/apis/route53domains-2014-05-15.min.json +++ /dev/null @@ -1,613 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2014-05-15", - "endpointPrefix": "route53domains", - "jsonVersion": "1.1", - "serviceFullName": "Amazon Route 53 Domains", - "signatureVersion": "v4", - "targetPrefix": "Route53Domains_v20140515", - "protocol": "json" - }, - "operations": { - "CheckDomainAvailability": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {}, - "IdnLangCode": {} - } - }, - "output": { - "type": "structure", - "required": [ - "Availability" - ], - "members": { - "Availability": {} - } - } - }, - "DeleteTagsForDomain": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "TagsToDelete" - ], - "members": { - "DomainName": {}, - "TagsToDelete": { - "type": "list", - "member": {} - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "DisableDomainAutoRenew": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "DisableDomainTransferLock": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "type": "structure", - "required": [ - "OperationId" - ], - "members": { - "OperationId": {} - } - } - }, - "EnableDomainAutoRenew": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "EnableDomainTransferLock": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "type": "structure", - "required": [ - "OperationId" - ], - "members": { - "OperationId": {} - } - } - }, - "GetDomainDetail": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "type": "structure", - "required": [ - "DomainName", - "Nameservers", - "AdminContact", - "RegistrantContact", - "TechContact" - ], - "members": { - "DomainName": {}, - "Nameservers": { - "shape": "Sl" - }, - "AutoRenew": { - "type": "boolean" - }, - "AdminContact": { - "shape": "Sr" - }, - "RegistrantContact": { - "shape": "Sr" - }, - "TechContact": { - "shape": "Sr" - }, - "AdminPrivacy": { - "type": "boolean" - }, - "RegistrantPrivacy": { - "type": "boolean" - }, - "TechPrivacy": { - "type": "boolean" - }, - "RegistrarName": {}, - "WhoIsServer": {}, - "RegistrarUrl": {}, - "AbuseContactEmail": {}, - "AbuseContactPhone": {}, - "RegistryDomainId": {}, - "CreationDate": { - "type": "timestamp" - }, - "UpdatedDate": { - "type": "timestamp" - }, - "ExpirationDate": { - "type": "timestamp" - }, - "Reseller": {}, - "DnsSec": {}, - "StatusList": { - "type": "list", - "member": {} - } - } - } - }, - "GetOperationDetail": { - "input": { - "type": "structure", - "required": [ - "OperationId" - ], - "members": { - "OperationId": {} - } - }, - "output": { - "type": "structure", - "members": { - "OperationId": {}, - "Status": {}, - "Message": {}, - "DomainName": {}, - "Type": {}, - "SubmittedDate": { - "type": "timestamp" - } - } - } - }, - "ListDomains": { - "input": { - "type": "structure", - "members": { - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "required": [ - "Domains" - ], - "members": { - "Domains": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {}, - "AutoRenew": { - "type": "boolean" - }, - "TransferLock": { - "type": "boolean" - }, - "Expiry": { - "type": "timestamp" - } - } - } - }, - "NextPageMarker": {} - } - } - }, - "ListOperations": { - "input": { - "type": "structure", - "members": { - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "required": [ - "Operations" - ], - "members": { - "Operations": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "OperationId", - "Status", - "Type", - "SubmittedDate" - ], - "members": { - "OperationId": {}, - "Status": {}, - "Type": {}, - "SubmittedDate": { - "type": "timestamp" - } - } - } - }, - "NextPageMarker": {} - } - } - }, - "ListTagsForDomain": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "type": "structure", - "required": [ - "TagList" - ], - "members": { - "TagList": { - "shape": "S1v" - } - } - } - }, - "RegisterDomain": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "DurationInYears", - "AdminContact", - "RegistrantContact", - "TechContact" - ], - "members": { - "DomainName": {}, - "IdnLangCode": {}, - "DurationInYears": { - "type": "integer" - }, - "AutoRenew": { - "type": "boolean" - }, - "AdminContact": { - "shape": "Sr" - }, - "RegistrantContact": { - "shape": "Sr" - }, - "TechContact": { - "shape": "Sr" - }, - "PrivacyProtectAdminContact": { - "type": "boolean" - }, - "PrivacyProtectRegistrantContact": { - "type": "boolean" - }, - "PrivacyProtectTechContact": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "required": [ - "OperationId" - ], - "members": { - "OperationId": {} - } - } - }, - "RetrieveDomainAuthCode": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "type": "structure", - "required": [ - "AuthCode" - ], - "members": { - "AuthCode": { - "shape": "S23" - } - } - } - }, - "TransferDomain": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "DurationInYears", - "AdminContact", - "RegistrantContact", - "TechContact" - ], - "members": { - "DomainName": {}, - "IdnLangCode": {}, - "DurationInYears": { - "type": "integer" - }, - "Nameservers": { - "shape": "Sl" - }, - "AuthCode": { - "shape": "S23" - }, - "AutoRenew": { - "type": "boolean" - }, - "AdminContact": { - "shape": "Sr" - }, - "RegistrantContact": { - "shape": "Sr" - }, - "TechContact": { - "shape": "Sr" - }, - "PrivacyProtectAdminContact": { - "type": "boolean" - }, - "PrivacyProtectRegistrantContact": { - "type": "boolean" - }, - "PrivacyProtectTechContact": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "required": [ - "OperationId" - ], - "members": { - "OperationId": {} - } - } - }, - "UpdateDomainContact": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {}, - "AdminContact": { - "shape": "Sr" - }, - "RegistrantContact": { - "shape": "Sr" - }, - "TechContact": { - "shape": "Sr" - } - } - }, - "output": { - "type": "structure", - "required": [ - "OperationId" - ], - "members": { - "OperationId": {} - } - } - }, - "UpdateDomainContactPrivacy": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {}, - "AdminPrivacy": { - "type": "boolean" - }, - "RegistrantPrivacy": { - "type": "boolean" - }, - "TechPrivacy": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "required": [ - "OperationId" - ], - "members": { - "OperationId": {} - } - } - }, - "UpdateDomainNameservers": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "Nameservers" - ], - "members": { - "DomainName": {}, - "FIAuthKey": {}, - "Nameservers": { - "shape": "Sl" - } - } - }, - "output": { - "type": "structure", - "required": [ - "OperationId" - ], - "members": { - "OperationId": {} - } - } - }, - "UpdateTagsForDomain": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {}, - "TagsToUpdate": { - "shape": "S1v" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - } - }, - "shapes": { - "Sl": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "Name" - ], - "members": { - "Name": {}, - "GlueIps": { - "type": "list", - "member": {} - } - } - } - }, - "Sr": { - "type": "structure", - "members": { - "FirstName": {}, - "LastName": {}, - "ContactType": {}, - "OrganizationName": {}, - "AddressLine1": {}, - "AddressLine2": {}, - "City": {}, - "State": {}, - "CountryCode": {}, - "ZipCode": {}, - "PhoneNumber": {}, - "Email": {}, - "Fax": {}, - "ExtraParams": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "Name", - "Value" - ], - "members": { - "Name": {}, - "Value": {} - } - } - } - }, - "sensitive": true - }, - "S1v": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - }, - "S23": { - "type": "string", - "sensitive": true - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/route53domains-2014-05-15.paginators.json b/cli/node_modules/aws-sdk/apis/route53domains-2014-05-15.paginators.json deleted file mode 100644 index 8d1a73ab2..000000000 --- a/cli/node_modules/aws-sdk/apis/route53domains-2014-05-15.paginators.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "version": "1.0", - "pagination": { - "ListDomains": { - "limit_key": "MaxItems", - "input_token": "Marker", - "output_token": "NextPageMarker", - "result_key": "Domains" - }, - "ListOperations": { - "limit_key": "MaxItems", - "input_token": "Marker", - "output_token": "NextPageMarker", - "result_key": "Operations" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/s3-2006-03-01.min.json b/cli/node_modules/aws-sdk/apis/s3-2006-03-01.min.json deleted file mode 100644 index 874b91960..000000000 --- a/cli/node_modules/aws-sdk/apis/s3-2006-03-01.min.json +++ /dev/null @@ -1,3421 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2006-03-01", - "checksumFormat": "md5", - "endpointPrefix": "s3", - "globalEndpoint": "s3.amazonaws.com", - "serviceAbbreviation": "Amazon S3", - "serviceFullName": "Amazon Simple Storage Service", - "signatureVersion": "s3", - "timestampFormat": "rfc822", - "protocol": "rest-xml" - }, - "operations": { - "AbortMultipartUpload": { - "http": { - "method": "DELETE", - "requestUri": "/{Bucket}/{Key+}" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "Key", - "UploadId" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "Key": { - "location": "uri", - "locationName": "Key" - }, - "UploadId": { - "location": "querystring", - "locationName": "uploadId" - }, - "RequestPayer": { - "location": "header", - "locationName": "x-amz-request-payer" - } - } - }, - "output": { - "type": "structure", - "members": { - "RequestCharged": { - "location": "header", - "locationName": "x-amz-request-charged" - } - } - } - }, - "CompleteMultipartUpload": { - "http": { - "requestUri": "/{Bucket}/{Key+}" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "Key", - "UploadId" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "Key": { - "location": "uri", - "locationName": "Key" - }, - "MultipartUpload": { - "locationName": "CompleteMultipartUpload", - "xmlNamespace": { - "uri": "http://s3.amazonaws.com/doc/2006-03-01/" - }, - "type": "structure", - "members": { - "Parts": { - "locationName": "Part", - "type": "list", - "member": { - "type": "structure", - "members": { - "ETag": {}, - "PartNumber": { - "type": "integer" - } - } - }, - "flattened": true - } - } - }, - "UploadId": { - "location": "querystring", - "locationName": "uploadId" - }, - "RequestPayer": { - "location": "header", - "locationName": "x-amz-request-payer" - } - }, - "payload": "MultipartUpload" - }, - "output": { - "type": "structure", - "members": { - "Location": {}, - "Bucket": {}, - "Key": {}, - "Expiration": { - "location": "header", - "locationName": "x-amz-expiration" - }, - "ETag": {}, - "ServerSideEncryption": { - "location": "header", - "locationName": "x-amz-server-side-encryption" - }, - "VersionId": { - "location": "header", - "locationName": "x-amz-version-id" - }, - "SSEKMSKeyId": { - "shape": "Sj", - "location": "header", - "locationName": "x-amz-server-side-encryption-aws-kms-key-id" - }, - "RequestCharged": { - "location": "header", - "locationName": "x-amz-request-charged" - } - } - } - }, - "CopyObject": { - "http": { - "method": "PUT", - "requestUri": "/{Bucket}/{Key+}" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "CopySource", - "Key" - ], - "members": { - "ACL": { - "location": "header", - "locationName": "x-amz-acl" - }, - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "CacheControl": { - "location": "header", - "locationName": "Cache-Control" - }, - "ContentDisposition": { - "location": "header", - "locationName": "Content-Disposition" - }, - "ContentEncoding": { - "location": "header", - "locationName": "Content-Encoding" - }, - "ContentLanguage": { - "location": "header", - "locationName": "Content-Language" - }, - "ContentType": { - "location": "header", - "locationName": "Content-Type" - }, - "CopySource": { - "location": "header", - "locationName": "x-amz-copy-source" - }, - "CopySourceIfMatch": { - "location": "header", - "locationName": "x-amz-copy-source-if-match" - }, - "CopySourceIfModifiedSince": { - "location": "header", - "locationName": "x-amz-copy-source-if-modified-since", - "type": "timestamp" - }, - "CopySourceIfNoneMatch": { - "location": "header", - "locationName": "x-amz-copy-source-if-none-match" - }, - "CopySourceIfUnmodifiedSince": { - "location": "header", - "locationName": "x-amz-copy-source-if-unmodified-since", - "type": "timestamp" - }, - "Expires": { - "location": "header", - "locationName": "Expires", - "type": "timestamp" - }, - "GrantFullControl": { - "location": "header", - "locationName": "x-amz-grant-full-control" - }, - "GrantRead": { - "location": "header", - "locationName": "x-amz-grant-read" - }, - "GrantReadACP": { - "location": "header", - "locationName": "x-amz-grant-read-acp" - }, - "GrantWriteACP": { - "location": "header", - "locationName": "x-amz-grant-write-acp" - }, - "Key": { - "location": "uri", - "locationName": "Key" - }, - "Metadata": { - "shape": "S11", - "location": "headers", - "locationName": "x-amz-meta-" - }, - "MetadataDirective": { - "location": "header", - "locationName": "x-amz-metadata-directive" - }, - "ServerSideEncryption": { - "location": "header", - "locationName": "x-amz-server-side-encryption" - }, - "StorageClass": { - "location": "header", - "locationName": "x-amz-storage-class" - }, - "WebsiteRedirectLocation": { - "location": "header", - "locationName": "x-amz-website-redirect-location" - }, - "SSECustomerAlgorithm": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-algorithm" - }, - "SSECustomerKey": { - "shape": "S18", - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key" - }, - "SSECustomerKeyMD5": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key-MD5" - }, - "SSEKMSKeyId": { - "shape": "Sj", - "location": "header", - "locationName": "x-amz-server-side-encryption-aws-kms-key-id" - }, - "CopySourceSSECustomerAlgorithm": { - "location": "header", - "locationName": "x-amz-copy-source-server-side-encryption-customer-algorithm" - }, - "CopySourceSSECustomerKey": { - "shape": "S1b", - "location": "header", - "locationName": "x-amz-copy-source-server-side-encryption-customer-key" - }, - "CopySourceSSECustomerKeyMD5": { - "location": "header", - "locationName": "x-amz-copy-source-server-side-encryption-customer-key-MD5" - }, - "RequestPayer": { - "location": "header", - "locationName": "x-amz-request-payer" - } - } - }, - "output": { - "type": "structure", - "members": { - "CopyObjectResult": { - "type": "structure", - "members": { - "ETag": {}, - "LastModified": { - "type": "timestamp" - } - } - }, - "Expiration": { - "location": "header", - "locationName": "x-amz-expiration" - }, - "CopySourceVersionId": { - "location": "header", - "locationName": "x-amz-copy-source-version-id" - }, - "ServerSideEncryption": { - "location": "header", - "locationName": "x-amz-server-side-encryption" - }, - "SSECustomerAlgorithm": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-algorithm" - }, - "SSECustomerKeyMD5": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key-MD5" - }, - "SSEKMSKeyId": { - "shape": "Sj", - "location": "header", - "locationName": "x-amz-server-side-encryption-aws-kms-key-id" - }, - "RequestCharged": { - "location": "header", - "locationName": "x-amz-request-charged" - } - }, - "payload": "CopyObjectResult" - }, - "alias": "PutObjectCopy" - }, - "CreateBucket": { - "http": { - "method": "PUT", - "requestUri": "/{Bucket}" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "ACL": { - "location": "header", - "locationName": "x-amz-acl" - }, - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "CreateBucketConfiguration": { - "xmlNamespace": { - "uri": "http://s3.amazonaws.com/doc/2006-03-01/" - }, - "locationName": "CreateBucketConfiguration", - "type": "structure", - "members": { - "LocationConstraint": {} - } - }, - "GrantFullControl": { - "location": "header", - "locationName": "x-amz-grant-full-control" - }, - "GrantRead": { - "location": "header", - "locationName": "x-amz-grant-read" - }, - "GrantReadACP": { - "location": "header", - "locationName": "x-amz-grant-read-acp" - }, - "GrantWrite": { - "location": "header", - "locationName": "x-amz-grant-write" - }, - "GrantWriteACP": { - "location": "header", - "locationName": "x-amz-grant-write-acp" - } - }, - "payload": "CreateBucketConfiguration" - }, - "output": { - "type": "structure", - "members": { - "Location": { - "location": "header", - "locationName": "Location" - } - } - }, - "alias": "PutBucket" - }, - "CreateMultipartUpload": { - "http": { - "requestUri": "/{Bucket}/{Key+}?uploads" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "Key" - ], - "members": { - "ACL": { - "location": "header", - "locationName": "x-amz-acl" - }, - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "CacheControl": { - "location": "header", - "locationName": "Cache-Control" - }, - "ContentDisposition": { - "location": "header", - "locationName": "Content-Disposition" - }, - "ContentEncoding": { - "location": "header", - "locationName": "Content-Encoding" - }, - "ContentLanguage": { - "location": "header", - "locationName": "Content-Language" - }, - "ContentType": { - "location": "header", - "locationName": "Content-Type" - }, - "Expires": { - "location": "header", - "locationName": "Expires", - "type": "timestamp" - }, - "GrantFullControl": { - "location": "header", - "locationName": "x-amz-grant-full-control" - }, - "GrantRead": { - "location": "header", - "locationName": "x-amz-grant-read" - }, - "GrantReadACP": { - "location": "header", - "locationName": "x-amz-grant-read-acp" - }, - "GrantWriteACP": { - "location": "header", - "locationName": "x-amz-grant-write-acp" - }, - "Key": { - "location": "uri", - "locationName": "Key" - }, - "Metadata": { - "shape": "S11", - "location": "headers", - "locationName": "x-amz-meta-" - }, - "ServerSideEncryption": { - "location": "header", - "locationName": "x-amz-server-side-encryption" - }, - "StorageClass": { - "location": "header", - "locationName": "x-amz-storage-class" - }, - "WebsiteRedirectLocation": { - "location": "header", - "locationName": "x-amz-website-redirect-location" - }, - "SSECustomerAlgorithm": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-algorithm" - }, - "SSECustomerKey": { - "shape": "S18", - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key" - }, - "SSECustomerKeyMD5": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key-MD5" - }, - "SSEKMSKeyId": { - "shape": "Sj", - "location": "header", - "locationName": "x-amz-server-side-encryption-aws-kms-key-id" - }, - "RequestPayer": { - "location": "header", - "locationName": "x-amz-request-payer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Bucket": { - "locationName": "Bucket" - }, - "Key": {}, - "UploadId": {}, - "ServerSideEncryption": { - "location": "header", - "locationName": "x-amz-server-side-encryption" - }, - "SSECustomerAlgorithm": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-algorithm" - }, - "SSECustomerKeyMD5": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key-MD5" - }, - "SSEKMSKeyId": { - "shape": "Sj", - "location": "header", - "locationName": "x-amz-server-side-encryption-aws-kms-key-id" - }, - "RequestCharged": { - "location": "header", - "locationName": "x-amz-request-charged" - } - } - }, - "alias": "InitiateMultipartUpload" - }, - "DeleteBucket": { - "http": { - "method": "DELETE", - "requestUri": "/{Bucket}" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - } - } - } - }, - "DeleteBucketCors": { - "http": { - "method": "DELETE", - "requestUri": "/{Bucket}?cors" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - } - } - } - }, - "DeleteBucketLifecycle": { - "http": { - "method": "DELETE", - "requestUri": "/{Bucket}?lifecycle" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - } - } - } - }, - "DeleteBucketPolicy": { - "http": { - "method": "DELETE", - "requestUri": "/{Bucket}?policy" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - } - } - } - }, - "DeleteBucketReplication": { - "http": { - "method": "DELETE", - "requestUri": "/{Bucket}?replication" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - } - } - } - }, - "DeleteBucketTagging": { - "http": { - "method": "DELETE", - "requestUri": "/{Bucket}?tagging" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - } - } - } - }, - "DeleteBucketWebsite": { - "http": { - "method": "DELETE", - "requestUri": "/{Bucket}?website" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - } - } - } - }, - "DeleteObject": { - "http": { - "method": "DELETE", - "requestUri": "/{Bucket}/{Key+}" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "Key" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "Key": { - "location": "uri", - "locationName": "Key" - }, - "MFA": { - "location": "header", - "locationName": "x-amz-mfa" - }, - "VersionId": { - "location": "querystring", - "locationName": "versionId" - }, - "RequestPayer": { - "location": "header", - "locationName": "x-amz-request-payer" - } - } - }, - "output": { - "type": "structure", - "members": { - "DeleteMarker": { - "location": "header", - "locationName": "x-amz-delete-marker", - "type": "boolean" - }, - "VersionId": { - "location": "header", - "locationName": "x-amz-version-id" - }, - "RequestCharged": { - "location": "header", - "locationName": "x-amz-request-charged" - } - } - } - }, - "DeleteObjects": { - "http": { - "requestUri": "/{Bucket}?delete" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "Delete" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "Delete": { - "xmlNamespace": { - "uri": "http://s3.amazonaws.com/doc/2006-03-01/" - }, - "locationName": "Delete", - "type": "structure", - "required": [ - "Objects" - ], - "members": { - "Objects": { - "locationName": "Object", - "type": "list", - "member": { - "type": "structure", - "required": [ - "Key" - ], - "members": { - "Key": {}, - "VersionId": {} - } - }, - "flattened": true - }, - "Quiet": { - "type": "boolean" - } - } - }, - "MFA": { - "location": "header", - "locationName": "x-amz-mfa" - }, - "RequestPayer": { - "location": "header", - "locationName": "x-amz-request-payer" - } - }, - "payload": "Delete" - }, - "output": { - "type": "structure", - "members": { - "Deleted": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Key": {}, - "VersionId": {}, - "DeleteMarker": { - "type": "boolean" - }, - "DeleteMarkerVersionId": {} - } - }, - "flattened": true - }, - "RequestCharged": { - "location": "header", - "locationName": "x-amz-request-charged" - }, - "Errors": { - "locationName": "Error", - "type": "list", - "member": { - "type": "structure", - "members": { - "Key": {}, - "VersionId": {}, - "Code": {}, - "Message": {} - } - }, - "flattened": true - } - } - }, - "alias": "DeleteMultipleObjects" - }, - "GetBucketAcl": { - "http": { - "method": "GET", - "requestUri": "/{Bucket}?acl" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - } - } - }, - "output": { - "type": "structure", - "members": { - "Owner": { - "shape": "S2f" - }, - "Grants": { - "shape": "S2i", - "locationName": "AccessControlList" - } - } - } - }, - "GetBucketCors": { - "http": { - "method": "GET", - "requestUri": "/{Bucket}?cors" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - } - } - }, - "output": { - "type": "structure", - "members": { - "CORSRules": { - "shape": "S2r", - "locationName": "CORSRule" - } - } - } - }, - "GetBucketLifecycle": { - "http": { - "method": "GET", - "requestUri": "/{Bucket}?lifecycle" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - } - } - }, - "output": { - "type": "structure", - "members": { - "Rules": { - "shape": "S34", - "locationName": "Rule" - } - } - } - }, - "GetBucketLocation": { - "http": { - "method": "GET", - "requestUri": "/{Bucket}?location" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - } - } - }, - "output": { - "type": "structure", - "members": { - "LocationConstraint": {} - } - } - }, - "GetBucketLogging": { - "http": { - "method": "GET", - "requestUri": "/{Bucket}?logging" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - } - } - }, - "output": { - "type": "structure", - "members": { - "LoggingEnabled": { - "shape": "S3j" - } - } - } - }, - "GetBucketNotification": { - "http": { - "method": "GET", - "requestUri": "/{Bucket}?notification" - }, - "input": { - "shape": "S3p" - }, - "output": { - "shape": "S3q" - }, - "deprecated": true - }, - "GetBucketNotificationConfiguration": { - "http": { - "method": "GET", - "requestUri": "/{Bucket}?notification" - }, - "input": { - "shape": "S3p" - }, - "output": { - "shape": "S41" - } - }, - "GetBucketPolicy": { - "http": { - "method": "GET", - "requestUri": "/{Bucket}?policy" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - } - } - }, - "output": { - "type": "structure", - "members": { - "Policy": {} - }, - "payload": "Policy" - } - }, - "GetBucketReplication": { - "http": { - "method": "GET", - "requestUri": "/{Bucket}?replication" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - } - } - }, - "output": { - "type": "structure", - "members": { - "ReplicationConfiguration": { - "shape": "S4e" - } - }, - "payload": "ReplicationConfiguration" - } - }, - "GetBucketRequestPayment": { - "http": { - "method": "GET", - "requestUri": "/{Bucket}?requestPayment" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - } - } - }, - "output": { - "type": "structure", - "members": { - "Payer": {} - } - } - }, - "GetBucketTagging": { - "http": { - "method": "GET", - "requestUri": "/{Bucket}?tagging" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - } - } - }, - "output": { - "type": "structure", - "required": [ - "TagSet" - ], - "members": { - "TagSet": { - "shape": "S4p" - } - } - } - }, - "GetBucketVersioning": { - "http": { - "method": "GET", - "requestUri": "/{Bucket}?versioning" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - } - } - }, - "output": { - "type": "structure", - "members": { - "Status": {}, - "MFADelete": { - "locationName": "MfaDelete" - } - } - } - }, - "GetBucketWebsite": { - "http": { - "method": "GET", - "requestUri": "/{Bucket}?website" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - } - } - }, - "output": { - "type": "structure", - "members": { - "RedirectAllRequestsTo": { - "shape": "S4y" - }, - "IndexDocument": { - "shape": "S51" - }, - "ErrorDocument": { - "shape": "S53" - }, - "RoutingRules": { - "shape": "S54" - } - } - } - }, - "GetObject": { - "http": { - "method": "GET", - "requestUri": "/{Bucket}/{Key+}" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "Key" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "IfMatch": { - "location": "header", - "locationName": "If-Match" - }, - "IfModifiedSince": { - "location": "header", - "locationName": "If-Modified-Since", - "type": "timestamp" - }, - "IfNoneMatch": { - "location": "header", - "locationName": "If-None-Match" - }, - "IfUnmodifiedSince": { - "location": "header", - "locationName": "If-Unmodified-Since", - "type": "timestamp" - }, - "Key": { - "location": "uri", - "locationName": "Key" - }, - "Range": { - "location": "header", - "locationName": "Range" - }, - "ResponseCacheControl": { - "location": "querystring", - "locationName": "response-cache-control" - }, - "ResponseContentDisposition": { - "location": "querystring", - "locationName": "response-content-disposition" - }, - "ResponseContentEncoding": { - "location": "querystring", - "locationName": "response-content-encoding" - }, - "ResponseContentLanguage": { - "location": "querystring", - "locationName": "response-content-language" - }, - "ResponseContentType": { - "location": "querystring", - "locationName": "response-content-type" - }, - "ResponseExpires": { - "location": "querystring", - "locationName": "response-expires", - "type": "timestamp" - }, - "VersionId": { - "location": "querystring", - "locationName": "versionId" - }, - "SSECustomerAlgorithm": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-algorithm" - }, - "SSECustomerKey": { - "shape": "S18", - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key" - }, - "SSECustomerKeyMD5": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key-MD5" - }, - "RequestPayer": { - "location": "header", - "locationName": "x-amz-request-payer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Body": { - "streaming": true, - "type": "blob" - }, - "DeleteMarker": { - "location": "header", - "locationName": "x-amz-delete-marker", - "type": "boolean" - }, - "AcceptRanges": { - "location": "header", - "locationName": "accept-ranges" - }, - "Expiration": { - "location": "header", - "locationName": "x-amz-expiration" - }, - "Restore": { - "location": "header", - "locationName": "x-amz-restore" - }, - "LastModified": { - "location": "header", - "locationName": "Last-Modified", - "type": "timestamp" - }, - "ContentLength": { - "location": "header", - "locationName": "Content-Length", - "type": "integer" - }, - "ETag": { - "location": "header", - "locationName": "ETag" - }, - "MissingMeta": { - "location": "header", - "locationName": "x-amz-missing-meta", - "type": "integer" - }, - "VersionId": { - "location": "header", - "locationName": "x-amz-version-id" - }, - "CacheControl": { - "location": "header", - "locationName": "Cache-Control" - }, - "ContentDisposition": { - "location": "header", - "locationName": "Content-Disposition" - }, - "ContentEncoding": { - "location": "header", - "locationName": "Content-Encoding" - }, - "ContentLanguage": { - "location": "header", - "locationName": "Content-Language" - }, - "ContentRange": { - "location": "header", - "locationName": "Content-Range" - }, - "ContentType": { - "location": "header", - "locationName": "Content-Type" - }, - "Expires": { - "location": "header", - "locationName": "Expires", - "type": "timestamp" - }, - "WebsiteRedirectLocation": { - "location": "header", - "locationName": "x-amz-website-redirect-location" - }, - "ServerSideEncryption": { - "location": "header", - "locationName": "x-amz-server-side-encryption" - }, - "Metadata": { - "shape": "S11", - "location": "headers", - "locationName": "x-amz-meta-" - }, - "SSECustomerAlgorithm": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-algorithm" - }, - "SSECustomerKeyMD5": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key-MD5" - }, - "SSEKMSKeyId": { - "shape": "Sj", - "location": "header", - "locationName": "x-amz-server-side-encryption-aws-kms-key-id" - }, - "RequestCharged": { - "location": "header", - "locationName": "x-amz-request-charged" - }, - "ReplicationStatus": { - "location": "header", - "locationName": "x-amz-replication-status" - } - }, - "payload": "Body" - } - }, - "GetObjectAcl": { - "http": { - "method": "GET", - "requestUri": "/{Bucket}/{Key+}?acl" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "Key" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "Key": { - "location": "uri", - "locationName": "Key" - }, - "VersionId": { - "location": "querystring", - "locationName": "versionId" - }, - "RequestPayer": { - "location": "header", - "locationName": "x-amz-request-payer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Owner": { - "shape": "S2f" - }, - "Grants": { - "shape": "S2i", - "locationName": "AccessControlList" - }, - "RequestCharged": { - "location": "header", - "locationName": "x-amz-request-charged" - } - } - } - }, - "GetObjectTorrent": { - "http": { - "method": "GET", - "requestUri": "/{Bucket}/{Key+}?torrent" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "Key" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "Key": { - "location": "uri", - "locationName": "Key" - }, - "RequestPayer": { - "location": "header", - "locationName": "x-amz-request-payer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Body": { - "streaming": true, - "type": "blob" - }, - "RequestCharged": { - "location": "header", - "locationName": "x-amz-request-charged" - } - }, - "payload": "Body" - } - }, - "HeadBucket": { - "http": { - "method": "HEAD", - "requestUri": "/{Bucket}" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - } - } - } - }, - "HeadObject": { - "http": { - "method": "HEAD", - "requestUri": "/{Bucket}/{Key+}" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "Key" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "IfMatch": { - "location": "header", - "locationName": "If-Match" - }, - "IfModifiedSince": { - "location": "header", - "locationName": "If-Modified-Since", - "type": "timestamp" - }, - "IfNoneMatch": { - "location": "header", - "locationName": "If-None-Match" - }, - "IfUnmodifiedSince": { - "location": "header", - "locationName": "If-Unmodified-Since", - "type": "timestamp" - }, - "Key": { - "location": "uri", - "locationName": "Key" - }, - "Range": { - "location": "header", - "locationName": "Range" - }, - "VersionId": { - "location": "querystring", - "locationName": "versionId" - }, - "SSECustomerAlgorithm": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-algorithm" - }, - "SSECustomerKey": { - "shape": "S18", - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key" - }, - "SSECustomerKeyMD5": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key-MD5" - }, - "RequestPayer": { - "location": "header", - "locationName": "x-amz-request-payer" - } - } - }, - "output": { - "type": "structure", - "members": { - "DeleteMarker": { - "location": "header", - "locationName": "x-amz-delete-marker", - "type": "boolean" - }, - "AcceptRanges": { - "location": "header", - "locationName": "accept-ranges" - }, - "Expiration": { - "location": "header", - "locationName": "x-amz-expiration" - }, - "Restore": { - "location": "header", - "locationName": "x-amz-restore" - }, - "LastModified": { - "location": "header", - "locationName": "Last-Modified", - "type": "timestamp" - }, - "ContentLength": { - "location": "header", - "locationName": "Content-Length", - "type": "integer" - }, - "ETag": { - "location": "header", - "locationName": "ETag" - }, - "MissingMeta": { - "location": "header", - "locationName": "x-amz-missing-meta", - "type": "integer" - }, - "VersionId": { - "location": "header", - "locationName": "x-amz-version-id" - }, - "CacheControl": { - "location": "header", - "locationName": "Cache-Control" - }, - "ContentDisposition": { - "location": "header", - "locationName": "Content-Disposition" - }, - "ContentEncoding": { - "location": "header", - "locationName": "Content-Encoding" - }, - "ContentLanguage": { - "location": "header", - "locationName": "Content-Language" - }, - "ContentType": { - "location": "header", - "locationName": "Content-Type" - }, - "Expires": { - "location": "header", - "locationName": "Expires", - "type": "timestamp" - }, - "WebsiteRedirectLocation": { - "location": "header", - "locationName": "x-amz-website-redirect-location" - }, - "ServerSideEncryption": { - "location": "header", - "locationName": "x-amz-server-side-encryption" - }, - "Metadata": { - "shape": "S11", - "location": "headers", - "locationName": "x-amz-meta-" - }, - "SSECustomerAlgorithm": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-algorithm" - }, - "SSECustomerKeyMD5": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key-MD5" - }, - "SSEKMSKeyId": { - "shape": "Sj", - "location": "header", - "locationName": "x-amz-server-side-encryption-aws-kms-key-id" - }, - "RequestCharged": { - "location": "header", - "locationName": "x-amz-request-charged" - }, - "ReplicationStatus": { - "location": "header", - "locationName": "x-amz-replication-status" - } - } - } - }, - "ListBuckets": { - "http": { - "method": "GET" - }, - "output": { - "type": "structure", - "members": { - "Buckets": { - "type": "list", - "member": { - "locationName": "Bucket", - "type": "structure", - "members": { - "Name": {}, - "CreationDate": { - "type": "timestamp" - } - } - } - }, - "Owner": { - "shape": "S2f" - } - } - }, - "alias": "GetService" - }, - "ListMultipartUploads": { - "http": { - "method": "GET", - "requestUri": "/{Bucket}?uploads" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "Delimiter": { - "location": "querystring", - "locationName": "delimiter" - }, - "EncodingType": { - "location": "querystring", - "locationName": "encoding-type" - }, - "KeyMarker": { - "location": "querystring", - "locationName": "key-marker" - }, - "MaxUploads": { - "location": "querystring", - "locationName": "max-uploads", - "type": "integer" - }, - "Prefix": { - "location": "querystring", - "locationName": "prefix" - }, - "UploadIdMarker": { - "location": "querystring", - "locationName": "upload-id-marker" - } - } - }, - "output": { - "type": "structure", - "members": { - "Bucket": {}, - "KeyMarker": {}, - "UploadIdMarker": {}, - "NextKeyMarker": {}, - "Prefix": {}, - "Delimiter": {}, - "NextUploadIdMarker": {}, - "MaxUploads": { - "type": "integer" - }, - "IsTruncated": { - "type": "boolean" - }, - "Uploads": { - "locationName": "Upload", - "type": "list", - "member": { - "type": "structure", - "members": { - "UploadId": {}, - "Key": {}, - "Initiated": { - "type": "timestamp" - }, - "StorageClass": {}, - "Owner": { - "shape": "S2f" - }, - "Initiator": { - "shape": "S6l" - } - } - }, - "flattened": true - }, - "CommonPrefixes": { - "shape": "S6m" - }, - "EncodingType": {} - } - } - }, - "ListObjectVersions": { - "http": { - "method": "GET", - "requestUri": "/{Bucket}?versions" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "Delimiter": { - "location": "querystring", - "locationName": "delimiter" - }, - "EncodingType": { - "location": "querystring", - "locationName": "encoding-type" - }, - "KeyMarker": { - "location": "querystring", - "locationName": "key-marker" - }, - "MaxKeys": { - "location": "querystring", - "locationName": "max-keys", - "type": "integer" - }, - "Prefix": { - "location": "querystring", - "locationName": "prefix" - }, - "VersionIdMarker": { - "location": "querystring", - "locationName": "version-id-marker" - } - } - }, - "output": { - "type": "structure", - "members": { - "IsTruncated": { - "type": "boolean" - }, - "KeyMarker": {}, - "VersionIdMarker": {}, - "NextKeyMarker": {}, - "NextVersionIdMarker": {}, - "Versions": { - "locationName": "Version", - "type": "list", - "member": { - "type": "structure", - "members": { - "ETag": {}, - "Size": { - "type": "integer" - }, - "StorageClass": {}, - "Key": {}, - "VersionId": {}, - "IsLatest": { - "type": "boolean" - }, - "LastModified": { - "type": "timestamp" - }, - "Owner": { - "shape": "S2f" - } - } - }, - "flattened": true - }, - "DeleteMarkers": { - "locationName": "DeleteMarker", - "type": "list", - "member": { - "type": "structure", - "members": { - "Owner": { - "shape": "S2f" - }, - "Key": {}, - "VersionId": {}, - "IsLatest": { - "type": "boolean" - }, - "LastModified": { - "type": "timestamp" - } - } - }, - "flattened": true - }, - "Name": {}, - "Prefix": {}, - "Delimiter": {}, - "MaxKeys": { - "type": "integer" - }, - "CommonPrefixes": { - "shape": "S6m" - }, - "EncodingType": {} - } - }, - "alias": "GetBucketObjectVersions" - }, - "ListObjects": { - "http": { - "method": "GET", - "requestUri": "/{Bucket}" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "Delimiter": { - "location": "querystring", - "locationName": "delimiter" - }, - "EncodingType": { - "location": "querystring", - "locationName": "encoding-type" - }, - "Marker": { - "location": "querystring", - "locationName": "marker" - }, - "MaxKeys": { - "location": "querystring", - "locationName": "max-keys", - "type": "integer" - }, - "Prefix": { - "location": "querystring", - "locationName": "prefix" - } - } - }, - "output": { - "type": "structure", - "members": { - "IsTruncated": { - "type": "boolean" - }, - "Marker": {}, - "NextMarker": {}, - "Contents": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Key": {}, - "LastModified": { - "type": "timestamp" - }, - "ETag": {}, - "Size": { - "type": "integer" - }, - "StorageClass": {}, - "Owner": { - "shape": "S2f" - } - } - }, - "flattened": true - }, - "Name": {}, - "Prefix": {}, - "Delimiter": {}, - "MaxKeys": { - "type": "integer" - }, - "CommonPrefixes": { - "shape": "S6m" - }, - "EncodingType": {} - } - }, - "alias": "GetBucket" - }, - "ListParts": { - "http": { - "method": "GET", - "requestUri": "/{Bucket}/{Key+}" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "Key", - "UploadId" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "Key": { - "location": "uri", - "locationName": "Key" - }, - "MaxParts": { - "location": "querystring", - "locationName": "max-parts", - "type": "integer" - }, - "PartNumberMarker": { - "location": "querystring", - "locationName": "part-number-marker", - "type": "integer" - }, - "UploadId": { - "location": "querystring", - "locationName": "uploadId" - }, - "RequestPayer": { - "location": "header", - "locationName": "x-amz-request-payer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Bucket": {}, - "Key": {}, - "UploadId": {}, - "PartNumberMarker": { - "type": "integer" - }, - "NextPartNumberMarker": { - "type": "integer" - }, - "MaxParts": { - "type": "integer" - }, - "IsTruncated": { - "type": "boolean" - }, - "Parts": { - "locationName": "Part", - "type": "list", - "member": { - "type": "structure", - "members": { - "PartNumber": { - "type": "integer" - }, - "LastModified": { - "type": "timestamp" - }, - "ETag": {}, - "Size": { - "type": "integer" - } - } - }, - "flattened": true - }, - "Initiator": { - "shape": "S6l" - }, - "Owner": { - "shape": "S2f" - }, - "StorageClass": {}, - "RequestCharged": { - "location": "header", - "locationName": "x-amz-request-charged" - } - } - } - }, - "PutBucketAcl": { - "http": { - "method": "PUT", - "requestUri": "/{Bucket}?acl" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "ACL": { - "location": "header", - "locationName": "x-amz-acl" - }, - "AccessControlPolicy": { - "shape": "S7f", - "xmlNamespace": { - "uri": "http://s3.amazonaws.com/doc/2006-03-01/" - }, - "locationName": "AccessControlPolicy" - }, - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "ContentMD5": { - "location": "header", - "locationName": "Content-MD5" - }, - "GrantFullControl": { - "location": "header", - "locationName": "x-amz-grant-full-control" - }, - "GrantRead": { - "location": "header", - "locationName": "x-amz-grant-read" - }, - "GrantReadACP": { - "location": "header", - "locationName": "x-amz-grant-read-acp" - }, - "GrantWrite": { - "location": "header", - "locationName": "x-amz-grant-write" - }, - "GrantWriteACP": { - "location": "header", - "locationName": "x-amz-grant-write-acp" - } - }, - "payload": "AccessControlPolicy" - } - }, - "PutBucketCors": { - "http": { - "method": "PUT", - "requestUri": "/{Bucket}?cors" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "CORSConfiguration": { - "xmlNamespace": { - "uri": "http://s3.amazonaws.com/doc/2006-03-01/" - }, - "locationName": "CORSConfiguration", - "type": "structure", - "members": { - "CORSRules": { - "shape": "S2r", - "locationName": "CORSRule" - } - } - }, - "ContentMD5": { - "location": "header", - "locationName": "Content-MD5" - } - }, - "payload": "CORSConfiguration" - } - }, - "PutBucketLifecycle": { - "http": { - "method": "PUT", - "requestUri": "/{Bucket}?lifecycle" - }, - "input": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "ContentMD5": { - "location": "header", - "locationName": "Content-MD5" - }, - "LifecycleConfiguration": { - "xmlNamespace": { - "uri": "http://s3.amazonaws.com/doc/2006-03-01/" - }, - "locationName": "LifecycleConfiguration", - "type": "structure", - "required": [ - "Rules" - ], - "members": { - "Rules": { - "shape": "S34", - "locationName": "Rule" - } - } - } - }, - "payload": "LifecycleConfiguration" - } - }, - "PutBucketLogging": { - "http": { - "method": "PUT", - "requestUri": "/{Bucket}?logging" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "BucketLoggingStatus" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "BucketLoggingStatus": { - "xmlNamespace": { - "uri": "http://s3.amazonaws.com/doc/2006-03-01/" - }, - "locationName": "BucketLoggingStatus", - "type": "structure", - "members": { - "LoggingEnabled": { - "shape": "S3j" - } - } - }, - "ContentMD5": { - "location": "header", - "locationName": "Content-MD5" - } - }, - "payload": "BucketLoggingStatus" - } - }, - "PutBucketNotification": { - "http": { - "method": "PUT", - "requestUri": "/{Bucket}?notification" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "NotificationConfiguration" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "ContentMD5": { - "location": "header", - "locationName": "Content-MD5" - }, - "NotificationConfiguration": { - "shape": "S3q", - "xmlNamespace": { - "uri": "http://s3.amazonaws.com/doc/2006-03-01/" - }, - "locationName": "NotificationConfiguration" - } - }, - "payload": "NotificationConfiguration" - }, - "deprecated": true - }, - "PutBucketNotificationConfiguration": { - "http": { - "method": "PUT", - "requestUri": "/{Bucket}?notification" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "NotificationConfiguration" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "NotificationConfiguration": { - "shape": "S41", - "xmlNamespace": { - "uri": "http://s3.amazonaws.com/doc/2006-03-01/" - }, - "locationName": "NotificationConfiguration" - } - }, - "payload": "NotificationConfiguration" - } - }, - "PutBucketPolicy": { - "http": { - "method": "PUT", - "requestUri": "/{Bucket}?policy" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "Policy" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "ContentMD5": { - "location": "header", - "locationName": "Content-MD5" - }, - "Policy": {} - }, - "payload": "Policy" - } - }, - "PutBucketReplication": { - "http": { - "method": "PUT", - "requestUri": "/{Bucket}?replication" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "ReplicationConfiguration" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "ContentMD5": { - "location": "header", - "locationName": "Content-MD5" - }, - "ReplicationConfiguration": { - "shape": "S4e", - "xmlNamespace": { - "uri": "http://s3.amazonaws.com/doc/2006-03-01/" - }, - "locationName": "ReplicationConfiguration" - } - }, - "payload": "ReplicationConfiguration" - } - }, - "PutBucketRequestPayment": { - "http": { - "method": "PUT", - "requestUri": "/{Bucket}?requestPayment" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "RequestPaymentConfiguration" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "ContentMD5": { - "location": "header", - "locationName": "Content-MD5" - }, - "RequestPaymentConfiguration": { - "xmlNamespace": { - "uri": "http://s3.amazonaws.com/doc/2006-03-01/" - }, - "locationName": "RequestPaymentConfiguration", - "type": "structure", - "required": [ - "Payer" - ], - "members": { - "Payer": {} - } - } - }, - "payload": "RequestPaymentConfiguration" - } - }, - "PutBucketTagging": { - "http": { - "method": "PUT", - "requestUri": "/{Bucket}?tagging" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "Tagging" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "ContentMD5": { - "location": "header", - "locationName": "Content-MD5" - }, - "Tagging": { - "xmlNamespace": { - "uri": "http://s3.amazonaws.com/doc/2006-03-01/" - }, - "locationName": "Tagging", - "type": "structure", - "required": [ - "TagSet" - ], - "members": { - "TagSet": { - "shape": "S4p" - } - } - } - }, - "payload": "Tagging" - } - }, - "PutBucketVersioning": { - "http": { - "method": "PUT", - "requestUri": "/{Bucket}?versioning" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "VersioningConfiguration" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "ContentMD5": { - "location": "header", - "locationName": "Content-MD5" - }, - "MFA": { - "location": "header", - "locationName": "x-amz-mfa" - }, - "VersioningConfiguration": { - "xmlNamespace": { - "uri": "http://s3.amazonaws.com/doc/2006-03-01/" - }, - "locationName": "VersioningConfiguration", - "type": "structure", - "members": { - "MFADelete": { - "locationName": "MfaDelete" - }, - "Status": {} - } - } - }, - "payload": "VersioningConfiguration" - } - }, - "PutBucketWebsite": { - "http": { - "method": "PUT", - "requestUri": "/{Bucket}?website" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "WebsiteConfiguration" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "ContentMD5": { - "location": "header", - "locationName": "Content-MD5" - }, - "WebsiteConfiguration": { - "xmlNamespace": { - "uri": "http://s3.amazonaws.com/doc/2006-03-01/" - }, - "locationName": "WebsiteConfiguration", - "type": "structure", - "members": { - "ErrorDocument": { - "shape": "S53" - }, - "IndexDocument": { - "shape": "S51" - }, - "RedirectAllRequestsTo": { - "shape": "S4y" - }, - "RoutingRules": { - "shape": "S54" - } - } - } - }, - "payload": "WebsiteConfiguration" - } - }, - "PutObject": { - "http": { - "method": "PUT", - "requestUri": "/{Bucket}/{Key+}" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "Key" - ], - "members": { - "ACL": { - "location": "header", - "locationName": "x-amz-acl" - }, - "Body": { - "streaming": true, - "type": "blob" - }, - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "CacheControl": { - "location": "header", - "locationName": "Cache-Control" - }, - "ContentDisposition": { - "location": "header", - "locationName": "Content-Disposition" - }, - "ContentEncoding": { - "location": "header", - "locationName": "Content-Encoding" - }, - "ContentLanguage": { - "location": "header", - "locationName": "Content-Language" - }, - "ContentLength": { - "location": "header", - "locationName": "Content-Length", - "type": "integer" - }, - "ContentMD5": { - "location": "header", - "locationName": "Content-MD5" - }, - "ContentType": { - "location": "header", - "locationName": "Content-Type" - }, - "Expires": { - "location": "header", - "locationName": "Expires", - "type": "timestamp" - }, - "GrantFullControl": { - "location": "header", - "locationName": "x-amz-grant-full-control" - }, - "GrantRead": { - "location": "header", - "locationName": "x-amz-grant-read" - }, - "GrantReadACP": { - "location": "header", - "locationName": "x-amz-grant-read-acp" - }, - "GrantWriteACP": { - "location": "header", - "locationName": "x-amz-grant-write-acp" - }, - "Key": { - "location": "uri", - "locationName": "Key" - }, - "Metadata": { - "shape": "S11", - "location": "headers", - "locationName": "x-amz-meta-" - }, - "ServerSideEncryption": { - "location": "header", - "locationName": "x-amz-server-side-encryption" - }, - "StorageClass": { - "location": "header", - "locationName": "x-amz-storage-class" - }, - "WebsiteRedirectLocation": { - "location": "header", - "locationName": "x-amz-website-redirect-location" - }, - "SSECustomerAlgorithm": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-algorithm" - }, - "SSECustomerKey": { - "shape": "S18", - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key" - }, - "SSECustomerKeyMD5": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key-MD5" - }, - "SSEKMSKeyId": { - "shape": "Sj", - "location": "header", - "locationName": "x-amz-server-side-encryption-aws-kms-key-id" - }, - "RequestPayer": { - "location": "header", - "locationName": "x-amz-request-payer" - } - }, - "payload": "Body" - }, - "output": { - "type": "structure", - "members": { - "Expiration": { - "location": "header", - "locationName": "x-amz-expiration" - }, - "ETag": { - "location": "header", - "locationName": "ETag" - }, - "ServerSideEncryption": { - "location": "header", - "locationName": "x-amz-server-side-encryption" - }, - "VersionId": { - "location": "header", - "locationName": "x-amz-version-id" - }, - "SSECustomerAlgorithm": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-algorithm" - }, - "SSECustomerKeyMD5": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key-MD5" - }, - "SSEKMSKeyId": { - "shape": "Sj", - "location": "header", - "locationName": "x-amz-server-side-encryption-aws-kms-key-id" - }, - "RequestCharged": { - "location": "header", - "locationName": "x-amz-request-charged" - } - } - } - }, - "PutObjectAcl": { - "http": { - "method": "PUT", - "requestUri": "/{Bucket}/{Key+}?acl" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "Key" - ], - "members": { - "ACL": { - "location": "header", - "locationName": "x-amz-acl" - }, - "AccessControlPolicy": { - "shape": "S7f", - "xmlNamespace": { - "uri": "http://s3.amazonaws.com/doc/2006-03-01/" - }, - "locationName": "AccessControlPolicy" - }, - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "ContentMD5": { - "location": "header", - "locationName": "Content-MD5" - }, - "GrantFullControl": { - "location": "header", - "locationName": "x-amz-grant-full-control" - }, - "GrantRead": { - "location": "header", - "locationName": "x-amz-grant-read" - }, - "GrantReadACP": { - "location": "header", - "locationName": "x-amz-grant-read-acp" - }, - "GrantWrite": { - "location": "header", - "locationName": "x-amz-grant-write" - }, - "GrantWriteACP": { - "location": "header", - "locationName": "x-amz-grant-write-acp" - }, - "Key": { - "location": "uri", - "locationName": "Key" - }, - "RequestPayer": { - "location": "header", - "locationName": "x-amz-request-payer" - } - }, - "payload": "AccessControlPolicy" - }, - "output": { - "type": "structure", - "members": { - "RequestCharged": { - "location": "header", - "locationName": "x-amz-request-charged" - } - } - } - }, - "RestoreObject": { - "http": { - "requestUri": "/{Bucket}/{Key+}?restore" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "Key" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "Key": { - "location": "uri", - "locationName": "Key" - }, - "VersionId": { - "location": "querystring", - "locationName": "versionId" - }, - "RestoreRequest": { - "xmlNamespace": { - "uri": "http://s3.amazonaws.com/doc/2006-03-01/" - }, - "locationName": "RestoreRequest", - "type": "structure", - "required": [ - "Days" - ], - "members": { - "Days": { - "type": "integer" - } - } - }, - "RequestPayer": { - "location": "header", - "locationName": "x-amz-request-payer" - } - }, - "payload": "RestoreRequest" - }, - "output": { - "type": "structure", - "members": { - "RequestCharged": { - "location": "header", - "locationName": "x-amz-request-charged" - } - } - }, - "alias": "PostObjectRestore" - }, - "UploadPart": { - "http": { - "method": "PUT", - "requestUri": "/{Bucket}/{Key+}" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "Key", - "PartNumber", - "UploadId" - ], - "members": { - "Body": { - "streaming": true, - "type": "blob" - }, - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "ContentLength": { - "location": "header", - "locationName": "Content-Length", - "type": "integer" - }, - "ContentMD5": { - "location": "header", - "locationName": "Content-MD5" - }, - "Key": { - "location": "uri", - "locationName": "Key" - }, - "PartNumber": { - "location": "querystring", - "locationName": "partNumber", - "type": "integer" - }, - "UploadId": { - "location": "querystring", - "locationName": "uploadId" - }, - "SSECustomerAlgorithm": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-algorithm" - }, - "SSECustomerKey": { - "shape": "S18", - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key" - }, - "SSECustomerKeyMD5": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key-MD5" - }, - "RequestPayer": { - "location": "header", - "locationName": "x-amz-request-payer" - } - }, - "payload": "Body" - }, - "output": { - "type": "structure", - "members": { - "ServerSideEncryption": { - "location": "header", - "locationName": "x-amz-server-side-encryption" - }, - "ETag": { - "location": "header", - "locationName": "ETag" - }, - "SSECustomerAlgorithm": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-algorithm" - }, - "SSECustomerKeyMD5": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key-MD5" - }, - "SSEKMSKeyId": { - "shape": "Sj", - "location": "header", - "locationName": "x-amz-server-side-encryption-aws-kms-key-id" - }, - "RequestCharged": { - "location": "header", - "locationName": "x-amz-request-charged" - } - } - } - }, - "UploadPartCopy": { - "http": { - "method": "PUT", - "requestUri": "/{Bucket}/{Key+}" - }, - "input": { - "type": "structure", - "required": [ - "Bucket", - "CopySource", - "Key", - "PartNumber", - "UploadId" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - }, - "CopySource": { - "location": "header", - "locationName": "x-amz-copy-source" - }, - "CopySourceIfMatch": { - "location": "header", - "locationName": "x-amz-copy-source-if-match" - }, - "CopySourceIfModifiedSince": { - "location": "header", - "locationName": "x-amz-copy-source-if-modified-since", - "type": "timestamp" - }, - "CopySourceIfNoneMatch": { - "location": "header", - "locationName": "x-amz-copy-source-if-none-match" - }, - "CopySourceIfUnmodifiedSince": { - "location": "header", - "locationName": "x-amz-copy-source-if-unmodified-since", - "type": "timestamp" - }, - "CopySourceRange": { - "location": "header", - "locationName": "x-amz-copy-source-range" - }, - "Key": { - "location": "uri", - "locationName": "Key" - }, - "PartNumber": { - "location": "querystring", - "locationName": "partNumber", - "type": "integer" - }, - "UploadId": { - "location": "querystring", - "locationName": "uploadId" - }, - "SSECustomerAlgorithm": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-algorithm" - }, - "SSECustomerKey": { - "shape": "S18", - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key" - }, - "SSECustomerKeyMD5": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key-MD5" - }, - "CopySourceSSECustomerAlgorithm": { - "location": "header", - "locationName": "x-amz-copy-source-server-side-encryption-customer-algorithm" - }, - "CopySourceSSECustomerKey": { - "shape": "S1b", - "location": "header", - "locationName": "x-amz-copy-source-server-side-encryption-customer-key" - }, - "CopySourceSSECustomerKeyMD5": { - "location": "header", - "locationName": "x-amz-copy-source-server-side-encryption-customer-key-MD5" - }, - "RequestPayer": { - "location": "header", - "locationName": "x-amz-request-payer" - } - } - }, - "output": { - "type": "structure", - "members": { - "CopySourceVersionId": { - "location": "header", - "locationName": "x-amz-copy-source-version-id" - }, - "CopyPartResult": { - "type": "structure", - "members": { - "ETag": {}, - "LastModified": { - "type": "timestamp" - } - } - }, - "ServerSideEncryption": { - "location": "header", - "locationName": "x-amz-server-side-encryption" - }, - "SSECustomerAlgorithm": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-algorithm" - }, - "SSECustomerKeyMD5": { - "location": "header", - "locationName": "x-amz-server-side-encryption-customer-key-MD5" - }, - "SSEKMSKeyId": { - "shape": "Sj", - "location": "header", - "locationName": "x-amz-server-side-encryption-aws-kms-key-id" - }, - "RequestCharged": { - "location": "header", - "locationName": "x-amz-request-charged" - } - }, - "payload": "CopyPartResult" - } - } - }, - "shapes": { - "Sj": { - "type": "string", - "sensitive": true - }, - "S11": { - "type": "map", - "key": {}, - "value": {} - }, - "S18": { - "type": "blob", - "sensitive": true - }, - "S1b": { - "type": "blob", - "sensitive": true - }, - "S2f": { - "type": "structure", - "members": { - "DisplayName": {}, - "ID": {} - } - }, - "S2i": { - "type": "list", - "member": { - "locationName": "Grant", - "type": "structure", - "members": { - "Grantee": { - "shape": "S2k" - }, - "Permission": {} - } - } - }, - "S2k": { - "type": "structure", - "required": [ - "Type" - ], - "members": { - "DisplayName": {}, - "EmailAddress": {}, - "ID": {}, - "Type": { - "xmlAttribute": true, - "locationName": "xsi:type" - }, - "URI": {} - }, - "xmlNamespace": { - "prefix": "xsi", - "uri": "http://www.w3.org/2001/XMLSchema-instance" - } - }, - "S2r": { - "type": "list", - "member": { - "type": "structure", - "members": { - "AllowedHeaders": { - "locationName": "AllowedHeader", - "type": "list", - "member": {}, - "flattened": true - }, - "AllowedMethods": { - "locationName": "AllowedMethod", - "type": "list", - "member": {}, - "flattened": true - }, - "AllowedOrigins": { - "locationName": "AllowedOrigin", - "type": "list", - "member": {}, - "flattened": true - }, - "ExposeHeaders": { - "locationName": "ExposeHeader", - "type": "list", - "member": {}, - "flattened": true - }, - "MaxAgeSeconds": { - "type": "integer" - } - } - }, - "flattened": true - }, - "S34": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "Prefix", - "Status" - ], - "members": { - "Expiration": { - "type": "structure", - "members": { - "Date": { - "shape": "S37" - }, - "Days": { - "type": "integer" - } - } - }, - "ID": {}, - "Prefix": {}, - "Status": {}, - "Transition": { - "type": "structure", - "members": { - "Date": { - "shape": "S37" - }, - "Days": { - "type": "integer" - }, - "StorageClass": {} - } - }, - "NoncurrentVersionTransition": { - "type": "structure", - "members": { - "NoncurrentDays": { - "type": "integer" - }, - "StorageClass": {} - } - }, - "NoncurrentVersionExpiration": { - "type": "structure", - "members": { - "NoncurrentDays": { - "type": "integer" - } - } - } - } - }, - "flattened": true - }, - "S37": { - "type": "timestamp", - "timestampFormat": "iso8601" - }, - "S3j": { - "type": "structure", - "members": { - "TargetBucket": {}, - "TargetGrants": { - "type": "list", - "member": { - "locationName": "Grant", - "type": "structure", - "members": { - "Grantee": { - "shape": "S2k" - }, - "Permission": {} - } - } - }, - "TargetPrefix": {} - } - }, - "S3p": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": { - "location": "uri", - "locationName": "Bucket" - } - } - }, - "S3q": { - "type": "structure", - "members": { - "TopicConfiguration": { - "type": "structure", - "members": { - "Id": {}, - "Events": { - "shape": "S3t", - "locationName": "Event" - }, - "Event": { - "deprecated": true - }, - "Topic": {} - } - }, - "QueueConfiguration": { - "type": "structure", - "members": { - "Id": {}, - "Event": { - "deprecated": true - }, - "Events": { - "shape": "S3t", - "locationName": "Event" - }, - "Queue": {} - } - }, - "CloudFunctionConfiguration": { - "type": "structure", - "members": { - "Id": {}, - "Event": { - "deprecated": true - }, - "Events": { - "shape": "S3t", - "locationName": "Event" - }, - "CloudFunction": {}, - "InvocationRole": {} - } - } - } - }, - "S3t": { - "type": "list", - "member": {}, - "flattened": true - }, - "S41": { - "type": "structure", - "members": { - "TopicConfigurations": { - "locationName": "TopicConfiguration", - "type": "list", - "member": { - "type": "structure", - "required": [ - "TopicArn", - "Events" - ], - "members": { - "Id": {}, - "TopicArn": { - "locationName": "Topic" - }, - "Events": { - "shape": "S3t", - "locationName": "Event" - } - } - }, - "flattened": true - }, - "QueueConfigurations": { - "locationName": "QueueConfiguration", - "type": "list", - "member": { - "type": "structure", - "required": [ - "QueueArn", - "Events" - ], - "members": { - "Id": {}, - "QueueArn": { - "locationName": "Queue" - }, - "Events": { - "shape": "S3t", - "locationName": "Event" - } - } - }, - "flattened": true - }, - "LambdaFunctionConfigurations": { - "locationName": "CloudFunctionConfiguration", - "type": "list", - "member": { - "type": "structure", - "required": [ - "LambdaFunctionArn", - "Events" - ], - "members": { - "Id": {}, - "LambdaFunctionArn": { - "locationName": "CloudFunction" - }, - "Events": { - "shape": "S3t", - "locationName": "Event" - } - } - }, - "flattened": true - } - } - }, - "S4e": { - "type": "structure", - "required": [ - "Role", - "Rules" - ], - "members": { - "Role": {}, - "Rules": { - "locationName": "Rule", - "type": "list", - "member": { - "type": "structure", - "required": [ - "Prefix", - "Status", - "Destination" - ], - "members": { - "ID": {}, - "Prefix": {}, - "Status": {}, - "Destination": { - "type": "structure", - "required": [ - "Bucket" - ], - "members": { - "Bucket": {} - } - } - } - }, - "flattened": true - } - } - }, - "S4p": { - "type": "list", - "member": { - "locationName": "Tag", - "type": "structure", - "required": [ - "Key", - "Value" - ], - "members": { - "Key": {}, - "Value": {} - } - } - }, - "S4y": { - "type": "structure", - "required": [ - "HostName" - ], - "members": { - "HostName": {}, - "Protocol": {} - } - }, - "S51": { - "type": "structure", - "required": [ - "Suffix" - ], - "members": { - "Suffix": {} - } - }, - "S53": { - "type": "structure", - "required": [ - "Key" - ], - "members": { - "Key": {} - } - }, - "S54": { - "type": "list", - "member": { - "locationName": "RoutingRule", - "type": "structure", - "required": [ - "Redirect" - ], - "members": { - "Condition": { - "type": "structure", - "members": { - "HttpErrorCodeReturnedEquals": {}, - "KeyPrefixEquals": {} - } - }, - "Redirect": { - "type": "structure", - "members": { - "HostName": {}, - "HttpRedirectCode": {}, - "Protocol": {}, - "ReplaceKeyPrefixWith": {}, - "ReplaceKeyWith": {} - } - } - } - } - }, - "S6l": { - "type": "structure", - "members": { - "ID": {}, - "DisplayName": {} - } - }, - "S6m": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Prefix": {} - } - }, - "flattened": true - }, - "S7f": { - "type": "structure", - "members": { - "Grants": { - "shape": "S2i", - "locationName": "AccessControlList" - }, - "Owner": { - "shape": "S2f" - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/s3-2006-03-01.paginators.json b/cli/node_modules/aws-sdk/apis/s3-2006-03-01.paginators.json deleted file mode 100644 index d42eee314..000000000 --- a/cli/node_modules/aws-sdk/apis/s3-2006-03-01.paginators.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "pagination": { - "ListBuckets": { - "result_key": "Buckets" - }, - "ListMultipartUploads": { - "limit_key": "MaxUploads", - "more_results": "IsTruncated", - "output_token": [ - "NextKeyMarker", - "NextUploadIdMarker" - ], - "input_token": [ - "KeyMarker", - "UploadIdMarker" - ], - "result_key": [ - "Uploads", - "CommonPrefixes" - ] - }, - "ListObjectVersions": { - "more_results": "IsTruncated", - "limit_key": "MaxKeys", - "output_token": [ - "NextKeyMarker", - "NextVersionIdMarker" - ], - "input_token": [ - "KeyMarker", - "VersionIdMarker" - ], - "result_key": [ - "Versions", - "DeleteMarkers", - "CommonPrefixes" - ] - }, - "ListObjects": { - "more_results": "IsTruncated", - "limit_key": "MaxKeys", - "output_token": "NextMarker || Contents[-1].Key", - "input_token": "Marker", - "result_key": [ - "Contents", - "CommonPrefixes" - ] - }, - "ListParts": { - "more_results": "IsTruncated", - "limit_key": "MaxParts", - "output_token": "NextPartNumberMarker", - "input_token": "PartNumberMarker", - "result_key": "Parts" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/s3-2006-03-01.waiters.json b/cli/node_modules/aws-sdk/apis/s3-2006-03-01.waiters.json deleted file mode 100644 index 963e5bf9e..000000000 --- a/cli/node_modules/aws-sdk/apis/s3-2006-03-01.waiters.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "waiters": { - "__default__": { - "interval": 5, - "max_attempts": 20 - }, - "BucketExists": { - "operation": "HeadBucket", - "ignore_errors": [ - 404 - ], - "success_type": "output" - }, - "BucketNotExists": { - "operation": "HeadBucket", - "success_type": "error", - "success_value": 404 - }, - "ObjectExists": { - "operation": "HeadObject", - "ignore_errors": [ - 404 - ], - "success_type": "output" - }, - "ObjectNotExists": { - "operation": "HeadObject", - "success_type": "error", - "success_value": 404 - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/sdb-2009-04-15.min.json b/cli/node_modules/aws-sdk/apis/sdb-2009-04-15.min.json deleted file mode 100644 index e931b3cf3..000000000 --- a/cli/node_modules/aws-sdk/apis/sdb-2009-04-15.min.json +++ /dev/null @@ -1,336 +0,0 @@ -{ - "metadata": { - "apiVersion": "2009-04-15", - "endpointPrefix": "sdb", - "serviceFullName": "Amazon SimpleDB", - "signatureVersion": "v2", - "xmlNamespace": "http://sdb.amazonaws.com/doc/2009-04-15/", - "protocol": "query" - }, - "operations": { - "BatchDeleteAttributes": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "Items" - ], - "members": { - "DomainName": {}, - "Items": { - "type": "list", - "member": { - "locationName": "Item", - "type": "structure", - "required": [ - "Name" - ], - "members": { - "Name": { - "locationName": "ItemName" - }, - "Attributes": { - "shape": "S5" - } - } - }, - "flattened": true - } - } - } - }, - "BatchPutAttributes": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "Items" - ], - "members": { - "DomainName": {}, - "Items": { - "type": "list", - "member": { - "locationName": "Item", - "type": "structure", - "required": [ - "Name", - "Attributes" - ], - "members": { - "Name": { - "locationName": "ItemName" - }, - "Attributes": { - "shape": "Sa" - } - } - }, - "flattened": true - } - } - } - }, - "CreateDomain": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - } - }, - "DeleteAttributes": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "ItemName" - ], - "members": { - "DomainName": {}, - "ItemName": {}, - "Attributes": { - "shape": "S5" - }, - "Expected": { - "shape": "Sf" - } - } - } - }, - "DeleteDomain": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - } - }, - "DomainMetadata": { - "input": { - "type": "structure", - "required": [ - "DomainName" - ], - "members": { - "DomainName": {} - } - }, - "output": { - "resultWrapper": "DomainMetadataResult", - "type": "structure", - "members": { - "ItemCount": { - "type": "integer" - }, - "ItemNamesSizeBytes": { - "type": "long" - }, - "AttributeNameCount": { - "type": "integer" - }, - "AttributeNamesSizeBytes": { - "type": "long" - }, - "AttributeValueCount": { - "type": "integer" - }, - "AttributeValuesSizeBytes": { - "type": "long" - }, - "Timestamp": { - "type": "integer" - } - } - } - }, - "GetAttributes": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "ItemName" - ], - "members": { - "DomainName": {}, - "ItemName": {}, - "AttributeNames": { - "type": "list", - "member": { - "locationName": "AttributeName" - }, - "flattened": true - }, - "ConsistentRead": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "GetAttributesResult", - "type": "structure", - "members": { - "Attributes": { - "shape": "So" - } - } - } - }, - "ListDomains": { - "input": { - "type": "structure", - "members": { - "MaxNumberOfDomains": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "resultWrapper": "ListDomainsResult", - "type": "structure", - "members": { - "DomainNames": { - "type": "list", - "member": { - "locationName": "DomainName" - }, - "flattened": true - }, - "NextToken": {} - } - } - }, - "PutAttributes": { - "input": { - "type": "structure", - "required": [ - "DomainName", - "ItemName", - "Attributes" - ], - "members": { - "DomainName": {}, - "ItemName": {}, - "Attributes": { - "shape": "Sa" - }, - "Expected": { - "shape": "Sf" - } - } - } - }, - "Select": { - "input": { - "type": "structure", - "required": [ - "SelectExpression" - ], - "members": { - "SelectExpression": {}, - "NextToken": {}, - "ConsistentRead": { - "type": "boolean" - } - } - }, - "output": { - "resultWrapper": "SelectResult", - "type": "structure", - "members": { - "Items": { - "type": "list", - "member": { - "locationName": "Item", - "type": "structure", - "required": [ - "Name", - "Attributes" - ], - "members": { - "Name": {}, - "AlternateNameEncoding": {}, - "Attributes": { - "shape": "So" - } - } - }, - "flattened": true - }, - "NextToken": {} - } - } - } - }, - "shapes": { - "S5": { - "type": "list", - "member": { - "locationName": "Attribute", - "type": "structure", - "required": [ - "Name" - ], - "members": { - "Name": {}, - "Value": {} - } - }, - "flattened": true - }, - "Sa": { - "type": "list", - "member": { - "locationName": "Attribute", - "type": "structure", - "required": [ - "Name", - "Value" - ], - "members": { - "Name": {}, - "Value": {}, - "Replace": { - "type": "boolean" - } - } - }, - "flattened": true - }, - "Sf": { - "type": "structure", - "members": { - "Name": {}, - "Value": {}, - "Exists": { - "type": "boolean" - } - } - }, - "So": { - "type": "list", - "member": { - "locationName": "Attribute", - "type": "structure", - "required": [ - "Name", - "Value" - ], - "members": { - "Name": {}, - "AlternateNameEncoding": {}, - "Value": {}, - "AlternateValueEncoding": {} - } - }, - "flattened": true - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/sdb-2009-04-15.paginators.json b/cli/node_modules/aws-sdk/apis/sdb-2009-04-15.paginators.json deleted file mode 100644 index 236209887..000000000 --- a/cli/node_modules/aws-sdk/apis/sdb-2009-04-15.paginators.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "pagination": { - "ListDomains": { - "input_token": "NextToken", - "output_token": "NextToken", - "limit_key": "MaxNumberOfDomains", - "result_key": "DomainNames" - }, - "Select": { - "input_token": "NextToken", - "output_token": "NextToken", - "result_key": "Items" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/sns-2010-03-31.min.json b/cli/node_modules/aws-sdk/apis/sns-2010-03-31.min.json deleted file mode 100644 index 57b5504f4..000000000 --- a/cli/node_modules/aws-sdk/apis/sns-2010-03-31.min.json +++ /dev/null @@ -1,527 +0,0 @@ -{ - "metadata": { - "apiVersion": "2010-03-31", - "endpointPrefix": "sns", - "serviceAbbreviation": "Amazon SNS", - "serviceFullName": "Amazon Simple Notification Service", - "signatureVersion": "v4", - "xmlNamespace": "http://sns.amazonaws.com/doc/2010-03-31/", - "protocol": "query" - }, - "operations": { - "AddPermission": { - "input": { - "type": "structure", - "required": [ - "TopicArn", - "Label", - "AWSAccountId", - "ActionName" - ], - "members": { - "TopicArn": {}, - "Label": {}, - "AWSAccountId": { - "type": "list", - "member": {} - }, - "ActionName": { - "type": "list", - "member": {} - } - } - } - }, - "ConfirmSubscription": { - "input": { - "type": "structure", - "required": [ - "TopicArn", - "Token" - ], - "members": { - "TopicArn": {}, - "Token": {}, - "AuthenticateOnUnsubscribe": {} - } - }, - "output": { - "resultWrapper": "ConfirmSubscriptionResult", - "type": "structure", - "members": { - "SubscriptionArn": {} - } - } - }, - "CreatePlatformApplication": { - "input": { - "type": "structure", - "required": [ - "Name", - "Platform", - "Attributes" - ], - "members": { - "Name": {}, - "Platform": {}, - "Attributes": { - "shape": "Sf" - } - } - }, - "output": { - "resultWrapper": "CreatePlatformApplicationResult", - "type": "structure", - "members": { - "PlatformApplicationArn": {} - } - } - }, - "CreatePlatformEndpoint": { - "input": { - "type": "structure", - "required": [ - "PlatformApplicationArn", - "Token" - ], - "members": { - "PlatformApplicationArn": {}, - "Token": {}, - "CustomUserData": {}, - "Attributes": { - "shape": "Sf" - } - } - }, - "output": { - "resultWrapper": "CreatePlatformEndpointResult", - "type": "structure", - "members": { - "EndpointArn": {} - } - } - }, - "CreateTopic": { - "input": { - "type": "structure", - "required": [ - "Name" - ], - "members": { - "Name": {} - } - }, - "output": { - "resultWrapper": "CreateTopicResult", - "type": "structure", - "members": { - "TopicArn": {} - } - } - }, - "DeleteEndpoint": { - "input": { - "type": "structure", - "required": [ - "EndpointArn" - ], - "members": { - "EndpointArn": {} - } - } - }, - "DeletePlatformApplication": { - "input": { - "type": "structure", - "required": [ - "PlatformApplicationArn" - ], - "members": { - "PlatformApplicationArn": {} - } - } - }, - "DeleteTopic": { - "input": { - "type": "structure", - "required": [ - "TopicArn" - ], - "members": { - "TopicArn": {} - } - } - }, - "GetEndpointAttributes": { - "input": { - "type": "structure", - "required": [ - "EndpointArn" - ], - "members": { - "EndpointArn": {} - } - }, - "output": { - "resultWrapper": "GetEndpointAttributesResult", - "type": "structure", - "members": { - "Attributes": { - "shape": "Sf" - } - } - } - }, - "GetPlatformApplicationAttributes": { - "input": { - "type": "structure", - "required": [ - "PlatformApplicationArn" - ], - "members": { - "PlatformApplicationArn": {} - } - }, - "output": { - "resultWrapper": "GetPlatformApplicationAttributesResult", - "type": "structure", - "members": { - "Attributes": { - "shape": "Sf" - } - } - } - }, - "GetSubscriptionAttributes": { - "input": { - "type": "structure", - "required": [ - "SubscriptionArn" - ], - "members": { - "SubscriptionArn": {} - } - }, - "output": { - "resultWrapper": "GetSubscriptionAttributesResult", - "type": "structure", - "members": { - "Attributes": { - "type": "map", - "key": {}, - "value": {} - } - } - } - }, - "GetTopicAttributes": { - "input": { - "type": "structure", - "required": [ - "TopicArn" - ], - "members": { - "TopicArn": {} - } - }, - "output": { - "resultWrapper": "GetTopicAttributesResult", - "type": "structure", - "members": { - "Attributes": { - "type": "map", - "key": {}, - "value": {} - } - } - } - }, - "ListEndpointsByPlatformApplication": { - "input": { - "type": "structure", - "required": [ - "PlatformApplicationArn" - ], - "members": { - "PlatformApplicationArn": {}, - "NextToken": {} - } - }, - "output": { - "resultWrapper": "ListEndpointsByPlatformApplicationResult", - "type": "structure", - "members": { - "Endpoints": { - "type": "list", - "member": { - "type": "structure", - "members": { - "EndpointArn": {}, - "Attributes": { - "shape": "Sf" - } - } - } - }, - "NextToken": {} - } - } - }, - "ListPlatformApplications": { - "input": { - "type": "structure", - "members": { - "NextToken": {} - } - }, - "output": { - "resultWrapper": "ListPlatformApplicationsResult", - "type": "structure", - "members": { - "PlatformApplications": { - "type": "list", - "member": { - "type": "structure", - "members": { - "PlatformApplicationArn": {}, - "Attributes": { - "shape": "Sf" - } - } - } - }, - "NextToken": {} - } - } - }, - "ListSubscriptions": { - "input": { - "type": "structure", - "members": { - "NextToken": {} - } - }, - "output": { - "resultWrapper": "ListSubscriptionsResult", - "type": "structure", - "members": { - "Subscriptions": { - "shape": "S1c" - }, - "NextToken": {} - } - } - }, - "ListSubscriptionsByTopic": { - "input": { - "type": "structure", - "required": [ - "TopicArn" - ], - "members": { - "TopicArn": {}, - "NextToken": {} - } - }, - "output": { - "resultWrapper": "ListSubscriptionsByTopicResult", - "type": "structure", - "members": { - "Subscriptions": { - "shape": "S1c" - }, - "NextToken": {} - } - } - }, - "ListTopics": { - "input": { - "type": "structure", - "members": { - "NextToken": {} - } - }, - "output": { - "resultWrapper": "ListTopicsResult", - "type": "structure", - "members": { - "Topics": { - "type": "list", - "member": { - "type": "structure", - "members": { - "TopicArn": {} - } - } - }, - "NextToken": {} - } - } - }, - "Publish": { - "input": { - "type": "structure", - "required": [ - "Message" - ], - "members": { - "TopicArn": {}, - "TargetArn": {}, - "Message": {}, - "Subject": {}, - "MessageStructure": {}, - "MessageAttributes": { - "type": "map", - "key": { - "locationName": "Name" - }, - "value": { - "locationName": "Value", - "type": "structure", - "required": [ - "DataType" - ], - "members": { - "DataType": {}, - "StringValue": {}, - "BinaryValue": { - "type": "blob" - } - } - } - } - } - }, - "output": { - "resultWrapper": "PublishResult", - "type": "structure", - "members": { - "MessageId": {} - } - } - }, - "RemovePermission": { - "input": { - "type": "structure", - "required": [ - "TopicArn", - "Label" - ], - "members": { - "TopicArn": {}, - "Label": {} - } - } - }, - "SetEndpointAttributes": { - "input": { - "type": "structure", - "required": [ - "EndpointArn", - "Attributes" - ], - "members": { - "EndpointArn": {}, - "Attributes": { - "shape": "Sf" - } - } - } - }, - "SetPlatformApplicationAttributes": { - "input": { - "type": "structure", - "required": [ - "PlatformApplicationArn", - "Attributes" - ], - "members": { - "PlatformApplicationArn": {}, - "Attributes": { - "shape": "Sf" - } - } - } - }, - "SetSubscriptionAttributes": { - "input": { - "type": "structure", - "required": [ - "SubscriptionArn", - "AttributeName" - ], - "members": { - "SubscriptionArn": {}, - "AttributeName": {}, - "AttributeValue": {} - } - } - }, - "SetTopicAttributes": { - "input": { - "type": "structure", - "required": [ - "TopicArn", - "AttributeName" - ], - "members": { - "TopicArn": {}, - "AttributeName": {}, - "AttributeValue": {} - } - } - }, - "Subscribe": { - "input": { - "type": "structure", - "required": [ - "TopicArn", - "Protocol" - ], - "members": { - "TopicArn": {}, - "Protocol": {}, - "Endpoint": {} - } - }, - "output": { - "resultWrapper": "SubscribeResult", - "type": "structure", - "members": { - "SubscriptionArn": {} - } - } - }, - "Unsubscribe": { - "input": { - "type": "structure", - "required": [ - "SubscriptionArn" - ], - "members": { - "SubscriptionArn": {} - } - } - } - }, - "shapes": { - "Sf": { - "type": "map", - "key": {}, - "value": {} - }, - "S1c": { - "type": "list", - "member": { - "type": "structure", - "members": { - "SubscriptionArn": {}, - "Owner": {}, - "Protocol": {}, - "Endpoint": {}, - "TopicArn": {} - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/sns-2010-03-31.paginators.json b/cli/node_modules/aws-sdk/apis/sns-2010-03-31.paginators.json deleted file mode 100644 index 455e4708e..000000000 --- a/cli/node_modules/aws-sdk/apis/sns-2010-03-31.paginators.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "pagination": { - "ListEndpointsByPlatformApplication": { - "input_token": "NextToken", - "output_token": "NextToken", - "result_key": "Endpoints" - }, - "ListPlatformApplications": { - "input_token": "NextToken", - "output_token": "NextToken", - "result_key": "PlatformApplications" - }, - "ListSubscriptions": { - "input_token": "NextToken", - "output_token": "NextToken", - "result_key": "Subscriptions" - }, - "ListSubscriptionsByTopic": { - "input_token": "NextToken", - "output_token": "NextToken", - "result_key": "Subscriptions" - }, - "ListTopics": { - "input_token": "NextToken", - "output_token": "NextToken", - "result_key": "Topics" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/sqs-2012-11-05.min.json b/cli/node_modules/aws-sdk/apis/sqs-2012-11-05.min.json deleted file mode 100644 index b2f9006da..000000000 --- a/cli/node_modules/aws-sdk/apis/sqs-2012-11-05.min.json +++ /dev/null @@ -1,582 +0,0 @@ -{ - "metadata": { - "apiVersion": "2012-11-05", - "endpointPrefix": "sqs", - "serviceAbbreviation": "Amazon SQS", - "serviceFullName": "Amazon Simple Queue Service", - "signatureVersion": "v4", - "xmlNamespace": "http://queue.amazonaws.com/doc/2012-11-05/", - "protocol": "query" - }, - "operations": { - "AddPermission": { - "input": { - "type": "structure", - "required": [ - "QueueUrl", - "Label", - "AWSAccountIds", - "Actions" - ], - "members": { - "QueueUrl": {}, - "Label": {}, - "AWSAccountIds": { - "type": "list", - "member": { - "locationName": "AWSAccountId" - }, - "flattened": true - }, - "Actions": { - "type": "list", - "member": { - "locationName": "ActionName" - }, - "flattened": true - } - } - } - }, - "ChangeMessageVisibility": { - "input": { - "type": "structure", - "required": [ - "QueueUrl", - "ReceiptHandle", - "VisibilityTimeout" - ], - "members": { - "QueueUrl": {}, - "ReceiptHandle": {}, - "VisibilityTimeout": { - "type": "integer" - } - } - } - }, - "ChangeMessageVisibilityBatch": { - "input": { - "type": "structure", - "required": [ - "QueueUrl", - "Entries" - ], - "members": { - "QueueUrl": {}, - "Entries": { - "type": "list", - "member": { - "locationName": "ChangeMessageVisibilityBatchRequestEntry", - "type": "structure", - "required": [ - "Id", - "ReceiptHandle" - ], - "members": { - "Id": {}, - "ReceiptHandle": {}, - "VisibilityTimeout": { - "type": "integer" - } - } - }, - "flattened": true - } - } - }, - "output": { - "resultWrapper": "ChangeMessageVisibilityBatchResult", - "type": "structure", - "required": [ - "Successful", - "Failed" - ], - "members": { - "Successful": { - "type": "list", - "member": { - "locationName": "ChangeMessageVisibilityBatchResultEntry", - "type": "structure", - "required": [ - "Id" - ], - "members": { - "Id": {} - } - }, - "flattened": true - }, - "Failed": { - "shape": "Sd" - } - } - } - }, - "CreateQueue": { - "input": { - "type": "structure", - "required": [ - "QueueName" - ], - "members": { - "QueueName": {}, - "Attributes": { - "shape": "Sh", - "locationName": "Attribute" - } - } - }, - "output": { - "resultWrapper": "CreateQueueResult", - "type": "structure", - "members": { - "QueueUrl": {} - } - } - }, - "DeleteMessage": { - "input": { - "type": "structure", - "required": [ - "QueueUrl", - "ReceiptHandle" - ], - "members": { - "QueueUrl": {}, - "ReceiptHandle": {} - } - } - }, - "DeleteMessageBatch": { - "input": { - "type": "structure", - "required": [ - "QueueUrl", - "Entries" - ], - "members": { - "QueueUrl": {}, - "Entries": { - "type": "list", - "member": { - "locationName": "DeleteMessageBatchRequestEntry", - "type": "structure", - "required": [ - "Id", - "ReceiptHandle" - ], - "members": { - "Id": {}, - "ReceiptHandle": {} - } - }, - "flattened": true - } - } - }, - "output": { - "resultWrapper": "DeleteMessageBatchResult", - "type": "structure", - "required": [ - "Successful", - "Failed" - ], - "members": { - "Successful": { - "type": "list", - "member": { - "locationName": "DeleteMessageBatchResultEntry", - "type": "structure", - "required": [ - "Id" - ], - "members": { - "Id": {} - } - }, - "flattened": true - }, - "Failed": { - "shape": "Sd" - } - } - } - }, - "DeleteQueue": { - "input": { - "type": "structure", - "required": [ - "QueueUrl" - ], - "members": { - "QueueUrl": {} - } - } - }, - "GetQueueAttributes": { - "input": { - "type": "structure", - "required": [ - "QueueUrl" - ], - "members": { - "QueueUrl": {}, - "AttributeNames": { - "shape": "St" - } - } - }, - "output": { - "resultWrapper": "GetQueueAttributesResult", - "type": "structure", - "members": { - "Attributes": { - "shape": "Sh", - "locationName": "Attribute" - } - } - } - }, - "GetQueueUrl": { - "input": { - "type": "structure", - "required": [ - "QueueName" - ], - "members": { - "QueueName": {}, - "QueueOwnerAWSAccountId": {} - } - }, - "output": { - "resultWrapper": "GetQueueUrlResult", - "type": "structure", - "members": { - "QueueUrl": {} - } - } - }, - "ListDeadLetterSourceQueues": { - "input": { - "type": "structure", - "required": [ - "QueueUrl" - ], - "members": { - "QueueUrl": {} - } - }, - "output": { - "resultWrapper": "ListDeadLetterSourceQueuesResult", - "type": "structure", - "required": [ - "queueUrls" - ], - "members": { - "queueUrls": { - "shape": "Sz" - } - } - } - }, - "ListQueues": { - "input": { - "type": "structure", - "members": { - "QueueNamePrefix": {} - } - }, - "output": { - "resultWrapper": "ListQueuesResult", - "type": "structure", - "members": { - "QueueUrls": { - "shape": "Sz" - } - } - } - }, - "PurgeQueue": { - "input": { - "type": "structure", - "required": [ - "QueueUrl" - ], - "members": { - "QueueUrl": {} - } - } - }, - "ReceiveMessage": { - "input": { - "type": "structure", - "required": [ - "QueueUrl" - ], - "members": { - "QueueUrl": {}, - "AttributeNames": { - "shape": "St" - }, - "MessageAttributeNames": { - "type": "list", - "member": { - "locationName": "MessageAttributeName" - }, - "flattened": true - }, - "MaxNumberOfMessages": { - "type": "integer" - }, - "VisibilityTimeout": { - "type": "integer" - }, - "WaitTimeSeconds": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "ReceiveMessageResult", - "type": "structure", - "members": { - "Messages": { - "type": "list", - "member": { - "locationName": "Message", - "type": "structure", - "members": { - "MessageId": {}, - "ReceiptHandle": {}, - "MD5OfBody": {}, - "Body": {}, - "Attributes": { - "shape": "Sh", - "locationName": "Attribute" - }, - "MD5OfMessageAttributes": {}, - "MessageAttributes": { - "shape": "S19", - "locationName": "MessageAttribute" - } - } - }, - "flattened": true - } - } - } - }, - "RemovePermission": { - "input": { - "type": "structure", - "required": [ - "QueueUrl", - "Label" - ], - "members": { - "QueueUrl": {}, - "Label": {} - } - } - }, - "SendMessage": { - "input": { - "type": "structure", - "required": [ - "QueueUrl", - "MessageBody" - ], - "members": { - "QueueUrl": {}, - "MessageBody": {}, - "DelaySeconds": { - "type": "integer" - }, - "MessageAttributes": { - "shape": "S19", - "locationName": "MessageAttribute" - } - } - }, - "output": { - "resultWrapper": "SendMessageResult", - "type": "structure", - "members": { - "MD5OfMessageBody": {}, - "MD5OfMessageAttributes": {}, - "MessageId": {} - } - } - }, - "SendMessageBatch": { - "input": { - "type": "structure", - "required": [ - "QueueUrl", - "Entries" - ], - "members": { - "QueueUrl": {}, - "Entries": { - "type": "list", - "member": { - "locationName": "SendMessageBatchRequestEntry", - "type": "structure", - "required": [ - "Id", - "MessageBody" - ], - "members": { - "Id": {}, - "MessageBody": {}, - "DelaySeconds": { - "type": "integer" - }, - "MessageAttributes": { - "shape": "S19", - "locationName": "MessageAttribute" - } - } - }, - "flattened": true - } - } - }, - "output": { - "resultWrapper": "SendMessageBatchResult", - "type": "structure", - "required": [ - "Successful", - "Failed" - ], - "members": { - "Successful": { - "type": "list", - "member": { - "locationName": "SendMessageBatchResultEntry", - "type": "structure", - "required": [ - "Id", - "MessageId", - "MD5OfMessageBody" - ], - "members": { - "Id": {}, - "MessageId": {}, - "MD5OfMessageBody": {}, - "MD5OfMessageAttributes": {} - } - }, - "flattened": true - }, - "Failed": { - "shape": "Sd" - } - } - } - }, - "SetQueueAttributes": { - "input": { - "type": "structure", - "required": [ - "QueueUrl", - "Attributes" - ], - "members": { - "QueueUrl": {}, - "Attributes": { - "shape": "Sh", - "locationName": "Attribute" - } - } - } - } - }, - "shapes": { - "Sd": { - "type": "list", - "member": { - "locationName": "BatchResultErrorEntry", - "type": "structure", - "required": [ - "Id", - "SenderFault", - "Code" - ], - "members": { - "Id": {}, - "SenderFault": { - "type": "boolean" - }, - "Code": {}, - "Message": {} - } - }, - "flattened": true - }, - "Sh": { - "type": "map", - "key": { - "locationName": "Name" - }, - "value": { - "locationName": "Value" - }, - "flattened": true, - "locationName": "Attribute" - }, - "St": { - "type": "list", - "member": { - "locationName": "AttributeName" - }, - "flattened": true - }, - "Sz": { - "type": "list", - "member": { - "locationName": "QueueUrl" - }, - "flattened": true - }, - "S19": { - "type": "map", - "key": { - "locationName": "Name" - }, - "value": { - "locationName": "Value", - "type": "structure", - "required": [ - "DataType" - ], - "members": { - "StringValue": {}, - "BinaryValue": { - "type": "blob" - }, - "StringListValues": { - "flattened": true, - "locationName": "StringListValue", - "type": "list", - "member": { - "locationName": "StringListValue" - } - }, - "BinaryListValues": { - "flattened": true, - "locationName": "BinaryListValue", - "type": "list", - "member": { - "locationName": "BinaryListValue", - "type": "blob" - } - }, - "DataType": {} - } - }, - "flattened": true - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/sqs-2012-11-05.paginators.json b/cli/node_modules/aws-sdk/apis/sqs-2012-11-05.paginators.json deleted file mode 100644 index e7ac48a9f..000000000 --- a/cli/node_modules/aws-sdk/apis/sqs-2012-11-05.paginators.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "pagination": { - "ListQueues": { - "result_key": "QueueUrls" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/ssm-2014-11-06.min.json b/cli/node_modules/aws-sdk/apis/ssm-2014-11-06.min.json deleted file mode 100644 index cf9f7e09e..000000000 --- a/cli/node_modules/aws-sdk/apis/ssm-2014-11-06.min.json +++ /dev/null @@ -1,352 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2014-11-06", - "endpointPrefix": "ssm", - "jsonVersion": "1.1", - "serviceAbbreviation": "Amazon SSM", - "serviceFullName": "Amazon Simple Systems Management Service", - "signatureVersion": "v4", - "targetPrefix": "AmazonSSM", - "protocol": "json" - }, - "operations": { - "CreateAssociation": { - "input": { - "type": "structure", - "required": [ - "Name", - "InstanceId" - ], - "members": { - "Name": {}, - "InstanceId": {} - } - }, - "output": { - "type": "structure", - "members": { - "AssociationDescription": { - "shape": "S5" - } - } - } - }, - "CreateAssociationBatch": { - "input": { - "type": "structure", - "required": [ - "Entries" - ], - "members": { - "Entries": { - "type": "list", - "member": { - "shape": "Sd", - "locationName": "entries" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "Successful": { - "type": "list", - "member": { - "shape": "S5", - "locationName": "AssociationDescription" - } - }, - "Failed": { - "type": "list", - "member": { - "locationName": "FailedCreateAssociationEntry", - "type": "structure", - "members": { - "Entry": { - "shape": "Sd" - }, - "Message": {}, - "Fault": {} - } - } - } - } - } - }, - "CreateDocument": { - "input": { - "type": "structure", - "required": [ - "Content", - "Name" - ], - "members": { - "Content": {}, - "Name": {} - } - }, - "output": { - "type": "structure", - "members": { - "DocumentDescription": { - "shape": "Sn" - } - } - } - }, - "DeleteAssociation": { - "input": { - "type": "structure", - "required": [ - "Name", - "InstanceId" - ], - "members": { - "Name": {}, - "InstanceId": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "DeleteDocument": { - "input": { - "type": "structure", - "required": [ - "Name" - ], - "members": { - "Name": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "DescribeAssociation": { - "input": { - "type": "structure", - "required": [ - "Name", - "InstanceId" - ], - "members": { - "Name": {}, - "InstanceId": {} - } - }, - "output": { - "type": "structure", - "members": { - "AssociationDescription": { - "shape": "S5" - } - } - } - }, - "DescribeDocument": { - "input": { - "type": "structure", - "required": [ - "Name" - ], - "members": { - "Name": {} - } - }, - "output": { - "type": "structure", - "members": { - "Document": { - "shape": "Sn" - } - } - } - }, - "GetDocument": { - "input": { - "type": "structure", - "required": [ - "Name" - ], - "members": { - "Name": {} - } - }, - "output": { - "type": "structure", - "members": { - "Name": {}, - "Content": {} - } - } - }, - "ListAssociations": { - "input": { - "type": "structure", - "required": [ - "AssociationFilterList" - ], - "members": { - "AssociationFilterList": { - "type": "list", - "member": { - "locationName": "AssociationFilter", - "type": "structure", - "required": [ - "key", - "value" - ], - "members": { - "key": {}, - "value": {} - } - } - }, - "MaxResults": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "Associations": { - "type": "list", - "member": { - "locationName": "Association", - "type": "structure", - "members": { - "Name": {}, - "InstanceId": {} - } - } - }, - "NextToken": {} - } - } - }, - "ListDocuments": { - "input": { - "type": "structure", - "members": { - "DocumentFilterList": { - "type": "list", - "member": { - "locationName": "DocumentFilter", - "type": "structure", - "required": [ - "key", - "value" - ], - "members": { - "key": {}, - "value": {} - } - } - }, - "MaxResults": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "DocumentIdentifiers": { - "type": "list", - "member": { - "locationName": "DocumentIdentifier", - "type": "structure", - "members": { - "Name": {} - } - } - }, - "NextToken": {} - } - } - }, - "UpdateAssociationStatus": { - "input": { - "type": "structure", - "required": [ - "Name", - "InstanceId", - "AssociationStatus" - ], - "members": { - "Name": {}, - "InstanceId": {}, - "AssociationStatus": { - "shape": "S7" - } - } - }, - "output": { - "type": "structure", - "members": { - "AssociationDescription": { - "shape": "S5" - } - } - } - } - }, - "shapes": { - "S5": { - "type": "structure", - "members": { - "Name": {}, - "InstanceId": {}, - "Date": { - "type": "timestamp" - }, - "Status": { - "shape": "S7" - } - } - }, - "S7": { - "type": "structure", - "required": [ - "Date", - "Name", - "Message" - ], - "members": { - "Date": { - "type": "timestamp" - }, - "Name": {}, - "Message": {}, - "AdditionalInfo": {} - } - }, - "Sd": { - "type": "structure", - "members": { - "Name": {}, - "InstanceId": {} - } - }, - "Sn": { - "type": "structure", - "members": { - "Sha1": {}, - "Name": {}, - "CreatedDate": { - "type": "timestamp" - }, - "Status": {} - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/storagegateway-2013-06-30.min.json b/cli/node_modules/aws-sdk/apis/storagegateway-2013-06-30.min.json deleted file mode 100644 index 2aab541f9..000000000 --- a/cli/node_modules/aws-sdk/apis/storagegateway-2013-06-30.min.json +++ /dev/null @@ -1,1316 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2013-06-30", - "endpointPrefix": "storagegateway", - "jsonVersion": "1.1", - "serviceFullName": "AWS Storage Gateway", - "signatureVersion": "v4", - "targetPrefix": "StorageGateway_20130630", - "protocol": "json" - }, - "operations": { - "ActivateGateway": { - "input": { - "type": "structure", - "required": [ - "ActivationKey", - "GatewayName", - "GatewayTimezone", - "GatewayRegion" - ], - "members": { - "ActivationKey": {}, - "GatewayName": {}, - "GatewayTimezone": {}, - "GatewayRegion": {}, - "GatewayType": {}, - "TapeDriveType": {}, - "MediumChangerType": {} - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "AddCache": { - "input": { - "type": "structure", - "required": [ - "GatewayARN", - "DiskIds" - ], - "members": { - "GatewayARN": {}, - "DiskIds": { - "shape": "Sc" - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "AddUploadBuffer": { - "input": { - "type": "structure", - "required": [ - "GatewayARN", - "DiskIds" - ], - "members": { - "GatewayARN": {}, - "DiskIds": { - "shape": "Sc" - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "AddWorkingStorage": { - "input": { - "type": "structure", - "required": [ - "GatewayARN", - "DiskIds" - ], - "members": { - "GatewayARN": {}, - "DiskIds": { - "shape": "Sc" - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "CancelArchival": { - "input": { - "type": "structure", - "required": [ - "GatewayARN", - "TapeARN" - ], - "members": { - "GatewayARN": {}, - "TapeARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "TapeARN": {} - } - } - }, - "CancelRetrieval": { - "input": { - "type": "structure", - "required": [ - "GatewayARN", - "TapeARN" - ], - "members": { - "GatewayARN": {}, - "TapeARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "TapeARN": {} - } - } - }, - "CreateCachediSCSIVolume": { - "input": { - "type": "structure", - "required": [ - "GatewayARN", - "VolumeSizeInBytes", - "TargetName", - "NetworkInterfaceId", - "ClientToken" - ], - "members": { - "GatewayARN": {}, - "VolumeSizeInBytes": { - "type": "long" - }, - "SnapshotId": {}, - "TargetName": {}, - "NetworkInterfaceId": {}, - "ClientToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "VolumeARN": {}, - "TargetARN": {} - } - } - }, - "CreateSnapshot": { - "input": { - "type": "structure", - "required": [ - "VolumeARN", - "SnapshotDescription" - ], - "members": { - "VolumeARN": {}, - "SnapshotDescription": {} - } - }, - "output": { - "type": "structure", - "members": { - "VolumeARN": {}, - "SnapshotId": {} - } - } - }, - "CreateSnapshotFromVolumeRecoveryPoint": { - "input": { - "type": "structure", - "required": [ - "VolumeARN", - "SnapshotDescription" - ], - "members": { - "VolumeARN": {}, - "SnapshotDescription": {} - } - }, - "output": { - "type": "structure", - "members": { - "SnapshotId": {}, - "VolumeARN": {}, - "VolumeRecoveryPointTime": {} - } - } - }, - "CreateStorediSCSIVolume": { - "input": { - "type": "structure", - "required": [ - "GatewayARN", - "DiskId", - "PreserveExistingData", - "TargetName", - "NetworkInterfaceId" - ], - "members": { - "GatewayARN": {}, - "DiskId": {}, - "SnapshotId": {}, - "PreserveExistingData": { - "type": "boolean" - }, - "TargetName": {}, - "NetworkInterfaceId": {} - } - }, - "output": { - "type": "structure", - "members": { - "VolumeARN": {}, - "VolumeSizeInBytes": { - "type": "long" - }, - "TargetARN": {} - } - } - }, - "CreateTapes": { - "input": { - "type": "structure", - "required": [ - "GatewayARN", - "TapeSizeInBytes", - "ClientToken", - "NumTapesToCreate", - "TapeBarcodePrefix" - ], - "members": { - "GatewayARN": {}, - "TapeSizeInBytes": { - "type": "long" - }, - "ClientToken": {}, - "NumTapesToCreate": { - "type": "integer" - }, - "TapeBarcodePrefix": {} - } - }, - "output": { - "type": "structure", - "members": { - "TapeARNs": { - "shape": "S1b" - } - } - } - }, - "DeleteBandwidthRateLimit": { - "input": { - "type": "structure", - "required": [ - "GatewayARN", - "BandwidthType" - ], - "members": { - "GatewayARN": {}, - "BandwidthType": {} - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "DeleteChapCredentials": { - "input": { - "type": "structure", - "required": [ - "TargetARN", - "InitiatorName" - ], - "members": { - "TargetARN": {}, - "InitiatorName": {} - } - }, - "output": { - "type": "structure", - "members": { - "TargetARN": {}, - "InitiatorName": {} - } - } - }, - "DeleteGateway": { - "input": { - "type": "structure", - "required": [ - "GatewayARN" - ], - "members": { - "GatewayARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "DeleteSnapshotSchedule": { - "input": { - "type": "structure", - "required": [ - "VolumeARN" - ], - "members": { - "VolumeARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "VolumeARN": {} - } - } - }, - "DeleteTape": { - "input": { - "type": "structure", - "required": [ - "GatewayARN", - "TapeARN" - ], - "members": { - "GatewayARN": {}, - "TapeARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "TapeARN": {} - } - } - }, - "DeleteTapeArchive": { - "input": { - "type": "structure", - "required": [ - "TapeARN" - ], - "members": { - "TapeARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "TapeARN": {} - } - } - }, - "DeleteVolume": { - "input": { - "type": "structure", - "required": [ - "VolumeARN" - ], - "members": { - "VolumeARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "VolumeARN": {} - } - } - }, - "DescribeBandwidthRateLimit": { - "input": { - "type": "structure", - "required": [ - "GatewayARN" - ], - "members": { - "GatewayARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "AverageUploadRateLimitInBitsPerSec": { - "type": "long" - }, - "AverageDownloadRateLimitInBitsPerSec": { - "type": "long" - } - } - } - }, - "DescribeCache": { - "input": { - "type": "structure", - "required": [ - "GatewayARN" - ], - "members": { - "GatewayARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "DiskIds": { - "shape": "Sc" - }, - "CacheAllocatedInBytes": { - "type": "long" - }, - "CacheUsedPercentage": { - "type": "double" - }, - "CacheDirtyPercentage": { - "type": "double" - }, - "CacheHitPercentage": { - "type": "double" - }, - "CacheMissPercentage": { - "type": "double" - } - } - } - }, - "DescribeCachediSCSIVolumes": { - "input": { - "type": "structure", - "required": [ - "VolumeARNs" - ], - "members": { - "VolumeARNs": { - "shape": "S20" - } - } - }, - "output": { - "type": "structure", - "members": { - "CachediSCSIVolumes": { - "type": "list", - "member": { - "type": "structure", - "members": { - "VolumeARN": {}, - "VolumeId": {}, - "VolumeType": {}, - "VolumeStatus": {}, - "VolumeSizeInBytes": { - "type": "long" - }, - "VolumeProgress": { - "type": "double" - }, - "SourceSnapshotId": {}, - "VolumeiSCSIAttributes": { - "shape": "S28" - } - } - } - } - } - } - }, - "DescribeChapCredentials": { - "input": { - "type": "structure", - "required": [ - "TargetARN" - ], - "members": { - "TargetARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "ChapCredentials": { - "type": "list", - "member": { - "type": "structure", - "members": { - "TargetARN": {}, - "SecretToAuthenticateInitiator": {}, - "InitiatorName": {}, - "SecretToAuthenticateTarget": {} - } - } - } - } - } - }, - "DescribeGatewayInformation": { - "input": { - "type": "structure", - "required": [ - "GatewayARN" - ], - "members": { - "GatewayARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "GatewayId": {}, - "GatewayTimezone": {}, - "GatewayState": {}, - "GatewayNetworkInterfaces": { - "type": "list", - "member": { - "type": "structure", - "members": { - "Ipv4Address": {}, - "MacAddress": {}, - "Ipv6Address": {} - } - } - }, - "GatewayType": {}, - "NextUpdateAvailabilityDate": {}, - "LastSoftwareUpdate": {} - } - } - }, - "DescribeMaintenanceStartTime": { - "input": { - "type": "structure", - "required": [ - "GatewayARN" - ], - "members": { - "GatewayARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "HourOfDay": { - "type": "integer" - }, - "MinuteOfHour": { - "type": "integer" - }, - "DayOfWeek": { - "type": "integer" - }, - "Timezone": {} - } - } - }, - "DescribeSnapshotSchedule": { - "input": { - "type": "structure", - "required": [ - "VolumeARN" - ], - "members": { - "VolumeARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "VolumeARN": {}, - "StartAt": { - "type": "integer" - }, - "RecurrenceInHours": { - "type": "integer" - }, - "Description": {}, - "Timezone": {} - } - } - }, - "DescribeStorediSCSIVolumes": { - "input": { - "type": "structure", - "required": [ - "VolumeARNs" - ], - "members": { - "VolumeARNs": { - "shape": "S20" - } - } - }, - "output": { - "type": "structure", - "members": { - "StorediSCSIVolumes": { - "type": "list", - "member": { - "type": "structure", - "members": { - "VolumeARN": {}, - "VolumeId": {}, - "VolumeType": {}, - "VolumeStatus": {}, - "VolumeSizeInBytes": { - "type": "long" - }, - "VolumeProgress": { - "type": "double" - }, - "VolumeDiskId": {}, - "SourceSnapshotId": {}, - "PreservedExistingData": { - "type": "boolean" - }, - "VolumeiSCSIAttributes": { - "shape": "S28" - } - } - } - } - } - } - }, - "DescribeTapeArchives": { - "input": { - "type": "structure", - "members": { - "TapeARNs": { - "shape": "S1b" - }, - "Marker": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "TapeArchives": { - "type": "list", - "member": { - "type": "structure", - "members": { - "TapeARN": {}, - "TapeBarcode": {}, - "TapeSizeInBytes": { - "type": "long" - }, - "CompletionTime": { - "type": "timestamp" - }, - "RetrievedTo": {}, - "TapeStatus": {} - } - } - }, - "Marker": {} - } - } - }, - "DescribeTapeRecoveryPoints": { - "input": { - "type": "structure", - "required": [ - "GatewayARN" - ], - "members": { - "GatewayARN": {}, - "Marker": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "TapeRecoveryPointInfos": { - "type": "list", - "member": { - "type": "structure", - "members": { - "TapeARN": {}, - "TapeRecoveryPointTime": { - "type": "timestamp" - }, - "TapeSizeInBytes": { - "type": "long" - }, - "TapeStatus": {} - } - } - }, - "Marker": {} - } - } - }, - "DescribeTapes": { - "input": { - "type": "structure", - "required": [ - "GatewayARN" - ], - "members": { - "GatewayARN": {}, - "TapeARNs": { - "shape": "S1b" - }, - "Marker": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Tapes": { - "type": "list", - "member": { - "type": "structure", - "members": { - "TapeARN": {}, - "TapeBarcode": {}, - "TapeSizeInBytes": { - "type": "long" - }, - "TapeStatus": {}, - "VTLDevice": {}, - "Progress": { - "type": "double" - } - } - } - }, - "Marker": {} - } - } - }, - "DescribeUploadBuffer": { - "input": { - "type": "structure", - "required": [ - "GatewayARN" - ], - "members": { - "GatewayARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "DiskIds": { - "shape": "Sc" - }, - "UploadBufferUsedInBytes": { - "type": "long" - }, - "UploadBufferAllocatedInBytes": { - "type": "long" - } - } - } - }, - "DescribeVTLDevices": { - "input": { - "type": "structure", - "required": [ - "GatewayARN" - ], - "members": { - "GatewayARN": {}, - "VTLDeviceARNs": { - "type": "list", - "member": {} - }, - "Marker": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "VTLDevices": { - "type": "list", - "member": { - "type": "structure", - "members": { - "VTLDeviceARN": {}, - "VTLDeviceType": {}, - "VTLDeviceVendor": {}, - "VTLDeviceProductIdentifier": {}, - "DeviceiSCSIAttributes": { - "type": "structure", - "members": { - "TargetARN": {}, - "NetworkInterfaceId": {}, - "NetworkInterfacePort": { - "type": "integer" - }, - "ChapEnabled": { - "type": "boolean" - } - } - } - } - } - }, - "Marker": {} - } - } - }, - "DescribeWorkingStorage": { - "input": { - "type": "structure", - "required": [ - "GatewayARN" - ], - "members": { - "GatewayARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "DiskIds": { - "shape": "Sc" - }, - "WorkingStorageUsedInBytes": { - "type": "long" - }, - "WorkingStorageAllocatedInBytes": { - "type": "long" - } - } - } - }, - "DisableGateway": { - "input": { - "type": "structure", - "required": [ - "GatewayARN" - ], - "members": { - "GatewayARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "ListGateways": { - "input": { - "type": "structure", - "members": { - "Marker": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Gateways": { - "type": "list", - "member": { - "type": "structure", - "members": { - "GatewayARN": {}, - "GatewayType": {}, - "GatewayOperationalState": {} - } - } - }, - "Marker": {} - } - } - }, - "ListLocalDisks": { - "input": { - "type": "structure", - "required": [ - "GatewayARN" - ], - "members": { - "GatewayARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "Disks": { - "type": "list", - "member": { - "type": "structure", - "members": { - "DiskId": {}, - "DiskPath": {}, - "DiskNode": {}, - "DiskStatus": {}, - "DiskSizeInBytes": { - "type": "long" - }, - "DiskAllocationType": {}, - "DiskAllocationResource": {} - } - } - } - } - } - }, - "ListVolumeInitiators": { - "input": { - "type": "structure", - "required": [ - "VolumeARN" - ], - "members": { - "VolumeARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "Initiators": { - "type": "list", - "member": {} - } - } - } - }, - "ListVolumeRecoveryPoints": { - "input": { - "type": "structure", - "required": [ - "GatewayARN" - ], - "members": { - "GatewayARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "VolumeRecoveryPointInfos": { - "type": "list", - "member": { - "type": "structure", - "members": { - "VolumeARN": {}, - "VolumeSizeInBytes": { - "type": "long" - }, - "VolumeUsageInBytes": { - "type": "long" - }, - "VolumeRecoveryPointTime": {} - } - } - } - } - } - }, - "ListVolumes": { - "input": { - "type": "structure", - "required": [ - "GatewayARN" - ], - "members": { - "GatewayARN": {}, - "Marker": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "Marker": {}, - "VolumeInfos": { - "type": "list", - "member": { - "type": "structure", - "members": { - "VolumeARN": {}, - "VolumeType": {} - } - } - } - } - } - }, - "ResetCache": { - "input": { - "type": "structure", - "required": [ - "GatewayARN" - ], - "members": { - "GatewayARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "RetrieveTapeArchive": { - "input": { - "type": "structure", - "required": [ - "TapeARN", - "GatewayARN" - ], - "members": { - "TapeARN": {}, - "GatewayARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "TapeARN": {} - } - } - }, - "RetrieveTapeRecoveryPoint": { - "input": { - "type": "structure", - "required": [ - "TapeARN", - "GatewayARN" - ], - "members": { - "TapeARN": {}, - "GatewayARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "TapeARN": {} - } - } - }, - "ShutdownGateway": { - "input": { - "type": "structure", - "required": [ - "GatewayARN" - ], - "members": { - "GatewayARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "StartGateway": { - "input": { - "type": "structure", - "required": [ - "GatewayARN" - ], - "members": { - "GatewayARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "UpdateBandwidthRateLimit": { - "input": { - "type": "structure", - "required": [ - "GatewayARN" - ], - "members": { - "GatewayARN": {}, - "AverageUploadRateLimitInBitsPerSec": { - "type": "long" - }, - "AverageDownloadRateLimitInBitsPerSec": { - "type": "long" - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "UpdateChapCredentials": { - "input": { - "type": "structure", - "required": [ - "TargetARN", - "SecretToAuthenticateInitiator", - "InitiatorName" - ], - "members": { - "TargetARN": {}, - "SecretToAuthenticateInitiator": {}, - "InitiatorName": {}, - "SecretToAuthenticateTarget": {} - } - }, - "output": { - "type": "structure", - "members": { - "TargetARN": {}, - "InitiatorName": {} - } - } - }, - "UpdateGatewayInformation": { - "input": { - "type": "structure", - "required": [ - "GatewayARN" - ], - "members": { - "GatewayARN": {}, - "GatewayName": {}, - "GatewayTimezone": {} - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "UpdateGatewaySoftwareNow": { - "input": { - "type": "structure", - "required": [ - "GatewayARN" - ], - "members": { - "GatewayARN": {} - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "UpdateMaintenanceStartTime": { - "input": { - "type": "structure", - "required": [ - "GatewayARN", - "HourOfDay", - "MinuteOfHour", - "DayOfWeek" - ], - "members": { - "GatewayARN": {}, - "HourOfDay": { - "type": "integer" - }, - "MinuteOfHour": { - "type": "integer" - }, - "DayOfWeek": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "UpdateSnapshotSchedule": { - "input": { - "type": "structure", - "required": [ - "VolumeARN", - "StartAt", - "RecurrenceInHours" - ], - "members": { - "VolumeARN": {}, - "StartAt": { - "type": "integer" - }, - "RecurrenceInHours": { - "type": "integer" - }, - "Description": {} - } - }, - "output": { - "type": "structure", - "members": { - "VolumeARN": {} - } - } - }, - "UpdateVTLDeviceType": { - "input": { - "type": "structure", - "required": [ - "VTLDeviceARN", - "DeviceType" - ], - "members": { - "VTLDeviceARN": {}, - "DeviceType": {} - } - }, - "output": { - "type": "structure", - "members": { - "VTLDeviceARN": {} - } - } - } - }, - "shapes": { - "Sc": { - "type": "list", - "member": {} - }, - "S1b": { - "type": "list", - "member": {} - }, - "S20": { - "type": "list", - "member": {} - }, - "S28": { - "type": "structure", - "members": { - "TargetARN": {}, - "NetworkInterfaceId": {}, - "NetworkInterfacePort": { - "type": "integer" - }, - "LunNumber": { - "type": "integer" - }, - "ChapEnabled": { - "type": "boolean" - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/storagegateway-2013-06-30.paginators.json b/cli/node_modules/aws-sdk/apis/storagegateway-2013-06-30.paginators.json deleted file mode 100644 index 286915c63..000000000 --- a/cli/node_modules/aws-sdk/apis/storagegateway-2013-06-30.paginators.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "pagination": { - "DescribeCachediSCSIVolumes": { - "result_key": "CachediSCSIVolumes" - }, - "DescribeStorediSCSIVolumes": { - "result_key": "StorediSCSIVolumes" - }, - "DescribeTapeArchives": { - "input_token": "Marker", - "limit_key": "Limit", - "output_token": "Marker", - "result_key": "TapeArchives" - }, - "DescribeTapeRecoveryPoints": { - "input_token": "Marker", - "limit_key": "Limit", - "output_token": "Marker", - "result_key": "TapeRecoveryPointInfos" - }, - "DescribeTapes": { - "input_token": "Marker", - "limit_key": "Limit", - "output_token": "Marker", - "result_key": "Tapes" - }, - "DescribeVTLDevices": { - "input_token": "Marker", - "limit_key": "Limit", - "output_token": "Marker", - "result_key": "VTLDevices" - }, - "ListGateways": { - "input_token": "Marker", - "limit_key": "Limit", - "output_token": "Marker", - "result_key": "Gateways" - }, - "ListLocalDisks": { - "result_key": "Disks" - }, - "ListVolumeRecoveryPoints": { - "result_key": "VolumeRecoveryPointInfos" - }, - "ListVolumes": { - "input_token": "Marker", - "limit_key": "Limit", - "output_token": "Marker", - "result_key": "VolumeInfos" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/streams.dynamodb-2012-08-10.min.json b/cli/node_modules/aws-sdk/apis/streams.dynamodb-2012-08-10.min.json deleted file mode 100644 index 7dc44d657..000000000 --- a/cli/node_modules/aws-sdk/apis/streams.dynamodb-2012-08-10.min.json +++ /dev/null @@ -1,236 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2012-08-10", - "endpointPrefix": "streams.dynamodb", - "jsonVersion": "1.0", - "serviceFullName": "Amazon DynamoDB Streams", - "signatureVersion": "v4", - "signingName": "dynamodb", - "targetPrefix": "DynamoDBStreams_20120810", - "protocol": "json" - }, - "operations": { - "DescribeStream": { - "input": { - "type": "structure", - "required": [ - "StreamArn" - ], - "members": { - "StreamArn": {}, - "Limit": { - "type": "integer" - }, - "ExclusiveStartShardId": {} - } - }, - "output": { - "type": "structure", - "members": { - "StreamDescription": { - "type": "structure", - "members": { - "StreamArn": {}, - "StreamLabel": {}, - "StreamStatus": {}, - "StreamViewType": {}, - "CreationRequestDateTime": { - "type": "timestamp" - }, - "TableName": {}, - "KeySchema": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "AttributeName", - "KeyType" - ], - "members": { - "AttributeName": {}, - "KeyType": {} - } - } - }, - "Shards": { - "type": "list", - "member": { - "type": "structure", - "members": { - "ShardId": {}, - "SequenceNumberRange": { - "type": "structure", - "members": { - "StartingSequenceNumber": {}, - "EndingSequenceNumber": {} - } - }, - "ParentShardId": {} - } - } - }, - "LastEvaluatedShardId": {} - } - } - } - } - }, - "GetRecords": { - "input": { - "type": "structure", - "required": [ - "ShardIterator" - ], - "members": { - "ShardIterator": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Records": { - "type": "list", - "member": { - "type": "structure", - "members": { - "eventID": {}, - "eventName": {}, - "eventVersion": {}, - "eventSource": {}, - "awsRegion": {}, - "dynamodb": { - "type": "structure", - "members": { - "Keys": { - "shape": "Sr" - }, - "NewImage": { - "shape": "Sr" - }, - "OldImage": { - "shape": "Sr" - }, - "SequenceNumber": {}, - "SizeBytes": { - "type": "long" - }, - "StreamViewType": {} - } - } - } - } - }, - "NextShardIterator": {} - } - } - }, - "GetShardIterator": { - "input": { - "type": "structure", - "required": [ - "StreamArn", - "ShardId", - "ShardIteratorType" - ], - "members": { - "StreamArn": {}, - "ShardId": {}, - "ShardIteratorType": {}, - "SequenceNumber": {} - } - }, - "output": { - "type": "structure", - "members": { - "ShardIterator": {} - } - } - }, - "ListStreams": { - "input": { - "type": "structure", - "members": { - "TableName": {}, - "Limit": { - "type": "integer" - }, - "ExclusiveStartStreamArn": {} - } - }, - "output": { - "type": "structure", - "members": { - "Streams": { - "type": "list", - "member": { - "type": "structure", - "members": { - "StreamArn": {}, - "TableName": {}, - "StreamLabel": {} - } - } - }, - "LastEvaluatedStreamArn": {} - } - } - } - }, - "shapes": { - "Sr": { - "type": "map", - "key": {}, - "value": { - "shape": "St" - } - }, - "St": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "blob" - }, - "SS": { - "type": "list", - "member": {} - }, - "NS": { - "type": "list", - "member": {} - }, - "BS": { - "type": "list", - "member": { - "type": "blob" - } - }, - "M": { - "type": "map", - "key": {}, - "value": { - "shape": "St" - } - }, - "L": { - "type": "list", - "member": { - "shape": "St" - } - }, - "NULL": { - "type": "boolean" - }, - "BOOL": { - "type": "boolean" - } - } - } - }, - "examples": {} -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/sts-2011-06-15.min.json b/cli/node_modules/aws-sdk/apis/sts-2011-06-15.min.json deleted file mode 100644 index 4beea2f97..000000000 --- a/cli/node_modules/aws-sdk/apis/sts-2011-06-15.min.json +++ /dev/null @@ -1,234 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2011-06-15", - "endpointPrefix": "sts", - "globalEndpoint": "sts.amazonaws.com", - "serviceAbbreviation": "AWS STS", - "serviceFullName": "AWS Security Token Service", - "signatureVersion": "v4", - "xmlNamespace": "https://sts.amazonaws.com/doc/2011-06-15/", - "protocol": "query" - }, - "operations": { - "AssumeRole": { - "input": { - "type": "structure", - "required": [ - "RoleArn", - "RoleSessionName" - ], - "members": { - "RoleArn": {}, - "RoleSessionName": {}, - "Policy": {}, - "DurationSeconds": { - "type": "integer" - }, - "ExternalId": {}, - "SerialNumber": {}, - "TokenCode": {} - } - }, - "output": { - "resultWrapper": "AssumeRoleResult", - "type": "structure", - "members": { - "Credentials": { - "shape": "Sa" - }, - "AssumedRoleUser": { - "shape": "Sf" - }, - "PackedPolicySize": { - "type": "integer" - } - } - } - }, - "AssumeRoleWithSAML": { - "input": { - "type": "structure", - "required": [ - "RoleArn", - "PrincipalArn", - "SAMLAssertion" - ], - "members": { - "RoleArn": {}, - "PrincipalArn": {}, - "SAMLAssertion": {}, - "Policy": {}, - "DurationSeconds": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "AssumeRoleWithSAMLResult", - "type": "structure", - "members": { - "Credentials": { - "shape": "Sa" - }, - "AssumedRoleUser": { - "shape": "Sf" - }, - "PackedPolicySize": { - "type": "integer" - }, - "Subject": {}, - "SubjectType": {}, - "Issuer": {}, - "Audience": {}, - "NameQualifier": {} - } - } - }, - "AssumeRoleWithWebIdentity": { - "input": { - "type": "structure", - "required": [ - "RoleArn", - "RoleSessionName", - "WebIdentityToken" - ], - "members": { - "RoleArn": {}, - "RoleSessionName": {}, - "WebIdentityToken": {}, - "ProviderId": {}, - "Policy": {}, - "DurationSeconds": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "AssumeRoleWithWebIdentityResult", - "type": "structure", - "members": { - "Credentials": { - "shape": "Sa" - }, - "SubjectFromWebIdentityToken": {}, - "AssumedRoleUser": { - "shape": "Sf" - }, - "PackedPolicySize": { - "type": "integer" - }, - "Provider": {}, - "Audience": {} - } - } - }, - "DecodeAuthorizationMessage": { - "input": { - "type": "structure", - "required": [ - "EncodedMessage" - ], - "members": { - "EncodedMessage": {} - } - }, - "output": { - "resultWrapper": "DecodeAuthorizationMessageResult", - "type": "structure", - "members": { - "DecodedMessage": {} - } - } - }, - "GetFederationToken": { - "input": { - "type": "structure", - "required": [ - "Name" - ], - "members": { - "Name": {}, - "Policy": {}, - "DurationSeconds": { - "type": "integer" - } - } - }, - "output": { - "resultWrapper": "GetFederationTokenResult", - "type": "structure", - "members": { - "Credentials": { - "shape": "Sa" - }, - "FederatedUser": { - "type": "structure", - "required": [ - "FederatedUserId", - "Arn" - ], - "members": { - "FederatedUserId": {}, - "Arn": {} - } - }, - "PackedPolicySize": { - "type": "integer" - } - } - } - }, - "GetSessionToken": { - "input": { - "type": "structure", - "members": { - "DurationSeconds": { - "type": "integer" - }, - "SerialNumber": {}, - "TokenCode": {} - } - }, - "output": { - "resultWrapper": "GetSessionTokenResult", - "type": "structure", - "members": { - "Credentials": { - "shape": "Sa" - } - } - } - } - }, - "shapes": { - "Sa": { - "type": "structure", - "required": [ - "AccessKeyId", - "SecretAccessKey", - "SessionToken", - "Expiration" - ], - "members": { - "AccessKeyId": {}, - "SecretAccessKey": {}, - "SessionToken": {}, - "Expiration": { - "type": "timestamp" - } - } - }, - "Sf": { - "type": "structure", - "required": [ - "AssumedRoleId", - "Arn" - ], - "members": { - "AssumedRoleId": {}, - "Arn": {} - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/support-2013-04-15.min.json b/cli/node_modules/aws-sdk/apis/support-2013-04-15.min.json deleted file mode 100644 index abe907690..000000000 --- a/cli/node_modules/aws-sdk/apis/support-2013-04-15.min.json +++ /dev/null @@ -1,569 +0,0 @@ -{ - "metadata": { - "apiVersion": "2013-04-15", - "endpointPrefix": "support", - "jsonVersion": "1.1", - "serviceFullName": "AWS Support", - "signatureVersion": "v4", - "targetPrefix": "AWSSupport_20130415", - "protocol": "json" - }, - "operations": { - "AddAttachmentsToSet": { - "input": { - "type": "structure", - "required": [ - "attachments" - ], - "members": { - "attachmentSetId": {}, - "attachments": { - "type": "list", - "member": { - "shape": "S4" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "attachmentSetId": {}, - "expiryTime": {} - } - } - }, - "AddCommunicationToCase": { - "input": { - "type": "structure", - "required": [ - "communicationBody" - ], - "members": { - "caseId": {}, - "communicationBody": {}, - "ccEmailAddresses": { - "shape": "Sc" - }, - "attachmentSetId": {} - } - }, - "output": { - "type": "structure", - "members": { - "result": { - "type": "boolean" - } - } - } - }, - "CreateCase": { - "input": { - "type": "structure", - "required": [ - "subject", - "communicationBody" - ], - "members": { - "subject": {}, - "serviceCode": {}, - "severityCode": {}, - "categoryCode": {}, - "communicationBody": {}, - "ccEmailAddresses": { - "shape": "Sc" - }, - "language": {}, - "issueType": {}, - "attachmentSetId": {} - } - }, - "output": { - "type": "structure", - "members": { - "caseId": {} - } - } - }, - "DescribeAttachment": { - "input": { - "type": "structure", - "required": [ - "attachmentId" - ], - "members": { - "attachmentId": {} - } - }, - "output": { - "type": "structure", - "members": { - "attachment": { - "shape": "S4" - } - } - } - }, - "DescribeCases": { - "input": { - "type": "structure", - "members": { - "caseIdList": { - "type": "list", - "member": {} - }, - "displayId": {}, - "afterTime": {}, - "beforeTime": {}, - "includeResolvedCases": { - "type": "boolean" - }, - "nextToken": {}, - "maxResults": { - "type": "integer" - }, - "language": {}, - "includeCommunications": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "cases": { - "type": "list", - "member": { - "type": "structure", - "members": { - "caseId": {}, - "displayId": {}, - "subject": {}, - "status": {}, - "serviceCode": {}, - "categoryCode": {}, - "severityCode": {}, - "submittedBy": {}, - "timeCreated": {}, - "recentCommunications": { - "type": "structure", - "members": { - "communications": { - "shape": "S17" - }, - "nextToken": {} - } - }, - "ccEmailAddresses": { - "shape": "Sc" - }, - "language": {} - } - } - }, - "nextToken": {} - } - } - }, - "DescribeCommunications": { - "input": { - "type": "structure", - "required": [ - "caseId" - ], - "members": { - "caseId": {}, - "beforeTime": {}, - "afterTime": {}, - "nextToken": {}, - "maxResults": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "communications": { - "shape": "S17" - }, - "nextToken": {} - } - } - }, - "DescribeServices": { - "input": { - "type": "structure", - "members": { - "serviceCodeList": { - "type": "list", - "member": {} - }, - "language": {} - } - }, - "output": { - "type": "structure", - "members": { - "services": { - "type": "list", - "member": { - "type": "structure", - "members": { - "code": {}, - "name": {}, - "categories": { - "type": "list", - "member": { - "type": "structure", - "members": { - "code": {}, - "name": {} - } - } - } - } - } - } - } - } - }, - "DescribeSeverityLevels": { - "input": { - "type": "structure", - "members": { - "language": {} - } - }, - "output": { - "type": "structure", - "members": { - "severityLevels": { - "type": "list", - "member": { - "type": "structure", - "members": { - "code": {}, - "name": {} - } - } - } - } - } - }, - "DescribeTrustedAdvisorCheckRefreshStatuses": { - "input": { - "type": "structure", - "required": [ - "checkIds" - ], - "members": { - "checkIds": { - "shape": "S1t" - } - } - }, - "output": { - "type": "structure", - "required": [ - "statuses" - ], - "members": { - "statuses": { - "type": "list", - "member": { - "shape": "S1x" - } - } - } - } - }, - "DescribeTrustedAdvisorCheckResult": { - "input": { - "type": "structure", - "required": [ - "checkId" - ], - "members": { - "checkId": {}, - "language": {} - } - }, - "output": { - "type": "structure", - "members": { - "result": { - "type": "structure", - "required": [ - "checkId", - "timestamp", - "status", - "resourcesSummary", - "categorySpecificSummary", - "flaggedResources" - ], - "members": { - "checkId": {}, - "timestamp": {}, - "status": {}, - "resourcesSummary": { - "shape": "S22" - }, - "categorySpecificSummary": { - "shape": "S23" - }, - "flaggedResources": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "status", - "region", - "resourceId", - "metadata" - ], - "members": { - "status": {}, - "region": {}, - "resourceId": {}, - "isSuppressed": { - "type": "boolean" - }, - "metadata": { - "shape": "S1t" - } - } - } - } - } - } - } - } - }, - "DescribeTrustedAdvisorCheckSummaries": { - "input": { - "type": "structure", - "required": [ - "checkIds" - ], - "members": { - "checkIds": { - "shape": "S1t" - } - } - }, - "output": { - "type": "structure", - "required": [ - "summaries" - ], - "members": { - "summaries": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "checkId", - "timestamp", - "status", - "resourcesSummary", - "categorySpecificSummary" - ], - "members": { - "checkId": {}, - "timestamp": {}, - "status": {}, - "hasFlaggedResources": { - "type": "boolean" - }, - "resourcesSummary": { - "shape": "S22" - }, - "categorySpecificSummary": { - "shape": "S23" - } - } - } - } - } - } - }, - "DescribeTrustedAdvisorChecks": { - "input": { - "type": "structure", - "required": [ - "language" - ], - "members": { - "language": {} - } - }, - "output": { - "type": "structure", - "required": [ - "checks" - ], - "members": { - "checks": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "id", - "name", - "description", - "category", - "metadata" - ], - "members": { - "id": {}, - "name": {}, - "description": {}, - "category": {}, - "metadata": { - "shape": "S1t" - } - } - } - } - } - } - }, - "RefreshTrustedAdvisorCheck": { - "input": { - "type": "structure", - "required": [ - "checkId" - ], - "members": { - "checkId": {} - } - }, - "output": { - "type": "structure", - "required": [ - "status" - ], - "members": { - "status": { - "shape": "S1x" - } - } - } - }, - "ResolveCase": { - "input": { - "type": "structure", - "members": { - "caseId": {} - } - }, - "output": { - "type": "structure", - "members": { - "initialCaseStatus": {}, - "finalCaseStatus": {} - } - } - } - }, - "shapes": { - "S4": { - "type": "structure", - "members": { - "fileName": {}, - "data": { - "type": "blob" - } - } - }, - "Sc": { - "type": "list", - "member": {} - }, - "S17": { - "type": "list", - "member": { - "type": "structure", - "members": { - "caseId": {}, - "body": {}, - "submittedBy": {}, - "timeCreated": {}, - "attachmentSet": { - "type": "list", - "member": { - "type": "structure", - "members": { - "attachmentId": {}, - "fileName": {} - } - } - } - } - } - }, - "S1t": { - "type": "list", - "member": {} - }, - "S1x": { - "type": "structure", - "required": [ - "checkId", - "status", - "millisUntilNextRefreshable" - ], - "members": { - "checkId": {}, - "status": {}, - "millisUntilNextRefreshable": { - "type": "long" - } - } - }, - "S22": { - "type": "structure", - "required": [ - "resourcesProcessed", - "resourcesFlagged", - "resourcesIgnored", - "resourcesSuppressed" - ], - "members": { - "resourcesProcessed": { - "type": "long" - }, - "resourcesFlagged": { - "type": "long" - }, - "resourcesIgnored": { - "type": "long" - }, - "resourcesSuppressed": { - "type": "long" - } - } - }, - "S23": { - "type": "structure", - "members": { - "costOptimizing": { - "type": "structure", - "required": [ - "estimatedMonthlySavings", - "estimatedPercentMonthlySavings" - ], - "members": { - "estimatedMonthlySavings": { - "type": "double" - }, - "estimatedPercentMonthlySavings": { - "type": "double" - } - } - } - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/support-2013-04-15.paginators.json b/cli/node_modules/aws-sdk/apis/support-2013-04-15.paginators.json deleted file mode 100644 index 1368630c8..000000000 --- a/cli/node_modules/aws-sdk/apis/support-2013-04-15.paginators.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "pagination": { - "DescribeCases": { - "input_token": "nextToken", - "output_token": "nextToken", - "limit_key": "maxResults", - "result_key": "cases" - }, - "DescribeCommunications": { - "input_token": "nextToken", - "output_token": "nextToken", - "limit_key": "maxResults", - "result_key": "communications" - }, - "DescribeServices": { - "result_key": "services" - }, - "DescribeTrustedAdvisorCheckRefreshStatuses": { - "result_key": "statuses" - }, - "DescribeTrustedAdvisorCheckSummaries": { - "result_key": "summaries" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/swf-2012-01-25.min.json b/cli/node_modules/aws-sdk/apis/swf-2012-01-25.min.json deleted file mode 100644 index f6aa0d023..000000000 --- a/cli/node_modules/aws-sdk/apis/swf-2012-01-25.min.json +++ /dev/null @@ -1,2086 +0,0 @@ -{ - "metadata": { - "apiVersion": "2012-01-25", - "endpointPrefix": "swf", - "jsonVersion": "1.0", - "serviceAbbreviation": "Amazon SWF", - "serviceFullName": "Amazon Simple Workflow Service", - "signatureVersion": "v4", - "targetPrefix": "SimpleWorkflowService", - "timestampFormat": "unixTimestamp", - "protocol": "json" - }, - "operations": { - "CountClosedWorkflowExecutions": { - "input": { - "type": "structure", - "required": [ - "domain" - ], - "members": { - "domain": {}, - "startTimeFilter": { - "shape": "S3" - }, - "closeTimeFilter": { - "shape": "S3" - }, - "executionFilter": { - "shape": "S5" - }, - "typeFilter": { - "shape": "S7" - }, - "tagFilter": { - "shape": "Sa" - }, - "closeStatusFilter": { - "shape": "Sc" - } - } - }, - "output": { - "shape": "Se" - } - }, - "CountOpenWorkflowExecutions": { - "input": { - "type": "structure", - "required": [ - "domain", - "startTimeFilter" - ], - "members": { - "domain": {}, - "startTimeFilter": { - "shape": "S3" - }, - "typeFilter": { - "shape": "S7" - }, - "tagFilter": { - "shape": "Sa" - }, - "executionFilter": { - "shape": "S5" - } - } - }, - "output": { - "shape": "Se" - } - }, - "CountPendingActivityTasks": { - "input": { - "type": "structure", - "required": [ - "domain", - "taskList" - ], - "members": { - "domain": {}, - "taskList": { - "shape": "Sj" - } - } - }, - "output": { - "shape": "Sk" - } - }, - "CountPendingDecisionTasks": { - "input": { - "type": "structure", - "required": [ - "domain", - "taskList" - ], - "members": { - "domain": {}, - "taskList": { - "shape": "Sj" - } - } - }, - "output": { - "shape": "Sk" - } - }, - "DeprecateActivityType": { - "input": { - "type": "structure", - "required": [ - "domain", - "activityType" - ], - "members": { - "domain": {}, - "activityType": { - "shape": "Sn" - } - } - } - }, - "DeprecateDomain": { - "input": { - "type": "structure", - "required": [ - "name" - ], - "members": { - "name": {} - } - } - }, - "DeprecateWorkflowType": { - "input": { - "type": "structure", - "required": [ - "domain", - "workflowType" - ], - "members": { - "domain": {}, - "workflowType": { - "shape": "Sr" - } - } - } - }, - "DescribeActivityType": { - "input": { - "type": "structure", - "required": [ - "domain", - "activityType" - ], - "members": { - "domain": {}, - "activityType": { - "shape": "Sn" - } - } - }, - "output": { - "type": "structure", - "required": [ - "typeInfo", - "configuration" - ], - "members": { - "typeInfo": { - "shape": "Su" - }, - "configuration": { - "type": "structure", - "members": { - "defaultTaskStartToCloseTimeout": {}, - "defaultTaskHeartbeatTimeout": {}, - "defaultTaskList": { - "shape": "Sj" - }, - "defaultTaskPriority": {}, - "defaultTaskScheduleToStartTimeout": {}, - "defaultTaskScheduleToCloseTimeout": {} - } - } - } - } - }, - "DescribeDomain": { - "input": { - "type": "structure", - "required": [ - "name" - ], - "members": { - "name": {} - } - }, - "output": { - "type": "structure", - "required": [ - "domainInfo", - "configuration" - ], - "members": { - "domainInfo": { - "shape": "S12" - }, - "configuration": { - "type": "structure", - "required": [ - "workflowExecutionRetentionPeriodInDays" - ], - "members": { - "workflowExecutionRetentionPeriodInDays": {} - } - } - } - } - }, - "DescribeWorkflowExecution": { - "input": { - "type": "structure", - "required": [ - "domain", - "execution" - ], - "members": { - "domain": {}, - "execution": { - "shape": "S16" - } - } - }, - "output": { - "type": "structure", - "required": [ - "executionInfo", - "executionConfiguration", - "openCounts" - ], - "members": { - "executionInfo": { - "shape": "S19" - }, - "executionConfiguration": { - "type": "structure", - "required": [ - "taskStartToCloseTimeout", - "executionStartToCloseTimeout", - "taskList", - "childPolicy" - ], - "members": { - "taskStartToCloseTimeout": {}, - "executionStartToCloseTimeout": {}, - "taskList": { - "shape": "Sj" - }, - "taskPriority": {}, - "childPolicy": {} - } - }, - "openCounts": { - "type": "structure", - "required": [ - "openActivityTasks", - "openDecisionTasks", - "openTimers", - "openChildWorkflowExecutions" - ], - "members": { - "openActivityTasks": { - "type": "integer" - }, - "openDecisionTasks": { - "type": "integer" - }, - "openTimers": { - "type": "integer" - }, - "openChildWorkflowExecutions": { - "type": "integer" - } - } - }, - "latestActivityTaskTimestamp": { - "type": "timestamp" - }, - "latestExecutionContext": {} - } - } - }, - "DescribeWorkflowType": { - "input": { - "type": "structure", - "required": [ - "domain", - "workflowType" - ], - "members": { - "domain": {}, - "workflowType": { - "shape": "Sr" - } - } - }, - "output": { - "type": "structure", - "required": [ - "typeInfo", - "configuration" - ], - "members": { - "typeInfo": { - "shape": "S1l" - }, - "configuration": { - "type": "structure", - "members": { - "defaultTaskStartToCloseTimeout": {}, - "defaultExecutionStartToCloseTimeout": {}, - "defaultTaskList": { - "shape": "Sj" - }, - "defaultTaskPriority": {}, - "defaultChildPolicy": {} - } - } - } - } - }, - "GetWorkflowExecutionHistory": { - "input": { - "type": "structure", - "required": [ - "domain", - "execution" - ], - "members": { - "domain": {}, - "execution": { - "shape": "S16" - }, - "nextPageToken": {}, - "maximumPageSize": { - "type": "integer" - }, - "reverseOrder": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "required": [ - "events" - ], - "members": { - "events": { - "shape": "S1s" - }, - "nextPageToken": {} - } - } - }, - "ListActivityTypes": { - "input": { - "type": "structure", - "required": [ - "domain", - "registrationStatus" - ], - "members": { - "domain": {}, - "name": {}, - "registrationStatus": {}, - "nextPageToken": {}, - "maximumPageSize": { - "type": "integer" - }, - "reverseOrder": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "required": [ - "typeInfos" - ], - "members": { - "typeInfos": { - "type": "list", - "member": { - "shape": "Su" - } - }, - "nextPageToken": {} - } - } - }, - "ListClosedWorkflowExecutions": { - "input": { - "type": "structure", - "required": [ - "domain" - ], - "members": { - "domain": {}, - "startTimeFilter": { - "shape": "S3" - }, - "closeTimeFilter": { - "shape": "S3" - }, - "executionFilter": { - "shape": "S5" - }, - "closeStatusFilter": { - "shape": "Sc" - }, - "typeFilter": { - "shape": "S7" - }, - "tagFilter": { - "shape": "Sa" - }, - "nextPageToken": {}, - "maximumPageSize": { - "type": "integer" - }, - "reverseOrder": { - "type": "boolean" - } - } - }, - "output": { - "shape": "S41" - } - }, - "ListDomains": { - "input": { - "type": "structure", - "required": [ - "registrationStatus" - ], - "members": { - "nextPageToken": {}, - "registrationStatus": {}, - "maximumPageSize": { - "type": "integer" - }, - "reverseOrder": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "required": [ - "domainInfos" - ], - "members": { - "domainInfos": { - "type": "list", - "member": { - "shape": "S12" - } - }, - "nextPageToken": {} - } - } - }, - "ListOpenWorkflowExecutions": { - "input": { - "type": "structure", - "required": [ - "domain", - "startTimeFilter" - ], - "members": { - "domain": {}, - "startTimeFilter": { - "shape": "S3" - }, - "typeFilter": { - "shape": "S7" - }, - "tagFilter": { - "shape": "Sa" - }, - "nextPageToken": {}, - "maximumPageSize": { - "type": "integer" - }, - "reverseOrder": { - "type": "boolean" - }, - "executionFilter": { - "shape": "S5" - } - } - }, - "output": { - "shape": "S41" - } - }, - "ListWorkflowTypes": { - "input": { - "type": "structure", - "required": [ - "domain", - "registrationStatus" - ], - "members": { - "domain": {}, - "name": {}, - "registrationStatus": {}, - "nextPageToken": {}, - "maximumPageSize": { - "type": "integer" - }, - "reverseOrder": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "required": [ - "typeInfos" - ], - "members": { - "typeInfos": { - "type": "list", - "member": { - "shape": "S1l" - } - }, - "nextPageToken": {} - } - } - }, - "PollForActivityTask": { - "input": { - "type": "structure", - "required": [ - "domain", - "taskList" - ], - "members": { - "domain": {}, - "taskList": { - "shape": "Sj" - }, - "identity": {} - } - }, - "output": { - "type": "structure", - "required": [ - "taskToken", - "activityId", - "startedEventId", - "workflowExecution", - "activityType" - ], - "members": { - "taskToken": {}, - "activityId": {}, - "startedEventId": { - "type": "long" - }, - "workflowExecution": { - "shape": "S16" - }, - "activityType": { - "shape": "Sn" - }, - "input": {} - } - } - }, - "PollForDecisionTask": { - "input": { - "type": "structure", - "required": [ - "domain", - "taskList" - ], - "members": { - "domain": {}, - "taskList": { - "shape": "Sj" - }, - "identity": {}, - "nextPageToken": {}, - "maximumPageSize": { - "type": "integer" - }, - "reverseOrder": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "required": [ - "taskToken", - "startedEventId", - "workflowExecution", - "workflowType", - "events" - ], - "members": { - "taskToken": {}, - "startedEventId": { - "type": "long" - }, - "workflowExecution": { - "shape": "S16" - }, - "workflowType": { - "shape": "Sr" - }, - "events": { - "shape": "S1s" - }, - "nextPageToken": {}, - "previousStartedEventId": { - "type": "long" - } - } - } - }, - "RecordActivityTaskHeartbeat": { - "input": { - "type": "structure", - "required": [ - "taskToken" - ], - "members": { - "taskToken": {}, - "details": {} - } - }, - "output": { - "type": "structure", - "required": [ - "cancelRequested" - ], - "members": { - "cancelRequested": { - "type": "boolean" - } - } - } - }, - "RegisterActivityType": { - "input": { - "type": "structure", - "required": [ - "domain", - "name", - "version" - ], - "members": { - "domain": {}, - "name": {}, - "version": {}, - "description": {}, - "defaultTaskStartToCloseTimeout": {}, - "defaultTaskHeartbeatTimeout": {}, - "defaultTaskList": { - "shape": "Sj" - }, - "defaultTaskPriority": {}, - "defaultTaskScheduleToStartTimeout": {}, - "defaultTaskScheduleToCloseTimeout": {} - } - } - }, - "RegisterDomain": { - "input": { - "type": "structure", - "required": [ - "name", - "workflowExecutionRetentionPeriodInDays" - ], - "members": { - "name": {}, - "description": {}, - "workflowExecutionRetentionPeriodInDays": {} - } - } - }, - "RegisterWorkflowType": { - "input": { - "type": "structure", - "required": [ - "domain", - "name", - "version" - ], - "members": { - "domain": {}, - "name": {}, - "version": {}, - "description": {}, - "defaultTaskStartToCloseTimeout": {}, - "defaultExecutionStartToCloseTimeout": {}, - "defaultTaskList": { - "shape": "Sj" - }, - "defaultTaskPriority": {}, - "defaultChildPolicy": {} - } - } - }, - "RequestCancelWorkflowExecution": { - "input": { - "type": "structure", - "required": [ - "domain", - "workflowId" - ], - "members": { - "domain": {}, - "workflowId": {}, - "runId": {} - } - } - }, - "RespondActivityTaskCanceled": { - "input": { - "type": "structure", - "required": [ - "taskToken" - ], - "members": { - "taskToken": {}, - "details": {} - } - } - }, - "RespondActivityTaskCompleted": { - "input": { - "type": "structure", - "required": [ - "taskToken" - ], - "members": { - "taskToken": {}, - "result": {} - } - } - }, - "RespondActivityTaskFailed": { - "input": { - "type": "structure", - "required": [ - "taskToken" - ], - "members": { - "taskToken": {}, - "reason": {}, - "details": {} - } - } - }, - "RespondDecisionTaskCompleted": { - "input": { - "type": "structure", - "required": [ - "taskToken" - ], - "members": { - "taskToken": {}, - "decisions": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "decisionType" - ], - "members": { - "decisionType": {}, - "scheduleActivityTaskDecisionAttributes": { - "type": "structure", - "required": [ - "activityType", - "activityId" - ], - "members": { - "activityType": { - "shape": "Sn" - }, - "activityId": {}, - "control": {}, - "input": {}, - "scheduleToCloseTimeout": {}, - "taskList": { - "shape": "Sj" - }, - "taskPriority": {}, - "scheduleToStartTimeout": {}, - "startToCloseTimeout": {}, - "heartbeatTimeout": {} - } - }, - "requestCancelActivityTaskDecisionAttributes": { - "type": "structure", - "required": [ - "activityId" - ], - "members": { - "activityId": {} - } - }, - "completeWorkflowExecutionDecisionAttributes": { - "type": "structure", - "members": { - "result": {} - } - }, - "failWorkflowExecutionDecisionAttributes": { - "type": "structure", - "members": { - "reason": {}, - "details": {} - } - }, - "cancelWorkflowExecutionDecisionAttributes": { - "type": "structure", - "members": { - "details": {} - } - }, - "continueAsNewWorkflowExecutionDecisionAttributes": { - "type": "structure", - "members": { - "input": {}, - "executionStartToCloseTimeout": {}, - "taskList": { - "shape": "Sj" - }, - "taskPriority": {}, - "taskStartToCloseTimeout": {}, - "childPolicy": {}, - "tagList": { - "shape": "S1b" - }, - "workflowTypeVersion": {} - } - }, - "recordMarkerDecisionAttributes": { - "type": "structure", - "required": [ - "markerName" - ], - "members": { - "markerName": {}, - "details": {} - } - }, - "startTimerDecisionAttributes": { - "type": "structure", - "required": [ - "timerId", - "startToFireTimeout" - ], - "members": { - "timerId": {}, - "control": {}, - "startToFireTimeout": {} - } - }, - "cancelTimerDecisionAttributes": { - "type": "structure", - "required": [ - "timerId" - ], - "members": { - "timerId": {} - } - }, - "signalExternalWorkflowExecutionDecisionAttributes": { - "type": "structure", - "required": [ - "workflowId", - "signalName" - ], - "members": { - "workflowId": {}, - "runId": {}, - "signalName": {}, - "input": {}, - "control": {} - } - }, - "requestCancelExternalWorkflowExecutionDecisionAttributes": { - "type": "structure", - "required": [ - "workflowId" - ], - "members": { - "workflowId": {}, - "runId": {}, - "control": {} - } - }, - "startChildWorkflowExecutionDecisionAttributes": { - "type": "structure", - "required": [ - "workflowType", - "workflowId" - ], - "members": { - "workflowType": { - "shape": "Sr" - }, - "workflowId": {}, - "control": {}, - "input": {}, - "executionStartToCloseTimeout": {}, - "taskList": { - "shape": "Sj" - }, - "taskPriority": {}, - "taskStartToCloseTimeout": {}, - "childPolicy": {}, - "tagList": { - "shape": "S1b" - } - } - } - } - } - }, - "executionContext": {} - } - } - }, - "SignalWorkflowExecution": { - "input": { - "type": "structure", - "required": [ - "domain", - "workflowId", - "signalName" - ], - "members": { - "domain": {}, - "workflowId": {}, - "runId": {}, - "signalName": {}, - "input": {} - } - } - }, - "StartWorkflowExecution": { - "input": { - "type": "structure", - "required": [ - "domain", - "workflowId", - "workflowType" - ], - "members": { - "domain": {}, - "workflowId": {}, - "workflowType": { - "shape": "Sr" - }, - "taskList": { - "shape": "Sj" - }, - "taskPriority": {}, - "input": {}, - "executionStartToCloseTimeout": {}, - "tagList": { - "shape": "S1b" - }, - "taskStartToCloseTimeout": {}, - "childPolicy": {} - } - }, - "output": { - "type": "structure", - "members": { - "runId": {} - } - } - }, - "TerminateWorkflowExecution": { - "input": { - "type": "structure", - "required": [ - "domain", - "workflowId" - ], - "members": { - "domain": {}, - "workflowId": {}, - "runId": {}, - "reason": {}, - "details": {}, - "childPolicy": {} - } - } - } - }, - "shapes": { - "S3": { - "type": "structure", - "required": [ - "oldestDate" - ], - "members": { - "oldestDate": { - "type": "timestamp" - }, - "latestDate": { - "type": "timestamp" - } - } - }, - "S5": { - "type": "structure", - "required": [ - "workflowId" - ], - "members": { - "workflowId": {} - } - }, - "S7": { - "type": "structure", - "required": [ - "name" - ], - "members": { - "name": {}, - "version": {} - } - }, - "Sa": { - "type": "structure", - "required": [ - "tag" - ], - "members": { - "tag": {} - } - }, - "Sc": { - "type": "structure", - "required": [ - "status" - ], - "members": { - "status": {} - } - }, - "Se": { - "type": "structure", - "required": [ - "count" - ], - "members": { - "count": { - "type": "integer" - }, - "truncated": { - "type": "boolean" - } - } - }, - "Sj": { - "type": "structure", - "required": [ - "name" - ], - "members": { - "name": {} - } - }, - "Sk": { - "type": "structure", - "required": [ - "count" - ], - "members": { - "count": { - "type": "integer" - }, - "truncated": { - "type": "boolean" - } - } - }, - "Sn": { - "type": "structure", - "required": [ - "name", - "version" - ], - "members": { - "name": {}, - "version": {} - } - }, - "Sr": { - "type": "structure", - "required": [ - "name", - "version" - ], - "members": { - "name": {}, - "version": {} - } - }, - "Su": { - "type": "structure", - "required": [ - "activityType", - "status", - "creationDate" - ], - "members": { - "activityType": { - "shape": "Sn" - }, - "status": {}, - "description": {}, - "creationDate": { - "type": "timestamp" - }, - "deprecationDate": { - "type": "timestamp" - } - } - }, - "S12": { - "type": "structure", - "required": [ - "name", - "status" - ], - "members": { - "name": {}, - "status": {}, - "description": {} - } - }, - "S16": { - "type": "structure", - "required": [ - "workflowId", - "runId" - ], - "members": { - "workflowId": {}, - "runId": {} - } - }, - "S19": { - "type": "structure", - "required": [ - "execution", - "workflowType", - "startTimestamp", - "executionStatus" - ], - "members": { - "execution": { - "shape": "S16" - }, - "workflowType": { - "shape": "Sr" - }, - "startTimestamp": { - "type": "timestamp" - }, - "closeTimestamp": { - "type": "timestamp" - }, - "executionStatus": {}, - "closeStatus": {}, - "parent": { - "shape": "S16" - }, - "tagList": { - "shape": "S1b" - }, - "cancelRequested": { - "type": "boolean" - } - } - }, - "S1b": { - "type": "list", - "member": {} - }, - "S1l": { - "type": "structure", - "required": [ - "workflowType", - "status", - "creationDate" - ], - "members": { - "workflowType": { - "shape": "Sr" - }, - "status": {}, - "description": {}, - "creationDate": { - "type": "timestamp" - }, - "deprecationDate": { - "type": "timestamp" - } - } - }, - "S1s": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "eventTimestamp", - "eventType", - "eventId" - ], - "members": { - "eventTimestamp": { - "type": "timestamp" - }, - "eventType": {}, - "eventId": { - "type": "long" - }, - "workflowExecutionStartedEventAttributes": { - "type": "structure", - "required": [ - "childPolicy", - "taskList", - "workflowType" - ], - "members": { - "input": {}, - "executionStartToCloseTimeout": {}, - "taskStartToCloseTimeout": {}, - "childPolicy": {}, - "taskList": { - "shape": "Sj" - }, - "workflowType": { - "shape": "Sr" - }, - "tagList": { - "shape": "S1b" - }, - "taskPriority": {}, - "continuedExecutionRunId": {}, - "parentWorkflowExecution": { - "shape": "S16" - }, - "parentInitiatedEventId": { - "type": "long" - } - } - }, - "workflowExecutionCompletedEventAttributes": { - "type": "structure", - "required": [ - "decisionTaskCompletedEventId" - ], - "members": { - "result": {}, - "decisionTaskCompletedEventId": { - "type": "long" - } - } - }, - "completeWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "required": [ - "cause", - "decisionTaskCompletedEventId" - ], - "members": { - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "long" - } - } - }, - "workflowExecutionFailedEventAttributes": { - "type": "structure", - "required": [ - "decisionTaskCompletedEventId" - ], - "members": { - "reason": {}, - "details": {}, - "decisionTaskCompletedEventId": { - "type": "long" - } - } - }, - "failWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "required": [ - "cause", - "decisionTaskCompletedEventId" - ], - "members": { - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "long" - } - } - }, - "workflowExecutionTimedOutEventAttributes": { - "type": "structure", - "required": [ - "timeoutType", - "childPolicy" - ], - "members": { - "timeoutType": {}, - "childPolicy": {} - } - }, - "workflowExecutionCanceledEventAttributes": { - "type": "structure", - "required": [ - "decisionTaskCompletedEventId" - ], - "members": { - "details": {}, - "decisionTaskCompletedEventId": { - "type": "long" - } - } - }, - "cancelWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "required": [ - "cause", - "decisionTaskCompletedEventId" - ], - "members": { - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "long" - } - } - }, - "workflowExecutionContinuedAsNewEventAttributes": { - "type": "structure", - "required": [ - "decisionTaskCompletedEventId", - "newExecutionRunId", - "taskList", - "childPolicy", - "workflowType" - ], - "members": { - "input": {}, - "decisionTaskCompletedEventId": { - "type": "long" - }, - "newExecutionRunId": {}, - "executionStartToCloseTimeout": {}, - "taskList": { - "shape": "Sj" - }, - "taskPriority": {}, - "taskStartToCloseTimeout": {}, - "childPolicy": {}, - "tagList": { - "shape": "S1b" - }, - "workflowType": { - "shape": "Sr" - } - } - }, - "continueAsNewWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "required": [ - "cause", - "decisionTaskCompletedEventId" - ], - "members": { - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "long" - } - } - }, - "workflowExecutionTerminatedEventAttributes": { - "type": "structure", - "required": [ - "childPolicy" - ], - "members": { - "reason": {}, - "details": {}, - "childPolicy": {}, - "cause": {} - } - }, - "workflowExecutionCancelRequestedEventAttributes": { - "type": "structure", - "members": { - "externalWorkflowExecution": { - "shape": "S16" - }, - "externalInitiatedEventId": { - "type": "long" - }, - "cause": {} - } - }, - "decisionTaskScheduledEventAttributes": { - "type": "structure", - "required": [ - "taskList" - ], - "members": { - "taskList": { - "shape": "Sj" - }, - "taskPriority": {}, - "startToCloseTimeout": {} - } - }, - "decisionTaskStartedEventAttributes": { - "type": "structure", - "required": [ - "scheduledEventId" - ], - "members": { - "identity": {}, - "scheduledEventId": { - "type": "long" - } - } - }, - "decisionTaskCompletedEventAttributes": { - "type": "structure", - "required": [ - "scheduledEventId", - "startedEventId" - ], - "members": { - "executionContext": {}, - "scheduledEventId": { - "type": "long" - }, - "startedEventId": { - "type": "long" - } - } - }, - "decisionTaskTimedOutEventAttributes": { - "type": "structure", - "required": [ - "timeoutType", - "scheduledEventId", - "startedEventId" - ], - "members": { - "timeoutType": {}, - "scheduledEventId": { - "type": "long" - }, - "startedEventId": { - "type": "long" - } - } - }, - "activityTaskScheduledEventAttributes": { - "type": "structure", - "required": [ - "activityType", - "activityId", - "taskList", - "decisionTaskCompletedEventId" - ], - "members": { - "activityType": { - "shape": "Sn" - }, - "activityId": {}, - "input": {}, - "control": {}, - "scheduleToStartTimeout": {}, - "scheduleToCloseTimeout": {}, - "startToCloseTimeout": {}, - "taskList": { - "shape": "Sj" - }, - "taskPriority": {}, - "decisionTaskCompletedEventId": { - "type": "long" - }, - "heartbeatTimeout": {} - } - }, - "activityTaskStartedEventAttributes": { - "type": "structure", - "required": [ - "scheduledEventId" - ], - "members": { - "identity": {}, - "scheduledEventId": { - "type": "long" - } - } - }, - "activityTaskCompletedEventAttributes": { - "type": "structure", - "required": [ - "scheduledEventId", - "startedEventId" - ], - "members": { - "result": {}, - "scheduledEventId": { - "type": "long" - }, - "startedEventId": { - "type": "long" - } - } - }, - "activityTaskFailedEventAttributes": { - "type": "structure", - "required": [ - "scheduledEventId", - "startedEventId" - ], - "members": { - "reason": {}, - "details": {}, - "scheduledEventId": { - "type": "long" - }, - "startedEventId": { - "type": "long" - } - } - }, - "activityTaskTimedOutEventAttributes": { - "type": "structure", - "required": [ - "timeoutType", - "scheduledEventId", - "startedEventId" - ], - "members": { - "timeoutType": {}, - "scheduledEventId": { - "type": "long" - }, - "startedEventId": { - "type": "long" - }, - "details": {} - } - }, - "activityTaskCanceledEventAttributes": { - "type": "structure", - "required": [ - "scheduledEventId", - "startedEventId" - ], - "members": { - "details": {}, - "scheduledEventId": { - "type": "long" - }, - "startedEventId": { - "type": "long" - }, - "latestCancelRequestedEventId": { - "type": "long" - } - } - }, - "activityTaskCancelRequestedEventAttributes": { - "type": "structure", - "required": [ - "decisionTaskCompletedEventId", - "activityId" - ], - "members": { - "decisionTaskCompletedEventId": { - "type": "long" - }, - "activityId": {} - } - }, - "workflowExecutionSignaledEventAttributes": { - "type": "structure", - "required": [ - "signalName" - ], - "members": { - "signalName": {}, - "input": {}, - "externalWorkflowExecution": { - "shape": "S16" - }, - "externalInitiatedEventId": { - "type": "long" - } - } - }, - "markerRecordedEventAttributes": { - "type": "structure", - "required": [ - "markerName", - "decisionTaskCompletedEventId" - ], - "members": { - "markerName": {}, - "details": {}, - "decisionTaskCompletedEventId": { - "type": "long" - } - } - }, - "recordMarkerFailedEventAttributes": { - "type": "structure", - "required": [ - "markerName", - "cause", - "decisionTaskCompletedEventId" - ], - "members": { - "markerName": {}, - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "long" - } - } - }, - "timerStartedEventAttributes": { - "type": "structure", - "required": [ - "timerId", - "startToFireTimeout", - "decisionTaskCompletedEventId" - ], - "members": { - "timerId": {}, - "control": {}, - "startToFireTimeout": {}, - "decisionTaskCompletedEventId": { - "type": "long" - } - } - }, - "timerFiredEventAttributes": { - "type": "structure", - "required": [ - "timerId", - "startedEventId" - ], - "members": { - "timerId": {}, - "startedEventId": { - "type": "long" - } - } - }, - "timerCanceledEventAttributes": { - "type": "structure", - "required": [ - "timerId", - "startedEventId", - "decisionTaskCompletedEventId" - ], - "members": { - "timerId": {}, - "startedEventId": { - "type": "long" - }, - "decisionTaskCompletedEventId": { - "type": "long" - } - } - }, - "startChildWorkflowExecutionInitiatedEventAttributes": { - "type": "structure", - "required": [ - "workflowId", - "workflowType", - "taskList", - "decisionTaskCompletedEventId", - "childPolicy" - ], - "members": { - "workflowId": {}, - "workflowType": { - "shape": "Sr" - }, - "control": {}, - "input": {}, - "executionStartToCloseTimeout": {}, - "taskList": { - "shape": "Sj" - }, - "taskPriority": {}, - "decisionTaskCompletedEventId": { - "type": "long" - }, - "childPolicy": {}, - "taskStartToCloseTimeout": {}, - "tagList": { - "shape": "S1b" - } - } - }, - "childWorkflowExecutionStartedEventAttributes": { - "type": "structure", - "required": [ - "workflowExecution", - "workflowType", - "initiatedEventId" - ], - "members": { - "workflowExecution": { - "shape": "S16" - }, - "workflowType": { - "shape": "Sr" - }, - "initiatedEventId": { - "type": "long" - } - } - }, - "childWorkflowExecutionCompletedEventAttributes": { - "type": "structure", - "required": [ - "workflowExecution", - "workflowType", - "initiatedEventId", - "startedEventId" - ], - "members": { - "workflowExecution": { - "shape": "S16" - }, - "workflowType": { - "shape": "Sr" - }, - "result": {}, - "initiatedEventId": { - "type": "long" - }, - "startedEventId": { - "type": "long" - } - } - }, - "childWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "required": [ - "workflowExecution", - "workflowType", - "initiatedEventId", - "startedEventId" - ], - "members": { - "workflowExecution": { - "shape": "S16" - }, - "workflowType": { - "shape": "Sr" - }, - "reason": {}, - "details": {}, - "initiatedEventId": { - "type": "long" - }, - "startedEventId": { - "type": "long" - } - } - }, - "childWorkflowExecutionTimedOutEventAttributes": { - "type": "structure", - "required": [ - "workflowExecution", - "workflowType", - "timeoutType", - "initiatedEventId", - "startedEventId" - ], - "members": { - "workflowExecution": { - "shape": "S16" - }, - "workflowType": { - "shape": "Sr" - }, - "timeoutType": {}, - "initiatedEventId": { - "type": "long" - }, - "startedEventId": { - "type": "long" - } - } - }, - "childWorkflowExecutionCanceledEventAttributes": { - "type": "structure", - "required": [ - "workflowExecution", - "workflowType", - "initiatedEventId", - "startedEventId" - ], - "members": { - "workflowExecution": { - "shape": "S16" - }, - "workflowType": { - "shape": "Sr" - }, - "details": {}, - "initiatedEventId": { - "type": "long" - }, - "startedEventId": { - "type": "long" - } - } - }, - "childWorkflowExecutionTerminatedEventAttributes": { - "type": "structure", - "required": [ - "workflowExecution", - "workflowType", - "initiatedEventId", - "startedEventId" - ], - "members": { - "workflowExecution": { - "shape": "S16" - }, - "workflowType": { - "shape": "Sr" - }, - "initiatedEventId": { - "type": "long" - }, - "startedEventId": { - "type": "long" - } - } - }, - "signalExternalWorkflowExecutionInitiatedEventAttributes": { - "type": "structure", - "required": [ - "workflowId", - "signalName", - "decisionTaskCompletedEventId" - ], - "members": { - "workflowId": {}, - "runId": {}, - "signalName": {}, - "input": {}, - "decisionTaskCompletedEventId": { - "type": "long" - }, - "control": {} - } - }, - "externalWorkflowExecutionSignaledEventAttributes": { - "type": "structure", - "required": [ - "workflowExecution", - "initiatedEventId" - ], - "members": { - "workflowExecution": { - "shape": "S16" - }, - "initiatedEventId": { - "type": "long" - } - } - }, - "signalExternalWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "required": [ - "workflowId", - "cause", - "initiatedEventId", - "decisionTaskCompletedEventId" - ], - "members": { - "workflowId": {}, - "runId": {}, - "cause": {}, - "initiatedEventId": { - "type": "long" - }, - "decisionTaskCompletedEventId": { - "type": "long" - }, - "control": {} - } - }, - "externalWorkflowExecutionCancelRequestedEventAttributes": { - "type": "structure", - "required": [ - "workflowExecution", - "initiatedEventId" - ], - "members": { - "workflowExecution": { - "shape": "S16" - }, - "initiatedEventId": { - "type": "long" - } - } - }, - "requestCancelExternalWorkflowExecutionInitiatedEventAttributes": { - "type": "structure", - "required": [ - "workflowId", - "decisionTaskCompletedEventId" - ], - "members": { - "workflowId": {}, - "runId": {}, - "decisionTaskCompletedEventId": { - "type": "long" - }, - "control": {} - } - }, - "requestCancelExternalWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "required": [ - "workflowId", - "cause", - "initiatedEventId", - "decisionTaskCompletedEventId" - ], - "members": { - "workflowId": {}, - "runId": {}, - "cause": {}, - "initiatedEventId": { - "type": "long" - }, - "decisionTaskCompletedEventId": { - "type": "long" - }, - "control": {} - } - }, - "scheduleActivityTaskFailedEventAttributes": { - "type": "structure", - "required": [ - "activityType", - "activityId", - "cause", - "decisionTaskCompletedEventId" - ], - "members": { - "activityType": { - "shape": "Sn" - }, - "activityId": {}, - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "long" - } - } - }, - "requestCancelActivityTaskFailedEventAttributes": { - "type": "structure", - "required": [ - "activityId", - "cause", - "decisionTaskCompletedEventId" - ], - "members": { - "activityId": {}, - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "long" - } - } - }, - "startTimerFailedEventAttributes": { - "type": "structure", - "required": [ - "timerId", - "cause", - "decisionTaskCompletedEventId" - ], - "members": { - "timerId": {}, - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "long" - } - } - }, - "cancelTimerFailedEventAttributes": { - "type": "structure", - "required": [ - "timerId", - "cause", - "decisionTaskCompletedEventId" - ], - "members": { - "timerId": {}, - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "long" - } - } - }, - "startChildWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "required": [ - "workflowType", - "cause", - "workflowId", - "initiatedEventId", - "decisionTaskCompletedEventId" - ], - "members": { - "workflowType": { - "shape": "Sr" - }, - "cause": {}, - "workflowId": {}, - "initiatedEventId": { - "type": "long" - }, - "decisionTaskCompletedEventId": { - "type": "long" - }, - "control": {} - } - } - } - } - }, - "S41": { - "type": "structure", - "required": [ - "executionInfos" - ], - "members": { - "executionInfos": { - "type": "list", - "member": { - "shape": "S19" - } - }, - "nextPageToken": {} - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/apis/swf-2012-01-25.paginators.json b/cli/node_modules/aws-sdk/apis/swf-2012-01-25.paginators.json deleted file mode 100644 index 892ee38b5..000000000 --- a/cli/node_modules/aws-sdk/apis/swf-2012-01-25.paginators.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "pagination": { - "GetWorkflowExecutionHistory": { - "limit_key": "maximumPageSize", - "input_token": "nextPageToken", - "output_token": "nextPageToken", - "result_key": "events" - }, - "ListActivityTypes": { - "limit_key": "maximumPageSize", - "input_token": "nextPageToken", - "output_token": "nextPageToken", - "result_key": "typeInfos" - }, - "ListClosedWorkflowExecutions": { - "limit_key": "maximumPageSize", - "input_token": "nextPageToken", - "output_token": "nextPageToken", - "result_key": "executionInfos" - }, - "ListDomains": { - "limit_key": "maximumPageSize", - "input_token": "nextPageToken", - "output_token": "nextPageToken", - "result_key": "domainInfos" - }, - "ListOpenWorkflowExecutions": { - "limit_key": "maximumPageSize", - "input_token": "nextPageToken", - "output_token": "nextPageToken", - "result_key": "executionInfos" - }, - "ListWorkflowTypes": { - "limit_key": "maximumPageSize", - "input_token": "nextPageToken", - "output_token": "nextPageToken", - "result_key": "typeInfos" - }, - "PollForDecisionTask": { - "limit_key": "maximumPageSize", - "input_token": "nextPageToken", - "output_token": "nextPageToken", - "result_key": "events" - } - } -} diff --git a/cli/node_modules/aws-sdk/apis/workspaces-2015-04-08.min.json b/cli/node_modules/aws-sdk/apis/workspaces-2015-04-08.min.json deleted file mode 100644 index 2664c51f8..000000000 --- a/cli/node_modules/aws-sdk/apis/workspaces-2015-04-08.min.json +++ /dev/null @@ -1,319 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2015-04-08", - "endpointPrefix": "workspaces", - "jsonVersion": "1.1", - "serviceFullName": "Amazon WorkSpaces", - "signatureVersion": "v4", - "targetPrefix": "WorkspacesService", - "protocol": "json" - }, - "operations": { - "CreateWorkspaces": { - "input": { - "type": "structure", - "required": [ - "Workspaces" - ], - "members": { - "Workspaces": { - "type": "list", - "member": { - "shape": "S3" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "FailedRequests": { - "type": "list", - "member": { - "type": "structure", - "members": { - "WorkspaceRequest": { - "shape": "S3" - }, - "ErrorCode": {}, - "ErrorMessage": {} - } - } - }, - "PendingRequests": { - "shape": "Sc" - } - } - } - }, - "DescribeWorkspaceBundles": { - "input": { - "type": "structure", - "members": { - "BundleIds": { - "type": "list", - "member": {} - }, - "Owner": {}, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "Bundles": { - "type": "list", - "member": { - "type": "structure", - "members": { - "BundleId": {}, - "Name": {}, - "Owner": {}, - "Description": {}, - "UserStorage": { - "type": "structure", - "members": { - "Capacity": {} - } - }, - "ComputeType": { - "type": "structure", - "members": { - "Name": {} - } - } - } - } - }, - "NextToken": {} - } - } - }, - "DescribeWorkspaceDirectories": { - "input": { - "type": "structure", - "members": { - "DirectoryIds": { - "type": "list", - "member": {} - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "Directories": { - "type": "list", - "member": { - "type": "structure", - "members": { - "DirectoryId": {}, - "Alias": {}, - "DirectoryName": {}, - "RegistrationCode": {}, - "SubnetIds": { - "type": "list", - "member": {} - }, - "DnsIpAddresses": { - "type": "list", - "member": {} - }, - "CustomerUserName": {}, - "IamRoleId": {}, - "DirectoryType": {}, - "WorkspaceSecurityGroupId": {}, - "State": {}, - "WorkspaceCreationProperties": { - "type": "structure", - "members": { - "EnableWorkDocs": { - "type": "boolean" - }, - "EnableInternetAccess": { - "type": "boolean" - }, - "DefaultOu": {}, - "CustomSecurityGroupId": {}, - "UserEnabledAsLocalAdministrator": { - "type": "boolean" - } - } - } - } - } - }, - "NextToken": {} - } - } - }, - "DescribeWorkspaces": { - "input": { - "type": "structure", - "members": { - "WorkspaceIds": { - "type": "list", - "member": {} - }, - "DirectoryId": {}, - "UserName": {}, - "BundleId": {}, - "Limit": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "Workspaces": { - "shape": "Sc" - }, - "NextToken": {} - } - } - }, - "RebootWorkspaces": { - "input": { - "type": "structure", - "required": [ - "RebootWorkspaceRequests" - ], - "members": { - "RebootWorkspaceRequests": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "WorkspaceId" - ], - "members": { - "WorkspaceId": {} - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "FailedRequests": { - "type": "list", - "member": { - "shape": "S1k" - } - } - } - } - }, - "RebuildWorkspaces": { - "input": { - "type": "structure", - "required": [ - "RebuildWorkspaceRequests" - ], - "members": { - "RebuildWorkspaceRequests": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "WorkspaceId" - ], - "members": { - "WorkspaceId": {} - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "FailedRequests": { - "type": "list", - "member": { - "shape": "S1k" - } - } - } - } - }, - "TerminateWorkspaces": { - "input": { - "type": "structure", - "required": [ - "TerminateWorkspaceRequests" - ], - "members": { - "TerminateWorkspaceRequests": { - "type": "list", - "member": { - "type": "structure", - "required": [ - "WorkspaceId" - ], - "members": { - "WorkspaceId": {} - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "FailedRequests": { - "type": "list", - "member": { - "shape": "S1k" - } - } - } - } - } - }, - "shapes": { - "S3": { - "type": "structure", - "required": [ - "DirectoryId", - "UserName", - "BundleId" - ], - "members": { - "DirectoryId": {}, - "UserName": {}, - "BundleId": {} - } - }, - "Sc": { - "type": "list", - "member": { - "type": "structure", - "members": { - "WorkspaceId": {}, - "DirectoryId": {}, - "UserName": {}, - "IpAddress": {}, - "State": {}, - "BundleId": {}, - "SubnetId": {}, - "ErrorMessage": {}, - "ErrorCode": {} - } - } - }, - "S1k": { - "type": "structure", - "members": { - "WorkspaceId": {}, - "ErrorCode": {}, - "ErrorMessage": {} - } - } - } -} \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/bower.json b/cli/node_modules/aws-sdk/bower.json deleted file mode 100644 index bda489f67..000000000 --- a/cli/node_modules/aws-sdk/bower.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "aws-sdk", - "ignore": [ - "apis", "doc-src", "dist-tools", "eslint-rules", "features", "lib", - "scripts", "tasks", "test", "Gemfile*", "configuration*", - "Rakefile", "package.json", "testem.json", ".*", "index.js" - ], - "main": "dist/aws-sdk.js" -} diff --git a/cli/node_modules/aws-sdk/dist-tools/browser-builder.js b/cli/node_modules/aws-sdk/dist-tools/browser-builder.js deleted file mode 100755 index 664b5dfd4..000000000 --- a/cli/node_modules/aws-sdk/dist-tools/browser-builder.js +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env node - -var path = require('path'); - -var AWS = require('../'); - -var license = [ - '// AWS SDK for JavaScript v' + AWS.VERSION, - '// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.', - '// License at https://sdk.amazonaws.com/js/BUNDLE_LICENSE.txt' -].join('\n') + '\n'; - -function minify(code) { - var uglify = require('uglify-js'); - var minified = uglify.minify(code, {fromString: true}); - return minified.code; -} - -function stripComments(code) { - var lines = code.split(/\r?\n/); - var multiLine = false; - lines = lines.map(function (line) { - var rLine = line; - if (line.match(/^\s*\/\//)) { - rLine = null; - } else if (line.match(/^\s*\/\*/)) { - multiLine = true; - rLine = null; - } - - if (multiLine) { - var multiLineEnd = line.match(/\*\/(.*)/); - if (multiLineEnd) { - multiLine = false; - rLine = multiLineEnd[1]; - } else { - rLine = null; - } - } - - return rLine; - }).filter(function(l) { return l !== null; }); - - var newCode = lines.join('\n'); - newCode = newCode.replace(/\/\*\*[\s\S]+?Copyright\s+.+?Amazon[\s\S]+?\*\//g, ''); - return newCode; -} - -function build(options, callback) { - if (arguments.length === 1) { - callback = options; - options = {}; - } - - var img = require('browserify/node_modules/insert-module-globals'); - img.vars.process = function() { return '{browser:true}'; }; - - if (options.services) process.env.AWS_SERVICES = options.services; - - var browserify = require('browserify'); - var brOpts = { basedir: path.resolve(__dirname, '..') }; - browserify(brOpts).add('./').ignore('domain').bundle(function(err, data) { - if (err) return callback(err); - - var code = (data || '').toString(); - if (options.minify) code = minify(code); - else code = stripComments(code); - - code = license + code; - callback(null, code); - }); -} - -// run if we called this tool directly -if (require.main === module) { - var opts = { - services: process.argv[2] || process.env.SERVICES, - minify: process.env.MINIFY ? true : false - }; - build(opts, function(err, code) { - if (err) console.error(err.message); - else console.log(code); - }); -} - -build.license = license; -module.exports = build; diff --git a/cli/node_modules/aws-sdk/dist-tools/service-collector.js b/cli/node_modules/aws-sdk/dist-tools/service-collector.js deleted file mode 100644 index 0c43fe4f8..000000000 --- a/cli/node_modules/aws-sdk/dist-tools/service-collector.js +++ /dev/null @@ -1,149 +0,0 @@ -var fs = require('fs'); -var util = require('util'); -var path = require('path'); - -var AWS = require('../'); -var apis = require('../lib/api_loader'); - -var defaultServices = 'cloudwatch,cloudwatchlogs,cognitoidentity,cognitosync,devicefarm,dynamodb,dynamodbstreams,ec2,elastictranscoder,kinesis,lambda,mobileanalytics,machinelearning,opsworks,s3,sqs,sns,sts'; -var sanitizeRegex = /[^a-zA-Z0-9,-]/; - -var serviceClasses = {}; -Object.keys(AWS).forEach(function(name) { - if (AWS[name].serviceIdentifier) { - serviceClasses[AWS[name].serviceIdentifier] = AWS[name]; - } -}); - -function getServiceHeader(service) { - if (service === 'all') { - return Object.keys(serviceClasses).map(function(name) { - return getServiceHeader(name); - }).join('\n'); - } - - if (!serviceClasses[service]) return null; - var versions = serviceClasses[service].apiVersions.map(function(version) { - return version.indexOf('*') >= 0 ? null : version; - }).filter(function(c) { return c !== null; }); - - var file = util.format( - 'AWS.apiLoader.services[\'%s\'] = {};\n' + - 'AWS.%s = AWS.Service.defineService(\'%s\', %s);\n', - service, apis.serviceName(service), service, util.inspect(versions)); - var svcPath = path.join(__dirname, '..', 'lib', 'services', service + '.js'); - if (fs.existsSync(svcPath)) { - file += 'require(\'./services/' + service + '\');\n'; - } - - return file; -} - -function getService(service, version) { - if (service === 'all') { - return Object.keys(serviceClasses).map(function(name) { - var out = serviceClasses[name].apiVersions.map(function(svcVersion) { - if (svcVersion.indexOf('*') >= 0) return null; - return getService(name, svcVersion); - }).filter(function(c) { return c !== null; }).join('\n'); - - return out; - }).join('\n'); - } - - var svc, api; - if (!serviceClasses[service]) { - return null; - } - - try { - var ClassName = serviceClasses[service]; - svc = new ClassName({apiVersion: version, endpoint: 'localhost'}); - api = apis.load(service, svc.api.apiVersion); - } catch (e) { - return null; - } - - var line = util.format( - 'AWS.apiLoader.services[\'%s\'][\'%s\'] = %s;', - service, svc.api.apiVersion, JSON.stringify(api)); - - return line; -} - -function ServiceCollector(services) { - var builtServices = {}; - - function buildService(name, usingDefaultServices) { - var match = name.match(/^(.+?)(?:-(.+?))?$/); - var service = match[1], version = match[2] || 'latest'; - var contents = []; - var lines, err; - - if (!builtServices[service]) { - builtServices[service] = {}; - - lines = getServiceHeader(service); - if (lines === null) { - if (!usingDefaultServices) { - err = new Error('Invalid module: ' + service); - err.name = 'InvalidModuleError'; - throw err; - } - } else { - contents.push(lines); - } - } - - if (!builtServices[service][version]) { - builtServices[service][version] = true; - - lines = getService(service, version); - if (lines === null) { - if (!usingDefaultServices) { - err = new Error('Invalid module: ' + service + '-' + version); - err.name = 'InvalidModuleError'; - throw err; - } - } else { - contents.push(lines); - } - } - - return contents.join('\n'); - } - - var serviceCode = ''; - var usingDefaultServicesToggle = false; - if (!services) { - usingDefaultServicesToggle = true; - services = defaultServices; - } - if (services.match(sanitizeRegex)) { - throw new Error('Incorrectly formatted service names'); - } - - var invalidModules = []; - var stsIncluded = false; - services.split(',').sort().forEach(function(name) { - if (name.match(/^sts\b/) || name === 'all') stsIncluded = true; - try { - serviceCode += buildService(name, usingDefaultServicesToggle) + '\n'; - } catch (e) { - if (e.name === 'InvalidModuleError') invalidModules.push(name); - else throw e; - } - }); - - if (!stsIncluded) { - serviceCode += buildService('sts') + '\n'; - } - - if (invalidModules.length > 0) { - throw new Error('Missing modules: ' + invalidModules.join(', ')); - } - - return serviceCode; -} - -module.exports = ServiceCollector; diff --git a/cli/node_modules/aws-sdk/dist-tools/transform.js b/cli/node_modules/aws-sdk/dist-tools/transform.js deleted file mode 100644 index cb980c35a..000000000 --- a/cli/node_modules/aws-sdk/dist-tools/transform.js +++ /dev/null @@ -1,19 +0,0 @@ -var Transform = require('stream').Transform; -var collector = require('./service-collector'); -var license = require('./browser-builder').license; - -module.exports = function(file) { - var stream = new Transform(); - stream._transform = function(data, encoding, callback) { - callback(null, data); - }; - - if (file.match(/[\/\\]lib[\/\\]browser\.js$/)) { - stream.push(license); - - var src = collector(process.env.AWS_SERVICES); - stream._flush = function(callback) { stream.push(src); callback(); }; - } - - return stream; -}; diff --git a/cli/node_modules/aws-sdk/index.js b/cli/node_modules/aws-sdk/index.js deleted file mode 100644 index fd230f07d..000000000 --- a/cli/node_modules/aws-sdk/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// Convenience file to require the SDK from the root of the repository -module.exports = require('./lib/aws'); diff --git a/cli/node_modules/aws-sdk/lib/api_loader.js b/cli/node_modules/aws-sdk/lib/api_loader.js deleted file mode 100644 index 3aa059097..000000000 --- a/cli/node_modules/aws-sdk/lib/api_loader.js +++ /dev/null @@ -1,139 +0,0 @@ -var fs = require('fs'); -var path = require('path'); - -var apiRoot = path.join(__dirname, '..', 'apis'); -var serviceMap = null; -var serviceIdentifiers = []; -var serviceNames = []; - -function buildServiceMap() { - if (serviceMap !== null) return; - - // load info file for API metadata - serviceMap = require(path.join(apiRoot, 'metadata.json')); - - var prefixMap = {}; - Object.keys(serviceMap).forEach(function(identifier) { - serviceMap[identifier].prefix = serviceMap[identifier].prefix || identifier; - prefixMap[serviceMap[identifier].prefix] = identifier; - }); - - fs.readdirSync(apiRoot).forEach(function (file) { - var match = file.match(/^(.+?)-(\d+-\d+-\d+)\.(normal|min)\.json$/); - if (match) { - var id = prefixMap[match[1]], version = match[2]; - if (serviceMap[id]) { - serviceMap[id].versions = serviceMap[id].versions || []; - if (serviceMap[id].versions.indexOf(version) < 0) { - serviceMap[id].versions.push(version); - } - } - } - }); - - Object.keys(serviceMap).forEach(function(identifier) { - serviceMap[identifier].versions = serviceMap[identifier].versions.sort(); - serviceIdentifiers.push(identifier); - serviceNames.push(serviceMap[identifier].name); - }); -} - -function getServices() { - buildServiceMap(); - return serviceIdentifiers; -} - -function getServiceNames() { - buildServiceMap(); - return serviceNames; -} - -function serviceVersions(svc) { - buildServiceMap(); - svc = serviceIdentifier(svc); - return serviceMap[svc] ? serviceMap[svc].versions : null; -} - -function serviceName(svc) { - buildServiceMap(); - svc = serviceIdentifier(svc); - return serviceMap[svc] ? serviceMap[svc].name : null; -} - -function serviceFile(svc, version) { - buildServiceMap(); - svc = serviceIdentifier(svc); - if (!serviceMap[svc]) return null; - - var prefix = serviceMap[svc].prefix || svc; - var filePath; - ['min', 'api', 'normal'].some(function(testSuffix) { - filePath = apiRoot + '/' + prefix.toLowerCase() + '-' + version + '.' + - testSuffix + '.json'; - - return fs.existsSync(filePath); - }); - return filePath; -} - -function paginatorsFile(svc, version) { - buildServiceMap(); - svc = serviceIdentifier(svc); - if (!serviceMap[svc]) return null; - - var prefix = serviceMap[svc].prefix || svc; - return apiRoot + '/' + prefix + '-' + version + '.paginators.json'; -} - -function waitersFile(svc, version) { - buildServiceMap(); - svc = serviceIdentifier(svc); - if (!serviceMap[svc]) return null; - - var prefix = serviceMap[svc].prefix || svc; - return apiRoot + '/' + prefix + '-' + version + '.waiters.json'; -} - -function load(svc, version) { - buildServiceMap(); - svc = serviceIdentifier(svc); - if (version === 'latest') version = null; - version = version || serviceMap[svc].versions[serviceMap[svc].versions.length - 1]; - if (!serviceMap[svc]) return null; - - var api = require(serviceFile(svc, version)); - - // Try to load paginators - if (fs.existsSync(paginatorsFile(svc, version))) { - var paginators = require(paginatorsFile(svc, version)); - api.paginators = paginators.pagination; - } - - // Try to load waiters - if (fs.existsSync(waitersFile(svc, version))) { - var waiters = require(waitersFile(svc, version)); - api.waiters = waiters.waiters; - } - - return api; -} - -function serviceIdentifier(svc) { - return svc.toLowerCase(); -} - -module.exports = { - serviceVersions: serviceVersions, - serviceName: serviceName, - serviceIdentifier: serviceIdentifier, - serviceFile: serviceFile, - load: load -}; - -Object.defineProperty(module.exports, 'services', { - enumerable: true, get: getServices -}); - -Object.defineProperty(module.exports, 'serviceNames', { - enumerable: true, get: getServiceNames -}); diff --git a/cli/node_modules/aws-sdk/lib/aws.js b/cli/node_modules/aws-sdk/lib/aws.js deleted file mode 100644 index d293b4d35..000000000 --- a/cli/node_modules/aws-sdk/lib/aws.js +++ /dev/null @@ -1,52 +0,0 @@ -var AWS = require('./core'); -module.exports = AWS; - -// Use default API loader function -AWS.apiLoader = require('./api_loader').load; - -// Load the xml2js XML parser -AWS.XML.Parser = require('./xml/node_parser'); - -// Load Node HTTP client -require('./http/node'); - -// Load all service classes -require('./services'); - -// Load custom credential providers -require('./credentials/ec2_metadata_credentials'); -require('./credentials/environment_credentials'); -require('./credentials/file_system_credentials'); -require('./credentials/shared_ini_file_credentials'); - -// Setup default chain providers -AWS.CredentialProviderChain.defaultProviders = [ - function () { return new AWS.EnvironmentCredentials('AWS'); }, - function () { return new AWS.EnvironmentCredentials('AMAZON'); }, - function () { return new AWS.SharedIniFileCredentials(); }, - function () { return new AWS.EC2MetadataCredentials(); } -]; - -// Update configuration keys -AWS.util.update(AWS.Config.prototype.keys, { - credentials: function () { - var credentials = null; - new AWS.CredentialProviderChain([ - function () { return new AWS.EnvironmentCredentials('AWS'); }, - function () { return new AWS.EnvironmentCredentials('AMAZON'); }, - function () { return new AWS.SharedIniFileCredentials(); } - ]).resolve(function(err, creds) { - if (!err) credentials = creds; - }); - return credentials; - }, - credentialProvider: function() { - return new AWS.CredentialProviderChain(); - }, - region: function() { - return process.env.AWS_REGION || process.env.AMAZON_REGION; - } -}); - -// Reset configuration -AWS.config = new AWS.Config(); diff --git a/cli/node_modules/aws-sdk/lib/browser.js b/cli/node_modules/aws-sdk/lib/browser.js deleted file mode 100644 index 1c4a4f355..000000000 --- a/cli/node_modules/aws-sdk/lib/browser.js +++ /dev/null @@ -1,20 +0,0 @@ -var AWS = require('./core'); - -// Load browser API loader -AWS.apiLoader = function(svc, version) { - return AWS.apiLoader.services[svc][version]; -}; - -/** - * @api private - */ -AWS.apiLoader.services = {}; - -// Load the DOMParser XML parser -AWS.XML.Parser = require('./xml/browser_parser'); - -// Load the XHR HttpClient -require('./http/xhr'); - -if (typeof window !== 'undefined') window.AWS = AWS; -if (typeof module !== 'undefined') module.exports = AWS; diff --git a/cli/node_modules/aws-sdk/lib/config.js b/cli/node_modules/aws-sdk/lib/config.js deleted file mode 100644 index 2694f2512..000000000 --- a/cli/node_modules/aws-sdk/lib/config.js +++ /dev/null @@ -1,415 +0,0 @@ -var AWS = require('./core'); -require('./credentials'); -require('./credentials/credential_provider_chain'); - -/** - * The main configuration class used by all service objects to set - * the region, credentials, and other options for requests. - * - * By default, credentials and region settings are left unconfigured. - * This should be configured by the application before using any - * AWS service APIs. - * - * In order to set global configuration options, properties should - * be assigned to the global {AWS.config} object. - * - * @see AWS.config - * - * @!group General Configuration Options - * - * @!attribute credentials - * @return [AWS.Credentials] the AWS credentials to sign requests with. - * - * @!attribute region - * @example Set the global region setting to us-west-2 - * AWS.config.update({region: 'us-west-2'}); - * @return [AWS.Credentials] The region to send service requests to. - * @see http://docs.amazonwebservices.com/general/latest/gr/rande.html - * A list of available endpoints for each AWS service - * - * @!attribute maxRetries - * @return [Integer] the maximum amount of retries to perform for a - * service request. By default this value is calculated by the specific - * service object that the request is being made to. - * - * @!attribute maxRedirects - * @return [Integer] the maximum amount of redirects to follow for a - * service request. Defaults to 10. - * - * @!attribute paramValidation - * @return [Boolean] whether input parameters should be validated against - * the operation description before sending the request. Defaults to true. - * - * @!attribute computeChecksums - * @return [Boolean] whether to compute checksums for payload bodies when - * the service accepts it (currently supported in S3 only). - * - * @!attribute convertResponseTypes - * @return [Boolean] whether types are converted when parsing response data. - * Currently only supported for JSON based services. Turning this off may - * improve performance on large response payloads. Defaults to `true`. - * - * @!attribute sslEnabled - * @return [Boolean] whether SSL is enabled for requests - * - * @!attribute s3ForcePathStyle - * @return [Boolean] whether to force path style URLs for S3 objects - * - * @!attribute s3BucketEndpoint - * @note Setting this configuration option requires an `endpoint` to be - * provided explicitly to the service constructor. - * @return [Boolean] whether the provided endpoint addresses an individual - * bucket (false if it addresses the root API endpoint). - * - * @!attribute httpOptions - * @return [map] A set of options to pass to the low-level HTTP request. - * Currently supported options are: - * - * * **proxy** [String] — the URL to proxy requests through - * * **agent** [http.Agent, https.Agent] — the Agent object to perform - * HTTP requests with. Used for connection pooling. Defaults to the global - * agent (`http.globalAgent`) for non-SSL connections. Note that for - * SSL connections, a special Agent object is used in order to enable - * peer certificate verification. This feature is only supported in the - * Node.js environment. - * * **timeout** [Integer] — The number of milliseconds to wait before - * giving up on a connection attempt. Defaults to two minutes (120000). - * * **xhrAsync** [Boolean] — Whether the SDK will send asynchronous - * HTTP requests. Used in the browser environment only. Set to false to - * send requests synchronously. Defaults to true (async on). - * * **xhrWithCredentials** [Boolean] — Sets the "withCredentials" - * property of an XMLHttpRequest object. Used in the browser environment - * only. Defaults to false. - * @!attribute logger - * @return [#write,#log] an object that responds to .write() (like a stream) - * or .log() (like the console object) in order to log information about - * requests - * - * @!attribute systemClockOffset - * @return [Number] an offset value in milliseconds to apply to all signing - * times. Use this to compensate for clock skew when your system may be - * out of sync with the service time. Note that this configuration option - * can only be applied to the global `AWS.config` object and cannot be - * overridden in service-specific configuration. Defaults to 0 milliseconds. - * - * @!attribute signatureVersion - * @return [String] the signature version to sign requests with (overriding - * the API configuration). Possible values are: 'v2', 'v3', 'v4'. - */ -AWS.Config = AWS.util.inherit({ - /** - * @!endgroup - */ - - /** - * Creates a new configuration object. This is the object that passes - * option data along to service requests, including credentials, security, - * region information, and some service specific settings. - * - * @example Creating a new configuration object with credentials and region - * var config = new AWS.Config({ - * accessKeyId: 'AKID', secretAccessKey: 'SECRET', region: 'us-west-2' - * }); - * @option options accessKeyId [String] your AWS access key ID. - * @option options secretAccessKey [String] your AWS secret access key. - * @option options sessionToken [AWS.Credentials] the optional AWS - * session token to sign requests with. - * @option options credentials [AWS.Credentials] the AWS credentials - * to sign requests with. You can either specify this object, or - * specify the accessKeyId and secretAccessKey options directly. - * @option options credentialProvider [AWS.CredentialProviderChain] the - * provider chain used to resolve credentials if no static `credentials` - * property is set. - * @option options region [String] the region to send service requests to. - * See {region} for more information. - * @option options maxRetries [Integer] the maximum amount of retries to - * attempt with a request. See {maxRetries} for more information. - * @option options maxRedirects [Integer] the maximum amount of redirects to - * follow with a request. See {maxRedirects} for more information. - * @option options sslEnabled [Boolean] whether to enable SSL for - * requests. - * @option options paramValidation [Boolean] whether parameter validation - * is on. - * @option options computeChecksums [Boolean] whether to compute checksums - * for payload bodies when the service accepts it (currently supported - * in S3 only) - * @option options convertResponseTypes [Boolean] whether types are converted - * when parsing response data. Currently only supported for JSON based - * services. Turning this off may improve performance on large response - * payloads. Defaults to `true`. - * @option options s3ForcePathStyle [Boolean] whether to force path - * style URLs for S3 objects. - * @option options s3BucketEndpoint [Boolean] whether the provided endpoint - * addresses an individual bucket (false if it addresses the root API - * endpoint). Note that setting this configuration option requires an - * `endpoint` to be provided explicitly to the service constructor. - * @option options httpOptions [map] A set of options to pass to the low-level - * HTTP request. Currently supported options are: - * - * * **proxy** [String] — the URL to proxy requests through - * * **agent** [http.Agent, https.Agent] — the Agent object to perform - * HTTP requests with. Used for connection pooling. Defaults to the global - * agent (`http.globalAgent`) for non-SSL connections. Note that for - * SSL connections, a special Agent object is used in order to enable - * peer certificate verification. This feature is only available in the - * Node.js environment. - * * **timeout** [Integer] — Sets the socket to timeout after timeout - * milliseconds of inactivity on the socket. Defaults to two minutes - * (120000). - * * **xhrAsync** [Boolean] — Whether the SDK will send asynchronous - * HTTP requests. Used in the browser environment only. Set to false to - * send requests synchronously. Defaults to true (async on). - * * **xhrWithCredentials** [Boolean] — Sets the "withCredentials" - * property of an XMLHttpRequest object. Used in the browser environment - * only. Defaults to false. - * @option options apiVersion [String, Date] a String in YYYY-MM-DD format - * (or a date) that represents the latest possible API version that can be - * used in all services (unless overridden by `apiVersions`). Specify - * 'latest' to use the latest possible version. - * @option options apiVersions [map] a map of service - * identifiers (the lowercase service class name) with the API version to - * use when instantiating a service. Specify 'latest' for each individual - * that can use the latest available version. - * @option options logger [#write,#log] an object that responds to .write() - * (like a stream) or .log() (like the console object) in order to log - * information about requests - * @option options systemClockOffset [Number] an offset value in milliseconds - * to apply to all signing times. Use this to compensate for clock skew - * when your system may be out of sync with the service time. Note that - * this configuration option can only be applied to the global `AWS.config` - * object and cannot be overridden in service-specific configuration. - * Defaults to 0 milliseconds. - * @option options signatureVersion [String] the signature version to sign - * requests with (overriding the API configuration). Possible values are: - * 'v2', 'v3', 'v4'. - */ - constructor: function Config(options) { - if (options === undefined) options = {}; - options = this.extractCredentials(options); - - AWS.util.each.call(this, this.keys, function (key, value) { - this.set(key, options[key], value); - }); - }, - - /** - * @!group Managing Credentials - */ - - /** - * Loads credentials from the configuration object. This is used internally - * by the SDK to ensure that refreshable {Credentials} objects are properly - * refreshed and loaded when sending a request. If you want to ensure that - * your credentials are loaded prior to a request, you can use this method - * directly to provide accurate credential data stored in the object. - * - * @note If you configure the SDK with static or environment credentials, - * the credential data should already be present in {credentials} attribute. - * This method is primarily necessary to load credentials from asynchronous - * sources, or sources that can refresh credentials periodically. - * @example Getting your access key - * AWS.config.getCredentials(function(err) { - * if (err) console.log(err.stack); // credentials not loaded - * else console.log("Access Key:", AWS.config.credentials.accessKeyId); - * }) - * @callback callback function(err) - * Called when the {credentials} have been properly set on the configuration - * object. - * - * @param err [Error] if this is set, credentials were not successfuly - * loaded and this error provides information why. - * @see credentials - * @see Credentials - */ - getCredentials: function getCredentials(callback) { - var self = this; - - function finish(err) { - callback(err, err ? null : self.credentials); - } - - function credError(msg, err) { - return new AWS.util.error(err || new Error(), { - code: 'CredentialsError', message: msg - }); - } - - function getAsyncCredentials() { - self.credentials.get(function(err) { - if (err) { - var msg = 'Could not load credentials from ' + - self.credentials.constructor.name; - err = credError(msg, err); - } - finish(err); - }); - } - - function getStaticCredentials() { - var err = null; - if (!self.credentials.accessKeyId || !self.credentials.secretAccessKey) { - err = credError('Missing credentials'); - } - finish(err); - } - - if (self.credentials) { - if (typeof self.credentials.get === 'function') { - getAsyncCredentials(); - } else { // static credentials - getStaticCredentials(); - } - } else if (self.credentialProvider) { - self.credentialProvider.resolve(function(err, creds) { - if (err) { - err = credError('Could not load credentials from any providers', err); - } - self.credentials = creds; - finish(err); - }); - } else { - finish(credError('No credentials to load')); - } - }, - - /** - * @!group Loading and Setting Configuration Options - */ - - /** - * @overload update(options, allowUnknownKeys = false) - * Updates the current configuration object with new options. - * - * @example Update maxRetries property of a configuration object - * config.update({maxRetries: 10}); - * @param [Object] options a map of option keys and values. - * @param [Boolean] allowUnknownKeys whether unknown keys can be set on - * the configuration object. Defaults to `false`. - * @see constructor - */ - update: function update(options, allowUnknownKeys) { - allowUnknownKeys = allowUnknownKeys || false; - options = this.extractCredentials(options); - AWS.util.each.call(this, options, function (key, value) { - if (allowUnknownKeys || this.keys.hasOwnProperty(key) || - AWS.Service.hasService(key)) { - this.set(key, value); - } - }); - }, - - /** - * Loads configuration data from a JSON file into this config object. - * @note Loading configuration will reset all existing configuration - * on the object. - * @!macro nobrowser - * @param path [String] the path to load configuration from - * @return [AWS.Config] the same configuration object - */ - loadFromPath: function loadFromPath(path) { - this.clear(); - - var options = JSON.parse(AWS.util.readFileSync(path)); - var fileSystemCreds = new AWS.FileSystemCredentials(path); - var chain = new AWS.CredentialProviderChain(); - chain.providers.unshift(fileSystemCreds); - chain.resolve(function (err, creds) { - if (err) throw err; - else options.credentials = creds; - }); - - this.constructor(options); - - return this; - }, - - /** - * Clears configuration data on this object - * - * @api private - */ - clear: function clear() { - /*jshint forin:false */ - AWS.util.each.call(this, this.keys, function (key) { - delete this[key]; - }); - - // reset credential provider - this.set('credentials', undefined); - this.set('credentialProvider', undefined); - }, - - /** - * Sets a property on the configuration object, allowing for a - * default value - * @api private - */ - set: function set(property, value, defaultValue) { - if (value === undefined) { - if (defaultValue === undefined) { - defaultValue = this.keys[property]; - } - if (typeof defaultValue === 'function') { - this[property] = defaultValue.call(this); - } else { - this[property] = defaultValue; - } - } else if (property === 'httpOptions' && this[property]) { - // deep merge httpOptions - this[property] = AWS.util.merge(this[property], value); - } else { - this[property] = value; - } - }, - - /** - * All of the keys with their default values. - * - * @constant - * @api private - */ - keys: { - credentials: null, - credentialProvider: null, - region: null, - logger: null, - apiVersions: {}, - apiVersion: null, - endpoint: undefined, - httpOptions: { - timeout: 120000 - }, - maxRetries: undefined, - maxRedirects: 10, - paramValidation: true, - sslEnabled: true, - s3ForcePathStyle: false, - s3BucketEndpoint: false, - computeChecksums: true, - convertResponseTypes: true, - dynamoDbCrc32: true, - systemClockOffset: 0, - signatureVersion: null - }, - - /** - * Extracts accessKeyId, secretAccessKey and sessionToken - * from a configuration hash. - * - * @api private - */ - extractCredentials: function extractCredentials(options) { - if (options.accessKeyId && options.secretAccessKey) { - options = AWS.util.copy(options); - options.credentials = new AWS.Credentials(options); - } - return options; - } -}); - -/** - * @return [AWS.Config] The global configuration object singleton instance - * @readonly - * @see AWS.Config - */ -AWS.config = new AWS.Config(); diff --git a/cli/node_modules/aws-sdk/lib/core.js b/cli/node_modules/aws-sdk/lib/core.js deleted file mode 100644 index 3a6d662d1..000000000 --- a/cli/node_modules/aws-sdk/lib/core.js +++ /dev/null @@ -1,107 +0,0 @@ -/** - * The main AWS namespace - */ -var AWS = { util: require('./util') }; - -/** - * @api private - * @!macro [new] nobrowser - * @note This feature is not supported in the browser environment of the SDK. - */ -var _hidden = {}; _hidden.toString(); // hack to parse macro - -module.exports = AWS; - -AWS.util.update(AWS, { - - /** - * @constant - */ - VERSION: '2.1.40', - - /** - * @api private - */ - Signers: {}, - - /** - * @api private - */ - Protocol: { - Json: require('./protocol/json'), - Query: require('./protocol/query'), - Rest: require('./protocol/rest'), - RestJson: require('./protocol/rest_json'), - RestXml: require('./protocol/rest_xml') - }, - - /** - * @api private - */ - XML: { - Builder: require('./xml/builder'), - Parser: null // conditionally set based on environment - }, - - /** - * @api private - */ - JSON: { - Builder: require('./json/builder'), - Parser: require('./json/parser') - }, - - /** - * @api private - */ - Model: { - Api: require('./model/api'), - Operation: require('./model/operation'), - Shape: require('./model/shape'), - Paginator: require('./model/paginator'), - ResourceWaiter: require('./model/resource_waiter') - }, - - util: require('./util'), - - /** - * @api private - */ - apiLoader: function() { throw new Error('No API loader set'); } -}); - -require('./service'); - -require('./credentials'); -require('./credentials/credential_provider_chain'); -require('./credentials/temporary_credentials'); -require('./credentials/web_identity_credentials'); -require('./credentials/cognito_identity_credentials'); -require('./credentials/saml_credentials'); - -require('./config'); -require('./http'); -require('./sequential_executor'); -require('./event_listeners'); -require('./request'); -require('./response'); -require('./resource_waiter'); -require('./signers/request_signer'); -require('./param_validator'); - -/** - * @readonly - * @return [AWS.SequentialExecutor] a collection of global event listeners that - * are attached to every sent request. - * @see AWS.Request AWS.Request for a list of events to listen for - * @example Logging the time taken to send a request - * AWS.events.on('send', function startSend(resp) { - * resp.startTime = new Date().getTime(); - * }).on('complete', function calculateTime(resp) { - * var time = (new Date().getTime() - resp.startTime) / 1000; - * console.log('Request took ' + time + ' seconds'); - * }); - * - * new AWS.S3().listBuckets(); // prints 'Request took 0.285 seconds' - */ -AWS.events = new AWS.SequentialExecutor(); diff --git a/cli/node_modules/aws-sdk/lib/credentials.js b/cli/node_modules/aws-sdk/lib/credentials.js deleted file mode 100644 index 70a234f92..000000000 --- a/cli/node_modules/aws-sdk/lib/credentials.js +++ /dev/null @@ -1,150 +0,0 @@ -var AWS = require('./core'); - -/** - * Represents your AWS security credentials, specifically the - * {accessKeyId}, {secretAccessKey}, and optional {sessionToken}. - * Creating a `Credentials` object allows you to pass around your - * security information to configuration and service objects. - * - * Note that this class typically does not need to be constructed manually, - * as the {AWS.Config} and {AWS.Service} classes both accept simple - * options hashes with the three keys. These structures will be converted - * into Credentials objects automatically. - * - * ## Expiring and Refreshing Credentials - * - * Occasionally credentials can expire in the middle of a long-running - * application. In this case, the SDK will automatically attempt to - * refresh the credentials from the storage location if the Credentials - * class implements the {refresh} method. - * - * If you are implementing a credential storage location, you - * will want to create a subclass of the `Credentials` class and - * override the {refresh} method. This method allows credentials to be - * retrieved from the backing store, be it a file system, database, or - * some network storage. The method should reset the credential attributes - * on the object. - * - * @!attribute expired - * @return [Boolean] whether the credentials have been expired and - * require a refresh. Used in conjunction with {expireTime}. - * @!attribute expireTime - * @return [Date] a time when credentials should be considered expired. Used - * in conjunction with {expired}. - * @!attribute accessKeyId - * @return [String] the AWS access key ID - * @!attribute secretAccessKey - * @return [String] the AWS secret access key - * @!attribute sessionToken - * @return [String] an optional AWS session token - */ -AWS.Credentials = AWS.util.inherit({ - /** - * A credentials object can be created using positional arguments or an options - * hash. - * - * @overload AWS.Credentials(accessKeyId, secretAccessKey, sessionToken=null) - * Creates a Credentials object with a given set of credential information - * as positional arguments. - * @param accessKeyId [String] the AWS access key ID - * @param secretAccessKey [String] the AWS secret access key - * @param sessionToken [String] the optional AWS session token - * @example Create a credentials object with AWS credentials - * var creds = new AWS.Credentials('akid', 'secret', 'session'); - * @overload AWS.Credentials(options) - * Creates a Credentials object with a given set of credential information - * as an options hash. - * @option options accessKeyId [String] the AWS access key ID - * @option options secretAccessKey [String] the AWS secret access key - * @option options sessionToken [String] the optional AWS session token - * @example Create a credentials object with AWS credentials - * var creds = new AWS.Credentials({ - * accessKeyId: 'akid', secretAccessKey: 'secret', sessionToken: 'session' - * }); - */ - constructor: function Credentials() { - // hide secretAccessKey from being displayed with util.inspect - AWS.util.hideProperties(this, ['secretAccessKey']); - - this.expired = false; - this.expireTime = null; - if (arguments.length === 1 && typeof arguments[0] === 'object') { - var creds = arguments[0].credentials || arguments[0]; - this.accessKeyId = creds.accessKeyId; - this.secretAccessKey = creds.secretAccessKey; - this.sessionToken = creds.sessionToken; - } else { - this.accessKeyId = arguments[0]; - this.secretAccessKey = arguments[1]; - this.sessionToken = arguments[2]; - } - }, - - /** - * @return [Integer] the window size in seconds to attempt refreshhing of - * credentials before the expireTime occurs. - */ - expiryWindow: 15, - - /** - * @return [Boolean] whether the credentials object should call {refresh} - * @note Subclasses should override this method to provide custom refresh - * logic. - */ - needsRefresh: function needsRefresh() { - var currentTime = AWS.util.date.getDate().getTime(); - var adjustedTime = new Date(currentTime + this.expiryWindow * 1000); - - if (this.expireTime && adjustedTime > this.expireTime) { - return true; - } else { - return this.expired || !this.accessKeyId || !this.secretAccessKey; - } - }, - - /** - * Gets the existing credentials, refreshing them if they are not yet loaded - * or have expired. Users should call this method before using {refresh}, - * as this will not attempt to reload credentials when they are already - * loaded into the object. - * - * @callback callback function(err) - * Called when the instance metadata service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - */ - get: function get(callback) { - var self = this; - if (this.needsRefresh()) { - this.refresh(function(err) { - if (!err) self.expired = false; // reset expired flag - if (callback) callback(err); - }); - } else if (callback) { - callback(); - } - }, - - /** - * Refreshes the credentials. Users should call {get} before attempting - * to forcibly refresh credentials. - * - * @callback callback function(err) - * Called when the instance metadata service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @note Subclasses should override this class to reset the - * {accessKeyId}, {secretAccessKey} and optional {sessionToken} - * on the credentials object and then call the callback with - * any error information. - * @see get - */ - refresh: function refresh(callback) { - this.expired = false; - callback(); - } -}); diff --git a/cli/node_modules/aws-sdk/lib/credentials/cognito_identity_credentials.js b/cli/node_modules/aws-sdk/lib/credentials/cognito_identity_credentials.js deleted file mode 100644 index 6143cd4f4..000000000 --- a/cli/node_modules/aws-sdk/lib/credentials/cognito_identity_credentials.js +++ /dev/null @@ -1,306 +0,0 @@ -var AWS = require('../core'); - -/** - * Represents credentials retrieved from STS Web Identity Federation using - * the Amazon Cognito Identity service. - * - * By default this provider gets credentials using the - * {AWS.CognitoIdentity.getCredentialsForIdentity} service operation, - * after first getting an `IdentityId` from {AWS.CognitoIdentity.getId}. This - * operation requires an `IdentityPoolId` (Amazon Cognito Identity Pool ID). - * If a `RoleArn` is provided, then this provider gets credentials using the - * {AWS.STS.assumeRoleWithWebIdentity} service operation, after first getting - * an Open ID token from {AWS.CognitoIdentity.getOpenIdToken}. These operations - * require an `IdentityPoolId` (Amazon Cognito Identity Pool ID), and `RoleArn` - * containing the ARN of the IAM trust policy for the Amazon Cognito role that - * the user will log into. - * - * In addition, if this credential provider is used to provide authenticated - * login, the `Logins` map may be set to the tokens provided by the respective - * identity providers. See {constructor} for an example on creating a credentials - * object with proper property values. - * - * ## Refreshing Credentials from Identity Service - * - * In addition to AWS credentials expiring after a given amount of time, the - * login token from the identity provider will also expire. Once this token - * expires, it will not be usable to refresh AWS credentials, and another - * token will be needed. The SDK does not manage refreshing of the token value, - * but this can be done through a "refresh token" supported by most identity - * providers. Consult the documentation for the identity provider for refreshing - * tokens. Once the refreshed token is acquired, you should make sure to update - * this new token in the credentials object's {params} property. The following - * code will update the WebIdentityToken, assuming you have retrieved an updated - * token from the identity provider: - * - * ```javascript - * AWS.config.credentials.params.Logins['graph.facebook.com'] = updatedToken; - * ``` - * - * Future calls to `credentials.refresh()` will now use the new token. - * - * @!attribute params - * @return [map] the map of params passed to - * {AWS.CognitoIdentity.getId}, - * {AWS.CognitoIdentity.getOpenIdToken}, and - * {AWS.STS.assumeRoleWithWebIdentity}. To update the token, set the - * `params.WebIdentityToken` property. - * @!attribute data - * @return [map] the raw data response from the call to - * {AWS.CognitoIdentity.getCredentialsForIdentity}, or - * {AWS.STS.assumeRoleWithWebIdentity}. Use this if you want to get - * access to other properties from the response. - * @!attribute identityId - * @return [String] the Cognito ID returned by the last call to - * {AWS.CognitoIdentity.getOpenIdToken}. This ID represents the actual - * final resolved identity ID from Amazon Cognito. - */ -AWS.CognitoIdentityCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * @api private - */ - localStorageKey: { - id: 'aws.cognito.identity-id.', - providers: 'aws.cognito.identity-providers.' - }, - - /** - * Creates a new credentials object. - * @param (see AWS.CognitoIdentity.getId) - * @param (see AWS.STS.assumeRoleWithWebIdentity) - * @param (see AWS.CognitoIdentity.getOpenIdToken) - * @example Creating a new credentials object - * AWS.config.credentials = new AWS.CognitoIdentityCredentials({ - * IdentityPoolId: 'us-east-1:1699ebc0-7900-4099-b910-2df94f52a030', - * // optional, only necessary when the identity pool is not configured - * // to use IAM roles in the Amazon Cognito Console - * RoleArn: 'arn:aws:iam::1234567890:role/MYAPP-CognitoIdentity', - * Logins: { // optional tokens, used for authenticated login - * 'graph.facebook.com': 'FBTOKEN', - * 'www.amazon.com': 'AMAZONTOKEN', - * 'accounts.google.com': 'GOOGLETOKEN' - * }, - * RoleSessionName: 'web' // optional name, defaults to web-identity - * }); - * @see AWS.STS.assumeRoleWithWebIdentity - */ - constructor: function CognitoIdentityCredentials(params) { - AWS.Credentials.call(this); - this.expired = true; - this.params = params; - this.data = null; - this.identityId = null; - this.loadCachedId(); - }, - - /** - * Refreshes credentials using {AWS.STS.assumeRoleWithWebIdentity} - * - * @callback callback function(err) - * Called when the STS service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - var self = this; - self.createClients(); - self.data = null; - self.identityId = null; - self.getId(function(err) { - if (!err) { - if (!self.params.RoleArn) { - self.getCredentialsForIdentity(callback); - } else { - self.getCredentialsFromSTS(callback); - } - } else { - self.clearCachedId(); - callback(err); - } - }); - }, - - /** - * Clears the cached Cognito ID associated with the currently configured - * identity pool ID. Use this to manually invalidate your cache if - * the identity pool ID was deleted. - */ - clearCachedId: function clearCache() { - this.identityId = null; - delete this.params.IdentityId; - - var poolId = this.params.IdentityPoolId; - delete this.storage[this.localStorageKey.id + poolId]; - delete this.storage[this.localStorageKey.providers + poolId]; - }, - - /** - * Retrieves a Cognito ID, loading from cache if it was already retrieved - * on this device. - * - * @callback callback function(err, identityId) - * @param err [Error, null] an error object if the call failed or null if - * it succeeded. - * @param identityId [String, null] if successful, the callback will return - * the Cognito ID. - * @note If not loaded explicitly, the Cognito ID is loaded and stored in - * localStorage in the browser environment of a device. - * @api private - */ - getId: function getId(callback) { - var self = this; - if (typeof self.params.IdentityId === 'string') { - return callback(null, self.params.IdentityId); - } - - self.cognito.getId(function(err, data) { - if (!err && data.IdentityId) { - self.params.IdentityId = data.IdentityId; - callback(null, data.IdentityId); - } else { - callback(err); - } - }); - }, - - - /** - * @api private - */ - loadCredentials: function loadCredentials(data, credentials) { - if (!data || !credentials) return; - credentials.expired = false; - credentials.accessKeyId = data.Credentials.AccessKeyId; - credentials.secretAccessKey = data.Credentials.SecretKey; - credentials.sessionToken = data.Credentials.SessionToken; - credentials.expireTime = data.Credentials.Expiration; - }, - - /** - * @api private - */ - getCredentialsForIdentity: function getCredentialsForIdentity(callback) { - var self = this; - self.cognito.getCredentialsForIdentity(function(err, data) { - if (!err) { - self.cacheId(data); - self.data = data; - self.loadCredentials(self.data, self); - } else { - self.clearCachedId(); - } - callback(err); - }); - }, - - /** - * @api private - */ - getCredentialsFromSTS: function getCredentialsFromSTS(callback) { - var self = this; - self.cognito.getOpenIdToken(function(err, data) { - if (!err) { - self.cacheId(data); - self.params.WebIdentityToken = data.Token; - self.webIdentityCredentials.refresh(function(webErr) { - if (!webErr) { - self.data = self.webIdentityCredentials.data; - self.sts.credentialsFrom(self.data, self); - } else { - self.clearCachedId(); - } - callback(webErr); - }); - } else { - self.clearCachedId(); - callback(err); - } - }); - }, - - /** - * @api private - */ - loadCachedId: function loadCachedId() { - var self = this; - - // in the browser we source default IdentityId from localStorage - if (AWS.util.isBrowser() && !self.params.IdentityId) { - var id = self.getStorage('id'); - if (id && self.params.Logins) { - var actualProviders = Object.keys(self.params.Logins); - var cachedProviders = - (self.getStorage('providers') || '').split(','); - - // only load ID if at least one provider used this ID before - var intersect = cachedProviders.filter(function(n) { - return actualProviders.indexOf(n) !== -1; - }); - if (intersect.length !== 0) { - self.params.IdentityId = id; - } - } else if (id) { - self.params.IdentityId = id; - } - } - }, - - /** - * @api private - */ - createClients: function() { - this.webIdentityCredentials = this.webIdentityCredentials || - new AWS.WebIdentityCredentials(this.params); - this.cognito = this.cognito || - new AWS.CognitoIdentity({params: this.params}); - this.sts = this.sts || new AWS.STS(); - }, - - /** - * @api private - */ - cacheId: function cacheId(data) { - this.identityId = data.IdentityId; - this.params.IdentityId = this.identityId; - - // cache this IdentityId in browser localStorage if possible - if (AWS.util.isBrowser()) { - this.setStorage('id', data.IdentityId); - - if (this.params.Logins) { - this.setStorage('providers', Object.keys(this.params.Logins).join(',')); - } - } - }, - - /** - * @api private - */ - getStorage: function getStorage(key) { - return this.storage[this.localStorageKey[key] + this.params.IdentityPoolId]; - }, - - /** - * @api private - */ - setStorage: function setStorage(key, val) { - try { - this.storage[this.localStorageKey[key] + this.params.IdentityPoolId] = val; - } catch (_) {} - }, - - /** - * @api private - */ - storage: (function() { - try { - return AWS.util.isBrowser() && typeof window.localStorage === 'object' ? - window.localStorage : {}; - } catch (_) { - return {}; - } - })() -}); diff --git a/cli/node_modules/aws-sdk/lib/credentials/credential_provider_chain.js b/cli/node_modules/aws-sdk/lib/credentials/credential_provider_chain.js deleted file mode 100644 index 49153df5a..000000000 --- a/cli/node_modules/aws-sdk/lib/credentials/credential_provider_chain.js +++ /dev/null @@ -1,113 +0,0 @@ -var AWS = require('../core'); - -/** - * Creates a credential provider chain that searches for AWS credentials - * in a list of credential providers specified by the {providers} property. - * - * By default, the chain will use the {defaultProviders} to resolve credentials. - * These providers will look in the environment using the - * {AWS.EnvironmentCredentials} class with the 'AWS' and 'AMAZON' prefixes. - * - * ## Setting Providers - * - * Each provider in the {providers} list should be a function that returns - * a {AWS.Credentials} object, or a hardcoded credentials object. The function - * form allows for delayed execution of the credential construction. - * - * ## Resolving Credentials from a Chain - * - * Call {resolve} to return the first valid credential object that can be - * loaded by the provider chain. - * - * For example, to resolve a chain with a custom provider that checks a file - * on disk after the set of {defaultProviders}: - * - * ```javascript - * var diskProvider = new AWS.FileSystemCredentials('./creds.json'); - * var chain = new AWS.CredentialProviderChain(); - * chain.providers.push(diskProvider); - * chain.resolve(); - * ``` - * - * The above code will return the `diskProvider` object if the - * file contains credentials and the `defaultProviders` do not contain - * any credential settings. - * - * @!attribute providers - * @return [Array] - * a list of credentials objects or functions that return credentials - * objects. If the provider is a function, the function will be - * executed lazily when the provider needs to be checked for valid - * credentials. By default, this object will be set to the - * {defaultProviders}. - * @see defaultProviders - */ -AWS.CredentialProviderChain = AWS.util.inherit(AWS.Credentials, { - - /** - * Creates a new CredentialProviderChain with a default set of providers - * specified by {defaultProviders}. - */ - constructor: function CredentialProviderChain(providers) { - if (providers) { - this.providers = providers; - } else { - this.providers = AWS.CredentialProviderChain.defaultProviders.slice(0); - } - }, - - /** - * Resolves the provider chain by searching for the first set of - * credentials in {providers}. - * - * @callback callback function(err, credentials) - * Called when the provider resolves the chain to a credentials object - * or null if no credentials can be found. - * - * @param err [Error] the error object returned if no credentials are - * found. - * @param credentials [AWS.Credentials] the credentials object resolved - * by the provider chain. - * @return [AWS.CredentialProviderChain] the provider, for chaining. - */ - resolve: function resolve(callback) { - if (this.providers.length === 0) { - callback(new Error('No providers')); - return this; - } - - var index = 0; - var providers = this.providers.slice(0); - - function resolveNext(err, creds) { - if ((!err && creds) || index === providers.length) { - callback(err, creds); - return; - } - - var provider = providers[index++]; - if (typeof provider === 'function') { - creds = provider.call(); - } else { - creds = provider; - } - - if (creds.get) { - creds.get(function(getErr) { - resolveNext(getErr, getErr ? null : creds); - }); - } else { - resolveNext(null, creds); - } - } - - resolveNext(); - return this; - } - -}); - -/** - * The default set of providers used by a vanilla CredentialProviderChain. - */ -AWS.CredentialProviderChain.defaultProviders = []; diff --git a/cli/node_modules/aws-sdk/lib/credentials/ec2_metadata_credentials.js b/cli/node_modules/aws-sdk/lib/credentials/ec2_metadata_credentials.js deleted file mode 100644 index 42d548029..000000000 --- a/cli/node_modules/aws-sdk/lib/credentials/ec2_metadata_credentials.js +++ /dev/null @@ -1,69 +0,0 @@ -var AWS = require('../core'); -require('../metadata_service'); - -/** - * Represents credentials received from the metadata service on an EC2 instance. - * - * By default, this class will connect to the metadata service using - * {AWS.MetadataService} and attempt to load any available credentials. If it - * can connect, and credentials are available, these will be used with zero - * configuration. - * - * This credentials class will timeout after 1 second of inactivity by default. - * If your requests to the EC2 metadata service are timing out, you can increase - * the value by configuring them directly: - * - * ```javascript - * AWS.config.credentials = new AWS.EC2MetadataCredentials({ - * httpOptions: { timeout: 5000 } // 5 second timeout - * }); - * ``` - * - * @!macro nobrowser - */ -AWS.EC2MetadataCredentials = AWS.util.inherit(AWS.Credentials, { - constructor: function EC2MetadataCredentials(options) { - AWS.Credentials.call(this); - - options = options ? AWS.util.copy(options) : {}; - if (!options.httpOptions) options.httpOptions = {}; - options.httpOptions = AWS.util.merge( - {timeout: this.defaultTimeout}, options.httpOptions); - - this.metadataService = new AWS.MetadataService(options); - this.metadata = {}; - }, - - /** - * @api private - */ - defaultTimeout: 1000, - - /** - * Loads the credentials from the instance metadata service - * - * @callback callback function(err) - * Called when the instance metadata service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - var self = this; - if (!callback) callback = function(err) { if (err) throw err; }; - - self.metadataService.loadCredentials(function (err, creds) { - if (!err) { - self.expired = false; - self.metadata = creds; - self.accessKeyId = creds.AccessKeyId; - self.secretAccessKey = creds.SecretAccessKey; - self.sessionToken = creds.Token; - self.expireTime = new Date(creds.Expiration); - } - callback(err); - }); - } -}); diff --git a/cli/node_modules/aws-sdk/lib/credentials/environment_credentials.js b/cli/node_modules/aws-sdk/lib/credentials/environment_credentials.js deleted file mode 100644 index dc4d9ea74..000000000 --- a/cli/node_modules/aws-sdk/lib/credentials/environment_credentials.js +++ /dev/null @@ -1,85 +0,0 @@ -var AWS = require('../core'); - -/** - * Represents credentials from the environment. - * - * By default, this class will look for the matching environment variables - * prefixed by a given {envPrefix}. The un-prefixed environment variable names - * for each credential value is listed below: - * - * ```javascript - * accessKeyId: ACCESS_KEY_ID - * secretAccessKey: SECRET_ACCESS_KEY - * sessionToken: SESSION_TOKEN - * ``` - * - * With the default prefix of 'AWS', the environment variables would be: - * - * AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN - * - * @!attribute envPrefix - * @readonly - * @return [String] the prefix for the environment variable names excluding - * the separating underscore ('_'). - */ -AWS.EnvironmentCredentials = AWS.util.inherit(AWS.Credentials, { - - /** - * Creates a new EnvironmentCredentials class with a given variable - * prefix {envPrefix}. For example, to load credentials using the 'AWS' - * prefix: - * - * ```javascript - * var creds = new AWS.EnvironmentCredentials('AWS'); - * creds.accessKeyId == 'AKID' // from AWS_ACCESS_KEY_ID env var - * ``` - * - * @param envPrefix [String] the prefix to use (e.g., 'AWS') for environment - * variables. Do not include the separating underscore. - */ - constructor: function EnvironmentCredentials(envPrefix) { - AWS.Credentials.call(this); - this.envPrefix = envPrefix; - this.get(function() {}); - }, - - /** - * Loads credentials from the environment using the prefixed - * environment variables. - * - * @callback callback function(err) - * Called after the (prefixed) ACCESS_KEY_ID, SECRET_ACCESS_KEY, and - * SESSION_TOKEN environment variables are read. When this callback is - * called with no error, it means that the credentials information has - * been loaded into the object (as the `accessKeyId`, `secretAccessKey`, - * and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - if (!callback) callback = function(err) { if (err) throw err; }; - - if (process === undefined) { - callback(new Error('No process info available')); - return; - } - - var keys = ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY', 'SESSION_TOKEN']; - var values = []; - - for (var i = 0; i < keys.length; i++) { - var prefix = ''; - if (this.envPrefix) prefix = this.envPrefix + '_'; - values[i] = process.env[prefix + keys[i]]; - if (!values[i] && keys[i] !== 'SESSION_TOKEN') { - callback(new Error('Variable ' + prefix + keys[i] + ' not set.')); - return; - } - } - - this.expired = false; - AWS.Credentials.apply(this, values); - callback(); - } - -}); diff --git a/cli/node_modules/aws-sdk/lib/credentials/file_system_credentials.js b/cli/node_modules/aws-sdk/lib/credentials/file_system_credentials.js deleted file mode 100644 index 8d5d0de95..000000000 --- a/cli/node_modules/aws-sdk/lib/credentials/file_system_credentials.js +++ /dev/null @@ -1,65 +0,0 @@ -var AWS = require('../core'); - -/** - * Represents credentials from a JSON file on disk. - * If the credentials expire, the SDK can {refresh} the credentials - * from the file. - * - * The format of the file should be similar to the options passed to - * {AWS.Config}: - * - * ```javascript - * {accessKeyId: 'akid', secretAccessKey: 'secret', sessionToken: 'optional'} - * ``` - * - * @example Loading credentials from disk - * var creds = new AWS.FileSystemCredentials('./configuration.json'); - * creds.accessKeyId == 'AKID' - * - * @!attribute filename - * @readonly - * @return [String] the path to the JSON file on disk containing the - * credentials. - * @!macro nobrowser - */ -AWS.FileSystemCredentials = AWS.util.inherit(AWS.Credentials, { - - /** - * @overload AWS.FileSystemCredentials(filename) - * Creates a new FileSystemCredentials object from a filename - * - * @param filename [String] the path on disk to the JSON file to load. - */ - constructor: function FileSystemCredentials(filename) { - AWS.Credentials.call(this); - this.filename = filename; - this.get(function() {}); - }, - - /** - * Loads the credentials from the {filename} on disk. - * - * @callback callback function(err) - * Called after the JSON file on disk is read and parsed. When this callback - * is called with no error, it means that the credentials information - * has been loaded into the object (as the `accessKeyId`, `secretAccessKey`, - * and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - if (!callback) callback = function(err) { if (err) throw err; }; - try { - var creds = JSON.parse(AWS.util.readFileSync(this.filename)); - AWS.Credentials.call(this, creds); - if (!this.accessKeyId || !this.secretAccessKey) { - throw new Error('Credentials not set in ' + this.filename); - } - this.expired = false; - callback(); - } catch (err) { - callback(err); - } - } - -}); diff --git a/cli/node_modules/aws-sdk/lib/credentials/saml_credentials.js b/cli/node_modules/aws-sdk/lib/credentials/saml_credentials.js deleted file mode 100644 index 8b144e266..000000000 --- a/cli/node_modules/aws-sdk/lib/credentials/saml_credentials.js +++ /dev/null @@ -1,88 +0,0 @@ -var AWS = require('../core'); - -/** - * Represents credentials retrieved from STS SAML support. - * - * By default this provider gets credentials using the - * {AWS.STS.assumeRoleWithSAML} service operation. This operation - * requires a `RoleArn` containing the ARN of the IAM trust policy for the - * application for which credentials will be given, as well as a `PrincipalArn` - * representing the ARN for the SAML identity provider. In addition, the - * `SAMLAssertion` must be set to the token provided by the identity - * provider. See {constructor} for an example on creating a credentials - * object with proper `RoleArn`, `PrincipalArn`, and `SAMLAssertion` values. - * - * ## Refreshing Credentials from Identity Service - * - * In addition to AWS credentials expiring after a given amount of time, the - * login token from the identity provider will also expire. Once this token - * expires, it will not be usable to refresh AWS credentials, and another - * token will be needed. The SDK does not manage refreshing of the token value, - * but this can be done through a "refresh token" supported by most identity - * providers. Consult the documentation for the identity provider for refreshing - * tokens. Once the refreshed token is acquired, you should make sure to update - * this new token in the credentials object's {params} property. The following - * code will update the SAMLAssertion, assuming you have retrieved an updated - * token from the identity provider: - * - * ```javascript - * AWS.config.credentials.params.SAMLAssertion = updatedToken; - * ``` - * - * Future calls to `credentials.refresh()` will now use the new token. - * - * @!attribute params - * @return [map] the map of params passed to - * {AWS.STS.assumeRoleWithSAML}. To update the token, set the - * `params.SAMLAssertion` property. - */ -AWS.SAMLCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new credentials object. - * @param (see AWS.STS.assumeRoleWithSAML) - * @example Creating a new credentials object - * AWS.config.credentials = new AWS.SAMLCredentials({ - * RoleArn: 'arn:aws:iam::1234567890:role/SAMLRole', - * PrincipalArn: 'arn:aws:iam::1234567890:role/SAMLPrincipal', - * SAMLAssertion: 'base64-token', // base64-encoded token from IdP - * }); - * @see AWS.STS.assumeRoleWithSAML - */ - constructor: function SAMLCredentials(params) { - AWS.Credentials.call(this); - this.expired = true; - this.params = params; - }, - - /** - * Refreshes credentials using {AWS.STS.assumeRoleWithSAML} - * - * @callback callback function(err) - * Called when the STS service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - var self = this; - self.createClients(); - if (!callback) callback = function(err) { if (err) throw err; }; - - self.service.assumeRoleWithSAML(function (err, data) { - if (!err) { - self.service.credentialsFrom(data, self); - } - callback(err); - }); - }, - - /** - * @api private - */ - createClients: function() { - this.service = this.service || new AWS.STS({params: this.params}); - } - -}); diff --git a/cli/node_modules/aws-sdk/lib/credentials/shared_ini_file_credentials.js b/cli/node_modules/aws-sdk/lib/credentials/shared_ini_file_credentials.js deleted file mode 100644 index 74972fc4b..000000000 --- a/cli/node_modules/aws-sdk/lib/credentials/shared_ini_file_credentials.js +++ /dev/null @@ -1,102 +0,0 @@ -var AWS = require('../core'); -var path = require('path'); - -/** - * Represents credentials loaded from shared credentials file - * (defaulting to ~/.aws/credentials). - * - * ## Using the shared credentials file - * - * This provider is checked by default in the Node.js environment. To use the - * credentials file provider, simply add your access and secret keys to the - * ~/.aws/credentials file in the following format: - * - * [default] - * aws_access_key_id = AKID... - * aws_secret_access_key = YOUR_SECRET_KEY - * - * ## Using custom profiles - * - * The SDK supports loading credentials for separate profiles. This can be done - * in two ways: - * - * 1. Set the `AWS_PROFILE` environment variable in your process prior to - * loading the SDK. - * 2. Directly load the AWS.SharedIniFileCredentials provider: - * - * ```javascript - * var creds = new AWS.SharedIniFileCredentials({profile: 'myprofile'}); - * AWS.config.credentials = creds; - * ``` - * - * @!macro nobrowser - */ -AWS.SharedIniFileCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new SharedIniFileCredentials object. - * - * @param options [map] a set of options - * @option options profile [String] (AWS_PROFILE env var or 'default') - * the name of the profile to load. - * @option options filename [String] ('~/.aws/credentials') the filename - * to use when loading credentials. - */ - constructor: function SharedIniFileCredentials(options) { - AWS.Credentials.call(this); - - options = options || {}; - - this.filename = options.filename; - this.profile = options.profile || process.env.AWS_PROFILE || 'default'; - this.get(function() {}); - }, - - /** - * Loads the credentials from the instance metadata service - * - * @callback callback function(err) - * Called after the shared INI file on disk is read and parsed. When this - * callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - if (!callback) callback = function(err) { if (err) throw err; }; - try { - if (!this.filename) this.loadDefaultFilename(); - var creds = AWS.util.ini.parse(AWS.util.readFileSync(this.filename)); - if (typeof creds[this.profile] === 'object') { - this.accessKeyId = creds[this.profile]['aws_access_key_id']; - this.secretAccessKey = creds[this.profile]['aws_secret_access_key']; - this.sessionToken = creds[this.profile]['aws_session_token']; - } - - if (!this.accessKeyId || !this.secretAccessKey) { - throw new Error('Credentials not set in ' + this.filename + - ' using profile ' + this.profile); - } - this.expired = false; - callback(); - } catch (err) { - callback(err); - } - }, - - /** - * @api private - */ - loadDefaultFilename: function loadDefaultFilename() { - var env = process.env; - var home = env.HOME || - env.USERPROFILE || - (env.HOMEPATH ? ((env.HOMEDRIVE || 'C:/') + env.HOMEPATH) : null); - if (!home) { - throw AWS.util.error( - new Error('Cannot load credentials, HOME path not set')); - } - - this.filename = path.join(home, '.aws', 'credentials'); - } -}); diff --git a/cli/node_modules/aws-sdk/lib/credentials/temporary_credentials.js b/cli/node_modules/aws-sdk/lib/credentials/temporary_credentials.js deleted file mode 100644 index 763a72f4d..000000000 --- a/cli/node_modules/aws-sdk/lib/credentials/temporary_credentials.js +++ /dev/null @@ -1,111 +0,0 @@ -var AWS = require('../core'); - -/** - * Represents temporary credentials retrieved from {AWS.STS}. Without any - * extra parameters, credentials will be fetched from the - * {AWS.STS.getSessionToken} operation. If an IAM role is provided, the - * {AWS.STS.assumeRole} operation will be used to fetch credentials for the - * role instead. - * - * To setup temporary credentials, configure a set of master credentials - * using the standard credentials providers (environment, EC2 instance metadata, - * or from the filesystem), then set the global credentials to a new - * temporary credentials object: - * - * ```javascript - * // Note that environment credentials are loaded by default, - * // the following line is shown for clarity: - * AWS.config.credentials = new AWS.EnvironmentCredentials('AWS'); - * - * // Now set temporary credentials seeded from the master credentials - * AWS.config.credentials = new AWS.TemporaryCredentials(); - * - * // subsequent requests will now use temporary credentials from AWS STS. - * new AWS.S3().listBucket(function(err, data) { ... }); - * ``` - * - * @!attribute masterCredentials - * @return [AWS.Credentials] the master (non-temporary) credentials used to - * get and refresh temporary credentials from AWS STS. - * @note (see constructor) - */ -AWS.TemporaryCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new temporary credentials object. - * - * @note In order to create temporary credentials, you first need to have - * "master" credentials configured in {AWS.Config.credentials}. These - * master credentials are necessary to retrieve the temporary credentials, - * as well as refresh the credentials when they expire. - * @param params [map] a map of options that are passed to the - * {AWS.STS.assumeRole} or {AWS.STS.getSessionToken} operations. - * If a `RoleArn` parameter is passed in, credentials will be based on the - * IAM role. - * @example Creating a new credenials object for generic temporary credentials - * AWS.config.credentials = new AWS.TemporaryCredentials(); - * @example Creating a new credentials object for an IAM role - * AWS.config.credentials = new AWS.TemporaryCredentials({ - * RoleArn: 'arn:aws:iam::1234567890:role/TemporaryCredentials', - * }); - * @see AWS.STS.assumeRole - * @see AWS.STS.getSessionToken - */ - constructor: function TemporaryCredentials(params) { - AWS.Credentials.call(this); - this.loadMasterCredentials(); - this.expired = true; - - this.params = params || {}; - if (this.params.RoleArn) { - this.params.RoleSessionName = - this.params.RoleSessionName || 'temporary-credentials'; - } - }, - - /** - * Refreshes credentials using {AWS.STS.assumeRole} or - * {AWS.STS.getSessionToken}, depending on whether an IAM role ARN was passed - * to the credentials {constructor}. - * - * @callback callback function(err) - * Called when the STS service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - var self = this; - self.createClients(); - if (!callback) callback = function(err) { if (err) throw err; }; - - self.service.config.credentials = self.masterCredentials; - var operation = self.params.RoleArn ? - self.service.assumeRole : self.service.getSessionToken; - operation.call(self.service, function (err, data) { - if (!err) { - self.service.credentialsFrom(data, self); - } - callback(err); - }); - }, - - /** - * @api private - */ - loadMasterCredentials: function loadMasterCredentials() { - this.masterCredentials = AWS.config.credentials; - while (this.masterCredentials.masterCredentials) { - this.masterCredentials = this.masterCredentials.masterCredentials; - } - }, - - /** - * @api private - */ - createClients: function() { - this.service = this.service || new AWS.STS({params: this.params}); - } - -}); diff --git a/cli/node_modules/aws-sdk/lib/credentials/web_identity_credentials.js b/cli/node_modules/aws-sdk/lib/credentials/web_identity_credentials.js deleted file mode 100644 index 11b5dde71..000000000 --- a/cli/node_modules/aws-sdk/lib/credentials/web_identity_credentials.js +++ /dev/null @@ -1,95 +0,0 @@ -var AWS = require('../core'); - -/** - * Represents credentials retrieved from STS Web Identity Federation support. - * - * By default this provider gets credentials using the - * {AWS.STS.assumeRoleWithWebIdentity} service operation. This operation - * requires a `RoleArn` containing the ARN of the IAM trust policy for the - * application for which credentials will be given. In addition, the - * `WebIdentityToken` must be set to the token provided by the identity - * provider. See {constructor} for an example on creating a credentials - * object with proper `RoleArn` and `WebIdentityToken` values. - * - * ## Refreshing Credentials from Identity Service - * - * In addition to AWS credentials expiring after a given amount of time, the - * login token from the identity provider will also expire. Once this token - * expires, it will not be usable to refresh AWS credentials, and another - * token will be needed. The SDK does not manage refreshing of the token value, - * but this can be done through a "refresh token" supported by most identity - * providers. Consult the documentation for the identity provider for refreshing - * tokens. Once the refreshed token is acquired, you should make sure to update - * this new token in the credentials object's {params} property. The following - * code will update the WebIdentityToken, assuming you have retrieved an updated - * token from the identity provider: - * - * ```javascript - * AWS.config.credentials.params.WebIdentityToken = updatedToken; - * ``` - * - * Future calls to `credentials.refresh()` will now use the new token. - * - * @!attribute params - * @return [map] the map of params passed to - * {AWS.STS.assumeRoleWithWebIdentity}. To update the token, set the - * `params.WebIdentityToken` property. - * @!attribute data - * @return [map] the raw data response from the call to - * {AWS.STS.assumeRoleWithWebIdentity}. Use this if you want to get - * access to other properties from the response. - */ -AWS.WebIdentityCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new credentials object. - * @param (see AWS.STS.assumeRoleWithWebIdentity) - * @example Creating a new credentials object - * AWS.config.credentials = new AWS.WebIdentityCredentials({ - * RoleArn: 'arn:aws:iam::1234567890:role/WebIdentity', - * WebIdentityToken: 'ABCDEFGHIJKLMNOP', // token from identity service - * RoleSessionName: 'web' // optional name, defaults to web-identity - * }); - * @see AWS.STS.assumeRoleWithWebIdentity - */ - constructor: function WebIdentityCredentials(params) { - AWS.Credentials.call(this); - this.expired = true; - this.params = params; - this.params.RoleSessionName = this.params.RoleSessionName || 'web-identity'; - this.data = null; - }, - - /** - * Refreshes credentials using {AWS.STS.assumeRoleWithWebIdentity} - * - * @callback callback function(err) - * Called when the STS service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - var self = this; - self.createClients(); - if (!callback) callback = function(err) { if (err) throw err; }; - - self.service.assumeRoleWithWebIdentity(function (err, data) { - self.data = null; - if (!err) { - self.data = data; - self.service.credentialsFrom(data, self); - } - callback(err); - }); - }, - - /** - * @api private - */ - createClients: function() { - this.service = this.service || new AWS.STS({params: this.params}); - } - -}); diff --git a/cli/node_modules/aws-sdk/lib/event_listeners.js b/cli/node_modules/aws-sdk/lib/event_listeners.js deleted file mode 100644 index f02a6a40d..000000000 --- a/cli/node_modules/aws-sdk/lib/event_listeners.js +++ /dev/null @@ -1,460 +0,0 @@ -var AWS = require('./core'); -var SequentialExecutor = require('./sequential_executor'); - -/** - * The namespace used to register global event listeners for request building - * and sending. - */ -AWS.EventListeners = { - /** - * @!attribute VALIDATE_CREDENTIALS - * A request listener that validates whether the request is being - * sent with credentials. - * Handles the {AWS.Request~validate 'validate' Request event} - * @example Sending a request without validating credentials - * var listener = AWS.EventListeners.Core.VALIDATE_CREDENTIALS; - * request.removeListener('validate', listener); - * @readonly - * @return [Function] - * @!attribute VALIDATE_REGION - * A request listener that validates whether the region is set - * for a request. - * Handles the {AWS.Request~validate 'validate' Request event} - * @example Sending a request without validating region configuration - * var listener = AWS.EventListeners.Core.VALIDATE_REGION; - * request.removeListener('validate', listener); - * @readonly - * @return [Function] - * @!attribute VALIDATE_PARAMETERS - * A request listener that validates input parameters in a request. - * Handles the {AWS.Request~validate 'validate' Request event} - * @example Sending a request without validating parameters - * var listener = AWS.EventListeners.Core.VALIDATE_PARAMETERS; - * request.removeListener('validate', listener); - * @example Disable parameter validation globally - * AWS.EventListeners.Core.removeListener('validate', - * AWS.EventListeners.Core.VALIDATE_REGION); - * @readonly - * @return [Function] - * @!attribute SEND - * A request listener that initiates the HTTP connection for a - * request being sent. Handles the {AWS.Request~send 'send' Request event} - * @example Replacing the HTTP handler - * var listener = AWS.EventListeners.Core.SEND; - * request.removeListener('send', listener); - * request.on('send', function(response) { - * customHandler.send(response); - * }); - * @return [Function] - * @readonly - * @!attribute HTTP_DATA - * A request listener that reads data from the HTTP connection in order - * to build the response data. - * Handles the {AWS.Request~httpData 'httpData' Request event}. - * Remove this handler if you are overriding the 'httpData' event and - * do not want extra data processing and buffering overhead. - * @example Disabling default data processing - * var listener = AWS.EventListeners.Core.HTTP_DATA; - * request.removeListener('httpData', listener); - * @return [Function] - * @readonly - */ - Core: {} /* doc hack */ -}; - -AWS.EventListeners = { - Core: new SequentialExecutor().addNamedListeners(function(add, addAsync) { - addAsync('VALIDATE_CREDENTIALS', 'validate', - function VALIDATE_CREDENTIALS(req, done) { - if (!req.service.api.signatureVersion) return done(); // none - req.service.config.getCredentials(function(err) { - if (err) { - req.response.error = AWS.util.error(err, - {code: 'CredentialsError', message: 'Missing credentials in config'}); - } - done(); - }); - }); - - add('VALIDATE_REGION', 'validate', function VALIDATE_REGION(req) { - if (!req.service.config.region && !req.service.isGlobalEndpoint) { - req.response.error = AWS.util.error(new Error(), - {code: 'ConfigError', message: 'Missing region in config'}); - } - }); - - add('VALIDATE_PARAMETERS', 'validate', function VALIDATE_PARAMETERS(req) { - var rules = req.service.api.operations[req.operation].input; - new AWS.ParamValidator().validate(rules, req.params); - }); - - addAsync('COMPUTE_SHA256', 'afterBuild', function COMPUTE_SHA256(req, done) { - req.haltHandlersOnError(); - if (!req.service.api.signatureVersion) return done(); // none - if (req.service.getSignerClass(req) === AWS.Signers.V4) { - var body = req.httpRequest.body || ''; - AWS.util.computeSha256(body, function(err, sha) { - if (err) { - done(err); - } - else { - req.httpRequest.headers['X-Amz-Content-Sha256'] = sha; - done(); - } - }); - } else { - done(); - } - }); - - add('SET_CONTENT_LENGTH', 'afterBuild', function SET_CONTENT_LENGTH(req) { - if (req.httpRequest.headers['Content-Length'] === undefined) { - var length = AWS.util.string.byteLength(req.httpRequest.body); - req.httpRequest.headers['Content-Length'] = length; - } - }); - - add('SET_HTTP_HOST', 'afterBuild', function SET_HTTP_HOST(req) { - req.httpRequest.headers['Host'] = req.httpRequest.endpoint.host; - }); - - add('RESTART', 'restart', function RESTART() { - var err = this.response.error; - if (!err || !err.retryable) return; - - this.httpRequest = new AWS.HttpRequest( - this.service.endpoint, - this.service.region - ); - - if (this.response.retryCount < this.service.config.maxRetries) { - this.response.retryCount++; - } else { - this.response.error = null; - } - }); - - addAsync('SIGN', 'sign', function SIGN(req, done) { - if (!req.service.api.signatureVersion) return done(); // none - - req.service.config.getCredentials(function (err, credentials) { - if (err) { - req.response.error = err; - return done(); - } - - try { - var date = AWS.util.date.getDate(); - var SignerClass = req.service.getSignerClass(req); - var signer = new SignerClass(req.httpRequest, - req.service.api.signingName || req.service.api.endpointPrefix); - - // clear old authorization headers - delete req.httpRequest.headers['Authorization']; - delete req.httpRequest.headers['Date']; - delete req.httpRequest.headers['X-Amz-Date']; - - // add new authorization - signer.addAuthorization(credentials, date); - req.signedAt = date; - } catch (e) { - req.response.error = e; - } - done(); - }); - }); - - add('VALIDATE_RESPONSE', 'validateResponse', function VALIDATE_RESPONSE(resp) { - if (this.service.successfulResponse(resp, this)) { - resp.data = {}; - resp.error = null; - } else { - resp.data = null; - resp.error = AWS.util.error(new Error(), - {code: 'UnknownError', message: 'An unknown error occurred.'}); - } - }); - - addAsync('SEND', 'send', function SEND(resp, done) { - resp.httpResponse._abortCallback = done; - resp.error = null; - resp.data = null; - - function callback(httpResp) { - resp.httpResponse.stream = httpResp; - - httpResp.on('headers', function onHeaders(statusCode, headers) { - resp.request.emit('httpHeaders', [statusCode, headers, resp]); - - if (!resp.httpResponse.streaming) { - if (AWS.HttpClient.streamsApiVersion === 2) { // streams2 API check - httpResp.on('readable', function onReadable() { - var data = httpResp.read(); - if (data !== null) { - resp.request.emit('httpData', [data, resp]); - } - }); - } else { // legacy streams API - httpResp.on('data', function onData(data) { - resp.request.emit('httpData', [data, resp]); - }); - } - } - }); - - httpResp.on('end', function onEnd() { - resp.request.emit('httpDone'); - done(); - }); - } - - function progress(httpResp) { - httpResp.on('sendProgress', function onSendProgress(value) { - resp.request.emit('httpUploadProgress', [value, resp]); - }); - - httpResp.on('receiveProgress', function onReceiveProgress(value) { - resp.request.emit('httpDownloadProgress', [value, resp]); - }); - } - - function error(err) { - resp.error = AWS.util.error(err, { - code: 'NetworkingError', - region: resp.request.httpRequest.region, - hostname: resp.request.httpRequest.endpoint.hostname, - retryable: true - }); - resp.request.emit('httpError', [resp.error, resp], function() { - done(); - }); - } - - function executeSend() { - var http = AWS.HttpClient.getInstance(); - var httpOptions = resp.request.service.config.httpOptions || {}; - try { - var stream = http.handleRequest(resp.request.httpRequest, httpOptions, - callback, error); - progress(stream); - } catch (err) { - error(err); - } - } - - var timeDiff = (AWS.util.date.getDate() - this.signedAt) / 1000; - if (timeDiff >= 60 * 10) { // if we signed 10min ago, re-sign - this.emit('sign', [this], function(err) { - if (err) done(err); - else executeSend(); - }); - } else { - executeSend(); - } - }); - - add('HTTP_HEADERS', 'httpHeaders', - function HTTP_HEADERS(statusCode, headers, resp) { - resp.httpResponse.statusCode = statusCode; - resp.httpResponse.headers = headers; - resp.httpResponse.body = new AWS.util.Buffer(''); - resp.httpResponse.buffers = []; - resp.httpResponse.numBytes = 0; - }); - - add('HTTP_DATA', 'httpData', function HTTP_DATA(chunk, resp) { - if (chunk) { - if (AWS.util.isNode()) { - resp.httpResponse.numBytes += chunk.length; - - var total = resp.httpResponse.headers['content-length']; - var progress = { loaded: resp.httpResponse.numBytes, total: total }; - resp.request.emit('httpDownloadProgress', [progress, resp]); - } - - resp.httpResponse.buffers.push(new AWS.util.Buffer(chunk)); - } - }); - - add('HTTP_DONE', 'httpDone', function HTTP_DONE(resp) { - // convert buffers array into single buffer - if (resp.httpResponse.buffers && resp.httpResponse.buffers.length > 0) { - var body = AWS.util.buffer.concat(resp.httpResponse.buffers); - resp.httpResponse.body = body; - } - delete resp.httpResponse.numBytes; - delete resp.httpResponse.buffers; - }); - - add('FINALIZE_ERROR', 'retry', function FINALIZE_ERROR(resp) { - if (resp.httpResponse.statusCode) { - resp.error.statusCode = resp.httpResponse.statusCode; - if (resp.error.retryable === undefined) { - resp.error.retryable = this.service.retryableError(resp.error, this); - } - } - }); - - add('INVALIDATE_CREDENTIALS', 'retry', function INVALIDATE_CREDENTIALS(resp) { - if (!resp.error) return; - switch (resp.error.code) { - case 'RequestExpired': // EC2 only - case 'ExpiredTokenException': - case 'ExpiredToken': - resp.error.retryable = true; - resp.request.service.config.credentials.expired = true; - } - }); - - add('EXPIRED_SIGNATURE', 'retry', function EXPIRED_SIGNATURE(resp) { - var err = resp.error; - if (!err) return; - if (typeof err.code === 'string' && typeof err.message === 'string') { - if (err.code.match(/Signature/) && err.message.match(/expired/)) { - resp.error.retryable = true; - } - } - }); - - add('REDIRECT', 'retry', function REDIRECT(resp) { - if (resp.error && resp.error.statusCode >= 300 && - resp.error.statusCode < 400 && resp.httpResponse.headers['location']) { - this.httpRequest.endpoint = - new AWS.Endpoint(resp.httpResponse.headers['location']); - this.httpRequest.headers['Host'] = this.httpRequest.endpoint.host; - resp.error.redirect = true; - resp.error.retryable = true; - } - }); - - add('RETRY_CHECK', 'retry', function RETRY_CHECK(resp) { - if (resp.error) { - if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) { - resp.error.retryDelay = 0; - } else if (resp.retryCount < resp.maxRetries) { - var delays = this.service.retryDelays(); - resp.error.retryDelay = delays[resp.retryCount] || 0; - } - } - }); - - addAsync('RESET_RETRY_STATE', 'afterRetry', function RESET_RETRY_STATE(resp, done) { - var delay, willRetry = false; - - if (resp.error) { - delay = resp.error.retryDelay || 0; - if (resp.error.retryable && resp.retryCount < resp.maxRetries) { - resp.retryCount++; - willRetry = true; - } else if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) { - resp.redirectCount++; - willRetry = true; - } - } - - if (willRetry) { - resp.error = null; - setTimeout(done, delay); - } else { - done(); - } - }); - }), - - CorePost: new SequentialExecutor().addNamedListeners(function(add) { - add('EXTRACT_REQUEST_ID', 'extractData', function EXTRACT_REQUEST_ID(resp) { - - if (!resp.requestId) { - resp.requestId = resp.httpResponse.headers['x-amz-request-id'] || - resp.httpResponse.headers['x-amzn-requestid']; - } - - if (!resp.requestId && resp.data && resp.data.ResponseMetadata) { - resp.requestId = resp.data.ResponseMetadata.RequestId; - } - }); - - add('ENOTFOUND_ERROR', 'httpError', function ENOTFOUND_ERROR(err) { - if (err.code === 'NetworkingError' && err.errno === 'ENOTFOUND') { - var message = 'Inaccessible host: `' + err.hostname + - '\'. This service may not be available in the `' + err.region + - '\' region.'; - this.response.error = AWS.util.error(new Error(message), { - code: 'UnknownEndpoint', - region: err.region, - hostname: err.hostname, - retryable: true, - originalError: err - }); - } - }); - }), - - Logger: new SequentialExecutor().addNamedListeners(function(add) { - add('LOG_REQUEST', 'complete', function LOG_REQUEST(resp) { - var req = resp.request; - var logger = req.service.config.logger; - if (!logger) return; - - function buildMessage() { - var time = AWS.util.date.getDate().getTime(); - var delta = (time - req.startTime.getTime()) / 1000; - var ansi = logger.isTTY ? true : false; - var status = resp.httpResponse.statusCode; - var params = require('util').inspect(req.params, true, null); - - var message = ''; - if (ansi) message += '\x1B[33m'; - message += '[AWS ' + req.service.serviceIdentifier + ' ' + status; - message += ' ' + delta.toString() + 's ' + resp.retryCount + ' retries]'; - if (ansi) message += '\x1B[0;1m'; - message += ' ' + AWS.util.string.lowerFirst(req.operation); - message += '(' + params + ')'; - if (ansi) message += '\x1B[0m'; - return message; - } - - var line = buildMessage(); - if (typeof logger.log === 'function') { - logger.log(line); - } else if (typeof logger.write === 'function') { - logger.write(line + '\n'); - } - }); - }), - - Json: new SequentialExecutor().addNamedListeners(function(add) { - var svc = require('./protocol/json'); - add('BUILD', 'build', svc.buildRequest); - add('EXTRACT_DATA', 'extractData', svc.extractData); - add('EXTRACT_ERROR', 'extractError', svc.extractError); - }), - - Rest: new SequentialExecutor().addNamedListeners(function(add) { - var svc = require('./protocol/rest'); - add('BUILD', 'build', svc.buildRequest); - add('EXTRACT_DATA', 'extractData', svc.extractData); - add('EXTRACT_ERROR', 'extractError', svc.extractError); - }), - - RestJson: new SequentialExecutor().addNamedListeners(function(add) { - var svc = require('./protocol/rest_json'); - add('BUILD', 'build', svc.buildRequest); - add('EXTRACT_DATA', 'extractData', svc.extractData); - add('EXTRACT_ERROR', 'extractError', svc.extractError); - }), - - RestXml: new SequentialExecutor().addNamedListeners(function(add) { - var svc = require('./protocol/rest_xml'); - add('BUILD', 'build', svc.buildRequest); - add('EXTRACT_DATA', 'extractData', svc.extractData); - add('EXTRACT_ERROR', 'extractError', svc.extractError); - }), - - Query: new SequentialExecutor().addNamedListeners(function(add) { - var svc = require('./protocol/query'); - add('BUILD', 'build', svc.buildRequest); - add('EXTRACT_DATA', 'extractData', svc.extractData); - add('EXTRACT_ERROR', 'extractError', svc.extractError); - }) -}; diff --git a/cli/node_modules/aws-sdk/lib/http.js b/cli/node_modules/aws-sdk/lib/http.js deleted file mode 100644 index 6e0bd234d..000000000 --- a/cli/node_modules/aws-sdk/lib/http.js +++ /dev/null @@ -1,204 +0,0 @@ -var AWS = require('./core'); -var inherit = AWS.util.inherit; - -/** - * The endpoint that a service will talk to, for example, - * `'https://ec2.ap-southeast-1.amazonaws.com'`. If - * you need to override an endpoint for a service, you can - * set the endpoint on a service by passing the endpoint - * object with the `endpoint` option key: - * - * ```javascript - * var ep = new AWS.Endpoint('awsproxy.example.com'); - * var s3 = new AWS.S3({endpoint: ep}); - * s3.service.endpoint.hostname == 'awsproxy.example.com' - * ``` - * - * Note that if you do not specify a protocol, the protocol will - * be selected based on your current {AWS.config} configuration. - * - * @!attribute protocol - * @return [String] the protocol (http or https) of the endpoint - * URL - * @!attribute hostname - * @return [String] the host portion of the endpoint, e.g., - * example.com - * @!attribute host - * @return [String] the host portion of the endpoint including - * the port, e.g., example.com:80 - * @!attribute port - * @return [Integer] the port of the endpoint - * @!attribute href - * @return [String] the full URL of the endpoint - */ -AWS.Endpoint = inherit({ - - /** - * @overload Endpoint(endpoint) - * Constructs a new endpoint given an endpoint URL. If the - * URL omits a protocol (http or https), the default protocol - * set in the global {AWS.config} will be used. - * @param endpoint [String] the URL to construct an endpoint from - */ - constructor: function Endpoint(endpoint, config) { - AWS.util.hideProperties(this, ['slashes', 'auth', 'hash', 'search', 'query']); - - if (typeof endpoint === 'undefined' || endpoint === null) { - throw new Error('Invalid endpoint: ' + endpoint); - } else if (typeof endpoint !== 'string') { - return AWS.util.copy(endpoint); - } - - if (!endpoint.match(/^http/)) { - var useSSL = config && config.sslEnabled !== undefined ? - config.sslEnabled : AWS.config.sslEnabled; - endpoint = (useSSL ? 'https' : 'http') + '://' + endpoint; - } - - AWS.util.update(this, AWS.util.urlParse(endpoint)); - - // Ensure the port property is set as an integer - if (this.port) { - this.port = parseInt(this.port, 10); - } else { - this.port = this.protocol === 'https:' ? 443 : 80; - } - } - -}); - -/** - * The low level HTTP request object, encapsulating all HTTP header - * and body data sent by a service request. - * - * @!attribute method - * @return [String] the HTTP method of the request - * @!attribute path - * @return [String] the path portion of the URI, e.g., - * "/list/?start=5&num=10" - * @!attribute headers - * @return [map] - * a map of header keys and their respective values - * @!attribute body - * @return [String] the request body payload - * @!attribute endpoint - * @return [AWS.Endpoint] the endpoint for the request - * @!attribute region - * @api private - * @return [String] the region, for signing purposes only. - */ -AWS.HttpRequest = inherit({ - - /** - * @api private - */ - constructor: function HttpRequest(endpoint, region) { - endpoint = new AWS.Endpoint(endpoint); - this.method = 'POST'; - this.path = endpoint.path || '/'; - this.headers = {}; - this.body = ''; - this.endpoint = endpoint; - this.region = region; - this.setUserAgent(); - }, - - /** - * @api private - */ - setUserAgent: function setUserAgent() { - var prefix = AWS.util.isBrowser() ? 'X-Amz-' : ''; - this.headers[prefix + 'User-Agent'] = AWS.util.userAgent(); - }, - - /** - * @return [String] the part of the {path} excluding the - * query string - */ - pathname: function pathname() { - return this.path.split('?', 1)[0]; - }, - - /** - * @return [String] the query string portion of the {path} - */ - search: function search() { - var query = this.path.split('?', 2)[1]; - if (query) { - query = AWS.util.queryStringParse(query); - return AWS.util.queryParamsToString(query); - } - return ''; - } - -}); - -/** - * The low level HTTP response object, encapsulating all HTTP header - * and body data returned from the request. - * - * @!attribute statusCode - * @return [Integer] the HTTP status code of the response (e.g., 200, 404) - * @!attribute headers - * @return [map] - * a map of response header keys and their respective values - * @!attribute body - * @return [String] the response body payload - * @!attribute [r] streaming - * @return [Boolean] whether this response is being streamed at a low-level. - * Defaults to `false` (buffered reads). Do not modify this manually, use - * {createUnbufferedStream} to convert the stream to unbuffered mode - * instead. - */ -AWS.HttpResponse = inherit({ - - /** - * @api private - */ - constructor: function HttpResponse() { - this.statusCode = undefined; - this.headers = {}; - this.body = undefined; - this.streaming = false; - this.stream = null; - }, - - /** - * Disables buffering on the HTTP response and returns the stream for reading. - * @return [Stream, XMLHttpRequest, null] the underlying stream object. - * Use this object to directly read data off of the stream. - * @note This object is only available after the {AWS.Request~httpHeaders} - * event has fired. This method must be called prior to - * {AWS.Request~httpData}. - * @example Taking control of a stream - * request.on('httpHeaders', function(statusCode, headers) { - * if (statusCode < 300) { - * if (headers.etag === 'xyz') { - * // pipe the stream, disabling buffering - * var stream = this.response.httpResponse.createUnbufferedStream(); - * stream.pipe(process.stdout); - * } else { // abort this request and set a better error message - * this.abort(); - * this.response.error = new Error('Invalid ETag'); - * } - * } - * }).send(console.log); - */ - createUnbufferedStream: function createUnbufferedStream() { - this.streaming = true; - return this.stream; - } -}); - - -AWS.HttpClient = inherit({}); - -/** - * @api private - */ -AWS.HttpClient.getInstance = function getInstance() { - if (this.singleton === undefined) { - this.singleton = new this(); - } - return this.singleton; -}; diff --git a/cli/node_modules/aws-sdk/lib/http/node.js b/cli/node_modules/aws-sdk/lib/http/node.js deleted file mode 100644 index 1b0936ee8..000000000 --- a/cli/node_modules/aws-sdk/lib/http/node.js +++ /dev/null @@ -1,141 +0,0 @@ -var AWS = require('../core'); -var Stream = AWS.util.nodeRequire('stream').Stream; -var WritableStream = AWS.util.nodeRequire('stream').Writable; -var ReadableStream = AWS.util.nodeRequire('stream').Readable; -require('../http'); - -/** - * @api private - */ -AWS.NodeHttpClient = AWS.util.inherit({ - handleRequest: function handleRequest(httpRequest, httpOptions, callback, errCallback) { - var self = this; - var cbAlreadyCalled = false; - var endpoint = httpRequest.endpoint; - var pathPrefix = ''; - if (!httpOptions) httpOptions = {}; - if (httpOptions.proxy) { - pathPrefix = endpoint.protocol + '//' + endpoint.hostname; - if (endpoint.port !== 80 && endpoint.port !== 443) { - pathPrefix += ':' + endpoint.port; - } - endpoint = new AWS.Endpoint(httpOptions.proxy); - } - - var useSSL = endpoint.protocol === 'https:'; - var http = useSSL ? require('https') : require('http'); - var options = { - host: endpoint.hostname, - port: endpoint.port, - method: httpRequest.method, - headers: httpRequest.headers, - path: pathPrefix + httpRequest.path - }; - - if (useSSL && !httpOptions.agent) { - options.agent = this.sslAgent(); - } - - AWS.util.update(options, httpOptions); - delete options.proxy; // proxy isn't an HTTP option - delete options.timeout; // timeout isn't an HTTP option - - var stream = http.request(options, function (httpResp) { - if (cbAlreadyCalled) return; cbAlreadyCalled = true; - - callback(httpResp); - httpResp.emit('headers', httpResp.statusCode, httpResp.headers); - }); - httpRequest.stream = stream; // attach stream to httpRequest - - // timeout support - stream.setTimeout(httpOptions.timeout || 0, function() { - if (cbAlreadyCalled) return; cbAlreadyCalled = true; - - var msg = 'Connection timed out after ' + httpOptions.timeout + 'ms'; - errCallback(AWS.util.error(new Error(msg), {code: 'TimeoutError'})); - stream.abort(); - }); - - stream.on('error', function() { - if (cbAlreadyCalled) return; cbAlreadyCalled = true; - errCallback.apply(this, arguments); - }); - - var expect = httpRequest.headers.Expect || httpRequest.headers.expect; - if (expect === '100-continue') { - stream.on('continue', function() { - self.writeBody(stream, httpRequest); - }); - } else { - this.writeBody(stream, httpRequest); - } - - return stream; - }, - - writeBody: function writeBody(stream, httpRequest) { - var body = httpRequest.body; - - if (body && WritableStream && ReadableStream) { // progress support - if (!(body instanceof Stream)) body = AWS.util.buffer.toStream(body); - body.pipe(this.progressStream(stream, httpRequest)); - } - - if (body instanceof Stream) { - body.pipe(stream); - } else if (body) { - stream.end(body); - } else { - stream.end(); - } - }, - - sslAgent: function sslAgent() { - var https = require('https'); - - if (!AWS.NodeHttpClient.sslAgent) { - AWS.NodeHttpClient.sslAgent = new https.Agent({rejectUnauthorized: true}); - AWS.NodeHttpClient.sslAgent.setMaxListeners(0); - - // delegate maxSockets to globalAgent - Object.defineProperty(AWS.NodeHttpClient.sslAgent, 'maxSockets', { - enumerable: true, - get: function() { return https.globalAgent.maxSockets; } - }); - } - return AWS.NodeHttpClient.sslAgent; - }, - - progressStream: function progressStream(stream, httpRequest) { - var numBytes = 0; - var totalBytes = httpRequest.headers['Content-Length']; - var writer = new WritableStream(); - writer._write = function(chunk, encoding, callback) { - if (chunk) { - numBytes += chunk.length; - stream.emit('sendProgress', { - loaded: numBytes, total: totalBytes - }); - } - callback(); - }; - return writer; - }, - - emitter: null -}); - -/** - * @!ignore - */ - -/** - * @api private - */ -AWS.HttpClient.prototype = AWS.NodeHttpClient.prototype; - -/** - * @api private - */ -AWS.HttpClient.streamsApiVersion = ReadableStream ? 2 : 1; diff --git a/cli/node_modules/aws-sdk/lib/http/xhr.js b/cli/node_modules/aws-sdk/lib/http/xhr.js deleted file mode 100644 index 9fc80a75f..000000000 --- a/cli/node_modules/aws-sdk/lib/http/xhr.js +++ /dev/null @@ -1,122 +0,0 @@ -var AWS = require('../core'); -var EventEmitter = require('events').EventEmitter; -require('../http'); - -/** - * @api private - */ -AWS.XHRClient = AWS.util.inherit({ - handleRequest: function handleRequest(httpRequest, httpOptions, callback, errCallback) { - var self = this; - var endpoint = httpRequest.endpoint; - var emitter = new EventEmitter(); - var href = endpoint.protocol + '//' + endpoint.hostname; - if (endpoint.port !== 80 && endpoint.port !== 443) { - href += ':' + endpoint.port; - } - href += httpRequest.path; - - var xhr = new XMLHttpRequest(), headersEmitted = false; - httpRequest.stream = xhr; - - xhr.addEventListener('readystatechange', function() { - try { - if (xhr.status === 0) return; // 0 code is invalid - } catch (e) { return; } - - if (this.readyState >= this.HEADERS_RECEIVED && !headersEmitted) { - try { xhr.responseType = 'arraybuffer'; } catch (e) {} - emitter.statusCode = xhr.status; - emitter.headers = self.parseHeaders(xhr.getAllResponseHeaders()); - emitter.emit('headers', emitter.statusCode, emitter.headers); - headersEmitted = true; - } - if (this.readyState === this.DONE) { - self.finishRequest(xhr, emitter); - } - }, false); - xhr.upload.addEventListener('progress', function (evt) { - emitter.emit('sendProgress', evt); - }); - xhr.addEventListener('progress', function (evt) { - emitter.emit('receiveProgress', evt); - }, false); - xhr.addEventListener('timeout', function () { - errCallback(AWS.util.error(new Error('Timeout'), {code: 'TimeoutError'})); - }, false); - xhr.addEventListener('error', function () { - errCallback(AWS.util.error(new Error('Network Failure'), { - code: 'NetworkingError' - })); - }, false); - - callback(emitter); - xhr.open(httpRequest.method, href, httpOptions.xhrAsync !== false); - AWS.util.each(httpRequest.headers, function (key, value) { - if (key !== 'Content-Length' && key !== 'User-Agent' && key !== 'Host') { - xhr.setRequestHeader(key, value); - } - }); - - if (httpOptions.timeout && httpOptions.xhrAsync !== false) { - xhr.timeout = httpOptions.timeout; - } - - if (httpOptions.xhrWithCredentials) { - xhr.withCredentials = true; - } - - try { - xhr.send(httpRequest.body); - } catch (err) { - if (httpRequest.body && typeof httpRequest.body.buffer === 'object') { - xhr.send(httpRequest.body.buffer); // send ArrayBuffer directly - } else { - throw err; - } - } - - return emitter; - }, - - parseHeaders: function parseHeaders(rawHeaders) { - var headers = {}; - AWS.util.arrayEach(rawHeaders.split(/\r?\n/), function (line) { - var key = line.split(':', 1)[0]; - var value = line.substring(key.length + 2); - if (key.length > 0) headers[key.toLowerCase()] = value; - }); - return headers; - }, - - finishRequest: function finishRequest(xhr, emitter) { - var buffer; - if (xhr.responseType === 'arraybuffer' && xhr.response) { - var ab = xhr.response; - buffer = new AWS.util.Buffer(ab.byteLength); - var view = new Uint8Array(ab); - for (var i = 0; i < buffer.length; ++i) { - buffer[i] = view[i]; - } - } - - try { - if (!buffer && typeof xhr.responseText === 'string') { - buffer = new AWS.util.Buffer(xhr.responseText); - } - } catch (e) {} - - if (buffer) emitter.emit('data', buffer); - emitter.emit('end'); - } -}); - -/** - * @api private - */ -AWS.HttpClient.prototype = AWS.XHRClient.prototype; - -/** - * @api private - */ -AWS.HttpClient.streamsApiVersion = 1; diff --git a/cli/node_modules/aws-sdk/lib/json/builder.js b/cli/node_modules/aws-sdk/lib/json/builder.js deleted file mode 100644 index db92cb593..000000000 --- a/cli/node_modules/aws-sdk/lib/json/builder.js +++ /dev/null @@ -1,56 +0,0 @@ -var util = require('../util'); - -function JsonBuilder() { } - -JsonBuilder.prototype.build = function(value, shape) { - return JSON.stringify(translate(value, shape)); -}; - -function translate(value, shape) { - if (!shape || value === undefined || value === null) return undefined; - - switch (shape.type) { - case 'structure': return translateStructure(value, shape); - case 'map': return translateMap(value, shape); - case 'list': return translateList(value, shape); - default: return translateScalar(value, shape); - } -} - -function translateStructure(structure, shape) { - var struct = {}; - util.each(structure, function(name, value) { - var memberShape = shape.members[name]; - if (memberShape) { - if (memberShape.location !== 'body') return; - - var result = translate(value, memberShape); - if (result !== undefined) struct[name] = result; - } - }); - return struct; -} - -function translateList(list, shape) { - var out = []; - util.arrayEach(list, function(value) { - var result = translate(value, shape.member); - if (result !== undefined) out.push(result); - }); - return out; -} - -function translateMap(map, shape) { - var out = {}; - util.each(map, function(key, value) { - var result = translate(value, shape.value); - if (result !== undefined) out[key] = result; - }); - return out; -} - -function translateScalar(value, shape) { - return shape.toWireFormat(value); -} - -module.exports = JsonBuilder; diff --git a/cli/node_modules/aws-sdk/lib/json/parser.js b/cli/node_modules/aws-sdk/lib/json/parser.js deleted file mode 100644 index ff7a97079..000000000 --- a/cli/node_modules/aws-sdk/lib/json/parser.js +++ /dev/null @@ -1,62 +0,0 @@ -var util = require('../util'); - -function JsonParser() { } - -JsonParser.prototype.parse = function(value, shape) { - return translate(JSON.parse(value), shape); -}; - -function translate(value, shape) { - if (!shape || value === undefined) return undefined; - - switch (shape.type) { - case 'structure': return translateStructure(value, shape); - case 'map': return translateMap(value, shape); - case 'list': return translateList(value, shape); - default: return translateScalar(value, shape); - } -} - -function translateStructure(structure, shape) { - if (structure == null) return undefined; - - var struct = {}; - util.each(structure, function(name, value) { - var memberShape = shape.members[name]; - if (memberShape) { - var result = translate(value, memberShape); - if (result !== undefined) struct[name] = result; - } - }); - return struct; -} - -function translateList(list, shape) { - if (list == null) return undefined; - - var out = []; - util.arrayEach(list, function(value) { - var result = translate(value, shape.member); - if (result === undefined) out.push(null); - else out.push(result); - }); - return out; -} - -function translateMap(map, shape) { - if (map == null) return undefined; - - var out = {}; - util.each(map, function(key, value) { - var result = translate(value, shape.value); - if (result === undefined) out[key] = null; - else out[key] = result; - }); - return out; -} - -function translateScalar(value, shape) { - return shape.toType(value); -} - -module.exports = JsonParser; diff --git a/cli/node_modules/aws-sdk/lib/metadata_service.js b/cli/node_modules/aws-sdk/lib/metadata_service.js deleted file mode 100644 index 0eaf453e8..000000000 --- a/cli/node_modules/aws-sdk/lib/metadata_service.js +++ /dev/null @@ -1,127 +0,0 @@ -var AWS = require('./core'); -require('./http'); -var inherit = AWS.util.inherit; - -/** - * Represents a metadata service available on EC2 instances. Using the - * {request} method, you can receieve metadata about any available resource - * on the metadata service. - * - * @!attribute [r] httpOptions - * @return [map] a map of options to pass to the underlying HTTP request: - * - * * **timeout** (Number) — a timeout value in milliseconds to wait - * before aborting the connection. Set to 0 for no timeout. - * - * @!macro nobrowser - */ -AWS.MetadataService = inherit({ - /** - * @return [String] the hostname of the instance metadata service - */ - host: '169.254.169.254', - - /** - * @!ignore - */ - - /** - * Default HTTP options. By default, the metadata service is set to not - * timeout on long requests. This means that on non-EC2 machines, this - * request will never return. If you are calling this operation from an - * environment that may not always run on EC2, set a `timeout` value so - * the SDK will abort the request after a given number of milliseconds. - */ - httpOptions: { timeout: 0 }, - - /** - * Creates a new MetadataService object with a given set of options. - * - * @option options host [String] the hostname of the instance metadata - * service - * @option options httpOptions [map] a map of options to pass to the - * underlying HTTP request: - * - * * **timeout** (Number) — a timeout value in milliseconds to wait - * before aborting the connection. Set to 0 for no timeout. - */ - constructor: function MetadataService(options) { - AWS.util.update(this, options); - }, - - /** - * Sends a request to the instance metadata service for a given resource. - * - * @param path [String] the path of the resource to get - * @callback callback function(err, data) - * Called when a response is available from the service. - * @param err [Error, null] if an error occurred, this value will be set - * @param data [String, null] if the request was successful, the body of - * the response - */ - request: function request(path, callback) { - path = path || '/'; - - var data = ''; - var http = AWS.HttpClient.getInstance(); - var httpRequest = new AWS.HttpRequest('http://' + this.host + path); - httpRequest.method = 'GET'; - var httpOptions = this.httpOptions; - - process.nextTick(function() { - http.handleRequest(httpRequest, httpOptions, function(httpResponse) { - httpResponse.on('data', function(chunk) { data += chunk.toString(); }); - httpResponse.on('end', function() { callback(null, data); }); - }, callback); - }); - }, - - /** - * @api private - */ - loadCredentialsCallbacks: [], - - /** - * Loads a set of credentials stored in the instance metadata service - * - * @api private - * @callback callback function(err, credentials) - * Called when credentials are loaded from the resource - * @param err [Error] if an error occurred, this value will be set - * @param credentials [Object] the raw JSON object containing all - * metadata from the credentials resource - */ - loadCredentials: function loadCredentials(callback) { - var self = this; - var basePath = '/latest/meta-data/iam/security-credentials/'; - self.loadCredentialsCallbacks.push(callback); - if (self.loadCredentialsCallbacks.length > 1) { return; } - - function callbacks(err, creds) { - var cb; - while ((cb = self.loadCredentialsCallbacks.shift()) !== undefined) { - cb(err, creds); - } - } - - self.request(basePath, function (err, roleName) { - if (err) callbacks(err); - else { - roleName = roleName.split('\n')[0]; // grab first (and only) role - self.request(basePath + roleName, function (credErr, credData) { - if (credErr) callbacks(credErr); - else { - try { - var credentials = JSON.parse(credData); - callbacks(null, credentials); - } catch (parseError) { - callbacks(parseError); - } - } - }); - } - }); - } -}); - -module.exports = AWS.MetadataService; diff --git a/cli/node_modules/aws-sdk/lib/model/api.js b/cli/node_modules/aws-sdk/lib/model/api.js deleted file mode 100644 index 53c738407..000000000 --- a/cli/node_modules/aws-sdk/lib/model/api.js +++ /dev/null @@ -1,63 +0,0 @@ -var Collection = require('./collection'); -var Operation = require('./operation'); -var Shape = require('./shape'); -var Paginator = require('./paginator'); -var ResourceWaiter = require('./resource_waiter'); - -var util = require('../util'); -var property = util.property; -var memoizedProperty = util.memoizedProperty; - -function Api(api, options) { - api = api || {}; - options = options || {}; - options.api = this; - - api.metadata = api.metadata || {}; - - property(this, 'isApi', true, false); - property(this, 'apiVersion', api.metadata.apiVersion); - property(this, 'endpointPrefix', api.metadata.endpointPrefix); - property(this, 'signingName', api.metadata.signingName); - property(this, 'globalEndpoint', api.metadata.globalEndpoint); - property(this, 'signatureVersion', api.metadata.signatureVersion); - property(this, 'jsonVersion', api.metadata.jsonVersion); - property(this, 'targetPrefix', api.metadata.targetPrefix); - property(this, 'protocol', api.metadata.protocol); - property(this, 'timestampFormat', api.metadata.timestampFormat); - property(this, 'xmlNamespaceUri', api.metadata.xmlNamespace); - property(this, 'abbreviation', api.metadata.serviceAbbreviation); - property(this, 'fullName', api.metadata.serviceFullName); - - memoizedProperty(this, 'className', function() { - var name = api.metadata.serviceAbbreviation || api.metadata.serviceFullName; - if (!name) return null; - - name = name.replace(/^Amazon|AWS\s*|\(.*|\s+|\W+/g, ''); - if (name === 'ElasticLoadBalancing') name = 'ELB'; - return name; - }); - - property(this, 'operations', new Collection(api.operations, options, function(name, operation) { - return new Operation(name, operation, options); - }, util.string.lowerFirst)); - - property(this, 'shapes', new Collection(api.shapes, options, function(name, shape) { - return Shape.create(shape, options); - })); - - property(this, 'paginators', new Collection(api.paginators, options, function(name, paginator) { - return new Paginator(name, paginator, options); - })); - - property(this, 'waiters', new Collection(api.waiters, options, function(name, waiter) { - return new ResourceWaiter(name, waiter, options); - }, util.string.lowerFirst)); - - if (options.documentation) { - property(this, 'documentation', api.documentation); - property(this, 'documentationUrl', api.documentationUrl); - } -} - -module.exports = Api; diff --git a/cli/node_modules/aws-sdk/lib/model/collection.js b/cli/node_modules/aws-sdk/lib/model/collection.js deleted file mode 100644 index c81e73754..000000000 --- a/cli/node_modules/aws-sdk/lib/model/collection.js +++ /dev/null @@ -1,20 +0,0 @@ -var memoizedProperty = require('../util').memoizedProperty; - -function memoize(name, value, fn, nameTr) { - memoizedProperty(this, nameTr(name), function() { - return fn(name, value); - }); -} - -function Collection(iterable, options, fn, nameTr) { - nameTr = nameTr || String; - var self = this; - - for (var id in iterable) { - if (iterable.hasOwnProperty(id)) { - memoize.call(self, id, iterable[id], fn, nameTr); - } - } -} - -module.exports = Collection; diff --git a/cli/node_modules/aws-sdk/lib/model/operation.js b/cli/node_modules/aws-sdk/lib/model/operation.js deleted file mode 100644 index befcb777e..000000000 --- a/cli/node_modules/aws-sdk/lib/model/operation.js +++ /dev/null @@ -1,52 +0,0 @@ -var Shape = require('./shape'); - -var util = require('../util'); -var property = util.property; -var memoizedProperty = util.memoizedProperty; - -function Operation(name, operation, options) { - options = options || {}; - - property(this, 'name', operation.name || name); - property(this, 'api', options.api, false); - - operation.http = operation.http || {}; - property(this, 'httpMethod', operation.http.method || 'POST'); - property(this, 'httpPath', operation.http.requestUri || '/'); - - memoizedProperty(this, 'input', function() { - if (!operation.input) { - return new Shape.create({type: 'structure'}, options); - } - return Shape.create(operation.input, options); - }); - - memoizedProperty(this, 'output', function() { - if (!operation.output) { - return new Shape.create({type: 'structure'}, options); - } - return Shape.create(operation.output, options); - }); - - memoizedProperty(this, 'errors', function() { - var list = []; - if (!operation.errors) return null; - - for (var i = 0; i < operation.errors.length; i++) { - list.push(Shape.create(operation.errors[i], options)); - } - - return list; - }); - - memoizedProperty(this, 'paginator', function() { - return options.api.paginators[name]; - }); - - if (options.documentation) { - property(this, 'documentation', operation.documentation); - property(this, 'documentationUrl', operation.documentationUrl); - } -} - -module.exports = Operation; diff --git a/cli/node_modules/aws-sdk/lib/model/paginator.js b/cli/node_modules/aws-sdk/lib/model/paginator.js deleted file mode 100644 index 1fad68ebc..000000000 --- a/cli/node_modules/aws-sdk/lib/model/paginator.js +++ /dev/null @@ -1,11 +0,0 @@ -var property = require('../util').property; - -function Paginator(name, paginator) { - property(this, 'inputToken', paginator.input_token); - property(this, 'limitKey', paginator.limit_key); - property(this, 'moreResults', paginator.more_results); - property(this, 'outputToken', paginator.output_token); - property(this, 'resultKey', paginator.result_key); -} - -module.exports = Paginator; diff --git a/cli/node_modules/aws-sdk/lib/model/resource_waiter.js b/cli/node_modules/aws-sdk/lib/model/resource_waiter.js deleted file mode 100644 index 7a7057d8b..000000000 --- a/cli/node_modules/aws-sdk/lib/model/resource_waiter.js +++ /dev/null @@ -1,49 +0,0 @@ -var util = require('../util'); -var property = util.property; - -function ResourceWaiter(name, waiter, options) { - options = options || {}; - - function InnerResourceWaiter() { - property(this, 'name', name); - property(this, 'api', options.api, false); - - if (waiter.operation) { - property(this, 'operation', util.string.lowerFirst(waiter.operation)); - } - - var self = this, map = { - ignoreErrors: 'ignore_errors', - successType: 'success_type', - successValue: 'success_value', - successPath: 'success_path', - acceptorType: 'acceptor_type', - acceptorValue: 'acceptor_value', - acceptorPath: 'acceptor_path', - failureType: 'failure_type', - failureValue: 'failure_value', - failurePath: 'success_path', - interval: 'interval', - maxAttempts: 'max_attempts' - }; - Object.keys(map).forEach(function(key) { - var value = waiter[map[key]]; - if (value) property(self, key, value); - }); - } - - if (options.api) { - var proto = null; - if (waiter['extends']) { - proto = options.api.waiters[waiter['extends']]; - } else if (name !== '__default__') { - proto = options.api.waiters['__default__']; - } - - if (proto) InnerResourceWaiter.prototype = proto; - } - - return new InnerResourceWaiter(); -} - -module.exports = ResourceWaiter; diff --git a/cli/node_modules/aws-sdk/lib/model/shape.js b/cli/node_modules/aws-sdk/lib/model/shape.js deleted file mode 100644 index d1b98392c..000000000 --- a/cli/node_modules/aws-sdk/lib/model/shape.js +++ /dev/null @@ -1,342 +0,0 @@ -var Collection = require('./collection'); - -var util = require('../util'); - -function property(obj, name, value) { - if (value !== null && value !== undefined) { - util.property.apply(this, arguments); - } -} - -function memoizedProperty(obj, name) { - if (!obj.constructor.prototype[name]) { - util.memoizedProperty.apply(this, arguments); - } -} - -function Shape(shape, options, memberName) { - options = options || {}; - - property(this, 'shape', shape.shape); - property(this, 'api', options.api, false); - property(this, 'type', shape.type); - property(this, 'location', shape.location || this.location || 'body'); - property(this, 'name', this.name || shape.xmlName || shape.queryName || - shape.locationName || memberName); - property(this, 'isStreaming', shape.streaming || this.isStreaming || false); - property(this, 'isComposite', shape.isComposite || false); - property(this, 'isShape', true, false); - property(this, 'isQueryName', shape.queryName ? true : false, false); - property(this, 'isLocationName', shape.locationName ? true : false, false); - - if (options.documentation) { - property(this, 'documentation', shape.documentation); - property(this, 'documentationUrl', shape.documentationUrl); - } - - if (shape.xmlAttribute) { - property(this, 'isXmlAttribute', shape.xmlAttribute || false); - } - - // type conversion and parsing - property(this, 'defaultValue', null); - this.toWireFormat = function(value) { - if (value === null || value === undefined) return ''; - return value; - }; - this.toType = function(value) { return value; }; -} - -/** - * @api private - */ -Shape.normalizedTypes = { - character: 'string', - double: 'float', - long: 'integer', - short: 'integer', - biginteger: 'integer', - bigdecimal: 'float', - blob: 'binary' -}; - -/** - * @api private - */ -Shape.types = { - 'structure': StructureShape, - 'list': ListShape, - 'map': MapShape, - 'boolean': BooleanShape, - 'timestamp': TimestampShape, - 'float': FloatShape, - 'integer': IntegerShape, - 'string': StringShape, - 'base64': Base64Shape, - 'binary': BinaryShape -}; - -Shape.resolve = function resolve(shape, options) { - if (shape.shape) { - var refShape = options.api.shapes[shape.shape]; - if (!refShape) { - throw new Error('Cannot find shape reference: ' + shape.shape); - } - - return refShape; - } else { - return null; - } -}; - -Shape.create = function create(shape, options, memberName) { - if (shape.isShape) return shape; - - var refShape = Shape.resolve(shape, options); - if (refShape) { - var filteredKeys = Object.keys(shape); - if (!options.documentation) { - filteredKeys = filteredKeys.filter(function(name) { - return !name.match(/documentation/); - }); - } - if (filteredKeys === ['shape']) { // no inline customizations - return refShape; - } - - // create an inline shape with extra members - var InlineShape = function() { - refShape.constructor.call(this, shape, options, memberName); - }; - InlineShape.prototype = refShape; - return new InlineShape(); - } else { - // set type if not set - if (!shape.type) { - if (shape.members) shape.type = 'structure'; - else if (shape.member) shape.type = 'list'; - else if (shape.key) shape.type = 'map'; - else shape.type = 'string'; - } - - // normalize types - var origType = shape.type; - if (Shape.normalizedTypes[shape.type]) { - shape.type = Shape.normalizedTypes[shape.type]; - } - - if (Shape.types[shape.type]) { - return new Shape.types[shape.type](shape, options, memberName); - } else { - throw new Error('Unrecognized shape type: ' + origType); - } - } -}; - -function CompositeShape(shape) { - Shape.apply(this, arguments); - property(this, 'isComposite', true); - - if (shape.flattened) { - property(this, 'flattened', shape.flattened || false); - } -} - -function StructureShape(shape, options) { - var requiredMap = null, firstInit = !this.isShape; - - CompositeShape.apply(this, arguments); - - if (firstInit) { - property(this, 'defaultValue', function() { return {}; }); - property(this, 'members', {}); - property(this, 'memberNames', []); - property(this, 'required', []); - property(this, 'isRequired', function() { return false; }); - } - - if (shape.members) { - property(this, 'members', new Collection(shape.members, options, function(name, member) { - return Shape.create(member, options, name); - })); - memoizedProperty(this, 'memberNames', function() { - return shape.xmlOrder || Object.keys(shape.members); - }); - } - - if (shape.required) { - property(this, 'required', shape.required); - property(this, 'isRequired', function(name) { - if (!requiredMap) { - requiredMap = {}; - for (var i = 0; i < shape.required.length; i++) { - requiredMap[shape.required[i]] = true; - } - } - - return requiredMap[name]; - }, false, true); - } - - property(this, 'resultWrapper', shape.resultWrapper || null); - - if (shape.payload) { - property(this, 'payload', shape.payload); - } - - if (typeof shape.xmlNamespace === 'string') { - property(this, 'xmlNamespaceUri', shape.xmlNamespace); - } else if (typeof shape.xmlNamespace === 'object') { - property(this, 'xmlNamespacePrefix', shape.xmlNamespace.prefix); - property(this, 'xmlNamespaceUri', shape.xmlNamespace.uri); - } -} - -function ListShape(shape, options) { - var self = this, firstInit = !this.isShape; - CompositeShape.apply(this, arguments); - - if (firstInit) { - property(this, 'defaultValue', function() { return []; }); - } - - if (shape.member) { - memoizedProperty(this, 'member', function() { - return Shape.create(shape.member, options); - }); - } - - if (this.flattened) { - var oldName = this.name; - memoizedProperty(this, 'name', function() { - return self.member.name || oldName; - }); - } -} - -function MapShape(shape, options) { - var firstInit = !this.isShape; - CompositeShape.apply(this, arguments); - - if (firstInit) { - property(this, 'defaultValue', function() { return {}; }); - property(this, 'key', Shape.create({type: 'string'}, options)); - property(this, 'value', Shape.create({type: 'string'}, options)); - } - - if (shape.key) { - memoizedProperty(this, 'key', function() { - return Shape.create(shape.key, options); - }); - } - if (shape.value) { - memoizedProperty(this, 'value', function() { - return Shape.create(shape.value, options); - }); - } -} - -function TimestampShape(shape) { - var self = this; - Shape.apply(this, arguments); - - if (this.location === 'header') { - property(this, 'timestampFormat', 'rfc822'); - } else if (shape.timestampFormat) { - property(this, 'timestampFormat', shape.timestampFormat); - } else if (this.api) { - if (this.api.timestampFormat) { - property(this, 'timestampFormat', this.api.timestampFormat); - } else { - switch (this.api.protocol) { - case 'json': - case 'rest-json': - property(this, 'timestampFormat', 'unixTimestamp'); - break; - case 'rest-xml': - case 'query': - case 'ec2': - property(this, 'timestampFormat', 'iso8601'); - break; - } - } - } - - this.toType = function(value) { - if (value === null || value === undefined) return null; - if (typeof value.toUTCString === 'function') return value; - return typeof value === 'string' || typeof value === 'number' ? - util.date.parseTimestamp(value) : null; - }; - - this.toWireFormat = function(value) { - return util.date.format(value, self.timestampFormat); - }; -} - -function StringShape() { - Shape.apply(this, arguments); - - if (this.api) { - switch (this.api.protocol) { - case 'rest-xml': - case 'query': - case 'ec2': - this.toType = function(value) { return value || ''; }; - } - } -} - -function FloatShape() { - Shape.apply(this, arguments); - - this.toType = function(value) { - if (value === null || value === undefined) return null; - return parseFloat(value); - }; - this.toWireFormat = this.toType; -} - -function IntegerShape() { - Shape.apply(this, arguments); - - this.toType = function(value) { - if (value === null || value === undefined) return null; - return parseInt(value, 10); - }; - this.toWireFormat = this.toType; -} - -function BinaryShape() { - Shape.apply(this, arguments); - this.toType = util.base64.decode; - this.toWireFormat = util.base64.encode; -} - -function Base64Shape() { - BinaryShape.apply(this, arguments); -} - -function BooleanShape() { - Shape.apply(this, arguments); - - this.toType = function(value) { - if (typeof value === 'boolean') return value; - if (value === null || value === undefined) return null; - return value === 'true'; - }; -} - -/** - * @api private - */ -Shape.shapes = { - StructureShape: StructureShape, - ListShape: ListShape, - MapShape: MapShape, - StringShape: StringShape, - BooleanShape: BooleanShape, - Base64Shape: Base64Shape -}; - -module.exports = Shape; diff --git a/cli/node_modules/aws-sdk/lib/param_validator.js b/cli/node_modules/aws-sdk/lib/param_validator.js deleted file mode 100644 index 827a59b80..000000000 --- a/cli/node_modules/aws-sdk/lib/param_validator.js +++ /dev/null @@ -1,175 +0,0 @@ -var AWS = require('./core'); - -/** - * @api private - */ -AWS.ParamValidator = AWS.util.inherit({ - validate: function validate(shape, params, context) { - this.errors = []; - this.validateMember(shape, params || {}, context || 'params'); - - if (this.errors.length > 1) { - var msg = this.errors.join('\n* '); - if (this.errors.length > 1) { - msg = 'There were ' + this.errors.length + - ' validation errors:\n* ' + msg; - throw AWS.util.error(new Error(msg), - {code: 'MultipleValidationErrors', errors: this.errors}); - } - } else if (this.errors.length === 1) { - throw this.errors[0]; - } else { - return true; - } - }, - - validateStructure: function validateStructure(shape, params, context) { - this.validateType(context, params, ['object'], 'structure'); - - var paramName; - for (var i = 0; shape.required && i < shape.required.length; i++) { - paramName = shape.required[i]; - var value = params[paramName]; - if (value === undefined || value === null) { - this.fail('MissingRequiredParameter', - 'Missing required key \'' + paramName + '\' in ' + context); - } - } - - // validate hash members - for (paramName in params) { - if (!params.hasOwnProperty(paramName)) continue; - - var paramValue = params[paramName], - memberShape = shape.members[paramName]; - - if (memberShape !== undefined) { - var memberContext = [context, paramName].join('.'); - this.validateMember(memberShape, paramValue, memberContext); - } else { - this.fail('UnexpectedParameter', - 'Unexpected key \'' + paramName + '\' found in ' + context); - } - } - - return true; - }, - - validateMember: function validateMember(shape, param, context) { - switch (shape.type) { - case 'structure': - return this.validateStructure(shape, param, context); - case 'list': - return this.validateList(shape, param, context); - case 'map': - return this.validateMap(shape, param, context); - default: - return this.validateScalar(shape, param, context); - } - }, - - validateList: function validateList(shape, params, context) { - this.validateType(context, params, [Array]); - - // validate array members - for (var i = 0; i < params.length; i++) { - this.validateMember(shape.member, params[i], context + '[' + i + ']'); - } - }, - - validateMap: function validateMap(shape, params, context) { - this.validateType(context, params, ['object'], 'map'); - - for (var param in params) { - if (!params.hasOwnProperty(param)) continue; - this.validateMember(shape.value, params[param], - context + '[\'' + param + '\']'); - } - }, - - validateScalar: function validateScalar(shape, value, context) { - switch (shape.type) { - case null: - case undefined: - case 'string': - return this.validateType(context, value, ['string']); - case 'base64': - case 'binary': - return this.validatePayload(context, value); - case 'integer': - case 'float': - return this.validateNumber(context, value); - case 'boolean': - return this.validateType(context, value, ['boolean']); - case 'timestamp': - return this.validateType(context, value, [Date, - /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/, 'number'], - 'Date object, ISO-8601 string, or a UNIX timestamp'); - default: - return this.fail('UnkownType', 'Unhandled type ' + - shape.type + ' for ' + context); - } - }, - - fail: function fail(code, message) { - this.errors.push(AWS.util.error(new Error(message), {code: code})); - }, - - validateType: function validateType(context, value, acceptedTypes, type) { - if (value === null || value === undefined) return; - - var foundInvalidType = false; - for (var i = 0; i < acceptedTypes.length; i++) { - if (typeof acceptedTypes[i] === 'string') { - if (typeof value === acceptedTypes[i]) return; - } else if (acceptedTypes[i] instanceof RegExp) { - if ((value || '').toString().match(acceptedTypes[i])) return; - } else { - if (value instanceof acceptedTypes[i]) return; - if (AWS.util.isType(value, acceptedTypes[i])) return; - if (!type && !foundInvalidType) acceptedTypes = acceptedTypes.slice(); - acceptedTypes[i] = AWS.util.typeName(acceptedTypes[i]); - } - foundInvalidType = true; - } - - var acceptedType = type; - if (!acceptedType) { - acceptedType = acceptedTypes.join(', ').replace(/,([^,]+)$/, ', or$1'); - } - - var vowel = acceptedType.match(/^[aeiou]/i) ? 'n' : ''; - this.fail('InvalidParameterType', 'Expected ' + context + ' to be a' + - vowel + ' ' + acceptedType); - }, - - validateNumber: function validateNumber(context, value) { - if (value === null || value === undefined) return; - if (typeof value === 'string') { - var castedValue = parseFloat(value); - if (castedValue.toString() === value) value = castedValue; - } - this.validateType(context, value, ['number']); - }, - - validatePayload: function validatePayload(context, value) { - if (value === null || value === undefined) return; - if (typeof value === 'string') return; - if (value && typeof value.byteLength === 'number') return; // typed arrays - if (AWS.util.isNode()) { // special check for buffer/stream in Node.js - var Stream = AWS.util.nodeRequire('stream').Stream; - if (AWS.util.Buffer.isBuffer(value) || value instanceof Stream) return; - } - - var types = ['Buffer', 'Stream', 'File', 'Blob', 'ArrayBuffer', 'DataView']; - if (value) { - for (var i = 0; i < types.length; i++) { - if (AWS.util.isType(value, types[i])) return; - if (AWS.util.typeName(value.constructor) === types[i]) return; - } - } - - this.fail('InvalidParameterType', 'Expected ' + context + ' to be a ' + - 'string, Buffer, Stream, Blob, or typed array object'); - } -}); diff --git a/cli/node_modules/aws-sdk/lib/protocol/json.js b/cli/node_modules/aws-sdk/lib/protocol/json.js deleted file mode 100644 index b9c9d8c71..000000000 --- a/cli/node_modules/aws-sdk/lib/protocol/json.js +++ /dev/null @@ -1,62 +0,0 @@ -var util = require('../util'); -var JsonBuilder = require('../json/builder'); -var JsonParser = require('../json/parser'); - -function buildRequest(req) { - var httpRequest = req.httpRequest; - var api = req.service.api; - var target = api.targetPrefix + '.' + api.operations[req.operation].name; - var version = api.jsonVersion || '1.0'; - var input = api.operations[req.operation].input; - var builder = new JsonBuilder(); - - if (version === 1) version = '1.0'; - httpRequest.body = builder.build(req.params || {}, input); - httpRequest.headers['Content-Type'] = 'application/x-amz-json-' + version; - httpRequest.headers['X-Amz-Target'] = target; -} - -function extractError(resp) { - var error = {}; - var httpResponse = resp.httpResponse; - - error.code = httpResponse.headers['x-amzn-errortype'] || 'UnknownError'; - if (typeof error.code === 'string') { - error.code = error.code.split(':')[0]; - } - - if (httpResponse.body.length > 0) { - var e = JSON.parse(httpResponse.body.toString()); - if (e.__type || e.code) { - error.code = (e.__type || e.code).split('#').pop(); - } - if (error.code === 'RequestEntityTooLarge') { - error.message = 'Request body must be less than 1 MB'; - } else { - error.message = (e.message || e.Message || null); - } - } else { - error.statusCode = httpResponse.statusCode; - error.message = httpResponse.statusCode.toString(); - } - - resp.error = util.error(new Error(), error); -} - -function extractData(resp) { - var body = resp.httpResponse.body.toString() || '{}'; - if (resp.request.service.config.convertResponseTypes === false) { - resp.data = JSON.parse(body); - } else { - var operation = resp.request.service.api.operations[resp.request.operation]; - var shape = operation.output || {}; - var parser = new JsonParser(); - resp.data = parser.parse(body, shape); - } -} - -module.exports = { - buildRequest: buildRequest, - extractError: extractError, - extractData: extractData -}; diff --git a/cli/node_modules/aws-sdk/lib/protocol/query.js b/cli/node_modules/aws-sdk/lib/protocol/query.js deleted file mode 100644 index 2e1adcbdb..000000000 --- a/cli/node_modules/aws-sdk/lib/protocol/query.js +++ /dev/null @@ -1,97 +0,0 @@ -var AWS = require('../core'); -var util = require('../util'); -var QueryParamSerializer = require('../query/query_param_serializer'); -var Shape = require('../model/shape'); - -function buildRequest(req) { - var operation = req.service.api.operations[req.operation]; - var httpRequest = req.httpRequest; - httpRequest.headers['Content-Type'] = - 'application/x-www-form-urlencoded; charset=utf-8'; - httpRequest.params = { - Version: req.service.api.apiVersion, - Action: operation.name - }; - - // convert the request parameters into a list of query params, - // e.g. Deeply.NestedParam.0.Name=value - var builder = new QueryParamSerializer(); - builder.serialize(req.params, operation.input, function(name, value) { - httpRequest.params[name] = value; - }); - httpRequest.body = util.queryParamsToString(httpRequest.params); -} - -function extractError(resp) { - var data, body = resp.httpResponse.body.toString(); - if (body.match('= 0 ? '&' : '?'); - var parts = []; - util.arrayEach(Object.keys(queryString).sort(), function(key) { - if (!Array.isArray(queryString[key])) { - queryString[key] = [queryString[key]]; - } - for (var i = 0; i < queryString[key].length; i++) { - parts.push(util.uriEscape(String(key)) + '=' + queryString[key][i]); - } - }); - uri += parts.join('&'); - } - - req.httpRequest.path = uri; -} - -function populateHeaders(req) { - var operation = req.service.api.operations[req.operation]; - util.each(operation.input.members, function (name, member) { - var value = req.params[name]; - if (value === null || value === undefined) return; - - if (member.location === 'headers' && member.type === 'map') { - util.each(value, function(key, memberValue) { - req.httpRequest.headers[member.name + key] = memberValue; - }); - } else if (member.location === 'header') { - value = member.toWireFormat(value).toString(); - req.httpRequest.headers[member.name] = value; - } - }); -} - -function buildRequest(req) { - populateMethod(req); - populateURI(req); - populateHeaders(req); -} - -function extractError() { -} - -function extractData(resp) { - var req = resp.request; - var data = {}; - var r = resp.httpResponse; - var operation = req.service.api.operations[req.operation]; - var output = operation.output; - - // normalize headers names to lower-cased keys for matching - var headers = {}; - util.each(r.headers, function (k, v) { - headers[k.toLowerCase()] = v; - }); - - util.each(output.members, function(name, member) { - var header = (member.name || name).toLowerCase(); - if (member.location === 'headers' && member.type === 'map') { - data[name] = {}; - var location = member.isLocationName ? member.name : ''; - var pattern = new RegExp('^' + location + '(.+)', 'i'); - util.each(r.headers, function (k, v) { - var result = k.match(pattern); - if (result !== null) { - data[name][result[1]] = v; - } - }); - } else if (member.location === 'header') { - if (headers[header] !== undefined) { - data[name] = headers[header]; - } - } else if (member.location === 'statusCode') { - data[name] = parseInt(r.statusCode, 10); - } - }); - - resp.data = data; -} - -module.exports = { - buildRequest: buildRequest, - extractError: extractError, - extractData: extractData -}; diff --git a/cli/node_modules/aws-sdk/lib/protocol/rest_json.js b/cli/node_modules/aws-sdk/lib/protocol/rest_json.js deleted file mode 100644 index 48f45baa4..000000000 --- a/cli/node_modules/aws-sdk/lib/protocol/rest_json.js +++ /dev/null @@ -1,67 +0,0 @@ -var util = require('../util'); -var Rest = require('./rest'); -var Json = require('./json'); -var JsonBuilder = require('../json/builder'); -var JsonParser = require('../json/parser'); - -function populateBody(req) { - var builder = new JsonBuilder(); - var input = req.service.api.operations[req.operation].input; - - if (input.payload) { - var params = {}; - var payloadShape = input.members[input.payload]; - params = req.params[input.payload]; - if (params === undefined) return; - - if (payloadShape.type === 'structure') { - req.httpRequest.body = builder.build(params, payloadShape); - } else { // non-JSON payload - req.httpRequest.body = params; - } - } else { - req.httpRequest.body = builder.build(req.params, input); - } -} - -function buildRequest(req) { - Rest.buildRequest(req); - - // never send body payload on GET/HEAD - if (['GET', 'HEAD'].indexOf(req.httpRequest.method) < 0) { - populateBody(req); - } -} - -function extractError(resp) { - Json.extractError(resp); -} - -function extractData(resp) { - Rest.extractData(resp); - - var req = resp.request; - var rules = req.service.api.operations[req.operation].output || {}; - if (rules.payload) { - var payloadMember = rules.members[rules.payload]; - var body = resp.httpResponse.body; - if (payloadMember.isStreaming) { - resp.data[rules.payload] = body; - } else if (payloadMember.type === 'structure') { - var parser = new JsonParser(); - resp.data[rules.payload] = parser.parse(body, payloadMember); - } else { - resp.data[rules.payload] = body.toString(); - } - } else { - var data = resp.data; - Json.extractData(resp); - resp.data = util.merge(data, resp.data); - } -} - -module.exports = { - buildRequest: buildRequest, - extractError: extractError, - extractData: extractData -}; diff --git a/cli/node_modules/aws-sdk/lib/protocol/rest_xml.js b/cli/node_modules/aws-sdk/lib/protocol/rest_xml.js deleted file mode 100644 index ebfd1b653..000000000 --- a/cli/node_modules/aws-sdk/lib/protocol/rest_xml.js +++ /dev/null @@ -1,87 +0,0 @@ -var AWS = require('../core'); -var util = require('../util'); -var Rest = require('./rest'); - -function populateBody(req) { - var input = req.service.api.operations[req.operation].input; - var builder = new AWS.XML.Builder(); - var params = req.params; - - var payload = input.payload; - if (payload) { - var payloadMember = input.members[payload]; - params = params[payload]; - if (params === undefined) return; - - if (payloadMember.type === 'structure') { - var rootElement = payloadMember.name; - req.httpRequest.body = builder.toXML(params, payloadMember, rootElement, true); - } else { // non-xml payload - req.httpRequest.body = params; - } - } else { - req.httpRequest.body = builder.toXML(params, input, input.name || - input.shape || util.string.upperFirst(req.operation) + 'Request'); - } -} - -function buildRequest(req) { - Rest.buildRequest(req); - - // never send body payload on GET/HEAD - if (['GET', 'HEAD'].indexOf(req.httpRequest.method) < 0) { - populateBody(req); - } -} - -function extractError(resp) { - Rest.extractError(resp); - - var data = new AWS.XML.Parser().parse(resp.httpResponse.body.toString()); - if (data.Errors) data = data.Errors; - if (data.Error) data = data.Error; - if (data.Code) { - resp.error = util.error(new Error(), { - code: data.Code, - message: data.Message - }); - } else { - resp.error = util.error(new Error(), { - code: resp.httpResponse.statusCode, - message: null - }); - } -} - -function extractData(resp) { - Rest.extractData(resp); - - var parser; - var req = resp.request; - var body = resp.httpResponse.body; - var operation = req.service.api.operations[req.operation]; - var output = operation.output; - - var payload = output.payload; - if (payload) { - var payloadMember = output.members[payload]; - if (payloadMember.isStreaming) { - resp.data[payload] = body; - } else if (payloadMember.type === 'structure') { - parser = new AWS.XML.Parser(); - resp.data[payload] = parser.parse(body.toString(), payloadMember); - } else { - resp.data[payload] = body.toString(); - } - } else if (body.length > 0) { - parser = new AWS.XML.Parser(); - var data = parser.parse(body.toString(), output); - util.update(resp.data, data); - } -} - -module.exports = { - buildRequest: buildRequest, - extractError: extractError, - extractData: extractData -}; diff --git a/cli/node_modules/aws-sdk/lib/query/query_param_serializer.js b/cli/node_modules/aws-sdk/lib/query/query_param_serializer.js deleted file mode 100644 index 169acf29a..000000000 --- a/cli/node_modules/aws-sdk/lib/query/query_param_serializer.js +++ /dev/null @@ -1,81 +0,0 @@ -var util = require('../util'); - -function QueryParamSerializer() { -} - -QueryParamSerializer.prototype.serialize = function(params, shape, fn) { - serializeStructure('', params, shape, fn); -}; - -function ucfirst(shape) { - if (shape.isQueryName || shape.api.protocol !== 'ec2') { - return shape.name; - } else { - return shape.name[0].toUpperCase() + shape.name.substr(1); - } -} - -function serializeStructure(prefix, struct, rules, fn) { - util.each(rules.members, function(name, member) { - var value = struct[name]; - if (value === null || value === undefined) return; - - var memberName = ucfirst(member); - memberName = prefix ? prefix + '.' + memberName : memberName; - serializeMember(memberName, value, member, fn); - }); -} - -function serializeMap(name, map, rules, fn) { - var i = 1; - util.each(map, function (key, value) { - var prefix = rules.flattened ? '.' : '.entry.'; - var position = prefix + (i++) + '.'; - var keyName = position + (rules.key.name || 'key'); - var valueName = position + (rules.value.name || 'value'); - serializeMember(name + keyName, key, rules.key, fn); - serializeMember(name + valueName, value, rules.value, fn); - }); -} - -function serializeList(name, list, rules, fn) { - var memberRules = rules.member || {}; - - if (list.length === 0) { - fn.call(this, name, null); - return; - } - - util.arrayEach(list, function (v, n) { - var suffix = '.' + (n + 1); - if (rules.api.protocol === 'ec2') { - // Do nothing for EC2 - suffix = suffix + ''; // make linter happy - } else if (rules.flattened) { - if (memberRules.name) { - var parts = name.split('.'); - parts.pop(); - parts.push(ucfirst(memberRules)); - name = parts.join('.'); - } - } else { - suffix = '.member' + suffix; - } - serializeMember(name + suffix, v, memberRules, fn); - }); -} - -function serializeMember(name, value, rules, fn) { - if (value === null || value === undefined) return; - if (rules.type === 'structure') { - serializeStructure(name, value, rules, fn); - } else if (rules.type === 'list') { - serializeList(name, value, rules, fn); - } else if (rules.type === 'map') { - serializeMap(name, value, rules, fn); - } else { - fn(name, rules.toWireFormat(value).toString()); - } -} - -module.exports = QueryParamSerializer; diff --git a/cli/node_modules/aws-sdk/lib/region_config.js b/cli/node_modules/aws-sdk/lib/region_config.js deleted file mode 100644 index 80aac059e..000000000 --- a/cli/node_modules/aws-sdk/lib/region_config.js +++ /dev/null @@ -1,63 +0,0 @@ -var util = require('./util'); -var regionConfig = require('./region_config.json'); - -function generateRegionPrefix(region) { - if (!region) return null; - - var parts = region.split('-'); - if (parts.length < 3) return null; - return parts.slice(0, parts.length - 2).join('-') + '-*'; -} - -function derivedKeys(service) { - var region = service.config.region; - var regionPrefix = generateRegionPrefix(region); - var endpointPrefix = service.api.endpointPrefix; - - return [ - [region, endpointPrefix], - [regionPrefix, endpointPrefix], - [region, '*'], - [regionPrefix, '*'], - ['*', endpointPrefix], - ['*', '*'] - ].map(function(item) { - return item[0] && item[1] ? item.join('/') : null; - }); -} - -function applyConfig(service, config) { - util.each(config, function(key, value) { - if (key === 'globalEndpoint') return; - if (service.config[key] === undefined || service.config[key] === null) { - service.config[key] = value; - } - }); -} - -function configureEndpoint(service) { - var keys = derivedKeys(service); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (!key) continue; - - if (regionConfig.rules.hasOwnProperty(key)) { - var config = regionConfig.rules[key]; - if (typeof config === 'string') { - config = regionConfig.patterns[config]; - } - - // set global endpoint - service.isGlobalEndpoint = !!config.globalEndpoint; - - // signature version - if (!config.signatureVersion) config.signatureVersion = 'v4'; - - // merge config - applyConfig(service, config); - return; - } - } -} - -module.exports = configureEndpoint; diff --git a/cli/node_modules/aws-sdk/lib/region_config.json b/cli/node_modules/aws-sdk/lib/region_config.json deleted file mode 100644 index 99269f384..000000000 --- a/cli/node_modules/aws-sdk/lib/region_config.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "rules": { - "*/*": { - "endpoint": "{service}.{region}.amazonaws.com" - }, - "cn-*/*": { - "endpoint": "{service}.{region}.amazonaws.com.cn" - }, - "*/cloudfront": "globalSSL", - "*/iam": "globalSSL", - "*/sts": "globalSSL", - "*/importexport": { - "endpoint": "{service}.amazonaws.com", - "signatureVersion": "v2", - "globalEndpoint": true - }, - "*/route53": { - "endpoint": "https://{service}.amazonaws.com", - "signatureVersion": "v3https", - "globalEndpoint": true - }, - "us-gov-*/iam": "globalGovCloud", - "us-gov-*/sts": { - "endpoint": "{service}.{region}.amazonaws.com" - }, - "us-gov-west-1/s3": "s3dash", - "us-west-1/s3": "s3dash", - "us-west-2/s3": "s3dash", - "eu-west-1/s3": "s3dash", - "ap-southeast-1/s3": "s3dash", - "ap-southeast-2/s3": "s3dash", - "ap-northeast-1/s3": "s3dash", - "sa-east-1/s3": "s3dash", - "us-east-1/s3": { - "endpoint": "{service}.amazonaws.com", - "signatureVersion": "s3" - }, - "us-east-1/sdb": { - "endpoint": "{service}.amazonaws.com", - "signatureVersion": "v2" - }, - "*/sdb": { - "endpoint": "{service}.{region}.amazonaws.com", - "signatureVersion": "v2" - } - }, - - "patterns": { - "globalSSL": { - "endpoint": "https://{service}.amazonaws.com", - "globalEndpoint": true - }, - "globalGovCloud": { - "endpoint": "{service}.us-gov.amazonaws.com" - }, - "s3dash": { - "endpoint": "{service}-{region}.amazonaws.com", - "signatureVersion": "s3" - } - } -} diff --git a/cli/node_modules/aws-sdk/lib/request.js b/cli/node_modules/aws-sdk/lib/request.js deleted file mode 100644 index 05f023458..000000000 --- a/cli/node_modules/aws-sdk/lib/request.js +++ /dev/null @@ -1,674 +0,0 @@ -var AWS = require('./core'); -var AcceptorStateMachine = require('./state_machine'); -var inherit = AWS.util.inherit; -var domain = AWS.util.nodeRequire('domain'); - -/** - * @api private - */ -var hardErrorStates = {success: 1, error: 1, complete: 1}; - -function isTerminalState(machine) { - return hardErrorStates.hasOwnProperty(machine._asm.currentState); -} - -var fsm = new AcceptorStateMachine(); -fsm.setupStates = function() { - var transition = function(_, done) { - var self = this; - self._haltHandlersOnError = false; - - self.emit(self._asm.currentState, function(err) { - if (err) { - if (isTerminalState(self)) { - if (domain && self.domain instanceof domain.Domain) { - err.domainEmitter = self; - err.domain = self.domain; - err.domainThrown = false; - self.domain.emit('error', err); - } else { - throw err; - } - } else { - self.response.error = err; - done(err); - } - } else { - done(self.response.error); - } - }); - - }; - - this.addState('validate', 'build', 'error', transition); - this.addState('build', 'afterBuild', 'restart', transition); - this.addState('afterBuild', 'sign', 'restart', transition); - this.addState('sign', 'send', 'retry', transition); - this.addState('retry', 'afterRetry', 'afterRetry', transition); - this.addState('afterRetry', 'sign', 'error', transition); - this.addState('send', 'validateResponse', 'retry', transition); - this.addState('validateResponse', 'extractData', 'extractError', transition); - this.addState('extractError', 'extractData', 'retry', transition); - this.addState('extractData', 'success', 'retry', transition); - this.addState('restart', 'build', 'error', transition); - this.addState('success', 'complete', 'complete', transition); - this.addState('error', 'complete', 'complete', transition); - this.addState('complete', null, null, transition); -}; -fsm.setupStates(); - -/** - * ## Asynchronous Requests - * - * All requests made through the SDK are asynchronous and use a - * callback interface. Each service method that kicks off a request - * returns an `AWS.Request` object that you can use to register - * callbacks. - * - * For example, the following service method returns the request - * object as "request", which can be used to register callbacks: - * - * ```javascript - * // request is an AWS.Request object - * var request = ec2.describeInstances(); - * - * // register callbacks on request to retrieve response data - * request.on('success', function(response) { - * console.log(response.data); - * }); - * ``` - * - * When a request is ready to be sent, the {send} method should - * be called: - * - * ```javascript - * request.send(); - * ``` - * - * ## Removing Default Listeners for Events - * - * Request objects are built with default listeners for the various events, - * depending on the service type. In some cases, you may want to remove - * some built-in listeners to customize behaviour. Doing this requires - * access to the built-in listener functions, which are exposed through - * the {AWS.EventListeners.Core} namespace. For instance, you may - * want to customize the HTTP handler used when sending a request. In this - * case, you can remove the built-in listener associated with the 'send' - * event, the {AWS.EventListeners.Core.SEND} listener and add your own. - * - * ## Multiple Callbacks and Chaining - * - * You can register multiple callbacks on any request object. The - * callbacks can be registered for different events, or all for the - * same event. In addition, you can chain callback registration, for - * example: - * - * ```javascript - * request. - * on('success', function(response) { - * console.log("Success!"); - * }). - * on('error', function(response) { - * console.log("Error!"); - * }). - * on('complete', function(response) { - * console.log("Always!"); - * }). - * send(); - * ``` - * - * The above example will print either "Success! Always!", or "Error! Always!", - * depending on whether the request succeeded or not. - * - * @!attribute httpRequest - * @readonly - * @!group HTTP Properties - * @return [AWS.HttpRequest] the raw HTTP request object - * containing request headers and body information - * sent by the service. - * - * @!attribute startTime - * @readonly - * @!group Operation Properties - * @return [Date] the time that the request started - * - * @!group Request Building Events - * - * @!event validate(request) - * Triggered when a request is being validated. Listeners - * should throw an error if the request should not be sent. - * @param request [Request] the request object being sent - * @see AWS.EventListeners.Core.VALIDATE_CREDENTIALS - * @see AWS.EventListeners.Core.VALIDATE_REGION - * @example Ensuring that a certain parameter is set before sending a request - * var req = s3.putObject(params); - * req.on('validate', function() { - * if (!req.params.Body.match(/^Hello\s/)) { - * throw new Error('Body must start with "Hello "'); - * } - * }); - * req.send(function(err, data) { ... }); - * - * @!event build(request) - * Triggered when the request payload is being built. Listeners - * should fill the necessary information to send the request - * over HTTP. - * @param (see AWS.Request~validate) - * @example Add a custom HTTP header to a request - * var req = s3.putObject(params); - * req.on('build', function() { - * req.httpRequest.headers['Custom-Header'] = 'value'; - * }); - * req.send(function(err, data) { ... }); - * - * @!event sign(request) - * Triggered when the request is being signed. Listeners should - * add the correct authentication headers and/or adjust the body, - * depending on the authentication mechanism being used. - * @param (see AWS.Request~validate) - * - * @!group Request Sending Events - * - * @!event send(response) - * Triggered when the request is ready to be sent. Listeners - * should call the underlying transport layer to initiate - * the sending of the request. - * @param response [Response] the response object - * @context [Request] the request object that was sent - * @see AWS.EventListeners.Core.SEND - * - * @!event retry(response) - * Triggered when a request failed and might need to be retried or redirected. - * If the response is retryable, the listener should set the - * `response.error.retryable` property to `true`, and optionally set - * `response.error.retryCount` to the millisecond delay for the next attempt. - * In the case of a redirect, `response.error.redirect` should be set to - * `true` with `retryCount` set to an optional delay on the next request. - * - * If a listener decides that a request should not be retried, - * it should set both `retryable` and `redirect` to false. - * - * Note that a retryable error will be retried at most - * {AWS.Config.maxRetries} times (based on the service object's config). - * Similarly, a request that is redirected will only redirect at most - * {AWS.Config.maxRedirects} times. - * - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * @example Adding a custom retry for a 404 response - * request.on('retry', function(response) { - * // this resource is not yet available, wait 10 seconds to get it again - * if (response.httpResponse.statusCode === 404 && response.error) { - * response.error.retryable = true; // retry this error - * response.error.retryCount = 10000; // wait 10 seconds - * } - * }); - * - * @!group Data Parsing Events - * - * @!event extractError(response) - * Triggered on all non-2xx requests so that listeners can extract - * error details from the response body. Listeners to this event - * should set the `response.error` property. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!event extractData(response) - * Triggered in successful requests to allow listeners to - * de-serialize the response body into `response.data`. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!group Completion Events - * - * @!event success(response) - * Triggered when the request completed successfully. - * `response.data` will contain the response data and - * `response.error` will be null. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!event error(error, response) - * Triggered when an error occurs at any point during the - * request. `response.error` will contain details about the error - * that occurred. `response.data` will be null. - * @param error [Error] the error object containing details about - * the error that occurred. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!event complete(response) - * Triggered whenever a request cycle completes. `response.error` - * should be checked, since the request may have failed. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!group HTTP Events - * - * @!event httpHeaders(statusCode, headers, response) - * Triggered when headers are sent by the remote server - * @param statusCode [Integer] the HTTP response code - * @param headers [map] the response headers - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!event httpData(chunk, response) - * Triggered when data is sent by the remote server - * @param chunk [Buffer] the buffer data containing the next data chunk - * from the server - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * @see AWS.EventListeners.Core.HTTP_DATA - * - * @!event httpUploadProgress(progress, response) - * Triggered when the HTTP request has uploaded more data - * @param progress [map] An object containing the `loaded` and `total` bytes - * of the request. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * @note This event will not be emitted in Node.js 0.8.x. - * - * @!event httpDownloadProgress(progress, response) - * Triggered when the HTTP request has downloaded more data - * @param progress [map] An object containing the `loaded` and `total` bytes - * of the request. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * @note This event will not be emitted in Node.js 0.8.x. - * - * @!event httpError(error, response) - * Triggered when the HTTP request failed - * @param error [Error] the error object that was thrown - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!event httpDone(response) - * Triggered when the server is finished sending data - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @see AWS.Response - */ -AWS.Request = inherit({ - - /** - * Creates a request for an operation on a given service with - * a set of input parameters. - * - * @param service [AWS.Service] the service to perform the operation on - * @param operation [String] the operation to perform on the service - * @param params [Object] parameters to send to the operation. - * See the operation's documentation for the format of the - * parameters. - */ - constructor: function Request(service, operation, params) { - var endpoint = service.endpoint; - var region = service.config.region; - - // global endpoints sign as us-east-1 - if (service.isGlobalEndpoint) region = 'us-east-1'; - - this.domain = domain && domain.active; - this.service = service; - this.operation = operation; - this.params = params || {}; - this.httpRequest = new AWS.HttpRequest(endpoint, region); - this.startTime = AWS.util.date.getDate(); - - this.response = new AWS.Response(this); - this._asm = new AcceptorStateMachine(fsm.states, 'validate'); - this._haltHandlersOnError = false; - - AWS.SequentialExecutor.call(this); - this.emit = this.emitEvent; - }, - - /** - * @!group Sending a Request - */ - - /** - * @overload send(callback = null) - * Sends the request object. - * - * @callback callback function(err, data) - * If a callback is supplied, it is called when a response is returned - * from the service. - * @context [AWS.Request] the request object being sent. - * @param err [Error] the error object returned from the request. - * Set to `null` if the request is successful. - * @param data [Object] the de-serialized data returned from - * the request. Set to `null` if a request error occurs. - * @example Sending a request with a callback - * request = s3.putObject({Bucket: 'bucket', Key: 'key'}); - * request.send(function(err, data) { console.log(err, data); }); - * @example Sending a request with no callback (using event handlers) - * request = s3.putObject({Bucket: 'bucket', Key: 'key'}); - * request.on('complete', function(response) { ... }); // register a callback - * request.send(); - */ - send: function send(callback) { - if (callback) { - this.on('complete', function (resp) { - callback.call(resp, resp.error, resp.data); - }); - } - this.runTo(); - - return this.response; - }, - - /** - * @api private - */ - build: function build(callback) { - return this.runTo('send', callback); - }, - - /** - * @api private - */ - runTo: function runTo(state, done) { - this._asm.runTo(state, done, this); - return this; - }, - - /** - * Aborts a request, emitting the error and complete events. - * - * @!macro nobrowser - * @example Aborting a request after sending - * var params = { - * Bucket: 'bucket', Key: 'key', - * Body: new Buffer(1024 * 1024 * 5) // 5MB payload - * }; - * var request = s3.putObject(params); - * request.send(function (err, data) { - * if (err) console.log("Error:", err.code, err.message); - * else console.log(data); - * }); - * - * // abort request in 1 second - * setTimeout(request.abort.bind(request), 1000); - * - * // prints "Error: RequestAbortedError Request aborted by user" - * @return [AWS.Request] the same request object, for chaining. - * @since v1.4.0 - */ - abort: function abort() { - this.removeAllListeners('validateResponse'); - this.removeAllListeners('extractError'); - this.on('validateResponse', function addAbortedError(resp) { - resp.error = AWS.util.error(new Error('Request aborted by user'), { - code: 'RequestAbortedError', retryable: false - }); - }); - - if (this.httpRequest.stream) { // abort HTTP stream - this.httpRequest.stream.abort(); - if (this.httpRequest._abortCallback) { - this.httpRequest._abortCallback(); - } else { - this.removeAllListeners('send'); // haven't sent yet, so let's not - } - } - - return this; - }, - - /** - * Iterates over each page of results given a pageable request, calling - * the provided callback with each page of data. After all pages have been - * retrieved, the callback is called with `null` data. - * - * @note This operation can generate multiple requests to a service. - * @example Iterating over multiple pages of objects in an S3 bucket - * var pages = 1; - * s3.listObjects().eachPage(function(err, data) { - * if (err) return; - * console.log("Page", pages++); - * console.log(data); - * }); - * @example Iterating over multiple pages with an asynchronous callback - * s3.listObjects(params).eachPage(function(err, data, done) { - * doSomethingAsyncAndOrExpensive(function() { - * // The next page of results isn't fetched until done is called - * done(); - * }); - * }); - * @callback callback function(err, data, [doneCallback]) - * Called with each page of resulting data from the request. If the - * optional `doneCallback` is provided in the function, it must be called - * when the callback is complete. - * - * @param err [Error] an error object, if an error occurred. - * @param data [Object] a single page of response data. If there is no - * more data, this object will be `null`. - * @param doneCallback [Function] an optional done callback. If this - * argument is defined in the function declaration, it should be called - * when the next page is ready to be retrieved. This is useful for - * controlling serial pagination across asynchronous operations. - * @return [Boolean] if the callback returns `false`, pagination will - * stop. - * - * @see AWS.Request.eachItem - * @see AWS.Response.nextPage - * @since v1.4.0 - */ - eachPage: function eachPage(callback) { - // Make all callbacks async-ish - callback = AWS.util.fn.makeAsync(callback, 3); - - function wrappedCallback(response) { - callback.call(response, response.error, response.data, function (result) { - if (result === false) return; - - if (response.hasNextPage()) { - response.nextPage().on('complete', wrappedCallback).send(); - } else { - callback.call(response, null, null, AWS.util.fn.noop); - } - }); - } - - this.on('complete', wrappedCallback).send(); - }, - - /** - * Enumerates over individual items of a request, paging the responses if - * necessary. - * - * @api experimental - * @since v1.4.0 - */ - eachItem: function eachItem(callback) { - var self = this; - function wrappedCallback(err, data) { - if (err) return callback(err, null); - if (data === null) return callback(null, null); - - var config = self.service.paginationConfig(self.operation); - var resultKey = config.resultKey; - if (Array.isArray(resultKey)) resultKey = resultKey[0]; - var results = AWS.util.jamespath.query(resultKey, data); - AWS.util.arrayEach(results, function(result) { - AWS.util.arrayEach(result, function(item) { callback(null, item); }); - }); - } - - this.eachPage(wrappedCallback); - }, - - /** - * @return [Boolean] whether the operation can return multiple pages of - * response data. - * @see AWS.Response.eachPage - * @since v1.4.0 - */ - isPageable: function isPageable() { - return this.service.paginationConfig(this.operation) ? true : false; - }, - - /** - * Converts the request object into a readable stream that - * can be read from or piped into a writable stream. - * - * @note The data read from a readable stream contains only - * the raw HTTP body contents. - * @example Manually reading from a stream - * request.createReadStream().on('data', function(data) { - * console.log("Got data:", data.toString()); - * }); - * @example Piping a request body into a file - * var out = fs.createWriteStream('/path/to/outfile.jpg'); - * s3.service.getObject(params).createReadStream().pipe(out); - * @return [Stream] the readable stream object that can be piped - * or read from (by registering 'data' event listeners). - * @!macro nobrowser - */ - createReadStream: function createReadStream() { - var streams = AWS.util.nodeRequire('stream'); - var req = this; - var stream = null; - - if (AWS.HttpClient.streamsApiVersion === 2) { - stream = new streams.PassThrough(); - req.send(); - } else { - stream = new streams.Stream(); - stream.readable = true; - - stream.sent = false; - stream.on('newListener', function(event) { - if (!stream.sent && event === 'data') { - stream.sent = true; - process.nextTick(function() { req.send(); }); - } - }); - } - - this.on('httpHeaders', function streamHeaders(statusCode, headers, resp) { - if (statusCode < 300) { - req.removeListener('httpData', AWS.EventListeners.Core.HTTP_DATA); - req.removeListener('httpError', AWS.EventListeners.Core.HTTP_ERROR); - req.on('httpError', function streamHttpError(error) { - resp.error = error; - resp.error.retryable = false; - }); - - var httpStream = resp.httpResponse.createUnbufferedStream(); - if (AWS.HttpClient.streamsApiVersion === 2) { - httpStream.pipe(stream); - } else { - httpStream.on('data', function(arg) { - stream.emit('data', arg); - }); - httpStream.on('end', function() { - stream.emit('end'); - }); - } - - httpStream.on('error', function(err) { - stream.emit('error', err); - }); - } - }); - - this.on('error', function(err) { - stream.emit('error', err); - }); - - return stream; - }, - - /** - * @param [Array,Response] args This should be the response object, - * or an array of args to send to the event. - * @api private - */ - emitEvent: function emit(eventName, args, done) { - if (typeof args === 'function') { done = args; args = null; } - if (!done) done = function() { }; - if (!args) args = this.eventParameters(eventName, this.response); - - var origEmit = AWS.SequentialExecutor.prototype.emit; - origEmit.call(this, eventName, args, function (err) { - if (err) this.response.error = err; - done.call(this, err); - }); - }, - - /** - * @api private - */ - eventParameters: function eventParameters(eventName) { - switch (eventName) { - case 'restart': - case 'validate': - case 'sign': - case 'build': - case 'afterValidate': - case 'afterBuild': - return [this]; - case 'error': - return [this.response.error, this.response]; - default: - return [this.response]; - } - }, - - /** - * @api private - */ - presign: function presign(expires, callback) { - if (!callback && typeof expires === 'function') { - callback = expires; - expires = null; - } - return new AWS.Signers.Presign().sign(this.toGet(), expires, callback); - }, - - /** - * @api private - */ - toUnauthenticated: function toUnauthenticated() { - this.removeListener('validate', AWS.EventListeners.Core.VALIDATE_CREDENTIALS); - this.removeListener('sign', AWS.EventListeners.Core.SIGN); - return this.toGet(); - }, - - /** - * @api private - */ - toGet: function toGet() { - if (this.service.api.protocol === 'query' || - this.service.api.protocol === 'ec2') { - this.removeListener('build', this.buildAsGet); - this.addListener('build', this.buildAsGet); - } - return this; - }, - - /** - * @api private - */ - buildAsGet: function buildAsGet(request) { - request.httpRequest.method = 'GET'; - request.httpRequest.path = request.service.endpoint.path + - '?' + request.httpRequest.body; - request.httpRequest.body = ''; - - // don't need these headers on a GET request - delete request.httpRequest.headers['Content-Length']; - delete request.httpRequest.headers['Content-Type']; - }, - - /** - * @api private - */ - haltHandlersOnError: function haltHandlersOnError() { - this._haltHandlersOnError = true; - } -}); - -AWS.util.mixin(AWS.Request, AWS.SequentialExecutor); diff --git a/cli/node_modules/aws-sdk/lib/resource_waiter.js b/cli/node_modules/aws-sdk/lib/resource_waiter.js deleted file mode 100644 index 732a78c40..000000000 --- a/cli/node_modules/aws-sdk/lib/resource_waiter.js +++ /dev/null @@ -1,198 +0,0 @@ -/** - * Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). You - * may not use this file except in compliance with the License. A copy of - * the License is located at - * - * http://aws.amazon.com/apache2.0/ - * - * or in the "license" file accompanying this file. This file is - * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF - * ANY KIND, either express or implied. See the License for the specific - * language governing permissions and limitations under the License. - */ - -var AWS = require('./core'); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -AWS.ResourceWaiter = inherit({ - /** - * Waits for a given state on a service object - * @param service [Service] the service object to wait on - * @param state [String] the state (defined in waiter configuration) to wait - * for. - * @example Create a waiter for running EC2 instances - * var ec2 = new AWS.EC2; - * var waiter = new AWS.ResourceWaiter(ec2, 'instanceRunning'); - */ - constructor: function constructor(service, state) { - this.service = service; - this.state = state; - - if (typeof this.state === 'object') { - AWS.util.each.call(this, this.state, function (key, value) { - this.state = key; - this.expectedValue = value; - }); - } - - this.loadWaiterConfig(this.state); - if (!this.expectedValue) { - this.expectedValue = this.config.successValue; - } - }, - - service: null, - - state: null, - - expectedValue: null, - - config: null, - - waitDone: false, - - Listeners: { - retry: new AWS.SequentialExecutor().addNamedListeners(function(add) { - add('RETRY_CHECK', 'retry', function(resp) { - var waiter = resp.request._waiter; - if (resp.error && resp.error.code === 'ResourceNotReady') { - resp.error.retryDelay = waiter.config.interval * 1000; - } - }); - }), - - output: new AWS.SequentialExecutor().addNamedListeners(function(add) { - add('CHECK_OUT_ERROR', 'extractError', function CHECK_OUT_ERROR(resp) { - if (resp.error) { - resp.request._waiter.setError(resp, true); - } - }); - - add('CHECK_OUTPUT', 'extractData', function CHECK_OUTPUT(resp) { - var waiter = resp.request._waiter; - var success = waiter.checkSuccess(resp); - if (!success) { - waiter.setError(resp, success === null ? false : true); - } else { - resp.error = null; - } - }); - }), - - error: new AWS.SequentialExecutor().addNamedListeners(function(add) { - add('CHECK_ERROR', 'extractError', function CHECK_ERROR(resp) { - var waiter = resp.request._waiter; - var success = waiter.checkError(resp); - if (!success) { - waiter.setError(resp, success === null ? false : true); - } else { - resp.error = null; - resp.data = {}; - resp.request.removeAllListeners('extractData'); - } - }); - - add('CHECK_ERR_OUTPUT', 'extractData', function CHECK_ERR_OUTPUT(resp) { - resp.request._waiter.setError(resp, true); - }); - }) - }, - - /** - * @return [AWS.Request] - */ - wait: function wait(params, callback) { - if (typeof params === 'function') { - callback = params; params = undefined; - } - - var request = this.service.makeRequest(this.config.operation, params); - var listeners = this.Listeners[this.config.successType]; - request._waiter = this; - request.response.maxRetries = this.config.maxAttempts; - request.addListeners(this.Listeners.retry); - if (listeners) request.addListeners(listeners); - - if (callback) request.send(callback); - return request; - }, - - setError: function setError(resp, retryable) { - resp.data = null; - resp.error = AWS.util.error(resp.error || new Error(), { - code: 'ResourceNotReady', - message: 'Resource is not in the state ' + this.state, - retryable: retryable - }); - }, - - /** - * Checks if the terminal expected success state has been met - * @return [Boolean] - */ - checkSuccess: function checkSuccess(resp) { - if (!this.config.successPath) { - return resp.httpResponse.statusCode < 300; - } - - var r = AWS.util.jamespath.find(this.config.successPath, resp.data); - - if (this.config.failureValue && - this.config.failureValue.indexOf(r) >= 0) { - return null; // fast fail - } - - if (this.expectedValue) { - return r === this.expectedValue; - } else { - return r ? true : false; - } - }, - - /** - * Checks if the terminal expected error state has been met - * @return [Boolean] - */ - checkError: function checkError(resp) { - var value = this.config.successValue; - if (typeof value === 'number') { - return resp.httpResponse.statusCode === value; - } else { - return resp.error && resp.error.code === value; - } - }, - - /** - * Loads waiter configuration from API configuration and deals with inherited - * properties. - * - * @api private - */ - loadWaiterConfig: function loadWaiterConfig(state, noException) { - if (!this.service.api.waiters[state]) { - if (noException) return; - throw new AWS.util.error(new Error(), { - code: 'StateNotFoundError', - message: 'State ' + state + ' not found.' - }); - } - - this.config = this.service.api.waiters[state]; - var config = this.config; - - // inherit acceptor data - (function () { // anonymous function to avoid max complexity count - config.successType = config.successType || config.acceptorType; - config.successPath = config.successPath || config.acceptorPath; - config.successValue = config.successValue || config.acceptorValue; - config.failureType = config.failureType || config.acceptorType; - config.failurePath = config.failurePath || config.acceptorPath; - config.failureValue = config.failureValue || config.acceptorValue; - })(); - } -}); diff --git a/cli/node_modules/aws-sdk/lib/response.js b/cli/node_modules/aws-sdk/lib/response.js deleted file mode 100644 index ce8516299..000000000 --- a/cli/node_modules/aws-sdk/lib/response.js +++ /dev/null @@ -1,200 +0,0 @@ -var AWS = require('./core'); -var inherit = AWS.util.inherit; - -/** - * This class encapsulates the response information - * from a service request operation sent through {AWS.Request}. - * The response object has two main properties for getting information - * back from a request: - * - * ## The `data` property - * - * The `response.data` property contains the serialized object data - * retrieved from the service request. For instance, for an - * Amazon DynamoDB `listTables` method call, the response data might - * look like: - * - * ``` - * > resp.data - * { TableNames: - * [ 'table1', 'table2', ... ] } - * ``` - * - * The `data` property can be null if an error occurs (see below). - * - * ## The `error` property - * - * In the event of a service error (or transfer error), the - * `response.error` property will be filled with the given - * error data in the form: - * - * ``` - * { code: 'SHORT_UNIQUE_ERROR_CODE', - * message: 'Some human readable error message' } - * ``` - * - * In the case of an error, the `data` property will be `null`. - * Note that if you handle events that can be in a failure state, - * you should always check whether `response.error` is set - * before attempting to access the `response.data` property. - * - * @!attribute data - * @readonly - * @!group Data Properties - * @note Inside of a {AWS.Request~httpData} event, this - * property contains a single raw packet instead of the - * full de-serialized service response. - * @return [Object] the de-serialized response data - * from the service. - * - * @!attribute error - * An structure containing information about a service - * or networking error. - * @readonly - * @!group Data Properties - * @note This attribute is only filled if a service or - * networking error occurs. - * @return [Error] - * * code [String] a unique short code representing the - * error that was emitted. - * * message [String] a longer human readable error message - * * retryable [Boolean] whether the error message is - * retryable. - * * statusCode [Numeric] in the case of a request that reached the service, - * this value contains the response status code. - * * time [Date] the date time object when the error occurred. - * * hostname [String] set when a networking error occurs to easily - * identify the endpoint of the request. - * * region [String] set when a networking error occurs to easily - * identify the region of the request. - * - * @!attribute requestId - * @readonly - * @!group Data Properties - * @return [String] the unique request ID associated with the response. - * Log this value when debugging requests for AWS support. - * - * @!attribute retryCount - * @readonly - * @!group Operation Properties - * @return [Integer] the number of retries that were - * attempted before the request was completed. - * - * @!attribute redirectCount - * @readonly - * @!group Operation Properties - * @return [Integer] the number of redirects that were - * followed before the request was completed. - * - * @!attribute httpResponse - * @readonly - * @!group HTTP Properties - * @return [AWS.HttpResponse] the raw HTTP response object - * containing the response headers and body information - * from the server. - * - * @see AWS.Request - */ -AWS.Response = inherit({ - - /** - * @api private - */ - constructor: function Response(request) { - this.request = request; - this.data = null; - this.error = null; - this.retryCount = 0; - this.redirectCount = 0; - this.httpResponse = new AWS.HttpResponse(); - if (request) { - this.maxRetries = request.service.numRetries(); - this.maxRedirects = request.service.config.maxRedirects; - } - }, - - /** - * Creates a new request for the next page of response data, calling the - * callback with the page data if a callback is provided. - * - * @callback callback function(err, data) - * Called when a page of data is returned from the next request. - * - * @param err [Error] an error object, if an error occurred in the request - * @param data [Object] the next page of data, or null, if there are no - * more pages left. - * @return [AWS.Request] the request object for the next page of data - * @return [null] if no callback is provided and there are no pages left - * to retrieve. - * @since v1.4.0 - */ - nextPage: function nextPage(callback) { - var config; - var service = this.request.service; - var operation = this.request.operation; - try { - config = service.paginationConfig(operation, true); - } catch (e) { this.error = e; } - - if (!this.hasNextPage()) { - if (callback) callback(this.error, null); - else if (this.error) throw this.error; - return null; - } - - var params = AWS.util.copy(this.request.params); - if (!this.nextPageTokens) { - return callback ? callback(null, null) : null; - } else { - var inputTokens = config.inputToken; - if (typeof inputTokens === 'string') inputTokens = [inputTokens]; - for (var i = 0; i < inputTokens.length; i++) { - params[inputTokens[i]] = this.nextPageTokens[i]; - } - return service.makeRequest(this.request.operation, params, callback); - } - }, - - /** - * @return [Boolean] whether more pages of data can be returned by further - * requests - * @since v1.4.0 - */ - hasNextPage: function hasNextPage() { - this.cacheNextPageTokens(); - if (this.nextPageTokens) return true; - if (this.nextPageTokens === undefined) return undefined; - else return false; - }, - - /** - * @api private - */ - cacheNextPageTokens: function cacheNextPageTokens() { - if (this.hasOwnProperty('nextPageTokens')) return this.nextPageTokens; - this.nextPageTokens = undefined; - - var config = this.request.service.paginationConfig(this.request.operation); - if (!config) return this.nextPageTokens; - - this.nextPageTokens = null; - if (config.moreResults) { - if (!AWS.util.jamespath.find(config.moreResults, this.data)) { - return this.nextPageTokens; - } - } - - var exprs = config.outputToken; - if (typeof exprs === 'string') exprs = [exprs]; - AWS.util.arrayEach.call(this, exprs, function (expr) { - var output = AWS.util.jamespath.find(expr, this.data); - if (output) { - this.nextPageTokens = this.nextPageTokens || []; - this.nextPageTokens.push(output); - } - }); - - return this.nextPageTokens; - } - -}); diff --git a/cli/node_modules/aws-sdk/lib/s3/managed_upload.js b/cli/node_modules/aws-sdk/lib/s3/managed_upload.js deleted file mode 100644 index eee5c9567..000000000 --- a/cli/node_modules/aws-sdk/lib/s3/managed_upload.js +++ /dev/null @@ -1,565 +0,0 @@ -var AWS = require('../core'); -var byteLength = AWS.util.string.byteLength; - -/** - * The managed uploader allows for easy and efficient uploading of buffers, - * blobs, or streams, using a configurable amount of concurrency to perform - * multipart uploads where possible. This abstraction also enables uploading - * streams of unknown size due to the use of multipart uploads. - * - * To construct a managed upload object, see the {constructor} function. - * - * ## Tracking upload progress - * - * The managed upload object can also track progress by attaching an - * 'httpUploadProgress' listener to the upload manager. This event is similar - * to {AWS.Request~httpUploadProgress} but groups all concurrent upload progress - * into a single event. See {AWS.S3.ManagedUpload~httpUploadProgress} for more - * information. - * - * ## Handling Multipart Cleanup - * - * By default, this class will automatically clean up any multipart uploads - * when an individual part upload fails. This behavior can be disabled in order - * to manually handle failures by setting the `leavePartsOnError` configuration - * option to `true` when initializing the upload object. - * - * @!event httpUploadProgress(progress) - * Triggered when the uploader has uploaded more data. - * @note The `total` property may not be set if the stream being uploaded has - * not yet finished chunking. In this case the `total` will be undefined - * until the total stream size is known. - * @note This event will not be emitted in Node.js 0.8.x. - * @param progress [map] An object containing the `loaded` and `total` bytes - * of the request. Note that `total` may be undefined until the payload - * size is known. - * @context (see AWS.Request~send) - */ -AWS.S3.ManagedUpload = AWS.util.inherit({ - /** - * Creates a managed upload object with a set of configuration options. - * - * @note A "Body" parameter is required to be set prior to calling {send}. - * @option options params [map] a map of parameters to pass to the upload - * requests. The "Body" parameter is required to be specified either on - * the service or in the params option. - * @option options queueSize [Number] (4) the size of the concurrent queue - * manager to upload parts in parallel. Set to 1 for synchronous uploading - * of parts. Note that the uploader will buffer at most queueSize * partSize - * bytes into memory at any given time. - * @option options partSize [Number] (5mb) the size in bytes for each - * individual part to be uploads. See {minPartSize} for the minimum allowed - * part size. - * @option options leavePartsOnError [Boolean] (false) whether to abort the - * multipart upload if an error occurs. Set to true if you want to handle - * failures manually. - * @option options service [AWS.S3] an optional S3 service object to use for - * requests. This object might have bound parameters used by the uploader. - * @example Creating a default uploader for a stream object - * var upload = new AWS.S3.ManagedUpload({ - * params: {Bucket: 'bucket', Key: 'key', Body: stream} - * }); - * @example Creating an uploader with concurrency of 1 and partSize of 10mb - * var upload = new AWS.S3.ManagedUpload({ - * partSize: 10 * 1024 * 1024, queueSize: 1, - * params: {Bucket: 'bucket', Key: 'key', Body: stream} - * }); - * @see send - */ - constructor: function ManagedUpload(options) { - var self = this; - AWS.SequentialExecutor.call(self); - self.body = null; - self.sliceFn = null; - self.callback = null; - self.parts = {}; - self.completeInfo = []; - self.fillQueue = function() { - self.callback(new Error('Unsupported body payload ' + typeof self.body)); - }; - - self.configure(options); - }, - - /** - * @api private - */ - configure: function configure(options) { - options = options || {}; - this.partSize = this.minPartSize; - - if (options.queueSize) this.queueSize = options.queueSize; - if (options.partSize) this.partSize = options.partSize; - if (options.leavePartsOnError) this.leavePartsOnError = true; - - if (this.partSize < this.minPartSize) { - throw new Error('partSize must be greater than ' + - this.minPartSize); - } - - this.service = options.service; - this.bindServiceObject(options.params); - this.validateBody(); - this.adjustTotalBytes(); - }, - - /** - * @api private - */ - leavePartsOnError: false, - - /** - * @api private - */ - queueSize: 4, - - /** - * @api private - */ - partSize: null, - - /** - * @readonly - * @return [Number] the minimum number of bytes for an individual part - * upload. - */ - minPartSize: 1024 * 1024 * 5, - - /** - * @readonly - * @return [Number] the maximum allowed number of parts in a multipart upload. - */ - maxTotalParts: 10000, - - /** - * Initiates the managed upload for the payload. - * - * @callback callback function(err, data) - * @param err [Error] an error or null if no error occurred. - * @param data [map] The response data from the successful upload: - * * `Location` (String) the URL of the uploaded object - * * `ETag` (String) the ETag of the uploaded object - * @example Sending a managed upload object - * var params = {Bucket: 'bucket', Key: 'key', Body: stream}; - * var upload = new AWS.S3.ManagedUpload({params: params}); - * upload.send(function(err, data) { - * console.log(err, data); - * }); - */ - send: function(callback) { - var self = this; - self.callback = callback || function(err) { if (err) throw err; }; - - var runFill = true; - if (self.sliceFn) { - self.fillQueue = self.fillBuffer; - } else if (AWS.util.isNode()) { - var Stream = AWS.util.nodeRequire('stream').Stream; - if (self.body instanceof Stream) { - runFill = false; - self.fillQueue = self.fillStream; - self.partBuffers = []; - self.body. - on('readable', function() { self.fillQueue(); }). - on('end', function() { - self.isDoneChunking = true; - self.numParts = self.totalPartNumbers; - self.fillQueue.call(self); - }); - } - } - - if (runFill) self.fillQueue.call(self); - }, - - /** - * Aborts a managed upload, including all concurrent upload requests. - * @note By default, calling this function will cleanup a multipart upload - * if one was created. To leave the multipart upload around after aborting - * a request, configure `leavePartsOnError` to `true` in the {constructor}. - * @!macro nobrowser - * @example Aborting an upload - * var params = { - * Bucket: 'bucket', Key: 'key', - * Body: new Buffer(1024 * 1024 * 25) // 25MB payload - * }; - * var upload = s3.upload(params); - * upload.send(function (err, data) { - * if (err) console.log("Error:", err.code, err.message); - * else console.log(data); - * }); - * - * // abort request in 1 second - * setTimeout(upload.abort.bind(upload), 1000); - */ - abort: function() { - this.cleanup(AWS.util.error(new Error('Request aborted by user'), { - code: 'RequestAbortedError', retryable: false - })); - }, - - /** - * @api private - */ - validateBody: function validateBody() { - var self = this; - self.body = self.service.config.params.Body; - if (!self.body) throw new Error('params.Body is required'); - if (typeof self.body === 'string') { - self.body = new AWS.util.Buffer(self.body); - } - self.sliceFn = AWS.util.arraySliceFn(self.body); - }, - - /** - * @api private - */ - bindServiceObject: function bindServiceObject(params) { - params = params || {}; - var self = this; - - // bind parameters to new service object - if (!self.service) { - self.service = new AWS.S3({params: params}); - } else { - var config = AWS.util.copy(self.service.config); - self.service = new self.service.constructor.__super__(config); - self.service.config.params = - AWS.util.merge(self.service.config.params || {}, params); - } - }, - - /** - * @api private - */ - adjustTotalBytes: function adjustTotalBytes() { - var self = this; - try { // try to get totalBytes - self.totalBytes = byteLength(self.body); - } catch (e) { } - - // try to adjust partSize if we know payload length - if (self.totalBytes) { - var newPartSize = Math.ceil(self.totalBytes / self.maxTotalParts); - if (newPartSize > self.partSize) self.partSize = newPartSize; - } else { - self.totalBytes = undefined; - } - }, - - /** - * @api private - */ - isDoneChunking: false, - - /** - * @api private - */ - partPos: 0, - - /** - * @api private - */ - totalChunkedBytes: 0, - - /** - * @api private - */ - totalUploadedBytes: 0, - - /** - * @api private - */ - totalBytes: undefined, - - /** - * @api private - */ - numParts: 0, - - /** - * @api private - */ - totalPartNumbers: 0, - - /** - * @api private - */ - activeParts: 0, - - /** - * @api private - */ - doneParts: 0, - - /** - * @api private - */ - parts: null, - - /** - * @api private - */ - completeInfo: null, - - /** - * @api private - */ - failed: false, - - /** - * @api private - */ - multipartReq: null, - - /** - * @api private - */ - partBuffers: null, - - /** - * @api private - */ - partBufferLength: 0, - - /** - * @api private - */ - fillBuffer: function fillBuffer() { - var self = this; - var bodyLen = byteLength(self.body); - - if (bodyLen === 0) { - self.isDoneChunking = true; - self.numParts = 1; - self.nextChunk(self.body); - return; - } - - while (self.activeParts < self.queueSize && self.partPos < bodyLen) { - var endPos = Math.min(self.partPos + self.partSize, bodyLen); - var buf = self.sliceFn.call(self.body, self.partPos, endPos); - self.partPos += self.partSize; - - if (byteLength(buf) < self.partSize || self.partPos === bodyLen) { - self.isDoneChunking = true; - self.numParts = self.totalPartNumbers + 1; - } - self.nextChunk(buf); - } - }, - - /** - * @api private - */ - fillStream: function fillStream() { - var self = this; - if (self.activeParts >= self.queueSize) return; - - var buf = self.body.read(self.partSize - self.partBufferLength) || - self.body.read(); - if (buf) { - self.partBuffers.push(buf); - self.partBufferLength += buf.length; - self.totalChunkedBytes += buf.length; - } - - if (self.partBufferLength >= self.partSize) { - var pbuf = Buffer.concat(self.partBuffers); - self.partBuffers = []; - self.partBufferLength = 0; - - // if we have more than partSize, push the rest back on the queue - if (pbuf.length > self.partSize) { - var rest = pbuf.slice(self.partSize); - self.partBuffers.push(rest); - self.partBufferLength += rest.length; - pbuf = pbuf.slice(0, self.partSize); - } - - self.nextChunk(pbuf); - } - - if (self.isDoneChunking && !self.isDoneSending) { - pbuf = Buffer.concat(self.partBuffers); - self.partBuffers = []; - self.partBufferLength = 0; - self.totalBytes = self.totalChunkedBytes; - self.isDoneSending = true; - - if (self.numParts === 0 || pbuf.length > 0) { - self.numParts++; - self.nextChunk(pbuf); - } - } - - self.body.read(0); - }, - - /** - * @api private - */ - nextChunk: function nextChunk(chunk) { - var self = this; - if (self.failed) return null; - - var partNumber = ++self.totalPartNumbers; - if (self.isDoneChunking && partNumber === 1) { - var req = self.service.putObject({Body: chunk}); - req._managedUpload = self; - req.on('httpUploadProgress', self.progress).send(self.finishSinglePart); - return null; - } - - self.activeParts++; - if (!self.service.config.params.UploadId) { - - if (!self.multipartReq) { // create multipart - self.multipartReq = self.service.createMultipartUpload(); - self.multipartReq.on('success', function(resp) { - self.service.config.params.UploadId = resp.data.UploadId; - self.multipartReq = null; - }); - self.queueChunks(chunk, partNumber); - self.multipartReq.on('error', function(err) { - self.cleanup(err); - }); - self.multipartReq.send(); - } else { - self.queueChunks(chunk, partNumber); - } - } else { // multipart is created, just send - self.uploadPart(chunk, partNumber); - } - }, - - /** - * @api private - */ - uploadPart: function uploadPart(chunk, partNumber) { - var self = this; - var partParams = { - Body: chunk, - ContentLength: AWS.util.string.byteLength(chunk), - PartNumber: partNumber - }; - - var partInfo = {ETag: null, PartNumber: partNumber}; - self.completeInfo.push(partInfo); - - var req = self.service.uploadPart(partParams); - self.parts[partNumber] = req; - req._lastUploadedBytes = 0; - req._managedUpload = self; - req.on('httpUploadProgress', self.progress); - req.send(function(err, data) { - delete self.parts[partParams.PartNumber]; - self.activeParts--; - - if (!err && (!data || !data.ETag)) { - var message = 'No access to ETag property on response.'; - if (AWS.util.isBrowser()) { - message += ' Check CORS configuration to expose ETag header.'; - } - - err = AWS.util.error(new Error(message), { - code: 'ETagMissing', retryable: false - }); - } - if (err) return self.cleanup(err); - - partInfo.ETag = data.ETag; - self.doneParts++; - if (self.isDoneChunking && self.doneParts === self.numParts) { - self.finishMultiPart(); - } else { - self.fillQueue.call(self); - } - }); - }, - - /** - * @api private - */ - queueChunks: function queueChunks(chunk, partNumber) { - var self = this; - self.multipartReq.on('success', function() { - self.uploadPart(chunk, partNumber); - }); - }, - - /** - * @api private - */ - cleanup: function cleanup(err) { - var self = this; - if (self.failed) return; - - // clean up stream - if (typeof self.body.removeAllListeners === 'function' && - typeof self.body.resume === 'function') { - self.body.removeAllListeners('readable'); - self.body.removeAllListeners('end'); - self.body.resume(); - } - - if (self.service.config.params.UploadId && !self.leavePartsOnError) { - self.service.abortMultipartUpload().send(); - } - - AWS.util.each(self.parts, function(partNumber, part) { - part.removeAllListeners('complete'); - part.abort(); - }); - - self.parts = {}; - self.callback(err); - self.failed = true; - }, - - /** - * @api private - */ - finishMultiPart: function finishMultiPart() { - var self = this; - var completeParams = { MultipartUpload: { Parts: self.completeInfo } }; - self.service.completeMultipartUpload(completeParams, function(err, data) { - if (err) return self.cleanup(err); - else self.callback(err, data); - }); - }, - - /** - * @api private - */ - finishSinglePart: function finishSinglePart(err, data) { - var upload = this.request._managedUpload; - var httpReq = this.request.httpRequest; - var url = AWS.util.urlFormat(httpReq.endpoint); - if (err) return upload.callback(err); - data.Location = url.substr(0, url.length - 1) + httpReq.path; - upload.callback(err, data); - }, - - /** - * @api private - */ - progress: function progress(info) { - var upload = this._managedUpload; - if (this.operation === 'putObject') { - info.part = 1; - } else { - upload.totalUploadedBytes += info.loaded - this._lastUploadedBytes; - this._lastUploadedBytes = info.loaded; - info = { - loaded: upload.totalUploadedBytes, - total: upload.totalBytes, - part: this.params.PartNumber - }; - } - upload.emit('httpUploadProgress', [info]); - } -}); - -AWS.util.mixin(AWS.S3.ManagedUpload, AWS.SequentialExecutor); -module.exports = AWS.S3.ManagedUpload; diff --git a/cli/node_modules/aws-sdk/lib/sequential_executor.js b/cli/node_modules/aws-sdk/lib/sequential_executor.js deleted file mode 100644 index 88c002b61..000000000 --- a/cli/node_modules/aws-sdk/lib/sequential_executor.js +++ /dev/null @@ -1,231 +0,0 @@ -var AWS = require('./core'); - -/** - * @api private - * @!method on(eventName, callback) - * Registers an event listener callback for the event given by `eventName`. - * Parameters passed to the callback function depend on the individual event - * being triggered. See the event documentation for those parameters. - * - * @param eventName [String] the event name to register the listener for - * @param callback [Function] the listener callback function - * @return [AWS.SequentialExecutor] the same object for chaining - */ -AWS.SequentialExecutor = AWS.util.inherit({ - - constructor: function SequentialExecutor() { - this._events = {}; - }, - - /** - * @api private - */ - listeners: function listeners(eventName) { - return this._events[eventName] ? this._events[eventName].slice(0) : []; - }, - - on: function on(eventName, listener) { - if (this._events[eventName]) { - this._events[eventName].push(listener); - } else { - this._events[eventName] = [listener]; - } - return this; - }, - - /** - * @api private - */ - onAsync: function onAsync(eventName, listener) { - listener._isAsync = true; - return this.on(eventName, listener); - }, - - removeListener: function removeListener(eventName, listener) { - var listeners = this._events[eventName]; - if (listeners) { - var length = listeners.length; - var position = -1; - for (var i = 0; i < length; ++i) { - if (listeners[i] === listener) { - position = i; - } - } - if (position > -1) { - listeners.splice(position, 1); - } - } - return this; - }, - - removeAllListeners: function removeAllListeners(eventName) { - if (eventName) { - delete this._events[eventName]; - } else { - this._events = {}; - } - return this; - }, - - /** - * @api private - */ - emit: function emit(eventName, eventArgs, doneCallback) { - if (!doneCallback) doneCallback = function() { }; - var listeners = this.listeners(eventName); - var count = listeners.length; - this.callListeners(listeners, eventArgs, doneCallback); - return count > 0; - }, - - /** - * @api private - */ - callListeners: function callListeners(listeners, args, doneCallback, prevError) { - var self = this; - var error = prevError || null; - - function callNextListener(err) { - if (err) { - error = AWS.util.error(error || new Error(), err); - if (self._haltHandlersOnError) { - return doneCallback.call(self, error); - } - } - self.callListeners(listeners, args, doneCallback, error); - } - - while (listeners.length > 0) { - var listener = listeners.shift(); - if (listener._isAsync) { // asynchronous listener - listener.apply(self, args.concat([callNextListener])); - return; // stop here, callNextListener will continue - } else { // synchronous listener - try { - listener.apply(self, args); - } catch (err) { - error = AWS.util.error(error || new Error(), err); - } - if (error && self._haltHandlersOnError) { - doneCallback.call(self, error); - return; - } - } - } - doneCallback.call(self, error); - }, - - /** - * Adds or copies a set of listeners from another list of - * listeners or SequentialExecutor object. - * - * @param listeners [map>, AWS.SequentialExecutor] - * a list of events and callbacks, or an event emitter object - * containing listeners to add to this emitter object. - * @return [AWS.SequentialExecutor] the emitter object, for chaining. - * @example Adding listeners from a map of listeners - * emitter.addListeners({ - * event1: [function() { ... }, function() { ... }], - * event2: [function() { ... }] - * }); - * emitter.emit('event1'); // emitter has event1 - * emitter.emit('event2'); // emitter has event2 - * @example Adding listeners from another emitter object - * var emitter1 = new AWS.SequentialExecutor(); - * emitter1.on('event1', function() { ... }); - * emitter1.on('event2', function() { ... }); - * var emitter2 = new AWS.SequentialExecutor(); - * emitter2.addListeners(emitter1); - * emitter2.emit('event1'); // emitter2 has event1 - * emitter2.emit('event2'); // emitter2 has event2 - */ - addListeners: function addListeners(listeners) { - var self = this; - - // extract listeners if parameter is an SequentialExecutor object - if (listeners._events) listeners = listeners._events; - - AWS.util.each(listeners, function(event, callbacks) { - if (typeof callbacks === 'function') callbacks = [callbacks]; - AWS.util.arrayEach(callbacks, function(callback) { - self.on(event, callback); - }); - }); - - return self; - }, - - /** - * Registers an event with {on} and saves the callback handle function - * as a property on the emitter object using a given `name`. - * - * @param name [String] the property name to set on this object containing - * the callback function handle so that the listener can be removed in - * the future. - * @param (see on) - * @return (see on) - * @example Adding a named listener DATA_CALLBACK - * var listener = function() { doSomething(); }; - * emitter.addNamedListener('DATA_CALLBACK', 'data', listener); - * - * // the following prints: true - * console.log(emitter.DATA_CALLBACK == listener); - */ - addNamedListener: function addNamedListener(name, eventName, callback) { - this[name] = callback; - this.addListener(eventName, callback); - return this; - }, - - /** - * @api private - */ - addNamedAsyncListener: function addNamedAsyncListener(name, eventName, callback) { - callback._isAsync = true; - return this.addNamedListener(name, eventName, callback); - }, - - /** - * Helper method to add a set of named listeners using - * {addNamedListener}. The callback contains a parameter - * with a handle to the `addNamedListener` method. - * - * @callback callback function(add) - * The callback function is called immediately in order to provide - * the `add` function to the block. This simplifies the addition of - * a large group of named listeners. - * @param add [Function] the {addNamedListener} function to call - * when registering listeners. - * @example Adding a set of named listeners - * emitter.addNamedListeners(function(add) { - * add('DATA_CALLBACK', 'data', function() { ... }); - * add('OTHER', 'otherEvent', function() { ... }); - * add('LAST', 'lastEvent', function() { ... }); - * }); - * - * // these properties are now set: - * emitter.DATA_CALLBACK; - * emitter.OTHER; - * emitter.LAST; - */ - addNamedListeners: function addNamedListeners(callback) { - var self = this; - callback( - function() { - self.addNamedListener.apply(self, arguments); - }, - function() { - self.addNamedAsyncListener.apply(self, arguments); - } - ); - return this; - } -}); - -/** - * {on} is the prefered method. - * @api private - */ -AWS.SequentialExecutor.prototype.addListener = AWS.SequentialExecutor.prototype.on; - -module.exports = AWS.SequentialExecutor; diff --git a/cli/node_modules/aws-sdk/lib/service.js b/cli/node_modules/aws-sdk/lib/service.js deleted file mode 100644 index 477e119a5..000000000 --- a/cli/node_modules/aws-sdk/lib/service.js +++ /dev/null @@ -1,508 +0,0 @@ -var AWS = require('./core'); -var Api = require('./model/api'); -var regionConfig = require('./region_config'); -var inherit = AWS.util.inherit; - -/** - * The service class representing an AWS service. - * - * @abstract - * - * @!attribute apiVersions - * @return [Array] the list of API versions supported by this service. - * @readonly - */ -AWS.Service = inherit({ - /** - * Create a new service object with a configuration object - * - * @param config [map] a map of configuration options - */ - constructor: function Service(config) { - if (!this.loadServiceClass) { - throw AWS.util.error(new Error(), - 'Service must be constructed with `new\' operator'); - } - var ServiceClass = this.loadServiceClass(config || {}); - if (ServiceClass) return new ServiceClass(config); - this.initialize(config); - }, - - /** - * @api private - */ - initialize: function initialize(config) { - var svcConfig = AWS.config[this.serviceIdentifier]; - - this.config = new AWS.Config(AWS.config); - if (svcConfig) this.config.update(svcConfig, true); - if (config) this.config.update(config, true); - - this.validateService(); - if (!this.config.endpoint) regionConfig(this); - - this.config.endpoint = this.endpointFromTemplate(this.config.endpoint); - this.setEndpoint(this.config.endpoint); - }, - - /** - * @api private - */ - validateService: function validateService() { - }, - - /** - * @api private - */ - loadServiceClass: function loadServiceClass(serviceConfig) { - var config = serviceConfig; - if (!AWS.util.isEmpty(this.api)) { - return null; - } else if (config.apiConfig) { - return AWS.Service.defineServiceApi(this.constructor, config.apiConfig); - } else if (!this.constructor.services) { - return null; - } else { - config = new AWS.Config(AWS.config); - config.update(serviceConfig, true); - var version = config.apiVersions[this.constructor.serviceIdentifier]; - version = version || config.apiVersion; - return this.getLatestServiceClass(version); - } - }, - - /** - * @api private - */ - getLatestServiceClass: function getLatestServiceClass(version) { - version = this.getLatestServiceVersion(version); - if (this.constructor.services[version] === null) { - AWS.Service.defineServiceApi(this.constructor, version); - } - - return this.constructor.services[version]; - }, - - /** - * @api private - */ - getLatestServiceVersion: function getLatestServiceVersion(version) { - if (!this.constructor.services || this.constructor.services.length === 0) { - throw new Error('No services defined on ' + - this.constructor.serviceIdentifier); - } - - if (!version) { - version = 'latest'; - } else if (AWS.util.isType(version, Date)) { - version = AWS.util.date.iso8601(version).split('T')[0]; - } - - if (Object.hasOwnProperty(this.constructor.services, version)) { - return version; - } - - var keys = Object.keys(this.constructor.services).sort(); - var selectedVersion = null; - for (var i = keys.length - 1; i >= 0; i--) { - // versions that end in "*" are not available on disk and can be - // skipped, so do not choose these as selectedVersions - if (keys[i][keys[i].length - 1] !== '*') { - selectedVersion = keys[i]; - } - if (keys[i].substr(0, 10) <= version) { - return selectedVersion; - } - } - - throw new Error('Could not find ' + this.constructor.serviceIdentifier + - ' API to satisfy version constraint `' + version + '\''); - }, - - /** - * @api private - */ - api: {}, - - /** - * @api private - */ - defaultRetryCount: 3, - - /** - * Calls an operation on a service with the given input parameters. - * - * @param operation [String] the name of the operation to call on the service. - * @param params [map] a map of input options for the operation - * @callback callback function(err, data) - * If a callback is supplied, it is called when a response is returned - * from the service. - * @param err [Error] the error object returned from the request. - * Set to `null` if the request is successful. - * @param data [Object] the de-serialized data returned from - * the request. Set to `null` if a request error occurs. - */ - makeRequest: function makeRequest(operation, params, callback) { - if (typeof params === 'function') { - callback = params; - params = null; - } - - params = params || {}; - if (this.config.params) { // copy only toplevel bound params - var rules = this.api.operations[operation]; - if (rules) { - params = AWS.util.copy(params); - AWS.util.each(this.config.params, function(key, value) { - if (rules.input.members[key]) { - if (params[key] === undefined || params[key] === null) { - params[key] = value; - } - } - }); - } - } - - var request = new AWS.Request(this, operation, params); - this.addAllRequestListeners(request); - - if (callback) request.send(callback); - return request; - }, - - /** - * Calls an operation on a service with the given input parameters, without - * any authentication data. This method is useful for "public" API operations. - * - * @param operation [String] the name of the operation to call on the service. - * @param params [map] a map of input options for the operation - * @callback callback function(err, data) - * If a callback is supplied, it is called when a response is returned - * from the service. - * @param err [Error] the error object returned from the request. - * Set to `null` if the request is successful. - * @param data [Object] the de-serialized data returned from - * the request. Set to `null` if a request error occurs. - */ - makeUnauthenticatedRequest: function makeUnauthenticatedRequest(operation, params, callback) { - if (typeof params === 'function') { - callback = params; - params = {}; - } - - var request = this.makeRequest(operation, params).toUnauthenticated(); - return callback ? request.send(callback) : request; - }, - - /** - * Waits for a given state - * - * @param state [String] the state on the service to wait for - * @param params [map] a map of parameters to pass with each request - * @callback callback function(err, data) - * If a callback is supplied, it is called when a response is returned - * from the service. - * @param err [Error] the error object returned from the request. - * Set to `null` if the request is successful. - * @param data [Object] the de-serialized data returned from - * the request. Set to `null` if a request error occurs. - */ - waitFor: function waitFor(state, params, callback) { - var waiter = new AWS.ResourceWaiter(this, state); - return waiter.wait(params, callback); - }, - - /** - * @api private - */ - addAllRequestListeners: function addAllRequestListeners(request) { - var list = [AWS.events, AWS.EventListeners.Core, this.serviceInterface(), - AWS.EventListeners.CorePost]; - for (var i = 0; i < list.length; i++) { - if (list[i]) request.addListeners(list[i]); - } - - // disable parameter validation - if (!this.config.paramValidation) { - request.removeListener('validate', - AWS.EventListeners.Core.VALIDATE_PARAMETERS); - } - - if (this.config.logger) { // add logging events - request.addListeners(AWS.EventListeners.Logger); - } - - this.setupRequestListeners(request); - }, - - /** - * Override this method to setup any custom request listeners for each - * new request to the service. - * - * @abstract - */ - setupRequestListeners: function setupRequestListeners() { - }, - - /** - * Gets the signer class for a given request - * @api private - */ - getSignerClass: function getSignerClass() { - var version; - if (this.config.signatureVersion) { - version = this.config.signatureVersion; - } else { - version = this.api.signatureVersion; - } - return AWS.Signers.RequestSigner.getVersion(version); - }, - - /** - * @api private - */ - serviceInterface: function serviceInterface() { - switch (this.api.protocol) { - case 'ec2': return AWS.EventListeners.Query; - case 'query': return AWS.EventListeners.Query; - case 'json': return AWS.EventListeners.Json; - case 'rest-json': return AWS.EventListeners.RestJson; - case 'rest-xml': return AWS.EventListeners.RestXml; - } - if (this.api.protocol) { - throw new Error('Invalid service `protocol\' ' + - this.api.protocol + ' in API config'); - } - }, - - /** - * @api private - */ - successfulResponse: function successfulResponse(resp) { - return resp.httpResponse.statusCode < 300; - }, - - /** - * How many times a failed request should be retried before giving up. - * the defaultRetryCount can be overriden by service classes. - * - * @api private - */ - numRetries: function numRetries() { - if (this.config.maxRetries !== undefined) { - return this.config.maxRetries; - } else { - return this.defaultRetryCount; - } - }, - - /** - * @api private - */ - retryDelays: function retryDelays() { - var retryCount = this.numRetries(); - var delays = []; - for (var i = 0; i < retryCount; ++i) { - delays[i] = Math.pow(2, i) * 30; - } - return delays; - }, - - /** - * @api private - */ - retryableError: function retryableError(error) { - if (this.networkingError(error)) return true; - if (this.expiredCredentialsError(error)) return true; - if (this.throttledError(error)) return true; - if (error.statusCode >= 500) return true; - return false; - }, - - /** - * @api private - */ - networkingError: function networkingError(error) { - return error.code === 'NetworkingError'; - }, - - /** - * @api private - */ - expiredCredentialsError: function expiredCredentialsError(error) { - // TODO : this only handles *one* of the expired credential codes - return (error.code === 'ExpiredTokenException'); - }, - - /** - * @api private - */ - throttledError: function throttledError(error) { - // this logic varies between services - switch (error.code) { - case 'ProvisionedThroughputExceededException': - case 'Throttling': - case 'ThrottlingException': - case 'RequestLimitExceeded': - case 'RequestThrottled': - return true; - default: - return false; - } - }, - - /** - * @api private - */ - endpointFromTemplate: function endpointFromTemplate(endpoint) { - if (typeof endpoint !== 'string') return endpoint; - - var e = endpoint; - e = e.replace(/\{service\}/g, this.api.endpointPrefix); - e = e.replace(/\{region\}/g, this.config.region); - e = e.replace(/\{scheme\}/g, this.config.sslEnabled ? 'https' : 'http'); - return e; - }, - - /** - * @api private - */ - setEndpoint: function setEndpoint(endpoint) { - this.endpoint = new AWS.Endpoint(endpoint, this.config); - }, - - /** - * @api private - */ - paginationConfig: function paginationConfig(operation, throwException) { - var paginator = this.api.operations[operation].paginator; - if (!paginator) { - if (throwException) { - var e = new Error(); - throw AWS.util.error(e, 'No pagination configuration for ' + operation); - } - return null; - } - - return paginator; - } -}); - -AWS.util.update(AWS.Service, { - - /** - * Adds one method for each operation described in the api configuration - * - * @api private - */ - defineMethods: function defineMethods(svc) { - AWS.util.each(svc.prototype.api.operations, function iterator(method) { - if (svc.prototype[method]) return; - svc.prototype[method] = function (params, callback) { - return this.makeRequest(method, params, callback); - }; - }); - }, - - /** - * Defines a new Service class using a service identifier and list of versions - * including an optional set of features (functions) to apply to the class - * prototype. - * - * @param serviceIdentifier [String] the identifier for the service - * @param versions [Array] a list of versions that work with this - * service - * @param features [Object] an object to attach to the prototype - * @return [Class] the service class defined by this function. - */ - defineService: function defineService(serviceIdentifier, versions, features) { - AWS.Service._serviceMap[serviceIdentifier] = true; - if (!Array.isArray(versions)) { - features = versions; - versions = []; - } - - var svc = inherit(AWS.Service, features || {}); - - if (typeof serviceIdentifier === 'string') { - AWS.Service.addVersions(svc, versions); - - var identifier = svc.serviceIdentifier || serviceIdentifier; - svc.serviceIdentifier = identifier; - } else { // defineService called with an API - svc.prototype.api = serviceIdentifier; - AWS.Service.defineMethods(svc); - } - - return svc; - }, - - /** - * @api private - */ - addVersions: function addVersions(svc, versions) { - if (!Array.isArray(versions)) versions = [versions]; - - svc.services = svc.services || {}; - for (var i = 0; i < versions.length; i++) { - if (svc.services[versions[i]] === undefined) { - svc.services[versions[i]] = null; - } - } - - svc.apiVersions = Object.keys(svc.services).sort(); - }, - - /** - * @api private - */ - defineServiceApi: function defineServiceApi(superclass, version, apiConfig) { - var svc = inherit(superclass, { - serviceIdentifier: superclass.serviceIdentifier - }); - - function setApi(api) { - if (api.isApi) { - svc.prototype.api = api; - } else { - svc.prototype.api = new Api(api); - } - } - - if (typeof version === 'string') { - if (apiConfig) { - setApi(apiConfig); - } else { - try { - setApi(AWS.apiLoader(superclass.serviceIdentifier, version)); - } catch (err) { - throw AWS.util.error(err, { - message: 'Could not find API configuration ' + - superclass.serviceIdentifier + '-' + version - }); - } - } - if (!superclass.services.hasOwnProperty(version)) { - superclass.apiVersions = superclass.apiVersions.concat(version).sort(); - } - superclass.services[version] = svc; - } else { - setApi(version); - } - - AWS.Service.defineMethods(svc); - return svc; - }, - - /** - * @api private - */ - hasService: function(identifier) { - return AWS.Service._serviceMap.hasOwnProperty(identifier); - }, - - /** - * @api private - */ - _serviceMap: {} -}); diff --git a/cli/node_modules/aws-sdk/lib/services.js b/cli/node_modules/aws-sdk/lib/services.js deleted file mode 100644 index 03d1b7cba..000000000 --- a/cli/node_modules/aws-sdk/lib/services.js +++ /dev/null @@ -1,15 +0,0 @@ -var fs = require('fs'); -var path = require('path'); -var AWS = require('./core'); -var apis = require('./api_loader'); - -// define services using map -apis.services.forEach(function(identifier) { - var name = apis.serviceName(identifier); - var versions = apis.serviceVersions(identifier); - AWS[name] = AWS.Service.defineService(identifier, versions); - - // load any customizations from lib/services/.js - var svcFile = path.join(__dirname, 'services', identifier + '.js'); - if (fs.existsSync(svcFile)) require('./services/' + identifier); -}); diff --git a/cli/node_modules/aws-sdk/lib/services/cloudfront.js b/cli/node_modules/aws-sdk/lib/services/cloudfront.js deleted file mode 100644 index ef8a50393..000000000 --- a/cli/node_modules/aws-sdk/lib/services/cloudfront.js +++ /dev/null @@ -1,9 +0,0 @@ -var AWS = require('../core'); - -AWS.util.update(AWS.CloudFront.prototype, { - - setupRequestListeners: function setupRequestListeners(request) { - request.addListener('extractData', AWS.util.hoistPayloadMember); - } - -}); diff --git a/cli/node_modules/aws-sdk/lib/services/cloudsearchdomain.js b/cli/node_modules/aws-sdk/lib/services/cloudsearchdomain.js deleted file mode 100644 index ff1c61950..000000000 --- a/cli/node_modules/aws-sdk/lib/services/cloudsearchdomain.js +++ /dev/null @@ -1,103 +0,0 @@ -var AWS = require('../core'); - -/** - * Constructs a service interface object. Each API operation is exposed as a - * function on service. - * - * ### Sending a Request Using CloudSearchDomain - * - * ```javascript - * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'}); - * csd.search(params, function (err, data) { - * if (err) console.log(err, err.stack); // an error occurred - * else console.log(data); // successful response - * }); - * ``` - * - * ### Locking the API Version - * - * In order to ensure that the CloudSearchDomain object uses this specific API, - * you can construct the object by passing the `apiVersion` option to the - * constructor: - * - * ```javascript - * var csd = new AWS.CloudSearchDomain({ - * endpoint: 'my.host.tld', - * apiVersion: '2013-01-01' - * }); - * ``` - * - * You can also set the API version globally in `AWS.config.apiVersions` using - * the **cloudsearchdomain** service identifier: - * - * ```javascript - * AWS.config.apiVersions = { - * cloudsearchdomain: '2013-01-01', - * // other service API versions - * }; - * - * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'}); - * ``` - * - * @note You *must* provide an `endpoint` configuration parameter when - * constructing this service. See {constructor} for more information. - * - * @!method constructor(options = {}) - * Constructs a service object. This object has one method for each - * API operation. - * - * @example Constructing a CloudSearchDomain object - * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'}); - * @note You *must* provide an `endpoint` when constructing this service. - * @option (see AWS.Config.constructor) - * - * @service cloudsearchdomain - * @version 2013-01-01 - */ -AWS.util.update(AWS.CloudSearchDomain.prototype, { - /** - * @api private - */ - validateService: function validateService() { - if (!this.config.endpoint || this.config.endpoint.indexOf('{') >= 0) { - var msg = 'AWS.CloudSearchDomain requires an explicit ' + - '`endpoint\' configuration option.'; - throw AWS.util.error(new Error(), - {name: 'InvalidEndpoint', message: msg}); - } - }, - - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.removeListener('validate', - AWS.EventListeners.Core.VALIDATE_CREDENTIALS - ); - request.onAsync('validate', this.validateCredentials); - request.addListener('validate', this.updateRegion); - }, - - /** - * @api private - */ - validateCredentials: function(req, done) { - if (!req.service.api.signatureVersion) return done(); // none - req.service.config.getCredentials(function(err) { - if (err) { - req.removeListener('sign', AWS.EventListeners.Core.SIGN); - } - done(); - }); - }, - - /** - * @api private - */ - updateRegion: function updateRegion(request) { - var endpoint = request.httpRequest.endpoint.hostname; - var zones = endpoint.split('.'); - request.httpRequest.region = zones[1] || request.httpRequest.region; - } - -}); diff --git a/cli/node_modules/aws-sdk/lib/services/cognitoidentity.js b/cli/node_modules/aws-sdk/lib/services/cognitoidentity.js deleted file mode 100644 index 7fa7048dd..000000000 --- a/cli/node_modules/aws-sdk/lib/services/cognitoidentity.js +++ /dev/null @@ -1,15 +0,0 @@ -var AWS = require('../core'); - -AWS.util.update(AWS.CognitoIdentity.prototype, { - getOpenIdToken: function getOpenIdToken(params, callback) { - return this.makeUnauthenticatedRequest('getOpenIdToken', params, callback); - }, - - getId: function getId(params, callback) { - return this.makeUnauthenticatedRequest('getId', params, callback); - }, - - getCredentialsForIdentity: function getCredentialsForIdentity(params, callback) { - return this.makeUnauthenticatedRequest('getCredentialsForIdentity', params, callback); - } -}); diff --git a/cli/node_modules/aws-sdk/lib/services/dynamodb.js b/cli/node_modules/aws-sdk/lib/services/dynamodb.js deleted file mode 100644 index 6621240f9..000000000 --- a/cli/node_modules/aws-sdk/lib/services/dynamodb.js +++ /dev/null @@ -1,55 +0,0 @@ -var AWS = require('../core'); - -AWS.util.update(AWS.DynamoDB.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - if (request.service.config.dynamoDbCrc32) { - request.addListener('extractData', this.checkCrc32); - } - }, - - /** - * @api private - */ - checkCrc32: function checkCrc32(resp) { - if (!resp.httpResponse.streaming && !resp.request.service.crc32IsValid(resp)) { - resp.error = AWS.util.error(new Error(), { - code: 'CRC32CheckFailed', - message: 'CRC32 integrity check failed', - retryable: true - }); - } - }, - - /** - * @api private - */ - crc32IsValid: function crc32IsValid(resp) { - var crc = resp.httpResponse.headers['x-amz-crc32']; - if (!crc) return true; // no (valid) CRC32 header - return parseInt(crc, 10) === AWS.util.crypto.crc32(resp.httpResponse.body); - }, - - /** - * @api private - */ - defaultRetryCount: 10, - - /** - * @api private - */ - retryDelays: function retryDelays() { - var retryCount = this.numRetries(); - var delays = []; - for (var i = 0; i < retryCount; ++i) { - if (i === 0) { - delays.push(0); - } else { - delays.push(50 * Math.pow(2, i - 1)); - } - } - return delays; - } -}); diff --git a/cli/node_modules/aws-sdk/lib/services/ec2.js b/cli/node_modules/aws-sdk/lib/services/ec2.js deleted file mode 100644 index bedf65ffc..000000000 --- a/cli/node_modules/aws-sdk/lib/services/ec2.js +++ /dev/null @@ -1,60 +0,0 @@ -var AWS = require('../core'); - -AWS.util.update(AWS.EC2.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.removeListener('extractError', AWS.EventListeners.Query.EXTRACT_ERROR); - request.addListener('extractError', this.extractError); - - if (request.operation === 'copySnapshot') { - request.onAsync('validate', this.buildCopySnapshotPresignedUrl); - } - }, - - /** - * @api private - */ - buildCopySnapshotPresignedUrl: function buildCopySnapshotPresignedUrl(req, done) { - if (req.params.PresignedUrl || req._subRequest) { - return done(); - } - - req.params = AWS.util.copy(req.params); - req.params.DestinationRegion = req.service.config.region; - - var config = AWS.util.copy(req.service.config); - delete config.endpoint; - config.region = req.params.SourceRegion; - var svc = new req.service.constructor(config); - var newReq = svc[req.operation](req.params); - newReq._subRequest = true; - newReq.presign(function(err, url) { - if (err) done(err); - else { - req.params.PresignedUrl = url; - done(); - } - }); - }, - - /** - * @api private - */ - extractError: function extractError(resp) { - // EC2 nests the error code and message deeper than other AWS Query services. - var httpResponse = resp.httpResponse; - var data = new AWS.XML.Parser().parse(httpResponse.body.toString() || ''); - if (data.Errors) - resp.error = AWS.util.error(new Error(), { - code: data.Errors.Error.Code, - message: data.Errors.Error.Message - }); - else - resp.error = AWS.util.error(new Error(), { - code: httpResponse.statusCode, - message: null - }); - } -}); diff --git a/cli/node_modules/aws-sdk/lib/services/glacier.js b/cli/node_modules/aws-sdk/lib/services/glacier.js deleted file mode 100644 index 115cff4d6..000000000 --- a/cli/node_modules/aws-sdk/lib/services/glacier.js +++ /dev/null @@ -1,114 +0,0 @@ -var AWS = require('../core'); - -AWS.util.update(AWS.Glacier.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - if (Array.isArray(request._events.validate)) { - request._events.validate.unshift(this.validateAccountId); - } else { - request.on('validate', this.validateAccountId); - } - request.removeListener('afterBuild', - AWS.EventListeners.Core.COMPUTE_SHA256); - request.on('build', this.addGlacierApiVersion); - request.on('build', this.addTreeHashHeaders); - }, - - /** - * @api private - */ - validateAccountId: function validateAccountId(request) { - if (request.params.accountId !== undefined) return; - request.params = AWS.util.copy(request.params); - request.params.accountId = '-'; - }, - - /** - * @api private - */ - addGlacierApiVersion: function addGlacierApiVersion(request) { - var version = request.service.api.apiVersion; - request.httpRequest.headers['x-amz-glacier-version'] = version; - }, - - /** - * @api private - */ - addTreeHashHeaders: function addTreeHashHeaders(request) { - if (request.params.body === undefined) return; - - var hashes = request.service.computeChecksums(request.params.body); - request.httpRequest.headers['X-Amz-Content-Sha256'] = hashes.linearHash; - - if (!request.httpRequest.headers['x-amz-sha256-tree-hash']) { - request.httpRequest.headers['x-amz-sha256-tree-hash'] = hashes.treeHash; - } - }, - - /** - * @!group Computing Checksums - */ - - /** - * Computes the SHA-256 linear and tree hash checksums for a given - * block of Buffer data. Pass the tree hash of the computed checksums - * as the checksum input to the {completeMultipartUpload} when performing - * a multi-part upload. - * - * @example Calculate checksum of 5.5MB data chunk - * var glacier = new AWS.Glacier(); - * var data = new Buffer(5.5 * 1024 * 1024); - * data.fill('0'); // fill with zeros - * var results = glacier.computeChecksums(data); - * // Result: { linearHash: '68aff0c5a9...', treeHash: '154e26c78f...' } - * @param data [Buffer, String] data to calculate the checksum for - * @return [map] a map containing - * the linearHash and treeHash properties representing hex based digests - * of the respective checksums. - * @see completeMultipartUpload - */ - computeChecksums: function computeChecksums(data) { - if (!AWS.util.Buffer.isBuffer(data)) data = new AWS.util.Buffer(data); - - var mb = 1024 * 1024; - var hashes = []; - var hash = AWS.util.crypto.createHash('sha256'); - - // build leaf nodes in 1mb chunks - for (var i = 0; i < data.length; i += mb) { - var chunk = data.slice(i, Math.min(i + mb, data.length)); - hash.update(chunk); - hashes.push(AWS.util.crypto.sha256(chunk)); - } - - return { - linearHash: hash.digest('hex'), - treeHash: this.buildHashTree(hashes) - }; - }, - - /** - * @api private - */ - buildHashTree: function buildHashTree(hashes) { - // merge leaf nodes - while (hashes.length > 1) { - var tmpHashes = []; - for (var i = 0; i < hashes.length; i += 2) { - if (hashes[i + 1]) { - var tmpHash = new AWS.util.Buffer(64); - tmpHash.write(hashes[i], 0, 32, 'binary'); - tmpHash.write(hashes[i + 1], 32, 32, 'binary'); - tmpHashes.push(AWS.util.crypto.sha256(tmpHash)); - } else { - tmpHashes.push(hashes[i]); - } - } - hashes = tmpHashes; - } - - return AWS.util.crypto.toHex(hashes[0]); - } -}); diff --git a/cli/node_modules/aws-sdk/lib/services/machinelearning.js b/cli/node_modules/aws-sdk/lib/services/machinelearning.js deleted file mode 100644 index e2808f43b..000000000 --- a/cli/node_modules/aws-sdk/lib/services/machinelearning.js +++ /dev/null @@ -1,24 +0,0 @@ -var AWS = require('../core'); - -AWS.util.update(AWS.MachineLearning.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - if (request.operation === 'predict') { - request.addListener('build', this.buildEndpoint); - } - }, - - /** - * Updates request endpoint from PredictEndpoint - * @api private - */ - buildEndpoint: function buildEndpoint(request) { - var url = request.params.PredictEndpoint; - if (url) { - request.httpRequest.endpoint = new AWS.Endpoint(url); - } - } - -}); diff --git a/cli/node_modules/aws-sdk/lib/services/route53.js b/cli/node_modules/aws-sdk/lib/services/route53.js deleted file mode 100644 index 1dc868f99..000000000 --- a/cli/node_modules/aws-sdk/lib/services/route53.js +++ /dev/null @@ -1,18 +0,0 @@ -var AWS = require('../core'); - -AWS.util.update(AWS.Route53.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.on('build', this.sanitizeUrl); - }, - - /** - * @api private - */ - sanitizeUrl: function sanitizeUrl(request) { - var path = request.httpRequest.path; - request.httpRequest.path = path.replace(/\/%2F\w+%2F/, '/'); - } -}); diff --git a/cli/node_modules/aws-sdk/lib/services/s3.js b/cli/node_modules/aws-sdk/lib/services/s3.js deleted file mode 100644 index 51ba7a421..000000000 --- a/cli/node_modules/aws-sdk/lib/services/s3.js +++ /dev/null @@ -1,447 +0,0 @@ -var AWS = require('../core'); - -// Pull in managed upload extension -require('../s3/managed_upload'); - -AWS.util.update(AWS.S3.prototype, { - /** - * @api private - */ - validateService: function validateService() { - // default to us-east-1 when no region is provided - if (!this.config.region) this.config.region = 'us-east-1'; - - if (!this.config.endpoint && this.config.s3BucketEndpoint) { - var msg = 'An endpoint must be provided when configuring ' + - '`s3BucketEndpoint` to true.'; - throw AWS.util.error(new Error(), - {name: 'InvalidEndpoint', message: msg}); - } - }, - - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.addListener('validate', this.validateScheme); - request.addListener('validate', this.validateBucketEndpoint); - request.addListener('build', this.addContentType); - request.addListener('build', this.populateURI); - request.addListener('build', this.computeContentMd5); - request.addListener('build', this.computeSseCustomerKeyMd5); - request.addListener('afterBuild', this.addExpect100Continue); - request.removeListener('validate', - AWS.EventListeners.Core.VALIDATE_REGION); - request.addListener('extractError', this.extractError); - request.addListener('extractData', this.extractData); - request.addListener('extractData', AWS.util.hoistPayloadMember); - request.addListener('beforePresign', this.prepareSignedUrl); - }, - - /* - * @api private - * - */ - validateScheme: function(req) { - var params = req.params, - scheme = req.httpRequest.endpoint.protocol, - sensitive = params.SSECustomerKey || params.CopySourceSSECustomerKey; - if (sensitive && scheme !== 'https:') { - var msg = 'Cannot send SSE keys over HTTP. Set \'sslEnabled\'' + - 'to \'true\' in your configuration'; - throw AWS.util.error(new Error(), - { code: 'ConfigError', message: msg }); - } - }, - - /* - * @api private - * - */ - validateBucketEndpoint: function(req) { - if (!req.params.Bucket && req.service.config.s3BucketEndpoint) { - var msg = 'Cannot send requests to root API with `s3BucketEndpoint` set.'; - throw AWS.util.error(new Error(), - { code: 'ConfigError', message: msg }); - } - }, - - /** - * S3 prefers dns-compatible bucket names to be moved from the uri path - * to the hostname as a sub-domain. This is not possible, even for dns-compat - * buckets when using SSL and the bucket name contains a dot ('.'). The - * ssl wildcard certificate is only 1-level deep. - * - * @api private - */ - populateURI: function populateURI(req) { - var httpRequest = req.httpRequest; - var b = req.params.Bucket; - - if (b) { - if (!req.service.pathStyleBucketName(b)) { - if (!req.service.config.s3BucketEndpoint) { - httpRequest.endpoint.hostname = - b + '.' + httpRequest.endpoint.hostname; - - var port = httpRequest.endpoint.port; - if (port !== 80 && port !== 443) { - httpRequest.endpoint.host = httpRequest.endpoint.hostname + ':' + - httpRequest.endpoint.port; - } else { - httpRequest.endpoint.host = httpRequest.endpoint.hostname; - } - } - - httpRequest.virtualHostedBucket = b; // needed for signing the request - httpRequest.path = httpRequest.path.replace(new RegExp('/' + b), ''); - if (httpRequest.path[0] !== '/') { - httpRequest.path = '/' + httpRequest.path; - } - } - } - }, - - /** - * Adds Expect: 100-continue header if payload is greater-or-equal 1MB - * @api private - */ - addExpect100Continue: function addExpect100Continue(req) { - var len = req.httpRequest.headers['Content-Length']; - if (AWS.util.isNode() && len >= 1024 * 1024) { - req.httpRequest.headers['Expect'] = '100-continue'; - } - }, - - /** - * Adds a default content type if none is supplied. - * - * @api private - */ - addContentType: function addContentType(req) { - var httpRequest = req.httpRequest; - if (httpRequest.method === 'GET' || httpRequest.method === 'HEAD') { - // Content-Type is not set in GET/HEAD requests - delete httpRequest.headers['Content-Type']; - return; - } - - if (!httpRequest.headers['Content-Type']) { // always have a Content-Type - httpRequest.headers['Content-Type'] = 'application/octet-stream'; - } - - var contentType = httpRequest.headers['Content-Type']; - if (AWS.util.isBrowser()) { - if (typeof httpRequest.body === 'string' && !contentType.match(/;\s*charset=/)) { - var charset = '; charset=UTF-8'; - httpRequest.headers['Content-Type'] += charset; - } else { - var replaceFn = function(_, prefix, charsetName) { - return prefix + charsetName.toUpperCase(); - }; - - httpRequest.headers['Content-Type'] = - contentType.replace(/(;\s*charset=)(.+)$/, replaceFn); - } - } - }, - - /** - * @api private - */ - computableChecksumOperations: { - putBucketCors: true, - putBucketLifecycle: true, - putBucketTagging: true, - deleteObjects: true - }, - - /** - * Checks whether checksums should be computed for the request. - * If the request requires checksums to be computed, this will always - * return true, otherwise it depends on whether {AWS.Config.computeChecksums} - * is set. - * - * @param req [AWS.Request] the request to check against - * @return [Boolean] whether to compute checksums for a request. - * @api private - */ - willComputeChecksums: function willComputeChecksums(req) { - if (this.computableChecksumOperations[req.operation]) return true; - if (!this.config.computeChecksums) return false; - - // TODO: compute checksums for Stream objects - if (!AWS.util.Buffer.isBuffer(req.httpRequest.body) && - typeof req.httpRequest.body !== 'string') { - return false; - } - - var rules = req.service.api.operations[req.operation].input.members; - - // V4 signer uses SHA256 signatures so only compute MD5 if it is required - if (req.service.getSignerClass(req) === AWS.Signers.V4) { - if (rules.ContentMD5 && !rules.ContentMD5.required) return false; - } - - if (rules.ContentMD5 && !req.params.ContentMD5) return true; - }, - - /** - * A listener that computes the Content-MD5 and sets it in the header. - * @see AWS.S3.willComputeChecksums - * @api private - */ - computeContentMd5: function computeContentMd5(req) { - if (req.service.willComputeChecksums(req)) { - var md5 = AWS.util.crypto.md5(req.httpRequest.body, 'base64'); - req.httpRequest.headers['Content-MD5'] = md5; - } - }, - - /** - * @api private - */ - computeSseCustomerKeyMd5: function computeSseCustomerKeyMd5(req) { - var keys = { - SSECustomerKey: 'x-amz-server-side-encryption-customer-key-MD5', - CopySourceSSECustomerKey: 'x-amz-copy-source-server-side-encryption-customer-key-MD5' - }; - AWS.util.each(keys, function(key, header) { - if (req.params[key]) { - var value = AWS.util.crypto.md5(req.params[key], 'base64'); - req.httpRequest.headers[header] = value; - } - }); - }, - - /** - * Returns true if the bucket name should be left in the URI path for - * a request to S3. This function takes into account the current - * endpoint protocol (e.g. http or https). - * - * @api private - */ - pathStyleBucketName: function pathStyleBucketName(bucketName) { - // user can force path style requests via the configuration - if (this.config.s3ForcePathStyle) return true; - if (this.config.s3BucketEndpoint) return false; - - if (this.dnsCompatibleBucketName(bucketName)) { - return (this.config.sslEnabled && bucketName.match(/\./)) ? true : false; - } else { - return true; // not dns compatible names must always use path style - } - }, - - /** - * Returns true if the bucket name is DNS compatible. Buckets created - * outside of the classic region MUST be DNS compatible. - * - * @api private - */ - dnsCompatibleBucketName: function dnsCompatibleBucketName(bucketName) { - var b = bucketName; - var domain = new RegExp(/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/); - var ipAddress = new RegExp(/(\d+\.){3}\d+/); - var dots = new RegExp(/\.\./); - return (b.match(domain) && !b.match(ipAddress) && !b.match(dots)) ? true : false; - }, - - /** - * @return [Boolean] whether response contains an error - * @api private - */ - successfulResponse: function successfulResponse(resp) { - var req = resp.request; - var httpResponse = resp.httpResponse; - if (req.operation === 'completeMultipartUpload' && - httpResponse.body.toString().match('')) - return false; - else - return httpResponse.statusCode < 300; - }, - - /** - * @return [Boolean] whether the error can be retried - * @api private - */ - retryableError: function retryableError(error, request) { - if (request.operation === 'completeMultipartUpload' && - error.statusCode === 200) { - return true; - } else if (error && error.code === 'RequestTimeout') { - return true; - } else { - var _super = AWS.Service.prototype.retryableError; - return _super.call(this, error, request); - } - }, - - /** - * Provides a specialized parser for getBucketLocation -- all other - * operations are parsed by the super class. - * - * @api private - */ - extractData: function extractData(resp) { - var req = resp.request; - if (req.operation === 'getBucketLocation') { - var match = resp.httpResponse.body.toString().match(/>(.+)<\/Location/); - delete resp.data['_']; - if (match) { - resp.data.LocationConstraint = match[1]; - } else { - resp.data.LocationConstraint = ''; - } - } - }, - - /** - * Extracts an error object from the http response. - * - * @api private - */ - extractError: function extractError(resp) { - var codes = { - 304: 'NotModified', - 403: 'Forbidden', - 400: 'BadRequest', - 404: 'NotFound' - }; - - var code = resp.httpResponse.statusCode; - var body = resp.httpResponse.body || ''; - if (codes[code] && body.length === 0) { - resp.error = AWS.util.error(new Error(), { - code: codes[resp.httpResponse.statusCode], - message: null - }); - } else { - var data = new AWS.XML.Parser().parse(body.toString()); - resp.error = AWS.util.error(new Error(), { - code: data.Code || code, - message: data.Message || null - }); - } - }, - - /** - * Get a pre-signed URL for a given operation name. - * - * @note You must ensure that you have static or previously resolved - * credentials if you call this method synchronously (with no callback), - * otherwise it may not properly sign the request. If you cannot guarantee - * this (you are using an asynchronous credential provider, i.e., EC2 - * IAM roles), you should always call this method with an asynchronous - * callback. - * @param operation [String] the name of the operation to call - * @param params [map] parameters to pass to the operation. See the given - * operation for the expected operation parameters. In addition, you can - * also pass the "Expires" parameter to inform S3 how long the URL should - * work for. - * @option params Expires [Integer] (900) the number of seconds to expire - * the pre-signed URL operation in. Defaults to 15 minutes. - * @param callback [Function] if a callback is provided, this function will - * pass the URL as the second parameter (after the error parameter) to - * the callback function. - * @return [String] if called synchronously (with no callback), returns the - * signed URL. - * @return [null] nothing is returned if a callback is provided. - * @example Pre-signing a getObject operation (synchronously) - * var params = {Bucket: 'bucket', Key: 'key'}; - * var url = s3.getSignedUrl('getObject', params); - * console.log('The URL is', url); - * @example Pre-signing a putObject (asynchronously) - * var params = {Bucket: 'bucket', Key: 'key'}; - * s3.getSignedUrl('putObject', params, function (err, url) { - * console.log('The URL is', url); - * }); - * @example Pre-signing a putObject operation with a specific payload - * var params = {Bucket: 'bucket', Key: 'key', Body: 'body'}; - * var url = s3.getSignedUrl('putObject', params); - * console.log('The URL is', url); - * @example Passing in a 1-minute expiry time for a pre-signed URL - * var params = {Bucket: 'bucket', Key: 'key', Expires: 60}; - * var url = s3.getSignedUrl('getObject', params); - * console.log('The URL is', url); // expires in 60 seconds - */ - getSignedUrl: function getSignedUrl(operation, params, callback) { - params = AWS.util.copy(params || {}); - var expires = params.Expires || 900; - delete params.Expires; // we can't validate this - var request = this.makeRequest(operation, params); - return request.presign(expires, callback); - }, - - /** - * @api private - */ - prepareSignedUrl: function prepareSignedUrl(request) { - request.addListener('validate', request.service.noPresignedContentLength); - request.removeListener('build', request.service.addContentType); - if (!request.params.Body) { - // no Content-MD5/SHA-256 if body is not provided - request.removeListener('build', request.service.computeContentMd5); - } else { - request.addListener('afterBuild', AWS.EventListeners.Core.COMPUTE_SHA256); - } - }, - - noPresignedContentLength: function noPresignedContentLength(request) { - if (request.params.ContentLength !== undefined) { - throw AWS.util.error(new Error(), {code: 'UnexpectedParameter', - message: 'ContentLength is not supported in pre-signed URLs.'}); - } - }, - - createBucket: function createBucket(params, callback) { - // When creating a bucket *outside* the classic region, the location - // constraint must be set for the bucket and it must match the endpoint. - // This chunk of code will set the location constraint param based - // on the region (when possible), but it will not override a passed-in - // location constraint. - if (!params) params = {}; - var hostname = this.endpoint.hostname; - if (hostname !== this.api.globalEndpoint && !params.CreateBucketConfiguration) { - params.CreateBucketConfiguration = { LocationConstraint: this.config.region }; - } - return this.makeRequest('createBucket', params, callback); - }, - - /** - * @overload upload(params = {}, [options], [callback]) - * Uploads an arbitrarily sized buffer, blob, or stream, using intelligent - * concurrent handling of parts if the payload is large enough. You can - * configure the concurrent queue size by setting `options`. - * - * @param (see AWS.S3.putObject) - * @option (see AWS.S3.ManagedUpload.constructor) - * @return [AWS.S3.ManagedUpload] the managed upload object that can call - * `send()` or track progress. - * @example Uploading a stream object - * var params = {Bucket: 'bucket', Key: 'key', Body: stream}; - * s3.upload(params, function(err, data) { - * console.log(err, data); - * }); - * @example Uploading a stream with concurrency of 1 and partSize of 10mb - * var params = {Bucket: 'bucket', Key: 'key', Body: stream}; - * var options = {partSize: 10 * 1024 * 1024, queueSize: 1}; - * s3.upload(params, options, function(err, data) { - * console.log(err, data); - * }); - * @see AWS.S3.ManagedUpload - */ - upload: function upload(params, options, callback) { - if (typeof options === 'function' && callback === undefined) { - callback = options; - options = null; - } - - options = options || {}; - options = AWS.util.merge(options || {}, {service: this, params: params}); - - var uploader = new AWS.S3.ManagedUpload(options); - if (typeof callback === 'function') uploader.send(callback); - return uploader; - } -}); diff --git a/cli/node_modules/aws-sdk/lib/services/sqs.js b/cli/node_modules/aws-sdk/lib/services/sqs.js deleted file mode 100644 index 42aaf2ec1..000000000 --- a/cli/node_modules/aws-sdk/lib/services/sqs.js +++ /dev/null @@ -1,131 +0,0 @@ -var AWS = require('../core'); - -AWS.util.update(AWS.SQS.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.addListener('build', this.buildEndpoint); - - if (request.service.config.computeChecksums) { - if (request.operation === 'sendMessage') { - request.addListener('extractData', this.verifySendMessageChecksum); - } else if (request.operation === 'sendMessageBatch') { - request.addListener('extractData', this.verifySendMessageBatchChecksum); - } else if (request.operation === 'receiveMessage') { - request.addListener('extractData', this.verifyReceiveMessageChecksum); - } - } - }, - - /** - * @api private - */ - verifySendMessageChecksum: function verifySendMessageChecksum(response) { - if (!response.data) return; - - var md5 = response.data.MD5OfMessageBody; - var body = this.params.MessageBody; - var calculatedMd5 = this.service.calculateChecksum(body); - if (calculatedMd5 !== md5) { - var msg = 'Got "' + response.data.MD5OfMessageBody + - '", expecting "' + calculatedMd5 + '".'; - this.service.throwInvalidChecksumError(response, - [response.data.MessageId], msg); - } - }, - - /** - * @api private - */ - verifySendMessageBatchChecksum: function verifySendMessageBatchChecksum(response) { - if (!response.data) return; - - var service = this.service; - var entries = {}; - var errors = []; - var messageIds = []; - AWS.util.arrayEach(response.data.Successful, function (entry) { - entries[entry.Id] = entry; - }); - AWS.util.arrayEach(this.params.Entries, function (entry) { - if (entries[entry.Id]) { - var md5 = entries[entry.Id].MD5OfMessageBody; - var body = entry.MessageBody; - if (!service.isChecksumValid(md5, body)) { - errors.push(entry.Id); - messageIds.push(entries[entry.Id].MessageId); - } - } - }); - - if (errors.length > 0) { - service.throwInvalidChecksumError(response, messageIds, - 'Invalid messages: ' + errors.join(', ')); - } - }, - - /** - * @api private - */ - verifyReceiveMessageChecksum: function verifyReceiveMessageChecksum(response) { - if (!response.data) return; - - var service = this.service; - var messageIds = []; - AWS.util.arrayEach(response.data.Messages, function(message) { - var md5 = message.MD5OfBody; - var body = message.Body; - if (!service.isChecksumValid(md5, body)) { - messageIds.push(message.MessageId); - } - }); - - if (messageIds.length > 0) { - service.throwInvalidChecksumError(response, messageIds, - 'Invalid messages: ' + messageIds.join(', ')); - } - }, - - /** - * @api private - */ - throwInvalidChecksumError: function throwInvalidChecksumError(response, ids, message) { - response.error = AWS.util.error(new Error(), { - retryable: true, - code: 'InvalidChecksum', - messageIds: ids, - message: response.request.operation + - ' returned an invalid MD5 response. ' + message - }); - }, - - /** - * @api private - */ - isChecksumValid: function isChecksumValid(checksum, data) { - return this.calculateChecksum(data) === checksum; - }, - - /** - * @api private - */ - calculateChecksum: function calculateChecksum(data) { - return AWS.util.crypto.md5(data, 'hex'); - }, - - /** - * @api private - */ - buildEndpoint: function buildEndpoint(request) { - var url = request.httpRequest.params.QueueUrl; - if (url) { - request.httpRequest.endpoint = new AWS.Endpoint(url); - - // signature version 4 requires the region name to be set, - // sqs queue urls contain the region name - var matches = request.httpRequest.endpoint.host.match(/^sqs\.(.+?)\./); - if (matches) request.httpRequest.region = matches[1]; - } - } -}); diff --git a/cli/node_modules/aws-sdk/lib/services/sts.js b/cli/node_modules/aws-sdk/lib/services/sts.js deleted file mode 100644 index 6e9fd00c8..000000000 --- a/cli/node_modules/aws-sdk/lib/services/sts.js +++ /dev/null @@ -1,47 +0,0 @@ -var AWS = require('../core'); - -AWS.util.update(AWS.STS.prototype, { - /** - * @overload credentialsFrom(data, credentials = null) - * Creates a credentials object from STS response data containing - * credentials information. Useful for quickly setting AWS credentials. - * - * @note This is a low-level utility function. If you want to load temporary - * credentials into your process for subsequent requests to AWS resources, - * you should use {AWS.TemporaryCredentials} instead. - * @param data [map] data retrieved from a call to {getFederatedToken}, - * {getSessionToken}, {assumeRole}, or {assumeRoleWithWebIdentity}. - * @param credentials [AWS.Credentials] an optional credentials object to - * fill instead of creating a new object. Useful when modifying an - * existing credentials object from a refresh call. - * @return [AWS.TemporaryCredentials] the set of temporary credentials - * loaded from a raw STS operation response. - * @example Using credentialsFrom to load global AWS credentials - * var sts = new AWS.STS(); - * sts.getSessionToken(function (err, data) { - * if (err) console.log("Error getting credentials"); - * else { - * AWS.config.credentials = sts.credentialsFrom(data); - * } - * }); - * @see AWS.TemporaryCredentials - */ - credentialsFrom: function credentialsFrom(data, credentials) { - if (!data) return null; - if (!credentials) credentials = new AWS.TemporaryCredentials(); - credentials.expired = false; - credentials.accessKeyId = data.Credentials.AccessKeyId; - credentials.secretAccessKey = data.Credentials.SecretAccessKey; - credentials.sessionToken = data.Credentials.SessionToken; - credentials.expireTime = data.Credentials.Expiration; - return credentials; - }, - - assumeRoleWithWebIdentity: function assumeRoleWithWebIdentity(params, callback) { - return this.makeUnauthenticatedRequest('assumeRoleWithWebIdentity', params, callback); - }, - - assumeRoleWithSAML: function assumeRoleWithSAML(params, callback) { - return this.makeUnauthenticatedRequest('assumeRoleWithSAML', params, callback); - } -}); diff --git a/cli/node_modules/aws-sdk/lib/services/swf.js b/cli/node_modules/aws-sdk/lib/services/swf.js deleted file mode 100644 index d25208737..000000000 --- a/cli/node_modules/aws-sdk/lib/services/swf.js +++ /dev/null @@ -1,10 +0,0 @@ -var AWS = require('../core'); - -AWS.util.hideProperties(AWS, ['SimpleWorkflow']); - -/** - * @constant - * @readonly - * Backwards compatibility for access to the {AWS.SWF} service class. - */ -AWS.SimpleWorkflow = AWS.SWF; diff --git a/cli/node_modules/aws-sdk/lib/signers/presign.js b/cli/node_modules/aws-sdk/lib/signers/presign.js deleted file mode 100644 index 01e0dcab2..000000000 --- a/cli/node_modules/aws-sdk/lib/signers/presign.js +++ /dev/null @@ -1,109 +0,0 @@ -var AWS = require('../core'); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -var expiresHeader = 'presigned-expires'; - -/** - * @api private - */ -function signedUrlBuilder(request) { - var expires = request.httpRequest.headers[expiresHeader]; - - delete request.httpRequest.headers['User-Agent']; - delete request.httpRequest.headers['X-Amz-User-Agent']; - - if (request.service.getSignerClass() === AWS.Signers.V4) { - if (expires > 604800) { // one week expiry is invalid - var message = 'Presigning does not support expiry time greater ' + - 'than a week with SigV4 signing.'; - throw AWS.util.error(new Error(), { - code: 'InvalidExpiryTime', message: message, retryable: false - }); - } - request.httpRequest.headers[expiresHeader] = expires; - } else if (request.service.getSignerClass() === AWS.Signers.S3) { - request.httpRequest.headers[expiresHeader] = parseInt( - AWS.util.date.unixTimestamp() + expires, 10).toString(); - } else { - throw AWS.util.error(new Error(), { - message: 'Presigning only supports S3 or SigV4 signing.', - code: 'UnsupportedSigner', retryable: false - }); - } -} - -/** - * @api private - */ -function signedUrlSigner(request) { - var endpoint = request.httpRequest.endpoint; - var parsedUrl = AWS.util.urlParse(request.httpRequest.path); - var queryParams = {}; - - if (parsedUrl.search) { - queryParams = AWS.util.queryStringParse(parsedUrl.search.substr(1)); - } - - AWS.util.each(request.httpRequest.headers, function (key, value) { - if (key === expiresHeader) key = 'Expires'; - queryParams[key] = value; - }); - delete request.httpRequest.headers[expiresHeader]; - - var auth = queryParams['Authorization'].split(' '); - if (auth[0] === 'AWS') { - auth = auth[1].split(':'); - queryParams['AWSAccessKeyId'] = auth[0]; - queryParams['Signature'] = auth[1]; - } else if (auth[0] === 'AWS4-HMAC-SHA256') { // SigV4 signing - auth.shift(); - var rest = auth.join(' '); - var signature = rest.match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1]; - queryParams['X-Amz-Signature'] = signature; - delete queryParams['Expires']; - } - delete queryParams['Authorization']; - delete queryParams['Host']; - - // build URL - endpoint.pathname = parsedUrl.pathname; - endpoint.search = AWS.util.queryParamsToString(queryParams); -} - -/** - * @api private - */ -AWS.Signers.Presign = inherit({ - /** - * @api private - */ - sign: function sign(request, expireTime, callback) { - request.httpRequest.headers[expiresHeader] = expireTime || 3600; - request.on('build', signedUrlBuilder); - request.on('sign', signedUrlSigner); - request.removeListener('afterBuild', - AWS.EventListeners.Core.SET_CONTENT_LENGTH); - request.removeListener('afterBuild', - AWS.EventListeners.Core.COMPUTE_SHA256); - - request.emit('beforePresign', [request]); - - if (callback) { - request.build(function() { - if (this.response.error) callback(this.response.error); - else { - callback(null, AWS.util.urlFormat(request.httpRequest.endpoint)); - } - }); - } else { - request.build(); - if (request.response.error) throw request.response.error; - return AWS.util.urlFormat(request.httpRequest.endpoint); - } - } -}); - -module.exports = AWS.Signers.Presign; diff --git a/cli/node_modules/aws-sdk/lib/signers/request_signer.js b/cli/node_modules/aws-sdk/lib/signers/request_signer.js deleted file mode 100644 index 7235267a7..000000000 --- a/cli/node_modules/aws-sdk/lib/signers/request_signer.js +++ /dev/null @@ -1,29 +0,0 @@ -var AWS = require('../core'); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -AWS.Signers.RequestSigner = inherit({ - constructor: function RequestSigner(request) { - this.request = request; - } -}); - -AWS.Signers.RequestSigner.getVersion = function getVersion(version) { - switch (version) { - case 'v2': return AWS.Signers.V2; - case 'v3': return AWS.Signers.V3; - case 'v4': return AWS.Signers.V4; - case 's3': return AWS.Signers.S3; - case 'v3https': return AWS.Signers.V3Https; - } - throw new Error('Unknown signing version ' + version); -}; - -require('./v2'); -require('./v3'); -require('./v3https'); -require('./v4'); -require('./s3'); -require('./presign'); diff --git a/cli/node_modules/aws-sdk/lib/signers/s3.js b/cli/node_modules/aws-sdk/lib/signers/s3.js deleted file mode 100644 index 2f49fff97..000000000 --- a/cli/node_modules/aws-sdk/lib/signers/s3.js +++ /dev/null @@ -1,166 +0,0 @@ -var AWS = require('../core'); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -AWS.Signers.S3 = inherit(AWS.Signers.RequestSigner, { - /** - * When building the stringToSign, these sub resource params should be - * part of the canonical resource string with their NON-decoded values - */ - subResources: { - 'acl': 1, - 'cors': 1, - 'lifecycle': 1, - 'delete': 1, - 'location': 1, - 'logging': 1, - 'notification': 1, - 'partNumber': 1, - 'policy': 1, - 'requestPayment': 1, - 'restore': 1, - 'tagging': 1, - 'torrent': 1, - 'uploadId': 1, - 'uploads': 1, - 'versionId': 1, - 'versioning': 1, - 'versions': 1, - 'website': 1 - }, - - // when building the stringToSign, these querystring params should be - // part of the canonical resource string with their NON-encoded values - responseHeaders: { - 'response-content-type': 1, - 'response-content-language': 1, - 'response-expires': 1, - 'response-cache-control': 1, - 'response-content-disposition': 1, - 'response-content-encoding': 1 - }, - - addAuthorization: function addAuthorization(credentials, date) { - if (!this.request.headers['presigned-expires']) { - this.request.headers['X-Amz-Date'] = AWS.util.date.rfc822(date); - } - - if (credentials.sessionToken) { - // presigned URLs require this header to be lowercased - this.request.headers['x-amz-security-token'] = credentials.sessionToken; - } - - var signature = this.sign(credentials.secretAccessKey, this.stringToSign()); - var auth = 'AWS ' + credentials.accessKeyId + ':' + signature; - - this.request.headers['Authorization'] = auth; - }, - - stringToSign: function stringToSign() { - var r = this.request; - - var parts = []; - parts.push(r.method); - parts.push(r.headers['Content-MD5'] || ''); - parts.push(r.headers['Content-Type'] || ''); - - // This is the "Date" header, but we use X-Amz-Date. - // The S3 signing mechanism requires us to pass an empty - // string for this Date header regardless. - parts.push(r.headers['presigned-expires'] || ''); - - var headers = this.canonicalizedAmzHeaders(); - if (headers) parts.push(headers); - parts.push(this.canonicalizedResource()); - - return parts.join('\n'); - - }, - - canonicalizedAmzHeaders: function canonicalizedAmzHeaders() { - - var amzHeaders = []; - - AWS.util.each(this.request.headers, function (name) { - if (name.match(/^x-amz-/i)) - amzHeaders.push(name); - }); - - amzHeaders.sort(function (a, b) { - return a.toLowerCase() < b.toLowerCase() ? -1 : 1; - }); - - var parts = []; - AWS.util.arrayEach.call(this, amzHeaders, function (name) { - parts.push(name.toLowerCase() + ':' + String(this.request.headers[name])); - }); - - return parts.join('\n'); - - }, - - canonicalizedResource: function canonicalizedResource() { - - var r = this.request; - - var parts = r.path.split('?'); - var path = parts[0]; - var querystring = parts[1]; - - var resource = ''; - - if (r.virtualHostedBucket) - resource += '/' + r.virtualHostedBucket; - - resource += path; - - if (querystring) { - - // collect a list of sub resources and query params that need to be signed - var resources = []; - - AWS.util.arrayEach.call(this, querystring.split('&'), function (param) { - var name = param.split('=')[0]; - var value = param.split('=')[1]; - if (this.subResources[name] || this.responseHeaders[name]) { - var subresource = { name: name }; - if (value !== undefined) { - if (this.subResources[name]) { - subresource.value = value; - } else { - subresource.value = decodeURIComponent(value); - } - } - resources.push(subresource); - } - }); - - resources.sort(function (a, b) { return a.name < b.name ? -1 : 1; }); - - if (resources.length) { - - querystring = []; - AWS.util.arrayEach(resources, function (res) { - if (res.value === undefined) - querystring.push(res.name); - else - querystring.push(res.name + '=' + res.value); - }); - - resource += '?' + querystring.join('&'); - } - - } - - return resource; - - }, - - sign: function sign(secret, string) { - return AWS.util.crypto.hmac(secret, string, 'base64', 'sha1'); - } -}); - -module.exports = AWS.Signers.S3; diff --git a/cli/node_modules/aws-sdk/lib/signers/v2.js b/cli/node_modules/aws-sdk/lib/signers/v2.js deleted file mode 100644 index 9c7d03f46..000000000 --- a/cli/node_modules/aws-sdk/lib/signers/v2.js +++ /dev/null @@ -1,45 +0,0 @@ -var AWS = require('../core'); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -AWS.Signers.V2 = inherit(AWS.Signers.RequestSigner, { - addAuthorization: function addAuthorization(credentials, date) { - - if (!date) date = AWS.util.date.getDate(); - - var r = this.request; - - r.params.Timestamp = AWS.util.date.iso8601(date); - r.params.SignatureVersion = '2'; - r.params.SignatureMethod = 'HmacSHA256'; - r.params.AWSAccessKeyId = credentials.accessKeyId; - - if (credentials.sessionToken) { - r.params.SecurityToken = credentials.sessionToken; - } - - delete r.params.Signature; // delete old Signature for re-signing - r.params.Signature = this.signature(credentials); - - r.body = AWS.util.queryParamsToString(r.params); - r.headers['Content-Length'] = r.body.length; - }, - - signature: function signature(credentials) { - return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64'); - }, - - stringToSign: function stringToSign() { - var parts = []; - parts.push(this.request.method); - parts.push(this.request.endpoint.host.toLowerCase()); - parts.push(this.request.pathname()); - parts.push(AWS.util.queryParamsToString(this.request.params)); - return parts.join('\n'); - } - -}); - -module.exports = AWS.Signers.V2; diff --git a/cli/node_modules/aws-sdk/lib/signers/v3.js b/cli/node_modules/aws-sdk/lib/signers/v3.js deleted file mode 100644 index 40f342d5f..000000000 --- a/cli/node_modules/aws-sdk/lib/signers/v3.js +++ /dev/null @@ -1,74 +0,0 @@ -var AWS = require('../core'); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -AWS.Signers.V3 = inherit(AWS.Signers.RequestSigner, { - addAuthorization: function addAuthorization(credentials, date) { - - var datetime = AWS.util.date.rfc822(date); - - this.request.headers['X-Amz-Date'] = datetime; - - if (credentials.sessionToken) { - this.request.headers['x-amz-security-token'] = credentials.sessionToken; - } - - this.request.headers['X-Amzn-Authorization'] = - this.authorization(credentials, datetime); - - }, - - authorization: function authorization(credentials) { - return 'AWS3 ' + - 'AWSAccessKeyId=' + credentials.accessKeyId + ',' + - 'Algorithm=HmacSHA256,' + - 'SignedHeaders=' + this.signedHeaders() + ',' + - 'Signature=' + this.signature(credentials); - }, - - signedHeaders: function signedHeaders() { - var headers = []; - AWS.util.arrayEach(this.headersToSign(), function iterator(h) { - headers.push(h.toLowerCase()); - }); - return headers.sort().join(';'); - }, - - canonicalHeaders: function canonicalHeaders() { - var headers = this.request.headers; - var parts = []; - AWS.util.arrayEach(this.headersToSign(), function iterator(h) { - parts.push(h.toLowerCase().trim() + ':' + String(headers[h]).trim()); - }); - return parts.sort().join('\n') + '\n'; - }, - - headersToSign: function headersToSign() { - var headers = []; - AWS.util.each(this.request.headers, function iterator(k) { - if (k === 'Host' || k === 'Content-Encoding' || k.match(/^X-Amz/i)) { - headers.push(k); - } - }); - return headers; - }, - - signature: function signature(credentials) { - return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64'); - }, - - stringToSign: function stringToSign() { - var parts = []; - parts.push(this.request.method); - parts.push('/'); - parts.push(''); - parts.push(this.canonicalHeaders()); - parts.push(this.request.body); - return AWS.util.crypto.sha256(parts.join('\n')); - } - -}); - -module.exports = AWS.Signers.V3; diff --git a/cli/node_modules/aws-sdk/lib/signers/v3https.js b/cli/node_modules/aws-sdk/lib/signers/v3https.js deleted file mode 100644 index b70a9305f..000000000 --- a/cli/node_modules/aws-sdk/lib/signers/v3https.js +++ /dev/null @@ -1,22 +0,0 @@ -var AWS = require('../core'); -var inherit = AWS.util.inherit; - -require('./v3'); - -/** - * @api private - */ -AWS.Signers.V3Https = inherit(AWS.Signers.V3, { - authorization: function authorization(credentials) { - return 'AWS3-HTTPS ' + - 'AWSAccessKeyId=' + credentials.accessKeyId + ',' + - 'Algorithm=HmacSHA256,' + - 'Signature=' + this.signature(credentials); - }, - - stringToSign: function stringToSign() { - return this.request.headers['X-Amz-Date']; - } -}); - -module.exports = AWS.Signers.V3Https; diff --git a/cli/node_modules/aws-sdk/lib/signers/v4.js b/cli/node_modules/aws-sdk/lib/signers/v4.js deleted file mode 100644 index f541ab4e2..000000000 --- a/cli/node_modules/aws-sdk/lib/signers/v4.js +++ /dev/null @@ -1,199 +0,0 @@ -var AWS = require('../core'); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -var cachedSecret = {}; - -/** - * @api private - */ -var expiresHeader = 'presigned-expires'; - -/** - * @api private - */ -AWS.Signers.V4 = inherit(AWS.Signers.RequestSigner, { - constructor: function V4(request, serviceName) { - AWS.Signers.RequestSigner.call(this, request); - this.serviceName = serviceName; - }, - - algorithm: 'AWS4-HMAC-SHA256', - - addAuthorization: function addAuthorization(credentials, date) { - var datetime = AWS.util.date.iso8601(date).replace(/[:\-]|\.\d{3}/g, ''); - - if (this.isPresigned()) { - this.updateForPresigned(credentials, datetime); - } else { - this.addHeaders(credentials, datetime); - } - - this.request.headers['Authorization'] = - this.authorization(credentials, datetime); - }, - - addHeaders: function addHeaders(credentials, datetime) { - this.request.headers['X-Amz-Date'] = datetime; - if (credentials.sessionToken) { - this.request.headers['x-amz-security-token'] = credentials.sessionToken; - } - }, - - updateForPresigned: function updateForPresigned(credentials, datetime) { - var credString = this.credentialString(datetime); - var qs = { - 'X-Amz-Date': datetime, - 'X-Amz-Algorithm': this.algorithm, - 'X-Amz-Credential': credentials.accessKeyId + '/' + credString, - 'X-Amz-Expires': this.request.headers[expiresHeader], - 'X-Amz-SignedHeaders': this.signedHeaders() - }; - - if (credentials.sessionToken) { - qs['X-Amz-Security-Token'] = credentials.sessionToken; - } - - if (this.request.headers['Content-Type']) { - qs['Content-Type'] = this.request.headers['Content-Type']; - } - - // need to pull in any other X-Amz-* headers - AWS.util.each.call(this, this.request.headers, function(key, value) { - if (key === expiresHeader) return; - if (this.isSignableHeader(key) && - key.toLowerCase().indexOf('x-amz-') === 0) { - qs[key] = value; - } - }); - - var sep = this.request.path.indexOf('?') >= 0 ? '&' : '?'; - this.request.path += sep + AWS.util.queryParamsToString(qs); - }, - - authorization: function authorization(credentials, datetime) { - var parts = []; - var credString = this.credentialString(datetime); - parts.push(this.algorithm + ' Credential=' + - credentials.accessKeyId + '/' + credString); - parts.push('SignedHeaders=' + this.signedHeaders()); - parts.push('Signature=' + this.signature(credentials, datetime)); - return parts.join(', '); - }, - - signature: function signature(credentials, datetime) { - var cache = cachedSecret[this.serviceName]; - var date = datetime.substr(0, 8); - if (!cache || - cache.akid !== credentials.accessKeyId || - cache.region !== this.request.region || - cache.date !== date) { - var kSecret = credentials.secretAccessKey; - var kDate = AWS.util.crypto.hmac('AWS4' + kSecret, date, 'buffer'); - var kRegion = AWS.util.crypto.hmac(kDate, this.request.region, 'buffer'); - var kService = AWS.util.crypto.hmac(kRegion, this.serviceName, 'buffer'); - var kCredentials = AWS.util.crypto.hmac(kService, 'aws4_request', 'buffer'); - cachedSecret[this.serviceName] = { - region: this.request.region, date: date, - key: kCredentials, akid: credentials.accessKeyId - }; - } - - var key = cachedSecret[this.serviceName].key; - return AWS.util.crypto.hmac(key, this.stringToSign(datetime), 'hex'); - }, - - stringToSign: function stringToSign(datetime) { - var parts = []; - parts.push('AWS4-HMAC-SHA256'); - parts.push(datetime); - parts.push(this.credentialString(datetime)); - parts.push(this.hexEncodedHash(this.canonicalString())); - return parts.join('\n'); - }, - - canonicalString: function canonicalString() { - var parts = [], pathname = this.request.pathname(); - if (this.serviceName !== 's3') pathname = AWS.util.uriEscapePath(pathname); - - parts.push(this.request.method); - parts.push(pathname); - parts.push(this.request.search()); - parts.push(this.canonicalHeaders() + '\n'); - parts.push(this.signedHeaders()); - parts.push(this.hexEncodedBodyHash()); - return parts.join('\n'); - }, - - canonicalHeaders: function canonicalHeaders() { - var headers = []; - AWS.util.each.call(this, this.request.headers, function (key, item) { - headers.push([key, item]); - }); - headers.sort(function (a, b) { - return a[0].toLowerCase() < b[0].toLowerCase() ? -1 : 1; - }); - var parts = []; - AWS.util.arrayEach.call(this, headers, function (item) { - var key = item[0].toLowerCase(); - if (this.isSignableHeader(key)) { - parts.push(key + ':' + - this.canonicalHeaderValues(item[1].toString())); - } - }); - return parts.join('\n'); - }, - - canonicalHeaderValues: function canonicalHeaderValues(values) { - return values.replace(/\s+/g, ' ').replace(/^\s+|\s+$/g, ''); - }, - - signedHeaders: function signedHeaders() { - var keys = []; - AWS.util.each.call(this, this.request.headers, function (key) { - key = key.toLowerCase(); - if (this.isSignableHeader(key)) keys.push(key); - }); - return keys.sort().join(';'); - }, - - credentialString: function credentialString(datetime) { - var parts = []; - parts.push(datetime.substr(0, 8)); - parts.push(this.request.region); - parts.push(this.serviceName); - parts.push('aws4_request'); - return parts.join('/'); - }, - - hexEncodedHash: function hash(string) { - return AWS.util.crypto.sha256(string, 'hex'); - }, - - hexEncodedBodyHash: function hexEncodedBodyHash() { - if (this.isPresigned() && this.serviceName === 's3') { - return 'UNSIGNED-PAYLOAD'; - } else if (this.request.headers['X-Amz-Content-Sha256']) { - return this.request.headers['X-Amz-Content-Sha256']; - } else { - return this.hexEncodedHash(this.request.body || ''); - } - }, - - unsignableHeaders: ['authorization', 'content-type', 'content-length', - 'user-agent', expiresHeader], - - isSignableHeader: function isSignableHeader(key) { - if (key.toLowerCase().indexOf('x-amz-') === 0) return true; - return this.unsignableHeaders.indexOf(key) < 0; - }, - - isPresigned: function isPresigned() { - return this.request.headers[expiresHeader] ? true : false; - } - -}); - -module.exports = AWS.Signers.V4; diff --git a/cli/node_modules/aws-sdk/lib/state_machine.js b/cli/node_modules/aws-sdk/lib/state_machine.js deleted file mode 100644 index 0be8922ec..000000000 --- a/cli/node_modules/aws-sdk/lib/state_machine.js +++ /dev/null @@ -1,42 +0,0 @@ -function AcceptorStateMachine(states, state) { - this.currentState = state || null; - this.states = states || {}; -} - -AcceptorStateMachine.prototype.runTo = function runTo(finalState, done, bindObject, inputError) { - if (typeof finalState === 'function') { - inputError = bindObject; bindObject = done; - done = finalState; finalState = null; - } - - var self = this; - var state = self.states[self.currentState]; - state.fn.call(bindObject || self, inputError, function(err) { - if (err) { - if (state.fail) self.currentState = state.fail; - else return done ? done.call(bindObject, err) : null; - } else { - if (state.accept) self.currentState = state.accept; - else return done ? done.call(bindObject) : null; - } - if (self.currentState === finalState) { - return done ? done.call(bindObject, err) : null; - } - - self.runTo(finalState, done, bindObject, err); - }); -}; - -AcceptorStateMachine.prototype.addState = function addState(name, acceptState, failState, fn) { - if (typeof acceptState === 'function') { - fn = acceptState; acceptState = null; failState = null; - } else if (typeof failState === 'function') { - fn = failState; failState = null; - } - - if (!this.currentState) this.currentState = name; - this.states[name] = { accept: acceptState, fail: failState, fn: fn }; - return this; -}; - -module.exports = AcceptorStateMachine; diff --git a/cli/node_modules/aws-sdk/lib/util.js b/cli/node_modules/aws-sdk/lib/util.js deleted file mode 100644 index aab4b2078..000000000 --- a/cli/node_modules/aws-sdk/lib/util.js +++ /dev/null @@ -1,774 +0,0 @@ -/* eslint guard-for-in:0 */ - -var cryptoLib = require('crypto'); -var Buffer = require('buffer').Buffer; -var AWS; - -/** - * A set of utility methods for use with the AWS SDK. - * - * @!attribute abort - * Return this value from an iterator function {each} or {arrayEach} - * to break out of the iteration. - * @example Breaking out of an iterator function - * AWS.util.each({a: 1, b: 2, c: 3}, function(key, value) { - * if (key == 'b') return AWS.util.abort; - * }); - * @see each - * @see arrayEach - * @api private - */ -var util = { - engine: function engine() { - if (util.isBrowser() && typeof navigator !== 'undefined') { - return navigator.userAgent; - } else { - return process.platform + '/' + process.version; - } - }, - - userAgent: function userAgent() { - var name = util.isBrowser() ? 'js' : 'nodejs'; - var agent = 'aws-sdk-' + name + '/' + require('./core').VERSION; - if (name === 'nodejs') agent += ' ' + util.engine(); - return agent; - }, - - isBrowser: function isBrowser() { return process && process.browser; }, - isNode: function isNode() { return !util.isBrowser(); }, - nodeRequire: function nodeRequire(module) { - if (util.isNode()) return require(module); - }, - multiRequire: function multiRequire(module1, module2) { - return require(util.isNode() ? module1 : module2); - }, - - uriEscape: function uriEscape(string) { - var output = encodeURIComponent(string); - output = output.replace(/[^A-Za-z0-9_.~\-%]+/g, escape); - - // AWS percent-encodes some extra non-standard characters in a URI - output = output.replace(/[*]/g, function(ch) { - return '%' + ch.charCodeAt(0).toString(16).toUpperCase(); - }); - - return output; - }, - - uriEscapePath: function uriEscapePath(string) { - var parts = []; - util.arrayEach(string.split('/'), function (part) { - parts.push(util.uriEscape(part)); - }); - return parts.join('/'); - }, - - urlParse: function urlParse(url) { - return require('url').parse(url); - }, - - urlFormat: function urlFormat(url) { - return require('url').format(url); - }, - - queryStringParse: function queryStringParse(qs) { - return require('querystring').parse(qs); - }, - - queryParamsToString: function queryParamsToString(params) { - var items = []; - var escape = util.uriEscape; - var sortedKeys = Object.keys(params).sort(); - - util.arrayEach(sortedKeys, function(name) { - var value = params[name]; - var ename = escape(name); - var result = ename + '='; - if (Array.isArray(value)) { - var vals = []; - util.arrayEach(value, function(item) { vals.push(escape(item)); }); - result = ename + '=' + vals.sort().join('&' + ename + '='); - } else if (value !== undefined && value !== null) { - result = ename + '=' + escape(value); - } - items.push(result); - }); - - return items.join('&'); - }, - - readFileSync: function readFileSync(path) { - if (typeof window !== 'undefined') return null; - return util.nodeRequire('fs').readFileSync(path, 'utf-8'); - }, - - base64: { - - encode: function encode64(string) { - return new Buffer(string).toString('base64'); - }, - - decode: function decode64(string) { - return new Buffer(string, 'base64'); - } - - }, - - Buffer: Buffer, - - buffer: { - toStream: function toStream(buffer) { - if (!util.Buffer.isBuffer(buffer)) buffer = new util.Buffer(buffer); - - var readable = new (util.nodeRequire('stream').Readable)(); - var pos = 0; - readable._read = function(size) { - if (pos >= buffer.length) return readable.push(null); - - var end = pos + size; - if (end > buffer.length) end = buffer.length; - readable.push(buffer.slice(pos, end)); - pos = end; - }; - - return readable; - }, - - /** - * Concatenates a list of Buffer objects. - */ - concat: function(buffers) { - var length = 0, - offset = 0, - buffer = null, i; - - for (i = 0; i < buffers.length; i++) { - length += buffers[i].length; - } - - buffer = new Buffer(length); - - for (i = 0; i < buffers.length; i++) { - buffers[i].copy(buffer, offset); - offset += buffers[i].length; - } - - return buffer; - } - }, - - string: { - byteLength: function byteLength(string) { - if (string === null || string === undefined) return 0; - if (typeof string === 'string') string = new Buffer(string); - - if (typeof string.byteLength === 'number') { - return string.byteLength; - } else if (typeof string.length === 'number') { - return string.length; - } else if (typeof string.size === 'number') { - return string.size; - } else if (typeof string.path === 'string') { - return util.nodeRequire('fs').lstatSync(string.path).size; - } else { - throw util.error(new Error('Cannot determine length of ' + string), - { object: string }); - } - }, - - upperFirst: function upperFirst(string) { - return string[0].toUpperCase() + string.substr(1); - }, - - lowerFirst: function lowerFirst(string) { - return string[0].toLowerCase() + string.substr(1); - } - }, - - ini: { - parse: function string(ini) { - var currentSection, map = {}; - util.arrayEach(ini.split(/\r?\n/), function(line) { - line = line.split(/(^|\s);/)[0]; // remove comments - var section = line.match(/^\s*\[([^\[\]]+)\]\s*$/); - if (section) { - currentSection = section[1]; - } else if (currentSection) { - var item = line.match(/^\s*(.+?)\s*=\s*(.+?)\s*$/); - if (item) { - map[currentSection] = map[currentSection] || {}; - map[currentSection][item[1]] = item[2]; - } - } - }); - - return map; - } - }, - - fn: { - noop: function() {}, - - /** - * Turn a synchronous function into as "async" function by making it call - * a callback. The underlying function is called with all but the last argument, - * which is treated as the callback. The callback is passed passed a first argument - * of null on success to mimick standard node callbacks. - */ - makeAsync: function makeAsync(fn, expectedArgs) { - if (expectedArgs && expectedArgs <= fn.length) { - return fn; - } - - return function() { - var args = Array.prototype.slice.call(arguments, 0); - var callback = args.pop(); - var result = fn.apply(null, args); - callback(result); - }; - } - }, - - jamespath: { - query: function query(expression, data) { - if (!data) return []; - - var results = []; - var expressions = expression.split(/\s+\|\|\s+/); - util.arrayEach.call(this, expressions, function (expr) { - var objects = [data]; - var tokens = expr.split('.'); - util.arrayEach.call(this, tokens, function (token) { - var match = token.match('^(.+?)(?:\\[(-?\\d+|\\*|)\\])?$'); - var newObjects = []; - util.arrayEach.call(this, objects, function (obj) { - if (match[1] === '*') { - util.arrayEach.call(this, obj, function (value) { - newObjects.push(value); - }); - } else if (obj.hasOwnProperty(match[1])) { - newObjects.push(obj[match[1]]); - } - }); - objects = newObjects; - - // handle indexing (token[0], token[-1]) - if (match[2] !== undefined) { - newObjects = []; - util.arrayEach.call(this, objects, function (obj) { - if (Array.isArray(obj)) { - if (match[2] === '*' || match[2] === '') { - newObjects = newObjects.concat(obj); - } else { - var idx = parseInt(match[2], 10); - if (idx < 0) idx = obj.length + idx; // negative indexing - newObjects.push(obj[idx]); - } - } - }); - objects = newObjects; - } - - if (objects.length === 0) return util.abort; - }); - - if (objects.length > 0) { - results = objects; - return util.abort; - } - }); - - return results; - }, - - find: function find(expression, data) { - return util.jamespath.query(expression, data)[0]; - } - }, - - /** - * Date and time utility functions. - */ - date: { - - /** - * @return [Date] the current JavaScript date object. Since all - * AWS services rely on this date object, you can override - * this function to provide a special time value to AWS service - * requests. - */ - getDate: function getDate() { - if (!AWS) AWS = require('./core'); - if (AWS.config.systemClockOffset) { // use offset when non-zero - return new Date(new Date().getTime() + AWS.config.systemClockOffset); - } else { - return new Date(); - } - }, - - /** - * @return [String] the date in ISO-8601 format - */ - iso8601: function iso8601(date) { - if (date === undefined) { date = util.date.getDate(); } - return date.toISOString().replace(/\.\d{3}Z$/, 'Z'); - }, - - /** - * @return [String] the date in RFC 822 format - */ - rfc822: function rfc822(date) { - if (date === undefined) { date = util.date.getDate(); } - return date.toUTCString(); - }, - - /** - * @return [Integer] the UNIX timestamp value for the current time - */ - unixTimestamp: function unixTimestamp(date) { - if (date === undefined) { date = util.date.getDate(); } - return date.getTime() / 1000; - }, - - /** - * @param [String,number,Date] date - * @return [Date] - */ - from: function format(date) { - if (typeof date === 'number') { - return new Date(date * 1000); // unix timestamp - } else { - return new Date(date); - } - }, - - /** - * Given a Date or date-like value, this function formats the - * date into a string of the requested value. - * @param [String,number,Date] date - * @param [String] formatter Valid formats are: - # * 'iso8601' - # * 'rfc822' - # * 'unixTimestamp' - * @return [String] - */ - format: function format(date, formatter) { - if (!formatter) formatter = 'iso8601'; - return util.date[formatter](util.date.from(date)); - }, - - parseTimestamp: function parseTimestamp(value) { - if (typeof value === 'number') { // unix timestamp (number) - return new Date(value * 1000); - } else if (value.match(/^\d+$/)) { // unix timestamp - return new Date(value * 1000); - } else if (value.match(/^\d{4}/)) { // iso8601 - return new Date(value); - } else if (value.match(/^\w{3},/)) { // rfc822 - return new Date(value); - } else { - throw util.error( - new Error('unhandled timestamp format: ' + value), - {code: 'TimestampParserError'}); - } - } - - }, - - crypto: { - crc32Table: [ - 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, - 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, - 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, - 0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, - 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856, - 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, - 0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4, - 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, - 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, - 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 0x26D930AC, 0x51DE003A, - 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, - 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, - 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190, - 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, - 0x9FBFE4A5, 0xE8B8D433, 0x7807C9A2, 0x0F00F934, 0x9609A88E, - 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, - 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, - 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950, - 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, - 0xFBD44C65, 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, - 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A, - 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5, - 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 0xBE0B1010, - 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, - 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, - 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6, - 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, - 0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, - 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, 0xF00F9344, - 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, - 0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, - 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, - 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, - 0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C, - 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, - 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, - 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE, - 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, - 0x2CD99E8B, 0x5BDEAE1D, 0x9B64C2B0, 0xEC63F226, 0x756AA39C, - 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, - 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, - 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242, - 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, - 0x18B74777, 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, - 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 0xA00AE278, - 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, - 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, - 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, - 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, - 0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, - 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, - 0x2D02EF8D], - - crc32: function crc32(data) { - var tbl = util.crypto.crc32Table; - var crc = 0 ^ -1; - - if (typeof data === 'string') { - data = new Buffer(data); - } - - for (var i = 0; i < data.length; i++) { - var code = data.readUInt8(i); - crc = (crc >>> 8) ^ tbl[(crc ^ code) & 0xFF]; - } - return (crc ^ -1) >>> 0; - }, - - hmac: function hmac(key, string, digest, fn) { - if (!digest) digest = 'binary'; - if (digest === 'buffer') { digest = undefined; } - if (!fn) fn = 'sha256'; - if (typeof string === 'string') string = new Buffer(string); - return cryptoLib.createHmac(fn, key).update(string).digest(digest); - }, - - md5: function md5(data, digest, callback) { - return util.crypto.hash('md5', data, digest, callback); - }, - - sha256: function sha256(data, digest, callback) { - return util.crypto.hash('sha256', data, digest, callback); - }, - - hash: function(algorithm, data, digest, callback) { - var hash = util.crypto.createHash(algorithm); - if (!digest) { digest = 'binary'; } - if (digest === 'buffer') { digest = undefined; } - if (typeof data === 'string') data = new Buffer(data); - var sliceFn = util.arraySliceFn(data); - var isBuffer = Buffer.isBuffer(data); - - if (callback && typeof data === 'object' && - typeof data.on === 'function' && !isBuffer) { - data.on('data', function(chunk) { hash.update(chunk); }); - data.on('error', function(err) { callback(err); }); - data.on('end', function() { callback(null, hash.digest(digest)); }); - } else if (callback && sliceFn && !isBuffer && - typeof FileReader !== 'undefined') { - // this might be a File/Blob - var index = 0, size = 1024 * 512; - var reader = new FileReader(); - reader.onerror = function() { - callback(new Error('Failed to read data.')); - }; - reader.onload = function() { - var buf = new Buffer(new Uint8Array(reader.result)); - hash.update(buf); - index += buf.length; - reader._continueReading(); - }; - reader._continueReading = function() { - if (index >= data.size) { - callback(null, hash.digest(digest)); - return; - } - - var back = index + size; - if (back > data.size) back = data.size; - reader.readAsArrayBuffer(sliceFn.call(data, index, back)); - }; - - reader._continueReading(); - } else { - if (util.isBrowser() && typeof data === 'object' && !isBuffer) { - data = new Buffer(new Uint8Array(data)); - } - var out = hash.update(data).digest(digest); - if (callback) callback(null, out); - return out; - } - }, - - toHex: function toHex(data) { - var out = []; - for (var i = 0; i < data.length; i++) { - out.push(('0' + data.charCodeAt(i).toString(16)).substr(-2, 2)); - } - return out.join(''); - }, - - createHash: function createHash(algorithm) { - return cryptoLib.createHash(algorithm); - } - - }, - - /** @!ignore */ - - /* Abort constant */ - abort: {}, - - each: function each(object, iterFunction) { - for (var key in object) { - if (object.hasOwnProperty(key)) { - var ret = iterFunction.call(this, key, object[key]); - if (ret === util.abort) break; - } - } - }, - - arrayEach: function arrayEach(array, iterFunction) { - for (var idx in array) { - if (array.hasOwnProperty(idx)) { - var ret = iterFunction.call(this, array[idx], parseInt(idx, 10)); - if (ret === util.abort) break; - } - } - }, - - update: function update(obj1, obj2) { - util.each(obj2, function iterator(key, item) { - obj1[key] = item; - }); - return obj1; - }, - - merge: function merge(obj1, obj2) { - return util.update(util.copy(obj1), obj2); - }, - - copy: function copy(object) { - if (object === null || object === undefined) return object; - var dupe = {}; - // jshint forin:false - for (var key in object) { - dupe[key] = object[key]; - } - return dupe; - }, - - isEmpty: function isEmpty(obj) { - for (var prop in obj) { - if (obj.hasOwnProperty(prop)) { - return false; - } - } - return true; - }, - - arraySliceFn: function arraySliceFn(obj) { - var fn = obj.slice || obj.webkitSlice || obj.mozSlice; - return typeof fn === 'function' ? fn : null; - }, - - isType: function isType(obj, type) { - // handle cross-"frame" objects - if (typeof type === 'function') type = util.typeName(type); - return Object.prototype.toString.call(obj) === '[object ' + type + ']'; - }, - - typeName: function typeName(type) { - if (type.hasOwnProperty('name')) return type.name; - var str = type.toString(); - var match = str.match(/^\s*function (.+)\(/); - return match ? match[1] : str; - }, - - error: function error(err, options) { - var originalError = null; - if (typeof err.message === 'string' && err.message !== '') { - if (typeof options === 'string' || (options && options.message)) { - originalError = util.copy(err); - originalError.message = err.message; - } - } - err.message = err.message || null; - - if (typeof options === 'string') { - err.message = options; - } else if (typeof options === 'object') { - util.update(err, options); - if (options.message) - err.message = options.message; - if (options.code || options.name) - err.code = options.code || options.name; - if (options.stack) - err.stack = options.stack; - } - - if (typeof Object.defineProperty === 'function') { - Object.defineProperty(err, 'name', {writable: true, enumerable: false}); - Object.defineProperty(err, 'message', {enumerable: true}); - } - - err.name = options && options.name || err.name || err.code || 'Error'; - err.time = new Date(); - - if (originalError) err.originalError = originalError; - - return err; - }, - - /** - * @api private - */ - inherit: function inherit(klass, features) { - var newObject = null; - if (features === undefined) { - features = klass; - klass = Object; - newObject = {}; - } else { - var ctor = function ConstructorWrapper() {}; - ctor.prototype = klass.prototype; - newObject = new ctor(); - } - - // constructor not supplied, create pass-through ctor - if (features.constructor === Object) { - features.constructor = function() { - if (klass !== Object) { - return klass.apply(this, arguments); - } - }; - } - - features.constructor.prototype = newObject; - util.update(features.constructor.prototype, features); - features.constructor.__super__ = klass; - return features.constructor; - }, - - /** - * @api private - */ - mixin: function mixin() { - var klass = arguments[0]; - for (var i = 1; i < arguments.length; i++) { - // jshint forin:false - for (var prop in arguments[i].prototype) { - var fn = arguments[i].prototype[prop]; - if (prop !== 'constructor') { - klass.prototype[prop] = fn; - } - } - } - return klass; - }, - - /** - * @api private - */ - hideProperties: function hideProperties(obj, props) { - if (typeof Object.defineProperty !== 'function') return; - - util.arrayEach(props, function (key) { - Object.defineProperty(obj, key, { - enumerable: false, writable: true, configurable: true }); - }); - }, - - /** - * @api private - */ - property: function property(obj, name, value, enumerable, isValue) { - var opts = { - configurable: true, - enumerable: enumerable !== undefined ? enumerable : true - }; - if (typeof value === 'function' && !isValue) { - opts.get = value; - } - else { - opts.value = value; opts.writable = true; - } - - Object.defineProperty(obj, name, opts); - }, - - /** - * @api private - */ - memoizedProperty: function memoizedProperty(obj, name, get, enumerable) { - var cachedValue = null; - - // build enumerable attribute for each value with lazy accessor. - util.property(obj, name, function() { - if (cachedValue === null) { - cachedValue = get(); - } - return cachedValue; - }, enumerable); - }, - - /** - * TODO Remove in major version revision - * This backfill populates response data without the - * top-level payload name. - * - * @api private - */ - hoistPayloadMember: function hoistPayloadMember(resp) { - var req = resp.request; - var operation = req.operation; - var output = req.service.api.operations[operation].output; - if (output.payload) { - var payloadMember = output.members[output.payload]; - var responsePayload = resp.data[output.payload]; - if (payloadMember.type === 'structure') { - util.each(responsePayload, function(key, value) { - util.property(resp.data, key, value, false); - }); - } - } - }, - - /** - * Compute SHA-256 checksums of streams - * - * @api private - */ - computeSha256: function computeSha256(body, done) { - if (util.isNode()) { - var Stream = util.nodeRequire('stream').Stream; - var fs = util.nodeRequire('fs'); - if (body instanceof Stream) { - if (typeof body.path === 'string') { // assume file object - body = fs.createReadStream(body.path); - } else { // TODO support other stream types - return done(new Error('Non-file stream objects are ' + - 'not supported with SigV4')); - } - } - } - - util.crypto.sha256(body, 'hex', function(err, sha) { - if (err) done(err); - else done(null, sha); - }); - } - -}; - -module.exports = util; diff --git a/cli/node_modules/aws-sdk/lib/xml/browser_parser.js b/cli/node_modules/aws-sdk/lib/xml/browser_parser.js deleted file mode 100644 index 59e59b9c2..000000000 --- a/cli/node_modules/aws-sdk/lib/xml/browser_parser.js +++ /dev/null @@ -1,167 +0,0 @@ -var util = require('../util'); -var Shape = require('../model/shape'); - -function DomXmlParser() { } - -DomXmlParser.prototype.parse = function(xml, shape) { - if (xml.replace(/^\s+/, '') === '') return {}; - - var result, error; - try { - if (window.DOMParser) { - try { - var parser = new DOMParser(); - result = parser.parseFromString(xml, 'text/xml'); - } catch (syntaxError) { - throw util.error(new Error('Parse error in document'), - {originalError: syntaxError}); - } - - if (result.documentElement === null) { - throw new Error('Cannot parse empty document.'); - } - - var isError = result.getElementsByTagName('parsererror')[0]; - if (isError && (isError.parentNode === result || - isError.parentNode.nodeName === 'body')) { - throw new Error(isError.getElementsByTagName('div')[0].textContent); - } - } else if (window.ActiveXObject) { - result = new window.ActiveXObject('Microsoft.XMLDOM'); - result.async = false; - - if (!result.loadXML(xml)) { - throw new Error('Parse error in document'); - } - } else { - throw new Error('Cannot load XML parser'); - } - } catch (e) { - error = e; - } - - if (result && result.documentElement && !error) { - var data = parseXml(result.documentElement, shape); - var metadata = result.getElementsByTagName('ResponseMetadata')[0]; - if (metadata) { - data.ResponseMetadata = parseXml(metadata, {}); - } - return data; - } else if (error) { - throw util.error(error || new Error(), {code: 'XMLParserError'}); - } else { // empty xml document - return {}; - } -}; - -function parseXml(xml, shape) { - if (!shape) shape = {}; - switch (shape.type) { - case 'structure': return parseStructure(xml, shape); - case 'map': return parseMap(xml, shape); - case 'list': return parseList(xml, shape); - case undefined: case null: return parseUnknown(xml); - default: return parseScalar(xml, shape); - } -} - -function parseStructure(xml, shape) { - var data = {}; - if (xml === null) return data; - - util.each(shape.members, function(memberName, memberShape) { - if (memberShape.isXmlAttribute) { - if (xml.attributes.hasOwnProperty(memberShape.name)) { - var value = xml.attributes[memberShape.name].value; - data[memberName] = parseXml({textContent: value}, memberShape); - } - } else { - var xmlChild = memberShape.flattened ? xml : - xml.getElementsByTagName(memberShape.name)[0]; - if (xmlChild) { - data[memberName] = parseXml(xmlChild, memberShape); - } else if (!memberShape.flattened && memberShape.type === 'list') { - data[memberName] = memberShape.defaultValue; - } - } - }); - - return data; -} - -function parseMap(xml, shape) { - var data = {}; - var xmlKey = shape.key.name || 'key'; - var xmlValue = shape.value.name || 'value'; - var tagName = shape.flattened ? shape.name : 'entry'; - - var child = xml.firstElementChild; - while (child) { - if (child.nodeName === tagName) { - var key = child.getElementsByTagName(xmlKey)[0].textContent; - var value = child.getElementsByTagName(xmlValue)[0]; - data[key] = parseXml(value, shape.value); - } - child = child.nextElementSibling; - } - return data; -} - -function parseList(xml, shape) { - var data = []; - var tagName = shape.flattened ? shape.name : (shape.member.name || 'member'); - - var child = xml.firstElementChild; - while (child) { - if (child.nodeName === tagName) { - data.push(parseXml(child, shape.member)); - } - child = child.nextElementSibling; - } - return data; -} - -function parseScalar(xml, shape) { - if (xml.getAttribute) { - var encoding = xml.getAttribute('encoding'); - if (encoding === 'base64') { - shape = new Shape.create({type: encoding}); - } - } - - var text = xml.textContent; - if (text === '') text = null; - if (typeof shape.toType === 'function') { - return shape.toType(text); - } else { - return text; - } -} - -function parseUnknown(xml) { - if (xml === undefined || xml === null) return ''; - - // empty object - if (!xml.firstElementChild) { - if (xml.parentNode.parentNode === null) return {}; - if (xml.childNodes.length === 0) return ''; - else return xml.textContent; - } - - // object, parse as structure - var shape = {type: 'structure', members: {}}; - var child = xml.firstElementChild; - while (child) { - var tag = child.nodeName; - if (shape.members.hasOwnProperty(tag)) { - // multiple tags of the same name makes it a list - shape.members[tag].type = 'list'; - } else { - shape.members[tag] = {name: tag}; - } - child = child.nextElementSibling; - } - return parseStructure(xml, shape); -} - -module.exports = DomXmlParser; diff --git a/cli/node_modules/aws-sdk/lib/xml/builder.js b/cli/node_modules/aws-sdk/lib/xml/builder.js deleted file mode 100644 index 400deeb19..000000000 --- a/cli/node_modules/aws-sdk/lib/xml/builder.js +++ /dev/null @@ -1,86 +0,0 @@ -var util = require('../util'); -var builder = require('xmlbuilder'); - -function XmlBuilder() { } - -XmlBuilder.prototype.toXML = function(params, shape, rootElement, noEmpty) { - var xml = builder.create(rootElement); - applyNamespaces(xml, shape); - serialize(xml, params, shape); - return xml.children.length > 0 || noEmpty ? xml.root().toString() : ''; -}; - -function serialize(xml, value, shape) { - switch (shape.type) { - case 'structure': return serializeStructure(xml, value, shape); - case 'map': return serializeMap(xml, value, shape); - case 'list': return serializeList(xml, value, shape); - default: return serializeScalar(xml, value, shape); - } -} - -function serializeStructure(xml, params, shape) { - util.arrayEach(shape.memberNames, function(memberName) { - var memberShape = shape.members[memberName]; - if (memberShape.location !== 'body') return; - - var value = params[memberName]; - var name = memberShape.name; - if (value !== undefined && value !== null) { - if (memberShape.isXmlAttribute) { - xml.att(name, value); - } else if (memberShape.flattened) { - serialize(xml, value, memberShape); - } else { - var element = xml.ele(name); - applyNamespaces(element, memberShape); - serialize(element, value, memberShape); - } - } - }); -} - -function serializeMap(xml, map, shape) { - var xmlKey = shape.key.name || 'key'; - var xmlValue = shape.value.name || 'value'; - - util.each(map, function(key, value) { - var entry = xml.ele(shape.flattened ? shape.name : 'entry'); - serialize(entry.ele(xmlKey), key, shape.key); - serialize(entry.ele(xmlValue), value, shape.value); - }); -} - -function serializeList(xml, list, shape) { - if (shape.flattened) { - util.arrayEach(list, function(value) { - var name = shape.member.name || shape.name; - var element = xml.ele(name); - serialize(element, value, shape.member); - }); - } else { - util.arrayEach(list, function(value) { - var name = shape.member.name || 'member'; - var element = xml.ele(name); - serialize(element, value, shape.member); - }); - } -} - -function serializeScalar(xml, value, shape) { - xml.txt(shape.toWireFormat(value)); -} - -function applyNamespaces(xml, shape) { - var uri, prefix = 'xmlns'; - if (shape.xmlNamespaceUri) { - uri = shape.xmlNamespaceUri; - if (shape.xmlNamespacePrefix) prefix += ':' + shape.xmlNamespacePrefix; - } else if (xml.isRoot && shape.api.xmlNamespaceUri) { - uri = shape.api.xmlNamespaceUri; - } - - if (uri) xml.att(prefix, uri); -} - -module.exports = XmlBuilder; diff --git a/cli/node_modules/aws-sdk/lib/xml/node_parser.js b/cli/node_modules/aws-sdk/lib/xml/node_parser.js deleted file mode 100644 index b92cb71a9..000000000 --- a/cli/node_modules/aws-sdk/lib/xml/node_parser.js +++ /dev/null @@ -1,159 +0,0 @@ -var util = require('../util'); -var Shape = require('../model/shape'); - -var xml2js = require('xml2js'); - -/** - * @api private - */ -var options = { // options passed to xml2js parser - explicitCharkey: false, // undocumented - trim: false, // trim the leading/trailing whitespace from text nodes - normalize: false, // trim interior whitespace inside text nodes - explicitRoot: false, // return the root node in the resulting object? - emptyTag: null, // the default value for empty nodes - explicitArray: true, // always put child nodes in an array - ignoreAttrs: false, // ignore attributes, only create text nodes - mergeAttrs: false, // merge attributes and child elements - validator: null // a callable validator -}; - -function NodeXmlParser() { } - -NodeXmlParser.prototype.parse = function(xml, shape) { - shape = shape || {}; - - var result = null; - var error = null; - - var parser = new xml2js.Parser(options); - parser.parseString(xml, function (e, r) { - error = e; - result = r; - }); - - if (result) { - var data = parseXml(result, shape); - if (result.ResponseMetadata) { - data.ResponseMetadata = parseXml(result.ResponseMetadata[0], {}); - } - return data; - } else if (error) { - throw util.error(error, {code: 'XMLParserError'}); - } else { // empty xml document - return parseXml({}, shape); - } -}; - -function parseXml(xml, shape) { - switch (shape.type) { - case 'structure': return parseStructure(xml, shape); - case 'map': return parseMap(xml, shape); - case 'list': return parseList(xml, shape); - case undefined: case null: return parseUnknown(xml); - default: return parseScalar(xml, shape); - } -} - -function parseStructure(xml, shape) { - var data = {}; - if (xml === null) return data; - - util.each(shape.members, function(memberName, memberShape) { - var xmlName = memberShape.name; - if (xml.hasOwnProperty(xmlName) && Array.isArray(xml[xmlName])) { - var xmlChild = xml[xmlName]; - if (!memberShape.flattened) xmlChild = xmlChild[0]; - - data[memberName] = parseXml(xmlChild, memberShape); - } else if (memberShape.isXmlAttribute && - xml.$ && xml.$.hasOwnProperty(xmlName)) { - data[memberName] = parseScalar(xml.$[xmlName], memberShape); - } else if (memberShape.type === 'list') { - data[memberName] = memberShape.defaultValue; - } - }); - - return data; -} - -function parseMap(xml, shape) { - var data = {}; - if (xml === null) return data; - - var xmlKey = shape.key.name || 'key'; - var xmlValue = shape.value.name || 'value'; - var iterable = shape.flattened ? xml : xml.entry; - - if (Array.isArray(iterable)) { - util.arrayEach(iterable, function(child) { - data[child[xmlKey][0]] = parseXml(child[xmlValue][0], shape.value); - }); - } - - return data; -} - -function parseList(xml, shape) { - var data = []; - var name = shape.member.name || 'member'; - if (shape.flattened) { - util.arrayEach(xml, function(xmlChild) { - data.push(parseXml(xmlChild, shape.member)); - }); - } else if (xml && Array.isArray(xml[name])) { - util.arrayEach(xml[name], function(child) { - data.push(parseXml(child, shape.member)); - }); - } - - return data; -} - -function parseScalar(text, shape) { - if (text && text.$ && text.$.encoding === 'base64') { - shape = new Shape.create({type: text.$.encoding}); - } - if (text && text._) text = text._; - - if (typeof shape.toType === 'function') { - return shape.toType(text); - } else { - return text; - } -} - -function parseUnknown(xml) { - if (xml === undefined || xml === null) return ''; - if (typeof xml === 'string') return xml; - - // parse a list - if (Array.isArray(xml)) { - var arr = []; - for (i = 0; i < xml.length; i++) { - arr.push(parseXml(xml[i], {})); - } - return arr; - } - - // empty object - var keys = Object.keys(xml), i; - if (keys.length === 0 || keys === ['$']) { - return {}; - } - - // object, parse as structure - var data = {}; - for (i = 0; i < keys.length; i++) { - var key = keys[i], value = xml[key]; - if (key === '$') continue; - if (value.length > 1) { // this member is a list - data[key] = parseList(value, {member: {}}); - } else { // this member is a single item - data[key] = parseXml(value[0], {}); - } - } - return data; -} - -module.exports = NodeXmlParser; diff --git a/cli/node_modules/aws-sdk/node_modules/sax/AUTHORS b/cli/node_modules/aws-sdk/node_modules/sax/AUTHORS deleted file mode 100644 index 7145cbcd9..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/AUTHORS +++ /dev/null @@ -1,10 +0,0 @@ -# contributors sorted by whether or not they're me. -Isaac Z. Schlueter -Stein Martin Hustad -Mikeal Rogers -Laurie Harper -Jann Horn -Elijah Insua -Henry Rawas -Justin Makeig -Mike Schilling diff --git a/cli/node_modules/aws-sdk/node_modules/sax/LICENSE b/cli/node_modules/aws-sdk/node_modules/sax/LICENSE deleted file mode 100644 index 62e4ccf91..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/LICENSE +++ /dev/null @@ -1,32 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -The file "examples/strict.dtd" is licensed by the W3C and used according -to the terms of the W3C SOFTWARE NOTICE AND LICENSE. See LICENSE-W3C.html -for details. diff --git a/cli/node_modules/aws-sdk/node_modules/sax/LICENSE-W3C.html b/cli/node_modules/aws-sdk/node_modules/sax/LICENSE-W3C.html deleted file mode 100644 index a611e3f90..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/LICENSE-W3C.html +++ /dev/null @@ -1,188 +0,0 @@ - -W3C Software Notice and License
- - - -
-

- W3C - -

- -
- - - -
-
- -
- - -
-
- -
- - -
-
-
- -
-
-

W3C Software Notice and License

-
-
-

This work (and included software, documentation such as READMEs, or other -related items) is being provided by the copyright holders under the following -license.

-

License

- -

-By obtaining, using and/or copying this work, you (the licensee) -agree that you have read, understood, and will comply with the following -terms and conditions.

- -

Permission to copy, modify, and distribute this software and its -documentation, with or without modification, for any purpose and without -fee or royalty is hereby granted, provided that you include the following on -ALL copies of the software and documentation or portions thereof, including -modifications:

- -
  • The full text of this NOTICE in a location viewable to users of the - redistributed or derivative work.
  • Any pre-existing intellectual property disclaimers, notices, or terms - and conditions. If none exist, the W3C Software Short - Notice should be included (hypertext is preferred, text is permitted) - within the body of any redistributed or derivative code.
  • Notice of any changes or modifications to the files, including the date - changes were made. (We recommend you provide URIs to the location from - which the code is derived.)
- -

Disclaimers

- -

THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS -MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR -PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE -ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.

- -

COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR -DOCUMENTATION.

- -

The name and trademarks of copyright holders may NOT be used in -advertising or publicity pertaining to the software without specific, written -prior permission. Title to copyright in this software and any associated -documentation will at all times remain with copyright holders.

- -

Notes

- -

This version: http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231

- -

This formulation of W3C's notice and license became active on December 31 -2002. This version removes the copyright ownership notice such that this -license can be used with materials other than those owned by the W3C, -reflects that ERCIM is now a host of the W3C, includes references to this -specific dated version of the license, and removes the ambiguous grant of -"use". Otherwise, this version is the same as the previous -version and is written so as to preserve the Free -Software Foundation's assessment of GPL compatibility and OSI's certification -under the Open Source -Definition.

-
-
-
-
- - - -
- -
diff --git a/cli/node_modules/aws-sdk/node_modules/sax/README.md b/cli/node_modules/aws-sdk/node_modules/sax/README.md deleted file mode 100644 index c9652420c..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/README.md +++ /dev/null @@ -1,216 +0,0 @@ -# sax js - -A sax-style parser for XML and HTML. - -Designed with [node](http://nodejs.org/) in mind, but should work fine in -the browser or other CommonJS implementations. - -## What This Is - -* A very simple tool to parse through an XML string. -* A stepping stone to a streaming HTML parser. -* A handy way to deal with RSS and other mostly-ok-but-kinda-broken XML - docs. - -## What This Is (probably) Not - -* An HTML Parser - That's a fine goal, but this isn't it. It's just - XML. -* A DOM Builder - You can use it to build an object model out of XML, - but it doesn't do that out of the box. -* XSLT - No DOM = no querying. -* 100% Compliant with (some other SAX implementation) - Most SAX - implementations are in Java and do a lot more than this does. -* An XML Validator - It does a little validation when in strict mode, but - not much. -* A Schema-Aware XSD Thing - Schemas are an exercise in fetishistic - masochism. -* A DTD-aware Thing - Fetching DTDs is a much bigger job. - -## Regarding `Hello, world!').close(); - - // stream usage - // takes the same options as the parser - var saxStream = require("sax").createStream(strict, options) - saxStream.on("error", function (e) { - // unhandled errors will throw, since this is a proper node - // event emitter. - console.error("error!", e) - // clear the error - this._parser.error = null - this._parser.resume() - }) - saxStream.on("opentag", function (node) { - // same object as above - }) - // pipe is supported, and it's readable/writable - // same chunks coming in also go out. - fs.createReadStream("file.xml") - .pipe(saxStream) - .pipe(fs.createWriteStream("file-copy.xml")) - - - -## Arguments - -Pass the following arguments to the parser function. All are optional. - -`strict` - Boolean. Whether or not to be a jerk. Default: `false`. - -`opt` - Object bag of settings regarding string formatting. All default to `false`. - -Settings supported: - -* `trim` - Boolean. Whether or not to trim text and comment nodes. -* `normalize` - Boolean. If true, then turn any whitespace into a single - space. -* `lowercase` - Boolean. If true, then lowercase tag names and attribute names - in loose mode, rather than uppercasing them. -* `xmlns` - Boolean. If true, then namespaces are supported. -* `position` - Boolean. If false, then don't track line/col/position. - -## Methods - -`write` - Write bytes onto the stream. You don't have to do this all at -once. You can keep writing as much as you want. - -`close` - Close the stream. Once closed, no more data may be written until -it is done processing the buffer, which is signaled by the `end` event. - -`resume` - To gracefully handle errors, assign a listener to the `error` -event. Then, when the error is taken care of, you can call `resume` to -continue parsing. Otherwise, the parser will not continue while in an error -state. - -## Members - -At all times, the parser object will have the following members: - -`line`, `column`, `position` - Indications of the position in the XML -document where the parser currently is looking. - -`startTagPosition` - Indicates the position where the current tag starts. - -`closed` - Boolean indicating whether or not the parser can be written to. -If it's `true`, then wait for the `ready` event to write again. - -`strict` - Boolean indicating whether or not the parser is a jerk. - -`opt` - Any options passed into the constructor. - -`tag` - The current tag being dealt with. - -And a bunch of other stuff that you probably shouldn't touch. - -## Events - -All events emit with a single argument. To listen to an event, assign a -function to `on`. Functions get executed in the this-context of -the parser object. The list of supported events are also in the exported -`EVENTS` array. - -When using the stream interface, assign handlers using the EventEmitter -`on` function in the normal fashion. - -`error` - Indication that something bad happened. The error will be hanging -out on `parser.error`, and must be deleted before parsing can continue. By -listening to this event, you can keep an eye on that kind of stuff. Note: -this happens *much* more in strict mode. Argument: instance of `Error`. - -`text` - Text node. Argument: string of text. - -`doctype` - The ``. Argument: -object with `name` and `body` members. Attributes are not parsed, as -processing instructions have implementation dependent semantics. - -`sgmldeclaration` - Random SGML declarations. Stuff like `` -would trigger this kind of event. This is a weird thing to support, so it -might go away at some point. SAX isn't intended to be used to parse SGML, -after all. - -`opentag` - An opening tag. Argument: object with `name` and `attributes`. -In non-strict mode, tag names are uppercased, unless the `lowercase` -option is set. If the `xmlns` option is set, then it will contain -namespace binding information on the `ns` member, and will have a -`local`, `prefix`, and `uri` member. - -`closetag` - A closing tag. In loose mode, tags are auto-closed if their -parent closes. In strict mode, well-formedness is enforced. Note that -self-closing tags will have `closeTag` emitted immediately after `openTag`. -Argument: tag name. - -`attribute` - An attribute node. Argument: object with `name` and `value`. -In non-strict mode, attribute names are uppercased, unless the `lowercase` -option is set. If the `xmlns` option is set, it will also contains namespace -information. - -`comment` - A comment node. Argument: the string of the comment. - -`opencdata` - The opening tag of a ``) of a `` tags trigger a `"script"` -event, and their contents are not checked for special xml characters. -If you pass `noscript: true`, then this behavior is suppressed. - -## Reporting Problems - -It's best to write a failing test if you find an issue. I will always -accept pull requests with failing tests if they demonstrate intended -behavior, but it is very hard to figure out what issue you're describing -without a test. Writing a test is also the best way for you yourself -to figure out if you really understand the issue you think you have with -sax-js. diff --git a/cli/node_modules/aws-sdk/node_modules/sax/component.json b/cli/node_modules/aws-sdk/node_modules/sax/component.json deleted file mode 100644 index 96b5d731d..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/component.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "sax", - "description": "An evented streaming XML parser in JavaScript", - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "version": "0.5.2", - "main": "lib/sax.js", - "license": "BSD", - "scripts": [ - "lib/sax.js" - ], - "repository": "git://github.com/isaacs/sax-js.git" -} diff --git a/cli/node_modules/aws-sdk/node_modules/sax/examples/big-not-pretty.xml b/cli/node_modules/aws-sdk/node_modules/sax/examples/big-not-pretty.xml deleted file mode 100644 index fb5265dde..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/examples/big-not-pretty.xml +++ /dev/null @@ -1,8002 +0,0 @@ - - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - - something blerm a bit down here - diff --git a/cli/node_modules/aws-sdk/node_modules/sax/examples/example.js b/cli/node_modules/aws-sdk/node_modules/sax/examples/example.js deleted file mode 100644 index 7b0246e9a..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/examples/example.js +++ /dev/null @@ -1,29 +0,0 @@ - -var fs = require("fs"), - util = require("util"), - path = require("path"), - xml = fs.readFileSync(path.join(__dirname, "test.xml"), "utf8"), - sax = require("../lib/sax"), - strict = sax.parser(true), - loose = sax.parser(false, {trim:true}), - inspector = function (ev) { return function (data) { - console.error("%s %s %j", this.line+":"+this.column, ev, data); - }}; - -sax.EVENTS.forEach(function (ev) { - loose["on"+ev] = inspector(ev); -}); -loose.onend = function () { - console.error("end"); - console.error(loose); -}; - -// do this in random bits at a time to verify that it works. -(function () { - if (xml) { - var c = Math.ceil(Math.random() * 1000) - loose.write(xml.substr(0,c)); - xml = xml.substr(c); - process.nextTick(arguments.callee); - } else loose.close(); -})(); diff --git a/cli/node_modules/aws-sdk/node_modules/sax/examples/get-products.js b/cli/node_modules/aws-sdk/node_modules/sax/examples/get-products.js deleted file mode 100644 index 9e8d74aac..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/examples/get-products.js +++ /dev/null @@ -1,58 +0,0 @@ -// pull out /GeneralSearchResponse/categories/category/items/product tags -// the rest we don't care about. - -var sax = require("../lib/sax.js") -var fs = require("fs") -var path = require("path") -var xmlFile = path.resolve(__dirname, "shopping.xml") -var util = require("util") -var http = require("http") - -fs.readFile(xmlFile, function (er, d) { - http.createServer(function (req, res) { - if (er) throw er - var xmlstr = d.toString("utf8") - - var parser = sax.parser(true) - var products = [] - var product = null - var currentTag = null - - parser.onclosetag = function (tagName) { - if (tagName === "product") { - products.push(product) - currentTag = product = null - return - } - if (currentTag && currentTag.parent) { - var p = currentTag.parent - delete currentTag.parent - currentTag = p - } - } - - parser.onopentag = function (tag) { - if (tag.name !== "product" && !product) return - if (tag.name === "product") { - product = tag - } - tag.parent = currentTag - tag.children = [] - tag.parent && tag.parent.children.push(tag) - currentTag = tag - } - - parser.ontext = function (text) { - if (currentTag) currentTag.children.push(text) - } - - parser.onend = function () { - var out = util.inspect(products, false, 3, true) - res.writeHead(200, {"content-type":"application/json"}) - res.end("{\"ok\":true}") - // res.end(JSON.stringify(products)) - } - - parser.write(xmlstr).end() - }).listen(1337) -}) diff --git a/cli/node_modules/aws-sdk/node_modules/sax/examples/hello-world.js b/cli/node_modules/aws-sdk/node_modules/sax/examples/hello-world.js deleted file mode 100644 index cbfa5184e..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/examples/hello-world.js +++ /dev/null @@ -1,4 +0,0 @@ -require("http").createServer(function (req, res) { - res.writeHead(200, {"content-type":"application/json"}) - res.end(JSON.stringify({ok: true})) -}).listen(1337) diff --git a/cli/node_modules/aws-sdk/node_modules/sax/examples/not-pretty.xml b/cli/node_modules/aws-sdk/node_modules/sax/examples/not-pretty.xml deleted file mode 100644 index 9592852d0..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/examples/not-pretty.xml +++ /dev/null @@ -1,8 +0,0 @@ - - something blerm a bit down here diff --git a/cli/node_modules/aws-sdk/node_modules/sax/examples/pretty-print.js b/cli/node_modules/aws-sdk/node_modules/sax/examples/pretty-print.js deleted file mode 100644 index cd6aca9e1..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/examples/pretty-print.js +++ /dev/null @@ -1,74 +0,0 @@ -var sax = require("../lib/sax") - , printer = sax.createStream(false, {lowercasetags:true, trim:true}) - , fs = require("fs") - -function entity (str) { - return str.replace('"', '"') -} - -printer.tabstop = 2 -printer.level = 0 -printer.indent = function () { - print("\n") - for (var i = this.level; i > 0; i --) { - for (var j = this.tabstop; j > 0; j --) { - print(" ") - } - } -} -printer.on("opentag", function (tag) { - this.indent() - this.level ++ - print("<"+tag.name) - for (var i in tag.attributes) { - print(" "+i+"=\""+entity(tag.attributes[i])+"\"") - } - print(">") -}) - -printer.on("text", ontext) -printer.on("doctype", ontext) -function ontext (text) { - this.indent() - print(text) -} - -printer.on("closetag", function (tag) { - this.level -- - this.indent() - print("") -}) - -printer.on("cdata", function (data) { - this.indent() - print("") -}) - -printer.on("comment", function (comment) { - this.indent() - print("") -}) - -printer.on("error", function (error) { - console.error(error) - throw error -}) - -if (!process.argv[2]) { - throw new Error("Please provide an xml file to prettify\n"+ - "TODO: read from stdin or take a file") -} -var xmlfile = require("path").join(process.cwd(), process.argv[2]) -var fstr = fs.createReadStream(xmlfile, { encoding: "utf8" }) - -function print (c) { - if (!process.stdout.write(c)) { - fstr.pause() - } -} - -process.stdout.on("drain", function () { - fstr.resume() -}) - -fstr.pipe(printer) diff --git a/cli/node_modules/aws-sdk/node_modules/sax/examples/shopping.xml b/cli/node_modules/aws-sdk/node_modules/sax/examples/shopping.xml deleted file mode 100644 index 223c6c665..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/examples/shopping.xml +++ /dev/null @@ -1,2 +0,0 @@ - -sandbox3.1 r31.Kadu4DC.phase357782011.10.06 15:37:23 PSTp2.a121bc2aaf029435dce62011-10-21T18:38:45.982-04:00P0Y0M0DT0H0M0.169S1112You are currently using the SDC API sandbox environment! No clicks to merchant URLs from this response will be paid. Please change the host of your API requests to 'publisher.api.shopping.com' when you have finished development and testinghttp://statTest.dealtime.com/pixel/noscript?PV_EvnTyp=APPV&APPV_APITSP=10%2F21%2F11_06%3A38%3A45_PM&APPV_DSPRQSID=p2.a121bc2aaf029435dce6&APPV_IMGURL=http://img.shopping.com/sc/glb/sdc_logo_106x19.gif&APPV_LI_LNKINID=7000610&APPV_LI_SBMKYW=nikon&APPV_MTCTYP=1000&APPV_PRTID=2002&APPV_BrnID=14804http://www.shopping.com/digital-cameras/productsDigital CamerasDigital CamerasElectronicshttp://www.shopping.com/xCH-electronics-nikon~linkin_id-7000610?oq=nikonCameras and Photographyhttp://www.shopping.com/xCH-cameras_and_photography-nikon~linkin_id-7000610?oq=nikonDigital Camerashttp://www.shopping.com/digital-cameras/nikon/products?oq=nikon&linkin_id=7000610nikonnikonDigital Camerashttp://www.shopping.com/digital-cameras/nikon/products?oq=nikon&linkin_id=7000610Nikon D3100 Digital Camera14.2 Megapixel, SLR Camera, 3 in. LCD Screen, With High Definition Video, Weight: 1 lb.The Nikon D3100 digital SLR camera speaks to the growing ranks of enthusiastic D-SLR users and aspiring photographers by providing an easy-to-use and affordable entrance to the world of Nikon D-SLR’s. The 14.2-megapixel D3100 has powerful features, such as the enhanced Guide Mode that makes it easy to unleash creative potential and capture memories with still images and full HD video. Like having a personal photo tutor at your fingertips, this unique feature provides a simple graphical interface on the camera’s LCD that guides users by suggesting and/or adjusting camera settings to achieve the desired end result images. The D3100 is also the world’s first D-SLR to introduce full time auto focus (AF) in Live View and D-Movie mode to effortlessly achieve the critical focus needed when shooting Full HD 1080p video.http://di1.shopping.com/images/pi/93/bc/04/101677489-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=1http://di1.shopping.com/images/pi/93/bc/04/101677489-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=1http://di1.shopping.com/images/pi/93/bc/04/101677489-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=1http://di1.shopping.com/images/pi/93/bc/04/101677489-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=1http://di1.shopping.com/images/pi/93/bc/04/101677489-606x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=194.56http://img.shopping.com/sc/pr/sdc_stars_sm_4.5.gifhttp://www.shopping.com/Nikon-D3100/reviews~linkin_id-7000610429.001360.00http://www.shopping.com/Nikon-D3100/prices~linkin_id-7000610http://www.shopping.com/Nikon-D3100/info~linkin_id-7000610Nikon D3100 Digital SLR Camera with 18-55mm NIKKOR VR LensThe Nikon D3100 Digital SLR Camera is an affordable compact and lightweight photographic power-house. It features the all-purpose 18-55mm VR lens a high-resolution 14.2 MP CMOS sensor along with a feature set that's comprehensive yet easy to navigate - the intuitive onboard learn-as-you grow guide mode allows the photographer to understand what the 3100 can do quickly and easily. Capture beautiful pictures and amazing Full HD 1080p movies with sound and full-time autofocus. Availabilty: In Stock!7185Nikonhttp://di102.shopping.com/images/di/2d/5a/57/36424d5a717a366662532d61554c7767615f67-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di102.shopping.com/images/di/2d/5a/57/36424d5a717a366662532d61554c7767615f67-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di102.shopping.com/images/di/2d/5a/57/36424d5a717a366662532d61554c7767615f67-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di102.shopping.com/images/di/2d/5a/57/36424d5a717a366662532d61554c7767615f67-350x350-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1in-stockFree Shipping with Any Purchase!529.000.00799.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=647&BEFID=7185&aon=%5E1&MerchantID=475674&crawler_id=475674&dealId=-ZW6BMZqz6fbS-aULwga_g%3D%3D&url=http%3A%2F%2Fwww.fumfie.com%2Fproduct%2F343.5%2Fshopping-com%3F&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D3100+Digital+SLR+Camera+with+18-55mm+NIKKOR+VR+Lens&dlprc=529.0&crn=&istrsmrc=1&isathrsl=0&AR=1&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=101677489&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=1&cid=&semid1=&semid2=&IsLps=0&CC=1&SL=1&FS=1&code=&acode=658&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=FumFiehttp://img.shopping.com/cctool/merch_logos/475674.gif866 666 91985604.27http://img.shopping.com/sc/mr/sdc_checks_45.gifhttp://www.shopping.com/xMR-store_fumfie~MRD-475674~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUSF343C5Nikon Nikon D3100 14.2MP Digital SLR Camera with 18-55mm f/3.5-5.6 AF-S DX VR, CamerasNikon D3100 14.2MP Digital SLR Camera with 18-55mm f/3.5-5.6 AF-S DX VR7185Nikonhttp://di109.shopping.com/images/di/6d/64/31/65396c443876644f7534464851664a714b6e67-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di109.shopping.com/images/di/6d/64/31/65396c443876644f7534464851664a714b6e67-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di109.shopping.com/images/di/6d/64/31/65396c443876644f7534464851664a714b6e67-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di109.shopping.com/images/di/6d/64/31/65396c443876644f7534464851664a714b6e67-385x352-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2in-stock549.000.00549.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=779&BEFID=7185&aon=%5E1&MerchantID=305814&crawler_id=305814&dealId=md1e9lD8vdOu4FHQfJqKng%3D%3D&url=http%3A%2F%2Fwww.electronics-expo.com%2Findex.php%3Fpage%3Ditem%26id%3DNIKD3100%26source%3DSideCar%26scpid%3D8%26scid%3Dscsho318727%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+Nikon+D3100+14.2MP+Digital+SLR+Camera+with+18-55mm+f%2F3.5-5.6+AF-S+DX+VR%2C+Cameras&dlprc=549.0&crn=&istrsmrc=1&isathrsl=0&AR=9&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=101677489&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=9&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=771&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Electronics Expohttp://img.shopping.com/cctool/merch_logos/305814.gif1-888-707-EXPO3713.90http://img.shopping.com/sc/mr/sdc_checks_4.gifhttp://www.shopping.com/xMR-store_electronics_expo~MRD-305814~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUSNIKD3100Nikon D3100 14.2-Megapixel Digital SLR Camera With 18-55mm Zoom-Nikkor Lens, BlackSplit-second shutter response captures shots other cameras may have missed Helps eliminate the frustration of shutter delay! 14.2-megapixels for enlargements worth framing and hanging. Takes breathtaking 1080p HD movies. ISO sensitivity from 100-1600 for bright or dimly lit settings. 3.0in. color LCD for beautiful, wide-angle framing and viewing. In-camera image editing lets you retouch with no PC. Automatic scene modes include Child, Sports, Night Portrait and more. Accepts SDHC memory cards. Nikon D3100 14.2-Megapixel Digital SLR Camera With 18-55mm Zoom-Nikkor Lens, Black is one of many Digital SLR Cameras available through Office Depot. Made by Nikon.7185Nikonhttp://di109.shopping.com/images/di/79/59/75/61586e4446744359377244556a6b5932616177-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di109.shopping.com/images/di/79/59/75/61586e4446744359377244556a6b5932616177-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di109.shopping.com/images/di/79/59/75/61586e4446744359377244556a6b5932616177-250x250-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3in-stock549.990.00699.99http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=698&BEFID=7185&aon=%5E1&MerchantID=467671&crawler_id=467671&dealId=yYuaXnDFtCY7rDUjkY2aaw%3D%3D&url=http%3A%2F%2Flink.mercent.com%2Fredirect.ashx%3Fmr%3AmerchantID%3DOfficeDepot%26mr%3AtrackingCode%3DCEC9669E-6ABC-E011-9F24-0019B9C043EB%26mr%3AtargetUrl%3Dhttp%3A%2F%2Fwww.officedepot.com%2Fa%2Fproducts%2F486292%2FNikon-D3100-142-Megapixel-Digital-SLR%2F%253fcm_mmc%253dMercent-_-Shopping-_-Cameras_and_Camcorders-_-486292&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D3100+14.2-Megapixel+Digital+SLR+Camera+With+18-55mm+Zoom-Nikkor+Lens%2C+Black&dlprc=549.99&crn=&istrsmrc=1&isathrsl=0&AR=10&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=101677489&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=10&cid=&semid1=&semid2=&IsLps=0&CC=1&SL=1&FS=1&code=&acode=690&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Office Depothttp://img.shopping.com/cctool/merch_logos/467671.gif1-800-GO-DEPOT1352.37http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_office_depot_4158555~MRD-467671~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS486292Nikon® D3100™ 14.2MP Digital SLR with 18-55mm LensThe Nikon D3100 DSLR will surprise you with its simplicity and impress you with superb results.7185Nikonhttp://di103.shopping.com/images/di/52/6c/35/36553743756954597348344d475a30326c7851-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di103.shopping.com/images/di/52/6c/35/36553743756954597348344d475a30326c7851-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di103.shopping.com/images/di/52/6c/35/36553743756954597348344d475a30326c7851-220x220-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4in-stock549.996.05549.99http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=504&BEFID=7185&aon=%5E1&MerchantID=332477&crawler_id=332477&dealId=Rl56U7CuiTYsH4MGZ02lxQ%3D%3D&url=http%3A%2F%2Ftracking.searchmarketing.com%2Fgsic.asp%3Faid%3D903483107%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon%C2%AE+D3100%E2%84%A2+14.2MP+Digital+SLR+with+18-55mm+Lens&dlprc=549.99&crn=&istrsmrc=0&isathrsl=0&AR=11&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=101677489&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=11&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=496&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RadioShackhttp://img.shopping.com/cctool/merch_logos/332477.gif242.25http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_radioshack_9689~MRD-332477~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS9614867Nikon D3100 SLR w/Nikon 18-55mm VR & 55-200mm VR Lenses14.2 Megapixels3" LCDLive ViewHD 1080p Video w/ Sound & Autofocus11-point Autofocus3 Frames per Second ShootingISO 100 to 3200 (Expand to 12800-Hi2)Self Cleaning SensorEXPEED 2, Image Processing EngineScene Recognition System7185Nikonhttp://di105.shopping.com/images/di/68/75/53/36785a4b444b614b4d544d5037316549364441-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di105.shopping.com/images/di/68/75/53/36785a4b444b614b4d544d5037316549364441-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di105.shopping.com/images/di/68/75/53/36785a4b444b614b4d544d5037316549364441-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di105.shopping.com/images/di/68/75/53/36785a4b444b614b4d544d5037316549364441-345x345-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5in-stock695.000.00695.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=371&BEFID=7185&aon=%5E1&MerchantID=487342&crawler_id=487342&dealId=huS6xZKDKaKMTMP71eI6DA%3D%3D&url=http%3A%2F%2Fwww.rythercamera.com%2Fcatalog%2Fproduct_info.php%3Fcsv%3Dsh%26products_id%3D32983%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D3100+SLR+w%2FNikon+18-55mm+VR+%26+55-200mm+VR+Lenses&dlprc=695.0&crn=&istrsmrc=0&isathrsl=0&AR=15&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=101677489&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=15&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=379&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RytherCamera.comhttp://img.shopping.com/cctool/merch_logos/487342.gif1-877-644-75930http://img.shopping.com/sc/glb/flag/US.gifUS32983Nikon COOLPIX S203 Digital Camera10 Megapixel, Ultra-Compact Camera, 2.5 in. LCD Screen, 3x Optical Zoom, With Video Capability, Weight: 0.23 lb.With 10.34 mega pixel, electronic VR vibration reduction, 5-level brightness adjustment, 3x optical zoom, and TFT LCD, Nikon Coolpix s203 fulfills all the demands of any photographer. The digital camera has an inbuilt memory of 44MB and an external memory slot made for all kinds of SD (Secure Digital) cards.http://di1.shopping.com/images/pi/c4/ef/1b/95397883-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=2http://di1.shopping.com/images/pi/c4/ef/1b/95397883-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=2http://di1.shopping.com/images/pi/c4/ef/1b/95397883-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=2http://di1.shopping.com/images/pi/c4/ef/1b/95397883-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=2http://di1.shopping.com/images/pi/c4/ef/1b/95397883-500x499-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=20139.00139.00http://www.shopping.com/Nikon-Coolpix-S203/prices~linkin_id-7000610http://www.shopping.com/Nikon-Coolpix-S203/info~linkin_id-7000610Nikon Coolpix S203 Digital Camera (Red)With 10.34 mega pixel, electronic VR vibration reduction, 5-level brightness adjustment, 3x optical zoom, and TFT LCD, Nikon Coolpix s203 fulfills all the demands of any photographer. The digital camera has an inbuilt memory of 44MB and an external memory slot made for all kinds of SD (Secure Digital) cards.7185Nikonhttp://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-500x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1in-stockFantastic prices with ease & comfort of Amazon.com!139.009.50139.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=566&BEFID=7185&aon=%5E1&MerchantID=301531&crawler_id=1903313&dealId=sBd2JnIEPM-A_lBAM1RZgQ%3D%3D&url=http%3A%2F%2Fwww.amazon.com%2Fdp%2FB002T964IM%2Fref%3Dasc_df_B002T964IM1751618%3Fsmid%3DA22UHVNXG98FAT%26tag%3Ddealtime-ce-mp01feed-20%26linkCode%3Dasn%26creative%3D395105%26creativeASIN%3DB002T964IM&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+Coolpix+S203+Digital+Camera+%28Red%29&dlprc=139.0&crn=&istrsmrc=0&isathrsl=0&AR=63&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=95397883&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=63&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=518&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Amazon Marketplacehttp://img.shopping.com/cctool/merch_logos/301531.gif2132.73http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_amazon_marketplace_9689~MRD-301531~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUSB002T964IMNikon S3100 Digital Camera14.5 Megapixel, Compact Camera, 2.7 in. LCD Screen, 5x Optical Zoom, With High Definition Video, Weight: 0.23 lb.This digital camera features a wide-angle optical Zoom-NIKKOR glass lens that allows you to capture anything from landscapes to portraits to action shots. The high-definition movie mode with one-touch recording makes it easy to capture video clips.http://di1.shopping.com/images/pi/66/2d/33/106834268-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=3http://di1.shopping.com/images/pi/66/2d/33/106834268-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=3http://di1.shopping.com/images/pi/66/2d/33/106834268-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=3http://di1.shopping.com/images/pi/66/2d/33/106834268-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=3http://di1.shopping.com/images/pi/66/2d/33/106834268-507x387-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=312.00http://img.shopping.com/sc/pr/sdc_stars_sm_2.gifhttp://www.shopping.com/nikon-s3100/reviews~linkin_id-700061099.95134.95http://www.shopping.com/nikon-s3100/prices~linkin_id-7000610http://www.shopping.com/nikon-s3100/info~linkin_id-7000610CoolPix S3100 14 Megapixel Compact Digital Camera- RedNikon Coolpix S3100 - Digital camera - compact - 14.0 Mpix - optical zoom: 5 x - supported memory: SD, SDXC, SDHC - red7185Nikonhttp://di111.shopping.com/images/di/55/55/79/476f71563872302d78726b6e2d726e474e6267-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di111.shopping.com/images/di/55/55/79/476f71563872302d78726b6e2d726e474e6267-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di111.shopping.com/images/di/55/55/79/476f71563872302d78726b6e2d726e474e6267-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di111.shopping.com/images/di/55/55/79/476f71563872302d78726b6e2d726e474e6267-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1in-stockGet 30 days FREE SHIPPING w/ ShipVantage119.956.95139.95http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=578&BEFID=7185&aon=%5E1&MerchantID=485615&crawler_id=485615&dealId=UUyGoqV8r0-xrkn-rnGNbg%3D%3D&url=http%3A%2F%2Fsears.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1NbQBJpFHJ3Yx0CTAICI2BbH1lEFmgKP3QvUVpEREdlfUAUHAQPLVpFTVdtJzxAHUNYW3AhQBM0QhFvEXAbYh8EAAVmDAJeU1oyGG0GcBdhGwUGCAVqYF9SO0xSN1sZdmA7dmMdBQAJB24qX1NbQxI6AjA2ME5dVFULPDsGPFcQTTdaLTA6SR0OFlQvPAwMDxYcYlxIVkcoLTcCDA%3D%3D%26nAID%3D13736960%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=CoolPix+S3100+14+Megapixel+Compact+Digital+Camera-+Red&dlprc=119.95&crn=&istrsmrc=1&isathrsl=0&AR=28&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=106834268&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=28&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=1&FS=0&code=&acode=583&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Searshttp://img.shopping.com/cctool/merch_logos/485615.gif1-800-349-43588882.85http://img.shopping.com/sc/mr/sdc_checks_3.gifhttp://www.shopping.com/xMR-store_sears_4189479~MRD-485615~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS00337013000COOLPIX S3100 PinkNikon Coolpix S3100 - Digital camera - compact - 14.0 Mpix - optical zoom: 5 x - supported memory: SD, SDXC, SDHC - pink7185Nikonhttp://di111.shopping.com/images/di/58/38/37/4177586c573164586f4d586b34515144546f51-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di111.shopping.com/images/di/58/38/37/4177586c573164586f4d586b34515144546f51-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di111.shopping.com/images/di/58/38/37/4177586c573164586f4d586b34515144546f51-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di111.shopping.com/images/di/58/38/37/4177586c573164586f4d586b34515144546f51-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2in-stockGet 30 days FREE SHIPPING w/ ShipVantage119.956.95139.95http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=578&BEFID=7185&aon=%5E1&MerchantID=485615&crawler_id=485615&dealId=X87AwXlW1dXoMXk4QQDToQ%3D%3D&url=http%3A%2F%2Fsears.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1NbQBJpFHJxYx0CTAICI2BbH1lEFmgKP3QvUVpEREdlfUAUHAQPLVpFTVdtJzxAHUNYW3AhQBM0QhFvEXAbYh8EAAVmb2JcUFxDEGsPc3QDEkFZVQ0WFhdRW0MWbgYWDlxzdGMdAVQWRi0xDAwPFhw9TSobb05eWVVYKzsLTFVVQi5RICs3SA8MU1s2MQQKD1wf%26nAID%3D13736960%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=COOLPIX+S3100+Pink&dlprc=119.95&crn=&istrsmrc=1&isathrsl=0&AR=31&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=106834268&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=31&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=1&FS=0&code=&acode=583&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Searshttp://img.shopping.com/cctool/merch_logos/485615.gif1-800-349-43588882.85http://img.shopping.com/sc/mr/sdc_checks_3.gifhttp://www.shopping.com/xMR-store_sears_4189479~MRD-485615~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS00337015000Nikon Coolpix S3100 14.0 MP Digital Camera - SilverNikon Coolpix S3100 14.0 MP Digital Camera - Silver7185Nikonhttp://di109.shopping.com/images/di/6e/76/46/776e70664134726c413144626b736473613077-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di109.shopping.com/images/di/6e/76/46/776e70664134726c413144626b736473613077-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di109.shopping.com/images/di/6e/76/46/776e70664134726c413144626b736473613077-270x270-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3in-stock109.970.00109.97http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=803&BEFID=7185&aon=%5E&MerchantID=475774&crawler_id=475774&dealId=nvFwnpfA4rlA1Dbksdsa0w%3D%3D&url=http%3A%2F%2Fwww.thewiz.com%2Fcatalog%2Fproduct.jsp%3FmodelNo%3DS3100SILVER%26gdftrk%3DgdfV2677_a_7c996_a_7c4049_a_7c26262&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+Coolpix+S3100+14.0+MP+Digital+Camera+-+Silver&dlprc=109.97&crn=&istrsmrc=0&isathrsl=0&AR=33&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=106834268&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=33&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=797&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=TheWiz.comhttp://img.shopping.com/cctool/merch_logos/475774.gif877-542-69880http://img.shopping.com/sc/glb/flag/US.gifUS26262Nikon� COOLPIX� S3100 14MP Digital Camera (Silver)The Nikon COOLPIX S3100 is the easy way to share your life and stay connected.7185Nikonhttp://di102.shopping.com/images/di/35/47/74/614e324e6572794b7770732d5365326c2d3467-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di102.shopping.com/images/di/35/47/74/614e324e6572794b7770732d5365326c2d3467-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di102.shopping.com/images/di/35/47/74/614e324e6572794b7770732d5365326c2d3467-220x220-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4in-stock119.996.05119.99http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=504&BEFID=7185&aon=%5E1&MerchantID=332477&crawler_id=332477&dealId=5GtaN2NeryKwps-Se2l-4g%3D%3D&url=http%3A%2F%2Ftracking.searchmarketing.com%2Fgsic.asp%3Faid%3D848064082%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon%C3%AF%C2%BF%C2%BD+COOLPIX%C3%AF%C2%BF%C2%BD+S3100+14MP+Digital+Camera+%28Silver%29&dlprc=119.99&crn=&istrsmrc=0&isathrsl=0&AR=37&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=106834268&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=37&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=509&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RadioShackhttp://img.shopping.com/cctool/merch_logos/332477.gif242.25http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_radioshack_9689~MRD-332477~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS10101095COOLPIX S3100 YellowNikon Coolpix S3100 - Digital camera - compact - 14.0 Mpix - optical zoom: 5 x - supported memory: SD, SDXC, SDHC - yellow7185Nikonhttp://di107.shopping.com/images/di/61/34/33/6d305258756c5833387a436e516a5535396a77-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di107.shopping.com/images/di/61/34/33/6d305258756c5833387a436e516a5535396a77-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di107.shopping.com/images/di/61/34/33/6d305258756c5833387a436e516a5535396a77-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di107.shopping.com/images/di/61/34/33/6d305258756c5833387a436e516a5535396a77-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5in-stockGet 30 days FREE SHIPPING w/ ShipVantage119.956.95139.95http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=578&BEFID=7185&aon=%5E1&MerchantID=485615&crawler_id=485615&dealId=a43m0RXulX38zCnQjU59jw%3D%3D&url=http%3A%2F%2Fsears.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1NbQBJpFHJwYx0CTAICI2BbH1lEFmgKP3QvUVpEREdlfUAUHAQPLVpFTVdtJzxAHUNYW3AhQBM0QhFvEXAbYh8EAAVmb2JcUFxDEGoPc3QDEkFZVQ0WFhdRW0MWbgYWDlxzdGMdAVQWRi0xDAwPFhw9TSobb05eWVVYKzsLTFVVQi5RICs3SA8MU1s2MQQKD1wf%26nAID%3D13736960%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=COOLPIX+S3100+Yellow&dlprc=119.95&crn=&istrsmrc=1&isathrsl=0&AR=38&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=106834268&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=38&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=1&FS=0&code=&acode=583&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Searshttp://img.shopping.com/cctool/merch_logos/485615.gif1-800-349-43588882.85http://img.shopping.com/sc/mr/sdc_checks_3.gifhttp://www.shopping.com/xMR-store_sears_4189479~MRD-485615~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS00337014000Nikon D90 Digital Camera12.3 Megapixel, Point and Shoot Camera, 3 in. LCD Screen, With Video Capability, Weight: 1.36 lb.Untitled Document Nikon D90 SLR Digital Camera With 28-80mm 75-300mm Lens Kit The Nikon D90 SLR Digital Camera, with its 12.3-megapixel DX-format CMOS, 3" High resolution LCD display, Scene Recognition System, Picture Control, Active D-Lighting, and one-button Live View, provides photo enthusiasts with the image quality and performance they need to pursue their own vision while still being intuitive enough for use as an everyday camera.http://di1.shopping.com/images/pi/52/fb/d3/99671132-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=4http://di1.shopping.com/images/pi/52/fb/d3/99671132-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=4http://di1.shopping.com/images/pi/52/fb/d3/99671132-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=4http://di1.shopping.com/images/pi/52/fb/d3/99671132-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=4http://di1.shopping.com/images/pi/52/fb/d3/99671132-499x255-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=475.00http://img.shopping.com/sc/pr/sdc_stars_sm_5.gifhttp://www.shopping.com/Nikon-D90-with-18-270mm-Lens/reviews~linkin_id-7000610689.002299.00http://www.shopping.com/Nikon-D90-with-18-270mm-Lens/prices~linkin_id-7000610http://www.shopping.com/Nikon-D90-with-18-270mm-Lens/info~linkin_id-7000610Nikon® D90 12.3MP Digital SLR Camera (Body Only)The Nikon D90 will make you rethink what a digital SLR camera can achieve.7185Nikonhttp://di106.shopping.com/images/di/47/55/35/4a4a6b70554178653548756a4237666b774141-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di106.shopping.com/images/di/47/55/35/4a4a6b70554178653548756a4237666b774141-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di106.shopping.com/images/di/47/55/35/4a4a6b70554178653548756a4237666b774141-220x220-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1in-stock1015.996.051015.99http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=504&BEFID=7185&aon=%5E1&MerchantID=332477&crawler_id=332477&dealId=GU5JJkpUAxe5HujB7fkwAA%3D%3D&url=http%3A%2F%2Ftracking.searchmarketing.com%2Fgsic.asp%3Faid%3D851830266%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon%C2%AE+D90+12.3MP+Digital+SLR+Camera+%28Body+Only%29&dlprc=1015.99&crn=&istrsmrc=0&isathrsl=0&AR=14&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=99671132&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=14&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=496&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RadioShackhttp://img.shopping.com/cctool/merch_logos/332477.gif242.25http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_radioshack_9689~MRD-332477~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS10148659Nikon D90 SLR Digital Camera (Camera Body)The Nikon D90 SLR Digital Camera with its 12.3-megapixel DX-format CCD 3" High resolution LCD display Scene Recognition System Picture Control Active D-Lighting and one-button Live View provides photo enthusiasts with the image quality and performance they need to pursue their own vision while still being intuitive enough for use as an everyday camera. In addition the D90 introduces the D-Movie mode allowing for the first time an interchangeable lens SLR camera that is capable of recording 720p HD movie clips. Availabilty: In Stock7185Nikonhttp://di109.shopping.com/images/di/58/68/55/527553432d73704262544944666f3471667a51-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di109.shopping.com/images/di/58/68/55/527553432d73704262544944666f3471667a51-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di109.shopping.com/images/di/58/68/55/527553432d73704262544944666f3471667a51-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di109.shopping.com/images/di/58/68/55/527553432d73704262544944666f3471667a51-350x350-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2in-stockFree Shipping with Any Purchase!689.000.00900.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=647&BEFID=7185&aon=%5E1&MerchantID=475674&crawler_id=475674&dealId=XhURuSC-spBbTIDfo4qfzQ%3D%3D&url=http%3A%2F%2Fwww.fumfie.com%2Fproduct%2F169.5%2Fshopping-com%3F&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+SLR+Digital+Camera+%28Camera+Body%29&dlprc=689.0&crn=&istrsmrc=1&isathrsl=0&AR=16&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=99671132&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=16&cid=&semid1=&semid2=&IsLps=0&CC=1&SL=1&FS=1&code=&acode=658&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=FumFiehttp://img.shopping.com/cctool/merch_logos/475674.gif866 666 91985604.27http://img.shopping.com/sc/mr/sdc_checks_45.gifhttp://www.shopping.com/xMR-store_fumfie~MRD-475674~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUSF169C5Nikon D90 SLR w/Nikon 18-105mm VR & 55-200mm VR Lenses12.3 MegapixelDX Format CMOS Sensor3" VGA LCD DisplayLive ViewSelf Cleaning SensorD-Movie ModeHigh Sensitivity (ISO 3200)4.5 fps BurstIn-Camera Image Editing7185Nikonhttp://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-500x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3in-stock1189.000.001189.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=371&BEFID=7185&aon=%5E1&MerchantID=487342&crawler_id=487342&dealId=o0Px_XLWDbrxAYRy3rCmyQ%3D%3D&url=http%3A%2F%2Fwww.rythercamera.com%2Fcatalog%2Fproduct_info.php%3Fcsv%3Dsh%26products_id%3D30619%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+SLR+w%2FNikon+18-105mm+VR+%26+55-200mm+VR+Lenses&dlprc=1189.0&crn=&istrsmrc=0&isathrsl=0&AR=20&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=99671132&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=20&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=379&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RytherCamera.comhttp://img.shopping.com/cctool/merch_logos/487342.gif1-877-644-75930http://img.shopping.com/sc/glb/flag/US.gifUS30619Nikon D90 12.3 Megapixel Digital SLR Camera (Body Only)Fusing 12.3 megapixel image quality and a cinematic 24fps D-Movie Mode, the Nikon D90 exceeds the demands of passionate photographers. Coupled with Nikon's EXPEED image processing technologies and NIKKOR optics, breathtaking image fidelity is assured. Combined with fast 0.15ms power-up and split-second 65ms shooting lag, dramatic action and decisive moments are captured easily. Effective 4-frequency, ultrasonic sensor cleaning frees image degrading dust particles from the sensor's optical low pass filter.7185Nikonhttp://di110.shopping.com/images/di/34/48/67/62574a534a3873736749663842304d58497741-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di110.shopping.com/images/di/34/48/67/62574a534a3873736749663842304d58497741-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di110.shopping.com/images/di/34/48/67/62574a534a3873736749663842304d58497741-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4in-stockFREE FEDEX 2-3 DAY DELIVERY899.950.00899.95http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=269&BEFID=7185&aon=%5E&MerchantID=9296&crawler_id=811558&dealId=4HgbWJSJ8ssgIf8B0MXIwA%3D%3D&url=http%3A%2F%2Fwww.pcnation.com%2Foptics-gallery%2Fdetails.asp%3Faffid%3D305%26item%3D2N145P&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+12.3+Megapixel+Digital+SLR+Camera+%28Body+Only%29&dlprc=899.95&crn=&istrsmrc=1&isathrsl=0&AR=21&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=99671132&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=21&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=257&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=PCNationhttp://img.shopping.com/cctool/merch_logos/9296.gif800-470-707916224.43http://img.shopping.com/sc/mr/sdc_checks_45.gifhttp://www.shopping.com/xMR-store_pcnation_9689~MRD-9296~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS2N145PNikon D90 12.3MP Digital SLR Camera (Body Only)Fusing 12.3-megapixel image quality inherited from the award-winning D300 with groundbreaking features, the D90's breathtaking, low-noise image quality is further advanced with EXPEED image processing. Split-second shutter response and continuous shooting at up to 4.5 frames-per-second provide the power to capture fast action and precise moments perfectly, while Nikon's exclusive Scene Recognition System contributes to faster 11-area autofocus performance, finer white balance detection and more. The D90 delivers the control passionate photographers demand, utilizing comprehensive exposure functions and the intelligence of 3D Color Matrix Metering II. Stunning results come to life on a 3-inch 920,000-dot color LCD monitor, providing accurate image review, Live View composition and brilliant playback of the D90's cinematic-quality 24-fps HD D-Movie mode.7185Nikonhttp://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-500x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5in-stockFantastic prices with ease & comfort of Amazon.com!780.000.00780.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=566&BEFID=7185&aon=%5E1&MerchantID=301531&crawler_id=1903313&dealId=UNDa3uMDZXOnvD_7sTILYg%3D%3D&url=http%3A%2F%2Fwww.amazon.com%2Fdp%2FB001ET5U92%2Fref%3Dasc_df_B001ET5U921751618%3Fsmid%3DAHF4SYKP09WBH%26tag%3Ddealtime-ce-mp01feed-20%26linkCode%3Dasn%26creative%3D395105%26creativeASIN%3DB001ET5U92&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+12.3MP+Digital+SLR+Camera+%28Body+Only%29&dlprc=780.0&crn=&istrsmrc=0&isathrsl=0&AR=29&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=99671132&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=29&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=520&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Amazon Marketplacehttp://img.shopping.com/cctool/merch_logos/301531.gif2132.73http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_amazon_marketplace_9689~MRD-301531~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUSB001ET5U92Nikon D90 Digital Camera with 18-105mm lens12.9 Megapixel, SLR Camera, 3 in. LCD Screen, 5.8x Optical Zoom, With Video Capability, Weight: 2.3 lb.Its 12.3 megapixel DX-format CMOS image sensor and EXPEED image processing system offer outstanding image quality across a wide ISO light sensitivity range. Live View mode lets you compose and shoot via the high-resolution 3-inch LCD monitor, and an advanced Scene Recognition System and autofocus performance help capture images with astounding accuracy. Movies can be shot in Motion JPEG format using the D-Movie function. The camera’s large image sensor ensures exceptional movie image quality and you can create dramatic effects by shooting with a wide range of interchangeable NIKKOR lenses, from wide-angle to macro to fisheye, or by adjusting the lens aperture and experimenting with depth-of-field. The D90 – designed to fuel your passion for photography.http://di1.shopping.com/images/pi/57/6a/4f/70621646-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=5http://di1.shopping.com/images/pi/57/6a/4f/70621646-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=5http://di1.shopping.com/images/pi/57/6a/4f/70621646-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=5http://di1.shopping.com/images/pi/57/6a/4f/70621646-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=5http://di1.shopping.com/images/pi/57/6a/4f/70621646-490x489-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=5324.81http://img.shopping.com/sc/pr/sdc_stars_sm_5.gifhttp://www.shopping.com/Nikon-D90-with-18-105mm-lens/reviews~linkin_id-7000610849.951599.95http://www.shopping.com/Nikon-D90-with-18-105mm-lens/prices~linkin_id-7000610http://www.shopping.com/Nikon-D90-with-18-105mm-lens/info~linkin_id-7000610Nikon D90 18-105mm VR LensThe Nikon D90 SLR Digital Camera with its 12.3-megapixel DX-format CMOS 3" High resolution LCD display Scene Recognition System Picture Control Active D-Lighting and one-button Live View prov7185Nikonhttp://di111.shopping.com/images/di/33/6f/35/6531566768674a5066684c7654314a464b5441-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di111.shopping.com/images/di/33/6f/35/6531566768674a5066684c7654314a464b5441-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di111.shopping.com/images/di/33/6f/35/6531566768674a5066684c7654314a464b5441-260x260-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1in-stock849.950.00849.95http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=419&BEFID=7185&aon=%5E1&MerchantID=9390&crawler_id=1905054&dealId=3o5e1VghgJPfhLvT1JFKTA%3D%3D&url=http%3A%2F%2Fwww.ajrichard.com%2FNikon-D90-18-105mm-VR-Lens%2Fp-292%3Frefid%3DShopping%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+18-105mm+VR+Lens&dlprc=849.95&crn=&istrsmrc=0&isathrsl=0&AR=2&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=70621646&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=2&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=425&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=AJRichardhttp://img.shopping.com/cctool/merch_logos/9390.gif1-888-871-125631244.48http://img.shopping.com/sc/mr/sdc_checks_45.gifhttp://www.shopping.com/xMR-store_ajrichard~MRD-9390~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS292Nikon D90 SLR w/Nikon 18-105mm VR Lens12.3 MegapixelDX Format CMOS Sensor3" VGA LCD DisplayLive ViewSelf Cleaning SensorD-Movie ModeHigh Sensitivity (ISO 3200)4.5 fps BurstIn-Camera Image Editing7185Nikonhttp://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-500x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2in-stock909.000.00909.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=371&BEFID=7185&aon=%5E1&MerchantID=487342&crawler_id=487342&dealId=_lYWj_jbwfsSkfcwUcDuww%3D%3D&url=http%3A%2F%2Fwww.rythercamera.com%2Fcatalog%2Fproduct_info.php%3Fcsv%3Dsh%26products_id%3D30971%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+SLR+w%2FNikon+18-105mm+VR+Lens&dlprc=909.0&crn=&istrsmrc=0&isathrsl=0&AR=3&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=70621646&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=3&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=379&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RytherCamera.comhttp://img.shopping.com/cctool/merch_logos/487342.gif1-877-644-75930http://img.shopping.com/sc/glb/flag/US.gifUS3097125448/D90 12.3 Megapixel Digital Camera 18-105mm Zoom Lens w/ 3" Screen - BlackNikon D90 - Digital camera - SLR - 12.3 Mpix - Nikon AF-S DX 18-105mm lens - optical zoom: 5.8 x - supported memory: SD, SDHC7185Nikonhttp://di110.shopping.com/images/di/31/4b/43/636c4347755776747932584b5539736b616467-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di110.shopping.com/images/di/31/4b/43/636c4347755776747932584b5539736b616467-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di110.shopping.com/images/di/31/4b/43/636c4347755776747932584b5539736b616467-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di110.shopping.com/images/di/31/4b/43/636c4347755776747932584b5539736b616467-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3in-stockGet 30 days FREE SHIPPING w/ ShipVantage1199.008.201199.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=578&BEFID=7185&aon=%5E1&MerchantID=485615&crawler_id=485615&dealId=1KCclCGuWvty2XKU9skadg%3D%3D&url=http%3A%2F%2Fsears.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1NbQBRtFXpzYx0CTAICI2BbH1lEFmgKP3QvUVpEREdlfUAUHAQPLVpFTVdtJzxAHUNYW3AhQBM0QhFvEXAbYh8EAAVmb2JcVlhCGGkPc3QDEkFZVQ0WFhdRW0MWbgYWDlxzdGMdAVQWRi0xDAwPFhw9TSobb05eWVVYKzsLTFVVQi5RICs3SA8MU1s2MQQKD1wf%26nAID%3D13736960%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=25448%2FD90+12.3+Megapixel+Digital+Camera+18-105mm+Zoom+Lens+w%2F+3%22+Screen+-+Black&dlprc=1199.0&crn=&istrsmrc=1&isathrsl=0&AR=4&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=70621646&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=4&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=586&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Searshttp://img.shopping.com/cctool/merch_logos/485615.gif1-800-349-43588882.85http://img.shopping.com/sc/mr/sdc_checks_3.gifhttp://www.shopping.com/xMR-store_sears_4189479~MRD-485615~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS00353197000Nikon® D90 12.3MP Digital SLR with 18-105mm LensThe Nikon D90 will make you rethink what a digital SLR camera can achieve.7185Nikonhttp://di101.shopping.com/images/di/33/2d/56/4f53665656354a6f37486c41346b4a74616e41-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di101.shopping.com/images/di/33/2d/56/4f53665656354a6f37486c41346b4a74616e41-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di101.shopping.com/images/di/33/2d/56/4f53665656354a6f37486c41346b4a74616e41-220x220-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4in-stock1350.996.051350.99http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=504&BEFID=7185&aon=%5E1&MerchantID=332477&crawler_id=332477&dealId=3-VOSfVV5Jo7HlA4kJtanA%3D%3D&url=http%3A%2F%2Ftracking.searchmarketing.com%2Fgsic.asp%3Faid%3D982673361%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon%C2%AE+D90+12.3MP+Digital+SLR+with+18-105mm+Lens&dlprc=1350.99&crn=&istrsmrc=0&isathrsl=0&AR=5&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=70621646&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=5&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=496&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RadioShackhttp://img.shopping.com/cctool/merch_logos/332477.gif242.25http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_radioshack_9689~MRD-332477~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS11148905Nikon D90 Kit 12.3-megapixel Digital SLR with 18-105mm VR LensPhotographers, take your passion further!Now is the time for new creativity, and to rethink what a digital SLR camera can achieve. It's time for the D90, a camera with everything you would expect from Nikon's next-generation D-SLRs, and some unexpected surprises, as well. The stunning image quality is inherited from the D300, Nikon's DX-format flagship. The D90 also has Nikon's unmatched ergonomics and high performance, and now takes high-quality movies with beautifully cinematic results. The world of photography has changed, and with the D90 in your hands, it's time to make your own rules.AF-S DX NIKKOR 18-105mm f/3.5-5.6G ED VR LensWide-ratio 5.8x zoom Compact, versatile and ideal for a broad range of shooting situations, ranging from interiors and landscapes to beautiful portraits� a perfect everyday zoom. Nikon VR (Vibration Reduction) image stabilization Vibration Reduction is engineered specifically for each VR NIKKOR lens and enables handheld shooting at up to 3 shutter speeds slower than would7185Nikonhttp://di110.shopping.com/images/di/6b/51/6e/4236725334416a4e3564783568325f36333167-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di110.shopping.com/images/di/6b/51/6e/4236725334416a4e3564783568325f36333167-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di110.shopping.com/images/di/6b/51/6e/4236725334416a4e3564783568325f36333167-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di110.shopping.com/images/di/6b/51/6e/4236725334416a4e3564783568325f36333167-300x232-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5in-stockShipping Included!1050.000.001199.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=135&BEFID=7185&aon=%5E1&MerchantID=313162&crawler_id=313162&dealId=kQnB6rS4AjN5dx5h2_631g%3D%3D&url=http%3A%2F%2Fonecall.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1pZSxNoWHFwLx8GTAICa2ZeH1sPXTZLNzRpAh1HR0BxPQEGCBJNMhFHUElsFCFCVkVTTHAcBggEHQ4aHXNpGERGH3RQODsbAgdechJtbBt8fx8JAwhtZFAzJj1oGgIWCxRlNyFOUV9UUGIxBgo0T0IyTSYqJ0RWHw4QPCIBAAQXRGMDICg6TllZVBhh%26nAID%3D13736960&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+Kit+12.3-megapixel+Digital+SLR+with+18-105mm+VR+Lens&dlprc=1050.0&crn=&istrsmrc=1&isathrsl=0&AR=6&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=70621646&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=6&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=1&FS=1&code=&acode=143&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=OneCallhttp://img.shopping.com/cctool/merch_logos/313162.gif1.800.398.07661804.44http://img.shopping.com/sc/mr/sdc_checks_45.gifhttp://www.shopping.com/xMR-store_onecall_9689~MRD-313162~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS92826Price rangehttp://www.shopping.com/digital-cameras/nikon/products?oq=nikon&linkin_id=7000610$24 - $4012http://www.shopping.com/digital-cameras/nikon/products?minPrice=24&maxPrice=4012&linkin_id=7000610$4012 - $7999http://www.shopping.com/digital-cameras/nikon/products?minPrice=4012&maxPrice=7999&linkin_id=7000610Brandhttp://www.shopping.com/digital-cameras/nikon/products~all-9688-brand~MS-1?oq=nikon&linkin_id=7000610Nikonhttp://www.shopping.com/digital-cameras/nikon+brand-nikon/products~linkin_id-7000610Cranehttp://www.shopping.com/digital-cameras/nikon+9688-brand-crane/products~linkin_id-7000610Ikelitehttp://www.shopping.com/digital-cameras/nikon+ikelite/products~linkin_id-7000610Bowerhttp://www.shopping.com/digital-cameras/nikon+bower/products~linkin_id-7000610FUJIFILMhttp://www.shopping.com/digital-cameras/nikon+brand-fuji/products~linkin_id-7000610Storehttp://www.shopping.com/digital-cameras/nikon/products~all-store~MS-1?oq=nikon&linkin_id=7000610Amazon Marketplacehttp://www.shopping.com/digital-cameras/nikon+store-amazon-marketplace-9689/products~linkin_id-7000610Amazonhttp://www.shopping.com/digital-cameras/nikon+store-amazon/products~linkin_id-7000610Adoramahttp://www.shopping.com/digital-cameras/nikon+store-adorama/products~linkin_id-7000610J&R Music and Computer Worldhttp://www.shopping.com/digital-cameras/nikon+store-j-r-music-and-computer-world/products~linkin_id-7000610RytherCamera.comhttp://www.shopping.com/digital-cameras/nikon+store-rythercamera-com/products~linkin_id-7000610Resolutionhttp://www.shopping.com/digital-cameras/nikon/products~all-21885-resolution~MS-1?oq=nikon&linkin_id=7000610Under 4 Megapixelhttp://www.shopping.com/digital-cameras/nikon+under-4-megapixel/products~linkin_id-7000610At least 5 Megapixelhttp://www.shopping.com/digital-cameras/nikon+5-megapixel-digital-cameras/products~linkin_id-7000610At least 6 Megapixelhttp://www.shopping.com/digital-cameras/nikon+6-megapixel-digital-cameras/products~linkin_id-7000610At least 7 Megapixelhttp://www.shopping.com/digital-cameras/nikon+7-megapixel-digital-cameras/products~linkin_id-7000610At least 8 Megapixelhttp://www.shopping.com/digital-cameras/nikon+8-megapixel-digital-cameras/products~linkin_id-7000610Featureshttp://www.shopping.com/digital-cameras/nikon/products~all-32804-features~MS-1?oq=nikon&linkin_id=7000610Shockproofhttp://www.shopping.com/digital-cameras/nikon+32804-features-shockproof/products~linkin_id-7000610Waterproofhttp://www.shopping.com/digital-cameras/nikon+32804-features-waterproof/products~linkin_id-7000610Freezeproofhttp://www.shopping.com/digital-cameras/nikon+32804-features-freezeproof/products~linkin_id-7000610Dust proofhttp://www.shopping.com/digital-cameras/nikon+32804-features-dust-proof/products~linkin_id-7000610Image Stabilizationhttp://www.shopping.com/digital-cameras/nikon+32804-features-image-stabilization/products~linkin_id-7000610hybriddigital camerag1sonycameracanonnikonkodak digital camerakodaksony cybershotkodak easyshare digital cameranikon coolpixolympuspink digital cameracanon powershot \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/node_modules/sax/examples/strict.dtd b/cli/node_modules/aws-sdk/node_modules/sax/examples/strict.dtd deleted file mode 100644 index b27455943..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/examples/strict.dtd +++ /dev/null @@ -1,870 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -%HTMLlat1; - - -%HTMLsymbol; - - -%HTMLspecial; - - - - - - - - - - - - - -]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cli/node_modules/aws-sdk/node_modules/sax/examples/test.html b/cli/node_modules/aws-sdk/node_modules/sax/examples/test.html deleted file mode 100644 index 61f8f1ab9..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/examples/test.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - testing the parser - - - -

hello - - - - diff --git a/cli/node_modules/aws-sdk/node_modules/sax/examples/test.xml b/cli/node_modules/aws-sdk/node_modules/sax/examples/test.xml deleted file mode 100644 index 801292d7f..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/examples/test.xml +++ /dev/null @@ -1,1254 +0,0 @@ - - -]> - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/node_modules/sax/lib/sax.js b/cli/node_modules/aws-sdk/node_modules/sax/lib/sax.js deleted file mode 100644 index 3eabee869..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/lib/sax.js +++ /dev/null @@ -1,1315 +0,0 @@ -// wrapper for non-node envs -;(function (sax) { - -sax.parser = function (strict, opt) { return new SAXParser(strict, opt) } -sax.SAXParser = SAXParser -sax.SAXStream = SAXStream -sax.createStream = createStream - -// When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns. -// When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)), -// since that's the earliest that a buffer overrun could occur. This way, checks are -// as rare as required, but as often as necessary to ensure never crossing this bound. -// Furthermore, buffers are only tested at most once per write(), so passing a very -// large string into write() might have undesirable effects, but this is manageable by -// the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme -// edge case, result in creating at most one complete copy of the string passed in. -// Set to Infinity to have unlimited buffers. -sax.MAX_BUFFER_LENGTH = 64 * 1024 - -var buffers = [ - "comment", "sgmlDecl", "textNode", "tagName", "doctype", - "procInstName", "procInstBody", "entity", "attribName", - "attribValue", "cdata", "script" -] - -sax.EVENTS = // for discoverability. - [ "text" - , "processinginstruction" - , "sgmldeclaration" - , "doctype" - , "comment" - , "attribute" - , "opentag" - , "closetag" - , "opencdata" - , "cdata" - , "closecdata" - , "error" - , "end" - , "ready" - , "script" - , "opennamespace" - , "closenamespace" - ] - -function SAXParser (strict, opt) { - if (!(this instanceof SAXParser)) return new SAXParser(strict, opt) - - var parser = this - clearBuffers(parser) - parser.q = parser.c = "" - parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH - parser.opt = opt || {} - parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags - parser.looseCase = parser.opt.lowercase ? "toLowerCase" : "toUpperCase" - parser.tags = [] - parser.closed = parser.closedRoot = parser.sawRoot = false - parser.tag = parser.error = null - parser.strict = !!strict - parser.noscript = !!(strict || parser.opt.noscript) - parser.state = S.BEGIN - parser.ENTITIES = Object.create(sax.ENTITIES) - parser.attribList = [] - - // namespaces form a prototype chain. - // it always points at the current tag, - // which protos to its parent tag. - if (parser.opt.xmlns) parser.ns = Object.create(rootNS) - - // mostly just for error reporting - parser.trackPosition = parser.opt.position !== false - if (parser.trackPosition) { - parser.position = parser.line = parser.column = 0 - } - emit(parser, "onready") -} - -if (!Object.create) Object.create = function (o) { - function f () { this.__proto__ = o } - f.prototype = o - return new f -} - -if (!Object.getPrototypeOf) Object.getPrototypeOf = function (o) { - return o.__proto__ -} - -if (!Object.keys) Object.keys = function (o) { - var a = [] - for (var i in o) if (o.hasOwnProperty(i)) a.push(i) - return a -} - -function checkBufferLength (parser) { - var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10) - , maxActual = 0 - for (var i = 0, l = buffers.length; i < l; i ++) { - var len = parser[buffers[i]].length - if (len > maxAllowed) { - // Text/cdata nodes can get big, and since they're buffered, - // we can get here under normal conditions. - // Avoid issues by emitting the text node now, - // so at least it won't get any bigger. - switch (buffers[i]) { - case "textNode": - closeText(parser) - break - - case "cdata": - emitNode(parser, "oncdata", parser.cdata) - parser.cdata = "" - break - - case "script": - emitNode(parser, "onscript", parser.script) - parser.script = "" - break - - default: - error(parser, "Max buffer length exceeded: "+buffers[i]) - } - } - maxActual = Math.max(maxActual, len) - } - // schedule the next check for the earliest possible buffer overrun. - parser.bufferCheckPosition = (sax.MAX_BUFFER_LENGTH - maxActual) - + parser.position -} - -function clearBuffers (parser) { - for (var i = 0, l = buffers.length; i < l; i ++) { - parser[buffers[i]] = "" - } -} - -SAXParser.prototype = - { end: function () { end(this) } - , write: write - , resume: function () { this.error = null; return this } - , close: function () { return this.write(null) } - } - -try { - var Stream = require("stream").Stream -} catch (ex) { - var Stream = function () {} -} - - -var streamWraps = sax.EVENTS.filter(function (ev) { - return ev !== "error" && ev !== "end" -}) - -function createStream (strict, opt) { - return new SAXStream(strict, opt) -} - -function SAXStream (strict, opt) { - if (!(this instanceof SAXStream)) return new SAXStream(strict, opt) - - Stream.apply(this) - - this._parser = new SAXParser(strict, opt) - this.writable = true - this.readable = true - - - var me = this - - this._parser.onend = function () { - me.emit("end") - } - - this._parser.onerror = function (er) { - me.emit("error", er) - - // if didn't throw, then means error was handled. - // go ahead and clear error, so we can write again. - me._parser.error = null - } - - streamWraps.forEach(function (ev) { - Object.defineProperty(me, "on" + ev, { - get: function () { return me._parser["on" + ev] }, - set: function (h) { - if (!h) { - me.removeAllListeners(ev) - return me._parser["on"+ev] = h - } - me.on(ev, h) - }, - enumerable: true, - configurable: false - }) - }) -} - -SAXStream.prototype = Object.create(Stream.prototype, - { constructor: { value: SAXStream } }) - -SAXStream.prototype.write = function (data) { - this._parser.write(data.toString()) - this.emit("data", data) - return true -} - -SAXStream.prototype.end = function (chunk) { - if (chunk && chunk.length) this._parser.write(chunk.toString()) - this._parser.end() - return true -} - -SAXStream.prototype.on = function (ev, handler) { - var me = this - if (!me._parser["on"+ev] && streamWraps.indexOf(ev) !== -1) { - me._parser["on"+ev] = function () { - var args = arguments.length === 1 ? [arguments[0]] - : Array.apply(null, arguments) - args.splice(0, 0, ev) - me.emit.apply(me, args) - } - } - - return Stream.prototype.on.call(me, ev, handler) -} - - - -// character classes and tokens -var whitespace = "\r\n\t " - // this really needs to be replaced with character classes. - // XML allows all manner of ridiculous numbers and digits. - , number = "0124356789" - , letter = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" - // (Letter | "_" | ":") - , quote = "'\"" - , entity = number+letter+"#" - , attribEnd = whitespace + ">" - , CDATA = "[CDATA[" - , DOCTYPE = "DOCTYPE" - , XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace" - , XMLNS_NAMESPACE = "http://www.w3.org/2000/xmlns/" - , rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE } - -// turn all the string character sets into character class objects. -whitespace = charClass(whitespace) -number = charClass(number) -letter = charClass(letter) - -// http://www.w3.org/TR/REC-xml/#NT-NameStartChar -// This implementation works on strings, a single character at a time -// as such, it cannot ever support astral-plane characters (10000-EFFFF) -// without a significant breaking change to either this parser, or the -// JavaScript language. Implementation of an emoji-capable xml parser -// is left as an exercise for the reader. -var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ - -var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/ - -quote = charClass(quote) -entity = charClass(entity) -attribEnd = charClass(attribEnd) - -function charClass (str) { - return str.split("").reduce(function (s, c) { - s[c] = true - return s - }, {}) -} - -function isRegExp (c) { - return Object.prototype.toString.call(c) === '[object RegExp]' -} - -function is (charclass, c) { - return isRegExp(charclass) ? !!c.match(charclass) : charclass[c] -} - -function not (charclass, c) { - return !is(charclass, c) -} - -var S = 0 -sax.STATE = -{ BEGIN : S++ -, TEXT : S++ // general stuff -, TEXT_ENTITY : S++ // & and such. -, OPEN_WAKA : S++ // < -, SGML_DECL : S++ // -, SCRIPT : S++ // " - , expect : - [ [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ] - , [ "opentag", { name: "script", attributes: {}, isSelfClosing: false } ] - , [ "text", "hello world" ] - , [ "closetag", "script" ] - , [ "closetag", "xml" ] - ] - , strict : false - , opt : { lowercasetags: true, noscript: true } - } - ) - -require(__dirname).test - ( { xml : "" - , expect : - [ [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ] - , [ "opentag", { name: "script", attributes: {}, isSelfClosing: false } ] - , [ "opencdata", undefined ] - , [ "cdata", "hello world" ] - , [ "closecdata", undefined ] - , [ "closetag", "script" ] - , [ "closetag", "xml" ] - ] - , strict : false - , opt : { lowercasetags: true, noscript: true } - } - ) - diff --git a/cli/node_modules/aws-sdk/node_modules/sax/test/issue-84.js b/cli/node_modules/aws-sdk/node_modules/sax/test/issue-84.js deleted file mode 100644 index 0e7ee699a..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/test/issue-84.js +++ /dev/null @@ -1,13 +0,0 @@ -// https://github.com/isaacs/sax-js/issues/49 -require(__dirname).test - ( { xml : "body" - , expect : - [ [ "processinginstruction", { name: "has", body: "unbalanced \"quotes" } ], - [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ] - , [ "text", "body" ] - , [ "closetag", "xml" ] - ] - , strict : false - , opt : { lowercasetags: true, noscript: true } - } - ) diff --git a/cli/node_modules/aws-sdk/node_modules/sax/test/parser-position.js b/cli/node_modules/aws-sdk/node_modules/sax/test/parser-position.js deleted file mode 100644 index e4a68b1e9..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/test/parser-position.js +++ /dev/null @@ -1,28 +0,0 @@ -var sax = require("../lib/sax"), - assert = require("assert") - -function testPosition(chunks, expectedEvents) { - var parser = sax.parser(); - expectedEvents.forEach(function(expectation) { - parser['on' + expectation[0]] = function() { - for (var prop in expectation[1]) { - assert.equal(parser[prop], expectation[1][prop]); - } - } - }); - chunks.forEach(function(chunk) { - parser.write(chunk); - }); -}; - -testPosition(['

abcdefgh
'], - [ ['opentag', { position: 5, startTagPosition: 1 }] - , ['text', { position: 19, startTagPosition: 14 }] - , ['closetag', { position: 19, startTagPosition: 14 }] - ]); - -testPosition(['
abcde','fgh
'], - [ ['opentag', { position: 5, startTagPosition: 1 }] - , ['text', { position: 19, startTagPosition: 14 }] - , ['closetag', { position: 19, startTagPosition: 14 }] - ]); diff --git a/cli/node_modules/aws-sdk/node_modules/sax/test/script-close-better.js b/cli/node_modules/aws-sdk/node_modules/sax/test/script-close-better.js deleted file mode 100644 index f4887b9a0..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/test/script-close-better.js +++ /dev/null @@ -1,12 +0,0 @@ -require(__dirname).test({ - xml : "", - expect : [ - ["opentag", {"name": "HTML","attributes": {}, isSelfClosing: false}], - ["opentag", {"name": "HEAD","attributes": {}, isSelfClosing: false}], - ["opentag", {"name": "SCRIPT","attributes": {}, isSelfClosing: false}], - ["script", "'
foo
", - expect : [ - ["opentag", {"name": "HTML","attributes": {}, "isSelfClosing": false}], - ["opentag", {"name": "HEAD","attributes": {}, "isSelfClosing": false}], - ["opentag", {"name": "SCRIPT","attributes": {}, "isSelfClosing": false}], - ["script", "if (1 < 0) { console.log('elo there'); }"], - ["closetag", "SCRIPT"], - ["closetag", "HEAD"], - ["closetag", "HTML"] - ] -}); diff --git a/cli/node_modules/aws-sdk/node_modules/sax/test/self-closing-child-strict.js b/cli/node_modules/aws-sdk/node_modules/sax/test/self-closing-child-strict.js deleted file mode 100644 index 3d6e98520..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/test/self-closing-child-strict.js +++ /dev/null @@ -1,44 +0,0 @@ - -require(__dirname).test({ - xml : - ""+ - "" + - "" + - "" + - "" + - "=(|)" + - "" + - "", - expect : [ - ["opentag", { - "name": "root", - "attributes": {}, - "isSelfClosing": false - }], - ["opentag", { - "name": "child", - "attributes": {}, - "isSelfClosing": false - }], - ["opentag", { - "name": "haha", - "attributes": {}, - "isSelfClosing": true - }], - ["closetag", "haha"], - ["closetag", "child"], - ["opentag", { - "name": "monkey", - "attributes": {}, - "isSelfClosing": false - }], - ["text", "=(|)"], - ["closetag", "monkey"], - ["closetag", "root"], - ["end"], - ["ready"] - ], - strict : true, - opt : {} -}); - diff --git a/cli/node_modules/aws-sdk/node_modules/sax/test/self-closing-child.js b/cli/node_modules/aws-sdk/node_modules/sax/test/self-closing-child.js deleted file mode 100644 index f31c36646..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/test/self-closing-child.js +++ /dev/null @@ -1,44 +0,0 @@ - -require(__dirname).test({ - xml : - ""+ - "" + - "" + - "" + - "" + - "=(|)" + - "" + - "", - expect : [ - ["opentag", { - "name": "ROOT", - "attributes": {}, - "isSelfClosing": false - }], - ["opentag", { - "name": "CHILD", - "attributes": {}, - "isSelfClosing": false - }], - ["opentag", { - "name": "HAHA", - "attributes": {}, - "isSelfClosing": true - }], - ["closetag", "HAHA"], - ["closetag", "CHILD"], - ["opentag", { - "name": "MONKEY", - "attributes": {}, - "isSelfClosing": false - }], - ["text", "=(|)"], - ["closetag", "MONKEY"], - ["closetag", "ROOT"], - ["end"], - ["ready"] - ], - strict : false, - opt : {} -}); - diff --git a/cli/node_modules/aws-sdk/node_modules/sax/test/self-closing-tag.js b/cli/node_modules/aws-sdk/node_modules/sax/test/self-closing-tag.js deleted file mode 100644 index d1d8b7c82..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/test/self-closing-tag.js +++ /dev/null @@ -1,25 +0,0 @@ - -require(__dirname).test({ - xml : - " "+ - " "+ - " "+ - " "+ - "=(|) "+ - ""+ - " ", - expect : [ - ["opentag", {name:"ROOT", attributes:{}, isSelfClosing: false}], - ["opentag", {name:"HAHA", attributes:{}, isSelfClosing: true}], - ["closetag", "HAHA"], - ["opentag", {name:"HAHA", attributes:{}, isSelfClosing: true}], - ["closetag", "HAHA"], - // ["opentag", {name:"HAHA", attributes:{}}], - // ["closetag", "HAHA"], - ["opentag", {name:"MONKEY", attributes:{}, isSelfClosing: false}], - ["text", "=(|)"], - ["closetag", "MONKEY"], - ["closetag", "ROOT"] - ], - opt : { trim : true } -}); \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/node_modules/sax/test/stray-ending.js b/cli/node_modules/aws-sdk/node_modules/sax/test/stray-ending.js deleted file mode 100644 index bec467b22..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/test/stray-ending.js +++ /dev/null @@ -1,17 +0,0 @@ -// stray ending tags should just be ignored in non-strict mode. -// https://github.com/isaacs/sax-js/issues/32 -require(__dirname).test - ( { xml : - "" - , expect : - [ [ "opentag", { name: "A", attributes: {}, isSelfClosing: false } ] - , [ "opentag", { name: "B", attributes: {}, isSelfClosing: false } ] - , [ "text", "" ] - , [ "closetag", "B" ] - , [ "closetag", "A" ] - ] - , strict : false - , opt : {} - } - ) - diff --git a/cli/node_modules/aws-sdk/node_modules/sax/test/trailing-attribute-no-value.js b/cli/node_modules/aws-sdk/node_modules/sax/test/trailing-attribute-no-value.js deleted file mode 100644 index 222837f8f..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/test/trailing-attribute-no-value.js +++ /dev/null @@ -1,10 +0,0 @@ - -require(__dirname).test({ - xml : - "", - expect : [ - ["attribute", {name:"ATTRIB", value:"attrib"}], - ["opentag", {name:"ROOT", attributes:{"ATTRIB":"attrib"}, isSelfClosing: false}] - ], - opt : { trim : true } -}); diff --git a/cli/node_modules/aws-sdk/node_modules/sax/test/trailing-non-whitespace.js b/cli/node_modules/aws-sdk/node_modules/sax/test/trailing-non-whitespace.js deleted file mode 100644 index 619578b17..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/test/trailing-non-whitespace.js +++ /dev/null @@ -1,18 +0,0 @@ - -require(__dirname).test({ - xml : "Welcome, to monkey land", - expect : [ - ["opentag", { - "name": "SPAN", - "attributes": {}, - isSelfClosing: false - }], - ["text", "Welcome,"], - ["closetag", "SPAN"], - ["text", " to monkey land"], - ["end"], - ["ready"] - ], - strict : false, - opt : {} -}); diff --git a/cli/node_modules/aws-sdk/node_modules/sax/test/unclosed-root.js b/cli/node_modules/aws-sdk/node_modules/sax/test/unclosed-root.js deleted file mode 100644 index f4eeac61b..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/test/unclosed-root.js +++ /dev/null @@ -1,11 +0,0 @@ -require(__dirname).test - ( { xml : "" - - , expect : - [ [ "opentag", { name: "root", attributes: {}, isSelfClosing: false } ] - , [ "error", "Unclosed root tag\nLine: 0\nColumn: 6\nChar: " ] - ] - , strict : true - , opt : {} - } - ) diff --git a/cli/node_modules/aws-sdk/node_modules/sax/test/unquoted.js b/cli/node_modules/aws-sdk/node_modules/sax/test/unquoted.js deleted file mode 100644 index b3a9a8122..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/test/unquoted.js +++ /dev/null @@ -1,18 +0,0 @@ -// unquoted attributes should be ok in non-strict mode -// https://github.com/isaacs/sax-js/issues/31 -require(__dirname).test - ( { xml : - "" - , expect : - [ [ "attribute", { name: "CLASS", value: "test" } ] - , [ "attribute", { name: "HELLO", value: "world" } ] - , [ "opentag", { name: "SPAN", - attributes: { CLASS: "test", HELLO: "world" }, - isSelfClosing: false } ] - , [ "closetag", "SPAN" ] - ] - , strict : false - , opt : {} - } - ) - diff --git a/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-issue-41.js b/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-issue-41.js deleted file mode 100644 index 17ab45a0f..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-issue-41.js +++ /dev/null @@ -1,68 +0,0 @@ -var t = require(__dirname) - - , xmls = // should be the same both ways. - [ "" - , "" ] - - , ex1 = - [ [ "opennamespace" - , { prefix: "a" - , uri: "http://ATTRIBUTE" - } - ] - , [ "attribute" - , { name: "xmlns:a" - , value: "http://ATTRIBUTE" - , prefix: "xmlns" - , local: "a" - , uri: "http://www.w3.org/2000/xmlns/" - } - ] - , [ "attribute" - , { name: "a:attr" - , local: "attr" - , prefix: "a" - , uri: "http://ATTRIBUTE" - , value: "value" - } - ] - , [ "opentag" - , { name: "parent" - , uri: "" - , prefix: "" - , local: "parent" - , attributes: - { "a:attr": - { name: "a:attr" - , local: "attr" - , prefix: "a" - , uri: "http://ATTRIBUTE" - , value: "value" - } - , "xmlns:a": - { name: "xmlns:a" - , local: "a" - , prefix: "xmlns" - , uri: "http://www.w3.org/2000/xmlns/" - , value: "http://ATTRIBUTE" - } - } - , ns: {"a": "http://ATTRIBUTE"} - , isSelfClosing: true - } - ] - , ["closetag", "parent"] - , ["closenamespace", { prefix: "a", uri: "http://ATTRIBUTE" }] - ] - - // swap the order of elements 2 and 1 - , ex2 = [ex1[0], ex1[2], ex1[1]].concat(ex1.slice(3)) - , expected = [ex1, ex2] - -xmls.forEach(function (x, i) { - t.test({ xml: x - , expect: expected[i] - , strict: true - , opt: { xmlns: true } - }) -}) diff --git a/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-rebinding.js b/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-rebinding.js deleted file mode 100644 index 07e042553..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-rebinding.js +++ /dev/null @@ -1,63 +0,0 @@ - -require(__dirname).test - ( { xml : - ""+ - ""+ - ""+ - ""+ - ""+ - "" - - , expect : - [ [ "opennamespace", { prefix: "x", uri: "x1" } ] - , [ "opennamespace", { prefix: "y", uri: "y1" } ] - , [ "attribute", { name: "xmlns:x", value: "x1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } ] - , [ "attribute", { name: "xmlns:y", value: "y1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "y" } ] - , [ "attribute", { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } ] - , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ] - , [ "opentag", { name: "root", uri: "", prefix: "", local: "root", - attributes: { "xmlns:x": { name: "xmlns:x", value: "x1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } - , "xmlns:y": { name: "xmlns:y", value: "y1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "y" } - , "x:a": { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } - , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } }, - ns: { x: 'x1', y: 'y1' }, - isSelfClosing: false } ] - - , [ "opennamespace", { prefix: "x", uri: "x2" } ] - , [ "attribute", { name: "xmlns:x", value: "x2", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } ] - , [ "opentag", { name: "rebind", uri: "", prefix: "", local: "rebind", - attributes: { "xmlns:x": { name: "xmlns:x", value: "x2", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } }, - ns: { x: 'x2' }, - isSelfClosing: false } ] - - , [ "attribute", { name: "x:a", value: "x2", uri: "x2", prefix: "x", local: "a" } ] - , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ] - , [ "opentag", { name: "check", uri: "", prefix: "", local: "check", - attributes: { "x:a": { name: "x:a", value: "x2", uri: "x2", prefix: "x", local: "a" } - , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } }, - ns: { x: 'x2' }, - isSelfClosing: true } ] - - , [ "closetag", "check" ] - - , [ "closetag", "rebind" ] - , [ "closenamespace", { prefix: "x", uri: "x2" } ] - - , [ "attribute", { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } ] - , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ] - , [ "opentag", { name: "check", uri: "", prefix: "", local: "check", - attributes: { "x:a": { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } - , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } }, - ns: { x: 'x1', y: 'y1' }, - isSelfClosing: true } ] - , [ "closetag", "check" ] - - , [ "closetag", "root" ] - , [ "closenamespace", { prefix: "x", uri: "x1" } ] - , [ "closenamespace", { prefix: "y", uri: "y1" } ] - ] - , strict : true - , opt : { xmlns: true } - } - ) - diff --git a/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-strict.js b/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-strict.js deleted file mode 100644 index b5e3e5188..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-strict.js +++ /dev/null @@ -1,74 +0,0 @@ - -require(__dirname).test - ( { xml : - ""+ - ""+ - ""+ - ""+ - ""+ - ""+ - ""+ - ""+ - ""+ - "" - - , expect : - [ [ "opentag", { name: "root", prefix: "", local: "root", uri: "", - attributes: {}, ns: {}, isSelfClosing: false } ] - - , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } ] - , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "", - attributes: { "attr": { name: "attr", value: "normal", uri: "", prefix: "", local: "attr", uri: "" } }, - ns: {}, isSelfClosing: true } ] - , [ "closetag", "plain" ] - - , [ "opennamespace", { prefix: "", uri: "uri:default" } ] - - , [ "attribute", { name: "xmlns", value: "uri:default", prefix: "xmlns", local: "", uri: "http://www.w3.org/2000/xmlns/" } ] - , [ "opentag", { name: "ns1", prefix: "", local: "ns1", uri: "uri:default", - attributes: { "xmlns": { name: "xmlns", value: "uri:default", prefix: "xmlns", local: "", uri: "http://www.w3.org/2000/xmlns/" } }, - ns: { "": "uri:default" }, isSelfClosing: false } ] - - , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } ] - , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "uri:default", ns: { '': 'uri:default' }, - attributes: { "attr": { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } }, - isSelfClosing: true } ] - , [ "closetag", "plain" ] - - , [ "closetag", "ns1" ] - - , [ "closenamespace", { prefix: "", uri: "uri:default" } ] - - , [ "opennamespace", { prefix: "a", uri: "uri:nsa" } ] - - , [ "attribute", { name: "xmlns:a", value: "uri:nsa", prefix: "xmlns", local: "a", uri: "http://www.w3.org/2000/xmlns/" } ] - - , [ "opentag", { name: "ns2", prefix: "", local: "ns2", uri: "", - attributes: { "xmlns:a": { name: "xmlns:a", value: "uri:nsa", prefix: "xmlns", local: "a", uri: "http://www.w3.org/2000/xmlns/" } }, - ns: { a: "uri:nsa" }, isSelfClosing: false } ] - - , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } ] - , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "", - attributes: { "attr": { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } }, - ns: { a: 'uri:nsa' }, - isSelfClosing: true } ] - , [ "closetag", "plain" ] - - , [ "attribute", { name: "a:attr", value: "namespaced", prefix: "a", local: "attr", uri: "uri:nsa" } ] - , [ "opentag", { name: "a:ns", prefix: "a", local: "ns", uri: "uri:nsa", - attributes: { "a:attr": { name: "a:attr", value: "namespaced", prefix: "a", local: "attr", uri: "uri:nsa" } }, - ns: { a: 'uri:nsa' }, - isSelfClosing: true } ] - , [ "closetag", "a:ns" ] - - , [ "closetag", "ns2" ] - - , [ "closenamespace", { prefix: "a", uri: "uri:nsa" } ] - - , [ "closetag", "root" ] - ] - , strict : true - , opt : { xmlns: true } - } - ) - diff --git a/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-unbound.js b/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-unbound.js deleted file mode 100644 index b740e2612..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-unbound.js +++ /dev/null @@ -1,15 +0,0 @@ - -require(__dirname).test( - { strict : true - , opt : { xmlns: true } - , expect : - [ ["error", "Unbound namespace prefix: \"unbound\"\nLine: 0\nColumn: 28\nChar: >"] - - , [ "attribute", { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } ] - , [ "opentag", { name: "root", uri: "", prefix: "", local: "root", - attributes: { "unbound:attr": { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } }, - ns: {}, isSelfClosing: true } ] - , [ "closetag", "root" ] - ] - } -).write("") diff --git a/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-xml-default-ns.js b/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-xml-default-ns.js deleted file mode 100644 index b1984d255..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-xml-default-ns.js +++ /dev/null @@ -1,31 +0,0 @@ -var xmlns_attr = -{ - name: "xmlns", value: "http://foo", prefix: "xmlns", - local: "", uri : "http://www.w3.org/2000/xmlns/" -}; - -var attr_attr = -{ - name: "attr", value: "bar", prefix: "", - local : "attr", uri : "" -}; - - -require(__dirname).test - ( { xml : - "" - , expect : - [ [ "opennamespace", { prefix: "", uri: "http://foo" } ] - , [ "attribute", xmlns_attr ] - , [ "attribute", attr_attr ] - , [ "opentag", { name: "elm", prefix: "", local: "elm", uri : "http://foo", - ns : { "" : "http://foo" }, - attributes: { xmlns: xmlns_attr, attr: attr_attr }, - isSelfClosing: true } ] - , [ "closetag", "elm" ] - , [ "closenamespace", { prefix: "", uri: "http://foo"} ] - ] - , strict : true - , opt : {xmlns: true} - } - ) diff --git a/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js b/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js deleted file mode 100644 index e41f21875..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js +++ /dev/null @@ -1,36 +0,0 @@ -require(__dirname).test( - { xml : "" - , expect : - [ [ "attribute" - , { name: "xml:lang" - , local: "lang" - , prefix: "xml" - , uri: "http://www.w3.org/XML/1998/namespace" - , value: "en" - } - ] - , [ "opentag" - , { name: "root" - , uri: "" - , prefix: "" - , local: "root" - , attributes: - { "xml:lang": - { name: "xml:lang" - , local: "lang" - , prefix: "xml" - , uri: "http://www.w3.org/XML/1998/namespace" - , value: "en" - } - } - , ns: {} - , isSelfClosing: true - } - ] - , ["closetag", "root"] - ] - , strict : true - , opt : { xmlns: true } - } -) - diff --git a/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-xml-default-prefix.js b/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-xml-default-prefix.js deleted file mode 100644 index a85b4787f..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-xml-default-prefix.js +++ /dev/null @@ -1,21 +0,0 @@ -require(__dirname).test( - { xml : "" - , expect : - [ - [ "opentag" - , { name: "xml:root" - , uri: "http://www.w3.org/XML/1998/namespace" - , prefix: "xml" - , local: "root" - , attributes: {} - , ns: {} - , isSelfClosing: true - } - ] - , ["closetag", "xml:root"] - ] - , strict : true - , opt : { xmlns: true } - } -) - diff --git a/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-xml-default-redefine.js b/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-xml-default-redefine.js deleted file mode 100644 index d35d5a0cb..000000000 --- a/cli/node_modules/aws-sdk/node_modules/sax/test/xmlns-xml-default-redefine.js +++ /dev/null @@ -1,41 +0,0 @@ -require(__dirname).test( - { xml : "" - , expect : - [ ["error" - , "xml: prefix must be bound to http://www.w3.org/XML/1998/namespace\n" - + "Actual: ERROR\n" - + "Line: 0\nColumn: 27\nChar: '" - ] - , [ "attribute" - , { name: "xmlns:xml" - , local: "xml" - , prefix: "xmlns" - , uri: "http://www.w3.org/2000/xmlns/" - , value: "ERROR" - } - ] - , [ "opentag" - , { name: "xml:root" - , uri: "http://www.w3.org/XML/1998/namespace" - , prefix: "xml" - , local: "root" - , attributes: - { "xmlns:xml": - { name: "xmlns:xml" - , local: "xml" - , prefix: "xmlns" - , uri: "http://www.w3.org/2000/xmlns/" - , value: "ERROR" - } - } - , ns: {} - , isSelfClosing: true - } - ] - , ["closetag", "xml:root"] - ] - , strict : true - , opt : { xmlns: true } - } -) - diff --git a/cli/node_modules/aws-sdk/node_modules/xml2js/.npmignore b/cli/node_modules/aws-sdk/node_modules/xml2js/.npmignore deleted file mode 100644 index ef7b9b905..000000000 --- a/cli/node_modules/aws-sdk/node_modules/xml2js/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -*.swp -.idea -node_modules -src -test -Cakefile \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/node_modules/xml2js/.travis.yml b/cli/node_modules/aws-sdk/node_modules/xml2js/.travis.yml deleted file mode 100644 index 755a6b73d..000000000 --- a/cli/node_modules/aws-sdk/node_modules/xml2js/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js - -node_js: - - "0.8" - - "0.10" diff --git a/cli/node_modules/aws-sdk/node_modules/xml2js/83.coffee b/cli/node_modules/aws-sdk/node_modules/xml2js/83.coffee deleted file mode 100644 index 3443540fe..000000000 --- a/cli/node_modules/aws-sdk/node_modules/xml2js/83.coffee +++ /dev/null @@ -1,6 +0,0 @@ -xml2js = require 'xml2js' -util = require 'util' - -body = 'Character data here!' -xml2js.parseString body, (err, result) -> - console.log util.inspect result, false, null diff --git a/cli/node_modules/aws-sdk/node_modules/xml2js/LICENSE b/cli/node_modules/aws-sdk/node_modules/xml2js/LICENSE deleted file mode 100644 index e3b4222a6..000000000 --- a/cli/node_modules/aws-sdk/node_modules/xml2js/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2010, 2011, 2012, 2013. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/cli/node_modules/aws-sdk/node_modules/xml2js/README.md b/cli/node_modules/aws-sdk/node_modules/xml2js/README.md deleted file mode 100644 index b0097240a..000000000 --- a/cli/node_modules/aws-sdk/node_modules/xml2js/README.md +++ /dev/null @@ -1,248 +0,0 @@ -node-xml2js -=========== - -Ever had the urge to parse XML? And wanted to access the data in some sane, -easy way? Don't want to compile a C parser, for whatever reason? Then xml2js is -what you're looking for! - -Description -=========== - -Simple XML to JavaScript object converter. Uses -[sax-js](https://github.com/isaacs/sax-js/). - -Note: If you're looking for a full DOM parser, you probably want -[JSDom](https://github.com/tmpvar/jsdom). - -Installation -============ - -Simplest way to install `xml2js` is to use [npm](http://npmjs.org), just `npm -install xml2js` which will download xml2js and all dependencies. - -Usage -===== - -No extensive tutorials required because you are a smart developer! The task of -parsing XML should be an easy one, so let's make it so! Here's some examples. - -Shoot-and-forget usage ----------------------- - -You want to parse XML as simple and easy as possible? It's dangerous to go -alone, take this: - -```javascript -var parseString = require('xml2js').parseString; -var xml = "Hello xml2js!" -parseString(xml, function (err, result) { - console.dir(result); -}); -``` - -Can't get easier than this, right? This works starting with `xml2js` 0.2.3. -With CoffeeScript it looks like this: - -```coffeescript -parseString = require('xml2js').parseString -xml = "Hello xml2js!" -parseString xml, (err, result) -> - console.dir result -``` - -If you need some special options, fear not, `xml2js` supports a number of -options (see below), you can specify these as second argument: - -```javascript -parseString(xml, {trim: true}, function (err, result) { -}); -``` - -Simple as pie usage -------------------- - -That's right, if you have been using xml-simple or a home-grown -wrapper, this is was added in 0.1.11 just for you: - -```javascript -var fs = require('fs'), - xml2js = require('xml2js'); - -var parser = new xml2js.Parser(); -fs.readFile(__dirname + '/foo.xml', function(err, data) { - parser.parseString(data, function (err, result) { - console.dir(result); - console.log('Done'); - }); -}); -``` - -Look ma, no event listeners! - -You can also use `xml2js` from -[CoffeeScript](http://jashkenas.github.com/coffee-script/), further reducing -the clutter: - -```coffeescript -fs = require 'fs', -xml2js = require 'xml2js' - -parser = new xml2js.Parser() -fs.readFile __dirname + '/foo.xml', (err, data) -> - parser.parseString data, (err, result) -> - console.dir result - console.log 'Done.' -``` - -But what happens if you forget the `new` keyword to create a new `Parser`? In -the middle of a nightly coding session, it might get lost, after all. Worry -not, we got you covered! Starting with 0.2.8 you can also leave it out, in -which case `xml2js` will helpfully add it for you, no bad surprises and -inexplicable bugs! - -"Traditional" usage -------------------- - -Alternatively you can still use the traditional `addListener` variant that was -supported since forever: - -```javascript -var fs = require('fs'), - xml2js = require('xml2js'); - -var parser = new xml2js.Parser(); -parser.addListener('end', function(result) { - console.dir(result); - console.log('Done.'); -}); -fs.readFile(__dirname + '/foo.xml', function(err, data) { - parser.parseString(data); -}); -``` - -If you want to parse multiple files, you have multiple possibilites: - - * You can create one `xml2js.Parser` per file. That's the recommended one - and is promised to always *just work*. - * You can call `reset()` on your parser object. - * You can hope everything goes well anyway. This behaviour is not - guaranteed work always, if ever. Use option #1 if possible. Thanks! - -So you wanna some JSON? ------------------------ - -Just wrap the `result` object in a call to `JSON.stringify` like this -`JSON.stringify(result)`. You get a string containing the JSON representation -of the parsed object that you can feed to JSON-hungry consumers. - -Displaying results ------------------- - -You might wonder why, using `console.dir` or `console.log` the output at some -level is only `[Object]`. Don't worry, this is not because xml2js got lazy. -That's because Node uses `util.inspect` to convert the object into strings and -that function stops after `depth=2` which is a bit low for most XML. - -To display the whole deal, you can use `console.log(util.inspect(result, false, -null))`, which displays the whole result. - -So much for that, but what if you use -[eyes](https://github.com/cloudhead/eyes.js) for nice colored output and it -truncates the output with `…`? Don't fear, there's also a solution for that, -you just need to increase the `maxLength` limit by creating a custom inspector -`var inspect = require('eyes').inspector({maxLength: false})` and then you can -easily `inspect(result)`. - -Options -======= - -Apart from the default settings, there is a number of options that can be -specified for the parser. Options are specified by ``new Parser({optionName: -value})``. Possible options are: - - * `attrkey` (default: `$`): Prefix that is used to access the attributes. - Version 0.1 default was `@`. - * `charkey` (default: `_`): Prefix that is used to access the character - content. Version 0.1 default was `#`. - * `explicitCharkey` (default: `false`) - * `trim` (default: `false`): Trim the whitespace at the beginning and end of - text nodes. - * `normalizeTags` (default: `false`): Normalize all tag names to lowercase. - * `normalize` (default: `false`): Trim whitespaces inside text nodes. - * `explicitRoot` (default: `true`): Set this if you want to get the root - node in the resulting object. - * `emptyTag` (default: `undefined`): what will the value of empty nodes be. - Default is `{}`. - * `explicitArray` (default: `true`): Always put child nodes in an array if - true; otherwise an array is created only if there is more than one. - * `ignoreAttrs` (default: `false`): Ignore all XML attributes and only create - text nodes. - * `mergeAttrs` (default: `false`): Merge attributes and child elements as - properties of the parent, instead of keying attributes off a child - attribute object. This option is ignored if `ignoreAttrs` is `false`. - * `validator` (default `null`): You can specify a callable that validates - the resulting structure somehow, however you want. See unit tests - for an example. - * `xmlns` (default `false`): Give each element a field usually called '$ns' - (the first character is the same as attrkey) that contains its local name - and namespace URI. - * `explicitChildren` (default `false`): Put child elements to separate - property. Doesn't work with `mergeAttrs = true`. If element has no children - then "children" won't be created. Added in 0.2.5. - * `childkey` (default `$$`): Prefix that is used to access child elements if - `explicitChildren` is set to `true`. Added in 0.2.5. - * `charsAsChildren` (default `false`): Determines whether chars should be - considered children if `explicitChildren` is on. Added in 0.2.5. - * `async` (default `false`): Should the callbacks be async? This *might* be - an incompatible change if your code depends on sync execution of callbacks. - xml2js 0.3 might change this default, so the recommendation is to not - depend on sync execution anyway. Added in 0.2.6. - * `strict` (default `true`): Set sax-js to strict or non-strict parsing mode. - Defaults to `true` which is *highly* recommended, since parsing HTML which - is not well-formed XML might yield just about anything. Added in 0.2.7. - -Updating to new version -======================= - -Version 0.2 changed the default parsing settings, but version 0.1.14 introduced -the default settings for version 0.2, so these settings can be tried before the -migration. - -```javascript -var xml2js = require('xml2js'); -var parser = new xml2js.Parser(xml2js.defaults["0.2"]); -``` - -To get the 0.1 defaults in version 0.2 you can just use -`xml2js.defaults["0.1"]` in the same place. This provides you with enough time -to migrate to the saner way of parsing in xml2js 0.2. We try to make the -migration as simple and gentle as possible, but some breakage cannot be -avoided. - -So, what exactly did change and why? In 0.2 we changed some defaults to parse -the XML in a more universal and sane way. So we disabled `normalize` and `trim` -so xml2js does not cut out any text content. You can reenable this at will of -course. A more important change is that we return the root tag in the resulting -JavaScript structure via the `explicitRoot` setting, so you need to access the -first element. This is useful for anybody who wants to know what the root node -is and preserves more information. The last major change was to enable -`explicitArray`, so everytime it is possible that one might embed more than one -sub-tag into a tag, xml2js >= 0.2 returns an array even if the array just -includes one element. This is useful when dealing with APIs that return -variable amounts of subtags. - -Running tests, development -========================== - -[![Build Status](https://secure.travis-ci.org/Leonidas-from-XIV/node-xml2js.png?branch=master)](https://travis-ci.org/Leonidas-from-XIV/node-xml2js) - -The development requirements are handled by npm, you just need to install them. -We also have a number of unit tests, they can be run using `npm test` directly -from the project root. This runs zap to discover all the tests and execute -them. - -If you like to contribute, keep in mind that xml2js is written in CoffeeScript, -so don't develop on the JavaScript files that are checked into the repository -for convenience reasons. Also, please write some unit test to check your -behaviour and if it is some user-facing thing, add some documentation to this -README, so people will know it exists. Thanks in advance! diff --git a/cli/node_modules/aws-sdk/node_modules/xml2js/canon.xml b/cli/node_modules/aws-sdk/node_modules/xml2js/canon.xml deleted file mode 100644 index f24ddd130..000000000 --- a/cli/node_modules/aws-sdk/node_modules/xml2js/canon.xml +++ /dev/null @@ -1,482 +0,0 @@ - - - AF485783 - 14758 - double - DNA - circular - SYN - 15-MAY-2003 - 21-MAR-2002 - Binary vector pBI121, complete sequence - AF485783 - AF485783.1 - - gb|AF485783.1| - gi|19569229 - - Binary vector pBI121 - Binary vector pBI121 - other sequences; artificial sequences; vectors - - - 1 - 1..14758 - - Chen,P.Y. - Wang,C.K. - Soong,S.C. - To,K.Y. - - Complete sequence of the binary vector pBI121 and its application in cloning T-DNA insertion from transgenic plants - Mol. Breed. 11, 287-293 (2003) - - - 2 - 1..14758 - - To,K.Y. - - Direct Submission - Submitted (20-FEB-2002) Institute of BioAgricultural Sciences, Academia Sinica, Taipei 11529, Taiwan - - - - - source - 1..14758 - - - 1 - 14758 - AF485783.1 - - - - - organism - Binary vector pBI121 - - - mol_type - genomic DNA - - - db_xref - taxon:189807 - - - note - constructed using pB221 from Clontech Laboratories and Bin19 described in GenBank Accession Number U09365 - - - - - misc_feature - complement(13..796) - - - 796 - 13 - - AF485783.1 - - - - - note - similar to traF in GenBank Accession Number X54459 - - - - - rep_origin - complement(790..1168) - - - 1168 - 790 - - AF485783.1 - - - - - note - ColE1 ori; similar to sequence in GenBank Accession Number V00268 - - - - - misc_feature - complement(1161..2344) - - - 2344 - 1161 - - AF485783.1 - - - - - note - similar to tetA in GenBank Accession Number X75761 - - - - - misc_feature - complement(2454..2478) - - - 2478 - 2454 - - AF485783.1 - - - - - note - T-DNA right border - - - - - promoter - 2519..2825 - - - 2519 - 2825 - AF485783.1 - - - - - note - NOS - - - - - gene - 2838..3632 - - - 2838 - 3632 - AF485783.1 - - - - - gene - nptII - - - - - CDS - 2838..3632 - - - 2838 - 3632 - AF485783.1 - - - - - gene - nptII - - - codon_start - 1 - - - transl_table - 1 - - - product - neomycin phosphotransferase II - - - protein_id - AAL92039.1 - - - db_xref - GI:19569230 - - - translation - MIEQDGLHAGSPAAWVERLFGYDWAQQTIGCSDAAVFRLSAQGRPVLFVKTDLSGALNELQDEAARLSWLATTGVPCAAVLDVVTEAGRDWLLLGEVPGQDLLSSHLAPAEKVSIMADAMRRLHTLDPATCPFDHQAKHRIERARTRMEAGLVDQDDLDEEHQGLAPAELFARLKARMPDGDDLVVTHGDACLPNIMVENGRFSGFIDCGRLGVADRYQDIALATRDIAEELGGEWADRFLVLYGIAAPDSQRIAFYRLLDEFF - - - - - terminator - 4022..4277 - - - 4022 - 4277 - AF485783.1 - - - - - note - NOS - - - - - promoter - 4974..5808 - - - 4974 - 5808 - AF485783.1 - - - - - note - CaMV 35S - - - - - gene - 5845..7656 - - - 5845 - 7656 - AF485783.1 - - - - - gene - gusA - - - - - CDS - 5845..7656 - - - 5845 - 7656 - AF485783.1 - - - - - gene - gusA - - - note - GUS - - - codon_start - 1 - - - transl_table - 1 - - - product - beta-glucuronidase - - - protein_id - AAL92040.1 - - - db_xref - GI:19569231 - - - translation - MLRPVETPTREIKKLDGLWAFSLDRENCGIDQRWWESALQESRAIAVPGSFNDQFADADIRNYAGNVWYQREVFIPKGWAGQRIVLRFDAVTHYGKVWVNNQEVMEHQGGYTPFEADVTPYVIAGKSVRITVCVNNELNWQTIPPGMVITDENGKKKQSYFHDFFNYAGIHRSVMLYTTPNTWVDDITVVTHVAQDCNHASVDWQVVANGDVSVELRDADQQVVATGQGTSGTLQVVNPHLWQPGEGYLYELCVTAKSQTECDIYPLRVGIRSVAVKGEQFLINHKPFYFTGFGRHEDADLRGKGFDNVLMVHDHALMDWIGANSYRTSHYPYAEEMLDWADEHGIVVIDETAAVGFNLSLGIGFEAGNKPKELYSEEAVNGETQQAHLQAIKELIARDKNHPSVVMWSIANEPDTRPQGAREYFAPLAEATRKLDPTRPITCVNVMFCDAHTDTISDLFDVLCLNRYYGWYVQSGDLETAEKVLEKELLAWQEKLHQPIIITEYGVDTLAGLHSMYTDMWSEEYQCAWLDMYHRVFDRVSAVVGEQVWNFADFATSQGILRVGGNKKGIFTRDRKPKSAAFLLQKRWTGMNFGEKPQQGGKQ - - - - - terminator - 7727..7979 - - - 7727 - 7979 - AF485783.1 - - - - - note - NOS - - - - - misc_feature - complement(8621..8646) - - - 8646 - 8621 - - AF485783.1 - - - - - note - T-DNA left border - - - - - misc_feature - complement(9156..10198) - - - 10198 - 9156 - - AF485783.1 - - - - - note - similar to tetA in GenBank Accession Number L13842 - - - - - misc_feature - complement(10199..11680) - - - 11680 - 10199 - - AF485783.1 - - - - - note - similar to trfA in GenBank Accession Number X00713 - - - - - misc_feature - complement(11681..12673) - - - 12673 - 11681 - - AF485783.1 - - - - - note - similar to NPTIII gene in GenBank Accession Number V01547 - - - - - misc_feature - complement(12674..13443) - - - 13443 - 12674 - - AF485783.1 - - - - - note - similar to transposable element IS1 in GenBank Accession Number X58999 - - - - - misc_feature - complement(13444..13794) - - - 13794 - 13444 - - AF485783.1 - - - - - note - similarity to NPT III gene in GenBank Accession Number V01547 - - - - - misc_feature - complement(13795..14066) - - - 14066 - 13795 - - AF485783.1 - - - - - note - similar to kilA in GenBank Accession Number M62846 - - - - - rep_origin - complement(14141..14758) - - - 14758 - 14141 - - AF485783.1 - - - - - note - ori V; similar to sequence in GenBank Accession Number M20134 - - - - - tgagcgtcgcaaaggcgctcggtcttgccttgctcgtcggtgatgtacttcaccagctccgcgaagtcgctcttcttgatggagcgcatggggacgtgcttggcaatcacgcgcaccccccggccgttttagcggctaaaaaagtcatggctctgccctcgggcggaccacgcccatcatgaccttgccaagctcgtcctgcttctcttcgatcttcgccagcagggcgaggatcgtggcatcaccgaaccgcgccgtgcgcgggtcgtcggtgagccagagtttcagcaggccgcccaggcggcccaggtcgccattgatgcgggccagctcgcggacgtgctcatagtccacgacgcccgtgattttgtagccctggccgacggccagcaggtaggccgacaggctcatgccggccgccgccgccttttcctcaatcgctcttcgttcgtctggaaggcagtacaccttgataggtgggctgcccttcctggttggcttggtttcatcagccatccgcttgccctcatctgttacgccggcggtagccggccagcctcgcagagcaggattcccgttgagcaccgccaggtgcgaataagggacagtgaagaaggaacacccgctcgcgggtgggcctacttcacctatcctgcccggctgacgccgttggatacaccaaggaaagtctacacgaaccctttggcaaaatcctgtatatcgtgcgaaaaaggatggatataccgaaaaaatcgctataatgaccccgaagcagggttatgcagcggaaaagcgccacgcttcccgaagggagaaaggcggacaggtatccggtaagcggcagggtcggaacaggagagcgcacgagggagcttccagggggaaacgcctggtatctttatagtcctgtcgggtttcgccacctctgacttgagcgtcgatttttgtgatgctcgtcaggggggcggagcctatggaaaaacgccagcaacgcggcctttttacggttcctggccttttgctggccttttgctcacatgttctttcctgcgttatcccctgattctgtggataaccgtattaccgcctttgagtgagctgataccgctcgccgcagccgaacgaccgagcgcagcgagtcagtgagcgaggaagcggaagagcgccagaaggccgccagagaggccgagcgcggccgtgaggcttggacgctagggcagggcatgaaaaagcccgtagcgggctgctacgggcgtctgacgcggtggaaagggggaggggatgttgtctacatggctctgctgtagtgagtgggttgcgctccggcagcggtcctgatcaatcgtcaccctttctcggtccttcaacgttcctgacaacgagcctccttttcgccaatccatcgacaatcaccgcgagtccctgctcgaacgctgcgtccggaccggcttcgtcgaaggcgtctatcgcggcccgcaacagcggcgagagcggagcctgttcaacggtgccgccgcgctcgccggcatcgctgtcgccggcctgctcctcaagcacggccccaacagtgaagtagctgattgtcatcagcgcattgacggcgtccccggccgaaaaacccgcctcgcagaggaagcgaagctgcgcgtcggccgtttccatctgcggtgcgcccggtcgcgtgccggcatggatgcgcgcgccatcgcggtaggcgagcagcgcctgcctgaagctgcgggcattcccgatcagaaatgagcgccagtcgtcgtcggctctcggcaccgaatgcgtatgattctccgccagcatggcttcggccagtgcgtcgagcagcgcccgcttgttcctgaagtgccagtaaagcgccggctgctgaacccccaaccgttccgccagtttgcgtgtcgtcagaccgtctacgccgacctcgttcaacaggtccagggcggcacggatcactgtattcggctgcaactttgtcatgcttgacactttatcactgataaacataatatgtccaccaacttatcagtgataaagaatccgcgcgttcaatcggaccagcggaggctggtccggaggccagacgtgaaacccaacatacccctgatcgtaattctgagcactgtcgcgctcgacgctgtcggcatcggcctgattatgccggtgctgccgggcctcctgcgcgatctggttcactcgaacgacgtcaccgcccactatggcattctgctggcgctgtatgcgttggtgcaatttgcctgcgcacctgtgctgggcgcgctgtcggatcgtttcgggcggcggccaatcttgctcgtctcgctggccggcgccagatctggggaaccctgtggttggcatgcacatacaaatggacgaacggataaaccttttcacgcccttttaaatatccgattattctaataaacgctcttttctcttaggtttacccgccaatatatcctgtcaaacactgatagtttaaactgaaggcgggaaacgacaatctgatcatgagcggagaattaagggagtcacgttatgacccccgccgatgacgcgggacaagccgttttacgtttggaactgacagaaccgcaacgttgaaggagccactcagccgcgggtttctggagtttaatgagctaagcacatacgtcagaaaccattattgcgcgttcaaaagtcgcctaaggtcactatcagctagcaaatatttcttgtcaaaaatgctccactgacgttccataaattcccctcggtatccaattagagtctcatattcactctcaatccaaataatctgcaccggatctggatcgtttcgcatgattgaacaagatggattgcacgcaggttctccggccgcttgggtggagaggctattcggctatgactgggcacaacagacaatcggctgctctgatgccgccgtgttccggctgtcagcgcaggggcgcccggttctttttgtcaagaccgacctgtccggtgccctgaatgaactgcaggacgaggcagcgcggctatcgtggctggccacgacgggcgttccttgcgcagctgtgctcgacgttgtcactgaagcgggaagggactggctgctattgggcgaagtgccggggcaggatctcctgtcatctcaccttgctcctgccgagaaagtatccatcatggctgatgcaatgcggcggctgcatacgcttgatccggctacctgcccattcgaccaccaagcgaaacatcgcatcgagcgagcacgtactcggatggaagccggtcttgtcgatcaggatgatctggacgaagagcatcaggggctcgcgccagccgaactgttcgccaggctcaaggcgcgcatgcccgacggcgatgatctcgtcgtgacccatggcgatgcctgcttgccgaatatcatggtggaaaatggccgcttttctggattcatcgactgtggccggctgggtgtggcggaccgctatcaggacatagcgttggctacccgtgatattgctgaagagcttggcggcgaatgggctgaccgcttcctcgtgctttacggtatcgccgctcccgattcgcagcgcatcgccttctatcgccttcttgacgagttcttctgagcgggactctggggttcgaaatgaccgaccaagcgacgcccaacctgccatcacgagatttcgattccaccgccgccttctatgaaaggttgggcttcggaatcgttttccgggacgccggctggatgatcctccagcgcggggatctcatgctggagttcttcgcccacgggatctctgcggaacaggcggtcgaaggtgccgatatcattacgacagcaacggccgacaagcacaacgccacgatcctgagcgacaatatgatcgggcccggcgtccacatcaacggcgtcggcggcgactgcccaggcaagaccgagatgcaccgcgatatcttgctgcgttcggatattttcgtggagttcccgccacagacccggatgatccccgatcgttcaaacatttggcaataaagtttcttaagattgaatcctgttgccggtcttgcgatgattatcatataatttctgttgaattacgttaagcatgtaataattaacatgtaatgcatgacgttatttatgagatgggtttttatgattagagtcccgcaattatacatttaatacgcgatagaaaacaaaatatagcgcgcaaactaggataaattatcgcgcgcggtgtcatctatgttactagatcgggcctcctgtcaatgctggcggcggctctggtggtggttctggtggcggctctgagggtggtggctctgagggtggcggttctgagggtggcggctctgagggaggcggttccggtggtggctctggttccggtgattttgattatgaaaagatggcaaacgctaataagggggctatgaccgaaaatgccgatgaaaacgcgctacagtctgacgctaaaggcaaacttgattctgtcgctactgattacggtgctgctatcgatggtttcattggtgacgtttccggccttgctaatggtaatggtgctactggtgattttgctggctctaattcccaaatggctcaagtcggtgacggtgataattcacctttaatgaataatttccgtcaatatttaccttccctccctcaatcggttgaatgtcgcccttttgtctttggcccaatacgcaaaccgcctctccccgcgcgttggccgattcattaatgcagctggcacgacaggtttcccgactggaaagcgggcagtgagcgcaacgcaattaatgtgagttagctcactcattaggcaccccaggctttacactttatgcttccggctcgtatgttgtgtggaattgtgagcggataacaatttcacacaggaaacagctatgaccatgattacgccaagcttgcatgcctgcaggtccccagattagccttttcaatttcagaaagaatgctaacccacagatggttagagaggcttacgcagcaggtctcatcaagacgatctacccgagcaataatctccaggaaatcaaataccttcccaagaaggttaaagatgcagtcaaaagattcaggactaactgcatcaagaacacagagaaagatatatttctcaagatcagaagtactattccagtatggacgattcaaggcttgcttcacaaaccaaggcaagtaatagagattggagtctctaaaaaggtagttcccactgaatcaaaggccatggagtcaaagattcaaatagaggacctaacagaactcgccgtaaagactggcgaacagttcatacagagtctcttacgactcaatgacaagaagaaaatcttcgtcaacatggtggagcacgacacacttgtctactccaaaaatatcaaagatacagtctcagaagaccaaagggcaattgagacttttcaacaaagggtaatatccggaaacctcctcggattccattgcccagctatctgtcactttattgtgaagatagtggaaaaggaaggtggctcctacaaatgccatcattgcgataaaggaaaggccatcgttgaagatgcctctgccgacagtggtcccaaagatggacccccacccacgaggagcatcgtggaaaaagaagacgttccaaccacgtcttcaaagcaagtggattgatgtgatatctccactgacgtaagggatgacgcacaatcccactatccttcgcaagacccttcctctatataaggaagttcatttcatttggagagaacacgggggactctagaggatccccgggtggtcagtcccttatgttacgtcctgtagaaaccccaacccgtgaaatcaaaaaactcgacggcctgtgggcattcagtctggatcgcgaaaactgtggaattgatcagcgttggtgggaaagcgcgttacaagaaagccgggcaattgctgtgccaggcagttttaacgatcagttcgccgatgcagatattcgtaattatgcgggcaacgtctggtatcagcgcgaagtctttataccgaaaggttgggcaggccagcgtatcgtgctgcgtttcgatgcggtcactcattacggcaaagtgtgggtcaataatcaggaagtgatggagcatcagggcggctatacgccatttgaagccgatgtcacgccgtatgttattgccgggaaaagtgtacgtatcaccgtttgtgtgaacaacgaactgaactggcagactatcccgccgggaatggtgattaccgacgaaaacggcaagaaaaagcagtcttacttccatgatttctttaactatgccggaatccatcgcagcgtaatgctctacaccacgccgaacacctgggtggacgatatcaccgtggtgacgcatgtcgcgcaagactgtaaccacgcgtctgttgactggcaggtggtggccaatggtgatgtcagcgttgaactgcgtgatgcggatcaacaggtggttgcaactggacaaggcactagcgggactttgcaagtggtgaatccgcacctctggcaaccgggtgaaggttatctctatgaactgtgcgtcacagccaaaagccagacagagtgtgatatctacccgcttcgcgtcggcatccggtcagtggcagtgaagggcgaacagttcctgattaaccacaaaccgttctactttactggctttggtcgtcatgaagatgcggacttgcgtggcaaaggattcgataacgtgctgatggtgcacgaccacgcattaatggactggattggggccaactcctaccgtacctcgcattacccttacgctgaagagatgctcgactgggcagatgaacatggcatcgtggtgattgatgaaactgctgctgtcggctttaacctctctttaggcattggtttcgaagcgggcaacaagccgaaagaactgtacagcgaagaggcagtcaacggggaaactcagcaagcgcacttacaggcgattaaagagctgatagcgcgtgacaaaaaccacccaagcgtggtgatgtggagtattgccaacgaaccggatacccgtccgcaaggtgcacgggaatatttcgcgccactggcggaagcaacgcgtaaactcgacccgacgcgtccgatcacctgcgtcaatgtaatgttctgcgacgctcacaccgataccatcagcgatctctttgatgtgctgtgcctgaaccgttattacggatggtatgtccaaagcggcgatttggaaacggcagagaaggtactggaaaaagaacttctggcctggcaggagaaactgcatcagccgattatcatcaccgaatacggcgtggatacgttagccgggctgcactcaatgtacaccgacatgtggagtgaagagtatcagtgtgcatggctggatatgtatcaccgcgtctttgatcgcgtcagcgccgtcgtcggtgaacaggtatggaatttcgccgattttgcgacctcgcaaggcatattgcgcgttggcggtaacaagaaagggatcttcactcgcgaccgcaaaccgaagtcggcggcttttctgctgcaaaaacgctggactggcatgaacttcggtgaaaaaccgcagcagggaggcaaacaatgaatcaacaactctcctggcgcaccatcgtcggctacagcctcgggaattgctaccgagctcgaatttccccgatcgttcaaacatttggcaataaagtttcttaagattgaatcctgttgccggtcttgcgatgattatcatataatttctgttgaattacgttaagcatgtaataattaacatgtaatgcatgacgttatttatgagatgggtttttatgattagagtcccgcaattatacatttaatacgcgatagaaaacaaaatatagcgcgcaaactaggataaattatcgcgcgcggtgtcatctatgttactagatcgggaattcactggccgtcgttttacaacgtcgtgactgggaaaaccctggcgttacccaacttaatcgccttgcagcacatccccctttcgccagctggcgtaatagcgaagaggcccgcaccgatcgcccttcccaacagttgcgcagcctgaatggcgcccgctcctttcgctttcttcccttcctttctcgccacgttcgccggctttccccgtcaagctctaaatcgggggctccctttagggttccgatttagtgctttacggcacctcgaccccaaaaaacttgatttgggtgatggttcacgtagtgggccatcgccctgatagacggtttttcgccctttgacgttggagtccacgttctttaatagtggactcttgttccaaactggaacaacactcaaccctatctcgggctattcttttgatttataagggattttgccgatttcggaaccaccatcaaacaggattttcgcctgctggggcaaaccagcgtggaccgcttgctgcaactctctcagggccaggcggtgaagggcaatcagctgttgcccgtctcactggtgaaaagaaaaaccaccccagtacattaaaaacgtccgcaatgtgttattaagttgtctaagcgtcaatttgtttacaccacaatatatcctgccaccagccagccaacagctccccgaccggcagctcggcacaaaatcaccactcgatacaggcagcccatcagtccgggacggcgtcagcgggagagccgttgtaaggcggcagactttgctcatgttaccgatgctattcggaagaacggcaactaagctgccgggtttgaaacacggatgatctcgcggagggtagcatgttgattgtaacgatgacagagcgttgctgcctgtgatcaaatatcatctccctcgcagagatccgaattatcagccttcttattcatttctcgcttaaccgtgacaggctgtcgatcttgagaactatgccgacataataggaaatcgctggataaagccgctgaggaagctgagtggcgctatttctttagaagtgaacgttgacgatatcaactcccctatccattgctcaccgaatggtacaggtcggggacccgaagttccgactgtcggcctgatgcatccccggctgatcgaccccagatctggggctgagaaagcccagtaaggaaacaactgtaggttcgagtcgcgagatcccccggaaccaaaggaagtaggttaaacccgctccgatcaggccgagccacgccaggccgagaacattggttcctgtaggcatcgggattggcggatcaaacactaaagctactggaacgagcagaagtcctccggccgccagttgccaggcggtaaaggtgagcagaggcacgggaggttgccacttgcgggtcagcacggttccgaacgccatggaaaccgcccccgccaggcccgctgcgacgccgacaggatctagcgctgcgtttggtgtcaacaccaacagcgccacgcccgcagttccgcaaatagcccccaggaccgccatcaatcgtatcgggctacctagcagagcggcagagatgaacacgaccatcagcggctgcacagcgcctaccgtcgccgcgaccccgcccggcaggcggtagaccgaaataaacaacaagctccagaatagcgaaatattaagtgcgccgaggatgaagatgcgcatccaccagattcccgttggaatctgtcggacgatcatcacgagcaataaacccgccggcaacgcccgcagcagcataccggcgacccctcggcctcgctgttcgggctccacgaaaacgccggacagatgcgccttgtgagcgtccttggggccgtcctcctgtttgaagaccgacagcccaatgatctcgccgtcgatgtaggcgccgaatgccacggcatctcgcaaccgttcagcgaacgcctccatgggctttttctcctcgtgctcgtaaacggacccgaacatctctggagctttcttcagggccgacaatcggatctcgcggaaatcctgcacgtcggccgctccaagccgtcgaatctgagccttaatcacaattgtcaattttaatcctctgtttatcggcagttcgtagagcgcgccgtgcgtcccgagcgatactgagcgaagcaagtgcgtcgagcagtgcccgcttgttcctgaaatgccagtaaagcgctggctgctgaacccccagccggaactgaccccacaaggccctagcgtttgcaatgcaccaggtcatcattgacccaggcgtgttccaccaggccgctgcctcgcaactcttcgcaggcttcgccgacctgctcgcgccacttcttcacgcgggtggaatccgatccgcacatgaggcggaaggtttccagcttgagcgggtacggctcccggtgcgagctgaaatagtcgaacatccgtcgggccgtcggcgacagcttgcggtacttctcccatatgaatttcgtgtagtggtcgccagcaaacagcacgacgatttcctcgtcgatcaggacctggcaacgggacgttttcttgccacggtccaggacgcggaagcggtgcagcagcgacaccgattccaggtgcccaacgcggtcggacgtgaagcccatcgccgtcgcctgtaggcgcgacaggcattcctcggccttcgtgtaataccggccattgatcgaccagcccaggtcctggcaaagctcgtagaacgtgaaggtgatcggctcgccgataggggtgcgcttcgcgtactccaacacctgctgccacaccagttcgtcatcgtcggcccgcagctcgacgccggtgtaggtgatcttcacgtccttgttgacgtggaaaatgaccttgttttgcagcgcctcgcgcgggattttcttgttgcgcgtggtgaacagggcagagcgggccgtgtcgtttggcatcgctcgcatcgtgtccggccacggcgcaatatcgaacaaggaaagctgcatttccttgatctgctgcttcgtgtgtttcagcaacgcggcctgcttggcctcgctgacctgttttgccaggtcctcgccggcggtttttcgcttcttggtcgtcatagttcctcgcgtgtcgatggtcatcgacttcgccaaacctgccgcctcctgttcgagacgacgcgaacgctccacggcggccgatggcgcgggcagggcagggggagccagttgcacgctgtcgcgctcgatcttggccgtagcttgctggaccatcgagccgacggactggaaggtttcgcggggcgcacgcatgacggtgcggcttgcgatggtttcggcatcctcggcggaaaaccccgcgtcgatcagttcttgcctgtatgccttccggtcaaacgtccgattcattcaccctccttgcgggattgccccgactcacgccggggcaatgtgcccttattcctgatttgacccgcctggtgccttggtgtccagataatccaccttatcggcaatgaagtcggtcccgtagaccgtctggccgtccttctcgtacttggtattccgaatcttgccctgcacgaataccagcgaccccttgcccaaatacttgccgtgggcctcggcctgagagccaaaacacttgatgcggaagaagtcggtgcgctcctgcttgtcgccggcatcgttgcgccacatctaggtactaaaacaattcatccagtaaaatataatattttattttctcccaatcaggcttgatccccagtaagtcaaaaaatagctcgacatactgttcttccccgatatcctccctgatcgaccggacgcagaaggcaatgtcataccacttgtccgccctgccgcttctcccaagatcaataaagccacttactttgccatctttcacaaagatgttgctgtctcccaggtcgccgtgggaaaagacaagttcctcttcgggcttttccgtctttaaaaaatcatacagctcgcgcggatctttaaatggagtgtcttcttcccagttttcgcaatccacatcggccagatcgttattcagtaagtaatccaattcggctaagcggctgtctaagctattcgtatagggacaatccgatatgtcgatggagtgaaagagcctgatgcactccgcatacagctcgataatcttttcagggctttgttcatcttcatactcttccgagcaaaggacgccatcggcctcactcatgagcagattgctccagccatcatgccgttcaaagtgcaggacctttggaacaggcagctttccttccagccatagcatcatgtccttttcccgttccacatcataggtggtccctttataccggctgtccgtcatttttaaatataggttttcattttctcccaccagcttatataccttagcaggagacattccttccgtatcttttacgcagcggtatttttcgatcagttttttcaattccggtgatattctcattttagccatttattatttccttcctcttttctacagtatttaaagataccccaagaagctaattataacaagacgaactccaattcactgttccttgcattctaaaaccttaaataccagaaaacagctttttcaaagttgttttcaaagttggcgtataacatagtatcgacggagccgattttgaaaccacaattatgggtgatgctgccaacttactgatttagtgtatgatggtgtttttgaggtgctccagtggcttctgtgtctatcagctgtccctcctgttcagctactgacggggtggtgcgtaacggcaaaagcaccgccggacatcagcgctatctctgctctcactgccgtaaaacatggcaactgcagttcacttacaccgcttctcaacccggtacgcaccagaaaatcattgatatggccatgaatggcgttggatgccgggcaacagcccgcattatgggcgttggcctcaacacgattttacgtcacttaaaaaactcaggccgcagtcggtaacctcgcgcatacagccgggcagtgacgtcatcgtctgcgcggaaatggacgaacagtggggctatgtcggggctaaatcgcgccagcgctggctgttttacgcgtatgacagtctccggaagacggttgttgcgcacgtattcggtgaacgcactatggcgacgctggggcgtcttatgagcctgctgtcaccctttgacgtggtgatatggatgacggatggctggccgctgtatgaatcccgcctgaagggaaagctgcacgtaatcagcaagcgatatacgcagcgaattgagcggcataacctgaatctgaggcagcacctggcacggctgggacggaagtcgctgtcgttctcaaaatcggtggagctgcatgacaaagtcatcgggcattatctgaacataaaacactatcaataagttggagtcattacccaattatgatagaatttacaagctataaggttattgtcctgggtttcaagcattagtccatgcaagtttttatgctttgcccattctatagatatattgataagcgcgctgcctatgccttgccccctgaaatccttacatacggcgatatcttctatataaaagatatattatcttatcagtattgtcaatatattcaaggcaatctgcctcctcatcctcttcatcctcttcgtcttggtagctttttaaatatggcgcttcatagagtaattctgtaaaggtccaattctcgttttcatacctcggtataatcttacctatcacctcaaatggttcgctgggtttatcgcacccccgaacacgagcacggcacccgcgaccactatgccaagaatgcccaaggtaaaaattgccggccccgccatgaagtccgtgaatgccccgacggccgaagtgaagggcaggccgccacccaggccgccgccctcactgcccggcacctggtcgctgaatgtcgatgccagcacctgcggcacgtcaatgcttccgggcgtcgcgctcgggctgatcgcccatcccgttactgccccgatcccggcaatggcaaggactgccagcgctgccatttttggggtgaggccgttcgcggccgaggggcgcagcccctggggggatgggaggcccgcgttagcgggccgggagggttcgagaagggggggcaccccccttcggcgtgcgcggtcacgcgcacagggcgcagccctggttaaaaacaaggtttataaatattggtttaaaagcaggttaaaagacaggttagcggtggccgaaaaacgggcggaaacccttgcaaatgctggattttctgcctgtggacagcccctcaaatgtcaataggtgcgcccctcatctgtcagcactctgcccctcaagtgtcaaggatcgcgcccctcatctgtcagtagtcgcgcccctcaagtgtcaataccgcagggcacttatccccaggcttgtccacatcatctgtgggaaactcgcgtaaaatcaggcgttttcgccgatttgcgaggctggccagctccacgtcgccggccgaaatcgagcctgcccctcatctgtcaacgccgcgccgggtgagtcggcccctcaagtgtcaacgtccgcccctcatctgtcagtgagggccaagttttccgcgaggtatccacaacgccggcggccgcggtgtctcgcacacggcttcgacggcgtttctggcgcgtttgcagggccatagacggccgccagcccagcggcgagggcaaccagcccgg - - - \ No newline at end of file diff --git a/cli/node_modules/aws-sdk/node_modules/xml2js/lib/xml2js.js b/cli/node_modules/aws-sdk/node_modules/xml2js/lib/xml2js.js deleted file mode 100644 index bec8a2108..000000000 --- a/cli/node_modules/aws-sdk/node_modules/xml2js/lib/xml2js.js +++ /dev/null @@ -1,299 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var events, isEmpty, sax, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - - sax = require('sax'); - - events = require('events'); - - isEmpty = function(thing) { - return typeof thing === "object" && (thing != null) && Object.keys(thing).length === 0; - }; - - exports.defaults = { - "0.1": { - explicitCharkey: false, - trim: true, - normalize: true, - normalizeTags: false, - attrkey: "@", - charkey: "#", - explicitArray: false, - ignoreAttrs: false, - mergeAttrs: false, - explicitRoot: false, - validator: null, - xmlns: false, - explicitChildren: false, - childkey: '@@', - charsAsChildren: false, - async: false, - strict: true - }, - "0.2": { - explicitCharkey: false, - trim: false, - normalize: false, - normalizeTags: false, - attrkey: "$", - charkey: "_", - explicitArray: true, - ignoreAttrs: false, - mergeAttrs: false, - explicitRoot: true, - validator: null, - xmlns: false, - explicitChildren: false, - childkey: '$$', - charsAsChildren: false, - async: false, - strict: true - } - }; - - exports.ValidationError = (function(_super) { - __extends(ValidationError, _super); - - function ValidationError(message) { - this.message = message; - } - - return ValidationError; - - })(Error); - - exports.Parser = (function(_super) { - __extends(Parser, _super); - - function Parser(opts) { - this.parseString = __bind(this.parseString, this); - this.reset = __bind(this.reset, this); - var key, value, _ref; - if (!(this instanceof exports.Parser)) { - return new exports.Parser(opts); - } - this.options = {}; - _ref = exports.defaults["0.2"]; - for (key in _ref) { - if (!__hasProp.call(_ref, key)) continue; - value = _ref[key]; - this.options[key] = value; - } - for (key in opts) { - if (!__hasProp.call(opts, key)) continue; - value = opts[key]; - this.options[key] = value; - } - if (this.options.xmlns) { - this.options.xmlnskey = this.options.attrkey + "ns"; - } - this.reset(); - } - - Parser.prototype.reset = function() { - var attrkey, charkey, err, ontext, stack, - _this = this; - this.removeAllListeners(); - this.saxParser = sax.parser(this.options.strict, { - trim: false, - normalize: false, - xmlns: this.options.xmlns - }); - err = false; - this.saxParser.onerror = function(error) { - if (!err) { - err = true; - return _this.emit("error", error); - } - }; - this.EXPLICIT_CHARKEY = this.options.explicitCharkey; - this.resultObject = null; - stack = []; - attrkey = this.options.attrkey; - charkey = this.options.charkey; - this.saxParser.onopentag = function(node) { - var key, obj, _ref; - obj = {}; - obj[charkey] = ""; - if (!_this.options.ignoreAttrs) { - _ref = node.attributes; - for (key in _ref) { - if (!__hasProp.call(_ref, key)) continue; - if (!(attrkey in obj) && !_this.options.mergeAttrs) { - obj[attrkey] = {}; - } - if (_this.options.mergeAttrs) { - obj[key] = node.attributes[key]; - } else { - obj[attrkey][key] = node.attributes[key]; - } - } - } - obj["#name"] = _this.options.normalizeTags ? node.name.toLowerCase() : node.name; - if (_this.options.xmlns) { - obj[_this.options.xmlnskey] = { - uri: node.uri, - local: node.local - }; - } - return stack.push(obj); - }; - this.saxParser.onclosetag = function() { - var cdata, emptyStr, node, nodeName, obj, old, s, xpath; - obj = stack.pop(); - nodeName = obj["#name"]; - delete obj["#name"]; - cdata = obj.cdata; - delete obj.cdata; - s = stack[stack.length - 1]; - if (obj[charkey].match(/^\s*$/) && !cdata) { - emptyStr = obj[charkey]; - delete obj[charkey]; - } else { - if (_this.options.trim) { - obj[charkey] = obj[charkey].trim(); - } - if (_this.options.normalize) { - obj[charkey] = obj[charkey].replace(/\s{2,}/g, " ").trim(); - } - if (Object.keys(obj).length === 1 && charkey in obj && !_this.EXPLICIT_CHARKEY) { - obj = obj[charkey]; - } - } - if (isEmpty(obj)) { - obj = _this.options.emptyTag !== void 0 ? _this.options.emptyTag : emptyStr; - } - if (_this.options.validator != null) { - xpath = "/" + ((function() { - var _i, _len, _results; - _results = []; - for (_i = 0, _len = stack.length; _i < _len; _i++) { - node = stack[_i]; - _results.push(node["#name"]); - } - return _results; - })()).concat(nodeName).join("/"); - try { - obj = _this.options.validator(xpath, s && s[nodeName], obj); - } catch (_error) { - err = _error; - _this.emit("error", err); - } - } - if (_this.options.explicitChildren && !_this.options.mergeAttrs && typeof obj === 'object') { - node = {}; - if (_this.options.attrkey in obj) { - node[_this.options.attrkey] = obj[_this.options.attrkey]; - delete obj[_this.options.attrkey]; - } - if (!_this.options.charsAsChildren && _this.options.charkey in obj) { - node[_this.options.charkey] = obj[_this.options.charkey]; - delete obj[_this.options.charkey]; - } - if (Object.getOwnPropertyNames(obj).length > 0) { - node[_this.options.childkey] = obj; - } - obj = node; - } - if (stack.length > 0) { - if (!_this.options.explicitArray) { - if (!(nodeName in s)) { - return s[nodeName] = obj; - } else if (s[nodeName] instanceof Array) { - return s[nodeName].push(obj); - } else { - old = s[nodeName]; - s[nodeName] = [old]; - return s[nodeName].push(obj); - } - } else { - if (!(s[nodeName] instanceof Array)) { - s[nodeName] = []; - } - return s[nodeName].push(obj); - } - } else { - if (_this.options.explicitRoot) { - old = obj; - obj = {}; - obj[nodeName] = old; - } - _this.resultObject = obj; - return _this.emit("end", _this.resultObject); - } - }; - ontext = function(text) { - var s; - s = stack[stack.length - 1]; - if (s) { - s[charkey] += text; - return s; - } - }; - this.saxParser.ontext = ontext; - return this.saxParser.oncdata = function(text) { - var s; - s = ontext(text); - if (s) { - return s.cdata = true; - } - }; - }; - - Parser.prototype.parseString = function(str, cb) { - if ((cb != null) && typeof cb === "function") { - this.on("end", function(result) { - this.reset(); - if (this.options.async) { - return process.nextTick(function() { - return cb(null, result); - }); - } else { - return cb(null, result); - } - }); - this.on("error", function(err) { - this.reset(); - if (this.options.async) { - return process.nextTick(function() { - return cb(err); - }); - } else { - return cb(err); - } - }); - } - if (str.toString().trim() === '') { - this.emit("end", null); - return true; - } - return this.saxParser.write(str.toString()); - }; - - return Parser; - - })(events.EventEmitter); - - exports.parseString = function(str, a, b) { - var cb, options, parser; - if (b != null) { - if (typeof b === 'function') { - cb = b; - } - if (typeof a === 'object') { - options = a; - } - } else { - if (typeof a === 'function') { - cb = a; - } - options = {}; - } - parser = new exports.Parser(options); - return parser.parseString(str, cb); - }; - -}).call(this); diff --git a/cli/node_modules/aws-sdk/node_modules/xml2js/package.json b/cli/node_modules/aws-sdk/node_modules/xml2js/package.json deleted file mode 100644 index 68bcb203d..000000000 --- a/cli/node_modules/aws-sdk/node_modules/xml2js/package.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "name": "xml2js", - "description": "Simple XML to JavaScript object converter.", - "keywords": [ - "xml", - "json" - ], - "homepage": "https://github.com/Leonidas-from-XIV/node-xml2js", - "version": "0.2.8", - "author": { - "name": "Marek Kubica", - "email": "marek@xivilization.net", - "url": "http://xivilization.net" - }, - "contributors": [ - { - "name": "maqr", - "email": "maqr.lollerskates@gmail.com", - "url": "https://github.com/maqr" - }, - { - "name": "Ben Weaver", - "url": "http://benweaver.com/" - }, - { - "name": "Jae Kwon", - "url": "https://github.com/jaekwon" - }, - { - "name": "Jim Robert" - }, - { - "name": "Ștefan Rusu", - "url": "http://www.saltwaterc.eu/" - }, - { - "name": "Carter Cole", - "email": "carter.cole@cartercole.com", - "url": "http://cartercole.com/" - }, - { - "name": "Kurt Raschke", - "email": "kurt@kurtraschke.com", - "url": "http://www.kurtraschke.com/" - }, - { - "name": "Contra", - "email": "contra@australia.edu", - "url": "https://github.com/Contra" - }, - { - "name": "Marcelo Diniz", - "email": "marudiniz@gmail.com", - "url": "https://github.com/mdiniz" - }, - { - "name": "Michael Hart", - "url": "https://github.com/mhart" - }, - { - "name": "Zachary Scott", - "email": "zachary@zacharyscott.net", - "url": "http://zacharyscott.net/" - }, - { - "name": "Raoul Millais", - "url": "https://github.com/raoulmillais" - }, - { - "name": "Salsita Software", - "url": "http://www.salsitasoft.com/" - }, - { - "name": "Mike Schilling", - "email": "mike@emotive.com", - "url": "http://www.emotive.com/" - }, - { - "name": "Jackson Tian", - "email": "shyvo1987@gmail.com", - "url": "http://weibo.com/shyvo" - }, - { - "name": "Mikhail Zyatin", - "email": "mikhail.zyatin@gmail.com", - "url": "https://github.com/Sitin" - }, - { - "name": "Chris Tavares", - "email": "ctavares@microsoft.com", - "url": "https://github.com/christav" - }, - { - "name": "Frank Xu", - "email": "yyfrankyy@gmail.com", - "url": "http://f2e.us/" - } - ], - "main": "./lib/xml2js", - "directories": { - "lib": "./lib" - }, - "scripts": { - "test": "zap" - }, - "repository": { - "type": "git", - "url": "https://github.com/Leonidas-from-XIV/node-xml2js.git" - }, - "dependencies": { - "sax": "0.5.x" - }, - "devDependencies": { - "coffee-script": ">=1.6.3", - "zap": ">=0.2.5", - "docco": ">=0.6.2" - }, - "bugs": { - "url": "https://github.com/Leonidas-from-XIV/node-xml2js/issues" - }, - "_id": "xml2js@0.2.8", - "dist": { - "shasum": "9b81690931631ff09d1957549faf54f4f980b3c2", - "tarball": "http://registry.npmjs.org/xml2js/-/xml2js-0.2.8.tgz" - }, - "_from": "xml2js@0.2.8", - "_npmVersion": "1.2.25", - "_npmUser": { - "name": "leonidas", - "email": "marek@xivilization.net" - }, - "maintainers": [ - { - "name": "leonidas", - "email": "marek@xivilization.net" - } - ], - "_shasum": "9b81690931631ff09d1957549faf54f4f980b3c2", - "_resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.2.8.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/aws-sdk/node_modules/xml2js/text.coffee b/cli/node_modules/aws-sdk/node_modules/xml2js/text.coffee deleted file mode 100644 index c5d8c66d9..000000000 --- a/cli/node_modules/aws-sdk/node_modules/xml2js/text.coffee +++ /dev/null @@ -1,11 +0,0 @@ -fs = require 'fs' -xml2js = require 'xml2js' - -parser = new xml2js.Parser - -fs.readFile 'canon.xml', (err, data) -> - console.log err - parser.parseString (err, result) -> - console.log err - console.dir result - diff --git a/cli/node_modules/aws-sdk/node_modules/xml2js/text.xml b/cli/node_modules/aws-sdk/node_modules/xml2js/text.xml deleted file mode 100644 index bd3b482a4..000000000 --- a/cli/node_modules/aws-sdk/node_modules/xml2js/text.xml +++ /dev/null @@ -1,485 +0,0 @@ - - - - - AF485783 - 14758 - double - DNA - circular - SYN - 15-MAY-2003 - 21-MAR-2002 - Binary vector pBI121, complete sequence - AF485783 - AF485783.1 - - gb|AF485783.1| - gi|19569229 - - Binary vector pBI121 - Binary vector pBI121 - other sequences; artificial sequences; vectors - - - 1 - 1..14758 - - Chen,P.Y. - Wang,C.K. - Soong,S.C. - To,K.Y. - - Complete sequence of the binary vector pBI121 and its application in cloning T-DNA insertion from transgenic plants - Mol. Breed. 11, 287-293 (2003) - - - 2 - 1..14758 - - To,K.Y. - - Direct Submission - Submitted (20-FEB-2002) Institute of BioAgricultural Sciences, Academia Sinica, Taipei 11529, Taiwan - - - - - source - 1..14758 - - - 1 - 14758 - AF485783.1 - - - - - organism - Binary vector pBI121 - - - mol_type - genomic DNA - - - db_xref - taxon:189807 - - - note - constructed using pB221 from Clontech Laboratories and Bin19 described in GenBank Accession Number U09365 - - - - - misc_feature - complement(13..796) - - - 796 - 13 - - AF485783.1 - - - - - note - similar to traF in GenBank Accession Number X54459 - - - - - rep_origin - complement(790..1168) - - - 1168 - 790 - - AF485783.1 - - - - - note - ColE1 ori; similar to sequence in GenBank Accession Number V00268 - - - - - misc_feature - complement(1161..2344) - - - 2344 - 1161 - - AF485783.1 - - - - - note - similar to tetA in GenBank Accession Number X75761 - - - - - misc_feature - complement(2454..2478) - - - 2478 - 2454 - - AF485783.1 - - - - - note - T-DNA right border - - - - - promoter - 2519..2825 - - - 2519 - 2825 - AF485783.1 - - - - - note - NOS - - - - - gene - 2838..3632 - - - 2838 - 3632 - AF485783.1 - - - - - gene - nptII - - - - - CDS - 2838..3632 - - - 2838 - 3632 - AF485783.1 - - - - - gene - nptII - - - codon_start - 1 - - - transl_table - 1 - - - product - neomycin phosphotransferase II - - - protein_id - AAL92039.1 - - - db_xref - GI:19569230 - - - translation - MIEQDGLHAGSPAAWVERLFGYDWAQQTIGCSDAAVFRLSAQGRPVLFVKTDLSGALNELQDEAARLSWLATTGVPCAAVLDVVTEAGRDWLLLGEVPGQDLLSSHLAPAEKVSIMADAMRRLHTLDPATCPFDHQAKHRIERARTRMEAGLVDQDDLDEEHQGLAPAELFARLKARMPDGDDLVVTHGDACLPNIMVENGRFSGFIDCGRLGVADRYQDIALATRDIAEELGGEWADRFLVLYGIAAPDSQRIAFYRLLDEFF - - - - - terminator - 4022..4277 - - - 4022 - 4277 - AF485783.1 - - - - - note - NOS - - - - - promoter - 4974..5808 - - - 4974 - 5808 - AF485783.1 - - - - - note - CaMV 35S - - - - - gene - 5845..7656 - - - 5845 - 7656 - AF485783.1 - - - - - gene - gusA - - - - - CDS - 5845..7656 - - - 5845 - 7656 - AF485783.1 - - - - - gene - gusA - - - note - GUS - - - codon_start - 1 - - - transl_table - 1 - - - product - beta-glucuronidase - - - protein_id - AAL92040.1 - - - db_xref - GI:19569231 - - - translation - MLRPVETPTREIKKLDGLWAFSLDRENCGIDQRWWESALQESRAIAVPGSFNDQFADADIRNYAGNVWYQREVFIPKGWAGQRIVLRFDAVTHYGKVWVNNQEVMEHQGGYTPFEADVTPYVIAGKSVRITVCVNNELNWQTIPPGMVITDENGKKKQSYFHDFFNYAGIHRSVMLYTTPNTWVDDITVVTHVAQDCNHASVDWQVVANGDVSVELRDADQQVVATGQGTSGTLQVVNPHLWQPGEGYLYELCVTAKSQTECDIYPLRVGIRSVAVKGEQFLINHKPFYFTGFGRHEDADLRGKGFDNVLMVHDHALMDWIGANSYRTSHYPYAEEMLDWADEHGIVVIDETAAVGFNLSLGIGFEAGNKPKELYSEEAVNGETQQAHLQAIKELIARDKNHPSVVMWSIANEPDTRPQGAREYFAPLAEATRKLDPTRPITCVNVMFCDAHTDTISDLFDVLCLNRYYGWYVQSGDLETAEKVLEKELLAWQEKLHQPIIITEYGVDTLAGLHSMYTDMWSEEYQCAWLDMYHRVFDRVSAVVGEQVWNFADFATSQGILRVGGNKKGIFTRDRKPKSAAFLLQKRWTGMNFGEKPQQGGKQ - - - - - terminator - 7727..7979 - - - 7727 - 7979 - AF485783.1 - - - - - note - NOS - - - - - misc_feature - complement(8621..8646) - - - 8646 - 8621 - - AF485783.1 - - - - - note - T-DNA left border - - - - - misc_feature - complement(9156..10198) - - - 10198 - 9156 - - AF485783.1 - - - - - note - similar to tetA in GenBank Accession Number L13842 - - - - - misc_feature - complement(10199..11680) - - - 11680 - 10199 - - AF485783.1 - - - - - note - similar to trfA in GenBank Accession Number X00713 - - - - - misc_feature - complement(11681..12673) - - - 12673 - 11681 - - AF485783.1 - - - - - note - similar to NPTIII gene in GenBank Accession Number V01547 - - - - - misc_feature - complement(12674..13443) - - - 13443 - 12674 - - AF485783.1 - - - - - note - similar to transposable element IS1 in GenBank Accession Number X58999 - - - - - misc_feature - complement(13444..13794) - - - 13794 - 13444 - - AF485783.1 - - - - - note - similarity to NPT III gene in GenBank Accession Number V01547 - - - - - misc_feature - complement(13795..14066) - - - 14066 - 13795 - - AF485783.1 - - - - - note - similar to kilA in GenBank Accession Number M62846 - - - - - rep_origin - complement(14141..14758) - - - 14758 - 14141 - - AF485783.1 - - - - - note - ori V; similar to sequence in GenBank Accession Number M20134 - - - - - tgagcgtcgcaaaggcgctcggtcttgccttgctcgtcggtgatgtacttcaccagctccgcgaagtcgctcttcttgatggagcgcatggggacgtgcttggcaatcacgcgcaccccccggccgttttagcggctaaaaaagtcatggctctgccctcgggcggaccacgcccatcatgaccttgccaagctcgtcctgcttctcttcgatcttcgccagcagggcgaggatcgtggcatcaccgaaccgcgccgtgcgcgggtcgtcggtgagccagagtttcagcaggccgcccaggcggcccaggtcgccattgatgcgggccagctcgcggacgtgctcatagtccacgacgcccgtgattttgtagccctggccgacggccagcaggtaggccgacaggctcatgccggccgccgccgccttttcctcaatcgctcttcgttcgtctggaaggcagtacaccttgataggtgggctgcccttcctggttggcttggtttcatcagccatccgcttgccctcatctgttacgccggcggtagccggccagcctcgcagagcaggattcccgttgagcaccgccaggtgcgaataagggacagtgaagaaggaacacccgctcgcgggtgggcctacttcacctatcctgcccggctgacgccgttggatacaccaaggaaagtctacacgaaccctttggcaaaatcctgtatatcgtgcgaaaaaggatggatataccgaaaaaatcgctataatgaccccgaagcagggttatgcagcggaaaagcgccacgcttcccgaagggagaaaggcggacaggtatccggtaagcggcagggtcggaacaggagagcgcacgagggagcttccagggggaaacgcctggtatctttatagtcctgtcgggtttcgccacctctgacttgagcgtcgatttttgtgatgctcgtcaggggggcggagcctatggaaaaacgccagcaacgcggcctttttacggttcctggccttttgctggccttttgctcacatgttctttcctgcgttatcccctgattctgtggataaccgtattaccgcctttgagtgagctgataccgctcgccgcagccgaacgaccgagcgcagcgagtcagtgagcgaggaagcggaagagcgccagaaggccgccagagaggccgagcgcggccgtgaggcttggacgctagggcagggcatgaaaaagcccgtagcgggctgctacgggcgtctgacgcggtggaaagggggaggggatgttgtctacatggctctgctgtagtgagtgggttgcgctccggcagcggtcctgatcaatcgtcaccctttctcggtccttcaacgttcctgacaacgagcctccttttcgccaatccatcgacaatcaccgcgagtccctgctcgaacgctgcgtccggaccggcttcgtcgaaggcgtctatcgcggcccgcaacagcggcgagagcggagcctgttcaacggtgccgccgcgctcgccggcatcgctgtcgccggcctgctcctcaagcacggccccaacagtgaagtagctgattgtcatcagcgcattgacggcgtccccggccgaaaaacccgcctcgcagaggaagcgaagctgcgcgtcggccgtttccatctgcggtgcgcccggtcgcgtgccggcatggatgcgcgcgccatcgcggtaggcgagcagcgcctgcctgaagctgcgggcattcccgatcagaaatgagcgccagtcgtcgtcggctctcggcaccgaatgcgtatgattctccgccagcatggcttcggccagtgcgtcgagcagcgcccgcttgttcctgaagtgccagtaaagcgccggctgctgaacccccaaccgttccgccagtttgcgtgtcgtcagaccgtctacgccgacctcgttcaacaggtccagggcggcacggatcactgtattcggctgcaactttgtcatgcttgacactttatcactgataaacataatatgtccaccaacttatcagtgataaagaatccgcgcgttcaatcggaccagcggaggctggtccggaggccagacgtgaaacccaacatacccctgatcgtaattctgagcactgtcgcgctcgacgctgtcggcatcggcctgattatgccggtgctgccgggcctcctgcgcgatctggttcactcgaacgacgtcaccgcccactatggcattctgctggcgctgtatgcgttggtgcaatttgcctgcgcacctgtgctgggcgcgctgtcggatcgtttcgggcggcggccaatcttgctcgtctcgctggccggcgccagatctggggaaccctgtggttggcatgcacatacaaatggacgaacggataaaccttttcacgcccttttaaatatccgattattctaataaacgctcttttctcttaggtttacccgccaatatatcctgtcaaacactgatagtttaaactgaaggcgggaaacgacaatctgatcatgagcggagaattaagggagtcacgttatgacccccgccgatgacgcgggacaagccgttttacgtttggaactgacagaaccgcaacgttgaaggagccactcagccgcgggtttctggagtttaatgagctaagcacatacgtcagaaaccattattgcgcgttcaaaagtcgcctaaggtcactatcagctagcaaatatttcttgtcaaaaatgctccactgacgttccataaattcccctcggtatccaattagagtctcatattcactctcaatccaaataatctgcaccggatctggatcgtttcgcatgattgaacaagatggattgcacgcaggttctccggccgcttgggtggagaggctattcggctatgactgggcacaacagacaatcggctgctctgatgccgccgtgttccggctgtcagcgcaggggcgcccggttctttttgtcaagaccgacctgtccggtgccctgaatgaactgcaggacgaggcagcgcggctatcgtggctggccacgacgggcgttccttgcgcagctgtgctcgacgttgtcactgaagcgggaagggactggctgctattgggcgaagtgccggggcaggatctcctgtcatctcaccttgctcctgccgagaaagtatccatcatggctgatgcaatgcggcggctgcatacgcttgatccggctacctgcccattcgaccaccaagcgaaacatcgcatcgagcgagcacgtactcggatggaagccggtcttgtcgatcaggatgatctggacgaagagcatcaggggctcgcgccagccgaactgttcgccaggctcaaggcgcgcatgcccgacggcgatgatctcgtcgtgacccatggcgatgcctgcttgccgaatatcatggtggaaaatggccgcttttctggattcatcgactgtggccggctgggtgtggcggaccgctatcaggacatagcgttggctacccgtgatattgctgaagagcttggcggcgaatgggctgaccgcttcctcgtgctttacggtatcgccgctcccgattcgcagcgcatcgccttctatcgccttcttgacgagttcttctgagcgggactctggggttcgaaatgaccgaccaagcgacgcccaacctgccatcacgagatttcgattccaccgccgccttctatgaaaggttgggcttcggaatcgttttccgggacgccggctggatgatcctccagcgcggggatctcatgctggagttcttcgcccacgggatctctgcggaacaggcggtcgaaggtgccgatatcattacgacagcaacggccgacaagcacaacgccacgatcctgagcgacaatatgatcgggcccggcgtccacatcaacggcgtcggcggcgactgcccaggcaagaccgagatgcaccgcgatatcttgctgcgttcggatattttcgtggagttcccgccacagacccggatgatccccgatcgttcaaacatttggcaataaagtttcttaagattgaatcctgttgccggtcttgcgatgattatcatataatttctgttgaattacgttaagcatgtaataattaacatgtaatgcatgacgttatttatgagatgggtttttatgattagagtcccgcaattatacatttaatacgcgatagaaaacaaaatatagcgcgcaaactaggataaattatcgcgcgcggtgtcatctatgttactagatcgggcctcctgtcaatgctggcggcggctctggtggtggttctggtggcggctctgagggtggtggctctgagggtggcggttctgagggtggcggctctgagggaggcggttccggtggtggctctggttccggtgattttgattatgaaaagatggcaaacgctaataagggggctatgaccgaaaatgccgatgaaaacgcgctacagtctgacgctaaaggcaaacttgattctgtcgctactgattacggtgctgctatcgatggtttcattggtgacgtttccggccttgctaatggtaatggtgctactggtgattttgctggctctaattcccaaatggctcaagtcggtgacggtgataattcacctttaatgaataatttccgtcaatatttaccttccctccctcaatcggttgaatgtcgcccttttgtctttggcccaatacgcaaaccgcctctccccgcgcgttggccgattcattaatgcagctggcacgacaggtttcccgactggaaagcgggcagtgagcgcaacgcaattaatgtgagttagctcactcattaggcaccccaggctttacactttatgcttccggctcgtatgttgtgtggaattgtgagcggataacaatttcacacaggaaacagctatgaccatgattacgccaagcttgcatgcctgcaggtccccagattagccttttcaatttcagaaagaatgctaacccacagatggttagagaggcttacgcagcaggtctcatcaagacgatctacccgagcaataatctccaggaaatcaaataccttcccaagaaggttaaagatgcagtcaaaagattcaggactaactgcatcaagaacacagagaaagatatatttctcaagatcagaagtactattccagtatggacgattcaaggcttgcttcacaaaccaaggcaagtaatagagattggagtctctaaaaaggtagttcccactgaatcaaaggccatggagtcaaagattcaaatagaggacctaacagaactcgccgtaaagactggcgaacagttcatacagagtctcttacgactcaatgacaagaagaaaatcttcgtcaacatggtggagcacgacacacttgtctactccaaaaatatcaaagatacagtctcagaagaccaaagggcaattgagacttttcaacaaagggtaatatccggaaacctcctcggattccattgcccagctatctgtcactttattgtgaagatagtggaaaaggaaggtggctcctacaaatgccatcattgcgataaaggaaaggccatcgttgaagatgcctctgccgacagtggtcccaaagatggacccccacccacgaggagcatcgtggaaaaagaagacgttccaaccacgtcttcaaagcaagtggattgatgtgatatctccactgacgtaagggatgacgcacaatcccactatccttcgcaagacccttcctctatataaggaagttcatttcatttggagagaacacgggggactctagaggatccccgggtggtcagtcccttatgttacgtcctgtagaaaccccaacccgtgaaatcaaaaaactcgacggcctgtgggcattcagtctggatcgcgaaaactgtggaattgatcagcgttggtgggaaagcgcgttacaagaaagccgggcaattgctgtgccaggcagttttaacgatcagttcgccgatgcagatattcgtaattatgcgggcaacgtctggtatcagcgcgaagtctttataccgaaaggttgggcaggccagcgtatcgtgctgcgtttcgatgcggtcactcattacggcaaagtgtgggtcaataatcaggaagtgatggagcatcagggcggctatacgccatttgaagccgatgtcacgccgtatgttattgccgggaaaagtgtacgtatcaccgtttgtgtgaacaacgaactgaactggcagactatcccgccgggaatggtgattaccgacgaaaacggcaagaaaaagcagtcttacttccatgatttctttaactatgccggaatccatcgcagcgtaatgctctacaccacgccgaacacctgggtggacgatatcaccgtggtgacgcatgtcgcgcaagactgtaaccacgcgtctgttgactggcaggtggtggccaatggtgatgtcagcgttgaactgcgtgatgcggatcaacaggtggttgcaactggacaaggcactagcgggactttgcaagtggtgaatccgcacctctggcaaccgggtgaaggttatctctatgaactgtgcgtcacagccaaaagccagacagagtgtgatatctacccgcttcgcgtcggcatccggtcagtggcagtgaagggcgaacagttcctgattaaccacaaaccgttctactttactggctttggtcgtcatgaagatgcggacttgcgtggcaaaggattcgataacgtgctgatggtgcacgaccacgcattaatggactggattggggccaactcctaccgtacctcgcattacccttacgctgaagagatgctcgactgggcagatgaacatggcatcgtggtgattgatgaaactgctgctgtcggctttaacctctctttaggcattggtttcgaagcgggcaacaagccgaaagaactgtacagcgaagaggcagtcaacggggaaactcagcaagcgcacttacaggcgattaaagagctgatagcgcgtgacaaaaaccacccaagcgtggtgatgtggagtattgccaacgaaccggatacccgtccgcaaggtgcacgggaatatttcgcgccactggcggaagcaacgcgtaaactcgacccgacgcgtccgatcacctgcgtcaatgtaatgttctgcgacgctcacaccgataccatcagcgatctctttgatgtgctgtgcctgaaccgttattacggatggtatgtccaaagcggcgatttggaaacggcagagaaggtactggaaaaagaacttctggcctggcaggagaaactgcatcagccgattatcatcaccgaatacggcgtggatacgttagccgggctgcactcaatgtacaccgacatgtggagtgaagagtatcagtgtgcatggctggatatgtatcaccgcgtctttgatcgcgtcagcgccgtcgtcggtgaacaggtatggaatttcgccgattttgcgacctcgcaaggcatattgcgcgttggcggtaacaagaaagggatcttcactcgcgaccgcaaaccgaagtcggcggcttttctgctgcaaaaacgctggactggcatgaacttcggtgaaaaaccgcagcagggaggcaaacaatgaatcaacaactctcctggcgcaccatcgtcggctacagcctcgggaattgctaccgagctcgaatttccccgatcgttcaaacatttggcaataaagtttcttaagattgaatcctgttgccggtcttgcgatgattatcatataatttctgttgaattacgttaagcatgtaataattaacatgtaatgcatgacgttatttatgagatgggtttttatgattagagtcccgcaattatacatttaatacgcgatagaaaacaaaatatagcgcgcaaactaggataaattatcgcgcgcggtgtcatctatgttactagatcgggaattcactggccgtcgttttacaacgtcgtgactgggaaaaccctggcgttacccaacttaatcgccttgcagcacatccccctttcgccagctggcgtaatagcgaagaggcccgcaccgatcgcccttcccaacagttgcgcagcctgaatggcgcccgctcctttcgctttcttcccttcctttctcgccacgttcgccggctttccccgtcaagctctaaatcgggggctccctttagggttccgatttagtgctttacggcacctcgaccccaaaaaacttgatttgggtgatggttcacgtagtgggccatcgccctgatagacggtttttcgccctttgacgttggagtccacgttctttaatagtggactcttgttccaaactggaacaacactcaaccctatctcgggctattcttttgatttataagggattttgccgatttcggaaccaccatcaaacaggattttcgcctgctggggcaaaccagcgtggaccgcttgctgcaactctctcagggccaggcggtgaagggcaatcagctgttgcccgtctcactggtgaaaagaaaaaccaccccagtacattaaaaacgtccgcaatgtgttattaagttgtctaagcgtcaatttgtttacaccacaatatatcctgccaccagccagccaacagctccccgaccggcagctcggcacaaaatcaccactcgatacaggcagcccatcagtccgggacggcgtcagcgggagagccgttgtaaggcggcagactttgctcatgttaccgatgctattcggaagaacggcaactaagctgccgggtttgaaacacggatgatctcgcggagggtagcatgttgattgtaacgatgacagagcgttgctgcctgtgatcaaatatcatctccctcgcagagatccgaattatcagccttcttattcatttctcgcttaaccgtgacaggctgtcgatcttgagaactatgccgacataataggaaatcgctggataaagccgctgaggaagctgagtggcgctatttctttagaagtgaacgttgacgatatcaactcccctatccattgctcaccgaatggtacaggtcggggacccgaagttccgactgtcggcctgatgcatccccggctgatcgaccccagatctggggctgagaaagcccagtaaggaaacaactgtaggttcgagtcgcgagatcccccggaaccaaaggaagtaggttaaacccgctccgatcaggccgagccacgccaggccgagaacattggttcctgtaggcatcgggattggcggatcaaacactaaagctactggaacgagcagaagtcctccggccgccagttgccaggcggtaaaggtgagcagaggcacgggaggttgccacttgcgggtcagcacggttccgaacgccatggaaaccgcccccgccaggcccgctgcgacgccgacaggatctagcgctgcgtttggtgtcaacaccaacagcgccacgcccgcagttccgcaaatagcccccaggaccgccatcaatcgtatcgggctacctagcagagcggcagagatgaacacgaccatcagcggctgcacagcgcctaccgtcgccgcgaccccgcccggcaggcggtagaccgaaataaacaacaagctccagaatagcgaaatattaagtgcgccgaggatgaagatgcgcatccaccagattcccgttggaatctgtcggacgatcatcacgagcaataaacccgccggcaacgcccgcagcagcataccggcgacccctcggcctcgctgttcgggctccacgaaaacgccggacagatgcgccttgtgagcgtccttggggccgtcctcctgtttgaagaccgacagcccaatgatctcgccgtcgatgtaggcgccgaatgccacggcatctcgcaaccgttcagcgaacgcctccatgggctttttctcctcgtgctcgtaaacggacccgaacatctctggagctttcttcagggccgacaatcggatctcgcggaaatcctgcacgtcggccgctccaagccgtcgaatctgagccttaatcacaattgtcaattttaatcctctgtttatcggcagttcgtagagcgcgccgtgcgtcccgagcgatactgagcgaagcaagtgcgtcgagcagtgcccgcttgttcctgaaatgccagtaaagcgctggctgctgaacccccagccggaactgaccccacaaggccctagcgtttgcaatgcaccaggtcatcattgacccaggcgtgttccaccaggccgctgcctcgcaactcttcgcaggcttcgccgacctgctcgcgccacttcttcacgcgggtggaatccgatccgcacatgaggcggaaggtttccagcttgagcgggtacggctcccggtgcgagctgaaatagtcgaacatccgtcgggccgtcggcgacagcttgcggtacttctcccatatgaatttcgtgtagtggtcgccagcaaacagcacgacgatttcctcgtcgatcaggacctggcaacgggacgttttcttgccacggtccaggacgcggaagcggtgcagcagcgacaccgattccaggtgcccaacgcggtcggacgtgaagcccatcgccgtcgcctgtaggcgcgacaggcattcctcggccttcgtgtaataccggccattgatcgaccagcccaggtcctggcaaagctcgtagaacgtgaaggtgatcggctcgccgataggggtgcgcttcgcgtactccaacacctgctgccacaccagttcgtcatcgtcggcccgcagctcgacgccggtgtaggtgatcttcacgtccttgttgacgtggaaaatgaccttgttttgcagcgcctcgcgcgggattttcttgttgcgcgtggtgaacagggcagagcgggccgtgtcgtttggcatcgctcgcatcgtgtccggccacggcgcaatatcgaacaaggaaagctgcatttccttgatctgctgcttcgtgtgtttcagcaacgcggcctgcttggcctcgctgacctgttttgccaggtcctcgccggcggtttttcgcttcttggtcgtcatagttcctcgcgtgtcgatggtcatcgacttcgccaaacctgccgcctcctgttcgagacgacgcgaacgctccacggcggccgatggcgcgggcagggcagggggagccagttgcacgctgtcgcgctcgatcttggccgtagcttgctggaccatcgagccgacggactggaaggtttcgcggggcgcacgcatgacggtgcggcttgcgatggtttcggcatcctcggcggaaaaccccgcgtcgatcagttcttgcctgtatgccttccggtcaaacgtccgattcattcaccctccttgcgggattgccccgactcacgccggggcaatgtgcccttattcctgatttgacccgcctggtgccttggtgtccagataatccaccttatcggcaatgaagtcggtcccgtagaccgtctggccgtccttctcgtacttggtattccgaatcttgccctgcacgaataccagcgaccccttgcccaaatacttgccgtgggcctcggcctgagagccaaaacacttgatgcggaagaagtcggtgcgctcctgcttgtcgccggcatcgttgcgccacatctaggtactaaaacaattcatccagtaaaatataatattttattttctcccaatcaggcttgatccccagtaagtcaaaaaatagctcgacatactgttcttccccgatatcctccctgatcgaccggacgcagaaggcaatgtcataccacttgtccgccctgccgcttctcccaagatcaataaagccacttactttgccatctttcacaaagatgttgctgtctcccaggtcgccgtgggaaaagacaagttcctcttcgggcttttccgtctttaaaaaatcatacagctcgcgcggatctttaaatggagtgtcttcttcccagttttcgcaatccacatcggccagatcgttattcagtaagtaatccaattcggctaagcggctgtctaagctattcgtatagggacaatccgatatgtcgatggagtgaaagagcctgatgcactccgcatacagctcgataatcttttcagggctttgttcatcttcatactcttccgagcaaaggacgccatcggcctcactcatgagcagattgctccagccatcatgccgttcaaagtgcaggacctttggaacaggcagctttccttccagccatagcatcatgtccttttcccgttccacatcataggtggtccctttataccggctgtccgtcatttttaaatataggttttcattttctcccaccagcttatataccttagcaggagacattccttccgtatcttttacgcagcggtatttttcgatcagttttttcaattccggtgatattctcattttagccatttattatttccttcctcttttctacagtatttaaagataccccaagaagctaattataacaagacgaactccaattcactgttccttgcattctaaaaccttaaataccagaaaacagctttttcaaagttgttttcaaagttggcgtataacatagtatcgacggagccgattttgaaaccacaattatgggtgatgctgccaacttactgatttagtgtatgatggtgtttttgaggtgctccagtggcttctgtgtctatcagctgtccctcctgttcagctactgacggggtggtgcgtaacggcaaaagcaccgccggacatcagcgctatctctgctctcactgccgtaaaacatggcaactgcagttcacttacaccgcttctcaacccggtacgcaccagaaaatcattgatatggccatgaatggcgttggatgccgggcaacagcccgcattatgggcgttggcctcaacacgattttacgtcacttaaaaaactcaggccgcagtcggtaacctcgcgcatacagccgggcagtgacgtcatcgtctgcgcggaaatggacgaacagtggggctatgtcggggctaaatcgcgccagcgctggctgttttacgcgtatgacagtctccggaagacggttgttgcgcacgtattcggtgaacgcactatggcgacgctggggcgtcttatgagcctgctgtcaccctttgacgtggtgatatggatgacggatggctggccgctgtatgaatcccgcctgaagggaaagctgcacgtaatcagcaagcgatatacgcagcgaattgagcggcataacctgaatctgaggcagcacctggcacggctgggacggaagtcgctgtcgttctcaaaatcggtggagctgcatgacaaagtcatcgggcattatctgaacataaaacactatcaataagttggagtcattacccaattatgatagaatttacaagctataaggttattgtcctgggtttcaagcattagtccatgcaagtttttatgctttgcccattctatagatatattgataagcgcgctgcctatgccttgccccctgaaatccttacatacggcgatatcttctatataaaagatatattatcttatcagtattgtcaatatattcaaggcaatctgcctcctcatcctcttcatcctcttcgtcttggtagctttttaaatatggcgcttcatagagtaattctgtaaaggtccaattctcgttttcatacctcggtataatcttacctatcacctcaaatggttcgctgggtttatcgcacccccgaacacgagcacggcacccgcgaccactatgccaagaatgcccaaggtaaaaattgccggccccgccatgaagtccgtgaatgccccgacggccgaagtgaagggcaggccgccacccaggccgccgccctcactgcccggcacctggtcgctgaatgtcgatgccagcacctgcggcacgtcaatgcttccgggcgtcgcgctcgggctgatcgcccatcccgttactgccccgatcccggcaatggcaaggactgccagcgctgccatttttggggtgaggccgttcgcggccgaggggcgcagcccctggggggatgggaggcccgcgttagcgggccgggagggttcgagaagggggggcaccccccttcggcgtgcgcggtcacgcgcacagggcgcagccctggttaaaaacaaggtttataaatattggtttaaaagcaggttaaaagacaggttagcggtggccgaaaaacgggcggaaacccttgcaaatgctggattttctgcctgtggacagcccctcaaatgtcaataggtgcgcccctcatctgtcagcactctgcccctcaagtgtcaaggatcgcgcccctcatctgtcagtagtcgcgcccctcaagtgtcaataccgcagggcacttatccccaggcttgtccacatcatctgtgggaaactcgcgtaaaatcaggcgttttcgccgatttgcgaggctggccagctccacgtcgccggccgaaatcgagcctgcccctcatctgtcaacgccgcgccgggtgagtcggcccctcaagtgtcaacgtccgcccctcatctgtcagtgagggccaagttttccgcgaggtatccacaacgccggcggccgcggtgtctcgcacacggcttcgacggcgtttctggcgcgtttgcagggccatagacggccgccagcccagcggcgagggcaaccagcccgg - - - - diff --git a/cli/node_modules/aws-sdk/node_modules/xmlbuilder/.npmignore b/cli/node_modules/aws-sdk/node_modules/xmlbuilder/.npmignore deleted file mode 100644 index 29db52757..000000000 --- a/cli/node_modules/aws-sdk/node_modules/xmlbuilder/.npmignore +++ /dev/null @@ -1,8 +0,0 @@ -.gitignore -.travis.yml -Makefile -.git/ -src/ -test/ -node_modules/ - diff --git a/cli/node_modules/aws-sdk/node_modules/xmlbuilder/README.md b/cli/node_modules/aws-sdk/node_modules/xmlbuilder/README.md deleted file mode 100644 index 4025ea511..000000000 --- a/cli/node_modules/aws-sdk/node_modules/xmlbuilder/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# xmlbuilder-js - -An XMLBuilder for [node.js](http://nodejs.org/) similar to -[java-xmlbuilder](http://code.google.com/p/java-xmlbuilder/). - -[![Build Status](https://secure.travis-ci.org/oozcitak/xmlbuilder-js.png)](http://travis-ci.org/oozcitak/xmlbuilder-js) - -### Installation: - -``` sh -npm install xmlbuilder -``` - -### Important: - -I had to break compatibility while adding multiple instances in 0.1.3. -As a result, version from v0.1.3 are **not** compatible with previous versions. - -### Usage: - -``` js -var builder = require('xmlbuilder'); -var xml = builder.create('root') - .ele('xmlbuilder', {'for': 'node-js'}) - .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git') - .end({ pretty: true}); - -console.log(xml); -``` - -will result in: - -``` xml - - - - git://github.com/oozcitak/xmlbuilder-js.git - - -``` - -If you need to do some processing: - -``` js -var root = builder.create('squares'); -root.com('f(x) = x^2'); -for(var i = 1; i <= 5; i++) -{ - var item = root.ele('data'); - item.att('x', i); - item.att('y', i * i); -} -``` - -This will result in: - -``` xml - - - - - - - - - -``` - -See the [Usage](https://github.com/oozcitak/xmlbuilder-js/wiki/Usage) page in the wiki for more detailed instructions. - -### License: - -`xmlbuilder-js` is [MIT Licensed](http://opensource.org/licenses/mit-license.php). diff --git a/cli/node_modules/aws-sdk/node_modules/xmlbuilder/lib/XMLBuilder.js b/cli/node_modules/aws-sdk/node_modules/xmlbuilder/lib/XMLBuilder.js deleted file mode 100644 index 2850c8add..000000000 --- a/cli/node_modules/aws-sdk/node_modules/xmlbuilder/lib/XMLBuilder.js +++ /dev/null @@ -1,119 +0,0 @@ -// Generated by CoffeeScript 1.3.3 -(function() { - var XMLBuilder, XMLFragment; - - XMLFragment = require('./XMLFragment'); - - XMLBuilder = (function() { - - function XMLBuilder(name, xmldec, doctype) { - var att, child, _ref; - this.children = []; - this.rootObject = null; - if (this.is(name, 'Object')) { - _ref = [name, xmldec], xmldec = _ref[0], doctype = _ref[1]; - name = null; - } - if (name != null) { - name = '' + name || ''; - if (xmldec == null) { - xmldec = { - 'version': '1.0' - }; - } - } - if ((xmldec != null) && !(xmldec.version != null)) { - throw new Error("Version number is required"); - } - if (xmldec != null) { - xmldec.version = '' + xmldec.version || ''; - if (!xmldec.version.match(/1\.[0-9]+/)) { - throw new Error("Invalid version number: " + xmldec.version); - } - att = { - version: xmldec.version - }; - if (xmldec.encoding != null) { - xmldec.encoding = '' + xmldec.encoding || ''; - if (!xmldec.encoding.match(/[A-Za-z](?:[A-Za-z0-9._-]|-)*/)) { - throw new Error("Invalid encoding: " + xmldec.encoding); - } - att.encoding = xmldec.encoding; - } - if (xmldec.standalone != null) { - att.standalone = xmldec.standalone ? "yes" : "no"; - } - child = new XMLFragment(this, '?xml', att); - this.children.push(child); - } - if (doctype != null) { - att = {}; - if (name != null) { - att.name = name; - } - if (doctype.ext != null) { - doctype.ext = '' + doctype.ext || ''; - att.ext = doctype.ext; - } - child = new XMLFragment(this, '!DOCTYPE', att); - this.children.push(child); - } - if (name != null) { - this.begin(name); - } - } - - XMLBuilder.prototype.begin = function(name, xmldec, doctype) { - var doc, root; - if (!(name != null)) { - throw new Error("Root element needs a name"); - } - if (this.rootObject) { - this.children = []; - this.rootObject = null; - } - if (xmldec != null) { - doc = new XMLBuilder(name, xmldec, doctype); - return doc.root(); - } - name = '' + name || ''; - root = new XMLFragment(this, name, {}); - root.isRoot = true; - root.documentObject = this; - this.children.push(root); - this.rootObject = root; - return root; - }; - - XMLBuilder.prototype.root = function() { - return this.rootObject; - }; - - XMLBuilder.prototype.end = function(options) { - return toString(options); - }; - - XMLBuilder.prototype.toString = function(options) { - var child, r, _i, _len, _ref; - r = ''; - _ref = this.children; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - child = _ref[_i]; - r += child.toString(options); - } - return r; - }; - - XMLBuilder.prototype.is = function(obj, type) { - var clas; - clas = Object.prototype.toString.call(obj).slice(8, -1); - return (obj != null) && clas === type; - }; - - return XMLBuilder; - - })(); - - module.exports = XMLBuilder; - -}).call(this); diff --git a/cli/node_modules/aws-sdk/node_modules/xmlbuilder/lib/XMLFragment.js b/cli/node_modules/aws-sdk/node_modules/xmlbuilder/lib/XMLFragment.js deleted file mode 100644 index 7a0fff599..000000000 --- a/cli/node_modules/aws-sdk/node_modules/xmlbuilder/lib/XMLFragment.js +++ /dev/null @@ -1,422 +0,0 @@ -// Generated by CoffeeScript 1.3.3 -(function() { - var XMLFragment, - __hasProp = {}.hasOwnProperty; - - XMLFragment = (function() { - - function XMLFragment(parent, name, attributes, text) { - this.isRoot = false; - this.documentObject = null; - this.parent = parent; - this.name = name; - this.attributes = attributes; - this.value = text; - this.children = []; - } - - XMLFragment.prototype.element = function(name, attributes, text) { - var child, key, val, _ref, _ref1; - if (!(name != null)) { - throw new Error("Missing element name"); - } - name = '' + name || ''; - this.assertLegalChar(name); - if (attributes == null) { - attributes = {}; - } - if (this.is(attributes, 'String') && this.is(text, 'Object')) { - _ref = [text, attributes], attributes = _ref[0], text = _ref[1]; - } else if (this.is(attributes, 'String')) { - _ref1 = [{}, attributes], attributes = _ref1[0], text = _ref1[1]; - } - for (key in attributes) { - if (!__hasProp.call(attributes, key)) continue; - val = attributes[key]; - val = '' + val || ''; - attributes[key] = this.escape(val); - } - child = new XMLFragment(this, name, attributes); - if (text != null) { - text = '' + text || ''; - text = this.escape(text); - this.assertLegalChar(text); - child.raw(text); - } - this.children.push(child); - return child; - }; - - XMLFragment.prototype.insertBefore = function(name, attributes, text) { - var child, i, key, val, _ref, _ref1; - if (this.isRoot) { - throw new Error("Cannot insert elements at root level"); - } - if (!(name != null)) { - throw new Error("Missing element name"); - } - name = '' + name || ''; - this.assertLegalChar(name); - if (attributes == null) { - attributes = {}; - } - if (this.is(attributes, 'String') && this.is(text, 'Object')) { - _ref = [text, attributes], attributes = _ref[0], text = _ref[1]; - } else if (this.is(attributes, 'String')) { - _ref1 = [{}, attributes], attributes = _ref1[0], text = _ref1[1]; - } - for (key in attributes) { - if (!__hasProp.call(attributes, key)) continue; - val = attributes[key]; - val = '' + val || ''; - attributes[key] = this.escape(val); - } - child = new XMLFragment(this.parent, name, attributes); - if (text != null) { - text = '' + text || ''; - text = this.escape(text); - this.assertLegalChar(text); - child.raw(text); - } - i = this.parent.children.indexOf(this); - this.parent.children.splice(i, 0, child); - return child; - }; - - XMLFragment.prototype.insertAfter = function(name, attributes, text) { - var child, i, key, val, _ref, _ref1; - if (this.isRoot) { - throw new Error("Cannot insert elements at root level"); - } - if (!(name != null)) { - throw new Error("Missing element name"); - } - name = '' + name || ''; - this.assertLegalChar(name); - if (attributes == null) { - attributes = {}; - } - if (this.is(attributes, 'String') && this.is(text, 'Object')) { - _ref = [text, attributes], attributes = _ref[0], text = _ref[1]; - } else if (this.is(attributes, 'String')) { - _ref1 = [{}, attributes], attributes = _ref1[0], text = _ref1[1]; - } - for (key in attributes) { - if (!__hasProp.call(attributes, key)) continue; - val = attributes[key]; - val = '' + val || ''; - attributes[key] = this.escape(val); - } - child = new XMLFragment(this.parent, name, attributes); - if (text != null) { - text = '' + text || ''; - text = this.escape(text); - this.assertLegalChar(text); - child.raw(text); - } - i = this.parent.children.indexOf(this); - this.parent.children.splice(i + 1, 0, child); - return child; - }; - - XMLFragment.prototype.remove = function() { - var i, _ref; - if (this.isRoot) { - throw new Error("Cannot remove the root element"); - } - i = this.parent.children.indexOf(this); - [].splice.apply(this.parent.children, [i, i - i + 1].concat(_ref = [])), _ref; - return this.parent; - }; - - XMLFragment.prototype.text = function(value) { - var child; - if (!(value != null)) { - throw new Error("Missing element text"); - } - value = '' + value || ''; - value = this.escape(value); - this.assertLegalChar(value); - child = new XMLFragment(this, '', {}, value); - this.children.push(child); - return this; - }; - - XMLFragment.prototype.cdata = function(value) { - var child; - if (!(value != null)) { - throw new Error("Missing CDATA text"); - } - value = '' + value || ''; - this.assertLegalChar(value); - if (value.match(/]]>/)) { - throw new Error("Invalid CDATA text: " + value); - } - child = new XMLFragment(this, '', {}, ''); - this.children.push(child); - return this; - }; - - XMLFragment.prototype.comment = function(value) { - var child; - if (!(value != null)) { - throw new Error("Missing comment text"); - } - value = '' + value || ''; - value = this.escape(value); - this.assertLegalChar(value); - if (value.match(/--/)) { - throw new Error("Comment text cannot contain double-hypen: " + value); - } - child = new XMLFragment(this, '', {}, ''); - this.children.push(child); - return this; - }; - - XMLFragment.prototype.raw = function(value) { - var child; - if (!(value != null)) { - throw new Error("Missing raw text"); - } - value = '' + value || ''; - child = new XMLFragment(this, '', {}, value); - this.children.push(child); - return this; - }; - - XMLFragment.prototype.up = function() { - if (this.isRoot) { - throw new Error("This node has no parent. Use doc() if you need to get the document object."); - } - return this.parent; - }; - - XMLFragment.prototype.root = function() { - var child; - if (this.isRoot) { - return this; - } - child = this.parent; - while (!child.isRoot) { - child = child.parent; - } - return child; - }; - - XMLFragment.prototype.document = function() { - return this.root().documentObject; - }; - - XMLFragment.prototype.end = function(options) { - return this.document().toString(options); - }; - - XMLFragment.prototype.prev = function() { - var i; - if (this.isRoot) { - throw new Error("Root node has no siblings"); - } - i = this.parent.children.indexOf(this); - if (i < 1) { - throw new Error("Already at the first node"); - } - return this.parent.children[i - 1]; - }; - - XMLFragment.prototype.next = function() { - var i; - if (this.isRoot) { - throw new Error("Root node has no siblings"); - } - i = this.parent.children.indexOf(this); - if (i === -1 || i === this.parent.children.length - 1) { - throw new Error("Already at the last node"); - } - return this.parent.children[i + 1]; - }; - - XMLFragment.prototype.clone = function(deep) { - var clonedSelf; - clonedSelf = new XMLFragment(this.parent, this.name, this.attributes, this.value); - if (deep) { - this.children.forEach(function(child) { - var clonedChild; - clonedChild = child.clone(deep); - clonedChild.parent = clonedSelf; - return clonedSelf.children.push(clonedChild); - }); - } - return clonedSelf; - }; - - XMLFragment.prototype.importXMLBuilder = function(xmlbuilder) { - var clonedRoot; - clonedRoot = xmlbuilder.root().clone(true); - clonedRoot.parent = this; - this.children.push(clonedRoot); - clonedRoot.isRoot = false; - return this; - }; - - XMLFragment.prototype.attribute = function(name, value) { - var _ref; - if (!(name != null)) { - throw new Error("Missing attribute name"); - } - if (!(value != null)) { - throw new Error("Missing attribute value"); - } - name = '' + name || ''; - value = '' + value || ''; - if ((_ref = this.attributes) == null) { - this.attributes = {}; - } - this.attributes[name] = this.escape(value); - return this; - }; - - XMLFragment.prototype.removeAttribute = function(name) { - if (!(name != null)) { - throw new Error("Missing attribute name"); - } - name = '' + name || ''; - delete this.attributes[name]; - return this; - }; - - XMLFragment.prototype.toString = function(options, level) { - var attName, attValue, child, indent, newline, pretty, r, space, _i, _len, _ref, _ref1; - pretty = (options != null) && options.pretty || false; - indent = (options != null) && options.indent || ' '; - newline = (options != null) && options.newline || '\n'; - level || (level = 0); - space = new Array(level + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - if (!(this.value != null)) { - r += '<' + this.name; - } else { - r += '' + this.value; - } - _ref = this.attributes; - for (attName in _ref) { - attValue = _ref[attName]; - if (this.name === '!DOCTYPE') { - r += ' ' + attValue; - } else { - r += ' ' + attName + '="' + attValue + '"'; - } - } - if (this.children.length === 0) { - if (!(this.value != null)) { - r += this.name === '?xml' ? '?>' : this.name === '!DOCTYPE' ? '>' : '/>'; - } - if (pretty) { - r += newline; - } - } else if (pretty && this.children.length === 1 && this.children[0].value) { - r += '>'; - r += this.children[0].value; - r += ''; - r += newline; - } else { - r += '>'; - if (pretty) { - r += newline; - } - _ref1 = this.children; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - child = _ref1[_i]; - r += child.toString(options, level + 1); - } - if (pretty) { - r += space; - } - r += ''; - if (pretty) { - r += newline; - } - } - return r; - }; - - XMLFragment.prototype.escape = function(str) { - return str.replace(/&/g, '&').replace(//g, '>').replace(/'/g, ''').replace(/"/g, '"'); - }; - - XMLFragment.prototype.assertLegalChar = function(str) { - var chars, chr; - chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/; - chr = str.match(chars); - if (chr) { - throw new Error("Invalid character (" + chr + ") in string: " + str); - } - }; - - XMLFragment.prototype.is = function(obj, type) { - var clas; - clas = Object.prototype.toString.call(obj).slice(8, -1); - return (obj != null) && clas === type; - }; - - XMLFragment.prototype.ele = function(name, attributes, text) { - return this.element(name, attributes, text); - }; - - XMLFragment.prototype.txt = function(value) { - return this.text(value); - }; - - XMLFragment.prototype.dat = function(value) { - return this.cdata(value); - }; - - XMLFragment.prototype.att = function(name, value) { - return this.attribute(name, value); - }; - - XMLFragment.prototype.com = function(value) { - return this.comment(value); - }; - - XMLFragment.prototype.doc = function() { - return this.document(); - }; - - XMLFragment.prototype.e = function(name, attributes, text) { - return this.element(name, attributes, text); - }; - - XMLFragment.prototype.t = function(value) { - return this.text(value); - }; - - XMLFragment.prototype.d = function(value) { - return this.cdata(value); - }; - - XMLFragment.prototype.a = function(name, value) { - return this.attribute(name, value); - }; - - XMLFragment.prototype.c = function(value) { - return this.comment(value); - }; - - XMLFragment.prototype.r = function(value) { - return this.raw(value); - }; - - XMLFragment.prototype.u = function() { - return this.up(); - }; - - return XMLFragment; - - })(); - - module.exports = XMLFragment; - -}).call(this); diff --git a/cli/node_modules/aws-sdk/node_modules/xmlbuilder/lib/index.js b/cli/node_modules/aws-sdk/node_modules/xmlbuilder/lib/index.js deleted file mode 100644 index a930f5b0d..000000000 --- a/cli/node_modules/aws-sdk/node_modules/xmlbuilder/lib/index.js +++ /dev/null @@ -1,15 +0,0 @@ -// Generated by CoffeeScript 1.3.3 -(function() { - var XMLBuilder; - - XMLBuilder = require('./XMLBuilder'); - - module.exports.create = function(name, xmldec, doctype) { - if (name != null) { - return new XMLBuilder(name, xmldec, doctype).root(); - } else { - return new XMLBuilder(); - } - }; - -}).call(this); diff --git a/cli/node_modules/aws-sdk/node_modules/xmlbuilder/package.json b/cli/node_modules/aws-sdk/node_modules/xmlbuilder/package.json deleted file mode 100644 index 5212380a9..000000000 --- a/cli/node_modules/aws-sdk/node_modules/xmlbuilder/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "xmlbuilder", - "version": "0.4.2", - "keywords": [ - "xml", - "xmlbuilder" - ], - "homepage": "http://github.com/oozcitak/xmlbuilder-js", - "description": "An XML builder for node.js", - "author": { - "name": "Ozgur Ozcitak", - "email": "oozcitak@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://opensource.org/licenses/mit-license.php" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/oozcitak/xmlbuilder-js.git" - }, - "bugs": { - "url": "http://github.com/oozcitak/xmlbuilder-js/issues" - }, - "main": "./lib/index", - "engines": { - "node": ">=0.2.0" - }, - "devDependencies": { - "coffee-script": "1.1.x" - }, - "scripts": { - "test": "make test" - }, - "_npmUser": { - "name": "oozcitak", - "email": "oozcitak@gmail.com" - }, - "_id": "xmlbuilder@0.4.2", - "dependencies": {}, - "_engineSupported": true, - "_npmVersion": "1.1.0-alpha-2", - "_nodeVersion": "v0.6.3", - "_defaultsLoaded": true, - "dist": { - "shasum": "1776d65f3fdbad470a08d8604cdeb1c4e540ff83", - "tarball": "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-0.4.2.tgz" - }, - "maintainers": [ - { - "name": "oozcitak", - "email": "oozcitak@gmail.com" - } - ], - "directories": {}, - "_shasum": "1776d65f3fdbad470a08d8604cdeb1c4e540ff83", - "_resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-0.4.2.tgz", - "_from": "xmlbuilder@0.4.2", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/aws-sdk/package.json b/cli/node_modules/aws-sdk/package.json deleted file mode 100644 index db5ca4131..000000000 --- a/cli/node_modules/aws-sdk/package.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "name": "aws-sdk", - "description": "AWS SDK for JavaScript", - "version": "2.1.40", - "author": { - "name": "Amazon Web Services", - "url": "http://aws.amazon.com/" - }, - "homepage": "https://github.com/aws/aws-sdk-js", - "contributors": [ - { - "name": "Loren Segal", - "email": "lsegal@amazon.com" - }, - { - "name": "Trevor Rowe", - "email": "trevrowe@amazon.com" - } - ], - "devDependencies": { - "repl.history": "*", - "semver": "*", - "coffee-script": "1.6.3", - "eslint": "*", - "cucumber": "*", - "coffeeify": "*", - "browserify": "3.x", - "uglify-js": "2.x", - "mocha": "*", - "chai": "*", - "istanbul": "*", - "coveralls": "2.x" - }, - "dependencies": { - "sax": "0.5.3", - "xml2js": "0.2.8", - "xmlbuilder": "0.4.2" - }, - "main": "lib/aws.js", - "browser": "lib/browser.js", - "browserify": { - "transform": "./dist-tools/transform.js" - }, - "directories": { - "lib": "lib" - }, - "engines": { - "node": ">= 0.8.0" - }, - "repository": { - "type": "git", - "url": "git://github.com/aws/aws-sdk-js.git" - }, - "bugs": { - "url": "http://github.com/aws/aws-sdk-js/issues" - }, - "license": "Apache-2.0", - "keywords": [ - "api", - "amazon", - "aws", - "ec2", - "simpledb", - "s3", - "sqs", - "ses", - "sns", - "route53", - "rds", - "elasticache", - "cloudfront", - "fps", - "cloudformation", - "cloudwatch", - "dynamodb", - "iam", - "swf", - "autoscaling", - "cloudsearch", - "elb", - "loadbalancing", - "emr", - "mapreduce", - "importexport", - "storagegateway", - "workflow", - "ebs", - "vpc", - "beanstalk", - "glacier", - "kinesis", - "cloudtrail" - ], - "scripts": { - "test": "npm -s run-script lint && npm -s run-script unit && npm -s run-script buildertest && npm -s run-script browsertest && ([ -f configuration ] && npm -s run-script integration || true)", - "unit": "istanbul `[ $COVERAGE ] && echo 'cover _mocha' || echo 'test mocha'` -- test test/json test/model test/protocol test/query test/services test/signers test/xml test/s3", - "coverage": "istanbul cover ./node_modules/mocha/bin/_mocha -- test test/json test/model test/protocol test/query test/services test/signers test/xml", - "browsertest": "rake browser:test", - "buildertest": "mocha --compilers coffee:coffee-script -s 1000 -t 10000 dist-tools/test", - "integration": "cucumber.js", - "lint": "eslint lib dist-tools/*.js", - "console": "./scripts/console" - }, - "gitHead": "61315bb286519273eca0ecbe8270987c9f05ae89", - "_id": "aws-sdk@2.1.40", - "_shasum": "dc0c61c4abd0e973ae5df4189c27f917d8f0016b", - "_from": "aws-sdk@>=2.1.24 <3.0.0", - "_resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1.40.tgz", - "_npmVersion": "2.11.2", - "_nodeVersion": "0.12.6", - "_npmUser": { - "name": "aws", - "email": "aws-sdk-js@amazon.com" - }, - "maintainers": [ - { - "name": "aws", - "email": "trevrowe@amazon.com" - } - ], - "dist": { - "shasum": "dc0c61c4abd0e973ae5df4189c27f917d8f0016b", - "tarball": "http://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1.40.tgz" - }, - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/aws-sdk/scripts/console b/cli/node_modules/aws-sdk/scripts/console deleted file mode 100755 index 94dae0210..000000000 --- a/cli/node_modules/aws-sdk/scripts/console +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env node - -var repl = require('repl').start('aws-sdk> '), - replEval = repl.eval, - defaultOptions = { - logger: process.stdout, - region: process.env.AWS_REGION || 'us-east-1' - }; - - -function customEval(cmd, context, filename, callback) { - replEval(cmd, context, filename, function(err, value) { - if (err) { - callback(err, null); - return; - } - - if (value && value.constructor === AWS.Request) { - if (!value.__hasBeenSent__) { - value.__hasBeenSent__ = true; - try { - value.on('complete', function consoleDataExtraction(resp) { - context.data = resp.data; - context.error = resp.error; - callback(resp.error, resp.data); - }); - context.request = value; - context.data = null; - context.error = null; - context.response = value.send(); - } catch (err2) { - callback(err2, null); - return; - } - } else { - callback(null, value); - } - } else { - callback(null, value); - } - }); -} - -var AWS = repl.context.AWS = require('../lib/aws'); -repl.eval = customEval; - -// context variables -repl.context.data = null; -repl.context.error = null; -repl.context.request = null; -repl.context.response = null; - -// setup REPL history -try { - var replHistory = require('repl.history'); - replHistory(repl, process.env.HOME + '/.node_history'); -} catch (e) { - console.log("Missing repl.history package, history will not be supported."); - console.log(" Type `npm install repl.history` to enable history."); -} - -// load services as defined instances -for (var key in AWS) { - var id = AWS[key].serviceIdentifier; - if (id) { - if (id === 'cloudsearchdomain') continue; // this required an explicit endpoint - - var svcClass = AWS[key]; - var svc = new svcClass(defaultOptions); - svc.with = function(config) { - return new this.constructor.__super__(AWS.util.merge(this.config, config)); - }; - repl.context[svcClass.serviceIdentifier] = svc; - } -} diff --git a/cli/node_modules/aws-sdk/scripts/lib/translator.js b/cli/node_modules/aws-sdk/scripts/lib/translator.js deleted file mode 100644 index 74eccffe0..000000000 --- a/cli/node_modules/aws-sdk/scripts/lib/translator.js +++ /dev/null @@ -1,153 +0,0 @@ -/* A couple of utility methods */ - -function each(obj, iter) { - for (var key in obj) { - if (obj.hasOwnProperty(key)) iter(key, obj[key]); - } -} - -function nextString(str) { - return 'S' + (parseInt(str.substr(1), 36) + 1).toString(36); -} - -/* End utility methods */ - -function Translator(api, options) { - var origLength = JSON.stringify(api, null, 2).length; - var debugInfo = {flattened: {}, pruned: {}}; - var shapeName = 'S0'; - var shapeNameMap = {}; - var visitedShapes = {}; - - function logResults() { - console.log('** Generated', api.metadata.endpointPrefix + '-' + - api.metadata.apiVersion +'.min.json' + - (process.env.DEBUG ? ':' : '')); - - if (process.env.DEBUG) { - var pruned = Object.keys(debugInfo.pruned); - var flattened = Object.keys(debugInfo.flattened); - var newLength = JSON.stringify(api, null, 2).length; - console.log('- Pruned Shapes:', pruned.length); - console.log('- Flattened Shapes:', flattened.length); - console.log('- Remaining Shapes:', Object.keys(api.shapes).length); - console.log('- Original Size:', origLength / 1024.0, 'kb'); - console.log('- Minified Size:', newLength / 1024.0, 'kb'); - console.log('- Size Saving:', (origLength - newLength) / 1024.0, 'kb'); - console.log(''); - } - } - - function deleteTraits(obj) { - if (!options.documentation) { - delete obj.documentation; - delete obj.documentationUrl; - delete obj.errors; - delete obj.min; - delete obj.max; - delete obj.pattern; - delete obj['enum']; - delete obj.box; - } - } - - function trackShapeDeclaration(ref) { - if (ref.shape && !shapeNameMap[ref.shape]) { - // found a shape declaration we have not yet visited. - // assign a new generated name in the shapeNameMap & visit it - var oldShapeName = ref.shape; - ref.shape = shapeName = nextString(shapeName); - - visitedShapes[shapeName] = api.shapes[oldShapeName]; - shapeNameMap[oldShapeName] = {name: shapeName, refs: [ref]}; - - traverseShapeRef(api.shapes[oldShapeName]); - } else if (ref.shape && shapeNameMap[ref.shape]) { - // we visited this shape before. keep track of this ref and rename - // the referenced declaration to the generated name - var map = shapeNameMap[ref.shape]; - map.refs.push(ref); - ref.shape = map.name; - } - } - - function pruneShapes() { - // prune shapes visited only once or only have type specifiers - each(shapeNameMap, function(name, map) { - if (Object.keys(visitedShapes[map.name]).join() === 'type' && - ['structure','map','list'].indexOf(visitedShapes[map.name].type) < 0) { - // flatten out the shape (only a scalar type property is on the shape) - for (var i = 0; i < map.refs.length; i++) { - var ref = map.refs[i]; - debugInfo.flattened[name] = true; - delete ref.shape; - ref.type = visitedShapes[map.name].type; - - // string type is default, don't need to specify this - if (ref.type === 'string') delete ref.type; - } - - // we flattened all refs, we can prune the shape too - delete visitedShapes[map.name]; - debugInfo.pruned[name] = true; - } else if (map.refs.length === 1) { // only visited once - // merge shape data onto ref - var shape = visitedShapes[map.name]; - - for (var i = 0; i < map.refs.length; i++) { - delete map.refs[i].shape; - for (var prop in shape) { - if (shape.hasOwnProperty(prop)) map.refs[i][prop] = shape[prop]; - } - } - - // delete the visited shape - delete visitedShapes[map.name]; - debugInfo.pruned[name] = true; - } - }); - } - - function traverseShapeRef(ref) { - if (!ref) return; - - deleteTraits(ref); - - traverseShapeRef(ref.key); // for maps - traverseShapeRef(ref.value); // for maps - traverseShapeRef(ref.member); // for lists - - // for structures - each(ref.members || {}, function(key, value) { traverseShapeRef(value); }); - - // resolve shape declarations - trackShapeDeclaration(ref); - } - - function traverseOperation(op) { - deleteTraits(op); - - delete op.name; - if (op.http) { - if (op.http.method === 'POST') delete op.http.method; - if (op.http.requestUri === '/') delete op.http.requestUri; - if (Object.keys(op.http).length === 0) delete op.http; - } - - traverseShapeRef(op.input); - traverseShapeRef(op.output); - } - - function traverseApi() { - deleteTraits(api); - each(api.operations, function(name, op) { traverseOperation(op); }); - api.shapes = visitedShapes; - } - - traverseApi(); - pruneShapes(); - logResults(); - return api; -} - -module.exports = Translator; diff --git a/cli/node_modules/aws-sdk/scripts/translate-api b/cli/node_modules/aws-sdk/scripts/translate-api deleted file mode 100755 index 015b31237..000000000 --- a/cli/node_modules/aws-sdk/scripts/translate-api +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env node - -var fs = require('fs'); -var Translator = require('./lib/translator'); -var util = require('util'); - -var basePath = __dirname + '/../apis/'; -var paths = fs.readdirSync(basePath); -var modelName = process.argv[2] || ''; - -paths.forEach(function (path) { - if (path.match(new RegExp(modelName + ".+\\.normal\\.json$"))) { - var opath = path.replace(/\.normal\.json$/, '.min.json'); - var data = JSON.parse(fs.readFileSync(basePath + path).toString()); - var translated = new Translator(data, {documentation: false}); - var json = JSON.stringify(translated, null, ' '); - fs.writeFileSync(basePath + opath, json); - } -}); diff --git a/cli/node_modules/aws-sdk/testem.json b/cli/node_modules/aws-sdk/testem.json deleted file mode 100644 index 8e097d960..000000000 --- a/cli/node_modules/aws-sdk/testem.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "test_page": "test/browser/runner.html" -} diff --git a/cli/node_modules/chai/.npmignore b/cli/node_modules/chai/.npmignore deleted file mode 100644 index 59f495632..000000000 --- a/cli/node_modules/chai/.npmignore +++ /dev/null @@ -1,14 +0,0 @@ -.git* -docs/ -test/ -support/ -component.json -components/ -build/ -lib-cov/ -coverage/ -.travis.yml -.mailmap -Makefile -*.swp -.DS_Store diff --git a/cli/node_modules/chai/CONTRIBUTING.md b/cli/node_modules/chai/CONTRIBUTING.md deleted file mode 100644 index b14a92ec0..000000000 --- a/cli/node_modules/chai/CONTRIBUTING.md +++ /dev/null @@ -1,202 +0,0 @@ -# Chai Contribution Guidelines - -We like to encourage you to contribute to the Chai.js repository. This should be as easy as possible for you but there are a few things to consider when contributing. The following guidelines for contribution should be followed if you want to submit a pull request or open an issue. - -Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue or assessing patches and features. - -#### Table of Contents - -- [TLDR;](#tldr) -- [Contributing](#contributing) - - [Bug Reports](#bugs) - - [Feature Requests](#features) - - [Pull Requests](#pull-requests) -- [Releasing](#releasing) -- [Support](#support) - - [Resources](#resources) - - [Core Contributors](#contributors) - - -## TLDR; - -- Creating an Issue or Pull Request requires a [GitHub](http://github.com) account. -- Issue reports should be **clear**, **concise** and **reproducible**. Check to see if your issue has already been resolved in the [master]() branch or already reported in Chai's [GitHub Issue Tracker](https://github.com/chaijs/chai/issues). -- Pull Requests must adhere to strict [coding style guidelines](https://github.com/chaijs/chai/wiki/Chai-Coding-Style-Guide). -- In general, avoid submitting PRs for new Assertions without asking core contributors first. More than likely it would be better implemented as a plugin. -- Additional support is available via the [Google Group](http://groups.google.com/group/chaijs) or on irc.freenode.net#chaijs. -- **IMPORTANT**: By submitting a patch, you agree to allow the project owner to license your work under the same license as that used by the project. - - - - -## Contributing - -The issue tracker is the preferred channel for [bug reports](#bugs), -[feature requests](#features) and [submitting pull -requests](#pull-requests), but please respect the following restrictions: - -* Please **do not** use the issue tracker for personal support requests (use - [Google Group](https://groups.google.com/forum/#!forum/chaijs) or IRC). -* Please **do not** derail or troll issues. Keep the discussion on topic and - respect the opinions of others - - -### Bug Reports - -A bug is a **demonstrable problem** that is caused by the code in the repository. - -Guidelines for bug reports: - -1. **Use the GitHub issue search** — check if the issue has already been reported. -2. **Check if the issue has been fixed** — try to reproduce it using the latest `master` or development branch in the repository. -3. **Isolate the problem** — create a test case to demonstrate your issue. Provide either a repo, gist, or code sample to demonstrate you problem. - -A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What browser(s) and/or Node.js versions experience the problem? What would you expect to be the outcome? All these details will help people to fix any potential bugs. - -Example: - -> Short and descriptive example bug report title -> -> A summary of the issue and the browser/OS environment in which it occurs. If suitable, include the steps required to reproduce the bug. -> -> 1. This is the first step -> 2. This is the second step -> 3. Further steps, etc. -> -> `` - a link to the reduced test case OR -> ```js -> expect(a).to.equal('a'); -> // code sample -> ``` -> -> Any other information you want to share that is relevant to the issue being reported. This might include the lines of code that you have identified as causing the bug, and potential solutions (and your opinions on their merits). - - -### Feature Requests - -Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to *you* to make a strong case to convince the project's developers of the merits of this feature. Please provide as much detail and context as possible. - -Furthermore, since Chai.js has a [robust plugin API](http://chaijs.com/guide/plugins/), we encourage you to publish **new Assertions** as plugins. If your feature is an enhancement to an **existing Assertion**, please propose your changes as an issue prior to opening a pull request. If the core Chai.js contributors feel your plugin would be better suited as a core assertion, they will invite you to open a PR in [chaijs/chai](https://github.com/chaijs/chai). - - -### Pull Requests - -- PRs for new core-assertions are advised against. -- PRs for core-assertion bug fixes are always welcome. -- PRs for enhancing the interfaces are always welcome. -- PRs that increase test coverage are always welcome. -- PRs are scrutinized for coding-style. - -Good pull requests - patches, improvements, new features - are a fantastic help. They should remain focused in scope and avoid containing unrelated commits. - -**Please ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project. - -Please adhere to the coding conventions used throughout a project (indentation, accurate comments, etc.) and any other requirements (such as test coverage). Please review the [Chai.js Coding Style Guide](https://github.com/chaijs/chai/wiki/Chai-Coding-Style-Guide). - -Follow this process if you'd like your work considered for inclusion in the project: - -1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, and configure the remotes: - -```bash -# Clone your fork of the repo into the current directory -git clone https://github.com// -# Navigate to the newly cloned directory -cd -# Assign the original repo to a remote called "upstream" -git remote add upstream https://github.com// -``` - -2. If you cloned a while ago, get the latest changes from upstream: - -```bash -git checkout -git pull upstream -``` - -3. Create a new topic branch (off the main project development branch) to contain your feature, change, or fix: - -```bash -git checkout -b -``` - -4. Commit your changes in logical chunks. Use Git's [interactive rebase](https://help.github.com/articles/interactive-rebase) feature to tidy up your commits before making them public. - -5. Locally merge (or rebase) the upstream development branch into your topic branch: - -```bash -git pull [--rebase] upstream -``` - -6. Push your topic branch up to your fork: - -```bash -git push origin -``` - -7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) with a clear title and description. - -**IMPORTANT**: By submitting a patch, you agree to allow the project owner to license your work under the same license as that used by the project. - - -## Releasing - -Releases can be prepared by any core-contributor or user whom has push access to -the `chaijs/chai` repository. - -This process requires [git-extras](https://github.com/tj/git-extras) for some steps. - -1. Ensure all tests pass. -2. Bump the version tag in-code and for all package managers. - - `lib/chai.js` - - `package.json` - - `component.json` - - `bower.json` -3. Build the browser version with `make`. -4. Append commit log to `HISTORY.md` using `git changelog` command. -5. Write human-friendly `ReleaseNotes.md` based on changelog. - - If breaking changes, write migration tutorial(s) and reasoning. - - Callouts for community contributions (PRs) with links to PR and contributing user. - - Callouts for other fixes made by core contributors with links to issue. -6. Update `README.md` with an updated contributors list using `git summary` command. -7. Push a tagged release using `git release x.x.x`. - - All tagged releases are published to NPM. - - -## Support - - -### Resources - -For most of the documentation you are going to want to visit [ChaiJS.com](http://chaijs.com). - -- [Getting Started Guide](http://chaijs.com/guide/) -- [API Reference](http://chaijs.com/api/) -- [Plugins](http://chaijs.com/plugins/) - -Alternatively, the [wiki](https://github.com/chaijs/chai/wiki) might be what you are looking for. - -- [Chai Coding Style Guide](https://github.com/chaijs/chai/wiki/Chai-Coding-Style-Guide) -- [Third-party Resources](https://github.com/chaijs/chai/wiki/Third-Party-Resources) - -Or finally, you may find a core-contributor or like-minded developer in any of our support channels. - -- IRC: irc.freenode.org #chaijs -- [Mailing List / Google Group](https://groups.google.com/forum/#!forum/chaijs) - - -### Core Contributors - -Feel free to reach out to any of the core-contributors with you questions or concerns. We will do our best to respond in a timely manner. - -- Jake Luer - - GH: [@logicalparadox](https://github.com/logicalparadox) - - TW: [@jakeluer](http://twitter.com/jakeluer) - - IRC: logicalparadox -- Veselin Todorov - - GH: [@vesln](https://github.com/vesln/) - - TW: [@vesln](http://twitter.com/vesln) - - IRC: vesln -- Keith Cirkel - - GH: [@keithamus](https://github.com/keithamus) - - TW: [@keithamus](http://twitter.com/keithamus) - - IRC: keithamus diff --git a/cli/node_modules/chai/History.md b/cli/node_modules/chai/History.md deleted file mode 100644 index fbb6dcea3..000000000 --- a/cli/node_modules/chai/History.md +++ /dev/null @@ -1,1052 +0,0 @@ -2.3.0 / 2015-04-26 -================== - - * Merge pull request #423 from ehntoo/patch-1 - * Merge pull request #422 from ljharb/fix_descriptor_tests - * Fix a small bug in the .null assertion docs - * Use a regex to account for property ordering issues across engines. - * Add `make test-firefox` - * Merge pull request #417 from astorije/astorije/minimalist-typo - * Remove trailing whitespaces - * Fix super minor typo in an example - * Merge pull request #408 from ljharb/enumerableProperty - * Add `ownPropertyDescriptor` assertion. - -2.2.0 / 2015-03-26 -================== - - * Merge pull request #405 from chaijs/deep-escape-doc-tweaks - * Tweak documentation on `.deep` flag. - * Merge pull request #402 from umireon/escaping-dot-should-be-taken - * Documentation of escaping in `.deep` flag. - * take regular expression apart - * Feature: backslash-escaping in `.deep.property` - * Escaping dot should be taken in deep property - -2.1.2 / 2015-03-15 -================== - - * Merge pull request #396 from chaijs/add-keith-cirkel-contributing-md - * Add Keith Cirkel to CONTRIBUTING.md - * Merge pull request #395 from cjqed/386-assert-operator-no-eval - * No longer using eval on assert operator #386 - * Merge pull request #389 from chaijs/update-git-summary - * Update `git summary` in README - -2.1.1 / 2015-03-04 -================== - - * Merge pull request #385 from eldritch-fossicker/master - * updates to reflect code style preference from @keithamus - * fix indexing into array with deep propery - * Merge pull request #382 from astorije/patch-2 - * Merge pull request #383 from gurdiga/config-doc-wording-improvement - * config.truncateThreshold docs: simpler wording - * Add missing docstring for showDiff argument of assert - * Merge pull request #381 from astorije/patch-1 - * Add a minor precision that empty asserts on strings too. - * Merge pull request #379 from dcneiner/should-primitive-fix - * Primitives now use valueOf in shouldGetter - -2.1.0 / 2015-02-23 -================== - - * Merge pull request #374 from jmm/v2.0.1 - * Increment version to 2.0.1. - * Merge pull request #365 from chaijs/fix-travis - * Fix travis.yml deploy - * Merge pull request #356 from Soviut/master - * documented fail methods for expect and should interfaces - * fail method added directly to expect - -2.0.0 / 2015-02-09 -================== - - * Merge pull request #361 from gregglind/b265-keys-object - * fix #359. Add `.keys(object)` - * Merge pull request #359 from gregglind/b359-unexpected-keys-sort - * Fix #359 keys() sorts input unexpectedly - * contrib: publish release strategy and travis npm creds #337 - * Merge pull request #357 from danilovaz/master - * Update copyright date - * Merge pull request #349 from toastynerd/add-which-chain-method - * add the which chain method as per issue #347 - * Merge pull request #333 from cmpolis/change-assertions - * more `by` cleanup - * cleaned out `.by` for #333 - * Merge pull request #335 from DingoEatingFuzz/expose-util - * Expose chai util through the chai object - * cleanup (per notes on pr #333) - * updated `change` to work w/ non-number values + tests - * Merge pull request #334 from hurrymaplelad/patch-1 - * Typo, the flag is called 'contains' with an 's' - * updated assertion interface with `change` (#330) - * added `change`,`increase`,`decrease` assertions (#330) - * assert tests for `change`,`increase`,`decrease` - * expect/should tests for `change`,`increase`,`decrease` - * Merge pull request #328 from lo1tuma/issue-327 - * Add includes and contains alias (fixes #327) - * Merge pull request #325 from chasenlehara/overwriteChainableMethodDocs - * Fix docs for overwriteChainableMethod parameters - * Merge pull request #317 from jasonkarns/patch-2 - * Merge pull request #318 from jasonkarns/patch-3 - * Merge pull request #316 from jasonkarns/patch-1 - * typos in docs - * minor docs typo - * update docs: getAllFlags -> transferFlags - * Merge pull request #313 from cjqed/254-expect-any-all - * Added the all and any flags for keys assertion, with all being the default behavior - * Merge pull request #312 from cjqed/291-assert-same-deep-members - * Changed public comment of sameDeepMemebers to be more clear - * Fixes issue #291, adds assert.sameDeepMembers - * Merge pull request #311 from cjqed/305-above-below-on-assert - * Merge pull request #308 from prodatakey/hasproperty - * Issue #305 fixed, added assert.isAbove and assert.isBelow - * Fix typo - * More unit tests for new utility functions - * Refactor common functionality, document, test - * Refactor if statement out - * Small unit test fix - * Handle array indexing terminating paths - * Merge pull request #309 from ericdouglas/iterableEqual-couting-once - * couting variables just once - * Fix properties with `undefined` value pass property assertion - * Merge pull request #306 from chaijs/revert-297-noopchainfunc - * Revert "Allows writing lint-friendly tests" - -1.10.0 / 2014-11-10 -================== - - * Merge pull request #297 from prodatakey/noopchainfunc - * Merge pull request #300 from julienw/299-fix-getMessage-test - * Fix #299: the test is defining global variables - * Add a couple more unit tests - * Add unit tests for chained terminating property asserts - * Revise documentation wording - * Add docs for function style NOOP asserts - * Make the NOOP function a shared constant - * Merge pull request #298 from dasilvacontin/negativeZeroLogging - * why not more assertions - * added test for inspecting `-0` - * a more readable/simple condition statement, as pointed out by @keithamus - * added check for logging negative zero - * Change test to not trigger argument bug - * Allows writing lint-friendly tests - * readme: update contributors for 1.9.2 - -1.9.2 / 2014-09-29 -================== - - * Merge pull request #268 from charlierudolph/cr-lazyMessages - * Merge pull request #269 from charlierudolph/cr-codeCleanup - * Merge pull request #277 from charlierudolph/fix-doc - * Merge pull request #279 from mohayonao/fix-closeTo - * Merge pull request #292 from boneskull/mocha - * resolves #255: upgrade mocha - * Merge pull request #289 from charlierudolph/cr-dryUpCode - * Dry up code - * Merge pull request #275 from DrRataplan/master - * assert: .closeTo() verify value's type before assertion - * Rewrite pretty-printing HTML elements to prevent throwing internal errors Fixes errors occuring when using a non-native DOM implementation - * Fix assert documentation - * Remove unused argument - * Allow messages to be functions - * Merge pull request #267 from shinnn/master - * Use SVG badge - * Merge pull request #264 from cjthompson/keys_diff - * Show diff for keys assertion - -1.9.1 / 2014-03-19 -================== - - * deps update - * util: [getActual] select actual logic now allows undefined for actual. Closes #183 - * docs: [config] make public, express param type - * Merge pull request #251 from romario333/threshold3 - * Fix issue #166 - configurable threshold in objDisplay. - * Move configuration options to config.js. - * Merge pull request #233 from Empeeric/master - * Merge pull request #244 from leider/fix_for_contains - * Merge pull request #247 from didoarellano/typo-fixes - * Fix typos - * Merge pull request #245 from lfac-pt/patch-1 - * Update `exports.version` to 1.9.0 - * aborting loop on finding - * declaring variable only once - * additional test finds incomplete implementation - * simplified code - * fixing #239 (without changing chai.js) - * ssfi as it should be - * Merge pull request #228 from duncanbeevers/deep_members - * Deep equality check for collection membership - -1.9.0 / 2014-01-29 -================== - - * docs: add contributing.md #238 - * assert: .throws() returns thrown error. Closes #185 - * Merge pull request #232 from laconbass/assert-throws - * assert: .fail() parameter mismatch. Closes #206 - * Merge branch 'karma-fixes' - * Add karma phantomjs launcher - * Use latest karma and sauce launcher - * Karma tweaks - * Merge pull request #230 from jkroso/include - * Merge pull request #237 from chaijs/coverage - * Add coverage to npmignore - * Remove lib-cov from test-travisci dependents - * Remove the not longer needed lcov reporter - * Test coverage with istanbul - * Remove jscoverage - * Remove coveralls - * Merge pull request #226 from duncanbeevers/add_has - * Avoid error instantiation if possible on assert.throws - * Merge pull request #231 from duncanbeevers/update_copyright_year - * Update Copyright notices to 2014 - * handle negation correctly - * add failing test case - * support `{a:1,b:2}.should.include({a:1})` - * Merge pull request #224 from vbardales/master - * Add `has` to language chains - * Merge pull request #219 from demands/overwrite_chainable - * return error on throw method to chain on error properties, possibly different from message - * util: store chainable behavior in a __methods object on ctx - * util: code style fix - * util: add overwriteChainableMethod utility (for #215) - * Merge pull request #217 from demands/test_cleanup - * test: make it possible to run utilities tests with --watch - * makefile: change location of karma-runner bin script - * Merge pull request #202 from andreineculau/patch-2 - * test: add tests for throwing custom errors - * Merge pull request #201 from andreineculau/patch-1 - * test: updated for the new assertion errors - * core: improve message for assertion errors (throw assertion) - -1.8.1 / 2013-10-10 -================== - - * pkg: update deep-eql version - -1.8.0 / 2013-09-18 -================== - - * test: [sauce] add a few more browsers - * Merge branch 'refactor/deep-equal' - * util: remove embedded deep equal utility - * util: replace embedded deep equal with external module - * Merge branch 'feature/karma' - * docs: add sauce badge to readme [ci skip] - * test: [sauce] use karma@canary to prevent timeouts - * travis: only run on node 0.10 - * test: [karma] use karma phantomjs runner - * Merge pull request #181 from tricknotes/fix-highlight - * Fix highlight for example code - -1.7.2 / 2013-06-27 -================== - - * coverage: add coveralls badge - * test: [coveralls] add coveralls api integration. testing travis-ci integration - * Merge branch 'master' of github.com:chaijs/chai - * Merge branch 'feature/bower' - * Merge pull request #180 from tricknotes/modify-method-title - * Merge pull request #179 from tricknotes/highlight-code-example - * Modify method title to include argument name - * Fix to highlight code example - * bower: granular ignores - -1.7.1 / 2013-06-24 -================== - - * Merge branch 'feature/bower'. #175 - * bower: add json file - * build: browser - -1.7.0 / 2013-06-17 -================== - - * error: remove internal assertion error constructor - * core: [assertion-error] replace internal assertion error with dep - * deps: add chaijs/assertion-error@1.0.0 - * docs: fix typo in source file. #174 - * Merge pull request #174 from piecioshka/master - * typo - * Merge branch 'master' of github.com:chaijs/chai - * pkg: lock mocha/mocha-phantomjs versions (for now) - * Merge pull request #173 from chaijs/inspect-fix - * Fix `utils.inspect` with custom object-returning inspect()s. - * Merge pull request #171 from Bartvds/master - * replaced tabs with 2 spaces - * added assert.notOk() - * Merge pull request #169 from katsgeorgeek/topics/master - * Fix comparison objects. - -1.6.1 / 2013-06-05 -================== - - * Merge pull request #168 from katsgeorgeek/topics/master - * Add test for different RegExp flags. - * Add test for regexp comparison. - * Downgrade mocha version for fix running Phantom tests. - * Fix comparison equality of two regexps. - * Merge pull request #161 from brandonpayton/master - * Fix documented name for assert interfaces isDefined method - -1.6.0 / 2013-04-29 -================== - - * build: browser - * assert: [(not)include] throw on incompatible haystack. Closes #142 - * assert: [notInclude] add assert.notInclude. Closes #158 - * browser build - * makefile: force browser build on browser-test - * makefile: use component for browser build - * core: [assertions] remove extraneous comments - * Merge branch 'master' of github.com:chaijs/chai - * test: [assert] deep equal ordering - * Merge pull request #153 from NickHeiner/array-assertions - * giving members a no-flag assertion - * Code review comments - changing syntax - * Code review comments - * Adding members and memberEquals assertions for checking for subsets and set equality. Implements chaijs/chai#148. - * Merge pull request #140 from RubenVerborgh/function-prototype - * Restore the `call` and `apply` methods of Function when adding a chainable method. - * readme: 2013 - * notes: migration notes for deep equal changes - * test: for ever err() there must be a passing version - -1.5.0 / 2013-02-03 -================== - - * docs: add Release Notes for non-gitlog summary of changes. - * lib: update copyright to 2013 - * Merge branch 'refactor/travis' - * makefile: remove test-component for full test run - * pkg: script test now runs make test so travis will test browser - * browser: build - * tests: refactor some tests to support new objDisplay output - * test: [bootstrap] normalize boostrap across all test scenarios - * assertions: refactor some assertions to use objDisplay instead of inspect - * util: [objDisplay] normalize output of functions - * makefile: refactor for full build scenarios - * component: fix build bug where missing util:type file - * assertions: [throw] code cleanup - * Merge branch 'refactor/typeDetection' - * browser: build - * makefile: chai.js is .PHONY so it builds every time - * test: [expect] add arguments type detection test - * core/assertions: [type] (a/an) refactor to use type detection utility - * util: add cross-browser type detection utility - * Merge branch 'feature/component' - * browser: build - * component: add component.json file - * makefile: refactor for fine grain control of testing scenarios - * test: add mochaPhantomJS support and component test file - * deps: add component and mocha-phantomjs for browser testing - * ignore: update ignore files for component support - * travis: run for all branches - * Merge branch 'feature/showDiff' - * test: [Assertion] configruable showDiff flag. Closes #132 - * lib: [Assertion] add configurable showDiff flag. #132 - * Merge branch 'feature/saucelabs' - * Merge branch 'master' into feature/saucelabs - * browser: build - * support: add mocha cloud runner, client, and html test page - * test: [saucelabs] add auth placeholder - * deps: add mocha-cloud - * Merge pull request #136 from whatthejeff/message_fix - * Merge pull request #138 from timnew/master - * Fix issue #137, test message existence by using message!=null rather than using message - * Fixed backwards negation messages. - * Merge pull request #133 from RubenVerborgh/throw - * Functions throwing strings can reliably be tested. - * Merge pull request #131 from RubenVerborgh/proto - * Cache whether __proto__ is supported. - * Use __proto__ if available. - * Determine the property names to exclude beforehand. - * Merge pull request #126 from RubenVerborgh/eqls - * Add alias eqls for eql. - * Use inherited enumerable properties in deep equality comparison. - * Show inherited properties when inspecting an object. - * Add new getProperties and getEnumerableProperties utils. - * showDiff: force true for equal and eql - -1.4.2 / 2012-12-21 -================== - - * browser build: (object diff support when used with mocha) #106 - * test: [display] array test for mocha object diff - * browser: no longer need different AssertionError constructor - -1.4.1 / 2012-12-21 -================== - - * showDiff: force diff for equal and eql. #106 - * test: [expect] type null. #122 - * Merge pull request #115 from eshao/fix-assert-Throw - * FIX: assert.Throw checks error type/message - * TST: assert.Throw should check error type/message - -1.4.0 / 2012-11-29 -================== - - * pre-release browser build - * clean up index.js to not check for cov, revert package.json to use index.js - * convert tests to use new bootstrap - * refactor testing bootstrap - * use spaces (not tabs). Clean up #114 - * Merge pull request #114 from trantorLiu/master - * Add most() (alias: lte) and least() (alias: gte) to the API with new chainers "at" and "of". - * Change `main` to ./lib/chai. Fixes #28. - * Merge pull request #104 from connec/deep_equals_circular_references_ - * Merge pull request #109 from nnarhinen/patch-1 - * Check for 'actual' type - * Added support for circular references when checking deep (in)equality. - -1.3.0 / 2012-10-01 -================== - - * browser build w/ folio >= 0.3.4. Closes #99 - * add back buffer test for deep equal - * do not write flags to assertion.prototype - * remove buffer test from expect - * browser build - * improve documentation of custom error messages - * Merge branch 'master' of git://github.com/Liffft/chai into Liffft-master - * browser build - * improved buffer deep equal checking - * mocha is npm test command - * Cleaning up the js style… - * expect tests now include message pass-through - * packaging up browser-side changes… - * Increasing Throws error message verbosity - * Should syntax: piping message through - * Make globalShould test work in browser too. - * Add a setter for `Object.prototype.should`. Closes #86. - -1.2.0 / 2012-08-07 -================== - - * Merge branch 'feature/errmsg' - * browser build - * comment updates for utilities - * tweak objDislay to only kick in if object inspection is too long - * Merge branch 'master' into feature/errmsg - * add display sample for error message refactor - * first draft of error message refactor. #93 - * add `closeTo` assertion to `assert` interface. Closes #89. - * update folio build for better require.js handling. Closes #85 - * Merge pull request #92 from paulmillr/topics/add-dom-checks - * Add check for DOM objects. - * browser build - * Merge branch 'master' of github.com:chaijs/chai - * bug - getActual not defaulting to assertion subject - * Merge pull request #88 from pwnall/master - * Don't inspect() assertion arguments if the assertion passes. - -1.1.1 / 2012-07-09 -================== - - * improve commonjs support on browser build - * Merge pull request #83 from tkazec/equals - * Document .equals - * Add .equals as an alias of .equal - * remove unused browser prefix/suffix - * Merge branch 'feature/folio-build' - * browser build - * using folio to compile - * clean up makefile - * early folio 0.3.x support - -1.1.0 / 2012-06-26 -================== - - * browser build - * Disable "Assertion.includeStack is false" test in IE. - * Use `utils.getName` for all function inspections. - * Merge pull request #80 from kilianc/closeTo - * fixes #79 - * browser build - * expand docs to indicate change of subject for chaining. Closes #78 - * add `that` chain noop - * Merge branch 'bug/74' - * comments on how to property use `length` as chain. Closes #74 - * tests for length as chainable property. #74 - * add support for `length` as chainable prop/method. - * Merge branch 'bug/77' - * tests for getPathValue when working with nested arrays. Closes #77 - * add getPathValue support for nested arrays - * browser build - * fix bug for missing browser utils - * compile tool aware of new folder layout - * Merge branch 'refactor/1dot1' - * move core assertions to own file and refactor all using utils - * rearrange folder structure - -1.0.4 / 2012-06-03 -================== - - * Merge pull request #68 from fizker/itself - * Added itself chain. - * simplify error inspections for cross browser compatibility - * fix safari `addChainableMethod` errors. Closes #69 - -1.0.3 / 2012-05-27 -================== - - * Point Travis badge to the right place. - * Make error message for eql/deep.equal more clear. - * Fix .not.deep.equal. - * contributors list - -1.0.2 / 2012-05-26 -================== - - * Merge pull request #67 from chaijs/chaining-and-flags - * Browser build. - * Use `addChainableMethod` to get away from `__proto__` manipulation. - * New `addChainableMethod` utility. - * Replace `getAllFlags` with `transferFlags` utility. - * browser build - * test - get all flags - * utility - get all flags - * Add .mailmap to .npmignore. - * Add a .mailmap file to fix my name in shortlogs. - -1.0.1 / 2012-05-18 -================== - - * browser build - * Fixing "an" vs. "a" grammar in type assertions. - * Uniformize `assert` interface inline docs. - * Don't use `instanceof` for `assert.isArray`. - * Add `deep` flag for equality and property value. - * Merge pull request #64 from chaijs/assertion-docs - * Uniformize assertion inline docs. - * Add npm-debug.log to .gitignore. - * no reserved words as actuals. #62 - -1.0.0 / 2012-05-15 -================== - - * readme cleanup - * browser build - * utility comments - * removed docs - * update to package.json - * docs build - * comments / docs updates - * plugins app cleanup - * Merge pull request #61 from joliss/doc - * Fix and improve documentation of assert.equal and friends - * browser build - * doc checkpoint - texture - * Update chai-jquery link - * Use defined return value of Assertion extension functions - * Update utility docs - -1.0.0-rc3 / 2012-05-09 -================== - - * Merge branch 'feature/rc3' - * docs update - * browser build - * assert test conformity for minor refactor api - * assert minor refactor - * update util tests for new add/overwrite prop/method format - * added chai.Assertion.add/overwrite prop/method for plugin toolbox - * add/overwrite prop/method don't make assumptions about context - * doc test suite - * docs don't need coverage - * refactor all simple chains into one forEach loop, for clean documentation - * updated npm ignore - * remove old docs - * docs checkpoint - guide styled - * Merge pull request #59 from joliss/doc - * Document how to run the test suite - * don't need to rebuild docs to view - * dep update - * docs checkpoint - api section - * comment updates for docs - * new doc site checkpoint - plugin directory! - * Merge pull request #57 from kossnocorp/patch-1 - * Fix typo: devDependancies → devDependencies - * Using message flag in `getMessage` util instead of old `msg` property. - * Adding self to package.json contributors. - * `getMessage` shouldn't choke on null/omitted messages. - * `return this` not necessary in example. - * `return this` not necessary in example. - * Sinon–Chai has a dash - * updated plugins list for docs - -1.0.0-rc2 / 2012-05-06 -================== - - * Merge branch 'feature/test-cov' - * browser build - * missing assert tests for ownProperty - * appropriate assert equivalent for expect.to.have.property(key, val) - * reset AssertionError to include full stack - * test for plugin utilities - * overwrite Property and Method now ensure chain - * version notes in readme - -1.0.0-rc1 / 2012-05-04 -================== - - * browser build (rc1) - * assert match/notMatch tests - * assert interface - notMatch, ownProperty, notOwnProperty, ownPropertyVal, ownPropertyNotVal - * cleaner should interface export. - * added chai.Assertion.prototype._obj (getter) for quick access to object flag - * moved almostEqual / almostDeepEqual to stats plugin - * added mocha.opts - * Add test for `utils.addMethod` - * Fix a typo - * Add test for `utils.overwriteMethod` - * Fix a typo - * Browser build - * Add undefined assertion - * Add null assertion - * Fix an issue with `mocha --watch` - * travis no longer tests on node 0.4.x - * removing unnecissary carbon dep - * Merge branch 'feature/plugins-app' - * docs build - * templates for docs express app for plugin directory - * express app for plugin and static serving - * added web server deps - * Merge pull request #54 from josher19/master - * Remove old test.assert code - * Use util.inspect instead of inspect for deepAlmostEqual and almostEqual - * browser build - * Added almostEqual and deepAlmostEqual to assert test suite. - * bug - context determinants for utils - * dec=0 means rounding, so assert.deepAlmostEqual({pi: 3.1416}, {pi: 3}, 0) is true - * wrong travis link - * readme updates for version information - * travis tests 0.5.x branch as well - * [bug] util `addProperty` not correctly exporting - * read me version notes - * browser build 1.0.0alpha1 - * not using reserved words in internal assertions. #52 - * version tick - * clean up redundant tests - * Merge branch 'refs/heads/0.6.x' - * update version tag in package 1.0.0alpha1 - * browser build - * added utility tests to browser specs - * beginning utility testing - * updated utility comments - * utility - overwriteMethod - * utility - overwriteProperty - * utility - addMethod - * utility - addProperty - * missing ; - * contributors list update - * Merge branch 'refs/heads/0.6.x-docs' into 0.6.x - * Added guide link to docs. WIP - * Include/contain are now both properties and methods - * Add an alias annotation - * Remove usless function wrapper - * Fix a typo - * A/an are now both properties and methods - * [docs] new site homepage layout / color checkpoint - * Ignore IE-specific error properties. - * Fixing order of error message test. - * New cross-browser `getName` util. - * Fixing up `AssertionError` inheritance. - * backup docs - * Add doctypes - * [bug] was still using `constructor.name` in `throw` assertion - * [bug] flag Object.create(null) instead of new Object - * [test] browser build - * [refactor] all usage of Assertion.prototype.assert now uses template tags and flags - * [refactor] remove Assertion.prototype.inspect for testable object inspection - * [refactor] object to test is now stored in flag, with ssfi and custom message - * [bug] flag util - don't return on `set` - * [docs] comments for getMessage utility - * [feature] getMessage - * [feature] testing utilities - * [refactor] flag doesn't require `call` - * Make order of source files well-defined - * Added support for throw(errorInstance). - * Use a foolproof method of grabbing an error's name. - * Removed constructor.name check from throw. - * disabled stackTrack configuration tests until api is stable again - * first version of line displayed error for node js (unstable) - * refactor core Assertion to use flag utility for negation - * added flag utility - * tests for assert interface negatives. Closed #42 - * added assertion negatives that were missing. #42 - * Support for expected and actual parameters in assert-style error object - * chai as promised - readme - * Added assert.fail. Closes #40 - * better error message for assert.operator. Closes #39 - * [refactor] Assertion#property to use getPathValue property - * added getPathValue utility helper - * removed todo about browser build - * version notes - * version bumb 0.6.0 - * browser build - * [refactor] browser compile function to replace with `require('./error')' with 'require('./browser/error')' - * [feature] browser uses different error.js - * [refactor] error without chai.fail - * Assertion & interfaces use new utils helper export - * [refactor] primary export for new plugin util usage - * added util index.js helper - * added 2012 to copyright headers - * Added DeepEqual assertions - -0.5.3 / 2012-04-21 -================== - - * Merge branch 'refs/heads/jgonera-oldbrowsers' - * browser build - * fixed reserved names for old browsers in interface/assert - * fixed reserved names for old browsers in interface/should - * fixed: chai.js no longer contains fail() - * fixed reserved names for old browsers in Assertion - * Merge pull request #49 from joliss/build-order - * Make order of source files well-defined - * Merge pull request #43 from zzen/patch-1 - * Support for expected and actual parameters in assert-style error object - * chai as promised - readme - -0.5.2 / 2012-03-21 -================== - - * browser build - * Merge branch 'feature/assert-fail' - * Added assert.fail. Closes #40 - * Merge branch 'bug/operator-msg' - * better error message for assert.operator. Closes #39 - * version notes - -0.5.1 / 2012-03-14 -================== - - * chai.fail no longer exists - * Merge branch 'feature/assertdefined' - * Added asset#isDefined. Closes #37. - * dev docs update for Assertion#assert - -0.5.0 / 2012-03-07 -================== - - * [bug] on inspect of reg on n 0.4.12 - * Merge branch 'bug/33-throws' - * Merge pull request #35 from logicalparadox/empty-object - * browser build - * updated #throw docs - * Assertion#throw `should` tests updated - * Assertion#throw `expect` tests - * Should interface supports multiple throw parameters - * Update Assertion#throw to support strings and type checks. - * Add more tests for `empty` in `should`. - * Add more tests for `empty` in `expect`. - * Merge branch 'master' into empty-object - * don't switch act/exp - * Merge pull request #34 from logicalparadox/assert-operator - * Update the compiled verison. - * Add `assert.operator`. - * Notes on messages. #22 - * browser build - * have been test - * below tests - * Merge branch 'feature/actexp' - * browser build - * remove unnecessary fail export - * full support for actual/expected where relevant - * Assertion.assert support expected value - * clean up error - * Update the compiled version. - * Add object & sane arguments support to `Assertion#empty`. - -0.4.2 / 2012-02-28 -================== - - * fix for `process` not available in browser when used via browserify. Closes #28 - * Merge pull request #31 from joliss/doc - * Document that "should" works in browsers other than IE - * Merge pull request #30 from logicalparadox/assert-tests - * Update the browser version of chai. - * Update `assert.doesNotThrow` test in order to check the use case when type is a string. - * Add test for `assert.ifError`. - * Falsey -> falsy. - * Full coverage for `assert.throws` and `assert.doesNotThrow`. - * Add test for `assert.doesNotThrow`. - * Add test for `assert.throws`. - * Add test for `assert.length`. - * Add test for `assert.include`. - * Add test for `assert.isBoolean`. - * Fix the implementation of `assert.isNumber`. - * Add test for `assert.isNumber`. - * Add test for `assert.isString`. - * Add test for `assert.isArray`. - * Add test for `assert.isUndefined`. - * Add test for `assert.isNotNull`. - * Fix `assert.isNotNull` implementation. - * Fix `assert.isNull` implementation. - * Add test for `assert.isNull`. - * Add test for `assert.notDeepEqual`. - * Add test for `assert.deepEqual`. - * Add test for `assert.notStrictEqual`. - * Add test for `assert.strictEqual`. - * Add test for `assert.notEqual`. - -0.4.1 / 2012-02-26 -================== - - * Merge pull request #27 from logicalparadox/type-fix - * Update the browser version. - * Add should tests for type checks. - * Add function type check test. - * Add more type checks tests. - * Add test for `new Number` type check. - * Fix type of actual checks. - -0.4.0 / 2012-02-25 -================== - - * docs and readme for upcoming 0.4.0 - * docs generated - * putting coverage and tests for docs in docs/out/support - * make docs - * makefile copy necessary resources for tests in docs - * rename configuration test - * Merge pull request #21 from logicalparadox/close-to - * Update the browser version. - * Update `closeTo()` docs. - * Add `Assertion.closeTo()` method. - * Add `.closeTo()` should test. - * Add `.closeTo()` expect test. - * Merge pull request #20 from logicalparadox/satisfy - * Update the browser version. - * `..` -> `()` in `.satisfy()` should test. - * Update example for `.satisfy()`. - * Update the compiled browser version. - * Add `Assertion.satisfy()` method. - * Add `.satisfy()` should test. - * Add `.satisfy()` expect test. - * Merge pull request #19 from logicalparadox/respond-to - * Update the compiled browser version. - * Add `respondTo` Assertion. - * Add `respondTo` should test. - * Add `respondTo` expect test. - * Merge branch 'feature/coverage' - * mocha coverage support - * doc contributors - * README contributors - -0.3.4 / 2012-02-23 -================== - - * inline comment typos for #15 - * Merge branch 'refs/heads/jeffbski-configErrorStackCompat' - * includeStack documentation for all interfaces - * suite name more generic - * Update test to be compatible with browsers that do not support err.stack - * udpated compiled chai.js and added to browser tests - * Allow inclusion of stack trace for Assert error messages to be configurable - * docs sharing buttons - * sinon-chai link - * doc updates - * read me updates include plugins - -0.3.3 / 2012-02-12 -================== - - * Merge pull request #14 from jfirebaugh/configurable_properties - * Make Assertion.prototype properties configurable - -0.3.2 / 2012-02-10 -================== - - * codex version - * docs - * docs cleanup - -0.3.1 / 2012-02-07 -================== - - * node 0.4.x compat - -0.3.0 / 2012-02-07 -================== - - * Merge branch 'feature/03x' - * browser build - * remove html/json/headers testign - * regex error.message testing - * tests for using plugins - * Merge pull request #11 from domenic/master - * Make `chai.use` a no-op if the function has already been used. - -0.2.4 / 2012-02-02 -================== - - * added in past tense switch for `been` - -0.2.3 / 2012-02-01 -================== - - * try that again - -0.2.2 / 2012-02-01 -================== - - * added `been` (past of `be`) alias - -0.2.1 / 2012-01-29 -================== - - * added Throw, with a capital T, as an alias to `throw` (#7) - -0.2.0 / 2012-01-26 -================== - - * update gitignore for vim *.swp - * Merge branch 'feature/plugins' - * browser build - * interfaces now work with use - * simple .use function. See #9. - * readme notice on browser compat - -0.1.7 / 2012-01-25 -================== - - * added assert tests to browser test runner - * browser update - * `should` interface patch for primitives support in FF - * fix isObject() Thanks @milewise - * travis only on branch `master` - * add instanceof alias `instanceOf`. #6 - * some tests for assert module - -0.1.6 / 2012-01-02 -================== - - * commenting for assert interface - * updated codex dep - -0.1.5 / 2012-01-02 -================== - - * browser tests pass - * type in should.not.equal - * test for should (not) exist - * added should.exist and should.not.exist - * browser uses tdd - * convert tests to tdd - -0.1.4 / 2011-12-26 -================== - - * browser lib update for new assert interface compatiblitiy - * inspect typos - * added strict equal + negatives and ifError - * interface assert had doesNotThrow - * added should tests to browser - * new expect empty tests - * should test browser compat - * Fix typo for instanceof docs. Closes #3 [ci skip] - -0.1.3 / 2011-12-18 -================== - - * much cleaner reporting string on error. - -0.1.2 / 2011-12-18 -================== - - * [docs] for upcoming 0.1.2 - * browser version built with pre/suffix … all tests passing - * make / compile now use prefix/suffix correctly - * code clean - * prefix/suffix to wrap browser output to prevent conflicts with other `require` methods. - * Merge branch 'feature/should4xcompatibility' - * compile for browser tests.. all pass - * added header/status/html/json - * throw tests - * should.throw & should.not.throw shortcuts - * improved `throw` type detection and messaging - * contain is now `include` … keys modifier is now `contain` - * removed object() test - * removed #respondTo - * Merge branch 'bug/2' - * replaced __defineGetter__ with defineProperty for all uses - * [docs] change mp tracking code - * docs site updated with assert (TDD) interface - * updated doc comments for assert interface - -0.1.1 / 2011-12-16 -================== - - * docs ready for upcoming 0.1.1 - * readme image fixed [ci skip] - * more readme tweaks [ci skip] - * réadmet image fixed [ci skip] - * documentation - * codex locked in version 0.0.5 - * more comments to assertions for docs - * assertions fully commented, browser library updated - * adding codex as doc dependancy - * prepping for docs - * assertion component completely commented for documentation - * added exist test - * var expect outside of browser if check - * added keywords to package.json - -0.1.0 / 2011-12-15 -================== - - * failing on purpose successful .. back to normal - * testing travis failure - * assert#arguments getter - * readme typo - * updated README - * added travis and npmignore - * copyright notices … think i got them all - * moved expect interface to own file for consistency - * assert ui deepEqual - * browser tests expect (all working) - * browser version built - * chai.fail (should ui) - * expect tests browser compatible - * tests for should and expect (all pass) - * moved fail to primary export - * should compatibility testing - * within, greaterThan, object, keys, - * Aliases - * Assertion#property now correctly works with negate and undefined values - * error message language matches should - * Assertion#respondTo - * Assertion now uses inspect util - * git ignore node modules - * should is exported - * AssertionError __proto__ from Error.prototype - * add should interface for should.js compatibility - * moved eql to until folder and added inspect from (joyent/node) - * added mocha for testing - * browser build for current api - * multiple .property assertions - * added deep equal from node - -0.0.2 / 2011-12-07 -================== - - * cleaner output on error - * improved exists detection - * package remnant artifact - * empty deep equal - * test browser build - * assertion cleanup - * client compile script - * makefile - * most of the basic assertions - * allow no parameters to assertion error - * name change - * assertion error instance - * main exports: assert() & expect() - * initialize diff --git a/cli/node_modules/chai/README.md b/cli/node_modules/chai/README.md deleted file mode 100644 index 4dfdc960e..000000000 --- a/cli/node_modules/chai/README.md +++ /dev/null @@ -1,130 +0,0 @@ -[![Chai Documentation](http://chaijs.com/public/img/chai-logo.png)](http://chaijs.com) - -Chai is a BDD / TDD assertion library for [node](http://nodejs.org) and the browser that -can be delightfully paired with any javascript testing framework. - -For more information or to download plugins, view the [documentation](http://chaijs.com). - -[![Build Status](https://travis-ci.org/chaijs/chai.svg?branch=master)](https://travis-ci.org/chaijs/chai) - -[![Selenium Test Status](https://saucelabs.com/browser-matrix/chaijs.svg)](https://saucelabs.com/u/chaijs) - -### Plugins - -Chai offers a robust Plugin architecture for extending Chai's assertions and interfaces. - -- Need a plugin? View the [official plugin list](http://chaijs.com/plugins). -- Have a plugin and want it listed? Open a Pull Request at [chaijs/chai-docs:plugin.js](https://github.com/chaijs/chai-docs/blob/master/plugins.js#L1-L12). -- Want to build a plugin? Read the [plugin api documentation](http://chaijs.com/guide/plugins/). - -### Related Projects - -- [chaijs / assertion-error](https://github.com/chaijs/assertion-error): Custom `Error` constructor thrown upon an assertion failing. -- [chaijs / deep-eql](https://github.com/chaijs/deep-eql): Improved deep equality testing for Node.js and the browser. - -### Contributors - - project : chai - repo age : 3 years, 5 months - active : 244 days - commits : 900 - files : 59 - authors : - 555 Jake Luer 61.7% - 79 Veselin Todorov 8.8% - 52 Keith Cirkel 5.8% - 43 Domenic Denicola 4.8% - 14 Joshua Perry 1.6% - 8 Chris Polis 0.9% - 6 Ruben Verborgh 0.7% - 6 Ian Zamojc 0.7% - 5 George Kats 0.6% - 5 leider 0.6% - 5 Scott Nonnenberg 0.6% - 5 Juliusz Gonera 0.6% - 5 Jo Liss 0.6% - 4 Jérémie Astori 0.4% - 4 John Firebaugh 0.4% - 4 charlierudolph 0.4% - 4 Veselin 0.4% - 4 Chris Jones 0.4% - 4 Nick Heiner 0.4% - 4 Max Edmands 0.4% - 4 David da Silva 0.4% - 4 Kaito Udagawa 0.4% - 4 josher19 0.4% - 3 Jordan Harband 0.3% - 3 Ryunosuke SATO 0.3% - 3 Jake Rosoman 0.3% - 3 Duncan Beevers 0.3% - 3 Jason Karns 0.3% - 3 Jeff Barczewski 0.3% - 3 Andrei Neculau 0.3% - 2 eldritch fossicker 0.2% - 2 Bartvds 0.2% - 2 Edwin Shao 0.2% - 2 Gregg Lind 0.2% - 2 Jakub Nešetřil 0.2% - 2 Roman Masek 0.2% - 2 Teddy Cross 0.2% - 1 Jesse McCarthy 0.1% - 1 Doug Neiner 0.1% - 1 Dido Arellano 0.1% - 1 Kilian Ciuffolo 0.1% - 1 Luís Cardoso 0.1% - 1 Martin Middel 0.1% - 1 Mathias Schreck 0.1% - 1 Danilo Vaz 0.1% - 1 Michael Lange 0.1% - 1 Mitchell Johnson 0.1% - 1 DD 0.1% - 1 Niklas Närhinen 0.1% - 1 Paul Miller 0.1% - 1 Refael Ackermann 0.1% - 1 shinnn 0.1% - 1 Chun-Yi 0.1% - 1 Christopher Hiller 0.1% - 1 Sasha Koss 0.1% - 1 Chris Thompson 0.1% - 1 toastynerd 0.1% - 1 Chris Connelly 0.1% - 1 Chasen Le Hara 0.1% - 1 Victor Costan 0.1% - 1 Vinay Pulim 0.1% - 1 Virginie BARDALES 0.1% - 1 Vlad GURDIGA 0.1% - 1 Brandon Payton 0.1% - 1 Adam Hull 0.1% - 1 ericdouglas 0.1% - 1 Benjamin Horsleben 0.1% - 1 laconbass 0.1% - 1 Anand Patil 0.1% - 1 mohayonao 0.1% - 1 piecioshka 0.1% - 1 root 0.1% - 1 Julien Wajsberg 0.1% - 1 Jeff Welch 0.1% - -## License - -(The MIT License) - -Copyright (c) 2011-2015 Jake Luer - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/cli/node_modules/chai/ReleaseNotes.md b/cli/node_modules/chai/ReleaseNotes.md deleted file mode 100644 index 28f2c8810..000000000 --- a/cli/node_modules/chai/ReleaseNotes.md +++ /dev/null @@ -1,730 +0,0 @@ -# Release Notes - -## 2.3.0 / 2015-04-26 - -Added `ownPropertyDescriptor` assertion: - -```js -expect('test').to.have.ownPropertyDescriptor('length'); -expect('test').to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 4 }); -expect('test').not.to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 3 }); -expect('test').ownPropertyDescriptor('length').to.have.property('enumerable', false); -expect('test').ownPropertyDescriptor('length').to.have.keys('value'); -``` - -### Community Contributions - -#### Code Features & Fixes - - * [#408](https://github.com/chaijs/chai/pull/408) Add `ownPropertyDescriptor` - assertion. - By [@ljharb](https://github.com/ljharb) - * [#422](https://github.com/chaijs/chai/pull/422) Improve ownPropertyDescriptor - tests. - By [@ljharb](https://github.com/ljharb) - -#### Documentation fixes - - * [#417](https://github.com/chaijs/chai/pull/417) Fix documentation typo - By [@astorije](https://github.com/astorije) - * [#423](https://github.com/chaijs/chai/pull/423) Fix inconsistency in docs. - By [@ehntoo](https://github.com/ehntoo) - - -## 2.2.0 / 2015-03-26 - -Deep property strings can now be escaped using `\\` - for example: - -```js -var deepCss = { '.link': { '[target]': 42 }}; -expect(deepCss).to.have.deep.property('\\.link.\\[target\\]', 42) -``` - -### Community Contributions - -#### Code Features & Fixes - - * [#402](https://github.com/chaijs/chai/pull/402) Allow escaping of deep - property keys. - By [@umireon](https://github.com/umireon) - -#### Documentation fixes - - * [#405](https://github.com/chaijs/chai/pull/405) Tweak documentation around - deep property escaping. - By [@keithamus](https://github.com/keithamus) - - -## 2.1.2 / 2015-03-15 - -A minor bug fix. No new features. - -### Community Contributions - -#### Code Features & Fixes - - * [#395](https://github.com/chaijs/chai/pull/395) Fix eval-related bugs with - assert.operator ([#386](https://github.com/chaijs/chai/pull/386)). - By [@cjqed](https://github.com/cjqed) - -## 2.1.1 / 2015-03-04 - -Two minor bugfixes. No new features. - -### Community Contributions - -#### Code Features & Fixes - - * [#385](https://github.com/chaijs/chai/pull/385) Fix a bug (also described in - [#387](https://github.com/chaijs/chai/pull/385)) where `deep.property` would not work with single - key names. By [@eldritch-fossicker](https://github.com/eldritch-fossicker) - * [#379](https://github.com/chaijs/chai/pull/379) Fix bug where tools which overwrite - primitive prototypes, such as Babel or core-js would fail. - By [@dcneiner](https://github.com/dcneiner) - -#### Documentation fixes - - * [#382](https://github.com/chaijs/chai/pull/382) Add doc for showDiff argument in assert. - By [@astorije](https://github.com/astorije) - * [#383](https://github.com/chaijs/chai/pull/383) Improve wording for truncateTreshold docs - By [@gurdiga](https://github.com/gurdiga) - * [#381](https://github.com/chaijs/chai/pull/381) Improve wording for assert.empty docs - By [@astorije](https://github.com/astorije) - -## 2.1.0 / 2015-02-23 - -Small release; fixes an issue where the Chai lib was incorrectly reporting the -version number. - -Adds new `should.fail()` and `expect.fail()` methods, which are convinience -methods to throw Assertion Errors. - -### Community Contributions - -#### Code Features & Fixes - - * [#356](https://github.com/chaijs/chai/pull/356) Add should.fail(), expect.fail(). By [@Soviut](https://github.com/Soviut) - * [#374](https://github.com/chaijs/chai/pull/374) Increment version. By [@jmm](https://github.com/jmm) - -## 2.0.0 / 2015-02-09 - -Unfortunately with 1.10.0 - compatibility broke with older versions because of -the `addChainableNoop`. This change has been reverted. - -Any plugins using `addChainableNoop` should cease to do so. - -Any developers wishing for this behaviour can use [dirty-chai](https://www.npmjs.com/package/dirty-chai) -by [@joshperry](https://github.com/joshperry) - -### Community Contributions - -#### Code Features & Fixes - - * [#361](https://github.com/chaijs/chai/pull/361) `.keys()` now accepts Objects, extracting keys from them. By [@gregglind](https://github.com/gregglind) - * [#359](https://github.com/chaijs/chai/pull/359) `.keys()` no longer mutates passed arrays. By [@gregglind](https://github.com/gregglind) - * [#349](https://github.com/chaijs/chai/pull/349) Add a new chainable keyword - `.which`. By [@toastynerd](https://github.com/toastynerd) - * [#333](https://github.com/chaijs/chai/pull/333) Add `.change`, `.increase` and `.decrease` assertions. By [@cmpolis](https://github.com/cmpolis) - * [#335](https://github.com/chaijs/chai/pull/335) `chai.util` is now exposed [@DingoEatingFuzz](https://github.com/DingoEatingFuzz) - * [#328](https://github.com/chaijs/chai/pull/328) Add `.includes` and `.contains` aliases (for `.include` and `.contain`). By [@lo1tuma](https://github.com/lo1tuma) - * [#313](https://github.com/chaijs/chai/pull/313) Add `.any.keys()` and `.all.keys()` qualifiers. By [@cjqed](https://github.com/cjqed) - * [#312](https://github.com/chaijs/chai/pull/312) Add `assert.sameDeepMembers()`. By [@cjqed](https://github.com/cjqed) - * [#311](https://github.com/chaijs/chai/pull/311) Add `assert.isAbove()` and `assert.isBelow()`. By [@cjqed](https://github.com/cjqed) - * [#308](https://github.com/chaijs/chai/pull/308) `property` and `deep.property` now pass if a value is set to `undefined`. By [@prodatakey](https://github.com/prodatakey) - * [#309](https://github.com/chaijs/chai/pull/309) optimize deep equal in Arrays. By [@ericdouglas](https://github.com/ericdouglas) - * [#306](https://github.com/chaijs/chai/pull/306) revert #297 - allowing lint-friendly tests. By [@keithamus](https://github.com/keithamus) - -#### Documentation fixes - - * [#357](https://github.com/chaijs/chai/pull/357) Copyright year updated in docs. By [@danilovaz](https://github.com/danilovaz) - * [#325](https://github.com/chaijs/chai/pull/325) Fix documentation for overwriteChainableMethod. By [@chasenlehara](https://github.com/chasenlehara) - * [#334](https://github.com/chaijs/chai/pull/334) Typo fix. By [@hurrymaplelad](https://github.com/hurrymaplelad) - * [#317](https://github.com/chaijs/chai/pull/317) Typo fix. By [@jasonkarns](https://github.com/jasonkarns) - * [#318](https://github.com/chaijs/chai/pull/318) Typo fix. By [@jasonkarns](https://github.com/jasonkarns) - * [#316](https://github.com/chaijs/chai/pull/316) Typo fix. By [@jasonkarns](https://github.com/jasonkarns) - - -## 1.10.0 / 2014-11-10 - -The following changes are required if you are upgrading from the previous version: - -- **Users:** - - No changes required -- **Plugin Developers:** - - Review `addChainableNoop` notes below. -- **Core Contributors:** - - Refresh `node_modules` folder for updated dependencies. - -### Noop Function for Terminating Assertion Properties - -The following assertions can now also be used in the function-call form: - -* ok -* true -* false -* null -* undefined -* exist -* empty -* arguments -* Arguments - -The above list of assertions are property getters that assert immediately on -access. Because of that, they were written to be used by terminating the assertion -chain with a property access. - -```js -expect(true).to.be.true; -foo.should.be.ok; -``` - -This syntax is definitely aesthetically pleasing but, if you are linting your -test code, your linter will complain with an error something like "Expected an -assignment or function call and instead saw an expression." Since the linter -doesn't know about the property getter it assumes this line has no side-effects, -and throws a warning in case you made a mistake. - -Squelching these errors is not a good solution as test code is getting to be -just as important as, if not more than, production code. Catching syntactical -errors in tests using static analysis is a great tool to help make sure that your -tests are well-defined and free of typos. - -A better option was to provide a function-call form for these assertions so that -the code's intent is more clear and the linters stop complaining about something -looking off. This form is added in addition to the existing property access form -and does not impact existing test code. - -```js -expect(true).to.be.true(); -foo.should.be.ok(); -``` - -These forms can also be mixed in any way, these are all functionally identical: - -```js -expect(true).to.be.true.and.not.false(); -expect(true).to.be.true().and.not.false; -expect(true).to.be.true.and.not.false; -``` - -#### Plugin Authors - -If you would like to provide this function-call form for your terminating assertion -properties, there is a new function to register these types of asserts. Instead -of using `addProperty` to register terminating assertions, simply use `addChainableNoop` -instead; the arguments to both are identical. The latter will make the assertion -available in both the attribute and function-call forms and should have no impact -on existing users of your plugin. - -### Community Contributions - -- [#297](https://github.com/chaijs/chai/pull/297) Allow writing lint-friendly tests. [@joshperry](https://github.com/joshperry) -- [#298](https://github.com/chaijs/chai/pull/298) Add check for logging `-0`. [@dasilvacontin](https://github.com/dasilvacontin) -- [#300](https://github.com/chaijs/chai/pull/300) Fix #299: the test is defining global variables [@julienw](https://github.com/julienw) - -Thank you to all who took time to contribute! - -## 1.9.2 / 2014-09-29 - -The following changes are required if you are upgrading from the previous version: - -- **Users:** - - No changes required -- **Plugin Developers:** - - No changes required -- **Core Contributors:** - - Refresh `node_modules` folder for updated dependencies. - -### Community Contributions - -- [#264](https://github.com/chaijs/chai/pull/264) Show diff for keys assertions [@cjthompson](https://github.com/cjthompson) -- [#267](https://github.com/chaijs/chai/pull/267) Use SVG badges [@shinnn](https://github.com/shinnn) -- [#268](https://github.com/chaijs/chai/pull/268) Allow messages to be functions (sinon-compat) [@charlierudolph](https://github.com/charlierudolph) -- [#269](https://github.com/chaijs/chai/pull/269) Remove unused argument for #lengthOf [@charlierudolph](https://github.com/charlierudolph) -- [#275](https://github.com/chaijs/chai/pull/275) Rewrite pretty-printing HTML elements to prevent throwing internal errors [@DrRataplan](https://github.com/DrRataplan) -- [#277](https://github.com/chaijs/chai/pull/277) Fix assert documentation for #sameMembers [@charlierudolph](https://github.com/charlierudolph) -- [#279](https://github.com/chaijs/chai/pull/279) closeTo should check value's type before assertion [@mohayonao](https://github.com/mohayonao) -- [#289](https://github.com/chaijs/chai/pull/289) satisfy is called twice [@charlierudolph](https://github.com/charlierudolph) -- [#292](https://github.com/chaijs/chai/pull/292) resolve conflicts with node-webkit and global usage [@boneskull](https://github.com/boneskull) - -Thank you to all who took time to contribute! - -## 1.9.1 / 2014-03-19 - -The following changes are required if you are upgrading from the previous version: - -- **Users:** - - Migrate configuration options to new interface. (see notes) -- **Plugin Developers:** - - No changes required -- **Core Contributors:** - - Refresh `node_modules` folder for updated dependencies. - -### Configuration - -There have been requests for changes and additions to the configuration mechanisms -and their impact in the Chai architecture. As such, we have decoupled the -configuration from the `Assertion` constructor. This not only allows for centralized -configuration, but will allow us to shift the responsibility from the `Assertion` -constructor to the `assert` interface in future releases. - -These changes have been implemented in a non-breaking way, but a depretiation -warning will be presented to users until they migrate. The old config method will -be removed in either `v1.11.0` or `v2.0.0`, whichever comes first. - -#### Quick Migration - -```js -// change this: -chai.Assertion.includeStack = true; -chai.Assertion.showDiff = false; - -// ... to this: -chai.config.includeStack = true; -chai.config.showDiff = false; -``` - -#### All Config Options - -##### config.includeStack - -- **@param** _{Boolean}_ -- **@default** `false` - -User configurable property, influences whether stack trace is included in -Assertion error message. Default of `false` suppresses stack trace in the error -message. - -##### config.showDiff - -- **@param** _{Boolean}_ -- **@default** `true` - -User configurable property, influences whether or not the `showDiff` flag -should be included in the thrown AssertionErrors. `false` will always be `false`; -`true` will be true when the assertion has requested a diff be shown. - -##### config.truncateThreshold **(NEW)** - -- **@param** _{Number}_ -- **@default** `40` - -User configurable property, sets length threshold for actual and expected values -in assertion errors. If this threshold is exceeded, the value is truncated. - -Set it to zero if you want to disable truncating altogether. - -```js -chai.config.truncateThreshold = 0; // disable truncating -``` - -### Community Contributions - -- [#228](https://github.com/chaijs/chai/pull/228) Deep equality check for memebers. [@duncanbeevers](https://github.com/duncanbeevers) -- [#247](https://github.com/chaijs/chai/pull/247) Proofreading. [@didorellano](https://github.com/didoarellano) -- [#244](https://github.com/chaijs/chai/pull/244) Fix `contain`/`include` 1.9.0 regression. [@leider](https://github.com/leider) -- [#233](https://github.com/chaijs/chai/pull/233) Improvements to `ssfi` for `assert` interface. [@refack](https://github.com/refack) -- [#251](https://github.com/chaijs/chai/pull/251) New config option: object display threshold. [@romario333](https://github.com/romario333) - -Thank you to all who took time to contribute! - -### Other Bug Fixes - -- [#183](https://github.com/chaijs/chai/issues/183) Allow `undefined` for actual. (internal api) -- Update Karam(+plugins)/Istanbul to most recent versions. - -## 1.9.0 / 2014-01-29 - -The following changes are required if you are upgrading from the previous version: - -- **Users:** - - No changes required -- **Plugin Developers:** - - Review [#219](https://github.com/chaijs/chai/pull/219). -- **Core Contributors:** - - Refresh `node_modules` folder for updated dependencies. - -### Community Contributions - -- [#202](https://github.com/chaijs/chai/pull/201) Improve error message for .throw(). [@andreineculau](https://github.com/andreineculau) -- [#217](https://github.com/chaijs/chai/pull/217) Chai tests can be run with `--watch`. [@demands](https://github.com/demands) -- [#219](https://github.com/chaijs/chai/pull/219) Add overwriteChainableMethod utility. [@demands](https://github.com/demands) -- [#224](https://github.com/chaijs/chai/pull/224) Return error on throw method to chain on error properties. [@vbardales](https://github.com/vbardales) -- [#226](https://github.com/chaijs/chai/pull/226) Add `has` to language chains. [@duncanbeevers](https://github.com/duncanbeevers) -- [#230](https://github.com/chaijs/chai/pull/230) Support `{a:1,b:2}.should.include({a:1})` [@jkroso](https://github.com/jkroso) -- [#231](https://github.com/chaijs/chai/pull/231) Update Copyright notices to 2014 [@duncanbeevers](https://github.com/duncanbeevers) -- [#232](https://github.com/chaijs/chai/pull/232) Avoid error instantiation if possible on assert.throws. [@laconbass](https://github.com/laconbass) - -Thank you to all who took time to contribute! - -### Other Bug Fixes - -- [#225](https://github.com/chaijs/chai/pull/225) Improved AMD wrapper provided by upstream `component(1)`. -- [#185](https://github.com/chaijs/chai/issues/185) `assert.throws()` returns thrown error for further assertions. -- [#237](https://github.com/chaijs/chai/pull/237) Remove coveralls/jscoverage, include istanbul coverage report in travis test. -- Update Karma and Sauce runner versions for consistent CI results. No more karma@canary. - -## 1.8.1 / 2013-10-10 - -The following changes are required if you are upgrading from the previous version: - -- **Users:** - - Refresh `node_modules` folder for updated dependencies. -- **Plugin Developers:** - - No changes required -- **Core Contributors:** - - Refresh `node_modules` folder for updated dependencies. - -### Browserify - -This is a small patch that updates the dependency tree so browserify users can install -chai. (Remove conditional requires) - -## 1.8.0 / 2013-09-18 - -The following changes are required if you are upgrading from the previous version: - -- **Users:** - - See `deep.equal` notes. -- **Plugin Developers:** - - No changes required -- **Core Contributors:** - - Refresh `node_modules` folder for updated dependencies. - -### Deep Equals - -This version of Chai focused on a overhaul to the deep equal utility. The code for this -tool has been removed from the core lib and can now be found at: -[chai / deep-eql](https://github.com/chaijs/deep-eql). As stated in previous releases, -this is part of a larger initiative to provide transparency, independent testing, and coverage for -some of the more complicated internal tools. - -For the most part `.deep.equal` will behave the same as it has. However, in order to provide a -consistent ruleset across all types being tested, the following changes have been made and _might_ -require changes to your tests. - -**1.** Strict equality for non-traversable nodes according to [egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). - -_Previously:_ Non-traversable equal via `===`. - -```js -expect(NaN).to.deep.equal(NaN); -expect(-0).to.not.deep.equal(+0); -``` - -**2.** Arguments are not Arrays (and all types must be equal): - -_Previously:_ Some crazy nonsense that led to empty arrays deep equaling empty objects deep equaling dates. - -```js -expect(arguments).to.not.deep.equal([]); -expect(Array.prototype.slice.call(arguments)).to.deep.equal([]); -``` - -- [#156](https://github.com/chaijs/chai/issues/156) Empty object is eql to empty array -- [#192](https://github.com/chaijs/chai/issues/192) empty object is eql to a Date object -- [#194](https://github.com/chaijs/chai/issues/194) refactor deep-equal utility - -### CI and Browser Testing - -Chai now runs the browser CI suite using [Karma](http://karma-runner.github.io/) directed at -[SauceLabs](https://saucelabs.com/). This means we get to know where our browser support stands... -and we get a cool badge: - -[![Selenium Test Status](https://saucelabs.com/browser-matrix/logicalparadox.svg)](https://saucelabs.com/u/logicalparadox) - -Look for the list of browsers/versions to expand over the coming releases. - -- [#195](https://github.com/chaijs/chai/issues/195) karma test framework - -## 1.7.2 / 2013-06-27 - -The following changes are required if you are upgrading from the previous version: - -- **Users:** - - No changes required. -- **Plugin Developers:** - - No changes required -- **Core Contributors:** - - Refresh `node_modules` folder for updated dependencies. - -### Coverage Reporting - -Coverage reporting has always been available for core-developers but the data has never been published -for our end users. In our ongoing effort to improve accountability this data will now be published via -the [coveralls.io](https://coveralls.io/) service. A badge has been added to the README and the full report -can be viewed online at the [chai coveralls project](https://coveralls.io/r/chaijs/chai). Furthermore, PRs -will receive automated messages indicating how their PR impacts test coverage. This service is tied to TravisCI. - -### Other Fixes - -- [#175](https://github.com/chaijs/chai/issues/175) Add `bower.json`. (Fix ignore all) - -## 1.7.1 / 2013-06-24 - -The following changes are required if you are upgrading from the previous version: - -- **Users:** - - No changes required. -- **Plugin Developers:** - - No changes required -- **Core Contributors:** - - Refresh `node_modules` folder for updated dependencies. - -### Official Bower Support - -Support has been added for the Bower Package Manager ([bower.io])(http://bower.io/). Though -Chai could be installed via Bower in the past, this update adds official support via the `bower.json` -specification file. - -- [#175](https://github.com/chaijs/chai/issues/175) Add `bower.json`. - -## 1.7.0 / 2013-06-17 - -The following changes are required if you are upgrading from the previous version: - -- **Users:** - - No changes required. -- **Plugin Developers:** - - Review AssertionError update notice. -- **Core Contributors:** - - Refresh `node_modules` folder for updated dependencies. - -### AssertionError Update Notice - -Chai now uses [chaijs/assertion-error](https://github.com/chaijs/assertion-error) instead an internal -constructor. This will allow for further iteration/experimentation of the AssertionError constructor -independant of Chai. Future plans include stack parsing for callsite support. - -This update constructor has a different constructor param signature that conforms more with the standard -`Error` object. If your plugin throws and `AssertionError` directly you will need to update your plugin -with the new signature. - -```js -var AssertionError = require('chai').AssertionError; - -/** - * previous - * - * @param {Object} options - */ - -throw new AssertionError({ - message: 'An assertion error occurred' - , actual: actual - , expect: expect - , startStackFunction: arguments.callee - , showStack: true -}); - -/** - * new - * - * @param {String} message - * @param {Object} options - * @param {Function} start stack function - */ - -throw new AssertionError('An assertion error occurred', { - actual: actual - , expect: expect - , showStack: true -}, arguments.callee); - -// other signatures -throw new AssertionError('An assertion error occurred'); -throw new AssertionError('An assertion error occurred', null, arguments.callee); -``` - -#### External Dependencies - -This is the first non-developement dependency for Chai. As Chai continues to evolve we will begin adding -more; the next will likely be improved type detection and deep equality. With Chai's userbase continually growing -there is an higher need for accountability and documentation. External dependencies will allow us to iterate and -test on features independent from our interfaces. - -Note: The browser packaged version `chai.js` will ALWAYS contain all dependencies needed to run Chai. - -### Community Contributions - -- [#169](https://github.com/chaijs/chai/pull/169) Fix deep equal comparison for Date/Regexp types. [@katsgeorgeek](https://github.com/katsgeorgeek) -- [#171](https://github.com/chaijs/chai/pull/171) Add `assert.notOk()`. [@Bartvds](https://github.com/Bartvds) -- [#173](https://github.com/chaijs/chai/pull/173) Fix `inspect` utility. [@domenic](https://github.com/domenic) - -Thank you to all who took the time to contribute! - -## 1.6.1 / 2013-06-05 - -The following changes are required if you are upgrading from the previous version: - -- **Users:** - - No changes required. -- **Plugin Developers:** - - No changes required. -- **Core Contributors:** - - Refresh `node_modules` folder for updated developement dependencies. - -### Deep Equality - -Regular Expressions are now tested as part of all deep equality assertions. In previous versions -they silently passed for all scenarios. Thanks to [@katsgeorgeek](https://github.com/katsgeorgeek) for the contribution. - -### Community Contributions - -- [#161](https://github.com/chaijs/chai/pull/161) Fix documented name for assert interface's isDefined method. [@brandonpayton](https://github.com/brandonpayton) -- [#168](https://github.com/chaijs/chai/pull/168) Fix comparison equality of two regexps for when using deep equality. [@katsgeorgeek](https://github.com/katsgeorgeek) - -Thank you to all who took the time to contribute! - -### Additional Notes - -- Mocha has been locked at version `1.8.x` to ensure `mocha-phantomjs` compatibility. - -## 1.6.0 / 2013-04-29 - -The following changes are required if you are upgrading from the previous version: - -- **Users:** - - No changes required. -- **Plugin Developers:** - - No changes required. -- **Core Contributors:** - - Refresh `node_modules` folder for updated developement dependencies. - -### New Assertions - -#### Array Members Inclusion - -Asserts that the target is a superset of `set`, or that the target and `set` have the same members. -Order is not taken into account. Thanks to [@NickHeiner](https://github.com/NickHeiner) for the contribution. - -```js -// (expect/should) full set -expect([4, 2]).to.have.members([2, 4]); -expect([5, 2]).to.not.have.members([5, 2, 1]); - -// (expect/should) inclusion -expect([1, 2, 3]).to.include.members([3, 2]); -expect([1, 2, 3]).to.not.include.members([3, 2, 8]); - -// (assert) full set -assert.sameMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'same members'); - -// (assert) inclusion -assert.includeMembers([ 1, 2, 3 ], [ 2, 1 ], 'include members'); - -``` - -#### Non-inclusion for Assert Interface - -Most `assert` functions have a negative version, like `instanceOf()` has a corresponding `notInstaceOf()`. -However `include()` did not have a corresponding `notInclude()`. This has been added. - -```js -assert.notInclude([ 1, 2, 3 ], 8); -assert.notInclude('foobar', 'baz'); -``` - -### Community Contributions - -- [#140](https://github.com/chaijs/chai/pull/140) Restore `call`/`apply` methods for plugin interface. [@RubenVerborgh](https://github.com/RubenVerborgh) -- [#148](https://github.com/chaijs/chai/issues/148)/[#153](https://github.com/chaijs/chai/pull/153) Add `members` and `include.members` assertions. [#NickHeiner](https://github.com/NickHeiner) - -Thank you to all who took time to contribute! - -### Other Bug Fixes - -- [#142](https://github.com/chaijs/chai/issues/142) `assert#include` will no longer silently pass on wrong-type haystack. -- [#158](https://github.com/chaijs/chai/issues/158) `assert#notInclude` has been added. -- Travis-CI now tests Node.js `v0.10.x`. Support for `v0.6.x` has been removed. `v0.8.x` is still tested as before. - -## 1.5.0 / 2013-02-03 - -### Migration Requirements - -The following changes are required if you are upgrading from the previous version: - -- **Users:** - - _Update [2013-02-04]:_ Some users may notice a small subset of deep equality assertions will no longer pass. This is the result of - [#120](https://github.com/chaijs/chai/issues/120), an improvement to our deep equality algorithm. Users will need to revise their assertions - to be more granular should this occur. Further information: [#139](https://github.com/chaijs/chai/issues/139). -- **Plugin Developers:** - - No changes required. -- **Core Contributors:** - - Refresh `node_modules` folder for updated developement dependencies. - -### Community Contributions - -- [#126](https://github.com/chaijs/chai/pull/126): Add `eqls` alias for `eql`. [@RubenVerborgh](https://github.com/RubenVerborgh) -- [#127](https://github.com/chaijs/chai/issues/127): Performance refactor for chainable methods. [@RubenVerborgh](https://github.com/RubenVerborgh) -- [#133](https://github.com/chaijs/chai/pull/133): Assertion `.throw` support for primitives. [@RubenVerborgh](https://github.com/RubenVerborgh) -- [#137](https://github.com/chaijs/chai/issues/137): Assertion `.throw` support for empty messages. [@timnew](https://github.com/timnew) -- [#136](https://github.com/chaijs/chai/pull/136): Fix backward negation messages when using `.above()` and `.below()`. [@whatthejeff](https://github.com/whatthejeff) - -Thank you to all who took time to contribute! - -### Other Bug Fixes - -- Improve type detection of `.a()`/`.an()` to work in cross-browser scenarios. -- [#116](https://github.com/chaijs/chai/issues/116): `.throw()` has cleaner display of errors when WebKit browsers. -- [#120](https://github.com/chaijs/chai/issues/120): `.eql()` now works to compare dom nodes in browsers. - - -### Usage Updates - -#### For Users - -**1. Component Support:** Chai now included the proper configuration to be installed as a -[component](https://github.com/component/component). Component users are encouraged to consult -[chaijs.com](http://chaijs.com) for the latest version number as using the master branch -does not gaurantee stability. - -```js -// relevant component.json - devDependencies: { - "chaijs/chai": "1.5.0" - } -``` - -Alternatively, bleeding-edge is available: - - $ component install chaijs/chai - -**2. Configurable showDiff:** Some test runners (such as [mocha](http://visionmedia.github.com/mocha/)) -include support for showing the diff of strings and objects when an equality error occurs. Chai has -already included support for this, however some users may not prefer this display behavior. To revert to -no diff display, the following configuration is available: - -```js -chai.Assertion.showDiff = false; // diff output disabled -chai.Assertion.showDiff = true; // default, diff output enabled -``` - -#### For Plugin Developers - -**1. New Utility - type**: The new utility `.type()` is available as a better implementation of `typeof` -that can be used cross-browser. It handles the inconsistencies of Array, `null`, and `undefined` detection. - -- **@param** _{Mixed}_ object to detect type of -- **@return** _{String}_ object type - -```js -chai.use(function (c, utils) { - // some examples - utils.type({}); // 'object' - utils.type(null); // `null' - utils.type(undefined); // `undefined` - utils.type([]); // `array` -}); -``` - -#### For Core Contributors - -**1. Browser Testing**: Browser testing of the `./chai.js` file is now available in the command line -via PhantomJS. `make test` and Travis-CI will now also rebuild and test `./chai.js`. Consequently, all -pull requests will now be browser tested in this way. - -_Note: Contributors opening pull requests should still NOT include the browser build._ - -**2. SauceLabs Testing**: Early SauceLab support has been enabled with the file `./support/mocha-cloud.js`. -Those interested in trying it out should create a free [Open Sauce](https://saucelabs.com/signup/plan) account -and include their credentials in `./test/auth/sauce.json`. diff --git a/cli/node_modules/chai/bower.json b/cli/node_modules/chai/bower.json deleted file mode 100644 index 9a2c4ce08..000000000 --- a/cli/node_modules/chai/bower.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "chai", - "version": "2.3.0", - "description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic.", - "license": "MIT", - "keywords": [ - "test", - "assertion", - "assert", - "testing", - "chai" - ], - "main": "chai.js", - "ignore": [ - "build", - "components", - "lib", - "node_modules", - "support", - "test", - "index.js", - "Makefile", - ".*" - ], - "dependencies": {}, - "devDependencies": {} -} diff --git a/cli/node_modules/chai/chai.js b/cli/node_modules/chai/chai.js deleted file mode 100644 index 24eaab9a0..000000000 --- a/cli/node_modules/chai/chai.js +++ /dev/null @@ -1,5430 +0,0 @@ - -;(function(){ - -/** - * Require the module at `name`. - * - * @param {String} name - * @return {Object} exports - * @api public - */ - -function require(name) { - var module = require.modules[name]; - if (!module) throw new Error('failed to require "' + name + '"'); - - if (!('exports' in module) && typeof module.definition === 'function') { - module.client = module.component = true; - module.definition.call(this, module.exports = {}, module); - delete module.definition; - } - - return module.exports; -} - -/** - * Meta info, accessible in the global scope unless you use AMD option. - */ - -require.loader = 'component'; - -/** - * Internal helper object, contains a sorting function for semantiv versioning - */ -require.helper = {}; -require.helper.semVerSort = function(a, b) { - var aArray = a.version.split('.'); - var bArray = b.version.split('.'); - for (var i=0; i bLex ? 1 : -1; - continue; - } else if (aInt > bInt) { - return 1; - } else { - return -1; - } - } - return 0; -} - -/** - * Find and require a module which name starts with the provided name. - * If multiple modules exists, the highest semver is used. - * This function can only be used for remote dependencies. - - * @param {String} name - module name: `user~repo` - * @param {Boolean} returnPath - returns the canonical require path if true, - * otherwise it returns the epxorted module - */ -require.latest = function (name, returnPath) { - function showError(name) { - throw new Error('failed to find latest module of "' + name + '"'); - } - // only remotes with semvers, ignore local files conataining a '/' - var versionRegexp = /(.*)~(.*)@v?(\d+\.\d+\.\d+[^\/]*)$/; - var remoteRegexp = /(.*)~(.*)/; - if (!remoteRegexp.test(name)) showError(name); - var moduleNames = Object.keys(require.modules); - var semVerCandidates = []; - var otherCandidates = []; // for instance: name of the git branch - for (var i=0; i 0) { - var module = semVerCandidates.sort(require.helper.semVerSort).pop().name; - if (returnPath === true) { - return module; - } - return require(module); - } - // if the build contains more than one branch of the same module - // you should not use this funciton - var module = otherCandidates.sort(function(a, b) {return a.name > b.name})[0].name; - if (returnPath === true) { - return module; - } - return require(module); -} - -/** - * Registered modules. - */ - -require.modules = {}; - -/** - * Register module at `name` with callback `definition`. - * - * @param {String} name - * @param {Function} definition - * @api private - */ - -require.register = function (name, definition) { - require.modules[name] = { - definition: definition - }; -}; - -/** - * Define a module's exports immediately with `exports`. - * - * @param {String} name - * @param {Generic} exports - * @api private - */ - -require.define = function (name, exports) { - require.modules[name] = { - exports: exports - }; -}; -require.register("chaijs~assertion-error@1.0.0", function (exports, module) { -/*! - * assertion-error - * Copyright(c) 2013 Jake Luer - * MIT Licensed - */ - -/*! - * Return a function that will copy properties from - * one object to another excluding any originally - * listed. Returned function will create a new `{}`. - * - * @param {String} excluded properties ... - * @return {Function} - */ - -function exclude () { - var excludes = [].slice.call(arguments); - - function excludeProps (res, obj) { - Object.keys(obj).forEach(function (key) { - if (!~excludes.indexOf(key)) res[key] = obj[key]; - }); - } - - return function extendExclude () { - var args = [].slice.call(arguments) - , i = 0 - , res = {}; - - for (; i < args.length; i++) { - excludeProps(res, args[i]); - } - - return res; - }; -}; - -/*! - * Primary Exports - */ - -module.exports = AssertionError; - -/** - * ### AssertionError - * - * An extension of the JavaScript `Error` constructor for - * assertion and validation scenarios. - * - * @param {String} message - * @param {Object} properties to include (optional) - * @param {callee} start stack function (optional) - */ - -function AssertionError (message, _props, ssf) { - var extend = exclude('name', 'message', 'stack', 'constructor', 'toJSON') - , props = extend(_props || {}); - - // default values - this.message = message || 'Unspecified AssertionError'; - this.showDiff = false; - - // copy from properties - for (var key in props) { - this[key] = props[key]; - } - - // capture stack trace - ssf = ssf || arguments.callee; - if (ssf && Error.captureStackTrace) { - Error.captureStackTrace(this, ssf); - } -} - -/*! - * Inherit from Error.prototype - */ - -AssertionError.prototype = Object.create(Error.prototype); - -/*! - * Statically set name - */ - -AssertionError.prototype.name = 'AssertionError'; - -/*! - * Ensure correct constructor - */ - -AssertionError.prototype.constructor = AssertionError; - -/** - * Allow errors to be converted to JSON for static transfer. - * - * @param {Boolean} include stack (default: `true`) - * @return {Object} object that can be `JSON.stringify` - */ - -AssertionError.prototype.toJSON = function (stack) { - var extend = exclude('constructor', 'toJSON', 'stack') - , props = extend({ name: this.name }, this); - - // include stack if exists and not turned off - if (false !== stack && this.stack) { - props.stack = this.stack; - } - - return props; -}; - -}); - -require.register("chaijs~type-detect@0.1.1", function (exports, module) { -/*! - * type-detect - * Copyright(c) 2013 jake luer - * MIT Licensed - */ - -/*! - * Primary Exports - */ - -var exports = module.exports = getType; - -/*! - * Detectable javascript natives - */ - -var natives = { - '[object Array]': 'array' - , '[object RegExp]': 'regexp' - , '[object Function]': 'function' - , '[object Arguments]': 'arguments' - , '[object Date]': 'date' -}; - -/** - * ### typeOf (obj) - * - * Use several different techniques to determine - * the type of object being tested. - * - * - * @param {Mixed} object - * @return {String} object type - * @api public - */ - -function getType (obj) { - var str = Object.prototype.toString.call(obj); - if (natives[str]) return natives[str]; - if (obj === null) return 'null'; - if (obj === undefined) return 'undefined'; - if (obj === Object(obj)) return 'object'; - return typeof obj; -} - -exports.Library = Library; - -/** - * ### Library - * - * Create a repository for custom type detection. - * - * ```js - * var lib = new type.Library; - * ``` - * - */ - -function Library () { - this.tests = {}; -} - -/** - * #### .of (obj) - * - * Expose replacement `typeof` detection to the library. - * - * ```js - * if ('string' === lib.of('hello world')) { - * // ... - * } - * ``` - * - * @param {Mixed} object to test - * @return {String} type - */ - -Library.prototype.of = getType; - -/** - * #### .define (type, test) - * - * Add a test to for the `.test()` assertion. - * - * Can be defined as a regular expression: - * - * ```js - * lib.define('int', /^[0-9]+$/); - * ``` - * - * ... or as a function: - * - * ```js - * lib.define('bln', function (obj) { - * if ('boolean' === lib.of(obj)) return true; - * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ]; - * if ('string' === lib.of(obj)) obj = obj.toLowerCase(); - * return !! ~blns.indexOf(obj); - * }); - * ``` - * - * @param {String} type - * @param {RegExp|Function} test - * @api public - */ - -Library.prototype.define = function (type, test) { - if (arguments.length === 1) return this.tests[type]; - this.tests[type] = test; - return this; -}; - -/** - * #### .test (obj, test) - * - * Assert that an object is of type. Will first - * check natives, and if that does not pass it will - * use the user defined custom tests. - * - * ```js - * assert(lib.test('1', 'int')); - * assert(lib.test('yes', 'bln')); - * ``` - * - * @param {Mixed} object - * @param {String} type - * @return {Boolean} result - * @api public - */ - -Library.prototype.test = function (obj, type) { - if (type === getType(obj)) return true; - var test = this.tests[type]; - - if (test && 'regexp' === getType(test)) { - return test.test(obj); - } else if (test && 'function' === getType(test)) { - return test(obj); - } else { - throw new ReferenceError('Type test "' + type + '" not defined or invalid.'); - } -}; - -}); - -require.register("chaijs~deep-eql@0.1.3", function (exports, module) { -/*! - * deep-eql - * Copyright(c) 2013 Jake Luer - * MIT Licensed - */ - -/*! - * Module dependencies - */ - -var type = require('chaijs~type-detect@0.1.1'); - -/*! - * Buffer.isBuffer browser shim - */ - -var Buffer; -try { Buffer = require('buffer').Buffer; } -catch(ex) { - Buffer = {}; - Buffer.isBuffer = function() { return false; } -} - -/*! - * Primary Export - */ - -module.exports = deepEqual; - -/** - * Assert super-strict (egal) equality between - * two objects of any type. - * - * @param {Mixed} a - * @param {Mixed} b - * @param {Array} memoised (optional) - * @return {Boolean} equal match - */ - -function deepEqual(a, b, m) { - if (sameValue(a, b)) { - return true; - } else if ('date' === type(a)) { - return dateEqual(a, b); - } else if ('regexp' === type(a)) { - return regexpEqual(a, b); - } else if (Buffer.isBuffer(a)) { - return bufferEqual(a, b); - } else if ('arguments' === type(a)) { - return argumentsEqual(a, b, m); - } else if (!typeEqual(a, b)) { - return false; - } else if (('object' !== type(a) && 'object' !== type(b)) - && ('array' !== type(a) && 'array' !== type(b))) { - return sameValue(a, b); - } else { - return objectEqual(a, b, m); - } -} - -/*! - * Strict (egal) equality test. Ensures that NaN always - * equals NaN and `-0` does not equal `+0`. - * - * @param {Mixed} a - * @param {Mixed} b - * @return {Boolean} equal match - */ - -function sameValue(a, b) { - if (a === b) return a !== 0 || 1 / a === 1 / b; - return a !== a && b !== b; -} - -/*! - * Compare the types of two given objects and - * return if they are equal. Note that an Array - * has a type of `array` (not `object`) and arguments - * have a type of `arguments` (not `array`/`object`). - * - * @param {Mixed} a - * @param {Mixed} b - * @return {Boolean} result - */ - -function typeEqual(a, b) { - return type(a) === type(b); -} - -/*! - * Compare two Date objects by asserting that - * the time values are equal using `saveValue`. - * - * @param {Date} a - * @param {Date} b - * @return {Boolean} result - */ - -function dateEqual(a, b) { - if ('date' !== type(b)) return false; - return sameValue(a.getTime(), b.getTime()); -} - -/*! - * Compare two regular expressions by converting them - * to string and checking for `sameValue`. - * - * @param {RegExp} a - * @param {RegExp} b - * @return {Boolean} result - */ - -function regexpEqual(a, b) { - if ('regexp' !== type(b)) return false; - return sameValue(a.toString(), b.toString()); -} - -/*! - * Assert deep equality of two `arguments` objects. - * Unfortunately, these must be sliced to arrays - * prior to test to ensure no bad behavior. - * - * @param {Arguments} a - * @param {Arguments} b - * @param {Array} memoize (optional) - * @return {Boolean} result - */ - -function argumentsEqual(a, b, m) { - if ('arguments' !== type(b)) return false; - a = [].slice.call(a); - b = [].slice.call(b); - return deepEqual(a, b, m); -} - -/*! - * Get enumerable properties of a given object. - * - * @param {Object} a - * @return {Array} property names - */ - -function enumerable(a) { - var res = []; - for (var key in a) res.push(key); - return res; -} - -/*! - * Simple equality for flat iterable objects - * such as Arrays or Node.js buffers. - * - * @param {Iterable} a - * @param {Iterable} b - * @return {Boolean} result - */ - -function iterableEqual(a, b) { - if (a.length !== b.length) return false; - - var i = 0; - var match = true; - - for (; i < a.length; i++) { - if (a[i] !== b[i]) { - match = false; - break; - } - } - - return match; -} - -/*! - * Extension to `iterableEqual` specifically - * for Node.js Buffers. - * - * @param {Buffer} a - * @param {Mixed} b - * @return {Boolean} result - */ - -function bufferEqual(a, b) { - if (!Buffer.isBuffer(b)) return false; - return iterableEqual(a, b); -} - -/*! - * Block for `objectEqual` ensuring non-existing - * values don't get in. - * - * @param {Mixed} object - * @return {Boolean} result - */ - -function isValue(a) { - return a !== null && a !== undefined; -} - -/*! - * Recursively check the equality of two objects. - * Once basic sameness has been established it will - * defer to `deepEqual` for each enumerable key - * in the object. - * - * @param {Mixed} a - * @param {Mixed} b - * @return {Boolean} result - */ - -function objectEqual(a, b, m) { - if (!isValue(a) || !isValue(b)) { - return false; - } - - if (a.prototype !== b.prototype) { - return false; - } - - var i; - if (m) { - for (i = 0; i < m.length; i++) { - if ((m[i][0] === a && m[i][1] === b) - || (m[i][0] === b && m[i][1] === a)) { - return true; - } - } - } else { - m = []; - } - - try { - var ka = enumerable(a); - var kb = enumerable(b); - } catch (ex) { - return false; - } - - ka.sort(); - kb.sort(); - - if (!iterableEqual(ka, kb)) { - return false; - } - - m.push([ a, b ]); - - var key; - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!deepEqual(a[key], b[key], m)) { - return false; - } - } - - return true; -} - -}); - -require.register("chai", function (exports, module) { -module.exports = require('chai/lib/chai.js'); - -}); - -require.register("chai/lib/chai.js", function (exports, module) { -/*! - * chai - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - -var used = [] - , exports = module.exports = {}; - -/*! - * Chai version - */ - -exports.version = '2.3.0'; - -/*! - * Assertion Error - */ - -exports.AssertionError = require('chaijs~assertion-error@1.0.0'); - -/*! - * Utils for plugins (not exported) - */ - -var util = require('chai/lib/chai/utils/index.js'); - -/** - * # .use(function) - * - * Provides a way to extend the internals of Chai - * - * @param {Function} - * @returns {this} for chaining - * @api public - */ - -exports.use = function (fn) { - if (!~used.indexOf(fn)) { - fn(this, util); - used.push(fn); - } - - return this; -}; - -/*! - * Utility Functions - */ - -exports.util = util; - -/*! - * Configuration - */ - -var config = require('chai/lib/chai/config.js'); -exports.config = config; - -/*! - * Primary `Assertion` prototype - */ - -var assertion = require('chai/lib/chai/assertion.js'); -exports.use(assertion); - -/*! - * Core Assertions - */ - -var core = require('chai/lib/chai/core/assertions.js'); -exports.use(core); - -/*! - * Expect interface - */ - -var expect = require('chai/lib/chai/interface/expect.js'); -exports.use(expect); - -/*! - * Should interface - */ - -var should = require('chai/lib/chai/interface/should.js'); -exports.use(should); - -/*! - * Assert interface - */ - -var assert = require('chai/lib/chai/interface/assert.js'); -exports.use(assert); - -}); - -require.register("chai/lib/chai/assertion.js", function (exports, module) { -/*! - * chai - * http://chaijs.com - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - -var config = require('chai/lib/chai/config.js'); - -module.exports = function (_chai, util) { - /*! - * Module dependencies. - */ - - var AssertionError = _chai.AssertionError - , flag = util.flag; - - /*! - * Module export. - */ - - _chai.Assertion = Assertion; - - /*! - * Assertion Constructor - * - * Creates object for chaining. - * - * @api private - */ - - function Assertion (obj, msg, stack) { - flag(this, 'ssfi', stack || arguments.callee); - flag(this, 'object', obj); - flag(this, 'message', msg); - } - - Object.defineProperty(Assertion, 'includeStack', { - get: function() { - console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.'); - return config.includeStack; - }, - set: function(value) { - console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.'); - config.includeStack = value; - } - }); - - Object.defineProperty(Assertion, 'showDiff', { - get: function() { - console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.'); - return config.showDiff; - }, - set: function(value) { - console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.'); - config.showDiff = value; - } - }); - - Assertion.addProperty = function (name, fn) { - util.addProperty(this.prototype, name, fn); - }; - - Assertion.addMethod = function (name, fn) { - util.addMethod(this.prototype, name, fn); - }; - - Assertion.addChainableMethod = function (name, fn, chainingBehavior) { - util.addChainableMethod(this.prototype, name, fn, chainingBehavior); - }; - - Assertion.overwriteProperty = function (name, fn) { - util.overwriteProperty(this.prototype, name, fn); - }; - - Assertion.overwriteMethod = function (name, fn) { - util.overwriteMethod(this.prototype, name, fn); - }; - - Assertion.overwriteChainableMethod = function (name, fn, chainingBehavior) { - util.overwriteChainableMethod(this.prototype, name, fn, chainingBehavior); - }; - - /*! - * ### .assert(expression, message, negateMessage, expected, actual) - * - * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass. - * - * @name assert - * @param {Philosophical} expression to be tested - * @param {String or Function} message or function that returns message to display if expression fails - * @param {String or Function} negatedMessage or function that returns negatedMessage to display if negated expression fails - * @param {Mixed} expected value (remember to check for negation) - * @param {Mixed} actual (optional) will default to `this.obj` - * @param {Boolean} showDiff (optional) when set to `true`, assert will display a diff in addition to the message if expression fails - * @api private - */ - - Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual, showDiff) { - var ok = util.test(this, arguments); - if (true !== showDiff) showDiff = false; - if (true !== config.showDiff) showDiff = false; - - if (!ok) { - var msg = util.getMessage(this, arguments) - , actual = util.getActual(this, arguments); - throw new AssertionError(msg, { - actual: actual - , expected: expected - , showDiff: showDiff - }, (config.includeStack) ? this.assert : flag(this, 'ssfi')); - } - }; - - /*! - * ### ._obj - * - * Quick reference to stored `actual` value for plugin developers. - * - * @api private - */ - - Object.defineProperty(Assertion.prototype, '_obj', - { get: function () { - return flag(this, 'object'); - } - , set: function (val) { - flag(this, 'object', val); - } - }); -}; - -}); - -require.register("chai/lib/chai/config.js", function (exports, module) { -module.exports = { - - /** - * ### config.includeStack - * - * User configurable property, influences whether stack trace - * is included in Assertion error message. Default of false - * suppresses stack trace in the error message. - * - * chai.config.includeStack = true; // enable stack on error - * - * @param {Boolean} - * @api public - */ - - includeStack: false, - - /** - * ### config.showDiff - * - * User configurable property, influences whether or not - * the `showDiff` flag should be included in the thrown - * AssertionErrors. `false` will always be `false`; `true` - * will be true when the assertion has requested a diff - * be shown. - * - * @param {Boolean} - * @api public - */ - - showDiff: true, - - /** - * ### config.truncateThreshold - * - * User configurable property, sets length threshold for actual and - * expected values in assertion errors. If this threshold is exceeded, for - * example for large data structures, the value is replaced with something - * like `[ Array(3) ]` or `{ Object (prop1, prop2) }`. - * - * Set it to zero if you want to disable truncating altogether. - * - * This is especially userful when doing assertions on arrays: having this - * set to a reasonable large value makes the failure messages readily - * inspectable. - * - * chai.config.truncateThreshold = 0; // disable truncating - * - * @param {Number} - * @api public - */ - - truncateThreshold: 40 - -}; - -}); - -require.register("chai/lib/chai/core/assertions.js", function (exports, module) { -/*! - * chai - * http://chaijs.com - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - -module.exports = function (chai, _) { - var Assertion = chai.Assertion - , toString = Object.prototype.toString - , flag = _.flag; - - /** - * ### Language Chains - * - * The following are provided as chainable getters to - * improve the readability of your assertions. They - * do not provide testing capabilities unless they - * have been overwritten by a plugin. - * - * **Chains** - * - * - to - * - be - * - been - * - is - * - that - * - which - * - and - * - has - * - have - * - with - * - at - * - of - * - same - * - * @name language chains - * @api public - */ - - [ 'to', 'be', 'been' - , 'is', 'and', 'has', 'have' - , 'with', 'that', 'which', 'at' - , 'of', 'same' ].forEach(function (chain) { - Assertion.addProperty(chain, function () { - return this; - }); - }); - - /** - * ### .not - * - * Negates any of assertions following in the chain. - * - * expect(foo).to.not.equal('bar'); - * expect(goodFn).to.not.throw(Error); - * expect({ foo: 'baz' }).to.have.property('foo') - * .and.not.equal('bar'); - * - * @name not - * @api public - */ - - Assertion.addProperty('not', function () { - flag(this, 'negate', true); - }); - - /** - * ### .deep - * - * Sets the `deep` flag, later used by the `equal` and - * `property` assertions. - * - * expect(foo).to.deep.equal({ bar: 'baz' }); - * expect({ foo: { bar: { baz: 'quux' } } }) - * .to.have.deep.property('foo.bar.baz', 'quux'); - * - * `.deep.property` special characters can be escaped - * by adding two slashes before the `.` or `[]`. - * - * var deepCss = { '.link': { '[target]': 42 }}; - * expect(deepCss).to.have.deep.property('\\.link.\\[target\\]', 42); - * - * @name deep - * @api public - */ - - Assertion.addProperty('deep', function () { - flag(this, 'deep', true); - }); - - /** - * ### .any - * - * Sets the `any` flag, (opposite of the `all` flag) - * later used in the `keys` assertion. - * - * expect(foo).to.have.any.keys('bar', 'baz'); - * - * @name any - * @api public - */ - - Assertion.addProperty('any', function () { - flag(this, 'any', true); - flag(this, 'all', false) - }); - - - /** - * ### .all - * - * Sets the `all` flag (opposite of the `any` flag) - * later used by the `keys` assertion. - * - * expect(foo).to.have.all.keys('bar', 'baz'); - * - * @name all - * @api public - */ - - Assertion.addProperty('all', function () { - flag(this, 'all', true); - flag(this, 'any', false); - }); - - /** - * ### .a(type) - * - * The `a` and `an` assertions are aliases that can be - * used either as language chains or to assert a value's - * type. - * - * // typeof - * expect('test').to.be.a('string'); - * expect({ foo: 'bar' }).to.be.an('object'); - * expect(null).to.be.a('null'); - * expect(undefined).to.be.an('undefined'); - * - * // language chain - * expect(foo).to.be.an.instanceof(Foo); - * - * @name a - * @alias an - * @param {String} type - * @param {String} message _optional_ - * @api public - */ - - function an (type, msg) { - if (msg) flag(this, 'message', msg); - type = type.toLowerCase(); - var obj = flag(this, 'object') - , article = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(type.charAt(0)) ? 'an ' : 'a '; - - this.assert( - type === _.type(obj) - , 'expected #{this} to be ' + article + type - , 'expected #{this} not to be ' + article + type - ); - } - - Assertion.addChainableMethod('an', an); - Assertion.addChainableMethod('a', an); - - /** - * ### .include(value) - * - * The `include` and `contain` assertions can be used as either property - * based language chains or as methods to assert the inclusion of an object - * in an array or a substring in a string. When used as language chains, - * they toggle the `contains` flag for the `keys` assertion. - * - * expect([1,2,3]).to.include(2); - * expect('foobar').to.contain('foo'); - * expect({ foo: 'bar', hello: 'universe' }).to.include.keys('foo'); - * - * @name include - * @alias contain - * @alias includes - * @alias contains - * @param {Object|String|Number} obj - * @param {String} message _optional_ - * @api public - */ - - function includeChainingBehavior () { - flag(this, 'contains', true); - } - - function include (val, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - var expected = false; - if (_.type(obj) === 'array' && _.type(val) === 'object') { - for (var i in obj) { - if (_.eql(obj[i], val)) { - expected = true; - break; - } - } - } else if (_.type(val) === 'object') { - if (!flag(this, 'negate')) { - for (var k in val) new Assertion(obj).property(k, val[k]); - return; - } - var subset = {}; - for (var k in val) subset[k] = obj[k]; - expected = _.eql(subset, val); - } else { - expected = obj && ~obj.indexOf(val); - } - this.assert( - expected - , 'expected #{this} to include ' + _.inspect(val) - , 'expected #{this} to not include ' + _.inspect(val)); - } - - Assertion.addChainableMethod('include', include, includeChainingBehavior); - Assertion.addChainableMethod('contain', include, includeChainingBehavior); - Assertion.addChainableMethod('contains', include, includeChainingBehavior); - Assertion.addChainableMethod('includes', include, includeChainingBehavior); - - /** - * ### .ok - * - * Asserts that the target is truthy. - * - * expect('everthing').to.be.ok; - * expect(1).to.be.ok; - * expect(false).to.not.be.ok; - * expect(undefined).to.not.be.ok; - * expect(null).to.not.be.ok; - * - * @name ok - * @api public - */ - - Assertion.addProperty('ok', function () { - this.assert( - flag(this, 'object') - , 'expected #{this} to be truthy' - , 'expected #{this} to be falsy'); - }); - - /** - * ### .true - * - * Asserts that the target is `true`. - * - * expect(true).to.be.true; - * expect(1).to.not.be.true; - * - * @name true - * @api public - */ - - Assertion.addProperty('true', function () { - this.assert( - true === flag(this, 'object') - , 'expected #{this} to be true' - , 'expected #{this} to be false' - , this.negate ? false : true - ); - }); - - /** - * ### .false - * - * Asserts that the target is `false`. - * - * expect(false).to.be.false; - * expect(0).to.not.be.false; - * - * @name false - * @api public - */ - - Assertion.addProperty('false', function () { - this.assert( - false === flag(this, 'object') - , 'expected #{this} to be false' - , 'expected #{this} to be true' - , this.negate ? true : false - ); - }); - - /** - * ### .null - * - * Asserts that the target is `null`. - * - * expect(null).to.be.null; - * expect(undefined).to.not.be.null; - * - * @name null - * @api public - */ - - Assertion.addProperty('null', function () { - this.assert( - null === flag(this, 'object') - , 'expected #{this} to be null' - , 'expected #{this} not to be null' - ); - }); - - /** - * ### .undefined - * - * Asserts that the target is `undefined`. - * - * expect(undefined).to.be.undefined; - * expect(null).to.not.be.undefined; - * - * @name undefined - * @api public - */ - - Assertion.addProperty('undefined', function () { - this.assert( - undefined === flag(this, 'object') - , 'expected #{this} to be undefined' - , 'expected #{this} not to be undefined' - ); - }); - - /** - * ### .exist - * - * Asserts that the target is neither `null` nor `undefined`. - * - * var foo = 'hi' - * , bar = null - * , baz; - * - * expect(foo).to.exist; - * expect(bar).to.not.exist; - * expect(baz).to.not.exist; - * - * @name exist - * @api public - */ - - Assertion.addProperty('exist', function () { - this.assert( - null != flag(this, 'object') - , 'expected #{this} to exist' - , 'expected #{this} to not exist' - ); - }); - - - /** - * ### .empty - * - * Asserts that the target's length is `0`. For arrays and strings, it checks - * the `length` property. For objects, it gets the count of - * enumerable keys. - * - * expect([]).to.be.empty; - * expect('').to.be.empty; - * expect({}).to.be.empty; - * - * @name empty - * @api public - */ - - Assertion.addProperty('empty', function () { - var obj = flag(this, 'object') - , expected = obj; - - if (Array.isArray(obj) || 'string' === typeof object) { - expected = obj.length; - } else if (typeof obj === 'object') { - expected = Object.keys(obj).length; - } - - this.assert( - !expected - , 'expected #{this} to be empty' - , 'expected #{this} not to be empty' - ); - }); - - /** - * ### .arguments - * - * Asserts that the target is an arguments object. - * - * function test () { - * expect(arguments).to.be.arguments; - * } - * - * @name arguments - * @alias Arguments - * @api public - */ - - function checkArguments () { - var obj = flag(this, 'object') - , type = Object.prototype.toString.call(obj); - this.assert( - '[object Arguments]' === type - , 'expected #{this} to be arguments but got ' + type - , 'expected #{this} to not be arguments' - ); - } - - Assertion.addProperty('arguments', checkArguments); - Assertion.addProperty('Arguments', checkArguments); - - /** - * ### .equal(value) - * - * Asserts that the target is strictly equal (`===`) to `value`. - * Alternately, if the `deep` flag is set, asserts that - * the target is deeply equal to `value`. - * - * expect('hello').to.equal('hello'); - * expect(42).to.equal(42); - * expect(1).to.not.equal(true); - * expect({ foo: 'bar' }).to.not.equal({ foo: 'bar' }); - * expect({ foo: 'bar' }).to.deep.equal({ foo: 'bar' }); - * - * @name equal - * @alias equals - * @alias eq - * @alias deep.equal - * @param {Mixed} value - * @param {String} message _optional_ - * @api public - */ - - function assertEqual (val, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - if (flag(this, 'deep')) { - return this.eql(val); - } else { - this.assert( - val === obj - , 'expected #{this} to equal #{exp}' - , 'expected #{this} to not equal #{exp}' - , val - , this._obj - , true - ); - } - } - - Assertion.addMethod('equal', assertEqual); - Assertion.addMethod('equals', assertEqual); - Assertion.addMethod('eq', assertEqual); - - /** - * ### .eql(value) - * - * Asserts that the target is deeply equal to `value`. - * - * expect({ foo: 'bar' }).to.eql({ foo: 'bar' }); - * expect([ 1, 2, 3 ]).to.eql([ 1, 2, 3 ]); - * - * @name eql - * @alias eqls - * @param {Mixed} value - * @param {String} message _optional_ - * @api public - */ - - function assertEql(obj, msg) { - if (msg) flag(this, 'message', msg); - this.assert( - _.eql(obj, flag(this, 'object')) - , 'expected #{this} to deeply equal #{exp}' - , 'expected #{this} to not deeply equal #{exp}' - , obj - , this._obj - , true - ); - } - - Assertion.addMethod('eql', assertEql); - Assertion.addMethod('eqls', assertEql); - - /** - * ### .above(value) - * - * Asserts that the target is greater than `value`. - * - * expect(10).to.be.above(5); - * - * Can also be used in conjunction with `length` to - * assert a minimum length. The benefit being a - * more informative error message than if the length - * was supplied directly. - * - * expect('foo').to.have.length.above(2); - * expect([ 1, 2, 3 ]).to.have.length.above(2); - * - * @name above - * @alias gt - * @alias greaterThan - * @param {Number} value - * @param {String} message _optional_ - * @api public - */ - - function assertAbove (n, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - if (flag(this, 'doLength')) { - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - this.assert( - len > n - , 'expected #{this} to have a length above #{exp} but got #{act}' - , 'expected #{this} to not have a length above #{exp}' - , n - , len - ); - } else { - this.assert( - obj > n - , 'expected #{this} to be above ' + n - , 'expected #{this} to be at most ' + n - ); - } - } - - Assertion.addMethod('above', assertAbove); - Assertion.addMethod('gt', assertAbove); - Assertion.addMethod('greaterThan', assertAbove); - - /** - * ### .least(value) - * - * Asserts that the target is greater than or equal to `value`. - * - * expect(10).to.be.at.least(10); - * - * Can also be used in conjunction with `length` to - * assert a minimum length. The benefit being a - * more informative error message than if the length - * was supplied directly. - * - * expect('foo').to.have.length.of.at.least(2); - * expect([ 1, 2, 3 ]).to.have.length.of.at.least(3); - * - * @name least - * @alias gte - * @param {Number} value - * @param {String} message _optional_ - * @api public - */ - - function assertLeast (n, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - if (flag(this, 'doLength')) { - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - this.assert( - len >= n - , 'expected #{this} to have a length at least #{exp} but got #{act}' - , 'expected #{this} to have a length below #{exp}' - , n - , len - ); - } else { - this.assert( - obj >= n - , 'expected #{this} to be at least ' + n - , 'expected #{this} to be below ' + n - ); - } - } - - Assertion.addMethod('least', assertLeast); - Assertion.addMethod('gte', assertLeast); - - /** - * ### .below(value) - * - * Asserts that the target is less than `value`. - * - * expect(5).to.be.below(10); - * - * Can also be used in conjunction with `length` to - * assert a maximum length. The benefit being a - * more informative error message than if the length - * was supplied directly. - * - * expect('foo').to.have.length.below(4); - * expect([ 1, 2, 3 ]).to.have.length.below(4); - * - * @name below - * @alias lt - * @alias lessThan - * @param {Number} value - * @param {String} message _optional_ - * @api public - */ - - function assertBelow (n, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - if (flag(this, 'doLength')) { - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - this.assert( - len < n - , 'expected #{this} to have a length below #{exp} but got #{act}' - , 'expected #{this} to not have a length below #{exp}' - , n - , len - ); - } else { - this.assert( - obj < n - , 'expected #{this} to be below ' + n - , 'expected #{this} to be at least ' + n - ); - } - } - - Assertion.addMethod('below', assertBelow); - Assertion.addMethod('lt', assertBelow); - Assertion.addMethod('lessThan', assertBelow); - - /** - * ### .most(value) - * - * Asserts that the target is less than or equal to `value`. - * - * expect(5).to.be.at.most(5); - * - * Can also be used in conjunction with `length` to - * assert a maximum length. The benefit being a - * more informative error message than if the length - * was supplied directly. - * - * expect('foo').to.have.length.of.at.most(4); - * expect([ 1, 2, 3 ]).to.have.length.of.at.most(3); - * - * @name most - * @alias lte - * @param {Number} value - * @param {String} message _optional_ - * @api public - */ - - function assertMost (n, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - if (flag(this, 'doLength')) { - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - this.assert( - len <= n - , 'expected #{this} to have a length at most #{exp} but got #{act}' - , 'expected #{this} to have a length above #{exp}' - , n - , len - ); - } else { - this.assert( - obj <= n - , 'expected #{this} to be at most ' + n - , 'expected #{this} to be above ' + n - ); - } - } - - Assertion.addMethod('most', assertMost); - Assertion.addMethod('lte', assertMost); - - /** - * ### .within(start, finish) - * - * Asserts that the target is within a range. - * - * expect(7).to.be.within(5,10); - * - * Can also be used in conjunction with `length` to - * assert a length range. The benefit being a - * more informative error message than if the length - * was supplied directly. - * - * expect('foo').to.have.length.within(2,4); - * expect([ 1, 2, 3 ]).to.have.length.within(2,4); - * - * @name within - * @param {Number} start lowerbound inclusive - * @param {Number} finish upperbound inclusive - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('within', function (start, finish, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object') - , range = start + '..' + finish; - if (flag(this, 'doLength')) { - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - this.assert( - len >= start && len <= finish - , 'expected #{this} to have a length within ' + range - , 'expected #{this} to not have a length within ' + range - ); - } else { - this.assert( - obj >= start && obj <= finish - , 'expected #{this} to be within ' + range - , 'expected #{this} to not be within ' + range - ); - } - }); - - /** - * ### .instanceof(constructor) - * - * Asserts that the target is an instance of `constructor`. - * - * var Tea = function (name) { this.name = name; } - * , Chai = new Tea('chai'); - * - * expect(Chai).to.be.an.instanceof(Tea); - * expect([ 1, 2, 3 ]).to.be.instanceof(Array); - * - * @name instanceof - * @param {Constructor} constructor - * @param {String} message _optional_ - * @alias instanceOf - * @api public - */ - - function assertInstanceOf (constructor, msg) { - if (msg) flag(this, 'message', msg); - var name = _.getName(constructor); - this.assert( - flag(this, 'object') instanceof constructor - , 'expected #{this} to be an instance of ' + name - , 'expected #{this} to not be an instance of ' + name - ); - }; - - Assertion.addMethod('instanceof', assertInstanceOf); - Assertion.addMethod('instanceOf', assertInstanceOf); - - /** - * ### .property(name, [value]) - * - * Asserts that the target has a property `name`, optionally asserting that - * the value of that property is strictly equal to `value`. - * If the `deep` flag is set, you can use dot- and bracket-notation for deep - * references into objects and arrays. - * - * // simple referencing - * var obj = { foo: 'bar' }; - * expect(obj).to.have.property('foo'); - * expect(obj).to.have.property('foo', 'bar'); - * - * // deep referencing - * var deepObj = { - * green: { tea: 'matcha' } - * , teas: [ 'chai', 'matcha', { tea: 'konacha' } ] - * }; - * - * expect(deepObj).to.have.deep.property('green.tea', 'matcha'); - * expect(deepObj).to.have.deep.property('teas[1]', 'matcha'); - * expect(deepObj).to.have.deep.property('teas[2].tea', 'konacha'); - * - * You can also use an array as the starting point of a `deep.property` - * assertion, or traverse nested arrays. - * - * var arr = [ - * [ 'chai', 'matcha', 'konacha' ] - * , [ { tea: 'chai' } - * , { tea: 'matcha' } - * , { tea: 'konacha' } ] - * ]; - * - * expect(arr).to.have.deep.property('[0][1]', 'matcha'); - * expect(arr).to.have.deep.property('[1][2].tea', 'konacha'); - * - * Furthermore, `property` changes the subject of the assertion - * to be the value of that property from the original object. This - * permits for further chainable assertions on that property. - * - * expect(obj).to.have.property('foo') - * .that.is.a('string'); - * expect(deepObj).to.have.property('green') - * .that.is.an('object') - * .that.deep.equals({ tea: 'matcha' }); - * expect(deepObj).to.have.property('teas') - * .that.is.an('array') - * .with.deep.property('[2]') - * .that.deep.equals({ tea: 'konacha' }); - * - * Note that dots and bracket in `name` must be backslash-escaped when - * the `deep` flag is set, while they must NOT be escaped when the `deep` - * flag is not set. - * - * // simple referencing - * var css = { '.link[target]': 42 }; - * expect(css).to.have.property('.link[target]', 42); - * - * // deep referencing - * var deepCss = { '.link': { '[target]': 42 }}; - * expect(deepCss).to.have.deep.property('\\.link.\\[target\\]', 42); - * - * @name property - * @alias deep.property - * @param {String} name - * @param {Mixed} value (optional) - * @param {String} message _optional_ - * @returns value of property for chaining - * @api public - */ - - Assertion.addMethod('property', function (name, val, msg) { - if (msg) flag(this, 'message', msg); - - var isDeep = !!flag(this, 'deep') - , descriptor = isDeep ? 'deep property ' : 'property ' - , negate = flag(this, 'negate') - , obj = flag(this, 'object') - , pathInfo = isDeep ? _.getPathInfo(name, obj) : null - , hasProperty = isDeep - ? pathInfo.exists - : _.hasProperty(name, obj) - , value = isDeep - ? pathInfo.value - : obj[name]; - - if (negate && undefined !== val) { - if (undefined === value) { - msg = (msg != null) ? msg + ': ' : ''; - throw new Error(msg + _.inspect(obj) + ' has no ' + descriptor + _.inspect(name)); - } - } else { - this.assert( - hasProperty - , 'expected #{this} to have a ' + descriptor + _.inspect(name) - , 'expected #{this} to not have ' + descriptor + _.inspect(name)); - } - - if (undefined !== val) { - this.assert( - val === value - , 'expected #{this} to have a ' + descriptor + _.inspect(name) + ' of #{exp}, but got #{act}' - , 'expected #{this} to not have a ' + descriptor + _.inspect(name) + ' of #{act}' - , val - , value - ); - } - - flag(this, 'object', value); - }); - - - /** - * ### .ownProperty(name) - * - * Asserts that the target has an own property `name`. - * - * expect('test').to.have.ownProperty('length'); - * - * @name ownProperty - * @alias haveOwnProperty - * @param {String} name - * @param {String} message _optional_ - * @api public - */ - - function assertOwnProperty (name, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - this.assert( - obj.hasOwnProperty(name) - , 'expected #{this} to have own property ' + _.inspect(name) - , 'expected #{this} to not have own property ' + _.inspect(name) - ); - } - - Assertion.addMethod('ownProperty', assertOwnProperty); - Assertion.addMethod('haveOwnProperty', assertOwnProperty); - - /** - * ### .ownPropertyDescriptor(name[, descriptor[, message]]) - * - * Asserts that the target has an own property descriptor `name`, that optionally matches `descriptor`. - * - * expect('test').to.have.ownPropertyDescriptor('length'); - * expect('test').to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 4 }); - * expect('test').not.to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 3 }); - * expect('test').ownPropertyDescriptor('length').to.have.property('enumerable', false); - * expect('test').ownPropertyDescriptor('length').to.have.keys('value'); - * - * @name ownPropertyDescriptor - * @alias haveOwnPropertyDescriptor - * @param {String} name - * @param {Object} descriptor _optional_ - * @param {String} message _optional_ - * @api public - */ - - function assertOwnPropertyDescriptor (name, descriptor, msg) { - if (typeof descriptor === 'string') { - msg = descriptor; - descriptor = null; - } - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - var actualDescriptor = Object.getOwnPropertyDescriptor(Object(obj), name); - if (actualDescriptor && descriptor) { - this.assert( - _.eql(descriptor, actualDescriptor) - , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to match ' + _.inspect(descriptor) + ', got ' + _.inspect(actualDescriptor) - , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to not match ' + _.inspect(descriptor) - , descriptor - , actualDescriptor - , true - ); - } else { - this.assert( - actualDescriptor - , 'expected #{this} to have an own property descriptor for ' + _.inspect(name) - , 'expected #{this} to not have an own property descriptor for ' + _.inspect(name) - ); - } - flag(this, 'object', actualDescriptor); - } - - Assertion.addMethod('ownPropertyDescriptor', assertOwnPropertyDescriptor); - Assertion.addMethod('haveOwnPropertyDescriptor', assertOwnPropertyDescriptor); - - /** - * ### .length(value) - * - * Asserts that the target's `length` property has - * the expected value. - * - * expect([ 1, 2, 3]).to.have.length(3); - * expect('foobar').to.have.length(6); - * - * Can also be used as a chain precursor to a value - * comparison for the length property. - * - * expect('foo').to.have.length.above(2); - * expect([ 1, 2, 3 ]).to.have.length.above(2); - * expect('foo').to.have.length.below(4); - * expect([ 1, 2, 3 ]).to.have.length.below(4); - * expect('foo').to.have.length.within(2,4); - * expect([ 1, 2, 3 ]).to.have.length.within(2,4); - * - * @name length - * @alias lengthOf - * @param {Number} length - * @param {String} message _optional_ - * @api public - */ - - function assertLengthChain () { - flag(this, 'doLength', true); - } - - function assertLength (n, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - - this.assert( - len == n - , 'expected #{this} to have a length of #{exp} but got #{act}' - , 'expected #{this} to not have a length of #{act}' - , n - , len - ); - } - - Assertion.addChainableMethod('length', assertLength, assertLengthChain); - Assertion.addMethod('lengthOf', assertLength); - - /** - * ### .match(regexp) - * - * Asserts that the target matches a regular expression. - * - * expect('foobar').to.match(/^foo/); - * - * @name match - * @param {RegExp} RegularExpression - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('match', function (re, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - this.assert( - re.exec(obj) - , 'expected #{this} to match ' + re - , 'expected #{this} not to match ' + re - ); - }); - - /** - * ### .string(string) - * - * Asserts that the string target contains another string. - * - * expect('foobar').to.have.string('bar'); - * - * @name string - * @param {String} string - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('string', function (str, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - new Assertion(obj, msg).is.a('string'); - - this.assert( - ~obj.indexOf(str) - , 'expected #{this} to contain ' + _.inspect(str) - , 'expected #{this} to not contain ' + _.inspect(str) - ); - }); - - - /** - * ### .keys(key1, [key2], [...]) - * - * Asserts that the target contains any or all of the passed-in keys. - * Use in combination with `any`, `all`, `contains`, or `have` will affect - * what will pass. - * - * When used in conjunction with `any`, at least one key that is passed - * in must exist in the target object. This is regardless whether or not - * the `have` or `contain` qualifiers are used. Note, either `any` or `all` - * should be used in the assertion. If neither are used, the assertion is - * defaulted to `all`. - * - * When both `all` and `contain` are used, the target object must have at - * least all of the passed-in keys but may have more keys not listed. - * - * When both `all` and `have` are used, the target object must both contain - * all of the passed-in keys AND the number of keys in the target object must - * match the number of keys passed in (in other words, a target object must - * have all and only all of the passed-in keys). - * - * expect({ foo: 1, bar: 2 }).to.have.any.keys('foo', 'baz'); - * expect({ foo: 1, bar: 2 }).to.have.any.keys('foo'); - * expect({ foo: 1, bar: 2 }).to.contain.any.keys('bar', 'baz'); - * expect({ foo: 1, bar: 2 }).to.contain.any.keys(['foo']); - * expect({ foo: 1, bar: 2 }).to.contain.any.keys({'foo': 6}); - * expect({ foo: 1, bar: 2 }).to.have.all.keys(['bar', 'foo']); - * expect({ foo: 1, bar: 2 }).to.have.all.keys({'bar': 6, 'foo': 7}); - * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys(['bar', 'foo']); - * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys([{'bar': 6}}]); - * - * - * @name keys - * @alias key - * @param {String...|Array|Object} keys - * @api public - */ - - function assertKeys (keys) { - var obj = flag(this, 'object') - , str - , ok = true - , mixedArgsMsg = 'keys must be given single argument of Array|Object|String, or multiple String arguments'; - - switch (_.type(keys)) { - case "array": - if (arguments.length > 1) throw (new Error(mixedArgsMsg)); - break; - case "object": - if (arguments.length > 1) throw (new Error(mixedArgsMsg)); - keys = Object.keys(keys); - break; - default: - keys = Array.prototype.slice.call(arguments); - } - - if (!keys.length) throw new Error('keys required'); - - var actual = Object.keys(obj) - , expected = keys - , len = keys.length - , any = flag(this, 'any') - , all = flag(this, 'all'); - - if (!any && !all) { - all = true; - } - - // Has any - if (any) { - var intersection = expected.filter(function(key) { - return ~actual.indexOf(key); - }); - ok = intersection.length > 0; - } - - // Has all - if (all) { - ok = keys.every(function(key){ - return ~actual.indexOf(key); - }); - if (!flag(this, 'negate') && !flag(this, 'contains')) { - ok = ok && keys.length == actual.length; - } - } - - // Key string - if (len > 1) { - keys = keys.map(function(key){ - return _.inspect(key); - }); - var last = keys.pop(); - if (all) { - str = keys.join(', ') + ', and ' + last; - } - if (any) { - str = keys.join(', ') + ', or ' + last; - } - } else { - str = _.inspect(keys[0]); - } - - // Form - str = (len > 1 ? 'keys ' : 'key ') + str; - - // Have / include - str = (flag(this, 'contains') ? 'contain ' : 'have ') + str; - - // Assertion - this.assert( - ok - , 'expected #{this} to ' + str - , 'expected #{this} to not ' + str - , expected.slice(0).sort() - , actual.sort() - , true - ); - } - - Assertion.addMethod('keys', assertKeys); - Assertion.addMethod('key', assertKeys); - - /** - * ### .throw(constructor) - * - * Asserts that the function target will throw a specific error, or specific type of error - * (as determined using `instanceof`), optionally with a RegExp or string inclusion test - * for the error's message. - * - * var err = new ReferenceError('This is a bad function.'); - * var fn = function () { throw err; } - * expect(fn).to.throw(ReferenceError); - * expect(fn).to.throw(Error); - * expect(fn).to.throw(/bad function/); - * expect(fn).to.not.throw('good function'); - * expect(fn).to.throw(ReferenceError, /bad function/); - * expect(fn).to.throw(err); - * expect(fn).to.not.throw(new RangeError('Out of range.')); - * - * Please note that when a throw expectation is negated, it will check each - * parameter independently, starting with error constructor type. The appropriate way - * to check for the existence of a type of error but for a message that does not match - * is to use `and`. - * - * expect(fn).to.throw(ReferenceError) - * .and.not.throw(/good function/); - * - * @name throw - * @alias throws - * @alias Throw - * @param {ErrorConstructor} constructor - * @param {String|RegExp} expected error message - * @param {String} message _optional_ - * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types - * @returns error for chaining (null if no error) - * @api public - */ - - function assertThrows (constructor, errMsg, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - new Assertion(obj, msg).is.a('function'); - - var thrown = false - , desiredError = null - , name = null - , thrownError = null; - - if (arguments.length === 0) { - errMsg = null; - constructor = null; - } else if (constructor && (constructor instanceof RegExp || 'string' === typeof constructor)) { - errMsg = constructor; - constructor = null; - } else if (constructor && constructor instanceof Error) { - desiredError = constructor; - constructor = null; - errMsg = null; - } else if (typeof constructor === 'function') { - name = constructor.prototype.name || constructor.name; - if (name === 'Error' && constructor !== Error) { - name = (new constructor()).name; - } - } else { - constructor = null; - } - - try { - obj(); - } catch (err) { - // first, check desired error - if (desiredError) { - this.assert( - err === desiredError - , 'expected #{this} to throw #{exp} but #{act} was thrown' - , 'expected #{this} to not throw #{exp}' - , (desiredError instanceof Error ? desiredError.toString() : desiredError) - , (err instanceof Error ? err.toString() : err) - ); - - flag(this, 'object', err); - return this; - } - - // next, check constructor - if (constructor) { - this.assert( - err instanceof constructor - , 'expected #{this} to throw #{exp} but #{act} was thrown' - , 'expected #{this} to not throw #{exp} but #{act} was thrown' - , name - , (err instanceof Error ? err.toString() : err) - ); - - if (!errMsg) { - flag(this, 'object', err); - return this; - } - } - - // next, check message - var message = 'object' === _.type(err) && "message" in err - ? err.message - : '' + err; - - if ((message != null) && errMsg && errMsg instanceof RegExp) { - this.assert( - errMsg.exec(message) - , 'expected #{this} to throw error matching #{exp} but got #{act}' - , 'expected #{this} to throw error not matching #{exp}' - , errMsg - , message - ); - - flag(this, 'object', err); - return this; - } else if ((message != null) && errMsg && 'string' === typeof errMsg) { - this.assert( - ~message.indexOf(errMsg) - , 'expected #{this} to throw error including #{exp} but got #{act}' - , 'expected #{this} to throw error not including #{act}' - , errMsg - , message - ); - - flag(this, 'object', err); - return this; - } else { - thrown = true; - thrownError = err; - } - } - - var actuallyGot = '' - , expectedThrown = name !== null - ? name - : desiredError - ? '#{exp}' //_.inspect(desiredError) - : 'an error'; - - if (thrown) { - actuallyGot = ' but #{act} was thrown' - } - - this.assert( - thrown === true - , 'expected #{this} to throw ' + expectedThrown + actuallyGot - , 'expected #{this} to not throw ' + expectedThrown + actuallyGot - , (desiredError instanceof Error ? desiredError.toString() : desiredError) - , (thrownError instanceof Error ? thrownError.toString() : thrownError) - ); - - flag(this, 'object', thrownError); - }; - - Assertion.addMethod('throw', assertThrows); - Assertion.addMethod('throws', assertThrows); - Assertion.addMethod('Throw', assertThrows); - - /** - * ### .respondTo(method) - * - * Asserts that the object or class target will respond to a method. - * - * Klass.prototype.bar = function(){}; - * expect(Klass).to.respondTo('bar'); - * expect(obj).to.respondTo('bar'); - * - * To check if a constructor will respond to a static function, - * set the `itself` flag. - * - * Klass.baz = function(){}; - * expect(Klass).itself.to.respondTo('baz'); - * - * @name respondTo - * @param {String} method - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('respondTo', function (method, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object') - , itself = flag(this, 'itself') - , context = ('function' === _.type(obj) && !itself) - ? obj.prototype[method] - : obj[method]; - - this.assert( - 'function' === typeof context - , 'expected #{this} to respond to ' + _.inspect(method) - , 'expected #{this} to not respond to ' + _.inspect(method) - ); - }); - - /** - * ### .itself - * - * Sets the `itself` flag, later used by the `respondTo` assertion. - * - * function Foo() {} - * Foo.bar = function() {} - * Foo.prototype.baz = function() {} - * - * expect(Foo).itself.to.respondTo('bar'); - * expect(Foo).itself.not.to.respondTo('baz'); - * - * @name itself - * @api public - */ - - Assertion.addProperty('itself', function () { - flag(this, 'itself', true); - }); - - /** - * ### .satisfy(method) - * - * Asserts that the target passes a given truth test. - * - * expect(1).to.satisfy(function(num) { return num > 0; }); - * - * @name satisfy - * @param {Function} matcher - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('satisfy', function (matcher, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - var result = matcher(obj); - this.assert( - result - , 'expected #{this} to satisfy ' + _.objDisplay(matcher) - , 'expected #{this} to not satisfy' + _.objDisplay(matcher) - , this.negate ? false : true - , result - ); - }); - - /** - * ### .closeTo(expected, delta) - * - * Asserts that the target is equal `expected`, to within a +/- `delta` range. - * - * expect(1.5).to.be.closeTo(1, 0.5); - * - * @name closeTo - * @param {Number} expected - * @param {Number} delta - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('closeTo', function (expected, delta, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - - new Assertion(obj, msg).is.a('number'); - if (_.type(expected) !== 'number' || _.type(delta) !== 'number') { - throw new Error('the arguments to closeTo must be numbers'); - } - - this.assert( - Math.abs(obj - expected) <= delta - , 'expected #{this} to be close to ' + expected + ' +/- ' + delta - , 'expected #{this} not to be close to ' + expected + ' +/- ' + delta - ); - }); - - function isSubsetOf(subset, superset, cmp) { - return subset.every(function(elem) { - if (!cmp) return superset.indexOf(elem) !== -1; - - return superset.some(function(elem2) { - return cmp(elem, elem2); - }); - }) - } - - /** - * ### .members(set) - * - * Asserts that the target is a superset of `set`, - * or that the target and `set` have the same strictly-equal (===) members. - * Alternately, if the `deep` flag is set, set members are compared for deep - * equality. - * - * expect([1, 2, 3]).to.include.members([3, 2]); - * expect([1, 2, 3]).to.not.include.members([3, 2, 8]); - * - * expect([4, 2]).to.have.members([2, 4]); - * expect([5, 2]).to.not.have.members([5, 2, 1]); - * - * expect([{ id: 1 }]).to.deep.include.members([{ id: 1 }]); - * - * @name members - * @param {Array} set - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('members', function (subset, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - - new Assertion(obj).to.be.an('array'); - new Assertion(subset).to.be.an('array'); - - var cmp = flag(this, 'deep') ? _.eql : undefined; - - if (flag(this, 'contains')) { - return this.assert( - isSubsetOf(subset, obj, cmp) - , 'expected #{this} to be a superset of #{act}' - , 'expected #{this} to not be a superset of #{act}' - , obj - , subset - ); - } - - this.assert( - isSubsetOf(obj, subset, cmp) && isSubsetOf(subset, obj, cmp) - , 'expected #{this} to have the same members as #{act}' - , 'expected #{this} to not have the same members as #{act}' - , obj - , subset - ); - }); - - /** - * ### .change(function) - * - * Asserts that a function changes an object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val += 3 }; - * var noChangeFn = function() { return 'foo' + 'bar'; } - * expect(fn).to.change(obj, 'val'); - * expect(noChangFn).to.not.change(obj, 'val') - * - * @name change - * @alias changes - * @alias Change - * @param {String} object - * @param {String} property name - * @param {String} message _optional_ - * @api public - */ - - function assertChanges (object, prop, msg) { - if (msg) flag(this, 'message', msg); - var fn = flag(this, 'object'); - new Assertion(object, msg).to.have.property(prop); - new Assertion(fn).is.a('function'); - - var initial = object[prop]; - fn(); - - this.assert( - initial !== object[prop] - , 'expected .' + prop + ' to change' - , 'expected .' + prop + ' to not change' - ); - } - - Assertion.addChainableMethod('change', assertChanges); - Assertion.addChainableMethod('changes', assertChanges); - - /** - * ### .increase(function) - * - * Asserts that a function increases an object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 15 }; - * expect(fn).to.increase(obj, 'val'); - * - * @name increase - * @alias increases - * @alias Increase - * @param {String} object - * @param {String} property name - * @param {String} message _optional_ - * @api public - */ - - function assertIncreases (object, prop, msg) { - if (msg) flag(this, 'message', msg); - var fn = flag(this, 'object'); - new Assertion(object, msg).to.have.property(prop); - new Assertion(fn).is.a('function'); - - var initial = object[prop]; - fn(); - - this.assert( - object[prop] - initial > 0 - , 'expected .' + prop + ' to increase' - , 'expected .' + prop + ' to not increase' - ); - } - - Assertion.addChainableMethod('increase', assertIncreases); - Assertion.addChainableMethod('increases', assertIncreases); - - /** - * ### .decrease(function) - * - * Asserts that a function decreases an object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 5 }; - * expect(fn).to.decrease(obj, 'val'); - * - * @name decrease - * @alias decreases - * @alias Decrease - * @param {String} object - * @param {String} property name - * @param {String} message _optional_ - * @api public - */ - - function assertDecreases (object, prop, msg) { - if (msg) flag(this, 'message', msg); - var fn = flag(this, 'object'); - new Assertion(object, msg).to.have.property(prop); - new Assertion(fn).is.a('function'); - - var initial = object[prop]; - fn(); - - this.assert( - object[prop] - initial < 0 - , 'expected .' + prop + ' to decrease' - , 'expected .' + prop + ' to not decrease' - ); - } - - Assertion.addChainableMethod('decrease', assertDecreases); - Assertion.addChainableMethod('decreases', assertDecreases); - -}; - -}); - -require.register("chai/lib/chai/interface/assert.js", function (exports, module) { -/*! - * chai - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - - -module.exports = function (chai, util) { - - /*! - * Chai dependencies. - */ - - var Assertion = chai.Assertion - , flag = util.flag; - - /*! - * Module export. - */ - - /** - * ### assert(expression, message) - * - * Write your own test expressions. - * - * assert('foo' !== 'bar', 'foo is not bar'); - * assert(Array.isArray([]), 'empty arrays are arrays'); - * - * @param {Mixed} expression to test for truthiness - * @param {String} message to display on error - * @name assert - * @api public - */ - - var assert = chai.assert = function (express, errmsg) { - var test = new Assertion(null, null, chai.assert); - test.assert( - express - , errmsg - , '[ negation message unavailable ]' - ); - }; - - /** - * ### .fail(actual, expected, [message], [operator]) - * - * Throw a failure. Node.js `assert` module-compatible. - * - * @name fail - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @param {String} operator - * @api public - */ - - assert.fail = function (actual, expected, message, operator) { - message = message || 'assert.fail()'; - throw new chai.AssertionError(message, { - actual: actual - , expected: expected - , operator: operator - }, assert.fail); - }; - - /** - * ### .ok(object, [message]) - * - * Asserts that `object` is truthy. - * - * assert.ok('everything', 'everything is ok'); - * assert.ok(false, 'this will fail'); - * - * @name ok - * @param {Mixed} object to test - * @param {String} message - * @api public - */ - - assert.ok = function (val, msg) { - new Assertion(val, msg).is.ok; - }; - - /** - * ### .notOk(object, [message]) - * - * Asserts that `object` is falsy. - * - * assert.notOk('everything', 'this will fail'); - * assert.notOk(false, 'this will pass'); - * - * @name notOk - * @param {Mixed} object to test - * @param {String} message - * @api public - */ - - assert.notOk = function (val, msg) { - new Assertion(val, msg).is.not.ok; - }; - - /** - * ### .equal(actual, expected, [message]) - * - * Asserts non-strict equality (`==`) of `actual` and `expected`. - * - * assert.equal(3, '3', '== coerces values to strings'); - * - * @name equal - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @api public - */ - - assert.equal = function (act, exp, msg) { - var test = new Assertion(act, msg, assert.equal); - - test.assert( - exp == flag(test, 'object') - , 'expected #{this} to equal #{exp}' - , 'expected #{this} to not equal #{act}' - , exp - , act - ); - }; - - /** - * ### .notEqual(actual, expected, [message]) - * - * Asserts non-strict inequality (`!=`) of `actual` and `expected`. - * - * assert.notEqual(3, 4, 'these numbers are not equal'); - * - * @name notEqual - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @api public - */ - - assert.notEqual = function (act, exp, msg) { - var test = new Assertion(act, msg, assert.notEqual); - - test.assert( - exp != flag(test, 'object') - , 'expected #{this} to not equal #{exp}' - , 'expected #{this} to equal #{act}' - , exp - , act - ); - }; - - /** - * ### .strictEqual(actual, expected, [message]) - * - * Asserts strict equality (`===`) of `actual` and `expected`. - * - * assert.strictEqual(true, true, 'these booleans are strictly equal'); - * - * @name strictEqual - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @api public - */ - - assert.strictEqual = function (act, exp, msg) { - new Assertion(act, msg).to.equal(exp); - }; - - /** - * ### .notStrictEqual(actual, expected, [message]) - * - * Asserts strict inequality (`!==`) of `actual` and `expected`. - * - * assert.notStrictEqual(3, '3', 'no coercion for strict equality'); - * - * @name notStrictEqual - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @api public - */ - - assert.notStrictEqual = function (act, exp, msg) { - new Assertion(act, msg).to.not.equal(exp); - }; - - /** - * ### .deepEqual(actual, expected, [message]) - * - * Asserts that `actual` is deeply equal to `expected`. - * - * assert.deepEqual({ tea: 'green' }, { tea: 'green' }); - * - * @name deepEqual - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @api public - */ - - assert.deepEqual = function (act, exp, msg) { - new Assertion(act, msg).to.eql(exp); - }; - - /** - * ### .notDeepEqual(actual, expected, [message]) - * - * Assert that `actual` is not deeply equal to `expected`. - * - * assert.notDeepEqual({ tea: 'green' }, { tea: 'jasmine' }); - * - * @name notDeepEqual - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @api public - */ - - assert.notDeepEqual = function (act, exp, msg) { - new Assertion(act, msg).to.not.eql(exp); - }; - - /** - * ### .isTrue(value, [message]) - * - * Asserts that `value` is true. - * - * var teaServed = true; - * assert.isTrue(teaServed, 'the tea has been served'); - * - * @name isTrue - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isAbove = function (val, abv, msg) { - new Assertion(val, msg).to.be.above(abv); - }; - - /** - * ### .isAbove(valueToCheck, valueToBeAbove, [message]) - * - * Asserts `valueToCheck` is strictly greater than (>) `valueToBeAbove` - * - * assert.isAbove(5, 2, '5 is strictly greater than 2'); - * - * @name isAbove - * @param {Mixed} valueToCheck - * @param {Mixed} valueToBeAbove - * @param {String} message - * @api public - */ - - assert.isBelow = function (val, blw, msg) { - new Assertion(val, msg).to.be.below(blw); - }; - - /** - * ### .isBelow(valueToCheck, valueToBeBelow, [message]) - * - * Asserts `valueToCheck` is strictly less than (<) `valueToBeBelow` - * - * assert.isBelow(3, 6, '3 is strictly less than 6'); - * - * @name isBelow - * @param {Mixed} valueToCheck - * @param {Mixed} valueToBeBelow - * @param {String} message - * @api public - */ - - assert.isTrue = function (val, msg) { - new Assertion(val, msg).is['true']; - }; - - /** - * ### .isFalse(value, [message]) - * - * Asserts that `value` is false. - * - * var teaServed = false; - * assert.isFalse(teaServed, 'no tea yet? hmm...'); - * - * @name isFalse - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isFalse = function (val, msg) { - new Assertion(val, msg).is['false']; - }; - - /** - * ### .isNull(value, [message]) - * - * Asserts that `value` is null. - * - * assert.isNull(err, 'there was no error'); - * - * @name isNull - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNull = function (val, msg) { - new Assertion(val, msg).to.equal(null); - }; - - /** - * ### .isNotNull(value, [message]) - * - * Asserts that `value` is not null. - * - * var tea = 'tasty chai'; - * assert.isNotNull(tea, 'great, time for tea!'); - * - * @name isNotNull - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotNull = function (val, msg) { - new Assertion(val, msg).to.not.equal(null); - }; - - /** - * ### .isUndefined(value, [message]) - * - * Asserts that `value` is `undefined`. - * - * var tea; - * assert.isUndefined(tea, 'no tea defined'); - * - * @name isUndefined - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isUndefined = function (val, msg) { - new Assertion(val, msg).to.equal(undefined); - }; - - /** - * ### .isDefined(value, [message]) - * - * Asserts that `value` is not `undefined`. - * - * var tea = 'cup of chai'; - * assert.isDefined(tea, 'tea has been defined'); - * - * @name isDefined - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isDefined = function (val, msg) { - new Assertion(val, msg).to.not.equal(undefined); - }; - - /** - * ### .isFunction(value, [message]) - * - * Asserts that `value` is a function. - * - * function serveTea() { return 'cup of tea'; }; - * assert.isFunction(serveTea, 'great, we can have tea now'); - * - * @name isFunction - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isFunction = function (val, msg) { - new Assertion(val, msg).to.be.a('function'); - }; - - /** - * ### .isNotFunction(value, [message]) - * - * Asserts that `value` is _not_ a function. - * - * var serveTea = [ 'heat', 'pour', 'sip' ]; - * assert.isNotFunction(serveTea, 'great, we have listed the steps'); - * - * @name isNotFunction - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotFunction = function (val, msg) { - new Assertion(val, msg).to.not.be.a('function'); - }; - - /** - * ### .isObject(value, [message]) - * - * Asserts that `value` is an object (as revealed by - * `Object.prototype.toString`). - * - * var selection = { name: 'Chai', serve: 'with spices' }; - * assert.isObject(selection, 'tea selection is an object'); - * - * @name isObject - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isObject = function (val, msg) { - new Assertion(val, msg).to.be.a('object'); - }; - - /** - * ### .isNotObject(value, [message]) - * - * Asserts that `value` is _not_ an object. - * - * var selection = 'chai' - * assert.isNotObject(selection, 'tea selection is not an object'); - * assert.isNotObject(null, 'null is not an object'); - * - * @name isNotObject - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotObject = function (val, msg) { - new Assertion(val, msg).to.not.be.a('object'); - }; - - /** - * ### .isArray(value, [message]) - * - * Asserts that `value` is an array. - * - * var menu = [ 'green', 'chai', 'oolong' ]; - * assert.isArray(menu, 'what kind of tea do we want?'); - * - * @name isArray - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isArray = function (val, msg) { - new Assertion(val, msg).to.be.an('array'); - }; - - /** - * ### .isNotArray(value, [message]) - * - * Asserts that `value` is _not_ an array. - * - * var menu = 'green|chai|oolong'; - * assert.isNotArray(menu, 'what kind of tea do we want?'); - * - * @name isNotArray - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotArray = function (val, msg) { - new Assertion(val, msg).to.not.be.an('array'); - }; - - /** - * ### .isString(value, [message]) - * - * Asserts that `value` is a string. - * - * var teaOrder = 'chai'; - * assert.isString(teaOrder, 'order placed'); - * - * @name isString - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isString = function (val, msg) { - new Assertion(val, msg).to.be.a('string'); - }; - - /** - * ### .isNotString(value, [message]) - * - * Asserts that `value` is _not_ a string. - * - * var teaOrder = 4; - * assert.isNotString(teaOrder, 'order placed'); - * - * @name isNotString - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotString = function (val, msg) { - new Assertion(val, msg).to.not.be.a('string'); - }; - - /** - * ### .isNumber(value, [message]) - * - * Asserts that `value` is a number. - * - * var cups = 2; - * assert.isNumber(cups, 'how many cups'); - * - * @name isNumber - * @param {Number} value - * @param {String} message - * @api public - */ - - assert.isNumber = function (val, msg) { - new Assertion(val, msg).to.be.a('number'); - }; - - /** - * ### .isNotNumber(value, [message]) - * - * Asserts that `value` is _not_ a number. - * - * var cups = '2 cups please'; - * assert.isNotNumber(cups, 'how many cups'); - * - * @name isNotNumber - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotNumber = function (val, msg) { - new Assertion(val, msg).to.not.be.a('number'); - }; - - /** - * ### .isBoolean(value, [message]) - * - * Asserts that `value` is a boolean. - * - * var teaReady = true - * , teaServed = false; - * - * assert.isBoolean(teaReady, 'is the tea ready'); - * assert.isBoolean(teaServed, 'has tea been served'); - * - * @name isBoolean - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isBoolean = function (val, msg) { - new Assertion(val, msg).to.be.a('boolean'); - }; - - /** - * ### .isNotBoolean(value, [message]) - * - * Asserts that `value` is _not_ a boolean. - * - * var teaReady = 'yep' - * , teaServed = 'nope'; - * - * assert.isNotBoolean(teaReady, 'is the tea ready'); - * assert.isNotBoolean(teaServed, 'has tea been served'); - * - * @name isNotBoolean - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotBoolean = function (val, msg) { - new Assertion(val, msg).to.not.be.a('boolean'); - }; - - /** - * ### .typeOf(value, name, [message]) - * - * Asserts that `value`'s type is `name`, as determined by - * `Object.prototype.toString`. - * - * assert.typeOf({ tea: 'chai' }, 'object', 'we have an object'); - * assert.typeOf(['chai', 'jasmine'], 'array', 'we have an array'); - * assert.typeOf('tea', 'string', 'we have a string'); - * assert.typeOf(/tea/, 'regexp', 'we have a regular expression'); - * assert.typeOf(null, 'null', 'we have a null'); - * assert.typeOf(undefined, 'undefined', 'we have an undefined'); - * - * @name typeOf - * @param {Mixed} value - * @param {String} name - * @param {String} message - * @api public - */ - - assert.typeOf = function (val, type, msg) { - new Assertion(val, msg).to.be.a(type); - }; - - /** - * ### .notTypeOf(value, name, [message]) - * - * Asserts that `value`'s type is _not_ `name`, as determined by - * `Object.prototype.toString`. - * - * assert.notTypeOf('tea', 'number', 'strings are not numbers'); - * - * @name notTypeOf - * @param {Mixed} value - * @param {String} typeof name - * @param {String} message - * @api public - */ - - assert.notTypeOf = function (val, type, msg) { - new Assertion(val, msg).to.not.be.a(type); - }; - - /** - * ### .instanceOf(object, constructor, [message]) - * - * Asserts that `value` is an instance of `constructor`. - * - * var Tea = function (name) { this.name = name; } - * , chai = new Tea('chai'); - * - * assert.instanceOf(chai, Tea, 'chai is an instance of tea'); - * - * @name instanceOf - * @param {Object} object - * @param {Constructor} constructor - * @param {String} message - * @api public - */ - - assert.instanceOf = function (val, type, msg) { - new Assertion(val, msg).to.be.instanceOf(type); - }; - - /** - * ### .notInstanceOf(object, constructor, [message]) - * - * Asserts `value` is not an instance of `constructor`. - * - * var Tea = function (name) { this.name = name; } - * , chai = new String('chai'); - * - * assert.notInstanceOf(chai, Tea, 'chai is not an instance of tea'); - * - * @name notInstanceOf - * @param {Object} object - * @param {Constructor} constructor - * @param {String} message - * @api public - */ - - assert.notInstanceOf = function (val, type, msg) { - new Assertion(val, msg).to.not.be.instanceOf(type); - }; - - /** - * ### .include(haystack, needle, [message]) - * - * Asserts that `haystack` includes `needle`. Works - * for strings and arrays. - * - * assert.include('foobar', 'bar', 'foobar contains string "bar"'); - * assert.include([ 1, 2, 3 ], 3, 'array contains value'); - * - * @name include - * @param {Array|String} haystack - * @param {Mixed} needle - * @param {String} message - * @api public - */ - - assert.include = function (exp, inc, msg) { - new Assertion(exp, msg, assert.include).include(inc); - }; - - /** - * ### .notInclude(haystack, needle, [message]) - * - * Asserts that `haystack` does not include `needle`. Works - * for strings and arrays. - *i - * assert.notInclude('foobar', 'baz', 'string not include substring'); - * assert.notInclude([ 1, 2, 3 ], 4, 'array not include contain value'); - * - * @name notInclude - * @param {Array|String} haystack - * @param {Mixed} needle - * @param {String} message - * @api public - */ - - assert.notInclude = function (exp, inc, msg) { - new Assertion(exp, msg, assert.notInclude).not.include(inc); - }; - - /** - * ### .match(value, regexp, [message]) - * - * Asserts that `value` matches the regular expression `regexp`. - * - * assert.match('foobar', /^foo/, 'regexp matches'); - * - * @name match - * @param {Mixed} value - * @param {RegExp} regexp - * @param {String} message - * @api public - */ - - assert.match = function (exp, re, msg) { - new Assertion(exp, msg).to.match(re); - }; - - /** - * ### .notMatch(value, regexp, [message]) - * - * Asserts that `value` does not match the regular expression `regexp`. - * - * assert.notMatch('foobar', /^foo/, 'regexp does not match'); - * - * @name notMatch - * @param {Mixed} value - * @param {RegExp} regexp - * @param {String} message - * @api public - */ - - assert.notMatch = function (exp, re, msg) { - new Assertion(exp, msg).to.not.match(re); - }; - - /** - * ### .property(object, property, [message]) - * - * Asserts that `object` has a property named by `property`. - * - * assert.property({ tea: { green: 'matcha' }}, 'tea'); - * - * @name property - * @param {Object} object - * @param {String} property - * @param {String} message - * @api public - */ - - assert.property = function (obj, prop, msg) { - new Assertion(obj, msg).to.have.property(prop); - }; - - /** - * ### .notProperty(object, property, [message]) - * - * Asserts that `object` does _not_ have a property named by `property`. - * - * assert.notProperty({ tea: { green: 'matcha' }}, 'coffee'); - * - * @name notProperty - * @param {Object} object - * @param {String} property - * @param {String} message - * @api public - */ - - assert.notProperty = function (obj, prop, msg) { - new Assertion(obj, msg).to.not.have.property(prop); - }; - - /** - * ### .deepProperty(object, property, [message]) - * - * Asserts that `object` has a property named by `property`, which can be a - * string using dot- and bracket-notation for deep reference. - * - * assert.deepProperty({ tea: { green: 'matcha' }}, 'tea.green'); - * - * @name deepProperty - * @param {Object} object - * @param {String} property - * @param {String} message - * @api public - */ - - assert.deepProperty = function (obj, prop, msg) { - new Assertion(obj, msg).to.have.deep.property(prop); - }; - - /** - * ### .notDeepProperty(object, property, [message]) - * - * Asserts that `object` does _not_ have a property named by `property`, which - * can be a string using dot- and bracket-notation for deep reference. - * - * assert.notDeepProperty({ tea: { green: 'matcha' }}, 'tea.oolong'); - * - * @name notDeepProperty - * @param {Object} object - * @param {String} property - * @param {String} message - * @api public - */ - - assert.notDeepProperty = function (obj, prop, msg) { - new Assertion(obj, msg).to.not.have.deep.property(prop); - }; - - /** - * ### .propertyVal(object, property, value, [message]) - * - * Asserts that `object` has a property named by `property` with value given - * by `value`. - * - * assert.propertyVal({ tea: 'is good' }, 'tea', 'is good'); - * - * @name propertyVal - * @param {Object} object - * @param {String} property - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.propertyVal = function (obj, prop, val, msg) { - new Assertion(obj, msg).to.have.property(prop, val); - }; - - /** - * ### .propertyNotVal(object, property, value, [message]) - * - * Asserts that `object` has a property named by `property`, but with a value - * different from that given by `value`. - * - * assert.propertyNotVal({ tea: 'is good' }, 'tea', 'is bad'); - * - * @name propertyNotVal - * @param {Object} object - * @param {String} property - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.propertyNotVal = function (obj, prop, val, msg) { - new Assertion(obj, msg).to.not.have.property(prop, val); - }; - - /** - * ### .deepPropertyVal(object, property, value, [message]) - * - * Asserts that `object` has a property named by `property` with value given - * by `value`. `property` can use dot- and bracket-notation for deep - * reference. - * - * assert.deepPropertyVal({ tea: { green: 'matcha' }}, 'tea.green', 'matcha'); - * - * @name deepPropertyVal - * @param {Object} object - * @param {String} property - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.deepPropertyVal = function (obj, prop, val, msg) { - new Assertion(obj, msg).to.have.deep.property(prop, val); - }; - - /** - * ### .deepPropertyNotVal(object, property, value, [message]) - * - * Asserts that `object` has a property named by `property`, but with a value - * different from that given by `value`. `property` can use dot- and - * bracket-notation for deep reference. - * - * assert.deepPropertyNotVal({ tea: { green: 'matcha' }}, 'tea.green', 'konacha'); - * - * @name deepPropertyNotVal - * @param {Object} object - * @param {String} property - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.deepPropertyNotVal = function (obj, prop, val, msg) { - new Assertion(obj, msg).to.not.have.deep.property(prop, val); - }; - - /** - * ### .lengthOf(object, length, [message]) - * - * Asserts that `object` has a `length` property with the expected value. - * - * assert.lengthOf([1,2,3], 3, 'array has length of 3'); - * assert.lengthOf('foobar', 5, 'string has length of 6'); - * - * @name lengthOf - * @param {Mixed} object - * @param {Number} length - * @param {String} message - * @api public - */ - - assert.lengthOf = function (exp, len, msg) { - new Assertion(exp, msg).to.have.length(len); - }; - - /** - * ### .throws(function, [constructor/string/regexp], [string/regexp], [message]) - * - * Asserts that `function` will throw an error that is an instance of - * `constructor`, or alternately that it will throw an error with message - * matching `regexp`. - * - * assert.throw(fn, 'function throws a reference error'); - * assert.throw(fn, /function throws a reference error/); - * assert.throw(fn, ReferenceError); - * assert.throw(fn, ReferenceError, 'function throws a reference error'); - * assert.throw(fn, ReferenceError, /function throws a reference error/); - * - * @name throws - * @alias throw - * @alias Throw - * @param {Function} function - * @param {ErrorConstructor} constructor - * @param {RegExp} regexp - * @param {String} message - * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types - * @api public - */ - - assert.Throw = function (fn, errt, errs, msg) { - if ('string' === typeof errt || errt instanceof RegExp) { - errs = errt; - errt = null; - } - - var assertErr = new Assertion(fn, msg).to.Throw(errt, errs); - return flag(assertErr, 'object'); - }; - - /** - * ### .doesNotThrow(function, [constructor/regexp], [message]) - * - * Asserts that `function` will _not_ throw an error that is an instance of - * `constructor`, or alternately that it will not throw an error with message - * matching `regexp`. - * - * assert.doesNotThrow(fn, Error, 'function does not throw'); - * - * @name doesNotThrow - * @param {Function} function - * @param {ErrorConstructor} constructor - * @param {RegExp} regexp - * @param {String} message - * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types - * @api public - */ - - assert.doesNotThrow = function (fn, type, msg) { - if ('string' === typeof type) { - msg = type; - type = null; - } - - new Assertion(fn, msg).to.not.Throw(type); - }; - - /** - * ### .operator(val1, operator, val2, [message]) - * - * Compares two values using `operator`. - * - * assert.operator(1, '<', 2, 'everything is ok'); - * assert.operator(1, '>', 2, 'this will fail'); - * - * @name operator - * @param {Mixed} val1 - * @param {String} operator - * @param {Mixed} val2 - * @param {String} message - * @api public - */ - - assert.operator = function (val, operator, val2, msg) { - var ok; - switch(operator) { - case '==': - ok = val == val2; - break; - case '===': - ok = val === val2; - break; - case '>': - ok = val > val2; - break; - case '>=': - ok = val >= val2; - break; - case '<': - ok = val < val2; - break; - case '<=': - ok = val <= val2; - break; - case '!=': - ok = val != val2; - break; - case '!==': - ok = val !== val2; - break; - default: - throw new Error('Invalid operator "' + operator + '"'); - } - var test = new Assertion(ok, msg); - test.assert( - true === flag(test, 'object') - , 'expected ' + util.inspect(val) + ' to be ' + operator + ' ' + util.inspect(val2) - , 'expected ' + util.inspect(val) + ' to not be ' + operator + ' ' + util.inspect(val2) ); - }; - - /** - * ### .closeTo(actual, expected, delta, [message]) - * - * Asserts that the target is equal `expected`, to within a +/- `delta` range. - * - * assert.closeTo(1.5, 1, 0.5, 'numbers are close'); - * - * @name closeTo - * @param {Number} actual - * @param {Number} expected - * @param {Number} delta - * @param {String} message - * @api public - */ - - assert.closeTo = function (act, exp, delta, msg) { - new Assertion(act, msg).to.be.closeTo(exp, delta); - }; - - /** - * ### .sameMembers(set1, set2, [message]) - * - * Asserts that `set1` and `set2` have the same members. - * Order is not taken into account. - * - * assert.sameMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'same members'); - * - * @name sameMembers - * @param {Array} set1 - * @param {Array} set2 - * @param {String} message - * @api public - */ - - assert.sameMembers = function (set1, set2, msg) { - new Assertion(set1, msg).to.have.same.members(set2); - } - - /** - * ### .sameDeepMembers(set1, set2, [message]) - * - * Asserts that `set1` and `set2` have the same members - using a deep equality checking. - * Order is not taken into account. - * - * assert.sameDeepMembers([ {b: 3}, {a: 2}, {c: 5} ], [ {c: 5}, {b: 3}, {a: 2} ], 'same deep members'); - * - * @name sameDeepMembers - * @param {Array} set1 - * @param {Array} set2 - * @param {String} message - * @api public - */ - - assert.sameDeepMembers = function (set1, set2, msg) { - new Assertion(set1, msg).to.have.same.deep.members(set2); - } - - /** - * ### .includeMembers(superset, subset, [message]) - * - * Asserts that `subset` is included in `superset`. - * Order is not taken into account. - * - * assert.includeMembers([ 1, 2, 3 ], [ 2, 1 ], 'include members'); - * - * @name includeMembers - * @param {Array} superset - * @param {Array} subset - * @param {String} message - * @api public - */ - - assert.includeMembers = function (superset, subset, msg) { - new Assertion(superset, msg).to.include.members(subset); - } - - /** - * ### .changes(function, object, property) - * - * Asserts that a function changes the value of a property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 22 }; - * assert.changes(fn, obj, 'val'); - * - * @name changes - * @param {Function} modifier function - * @param {Object} object - * @param {String} property name - * @param {String} message _optional_ - * @api public - */ - - assert.changes = function (fn, obj, prop) { - new Assertion(fn).to.change(obj, prop); - } - - /** - * ### .doesNotChange(function, object, property) - * - * Asserts that a function does not changes the value of a property - * - * var obj = { val: 10 }; - * var fn = function() { console.log('foo'); }; - * assert.doesNotChange(fn, obj, 'val'); - * - * @name doesNotChange - * @param {Function} modifier function - * @param {Object} object - * @param {String} property name - * @param {String} message _optional_ - * @api public - */ - - assert.doesNotChange = function (fn, obj, prop) { - new Assertion(fn).to.not.change(obj, prop); - } - - /** - * ### .increases(function, object, property) - * - * Asserts that a function increases an object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 13 }; - * assert.increases(fn, obj, 'val'); - * - * @name increases - * @param {Function} modifier function - * @param {Object} object - * @param {String} property name - * @param {String} message _optional_ - * @api public - */ - - assert.increases = function (fn, obj, prop) { - new Assertion(fn).to.increase(obj, prop); - } - - /** - * ### .doesNotIncrease(function, object, property) - * - * Asserts that a function does not increase object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 8 }; - * assert.doesNotIncrease(fn, obj, 'val'); - * - * @name doesNotIncrease - * @param {Function} modifier function - * @param {Object} object - * @param {String} property name - * @param {String} message _optional_ - * @api public - */ - - assert.doesNotIncrease = function (fn, obj, prop) { - new Assertion(fn).to.not.increase(obj, prop); - } - - /** - * ### .decreases(function, object, property) - * - * Asserts that a function decreases an object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 5 }; - * assert.decreases(fn, obj, 'val'); - * - * @name decreases - * @param {Function} modifier function - * @param {Object} object - * @param {String} property name - * @param {String} message _optional_ - * @api public - */ - - assert.decreases = function (fn, obj, prop) { - new Assertion(fn).to.decrease(obj, prop); - } - - /** - * ### .doesNotDecrease(function, object, property) - * - * Asserts that a function does not decreases an object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 15 }; - * assert.doesNotDecrease(fn, obj, 'val'); - * - * @name doesNotDecrease - * @param {Function} modifier function - * @param {Object} object - * @param {String} property name - * @param {String} message _optional_ - * @api public - */ - - assert.doesNotDecrease = function (fn, obj, prop) { - new Assertion(fn).to.not.decrease(obj, prop); - } - - /*! - * Undocumented / untested - */ - - assert.ifError = function (val, msg) { - new Assertion(val, msg).to.not.be.ok; - }; - - /*! - * Aliases. - */ - - (function alias(name, as){ - assert[as] = assert[name]; - return alias; - }) - ('Throw', 'throw') - ('Throw', 'throws'); -}; - -}); - -require.register("chai/lib/chai/interface/expect.js", function (exports, module) { -/*! - * chai - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - -module.exports = function (chai, util) { - chai.expect = function (val, message) { - return new chai.Assertion(val, message); - }; - - /** - * ### .fail(actual, expected, [message], [operator]) - * - * Throw a failure. - * - * @name fail - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @param {String} operator - * @api public - */ - - chai.expect.fail = function (actual, expected, message, operator) { - message = message || 'expect.fail()'; - throw new chai.AssertionError(message, { - actual: actual - , expected: expected - , operator: operator - }, chai.expect.fail); - }; -}; - -}); - -require.register("chai/lib/chai/interface/should.js", function (exports, module) { -/*! - * chai - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - -module.exports = function (chai, util) { - var Assertion = chai.Assertion; - - function loadShould () { - // explicitly define this method as function as to have it's name to include as `ssfi` - function shouldGetter() { - if (this instanceof String || this instanceof Number || this instanceof Boolean ) { - return new Assertion(this.valueOf(), null, shouldGetter); - } - return new Assertion(this, null, shouldGetter); - } - function shouldSetter(value) { - // See https://github.com/chaijs/chai/issues/86: this makes - // `whatever.should = someValue` actually set `someValue`, which is - // especially useful for `global.should = require('chai').should()`. - // - // Note that we have to use [[DefineProperty]] instead of [[Put]] - // since otherwise we would trigger this very setter! - Object.defineProperty(this, 'should', { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } - // modify Object.prototype to have `should` - Object.defineProperty(Object.prototype, 'should', { - set: shouldSetter - , get: shouldGetter - , configurable: true - }); - - var should = {}; - - /** - * ### .fail(actual, expected, [message], [operator]) - * - * Throw a failure. - * - * @name fail - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @param {String} operator - * @api public - */ - - should.fail = function (actual, expected, message, operator) { - message = message || 'should.fail()'; - throw new chai.AssertionError(message, { - actual: actual - , expected: expected - , operator: operator - }, should.fail); - }; - - should.equal = function (val1, val2, msg) { - new Assertion(val1, msg).to.equal(val2); - }; - - should.Throw = function (fn, errt, errs, msg) { - new Assertion(fn, msg).to.Throw(errt, errs); - }; - - should.exist = function (val, msg) { - new Assertion(val, msg).to.exist; - } - - // negation - should.not = {} - - should.not.equal = function (val1, val2, msg) { - new Assertion(val1, msg).to.not.equal(val2); - }; - - should.not.Throw = function (fn, errt, errs, msg) { - new Assertion(fn, msg).to.not.Throw(errt, errs); - }; - - should.not.exist = function (val, msg) { - new Assertion(val, msg).to.not.exist; - } - - should['throw'] = should['Throw']; - should.not['throw'] = should.not['Throw']; - - return should; - }; - - chai.should = loadShould; - chai.Should = loadShould; -}; - -}); - -require.register("chai/lib/chai/utils/addChainableMethod.js", function (exports, module) { -/*! - * Chai - addChainingMethod utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/*! - * Module dependencies - */ - -var transferFlags = require('chai/lib/chai/utils/transferFlags.js'); -var flag = require('chai/lib/chai/utils/flag.js'); -var config = require('chai/lib/chai/config.js'); - -/*! - * Module variables - */ - -// Check whether `__proto__` is supported -var hasProtoSupport = '__proto__' in Object; - -// Without `__proto__` support, this module will need to add properties to a function. -// However, some Function.prototype methods cannot be overwritten, -// and there seems no easy cross-platform way to detect them (@see chaijs/chai/issues/69). -var excludeNames = /^(?:length|name|arguments|caller)$/; - -// Cache `Function` properties -var call = Function.prototype.call, - apply = Function.prototype.apply; - -/** - * ### addChainableMethod (ctx, name, method, chainingBehavior) - * - * Adds a method to an object, such that the method can also be chained. - * - * utils.addChainableMethod(chai.Assertion.prototype, 'foo', function (str) { - * var obj = utils.flag(this, 'object'); - * new chai.Assertion(obj).to.be.equal(str); - * }); - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.addChainableMethod('foo', fn, chainingBehavior); - * - * The result can then be used as both a method assertion, executing both `method` and - * `chainingBehavior`, or as a language chain, which only executes `chainingBehavior`. - * - * expect(fooStr).to.be.foo('bar'); - * expect(fooStr).to.be.foo.equal('foo'); - * - * @param {Object} ctx object to which the method is added - * @param {String} name of method to add - * @param {Function} method function to be used for `name`, when called - * @param {Function} chainingBehavior function to be called every time the property is accessed - * @name addChainableMethod - * @api public - */ - -module.exports = function (ctx, name, method, chainingBehavior) { - if (typeof chainingBehavior !== 'function') { - chainingBehavior = function () { }; - } - - var chainableBehavior = { - method: method - , chainingBehavior: chainingBehavior - }; - - // save the methods so we can overwrite them later, if we need to. - if (!ctx.__methods) { - ctx.__methods = {}; - } - ctx.__methods[name] = chainableBehavior; - - Object.defineProperty(ctx, name, - { get: function () { - chainableBehavior.chainingBehavior.call(this); - - var assert = function assert() { - var old_ssfi = flag(this, 'ssfi'); - if (old_ssfi && config.includeStack === false) - flag(this, 'ssfi', assert); - var result = chainableBehavior.method.apply(this, arguments); - return result === undefined ? this : result; - }; - - // Use `__proto__` if available - if (hasProtoSupport) { - // Inherit all properties from the object by replacing the `Function` prototype - var prototype = assert.__proto__ = Object.create(this); - // Restore the `call` and `apply` methods from `Function` - prototype.call = call; - prototype.apply = apply; - } - // Otherwise, redefine all properties (slow!) - else { - var asserterNames = Object.getOwnPropertyNames(ctx); - asserterNames.forEach(function (asserterName) { - if (!excludeNames.test(asserterName)) { - var pd = Object.getOwnPropertyDescriptor(ctx, asserterName); - Object.defineProperty(assert, asserterName, pd); - } - }); - } - - transferFlags(this, assert); - return assert; - } - , configurable: true - }); -}; - -}); - -require.register("chai/lib/chai/utils/addMethod.js", function (exports, module) { -/*! - * Chai - addMethod utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -var config = require('chai/lib/chai/config.js'); - -/** - * ### .addMethod (ctx, name, method) - * - * Adds a method to the prototype of an object. - * - * utils.addMethod(chai.Assertion.prototype, 'foo', function (str) { - * var obj = utils.flag(this, 'object'); - * new chai.Assertion(obj).to.be.equal(str); - * }); - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.addMethod('foo', fn); - * - * Then can be used as any other assertion. - * - * expect(fooStr).to.be.foo('bar'); - * - * @param {Object} ctx object to which the method is added - * @param {String} name of method to add - * @param {Function} method function to be used for name - * @name addMethod - * @api public - */ -var flag = require('chai/lib/chai/utils/flag.js'); - -module.exports = function (ctx, name, method) { - ctx[name] = function () { - var old_ssfi = flag(this, 'ssfi'); - if (old_ssfi && config.includeStack === false) - flag(this, 'ssfi', ctx[name]); - var result = method.apply(this, arguments); - return result === undefined ? this : result; - }; -}; - -}); - -require.register("chai/lib/chai/utils/addProperty.js", function (exports, module) { -/*! - * Chai - addProperty utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### addProperty (ctx, name, getter) - * - * Adds a property to the prototype of an object. - * - * utils.addProperty(chai.Assertion.prototype, 'foo', function () { - * var obj = utils.flag(this, 'object'); - * new chai.Assertion(obj).to.be.instanceof(Foo); - * }); - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.addProperty('foo', fn); - * - * Then can be used as any other assertion. - * - * expect(myFoo).to.be.foo; - * - * @param {Object} ctx object to which the property is added - * @param {String} name of property to add - * @param {Function} getter function to be used for name - * @name addProperty - * @api public - */ - -module.exports = function (ctx, name, getter) { - Object.defineProperty(ctx, name, - { get: function () { - var result = getter.call(this); - return result === undefined ? this : result; - } - , configurable: true - }); -}; - -}); - -require.register("chai/lib/chai/utils/flag.js", function (exports, module) { -/*! - * Chai - flag utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### flag(object, key, [value]) - * - * Get or set a flag value on an object. If a - * value is provided it will be set, else it will - * return the currently set value or `undefined` if - * the value is not set. - * - * utils.flag(this, 'foo', 'bar'); // setter - * utils.flag(this, 'foo'); // getter, returns `bar` - * - * @param {Object} object constructed Assertion - * @param {String} key - * @param {Mixed} value (optional) - * @name flag - * @api private - */ - -module.exports = function (obj, key, value) { - var flags = obj.__flags || (obj.__flags = Object.create(null)); - if (arguments.length === 3) { - flags[key] = value; - } else { - return flags[key]; - } -}; - -}); - -require.register("chai/lib/chai/utils/getActual.js", function (exports, module) { -/*! - * Chai - getActual utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * # getActual(object, [actual]) - * - * Returns the `actual` value for an Assertion - * - * @param {Object} object (constructed Assertion) - * @param {Arguments} chai.Assertion.prototype.assert arguments - */ - -module.exports = function (obj, args) { - return args.length > 4 ? args[4] : obj._obj; -}; - -}); - -require.register("chai/lib/chai/utils/getEnumerableProperties.js", function (exports, module) { -/*! - * Chai - getEnumerableProperties utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### .getEnumerableProperties(object) - * - * This allows the retrieval of enumerable property names of an object, - * inherited or not. - * - * @param {Object} object - * @returns {Array} - * @name getEnumerableProperties - * @api public - */ - -module.exports = function getEnumerableProperties(object) { - var result = []; - for (var name in object) { - result.push(name); - } - return result; -}; - -}); - -require.register("chai/lib/chai/utils/getMessage.js", function (exports, module) { -/*! - * Chai - message composition utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/*! - * Module dependancies - */ - -var flag = require('chai/lib/chai/utils/flag.js') - , getActual = require('chai/lib/chai/utils/getActual.js') - , inspect = require('chai/lib/chai/utils/inspect.js') - , objDisplay = require('chai/lib/chai/utils/objDisplay.js'); - -/** - * ### .getMessage(object, message, negateMessage) - * - * Construct the error message based on flags - * and template tags. Template tags will return - * a stringified inspection of the object referenced. - * - * Message template tags: - * - `#{this}` current asserted object - * - `#{act}` actual value - * - `#{exp}` expected value - * - * @param {Object} object (constructed Assertion) - * @param {Arguments} chai.Assertion.prototype.assert arguments - * @name getMessage - * @api public - */ - -module.exports = function (obj, args) { - var negate = flag(obj, 'negate') - , val = flag(obj, 'object') - , expected = args[3] - , actual = getActual(obj, args) - , msg = negate ? args[2] : args[1] - , flagMsg = flag(obj, 'message'); - - if(typeof msg === "function") msg = msg(); - msg = msg || ''; - msg = msg - .replace(/#{this}/g, objDisplay(val)) - .replace(/#{act}/g, objDisplay(actual)) - .replace(/#{exp}/g, objDisplay(expected)); - - return flagMsg ? flagMsg + ': ' + msg : msg; -}; - -}); - -require.register("chai/lib/chai/utils/getName.js", function (exports, module) { -/*! - * Chai - getName utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * # getName(func) - * - * Gets the name of a function, in a cross-browser way. - * - * @param {Function} a function (usually a constructor) - */ - -module.exports = function (func) { - if (func.name) return func.name; - - var match = /^\s?function ([^(]*)\(/.exec(func); - return match && match[1] ? match[1] : ""; -}; - -}); - -require.register("chai/lib/chai/utils/getPathValue.js", function (exports, module) { -/*! - * Chai - getPathValue utility - * Copyright(c) 2012-2014 Jake Luer - * @see https://github.com/logicalparadox/filtr - * MIT Licensed - */ - -var getPathInfo = require('chai/lib/chai/utils/getPathInfo.js'); - -/** - * ### .getPathValue(path, object) - * - * This allows the retrieval of values in an - * object given a string path. - * - * var obj = { - * prop1: { - * arr: ['a', 'b', 'c'] - * , str: 'Hello' - * } - * , prop2: { - * arr: [ { nested: 'Universe' } ] - * , str: 'Hello again!' - * } - * } - * - * The following would be the results. - * - * getPathValue('prop1.str', obj); // Hello - * getPathValue('prop1.att[2]', obj); // b - * getPathValue('prop2.arr[0].nested', obj); // Universe - * - * @param {String} path - * @param {Object} object - * @returns {Object} value or `undefined` - * @name getPathValue - * @api public - */ -module.exports = function(path, obj) { - var info = getPathInfo(path, obj); - return info.value; -}; - -}); - -require.register("chai/lib/chai/utils/getPathInfo.js", function (exports, module) { -/*! - * Chai - getPathInfo utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -var hasProperty = require('chai/lib/chai/utils/hasProperty.js'); - -/** - * ### .getPathInfo(path, object) - * - * This allows the retrieval of property info in an - * object given a string path. - * - * The path info consists of an object with the - * following properties: - * - * * parent - The parent object of the property referenced by `path` - * * name - The name of the final property, a number if it was an array indexer - * * value - The value of the property, if it exists, otherwise `undefined` - * * exists - Whether the property exists or not - * - * @param {String} path - * @param {Object} object - * @returns {Object} info - * @name getPathInfo - * @api public - */ - -module.exports = function getPathInfo(path, obj) { - var parsed = parsePath(path), - last = parsed[parsed.length - 1]; - - var info = { - parent: parsed.length > 1 ? _getPathValue(parsed, obj, parsed.length - 1) : obj, - name: last.p || last.i, - value: _getPathValue(parsed, obj), - }; - info.exists = hasProperty(info.name, info.parent); - - return info; -}; - - -/*! - * ## parsePath(path) - * - * Helper function used to parse string object - * paths. Use in conjunction with `_getPathValue`. - * - * var parsed = parsePath('myobject.property.subprop'); - * - * ### Paths: - * - * * Can be as near infinitely deep and nested - * * Arrays are also valid using the formal `myobject.document[3].property`. - * * Literal dots and brackets (not delimiter) must be backslash-escaped. - * - * @param {String} path - * @returns {Object} parsed - * @api private - */ - -function parsePath (path) { - var str = path.replace(/([^\\])\[/g, '$1.[') - , parts = str.match(/(\\\.|[^.]+?)+/g); - return parts.map(function (value) { - var re = /^\[(\d+)\]$/ - , mArr = re.exec(value); - if (mArr) return { i: parseFloat(mArr[1]) }; - else return { p: value.replace(/\\([.\[\]])/g, '$1') }; - }); -} - - -/*! - * ## _getPathValue(parsed, obj) - * - * Helper companion function for `.parsePath` that returns - * the value located at the parsed address. - * - * var value = getPathValue(parsed, obj); - * - * @param {Object} parsed definition from `parsePath`. - * @param {Object} object to search against - * @param {Number} object to search against - * @returns {Object|Undefined} value - * @api private - */ - -function _getPathValue (parsed, obj, index) { - var tmp = obj - , res; - - index = (index === undefined ? parsed.length : index); - - for (var i = 0, l = index; i < l; i++) { - var part = parsed[i]; - if (tmp) { - if ('undefined' !== typeof part.p) - tmp = tmp[part.p]; - else if ('undefined' !== typeof part.i) - tmp = tmp[part.i]; - if (i == (l - 1)) res = tmp; - } else { - res = undefined; - } - } - return res; -} - -}); - -require.register("chai/lib/chai/utils/hasProperty.js", function (exports, module) { -/*! - * Chai - hasProperty utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -var type = require('chai/lib/chai/utils/type.js'); - -/** - * ### .hasProperty(object, name) - * - * This allows checking whether an object has - * named property or numeric array index. - * - * Basically does the same thing as the `in` - * operator but works properly with natives - * and null/undefined values. - * - * var obj = { - * arr: ['a', 'b', 'c'] - * , str: 'Hello' - * } - * - * The following would be the results. - * - * hasProperty('str', obj); // true - * hasProperty('constructor', obj); // true - * hasProperty('bar', obj); // false - * - * hasProperty('length', obj.str); // true - * hasProperty(1, obj.str); // true - * hasProperty(5, obj.str); // false - * - * hasProperty('length', obj.arr); // true - * hasProperty(2, obj.arr); // true - * hasProperty(3, obj.arr); // false - * - * @param {Objuect} object - * @param {String|Number} name - * @returns {Boolean} whether it exists - * @name getPathInfo - * @api public - */ - -var literals = { - 'number': Number - , 'string': String -}; - -module.exports = function hasProperty(name, obj) { - var ot = type(obj); - - // Bad Object, obviously no props at all - if(ot === 'null' || ot === 'undefined') - return false; - - // The `in` operator does not work with certain literals - // box these before the check - if(literals[ot] && typeof obj !== 'object') - obj = new literals[ot](obj); - - return name in obj; -}; - -}); - -require.register("chai/lib/chai/utils/getProperties.js", function (exports, module) { -/*! - * Chai - getProperties utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### .getProperties(object) - * - * This allows the retrieval of property names of an object, enumerable or not, - * inherited or not. - * - * @param {Object} object - * @returns {Array} - * @name getProperties - * @api public - */ - -module.exports = function getProperties(object) { - var result = Object.getOwnPropertyNames(subject); - - function addProperty(property) { - if (result.indexOf(property) === -1) { - result.push(property); - } - } - - var proto = Object.getPrototypeOf(subject); - while (proto !== null) { - Object.getOwnPropertyNames(proto).forEach(addProperty); - proto = Object.getPrototypeOf(proto); - } - - return result; -}; - -}); - -require.register("chai/lib/chai/utils/index.js", function (exports, module) { -/*! - * chai - * Copyright(c) 2011 Jake Luer - * MIT Licensed - */ - -/*! - * Main exports - */ - -var exports = module.exports = {}; - -/*! - * test utility - */ - -exports.test = require('chai/lib/chai/utils/test.js'); - -/*! - * type utility - */ - -exports.type = require('chai/lib/chai/utils/type.js'); - -/*! - * message utility - */ - -exports.getMessage = require('chai/lib/chai/utils/getMessage.js'); - -/*! - * actual utility - */ - -exports.getActual = require('chai/lib/chai/utils/getActual.js'); - -/*! - * Inspect util - */ - -exports.inspect = require('chai/lib/chai/utils/inspect.js'); - -/*! - * Object Display util - */ - -exports.objDisplay = require('chai/lib/chai/utils/objDisplay.js'); - -/*! - * Flag utility - */ - -exports.flag = require('chai/lib/chai/utils/flag.js'); - -/*! - * Flag transferring utility - */ - -exports.transferFlags = require('chai/lib/chai/utils/transferFlags.js'); - -/*! - * Deep equal utility - */ - -exports.eql = require('chaijs~deep-eql@0.1.3'); - -/*! - * Deep path value - */ - -exports.getPathValue = require('chai/lib/chai/utils/getPathValue.js'); - -/*! - * Deep path info - */ - -exports.getPathInfo = require('chai/lib/chai/utils/getPathInfo.js'); - -/*! - * Check if a property exists - */ - -exports.hasProperty = require('chai/lib/chai/utils/hasProperty.js'); - -/*! - * Function name - */ - -exports.getName = require('chai/lib/chai/utils/getName.js'); - -/*! - * add Property - */ - -exports.addProperty = require('chai/lib/chai/utils/addProperty.js'); - -/*! - * add Method - */ - -exports.addMethod = require('chai/lib/chai/utils/addMethod.js'); - -/*! - * overwrite Property - */ - -exports.overwriteProperty = require('chai/lib/chai/utils/overwriteProperty.js'); - -/*! - * overwrite Method - */ - -exports.overwriteMethod = require('chai/lib/chai/utils/overwriteMethod.js'); - -/*! - * Add a chainable method - */ - -exports.addChainableMethod = require('chai/lib/chai/utils/addChainableMethod.js'); - -/*! - * Overwrite chainable method - */ - -exports.overwriteChainableMethod = require('chai/lib/chai/utils/overwriteChainableMethod.js'); - - -}); - -require.register("chai/lib/chai/utils/inspect.js", function (exports, module) { -// This is (almost) directly from Node.js utils -// https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js - -var getName = require('chai/lib/chai/utils/getName.js'); -var getProperties = require('chai/lib/chai/utils/getProperties.js'); -var getEnumerableProperties = require('chai/lib/chai/utils/getEnumerableProperties.js'); - -module.exports = inspect; - -/** - * Echos the value of a value. Trys to print the value out - * in the best way possible given the different types. - * - * @param {Object} obj The object to print out. - * @param {Boolean} showHidden Flag that shows hidden (not enumerable) - * properties of objects. - * @param {Number} depth Depth in which to descend in object. Default is 2. - * @param {Boolean} colors Flag to turn on ANSI escape codes to color the - * output. Default is false (no coloring). - */ -function inspect(obj, showHidden, depth, colors) { - var ctx = { - showHidden: showHidden, - seen: [], - stylize: function (str) { return str; } - }; - return formatValue(ctx, obj, (typeof depth === 'undefined' ? 2 : depth)); -} - -// Returns true if object is a DOM element. -var isDOMElement = function (object) { - if (typeof HTMLElement === 'object') { - return object instanceof HTMLElement; - } else { - return object && - typeof object === 'object' && - object.nodeType === 1 && - typeof object.nodeName === 'string'; - } -}; - -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (value && typeof value.inspect === 'function' && - // Filter out the util module, it's inspect function is special - value.inspect !== exports.inspect && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes); - if (typeof ret !== 'string') { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // If this is a DOM element, try to get the outer HTML. - if (isDOMElement(value)) { - if ('outerHTML' in value) { - return value.outerHTML; - // This value does not have an outerHTML attribute, - // it could still be an XML element - } else { - // Attempt to serialize it - try { - if (document.xmlVersion) { - var xmlSerializer = new XMLSerializer(); - return xmlSerializer.serializeToString(value); - } else { - // Firefox 11- do not support outerHTML - // It does, however, support innerHTML - // Use the following to render the element - var ns = "http://www.w3.org/1999/xhtml"; - var container = document.createElementNS(ns, '_'); - - container.appendChild(value.cloneNode(false)); - html = container.innerHTML - .replace('><', '>' + value.innerHTML + '<'); - container.innerHTML = ''; - return html; - } - } catch (err) { - // This could be a non-native DOM implementation, - // continue with the normal flow: - // printing the element as if it is an object. - } - } - } - - // Look up the keys of the object. - var visibleKeys = getEnumerableProperties(value); - var keys = ctx.showHidden ? getProperties(value) : visibleKeys; - - // Some type of object without properties can be shortcutted. - // In IE, errors have a single `stack` property, or if they are vanilla `Error`, - // a `stack` plus `description` property; ignore those for consistency. - if (keys.length === 0 || (isError(value) && ( - (keys.length === 1 && keys[0] === 'stack') || - (keys.length === 2 && keys[0] === 'description' && keys[1] === 'stack') - ))) { - if (typeof value === 'function') { - var name = getName(value); - var nameSuffix = name ? ': ' + name : ''; - return ctx.stylize('[Function' + nameSuffix + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toUTCString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (typeof value === 'function') { - var name = getName(value); - var nameSuffix = name ? ': ' + name : ''; - base = ' [Function' + nameSuffix + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - return formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - switch (typeof value) { - case 'undefined': - return ctx.stylize('undefined', 'undefined'); - - case 'string': - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - - case 'number': - if (value === 0 && (1/value) === -Infinity) { - return ctx.stylize('-0', 'number'); - } - return ctx.stylize('' + value, 'number'); - - case 'boolean': - return ctx.stylize('' + value, 'boolean'); - } - // For some reason typeof null is "object", so special case here. - if (value === null) { - return ctx.stylize('null', 'null'); - } -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (Object.prototype.hasOwnProperty.call(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str; - if (value.__lookupGetter__) { - if (value.__lookupGetter__(key)) { - if (value.__lookupSetter__(key)) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (value.__lookupSetter__(key)) { - str = ctx.stylize('[Setter]', 'special'); - } - } - } - if (visibleKeys.indexOf(key) < 0) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(value[key]) < 0) { - if (recurseTimes === null) { - str = formatValue(ctx, value[key], null); - } else { - str = formatValue(ctx, value[key], recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (typeof name === 'undefined') { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - -function isArray(ar) { - return Array.isArray(ar) || - (typeof ar === 'object' && objectToString(ar) === '[object Array]'); -} - -function isRegExp(re) { - return typeof re === 'object' && objectToString(re) === '[object RegExp]'; -} - -function isDate(d) { - return typeof d === 'object' && objectToString(d) === '[object Date]'; -} - -function isError(e) { - return typeof e === 'object' && objectToString(e) === '[object Error]'; -} - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - -}); - -require.register("chai/lib/chai/utils/objDisplay.js", function (exports, module) { -/*! - * Chai - flag utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/*! - * Module dependancies - */ - -var inspect = require('chai/lib/chai/utils/inspect.js'); -var config = require('chai/lib/chai/config.js'); - -/** - * ### .objDisplay (object) - * - * Determines if an object or an array matches - * criteria to be inspected in-line for error - * messages or should be truncated. - * - * @param {Mixed} javascript object to inspect - * @name objDisplay - * @api public - */ - -module.exports = function (obj) { - var str = inspect(obj) - , type = Object.prototype.toString.call(obj); - - if (config.truncateThreshold && str.length >= config.truncateThreshold) { - if (type === '[object Function]') { - return !obj.name || obj.name === '' - ? '[Function]' - : '[Function: ' + obj.name + ']'; - } else if (type === '[object Array]') { - return '[ Array(' + obj.length + ') ]'; - } else if (type === '[object Object]') { - var keys = Object.keys(obj) - , kstr = keys.length > 2 - ? keys.splice(0, 2).join(', ') + ', ...' - : keys.join(', '); - return '{ Object (' + kstr + ') }'; - } else { - return str; - } - } else { - return str; - } -}; - -}); - -require.register("chai/lib/chai/utils/overwriteMethod.js", function (exports, module) { -/*! - * Chai - overwriteMethod utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### overwriteMethod (ctx, name, fn) - * - * Overwites an already existing method and provides - * access to previous function. Must return function - * to be used for name. - * - * utils.overwriteMethod(chai.Assertion.prototype, 'equal', function (_super) { - * return function (str) { - * var obj = utils.flag(this, 'object'); - * if (obj instanceof Foo) { - * new chai.Assertion(obj.value).to.equal(str); - * } else { - * _super.apply(this, arguments); - * } - * } - * }); - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.overwriteMethod('foo', fn); - * - * Then can be used as any other assertion. - * - * expect(myFoo).to.equal('bar'); - * - * @param {Object} ctx object whose method is to be overwritten - * @param {String} name of method to overwrite - * @param {Function} method function that returns a function to be used for name - * @name overwriteMethod - * @api public - */ - -module.exports = function (ctx, name, method) { - var _method = ctx[name] - , _super = function () { return this; }; - - if (_method && 'function' === typeof _method) - _super = _method; - - ctx[name] = function () { - var result = method(_super).apply(this, arguments); - return result === undefined ? this : result; - } -}; - -}); - -require.register("chai/lib/chai/utils/overwriteProperty.js", function (exports, module) { -/*! - * Chai - overwriteProperty utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### overwriteProperty (ctx, name, fn) - * - * Overwites an already existing property getter and provides - * access to previous value. Must return function to use as getter. - * - * utils.overwriteProperty(chai.Assertion.prototype, 'ok', function (_super) { - * return function () { - * var obj = utils.flag(this, 'object'); - * if (obj instanceof Foo) { - * new chai.Assertion(obj.name).to.equal('bar'); - * } else { - * _super.call(this); - * } - * } - * }); - * - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.overwriteProperty('foo', fn); - * - * Then can be used as any other assertion. - * - * expect(myFoo).to.be.ok; - * - * @param {Object} ctx object whose property is to be overwritten - * @param {String} name of property to overwrite - * @param {Function} getter function that returns a getter function to be used for name - * @name overwriteProperty - * @api public - */ - -module.exports = function (ctx, name, getter) { - var _get = Object.getOwnPropertyDescriptor(ctx, name) - , _super = function () {}; - - if (_get && 'function' === typeof _get.get) - _super = _get.get - - Object.defineProperty(ctx, name, - { get: function () { - var result = getter(_super).call(this); - return result === undefined ? this : result; - } - , configurable: true - }); -}; - -}); - -require.register("chai/lib/chai/utils/overwriteChainableMethod.js", function (exports, module) { -/*! - * Chai - overwriteChainableMethod utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### overwriteChainableMethod (ctx, name, method, chainingBehavior) - * - * Overwites an already existing chainable method - * and provides access to the previous function or - * property. Must return functions to be used for - * name. - * - * utils.overwriteChainableMethod(chai.Assertion.prototype, 'length', - * function (_super) { - * } - * , function (_super) { - * } - * ); - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.overwriteChainableMethod('foo', fn, fn); - * - * Then can be used as any other assertion. - * - * expect(myFoo).to.have.length(3); - * expect(myFoo).to.have.length.above(3); - * - * @param {Object} ctx object whose method / property is to be overwritten - * @param {String} name of method / property to overwrite - * @param {Function} method function that returns a function to be used for name - * @param {Function} chainingBehavior function that returns a function to be used for property - * @name overwriteChainableMethod - * @api public - */ - -module.exports = function (ctx, name, method, chainingBehavior) { - var chainableBehavior = ctx.__methods[name]; - - var _chainingBehavior = chainableBehavior.chainingBehavior; - chainableBehavior.chainingBehavior = function () { - var result = chainingBehavior(_chainingBehavior).call(this); - return result === undefined ? this : result; - }; - - var _method = chainableBehavior.method; - chainableBehavior.method = function () { - var result = method(_method).apply(this, arguments); - return result === undefined ? this : result; - }; -}; - -}); - -require.register("chai/lib/chai/utils/test.js", function (exports, module) { -/*! - * Chai - test utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/*! - * Module dependancies - */ - -var flag = require('chai/lib/chai/utils/flag.js'); - -/** - * # test(object, expression) - * - * Test and object for expression. - * - * @param {Object} object (constructed Assertion) - * @param {Arguments} chai.Assertion.prototype.assert arguments - */ - -module.exports = function (obj, args) { - var negate = flag(obj, 'negate') - , expr = args[0]; - return negate ? !expr : expr; -}; - -}); - -require.register("chai/lib/chai/utils/transferFlags.js", function (exports, module) { -/*! - * Chai - transferFlags utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### transferFlags(assertion, object, includeAll = true) - * - * Transfer all the flags for `assertion` to `object`. If - * `includeAll` is set to `false`, then the base Chai - * assertion flags (namely `object`, `ssfi`, and `message`) - * will not be transferred. - * - * - * var newAssertion = new Assertion(); - * utils.transferFlags(assertion, newAssertion); - * - * var anotherAsseriton = new Assertion(myObj); - * utils.transferFlags(assertion, anotherAssertion, false); - * - * @param {Assertion} assertion the assertion to transfer the flags from - * @param {Object} object the object to transfer the flags to; usually a new assertion - * @param {Boolean} includeAll - * @name transferFlags - * @api private - */ - -module.exports = function (assertion, object, includeAll) { - var flags = assertion.__flags || (assertion.__flags = Object.create(null)); - - if (!object.__flags) { - object.__flags = Object.create(null); - } - - includeAll = arguments.length === 3 ? includeAll : true; - - for (var flag in flags) { - if (includeAll || - (flag !== 'object' && flag !== 'ssfi' && flag != 'message')) { - object.__flags[flag] = flags[flag]; - } - } -}; - -}); - -require.register("chai/lib/chai/utils/type.js", function (exports, module) { -/*! - * Chai - type utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/*! - * Detectable javascript natives - */ - -var natives = { - '[object Arguments]': 'arguments' - , '[object Array]': 'array' - , '[object Date]': 'date' - , '[object Function]': 'function' - , '[object Number]': 'number' - , '[object RegExp]': 'regexp' - , '[object String]': 'string' -}; - -/** - * ### type(object) - * - * Better implementation of `typeof` detection that can - * be used cross-browser. Handles the inconsistencies of - * Array, `null`, and `undefined` detection. - * - * utils.type({}) // 'object' - * utils.type(null) // `null' - * utils.type(undefined) // `undefined` - * utils.type([]) // `array` - * - * @param {Mixed} object to detect type of - * @name type - * @api private - */ - -module.exports = function (obj) { - var str = Object.prototype.toString.call(obj); - if (natives[str]) return natives[str]; - if (obj === null) return 'null'; - if (obj === undefined) return 'undefined'; - if (obj === Object(obj)) return 'object'; - return typeof obj; -}; - -}); - -if (typeof exports == "object") { - module.exports = require("chai"); -} else if (typeof define == "function" && define.amd) { - define("chai", [], function(){ return require("chai"); }); -} else { - (this || window)["chai"] = require("chai"); -} -})() diff --git a/cli/node_modules/chai/index.js b/cli/node_modules/chai/index.js deleted file mode 100644 index 634483b02..000000000 --- a/cli/node_modules/chai/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/chai'); diff --git a/cli/node_modules/chai/karma.conf.js b/cli/node_modules/chai/karma.conf.js deleted file mode 100644 index b0dfe6aea..000000000 --- a/cli/node_modules/chai/karma.conf.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = function(config) { - config.set({ - frameworks: [ 'mocha' ] - , files: [ - 'build/build.js' - , 'test/bootstrap/karma.js' - , 'test/*.js' - ] - , reporters: [ 'progress' ] - , colors: true - , logLevel: config.LOG_INFO - , autoWatch: false - , browsers: [ 'PhantomJS' ] - , browserDisconnectTimeout: 10000 - , browserDisconnectTolerance: 2 - , browserNoActivityTimeout: 20000 - , singleRun: true - }); - - switch (process.env.CHAI_TEST_ENV) { - case 'sauce': - require('./karma.sauce')(config); - break; - default: - // ... - break; - }; -}; diff --git a/cli/node_modules/chai/karma.sauce.js b/cli/node_modules/chai/karma.sauce.js deleted file mode 100644 index e57d5e0db..000000000 --- a/cli/node_modules/chai/karma.sauce.js +++ /dev/null @@ -1,41 +0,0 @@ -var version = require('./package.json').version; -var ts = new Date().getTime(); - -module.exports = function(config) { - var auth; - - try { - auth = require('./test/auth/index'); - } catch(ex) { - auth = {}; - auth.SAUCE_USERNAME = process.env.SAUCE_USERNAME || null; - auth.SAUCE_ACCESS_KEY = process.env.SAUCE_ACCESS_KEY || null; - } - - if (!auth.SAUCE_USERNAME || !auth.SAUCE_ACCESS_KEY) return; - if (process.env.SKIP_SAUCE) return; - - var branch = process.env.TRAVIS_BRANCH || 'local' - var browserConfig = require('./sauce.browsers'); - var browsers = Object.keys(browserConfig); - var tags = [ 'chaijs_' + version, auth.SAUCE_USERNAME + '@' + branch ]; - var tunnel = process.env.TRAVIS_JOB_NUMBER || ts; - - if (process.env.TRAVIS_JOB_NUMBER) { - tags.push('travis@' + process.env.TRAVIS_JOB_NUMBER); - } - - config.browsers = config.browsers.concat(browsers); - config.customLaunchers = browserConfig; - config.reporters.push('saucelabs'); - config.transports = [ 'xhr-polling' ]; - - config.sauceLabs = { - username: auth.SAUCE_USERNAME - , accessKey: auth.SAUCE_ACCESS_KEY - , startConnect: true - , tags: tags - , testName: 'ChaiJS' - , tunnelIdentifier: tunnel - }; -}; diff --git a/cli/node_modules/chai/lib/chai.js b/cli/node_modules/chai/lib/chai.js deleted file mode 100644 index ecaf3eb4f..000000000 --- a/cli/node_modules/chai/lib/chai.js +++ /dev/null @@ -1,93 +0,0 @@ -/*! - * chai - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - -var used = [] - , exports = module.exports = {}; - -/*! - * Chai version - */ - -exports.version = '2.3.0'; - -/*! - * Assertion Error - */ - -exports.AssertionError = require('assertion-error'); - -/*! - * Utils for plugins (not exported) - */ - -var util = require('./chai/utils'); - -/** - * # .use(function) - * - * Provides a way to extend the internals of Chai - * - * @param {Function} - * @returns {this} for chaining - * @api public - */ - -exports.use = function (fn) { - if (!~used.indexOf(fn)) { - fn(this, util); - used.push(fn); - } - - return this; -}; - -/*! - * Utility Functions - */ - -exports.util = util; - -/*! - * Configuration - */ - -var config = require('./chai/config'); -exports.config = config; - -/*! - * Primary `Assertion` prototype - */ - -var assertion = require('./chai/assertion'); -exports.use(assertion); - -/*! - * Core Assertions - */ - -var core = require('./chai/core/assertions'); -exports.use(core); - -/*! - * Expect interface - */ - -var expect = require('./chai/interface/expect'); -exports.use(expect); - -/*! - * Should interface - */ - -var should = require('./chai/interface/should'); -exports.use(should); - -/*! - * Assert interface - */ - -var assert = require('./chai/interface/assert'); -exports.use(assert); diff --git a/cli/node_modules/chai/lib/chai/assertion.js b/cli/node_modules/chai/lib/chai/assertion.js deleted file mode 100644 index 24c9fc16d..000000000 --- a/cli/node_modules/chai/lib/chai/assertion.js +++ /dev/null @@ -1,131 +0,0 @@ -/*! - * chai - * http://chaijs.com - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - -var config = require('./config'); - -module.exports = function (_chai, util) { - /*! - * Module dependencies. - */ - - var AssertionError = _chai.AssertionError - , flag = util.flag; - - /*! - * Module export. - */ - - _chai.Assertion = Assertion; - - /*! - * Assertion Constructor - * - * Creates object for chaining. - * - * @api private - */ - - function Assertion (obj, msg, stack) { - flag(this, 'ssfi', stack || arguments.callee); - flag(this, 'object', obj); - flag(this, 'message', msg); - } - - Object.defineProperty(Assertion, 'includeStack', { - get: function() { - console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.'); - return config.includeStack; - }, - set: function(value) { - console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.'); - config.includeStack = value; - } - }); - - Object.defineProperty(Assertion, 'showDiff', { - get: function() { - console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.'); - return config.showDiff; - }, - set: function(value) { - console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.'); - config.showDiff = value; - } - }); - - Assertion.addProperty = function (name, fn) { - util.addProperty(this.prototype, name, fn); - }; - - Assertion.addMethod = function (name, fn) { - util.addMethod(this.prototype, name, fn); - }; - - Assertion.addChainableMethod = function (name, fn, chainingBehavior) { - util.addChainableMethod(this.prototype, name, fn, chainingBehavior); - }; - - Assertion.overwriteProperty = function (name, fn) { - util.overwriteProperty(this.prototype, name, fn); - }; - - Assertion.overwriteMethod = function (name, fn) { - util.overwriteMethod(this.prototype, name, fn); - }; - - Assertion.overwriteChainableMethod = function (name, fn, chainingBehavior) { - util.overwriteChainableMethod(this.prototype, name, fn, chainingBehavior); - }; - - /*! - * ### .assert(expression, message, negateMessage, expected, actual) - * - * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass. - * - * @name assert - * @param {Philosophical} expression to be tested - * @param {String or Function} message or function that returns message to display if expression fails - * @param {String or Function} negatedMessage or function that returns negatedMessage to display if negated expression fails - * @param {Mixed} expected value (remember to check for negation) - * @param {Mixed} actual (optional) will default to `this.obj` - * @param {Boolean} showDiff (optional) when set to `true`, assert will display a diff in addition to the message if expression fails - * @api private - */ - - Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual, showDiff) { - var ok = util.test(this, arguments); - if (true !== showDiff) showDiff = false; - if (true !== config.showDiff) showDiff = false; - - if (!ok) { - var msg = util.getMessage(this, arguments) - , actual = util.getActual(this, arguments); - throw new AssertionError(msg, { - actual: actual - , expected: expected - , showDiff: showDiff - }, (config.includeStack) ? this.assert : flag(this, 'ssfi')); - } - }; - - /*! - * ### ._obj - * - * Quick reference to stored `actual` value for plugin developers. - * - * @api private - */ - - Object.defineProperty(Assertion.prototype, '_obj', - { get: function () { - return flag(this, 'object'); - } - , set: function (val) { - flag(this, 'object', val); - } - }); -}; diff --git a/cli/node_modules/chai/lib/chai/config.js b/cli/node_modules/chai/lib/chai/config.js deleted file mode 100644 index e6f38fff2..000000000 --- a/cli/node_modules/chai/lib/chai/config.js +++ /dev/null @@ -1,55 +0,0 @@ -module.exports = { - - /** - * ### config.includeStack - * - * User configurable property, influences whether stack trace - * is included in Assertion error message. Default of false - * suppresses stack trace in the error message. - * - * chai.config.includeStack = true; // enable stack on error - * - * @param {Boolean} - * @api public - */ - - includeStack: false, - - /** - * ### config.showDiff - * - * User configurable property, influences whether or not - * the `showDiff` flag should be included in the thrown - * AssertionErrors. `false` will always be `false`; `true` - * will be true when the assertion has requested a diff - * be shown. - * - * @param {Boolean} - * @api public - */ - - showDiff: true, - - /** - * ### config.truncateThreshold - * - * User configurable property, sets length threshold for actual and - * expected values in assertion errors. If this threshold is exceeded, for - * example for large data structures, the value is replaced with something - * like `[ Array(3) ]` or `{ Object (prop1, prop2) }`. - * - * Set it to zero if you want to disable truncating altogether. - * - * This is especially userful when doing assertions on arrays: having this - * set to a reasonable large value makes the failure messages readily - * inspectable. - * - * chai.config.truncateThreshold = 0; // disable truncating - * - * @param {Number} - * @api public - */ - - truncateThreshold: 40 - -}; diff --git a/cli/node_modules/chai/lib/chai/core/assertions.js b/cli/node_modules/chai/lib/chai/core/assertions.js deleted file mode 100644 index c398ab8e2..000000000 --- a/cli/node_modules/chai/lib/chai/core/assertions.js +++ /dev/null @@ -1,1601 +0,0 @@ -/*! - * chai - * http://chaijs.com - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - -module.exports = function (chai, _) { - var Assertion = chai.Assertion - , toString = Object.prototype.toString - , flag = _.flag; - - /** - * ### Language Chains - * - * The following are provided as chainable getters to - * improve the readability of your assertions. They - * do not provide testing capabilities unless they - * have been overwritten by a plugin. - * - * **Chains** - * - * - to - * - be - * - been - * - is - * - that - * - which - * - and - * - has - * - have - * - with - * - at - * - of - * - same - * - * @name language chains - * @api public - */ - - [ 'to', 'be', 'been' - , 'is', 'and', 'has', 'have' - , 'with', 'that', 'which', 'at' - , 'of', 'same' ].forEach(function (chain) { - Assertion.addProperty(chain, function () { - return this; - }); - }); - - /** - * ### .not - * - * Negates any of assertions following in the chain. - * - * expect(foo).to.not.equal('bar'); - * expect(goodFn).to.not.throw(Error); - * expect({ foo: 'baz' }).to.have.property('foo') - * .and.not.equal('bar'); - * - * @name not - * @api public - */ - - Assertion.addProperty('not', function () { - flag(this, 'negate', true); - }); - - /** - * ### .deep - * - * Sets the `deep` flag, later used by the `equal` and - * `property` assertions. - * - * expect(foo).to.deep.equal({ bar: 'baz' }); - * expect({ foo: { bar: { baz: 'quux' } } }) - * .to.have.deep.property('foo.bar.baz', 'quux'); - * - * `.deep.property` special characters can be escaped - * by adding two slashes before the `.` or `[]`. - * - * var deepCss = { '.link': { '[target]': 42 }}; - * expect(deepCss).to.have.deep.property('\\.link.\\[target\\]', 42); - * - * @name deep - * @api public - */ - - Assertion.addProperty('deep', function () { - flag(this, 'deep', true); - }); - - /** - * ### .any - * - * Sets the `any` flag, (opposite of the `all` flag) - * later used in the `keys` assertion. - * - * expect(foo).to.have.any.keys('bar', 'baz'); - * - * @name any - * @api public - */ - - Assertion.addProperty('any', function () { - flag(this, 'any', true); - flag(this, 'all', false) - }); - - - /** - * ### .all - * - * Sets the `all` flag (opposite of the `any` flag) - * later used by the `keys` assertion. - * - * expect(foo).to.have.all.keys('bar', 'baz'); - * - * @name all - * @api public - */ - - Assertion.addProperty('all', function () { - flag(this, 'all', true); - flag(this, 'any', false); - }); - - /** - * ### .a(type) - * - * The `a` and `an` assertions are aliases that can be - * used either as language chains or to assert a value's - * type. - * - * // typeof - * expect('test').to.be.a('string'); - * expect({ foo: 'bar' }).to.be.an('object'); - * expect(null).to.be.a('null'); - * expect(undefined).to.be.an('undefined'); - * - * // language chain - * expect(foo).to.be.an.instanceof(Foo); - * - * @name a - * @alias an - * @param {String} type - * @param {String} message _optional_ - * @api public - */ - - function an (type, msg) { - if (msg) flag(this, 'message', msg); - type = type.toLowerCase(); - var obj = flag(this, 'object') - , article = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(type.charAt(0)) ? 'an ' : 'a '; - - this.assert( - type === _.type(obj) - , 'expected #{this} to be ' + article + type - , 'expected #{this} not to be ' + article + type - ); - } - - Assertion.addChainableMethod('an', an); - Assertion.addChainableMethod('a', an); - - /** - * ### .include(value) - * - * The `include` and `contain` assertions can be used as either property - * based language chains or as methods to assert the inclusion of an object - * in an array or a substring in a string. When used as language chains, - * they toggle the `contains` flag for the `keys` assertion. - * - * expect([1,2,3]).to.include(2); - * expect('foobar').to.contain('foo'); - * expect({ foo: 'bar', hello: 'universe' }).to.include.keys('foo'); - * - * @name include - * @alias contain - * @alias includes - * @alias contains - * @param {Object|String|Number} obj - * @param {String} message _optional_ - * @api public - */ - - function includeChainingBehavior () { - flag(this, 'contains', true); - } - - function include (val, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - var expected = false; - if (_.type(obj) === 'array' && _.type(val) === 'object') { - for (var i in obj) { - if (_.eql(obj[i], val)) { - expected = true; - break; - } - } - } else if (_.type(val) === 'object') { - if (!flag(this, 'negate')) { - for (var k in val) new Assertion(obj).property(k, val[k]); - return; - } - var subset = {}; - for (var k in val) subset[k] = obj[k]; - expected = _.eql(subset, val); - } else { - expected = obj && ~obj.indexOf(val); - } - this.assert( - expected - , 'expected #{this} to include ' + _.inspect(val) - , 'expected #{this} to not include ' + _.inspect(val)); - } - - Assertion.addChainableMethod('include', include, includeChainingBehavior); - Assertion.addChainableMethod('contain', include, includeChainingBehavior); - Assertion.addChainableMethod('contains', include, includeChainingBehavior); - Assertion.addChainableMethod('includes', include, includeChainingBehavior); - - /** - * ### .ok - * - * Asserts that the target is truthy. - * - * expect('everthing').to.be.ok; - * expect(1).to.be.ok; - * expect(false).to.not.be.ok; - * expect(undefined).to.not.be.ok; - * expect(null).to.not.be.ok; - * - * @name ok - * @api public - */ - - Assertion.addProperty('ok', function () { - this.assert( - flag(this, 'object') - , 'expected #{this} to be truthy' - , 'expected #{this} to be falsy'); - }); - - /** - * ### .true - * - * Asserts that the target is `true`. - * - * expect(true).to.be.true; - * expect(1).to.not.be.true; - * - * @name true - * @api public - */ - - Assertion.addProperty('true', function () { - this.assert( - true === flag(this, 'object') - , 'expected #{this} to be true' - , 'expected #{this} to be false' - , this.negate ? false : true - ); - }); - - /** - * ### .false - * - * Asserts that the target is `false`. - * - * expect(false).to.be.false; - * expect(0).to.not.be.false; - * - * @name false - * @api public - */ - - Assertion.addProperty('false', function () { - this.assert( - false === flag(this, 'object') - , 'expected #{this} to be false' - , 'expected #{this} to be true' - , this.negate ? true : false - ); - }); - - /** - * ### .null - * - * Asserts that the target is `null`. - * - * expect(null).to.be.null; - * expect(undefined).to.not.be.null; - * - * @name null - * @api public - */ - - Assertion.addProperty('null', function () { - this.assert( - null === flag(this, 'object') - , 'expected #{this} to be null' - , 'expected #{this} not to be null' - ); - }); - - /** - * ### .undefined - * - * Asserts that the target is `undefined`. - * - * expect(undefined).to.be.undefined; - * expect(null).to.not.be.undefined; - * - * @name undefined - * @api public - */ - - Assertion.addProperty('undefined', function () { - this.assert( - undefined === flag(this, 'object') - , 'expected #{this} to be undefined' - , 'expected #{this} not to be undefined' - ); - }); - - /** - * ### .exist - * - * Asserts that the target is neither `null` nor `undefined`. - * - * var foo = 'hi' - * , bar = null - * , baz; - * - * expect(foo).to.exist; - * expect(bar).to.not.exist; - * expect(baz).to.not.exist; - * - * @name exist - * @api public - */ - - Assertion.addProperty('exist', function () { - this.assert( - null != flag(this, 'object') - , 'expected #{this} to exist' - , 'expected #{this} to not exist' - ); - }); - - - /** - * ### .empty - * - * Asserts that the target's length is `0`. For arrays and strings, it checks - * the `length` property. For objects, it gets the count of - * enumerable keys. - * - * expect([]).to.be.empty; - * expect('').to.be.empty; - * expect({}).to.be.empty; - * - * @name empty - * @api public - */ - - Assertion.addProperty('empty', function () { - var obj = flag(this, 'object') - , expected = obj; - - if (Array.isArray(obj) || 'string' === typeof object) { - expected = obj.length; - } else if (typeof obj === 'object') { - expected = Object.keys(obj).length; - } - - this.assert( - !expected - , 'expected #{this} to be empty' - , 'expected #{this} not to be empty' - ); - }); - - /** - * ### .arguments - * - * Asserts that the target is an arguments object. - * - * function test () { - * expect(arguments).to.be.arguments; - * } - * - * @name arguments - * @alias Arguments - * @api public - */ - - function checkArguments () { - var obj = flag(this, 'object') - , type = Object.prototype.toString.call(obj); - this.assert( - '[object Arguments]' === type - , 'expected #{this} to be arguments but got ' + type - , 'expected #{this} to not be arguments' - ); - } - - Assertion.addProperty('arguments', checkArguments); - Assertion.addProperty('Arguments', checkArguments); - - /** - * ### .equal(value) - * - * Asserts that the target is strictly equal (`===`) to `value`. - * Alternately, if the `deep` flag is set, asserts that - * the target is deeply equal to `value`. - * - * expect('hello').to.equal('hello'); - * expect(42).to.equal(42); - * expect(1).to.not.equal(true); - * expect({ foo: 'bar' }).to.not.equal({ foo: 'bar' }); - * expect({ foo: 'bar' }).to.deep.equal({ foo: 'bar' }); - * - * @name equal - * @alias equals - * @alias eq - * @alias deep.equal - * @param {Mixed} value - * @param {String} message _optional_ - * @api public - */ - - function assertEqual (val, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - if (flag(this, 'deep')) { - return this.eql(val); - } else { - this.assert( - val === obj - , 'expected #{this} to equal #{exp}' - , 'expected #{this} to not equal #{exp}' - , val - , this._obj - , true - ); - } - } - - Assertion.addMethod('equal', assertEqual); - Assertion.addMethod('equals', assertEqual); - Assertion.addMethod('eq', assertEqual); - - /** - * ### .eql(value) - * - * Asserts that the target is deeply equal to `value`. - * - * expect({ foo: 'bar' }).to.eql({ foo: 'bar' }); - * expect([ 1, 2, 3 ]).to.eql([ 1, 2, 3 ]); - * - * @name eql - * @alias eqls - * @param {Mixed} value - * @param {String} message _optional_ - * @api public - */ - - function assertEql(obj, msg) { - if (msg) flag(this, 'message', msg); - this.assert( - _.eql(obj, flag(this, 'object')) - , 'expected #{this} to deeply equal #{exp}' - , 'expected #{this} to not deeply equal #{exp}' - , obj - , this._obj - , true - ); - } - - Assertion.addMethod('eql', assertEql); - Assertion.addMethod('eqls', assertEql); - - /** - * ### .above(value) - * - * Asserts that the target is greater than `value`. - * - * expect(10).to.be.above(5); - * - * Can also be used in conjunction with `length` to - * assert a minimum length. The benefit being a - * more informative error message than if the length - * was supplied directly. - * - * expect('foo').to.have.length.above(2); - * expect([ 1, 2, 3 ]).to.have.length.above(2); - * - * @name above - * @alias gt - * @alias greaterThan - * @param {Number} value - * @param {String} message _optional_ - * @api public - */ - - function assertAbove (n, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - if (flag(this, 'doLength')) { - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - this.assert( - len > n - , 'expected #{this} to have a length above #{exp} but got #{act}' - , 'expected #{this} to not have a length above #{exp}' - , n - , len - ); - } else { - this.assert( - obj > n - , 'expected #{this} to be above ' + n - , 'expected #{this} to be at most ' + n - ); - } - } - - Assertion.addMethod('above', assertAbove); - Assertion.addMethod('gt', assertAbove); - Assertion.addMethod('greaterThan', assertAbove); - - /** - * ### .least(value) - * - * Asserts that the target is greater than or equal to `value`. - * - * expect(10).to.be.at.least(10); - * - * Can also be used in conjunction with `length` to - * assert a minimum length. The benefit being a - * more informative error message than if the length - * was supplied directly. - * - * expect('foo').to.have.length.of.at.least(2); - * expect([ 1, 2, 3 ]).to.have.length.of.at.least(3); - * - * @name least - * @alias gte - * @param {Number} value - * @param {String} message _optional_ - * @api public - */ - - function assertLeast (n, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - if (flag(this, 'doLength')) { - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - this.assert( - len >= n - , 'expected #{this} to have a length at least #{exp} but got #{act}' - , 'expected #{this} to have a length below #{exp}' - , n - , len - ); - } else { - this.assert( - obj >= n - , 'expected #{this} to be at least ' + n - , 'expected #{this} to be below ' + n - ); - } - } - - Assertion.addMethod('least', assertLeast); - Assertion.addMethod('gte', assertLeast); - - /** - * ### .below(value) - * - * Asserts that the target is less than `value`. - * - * expect(5).to.be.below(10); - * - * Can also be used in conjunction with `length` to - * assert a maximum length. The benefit being a - * more informative error message than if the length - * was supplied directly. - * - * expect('foo').to.have.length.below(4); - * expect([ 1, 2, 3 ]).to.have.length.below(4); - * - * @name below - * @alias lt - * @alias lessThan - * @param {Number} value - * @param {String} message _optional_ - * @api public - */ - - function assertBelow (n, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - if (flag(this, 'doLength')) { - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - this.assert( - len < n - , 'expected #{this} to have a length below #{exp} but got #{act}' - , 'expected #{this} to not have a length below #{exp}' - , n - , len - ); - } else { - this.assert( - obj < n - , 'expected #{this} to be below ' + n - , 'expected #{this} to be at least ' + n - ); - } - } - - Assertion.addMethod('below', assertBelow); - Assertion.addMethod('lt', assertBelow); - Assertion.addMethod('lessThan', assertBelow); - - /** - * ### .most(value) - * - * Asserts that the target is less than or equal to `value`. - * - * expect(5).to.be.at.most(5); - * - * Can also be used in conjunction with `length` to - * assert a maximum length. The benefit being a - * more informative error message than if the length - * was supplied directly. - * - * expect('foo').to.have.length.of.at.most(4); - * expect([ 1, 2, 3 ]).to.have.length.of.at.most(3); - * - * @name most - * @alias lte - * @param {Number} value - * @param {String} message _optional_ - * @api public - */ - - function assertMost (n, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - if (flag(this, 'doLength')) { - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - this.assert( - len <= n - , 'expected #{this} to have a length at most #{exp} but got #{act}' - , 'expected #{this} to have a length above #{exp}' - , n - , len - ); - } else { - this.assert( - obj <= n - , 'expected #{this} to be at most ' + n - , 'expected #{this} to be above ' + n - ); - } - } - - Assertion.addMethod('most', assertMost); - Assertion.addMethod('lte', assertMost); - - /** - * ### .within(start, finish) - * - * Asserts that the target is within a range. - * - * expect(7).to.be.within(5,10); - * - * Can also be used in conjunction with `length` to - * assert a length range. The benefit being a - * more informative error message than if the length - * was supplied directly. - * - * expect('foo').to.have.length.within(2,4); - * expect([ 1, 2, 3 ]).to.have.length.within(2,4); - * - * @name within - * @param {Number} start lowerbound inclusive - * @param {Number} finish upperbound inclusive - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('within', function (start, finish, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object') - , range = start + '..' + finish; - if (flag(this, 'doLength')) { - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - this.assert( - len >= start && len <= finish - , 'expected #{this} to have a length within ' + range - , 'expected #{this} to not have a length within ' + range - ); - } else { - this.assert( - obj >= start && obj <= finish - , 'expected #{this} to be within ' + range - , 'expected #{this} to not be within ' + range - ); - } - }); - - /** - * ### .instanceof(constructor) - * - * Asserts that the target is an instance of `constructor`. - * - * var Tea = function (name) { this.name = name; } - * , Chai = new Tea('chai'); - * - * expect(Chai).to.be.an.instanceof(Tea); - * expect([ 1, 2, 3 ]).to.be.instanceof(Array); - * - * @name instanceof - * @param {Constructor} constructor - * @param {String} message _optional_ - * @alias instanceOf - * @api public - */ - - function assertInstanceOf (constructor, msg) { - if (msg) flag(this, 'message', msg); - var name = _.getName(constructor); - this.assert( - flag(this, 'object') instanceof constructor - , 'expected #{this} to be an instance of ' + name - , 'expected #{this} to not be an instance of ' + name - ); - }; - - Assertion.addMethod('instanceof', assertInstanceOf); - Assertion.addMethod('instanceOf', assertInstanceOf); - - /** - * ### .property(name, [value]) - * - * Asserts that the target has a property `name`, optionally asserting that - * the value of that property is strictly equal to `value`. - * If the `deep` flag is set, you can use dot- and bracket-notation for deep - * references into objects and arrays. - * - * // simple referencing - * var obj = { foo: 'bar' }; - * expect(obj).to.have.property('foo'); - * expect(obj).to.have.property('foo', 'bar'); - * - * // deep referencing - * var deepObj = { - * green: { tea: 'matcha' } - * , teas: [ 'chai', 'matcha', { tea: 'konacha' } ] - * }; - * - * expect(deepObj).to.have.deep.property('green.tea', 'matcha'); - * expect(deepObj).to.have.deep.property('teas[1]', 'matcha'); - * expect(deepObj).to.have.deep.property('teas[2].tea', 'konacha'); - * - * You can also use an array as the starting point of a `deep.property` - * assertion, or traverse nested arrays. - * - * var arr = [ - * [ 'chai', 'matcha', 'konacha' ] - * , [ { tea: 'chai' } - * , { tea: 'matcha' } - * , { tea: 'konacha' } ] - * ]; - * - * expect(arr).to.have.deep.property('[0][1]', 'matcha'); - * expect(arr).to.have.deep.property('[1][2].tea', 'konacha'); - * - * Furthermore, `property` changes the subject of the assertion - * to be the value of that property from the original object. This - * permits for further chainable assertions on that property. - * - * expect(obj).to.have.property('foo') - * .that.is.a('string'); - * expect(deepObj).to.have.property('green') - * .that.is.an('object') - * .that.deep.equals({ tea: 'matcha' }); - * expect(deepObj).to.have.property('teas') - * .that.is.an('array') - * .with.deep.property('[2]') - * .that.deep.equals({ tea: 'konacha' }); - * - * Note that dots and bracket in `name` must be backslash-escaped when - * the `deep` flag is set, while they must NOT be escaped when the `deep` - * flag is not set. - * - * // simple referencing - * var css = { '.link[target]': 42 }; - * expect(css).to.have.property('.link[target]', 42); - * - * // deep referencing - * var deepCss = { '.link': { '[target]': 42 }}; - * expect(deepCss).to.have.deep.property('\\.link.\\[target\\]', 42); - * - * @name property - * @alias deep.property - * @param {String} name - * @param {Mixed} value (optional) - * @param {String} message _optional_ - * @returns value of property for chaining - * @api public - */ - - Assertion.addMethod('property', function (name, val, msg) { - if (msg) flag(this, 'message', msg); - - var isDeep = !!flag(this, 'deep') - , descriptor = isDeep ? 'deep property ' : 'property ' - , negate = flag(this, 'negate') - , obj = flag(this, 'object') - , pathInfo = isDeep ? _.getPathInfo(name, obj) : null - , hasProperty = isDeep - ? pathInfo.exists - : _.hasProperty(name, obj) - , value = isDeep - ? pathInfo.value - : obj[name]; - - if (negate && undefined !== val) { - if (undefined === value) { - msg = (msg != null) ? msg + ': ' : ''; - throw new Error(msg + _.inspect(obj) + ' has no ' + descriptor + _.inspect(name)); - } - } else { - this.assert( - hasProperty - , 'expected #{this} to have a ' + descriptor + _.inspect(name) - , 'expected #{this} to not have ' + descriptor + _.inspect(name)); - } - - if (undefined !== val) { - this.assert( - val === value - , 'expected #{this} to have a ' + descriptor + _.inspect(name) + ' of #{exp}, but got #{act}' - , 'expected #{this} to not have a ' + descriptor + _.inspect(name) + ' of #{act}' - , val - , value - ); - } - - flag(this, 'object', value); - }); - - - /** - * ### .ownProperty(name) - * - * Asserts that the target has an own property `name`. - * - * expect('test').to.have.ownProperty('length'); - * - * @name ownProperty - * @alias haveOwnProperty - * @param {String} name - * @param {String} message _optional_ - * @api public - */ - - function assertOwnProperty (name, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - this.assert( - obj.hasOwnProperty(name) - , 'expected #{this} to have own property ' + _.inspect(name) - , 'expected #{this} to not have own property ' + _.inspect(name) - ); - } - - Assertion.addMethod('ownProperty', assertOwnProperty); - Assertion.addMethod('haveOwnProperty', assertOwnProperty); - - /** - * ### .ownPropertyDescriptor(name[, descriptor[, message]]) - * - * Asserts that the target has an own property descriptor `name`, that optionally matches `descriptor`. - * - * expect('test').to.have.ownPropertyDescriptor('length'); - * expect('test').to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 4 }); - * expect('test').not.to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 3 }); - * expect('test').ownPropertyDescriptor('length').to.have.property('enumerable', false); - * expect('test').ownPropertyDescriptor('length').to.have.keys('value'); - * - * @name ownPropertyDescriptor - * @alias haveOwnPropertyDescriptor - * @param {String} name - * @param {Object} descriptor _optional_ - * @param {String} message _optional_ - * @api public - */ - - function assertOwnPropertyDescriptor (name, descriptor, msg) { - if (typeof descriptor === 'string') { - msg = descriptor; - descriptor = null; - } - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - var actualDescriptor = Object.getOwnPropertyDescriptor(Object(obj), name); - if (actualDescriptor && descriptor) { - this.assert( - _.eql(descriptor, actualDescriptor) - , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to match ' + _.inspect(descriptor) + ', got ' + _.inspect(actualDescriptor) - , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to not match ' + _.inspect(descriptor) - , descriptor - , actualDescriptor - , true - ); - } else { - this.assert( - actualDescriptor - , 'expected #{this} to have an own property descriptor for ' + _.inspect(name) - , 'expected #{this} to not have an own property descriptor for ' + _.inspect(name) - ); - } - flag(this, 'object', actualDescriptor); - } - - Assertion.addMethod('ownPropertyDescriptor', assertOwnPropertyDescriptor); - Assertion.addMethod('haveOwnPropertyDescriptor', assertOwnPropertyDescriptor); - - /** - * ### .length(value) - * - * Asserts that the target's `length` property has - * the expected value. - * - * expect([ 1, 2, 3]).to.have.length(3); - * expect('foobar').to.have.length(6); - * - * Can also be used as a chain precursor to a value - * comparison for the length property. - * - * expect('foo').to.have.length.above(2); - * expect([ 1, 2, 3 ]).to.have.length.above(2); - * expect('foo').to.have.length.below(4); - * expect([ 1, 2, 3 ]).to.have.length.below(4); - * expect('foo').to.have.length.within(2,4); - * expect([ 1, 2, 3 ]).to.have.length.within(2,4); - * - * @name length - * @alias lengthOf - * @param {Number} length - * @param {String} message _optional_ - * @api public - */ - - function assertLengthChain () { - flag(this, 'doLength', true); - } - - function assertLength (n, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - - this.assert( - len == n - , 'expected #{this} to have a length of #{exp} but got #{act}' - , 'expected #{this} to not have a length of #{act}' - , n - , len - ); - } - - Assertion.addChainableMethod('length', assertLength, assertLengthChain); - Assertion.addMethod('lengthOf', assertLength); - - /** - * ### .match(regexp) - * - * Asserts that the target matches a regular expression. - * - * expect('foobar').to.match(/^foo/); - * - * @name match - * @param {RegExp} RegularExpression - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('match', function (re, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - this.assert( - re.exec(obj) - , 'expected #{this} to match ' + re - , 'expected #{this} not to match ' + re - ); - }); - - /** - * ### .string(string) - * - * Asserts that the string target contains another string. - * - * expect('foobar').to.have.string('bar'); - * - * @name string - * @param {String} string - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('string', function (str, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - new Assertion(obj, msg).is.a('string'); - - this.assert( - ~obj.indexOf(str) - , 'expected #{this} to contain ' + _.inspect(str) - , 'expected #{this} to not contain ' + _.inspect(str) - ); - }); - - - /** - * ### .keys(key1, [key2], [...]) - * - * Asserts that the target contains any or all of the passed-in keys. - * Use in combination with `any`, `all`, `contains`, or `have` will affect - * what will pass. - * - * When used in conjunction with `any`, at least one key that is passed - * in must exist in the target object. This is regardless whether or not - * the `have` or `contain` qualifiers are used. Note, either `any` or `all` - * should be used in the assertion. If neither are used, the assertion is - * defaulted to `all`. - * - * When both `all` and `contain` are used, the target object must have at - * least all of the passed-in keys but may have more keys not listed. - * - * When both `all` and `have` are used, the target object must both contain - * all of the passed-in keys AND the number of keys in the target object must - * match the number of keys passed in (in other words, a target object must - * have all and only all of the passed-in keys). - * - * expect({ foo: 1, bar: 2 }).to.have.any.keys('foo', 'baz'); - * expect({ foo: 1, bar: 2 }).to.have.any.keys('foo'); - * expect({ foo: 1, bar: 2 }).to.contain.any.keys('bar', 'baz'); - * expect({ foo: 1, bar: 2 }).to.contain.any.keys(['foo']); - * expect({ foo: 1, bar: 2 }).to.contain.any.keys({'foo': 6}); - * expect({ foo: 1, bar: 2 }).to.have.all.keys(['bar', 'foo']); - * expect({ foo: 1, bar: 2 }).to.have.all.keys({'bar': 6, 'foo': 7}); - * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys(['bar', 'foo']); - * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys([{'bar': 6}}]); - * - * - * @name keys - * @alias key - * @param {String...|Array|Object} keys - * @api public - */ - - function assertKeys (keys) { - var obj = flag(this, 'object') - , str - , ok = true - , mixedArgsMsg = 'keys must be given single argument of Array|Object|String, or multiple String arguments'; - - switch (_.type(keys)) { - case "array": - if (arguments.length > 1) throw (new Error(mixedArgsMsg)); - break; - case "object": - if (arguments.length > 1) throw (new Error(mixedArgsMsg)); - keys = Object.keys(keys); - break; - default: - keys = Array.prototype.slice.call(arguments); - } - - if (!keys.length) throw new Error('keys required'); - - var actual = Object.keys(obj) - , expected = keys - , len = keys.length - , any = flag(this, 'any') - , all = flag(this, 'all'); - - if (!any && !all) { - all = true; - } - - // Has any - if (any) { - var intersection = expected.filter(function(key) { - return ~actual.indexOf(key); - }); - ok = intersection.length > 0; - } - - // Has all - if (all) { - ok = keys.every(function(key){ - return ~actual.indexOf(key); - }); - if (!flag(this, 'negate') && !flag(this, 'contains')) { - ok = ok && keys.length == actual.length; - } - } - - // Key string - if (len > 1) { - keys = keys.map(function(key){ - return _.inspect(key); - }); - var last = keys.pop(); - if (all) { - str = keys.join(', ') + ', and ' + last; - } - if (any) { - str = keys.join(', ') + ', or ' + last; - } - } else { - str = _.inspect(keys[0]); - } - - // Form - str = (len > 1 ? 'keys ' : 'key ') + str; - - // Have / include - str = (flag(this, 'contains') ? 'contain ' : 'have ') + str; - - // Assertion - this.assert( - ok - , 'expected #{this} to ' + str - , 'expected #{this} to not ' + str - , expected.slice(0).sort() - , actual.sort() - , true - ); - } - - Assertion.addMethod('keys', assertKeys); - Assertion.addMethod('key', assertKeys); - - /** - * ### .throw(constructor) - * - * Asserts that the function target will throw a specific error, or specific type of error - * (as determined using `instanceof`), optionally with a RegExp or string inclusion test - * for the error's message. - * - * var err = new ReferenceError('This is a bad function.'); - * var fn = function () { throw err; } - * expect(fn).to.throw(ReferenceError); - * expect(fn).to.throw(Error); - * expect(fn).to.throw(/bad function/); - * expect(fn).to.not.throw('good function'); - * expect(fn).to.throw(ReferenceError, /bad function/); - * expect(fn).to.throw(err); - * expect(fn).to.not.throw(new RangeError('Out of range.')); - * - * Please note that when a throw expectation is negated, it will check each - * parameter independently, starting with error constructor type. The appropriate way - * to check for the existence of a type of error but for a message that does not match - * is to use `and`. - * - * expect(fn).to.throw(ReferenceError) - * .and.not.throw(/good function/); - * - * @name throw - * @alias throws - * @alias Throw - * @param {ErrorConstructor} constructor - * @param {String|RegExp} expected error message - * @param {String} message _optional_ - * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types - * @returns error for chaining (null if no error) - * @api public - */ - - function assertThrows (constructor, errMsg, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - new Assertion(obj, msg).is.a('function'); - - var thrown = false - , desiredError = null - , name = null - , thrownError = null; - - if (arguments.length === 0) { - errMsg = null; - constructor = null; - } else if (constructor && (constructor instanceof RegExp || 'string' === typeof constructor)) { - errMsg = constructor; - constructor = null; - } else if (constructor && constructor instanceof Error) { - desiredError = constructor; - constructor = null; - errMsg = null; - } else if (typeof constructor === 'function') { - name = constructor.prototype.name || constructor.name; - if (name === 'Error' && constructor !== Error) { - name = (new constructor()).name; - } - } else { - constructor = null; - } - - try { - obj(); - } catch (err) { - // first, check desired error - if (desiredError) { - this.assert( - err === desiredError - , 'expected #{this} to throw #{exp} but #{act} was thrown' - , 'expected #{this} to not throw #{exp}' - , (desiredError instanceof Error ? desiredError.toString() : desiredError) - , (err instanceof Error ? err.toString() : err) - ); - - flag(this, 'object', err); - return this; - } - - // next, check constructor - if (constructor) { - this.assert( - err instanceof constructor - , 'expected #{this} to throw #{exp} but #{act} was thrown' - , 'expected #{this} to not throw #{exp} but #{act} was thrown' - , name - , (err instanceof Error ? err.toString() : err) - ); - - if (!errMsg) { - flag(this, 'object', err); - return this; - } - } - - // next, check message - var message = 'object' === _.type(err) && "message" in err - ? err.message - : '' + err; - - if ((message != null) && errMsg && errMsg instanceof RegExp) { - this.assert( - errMsg.exec(message) - , 'expected #{this} to throw error matching #{exp} but got #{act}' - , 'expected #{this} to throw error not matching #{exp}' - , errMsg - , message - ); - - flag(this, 'object', err); - return this; - } else if ((message != null) && errMsg && 'string' === typeof errMsg) { - this.assert( - ~message.indexOf(errMsg) - , 'expected #{this} to throw error including #{exp} but got #{act}' - , 'expected #{this} to throw error not including #{act}' - , errMsg - , message - ); - - flag(this, 'object', err); - return this; - } else { - thrown = true; - thrownError = err; - } - } - - var actuallyGot = '' - , expectedThrown = name !== null - ? name - : desiredError - ? '#{exp}' //_.inspect(desiredError) - : 'an error'; - - if (thrown) { - actuallyGot = ' but #{act} was thrown' - } - - this.assert( - thrown === true - , 'expected #{this} to throw ' + expectedThrown + actuallyGot - , 'expected #{this} to not throw ' + expectedThrown + actuallyGot - , (desiredError instanceof Error ? desiredError.toString() : desiredError) - , (thrownError instanceof Error ? thrownError.toString() : thrownError) - ); - - flag(this, 'object', thrownError); - }; - - Assertion.addMethod('throw', assertThrows); - Assertion.addMethod('throws', assertThrows); - Assertion.addMethod('Throw', assertThrows); - - /** - * ### .respondTo(method) - * - * Asserts that the object or class target will respond to a method. - * - * Klass.prototype.bar = function(){}; - * expect(Klass).to.respondTo('bar'); - * expect(obj).to.respondTo('bar'); - * - * To check if a constructor will respond to a static function, - * set the `itself` flag. - * - * Klass.baz = function(){}; - * expect(Klass).itself.to.respondTo('baz'); - * - * @name respondTo - * @param {String} method - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('respondTo', function (method, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object') - , itself = flag(this, 'itself') - , context = ('function' === _.type(obj) && !itself) - ? obj.prototype[method] - : obj[method]; - - this.assert( - 'function' === typeof context - , 'expected #{this} to respond to ' + _.inspect(method) - , 'expected #{this} to not respond to ' + _.inspect(method) - ); - }); - - /** - * ### .itself - * - * Sets the `itself` flag, later used by the `respondTo` assertion. - * - * function Foo() {} - * Foo.bar = function() {} - * Foo.prototype.baz = function() {} - * - * expect(Foo).itself.to.respondTo('bar'); - * expect(Foo).itself.not.to.respondTo('baz'); - * - * @name itself - * @api public - */ - - Assertion.addProperty('itself', function () { - flag(this, 'itself', true); - }); - - /** - * ### .satisfy(method) - * - * Asserts that the target passes a given truth test. - * - * expect(1).to.satisfy(function(num) { return num > 0; }); - * - * @name satisfy - * @param {Function} matcher - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('satisfy', function (matcher, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - var result = matcher(obj); - this.assert( - result - , 'expected #{this} to satisfy ' + _.objDisplay(matcher) - , 'expected #{this} to not satisfy' + _.objDisplay(matcher) - , this.negate ? false : true - , result - ); - }); - - /** - * ### .closeTo(expected, delta) - * - * Asserts that the target is equal `expected`, to within a +/- `delta` range. - * - * expect(1.5).to.be.closeTo(1, 0.5); - * - * @name closeTo - * @param {Number} expected - * @param {Number} delta - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('closeTo', function (expected, delta, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - - new Assertion(obj, msg).is.a('number'); - if (_.type(expected) !== 'number' || _.type(delta) !== 'number') { - throw new Error('the arguments to closeTo must be numbers'); - } - - this.assert( - Math.abs(obj - expected) <= delta - , 'expected #{this} to be close to ' + expected + ' +/- ' + delta - , 'expected #{this} not to be close to ' + expected + ' +/- ' + delta - ); - }); - - function isSubsetOf(subset, superset, cmp) { - return subset.every(function(elem) { - if (!cmp) return superset.indexOf(elem) !== -1; - - return superset.some(function(elem2) { - return cmp(elem, elem2); - }); - }) - } - - /** - * ### .members(set) - * - * Asserts that the target is a superset of `set`, - * or that the target and `set` have the same strictly-equal (===) members. - * Alternately, if the `deep` flag is set, set members are compared for deep - * equality. - * - * expect([1, 2, 3]).to.include.members([3, 2]); - * expect([1, 2, 3]).to.not.include.members([3, 2, 8]); - * - * expect([4, 2]).to.have.members([2, 4]); - * expect([5, 2]).to.not.have.members([5, 2, 1]); - * - * expect([{ id: 1 }]).to.deep.include.members([{ id: 1 }]); - * - * @name members - * @param {Array} set - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('members', function (subset, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - - new Assertion(obj).to.be.an('array'); - new Assertion(subset).to.be.an('array'); - - var cmp = flag(this, 'deep') ? _.eql : undefined; - - if (flag(this, 'contains')) { - return this.assert( - isSubsetOf(subset, obj, cmp) - , 'expected #{this} to be a superset of #{act}' - , 'expected #{this} to not be a superset of #{act}' - , obj - , subset - ); - } - - this.assert( - isSubsetOf(obj, subset, cmp) && isSubsetOf(subset, obj, cmp) - , 'expected #{this} to have the same members as #{act}' - , 'expected #{this} to not have the same members as #{act}' - , obj - , subset - ); - }); - - /** - * ### .change(function) - * - * Asserts that a function changes an object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val += 3 }; - * var noChangeFn = function() { return 'foo' + 'bar'; } - * expect(fn).to.change(obj, 'val'); - * expect(noChangFn).to.not.change(obj, 'val') - * - * @name change - * @alias changes - * @alias Change - * @param {String} object - * @param {String} property name - * @param {String} message _optional_ - * @api public - */ - - function assertChanges (object, prop, msg) { - if (msg) flag(this, 'message', msg); - var fn = flag(this, 'object'); - new Assertion(object, msg).to.have.property(prop); - new Assertion(fn).is.a('function'); - - var initial = object[prop]; - fn(); - - this.assert( - initial !== object[prop] - , 'expected .' + prop + ' to change' - , 'expected .' + prop + ' to not change' - ); - } - - Assertion.addChainableMethod('change', assertChanges); - Assertion.addChainableMethod('changes', assertChanges); - - /** - * ### .increase(function) - * - * Asserts that a function increases an object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 15 }; - * expect(fn).to.increase(obj, 'val'); - * - * @name increase - * @alias increases - * @alias Increase - * @param {String} object - * @param {String} property name - * @param {String} message _optional_ - * @api public - */ - - function assertIncreases (object, prop, msg) { - if (msg) flag(this, 'message', msg); - var fn = flag(this, 'object'); - new Assertion(object, msg).to.have.property(prop); - new Assertion(fn).is.a('function'); - - var initial = object[prop]; - fn(); - - this.assert( - object[prop] - initial > 0 - , 'expected .' + prop + ' to increase' - , 'expected .' + prop + ' to not increase' - ); - } - - Assertion.addChainableMethod('increase', assertIncreases); - Assertion.addChainableMethod('increases', assertIncreases); - - /** - * ### .decrease(function) - * - * Asserts that a function decreases an object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 5 }; - * expect(fn).to.decrease(obj, 'val'); - * - * @name decrease - * @alias decreases - * @alias Decrease - * @param {String} object - * @param {String} property name - * @param {String} message _optional_ - * @api public - */ - - function assertDecreases (object, prop, msg) { - if (msg) flag(this, 'message', msg); - var fn = flag(this, 'object'); - new Assertion(object, msg).to.have.property(prop); - new Assertion(fn).is.a('function'); - - var initial = object[prop]; - fn(); - - this.assert( - object[prop] - initial < 0 - , 'expected .' + prop + ' to decrease' - , 'expected .' + prop + ' to not decrease' - ); - } - - Assertion.addChainableMethod('decrease', assertDecreases); - Assertion.addChainableMethod('decreases', assertDecreases); - -}; diff --git a/cli/node_modules/chai/lib/chai/interface/assert.js b/cli/node_modules/chai/lib/chai/interface/assert.js deleted file mode 100644 index a4f478b4d..000000000 --- a/cli/node_modules/chai/lib/chai/interface/assert.js +++ /dev/null @@ -1,1263 +0,0 @@ -/*! - * chai - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - - -module.exports = function (chai, util) { - - /*! - * Chai dependencies. - */ - - var Assertion = chai.Assertion - , flag = util.flag; - - /*! - * Module export. - */ - - /** - * ### assert(expression, message) - * - * Write your own test expressions. - * - * assert('foo' !== 'bar', 'foo is not bar'); - * assert(Array.isArray([]), 'empty arrays are arrays'); - * - * @param {Mixed} expression to test for truthiness - * @param {String} message to display on error - * @name assert - * @api public - */ - - var assert = chai.assert = function (express, errmsg) { - var test = new Assertion(null, null, chai.assert); - test.assert( - express - , errmsg - , '[ negation message unavailable ]' - ); - }; - - /** - * ### .fail(actual, expected, [message], [operator]) - * - * Throw a failure. Node.js `assert` module-compatible. - * - * @name fail - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @param {String} operator - * @api public - */ - - assert.fail = function (actual, expected, message, operator) { - message = message || 'assert.fail()'; - throw new chai.AssertionError(message, { - actual: actual - , expected: expected - , operator: operator - }, assert.fail); - }; - - /** - * ### .ok(object, [message]) - * - * Asserts that `object` is truthy. - * - * assert.ok('everything', 'everything is ok'); - * assert.ok(false, 'this will fail'); - * - * @name ok - * @param {Mixed} object to test - * @param {String} message - * @api public - */ - - assert.ok = function (val, msg) { - new Assertion(val, msg).is.ok; - }; - - /** - * ### .notOk(object, [message]) - * - * Asserts that `object` is falsy. - * - * assert.notOk('everything', 'this will fail'); - * assert.notOk(false, 'this will pass'); - * - * @name notOk - * @param {Mixed} object to test - * @param {String} message - * @api public - */ - - assert.notOk = function (val, msg) { - new Assertion(val, msg).is.not.ok; - }; - - /** - * ### .equal(actual, expected, [message]) - * - * Asserts non-strict equality (`==`) of `actual` and `expected`. - * - * assert.equal(3, '3', '== coerces values to strings'); - * - * @name equal - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @api public - */ - - assert.equal = function (act, exp, msg) { - var test = new Assertion(act, msg, assert.equal); - - test.assert( - exp == flag(test, 'object') - , 'expected #{this} to equal #{exp}' - , 'expected #{this} to not equal #{act}' - , exp - , act - ); - }; - - /** - * ### .notEqual(actual, expected, [message]) - * - * Asserts non-strict inequality (`!=`) of `actual` and `expected`. - * - * assert.notEqual(3, 4, 'these numbers are not equal'); - * - * @name notEqual - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @api public - */ - - assert.notEqual = function (act, exp, msg) { - var test = new Assertion(act, msg, assert.notEqual); - - test.assert( - exp != flag(test, 'object') - , 'expected #{this} to not equal #{exp}' - , 'expected #{this} to equal #{act}' - , exp - , act - ); - }; - - /** - * ### .strictEqual(actual, expected, [message]) - * - * Asserts strict equality (`===`) of `actual` and `expected`. - * - * assert.strictEqual(true, true, 'these booleans are strictly equal'); - * - * @name strictEqual - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @api public - */ - - assert.strictEqual = function (act, exp, msg) { - new Assertion(act, msg).to.equal(exp); - }; - - /** - * ### .notStrictEqual(actual, expected, [message]) - * - * Asserts strict inequality (`!==`) of `actual` and `expected`. - * - * assert.notStrictEqual(3, '3', 'no coercion for strict equality'); - * - * @name notStrictEqual - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @api public - */ - - assert.notStrictEqual = function (act, exp, msg) { - new Assertion(act, msg).to.not.equal(exp); - }; - - /** - * ### .deepEqual(actual, expected, [message]) - * - * Asserts that `actual` is deeply equal to `expected`. - * - * assert.deepEqual({ tea: 'green' }, { tea: 'green' }); - * - * @name deepEqual - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @api public - */ - - assert.deepEqual = function (act, exp, msg) { - new Assertion(act, msg).to.eql(exp); - }; - - /** - * ### .notDeepEqual(actual, expected, [message]) - * - * Assert that `actual` is not deeply equal to `expected`. - * - * assert.notDeepEqual({ tea: 'green' }, { tea: 'jasmine' }); - * - * @name notDeepEqual - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @api public - */ - - assert.notDeepEqual = function (act, exp, msg) { - new Assertion(act, msg).to.not.eql(exp); - }; - - /** - * ### .isTrue(value, [message]) - * - * Asserts that `value` is true. - * - * var teaServed = true; - * assert.isTrue(teaServed, 'the tea has been served'); - * - * @name isTrue - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isAbove = function (val, abv, msg) { - new Assertion(val, msg).to.be.above(abv); - }; - - /** - * ### .isAbove(valueToCheck, valueToBeAbove, [message]) - * - * Asserts `valueToCheck` is strictly greater than (>) `valueToBeAbove` - * - * assert.isAbove(5, 2, '5 is strictly greater than 2'); - * - * @name isAbove - * @param {Mixed} valueToCheck - * @param {Mixed} valueToBeAbove - * @param {String} message - * @api public - */ - - assert.isBelow = function (val, blw, msg) { - new Assertion(val, msg).to.be.below(blw); - }; - - /** - * ### .isBelow(valueToCheck, valueToBeBelow, [message]) - * - * Asserts `valueToCheck` is strictly less than (<) `valueToBeBelow` - * - * assert.isBelow(3, 6, '3 is strictly less than 6'); - * - * @name isBelow - * @param {Mixed} valueToCheck - * @param {Mixed} valueToBeBelow - * @param {String} message - * @api public - */ - - assert.isTrue = function (val, msg) { - new Assertion(val, msg).is['true']; - }; - - /** - * ### .isFalse(value, [message]) - * - * Asserts that `value` is false. - * - * var teaServed = false; - * assert.isFalse(teaServed, 'no tea yet? hmm...'); - * - * @name isFalse - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isFalse = function (val, msg) { - new Assertion(val, msg).is['false']; - }; - - /** - * ### .isNull(value, [message]) - * - * Asserts that `value` is null. - * - * assert.isNull(err, 'there was no error'); - * - * @name isNull - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNull = function (val, msg) { - new Assertion(val, msg).to.equal(null); - }; - - /** - * ### .isNotNull(value, [message]) - * - * Asserts that `value` is not null. - * - * var tea = 'tasty chai'; - * assert.isNotNull(tea, 'great, time for tea!'); - * - * @name isNotNull - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotNull = function (val, msg) { - new Assertion(val, msg).to.not.equal(null); - }; - - /** - * ### .isUndefined(value, [message]) - * - * Asserts that `value` is `undefined`. - * - * var tea; - * assert.isUndefined(tea, 'no tea defined'); - * - * @name isUndefined - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isUndefined = function (val, msg) { - new Assertion(val, msg).to.equal(undefined); - }; - - /** - * ### .isDefined(value, [message]) - * - * Asserts that `value` is not `undefined`. - * - * var tea = 'cup of chai'; - * assert.isDefined(tea, 'tea has been defined'); - * - * @name isDefined - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isDefined = function (val, msg) { - new Assertion(val, msg).to.not.equal(undefined); - }; - - /** - * ### .isFunction(value, [message]) - * - * Asserts that `value` is a function. - * - * function serveTea() { return 'cup of tea'; }; - * assert.isFunction(serveTea, 'great, we can have tea now'); - * - * @name isFunction - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isFunction = function (val, msg) { - new Assertion(val, msg).to.be.a('function'); - }; - - /** - * ### .isNotFunction(value, [message]) - * - * Asserts that `value` is _not_ a function. - * - * var serveTea = [ 'heat', 'pour', 'sip' ]; - * assert.isNotFunction(serveTea, 'great, we have listed the steps'); - * - * @name isNotFunction - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotFunction = function (val, msg) { - new Assertion(val, msg).to.not.be.a('function'); - }; - - /** - * ### .isObject(value, [message]) - * - * Asserts that `value` is an object (as revealed by - * `Object.prototype.toString`). - * - * var selection = { name: 'Chai', serve: 'with spices' }; - * assert.isObject(selection, 'tea selection is an object'); - * - * @name isObject - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isObject = function (val, msg) { - new Assertion(val, msg).to.be.a('object'); - }; - - /** - * ### .isNotObject(value, [message]) - * - * Asserts that `value` is _not_ an object. - * - * var selection = 'chai' - * assert.isNotObject(selection, 'tea selection is not an object'); - * assert.isNotObject(null, 'null is not an object'); - * - * @name isNotObject - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotObject = function (val, msg) { - new Assertion(val, msg).to.not.be.a('object'); - }; - - /** - * ### .isArray(value, [message]) - * - * Asserts that `value` is an array. - * - * var menu = [ 'green', 'chai', 'oolong' ]; - * assert.isArray(menu, 'what kind of tea do we want?'); - * - * @name isArray - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isArray = function (val, msg) { - new Assertion(val, msg).to.be.an('array'); - }; - - /** - * ### .isNotArray(value, [message]) - * - * Asserts that `value` is _not_ an array. - * - * var menu = 'green|chai|oolong'; - * assert.isNotArray(menu, 'what kind of tea do we want?'); - * - * @name isNotArray - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotArray = function (val, msg) { - new Assertion(val, msg).to.not.be.an('array'); - }; - - /** - * ### .isString(value, [message]) - * - * Asserts that `value` is a string. - * - * var teaOrder = 'chai'; - * assert.isString(teaOrder, 'order placed'); - * - * @name isString - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isString = function (val, msg) { - new Assertion(val, msg).to.be.a('string'); - }; - - /** - * ### .isNotString(value, [message]) - * - * Asserts that `value` is _not_ a string. - * - * var teaOrder = 4; - * assert.isNotString(teaOrder, 'order placed'); - * - * @name isNotString - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotString = function (val, msg) { - new Assertion(val, msg).to.not.be.a('string'); - }; - - /** - * ### .isNumber(value, [message]) - * - * Asserts that `value` is a number. - * - * var cups = 2; - * assert.isNumber(cups, 'how many cups'); - * - * @name isNumber - * @param {Number} value - * @param {String} message - * @api public - */ - - assert.isNumber = function (val, msg) { - new Assertion(val, msg).to.be.a('number'); - }; - - /** - * ### .isNotNumber(value, [message]) - * - * Asserts that `value` is _not_ a number. - * - * var cups = '2 cups please'; - * assert.isNotNumber(cups, 'how many cups'); - * - * @name isNotNumber - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotNumber = function (val, msg) { - new Assertion(val, msg).to.not.be.a('number'); - }; - - /** - * ### .isBoolean(value, [message]) - * - * Asserts that `value` is a boolean. - * - * var teaReady = true - * , teaServed = false; - * - * assert.isBoolean(teaReady, 'is the tea ready'); - * assert.isBoolean(teaServed, 'has tea been served'); - * - * @name isBoolean - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isBoolean = function (val, msg) { - new Assertion(val, msg).to.be.a('boolean'); - }; - - /** - * ### .isNotBoolean(value, [message]) - * - * Asserts that `value` is _not_ a boolean. - * - * var teaReady = 'yep' - * , teaServed = 'nope'; - * - * assert.isNotBoolean(teaReady, 'is the tea ready'); - * assert.isNotBoolean(teaServed, 'has tea been served'); - * - * @name isNotBoolean - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotBoolean = function (val, msg) { - new Assertion(val, msg).to.not.be.a('boolean'); - }; - - /** - * ### .typeOf(value, name, [message]) - * - * Asserts that `value`'s type is `name`, as determined by - * `Object.prototype.toString`. - * - * assert.typeOf({ tea: 'chai' }, 'object', 'we have an object'); - * assert.typeOf(['chai', 'jasmine'], 'array', 'we have an array'); - * assert.typeOf('tea', 'string', 'we have a string'); - * assert.typeOf(/tea/, 'regexp', 'we have a regular expression'); - * assert.typeOf(null, 'null', 'we have a null'); - * assert.typeOf(undefined, 'undefined', 'we have an undefined'); - * - * @name typeOf - * @param {Mixed} value - * @param {String} name - * @param {String} message - * @api public - */ - - assert.typeOf = function (val, type, msg) { - new Assertion(val, msg).to.be.a(type); - }; - - /** - * ### .notTypeOf(value, name, [message]) - * - * Asserts that `value`'s type is _not_ `name`, as determined by - * `Object.prototype.toString`. - * - * assert.notTypeOf('tea', 'number', 'strings are not numbers'); - * - * @name notTypeOf - * @param {Mixed} value - * @param {String} typeof name - * @param {String} message - * @api public - */ - - assert.notTypeOf = function (val, type, msg) { - new Assertion(val, msg).to.not.be.a(type); - }; - - /** - * ### .instanceOf(object, constructor, [message]) - * - * Asserts that `value` is an instance of `constructor`. - * - * var Tea = function (name) { this.name = name; } - * , chai = new Tea('chai'); - * - * assert.instanceOf(chai, Tea, 'chai is an instance of tea'); - * - * @name instanceOf - * @param {Object} object - * @param {Constructor} constructor - * @param {String} message - * @api public - */ - - assert.instanceOf = function (val, type, msg) { - new Assertion(val, msg).to.be.instanceOf(type); - }; - - /** - * ### .notInstanceOf(object, constructor, [message]) - * - * Asserts `value` is not an instance of `constructor`. - * - * var Tea = function (name) { this.name = name; } - * , chai = new String('chai'); - * - * assert.notInstanceOf(chai, Tea, 'chai is not an instance of tea'); - * - * @name notInstanceOf - * @param {Object} object - * @param {Constructor} constructor - * @param {String} message - * @api public - */ - - assert.notInstanceOf = function (val, type, msg) { - new Assertion(val, msg).to.not.be.instanceOf(type); - }; - - /** - * ### .include(haystack, needle, [message]) - * - * Asserts that `haystack` includes `needle`. Works - * for strings and arrays. - * - * assert.include('foobar', 'bar', 'foobar contains string "bar"'); - * assert.include([ 1, 2, 3 ], 3, 'array contains value'); - * - * @name include - * @param {Array|String} haystack - * @param {Mixed} needle - * @param {String} message - * @api public - */ - - assert.include = function (exp, inc, msg) { - new Assertion(exp, msg, assert.include).include(inc); - }; - - /** - * ### .notInclude(haystack, needle, [message]) - * - * Asserts that `haystack` does not include `needle`. Works - * for strings and arrays. - *i - * assert.notInclude('foobar', 'baz', 'string not include substring'); - * assert.notInclude([ 1, 2, 3 ], 4, 'array not include contain value'); - * - * @name notInclude - * @param {Array|String} haystack - * @param {Mixed} needle - * @param {String} message - * @api public - */ - - assert.notInclude = function (exp, inc, msg) { - new Assertion(exp, msg, assert.notInclude).not.include(inc); - }; - - /** - * ### .match(value, regexp, [message]) - * - * Asserts that `value` matches the regular expression `regexp`. - * - * assert.match('foobar', /^foo/, 'regexp matches'); - * - * @name match - * @param {Mixed} value - * @param {RegExp} regexp - * @param {String} message - * @api public - */ - - assert.match = function (exp, re, msg) { - new Assertion(exp, msg).to.match(re); - }; - - /** - * ### .notMatch(value, regexp, [message]) - * - * Asserts that `value` does not match the regular expression `regexp`. - * - * assert.notMatch('foobar', /^foo/, 'regexp does not match'); - * - * @name notMatch - * @param {Mixed} value - * @param {RegExp} regexp - * @param {String} message - * @api public - */ - - assert.notMatch = function (exp, re, msg) { - new Assertion(exp, msg).to.not.match(re); - }; - - /** - * ### .property(object, property, [message]) - * - * Asserts that `object` has a property named by `property`. - * - * assert.property({ tea: { green: 'matcha' }}, 'tea'); - * - * @name property - * @param {Object} object - * @param {String} property - * @param {String} message - * @api public - */ - - assert.property = function (obj, prop, msg) { - new Assertion(obj, msg).to.have.property(prop); - }; - - /** - * ### .notProperty(object, property, [message]) - * - * Asserts that `object` does _not_ have a property named by `property`. - * - * assert.notProperty({ tea: { green: 'matcha' }}, 'coffee'); - * - * @name notProperty - * @param {Object} object - * @param {String} property - * @param {String} message - * @api public - */ - - assert.notProperty = function (obj, prop, msg) { - new Assertion(obj, msg).to.not.have.property(prop); - }; - - /** - * ### .deepProperty(object, property, [message]) - * - * Asserts that `object` has a property named by `property`, which can be a - * string using dot- and bracket-notation for deep reference. - * - * assert.deepProperty({ tea: { green: 'matcha' }}, 'tea.green'); - * - * @name deepProperty - * @param {Object} object - * @param {String} property - * @param {String} message - * @api public - */ - - assert.deepProperty = function (obj, prop, msg) { - new Assertion(obj, msg).to.have.deep.property(prop); - }; - - /** - * ### .notDeepProperty(object, property, [message]) - * - * Asserts that `object` does _not_ have a property named by `property`, which - * can be a string using dot- and bracket-notation for deep reference. - * - * assert.notDeepProperty({ tea: { green: 'matcha' }}, 'tea.oolong'); - * - * @name notDeepProperty - * @param {Object} object - * @param {String} property - * @param {String} message - * @api public - */ - - assert.notDeepProperty = function (obj, prop, msg) { - new Assertion(obj, msg).to.not.have.deep.property(prop); - }; - - /** - * ### .propertyVal(object, property, value, [message]) - * - * Asserts that `object` has a property named by `property` with value given - * by `value`. - * - * assert.propertyVal({ tea: 'is good' }, 'tea', 'is good'); - * - * @name propertyVal - * @param {Object} object - * @param {String} property - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.propertyVal = function (obj, prop, val, msg) { - new Assertion(obj, msg).to.have.property(prop, val); - }; - - /** - * ### .propertyNotVal(object, property, value, [message]) - * - * Asserts that `object` has a property named by `property`, but with a value - * different from that given by `value`. - * - * assert.propertyNotVal({ tea: 'is good' }, 'tea', 'is bad'); - * - * @name propertyNotVal - * @param {Object} object - * @param {String} property - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.propertyNotVal = function (obj, prop, val, msg) { - new Assertion(obj, msg).to.not.have.property(prop, val); - }; - - /** - * ### .deepPropertyVal(object, property, value, [message]) - * - * Asserts that `object` has a property named by `property` with value given - * by `value`. `property` can use dot- and bracket-notation for deep - * reference. - * - * assert.deepPropertyVal({ tea: { green: 'matcha' }}, 'tea.green', 'matcha'); - * - * @name deepPropertyVal - * @param {Object} object - * @param {String} property - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.deepPropertyVal = function (obj, prop, val, msg) { - new Assertion(obj, msg).to.have.deep.property(prop, val); - }; - - /** - * ### .deepPropertyNotVal(object, property, value, [message]) - * - * Asserts that `object` has a property named by `property`, but with a value - * different from that given by `value`. `property` can use dot- and - * bracket-notation for deep reference. - * - * assert.deepPropertyNotVal({ tea: { green: 'matcha' }}, 'tea.green', 'konacha'); - * - * @name deepPropertyNotVal - * @param {Object} object - * @param {String} property - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.deepPropertyNotVal = function (obj, prop, val, msg) { - new Assertion(obj, msg).to.not.have.deep.property(prop, val); - }; - - /** - * ### .lengthOf(object, length, [message]) - * - * Asserts that `object` has a `length` property with the expected value. - * - * assert.lengthOf([1,2,3], 3, 'array has length of 3'); - * assert.lengthOf('foobar', 5, 'string has length of 6'); - * - * @name lengthOf - * @param {Mixed} object - * @param {Number} length - * @param {String} message - * @api public - */ - - assert.lengthOf = function (exp, len, msg) { - new Assertion(exp, msg).to.have.length(len); - }; - - /** - * ### .throws(function, [constructor/string/regexp], [string/regexp], [message]) - * - * Asserts that `function` will throw an error that is an instance of - * `constructor`, or alternately that it will throw an error with message - * matching `regexp`. - * - * assert.throw(fn, 'function throws a reference error'); - * assert.throw(fn, /function throws a reference error/); - * assert.throw(fn, ReferenceError); - * assert.throw(fn, ReferenceError, 'function throws a reference error'); - * assert.throw(fn, ReferenceError, /function throws a reference error/); - * - * @name throws - * @alias throw - * @alias Throw - * @param {Function} function - * @param {ErrorConstructor} constructor - * @param {RegExp} regexp - * @param {String} message - * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types - * @api public - */ - - assert.Throw = function (fn, errt, errs, msg) { - if ('string' === typeof errt || errt instanceof RegExp) { - errs = errt; - errt = null; - } - - var assertErr = new Assertion(fn, msg).to.Throw(errt, errs); - return flag(assertErr, 'object'); - }; - - /** - * ### .doesNotThrow(function, [constructor/regexp], [message]) - * - * Asserts that `function` will _not_ throw an error that is an instance of - * `constructor`, or alternately that it will not throw an error with message - * matching `regexp`. - * - * assert.doesNotThrow(fn, Error, 'function does not throw'); - * - * @name doesNotThrow - * @param {Function} function - * @param {ErrorConstructor} constructor - * @param {RegExp} regexp - * @param {String} message - * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types - * @api public - */ - - assert.doesNotThrow = function (fn, type, msg) { - if ('string' === typeof type) { - msg = type; - type = null; - } - - new Assertion(fn, msg).to.not.Throw(type); - }; - - /** - * ### .operator(val1, operator, val2, [message]) - * - * Compares two values using `operator`. - * - * assert.operator(1, '<', 2, 'everything is ok'); - * assert.operator(1, '>', 2, 'this will fail'); - * - * @name operator - * @param {Mixed} val1 - * @param {String} operator - * @param {Mixed} val2 - * @param {String} message - * @api public - */ - - assert.operator = function (val, operator, val2, msg) { - var ok; - switch(operator) { - case '==': - ok = val == val2; - break; - case '===': - ok = val === val2; - break; - case '>': - ok = val > val2; - break; - case '>=': - ok = val >= val2; - break; - case '<': - ok = val < val2; - break; - case '<=': - ok = val <= val2; - break; - case '!=': - ok = val != val2; - break; - case '!==': - ok = val !== val2; - break; - default: - throw new Error('Invalid operator "' + operator + '"'); - } - var test = new Assertion(ok, msg); - test.assert( - true === flag(test, 'object') - , 'expected ' + util.inspect(val) + ' to be ' + operator + ' ' + util.inspect(val2) - , 'expected ' + util.inspect(val) + ' to not be ' + operator + ' ' + util.inspect(val2) ); - }; - - /** - * ### .closeTo(actual, expected, delta, [message]) - * - * Asserts that the target is equal `expected`, to within a +/- `delta` range. - * - * assert.closeTo(1.5, 1, 0.5, 'numbers are close'); - * - * @name closeTo - * @param {Number} actual - * @param {Number} expected - * @param {Number} delta - * @param {String} message - * @api public - */ - - assert.closeTo = function (act, exp, delta, msg) { - new Assertion(act, msg).to.be.closeTo(exp, delta); - }; - - /** - * ### .sameMembers(set1, set2, [message]) - * - * Asserts that `set1` and `set2` have the same members. - * Order is not taken into account. - * - * assert.sameMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'same members'); - * - * @name sameMembers - * @param {Array} set1 - * @param {Array} set2 - * @param {String} message - * @api public - */ - - assert.sameMembers = function (set1, set2, msg) { - new Assertion(set1, msg).to.have.same.members(set2); - } - - /** - * ### .sameDeepMembers(set1, set2, [message]) - * - * Asserts that `set1` and `set2` have the same members - using a deep equality checking. - * Order is not taken into account. - * - * assert.sameDeepMembers([ {b: 3}, {a: 2}, {c: 5} ], [ {c: 5}, {b: 3}, {a: 2} ], 'same deep members'); - * - * @name sameDeepMembers - * @param {Array} set1 - * @param {Array} set2 - * @param {String} message - * @api public - */ - - assert.sameDeepMembers = function (set1, set2, msg) { - new Assertion(set1, msg).to.have.same.deep.members(set2); - } - - /** - * ### .includeMembers(superset, subset, [message]) - * - * Asserts that `subset` is included in `superset`. - * Order is not taken into account. - * - * assert.includeMembers([ 1, 2, 3 ], [ 2, 1 ], 'include members'); - * - * @name includeMembers - * @param {Array} superset - * @param {Array} subset - * @param {String} message - * @api public - */ - - assert.includeMembers = function (superset, subset, msg) { - new Assertion(superset, msg).to.include.members(subset); - } - - /** - * ### .changes(function, object, property) - * - * Asserts that a function changes the value of a property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 22 }; - * assert.changes(fn, obj, 'val'); - * - * @name changes - * @param {Function} modifier function - * @param {Object} object - * @param {String} property name - * @param {String} message _optional_ - * @api public - */ - - assert.changes = function (fn, obj, prop) { - new Assertion(fn).to.change(obj, prop); - } - - /** - * ### .doesNotChange(function, object, property) - * - * Asserts that a function does not changes the value of a property - * - * var obj = { val: 10 }; - * var fn = function() { console.log('foo'); }; - * assert.doesNotChange(fn, obj, 'val'); - * - * @name doesNotChange - * @param {Function} modifier function - * @param {Object} object - * @param {String} property name - * @param {String} message _optional_ - * @api public - */ - - assert.doesNotChange = function (fn, obj, prop) { - new Assertion(fn).to.not.change(obj, prop); - } - - /** - * ### .increases(function, object, property) - * - * Asserts that a function increases an object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 13 }; - * assert.increases(fn, obj, 'val'); - * - * @name increases - * @param {Function} modifier function - * @param {Object} object - * @param {String} property name - * @param {String} message _optional_ - * @api public - */ - - assert.increases = function (fn, obj, prop) { - new Assertion(fn).to.increase(obj, prop); - } - - /** - * ### .doesNotIncrease(function, object, property) - * - * Asserts that a function does not increase object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 8 }; - * assert.doesNotIncrease(fn, obj, 'val'); - * - * @name doesNotIncrease - * @param {Function} modifier function - * @param {Object} object - * @param {String} property name - * @param {String} message _optional_ - * @api public - */ - - assert.doesNotIncrease = function (fn, obj, prop) { - new Assertion(fn).to.not.increase(obj, prop); - } - - /** - * ### .decreases(function, object, property) - * - * Asserts that a function decreases an object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 5 }; - * assert.decreases(fn, obj, 'val'); - * - * @name decreases - * @param {Function} modifier function - * @param {Object} object - * @param {String} property name - * @param {String} message _optional_ - * @api public - */ - - assert.decreases = function (fn, obj, prop) { - new Assertion(fn).to.decrease(obj, prop); - } - - /** - * ### .doesNotDecrease(function, object, property) - * - * Asserts that a function does not decreases an object property - * - * var obj = { val: 10 }; - * var fn = function() { obj.val = 15 }; - * assert.doesNotDecrease(fn, obj, 'val'); - * - * @name doesNotDecrease - * @param {Function} modifier function - * @param {Object} object - * @param {String} property name - * @param {String} message _optional_ - * @api public - */ - - assert.doesNotDecrease = function (fn, obj, prop) { - new Assertion(fn).to.not.decrease(obj, prop); - } - - /*! - * Undocumented / untested - */ - - assert.ifError = function (val, msg) { - new Assertion(val, msg).to.not.be.ok; - }; - - /*! - * Aliases. - */ - - (function alias(name, as){ - assert[as] = assert[name]; - return alias; - }) - ('Throw', 'throw') - ('Throw', 'throws'); -}; diff --git a/cli/node_modules/chai/lib/chai/interface/expect.js b/cli/node_modules/chai/lib/chai/interface/expect.js deleted file mode 100644 index 89f9efd52..000000000 --- a/cli/node_modules/chai/lib/chai/interface/expect.js +++ /dev/null @@ -1,33 +0,0 @@ -/*! - * chai - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - -module.exports = function (chai, util) { - chai.expect = function (val, message) { - return new chai.Assertion(val, message); - }; - - /** - * ### .fail(actual, expected, [message], [operator]) - * - * Throw a failure. - * - * @name fail - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @param {String} operator - * @api public - */ - - chai.expect.fail = function (actual, expected, message, operator) { - message = message || 'expect.fail()'; - throw new chai.AssertionError(message, { - actual: actual - , expected: expected - , operator: operator - }, chai.expect.fail); - }; -}; diff --git a/cli/node_modules/chai/lib/chai/interface/should.js b/cli/node_modules/chai/lib/chai/interface/should.js deleted file mode 100644 index 4e76c1d68..000000000 --- a/cli/node_modules/chai/lib/chai/interface/should.js +++ /dev/null @@ -1,98 +0,0 @@ -/*! - * chai - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - -module.exports = function (chai, util) { - var Assertion = chai.Assertion; - - function loadShould () { - // explicitly define this method as function as to have it's name to include as `ssfi` - function shouldGetter() { - if (this instanceof String || this instanceof Number || this instanceof Boolean ) { - return new Assertion(this.valueOf(), null, shouldGetter); - } - return new Assertion(this, null, shouldGetter); - } - function shouldSetter(value) { - // See https://github.com/chaijs/chai/issues/86: this makes - // `whatever.should = someValue` actually set `someValue`, which is - // especially useful for `global.should = require('chai').should()`. - // - // Note that we have to use [[DefineProperty]] instead of [[Put]] - // since otherwise we would trigger this very setter! - Object.defineProperty(this, 'should', { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } - // modify Object.prototype to have `should` - Object.defineProperty(Object.prototype, 'should', { - set: shouldSetter - , get: shouldGetter - , configurable: true - }); - - var should = {}; - - /** - * ### .fail(actual, expected, [message], [operator]) - * - * Throw a failure. - * - * @name fail - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @param {String} operator - * @api public - */ - - should.fail = function (actual, expected, message, operator) { - message = message || 'should.fail()'; - throw new chai.AssertionError(message, { - actual: actual - , expected: expected - , operator: operator - }, should.fail); - }; - - should.equal = function (val1, val2, msg) { - new Assertion(val1, msg).to.equal(val2); - }; - - should.Throw = function (fn, errt, errs, msg) { - new Assertion(fn, msg).to.Throw(errt, errs); - }; - - should.exist = function (val, msg) { - new Assertion(val, msg).to.exist; - } - - // negation - should.not = {} - - should.not.equal = function (val1, val2, msg) { - new Assertion(val1, msg).to.not.equal(val2); - }; - - should.not.Throw = function (fn, errt, errs, msg) { - new Assertion(fn, msg).to.not.Throw(errt, errs); - }; - - should.not.exist = function (val, msg) { - new Assertion(val, msg).to.not.exist; - } - - should['throw'] = should['Throw']; - should.not['throw'] = should.not['Throw']; - - return should; - }; - - chai.should = loadShould; - chai.Should = loadShould; -}; diff --git a/cli/node_modules/chai/lib/chai/utils/addChainableMethod.js b/cli/node_modules/chai/lib/chai/utils/addChainableMethod.js deleted file mode 100644 index 57b4d66b4..000000000 --- a/cli/node_modules/chai/lib/chai/utils/addChainableMethod.js +++ /dev/null @@ -1,111 +0,0 @@ -/*! - * Chai - addChainingMethod utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/*! - * Module dependencies - */ - -var transferFlags = require('./transferFlags'); -var flag = require('./flag'); -var config = require('../config'); - -/*! - * Module variables - */ - -// Check whether `__proto__` is supported -var hasProtoSupport = '__proto__' in Object; - -// Without `__proto__` support, this module will need to add properties to a function. -// However, some Function.prototype methods cannot be overwritten, -// and there seems no easy cross-platform way to detect them (@see chaijs/chai/issues/69). -var excludeNames = /^(?:length|name|arguments|caller)$/; - -// Cache `Function` properties -var call = Function.prototype.call, - apply = Function.prototype.apply; - -/** - * ### addChainableMethod (ctx, name, method, chainingBehavior) - * - * Adds a method to an object, such that the method can also be chained. - * - * utils.addChainableMethod(chai.Assertion.prototype, 'foo', function (str) { - * var obj = utils.flag(this, 'object'); - * new chai.Assertion(obj).to.be.equal(str); - * }); - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.addChainableMethod('foo', fn, chainingBehavior); - * - * The result can then be used as both a method assertion, executing both `method` and - * `chainingBehavior`, or as a language chain, which only executes `chainingBehavior`. - * - * expect(fooStr).to.be.foo('bar'); - * expect(fooStr).to.be.foo.equal('foo'); - * - * @param {Object} ctx object to which the method is added - * @param {String} name of method to add - * @param {Function} method function to be used for `name`, when called - * @param {Function} chainingBehavior function to be called every time the property is accessed - * @name addChainableMethod - * @api public - */ - -module.exports = function (ctx, name, method, chainingBehavior) { - if (typeof chainingBehavior !== 'function') { - chainingBehavior = function () { }; - } - - var chainableBehavior = { - method: method - , chainingBehavior: chainingBehavior - }; - - // save the methods so we can overwrite them later, if we need to. - if (!ctx.__methods) { - ctx.__methods = {}; - } - ctx.__methods[name] = chainableBehavior; - - Object.defineProperty(ctx, name, - { get: function () { - chainableBehavior.chainingBehavior.call(this); - - var assert = function assert() { - var old_ssfi = flag(this, 'ssfi'); - if (old_ssfi && config.includeStack === false) - flag(this, 'ssfi', assert); - var result = chainableBehavior.method.apply(this, arguments); - return result === undefined ? this : result; - }; - - // Use `__proto__` if available - if (hasProtoSupport) { - // Inherit all properties from the object by replacing the `Function` prototype - var prototype = assert.__proto__ = Object.create(this); - // Restore the `call` and `apply` methods from `Function` - prototype.call = call; - prototype.apply = apply; - } - // Otherwise, redefine all properties (slow!) - else { - var asserterNames = Object.getOwnPropertyNames(ctx); - asserterNames.forEach(function (asserterName) { - if (!excludeNames.test(asserterName)) { - var pd = Object.getOwnPropertyDescriptor(ctx, asserterName); - Object.defineProperty(assert, asserterName, pd); - } - }); - } - - transferFlags(this, assert); - return assert; - } - , configurable: true - }); -}; diff --git a/cli/node_modules/chai/lib/chai/utils/addMethod.js b/cli/node_modules/chai/lib/chai/utils/addMethod.js deleted file mode 100644 index 23364d335..000000000 --- a/cli/node_modules/chai/lib/chai/utils/addMethod.js +++ /dev/null @@ -1,43 +0,0 @@ -/*! - * Chai - addMethod utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -var config = require('../config'); - -/** - * ### .addMethod (ctx, name, method) - * - * Adds a method to the prototype of an object. - * - * utils.addMethod(chai.Assertion.prototype, 'foo', function (str) { - * var obj = utils.flag(this, 'object'); - * new chai.Assertion(obj).to.be.equal(str); - * }); - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.addMethod('foo', fn); - * - * Then can be used as any other assertion. - * - * expect(fooStr).to.be.foo('bar'); - * - * @param {Object} ctx object to which the method is added - * @param {String} name of method to add - * @param {Function} method function to be used for name - * @name addMethod - * @api public - */ -var flag = require('./flag'); - -module.exports = function (ctx, name, method) { - ctx[name] = function () { - var old_ssfi = flag(this, 'ssfi'); - if (old_ssfi && config.includeStack === false) - flag(this, 'ssfi', ctx[name]); - var result = method.apply(this, arguments); - return result === undefined ? this : result; - }; -}; diff --git a/cli/node_modules/chai/lib/chai/utils/addProperty.js b/cli/node_modules/chai/lib/chai/utils/addProperty.js deleted file mode 100644 index a34b3f4d3..000000000 --- a/cli/node_modules/chai/lib/chai/utils/addProperty.js +++ /dev/null @@ -1,40 +0,0 @@ -/*! - * Chai - addProperty utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### addProperty (ctx, name, getter) - * - * Adds a property to the prototype of an object. - * - * utils.addProperty(chai.Assertion.prototype, 'foo', function () { - * var obj = utils.flag(this, 'object'); - * new chai.Assertion(obj).to.be.instanceof(Foo); - * }); - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.addProperty('foo', fn); - * - * Then can be used as any other assertion. - * - * expect(myFoo).to.be.foo; - * - * @param {Object} ctx object to which the property is added - * @param {String} name of property to add - * @param {Function} getter function to be used for name - * @name addProperty - * @api public - */ - -module.exports = function (ctx, name, getter) { - Object.defineProperty(ctx, name, - { get: function () { - var result = getter.call(this); - return result === undefined ? this : result; - } - , configurable: true - }); -}; diff --git a/cli/node_modules/chai/lib/chai/utils/flag.js b/cli/node_modules/chai/lib/chai/utils/flag.js deleted file mode 100644 index 446553d4a..000000000 --- a/cli/node_modules/chai/lib/chai/utils/flag.js +++ /dev/null @@ -1,32 +0,0 @@ -/*! - * Chai - flag utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### flag(object, key, [value]) - * - * Get or set a flag value on an object. If a - * value is provided it will be set, else it will - * return the currently set value or `undefined` if - * the value is not set. - * - * utils.flag(this, 'foo', 'bar'); // setter - * utils.flag(this, 'foo'); // getter, returns `bar` - * - * @param {Object} object constructed Assertion - * @param {String} key - * @param {Mixed} value (optional) - * @name flag - * @api private - */ - -module.exports = function (obj, key, value) { - var flags = obj.__flags || (obj.__flags = Object.create(null)); - if (arguments.length === 3) { - flags[key] = value; - } else { - return flags[key]; - } -}; diff --git a/cli/node_modules/chai/lib/chai/utils/getActual.js b/cli/node_modules/chai/lib/chai/utils/getActual.js deleted file mode 100644 index 4b4dcfeae..000000000 --- a/cli/node_modules/chai/lib/chai/utils/getActual.js +++ /dev/null @@ -1,18 +0,0 @@ -/*! - * Chai - getActual utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * # getActual(object, [actual]) - * - * Returns the `actual` value for an Assertion - * - * @param {Object} object (constructed Assertion) - * @param {Arguments} chai.Assertion.prototype.assert arguments - */ - -module.exports = function (obj, args) { - return args.length > 4 ? args[4] : obj._obj; -}; diff --git a/cli/node_modules/chai/lib/chai/utils/getEnumerableProperties.js b/cli/node_modules/chai/lib/chai/utils/getEnumerableProperties.js deleted file mode 100644 index 56578028d..000000000 --- a/cli/node_modules/chai/lib/chai/utils/getEnumerableProperties.js +++ /dev/null @@ -1,25 +0,0 @@ -/*! - * Chai - getEnumerableProperties utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### .getEnumerableProperties(object) - * - * This allows the retrieval of enumerable property names of an object, - * inherited or not. - * - * @param {Object} object - * @returns {Array} - * @name getEnumerableProperties - * @api public - */ - -module.exports = function getEnumerableProperties(object) { - var result = []; - for (var name in object) { - result.push(name); - } - return result; -}; diff --git a/cli/node_modules/chai/lib/chai/utils/getMessage.js b/cli/node_modules/chai/lib/chai/utils/getMessage.js deleted file mode 100644 index 910c6b834..000000000 --- a/cli/node_modules/chai/lib/chai/utils/getMessage.js +++ /dev/null @@ -1,50 +0,0 @@ -/*! - * Chai - message composition utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/*! - * Module dependancies - */ - -var flag = require('./flag') - , getActual = require('./getActual') - , inspect = require('./inspect') - , objDisplay = require('./objDisplay'); - -/** - * ### .getMessage(object, message, negateMessage) - * - * Construct the error message based on flags - * and template tags. Template tags will return - * a stringified inspection of the object referenced. - * - * Message template tags: - * - `#{this}` current asserted object - * - `#{act}` actual value - * - `#{exp}` expected value - * - * @param {Object} object (constructed Assertion) - * @param {Arguments} chai.Assertion.prototype.assert arguments - * @name getMessage - * @api public - */ - -module.exports = function (obj, args) { - var negate = flag(obj, 'negate') - , val = flag(obj, 'object') - , expected = args[3] - , actual = getActual(obj, args) - , msg = negate ? args[2] : args[1] - , flagMsg = flag(obj, 'message'); - - if(typeof msg === "function") msg = msg(); - msg = msg || ''; - msg = msg - .replace(/#{this}/g, objDisplay(val)) - .replace(/#{act}/g, objDisplay(actual)) - .replace(/#{exp}/g, objDisplay(expected)); - - return flagMsg ? flagMsg + ': ' + msg : msg; -}; diff --git a/cli/node_modules/chai/lib/chai/utils/getName.js b/cli/node_modules/chai/lib/chai/utils/getName.js deleted file mode 100644 index b8d3ed2de..000000000 --- a/cli/node_modules/chai/lib/chai/utils/getName.js +++ /dev/null @@ -1,20 +0,0 @@ -/*! - * Chai - getName utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * # getName(func) - * - * Gets the name of a function, in a cross-browser way. - * - * @param {Function} a function (usually a constructor) - */ - -module.exports = function (func) { - if (func.name) return func.name; - - var match = /^\s?function ([^(]*)\(/.exec(func); - return match && match[1] ? match[1] : ""; -}; diff --git a/cli/node_modules/chai/lib/chai/utils/getPathInfo.js b/cli/node_modules/chai/lib/chai/utils/getPathInfo.js deleted file mode 100644 index 3bb19d224..000000000 --- a/cli/node_modules/chai/lib/chai/utils/getPathInfo.js +++ /dev/null @@ -1,110 +0,0 @@ -/*! - * Chai - getPathInfo utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -var hasProperty = require('./hasProperty'); - -/** - * ### .getPathInfo(path, object) - * - * This allows the retrieval of property info in an - * object given a string path. - * - * The path info consists of an object with the - * following properties: - * - * * parent - The parent object of the property referenced by `path` - * * name - The name of the final property, a number if it was an array indexer - * * value - The value of the property, if it exists, otherwise `undefined` - * * exists - Whether the property exists or not - * - * @param {String} path - * @param {Object} object - * @returns {Object} info - * @name getPathInfo - * @api public - */ - -module.exports = function getPathInfo(path, obj) { - var parsed = parsePath(path), - last = parsed[parsed.length - 1]; - - var info = { - parent: parsed.length > 1 ? _getPathValue(parsed, obj, parsed.length - 1) : obj, - name: last.p || last.i, - value: _getPathValue(parsed, obj), - }; - info.exists = hasProperty(info.name, info.parent); - - return info; -}; - - -/*! - * ## parsePath(path) - * - * Helper function used to parse string object - * paths. Use in conjunction with `_getPathValue`. - * - * var parsed = parsePath('myobject.property.subprop'); - * - * ### Paths: - * - * * Can be as near infinitely deep and nested - * * Arrays are also valid using the formal `myobject.document[3].property`. - * * Literal dots and brackets (not delimiter) must be backslash-escaped. - * - * @param {String} path - * @returns {Object} parsed - * @api private - */ - -function parsePath (path) { - var str = path.replace(/([^\\])\[/g, '$1.[') - , parts = str.match(/(\\\.|[^.]+?)+/g); - return parts.map(function (value) { - var re = /^\[(\d+)\]$/ - , mArr = re.exec(value); - if (mArr) return { i: parseFloat(mArr[1]) }; - else return { p: value.replace(/\\([.\[\]])/g, '$1') }; - }); -} - - -/*! - * ## _getPathValue(parsed, obj) - * - * Helper companion function for `.parsePath` that returns - * the value located at the parsed address. - * - * var value = getPathValue(parsed, obj); - * - * @param {Object} parsed definition from `parsePath`. - * @param {Object} object to search against - * @param {Number} object to search against - * @returns {Object|Undefined} value - * @api private - */ - -function _getPathValue (parsed, obj, index) { - var tmp = obj - , res; - - index = (index === undefined ? parsed.length : index); - - for (var i = 0, l = index; i < l; i++) { - var part = parsed[i]; - if (tmp) { - if ('undefined' !== typeof part.p) - tmp = tmp[part.p]; - else if ('undefined' !== typeof part.i) - tmp = tmp[part.i]; - if (i == (l - 1)) res = tmp; - } else { - res = undefined; - } - } - return res; -} diff --git a/cli/node_modules/chai/lib/chai/utils/getPathValue.js b/cli/node_modules/chai/lib/chai/utils/getPathValue.js deleted file mode 100644 index eb94f99e4..000000000 --- a/cli/node_modules/chai/lib/chai/utils/getPathValue.js +++ /dev/null @@ -1,42 +0,0 @@ -/*! - * Chai - getPathValue utility - * Copyright(c) 2012-2014 Jake Luer - * @see https://github.com/logicalparadox/filtr - * MIT Licensed - */ - -var getPathInfo = require('./getPathInfo'); - -/** - * ### .getPathValue(path, object) - * - * This allows the retrieval of values in an - * object given a string path. - * - * var obj = { - * prop1: { - * arr: ['a', 'b', 'c'] - * , str: 'Hello' - * } - * , prop2: { - * arr: [ { nested: 'Universe' } ] - * , str: 'Hello again!' - * } - * } - * - * The following would be the results. - * - * getPathValue('prop1.str', obj); // Hello - * getPathValue('prop1.att[2]', obj); // b - * getPathValue('prop2.arr[0].nested', obj); // Universe - * - * @param {String} path - * @param {Object} object - * @returns {Object} value or `undefined` - * @name getPathValue - * @api public - */ -module.exports = function(path, obj) { - var info = getPathInfo(path, obj); - return info.value; -}; diff --git a/cli/node_modules/chai/lib/chai/utils/getProperties.js b/cli/node_modules/chai/lib/chai/utils/getProperties.js deleted file mode 100644 index dbdc9c119..000000000 --- a/cli/node_modules/chai/lib/chai/utils/getProperties.js +++ /dev/null @@ -1,35 +0,0 @@ -/*! - * Chai - getProperties utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### .getProperties(object) - * - * This allows the retrieval of property names of an object, enumerable or not, - * inherited or not. - * - * @param {Object} object - * @returns {Array} - * @name getProperties - * @api public - */ - -module.exports = function getProperties(object) { - var result = Object.getOwnPropertyNames(subject); - - function addProperty(property) { - if (result.indexOf(property) === -1) { - result.push(property); - } - } - - var proto = Object.getPrototypeOf(subject); - while (proto !== null) { - Object.getOwnPropertyNames(proto).forEach(addProperty); - proto = Object.getPrototypeOf(proto); - } - - return result; -}; diff --git a/cli/node_modules/chai/lib/chai/utils/hasProperty.js b/cli/node_modules/chai/lib/chai/utils/hasProperty.js deleted file mode 100644 index 6ebea84b5..000000000 --- a/cli/node_modules/chai/lib/chai/utils/hasProperty.js +++ /dev/null @@ -1,63 +0,0 @@ -/*! - * Chai - hasProperty utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -var type = require('./type'); - -/** - * ### .hasProperty(object, name) - * - * This allows checking whether an object has - * named property or numeric array index. - * - * Basically does the same thing as the `in` - * operator but works properly with natives - * and null/undefined values. - * - * var obj = { - * arr: ['a', 'b', 'c'] - * , str: 'Hello' - * } - * - * The following would be the results. - * - * hasProperty('str', obj); // true - * hasProperty('constructor', obj); // true - * hasProperty('bar', obj); // false - * - * hasProperty('length', obj.str); // true - * hasProperty(1, obj.str); // true - * hasProperty(5, obj.str); // false - * - * hasProperty('length', obj.arr); // true - * hasProperty(2, obj.arr); // true - * hasProperty(3, obj.arr); // false - * - * @param {Objuect} object - * @param {String|Number} name - * @returns {Boolean} whether it exists - * @name getPathInfo - * @api public - */ - -var literals = { - 'number': Number - , 'string': String -}; - -module.exports = function hasProperty(name, obj) { - var ot = type(obj); - - // Bad Object, obviously no props at all - if(ot === 'null' || ot === 'undefined') - return false; - - // The `in` operator does not work with certain literals - // box these before the check - if(literals[ot] && typeof obj !== 'object') - obj = new literals[ot](obj); - - return name in obj; -}; diff --git a/cli/node_modules/chai/lib/chai/utils/index.js b/cli/node_modules/chai/lib/chai/utils/index.js deleted file mode 100644 index 4ed87ed46..000000000 --- a/cli/node_modules/chai/lib/chai/utils/index.js +++ /dev/null @@ -1,126 +0,0 @@ -/*! - * chai - * Copyright(c) 2011 Jake Luer - * MIT Licensed - */ - -/*! - * Main exports - */ - -var exports = module.exports = {}; - -/*! - * test utility - */ - -exports.test = require('./test'); - -/*! - * type utility - */ - -exports.type = require('./type'); - -/*! - * message utility - */ - -exports.getMessage = require('./getMessage'); - -/*! - * actual utility - */ - -exports.getActual = require('./getActual'); - -/*! - * Inspect util - */ - -exports.inspect = require('./inspect'); - -/*! - * Object Display util - */ - -exports.objDisplay = require('./objDisplay'); - -/*! - * Flag utility - */ - -exports.flag = require('./flag'); - -/*! - * Flag transferring utility - */ - -exports.transferFlags = require('./transferFlags'); - -/*! - * Deep equal utility - */ - -exports.eql = require('deep-eql'); - -/*! - * Deep path value - */ - -exports.getPathValue = require('./getPathValue'); - -/*! - * Deep path info - */ - -exports.getPathInfo = require('./getPathInfo'); - -/*! - * Check if a property exists - */ - -exports.hasProperty = require('./hasProperty'); - -/*! - * Function name - */ - -exports.getName = require('./getName'); - -/*! - * add Property - */ - -exports.addProperty = require('./addProperty'); - -/*! - * add Method - */ - -exports.addMethod = require('./addMethod'); - -/*! - * overwrite Property - */ - -exports.overwriteProperty = require('./overwriteProperty'); - -/*! - * overwrite Method - */ - -exports.overwriteMethod = require('./overwriteMethod'); - -/*! - * Add a chainable method - */ - -exports.addChainableMethod = require('./addChainableMethod'); - -/*! - * Overwrite chainable method - */ - -exports.overwriteChainableMethod = require('./overwriteChainableMethod'); - diff --git a/cli/node_modules/chai/lib/chai/utils/inspect.js b/cli/node_modules/chai/lib/chai/utils/inspect.js deleted file mode 100644 index 41f1821a6..000000000 --- a/cli/node_modules/chai/lib/chai/utils/inspect.js +++ /dev/null @@ -1,333 +0,0 @@ -// This is (almost) directly from Node.js utils -// https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js - -var getName = require('./getName'); -var getProperties = require('./getProperties'); -var getEnumerableProperties = require('./getEnumerableProperties'); - -module.exports = inspect; - -/** - * Echos the value of a value. Trys to print the value out - * in the best way possible given the different types. - * - * @param {Object} obj The object to print out. - * @param {Boolean} showHidden Flag that shows hidden (not enumerable) - * properties of objects. - * @param {Number} depth Depth in which to descend in object. Default is 2. - * @param {Boolean} colors Flag to turn on ANSI escape codes to color the - * output. Default is false (no coloring). - */ -function inspect(obj, showHidden, depth, colors) { - var ctx = { - showHidden: showHidden, - seen: [], - stylize: function (str) { return str; } - }; - return formatValue(ctx, obj, (typeof depth === 'undefined' ? 2 : depth)); -} - -// Returns true if object is a DOM element. -var isDOMElement = function (object) { - if (typeof HTMLElement === 'object') { - return object instanceof HTMLElement; - } else { - return object && - typeof object === 'object' && - object.nodeType === 1 && - typeof object.nodeName === 'string'; - } -}; - -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (value && typeof value.inspect === 'function' && - // Filter out the util module, it's inspect function is special - value.inspect !== exports.inspect && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes); - if (typeof ret !== 'string') { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // If this is a DOM element, try to get the outer HTML. - if (isDOMElement(value)) { - if ('outerHTML' in value) { - return value.outerHTML; - // This value does not have an outerHTML attribute, - // it could still be an XML element - } else { - // Attempt to serialize it - try { - if (document.xmlVersion) { - var xmlSerializer = new XMLSerializer(); - return xmlSerializer.serializeToString(value); - } else { - // Firefox 11- do not support outerHTML - // It does, however, support innerHTML - // Use the following to render the element - var ns = "http://www.w3.org/1999/xhtml"; - var container = document.createElementNS(ns, '_'); - - container.appendChild(value.cloneNode(false)); - html = container.innerHTML - .replace('><', '>' + value.innerHTML + '<'); - container.innerHTML = ''; - return html; - } - } catch (err) { - // This could be a non-native DOM implementation, - // continue with the normal flow: - // printing the element as if it is an object. - } - } - } - - // Look up the keys of the object. - var visibleKeys = getEnumerableProperties(value); - var keys = ctx.showHidden ? getProperties(value) : visibleKeys; - - // Some type of object without properties can be shortcutted. - // In IE, errors have a single `stack` property, or if they are vanilla `Error`, - // a `stack` plus `description` property; ignore those for consistency. - if (keys.length === 0 || (isError(value) && ( - (keys.length === 1 && keys[0] === 'stack') || - (keys.length === 2 && keys[0] === 'description' && keys[1] === 'stack') - ))) { - if (typeof value === 'function') { - var name = getName(value); - var nameSuffix = name ? ': ' + name : ''; - return ctx.stylize('[Function' + nameSuffix + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toUTCString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (typeof value === 'function') { - var name = getName(value); - var nameSuffix = name ? ': ' + name : ''; - base = ' [Function' + nameSuffix + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - return formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - switch (typeof value) { - case 'undefined': - return ctx.stylize('undefined', 'undefined'); - - case 'string': - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - - case 'number': - if (value === 0 && (1/value) === -Infinity) { - return ctx.stylize('-0', 'number'); - } - return ctx.stylize('' + value, 'number'); - - case 'boolean': - return ctx.stylize('' + value, 'boolean'); - } - // For some reason typeof null is "object", so special case here. - if (value === null) { - return ctx.stylize('null', 'null'); - } -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (Object.prototype.hasOwnProperty.call(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str; - if (value.__lookupGetter__) { - if (value.__lookupGetter__(key)) { - if (value.__lookupSetter__(key)) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (value.__lookupSetter__(key)) { - str = ctx.stylize('[Setter]', 'special'); - } - } - } - if (visibleKeys.indexOf(key) < 0) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(value[key]) < 0) { - if (recurseTimes === null) { - str = formatValue(ctx, value[key], null); - } else { - str = formatValue(ctx, value[key], recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (typeof name === 'undefined') { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - -function isArray(ar) { - return Array.isArray(ar) || - (typeof ar === 'object' && objectToString(ar) === '[object Array]'); -} - -function isRegExp(re) { - return typeof re === 'object' && objectToString(re) === '[object RegExp]'; -} - -function isDate(d) { - return typeof d === 'object' && objectToString(d) === '[object Date]'; -} - -function isError(e) { - return typeof e === 'object' && objectToString(e) === '[object Error]'; -} - -function objectToString(o) { - return Object.prototype.toString.call(o); -} diff --git a/cli/node_modules/chai/lib/chai/utils/objDisplay.js b/cli/node_modules/chai/lib/chai/utils/objDisplay.js deleted file mode 100644 index a36a092c0..000000000 --- a/cli/node_modules/chai/lib/chai/utils/objDisplay.js +++ /dev/null @@ -1,49 +0,0 @@ -/*! - * Chai - flag utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/*! - * Module dependancies - */ - -var inspect = require('./inspect'); -var config = require('../config'); - -/** - * ### .objDisplay (object) - * - * Determines if an object or an array matches - * criteria to be inspected in-line for error - * messages or should be truncated. - * - * @param {Mixed} javascript object to inspect - * @name objDisplay - * @api public - */ - -module.exports = function (obj) { - var str = inspect(obj) - , type = Object.prototype.toString.call(obj); - - if (config.truncateThreshold && str.length >= config.truncateThreshold) { - if (type === '[object Function]') { - return !obj.name || obj.name === '' - ? '[Function]' - : '[Function: ' + obj.name + ']'; - } else if (type === '[object Array]') { - return '[ Array(' + obj.length + ') ]'; - } else if (type === '[object Object]') { - var keys = Object.keys(obj) - , kstr = keys.length > 2 - ? keys.splice(0, 2).join(', ') + ', ...' - : keys.join(', '); - return '{ Object (' + kstr + ') }'; - } else { - return str; - } - } else { - return str; - } -}; diff --git a/cli/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js b/cli/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js deleted file mode 100644 index 9d08efc57..000000000 --- a/cli/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js +++ /dev/null @@ -1,53 +0,0 @@ -/*! - * Chai - overwriteChainableMethod utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### overwriteChainableMethod (ctx, name, method, chainingBehavior) - * - * Overwites an already existing chainable method - * and provides access to the previous function or - * property. Must return functions to be used for - * name. - * - * utils.overwriteChainableMethod(chai.Assertion.prototype, 'length', - * function (_super) { - * } - * , function (_super) { - * } - * ); - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.overwriteChainableMethod('foo', fn, fn); - * - * Then can be used as any other assertion. - * - * expect(myFoo).to.have.length(3); - * expect(myFoo).to.have.length.above(3); - * - * @param {Object} ctx object whose method / property is to be overwritten - * @param {String} name of method / property to overwrite - * @param {Function} method function that returns a function to be used for name - * @param {Function} chainingBehavior function that returns a function to be used for property - * @name overwriteChainableMethod - * @api public - */ - -module.exports = function (ctx, name, method, chainingBehavior) { - var chainableBehavior = ctx.__methods[name]; - - var _chainingBehavior = chainableBehavior.chainingBehavior; - chainableBehavior.chainingBehavior = function () { - var result = chainingBehavior(_chainingBehavior).call(this); - return result === undefined ? this : result; - }; - - var _method = chainableBehavior.method; - chainableBehavior.method = function () { - var result = method(_method).apply(this, arguments); - return result === undefined ? this : result; - }; -}; diff --git a/cli/node_modules/chai/lib/chai/utils/overwriteMethod.js b/cli/node_modules/chai/lib/chai/utils/overwriteMethod.js deleted file mode 100644 index 66b158916..000000000 --- a/cli/node_modules/chai/lib/chai/utils/overwriteMethod.js +++ /dev/null @@ -1,51 +0,0 @@ -/*! - * Chai - overwriteMethod utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### overwriteMethod (ctx, name, fn) - * - * Overwites an already existing method and provides - * access to previous function. Must return function - * to be used for name. - * - * utils.overwriteMethod(chai.Assertion.prototype, 'equal', function (_super) { - * return function (str) { - * var obj = utils.flag(this, 'object'); - * if (obj instanceof Foo) { - * new chai.Assertion(obj.value).to.equal(str); - * } else { - * _super.apply(this, arguments); - * } - * } - * }); - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.overwriteMethod('foo', fn); - * - * Then can be used as any other assertion. - * - * expect(myFoo).to.equal('bar'); - * - * @param {Object} ctx object whose method is to be overwritten - * @param {String} name of method to overwrite - * @param {Function} method function that returns a function to be used for name - * @name overwriteMethod - * @api public - */ - -module.exports = function (ctx, name, method) { - var _method = ctx[name] - , _super = function () { return this; }; - - if (_method && 'function' === typeof _method) - _super = _method; - - ctx[name] = function () { - var result = method(_super).apply(this, arguments); - return result === undefined ? this : result; - } -}; diff --git a/cli/node_modules/chai/lib/chai/utils/overwriteProperty.js b/cli/node_modules/chai/lib/chai/utils/overwriteProperty.js deleted file mode 100644 index a23ba5942..000000000 --- a/cli/node_modules/chai/lib/chai/utils/overwriteProperty.js +++ /dev/null @@ -1,54 +0,0 @@ -/*! - * Chai - overwriteProperty utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### overwriteProperty (ctx, name, fn) - * - * Overwites an already existing property getter and provides - * access to previous value. Must return function to use as getter. - * - * utils.overwriteProperty(chai.Assertion.prototype, 'ok', function (_super) { - * return function () { - * var obj = utils.flag(this, 'object'); - * if (obj instanceof Foo) { - * new chai.Assertion(obj.name).to.equal('bar'); - * } else { - * _super.call(this); - * } - * } - * }); - * - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.overwriteProperty('foo', fn); - * - * Then can be used as any other assertion. - * - * expect(myFoo).to.be.ok; - * - * @param {Object} ctx object whose property is to be overwritten - * @param {String} name of property to overwrite - * @param {Function} getter function that returns a getter function to be used for name - * @name overwriteProperty - * @api public - */ - -module.exports = function (ctx, name, getter) { - var _get = Object.getOwnPropertyDescriptor(ctx, name) - , _super = function () {}; - - if (_get && 'function' === typeof _get.get) - _super = _get.get - - Object.defineProperty(ctx, name, - { get: function () { - var result = getter(_super).call(this); - return result === undefined ? this : result; - } - , configurable: true - }); -}; diff --git a/cli/node_modules/chai/lib/chai/utils/test.js b/cli/node_modules/chai/lib/chai/utils/test.js deleted file mode 100644 index 22cbb9543..000000000 --- a/cli/node_modules/chai/lib/chai/utils/test.js +++ /dev/null @@ -1,26 +0,0 @@ -/*! - * Chai - test utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/*! - * Module dependancies - */ - -var flag = require('./flag'); - -/** - * # test(object, expression) - * - * Test and object for expression. - * - * @param {Object} object (constructed Assertion) - * @param {Arguments} chai.Assertion.prototype.assert arguments - */ - -module.exports = function (obj, args) { - var negate = flag(obj, 'negate') - , expr = args[0]; - return negate ? !expr : expr; -}; diff --git a/cli/node_modules/chai/lib/chai/utils/transferFlags.js b/cli/node_modules/chai/lib/chai/utils/transferFlags.js deleted file mode 100644 index 8782f1649..000000000 --- a/cli/node_modules/chai/lib/chai/utils/transferFlags.js +++ /dev/null @@ -1,44 +0,0 @@ -/*! - * Chai - transferFlags utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### transferFlags(assertion, object, includeAll = true) - * - * Transfer all the flags for `assertion` to `object`. If - * `includeAll` is set to `false`, then the base Chai - * assertion flags (namely `object`, `ssfi`, and `message`) - * will not be transferred. - * - * - * var newAssertion = new Assertion(); - * utils.transferFlags(assertion, newAssertion); - * - * var anotherAsseriton = new Assertion(myObj); - * utils.transferFlags(assertion, anotherAssertion, false); - * - * @param {Assertion} assertion the assertion to transfer the flags from - * @param {Object} object the object to transfer the flags to; usually a new assertion - * @param {Boolean} includeAll - * @name transferFlags - * @api private - */ - -module.exports = function (assertion, object, includeAll) { - var flags = assertion.__flags || (assertion.__flags = Object.create(null)); - - if (!object.__flags) { - object.__flags = Object.create(null); - } - - includeAll = arguments.length === 3 ? includeAll : true; - - for (var flag in flags) { - if (includeAll || - (flag !== 'object' && flag !== 'ssfi' && flag != 'message')) { - object.__flags[flag] = flags[flag]; - } - } -}; diff --git a/cli/node_modules/chai/lib/chai/utils/type.js b/cli/node_modules/chai/lib/chai/utils/type.js deleted file mode 100644 index 99392d0ad..000000000 --- a/cli/node_modules/chai/lib/chai/utils/type.js +++ /dev/null @@ -1,45 +0,0 @@ -/*! - * Chai - type utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/*! - * Detectable javascript natives - */ - -var natives = { - '[object Arguments]': 'arguments' - , '[object Array]': 'array' - , '[object Date]': 'date' - , '[object Function]': 'function' - , '[object Number]': 'number' - , '[object RegExp]': 'regexp' - , '[object String]': 'string' -}; - -/** - * ### type(object) - * - * Better implementation of `typeof` detection that can - * be used cross-browser. Handles the inconsistencies of - * Array, `null`, and `undefined` detection. - * - * utils.type({}) // 'object' - * utils.type(null) // `null' - * utils.type(undefined) // `undefined` - * utils.type([]) // `array` - * - * @param {Mixed} object to detect type of - * @name type - * @api private - */ - -module.exports = function (obj) { - var str = Object.prototype.toString.call(obj); - if (natives[str]) return natives[str]; - if (obj === null) return 'null'; - if (obj === undefined) return 'undefined'; - if (obj === Object(obj)) return 'object'; - return typeof obj; -}; diff --git a/cli/node_modules/chai/node_modules/assertion-error/.npmignore b/cli/node_modules/chai/node_modules/assertion-error/.npmignore deleted file mode 100644 index f1059538d..000000000 --- a/cli/node_modules/chai/node_modules/assertion-error/.npmignore +++ /dev/null @@ -1,11 +0,0 @@ -docs/ -test/ -build/ -components/ -support/ -coverage.html -component.json -lib-cov -.travis.yml -Makefile -*.swp diff --git a/cli/node_modules/chai/node_modules/assertion-error/History.md b/cli/node_modules/chai/node_modules/assertion-error/History.md deleted file mode 100644 index 78cb9e321..000000000 --- a/cli/node_modules/chai/node_modules/assertion-error/History.md +++ /dev/null @@ -1,14 +0,0 @@ - -1.0.0 / 2013-06-08 -================== - - * readme: change travis and component urls - * refactor: [*] prepare for move to chaijs gh org - -0.1.0 / 2013-04-07 -================== - - * test: use vanilla test runner/assert - * pgk: remove unused deps - * lib: implement - * "Initial commit" diff --git a/cli/node_modules/chai/node_modules/assertion-error/README.md b/cli/node_modules/chai/node_modules/assertion-error/README.md deleted file mode 100644 index 6cf03c8f0..000000000 --- a/cli/node_modules/chai/node_modules/assertion-error/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# AssertionError [![Build Status](https://travis-ci.org/chaijs/assertion-error.png?branch=master)](https://travis-ci.org/chaijs/assertion-error) - -> Error constructor for test and validation frameworks that implements standardized AssertionError specification. - -## Installation - -### Node.js - -`assertion-error` is available on [npm](http://npmjs.org). - - $ npm install assertion-error - -### Component - -`assertion-error` is available as a [component](https://github.com/component/component). - - $ component install chaijs/assertion-error - -## License - -(The MIT License) - -Copyright (c) 2013 Jake Luer (http://qualiancy.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/cli/node_modules/chai/node_modules/assertion-error/index.js b/cli/node_modules/chai/node_modules/assertion-error/index.js deleted file mode 100644 index b599404c8..000000000 --- a/cli/node_modules/chai/node_modules/assertion-error/index.js +++ /dev/null @@ -1,110 +0,0 @@ -/*! - * assertion-error - * Copyright(c) 2013 Jake Luer - * MIT Licensed - */ - -/*! - * Return a function that will copy properties from - * one object to another excluding any originally - * listed. Returned function will create a new `{}`. - * - * @param {String} excluded properties ... - * @return {Function} - */ - -function exclude () { - var excludes = [].slice.call(arguments); - - function excludeProps (res, obj) { - Object.keys(obj).forEach(function (key) { - if (!~excludes.indexOf(key)) res[key] = obj[key]; - }); - } - - return function extendExclude () { - var args = [].slice.call(arguments) - , i = 0 - , res = {}; - - for (; i < args.length; i++) { - excludeProps(res, args[i]); - } - - return res; - }; -}; - -/*! - * Primary Exports - */ - -module.exports = AssertionError; - -/** - * ### AssertionError - * - * An extension of the JavaScript `Error` constructor for - * assertion and validation scenarios. - * - * @param {String} message - * @param {Object} properties to include (optional) - * @param {callee} start stack function (optional) - */ - -function AssertionError (message, _props, ssf) { - var extend = exclude('name', 'message', 'stack', 'constructor', 'toJSON') - , props = extend(_props || {}); - - // default values - this.message = message || 'Unspecified AssertionError'; - this.showDiff = false; - - // copy from properties - for (var key in props) { - this[key] = props[key]; - } - - // capture stack trace - ssf = ssf || arguments.callee; - if (ssf && Error.captureStackTrace) { - Error.captureStackTrace(this, ssf); - } -} - -/*! - * Inherit from Error.prototype - */ - -AssertionError.prototype = Object.create(Error.prototype); - -/*! - * Statically set name - */ - -AssertionError.prototype.name = 'AssertionError'; - -/*! - * Ensure correct constructor - */ - -AssertionError.prototype.constructor = AssertionError; - -/** - * Allow errors to be converted to JSON for static transfer. - * - * @param {Boolean} include stack (default: `true`) - * @return {Object} object that can be `JSON.stringify` - */ - -AssertionError.prototype.toJSON = function (stack) { - var extend = exclude('constructor', 'toJSON', 'stack') - , props = extend({ name: this.name }, this); - - // include stack if exists and not turned off - if (false !== stack && this.stack) { - props.stack = this.stack; - } - - return props; -}; diff --git a/cli/node_modules/chai/node_modules/assertion-error/package.json b/cli/node_modules/chai/node_modules/assertion-error/package.json deleted file mode 100644 index 29e8684ce..000000000 --- a/cli/node_modules/chai/node_modules/assertion-error/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "assertion-error", - "version": "1.0.0", - "description": "Error constructor for test and validation frameworks that implements standardized AssertionError specification.", - "author": { - "name": "Jake Luer", - "email": "jake@qualiancy.com", - "url": "http://qualiancy.com" - }, - "license": "MIT", - "keywords": [ - "test", - "assertion", - "assertion-error" - ], - "repository": { - "type": "git", - "url": "git@github.com:chaijs/assertion-error.git" - }, - "engines": { - "node": "*" - }, - "main": "./index", - "scripts": { - "test": "make test" - }, - "dependencies": {}, - "devDependencies": { - "component": "*" - }, - "bugs": { - "url": "https://github.com/chaijs/assertion-error/issues" - }, - "_id": "assertion-error@1.0.0", - "dist": { - "shasum": "c7f85438fdd466bc7ca16ab90c81513797a5d23b", - "tarball": "http://registry.npmjs.org/assertion-error/-/assertion-error-1.0.0.tgz" - }, - "_from": "assertion-error@1.0.0", - "_npmVersion": "1.2.23", - "_npmUser": { - "name": "jakeluer", - "email": "jake@alogicalparadox.com" - }, - "maintainers": [ - { - "name": "jakeluer", - "email": "jake@alogicalparadox.com" - } - ], - "directories": {}, - "_shasum": "c7f85438fdd466bc7ca16ab90c81513797a5d23b", - "_resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.0.tgz", - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/chaijs/assertion-error" -} diff --git a/cli/node_modules/chai/node_modules/deep-eql/.npmignore b/cli/node_modules/chai/node_modules/deep-eql/.npmignore deleted file mode 100644 index f1059538d..000000000 --- a/cli/node_modules/chai/node_modules/deep-eql/.npmignore +++ /dev/null @@ -1,11 +0,0 @@ -docs/ -test/ -build/ -components/ -support/ -coverage.html -component.json -lib-cov -.travis.yml -Makefile -*.swp diff --git a/cli/node_modules/chai/node_modules/deep-eql/History.md b/cli/node_modules/chai/node_modules/deep-eql/History.md deleted file mode 100644 index d5473cf30..000000000 --- a/cli/node_modules/chai/node_modules/deep-eql/History.md +++ /dev/null @@ -1,28 +0,0 @@ - -0.1.3 / 2013-10-10 -================== - - * pkg: update type-detect version - * index,test: conditional require in test bootstrap - -0.1.2 / 2013-09-18 -================== - - * bug: [fix] misnamed variable from code migration (reference error) - -0.1.1 / 2013-09-18 -================== - - * bug: [fix] last key of deep object ignored - -0.1.0 / 2013-09-18 -================== - - * tests: add iterable - * docs: readme - * makefile: [ci] update cov handling - * testing: [env] use karma for phantom - * add tests (uncompleted) - * add library - * add dependencies - * "Initial commit" diff --git a/cli/node_modules/chai/node_modules/deep-eql/README.md b/cli/node_modules/chai/node_modules/deep-eql/README.md deleted file mode 100644 index cf6d6f849..000000000 --- a/cli/node_modules/chai/node_modules/deep-eql/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# deep-eql [![Build Status](https://travis-ci.org/chaijs/deep-eql.png?branch=master)](https://travis-ci.org/chaijs/deep-eql) [![Coverage Status](https://coveralls.io/repos/chaijs/deep-eql/badge.png?branch=master)](https://coveralls.io/r/chaijs/deep-eql?branch=master) - -> Improved deep equality testing for Node.js and the browser. - -## Installation - -### Node.js - -`deep-eql` is available on [npm](http://npmjs.org). - - $ npm install deep-eql - -### Component - -`deep-eql` is available as a [component](https://github.com/component/component). - - $ component install chaijs/deep-eql - -## Usage - -### Rules - -- Strict equality for non-traversable nodes according to [egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). - - `eql(NaN, NaN).should.be.true;` - - `eql(-0, +0).should.be.false;` -- Arguments are not Arrays: - - `eql([], arguments).should.be.false;` - - `eql([], Array.prototype.slice.call(arguments)).should.be.true;` - -## License - -(The MIT License) - -Copyright (c) 2013 Jake Luer - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/cli/node_modules/chai/node_modules/deep-eql/index.js b/cli/node_modules/chai/node_modules/deep-eql/index.js deleted file mode 100644 index a24e320bc..000000000 --- a/cli/node_modules/chai/node_modules/deep-eql/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/eql'); diff --git a/cli/node_modules/chai/node_modules/deep-eql/karma.conf.js b/cli/node_modules/chai/node_modules/deep-eql/karma.conf.js deleted file mode 100644 index d67eeb003..000000000 --- a/cli/node_modules/chai/node_modules/deep-eql/karma.conf.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = function(config) { - config.set({ - basePath: '' - , frameworks: [ 'mocha' ] - , files: [ - 'build/build.js' - , 'test/bootstrap/karma.js' - , 'test/*.js' - ] - , exclude: [] - , reporters: [ 'progress' ] - , port: 9876 - , colors: true - , logLevel: config.LOG_INFO - , autoWatch: true - , browsers: [ 'PhantomJS' ] - , captureTimeout: 60000 - , singleRun: false - }); -}; diff --git a/cli/node_modules/chai/node_modules/deep-eql/lib/eql.js b/cli/node_modules/chai/node_modules/deep-eql/lib/eql.js deleted file mode 100644 index 6a1e2c01f..000000000 --- a/cli/node_modules/chai/node_modules/deep-eql/lib/eql.js +++ /dev/null @@ -1,257 +0,0 @@ -/*! - * deep-eql - * Copyright(c) 2013 Jake Luer - * MIT Licensed - */ - -/*! - * Module dependencies - */ - -var type = require('type-detect'); - -/*! - * Buffer.isBuffer browser shim - */ - -var Buffer; -try { Buffer = require('buffer').Buffer; } -catch(ex) { - Buffer = {}; - Buffer.isBuffer = function() { return false; } -} - -/*! - * Primary Export - */ - -module.exports = deepEqual; - -/** - * Assert super-strict (egal) equality between - * two objects of any type. - * - * @param {Mixed} a - * @param {Mixed} b - * @param {Array} memoised (optional) - * @return {Boolean} equal match - */ - -function deepEqual(a, b, m) { - if (sameValue(a, b)) { - return true; - } else if ('date' === type(a)) { - return dateEqual(a, b); - } else if ('regexp' === type(a)) { - return regexpEqual(a, b); - } else if (Buffer.isBuffer(a)) { - return bufferEqual(a, b); - } else if ('arguments' === type(a)) { - return argumentsEqual(a, b, m); - } else if (!typeEqual(a, b)) { - return false; - } else if (('object' !== type(a) && 'object' !== type(b)) - && ('array' !== type(a) && 'array' !== type(b))) { - return sameValue(a, b); - } else { - return objectEqual(a, b, m); - } -} - -/*! - * Strict (egal) equality test. Ensures that NaN always - * equals NaN and `-0` does not equal `+0`. - * - * @param {Mixed} a - * @param {Mixed} b - * @return {Boolean} equal match - */ - -function sameValue(a, b) { - if (a === b) return a !== 0 || 1 / a === 1 / b; - return a !== a && b !== b; -} - -/*! - * Compare the types of two given objects and - * return if they are equal. Note that an Array - * has a type of `array` (not `object`) and arguments - * have a type of `arguments` (not `array`/`object`). - * - * @param {Mixed} a - * @param {Mixed} b - * @return {Boolean} result - */ - -function typeEqual(a, b) { - return type(a) === type(b); -} - -/*! - * Compare two Date objects by asserting that - * the time values are equal using `saveValue`. - * - * @param {Date} a - * @param {Date} b - * @return {Boolean} result - */ - -function dateEqual(a, b) { - if ('date' !== type(b)) return false; - return sameValue(a.getTime(), b.getTime()); -} - -/*! - * Compare two regular expressions by converting them - * to string and checking for `sameValue`. - * - * @param {RegExp} a - * @param {RegExp} b - * @return {Boolean} result - */ - -function regexpEqual(a, b) { - if ('regexp' !== type(b)) return false; - return sameValue(a.toString(), b.toString()); -} - -/*! - * Assert deep equality of two `arguments` objects. - * Unfortunately, these must be sliced to arrays - * prior to test to ensure no bad behavior. - * - * @param {Arguments} a - * @param {Arguments} b - * @param {Array} memoize (optional) - * @return {Boolean} result - */ - -function argumentsEqual(a, b, m) { - if ('arguments' !== type(b)) return false; - a = [].slice.call(a); - b = [].slice.call(b); - return deepEqual(a, b, m); -} - -/*! - * Get enumerable properties of a given object. - * - * @param {Object} a - * @return {Array} property names - */ - -function enumerable(a) { - var res = []; - for (var key in a) res.push(key); - return res; -} - -/*! - * Simple equality for flat iterable objects - * such as Arrays or Node.js buffers. - * - * @param {Iterable} a - * @param {Iterable} b - * @return {Boolean} result - */ - -function iterableEqual(a, b) { - if (a.length !== b.length) return false; - - var i = 0; - var match = true; - - for (; i < a.length; i++) { - if (a[i] !== b[i]) { - match = false; - break; - } - } - - return match; -} - -/*! - * Extension to `iterableEqual` specifically - * for Node.js Buffers. - * - * @param {Buffer} a - * @param {Mixed} b - * @return {Boolean} result - */ - -function bufferEqual(a, b) { - if (!Buffer.isBuffer(b)) return false; - return iterableEqual(a, b); -} - -/*! - * Block for `objectEqual` ensuring non-existing - * values don't get in. - * - * @param {Mixed} object - * @return {Boolean} result - */ - -function isValue(a) { - return a !== null && a !== undefined; -} - -/*! - * Recursively check the equality of two objects. - * Once basic sameness has been established it will - * defer to `deepEqual` for each enumerable key - * in the object. - * - * @param {Mixed} a - * @param {Mixed} b - * @return {Boolean} result - */ - -function objectEqual(a, b, m) { - if (!isValue(a) || !isValue(b)) { - return false; - } - - if (a.prototype !== b.prototype) { - return false; - } - - var i; - if (m) { - for (i = 0; i < m.length; i++) { - if ((m[i][0] === a && m[i][1] === b) - || (m[i][0] === b && m[i][1] === a)) { - return true; - } - } - } else { - m = []; - } - - try { - var ka = enumerable(a); - var kb = enumerable(b); - } catch (ex) { - return false; - } - - ka.sort(); - kb.sort(); - - if (!iterableEqual(ka, kb)) { - return false; - } - - m.push([ a, b ]); - - var key; - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!deepEqual(a[key], b[key], m)) { - return false; - } - } - - return true; -} diff --git a/cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/.npmignore b/cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/.npmignore deleted file mode 100644 index f1059538d..000000000 --- a/cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/.npmignore +++ /dev/null @@ -1,11 +0,0 @@ -docs/ -test/ -build/ -components/ -support/ -coverage.html -component.json -lib-cov -.travis.yml -Makefile -*.swp diff --git a/cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/History.md b/cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/History.md deleted file mode 100644 index 0ec8fd678..000000000 --- a/cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/History.md +++ /dev/null @@ -1,18 +0,0 @@ - -0.1.1 / 2013-10-10 -================== - - * Merge pull request #2 from strongloop/fix-browserify - * index,test: support browserify - -0.1.0 / 2013-08-14 -================== - - * readme: document all methods - * readme: add badges - * library: [test] ensure test runs - * travis: change script to run coveralls reportwq - * tests: add tests - * lib: add type detect lib - * pkg: prepare for coverage based tests - * "Initial commit" diff --git a/cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/README.md b/cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/README.md deleted file mode 100644 index ec58828f6..000000000 --- a/cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/README.md +++ /dev/null @@ -1,193 +0,0 @@ -# type-detect [![Build Status](https://travis-ci.org/chaijs/type-detect.png?branch=master)](https://travis-ci.org/chaijs/type-detect) [![Coverage Status](https://coveralls.io/repos/chaijs/type-detect/badge.png?branch=master)](https://coveralls.io/r/chaijs/type-detect?branch=master) - -> Improved typeof detection for node.js and the browser. - -## Installation - -### Node.js - -`type-detect` is available on [npm](http://npmjs.org). - - $ npm install type-detect - -### Component - -`type-detect` is available as a [component](https://github.com/component/component). - - $ component install chaijs/type-detect - -## Usage - -### Primary - -The primary export of `type-detect` is function that can server as a replacement for -`typeof`. The results of this function will be more specific than that of native `typeof`. - -```js -var type = require('type-detect'); -``` - -#### array - -```js -assert('array' === type([])); -assert('array' === type(new Array())); -``` - -#### regexp - -```js -assert('regexp' === type(/a-z/gi)); -assert('regexp' === type(new RegExp('a-z'))); -``` - -#### function - -```js -assert('function' === type(function () {})); -``` - -#### arguments - -```js -(function () { - assert('arguments' === type(arguments)); -})(); -``` - -#### date - -```js -assert('date' === type(new Date)); -``` - -#### number - -```js -assert('number' === type(1)); -assert('number' === type(1.234)); -assert('number' === type(-1)); -assert('number' === type(-1.234)); -assert('number' === type(Infinity)); -assert('number' === type(NaN)); -``` - -#### string - -```js -assert('string' === type('hello world')); -``` - -#### null - -```js -assert('null' === type(null)); -assert('null' !== type(undefined)); -``` - -#### undefined - -```js -assert('undefined' === type(undefined)); -assert('undefined' !== type(null)); -``` - -#### object - -```js -var Noop = function () {}; -assert('object' === type({})); -assert('object' !== type(Noop)); -assert('object' === type(new Noop)); -assert('object' === type(new Object)); -assert('object' === type(new String('hello'))); -``` - -### Library - -A `Library` is a small constructed repository for custom type detections. - -```js -var lib = new type.Library; -``` - -#### .of (obj) - -* **@param** _{Mixed}_ object to test -* **@return** _{String}_ type - -Expose replacement `typeof` detection to the library. - -```js -if ('string' === lib.of('hello world')) { - // ... -} -``` - - -#### .define (type, test) - -* **@param** _{String}_ type -* **@param** _{RegExp|Function}_ test - -Add a test to for the `.test()` assertion. - -Can be defined as a regular expression: - -```js -lib.define('int', /^[0-9]+$/); -``` - -... or as a function: - -```js -lib.define('bln', function (obj) { - if ('boolean' === lib.of(obj)) return true; - var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ]; - if ('string' === lib.of(obj)) obj = obj.toLowerCase(); - return !! ~blns.indexOf(obj); -}); -``` - - -#### .test (obj, test) - -* **@param** _{Mixed}_ object -* **@param** _{String}_ type -* **@return** _{Boolean}_ result - -Assert that an object is of type. Will first -check natives, and if that does not pass it will -use the user defined custom tests. - -```js -assert(lib.test('1', 'int')); -assert(lib.test('yes', 'bln')); -``` - - - - -## License - -(The MIT License) - -Copyright (c) 2013 Jake Luer (http://alogicalparadox.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/index.js b/cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/index.js deleted file mode 100644 index 336775649..000000000 --- a/cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/type'); diff --git a/cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/lib/type.js b/cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/lib/type.js deleted file mode 100644 index 709814039..000000000 --- a/cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/lib/type.js +++ /dev/null @@ -1,142 +0,0 @@ -/*! - * type-detect - * Copyright(c) 2013 jake luer - * MIT Licensed - */ - -/*! - * Primary Exports - */ - -var exports = module.exports = getType; - -/*! - * Detectable javascript natives - */ - -var natives = { - '[object Array]': 'array' - , '[object RegExp]': 'regexp' - , '[object Function]': 'function' - , '[object Arguments]': 'arguments' - , '[object Date]': 'date' -}; - -/** - * ### typeOf (obj) - * - * Use several different techniques to determine - * the type of object being tested. - * - * - * @param {Mixed} object - * @return {String} object type - * @api public - */ - -function getType (obj) { - var str = Object.prototype.toString.call(obj); - if (natives[str]) return natives[str]; - if (obj === null) return 'null'; - if (obj === undefined) return 'undefined'; - if (obj === Object(obj)) return 'object'; - return typeof obj; -} - -exports.Library = Library; - -/** - * ### Library - * - * Create a repository for custom type detection. - * - * ```js - * var lib = new type.Library; - * ``` - * - */ - -function Library () { - this.tests = {}; -} - -/** - * #### .of (obj) - * - * Expose replacement `typeof` detection to the library. - * - * ```js - * if ('string' === lib.of('hello world')) { - * // ... - * } - * ``` - * - * @param {Mixed} object to test - * @return {String} type - */ - -Library.prototype.of = getType; - -/** - * #### .define (type, test) - * - * Add a test to for the `.test()` assertion. - * - * Can be defined as a regular expression: - * - * ```js - * lib.define('int', /^[0-9]+$/); - * ``` - * - * ... or as a function: - * - * ```js - * lib.define('bln', function (obj) { - * if ('boolean' === lib.of(obj)) return true; - * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ]; - * if ('string' === lib.of(obj)) obj = obj.toLowerCase(); - * return !! ~blns.indexOf(obj); - * }); - * ``` - * - * @param {String} type - * @param {RegExp|Function} test - * @api public - */ - -Library.prototype.define = function (type, test) { - if (arguments.length === 1) return this.tests[type]; - this.tests[type] = test; - return this; -}; - -/** - * #### .test (obj, test) - * - * Assert that an object is of type. Will first - * check natives, and if that does not pass it will - * use the user defined custom tests. - * - * ```js - * assert(lib.test('1', 'int')); - * assert(lib.test('yes', 'bln')); - * ``` - * - * @param {Mixed} object - * @param {String} type - * @return {Boolean} result - * @api public - */ - -Library.prototype.test = function (obj, type) { - if (type === getType(obj)) return true; - var test = this.tests[type]; - - if (test && 'regexp' === getType(test)) { - return test.test(obj); - } else if (test && 'function' === getType(test)) { - return test(obj); - } else { - throw new ReferenceError('Type test "' + type + '" not defined or invalid.'); - } -}; diff --git a/cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/package.json b/cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/package.json deleted file mode 100644 index 436626abc..000000000 --- a/cli/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "type-detect", - "version": "0.1.1", - "description": "Improved typeof detection for node.js and the browser.", - "author": { - "name": "Jake Luer", - "email": "jake@alogicalparadox.com", - "url": "http://alogicalparadox.com" - }, - "license": "MIT", - "keywords": [], - "repository": { - "type": "git", - "url": "git@github.com:chaijs/type-detect.git" - }, - "engines": { - "node": "*" - }, - "main": "./index", - "scripts": { - "test": "make test" - }, - "dependencies": {}, - "devDependencies": { - "component": "*", - "coveralls": "2.0.16", - "jscoverage": "0.3.7", - "mocha": "*", - "mocha-lcov-reporter": "0.0.1", - "mocha-phantomjs": "*", - "simple-assert": "*" - }, - "bugs": { - "url": "https://github.com/chaijs/type-detect/issues" - }, - "_id": "type-detect@0.1.1", - "dist": { - "shasum": "0ba5ec2a885640e470ea4e8505971900dac58822", - "tarball": "http://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz" - }, - "_from": "type-detect@0.1.1", - "_npmVersion": "1.3.11", - "_npmUser": { - "name": "jakeluer", - "email": "jake@alogicalparadox.com" - }, - "maintainers": [ - { - "name": "jakeluer", - "email": "jake@alogicalparadox.com" - } - ], - "directories": {}, - "_shasum": "0ba5ec2a885640e470ea4e8505971900dac58822", - "_resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/chaijs/type-detect" -} diff --git a/cli/node_modules/chai/node_modules/deep-eql/package.json b/cli/node_modules/chai/node_modules/deep-eql/package.json deleted file mode 100644 index 36bed58a8..000000000 --- a/cli/node_modules/chai/node_modules/deep-eql/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "deep-eql", - "version": "0.1.3", - "description": "Improved deep equality testing for Node.js and the browser.", - "author": { - "name": "Jake Luer", - "email": "jake@alogicalparadox.com" - }, - "license": "MIT", - "keywords": [ - "deep equal", - "object equal", - "testing", - "chai util" - ], - "repository": { - "type": "git", - "url": "git@github.com:chaijs/deep-eql.git" - }, - "engines": { - "node": "*" - }, - "main": "./index", - "scripts": { - "test": "make test" - }, - "dependencies": { - "type-detect": "0.1.1" - }, - "devDependencies": { - "component": "*", - "coveralls": "2.0.16", - "jscoverage": "0.3.7", - "karma": "0.10.x", - "karma-mocha": "*", - "mocha": "*", - "mocha-lcov-reporter": "0.0.1", - "simple-assert": "*" - }, - "bugs": { - "url": "https://github.com/chaijs/deep-eql/issues" - }, - "_id": "deep-eql@0.1.3", - "dist": { - "shasum": "ef558acab8de25206cd713906d74e56930eb69f2", - "tarball": "http://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz" - }, - "_from": "deep-eql@0.1.3", - "_npmVersion": "1.3.11", - "_npmUser": { - "name": "jakeluer", - "email": "jake@alogicalparadox.com" - }, - "maintainers": [ - { - "name": "jakeluer", - "email": "jake@alogicalparadox.com" - } - ], - "directories": {}, - "_shasum": "ef558acab8de25206cd713906d74e56930eb69f2", - "_resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/chaijs/deep-eql" -} diff --git a/cli/node_modules/chai/package.json b/cli/node_modules/chai/package.json deleted file mode 100644 index 981f0d8b7..000000000 --- a/cli/node_modules/chai/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "author": { - "name": "Jake Luer", - "email": "jake@alogicalparadox.com" - }, - "name": "chai", - "description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic.", - "keywords": [ - "test", - "assertion", - "assert", - "testing", - "chai" - ], - "homepage": "http://chaijs.com", - "license": "MIT", - "contributors": [ - { - "name": "Jake Luer", - "email": "jake@alogicalparadox.com" - }, - { - "name": "Domenic Denicola", - "email": "domenic@domenicdenicola.com", - "url": "http://domenicdenicola.com" - }, - { - "name": "Veselin Todorov", - "email": "hi@vesln.com" - }, - { - "name": "John Firebaugh", - "email": "john.firebaugh@gmail.com" - } - ], - "version": "2.3.0", - "repository": { - "type": "git", - "url": "https://github.com/chaijs/chai" - }, - "bugs": { - "url": "https://github.com/chaijs/chai/issues" - }, - "main": "./index", - "scripts": { - "test": "make test" - }, - "engines": { - "node": ">= 0.4.0" - }, - "dependencies": { - "assertion-error": "1.0.0", - "deep-eql": "0.1.3" - }, - "devDependencies": { - "component": "*", - "karma": "0.12.x", - "karma-mocha": "*", - "karma-sauce-launcher": "0.2.x", - "karma-phantomjs-launcher": "0.1.1", - "karma-firefox-launcher": "^0.1.4", - "mocha": "1.21.x", - "istanbul": "0.2.x" - }, - "gitHead": "3de55026458ace296df354757361953ec1949859", - "_id": "chai@2.3.0", - "_shasum": "8a2f6a34748da801090fd73287b2aa739a4e909a", - "_from": "chai@>=2.0.0 <3.0.0", - "_npmVersion": "2.7.6", - "_nodeVersion": "0.10.36", - "_npmUser": { - "name": "chaijs", - "email": "chaijs@keithcirkel.co.uk" - }, - "dist": { - "shasum": "8a2f6a34748da801090fd73287b2aa739a4e909a", - "tarball": "http://registry.npmjs.org/chai/-/chai-2.3.0.tgz" - }, - "maintainers": [ - { - "name": "jakeluer", - "email": "jake@alogicalparadox.com" - }, - { - "name": "chaijs", - "email": "chaijs@keithcirkel.co.uk" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/chai/-/chai-2.3.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/chai/sauce.browsers.js b/cli/node_modules/chai/sauce.browsers.js deleted file mode 100644 index 690c7cca1..000000000 --- a/cli/node_modules/chai/sauce.browsers.js +++ /dev/null @@ -1,128 +0,0 @@ - -/*! - * Chrome - */ - -exports['SL_Chrome'] = { - base: 'SauceLabs' - , browserName: 'chrome' -}; - -/*! - * Firefox - */ - -/*! - * TODO: Karma doesn't seem to like this, though sauce boots its up - * - -exports['SL_Firefox_23'] = { - base: 'SauceLabs' - , browserName: 'firefox' - , platform: 'Windows XP' - , version: '23' -}; - -*/ - -exports['SL_Firefox_22'] = { - base: 'SauceLabs' - , browserName: 'firefox' - , platform: 'Windows 7' - , version: '22' -}; - -/*! - * Opera - */ - -exports['SL_Opera_12'] = { - base: 'SauceLabs' - , browserName: 'opera' - , platform: 'Windows 7' - , version: '12' -}; - -exports['SL_Opera_11'] = { - base: 'SauceLabs' - , browserName: 'opera' - , platform: 'Windows 7' - , version: '11' -}; - -/*! - * Internet Explorer - */ - -exports['SL_IE_10'] = { - base: 'SauceLabs' - , browserName: 'internet explorer' - , platform: 'Windows 2012' - , version: '10' -}; - -/*! - * Safari - */ - -exports['SL_Safari_6'] = { - base: 'SauceLabs' - , browserName: 'safari' - , platform: 'Mac 10.8' - , version: '6' -}; - -exports['SL_Safari_5'] = { - base: 'SauceLabs' - , browserName: 'safari' - , platform: 'Mac 10.6' - , version: '5' -}; - -/*! - * iPhone - */ - -/*! - * TODO: These take forever to boot or shut down. Causes timeout. - * - -exports['SL_iPhone_6'] = { - base: 'SauceLabs' - , browserName: 'iphone' - , platform: 'Mac 10.8' - , version: '6' -}; - -exports['SL_iPhone_5-1'] = { - base: 'SauceLabs' - , browserName: 'iphone' - , platform: 'Mac 10.8' - , version: '5.1' -}; - -exports['SL_iPhone_5'] = { - base: 'SauceLabs' - , browserName: 'iphone' - , platform: 'Mac 10.6' - , version: '5' -}; - -*/ - -/*! - * Android - */ - -/*! - * TODO: fails because of error serialization - * - -exports['SL_Android_4'] = { - base: 'SauceLabs' - , browserName: 'android' - , platform: 'Linux' - , version: '4' -}; - -*/ diff --git a/cli/node_modules/commander/Readme.md b/cli/node_modules/commander/Readme.md deleted file mode 100644 index 76639bba5..000000000 --- a/cli/node_modules/commander/Readme.md +++ /dev/null @@ -1,204 +0,0 @@ -# Commander.js - - The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander). - - [![Build Status](https://api.travis-ci.org/visionmedia/commander.js.svg)](http://travis-ci.org/visionmedia/commander.js) - -## Installation - - $ npm install commander - -## Option parsing - - Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander'); - -program - .version('0.0.1') - .option('-p, --peppers', 'Add peppers') - .option('-P, --pineapple', 'Add pineapple') - .option('-b, --bbq', 'Add bbq sauce') - .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble') - .parse(process.argv); - -console.log('you ordered a pizza with:'); -if (program.peppers) console.log(' - peppers'); -if (program.pineapple) console.log(' - pineapple'); -if (program.bbq) console.log(' - bbq'); -console.log(' - %s cheese', program.cheese); -``` - - Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. - -## Automated --help - - The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free: - -``` - $ ./examples/pizza --help - - Usage: pizza [options] - - Options: - - -V, --version output the version number - -p, --peppers Add peppers - -P, --pineapple Add pineapple - -b, --bbq Add bbq sauce - -c, --cheese Add the specified type of cheese [marble] - -h, --help output usage information - -``` - -## Coercion - -```js -function range(val) { - return val.split('..').map(Number); -} - -function list(val) { - return val.split(','); -} - -function collect(val, memo) { - memo.push(val); - return memo; -} - -function increaseVerbosity(v, total) { - return total + 1; -} - -program - .version('0.0.1') - .usage('[options] ') - .option('-i, --integer ', 'An integer argument', parseInt) - .option('-f, --float ', 'A float argument', parseFloat) - .option('-r, --range ..', 'A range', range) - .option('-l, --list ', 'A list', list) - .option('-o, --optional [value]', 'An optional value') - .option('-c, --collect [value]', 'A repeatable value', collect, []) - .option('-v, --verbose', 'A value that can be increased', increaseVerbosity, 0) - .parse(process.argv); - -console.log(' int: %j', program.integer); -console.log(' float: %j', program.float); -console.log(' optional: %j', program.optional); -program.range = program.range || []; -console.log(' range: %j..%j', program.range[0], program.range[1]); -console.log(' list: %j', program.list); -console.log(' collect: %j', program.collect); -console.log(' verbosity: %j', program.verbose); -console.log(' args: %j', program.args); -``` - -## Custom help - - You can display arbitrary `-h, --help` information - by listening for "--help". Commander will automatically - exit once you are done so that the remainder of your program - does not execute causing undesired behaviours, for example - in the following executable "stuff" will not output when - `--help` is used. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('../'); - -program - .version('0.0.1') - .option('-f, --foo', 'enable some foo') - .option('-b, --bar', 'enable some bar') - .option('-B, --baz', 'enable some baz'); - -// must be before .parse() since -// node's emit() is immediate - -program.on('--help', function(){ - console.log(' Examples:'); - console.log(''); - console.log(' $ custom-help --help'); - console.log(' $ custom-help -h'); - console.log(''); -}); - -program.parse(process.argv); - -console.log('stuff'); -``` - -yielding the following help output: - -``` - -Usage: custom-help [options] - -Options: - - -h, --help output usage information - -V, --version output the version number - -f, --foo enable some foo - -b, --bar enable some bar - -B, --baz enable some baz - -Examples: - - $ custom-help --help - $ custom-help -h - -``` - -## .outputHelp() - - Output help information without exiting. - -## .help() - - Output help information and exit immediately. - -## Links - - - [API documentation](http://visionmedia.github.com/commander.js/) - - [ascii tables](https://github.com/LearnBoost/cli-table) - - [progress bars](https://github.com/visionmedia/node-progress) - - [more progress bars](https://github.com/substack/node-multimeter) - - [examples](https://github.com/visionmedia/commander.js/tree/master/examples) - -## License - -(The MIT License) - -Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/cli/node_modules/commander/index.js b/cli/node_modules/commander/index.js deleted file mode 100644 index baa3554d6..000000000 --- a/cli/node_modules/commander/index.js +++ /dev/null @@ -1,922 +0,0 @@ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter; -var spawn = require('child_process').spawn; -var path = require('path'); -var dirname = path.dirname; -var basename = path.basename; - -/** - * Expose the root command. - */ - -exports = module.exports = new Command(); - -/** - * Expose `Command`. - */ - -exports.Command = Command; - -/** - * Expose `Option`. - */ - -exports.Option = Option; - -/** - * Initialize a new `Option` with the given `flags` and `description`. - * - * @param {String} flags - * @param {String} description - * @api public - */ - -function Option(flags, description) { - this.flags = flags; - this.required = ~flags.indexOf('<'); - this.optional = ~flags.indexOf('['); - this.bool = !~flags.indexOf('-no-'); - flags = flags.split(/[ ,|]+/); - if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift(); - this.long = flags.shift(); - this.description = description || ''; -} - -/** - * Return option name. - * - * @return {String} - * @api private - */ - -Option.prototype.name = function() { - return this.long - .replace('--', '') - .replace('no-', ''); -}; - -/** - * Check if `arg` matches the short or long flag. - * - * @param {String} arg - * @return {Boolean} - * @api private - */ - -Option.prototype.is = function(arg) { - return arg == this.short || arg == this.long; -}; - -/** - * Initialize a new `Command`. - * - * @param {String} name - * @api public - */ - -function Command(name) { - this.commands = []; - this.options = []; - this._execs = []; - this._args = []; - this._name = name; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Command.prototype.__proto__ = EventEmitter.prototype; - -/** - * Add command `name`. - * - * The `.action()` callback is invoked when the - * command `name` is specified via __ARGV__, - * and the remaining arguments are applied to the - * function for access. - * - * When the `name` is "*" an un-matched command - * will be passed as the first arg, followed by - * the rest of __ARGV__ remaining. - * - * Examples: - * - * program - * .version('0.0.1') - * .option('-C, --chdir ', 'change the working directory') - * .option('-c, --config ', 'set config path. defaults to ./deploy.conf') - * .option('-T, --no-tests', 'ignore test hook') - * - * program - * .command('setup') - * .description('run remote setup commands') - * .action(function() { - * console.log('setup'); - * }); - * - * program - * .command('exec ') - * .description('run the given remote command') - * .action(function(cmd) { - * console.log('exec "%s"', cmd); - * }); - * - * program - * .command('*') - * .description('deploy the given env') - * .action(function(env) { - * console.log('deploying "%s"', env); - * }); - * - * program.parse(process.argv); - * - * @param {String} name - * @param {String} [desc] - * @return {Command} the new command - * @api public - */ - -Command.prototype.command = function(name, desc) { - var args = name.split(/ +/); - var cmd = new Command(args.shift()); - if (desc) cmd.description(desc); - if (desc) this.executables = true; - if (desc) this._execs[cmd._name] = true; - this.commands.push(cmd); - cmd.parseExpectedArgs(args); - cmd.parent = this; - if (desc) return this; - return cmd; -}; - -/** - * Add an implicit `help [cmd]` subcommand - * which invokes `--help` for the given command. - * - * @api private - */ - -Command.prototype.addImplicitHelpCommand = function() { - this.command('help [cmd]', 'display help for [cmd]'); -}; - -/** - * Parse expected `args`. - * - * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. - * - * @param {Array} args - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parseExpectedArgs = function(args) { - if (!args.length) return; - var self = this; - args.forEach(function(arg) { - switch (arg[0]) { - case '<': - self._args.push({ required: true, name: arg.slice(1, -1) }); - break; - case '[': - self._args.push({ required: false, name: arg.slice(1, -1) }); - break; - } - }); - return this; -}; - -/** - * Register callback `fn` for the command. - * - * Examples: - * - * program - * .command('help') - * .description('display verbose help') - * .action(function() { - * // output help here - * }); - * - * @param {Function} fn - * @return {Command} for chaining - * @api public - */ - -Command.prototype.action = function(fn) { - var self = this; - var listener = function(args, unknown) { - // Parse any so-far unknown options - args = args || []; - unknown = unknown || []; - - var parsed = self.parseOptions(unknown); - - // Output help if necessary - outputHelpIfNecessary(self, parsed.unknown); - - // If there are still any unknown options, then we simply - // die, unless someone asked for help, in which case we give it - // to them, and then we die. - if (parsed.unknown.length > 0) { - self.unknownOption(parsed.unknown[0]); - } - - // Leftover arguments need to be pushed back. Fixes issue #56 - if (parsed.args.length) args = parsed.args.concat(args); - - self._args.forEach(function(arg, i) { - if (arg.required && null == args[i]) { - self.missingArgument(arg.name); - } - }); - - // Always append ourselves to the end of the arguments, - // to make sure we match the number of arguments the user - // expects - if (self._args.length) { - args[self._args.length] = self; - } else { - args.push(self); - } - - fn.apply(self, args); - }; - this.parent.on(this._name, listener); - if (this._alias) this.parent.on(this._alias, listener); - return this; -}; - -/** - * Define option with `flags`, `description` and optional - * coercion `fn`. - * - * The `flags` string should contain both the short and long flags, - * separated by comma, a pipe or space. The following are all valid - * all will output this way when `--help` is used. - * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" - * - * Examples: - * - * // simple boolean defaulting to false - * program.option('-p, --pepper', 'add pepper'); - * - * --pepper - * program.pepper - * // => Boolean - * - * // simple boolean defaulting to true - * program.option('-C, --no-cheese', 'remove cheese'); - * - * program.cheese - * // => true - * - * --no-cheese - * program.cheese - * // => false - * - * // required argument - * program.option('-C, --chdir ', 'change the working directory'); - * - * --chdir /tmp - * program.chdir - * // => "/tmp" - * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); - * - * @param {String} flags - * @param {String} description - * @param {Function|Mixed} fn or default - * @param {Mixed} defaultValue - * @return {Command} for chaining - * @api public - */ - -Command.prototype.option = function(flags, description, fn, defaultValue) { - var self = this - , option = new Option(flags, description) - , oname = option.name() - , name = camelcase(oname); - - // default as 3rd arg - if (typeof fn != 'function') { - defaultValue = fn; - fn = null; - } - - // preassign default value only for --no-*, [optional], or - if (false == option.bool || option.optional || option.required) { - // when --no-* we make sure default is true - if (false == option.bool) defaultValue = true; - // preassign only if we have a default - if (undefined !== defaultValue) self[name] = defaultValue; - } - - // register the option - this.options.push(option); - - // when it's passed assign the value - // and conditionally invoke the callback - this.on(oname, function(val) { - // coercion - if (null !== val && fn) val = fn(val, undefined === self[name] - ? defaultValue - : self[name]); - - // unassigned or bool - if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) { - // if no value, bool true, and we have a default, then use it! - if (null == val) { - self[name] = option.bool - ? defaultValue || true - : false; - } else { - self[name] = val; - } - } else if (null !== val) { - // reassign - self[name] = val; - } - }); - - return this; -}; - -/** - * Parse `argv`, settings options and invoking commands when defined. - * - * @param {Array} argv - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parse = function(argv) { - // implicit help - if (this.executables) this.addImplicitHelpCommand(); - - // store raw args - this.rawArgs = argv; - - // guess name - this._name = this._name || basename(argv[1], '.js'); - - // process argv - var parsed = this.parseOptions(this.normalize(argv.slice(2))); - var args = this.args = parsed.args; - - var result = this.parseArgs(this.args, parsed.unknown); - - // executable sub-commands - var name = result.args[0]; - if (this._execs[name] && typeof this._execs[name] != "function") { - return this.executeSubCommand(argv, args, parsed.unknown); - } - - return result; -}; - -/** - * Execute a sub-command executable. - * - * @param {Array} argv - * @param {Array} args - * @param {Array} unknown - * @api private - */ - -Command.prototype.executeSubCommand = function(argv, args, unknown) { - args = args.concat(unknown); - - if (!args.length) this.help(); - if ('help' == args[0] && 1 == args.length) this.help(); - - // --help - if ('help' == args[0]) { - args[0] = args[1]; - args[1] = '--help'; - } - - // executable - var dir = dirname(argv[1]); - var bin = basename(argv[1], '.js') + '-' + args[0]; - - // check for ./ first - var local = path.join(dir, bin); - - // run it - args = args.slice(1); - args.unshift(local); - var proc = spawn('node', args, { stdio: 'inherit', customFds: [0, 1, 2] }); - proc.on('error', function(err) { - if (err.code == "ENOENT") { - console.error('\n %s(1) does not exist, try --help\n', bin); - } else if (err.code == "EACCES") { - console.error('\n %s(1) not executable. try chmod or run with root\n', bin); - } - }); - - this.runningCommand = proc; -}; - -/** - * Normalize `args`, splitting joined short flags. For example - * the arg "-abc" is equivalent to "-a -b -c". - * This also normalizes equal sign and splits "--abc=def" into "--abc def". - * - * @param {Array} args - * @return {Array} - * @api private - */ - -Command.prototype.normalize = function(args) { - var ret = [] - , arg - , lastOpt - , index; - - for (var i = 0, len = args.length; i < len; ++i) { - arg = args[i]; - if (i > 0) { - lastOpt = this.optionFor(args[i-1]); - } - - if (arg === '--') { - // Honor option terminator - ret = ret.concat(args.slice(i)); - break; - } else if (lastOpt && lastOpt.required) { - ret.push(arg); - } else if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) { - arg.slice(1).split('').forEach(function(c) { - ret.push('-' + c); - }); - } else if (/^--/.test(arg) && ~(index = arg.indexOf('='))) { - ret.push(arg.slice(0, index), arg.slice(index + 1)); - } else { - ret.push(arg); - } - } - - return ret; -}; - -/** - * Parse command `args`. - * - * When listener(s) are available those - * callbacks are invoked, otherwise the "*" - * event is emitted and those actions are invoked. - * - * @param {Array} args - * @return {Command} for chaining - * @api private - */ - -Command.prototype.parseArgs = function(args, unknown) { - var name; - - if (args.length) { - name = args[0]; - if (this.listeners(name).length) { - this.emit(args.shift(), args, unknown); - } else { - this.emit('*', args); - } - } else { - outputHelpIfNecessary(this, unknown); - - // If there were no args and we have unknown options, - // then they are extraneous and we need to error. - if (unknown.length > 0) { - this.unknownOption(unknown[0]); - } - } - - return this; -}; - -/** - * Return an option matching `arg` if any. - * - * @param {String} arg - * @return {Option} - * @api private - */ - -Command.prototype.optionFor = function(arg) { - for (var i = 0, len = this.options.length; i < len; ++i) { - if (this.options[i].is(arg)) { - return this.options[i]; - } - } -}; - -/** - * Parse options from `argv` returning `argv` - * void of these options. - * - * @param {Array} argv - * @return {Array} - * @api public - */ - -Command.prototype.parseOptions = function(argv) { - var args = [] - , len = argv.length - , literal - , option - , arg; - - var unknownOptions = []; - - // parse options - for (var i = 0; i < len; ++i) { - arg = argv[i]; - - // literal args after -- - if ('--' == arg) { - literal = true; - continue; - } - - if (literal) { - args.push(arg); - continue; - } - - // find matching Option - option = this.optionFor(arg); - - // option is defined - if (option) { - // requires arg - if (option.required) { - arg = argv[++i]; - if (null == arg) return this.optionMissingArgument(option); - this.emit(option.name(), arg); - // optional arg - } else if (option.optional) { - arg = argv[i+1]; - if (null == arg || ('-' == arg[0] && '-' != arg)) { - arg = null; - } else { - ++i; - } - this.emit(option.name(), arg); - // bool - } else { - this.emit(option.name()); - } - continue; - } - - // looks like an option - if (arg.length > 1 && '-' == arg[0]) { - unknownOptions.push(arg); - - // If the next argument looks like it might be - // an argument for this option, we pass it on. - // If it isn't, then it'll simply be ignored - if (argv[i+1] && '-' != argv[i+1][0]) { - unknownOptions.push(argv[++i]); - } - continue; - } - - // arg - args.push(arg); - } - - return { args: args, unknown: unknownOptions }; -}; - -/** - * Return an object containing options as key-value pairs - * - * @return {Object} - * @api public - */ -Command.prototype.opts = function() { - var result = {} - , len = this.options.length; - - for (var i = 0 ; i < len; i++) { - var key = this.options[i].name(); - result[key] = key === 'version' ? this._version : this[key]; - } - return result; -}; - -/** - * Argument `name` is missing. - * - * @param {String} name - * @api private - */ - -Command.prototype.missingArgument = function(name) { - console.error(); - console.error(" error: missing required argument `%s'", name); - console.error(); - process.exit(1); -}; - -/** - * `Option` is missing an argument, but received `flag` or nothing. - * - * @param {String} option - * @param {String} flag - * @api private - */ - -Command.prototype.optionMissingArgument = function(option, flag) { - console.error(); - if (flag) { - console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag); - } else { - console.error(" error: option `%s' argument missing", option.flags); - } - console.error(); - process.exit(1); -}; - -/** - * Unknown option `flag`. - * - * @param {String} flag - * @api private - */ - -Command.prototype.unknownOption = function(flag) { - console.error(); - console.error(" error: unknown option `%s'", flag); - console.error(); - process.exit(1); -}; - - -/** - * Set the program version to `str`. - * - * This method auto-registers the "-V, --version" flag - * which will print the version number when passed. - * - * @param {String} str - * @param {String} flags - * @return {Command} for chaining - * @api public - */ - -Command.prototype.version = function(str, flags) { - if (0 == arguments.length) return this._version; - this._version = str; - flags = flags || '-V, --version'; - this.option(flags, 'output the version number'); - this.on('version', function() { - process.stdout.write(str + '\n'); - process.exit(0); - }); - return this; -}; - -/** - * Set the description to `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.description = function(str) { - if (0 == arguments.length) return this._description; - this._description = str; - return this; -}; - -/** - * Set an alias for the command - * - * @param {String} alias - * @return {String|Command} - * @api public - */ - -Command.prototype.alias = function(alias) { - if (0 == arguments.length) return this._alias; - this._alias = alias; - return this; -}; - -/** - * Set / get the command usage `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.usage = function(str) { - var args = this._args.map(function(arg) { - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }); - - var usage = '[options]' - + (this.commands.length ? ' [command]' : '') - + (this._args.length ? ' ' + args.join(' ') : ''); - - if (0 == arguments.length) return this._usage || usage; - this._usage = str; - - return this; -}; - -/** - * Get the name of the command - * - * @param {String} name - * @return {String|Command} - * @api public - */ - -Command.prototype.name = function(name) { - return this._name; -}; - -/** - * Return the largest option length. - * - * @return {Number} - * @api private - */ - -Command.prototype.largestOptionLength = function() { - return this.options.reduce(function(max, option) { - return Math.max(max, option.flags.length); - }, 0); -}; - -/** - * Return help for options. - * - * @return {String} - * @api private - */ - -Command.prototype.optionHelp = function() { - var width = this.largestOptionLength(); - - // Prepend the help information - return [pad('-h, --help', width) + ' ' + 'output usage information'] - .concat(this.options.map(function(option) { - return pad(option.flags, width) + ' ' + option.description; - })) - .join('\n'); -}; - -/** - * Return command help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.commandHelp = function() { - if (!this.commands.length) return ''; - - var commands = this.commands.map(function(cmd) { - var args = cmd._args.map(function(arg) { - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }).join(' '); - - return [ - cmd._name - + (cmd._alias - ? '|' + cmd._alias - : '') - + (cmd.options.length - ? ' [options]' - : '') - + ' ' + args - , cmd.description() - ]; - }); - - var width = commands.reduce(function(max, command) { - return Math.max(max, command[0].length); - }, 0); - - return [ - '' - , ' Commands:' - , '' - , commands.map(function(cmd) { - return pad(cmd[0], width) + ' ' + cmd[1]; - }).join('\n').replace(/^/gm, ' ') - , '' - ].join('\n'); -}; - -/** - * Return program help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.helpInformation = function() { - return [ - '' - , ' Usage: ' + this._name - + (this._alias - ? '|' + this._alias - : '') - + ' ' + this.usage() - , '' + this.commandHelp() - , ' Options:' - , '' - , '' + this.optionHelp().replace(/^/gm, ' ') - , '' - , '' - ].join('\n'); -}; - -/** - * Output help information for this command - * - * @api public - */ - -Command.prototype.outputHelp = function() { - process.stdout.write(this.helpInformation()); - this.emit('--help'); -}; - -/** - * Output help information and exit. - * - * @api public - */ - -Command.prototype.help = function() { - this.outputHelp(); - process.exit(); -}; - -/** - * Camel-case the given `flag` - * - * @param {String} flag - * @return {String} - * @api private - */ - -function camelcase(flag) { - return flag.split('-').reduce(function(str, word) { - return str + word[0].toUpperCase() + word.slice(1); - }); -} - -/** - * Pad `str` to `width`. - * - * @param {String} str - * @param {Number} width - * @return {String} - * @api private - */ - -function pad(str, width) { - var len = Math.max(0, width - str.length); - return str + Array(len + 1).join(' '); -} - -/** - * Output help information if necessary - * - * @param {Command} command to output help for - * @param {Array} array of options to search for -h or --help - * @api private - */ - -function outputHelpIfNecessary(cmd, options) { - options = options || []; - for (var i = 0; i < options.length; i++) { - if (options[i] == '--help' || options[i] == '-h') { - cmd.outputHelp(); - process.exit(0); - } - } -} diff --git a/cli/node_modules/commander/package.json b/cli/node_modules/commander/package.json deleted file mode 100644 index df9bb64f8..000000000 --- a/cli/node_modules/commander/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "commander", - "version": "2.4.0", - "description": "the complete solution for node.js command-line programs", - "keywords": [ - "command", - "option", - "parser", - "prompt" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/visionmedia/commander.js.git" - }, - "devDependencies": { - "should": ">= 0.0.1" - }, - "scripts": { - "test": "make test" - }, - "main": "index", - "engines": { - "node": ">= 0.6.x" - }, - "files": [ - "index.js" - ], - "bugs": { - "url": "https://github.com/visionmedia/commander.js/issues" - }, - "homepage": "https://github.com/visionmedia/commander.js", - "_id": "commander@2.4.0", - "_shasum": "fad884ce8f09509b10a5ec931332cb97786e2fd6", - "_from": "commander@>=2.4.0 <2.5.0", - "_npmVersion": "1.4.9", - "_npmUser": { - "name": "zhiyelee", - "email": "zhiyelee@gmail.com" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "somekittens", - "email": "rkoutnik@gmail.com" - }, - { - "name": "zhiyelee", - "email": "zhiyelee@gmail.com" - }, - { - "name": "thethomaseffect", - "email": "thethomaseffect@gmail.com" - } - ], - "dist": { - "shasum": "fad884ce8f09509b10a5ec931332cb97786e2fd6", - "tarball": "http://registry.npmjs.org/commander/-/commander-2.4.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/commander/-/commander-2.4.0.tgz" -} diff --git a/cli/node_modules/del/index.js b/cli/node_modules/del/index.js deleted file mode 100644 index 0b9250363..000000000 --- a/cli/node_modules/del/index.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; -var path = require('path'); -var globby = require('globby'); -var eachAsync = require('each-async'); -var isPathCwd = require('is-path-cwd'); -var isPathInCwd = require('is-path-in-cwd'); -var rimraf = require('rimraf'); -var objectAssign = require('object-assign'); - -function safeCheck(file) { - if (isPathCwd(file)) { - throw new Error('Cannot delete the current working directory. Can be overriden with the `force` option.'); - } - - if (!isPathInCwd(file)) { - throw new Error('Cannot delete files/folders outside the current working directory. Can be overriden with the `force` option.'); - } -} - -module.exports = function (patterns, opts, cb) { - if (typeof opts !== 'object') { - cb = opts; - opts = {}; - } - - opts = objectAssign({}, opts); - cb = cb || function () {}; - - var force = opts.force; - delete opts.force; - - var deletedFiles = []; - - globby(patterns, opts, function (err, files) { - if (err) { - cb(err); - return; - } - - eachAsync(files, function (el, i, next) { - if (!force) { - safeCheck(el); - } - - el = path.resolve(opts.cwd || '', el); - deletedFiles.push(el); - rimraf(el, next); - }, function (err) { - if (err) { - cb(err); - return; - } - - cb(null, deletedFiles); - }); - }); -}; - -module.exports.sync = function (patterns, opts) { - opts = objectAssign({}, opts); - - var force = opts.force; - delete opts.force; - - var deletedFiles = []; - - globby.sync(patterns, opts).forEach(function (el) { - if (!force) { - safeCheck(el); - } - - el = path.resolve(opts.cwd || '', el); - deletedFiles.push(el); - rimraf.sync(el); - }); - - return deletedFiles; -}; diff --git a/cli/node_modules/del/license b/cli/node_modules/del/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/cli/node_modules/del/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/cli/node_modules/del/node_modules/each-async/index.js b/cli/node_modules/del/node_modules/each-async/index.js deleted file mode 100644 index dc2ea0d31..000000000 --- a/cli/node_modules/del/node_modules/each-async/index.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; -var onetime = require('onetime'); -var setImmediateShim = require('set-immediate-shim'); - -module.exports = function (arr, next, cb) { - var failed = false; - var count = 0; - - cb = cb || function () {}; - - if (!Array.isArray(arr)) { - throw new TypeError('First argument must be an array'); - } - - if (typeof next !== 'function') { - throw new TypeError('Second argument must be a function'); - } - - var len = arr.length; - - if (!len) { - cb(); - return; - } - - function callback(err) { - if (failed) { - return; - } - - if (err !== undefined && err !== null) { - failed = true; - cb(err); - return; - } - - if (++count === len) { - cb(); - return; - } - } - - for (var i = 0; i < len; i++) { - setImmediateShim(next, arr[i], i, onetime(callback, true)); - } -}; diff --git a/cli/node_modules/del/node_modules/each-async/license b/cli/node_modules/del/node_modules/each-async/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/cli/node_modules/del/node_modules/each-async/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/cli/node_modules/del/node_modules/each-async/node_modules/onetime/index.js b/cli/node_modules/del/node_modules/each-async/node_modules/onetime/index.js deleted file mode 100644 index 84aed1539..000000000 --- a/cli/node_modules/del/node_modules/each-async/node_modules/onetime/index.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; -module.exports = function (fn, errMsg) { - if (typeof fn !== 'function') { - throw new TypeError('Expected a function.'); - } - - var ret; - var called = false; - var fnName = fn.name || (/function ([^\(]+)/.exec(fn.toString()) || [])[1]; - - return function () { - if (called) { - if (errMsg === true) { - fnName = fnName ? fnName + '()' : 'Function'; - throw new Error(fnName + ' can only be called once.'); - } - return ret; - } - called = true; - ret = fn.apply(this, arguments); - fn = null; - return ret; - }; -}; diff --git a/cli/node_modules/del/node_modules/each-async/node_modules/onetime/package.json b/cli/node_modules/del/node_modules/each-async/node_modules/onetime/package.json deleted file mode 100644 index 50779e248..000000000 --- a/cli/node_modules/del/node_modules/each-async/node_modules/onetime/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "onetime", - "version": "1.0.0", - "description": "Only call a function once. Unlike the module `once`, this one isn't naughty extending `Function.prototype`.", - "keywords": [ - "once", - "one", - "single", - "call", - "function", - "prevent" - ], - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "index.js" - ], - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/onetime" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "*" - }, - "engines": { - "node": ">=0.10.0" - }, - "gitHead": "a4aa1ce5291cc5f32ecb8f4b0a918b12cb47ea5e", - "bugs": { - "url": "https://github.com/sindresorhus/onetime/issues" - }, - "homepage": "https://github.com/sindresorhus/onetime", - "_id": "onetime@1.0.0", - "_shasum": "3a08a8e39d7816df52d34886374fb8ed8b651f62", - "_from": "onetime@>=1.0.0 <2.0.0", - "_npmVersion": "1.4.14", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "dist": { - "shasum": "3a08a8e39d7816df52d34886374fb8ed8b651f62", - "tarball": "http://registry.npmjs.org/onetime/-/onetime-1.0.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/onetime/-/onetime-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/del/node_modules/each-async/node_modules/onetime/readme.md b/cli/node_modules/del/node_modules/each-async/node_modules/onetime/readme.md deleted file mode 100644 index e0eb9cb27..000000000 --- a/cli/node_modules/del/node_modules/each-async/node_modules/onetime/readme.md +++ /dev/null @@ -1,54 +0,0 @@ -# onetime [![Build Status](https://travis-ci.org/sindresorhus/onetime.svg?branch=master)](https://travis-ci.org/sindresorhus/onetime) - -> Only call a function once - -When called multiple times it will return the return value from the first call. - -*Unlike the module [once](https://github.com/isaacs/once), this one isn't naughty extending `Function.prototype`.* - - -## Install - -```sh -$ npm install --save onetime -``` - - -## Usage - -```js -var i = 0; - -var foo = onetime(function () { - return i++; -}); - -foo(); //=> 0 -foo(); //=> 0 -foo(); //=> 0 -``` - - -## API - -### onetime(function, [shouldThrow]) - -#### function - -Type: `function` - -Function that should only be called once. - -#### shouldThrow - -Type: `boolean` -Default: `false` - -![](screenshot-shouldthrow.png) - -Set to `true` if you want it to fail with a nice and descriptive error when called more than once. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/cli/node_modules/del/node_modules/each-async/node_modules/set-immediate-shim/index.js b/cli/node_modules/del/node_modules/each-async/node_modules/set-immediate-shim/index.js deleted file mode 100644 index e690485ca..000000000 --- a/cli/node_modules/del/node_modules/each-async/node_modules/set-immediate-shim/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; -module.exports = typeof setImmediate === 'function' ? setImmediate : - function setImmediate() { - var args = [].slice.apply(arguments); - args.splice(1, 0, 0); - setTimeout.apply(null, args); - }; diff --git a/cli/node_modules/del/node_modules/each-async/node_modules/set-immediate-shim/package.json b/cli/node_modules/del/node_modules/each-async/node_modules/set-immediate-shim/package.json deleted file mode 100644 index d09e411e9..000000000 --- a/cli/node_modules/del/node_modules/each-async/node_modules/set-immediate-shim/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "set-immediate-shim", - "version": "1.0.1", - "description": "Simple setImmediate shim", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/sindresorhus/set-immediate-shim" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "node test.js" - }, - "files": [ - "index.js" - ], - "keywords": [ - "setImmediate", - "immediate", - "setTimeout", - "timeout", - "shim", - "polyfill", - "ponyfill" - ], - "devDependencies": { - "ava": "0.0.4", - "require-uncached": "^1.0.2" - }, - "gitHead": "4c50df7ade5a368e106fee82351ee0a378c990f7", - "bugs": { - "url": "https://github.com/sindresorhus/set-immediate-shim/issues" - }, - "homepage": "https://github.com/sindresorhus/set-immediate-shim", - "_id": "set-immediate-shim@1.0.1", - "_shasum": "4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61", - "_from": "set-immediate-shim@>=1.0.0 <2.0.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "dist": { - "shasum": "4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61", - "tarball": "http://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/del/node_modules/each-async/node_modules/set-immediate-shim/readme.md b/cli/node_modules/del/node_modules/each-async/node_modules/set-immediate-shim/readme.md deleted file mode 100644 index 4ec864fa2..000000000 --- a/cli/node_modules/del/node_modules/each-async/node_modules/set-immediate-shim/readme.md +++ /dev/null @@ -1,31 +0,0 @@ -# set-immediate-shim [![Build Status](https://travis-ci.org/sindresorhus/set-immediate-shim.svg?branch=master)](https://travis-ci.org/sindresorhus/set-immediate-shim) - -> Simple [`setImmediate`](https://developer.mozilla.org/en-US/docs/Web/API/Window.setImmediate) shim - - -## Install - -``` -$ npm install --save set-immediate-shim -``` - - -## Usage - -```js -var setImmediateShim = require('set-immediate-shim'); - -setImmediateShim(function () { - console.log('2'); -}); - -console.log('1'); - -//=> 1 -//=> 2 -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/cli/node_modules/del/node_modules/each-async/package.json b/cli/node_modules/del/node_modules/each-async/package.json deleted file mode 100644 index 72176aa0f..000000000 --- a/cli/node_modules/del/node_modules/each-async/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "each-async", - "version": "1.1.1", - "description": "Async concurrent iterator (async forEach)", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/sindresorhus/each-async" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha --timeout 20000" - }, - "files": [ - "index.js" - ], - "keywords": [ - "each", - "async", - "asynchronous", - "iteration", - "iterate", - "loop", - "foreach", - "parallel", - "concurrent", - "array", - "flow", - "control flow" - ], - "dependencies": { - "onetime": "^1.0.0", - "set-immediate-shim": "^1.0.0" - }, - "devDependencies": { - "mocha": "*" - }, - "gitHead": "65f7f663e0e1a323c11bd0e036a08f585ab34a9c", - "bugs": { - "url": "https://github.com/sindresorhus/each-async/issues" - }, - "homepage": "https://github.com/sindresorhus/each-async", - "_id": "each-async@1.1.1", - "_shasum": "dee5229bdf0ab6ba2012a395e1b869abf8813473", - "_from": "each-async@>=1.0.0 <2.0.0", - "_npmVersion": "2.1.16", - "_nodeVersion": "0.10.32", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "dist": { - "shasum": "dee5229bdf0ab6ba2012a395e1b869abf8813473", - "tarball": "http://registry.npmjs.org/each-async/-/each-async-1.1.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/each-async/-/each-async-1.1.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/del/node_modules/each-async/readme.md b/cli/node_modules/del/node_modules/each-async/readme.md deleted file mode 100644 index b23b91786..000000000 --- a/cli/node_modules/del/node_modules/each-async/readme.md +++ /dev/null @@ -1,62 +0,0 @@ -# each-async [![Build Status](https://travis-ci.org/sindresorhus/each-async.svg?branch=master)](https://travis-ci.org/sindresorhus/each-async) - -> Async concurrent iterator (async forEach) - -Like [async.each()](https://github.com/caolan/async#eacharr-iterator-callback), but tiny. - -I often use `async.each()` for doing async operations when iterating, but I almost never use the other gadzillion methods in `async`. - -Async iteration is one of the most used async control flow patterns. - - -## Install - -```sh -$ npm install --save each-async -``` - - -## Usage - -```js -var eachAsync = require('each-async'); - -eachAsync(['foo','bar','baz'], function (item, index, done) { - console.log(item, index); - done(); -}, function (error) { - console.log('finished'); -}); -//=> foo 0 -//=> bar 1 -//=> baz 2 -//=> finished -``` - - -## API - -### eachAsync(array, callback, finishedCallback) - -#### array - -The array you want to iterate. - -#### callback(item, index, done) - -A function which is called for each item in the array with the following arguments: - -- `item`: the current item in the array -- `index`: the current index -- `done([error])`: call this when you're done with an optional error. Supplying anything other than `undefined`/`null` will stop the iteration. - -Note that order is not guaranteed since each item is handled concurrently. - -#### finishedCallback(error) - -A function which is called when the iteration is finished or on the first error. First argument is the error passed from `done()` in the `callback`. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/cli/node_modules/del/node_modules/globby/index.js b/cli/node_modules/del/node_modules/globby/index.js deleted file mode 100644 index db03850e5..000000000 --- a/cli/node_modules/del/node_modules/globby/index.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict'; -var union = require('array-union'); -var assign = require('object-assign'); -var async = require('async'); -var glob = require('glob'); - -function arrayify(arr) { - return Array.isArray(arr) ? arr : [arr]; -} - -function sortPatterns(patterns) { - patterns = arrayify(patterns); - - var positives = []; - var negatives = []; - - patterns.forEach(function (pattern, index) { - var isNegative = pattern[0] === '!'; - (isNegative ? negatives : positives).push({ - index: index, - pattern: isNegative ? pattern.slice(1) : pattern - }); - }); - - return { - positives: positives, - negatives: negatives - }; -} - -function setIgnore(opts, negatives, positiveIndex) { - opts = assign({}, opts); - - var negativePatterns = negatives.filter(function (negative) { - return negative.index > positiveIndex; - }).map(function (negative) { - return negative.pattern; - }); - - opts.ignore = (opts.ignore || []).concat(negativePatterns); - return opts; -} - -module.exports = function (patterns, opts, cb) { - var sortedPatterns = sortPatterns(patterns); - - if (typeof opts === 'function') { - cb = opts; - opts = {}; - } - - if (sortedPatterns.positives.length === 0) { - cb(null, []); - return; - } - - async.parallel(sortedPatterns.positives.map(function (positive) { - return function (cb2) { - glob(positive.pattern, setIgnore(opts, sortedPatterns.negatives, positive.index), function (err, paths) { - if (err) { - cb2(err); - return; - } - - cb2(null, paths); - }); - }; - }), function (err, paths) { - if (err) { - cb(err); - return; - } - - cb(null, union.apply(null, paths)); - }); -}; - -module.exports.sync = function (patterns, opts) { - var sortedPatterns = sortPatterns(patterns); - - if (sortedPatterns.positives.length === 0) { - return []; - } - - return sortedPatterns.positives.reduce(function (ret, positive) { - return union(ret, glob.sync(positive.pattern, setIgnore(opts, sortedPatterns.negatives, positive.index))); - }, []); -}; diff --git a/cli/node_modules/del/node_modules/globby/license b/cli/node_modules/del/node_modules/globby/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/cli/node_modules/del/node_modules/globby/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/cli/node_modules/del/node_modules/globby/node_modules/array-union/index.js b/cli/node_modules/del/node_modules/globby/node_modules/array-union/index.js deleted file mode 100644 index e33f38a1e..000000000 --- a/cli/node_modules/del/node_modules/globby/node_modules/array-union/index.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; -var arrayUniq = require('array-uniq'); - -module.exports = function () { - return arrayUniq([].concat.apply([], arguments)); -}; diff --git a/cli/node_modules/del/node_modules/globby/node_modules/array-union/node_modules/array-uniq/index.js b/cli/node_modules/del/node_modules/globby/node_modules/array-union/node_modules/array-uniq/index.js deleted file mode 100644 index 40f81b8a0..000000000 --- a/cli/node_modules/del/node_modules/globby/node_modules/array-union/node_modules/array-uniq/index.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict'; - -// there's 3 implementations written in increasing order of efficiency - -// 1 - no Set type is defined -function uniqNoSet(arr) { - var ret = []; - - for (var i = 0; i < arr.length; i++) { - if (ret.indexOf(arr[i]) === -1) { - ret.push(arr[i]); - } - } - - return ret; -} - -// 2 - a simple Set type is defined -function uniqSet(arr) { - var seen = new Set(); - return arr.filter(function (el) { - if (!seen.has(el)) { - seen.add(el); - return true; - } - }); -} - -// 3 - a standard Set type is defined and it has a forEach method -function uniqSetWithForEach(arr) { - var ret = []; - - (new Set(arr)).forEach(function (el) { - ret.push(el); - }); - - return ret; -} - -// V8 currently has a broken implementation -// https://github.com/joyent/node/issues/8449 -function doesForEachActuallyWork() { - var ret = false; - - (new Set([true])).forEach(function (el) { - ret = el; - }); - - return ret === true; -} - -if ('Set' in global) { - if (typeof Set.prototype.forEach === 'function' && doesForEachActuallyWork()) { - module.exports = uniqSetWithForEach; - } else { - module.exports = uniqSet; - } -} else { - module.exports = uniqNoSet; -} diff --git a/cli/node_modules/del/node_modules/globby/node_modules/array-union/node_modules/array-uniq/package.json b/cli/node_modules/del/node_modules/globby/node_modules/array-union/node_modules/array-uniq/package.json deleted file mode 100644 index f65f4fa74..000000000 --- a/cli/node_modules/del/node_modules/globby/node_modules/array-union/node_modules/array-uniq/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "array-uniq", - "version": "1.0.2", - "description": "Create an array without duplicates", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/sindresorhus/array-uniq" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "keywords": [ - "array", - "arr", - "set", - "uniq", - "unique", - "es6", - "duplicate", - "remove" - ], - "devDependencies": { - "es6-set": "^0.1.0", - "mocha": "*", - "require-uncached": "^1.0.2" - }, - "gitHead": "d5e311f37692dfd25ec216490df10632ce5f69f3", - "bugs": { - "url": "https://github.com/sindresorhus/array-uniq/issues" - }, - "homepage": "https://github.com/sindresorhus/array-uniq", - "_id": "array-uniq@1.0.2", - "_shasum": "5fcc373920775723cfd64d65c64bef53bf9eba6d", - "_from": "array-uniq@>=1.0.1 <2.0.0", - "_npmVersion": "2.1.5", - "_nodeVersion": "0.10.32", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "dist": { - "shasum": "5fcc373920775723cfd64d65c64bef53bf9eba6d", - "tarball": "http://registry.npmjs.org/array-uniq/-/array-uniq-1.0.2.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/del/node_modules/globby/node_modules/array-union/node_modules/array-uniq/readme.md b/cli/node_modules/del/node_modules/globby/node_modules/array-union/node_modules/array-uniq/readme.md deleted file mode 100644 index 5183d07ec..000000000 --- a/cli/node_modules/del/node_modules/globby/node_modules/array-union/node_modules/array-uniq/readme.md +++ /dev/null @@ -1,30 +0,0 @@ -# array-uniq [![Build Status](https://travis-ci.org/sindresorhus/array-uniq.svg?branch=master)](https://travis-ci.org/sindresorhus/array-uniq) - -> Create an array without duplicates - -It's already pretty fast, but will be much faster when [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) becomes available in V8 (especially with large arrays). - - -## Install - -```sh -$ npm install --save array-uniq -``` - - -## Usage - -```js -var arrayUniq = require('array-uniq'); - -arrayUniq([1, 1, 2, 3, 3]); -//=> [1, 2, 3] - -arrayUniq(['foo', 'foo', 'bar', 'foo']); -//=> ['foo', 'bar'] -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/cli/node_modules/del/node_modules/globby/node_modules/array-union/package.json b/cli/node_modules/del/node_modules/globby/node_modules/array-union/package.json deleted file mode 100644 index 196c09d9f..000000000 --- a/cli/node_modules/del/node_modules/globby/node_modules/array-union/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "array-union", - "version": "1.0.1", - "description": "Create an array of unique values, in order, from the input arrays", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/sindresorhus/array-union" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "keywords": [ - "array", - "arr", - "set", - "uniq", - "unique", - "duplicate", - "remove", - "union", - "combine", - "merge" - ], - "dependencies": { - "array-uniq": "^1.0.1" - }, - "devDependencies": { - "mocha": "*" - }, - "gitHead": "d0e72cc6fbff57273032e45050c51ff44c8e137c", - "bugs": { - "url": "https://github.com/sindresorhus/array-union/issues" - }, - "homepage": "https://github.com/sindresorhus/array-union", - "_id": "array-union@1.0.1", - "_shasum": "4d410fc8395cb247637124bade9e3f547d5d55f2", - "_from": "array-union@>=1.0.1 <2.0.0", - "_npmVersion": "2.1.5", - "_nodeVersion": "0.10.32", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "dist": { - "shasum": "4d410fc8395cb247637124bade9e3f547d5d55f2", - "tarball": "http://registry.npmjs.org/array-union/-/array-union-1.0.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/del/node_modules/globby/node_modules/array-union/readme.md b/cli/node_modules/del/node_modules/globby/node_modules/array-union/readme.md deleted file mode 100644 index dbae3615e..000000000 --- a/cli/node_modules/del/node_modules/globby/node_modules/array-union/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# array-union [![Build Status](https://travis-ci.org/sindresorhus/array-union.svg?branch=master)](https://travis-ci.org/sindresorhus/array-union) - -> Create an array of unique values, in order, from the input arrays - - -## Install - -```sh -$ npm install --save array-union -``` - - -## Usage - -```js -var arrayUnion = require('array-union'); - -arrayUnion([1, 1, 2, 3], [2, 3]); -//=> [1, 2, 3] - -arrayUnion(['foo', 'foo', 'bar'], ['foo']); -//=> ['foo', 'bar'] -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/cli/node_modules/del/node_modules/globby/node_modules/async/.jscsrc b/cli/node_modules/del/node_modules/globby/node_modules/async/.jscsrc deleted file mode 100644 index b8cfa1731..000000000 --- a/cli/node_modules/del/node_modules/globby/node_modules/async/.jscsrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "validateIndentation": 4 -} \ No newline at end of file diff --git a/cli/node_modules/del/node_modules/globby/node_modules/async/CHANGELOG.md b/cli/node_modules/del/node_modules/globby/node_modules/async/CHANGELOG.md deleted file mode 100644 index 941d1b0b4..000000000 --- a/cli/node_modules/del/node_modules/globby/node_modules/async/CHANGELOG.md +++ /dev/null @@ -1,81 +0,0 @@ -# v1.3.0 - -New Features: -- Added `constant` -- Added `asyncify`/`wrapSync` for making sync functions work with callbacks. (#671, #806) -- Added `during` and `doDuring`, which are like `whilst` with an async truth test. (#800) -- `retry` now accepts an `interval` parameter to specify a delay between retries. (#793) -- `async` should work better in Web Workers due to better `root` detection (#804) -- Callbacks are now optional in `whilst`, `doWhilst`, `until`, and `doUntil` (#642) -- Various internal updates (#786, #801, #802, #803) -- Various doc fixes (#790, #794) - -Bug Fixes: -- `cargo` now exposes the `payload` size, and `cargo.payload` can be changed on the fly after the `cargo` is created. (#740, #744, #783) - -# v1.2.1 - -Bug Fix: - -- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. (#782) - - -# v1.2.0 - -New Features: - -- Added `timesLimit` (#743) -- `concurrency` can be changed after initialization in `queue` by setting `q.concurrency`. The new concurrency will be reflected the next time a task is processed. (#747, #772) - -Bug Fixes: - -- Fixed a regression in `each` and family with empty arrays that have additional properties. (#775, #777) - - -# v1.1.1 - -Bug Fix: - -- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. (#782) - - -# v1.1.0 - -New Features: - -- `cargo` now supports all of the same methods and event callbacks as `queue`. -- Added `ensureAsync` - A wrapper that ensures an async function calls its callback on a later tick. (#769) -- Optimized `map`, `eachOf`, and `waterfall` families of functions -- Passing a `null` or `undefined` array to `map`, `each`, `parallel` and families will be treated as an empty array (#667). -- The callback is now optional for the composed results of `compose` and `seq`. (#618) -- Reduced file size by 4kb, (minified version by 1kb) -- Added code coverage through `nyc` and `coveralls` (#768) - -Bug Fixes: - -- `forever` will no longer stack overflow with a synchronous iterator (#622) -- `eachLimit` and other limit functions will stop iterating once an error occurs (#754) -- Always pass `null` in callbacks when there is no error (#439) -- Ensure proper conditions when calling `drain()` after pushing an empty data set to a queue (#668) -- `each` and family will properly handle an empty array (#578) -- `eachSeries` and family will finish if the underlying array is modified during execution (#557) -- `queue` will throw if a non-function is passed to `q.push()` (#593) -- Doc fixes (#629, #766) - - -# v1.0.0 - -No known breaking changes, we are simply complying with semver from here on out. - -Changes: - -- Start using a changelog! -- Add `forEachOf` for iterating over Objects (or to iterate Arrays with indexes available) (#168 #704 #321) -- Detect deadlocks in `auto` (#663) -- Better support for require.js (#527) -- Throw if queue created with concurrency `0` (#714) -- Fix unneeded iteration in `queue.resume()` (#758) -- Guard against timer mocking overriding `setImmediate` (#609 #611) -- Miscellaneous doc fixes (#542 #596 #615 #628 #631 #690 #729) -- Use single noop function internally (#546) -- Optimize internal `_each`, `_map` and `_keys` functions. diff --git a/cli/node_modules/del/node_modules/globby/node_modules/async/LICENSE b/cli/node_modules/del/node_modules/globby/node_modules/async/LICENSE deleted file mode 100644 index 8f2969858..000000000 --- a/cli/node_modules/del/node_modules/globby/node_modules/async/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010-2014 Caolan McMahon - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/cli/node_modules/del/node_modules/globby/node_modules/async/README.md b/cli/node_modules/del/node_modules/globby/node_modules/async/README.md deleted file mode 100644 index c0a93c1b1..000000000 --- a/cli/node_modules/del/node_modules/globby/node_modules/async/README.md +++ /dev/null @@ -1,1789 +0,0 @@ -# Async.js - -[![Build Status via Travis CI](https://travis-ci.org/caolan/async.svg?branch=master)](https://travis-ci.org/caolan/async) -[![NPM version](http://img.shields.io/npm/v/async.svg)](https://www.npmjs.org/package/async) -[![Coverage Status](https://coveralls.io/repos/caolan/async/badge.svg?branch=master)](https://coveralls.io/r/caolan/async?branch=master) -[![Join the chat at https://gitter.im/caolan/async](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/caolan/async?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) - - -Async is a utility module which provides straight-forward, powerful functions -for working with asynchronous JavaScript. Although originally designed for -use with [Node.js](http://nodejs.org) and installable via `npm install async`, -it can also be used directly in the browser. - -Async is also installable via: - -- [bower](http://bower.io/): `bower install async` -- [component](https://github.com/component/component): `component install - caolan/async` -- [jam](http://jamjs.org/): `jam install async` -- [spm](http://spmjs.io/): `spm install async` - -Async provides around 20 functions that include the usual 'functional' -suspects (`map`, `reduce`, `filter`, `each`…) as well as some common patterns -for asynchronous control flow (`parallel`, `series`, `waterfall`…). All these -functions assume you follow the Node.js convention of providing a single -callback as the last argument of your `async` function. - - -## Quick Examples - -```javascript -async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file -}); - -async.filter(['file1','file2','file3'], fs.exists, function(results){ - // results now equals an array of the existing files -}); - -async.parallel([ - function(){ ... }, - function(){ ... } -], callback); - -async.series([ - function(){ ... }, - function(){ ... } -]); -``` - -There are many more functions available so take a look at the docs below for a -full list. This module aims to be comprehensive, so if you feel anything is -missing please create a GitHub issue for it. - -## Common Pitfalls [(StackOverflow)](http://stackoverflow.com/questions/tagged/async.js) -### Synchronous iteration functions - -If you get an error like `RangeError: Maximum call stack size exceeded.` or other stack overflow issues when using async, you are likely using a synchronous iterator. By *synchronous* we mean a function that calls its callback on the same tick in the javascript event loop, without doing any I/O or using any timers. Calling many callbacks iteratively will quickly overflow the stack. If you run into this issue, just defer your callback with `async.nextTick` to start a new call stack on the next tick of the event loop. - -This can also arise by accident if you callback early in certain cases: - -```js -async.eachSeries(hugeArray, function iterator(item, callback) { - if (inCache(item)) { - callback(null, cache[item]); // if many items are cached, you'll overflow - } else { - doSomeIO(item, callback); - } -}, function done() { - //... -}); -``` - -Just change it to: - -```js -async.eachSeries(hugeArray, function iterator(item, callback) { - if (inCache(item)) { - async.setImmediate(function () { - callback(null, cache[item]); - }); - } else { - doSomeIO(item, callback); - //... -``` - -Async guards against synchronous functions in some, but not all, cases. If you are still running into stack overflows, you can defer as suggested above, or wrap functions with [`async.ensureAsync`](#ensureAsync) Functions that are asynchronous by their nature do not have this problem and don't need the extra callback deferral. - -If javascript's event loop is still a bit nebulous, check out [this article](http://blog.carbonfive.com/2013/10/27/the-javascript-event-loop-explained/) or [this talk](http://2014.jsconf.eu/speakers/philip-roberts-what-the-heck-is-the-event-loop-anyway.html) for more detailed information about how it works. - - -### Multiple callbacks - -Make sure to always `return` when calling a callback early, otherwise you will cause multiple callbacks and unpredictable behavior in many cases. - -```js -async.waterfall([ - function (callback) { - getSomething(options, function (err, result) { - if (err) { - callback(new Error("failed getting something:" + err.message)); - // we should return here - } - // since we did not return, this callback still will be called and - // `processData` will be called twice - callback(result); - }); - }, - processData -], done) -``` - -It is always good practice to `return callback(err, result)` whenever a callback call is not the last statement of a function. - - -### Binding a context to an iterator - -This section is really about `bind`, not about `async`. If you are wondering how to -make `async` execute your iterators in a given context, or are confused as to why -a method of another library isn't working as an iterator, study this example: - -```js -// Here is a simple object with an (unnecessarily roundabout) squaring method -var AsyncSquaringLibrary = { - squareExponent: 2, - square: function(number, callback){ - var result = Math.pow(number, this.squareExponent); - setTimeout(function(){ - callback(null, result); - }, 200); - } -}; - -async.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){ - // result is [NaN, NaN, NaN] - // This fails because the `this.squareExponent` expression in the square - // function is not evaluated in the context of AsyncSquaringLibrary, and is - // therefore undefined. -}); - -async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){ - // result is [1, 4, 9] - // With the help of bind we can attach a context to the iterator before - // passing it to async. Now the square function will be executed in its - // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent` - // will be as expected. -}); -``` - -## Download - -The source is available for download from -[GitHub](https://github.com/caolan/async/blob/master/lib/async.js). -Alternatively, you can install using Node Package Manager (`npm`): - - npm install async - -As well as using Bower: - - bower install async - -__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed - -## In the Browser - -So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. - -Usage: - -```html - - -``` - -## Documentation - -Some functions are also available in the following forms: -* `Series` - the same as `` but runs only a single async operation at a time -* `Limit` - the same as `` but runs a maximum of `limit` async operations at a time - -### Collections - -* [`each`](#each), `eachSeries`, `eachLimit` -* [`forEachOf`](#forEachOf), `forEachOfSeries`, `forEachOfLimit` -* [`map`](#map), `mapSeries`, `mapLimit` -* [`filter`](#filter), `filterSeries`, `filterLimit` -* [`reject`](#reject), `rejectSeries`, `rejectLimit` -* [`reduce`](#reduce), [`reduceRight`](#reduceRight) -* [`detect`](#detect), `detectSeries`, `detectLimit` -* [`sortBy`](#sortBy) -* [`some`](#some), `someLimit` -* [`every`](#every), `everyLimit` -* [`concat`](#concat), `concatSeries` - -### Control Flow - -* [`series`](#seriestasks-callback) -* [`parallel`](#parallel), `parallelLimit` -* [`whilst`](#whilst), [`doWhilst`](#doWhilst) -* [`until`](#until), [`doUntil`](#doUntil) -* [`during`](#during), [`doDuring`](#doDuring) -* [`forever`](#forever) -* [`waterfall`](#waterfall) -* [`compose`](#compose) -* [`seq`](#seq) -* [`applyEach`](#applyEach), `applyEachSeries` -* [`queue`](#queue), [`priorityQueue`](#priorityQueue) -* [`cargo`](#cargo) -* [`auto`](#auto) -* [`retry`](#retry) -* [`iterator`](#iterator) -* [`times`](#times), `timesSeries`, `timesLimit` - -### Utils - -* [`apply`](#apply) -* [`nextTick`](#nextTick) -* [`memoize`](#memoize) -* [`unmemoize`](#unmemoize) -* [`ensureAsync`](#ensureAsync) -* [`constant`](#constant) -* [`asyncify`](#asyncify) -* [`wrapSync`](#wrapSync) -* [`log`](#log) -* [`dir`](#dir) -* [`noConflict`](#noConflict) - -## Collections - - - -### each(arr, iterator, [callback]) - -Applies the function `iterator` to each item in `arr`, in parallel. -The `iterator` is called with an item from the list, and a callback for when it -has finished. If the `iterator` passes an error to its `callback`, the main -`callback` (for the `each` function) is immediately called with the error. - -Note, that since this function applies `iterator` to each item in parallel, -there is no guarantee that the iterator functions will complete in order. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A function to apply to each item in `arr`. - The iterator is passed a `callback(err)` which must be called once it has - completed. If no error has occurred, the `callback` should be run without - arguments or with an explicit `null` argument. The array index is not passed - to the iterator. If you need the index, use [`forEachOf`](#forEachOf). -* `callback(err)` - *Optional* A callback which is called when all `iterator` functions - have finished, or an error occurs. - -__Examples__ - - -```js -// assuming openFiles is an array of file names and saveFile is a function -// to save the modified contents of that file: - -async.each(openFiles, saveFile, function(err){ - // if any of the saves produced an error, err would equal that error -}); -``` - -```js -// assuming openFiles is an array of file names - -async.each(openFiles, function(file, callback) { - - // Perform operation on file here. - console.log('Processing file ' + file); - - if( file.length > 32 ) { - console.log('This file name is too long'); - callback('File name too long'); - } else { - // Do work to process file here - console.log('File processed'); - callback(); - } -}, function(err){ - // if any of the file processing produced an error, err would equal that error - if( err ) { - // One of the iterations produced an error. - // All processing will now stop. - console.log('A file failed to process'); - } else { - console.log('All files have been processed successfully'); - } -}); -``` - -__Related__ - -* eachSeries(arr, iterator, [callback]) -* eachLimit(arr, limit, iterator, [callback]) - ---------------------------------------- - - - - -### forEachOf(obj, iterator, [callback]) - -Like `each`, except that it iterates over objects, and passes the key as the second argument to the iterator. - -__Arguments__ - -* `obj` - An object or array to iterate over. -* `iterator(item, key, callback)` - A function to apply to each item in `obj`. -The `key` is the item's key, or index in the case of an array. The iterator is -passed a `callback(err)` which must be called once it has completed. If no -error has occurred, the callback should be run without arguments or with an -explicit `null` argument. -* `callback(err)` - *Optional* A callback which is called when all `iterator` functions have finished, or an error occurs. - -__Example__ - -```js -var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; -var configs = {}; - -async.forEachOf(obj, function (value, key, callback) { - fs.readFile(__dirname + value, "utf8", function (err, data) { - if (err) return callback(err); - try { - configs[key] = JSON.parse(data); - } catch (e) { - return callback(e); - } - callback(); - }) -}, function (err) { - if (err) console.error(err.message); - // configs is now a map of JSON data - doSomethingWith(configs); -}) -``` - -__Related__ - -* forEachOfSeries(obj, iterator, [callback]) -* forEachOfLimit(obj, limit, iterator, [callback]) - ---------------------------------------- - - -### map(arr, iterator, [callback]) - -Produces a new array of values by mapping each value in `arr` through -the `iterator` function. The `iterator` is called with an item from `arr` and a -callback for when it has finished processing. Each of these callback takes 2 arguments: -an `error`, and the transformed item from `arr`. If `iterator` passes an error to its -callback, the main `callback` (for the `map` function) is immediately called with the error. - -Note, that since this function applies the `iterator` to each item in parallel, -there is no guarantee that the `iterator` functions will complete in order. -However, the results array will be in the same order as the original `arr`. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A function to apply to each item in `arr`. - The iterator is passed a `callback(err, transformed)` which must be called once - it has completed with an error (which can be `null`) and a transformed item. -* `callback(err, results)` - *Optional* A callback which is called when all `iterator` - functions have finished, or an error occurs. Results is an array of the - transformed items from the `arr`. - -__Example__ - -```js -async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file -}); -``` - -__Related__ -* mapSeries(arr, iterator, [callback]) -* mapLimit(arr, limit, iterator, [callback]) - ---------------------------------------- - - - -### filter(arr, iterator, [callback]) - -__Alias:__ `select` - -Returns a new array of all the values in `arr` which pass an async truth test. -_The callback for each `iterator` call only accepts a single argument of `true` or -`false`; it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like `fs.exists`. This operation is -performed in parallel, but the results array will be in the same order as the -original. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A truth test to apply to each item in `arr`. - The `iterator` is passed a `callback(truthValue)`, which must be called with a - boolean argument once it has completed. -* `callback(results)` - *Optional* A callback which is called after all the `iterator` - functions have finished. - -__Example__ - -```js -async.filter(['file1','file2','file3'], fs.exists, function(results){ - // results now equals an array of the existing files -}); -``` - -__Related__ - -* filterSeries(arr, iterator, [callback]) -* filterLimit(arr, limit, iterator, [callback]) - ---------------------------------------- - - -### reject(arr, iterator, [callback]) - -The opposite of [`filter`](#filter). Removes values that pass an `async` truth test. - -__Related__ - -* rejectSeries(arr, iterator, [callback]) -* rejectLimit(arr, limit, iterator, [callback]) - ---------------------------------------- - - -### reduce(arr, memo, iterator, [callback]) - -__Aliases:__ `inject`, `foldl` - -Reduces `arr` into a single value using an async `iterator` to return -each successive step. `memo` is the initial state of the reduction. -This function only operates in series. - -For performance reasons, it may make sense to split a call to this function into -a parallel map, and then use the normal `Array.prototype.reduce` on the results. -This function is for situations where each step in the reduction needs to be async; -if you can get the data before reducing it, then it's probably a good idea to do so. - -__Arguments__ - -* `arr` - An array to iterate over. -* `memo` - The initial state of the reduction. -* `iterator(memo, item, callback)` - A function applied to each item in the - array to produce the next step in the reduction. The `iterator` is passed a - `callback(err, reduction)` which accepts an optional error as its first - argument, and the state of the reduction as the second. If an error is - passed to the callback, the reduction is stopped and the main `callback` is - immediately called with the error. -* `callback(err, result)` - *Optional* A callback which is called after all the `iterator` - functions have finished. Result is the reduced value. - -__Example__ - -```js -async.reduce([1,2,3], 0, function(memo, item, callback){ - // pointless async: - process.nextTick(function(){ - callback(null, memo + item) - }); -}, function(err, result){ - // result is now equal to the last value of memo, which is 6 -}); -``` - ---------------------------------------- - - -### reduceRight(arr, memo, iterator, [callback]) - -__Alias:__ `foldr` - -Same as [`reduce`](#reduce), only operates on `arr` in reverse order. - - ---------------------------------------- - - -### detect(arr, iterator, [callback]) - -Returns the first value in `arr` that passes an async truth test. The -`iterator` is applied in parallel, meaning the first iterator to return `true` will -fire the detect `callback` with that result. That means the result might not be -the first item in the original `arr` (in terms of order) that passes the test. - -If order within the original `arr` is important, then look at [`detectSeries`](#detectSeries). - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A truth test to apply to each item in `arr`. - The iterator is passed a `callback(truthValue)` which must be called with a - boolean argument once it has completed. **Note: this callback does not take an error as its first argument.** -* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns - `true`, or after all the `iterator` functions have finished. Result will be - the first item in the array that passes the truth test (iterator) or the - value `undefined` if none passed. **Note: this callback does not take an error as its first argument.** - -__Example__ - -```js -async.detect(['file1','file2','file3'], fs.exists, function(result){ - // result now equals the first file in the list that exists -}); -``` - -__Related__ - -* detectSeries(arr, iterator, [callback]) -* detectLimit(arr, limit, iterator, [callback]) - ---------------------------------------- - - -### sortBy(arr, iterator, [callback]) - -Sorts a list by the results of running each `arr` value through an async `iterator`. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A function to apply to each item in `arr`. - The iterator is passed a `callback(err, sortValue)` which must be called once it - has completed with an error (which can be `null`) and a value to use as the sort - criteria. -* `callback(err, results)` - *Optional* A callback which is called after all the `iterator` - functions have finished, or an error occurs. Results is the items from - the original `arr` sorted by the values returned by the `iterator` calls. - -__Example__ - -```js -async.sortBy(['file1','file2','file3'], function(file, callback){ - fs.stat(file, function(err, stats){ - callback(err, stats.mtime); - }); -}, function(err, results){ - // results is now the original array of files sorted by - // modified date -}); -``` - -__Sort Order__ - -By modifying the callback parameter the sorting order can be influenced: - -```js -//ascending order -async.sortBy([1,9,3,5], function(x, callback){ - callback(null, x); -}, function(err,result){ - //result callback -} ); - -//descending order -async.sortBy([1,9,3,5], function(x, callback){ - callback(null, x*-1); //<- x*-1 instead of x, turns the order around -}, function(err,result){ - //result callback -} ); -``` - ---------------------------------------- - - -### some(arr, iterator, [callback]) - -__Alias:__ `any` - -Returns `true` if at least one element in the `arr` satisfies an async test. -_The callback for each iterator call only accepts a single argument of `true` or -`false`; it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like `fs.exists`. Once any iterator -call returns `true`, the main `callback` is immediately called. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A truth test to apply to each item in the array - in parallel. The iterator is passed a `callback(truthValue)`` which must be - called with a boolean argument once it has completed. -* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns - `true`, or after all the iterator functions have finished. Result will be - either `true` or `false` depending on the values of the async tests. - - **Note: the callbacks do not take an error as their first argument.** -__Example__ - -```js -async.some(['file1','file2','file3'], fs.exists, function(result){ - // if result is true then at least one of the files exists -}); -``` - -__Related__ - -* someLimit(arr, limit, iterator, callback) - ---------------------------------------- - - -### every(arr, iterator, [callback]) - -__Alias:__ `all` - -Returns `true` if every element in `arr` satisfies an async test. -_The callback for each `iterator` call only accepts a single argument of `true` or -`false`; it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like `fs.exists`. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A truth test to apply to each item in the array - in parallel. The iterator is passed a `callback(truthValue)` which must be - called with a boolean argument once it has completed. -* `callback(result)` - *Optional* A callback which is called after all the `iterator` - functions have finished. Result will be either `true` or `false` depending on - the values of the async tests. - - **Note: the callbacks do not take an error as their first argument.** - -__Example__ - -```js -async.every(['file1','file2','file3'], fs.exists, function(result){ - // if result is true then every file exists -}); -``` - -__Related__ - -* everyLimit(arr, limit, iterator, callback) - ---------------------------------------- - - -### concat(arr, iterator, [callback]) - -Applies `iterator` to each item in `arr`, concatenating the results. Returns the -concatenated list. The `iterator`s are called in parallel, and the results are -concatenated as they return. There is no guarantee that the results array will -be returned in the original order of `arr` passed to the `iterator` function. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A function to apply to each item in `arr`. - The iterator is passed a `callback(err, results)` which must be called once it - has completed with an error (which can be `null`) and an array of results. -* `callback(err, results)` - *Optional* A callback which is called after all the `iterator` - functions have finished, or an error occurs. Results is an array containing - the concatenated results of the `iterator` function. - -__Example__ - -```js -async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ - // files is now a list of filenames that exist in the 3 directories -}); -``` - -__Related__ - -* concatSeries(arr, iterator, [callback]) - - -## Control Flow - - -### series(tasks, [callback]) - -Run the functions in the `tasks` array in series, each one running once the previous -function has completed. If any functions in the series pass an error to its -callback, no more functions are run, and `callback` is immediately called with the value of the error. -Otherwise, `callback` receives an array of results when `tasks` have completed. - -It is also possible to use an object instead of an array. Each property will be -run as a function, and the results will be passed to the final `callback` as an object -instead of an array. This can be a more readable way of handling results from -[`series`](#series). - -**Note** that while many implementations preserve the order of object properties, the -[ECMAScript Language Specifcation](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) -explicitly states that - -> The mechanics and order of enumerating the properties is not specified. - -So if you rely on the order in which your series of functions are executed, and want -this to work on all platforms, consider using an array. - -__Arguments__ - -* `tasks` - An array or object containing functions to run, each function is passed - a `callback(err, result)` it must call on completion with an error `err` (which can - be `null`) and an optional `result` value. -* `callback(err, results)` - An optional callback to run once all the functions - have completed. This function gets a results array (or object) containing all - the result arguments passed to the `task` callbacks. - -__Example__ - -```js -async.series([ - function(callback){ - // do some stuff ... - callback(null, 'one'); - }, - function(callback){ - // do some more stuff ... - callback(null, 'two'); - } -], -// optional callback -function(err, results){ - // results is now equal to ['one', 'two'] -}); - - -// an example using an object instead of an array -async.series({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - } -}, -function(err, results) { - // results is now equal to: {one: 1, two: 2} -}); -``` - ---------------------------------------- - - -### parallel(tasks, [callback]) - -Run the `tasks` array of functions in parallel, without waiting until the previous -function has completed. If any of the functions pass an error to its -callback, the main `callback` is immediately called with the value of the error. -Once the `tasks` have completed, the results are passed to the final `callback` as an -array. - -**Note:** `parallel` is about kicking-off I/O tasks in parallel, not about parallel execution of code. If your tasks do not use any timers or perform any I/O, they will actually be executed in series. Any synchronous setup sections for each task will happen one after the other. JavaScript remains single-threaded. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final `callback` as an object -instead of an array. This can be a more readable way of handling results from -[`parallel`](#parallel). - - -__Arguments__ - -* `tasks` - An array or object containing functions to run. Each function is passed - a `callback(err, result)` which it must call on completion with an error `err` - (which can be `null`) and an optional `result` value. -* `callback(err, results)` - An optional callback to run once all the functions - have completed. This function gets a results array (or object) containing all - the result arguments passed to the task callbacks. - -__Example__ - -```js -async.parallel([ - function(callback){ - setTimeout(function(){ - callback(null, 'one'); - }, 200); - }, - function(callback){ - setTimeout(function(){ - callback(null, 'two'); - }, 100); - } -], -// optional callback -function(err, results){ - // the results array will equal ['one','two'] even though - // the second function had a shorter timeout. -}); - - -// an example using an object instead of an array -async.parallel({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - } -}, -function(err, results) { - // results is now equals to: {one: 1, two: 2} -}); -``` - -__Related__ - -* parallelLimit(tasks, limit, [callback]) - ---------------------------------------- - - -### whilst(test, fn, callback) - -Repeatedly call `fn`, while `test` returns `true`. Calls `callback` when stopped, -or an error occurs. - -__Arguments__ - -* `test()` - synchronous truth test to perform before each execution of `fn`. -* `fn(callback)` - A function which is called each time `test` passes. The function is - passed a `callback(err)`, which must be called once it has completed with an - optional `err` argument. -* `callback(err)` - A callback which is called after the test fails and repeated - execution of `fn` has stopped. - -__Example__ - -```js -var count = 0; - -async.whilst( - function () { return count < 5; }, - function (callback) { - count++; - setTimeout(callback, 1000); - }, - function (err) { - // 5 seconds have passed - } -); -``` - ---------------------------------------- - - -### doWhilst(fn, test, callback) - -The post-check version of [`whilst`](#whilst). To reflect the difference in -the order of operations, the arguments `test` and `fn` are switched. - -`doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. - ---------------------------------------- - - -### until(test, fn, callback) - -Repeatedly call `fn` until `test` returns `true`. Calls `callback` when stopped, -or an error occurs. - -The inverse of [`whilst`](#whilst). - ---------------------------------------- - - -### doUntil(fn, test, callback) - -Like [`doWhilst`](#doWhilst), except the `test` is inverted. Note the argument ordering differs from `until`. - ---------------------------------------- - - -### during(test, fn, callback) - -Like [`whilst`](#whilst), except the `test` is an asynchronous function that is passed a callback in the form of `function (err, truth)`. If error is passed to `test` or `fn`, the main callback is immediately called with the value of the error. - -__Example__ - -```js -var count = 0; - -async.during( - function (callback) { - return callback(null, count < 5); - }, - function (callback) { - count++; - setTimeout(callback, 1000); - }, - function (err) { - // 5 seconds have passed - } -); -``` - ---------------------------------------- - - -### doDuring(fn, test, callback) - -The post-check version of [`during`](#during). To reflect the difference in -the order of operations, the arguments `test` and `fn` are switched. - -Also a version of [`doWhilst`](#doWhilst) with asynchronous `test` function. - ---------------------------------------- - - -### forever(fn, [errback]) - -Calls the asynchronous function `fn` with a callback parameter that allows it to -call itself again, in series, indefinitely. - -If an error is passed to the callback then `errback` is called with the -error, and execution stops, otherwise it will never be called. - -```js -async.forever( - function(next) { - // next is suitable for passing to things that need a callback(err [, whatever]); - // it will result in this function being called again. - }, - function(err) { - // if next is called with a value in its first parameter, it will appear - // in here as 'err', and execution will stop. - } -); -``` - ---------------------------------------- - - -### waterfall(tasks, [callback]) - -Runs the `tasks` array of functions in series, each passing their results to the next in -the array. However, if any of the `tasks` pass an error to their own callback, the -next function is not executed, and the main `callback` is immediately called with -the error. - -__Arguments__ - -* `tasks` - An array of functions to run, each function is passed a - `callback(err, result1, result2, ...)` it must call on completion. The first - argument is an error (which can be `null`) and any further arguments will be - passed as arguments in order to the next task. -* `callback(err, [results])` - An optional callback to run once all the functions - have completed. This will be passed the results of the last task's callback. - - - -__Example__ - -```js -async.waterfall([ - function(callback) { - callback(null, 'one', 'two'); - }, - function(arg1, arg2, callback) { - // arg1 now equals 'one' and arg2 now equals 'two' - callback(null, 'three'); - }, - function(arg1, callback) { - // arg1 now equals 'three' - callback(null, 'done'); - } -], function (err, result) { - // result now equals 'done' -}); -``` - ---------------------------------------- - -### compose(fn1, fn2...) - -Creates a function which is a composition of the passed asynchronous -functions. Each function consumes the return value of the function that -follows. Composing functions `f()`, `g()`, and `h()` would produce the result of -`f(g(h()))`, only this version uses callbacks to obtain the return values. - -Each function is executed with the `this` binding of the composed function. - -__Arguments__ - -* `functions...` - the asynchronous functions to compose - - -__Example__ - -```js -function add1(n, callback) { - setTimeout(function () { - callback(null, n + 1); - }, 10); -} - -function mul3(n, callback) { - setTimeout(function () { - callback(null, n * 3); - }, 10); -} - -var add1mul3 = async.compose(mul3, add1); - -add1mul3(4, function (err, result) { - // result now equals 15 -}); -``` - ---------------------------------------- - -### seq(fn1, fn2...) - -Version of the compose function that is more natural to read. -Each function consumes the return value of the previous function. -It is the equivalent of [`compose`](#compose) with the arguments reversed. - -Each function is executed with the `this` binding of the composed function. - -__Arguments__ - -* `functions...` - the asynchronous functions to compose - - -__Example__ - -```js -// Requires lodash (or underscore), express3 and dresende's orm2. -// Part of an app, that fetches cats of the logged user. -// This example uses `seq` function to avoid overnesting and error -// handling clutter. -app.get('/cats', function(request, response) { - var User = request.models.User; - async.seq( - _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data)) - function(user, fn) { - user.getCats(fn); // 'getCats' has signature (callback(err, data)) - } - )(req.session.user_id, function (err, cats) { - if (err) { - console.error(err); - response.json({ status: 'error', message: err.message }); - } else { - response.json({ status: 'ok', message: 'Cats found', data: cats }); - } - }); -}); -``` - ---------------------------------------- - -### applyEach(fns, args..., callback) - -Applies the provided arguments to each function in the array, calling -`callback` after all functions have completed. If you only provide the first -argument, then it will return a function which lets you pass in the -arguments as if it were a single function call. - -__Arguments__ - -* `fns` - the asynchronous functions to all call with the same arguments -* `args...` - any number of separate arguments to pass to the function -* `callback` - the final argument should be the callback, called when all - functions have completed processing - - -__Example__ - -```js -async.applyEach([enableSearch, updateSchema], 'bucket', callback); - -// partial application example: -async.each( - buckets, - async.applyEach([enableSearch, updateSchema]), - callback -); -``` - -__Related__ - -* applyEachSeries(tasks, args..., [callback]) - ---------------------------------------- - - -### queue(worker, [concurrency]) - -Creates a `queue` object with the specified `concurrency`. Tasks added to the -`queue` are processed in parallel (up to the `concurrency` limit). If all -`worker`s are in progress, the task is queued until one becomes available. -Once a `worker` completes a `task`, that `task`'s callback is called. - -__Arguments__ - -* `worker(task, callback)` - An asynchronous function for processing a queued - task, which must call its `callback(err)` argument when finished, with an - optional `error` as an argument. If you want to handle errors from an individual task, pass a callback to `q.push()`. -* `concurrency` - An `integer` for determining how many `worker` functions should be - run in parallel. If omitted, the concurrency defaults to `1`. If the concurrency is `0`, an error is thrown. - -__Queue objects__ - -The `queue` object returned by this function has the following properties and -methods: - -* `length()` - a function returning the number of items waiting to be processed. -* `started` - a function returning whether or not any items have been pushed and processed by the queue -* `running()` - a function returning the number of items currently being processed. -* `idle()` - a function returning false if there are items waiting or being processed, or true if not. -* `concurrency` - an integer for determining how many `worker` functions should be - run in parallel. This property can be changed after a `queue` is created to - alter the concurrency on-the-fly. -* `push(task, [callback])` - add a new task to the `queue`. Calls `callback` once - the `worker` has finished processing the task. Instead of a single task, a `tasks` array - can be submitted. The respective callback is used for every task in the list. -* `unshift(task, [callback])` - add a new task to the front of the `queue`. -* `saturated` - a callback that is called when the `queue` length hits the `concurrency` limit, - and further tasks will be queued. -* `empty` - a callback that is called when the last item from the `queue` is given to a `worker`. -* `drain` - a callback that is called when the last item from the `queue` has returned from the `worker`. -* `paused` - a boolean for determining whether the queue is in a paused state -* `pause()` - a function that pauses the processing of tasks until `resume()` is called. -* `resume()` - a function that resumes the processing of queued tasks when the queue is paused. -* `kill()` - a function that removes the `drain` callback and empties remaining tasks from the queue forcing it to go idle. - -__Example__ - -```js -// create a queue object with concurrency 2 - -var q = async.queue(function (task, callback) { - console.log('hello ' + task.name); - callback(); -}, 2); - - -// assign a callback -q.drain = function() { - console.log('all items have been processed'); -} - -// add some items to the queue - -q.push({name: 'foo'}, function (err) { - console.log('finished processing foo'); -}); -q.push({name: 'bar'}, function (err) { - console.log('finished processing bar'); -}); - -// add some items to the queue (batch-wise) - -q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { - console.log('finished processing item'); -}); - -// add some items to the front of the queue - -q.unshift({name: 'bar'}, function (err) { - console.log('finished processing bar'); -}); -``` - - ---------------------------------------- - - -### priorityQueue(worker, concurrency) - -The same as [`queue`](#queue) only tasks are assigned a priority and completed in ascending priority order. There are two differences between `queue` and `priorityQueue` objects: - -* `push(task, priority, [callback])` - `priority` should be a number. If an array of - `tasks` is given, all tasks will be assigned the same priority. -* The `unshift` method was removed. - ---------------------------------------- - - -### cargo(worker, [payload]) - -Creates a `cargo` object with the specified payload. Tasks added to the -cargo will be processed altogether (up to the `payload` limit). If the -`worker` is in progress, the task is queued until it becomes available. Once -the `worker` has completed some tasks, each callback of those tasks is called. -Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) for how `cargo` and `queue` work. - -While [queue](#queue) passes only one task to one of a group of workers -at a time, cargo passes an array of tasks to a single worker, repeating -when the worker is finished. - -__Arguments__ - -* `worker(tasks, callback)` - An asynchronous function for processing an array of - queued tasks, which must call its `callback(err)` argument when finished, with - an optional `err` argument. -* `payload` - An optional `integer` for determining how many tasks should be - processed per round; if omitted, the default is unlimited. - -__Cargo objects__ - -The `cargo` object returned by this function has the following properties and -methods: - -* `length()` - A function returning the number of items waiting to be processed. -* `payload` - An `integer` for determining how many tasks should be - process per round. This property can be changed after a `cargo` is created to - alter the payload on-the-fly. -* `push(task, [callback])` - Adds `task` to the `queue`. The callback is called - once the `worker` has finished processing the task. Instead of a single task, an array of `tasks` - can be submitted. The respective callback is used for every task in the list. -* `saturated` - A callback that is called when the `queue.length()` hits the concurrency and further tasks will be queued. -* `empty` - A callback that is called when the last item from the `queue` is given to a `worker`. -* `drain` - A callback that is called when the last item from the `queue` has returned from the `worker`. -* `idle()`, `pause()`, `resume()`, `kill()` - cargo inherits all of the same methods and event calbacks as [`queue`](#queue) - -__Example__ - -```js -// create a cargo object with payload 2 - -var cargo = async.cargo(function (tasks, callback) { - for(var i=0; i -### auto(tasks, [callback]) - -Determines the best order for running the functions in `tasks`, based on their requirements. Each function can optionally depend on other functions being completed first, and each function is run as soon as its requirements are satisfied. - -If any of the functions pass an error to their callback, the `auto` sequence will stop. Further tasks will not execute (so any other functions depending on it will not run), and the main `callback` is immediately called with the error. Functions also receive an object containing the results of functions which have completed so far. - -Note, all functions are called with a `results` object as a second argument, -so it is unsafe to pass functions in the `tasks` object which cannot handle the -extra argument. - -For example, this snippet of code: - -```js -async.auto({ - readData: async.apply(fs.readFile, 'data.txt', 'utf-8') -}, callback); -``` - -will have the effect of calling `readFile` with the results object as the last -argument, which will fail: - -```js -fs.readFile('data.txt', 'utf-8', cb, {}); -``` - -Instead, wrap the call to `readFile` in a function which does not forward the -`results` object: - -```js -async.auto({ - readData: function(cb, results){ - fs.readFile('data.txt', 'utf-8', cb); - } -}, callback); -``` - -__Arguments__ - -* `tasks` - An object. Each of its properties is either a function or an array of - requirements, with the function itself the last item in the array. The object's key - of a property serves as the name of the task defined by that property, - i.e. can be used when specifying requirements for other tasks. - The function receives two arguments: (1) a `callback(err, result)` which must be - called when finished, passing an `error` (which can be `null`) and the result of - the function's execution, and (2) a `results` object, containing the results of - the previously executed functions. -* `callback(err, results)` - An optional callback which is called when all the - tasks have been completed. It receives the `err` argument if any `tasks` - pass an error to their callback. Results are always returned; however, if - an error occurs, no further `tasks` will be performed, and the results - object will only contain partial results. - - -__Example__ - -```js -async.auto({ - get_data: function(callback){ - console.log('in get_data'); - // async code to get some data - callback(null, 'data', 'converted to array'); - }, - make_folder: function(callback){ - console.log('in make_folder'); - // async code to create a directory to store a file in - // this is run at the same time as getting the data - callback(null, 'folder'); - }, - write_file: ['get_data', 'make_folder', function(callback, results){ - console.log('in write_file', JSON.stringify(results)); - // once there is some data and the directory exists, - // write the data to a file in the directory - callback(null, 'filename'); - }], - email_link: ['write_file', function(callback, results){ - console.log('in email_link', JSON.stringify(results)); - // once the file is written let's email a link to it... - // results.write_file contains the filename returned by write_file. - callback(null, {'file':results.write_file, 'email':'user@example.com'}); - }] -}, function(err, results) { - console.log('err = ', err); - console.log('results = ', results); -}); -``` - -This is a fairly trivial example, but to do this using the basic parallel and -series functions would look like this: - -```js -async.parallel([ - function(callback){ - console.log('in get_data'); - // async code to get some data - callback(null, 'data', 'converted to array'); - }, - function(callback){ - console.log('in make_folder'); - // async code to create a directory to store a file in - // this is run at the same time as getting the data - callback(null, 'folder'); - } -], -function(err, results){ - async.series([ - function(callback){ - console.log('in write_file', JSON.stringify(results)); - // once there is some data and the directory exists, - // write the data to a file in the directory - results.push('filename'); - callback(null); - }, - function(callback){ - console.log('in email_link', JSON.stringify(results)); - // once the file is written let's email a link to it... - callback(null, {'file':results.pop(), 'email':'user@example.com'}); - } - ]); -}); -``` - -For a complicated series of `async` tasks, using the [`auto`](#auto) function makes adding -new tasks much easier (and the code more readable). - - ---------------------------------------- - - -### retry([opts = {times: 5, interval: 0}| 5], task, [callback]) - -Attempts to get a successful response from `task` no more than `times` times before -returning an error. If the task is successful, the `callback` will be passed the result -of the successful task. If all attempts fail, the callback will be passed the error and -result (if any) of the final attempt. - -__Arguments__ - -* `opts` - Can be either an object with `times` and `interval` or a number. `times` is how many attempts should be made before giving up. `interval` is how long to wait inbetween attempts. Defaults to {times: 5, interval: 0} - * if a number is passed in it sets `times` only (with `interval` defaulting to 0). -* `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)` - which must be called when finished, passing `err` (which can be `null`) and the `result` of - the function's execution, and (2) a `results` object, containing the results of - the previously executed functions (if nested inside another control flow). -* `callback(err, results)` - An optional callback which is called when the - task has succeeded, or after the final failed attempt. It receives the `err` and `result` arguments of the last attempt at completing the `task`. - -The [`retry`](#retry) function can be used as a stand-alone control flow by passing a -callback, as shown below: - -```js -async.retry(3, apiMethod, function(err, result) { - // do something with the result -}); -``` - -```js -async.retry({times: 3, interval: 200}, apiMethod, function(err, result) { - // do something with the result -}); -``` - -It can also be embeded within other control flow functions to retry individual methods -that are not as reliable, like this: - -```js -async.auto({ - users: api.getUsers.bind(api), - payments: async.retry(3, api.getPayments.bind(api)) -}, function(err, results) { - // do something with the results -}); -``` - - ---------------------------------------- - - -### iterator(tasks) - -Creates an iterator function which calls the next function in the `tasks` array, -returning a continuation to call the next one after that. It's also possible to -“peek” at the next iterator with `iterator.next()`. - -This function is used internally by the `async` module, but can be useful when -you want to manually control the flow of functions in series. - -__Arguments__ - -* `tasks` - An array of functions to run. - -__Example__ - -```js -var iterator = async.iterator([ - function(){ sys.p('one'); }, - function(){ sys.p('two'); }, - function(){ sys.p('three'); } -]); - -node> var iterator2 = iterator(); -'one' -node> var iterator3 = iterator2(); -'two' -node> iterator3(); -'three' -node> var nextfn = iterator2.next(); -node> nextfn(); -'three' -``` - ---------------------------------------- - - -### apply(function, arguments..) - -Creates a continuation function with some arguments already applied. - -Useful as a shorthand when combined with other control flow functions. Any arguments -passed to the returned function are added to the arguments originally passed -to apply. - -__Arguments__ - -* `function` - The function you want to eventually apply all arguments to. -* `arguments...` - Any number of arguments to automatically apply when the - continuation is called. - -__Example__ - -```js -// using apply - -async.parallel([ - async.apply(fs.writeFile, 'testfile1', 'test1'), - async.apply(fs.writeFile, 'testfile2', 'test2'), -]); - - -// the same process without using apply - -async.parallel([ - function(callback){ - fs.writeFile('testfile1', 'test1', callback); - }, - function(callback){ - fs.writeFile('testfile2', 'test2', callback); - } -]); -``` - -It's possible to pass any number of additional arguments when calling the -continuation: - -```js -node> var fn = async.apply(sys.puts, 'one'); -node> fn('two', 'three'); -one -two -three -``` - ---------------------------------------- - - -### nextTick(callback), setImmediate(callback) - -Calls `callback` on a later loop around the event loop. In Node.js this just -calls `process.nextTick`; in the browser it falls back to `setImmediate(callback)` -if available, otherwise `setTimeout(callback, 0)`, which means other higher priority -events may precede the execution of `callback`. - -This is used internally for browser-compatibility purposes. - -__Arguments__ - -* `callback` - The function to call on a later loop around the event loop. - -__Example__ - -```js -var call_order = []; -async.nextTick(function(){ - call_order.push('two'); - // call_order now equals ['one','two'] -}); -call_order.push('one') -``` - - -### times(n, iterator, [callback]) - -Calls the `iterator` function `n` times, and accumulates results in the same manner -you would use with [`map`](#map). - -__Arguments__ - -* `n` - The number of times to run the function. -* `iterator` - The function to call `n` times. -* `callback` - see [`map`](#map) - -__Example__ - -```js -// Pretend this is some complicated async factory -var createUser = function(id, callback) { - callback(null, { - id: 'user' + id - }) -} -// generate 5 users -async.times(5, function(n, next){ - createUser(n, function(err, user) { - next(err, user) - }) -}, function(err, users) { - // we should now have 5 users -}); -``` - -__Related__ - -* timesSeries(n, iterator, [callback]) -* timesLimit(n, limit, iterator, [callback]) - - -## Utils - - -### memoize(fn, [hasher]) - -Caches the results of an `async` function. When creating a hash to store function -results against, the callback is omitted from the hash and an optional hash -function can be used. - -If no hash function is specified, the first argument is used as a hash key, which may work reasonably if it is a string or a data type that converts to a distinct string. Note that objects and arrays will not behave reasonably. Neither will cases where the other arguments are significant. In such cases, specify your own hash function. - -The cache of results is exposed as the `memo` property of the function returned -by `memoize`. - -__Arguments__ - -* `fn` - The function to proxy and cache results from. -* `hasher` - An optional function for generating a custom hash for storing - results. It has all the arguments applied to it apart from the callback, and - must be synchronous. - -__Example__ - -```js -var slow_fn = function (name, callback) { - // do something - callback(null, result); -}; -var fn = async.memoize(slow_fn); - -// fn can now be used as if it were slow_fn -fn('some name', function () { - // callback -}); -``` - - -### unmemoize(fn) - -Undoes a [`memoize`](#memoize)d function, reverting it to the original, unmemoized -form. Handy for testing. - -__Arguments__ - -* `fn` - the memoized function - ---------------------------------------- - - -### ensureAsync(fn) - -Wrap an async function and ensure it calls its callback on a later tick of the event loop. If the function already calls its callback on a next tick, no extra deferral is added. This is useful for preventing stack overflows (`RangeError: Maximum call stack size exceeded`) and generally keeping [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) contained. - -__Arguments__ - -* `fn` - an async function, one that expects a node-style callback as its last argument - -Returns a wrapped function with the exact same call signature as the function passed in. - -__Example__ - -```js -function sometimesAsync(arg, callback) { - if (cache[arg]) { - return callback(null, cache[arg]); // this would be synchronous!! - } else { - doSomeIO(arg, callback); // this IO would be asynchronous - } -} - -// this has a risk of stack overflows if many results are cached in a row -async.mapSeries(args, sometimesAsync, done); - -// this will defer sometimesAsync's callback if necessary, -// preventing stack overflows -async.mapSeries(args, async.ensureAsync(sometimesAsync), done); - -``` - ---------------------------------------- - - -### constant(values...) - -Returns a function that when called, calls-back with the values provided. Useful as the first function in a `waterfall`, or for plugging values in to `auto`. - -__Example__ - -```js -async.waterfall([ - async.constant(42), - function (value, next) { - // value === 42 - }, - //... -], callback); - -async.waterfall([ - async.constant(filename, "utf8"), - fs.readFile, - function (fileData, next) { - //... - } - //... -], callback); - -async.auto({ - hostname: async.constant("https://server.net/"), - port: findFreePort, - launchServer: ["hostname", "port", function (cb, options) { - startServer(options, cb); - }], - //... -}, callback); - -``` - ---------------------------------------- - - - -### asyncify(func) - -__Alias:__ `wrapSync` - -Take a sync function and make it async, passing its return value to a callback. This is useful for plugging sync functions into a waterfall, series, or other async functions. Any arguments passed to the generated function will be passed to the wrapped function (except for the final callback argument). Errors thrown will be passed to the callback. - -__Example__ - -```js -async.waterfall([ - async.apply(fs.readFile, filename, "utf8"), - async.asyncify(JSON.parse), - function (data, next) { - // data is the result of parsing the text. - // If there was a parsing error, it would have been caught. - } -], callback) -``` - ---------------------------------------- - - -### log(function, arguments) - -Logs the result of an `async` function to the `console`. Only works in Node.js or -in browsers that support `console.log` and `console.error` (such as FF and Chrome). -If multiple arguments are returned from the async function, `console.log` is -called on each argument in order. - -__Arguments__ - -* `function` - The function you want to eventually apply all arguments to. -* `arguments...` - Any number of arguments to apply to the function. - -__Example__ - -```js -var hello = function(name, callback){ - setTimeout(function(){ - callback(null, 'hello ' + name); - }, 1000); -}; -``` -```js -node> async.log(hello, 'world'); -'hello world' -``` - ---------------------------------------- - - -### dir(function, arguments) - -Logs the result of an `async` function to the `console` using `console.dir` to -display the properties of the resulting object. Only works in Node.js or -in browsers that support `console.dir` and `console.error` (such as FF and Chrome). -If multiple arguments are returned from the async function, `console.dir` is -called on each argument in order. - -__Arguments__ - -* `function` - The function you want to eventually apply all arguments to. -* `arguments...` - Any number of arguments to apply to the function. - -__Example__ - -```js -var hello = function(name, callback){ - setTimeout(function(){ - callback(null, {hello: name}); - }, 1000); -}; -``` -```js -node> async.dir(hello, 'world'); -{hello: 'world'} -``` - ---------------------------------------- - - -### noConflict() - -Changes the value of `async` back to its original value, returning a reference to the -`async` object. diff --git a/cli/node_modules/del/node_modules/globby/node_modules/async/lib/async.js b/cli/node_modules/del/node_modules/globby/node_modules/async/lib/async.js deleted file mode 100644 index f3cfb8071..000000000 --- a/cli/node_modules/del/node_modules/globby/node_modules/async/lib/async.js +++ /dev/null @@ -1,1216 +0,0 @@ -/*! - * async - * https://github.com/caolan/async - * - * Copyright 2010-2014 Caolan McMahon - * Released under the MIT license - */ -(function () { - - var async = {}; - function noop() {} - function identity(v) { - return v; - } - function toBool(v) { - return !!v; - } - function notId(v) { - return !v; - } - - // global on the server, window in the browser - var previous_async; - - // Establish the root object, `window` (`self`) in the browser, `global` - // on the server, or `this` in some virtual machines. We use `self` - // instead of `window` for `WebWorker` support. - var root = typeof self === 'object' && self.self === self && self || - typeof global === 'object' && global.global === global && global || - this; - - if (root != null) { - previous_async = root.async; - } - - async.noConflict = function () { - root.async = previous_async; - return async; - }; - - function only_once(fn) { - return function() { - if (fn === null) throw new Error("Callback was already called."); - fn.apply(this, arguments); - fn = null; - }; - } - - function _once(fn) { - return function() { - if (fn === null) return; - fn.apply(this, arguments); - fn = null; - }; - } - - //// cross-browser compatiblity functions //// - - var _toString = Object.prototype.toString; - - var _isArray = Array.isArray || function (obj) { - return _toString.call(obj) === '[object Array]'; - }; - - function _isArrayLike(arr) { - return _isArray(arr) || ( - // has a positive integer length property - typeof arr.length === "number" && - arr.length >= 0 && - arr.length % 1 === 0 - ); - } - - function _each(coll, iterator) { - return _isArrayLike(coll) ? - _arrayEach(coll, iterator) : - _forEachOf(coll, iterator); - } - - function _arrayEach(arr, iterator) { - var index = -1, - length = arr.length; - - while (++index < length) { - iterator(arr[index], index, arr); - } - } - - function _map(arr, iterator) { - var index = -1, - length = arr.length, - result = Array(length); - - while (++index < length) { - result[index] = iterator(arr[index], index, arr); - } - return result; - } - - function _range(count) { - return _map(Array(count), function (v, i) { return i; }); - } - - function _reduce(arr, iterator, memo) { - _arrayEach(arr, function (x, i, a) { - memo = iterator(memo, x, i, a); - }); - return memo; - } - - function _forEachOf(object, iterator) { - _arrayEach(_keys(object), function (key) { - iterator(object[key], key); - }); - } - - function _indexOf(arr, item) { - for (var i = 0; i < arr.length; i++) { - if (arr[i] === item) return i; - } - return -1; - } - - var _keys = Object.keys || function (obj) { - var keys = []; - for (var k in obj) { - if (obj.hasOwnProperty(k)) { - keys.push(k); - } - } - return keys; - }; - - function _keyIterator(coll) { - var i = -1; - var len; - var keys; - if (_isArrayLike(coll)) { - len = coll.length; - return function next() { - i++; - return i < len ? i : null; - }; - } else { - keys = _keys(coll); - len = keys.length; - return function next() { - i++; - return i < len ? keys[i] : null; - }; - } - } - - // Similar to ES6's rest param (http://ariya.ofilabs.com/2013/03/es6-and-rest-parameter.html) - // This accumulates the arguments passed into an array, after a given index. - // From underscore.js (https://github.com/jashkenas/underscore/pull/2140). - function _restParam(func, startIndex) { - startIndex = startIndex == null ? func.length - 1 : +startIndex; - return function() { - var length = Math.max(arguments.length - startIndex, 0); - var rest = Array(length); - for (var index = 0; index < length; index++) { - rest[index] = arguments[index + startIndex]; - } - switch (startIndex) { - case 0: return func.call(this, rest); - case 1: return func.call(this, arguments[0], rest); - case 2: return func.call(this, arguments[0], arguments[1], rest); - } - // Currently unused but handle cases outside of the switch statement: - // var args = Array(startIndex + 1); - // for (index = 0; index < startIndex; index++) { - // args[index] = arguments[index]; - // } - // args[startIndex] = rest; - // return func.apply(this, args); - }; - } - - function _withoutIndex(iterator) { - return function (value, index, callback) { - return iterator(value, callback); - }; - } - - //// exported async module functions //// - - //// nextTick implementation with browser-compatible fallback //// - - // capture the global reference to guard against fakeTimer mocks - var _setImmediate = typeof setImmediate === 'function' && setImmediate; - - var _delay = _setImmediate ? function(fn) { - // not a direct alias for IE10 compatibility - _setImmediate(fn); - } : function(fn) { - setTimeout(fn, 0); - }; - - if (typeof process === 'object' && typeof process.nextTick === 'function') { - async.nextTick = process.nextTick; - } else { - async.nextTick = _delay; - } - async.setImmediate = _setImmediate ? _delay : async.nextTick; - - - async.forEach = - async.each = function (arr, iterator, callback) { - return async.eachOf(arr, _withoutIndex(iterator), callback); - }; - - async.forEachSeries = - async.eachSeries = function (arr, iterator, callback) { - return async.eachOfSeries(arr, _withoutIndex(iterator), callback); - }; - - - async.forEachLimit = - async.eachLimit = function (arr, limit, iterator, callback) { - return _eachOfLimit(limit)(arr, _withoutIndex(iterator), callback); - }; - - async.forEachOf = - async.eachOf = function (object, iterator, callback) { - callback = _once(callback || noop); - object = object || []; - var size = _isArrayLike(object) ? object.length : _keys(object).length; - var completed = 0; - if (!size) { - return callback(null); - } - _each(object, function (value, key) { - iterator(object[key], key, only_once(done)); - }); - function done(err) { - if (err) { - callback(err); - } - else { - completed += 1; - if (completed >= size) { - callback(null); - } - } - } - }; - - async.forEachOfSeries = - async.eachOfSeries = function (obj, iterator, callback) { - callback = _once(callback || noop); - obj = obj || []; - var nextKey = _keyIterator(obj); - var key = nextKey(); - function iterate() { - var sync = true; - if (key === null) { - return callback(null); - } - iterator(obj[key], key, only_once(function (err) { - if (err) { - callback(err); - } - else { - key = nextKey(); - if (key === null) { - return callback(null); - } else { - if (sync) { - async.nextTick(iterate); - } else { - iterate(); - } - } - } - })); - sync = false; - } - iterate(); - }; - - - - async.forEachOfLimit = - async.eachOfLimit = function (obj, limit, iterator, callback) { - _eachOfLimit(limit)(obj, iterator, callback); - }; - - function _eachOfLimit(limit) { - - return function (obj, iterator, callback) { - callback = _once(callback || noop); - obj = obj || []; - var nextKey = _keyIterator(obj); - if (limit <= 0) { - return callback(null); - } - var done = false; - var running = 0; - var errored = false; - - (function replenish () { - if (done && running <= 0) { - return callback(null); - } - - while (running < limit && !errored) { - var key = nextKey(); - if (key === null) { - done = true; - if (running <= 0) { - callback(null); - } - return; - } - running += 1; - iterator(obj[key], key, only_once(function (err) { - running -= 1; - if (err) { - callback(err); - errored = true; - } - else { - replenish(); - } - })); - } - })(); - }; - } - - - function doParallel(fn) { - return function (obj, iterator, callback) { - return fn(async.eachOf, obj, iterator, callback); - }; - } - function doParallelLimit(fn) { - return function (obj, limit, iterator, callback) { - return fn(_eachOfLimit(limit), obj, iterator, callback); - }; - } - function doSeries(fn) { - return function (obj, iterator, callback) { - return fn(async.eachOfSeries, obj, iterator, callback); - }; - } - - function _asyncMap(eachfn, arr, iterator, callback) { - callback = _once(callback || noop); - var results = []; - eachfn(arr, function (value, index, callback) { - iterator(value, function (err, v) { - results[index] = v; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - - async.map = doParallel(_asyncMap); - async.mapSeries = doSeries(_asyncMap); - async.mapLimit = doParallelLimit(_asyncMap); - - // reduce only has a series version, as doing reduce in parallel won't - // work in many situations. - async.inject = - async.foldl = - async.reduce = function (arr, memo, iterator, callback) { - async.eachOfSeries(arr, function (x, i, callback) { - iterator(memo, x, function (err, v) { - memo = v; - callback(err); - }); - }, function (err) { - callback(err || null, memo); - }); - }; - - async.foldr = - async.reduceRight = function (arr, memo, iterator, callback) { - var reversed = _map(arr, identity).reverse(); - async.reduce(reversed, memo, iterator, callback); - }; - - function _filter(eachfn, arr, iterator, callback) { - var results = []; - eachfn(arr, function (x, index, callback) { - iterator(x, function (v) { - if (v) { - results.push({index: index, value: x}); - } - callback(); - }); - }, function () { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - } - - async.select = - async.filter = doParallel(_filter); - - async.selectLimit = - async.filterLimit = doParallelLimit(_filter); - - async.selectSeries = - async.filterSeries = doSeries(_filter); - - function _reject(eachfn, arr, iterator, callback) { - _filter(eachfn, arr, function(value, cb) { - iterator(value, function(v) { - cb(!v); - }); - }, callback); - } - async.reject = doParallel(_reject); - async.rejectLimit = doParallelLimit(_reject); - async.rejectSeries = doSeries(_reject); - - function _createTester(eachfn, check, getResult) { - return function(arr, limit, iterator, cb) { - function done() { - if (cb) cb(getResult(false, void 0)); - } - function iteratee(x, _, callback) { - if (!cb) return callback(); - iterator(x, function (v) { - if (cb && check(v)) { - cb(getResult(true, x)); - cb = iterator = false; - } - callback(); - }); - } - if (arguments.length > 3) { - eachfn(arr, limit, iteratee, done); - } else { - cb = iterator; - iterator = limit; - eachfn(arr, iteratee, done); - } - }; - } - - async.any = - async.some = _createTester(async.eachOf, toBool, identity); - - async.someLimit = _createTester(async.eachOfLimit, toBool, identity); - - async.all = - async.every = _createTester(async.eachOf, notId, notId); - - async.everyLimit = _createTester(async.eachOfLimit, notId, notId); - - function _findGetResult(v, x) { - return x; - } - async.detect = _createTester(async.eachOf, identity, _findGetResult); - async.detectSeries = _createTester(async.eachOfSeries, identity, _findGetResult); - - async.sortBy = function (arr, iterator, callback) { - async.map(arr, function (x, callback) { - iterator(x, function (err, criteria) { - if (err) { - callback(err); - } - else { - callback(null, {value: x, criteria: criteria}); - } - }); - }, function (err, results) { - if (err) { - return callback(err); - } - else { - callback(null, _map(results.sort(comparator), function (x) { - return x.value; - })); - } - - }); - - function comparator(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - } - }; - - async.auto = function (tasks, callback) { - callback = _once(callback || noop); - var keys = _keys(tasks); - var remainingTasks = keys.length; - if (!remainingTasks) { - return callback(null); - } - - var results = {}; - - var listeners = []; - function addListener(fn) { - listeners.unshift(fn); - } - function removeListener(fn) { - var idx = _indexOf(listeners, fn); - if (idx >= 0) listeners.splice(idx, 1); - } - function taskComplete() { - remainingTasks--; - _arrayEach(listeners.slice(0), function (fn) { - fn(); - }); - } - - addListener(function () { - if (!remainingTasks) { - callback(null, results); - } - }); - - _arrayEach(keys, function (k) { - var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]]; - var taskCallback = _restParam(function(err, args) { - if (args.length <= 1) { - args = args[0]; - } - if (err) { - var safeResults = {}; - _forEachOf(results, function(val, rkey) { - safeResults[rkey] = val; - }); - safeResults[k] = args; - callback(err, safeResults); - } - else { - results[k] = args; - async.setImmediate(taskComplete); - } - }); - var requires = task.slice(0, task.length - 1); - // prevent dead-locks - var len = requires.length; - var dep; - while (len--) { - if (!(dep = tasks[requires[len]])) { - throw new Error('Has inexistant dependency'); - } - if (_isArray(dep) && _indexOf(dep, k) >= 0) { - throw new Error('Has cyclic dependencies'); - } - } - function ready() { - return _reduce(requires, function (a, x) { - return (a && results.hasOwnProperty(x)); - }, true) && !results.hasOwnProperty(k); - } - if (ready()) { - task[task.length - 1](taskCallback, results); - } - else { - addListener(listener); - } - function listener() { - if (ready()) { - removeListener(listener); - task[task.length - 1](taskCallback, results); - } - } - }); - }; - - - - async.retry = function(times, task, callback) { - var DEFAULT_TIMES = 5; - var DEFAULT_INTERVAL = 0; - - var attempts = []; - - var opts = { - times: DEFAULT_TIMES, - interval: DEFAULT_INTERVAL - }; - - function parseTimes(acc, t){ - if(typeof t === 'number'){ - acc.times = parseInt(t, 10) || DEFAULT_TIMES; - } else if(typeof t === 'object'){ - acc.times = parseInt(t.times, 10) || DEFAULT_TIMES; - acc.interval = parseInt(t.interval, 10) || DEFAULT_INTERVAL; - } else { - throw new Error('Unsupported argument type for \'times\': ' + typeof(t)); - } - } - - var length = arguments.length; - if (length < 1 || length > 3) { - throw new Error('Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)'); - } else if (length <= 2 && typeof times === 'function') { - callback = task; - task = times; - } - if (typeof times !== 'function') { - parseTimes(opts, times); - } - opts.callback = callback; - opts.task = task; - - function wrappedTask(wrappedCallback, wrappedResults) { - function retryAttempt(task, finalAttempt) { - return function(seriesCallback) { - task(function(err, result){ - seriesCallback(!err || finalAttempt, {err: err, result: result}); - }, wrappedResults); - }; - } - - function retryInterval(interval){ - return function(seriesCallback){ - setTimeout(function(){ - seriesCallback(null); - }, interval); - }; - } - - while (opts.times) { - - var finalAttempt = !(opts.times-=1); - attempts.push(retryAttempt(opts.task, finalAttempt)); - if(!finalAttempt && opts.interval > 0){ - attempts.push(retryInterval(opts.interval)); - } - } - - async.series(attempts, function(done, data){ - data = data[data.length - 1]; - (wrappedCallback || opts.callback)(data.err, data.result); - }); - } - - // If a callback is passed, run this as a controll flow - return opts.callback ? wrappedTask() : wrappedTask; - }; - - async.waterfall = function (tasks, callback) { - callback = _once(callback || noop); - if (!_isArray(tasks)) { - var err = new Error('First argument to waterfall must be an array of functions'); - return callback(err); - } - if (!tasks.length) { - return callback(); - } - function wrapIterator(iterator) { - return _restParam(function (err, args) { - if (err) { - callback.apply(null, [err].concat(args)); - } - else { - var next = iterator.next(); - if (next) { - args.push(wrapIterator(next)); - } - else { - args.push(callback); - } - ensureAsync(iterator).apply(null, args); - } - }); - } - wrapIterator(async.iterator(tasks))(); - }; - - function _parallel(eachfn, tasks, callback) { - callback = callback || noop; - var results = _isArrayLike(tasks) ? [] : {}; - - eachfn(tasks, function (task, key, callback) { - task(_restParam(function (err, args) { - if (args.length <= 1) { - args = args[0]; - } - results[key] = args; - callback(err); - })); - }, function (err) { - callback(err, results); - }); - } - - async.parallel = function (tasks, callback) { - _parallel(async.eachOf, tasks, callback); - }; - - async.parallelLimit = function(tasks, limit, callback) { - _parallel(_eachOfLimit(limit), tasks, callback); - }; - - async.series = function(tasks, callback) { - _parallel(async.eachOfSeries, tasks, callback); - }; - - async.iterator = function (tasks) { - function makeCallback(index) { - function fn() { - if (tasks.length) { - tasks[index].apply(null, arguments); - } - return fn.next(); - } - fn.next = function () { - return (index < tasks.length - 1) ? makeCallback(index + 1): null; - }; - return fn; - } - return makeCallback(0); - }; - - async.apply = _restParam(function (fn, args) { - return _restParam(function (callArgs) { - return fn.apply( - null, args.concat(callArgs) - ); - }); - }); - - function _concat(eachfn, arr, fn, callback) { - var result = []; - eachfn(arr, function (x, index, cb) { - fn(x, function (err, y) { - result = result.concat(y || []); - cb(err); - }); - }, function (err) { - callback(err, result); - }); - } - async.concat = doParallel(_concat); - async.concatSeries = doSeries(_concat); - - async.whilst = function (test, iterator, callback) { - callback = callback || noop; - if (test()) { - var next = _restParam(function(err, args) { - if (err) { - callback(err); - } else if (test.apply(this, args)) { - iterator(next); - } else { - callback(null); - } - }); - iterator(next); - } else { - callback(null); - } - }; - - async.doWhilst = function (iterator, test, callback) { - var calls = 0; - return async.whilst(function() { - return ++calls <= 1 || test.apply(this, arguments); - }, iterator, callback); - }; - - async.until = function (test, iterator, callback) { - return async.whilst(function() { - return !test.apply(this, arguments); - }, iterator, callback); - }; - - async.doUntil = function (iterator, test, callback) { - return async.doWhilst(iterator, function() { - return !test.apply(this, arguments); - }, callback); - }; - - async.during = function (test, iterator, callback) { - callback = callback || noop; - - var next = _restParam(function(err, args) { - if (err) { - callback(err); - } else { - args.push(check); - test.apply(this, args); - } - }); - - var check = function(err, truth) { - if (err) { - callback(err); - } else if (truth) { - iterator(next); - } else { - callback(null); - } - }; - - test(check); - }; - - async.doDuring = function (iterator, test, callback) { - var calls = 0; - async.during(function(next) { - if (calls++ < 1) { - next(null, true); - } else { - test.apply(this, arguments); - } - }, iterator, callback); - }; - - function _queue(worker, concurrency, payload) { - if (concurrency == null) { - concurrency = 1; - } - else if(concurrency === 0) { - throw new Error('Concurrency must not be zero'); - } - function _insert(q, data, pos, callback) { - if (callback != null && typeof callback !== "function") { - throw new Error("task callback must be a function"); - } - q.started = true; - if (!_isArray(data)) { - data = [data]; - } - if(data.length === 0 && q.idle()) { - // call drain immediately if there are no tasks - return async.setImmediate(function() { - q.drain(); - }); - } - _arrayEach(data, function(task) { - var item = { - data: task, - callback: callback || noop - }; - - if (pos) { - q.tasks.unshift(item); - } else { - q.tasks.push(item); - } - - if (q.tasks.length === q.concurrency) { - q.saturated(); - } - }); - async.setImmediate(q.process); - } - function _next(q, tasks) { - return function(){ - workers -= 1; - var args = arguments; - _arrayEach(tasks, function (task) { - task.callback.apply(task, args); - }); - if (q.tasks.length + workers === 0) { - q.drain(); - } - q.process(); - }; - } - - var workers = 0; - var q = { - tasks: [], - concurrency: concurrency, - payload: payload, - saturated: noop, - empty: noop, - drain: noop, - started: false, - paused: false, - push: function (data, callback) { - _insert(q, data, false, callback); - }, - kill: function () { - q.drain = noop; - q.tasks = []; - }, - unshift: function (data, callback) { - _insert(q, data, true, callback); - }, - process: function () { - if (!q.paused && workers < q.concurrency && q.tasks.length) { - while(workers < q.concurrency && q.tasks.length){ - var tasks = q.payload ? - q.tasks.splice(0, q.payload) : - q.tasks.splice(0, q.tasks.length); - - var data = _map(tasks, function (task) { - return task.data; - }); - - if (q.tasks.length === 0) { - q.empty(); - } - workers += 1; - var cb = only_once(_next(q, tasks)); - worker(data, cb); - } - } - }, - length: function () { - return q.tasks.length; - }, - running: function () { - return workers; - }, - idle: function() { - return q.tasks.length + workers === 0; - }, - pause: function () { - q.paused = true; - }, - resume: function () { - if (q.paused === false) { return; } - q.paused = false; - var resumeCount = Math.min(q.concurrency, q.tasks.length); - // Need to call q.process once per concurrent - // worker to preserve full concurrency after pause - for (var w = 1; w <= resumeCount; w++) { - async.setImmediate(q.process); - } - } - }; - return q; - } - - async.queue = function (worker, concurrency) { - var q = _queue(function (items, cb) { - worker(items[0], cb); - }, concurrency, 1); - - return q; - }; - - async.priorityQueue = function (worker, concurrency) { - - function _compareTasks(a, b){ - return a.priority - b.priority; - } - - function _binarySearch(sequence, item, compare) { - var beg = -1, - end = sequence.length - 1; - while (beg < end) { - var mid = beg + ((end - beg + 1) >>> 1); - if (compare(item, sequence[mid]) >= 0) { - beg = mid; - } else { - end = mid - 1; - } - } - return beg; - } - - function _insert(q, data, priority, callback) { - if (callback != null && typeof callback !== "function") { - throw new Error("task callback must be a function"); - } - q.started = true; - if (!_isArray(data)) { - data = [data]; - } - if(data.length === 0) { - // call drain immediately if there are no tasks - return async.setImmediate(function() { - q.drain(); - }); - } - _arrayEach(data, function(task) { - var item = { - data: task, - priority: priority, - callback: typeof callback === 'function' ? callback : noop - }; - - q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item); - - if (q.tasks.length === q.concurrency) { - q.saturated(); - } - async.setImmediate(q.process); - }); - } - - // Start with a normal queue - var q = async.queue(worker, concurrency); - - // Override push to accept second parameter representing priority - q.push = function (data, priority, callback) { - _insert(q, data, priority, callback); - }; - - // Remove unshift function - delete q.unshift; - - return q; - }; - - async.cargo = function (worker, payload) { - return _queue(worker, 1, payload); - }; - - function _console_fn(name) { - return _restParam(function (fn, args) { - fn.apply(null, args.concat([_restParam(function (err, args) { - if (typeof console !== 'undefined') { - if (err) { - if (console.error) { - console.error(err); - } - } - else if (console[name]) { - _arrayEach(args, function (x) { - console[name](x); - }); - } - } - })])); - }); - } - async.log = _console_fn('log'); - async.dir = _console_fn('dir'); - /*async.info = _console_fn('info'); - async.warn = _console_fn('warn'); - async.error = _console_fn('error');*/ - - async.memoize = function (fn, hasher) { - var memo = {}; - var queues = {}; - hasher = hasher || identity; - var memoized = _restParam(function memoized(args) { - var callback = args.pop(); - var key = hasher.apply(null, args); - if (key in memo) { - async.nextTick(function () { - callback.apply(null, memo[key]); - }); - } - else if (key in queues) { - queues[key].push(callback); - } - else { - queues[key] = [callback]; - fn.apply(null, args.concat([_restParam(function (args) { - memo[key] = args; - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i].apply(null, args); - } - })])); - } - }); - memoized.memo = memo; - memoized.unmemoized = fn; - return memoized; - }; - - async.unmemoize = function (fn) { - return function () { - return (fn.unmemoized || fn).apply(null, arguments); - }; - }; - - function _times(mapper) { - return function (count, iterator, callback) { - mapper(_range(count), iterator, callback); - }; - } - - async.times = _times(async.map); - async.timesSeries = _times(async.mapSeries); - async.timesLimit = function (count, limit, iterator, callback) { - return async.mapLimit(_range(count), limit, iterator, callback); - }; - - async.seq = function (/* functions... */) { - var fns = arguments; - return _restParam(function (args) { - var that = this; - - var callback = args[args.length - 1]; - if (typeof callback == 'function') { - args.pop(); - } else { - callback = noop; - } - - async.reduce(fns, args, function (newargs, fn, cb) { - fn.apply(that, newargs.concat([_restParam(function (err, nextargs) { - cb(err, nextargs); - })])); - }, - function (err, results) { - callback.apply(that, [err].concat(results)); - }); - }); - }; - - async.compose = function (/* functions... */) { - return async.seq.apply(null, Array.prototype.reverse.call(arguments)); - }; - - - function _applyEach(eachfn) { - return _restParam(function(fns, args) { - var go = _restParam(function(args) { - var that = this; - var callback = args.pop(); - return eachfn(fns, function (fn, _, cb) { - fn.apply(that, args.concat([cb])); - }, - callback); - }); - if (args.length) { - return go.apply(this, args); - } - else { - return go; - } - }); - } - - async.applyEach = _applyEach(async.eachOf); - async.applyEachSeries = _applyEach(async.eachOfSeries); - - - async.forever = function (fn, callback) { - var done = only_once(callback || noop); - var task = ensureAsync(fn); - function next(err) { - if (err) { - return done(err); - } - task(next); - } - next(); - }; - - function ensureAsync(fn) { - return _restParam(function (args) { - var callback = args.pop(); - args.push(function () { - var innerArgs = arguments; - if (sync) { - async.setImmediate(function () { - callback.apply(null, innerArgs); - }); - } else { - callback.apply(null, innerArgs); - } - }); - var sync = true; - fn.apply(this, args); - sync = false; - }); - } - - async.ensureAsync = ensureAsync; - - async.constant = _restParam(function(values) { - var args = [null].concat(values); - return function (callback) { - return callback.apply(this, args); - }; - }); - - async.wrapSync = - async.asyncify = function asyncify(func) { - return _restParam(function (args) { - var callback = args.pop(); - var result; - try { - result = func.apply(this, args); - } catch (e) { - return callback(e); - } - // if result is Promise object - if (typeof result !== 'undefined' && typeof result.then === "function") { - result.then(function(value) { - callback(null, value); - }).catch(function(err) { - callback(err.message ? err : new Error(err)); - }); - } else { - callback(null, result); - } - }); - }; - - // Node.js - if (typeof module !== 'undefined' && module.exports) { - module.exports = async; - } - // AMD / RequireJS - else if (typeof define !== 'undefined' && define.amd) { - define([], function () { - return async; - }); - } - // included directly via '); - expect(encoded).to.equal('\\x3cscript\\x3ealert\\x281\\x29\\x3c\\x2fscript\\x3e'); - done(); - }); - - it('encodes \' characters', function (done) { - - var encoded = Hoek.escapeJavaScript('something(\'param\')'); - expect(encoded).to.equal('something\\x28\\x27param\\x27\\x29'); - done(); - }); - - it('encodes large unicode characters with the correct padding', function (done) { - - var encoded = Hoek.escapeJavaScript(String.fromCharCode(500) + String.fromCharCode(1000)); - expect(encoded).to.equal('\\u0500\\u1000'); - done(); - }); - - it('doesn\'t throw an exception when passed null', function (done) { - - var encoded = Hoek.escapeJavaScript(null); - expect(encoded).to.equal(''); - done(); - }); -}); - -describe('escapeHtml()', function () { - - it('encodes / characters', function (done) { - - var encoded = Hoek.escapeHtml(''); - expect(encoded).to.equal('<script>alert(1)</script>'); - done(); - }); - - it('encodes < and > as named characters', function (done) { - - var encoded = Hoek.escapeHtml(' diff --git a/cli/node_modules/mocha/lib/reporters/templates/style.html b/cli/node_modules/mocha/lib/reporters/templates/style.html deleted file mode 100644 index 4c9c37cfd..000000000 --- a/cli/node_modules/mocha/lib/reporters/templates/style.html +++ /dev/null @@ -1,324 +0,0 @@ - diff --git a/cli/node_modules/mocha/lib/reporters/xunit.js b/cli/node_modules/mocha/lib/reporters/xunit.js deleted file mode 100644 index 77cd34709..000000000 --- a/cli/node_modules/mocha/lib/reporters/xunit.js +++ /dev/null @@ -1,149 +0,0 @@ -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils') - , fs = require('fs') - , escape = utils.escape; - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Expose `XUnit`. - */ - -exports = module.exports = XUnit; - -/** - * Initialize a new `XUnit` reporter. - * - * @param {Runner} runner - * @api public - */ - -function XUnit(runner, options) { - Base.call(this, runner); - var stats = this.stats - , tests = [] - , self = this; - - if (options.reporterOptions && options.reporterOptions.output) { - if (! fs.createWriteStream) { - throw new Error('file output not supported in browser'); - } - self.fileStream = fs.createWriteStream(options.reporterOptions.output); - } - - runner.on('pending', function(test){ - tests.push(test); - }); - - runner.on('pass', function(test){ - tests.push(test); - }); - - runner.on('fail', function(test){ - tests.push(test); - }); - - runner.on('end', function(){ - self.write(tag('testsuite', { - name: 'Mocha Tests' - , tests: stats.tests - , failures: stats.failures - , errors: stats.failures - , skipped: stats.tests - stats.failures - stats.passes - , timestamp: (new Date).toUTCString() - , time: (stats.duration / 1000) || 0 - }, false)); - - tests.forEach(function(t) { self.test(t); }); - self.write(''); - }); -} - -/** - * Override done to close the stream (if it's a file). - */ -XUnit.prototype.done = function(failures, fn) { - if (this.fileStream) { - this.fileStream.end(function() { - fn(failures); - }); - } else { - fn(failures); - } -}; - -/** - * Inherit from `Base.prototype`. - */ - -XUnit.prototype.__proto__ = Base.prototype; - -/** - * Write out the given line - */ -XUnit.prototype.write = function(line) { - if (this.fileStream) { - this.fileStream.write(line + '\n'); - } else { - console.log(line); - } -}; - -/** - * Output tag for the given `test.` - */ - -XUnit.prototype.test = function(test, ostream) { - var attrs = { - classname: test.parent.fullTitle() - , name: test.title - , time: (test.duration / 1000) || 0 - }; - - if ('failed' == test.state) { - var err = test.err; - this.write(tag('testcase', attrs, false, tag('failure', {}, false, cdata(escape(err.message) + "\n" + err.stack)))); - } else if (test.pending) { - this.write(tag('testcase', attrs, false, tag('skipped', {}, true))); - } else { - this.write(tag('testcase', attrs, true) ); - } -}; - -/** - * HTML tag helper. - */ - -function tag(name, attrs, close, content) { - var end = close ? '/>' : '>' - , pairs = [] - , tag; - - for (var key in attrs) { - pairs.push(key + '="' + escape(attrs[key]) + '"'); - } - - tag = '<' + name + (pairs.length ? ' ' + pairs.join(' ') : '') + end; - if (content) tag += content + ''; -} diff --git a/cli/node_modules/mocha/lib/runnable.js b/cli/node_modules/mocha/lib/runnable.js deleted file mode 100644 index 6e4803fd7..000000000 --- a/cli/node_modules/mocha/lib/runnable.js +++ /dev/null @@ -1,280 +0,0 @@ -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , debug = require('debug')('mocha:runnable') - , Pending = require('./pending') - , milliseconds = require('./ms') - , utils = require('./utils'); - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Object#toString(). - */ - -var toString = Object.prototype.toString; - -/** - * Expose `Runnable`. - */ - -module.exports = Runnable; - -/** - * Initialize a new `Runnable` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Runnable(title, fn) { - this.title = title; - this.fn = fn; - this.async = fn && fn.length; - this.sync = ! this.async; - this._timeout = 2000; - this._slow = 75; - this._enableTimeouts = true; - this.timedOut = false; - this._trace = new Error('done() called multiple times') -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Runnable.prototype.__proto__ = EventEmitter.prototype; - -/** - * Set & get timeout `ms`. - * - * @param {Number|String} ms - * @return {Runnable|Number} ms or self - * @api private - */ - -Runnable.prototype.timeout = function(ms){ - if (0 == arguments.length) return this._timeout; - if (ms === 0) this._enableTimeouts = false; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._timeout = ms; - if (this.timer) this.resetTimeout(); - return this; -}; - -/** - * Set & get slow `ms`. - * - * @param {Number|String} ms - * @return {Runnable|Number} ms or self - * @api private - */ - -Runnable.prototype.slow = function(ms){ - if (0 === arguments.length) return this._slow; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._slow = ms; - return this; -}; - -/** - * Set and & get timeout `enabled`. - * - * @param {Boolean} enabled - * @return {Runnable|Boolean} enabled or self - * @api private - */ - -Runnable.prototype.enableTimeouts = function(enabled){ - if (arguments.length === 0) return this._enableTimeouts; - debug('enableTimeouts %s', enabled); - this._enableTimeouts = enabled; - return this; -}; - -/** - * Halt and mark as pending. - * - * @api private - */ - -Runnable.prototype.skip = function(){ - throw new Pending(); -}; - -/** - * Return the full title generated by recursively - * concatenating the parent's full title. - * - * @return {String} - * @api public - */ - -Runnable.prototype.fullTitle = function(){ - return this.parent.fullTitle() + ' ' + this.title; -}; - -/** - * Clear the timeout. - * - * @api private - */ - -Runnable.prototype.clearTimeout = function(){ - clearTimeout(this.timer); -}; - -/** - * Inspect the runnable void of private properties. - * - * @return {String} - * @api private - */ - -Runnable.prototype.inspect = function(){ - return JSON.stringify(this, function(key, val){ - if ('_' == key[0]) return; - if ('parent' == key) return '#'; - if ('ctx' == key) return '#'; - return val; - }, 2); -}; - -/** - * Reset the timeout. - * - * @api private - */ - -Runnable.prototype.resetTimeout = function(){ - var self = this; - var ms = this.timeout() || 1e9; - - if (!this._enableTimeouts) return; - this.clearTimeout(); - this.timer = setTimeout(function(){ - if (!self._enableTimeouts) return; - self.callback(new Error('timeout of ' + ms + 'ms exceeded. Ensure the done() callback is being called in this test.')); - self.timedOut = true; - }, ms); -}; - -/** - * Whitelist these globals for this test run - * - * @api private - */ -Runnable.prototype.globals = function(arr){ - var self = this; - this._allowedGlobals = arr; -}; - -/** - * Run the test and invoke `fn(err)`. - * - * @param {Function} fn - * @api private - */ - -Runnable.prototype.run = function(fn){ - var self = this - , start = new Date - , ctx = this.ctx - , finished - , emitted; - - // Some times the ctx exists but it is not runnable - if (ctx && ctx.runnable) ctx.runnable(this); - - // called multiple times - function multiple(err) { - if (emitted) return; - emitted = true; - self.emit('error', err || new Error('done() called multiple times; stacktrace may be inaccurate')); - } - - // finished - function done(err) { - var ms = self.timeout(); - if (self.timedOut) return; - if (finished) return multiple(err || self._trace); - - // Discard the resolution if this test has already failed asynchronously - if (self.state) return; - - self.clearTimeout(); - self.duration = new Date - start; - finished = true; - if (!err && self.duration > ms && self._enableTimeouts) err = new Error('timeout of ' + ms + 'ms exceeded. Ensure the done() callback is being called in this test.'); - fn(err); - } - - // for .resetTimeout() - this.callback = done; - - // explicit async with `done` argument - if (this.async) { - this.resetTimeout(); - - try { - this.fn.call(ctx, function(err){ - if (err instanceof Error || toString.call(err) === "[object Error]") return done(err); - if (null != err) { - if (Object.prototype.toString.call(err) === '[object Object]') { - return done(new Error('done() invoked with non-Error: ' + JSON.stringify(err))); - } else { - return done(new Error('done() invoked with non-Error: ' + err)); - } - } - done(); - }); - } catch (err) { - done(utils.getError(err)); - } - return; - } - - if (this.asyncOnly) { - return done(new Error('--async-only option in use without declaring `done()`')); - } - - // sync or promise-returning - try { - if (this.pending) { - done(); - } else { - callFn(this.fn); - } - } catch (err) { - done(utils.getError(err)); - } - - function callFn(fn) { - var result = fn.call(ctx); - if (result && typeof result.then === 'function') { - self.resetTimeout(); - result - .then(function() { - done() - }, - function(reason) { - done(reason || new Error('Promise rejected with no or falsy reason')) - }); - } else { - done(); - } - } -}; diff --git a/cli/node_modules/mocha/lib/runner.js b/cli/node_modules/mocha/lib/runner.js deleted file mode 100644 index 3199dc921..000000000 --- a/cli/node_modules/mocha/lib/runner.js +++ /dev/null @@ -1,716 +0,0 @@ -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , debug = require('debug')('mocha:runner') - , Pending = require('./pending') - , Test = require('./test') - , utils = require('./utils') - , filter = utils.filter - , keys = utils.keys - , type = utils.type - , stringify = utils.stringify - , stackFilter = utils.stackTraceFilter(); - -/** - * Non-enumerable globals. - */ - -var globals = [ - 'setTimeout', - 'clearTimeout', - 'setInterval', - 'clearInterval', - 'XMLHttpRequest', - 'Date', - 'setImmediate', - 'clearImmediate' -]; - -/** - * Expose `Runner`. - */ - -module.exports = Runner; - -/** - * Initialize a `Runner` for the given `suite`. - * - * Events: - * - * - `start` execution started - * - `end` execution complete - * - `suite` (suite) test suite execution started - * - `suite end` (suite) all tests (and sub-suites) have finished - * - `test` (test) test execution started - * - `test end` (test) test completed - * - `hook` (hook) hook execution started - * - `hook end` (hook) hook complete - * - `pass` (test) test passed - * - `fail` (test, err) test failed - * - `pending` (test) test pending - * - * @param {Suite} suite Root suite - * @param {boolean} [delay] Whether or not to delay execution of root suite - * until ready. - * @api public - */ - -function Runner(suite, delay) { - var self = this; - this._globals = []; - this._abort = false; - this._delay = delay; - this.suite = suite; - this.total = suite.total(); - this.failures = 0; - this.on('test end', function(test){ self.checkGlobals(test); }); - this.on('hook end', function(hook){ self.checkGlobals(hook); }); - this.grep(/.*/); - this.globals(this.globalProps().concat(extraGlobals())); -} - -/** - * Wrapper for setImmediate, process.nextTick, or browser polyfill. - * - * @param {Function} fn - * @api private - */ - -Runner.immediately = global.setImmediate || process.nextTick; - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Runner.prototype.__proto__ = EventEmitter.prototype; - -/** - * Run tests with full titles matching `re`. Updates runner.total - * with number of tests matched. - * - * @param {RegExp} re - * @param {Boolean} invert - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.grep = function(re, invert){ - debug('grep %s', re); - this._grep = re; - this._invert = invert; - this.total = this.grepTotal(this.suite); - return this; -}; - -/** - * Returns the number of tests matching the grep search for the - * given suite. - * - * @param {Suite} suite - * @return {Number} - * @api public - */ - -Runner.prototype.grepTotal = function(suite) { - var self = this; - var total = 0; - - suite.eachTest(function(test){ - var match = self._grep.test(test.fullTitle()); - if (self._invert) match = !match; - if (match) total++; - }); - - return total; -}; - -/** - * Return a list of global properties. - * - * @return {Array} - * @api private - */ - -Runner.prototype.globalProps = function() { - var props = utils.keys(global); - - // non-enumerables - for (var i = 0; i < globals.length; ++i) { - if (~utils.indexOf(props, globals[i])) continue; - props.push(globals[i]); - } - - return props; -}; - -/** - * Allow the given `arr` of globals. - * - * @param {Array} arr - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.globals = function(arr){ - if (0 == arguments.length) return this._globals; - debug('globals %j', arr); - this._globals = this._globals.concat(arr); - return this; -}; - -/** - * Check for global variable leaks. - * - * @api private - */ - -Runner.prototype.checkGlobals = function(test){ - if (this.ignoreLeaks) return; - var ok = this._globals; - - var globals = this.globalProps(); - var leaks; - - if (test) { - ok = ok.concat(test._allowedGlobals || []); - } - - if(this.prevGlobalsLength == globals.length) return; - this.prevGlobalsLength = globals.length; - - leaks = filterLeaks(ok, globals); - this._globals = this._globals.concat(leaks); - - if (leaks.length > 1) { - this.fail(test, new Error('global leaks detected: ' + leaks.join(', ') + '')); - } else if (leaks.length) { - this.fail(test, new Error('global leak detected: ' + leaks[0])); - } -}; - -/** - * Fail the given `test`. - * - * @param {Test} test - * @param {Error} err - * @api private - */ - -Runner.prototype.fail = function(test, err) { - ++this.failures; - test.state = 'failed'; - - if (!(err instanceof Error)) { - err = new Error('the ' + type(err) + ' ' + stringify(err) + ' was thrown, throw an Error :)'); - } - - err.stack = (this.fullStackTrace || !err.stack) - ? err.stack - : stackFilter(err.stack); - - this.emit('fail', test, err); -}; - -/** - * Fail the given `hook` with `err`. - * - * Hook failures work in the following pattern: - * - If bail, then exit - * - Failed `before` hook skips all tests in a suite and subsuites, - * but jumps to corresponding `after` hook - * - Failed `before each` hook skips remaining tests in a - * suite and jumps to corresponding `after each` hook, - * which is run only once - * - Failed `after` hook does not alter - * execution order - * - Failed `after each` hook skips remaining tests in a - * suite and subsuites, but executes other `after each` - * hooks - * - * @param {Hook} hook - * @param {Error} err - * @api private - */ - -Runner.prototype.failHook = function(hook, err){ - this.fail(hook, err); - if (this.suite.bail()) { - this.emit('end'); - } -}; - -/** - * Run hook `name` callbacks and then invoke `fn()`. - * - * @param {String} name - * @param {Function} function - * @api private - */ - -Runner.prototype.hook = function(name, fn){ - var suite = this.suite - , hooks = suite['_' + name] - , self = this - , timer; - - function next(i) { - var hook = hooks[i]; - if (!hook) return fn(); - self.currentRunnable = hook; - - hook.ctx.currentTest = self.test; - - self.emit('hook', hook); - - hook.on('error', function(err){ - self.failHook(hook, err); - }); - - hook.run(function(err){ - hook.removeAllListeners('error'); - var testError = hook.error(); - if (testError) self.fail(self.test, testError); - if (err) { - if (err instanceof Pending) { - suite.pending = true; - } else { - self.failHook(hook, err); - - // stop executing hooks, notify callee of hook err - return fn(err); - } - } - self.emit('hook end', hook); - delete hook.ctx.currentTest; - next(++i); - }); - } - - Runner.immediately(function(){ - next(0); - }); -}; - -/** - * Run hook `name` for the given array of `suites` - * in order, and callback `fn(err, errSuite)`. - * - * @param {String} name - * @param {Array} suites - * @param {Function} fn - * @api private - */ - -Runner.prototype.hooks = function(name, suites, fn){ - var self = this - , orig = this.suite; - - function next(suite) { - self.suite = suite; - - if (!suite) { - self.suite = orig; - return fn(); - } - - self.hook(name, function(err){ - if (err) { - var errSuite = self.suite; - self.suite = orig; - return fn(err, errSuite); - } - - next(suites.pop()); - }); - } - - next(suites.pop()); -}; - -/** - * Run hooks from the top level down. - * - * @param {String} name - * @param {Function} fn - * @api private - */ - -Runner.prototype.hookUp = function(name, fn){ - var suites = [this.suite].concat(this.parents()).reverse(); - this.hooks(name, suites, fn); -}; - -/** - * Run hooks from the bottom up. - * - * @param {String} name - * @param {Function} fn - * @api private - */ - -Runner.prototype.hookDown = function(name, fn){ - var suites = [this.suite].concat(this.parents()); - this.hooks(name, suites, fn); -}; - -/** - * Return an array of parent Suites from - * closest to furthest. - * - * @return {Array} - * @api private - */ - -Runner.prototype.parents = function(){ - var suite = this.suite - , suites = []; - while (suite = suite.parent) suites.push(suite); - return suites; -}; - -/** - * Run the current test and callback `fn(err)`. - * - * @param {Function} fn - * @api private - */ - -Runner.prototype.runTest = function(fn){ - var test = this.test - , self = this; - - if (this.asyncOnly) test.asyncOnly = true; - - try { - test.on('error', function(err){ - self.fail(test, err); - }); - test.run(fn); - } catch (err) { - fn(err); - } -}; - -/** - * Run tests in the given `suite` and invoke - * the callback `fn()` when complete. - * - * @param {Suite} suite - * @param {Function} fn - * @api private - */ - -Runner.prototype.runTests = function(suite, fn){ - var self = this - , tests = suite.tests.slice() - , test; - - - function hookErr(err, errSuite, after) { - // before/after Each hook for errSuite failed: - var orig = self.suite; - - // for failed 'after each' hook start from errSuite parent, - // otherwise start from errSuite itself - self.suite = after ? errSuite.parent : errSuite; - - if (self.suite) { - // call hookUp afterEach - self.hookUp('afterEach', function(err2, errSuite2) { - self.suite = orig; - // some hooks may fail even now - if (err2) return hookErr(err2, errSuite2, true); - // report error suite - fn(errSuite); - }); - } else { - // there is no need calling other 'after each' hooks - self.suite = orig; - fn(errSuite); - } - } - - function next(err, errSuite) { - // if we bail after first err - if (self.failures && suite._bail) return fn(); - - if (self._abort) return fn(); - - if (err) return hookErr(err, errSuite, true); - - // next test - test = tests.shift(); - - // all done - if (!test) return fn(); - - // grep - var match = self._grep.test(test.fullTitle()); - if (self._invert) match = !match; - if (!match) return next(); - - // pending - if (test.pending) { - self.emit('pending', test); - self.emit('test end', test); - return next(); - } - - // execute test and hook(s) - self.emit('test', self.test = test); - self.hookDown('beforeEach', function(err, errSuite){ - - if (suite.pending) { - self.emit('pending', test); - self.emit('test end', test); - return next(); - } - if (err) return hookErr(err, errSuite, false); - - self.currentRunnable = self.test; - self.runTest(function(err){ - test = self.test; - - if (err) { - if (err instanceof Pending) { - self.emit('pending', test); - } else { - self.fail(test, err); - } - self.emit('test end', test); - - if (err instanceof Pending) { - return next(); - } - - return self.hookUp('afterEach', next); - } - - test.state = 'passed'; - self.emit('pass', test); - self.emit('test end', test); - self.hookUp('afterEach', next); - }); - }); - } - - this.next = next; - next(); -}; - -/** - * Run the given `suite` and invoke the - * callback `fn()` when complete. - * - * @param {Suite} suite - * @param {Function} fn - * @api private - */ - -Runner.prototype.runSuite = function(suite, fn){ - var total = this.grepTotal(suite) - , self = this - , i = 0; - - debug('run suite %s', suite.fullTitle()); - - if (!total) return fn(); - - this.emit('suite', this.suite = suite); - - function next(errSuite) { - if (errSuite) { - // current suite failed on a hook from errSuite - if (errSuite == suite) { - // if errSuite is current suite - // continue to the next sibling suite - return done(); - } else { - // errSuite is among the parents of current suite - // stop execution of errSuite and all sub-suites - return done(errSuite); - } - } - - if (self._abort) return done(); - - var curr = suite.suites[i++]; - if (!curr) return done(); - self.runSuite(curr, next); - } - - function done(errSuite) { - self.suite = suite; - self.hook('afterAll', function(){ - self.emit('suite end', suite); - fn(errSuite); - }); - } - - this.hook('beforeAll', function(err){ - if (err) return done(); - self.runTests(suite, next); - }); -}; - -/** - * Handle uncaught exceptions. - * - * @param {Error} err - * @api private - */ - -Runner.prototype.uncaught = function(err){ - if (err) { - debug('uncaught exception %s', err !== function () { - return this; - }.call(err) ? err : ( err.message || err )); - } else { - debug('uncaught undefined exception'); - err = utils.undefinedError(); - } - err.uncaught = true; - - var runnable = this.currentRunnable; - if (!runnable) return; - - runnable.clearTimeout(); - - // Ignore errors if complete - if (runnable.state) return; - this.fail(runnable, err); - - // recover from test - if ('test' == runnable.type) { - this.emit('test end', runnable); - this.hookUp('afterEach', this.next); - return; - } - - // bail on hooks - this.emit('end'); -}; - -/** - * Run the root suite and invoke `fn(failures)` - * on completion. - * - * @param {Function} fn - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.run = function(fn){ - var self = this, - rootSuite = this.suite; - - fn = fn || function(){}; - - function uncaught(err){ - self.uncaught(err); - } - - function start() { - self.emit('start'); - self.runSuite(rootSuite, function(){ - debug('finished running'); - self.emit('end'); - }); - } - - debug('start'); - - // callback - this.on('end', function(){ - debug('end'); - process.removeListener('uncaughtException', uncaught); - fn(self.failures); - }); - - // uncaught exception - process.on('uncaughtException', uncaught); - - if (this._delay) { - // for reporters, I guess. - // might be nice to debounce some dots while we wait. - this.emit('waiting', rootSuite); - rootSuite.once('run', start); - } - else { - start(); - } - - return this; -}; - -/** - * Cleanly abort execution - * - * @return {Runner} for chaining - * @api public - */ -Runner.prototype.abort = function(){ - debug('aborting'); - this._abort = true; -}; - -/** - * Filter leaks with the given globals flagged as `ok`. - * - * @param {Array} ok - * @param {Array} globals - * @return {Array} - * @api private - */ - -function filterLeaks(ok, globals) { - return filter(globals, function(key){ - // Firefox and Chrome exposes iframes as index inside the window object - if (/^d+/.test(key)) return false; - - // in firefox - // if runner runs in an iframe, this iframe's window.getInterface method not init at first - // it is assigned in some seconds - if (global.navigator && /^getInterface/.test(key)) return false; - - // an iframe could be approached by window[iframeIndex] - // in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak - if (global.navigator && /^\d+/.test(key)) return false; - - // Opera and IE expose global variables for HTML element IDs (issue #243) - if (/^mocha-/.test(key)) return false; - - var matched = filter(ok, function(ok){ - if (~ok.indexOf('*')) return 0 == key.indexOf(ok.split('*')[0]); - return key == ok; - }); - return matched.length == 0 && (!global.navigator || 'onerror' !== key); - }); -} - -/** - * Array of globals dependent on the environment. - * - * @return {Array} - * @api private - */ - -function extraGlobals() { - if (typeof(process) === 'object' && - typeof(process.version) === 'string') { - - var nodeVersion = process.version.split('.').reduce(function(a, v) { - return a << 8 | v; - }); - - // 'errno' was renamed to process._errno in v0.9.11. - - if (nodeVersion < 0x00090B) { - return ['errno']; - } - } - - return []; -} diff --git a/cli/node_modules/mocha/lib/suite.js b/cli/node_modules/mocha/lib/suite.js deleted file mode 100644 index edc820e23..000000000 --- a/cli/node_modules/mocha/lib/suite.js +++ /dev/null @@ -1,355 +0,0 @@ -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , debug = require('debug')('mocha:suite') - , milliseconds = require('./ms') - , utils = require('./utils') - , Hook = require('./hook'); - -/** - * Expose `Suite`. - */ - -exports = module.exports = Suite; - -/** - * Create a new `Suite` with the given `title` - * and parent `Suite`. When a suite with the - * same title is already present, that suite - * is returned to provide nicer reporter - * and more flexible meta-testing. - * - * @param {Suite} parent - * @param {String} title - * @return {Suite} - * @api public - */ - -exports.create = function(parent, title){ - var suite = new Suite(title, parent.ctx); - suite.parent = parent; - if (parent.pending) suite.pending = true; - title = suite.fullTitle(); - parent.addSuite(suite); - return suite; -}; - -/** - * Initialize a new `Suite` with the given - * `title` and `ctx`. - * - * @param {String} title - * @param {Context} ctx - * @api private - */ - -function Suite(title, parentContext) { - this.title = title; - var context = function() {}; - context.prototype = parentContext; - this.ctx = new context(); - this.suites = []; - this.tests = []; - this.pending = false; - this._beforeEach = []; - this._beforeAll = []; - this._afterEach = []; - this._afterAll = []; - this.root = !title; - this._timeout = 2000; - this._enableTimeouts = true; - this._slow = 75; - this._bail = false; - this.delayed = false; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Suite.prototype.__proto__ = EventEmitter.prototype; - -/** - * Return a clone of this `Suite`. - * - * @return {Suite} - * @api private - */ - -Suite.prototype.clone = function(){ - var suite = new Suite(this.title); - debug('clone'); - suite.ctx = this.ctx; - suite.timeout(this.timeout()); - suite.enableTimeouts(this.enableTimeouts()); - suite.slow(this.slow()); - suite.bail(this.bail()); - return suite; -}; - -/** - * Set timeout `ms` or short-hand such as "2s". - * - * @param {Number|String} ms - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.timeout = function(ms){ - if (0 == arguments.length) return this._timeout; - if (ms.toString() === '0') this._enableTimeouts = false; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._timeout = parseInt(ms, 10); - return this; -}; - -/** - * Set timeout `enabled`. - * - * @param {Boolean} enabled - * @return {Suite|Boolean} self or enabled - * @api private - */ - -Suite.prototype.enableTimeouts = function(enabled){ - if (arguments.length === 0) return this._enableTimeouts; - debug('enableTimeouts %s', enabled); - this._enableTimeouts = enabled; - return this; -}; - -/** - * Set slow `ms` or short-hand such as "2s". - * - * @param {Number|String} ms - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.slow = function(ms){ - if (0 === arguments.length) return this._slow; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('slow %d', ms); - this._slow = ms; - return this; -}; - -/** - * Sets whether to bail after first error. - * - * @param {Boolean} bail - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.bail = function(bail){ - if (0 == arguments.length) return this._bail; - debug('bail %s', bail); - this._bail = bail; - return this; -}; - -/** - * Run `fn(test[, done])` before running tests. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.beforeAll = function(title, fn){ - if (this.pending) return this; - if ('function' === typeof title) { - fn = title; - title = fn.name; - } - title = '"before all" hook' + (title ? ': ' + title : ''); - - var hook = new Hook(title, fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.enableTimeouts(this.enableTimeouts()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._beforeAll.push(hook); - this.emit('beforeAll', hook); - return this; -}; - -/** - * Run `fn(test[, done])` after running tests. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.afterAll = function(title, fn){ - if (this.pending) return this; - if ('function' === typeof title) { - fn = title; - title = fn.name; - } - title = '"after all" hook' + (title ? ': ' + title : ''); - - var hook = new Hook(title, fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.enableTimeouts(this.enableTimeouts()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._afterAll.push(hook); - this.emit('afterAll', hook); - return this; -}; - -/** - * Run `fn(test[, done])` before each test case. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.beforeEach = function(title, fn){ - if (this.pending) return this; - if ('function' === typeof title) { - fn = title; - title = fn.name; - } - title = '"before each" hook' + (title ? ': ' + title : ''); - - var hook = new Hook(title, fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.enableTimeouts(this.enableTimeouts()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._beforeEach.push(hook); - this.emit('beforeEach', hook); - return this; -}; - -/** - * Run `fn(test[, done])` after each test case. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.afterEach = function(title, fn){ - if (this.pending) return this; - if ('function' === typeof title) { - fn = title; - title = fn.name; - } - title = '"after each" hook' + (title ? ': ' + title : ''); - - var hook = new Hook(title, fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.enableTimeouts(this.enableTimeouts()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._afterEach.push(hook); - this.emit('afterEach', hook); - return this; -}; - -/** - * Add a test `suite`. - * - * @param {Suite} suite - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.addSuite = function(suite){ - suite.parent = this; - suite.timeout(this.timeout()); - suite.enableTimeouts(this.enableTimeouts()); - suite.slow(this.slow()); - suite.bail(this.bail()); - this.suites.push(suite); - this.emit('suite', suite); - return this; -}; - -/** - * Add a `test` to this suite. - * - * @param {Test} test - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.addTest = function(test){ - test.parent = this; - test.timeout(this.timeout()); - test.enableTimeouts(this.enableTimeouts()); - test.slow(this.slow()); - test.ctx = this.ctx; - this.tests.push(test); - this.emit('test', test); - return this; -}; - -/** - * Return the full title generated by recursively - * concatenating the parent's full title. - * - * @return {String} - * @api public - */ - -Suite.prototype.fullTitle = function(){ - if (this.parent) { - var full = this.parent.fullTitle(); - if (full) return full + ' ' + this.title; - } - return this.title; -}; - -/** - * Return the total number of tests. - * - * @return {Number} - * @api public - */ - -Suite.prototype.total = function(){ - return utils.reduce(this.suites, function(sum, suite){ - return sum + suite.total(); - }, 0) + this.tests.length; -}; - -/** - * Iterates through each suite recursively to find - * all tests. Applies a function in the format - * `fn(test)`. - * - * @param {Function} fn - * @return {Suite} - * @api private - */ - -Suite.prototype.eachTest = function(fn){ - utils.forEach(this.tests, fn); - utils.forEach(this.suites, function(suite){ - suite.eachTest(fn); - }); - return this; -}; - -/** - * This will run the root suite if we happen to be running in delayed mode. - */ -Suite.prototype.run = function run() { - if (this.root) { - this.emit('run'); - } -}; diff --git a/cli/node_modules/mocha/lib/template.html b/cli/node_modules/mocha/lib/template.html deleted file mode 100644 index 0590d4aac..000000000 --- a/cli/node_modules/mocha/lib/template.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - Mocha - - - - - -
- - - - - - diff --git a/cli/node_modules/mocha/lib/test.js b/cli/node_modules/mocha/lib/test.js deleted file mode 100644 index 4a4cf63cc..000000000 --- a/cli/node_modules/mocha/lib/test.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Module dependencies. - */ - -var Runnable = require('./runnable'); - -/** - * Expose `Test`. - */ - -module.exports = Test; - -/** - * Initialize a new `Test` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Test(title, fn) { - Runnable.call(this, title, fn); - this.pending = !fn; - this.type = 'test'; -} - -/** - * Inherit from `Runnable.prototype`. - */ - -Test.prototype.__proto__ = Runnable.prototype; diff --git a/cli/node_modules/mocha/lib/utils.js b/cli/node_modules/mocha/lib/utils.js deleted file mode 100644 index 845f84c25..000000000 --- a/cli/node_modules/mocha/lib/utils.js +++ /dev/null @@ -1,710 +0,0 @@ -/** - * Module dependencies. - */ - -var fs = require('fs') - , path = require('path') - , basename = path.basename - , exists = fs.existsSync || path.existsSync - , glob = require('glob') - , join = path.join - , debug = require('debug')('mocha:watch'); - -/** - * Ignored directories. - */ - -var ignore = ['node_modules', '.git']; - -/** - * Escape special characters in the given string of html. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function(html){ - return String(html) - .replace(/&/g, '&') - .replace(/"/g, '"') - .replace(//g, '>'); -}; - -/** - * Array#forEach (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} scope - * @api private - */ - -exports.forEach = function(arr, fn, scope){ - for (var i = 0, l = arr.length; i < l; i++) - fn.call(scope, arr[i], i); -}; - -/** - * Test if the given obj is type of string - * - * @param {Object} obj - * @returns Boolean - */ - -exports.isString = function(obj) { - return 'string' === typeof obj; -}; - -/** - * Array#map (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} scope - * @api private - */ - -exports.map = function(arr, fn, scope){ - var result = []; - for (var i = 0, l = arr.length; i < l; i++) - result.push(fn.call(scope, arr[i], i, arr)); - return result; -}; - -/** - * Array#indexOf (<=IE8) - * - * @parma {Array} arr - * @param {Object} obj to find index of - * @param {Number} start - * @api private - */ - -exports.indexOf = function(arr, obj, start){ - for (var i = start || 0, l = arr.length; i < l; i++) { - if (arr[i] === obj) - return i; - } - return -1; -}; - -/** - * Array#reduce (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} initial value - * @api private - */ - -exports.reduce = function(arr, fn, val){ - var rval = val; - - for (var i = 0, l = arr.length; i < l; i++) { - rval = fn(rval, arr[i], i, arr); - } - - return rval; -}; - -/** - * Array#filter (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @api private - */ - -exports.filter = function(arr, fn){ - var ret = []; - - for (var i = 0, l = arr.length; i < l; i++) { - var val = arr[i]; - if (fn(val, i, arr)) ret.push(val); - } - - return ret; -}; - -/** - * Object.keys (<=IE8) - * - * @param {Object} obj - * @return {Array} keys - * @api private - */ - -exports.keys = Object.keys || function(obj) { - var keys = [] - , has = Object.prototype.hasOwnProperty; // for `window` on <=IE8 - - for (var key in obj) { - if (has.call(obj, key)) { - keys.push(key); - } - } - - return keys; -}; - -/** - * Watch the given `files` for changes - * and invoke `fn(file)` on modification. - * - * @param {Array} files - * @param {Function} fn - * @api private - */ - -exports.watch = function(files, fn){ - var options = { interval: 100 }; - files.forEach(function(file){ - debug('file %s', file); - fs.watchFile(file, options, function(curr, prev){ - if (prev.mtime < curr.mtime) fn(file); - }); - }); -}; - -/** - * Array.isArray (<=IE8) - * - * @param {Object} obj - * @return {Boolean} - * @api private - */ -var isArray = Array.isArray || function (obj) { - return '[object Array]' == {}.toString.call(obj); -}; - -/** - * @description - * Buffer.prototype.toJSON polyfill - * @type {Function} - */ -if(typeof Buffer !== 'undefined' && Buffer.prototype) { - Buffer.prototype.toJSON = Buffer.prototype.toJSON || function () { - return Array.prototype.slice.call(this, 0); - }; -} - -/** - * Ignored files. - */ - -function ignored(path){ - return !~ignore.indexOf(path); -} - -/** - * Lookup files in the given `dir`. - * - * @return {Array} - * @api private - */ - -exports.files = function(dir, ext, ret){ - ret = ret || []; - ext = ext || ['js']; - - var re = new RegExp('\\.(' + ext.join('|') + ')$'); - - fs.readdirSync(dir) - .filter(ignored) - .forEach(function(path){ - path = join(dir, path); - if (fs.statSync(path).isDirectory()) { - exports.files(path, ext, ret); - } else if (path.match(re)) { - ret.push(path); - } - }); - - return ret; -}; - -/** - * Compute a slug from the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.slug = function(str){ - return str - .toLowerCase() - .replace(/ +/g, '-') - .replace(/[^-\w]/g, ''); -}; - -/** - * Strip the function definition from `str`, - * and re-indent for pre whitespace. - */ - -exports.clean = function(str) { - str = str - .replace(/\r\n?|[\n\u2028\u2029]/g, "\n").replace(/^\uFEFF/, '') - .replace(/^function *\(.*\)\s*{|\(.*\) *=> *{?/, '') - .replace(/\s+\}$/, ''); - - var spaces = str.match(/^\n?( *)/)[1].length - , tabs = str.match(/^\n?(\t*)/)[1].length - , re = new RegExp('^\n?' + (tabs ? '\t' : ' ') + '{' + (tabs ? tabs : spaces) + '}', 'gm'); - - str = str.replace(re, ''); - - return exports.trim(str); -}; - -/** - * Trim the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.trim = function(str){ - return str.replace(/^\s+|\s+$/g, ''); -}; - -/** - * Parse the given `qs`. - * - * @param {String} qs - * @return {Object} - * @api private - */ - -exports.parseQuery = function(qs){ - return exports.reduce(qs.replace('?', '').split('&'), function(obj, pair){ - var i = pair.indexOf('=') - , key = pair.slice(0, i) - , val = pair.slice(++i); - - obj[key] = decodeURIComponent(val); - return obj; - }, {}); -}; - -/** - * Highlight the given string of `js`. - * - * @param {String} js - * @return {String} - * @api private - */ - -function highlight(js) { - return js - .replace(//g, '>') - .replace(/\/\/(.*)/gm, '//$1') - .replace(/('.*?')/gm, '$1') - .replace(/(\d+\.\d+)/gm, '$1') - .replace(/(\d+)/gm, '$1') - .replace(/\bnew[ \t]+(\w+)/gm, 'new $1') - .replace(/\b(function|new|throw|return|var|if|else)\b/gm, '$1') -} - -/** - * Highlight the contents of tag `name`. - * - * @param {String} name - * @api private - */ - -exports.highlightTags = function(name) { - var code = document.getElementById('mocha').getElementsByTagName(name); - for (var i = 0, len = code.length; i < len; ++i) { - code[i].innerHTML = highlight(code[i].innerHTML); - } -}; - -/** - * If a value could have properties, and has none, this function is called, which returns - * a string representation of the empty value. - * - * Functions w/ no properties return `'[Function]'` - * Arrays w/ length === 0 return `'[]'` - * Objects w/ no properties return `'{}'` - * All else: return result of `value.toString()` - * - * @param {*} value Value to inspect - * @param {string} [type] The type of the value, if known. - * @returns {string} - */ -var emptyRepresentation = function emptyRepresentation(value, type) { - type = type || exports.type(value); - - switch(type) { - case 'function': - return '[Function]'; - case 'object': - return '{}'; - case 'array': - return '[]'; - default: - return value.toString(); - } -}; - -/** - * Takes some variable and asks `{}.toString()` what it thinks it is. - * @param {*} value Anything - * @example - * type({}) // 'object' - * type([]) // 'array' - * type(1) // 'number' - * type(false) // 'boolean' - * type(Infinity) // 'number' - * type(null) // 'null' - * type(new Date()) // 'date' - * type(/foo/) // 'regexp' - * type('type') // 'string' - * type(global) // 'global' - * @api private - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString - * @returns {string} - */ -exports.type = function type(value) { - if (typeof Buffer !== 'undefined' && Buffer.isBuffer(value)) { - return 'buffer'; - } - return Object.prototype.toString.call(value) - .replace(/^\[.+\s(.+?)\]$/, '$1') - .toLowerCase(); -}; - -/** - * @summary Stringify `value`. - * @description Different behavior depending on type of value. - * - If `value` is undefined or null, return `'[undefined]'` or `'[null]'`, respectively. - * - If `value` is not an object, function or array, return result of `value.toString()` wrapped in double-quotes. - * - If `value` is an *empty* object, function, or array, return result of function - * {@link emptyRepresentation}. - * - If `value` has properties, call {@link exports.canonicalize} on it, then return result of - * JSON.stringify(). - * - * @see exports.type - * @param {*} value - * @return {string} - * @api private - */ - -exports.stringify = function(value) { - var type = exports.type(value); - - if (!~exports.indexOf(['object', 'array', 'function'], type)) { - if(type != 'buffer') { - return jsonStringify(value); - } - var json = value.toJSON(); - // Based on the toJSON result - return jsonStringify(json.data && json.type ? json.data : json, 2) - .replace(/,(\n|$)/g, '$1'); - } - - for (var prop in value) { - if (Object.prototype.hasOwnProperty.call(value, prop)) { - return jsonStringify(exports.canonicalize(value), 2).replace(/,(\n|$)/g, '$1'); - } - } - - return emptyRepresentation(value, type); -}; - -/** - * @description - * like JSON.stringify but more sense. - * @param {Object} object - * @param {Number=} spaces - * @param {number=} depth - * @returns {*} - * @private - */ -function jsonStringify(object, spaces, depth) { - if(typeof spaces == 'undefined') return _stringify(object); // primitive types - - depth = depth || 1; - var space = spaces * depth - , str = isArray(object) ? '[' : '{' - , end = isArray(object) ? ']' : '}' - , length = object.length || exports.keys(object).length - , repeat = function(s, n) { return new Array(n).join(s); }; // `.repeat()` polyfill - - function _stringify(val) { - switch (exports.type(val)) { - case 'null': - case 'undefined': - val = '[' + val + ']'; - break; - case 'array': - case 'object': - val = jsonStringify(val, spaces, depth + 1); - break; - case 'boolean': - case 'regexp': - case 'number': - val = val === 0 && (1/val) === -Infinity // `-0` - ? '-0' - : val.toString(); - break; - case 'date': - var sDate = isNaN(val.getTime()) // Invalid date - ? val.toString() - : val.toISOString(); - val = '[Date: ' + sDate + ']'; - break; - case 'buffer': - var json = val.toJSON(); - // Based on the toJSON result - json = json.data && json.type ? json.data : json; - val = '[Buffer: ' + jsonStringify(json, 2, depth + 1) + ']'; - break; - default: - val = (val == '[Function]' || val == '[Circular]') - ? val - : JSON.stringify(val); //string - } - return val; - } - - for(var i in object) { - if(!object.hasOwnProperty(i)) continue; // not my business - --length; - str += '\n ' + repeat(' ', space) - + (isArray(object) ? '' : '"' + i + '": ') // key - + _stringify(object[i]) // value - + (length ? ',' : ''); // comma - } - - return str + (str.length != 1 // [], {} - ? '\n' + repeat(' ', --space) + end - : end); -} - -/** - * Return if obj is a Buffer - * @param {Object} arg - * @return {Boolean} - * @api private - */ -exports.isBuffer = function (arg) { - return typeof Buffer !== 'undefined' && Buffer.isBuffer(arg); -}; - -/** - * @summary Return a new Thing that has the keys in sorted order. Recursive. - * @description If the Thing... - * - has already been seen, return string `'[Circular]'` - * - is `undefined`, return string `'[undefined]'` - * - is `null`, return value `null` - * - is some other primitive, return the value - * - is not a primitive or an `Array`, `Object`, or `Function`, return the value of the Thing's `toString()` method - * - is a non-empty `Array`, `Object`, or `Function`, return the result of calling this function again. - * - is an empty `Array`, `Object`, or `Function`, return the result of calling `emptyRepresentation()` - * - * @param {*} value Thing to inspect. May or may not have properties. - * @param {Array} [stack=[]] Stack of seen values - * @return {(Object|Array|Function|string|undefined)} - * @see {@link exports.stringify} - * @api private - */ - -exports.canonicalize = function(value, stack) { - var canonicalizedObj, - type = exports.type(value), - prop, - withStack = function withStack(value, fn) { - stack.push(value); - fn(); - stack.pop(); - }; - - stack = stack || []; - - if (exports.indexOf(stack, value) !== -1) { - return '[Circular]'; - } - - switch(type) { - case 'undefined': - case 'buffer': - case 'null': - canonicalizedObj = value; - break; - case 'array': - withStack(value, function () { - canonicalizedObj = exports.map(value, function (item) { - return exports.canonicalize(item, stack); - }); - }); - break; - case 'function': - for (prop in value) { - canonicalizedObj = {}; - break; - } - if (!canonicalizedObj) { - canonicalizedObj = emptyRepresentation(value, type); - break; - } - /* falls through */ - case 'object': - canonicalizedObj = canonicalizedObj || {}; - withStack(value, function () { - exports.forEach(exports.keys(value).sort(), function (key) { - canonicalizedObj[key] = exports.canonicalize(value[key], stack); - }); - }); - break; - case 'date': - case 'number': - case 'regexp': - case 'boolean': - canonicalizedObj = value; - break; - default: - canonicalizedObj = value.toString(); - } - - return canonicalizedObj; -}; - -/** - * Lookup file names at the given `path`. - */ -exports.lookupFiles = function lookupFiles(path, extensions, recursive) { - var files = []; - var re = new RegExp('\\.(' + extensions.join('|') + ')$'); - - if (!exists(path)) { - if (exists(path + '.js')) { - path += '.js'; - } else { - files = glob.sync(path); - if (!files.length) throw new Error("cannot resolve path (or pattern) '" + path + "'"); - return files; - } - } - - try { - var stat = fs.statSync(path); - if (stat.isFile()) return path; - } - catch (ignored) { - return; - } - - fs.readdirSync(path).forEach(function(file) { - file = join(path, file); - try { - var stat = fs.statSync(file); - if (stat.isDirectory()) { - if (recursive) { - files = files.concat(lookupFiles(file, extensions, recursive)); - } - return; - } - } - catch (ignored) { - return; - } - if (!stat.isFile() || !re.test(file) || basename(file)[0] === '.') return; - files.push(file); - }); - - return files; -}; - -/** - * Generate an undefined error with a message warning the user. - * - * @return {Error} - */ - -exports.undefinedError = function() { - return new Error('Caught undefined error, did you throw without specifying what?'); -}; - -/** - * Generate an undefined error if `err` is not defined. - * - * @param {Error} err - * @return {Error} - */ - -exports.getError = function(err) { - return err || exports.undefinedError(); -}; - - -/** - * @summary - * This Filter based on `mocha-clean` module.(see: `github.com/rstacruz/mocha-clean`) - * @description - * When invoking this function you get a filter function that get the Error.stack as an input, - * and return a prettify output. - * (i.e: strip Mocha, node_modules, bower and componentJS from stack trace). - * @returns {Function} - */ - -exports.stackTraceFilter = function() { - var slash = '/' - , is = typeof document === 'undefined' - ? { node: true } - : { browser: true } - , cwd = is.node - ? process.cwd() + slash - : location.href.replace(/\/[^\/]*$/, '/'); - - function isNodeModule (line) { - return (~line.indexOf('node_modules')); - } - - function isMochaInternal (line) { - return (~line.indexOf('node_modules' + slash + 'mocha')) || - (~line.indexOf('components' + slash + 'mochajs')) || - (~line.indexOf('components' + slash + 'mocha')); - } - - // node_modules, bower, componentJS - function isBrowserModule(line) { - return (~line.indexOf('node_modules')) || - (~line.indexOf('components')); - } - - function isNodeInternal (line) { - return (~line.indexOf('(timers.js:')) || - (~line.indexOf('(events.js:')) || - (~line.indexOf('(node.js:')) || - (~line.indexOf('(module.js:')) || - (~line.indexOf('GeneratorFunctionPrototype.next (native)')) || - false - } - - return function(stack) { - stack = stack.split('\n'); - - stack = exports.reduce(stack, function(list, line) { - if (is.node && (isNodeModule(line) || - isMochaInternal(line) || - isNodeInternal(line))) - return list; - - if (is.browser && (isBrowserModule(line))) - return list; - - // Clean up cwd(absolute) - list.push(line.replace(cwd, '')); - return list; - }, []); - - return stack.join('\n'); - } -}; \ No newline at end of file diff --git a/cli/node_modules/mocha/mocha.css b/cli/node_modules/mocha/mocha.css deleted file mode 100644 index 42b9798fa..000000000 --- a/cli/node_modules/mocha/mocha.css +++ /dev/null @@ -1,270 +0,0 @@ -@charset "utf-8"; - -body { - margin:0; -} - -#mocha { - font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif; - margin: 60px 50px; -} - -#mocha ul, -#mocha li { - margin: 0; - padding: 0; -} - -#mocha ul { - list-style: none; -} - -#mocha h1, -#mocha h2 { - margin: 0; -} - -#mocha h1 { - margin-top: 15px; - font-size: 1em; - font-weight: 200; -} - -#mocha h1 a { - text-decoration: none; - color: inherit; -} - -#mocha h1 a:hover { - text-decoration: underline; -} - -#mocha .suite .suite h1 { - margin-top: 0; - font-size: .8em; -} - -#mocha .hidden { - display: none; -} - -#mocha h2 { - font-size: 12px; - font-weight: normal; - cursor: pointer; -} - -#mocha .suite { - margin-left: 15px; -} - -#mocha .test { - margin-left: 15px; - overflow: hidden; -} - -#mocha .test.pending:hover h2::after { - content: '(pending)'; - font-family: arial, sans-serif; -} - -#mocha .test.pass.medium .duration { - background: #c09853; -} - -#mocha .test.pass.slow .duration { - background: #b94a48; -} - -#mocha .test.pass::before { - content: '✓'; - font-size: 12px; - display: block; - float: left; - margin-right: 5px; - color: #00d6b2; -} - -#mocha .test.pass .duration { - font-size: 9px; - margin-left: 5px; - padding: 2px 5px; - color: #fff; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.2); - -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.2); - box-shadow: inset 0 1px 1px rgba(0,0,0,.2); - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - -ms-border-radius: 5px; - -o-border-radius: 5px; - border-radius: 5px; -} - -#mocha .test.pass.fast .duration { - display: none; -} - -#mocha .test.pending { - color: #0b97c4; -} - -#mocha .test.pending::before { - content: '◦'; - color: #0b97c4; -} - -#mocha .test.fail { - color: #c00; -} - -#mocha .test.fail pre { - color: black; -} - -#mocha .test.fail::before { - content: '✖'; - font-size: 12px; - display: block; - float: left; - margin-right: 5px; - color: #c00; -} - -#mocha .test pre.error { - color: #c00; - max-height: 300px; - overflow: auto; -} - -/** - * (1): approximate for browsers not supporting calc - * (2): 42 = 2*15 + 2*10 + 2*1 (padding + margin + border) - * ^^ seriously - */ -#mocha .test pre { - display: block; - float: left; - clear: left; - font: 12px/1.5 monaco, monospace; - margin: 5px; - padding: 15px; - border: 1px solid #eee; - max-width: 85%; /*(1)*/ - max-width: calc(100% - 42px); /*(2)*/ - word-wrap: break-word; - border-bottom-color: #ddd; - -webkit-border-radius: 3px; - -webkit-box-shadow: 0 1px 3px #eee; - -moz-border-radius: 3px; - -moz-box-shadow: 0 1px 3px #eee; - border-radius: 3px; -} - -#mocha .test h2 { - position: relative; -} - -#mocha .test a.replay { - position: absolute; - top: 3px; - right: 0; - text-decoration: none; - vertical-align: middle; - display: block; - width: 15px; - height: 15px; - line-height: 15px; - text-align: center; - background: #eee; - font-size: 15px; - -moz-border-radius: 15px; - border-radius: 15px; - -webkit-transition: opacity 200ms; - -moz-transition: opacity 200ms; - transition: opacity 200ms; - opacity: 0.3; - color: #888; -} - -#mocha .test:hover a.replay { - opacity: 1; -} - -#mocha-report.pass .test.fail { - display: none; -} - -#mocha-report.fail .test.pass { - display: none; -} - -#mocha-report.pending .test.pass, -#mocha-report.pending .test.fail { - display: none; -} -#mocha-report.pending .test.pass.pending { - display: block; -} - -#mocha-error { - color: #c00; - font-size: 1.5em; - font-weight: 100; - letter-spacing: 1px; -} - -#mocha-stats { - position: fixed; - top: 15px; - right: 10px; - font-size: 12px; - margin: 0; - color: #888; - z-index: 1; -} - -#mocha-stats .progress { - float: right; - padding-top: 0; -} - -#mocha-stats em { - color: black; -} - -#mocha-stats a { - text-decoration: none; - color: inherit; -} - -#mocha-stats a:hover { - border-bottom: 1px solid #eee; -} - -#mocha-stats li { - display: inline-block; - margin: 0 5px; - list-style: none; - padding-top: 11px; -} - -#mocha-stats canvas { - width: 40px; - height: 40px; -} - -#mocha code .comment { color: #ddd; } -#mocha code .init { color: #2f6fad; } -#mocha code .string { color: #5890ad; } -#mocha code .keyword { color: #8a6343; } -#mocha code .number { color: #2f6fad; } - -@media screen and (max-device-width: 480px) { - #mocha { - margin: 60px 0px; - } - - #mocha #stats { - position: absolute; - } -} diff --git a/cli/node_modules/mocha/mocha.js b/cli/node_modules/mocha/mocha.js deleted file mode 100644 index 5ff138575..000000000 --- a/cli/node_modules/mocha/mocha.js +++ /dev/null @@ -1,6564 +0,0 @@ -;(function(){ - -// CommonJS require() - -function require(p){ - var path = require.resolve(p) - , mod = require.modules[path]; - if (!mod) throw new Error('failed to require "' + p + '"'); - if (!mod.exports) { - mod.exports = {}; - mod.call(mod.exports, mod, mod.exports, require.relative(path)); - } - return mod.exports; - } - -require.modules = {}; - -require.resolve = function (path){ - var orig = path - , reg = path + '.js' - , index = path + '/index.js'; - return require.modules[reg] && reg - || require.modules[index] && index - || orig; - }; - -require.register = function (path, fn){ - require.modules[path] = fn; - }; - -require.relative = function (parent) { - return function(p){ - if ('.' != p.charAt(0)) return require(p); - - var path = parent.split('/') - , segs = p.split('/'); - path.pop(); - - for (var i = 0; i < segs.length; i++) { - var seg = segs[i]; - if ('..' == seg) path.pop(); - else if ('.' != seg) path.push(seg); - } - - return require(path.join('/')); - }; - }; - - -require.register("browser/debug.js", function(module, exports, require){ -module.exports = function(type){ - return function(){ - } -}; - -}); // module: browser/debug.js - -require.register("browser/diff.js", function(module, exports, require){ -/* See LICENSE file for terms of use */ - -/* - * Text diff implementation. - * - * This library supports the following APIS: - * JsDiff.diffChars: Character by character diff - * JsDiff.diffWords: Word (as defined by \b regex) diff which ignores whitespace - * JsDiff.diffLines: Line based diff - * - * JsDiff.diffCss: Diff targeted at CSS content - * - * These methods are based on the implementation proposed in - * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986). - * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927 - */ -var JsDiff = (function() { - /*jshint maxparams: 5*/ - function clonePath(path) { - return { newPos: path.newPos, components: path.components.slice(0) }; - } - function removeEmpty(array) { - var ret = []; - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } - } - return ret; - } - function escapeHTML(s) { - var n = s; - n = n.replace(/&/g, '&'); - n = n.replace(//g, '>'); - n = n.replace(/"/g, '"'); - - return n; - } - - var Diff = function(ignoreWhitespace) { - this.ignoreWhitespace = ignoreWhitespace; - }; - Diff.prototype = { - diff: function(oldString, newString) { - // Handle the identity case (this is due to unrolling editLength == 0 - if (newString === oldString) { - return [{ value: newString }]; - } - if (!newString) { - return [{ value: oldString, removed: true }]; - } - if (!oldString) { - return [{ value: newString, added: true }]; - } - - newString = this.tokenize(newString); - oldString = this.tokenize(oldString); - - var newLen = newString.length, oldLen = oldString.length; - var maxEditLength = newLen + oldLen; - var bestPath = [{ newPos: -1, components: [] }]; - - // Seed editLength = 0 - var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); - if (bestPath[0].newPos+1 >= newLen && oldPos+1 >= oldLen) { - return bestPath[0].components; - } - - for (var editLength = 1; editLength <= maxEditLength; editLength++) { - for (var diagonalPath = -1*editLength; diagonalPath <= editLength; diagonalPath+=2) { - var basePath; - var addPath = bestPath[diagonalPath-1], - removePath = bestPath[diagonalPath+1]; - oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; - if (addPath) { - // No one else is going to attempt to use this value, clear it - bestPath[diagonalPath-1] = undefined; - } - - var canAdd = addPath && addPath.newPos+1 < newLen; - var canRemove = removePath && 0 <= oldPos && oldPos < oldLen; - if (!canAdd && !canRemove) { - bestPath[diagonalPath] = undefined; - continue; - } - - // Select the diagonal that we want to branch from. We select the prior - // path whose position in the new string is the farthest from the origin - // and does not pass the bounds of the diff graph - if (!canAdd || (canRemove && addPath.newPos < removePath.newPos)) { - basePath = clonePath(removePath); - this.pushComponent(basePath.components, oldString[oldPos], undefined, true); - } else { - basePath = clonePath(addPath); - basePath.newPos++; - this.pushComponent(basePath.components, newString[basePath.newPos], true, undefined); - } - - var oldPos = this.extractCommon(basePath, newString, oldString, diagonalPath); - - if (basePath.newPos+1 >= newLen && oldPos+1 >= oldLen) { - return basePath.components; - } else { - bestPath[diagonalPath] = basePath; - } - } - } - }, - - pushComponent: function(components, value, added, removed) { - var last = components[components.length-1]; - if (last && last.added === added && last.removed === removed) { - // We need to clone here as the component clone operation is just - // as shallow array clone - components[components.length-1] = - {value: this.join(last.value, value), added: added, removed: removed }; - } else { - components.push({value: value, added: added, removed: removed }); - } - }, - extractCommon: function(basePath, newString, oldString, diagonalPath) { - var newLen = newString.length, - oldLen = oldString.length, - newPos = basePath.newPos, - oldPos = newPos - diagonalPath; - while (newPos+1 < newLen && oldPos+1 < oldLen && this.equals(newString[newPos+1], oldString[oldPos+1])) { - newPos++; - oldPos++; - - this.pushComponent(basePath.components, newString[newPos], undefined, undefined); - } - basePath.newPos = newPos; - return oldPos; - }, - - equals: function(left, right) { - var reWhitespace = /\S/; - if (this.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right)) { - return true; - } else { - return left === right; - } - }, - join: function(left, right) { - return left + right; - }, - tokenize: function(value) { - return value; - } - }; - - var CharDiff = new Diff(); - - var WordDiff = new Diff(true); - var WordWithSpaceDiff = new Diff(); - WordDiff.tokenize = WordWithSpaceDiff.tokenize = function(value) { - return removeEmpty(value.split(/(\s+|\b)/)); - }; - - var CssDiff = new Diff(true); - CssDiff.tokenize = function(value) { - return removeEmpty(value.split(/([{}:;,]|\s+)/)); - }; - - var LineDiff = new Diff(); - LineDiff.tokenize = function(value) { - var retLines = [], - lines = value.split(/^/m); - - for(var i = 0; i < lines.length; i++) { - var line = lines[i], - lastLine = lines[i - 1]; - - // Merge lines that may contain windows new lines - if (line == '\n' && lastLine && lastLine[lastLine.length - 1] === '\r') { - retLines[retLines.length - 1] += '\n'; - } else if (line) { - retLines.push(line); - } - } - - return retLines; - }; - - return { - Diff: Diff, - - diffChars: function(oldStr, newStr) { return CharDiff.diff(oldStr, newStr); }, - diffWords: function(oldStr, newStr) { return WordDiff.diff(oldStr, newStr); }, - diffWordsWithSpace: function(oldStr, newStr) { return WordWithSpaceDiff.diff(oldStr, newStr); }, - diffLines: function(oldStr, newStr) { return LineDiff.diff(oldStr, newStr); }, - - diffCss: function(oldStr, newStr) { return CssDiff.diff(oldStr, newStr); }, - - createPatch: function(fileName, oldStr, newStr, oldHeader, newHeader) { - var ret = []; - - ret.push('Index: ' + fileName); - ret.push('==================================================================='); - ret.push('--- ' + fileName + (typeof oldHeader === 'undefined' ? '' : '\t' + oldHeader)); - ret.push('+++ ' + fileName + (typeof newHeader === 'undefined' ? '' : '\t' + newHeader)); - - var diff = LineDiff.diff(oldStr, newStr); - if (!diff[diff.length-1].value) { - diff.pop(); // Remove trailing newline add - } - diff.push({value: '', lines: []}); // Append an empty value to make cleanup easier - - function contextLines(lines) { - return lines.map(function(entry) { return ' ' + entry; }); - } - function eofNL(curRange, i, current) { - var last = diff[diff.length-2], - isLast = i === diff.length-2, - isLastOfType = i === diff.length-3 && (current.added !== last.added || current.removed !== last.removed); - - // Figure out if this is the last line for the given file and missing NL - if (!/\n$/.test(current.value) && (isLast || isLastOfType)) { - curRange.push('\\ No newline at end of file'); - } - } - - var oldRangeStart = 0, newRangeStart = 0, curRange = [], - oldLine = 1, newLine = 1; - for (var i = 0; i < diff.length; i++) { - var current = diff[i], - lines = current.lines || current.value.replace(/\n$/, '').split('\n'); - current.lines = lines; - - if (current.added || current.removed) { - if (!oldRangeStart) { - var prev = diff[i-1]; - oldRangeStart = oldLine; - newRangeStart = newLine; - - if (prev) { - curRange = contextLines(prev.lines.slice(-4)); - oldRangeStart -= curRange.length; - newRangeStart -= curRange.length; - } - } - curRange.push.apply(curRange, lines.map(function(entry) { return (current.added?'+':'-') + entry; })); - eofNL(curRange, i, current); - - if (current.added) { - newLine += lines.length; - } else { - oldLine += lines.length; - } - } else { - if (oldRangeStart) { - // Close out any changes that have been output (or join overlapping) - if (lines.length <= 8 && i < diff.length-2) { - // Overlapping - curRange.push.apply(curRange, contextLines(lines)); - } else { - // end the range and output - var contextSize = Math.min(lines.length, 4); - ret.push( - '@@ -' + oldRangeStart + ',' + (oldLine-oldRangeStart+contextSize) - + ' +' + newRangeStart + ',' + (newLine-newRangeStart+contextSize) - + ' @@'); - ret.push.apply(ret, curRange); - ret.push.apply(ret, contextLines(lines.slice(0, contextSize))); - if (lines.length <= 4) { - eofNL(ret, i, current); - } - - oldRangeStart = 0; newRangeStart = 0; curRange = []; - } - } - oldLine += lines.length; - newLine += lines.length; - } - } - - return ret.join('\n') + '\n'; - }, - - applyPatch: function(oldStr, uniDiff) { - var diffstr = uniDiff.split('\n'); - var diff = []; - var remEOFNL = false, - addEOFNL = false; - - for (var i = (diffstr[0][0]==='I'?4:0); i < diffstr.length; i++) { - if(diffstr[i][0] === '@') { - var meh = diffstr[i].split(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/); - diff.unshift({ - start:meh[3], - oldlength:meh[2], - oldlines:[], - newlength:meh[4], - newlines:[] - }); - } else if(diffstr[i][0] === '+') { - diff[0].newlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === '-') { - diff[0].oldlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === ' ') { - diff[0].newlines.push(diffstr[i].substr(1)); - diff[0].oldlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === '\\') { - if (diffstr[i-1][0] === '+') { - remEOFNL = true; - } else if(diffstr[i-1][0] === '-') { - addEOFNL = true; - } - } - } - - var str = oldStr.split('\n'); - for (var i = diff.length - 1; i >= 0; i--) { - var d = diff[i]; - for (var j = 0; j < d.oldlength; j++) { - if(str[d.start-1+j] !== d.oldlines[j]) { - return false; - } - } - Array.prototype.splice.apply(str,[d.start-1,+d.oldlength].concat(d.newlines)); - } - - if (remEOFNL) { - while (!str[str.length-1]) { - str.pop(); - } - } else if (addEOFNL) { - str.push(''); - } - return str.join('\n'); - }, - - convertChangesToXML: function(changes){ - var ret = []; - for ( var i = 0; i < changes.length; i++) { - var change = changes[i]; - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - - ret.push(escapeHTML(change.value)); - - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - } - return ret.join(''); - }, - - // See: http://code.google.com/p/google-diff-match-patch/wiki/API - convertChangesToDMP: function(changes){ - var ret = [], change; - for ( var i = 0; i < changes.length; i++) { - change = changes[i]; - ret.push([(change.added ? 1 : change.removed ? -1 : 0), change.value]); - } - return ret; - } - }; -})(); - -if (typeof module !== 'undefined') { - module.exports = JsDiff; -} - -}); // module: browser/diff.js - -require.register("browser/escape-string-regexp.js", function(module, exports, require){ -'use strict'; - -var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; - -module.exports = function (str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - - return str.replace(matchOperatorsRe, '\\$&'); -}; - -}); // module: browser/escape-string-regexp.js - -require.register("browser/events.js", function(module, exports, require){ -/** - * Module exports. - */ - -exports.EventEmitter = EventEmitter; - -/** - * Check if `obj` is an array. - */ - -function isArray(obj) { - return '[object Array]' == {}.toString.call(obj); -} - -/** - * Event emitter constructor. - * - * @api public - */ - -function EventEmitter(){}; - -/** - * Adds a listener. - * - * @api public - */ - -EventEmitter.prototype.on = function (name, fn) { - if (!this.$events) { - this.$events = {}; - } - - if (!this.$events[name]) { - this.$events[name] = fn; - } else if (isArray(this.$events[name])) { - this.$events[name].push(fn); - } else { - this.$events[name] = [this.$events[name], fn]; - } - - return this; -}; - -EventEmitter.prototype.addListener = EventEmitter.prototype.on; - -/** - * Adds a volatile listener. - * - * @api public - */ - -EventEmitter.prototype.once = function (name, fn) { - var self = this; - - function on () { - self.removeListener(name, on); - fn.apply(this, arguments); - }; - - on.listener = fn; - this.on(name, on); - - return this; -}; - -/** - * Removes a listener. - * - * @api public - */ - -EventEmitter.prototype.removeListener = function (name, fn) { - if (this.$events && this.$events[name]) { - var list = this.$events[name]; - - if (isArray(list)) { - var pos = -1; - - for (var i = 0, l = list.length; i < l; i++) { - if (list[i] === fn || (list[i].listener && list[i].listener === fn)) { - pos = i; - break; - } - } - - if (pos < 0) { - return this; - } - - list.splice(pos, 1); - - if (!list.length) { - delete this.$events[name]; - } - } else if (list === fn || (list.listener && list.listener === fn)) { - delete this.$events[name]; - } - } - - return this; -}; - -/** - * Removes all listeners for an event. - * - * @api public - */ - -EventEmitter.prototype.removeAllListeners = function (name) { - if (name === undefined) { - this.$events = {}; - return this; - } - - if (this.$events && this.$events[name]) { - this.$events[name] = null; - } - - return this; -}; - -/** - * Gets all listeners for a certain event. - * - * @api public - */ - -EventEmitter.prototype.listeners = function (name) { - if (!this.$events) { - this.$events = {}; - } - - if (!this.$events[name]) { - this.$events[name] = []; - } - - if (!isArray(this.$events[name])) { - this.$events[name] = [this.$events[name]]; - } - - return this.$events[name]; -}; - -/** - * Emits an event. - * - * @api public - */ - -EventEmitter.prototype.emit = function (name) { - if (!this.$events) { - return false; - } - - var handler = this.$events[name]; - - if (!handler) { - return false; - } - - var args = [].slice.call(arguments, 1); - - if ('function' == typeof handler) { - handler.apply(this, args); - } else if (isArray(handler)) { - var listeners = handler.slice(); - - for (var i = 0, l = listeners.length; i < l; i++) { - listeners[i].apply(this, args); - } - } else { - return false; - } - - return true; -}; - -}); // module: browser/events.js - -require.register("browser/fs.js", function(module, exports, require){ - -}); // module: browser/fs.js - -require.register("browser/glob.js", function(module, exports, require){ - -}); // module: browser/glob.js - -require.register("browser/path.js", function(module, exports, require){ - -}); // module: browser/path.js - -require.register("browser/progress.js", function(module, exports, require){ -/** - * Expose `Progress`. - */ - -module.exports = Progress; - -/** - * Initialize a new `Progress` indicator. - */ - -function Progress() { - this.percent = 0; - this.size(0); - this.fontSize(11); - this.font('helvetica, arial, sans-serif'); -} - -/** - * Set progress size to `n`. - * - * @param {Number} n - * @return {Progress} for chaining - * @api public - */ - -Progress.prototype.size = function(n){ - this._size = n; - return this; -}; - -/** - * Set text to `str`. - * - * @param {String} str - * @return {Progress} for chaining - * @api public - */ - -Progress.prototype.text = function(str){ - this._text = str; - return this; -}; - -/** - * Set font size to `n`. - * - * @param {Number} n - * @return {Progress} for chaining - * @api public - */ - -Progress.prototype.fontSize = function(n){ - this._fontSize = n; - return this; -}; - -/** - * Set font `family`. - * - * @param {String} family - * @return {Progress} for chaining - */ - -Progress.prototype.font = function(family){ - this._font = family; - return this; -}; - -/** - * Update percentage to `n`. - * - * @param {Number} n - * @return {Progress} for chaining - */ - -Progress.prototype.update = function(n){ - this.percent = n; - return this; -}; - -/** - * Draw on `ctx`. - * - * @param {CanvasRenderingContext2d} ctx - * @return {Progress} for chaining - */ - -Progress.prototype.draw = function(ctx){ - try { - var percent = Math.min(this.percent, 100) - , size = this._size - , half = size / 2 - , x = half - , y = half - , rad = half - 1 - , fontSize = this._fontSize; - - ctx.font = fontSize + 'px ' + this._font; - - var angle = Math.PI * 2 * (percent / 100); - ctx.clearRect(0, 0, size, size); - - // outer circle - ctx.strokeStyle = '#9f9f9f'; - ctx.beginPath(); - ctx.arc(x, y, rad, 0, angle, false); - ctx.stroke(); - - // inner circle - ctx.strokeStyle = '#eee'; - ctx.beginPath(); - ctx.arc(x, y, rad - 1, 0, angle, true); - ctx.stroke(); - - // text - var text = this._text || (percent | 0) + '%' - , w = ctx.measureText(text).width; - - ctx.fillText( - text - , x - w / 2 + 1 - , y + fontSize / 2 - 1); - } catch (ex) {} //don't fail if we can't render progress - return this; -}; - -}); // module: browser/progress.js - -require.register("browser/tty.js", function(module, exports, require){ -exports.isatty = function(){ - return true; -}; - -exports.getWindowSize = function(){ - if ('innerHeight' in global) { - return [global.innerHeight, global.innerWidth]; - } else { - // In a Web Worker, the DOM Window is not available. - return [640, 480]; - } -}; - -}); // module: browser/tty.js - -require.register("context.js", function(module, exports, require){ -/** - * Expose `Context`. - */ - -module.exports = Context; - -/** - * Initialize a new `Context`. - * - * @api private - */ - -function Context(){} - -/** - * Set or get the context `Runnable` to `runnable`. - * - * @param {Runnable} runnable - * @return {Context} - * @api private - */ - -Context.prototype.runnable = function(runnable){ - if (0 == arguments.length) return this._runnable; - this.test = this._runnable = runnable; - return this; -}; - -/** - * Set test timeout `ms`. - * - * @param {Number} ms - * @return {Context} self - * @api private - */ - -Context.prototype.timeout = function(ms){ - if (arguments.length === 0) return this.runnable().timeout(); - this.runnable().timeout(ms); - return this; -}; - -/** - * Set test timeout `enabled`. - * - * @param {Boolean} enabled - * @return {Context} self - * @api private - */ - -Context.prototype.enableTimeouts = function (enabled) { - this.runnable().enableTimeouts(enabled); - return this; -}; - - -/** - * Set test slowness threshold `ms`. - * - * @param {Number} ms - * @return {Context} self - * @api private - */ - -Context.prototype.slow = function(ms){ - this.runnable().slow(ms); - return this; -}; - -/** - * Mark a test as skipped. - * - * @return {Context} self - * @api private - */ - -Context.prototype.skip = function(){ - this.runnable().skip(); - return this; -}; - -/** - * Inspect the context void of `._runnable`. - * - * @return {String} - * @api private - */ - -Context.prototype.inspect = function(){ - return JSON.stringify(this, function(key, val){ - if ('_runnable' == key) return; - if ('test' == key) return; - return val; - }, 2); -}; - -}); // module: context.js - -require.register("hook.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Runnable = require('./runnable'); - -/** - * Expose `Hook`. - */ - -module.exports = Hook; - -/** - * Initialize a new `Hook` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Hook(title, fn) { - Runnable.call(this, title, fn); - this.type = 'hook'; -} - -/** - * Inherit from `Runnable.prototype`. - */ - -function F(){}; -F.prototype = Runnable.prototype; -Hook.prototype = new F; -Hook.prototype.constructor = Hook; - - -/** - * Get or set the test `err`. - * - * @param {Error} err - * @return {Error} - * @api public - */ - -Hook.prototype.error = function(err){ - if (0 == arguments.length) { - var err = this._error; - this._error = null; - return err; - } - - this._error = err; -}; - -}); // module: hook.js - -require.register("interfaces/bdd.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test') - , utils = require('../utils') - , escapeRe = require('browser/escape-string-regexp'); - -/** - * BDD-style interface: - * - * describe('Array', function(){ - * describe('#indexOf()', function(){ - * it('should return -1 when not present', function(){ - * - * }); - * - * it('should return the index when present', function(){ - * - * }); - * }); - * }); - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('pre-require', function(context, file, mocha){ - - var common = require('./common')(suites, context); - - context.before = common.before; - context.after = common.after; - context.beforeEach = common.beforeEach; - context.afterEach = common.afterEach; - context.run = mocha.options.delay && common.runWithSuite(suite); - /** - * Describe a "suite" with the given `title` - * and callback `fn` containing nested suites - * and/or tests. - */ - - context.describe = context.context = function(title, fn){ - var suite = Suite.create(suites[0], title); - suite.file = file; - suites.unshift(suite); - fn.call(suite); - suites.shift(); - return suite; - }; - - /** - * Pending describe. - */ - - context.xdescribe = - context.xcontext = - context.describe.skip = function(title, fn){ - var suite = Suite.create(suites[0], title); - suite.pending = true; - suites.unshift(suite); - fn.call(suite); - suites.shift(); - }; - - /** - * Exclusive suite. - */ - - context.describe.only = function(title, fn){ - var suite = context.describe(title, fn); - mocha.grep(suite.fullTitle()); - return suite; - }; - - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ - - context.it = context.specify = function(title, fn){ - var suite = suites[0]; - if (suite.pending) fn = null; - var test = new Test(title, fn); - test.file = file; - suite.addTest(test); - return test; - }; - - /** - * Exclusive test-case. - */ - - context.it.only = function(title, fn){ - var test = context.it(title, fn); - var reString = '^' + escapeRe(test.fullTitle()) + '$'; - mocha.grep(new RegExp(reString)); - return test; - }; - - /** - * Pending test case. - */ - - context.xit = - context.xspecify = - context.it.skip = function(title){ - context.it(title); - }; - - }); -}; - -}); // module: interfaces/bdd.js - -require.register("interfaces/common.js", function(module, exports, require){ -/** - * Functions common to more than one interface - * @module lib/interfaces/common - */ - -'use strict'; - -module.exports = function (suites, context) { - - return { - /** - * This is only present if flag --delay is passed into Mocha. It triggers - * root suite execution. Returns a function which runs the root suite. - */ - runWithSuite: function runWithSuite(suite) { - return function run() { - suite.run(); - }; - }, - - /** - * Execute before running tests. - */ - before: function (name, fn) { - suites[0].beforeAll(name, fn); - }, - - /** - * Execute after running tests. - */ - after: function (name, fn) { - suites[0].afterAll(name, fn); - }, - - /** - * Execute before each test case. - */ - beforeEach: function (name, fn) { - suites[0].beforeEach(name, fn); - }, - - /** - * Execute after each test case. - */ - afterEach: function (name, fn) { - suites[0].afterEach(name, fn); - }, - - test: { - /** - * Pending test case. - */ - skip: function (title) { - context.test(title); - } - } - } -}; - -}); // module: interfaces/common.js - -require.register("interfaces/exports.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test'); - -/** - * TDD-style interface: - * - * exports.Array = { - * '#indexOf()': { - * 'should return -1 when the value is not present': function(){ - * - * }, - * - * 'should return the correct index when the value is present': function(){ - * - * } - * } - * }; - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('require', visit); - - function visit(obj, file) { - var suite; - for (var key in obj) { - if ('function' == typeof obj[key]) { - var fn = obj[key]; - switch (key) { - case 'before': - suites[0].beforeAll(fn); - break; - case 'after': - suites[0].afterAll(fn); - break; - case 'beforeEach': - suites[0].beforeEach(fn); - break; - case 'afterEach': - suites[0].afterEach(fn); - break; - default: - var test = new Test(key, fn); - test.file = file; - suites[0].addTest(test); - } - } else { - suite = Suite.create(suites[0], key); - suites.unshift(suite); - visit(obj[key]); - suites.shift(); - } - } - } -}; - -}); // module: interfaces/exports.js - -require.register("interfaces/index.js", function(module, exports, require){ -exports.bdd = require('./bdd'); -exports.tdd = require('./tdd'); -exports.qunit = require('./qunit'); -exports.exports = require('./exports'); - -}); // module: interfaces/index.js - -require.register("interfaces/qunit.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test') - , escapeRe = require('browser/escape-string-regexp') - , utils = require('../utils'); - -/** - * QUnit-style interface: - * - * suite('Array'); - * - * test('#length', function(){ - * var arr = [1,2,3]; - * ok(arr.length == 3); - * }); - * - * test('#indexOf()', function(){ - * var arr = [1,2,3]; - * ok(arr.indexOf(1) == 0); - * ok(arr.indexOf(2) == 1); - * ok(arr.indexOf(3) == 2); - * }); - * - * suite('String'); - * - * test('#length', function(){ - * ok('foo'.length == 3); - * }); - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('pre-require', function(context, file, mocha){ - - var common = require('./common')(suites, context); - - context.before = common.before; - context.after = common.after; - context.beforeEach = common.beforeEach; - context.afterEach = common.afterEach; - context.run = mocha.options.delay && common.runWithSuite(suite); - /** - * Describe a "suite" with the given `title`. - */ - - context.suite = function(title){ - if (suites.length > 1) suites.shift(); - var suite = Suite.create(suites[0], title); - suite.file = file; - suites.unshift(suite); - return suite; - }; - - /** - * Exclusive test-case. - */ - - context.suite.only = function(title, fn){ - var suite = context.suite(title, fn); - mocha.grep(suite.fullTitle()); - }; - - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ - - context.test = function(title, fn){ - var test = new Test(title, fn); - test.file = file; - suites[0].addTest(test); - return test; - }; - - /** - * Exclusive test-case. - */ - - context.test.only = function(title, fn){ - var test = context.test(title, fn); - var reString = '^' + escapeRe(test.fullTitle()) + '$'; - mocha.grep(new RegExp(reString)); - }; - - context.test.skip = common.test.skip; - - }); -}; - -}); // module: interfaces/qunit.js - -require.register("interfaces/tdd.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test') - , escapeRe = require('browser/escape-string-regexp') - , utils = require('../utils'); - -/** - * TDD-style interface: - * - * suite('Array', function(){ - * suite('#indexOf()', function(){ - * suiteSetup(function(){ - * - * }); - * - * test('should return -1 when not present', function(){ - * - * }); - * - * test('should return the index when present', function(){ - * - * }); - * - * suiteTeardown(function(){ - * - * }); - * }); - * }); - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('pre-require', function(context, file, mocha){ - - var common = require('./common')(suites, context); - - context.setup = common.beforeEach; - context.teardown = common.afterEach; - context.suiteSetup = common.before; - context.suiteTeardown = common.after; - context.run = mocha.options.delay && common.runWithSuite(suite); - /** - * Describe a "suite" with the given `title` - * and callback `fn` containing nested suites - * and/or tests. - */ - - context.suite = function(title, fn){ - var suite = Suite.create(suites[0], title); - suite.file = file; - suites.unshift(suite); - fn.call(suite); - suites.shift(); - return suite; - }; - - /** - * Pending suite. - */ - context.suite.skip = function(title, fn) { - var suite = Suite.create(suites[0], title); - suite.pending = true; - suites.unshift(suite); - fn.call(suite); - suites.shift(); - }; - - /** - * Exclusive test-case. - */ - - context.suite.only = function(title, fn){ - var suite = context.suite(title, fn); - mocha.grep(suite.fullTitle()); - }; - - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ - - context.test = function(title, fn){ - var suite = suites[0]; - if (suite.pending) fn = null; - var test = new Test(title, fn); - test.file = file; - suite.addTest(test); - return test; - }; - - /** - * Exclusive test-case. - */ - - context.test.only = function(title, fn){ - var test = context.test(title, fn); - var reString = '^' + escapeRe(test.fullTitle()) + '$'; - mocha.grep(new RegExp(reString)); - }; - - context.test.skip = common.test.skip; - }); -}; - -}); // module: interfaces/tdd.js - -require.register("mocha.js", function(module, exports, require){ -/*! - * mocha - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var path = require('browser/path') - , escapeRe = require('browser/escape-string-regexp') - , utils = require('./utils'); - -/** - * Expose `Mocha`. - */ - -exports = module.exports = Mocha; - -/** - * To require local UIs and reporters when running in node. - */ - -if (typeof process !== 'undefined' && typeof process.cwd === 'function') { - var join = path.join - , cwd = process.cwd(); - module.paths.push(cwd, join(cwd, 'node_modules')); -} - -/** - * Expose internals. - */ - -exports.utils = utils; -exports.interfaces = require('./interfaces'); -exports.reporters = require('./reporters'); -exports.Runnable = require('./runnable'); -exports.Context = require('./context'); -exports.Runner = require('./runner'); -exports.Suite = require('./suite'); -exports.Hook = require('./hook'); -exports.Test = require('./test'); - -/** - * Return image `name` path. - * - * @param {String} name - * @return {String} - * @api private - */ - -function image(name) { - return __dirname + '/../images/' + name + '.png'; -} - -/** - * Setup mocha with `options`. - * - * Options: - * - * - `ui` name "bdd", "tdd", "exports" etc - * - `reporter` reporter instance, defaults to `mocha.reporters.spec` - * - `globals` array of accepted globals - * - `timeout` timeout in milliseconds - * - `bail` bail on the first test failure - * - `slow` milliseconds to wait before considering a test slow - * - `ignoreLeaks` ignore global leaks - * - `fullTrace` display the full stack-trace on failing - * - `grep` string or regexp to filter tests with - * - * @param {Object} options - * @api public - */ - -function Mocha(options) { - options = options || {}; - this.files = []; - this.options = options; - if (options.grep) this.grep(new RegExp(options.grep)); - if (options.fgrep) this.grep(options.fgrep); - this.suite = new exports.Suite('', new exports.Context); - this.ui(options.ui); - this.bail(options.bail); - this.reporter(options.reporter, options.reporterOptions); - if (null != options.timeout) this.timeout(options.timeout); - this.useColors(options.useColors); - if (options.enableTimeouts !== null) this.enableTimeouts(options.enableTimeouts); - if (options.slow) this.slow(options.slow); - - this.suite.on('pre-require', function (context) { - exports.afterEach = context.afterEach || context.teardown; - exports.after = context.after || context.suiteTeardown; - exports.beforeEach = context.beforeEach || context.setup; - exports.before = context.before || context.suiteSetup; - exports.describe = context.describe || context.suite; - exports.it = context.it || context.test; - exports.setup = context.setup || context.beforeEach; - exports.suiteSetup = context.suiteSetup || context.before; - exports.suiteTeardown = context.suiteTeardown || context.after; - exports.suite = context.suite || context.describe; - exports.teardown = context.teardown || context.afterEach; - exports.test = context.test || context.it; - exports.run = context.run; - }); -} - -/** - * Enable or disable bailing on the first failure. - * - * @param {Boolean} [bail] - * @api public - */ - -Mocha.prototype.bail = function(bail){ - if (0 == arguments.length) bail = true; - this.suite.bail(bail); - return this; -}; - -/** - * Add test `file`. - * - * @param {String} file - * @api public - */ - -Mocha.prototype.addFile = function(file){ - this.files.push(file); - return this; -}; - -/** - * Set reporter to `reporter`, defaults to "spec". - * - * @param {String|Function} reporter name or constructor - * @param {Object} reporterOptions optional options - * @api public - */ -Mocha.prototype.reporter = function(reporter, reporterOptions){ - if ('function' == typeof reporter) { - this._reporter = reporter; - } else { - reporter = reporter || 'spec'; - var _reporter; - try { _reporter = require('./reporters/' + reporter); } catch (err) {} - if (!_reporter) try { _reporter = require(reporter); } catch (err) { - err.message.indexOf('Cannot find module') !== -1 - ? console.warn('"' + reporter + '" reporter not found') - : console.warn('"' + reporter + '" reporter blew up with error:\n' + err.stack); - } - if (!_reporter && reporter === 'teamcity') - console.warn('The Teamcity reporter was moved to a package named ' + - 'mocha-teamcity-reporter ' + - '(https://npmjs.org/package/mocha-teamcity-reporter).'); - if (!_reporter) throw new Error('invalid reporter "' + reporter + '"'); - this._reporter = _reporter; - } - this.options.reporterOptions = reporterOptions; - return this; -}; - -/** - * Set test UI `name`, defaults to "bdd". - * - * @param {String} bdd - * @api public - */ - -Mocha.prototype.ui = function(name){ - name = name || 'bdd'; - this._ui = exports.interfaces[name]; - if (!this._ui) try { this._ui = require(name); } catch (err) {} - if (!this._ui) throw new Error('invalid interface "' + name + '"'); - this._ui = this._ui(this.suite); - return this; -}; - -/** - * Load registered files. - * - * @api private - */ - -Mocha.prototype.loadFiles = function(fn){ - var self = this; - var suite = this.suite; - var pending = this.files.length; - this.files.forEach(function(file){ - file = path.resolve(file); - suite.emit('pre-require', global, file, self); - suite.emit('require', require(file), file, self); - suite.emit('post-require', global, file, self); - --pending || (fn && fn()); - }); -}; - -/** - * Enable growl support. - * - * @api private - */ - -Mocha.prototype._growl = function(runner, reporter) { - var notify = require('growl'); - - runner.on('end', function(){ - var stats = reporter.stats; - if (stats.failures) { - var msg = stats.failures + ' of ' + runner.total + ' tests failed'; - notify(msg, { name: 'mocha', title: 'Failed', image: image('error') }); - } else { - notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', { - name: 'mocha' - , title: 'Passed' - , image: image('ok') - }); - } - }); -}; - -/** - * Add regexp to grep, if `re` is a string it is escaped. - * - * @param {RegExp|String} re - * @return {Mocha} - * @api public - */ - -Mocha.prototype.grep = function(re){ - this.options.grep = 'string' == typeof re - ? new RegExp(escapeRe(re)) - : re; - return this; -}; - -/** - * Invert `.grep()` matches. - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.invert = function(){ - this.options.invert = true; - return this; -}; - -/** - * Ignore global leaks. - * - * @param {Boolean} ignore - * @return {Mocha} - * @api public - */ - -Mocha.prototype.ignoreLeaks = function(ignore){ - this.options.ignoreLeaks = !!ignore; - return this; -}; - -/** - * Enable global leak checking. - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.checkLeaks = function(){ - this.options.ignoreLeaks = false; - return this; -}; - -/** - * Display long stack-trace on failing - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.fullTrace = function() { - this.options.fullStackTrace = true; - return this; -}; - -/** - * Enable growl support. - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.growl = function(){ - this.options.growl = true; - return this; -}; - -/** - * Ignore `globals` array or string. - * - * @param {Array|String} globals - * @return {Mocha} - * @api public - */ - -Mocha.prototype.globals = function(globals){ - this.options.globals = (this.options.globals || []).concat(globals); - return this; -}; - -/** - * Emit color output. - * - * @param {Boolean} colors - * @return {Mocha} - * @api public - */ - -Mocha.prototype.useColors = function(colors){ - if (colors !== undefined) { - this.options.useColors = colors; - } - return this; -}; - -/** - * Use inline diffs rather than +/-. - * - * @param {Boolean} inlineDiffs - * @return {Mocha} - * @api public - */ - -Mocha.prototype.useInlineDiffs = function(inlineDiffs) { - this.options.useInlineDiffs = arguments.length && inlineDiffs != undefined - ? inlineDiffs - : false; - return this; -}; - -/** - * Set the timeout in milliseconds. - * - * @param {Number} timeout - * @return {Mocha} - * @api public - */ - -Mocha.prototype.timeout = function(timeout){ - this.suite.timeout(timeout); - return this; -}; - -/** - * Set slowness threshold in milliseconds. - * - * @param {Number} slow - * @return {Mocha} - * @api public - */ - -Mocha.prototype.slow = function(slow){ - this.suite.slow(slow); - return this; -}; - -/** - * Enable timeouts. - * - * @param {Boolean} enabled - * @return {Mocha} - * @api public - */ - -Mocha.prototype.enableTimeouts = function(enabled) { - this.suite.enableTimeouts(arguments.length && enabled !== undefined - ? enabled - : true); - return this -}; - -/** - * Makes all tests async (accepting a callback) - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.asyncOnly = function(){ - this.options.asyncOnly = true; - return this; -}; - -/** - * Disable syntax highlighting (in browser). - * @returns {Mocha} - * @api public - */ -Mocha.prototype.noHighlighting = function() { - this.options.noHighlighting = true; - return this; -}; - -/** - * Delay root suite execution. - * @returns {Mocha} - * @api public - */ -Mocha.prototype.delay = function delay() { - this.options.delay = true; - return this; -}; - -/** - * Run tests and invoke `fn()` when complete. - * - * @param {Function} fn - * @return {Runner} - * @api public - */ -Mocha.prototype.run = function(fn){ - if (this.files.length) this.loadFiles(); - var suite = this.suite; - var options = this.options; - options.files = this.files; - var runner = new exports.Runner(suite, options.delay); - var reporter = new this._reporter(runner, options); - runner.ignoreLeaks = false !== options.ignoreLeaks; - runner.fullStackTrace = options.fullStackTrace; - runner.asyncOnly = options.asyncOnly; - if (options.grep) runner.grep(options.grep, options.invert); - if (options.globals) runner.globals(options.globals); - if (options.growl) this._growl(runner, reporter); - if (options.useColors !== undefined) { - exports.reporters.Base.useColors = options.useColors; - } - exports.reporters.Base.inlineDiffs = options.useInlineDiffs; - - function done(failures) { - if (reporter.done) { - reporter.done(failures, fn); - } else fn && fn(failures); - } - - return runner.run(done); -}; - -}); // module: mocha.js - -require.register("ms.js", function(module, exports, require){ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} options - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options){ - options = options || {}; - if ('string' == typeof val) return parse(val); - return options['long'] ? longFormat(val) : shortFormat(val); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - var match = /^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(str); - if (!match) return; - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'y': - return n * y; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 's': - return n * s; - case 'ms': - return n; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function shortFormat(ms) { - if (ms >= d) return Math.round(ms / d) + 'd'; - if (ms >= h) return Math.round(ms / h) + 'h'; - if (ms >= m) return Math.round(ms / m) + 'm'; - if (ms >= s) return Math.round(ms / s) + 's'; - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function longFormat(ms) { - return plural(ms, d, 'day') - || plural(ms, h, 'hour') - || plural(ms, m, 'minute') - || plural(ms, s, 'second') - || ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, n, name) { - if (ms < n) return; - if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name; - return Math.ceil(ms / n) + ' ' + name + 's'; -} - -}); // module: ms.js - -require.register("pending.js", function(module, exports, require){ - -/** - * Expose `Pending`. - */ - -module.exports = Pending; - -/** - * Initialize a new `Pending` error with the given message. - * - * @param {String} message - */ - -function Pending(message) { - this.message = message; -} - -}); // module: pending.js - -require.register("reporters/base.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var tty = require('browser/tty') - , diff = require('browser/diff') - , ms = require('../ms') - , utils = require('../utils') - , supportsColor = process.env ? require('supports-color') : null; - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Check if both stdio streams are associated with a tty. - */ - -var isatty = tty.isatty(1) && tty.isatty(2); - -/** - * Expose `Base`. - */ - -exports = module.exports = Base; - -/** - * Enable coloring by default, except in the browser interface. - */ - -exports.useColors = process.env - ? (supportsColor || (process.env.MOCHA_COLORS !== undefined)) - : false; - -/** - * Inline diffs instead of +/- - */ - -exports.inlineDiffs = false; - -/** - * Default color map. - */ - -exports.colors = { - 'pass': 90 - , 'fail': 31 - , 'bright pass': 92 - , 'bright fail': 91 - , 'bright yellow': 93 - , 'pending': 36 - , 'suite': 0 - , 'error title': 0 - , 'error message': 31 - , 'error stack': 90 - , 'checkmark': 32 - , 'fast': 90 - , 'medium': 33 - , 'slow': 31 - , 'green': 32 - , 'light': 90 - , 'diff gutter': 90 - , 'diff added': 42 - , 'diff removed': 41 -}; - -/** - * Default symbol map. - */ - -exports.symbols = { - ok: '✓', - err: '✖', - dot: '․' -}; - -// With node.js on Windows: use symbols available in terminal default fonts -if ('win32' == process.platform) { - exports.symbols.ok = '\u221A'; - exports.symbols.err = '\u00D7'; - exports.symbols.dot = '.'; -} - -/** - * Color `str` with the given `type`, - * allowing colors to be disabled, - * as well as user-defined color - * schemes. - * - * @param {String} type - * @param {String} str - * @return {String} - * @api private - */ - -var color = exports.color = function(type, str) { - if (!exports.useColors) return String(str); - return '\u001b[' + exports.colors[type] + 'm' + str + '\u001b[0m'; -}; - -/** - * Expose term window size, with some - * defaults for when stderr is not a tty. - */ - -exports.window = { - width: isatty - ? process.stdout.getWindowSize - ? process.stdout.getWindowSize(1)[0] - : tty.getWindowSize()[1] - : 75 -}; - -/** - * Expose some basic cursor interactions - * that are common among reporters. - */ - -exports.cursor = { - hide: function(){ - isatty && process.stdout.write('\u001b[?25l'); - }, - - show: function(){ - isatty && process.stdout.write('\u001b[?25h'); - }, - - deleteLine: function(){ - isatty && process.stdout.write('\u001b[2K'); - }, - - beginningOfLine: function(){ - isatty && process.stdout.write('\u001b[0G'); - }, - - CR: function(){ - if (isatty) { - exports.cursor.deleteLine(); - exports.cursor.beginningOfLine(); - } else { - process.stdout.write('\r'); - } - } -}; - -/** - * Outut the given `failures` as a list. - * - * @param {Array} failures - * @api public - */ - -exports.list = function(failures){ - console.log(); - failures.forEach(function(test, i){ - // format - var fmt = color('error title', ' %s) %s:\n') - + color('error message', ' %s') - + color('error stack', '\n%s\n'); - - // msg - var err = test.err - , message = err.message || '' - , stack = err.stack || message - , index = stack.indexOf(message) - , actual = err.actual - , expected = err.expected - , escape = true; - if (index === -1) { - msg = message; - } else { - index += message.length; - msg = stack.slice(0, index); - // remove msg from stack - stack = stack.slice(index + 1); - } - - // uncaught - if (err.uncaught) { - msg = 'Uncaught ' + msg; - } - // explicitly show diff - if (err.showDiff !== false && sameType(actual, expected) - && expected !== undefined) { - - if ('string' !== typeof actual) { - escape = false; - err.actual = actual = utils.stringify(actual); - err.expected = expected = utils.stringify(expected); - } - - fmt = color('error title', ' %s) %s:\n%s') + color('error stack', '\n%s\n'); - var match = message.match(/^([^:]+): expected/); - msg = '\n ' + color('error message', match ? match[1] : msg); - - if (exports.inlineDiffs) { - msg += inlineDiff(err, escape); - } else { - msg += unifiedDiff(err, escape); - } - } - - // indent stack trace - stack = stack.replace(/^/gm, ' '); - - console.log(fmt, (i + 1), test.fullTitle(), msg, stack); - }); -}; - -/** - * Initialize a new `Base` reporter. - * - * All other reporters generally - * inherit from this reporter, providing - * stats such as test duration, number - * of tests passed / failed etc. - * - * @param {Runner} runner - * @api public - */ - -function Base(runner) { - var self = this - , stats = this.stats = { suites: 0, tests: 0, passes: 0, pending: 0, failures: 0 } - , failures = this.failures = []; - - if (!runner) return; - this.runner = runner; - - runner.stats = stats; - - runner.on('start', function(){ - stats.start = new Date; - }); - - runner.on('suite', function(suite){ - stats.suites = stats.suites || 0; - suite.root || stats.suites++; - }); - - runner.on('test end', function(test){ - stats.tests = stats.tests || 0; - stats.tests++; - }); - - runner.on('pass', function(test){ - stats.passes = stats.passes || 0; - - var medium = test.slow() / 2; - test.speed = test.duration > test.slow() - ? 'slow' - : test.duration > medium - ? 'medium' - : 'fast'; - - stats.passes++; - }); - - runner.on('fail', function(test, err){ - stats.failures = stats.failures || 0; - stats.failures++; - test.err = err; - failures.push(test); - }); - - runner.on('end', function(){ - stats.end = new Date; - stats.duration = new Date - stats.start; - }); - - runner.on('pending', function(){ - stats.pending++; - }); -} - -/** - * Output common epilogue used by many of - * the bundled reporters. - * - * @api public - */ - -Base.prototype.epilogue = function(){ - var stats = this.stats; - var tests; - var fmt; - - console.log(); - - // passes - fmt = color('bright pass', ' ') - + color('green', ' %d passing') - + color('light', ' (%s)'); - - console.log(fmt, - stats.passes || 0, - ms(stats.duration)); - - // pending - if (stats.pending) { - fmt = color('pending', ' ') - + color('pending', ' %d pending'); - - console.log(fmt, stats.pending); - } - - // failures - if (stats.failures) { - fmt = color('fail', ' %d failing'); - - console.log(fmt, stats.failures); - - Base.list(this.failures); - console.log(); - } - - console.log(); -}; - -/** - * Pad the given `str` to `len`. - * - * @param {String} str - * @param {String} len - * @return {String} - * @api private - */ - -function pad(str, len) { - str = String(str); - return Array(len - str.length + 1).join(' ') + str; -} - - -/** - * Returns an inline diff between 2 strings with coloured ANSI output - * - * @param {Error} Error with actual/expected - * @return {String} Diff - * @api private - */ - -function inlineDiff(err, escape) { - var msg = errorDiff(err, 'WordsWithSpace', escape); - - // linenos - var lines = msg.split('\n'); - if (lines.length > 4) { - var width = String(lines.length).length; - msg = lines.map(function(str, i){ - return pad(++i, width) + ' |' + ' ' + str; - }).join('\n'); - } - - // legend - msg = '\n' - + color('diff removed', 'actual') - + ' ' - + color('diff added', 'expected') - + '\n\n' - + msg - + '\n'; - - // indent - msg = msg.replace(/^/gm, ' '); - return msg; -} - -/** - * Returns a unified diff between 2 strings - * - * @param {Error} Error with actual/expected - * @return {String} Diff - * @api private - */ - -function unifiedDiff(err, escape) { - var indent = ' '; - function cleanUp(line) { - if (escape) { - line = escapeInvisibles(line); - } - if (line[0] === '+') return indent + colorLines('diff added', line); - if (line[0] === '-') return indent + colorLines('diff removed', line); - if (line.match(/\@\@/)) return null; - if (line.match(/\\ No newline/)) return null; - else return indent + line; - } - function notBlank(line) { - return line != null; - } - var msg = diff.createPatch('string', err.actual, err.expected); - var lines = msg.split('\n').splice(4); - return '\n ' - + colorLines('diff added', '+ expected') + ' ' - + colorLines('diff removed', '- actual') - + '\n\n' - + lines.map(cleanUp).filter(notBlank).join('\n'); -} - -/** - * Return a character diff for `err`. - * - * @param {Error} err - * @return {String} - * @api private - */ - -function errorDiff(err, type, escape) { - var actual = escape ? escapeInvisibles(err.actual) : err.actual; - var expected = escape ? escapeInvisibles(err.expected) : err.expected; - return diff['diff' + type](actual, expected).map(function(str){ - if (str.added) return colorLines('diff added', str.value); - if (str.removed) return colorLines('diff removed', str.value); - return str.value; - }).join(''); -} - -/** - * Returns a string with all invisible characters in plain text - * - * @param {String} line - * @return {String} - * @api private - */ -function escapeInvisibles(line) { - return line.replace(/\t/g, '') - .replace(/\r/g, '') - .replace(/\n/g, '\n'); -} - -/** - * Color lines for `str`, using the color `name`. - * - * @param {String} name - * @param {String} str - * @return {String} - * @api private - */ - -function colorLines(name, str) { - return str.split('\n').map(function(str){ - return color(name, str); - }).join('\n'); -} - -/** - * Check that a / b have the same type. - * - * @param {Object} a - * @param {Object} b - * @return {Boolean} - * @api private - */ - -function sameType(a, b) { - a = Object.prototype.toString.call(a); - b = Object.prototype.toString.call(b); - return a == b; -} - -}); // module: reporters/base.js - -require.register("reporters/doc.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils'); - -/** - * Expose `Doc`. - */ - -exports = module.exports = Doc; - -/** - * Initialize a new `Doc` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Doc(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total - , indents = 2; - - function indent() { - return Array(indents).join(' '); - } - - runner.on('suite', function(suite){ - if (suite.root) return; - ++indents; - console.log('%s
', indent()); - ++indents; - console.log('%s

%s

', indent(), utils.escape(suite.title)); - console.log('%s
', indent()); - }); - - runner.on('suite end', function(suite){ - if (suite.root) return; - console.log('%s
', indent()); - --indents; - console.log('%s
', indent()); - --indents; - }); - - runner.on('pass', function(test){ - console.log('%s
%s
', indent(), utils.escape(test.title)); - var code = utils.escape(utils.clean(test.fn.toString())); - console.log('%s
%s
', indent(), code); - }); - - runner.on('fail', function(test, err){ - console.log('%s
%s
', indent(), utils.escape(test.title)); - var code = utils.escape(utils.clean(test.fn.toString())); - console.log('%s
%s
', indent(), code); - console.log('%s
%s
', indent(), utils.escape(err)); - }); -} - -}); // module: reporters/doc.js - -require.register("reporters/dot.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , color = Base.color; - -/** - * Expose `Dot`. - */ - -exports = module.exports = Dot; - -/** - * Initialize a new `Dot` matrix test reporter. - * - * @param {Runner} runner - * @api public - */ - -function Dot(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , width = Base.window.width * .75 | 0 - , n = -1; - - runner.on('start', function(){ - process.stdout.write('\n'); - }); - - runner.on('pending', function(test){ - if (++n % width == 0) process.stdout.write('\n '); - process.stdout.write(color('pending', Base.symbols.dot)); - }); - - runner.on('pass', function(test){ - if (++n % width == 0) process.stdout.write('\n '); - if ('slow' == test.speed) { - process.stdout.write(color('bright yellow', Base.symbols.dot)); - } else { - process.stdout.write(color(test.speed, Base.symbols.dot)); - } - }); - - runner.on('fail', function(test, err){ - if (++n % width == 0) process.stdout.write('\n '); - process.stdout.write(color('fail', Base.symbols.dot)); - }); - - runner.on('end', function(){ - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -Dot.prototype = new F; -Dot.prototype.constructor = Dot; - - -}); // module: reporters/dot.js - -require.register("reporters/html-cov.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var JSONCov = require('./json-cov') - , fs = require('browser/fs'); - -/** - * Expose `HTMLCov`. - */ - -exports = module.exports = HTMLCov; - -/** - * Initialize a new `JsCoverage` reporter. - * - * @param {Runner} runner - * @api public - */ - -function HTMLCov(runner) { - var jade = require('jade') - , file = __dirname + '/templates/coverage.jade' - , str = fs.readFileSync(file, 'utf8') - , fn = jade.compile(str, { filename: file }) - , self = this; - - JSONCov.call(this, runner, false); - - runner.on('end', function(){ - process.stdout.write(fn({ - cov: self.cov - , coverageClass: coverageClass - })); - }); -} - -/** - * Return coverage class for `n`. - * - * @return {String} - * @api private - */ - -function coverageClass(n) { - if (n >= 75) return 'high'; - if (n >= 50) return 'medium'; - if (n >= 25) return 'low'; - return 'terrible'; -} - -}); // module: reporters/html-cov.js - -require.register("reporters/html.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils') - , Progress = require('../browser/progress') - , escape = utils.escape; - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Expose `HTML`. - */ - -exports = module.exports = HTML; - -/** - * Stats template. - */ - -var statsTemplate = '
'; - -/** - * Initialize a new `HTML` reporter. - * - * @param {Runner} runner - * @api public - */ - -function HTML(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total - , stat = fragment(statsTemplate) - , items = stat.getElementsByTagName('li') - , passes = items[1].getElementsByTagName('em')[0] - , passesLink = items[1].getElementsByTagName('a')[0] - , failures = items[2].getElementsByTagName('em')[0] - , failuresLink = items[2].getElementsByTagName('a')[0] - , duration = items[3].getElementsByTagName('em')[0] - , canvas = stat.getElementsByTagName('canvas')[0] - , report = fragment('
    ') - , stack = [report] - , progress - , ctx - , root = document.getElementById('mocha'); - - if (canvas.getContext) { - var ratio = window.devicePixelRatio || 1; - canvas.style.width = canvas.width; - canvas.style.height = canvas.height; - canvas.width *= ratio; - canvas.height *= ratio; - ctx = canvas.getContext('2d'); - ctx.scale(ratio, ratio); - progress = new Progress; - } - - if (!root) return error('#mocha div missing, add it to your document'); - - // pass toggle - on(passesLink, 'click', function(){ - unhide(); - var name = /pass/.test(report.className) ? '' : ' pass'; - report.className = report.className.replace(/fail|pass/g, '') + name; - if (report.className.trim()) hideSuitesWithout('test pass'); - }); - - // failure toggle - on(failuresLink, 'click', function(){ - unhide(); - var name = /fail/.test(report.className) ? '' : ' fail'; - report.className = report.className.replace(/fail|pass/g, '') + name; - if (report.className.trim()) hideSuitesWithout('test fail'); - }); - - root.appendChild(stat); - root.appendChild(report); - - if (progress) progress.size(40); - - runner.on('suite', function(suite){ - if (suite.root) return; - - // suite - var url = self.suiteURL(suite); - var el = fragment('
  • %s

  • ', url, escape(suite.title)); - - // container - stack[0].appendChild(el); - stack.unshift(document.createElement('ul')); - el.appendChild(stack[0]); - }); - - runner.on('suite end', function(suite){ - if (suite.root) return; - stack.shift(); - }); - - runner.on('fail', function(test, err){ - if ('hook' == test.type) runner.emit('test end', test); - }); - - runner.on('test end', function(test){ - // TODO: add to stats - var percent = stats.tests / this.total * 100 | 0; - if (progress) progress.update(percent).draw(ctx); - - // update stats - var ms = new Date - stats.start; - text(passes, stats.passes); - text(failures, stats.failures); - text(duration, (ms / 1000).toFixed(2)); - - // test - if ('passed' == test.state) { - var url = self.testURL(test); - var el = fragment('
  • %e%ems

  • ', test.speed, test.title, test.duration, url); - } else if (test.pending) { - var el = fragment('
  • %e

  • ', test.title); - } else { - var el = fragment('
  • %e

  • ', test.title, self.testURL(test)); - var str = test.err.stack || test.err.toString(); - - // FF / Opera do not add the message - if (!~str.indexOf(test.err.message)) { - str = test.err.message + '\n' + str; - } - - // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we - // check for the result of the stringifying. - if ('[object Error]' == str) str = test.err.message; - - // Safari doesn't give you a stack. Let's at least provide a source line. - if (!test.err.stack && test.err.sourceURL && test.err.line !== undefined) { - str += "\n(" + test.err.sourceURL + ":" + test.err.line + ")"; - } - - el.appendChild(fragment('
    %e
    ', str)); - } - - // toggle code - // TODO: defer - if (!test.pending) { - var h2 = el.getElementsByTagName('h2')[0]; - - on(h2, 'click', function(){ - pre.style.display = 'none' == pre.style.display - ? 'block' - : 'none'; - }); - - var pre = fragment('
    %e
    ', utils.clean(test.fn.toString())); - el.appendChild(pre); - pre.style.display = 'none'; - } - - // Don't call .appendChild if #mocha-report was already .shift()'ed off the stack. - if (stack[0]) stack[0].appendChild(el); - }); -} - -/** - * Makes a URL, preserving querystring ("search") parameters. - * @param {string} s - * @returns {string} your new URL - */ -var makeUrl = function makeUrl(s) { - var search = window.location.search; - - // Remove previous grep query parameter if present - if (search) { - search = search.replace(/[?&]grep=[^&\s]*/g, '').replace(/^&/, '?'); - } - - return window.location.pathname + (search ? search + '&' : '?' ) + 'grep=' + encodeURIComponent(s); -}; - -/** - * Provide suite URL - * - * @param {Object} [suite] - */ -HTML.prototype.suiteURL = function(suite){ - return makeUrl(suite.fullTitle()); -}; - -/** - * Provide test URL - * - * @param {Object} [test] - */ - -HTML.prototype.testURL = function(test){ - return makeUrl(test.fullTitle()); -}; - -/** - * Display error `msg`. - */ - -function error(msg) { - document.body.appendChild(fragment('
    %s
    ', msg)); -} - -/** - * Return a DOM fragment from `html`. - */ - -function fragment(html) { - var args = arguments - , div = document.createElement('div') - , i = 1; - - div.innerHTML = html.replace(/%([se])/g, function(_, type){ - switch (type) { - case 's': return String(args[i++]); - case 'e': return escape(args[i++]); - } - }); - - return div.firstChild; -} - -/** - * Check for suites that do not have elements - * with `classname`, and hide them. - */ - -function hideSuitesWithout(classname) { - var suites = document.getElementsByClassName('suite'); - for (var i = 0; i < suites.length; i++) { - var els = suites[i].getElementsByClassName(classname); - if (0 == els.length) suites[i].className += ' hidden'; - } -} - -/** - * Unhide .hidden suites. - */ - -function unhide() { - var els = document.getElementsByClassName('suite hidden'); - for (var i = 0; i < els.length; ++i) { - els[i].className = els[i].className.replace('suite hidden', 'suite'); - } -} - -/** - * Set `el` text to `str`. - */ - -function text(el, str) { - if (el.textContent) { - el.textContent = str; - } else { - el.innerText = str; - } -} - -/** - * Listen on `event` with callback `fn`. - */ - -function on(el, event, fn) { - if (el.addEventListener) { - el.addEventListener(event, fn, false); - } else { - el.attachEvent('on' + event, fn); - } -} - -}); // module: reporters/html.js - -require.register("reporters/index.js", function(module, exports, require){ -exports.Base = require('./base'); -exports.Dot = require('./dot'); -exports.Doc = require('./doc'); -exports.TAP = require('./tap'); -exports.JSON = require('./json'); -exports.HTML = require('./html'); -exports.List = require('./list'); -exports.Min = require('./min'); -exports.Spec = require('./spec'); -exports.Nyan = require('./nyan'); -exports.XUnit = require('./xunit'); -exports.Markdown = require('./markdown'); -exports.Progress = require('./progress'); -exports.Landing = require('./landing'); -exports.JSONCov = require('./json-cov'); -exports.HTMLCov = require('./html-cov'); -exports.JSONStream = require('./json-stream'); - -}); // module: reporters/index.js - -require.register("reporters/json-cov.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base'); - -/** - * Expose `JSONCov`. - */ - -exports = module.exports = JSONCov; - -/** - * Initialize a new `JsCoverage` reporter. - * - * @param {Runner} runner - * @param {Boolean} output - * @api public - */ - -function JSONCov(runner, output) { - var self = this - , output = 1 == arguments.length ? true : output; - - Base.call(this, runner); - - var tests = [] - , failures = [] - , passes = []; - - runner.on('test end', function(test){ - tests.push(test); - }); - - runner.on('pass', function(test){ - passes.push(test); - }); - - runner.on('fail', function(test){ - failures.push(test); - }); - - runner.on('end', function(){ - var cov = global._$jscoverage || {}; - var result = self.cov = map(cov); - result.stats = self.stats; - result.tests = tests.map(clean); - result.failures = failures.map(clean); - result.passes = passes.map(clean); - if (!output) return; - process.stdout.write(JSON.stringify(result, null, 2 )); - }); -} - -/** - * Map jscoverage data to a JSON structure - * suitable for reporting. - * - * @param {Object} cov - * @return {Object} - * @api private - */ - -function map(cov) { - var ret = { - instrumentation: 'node-jscoverage' - , sloc: 0 - , hits: 0 - , misses: 0 - , coverage: 0 - , files: [] - }; - - for (var filename in cov) { - var data = coverage(filename, cov[filename]); - ret.files.push(data); - ret.hits += data.hits; - ret.misses += data.misses; - ret.sloc += data.sloc; - } - - ret.files.sort(function(a, b) { - return a.filename.localeCompare(b.filename); - }); - - if (ret.sloc > 0) { - ret.coverage = (ret.hits / ret.sloc) * 100; - } - - return ret; -} - -/** - * Map jscoverage data for a single source file - * to a JSON structure suitable for reporting. - * - * @param {String} filename name of the source file - * @param {Object} data jscoverage coverage data - * @return {Object} - * @api private - */ - -function coverage(filename, data) { - var ret = { - filename: filename, - coverage: 0, - hits: 0, - misses: 0, - sloc: 0, - source: {} - }; - - data.source.forEach(function(line, num){ - num++; - - if (data[num] === 0) { - ret.misses++; - ret.sloc++; - } else if (data[num] !== undefined) { - ret.hits++; - ret.sloc++; - } - - ret.source[num] = { - source: line - , coverage: data[num] === undefined - ? '' - : data[num] - }; - }); - - ret.coverage = ret.hits / ret.sloc * 100; - - return ret; -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @param {Object} test - * @return {Object} - * @api private - */ - -function clean(test) { - return { - title: test.title - , fullTitle: test.fullTitle() - , duration: test.duration - } -} - -}); // module: reporters/json-cov.js - -require.register("reporters/json-stream.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , color = Base.color; - -/** - * Expose `List`. - */ - -exports = module.exports = List; - -/** - * Initialize a new `List` test reporter. - * - * @param {Runner} runner - * @api public - */ - -function List(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total; - - runner.on('start', function(){ - console.log(JSON.stringify(['start', { total: total }])); - }); - - runner.on('pass', function(test){ - console.log(JSON.stringify(['pass', clean(test)])); - }); - - runner.on('fail', function(test, err){ - test = clean(test); - test.err = err.message; - console.log(JSON.stringify(['fail', test])); - }); - - runner.on('end', function(){ - process.stdout.write(JSON.stringify(['end', self.stats])); - }); -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @param {Object} test - * @return {Object} - * @api private - */ - -function clean(test) { - return { - title: test.title - , fullTitle: test.fullTitle() - , duration: test.duration - } -} - -}); // module: reporters/json-stream.js - -require.register("reporters/json.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `JSON`. - */ - -exports = module.exports = JSONReporter; - -/** - * Initialize a new `JSON` reporter. - * - * @param {Runner} runner - * @api public - */ - -function JSONReporter(runner) { - var self = this; - Base.call(this, runner); - - var tests = [] - , pending = [] - , failures = [] - , passes = []; - - runner.on('test end', function(test){ - tests.push(test); - }); - - runner.on('pass', function(test){ - passes.push(test); - }); - - runner.on('fail', function(test){ - failures.push(test); - }); - - runner.on('pending', function(test){ - pending.push(test); - }); - - runner.on('end', function(){ - var obj = { - stats: self.stats, - tests: tests.map(clean), - pending: pending.map(clean), - failures: failures.map(clean), - passes: passes.map(clean) - }; - - runner.testResults = obj; - - process.stdout.write(JSON.stringify(obj, null, 2)); - }); -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @param {Object} test - * @return {Object} - * @api private - */ - -function clean(test) { - return { - title: test.title, - fullTitle: test.fullTitle(), - duration: test.duration, - err: errorJSON(test.err || {}) - } -} - -/** - * Transform `error` into a JSON object. - * @param {Error} err - * @return {Object} - */ - -function errorJSON(err) { - var res = {}; - Object.getOwnPropertyNames(err).forEach(function(key) { - res[key] = err[key]; - }, err); - return res; -} - -}); // module: reporters/json.js - -require.register("reporters/landing.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `Landing`. - */ - -exports = module.exports = Landing; - -/** - * Airplane color. - */ - -Base.colors.plane = 0; - -/** - * Airplane crash color. - */ - -Base.colors['plane crash'] = 31; - -/** - * Runway color. - */ - -Base.colors.runway = 90; - -/** - * Initialize a new `Landing` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Landing(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , width = Base.window.width * .75 | 0 - , total = runner.total - , stream = process.stdout - , plane = color('plane', '✈') - , crashed = -1 - , n = 0; - - function runway() { - var buf = Array(width).join('-'); - return ' ' + color('runway', buf); - } - - runner.on('start', function(){ - stream.write('\n\n\n '); - cursor.hide(); - }); - - runner.on('test end', function(test){ - // check if the plane crashed - var col = -1 == crashed - ? width * ++n / total | 0 - : crashed; - - // show the crash - if ('failed' == test.state) { - plane = color('plane crash', '✈'); - crashed = col; - } - - // render landing strip - stream.write('\u001b['+(width+1)+'D\u001b[2A'); - stream.write(runway()); - stream.write('\n '); - stream.write(color('runway', Array(col).join('⋅'))); - stream.write(plane) - stream.write(color('runway', Array(width - col).join('⋅') + '\n')); - stream.write(runway()); - stream.write('\u001b[0m'); - }); - - runner.on('end', function(){ - cursor.show(); - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -Landing.prototype = new F; -Landing.prototype.constructor = Landing; - - -}); // module: reporters/landing.js - -require.register("reporters/list.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `List`. - */ - -exports = module.exports = List; - -/** - * Initialize a new `List` test reporter. - * - * @param {Runner} runner - * @api public - */ - -function List(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , n = 0; - - runner.on('start', function(){ - console.log(); - }); - - runner.on('test', function(test){ - process.stdout.write(color('pass', ' ' + test.fullTitle() + ': ')); - }); - - runner.on('pending', function(test){ - var fmt = color('checkmark', ' -') - + color('pending', ' %s'); - console.log(fmt, test.fullTitle()); - }); - - runner.on('pass', function(test){ - var fmt = color('checkmark', ' '+Base.symbols.dot) - + color('pass', ' %s: ') - + color(test.speed, '%dms'); - cursor.CR(); - console.log(fmt, test.fullTitle(), test.duration); - }); - - runner.on('fail', function(test, err){ - cursor.CR(); - console.log(color('fail', ' %d) %s'), ++n, test.fullTitle()); - }); - - runner.on('end', self.epilogue.bind(self)); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -List.prototype = new F; -List.prototype.constructor = List; - - -}); // module: reporters/list.js - -require.register("reporters/markdown.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils'); - -/** - * Constants - */ - -var SUITE_PREFIX = '$'; - -/** - * Expose `Markdown`. - */ - -exports = module.exports = Markdown; - -/** - * Initialize a new `Markdown` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Markdown(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , level = 0 - , buf = ''; - - function title(str) { - return Array(level).join('#') + ' ' + str; - } - - function indent() { - return Array(level).join(' '); - } - - function mapTOC(suite, obj) { - var ret = obj, - key = SUITE_PREFIX + suite.title; - obj = obj[key] = obj[key] || { suite: suite }; - suite.suites.forEach(function(suite){ - mapTOC(suite, obj); - }); - return ret; - } - - function stringifyTOC(obj, level) { - ++level; - var buf = ''; - var link; - for (var key in obj) { - if ('suite' == key) continue; - if (key !== SUITE_PREFIX) { - link = ' - [' + key.substring(1) + ']'; - link += '(#' + utils.slug(obj[key].suite.fullTitle()) + ')\n'; - buf += Array(level).join(' ') + link; - } - buf += stringifyTOC(obj[key], level); - } - return buf; - } - - function generateTOC(suite) { - var obj = mapTOC(suite, {}); - return stringifyTOC(obj, 0); - } - - generateTOC(runner.suite); - - runner.on('suite', function(suite){ - ++level; - var slug = utils.slug(suite.fullTitle()); - buf += '' + '\n'; - buf += title(suite.title) + '\n'; - }); - - runner.on('suite end', function(suite){ - --level; - }); - - runner.on('pass', function(test){ - var code = utils.clean(test.fn.toString()); - buf += test.title + '.\n'; - buf += '\n```js\n'; - buf += code + '\n'; - buf += '```\n\n'; - }); - - runner.on('end', function(){ - process.stdout.write('# TOC\n'); - process.stdout.write(generateTOC(runner.suite)); - process.stdout.write(buf); - }); -} - -}); // module: reporters/markdown.js - -require.register("reporters/min.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base'); - -/** - * Expose `Min`. - */ - -exports = module.exports = Min; - -/** - * Initialize a new `Min` minimal test reporter (best used with --watch). - * - * @param {Runner} runner - * @api public - */ - -function Min(runner) { - Base.call(this, runner); - - runner.on('start', function(){ - // clear screen - process.stdout.write('\u001b[2J'); - // set cursor position - process.stdout.write('\u001b[1;3H'); - }); - - runner.on('end', this.epilogue.bind(this)); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -Min.prototype = new F; -Min.prototype.constructor = Min; - - -}); // module: reporters/min.js - -require.register("reporters/nyan.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base'); - -/** - * Expose `Dot`. - */ - -exports = module.exports = NyanCat; - -/** - * Initialize a new `Dot` matrix test reporter. - * - * @param {Runner} runner - * @api public - */ - -function NyanCat(runner) { - Base.call(this, runner); - var self = this - , stats = this.stats - , width = Base.window.width * .75 | 0 - , rainbowColors = this.rainbowColors = self.generateColors() - , colorIndex = this.colorIndex = 0 - , numerOfLines = this.numberOfLines = 4 - , trajectories = this.trajectories = [[], [], [], []] - , nyanCatWidth = this.nyanCatWidth = 11 - , trajectoryWidthMax = this.trajectoryWidthMax = (width - nyanCatWidth) - , scoreboardWidth = this.scoreboardWidth = 5 - , tick = this.tick = 0 - , n = 0; - - runner.on('start', function(){ - Base.cursor.hide(); - self.draw(); - }); - - runner.on('pending', function(test){ - self.draw(); - }); - - runner.on('pass', function(test){ - self.draw(); - }); - - runner.on('fail', function(test, err){ - self.draw(); - }); - - runner.on('end', function(){ - Base.cursor.show(); - for (var i = 0; i < self.numberOfLines; i++) write('\n'); - self.epilogue(); - }); -} - -/** - * Draw the nyan cat - * - * @api private - */ - -NyanCat.prototype.draw = function(){ - this.appendRainbow(); - this.drawScoreboard(); - this.drawRainbow(); - this.drawNyanCat(); - this.tick = !this.tick; -}; - -/** - * Draw the "scoreboard" showing the number - * of passes, failures and pending tests. - * - * @api private - */ - -NyanCat.prototype.drawScoreboard = function(){ - var stats = this.stats; - - function draw(type, n) { - write(' '); - write(Base.color(type, n)); - write('\n'); - } - - draw('green', stats.passes); - draw('fail', stats.failures); - draw('pending', stats.pending); - write('\n'); - - this.cursorUp(this.numberOfLines); -}; - -/** - * Append the rainbow. - * - * @api private - */ - -NyanCat.prototype.appendRainbow = function(){ - var segment = this.tick ? '_' : '-'; - var rainbowified = this.rainbowify(segment); - - for (var index = 0; index < this.numberOfLines; index++) { - var trajectory = this.trajectories[index]; - if (trajectory.length >= this.trajectoryWidthMax) trajectory.shift(); - trajectory.push(rainbowified); - } -}; - -/** - * Draw the rainbow. - * - * @api private - */ - -NyanCat.prototype.drawRainbow = function(){ - var self = this; - - this.trajectories.forEach(function(line, index) { - write('\u001b[' + self.scoreboardWidth + 'C'); - write(line.join('')); - write('\n'); - }); - - this.cursorUp(this.numberOfLines); -}; - -/** - * Draw the nyan cat - * - * @api private - */ - -NyanCat.prototype.drawNyanCat = function() { - var self = this; - var startWidth = this.scoreboardWidth + this.trajectories[0].length; - var dist = '\u001b[' + startWidth + 'C'; - var padding = ''; - - write(dist); - write('_,------,'); - write('\n'); - - write(dist); - padding = self.tick ? ' ' : ' '; - write('_|' + padding + '/\\_/\\ '); - write('\n'); - - write(dist); - padding = self.tick ? '_' : '__'; - var tail = self.tick ? '~' : '^'; - var face; - write(tail + '|' + padding + this.face() + ' '); - write('\n'); - - write(dist); - padding = self.tick ? ' ' : ' '; - write(padding + '"" "" '); - write('\n'); - - this.cursorUp(this.numberOfLines); -}; - -/** - * Draw nyan cat face. - * - * @return {String} - * @api private - */ - -NyanCat.prototype.face = function() { - var stats = this.stats; - if (stats.failures) { - return '( x .x)'; - } else if (stats.pending) { - return '( o .o)'; - } else if(stats.passes) { - return '( ^ .^)'; - } else { - return '( - .-)'; - } -}; - -/** - * Move cursor up `n`. - * - * @param {Number} n - * @api private - */ - -NyanCat.prototype.cursorUp = function(n) { - write('\u001b[' + n + 'A'); -}; - -/** - * Move cursor down `n`. - * - * @param {Number} n - * @api private - */ - -NyanCat.prototype.cursorDown = function(n) { - write('\u001b[' + n + 'B'); -}; - -/** - * Generate rainbow colors. - * - * @return {Array} - * @api private - */ - -NyanCat.prototype.generateColors = function(){ - var colors = []; - - for (var i = 0; i < (6 * 7); i++) { - var pi3 = Math.floor(Math.PI / 3); - var n = (i * (1.0 / 6)); - var r = Math.floor(3 * Math.sin(n) + 3); - var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3); - var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3); - colors.push(36 * r + 6 * g + b + 16); - } - - return colors; -}; - -/** - * Apply rainbow to the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -NyanCat.prototype.rainbowify = function(str){ - if (!Base.useColors) - return str; - var color = this.rainbowColors[this.colorIndex % this.rainbowColors.length]; - this.colorIndex += 1; - return '\u001b[38;5;' + color + 'm' + str + '\u001b[0m'; -}; - -/** - * Stdout helper. - */ - -function write(string) { - process.stdout.write(string); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -NyanCat.prototype = new F; -NyanCat.prototype.constructor = NyanCat; - - -}); // module: reporters/nyan.js - -require.register("reporters/progress.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `Progress`. - */ - -exports = module.exports = Progress; - -/** - * General progress bar color. - */ - -Base.colors.progress = 90; - -/** - * Initialize a new `Progress` bar test reporter. - * - * @param {Runner} runner - * @param {Object} options - * @api public - */ - -function Progress(runner, options) { - Base.call(this, runner); - - var self = this - , options = options || {} - , stats = this.stats - , width = Base.window.width * .50 | 0 - , total = runner.total - , complete = 0 - , max = Math.max - , lastN = -1; - - // default chars - options.open = options.open || '['; - options.complete = options.complete || '▬'; - options.incomplete = options.incomplete || Base.symbols.dot; - options.close = options.close || ']'; - options.verbose = false; - - // tests started - runner.on('start', function(){ - console.log(); - cursor.hide(); - }); - - // tests complete - runner.on('test end', function(){ - complete++; - var incomplete = total - complete - , percent = complete / total - , n = width * percent | 0 - , i = width - n; - - if (lastN === n && !options.verbose) { - // Don't re-render the line if it hasn't changed - return; - } - lastN = n; - - cursor.CR(); - process.stdout.write('\u001b[J'); - process.stdout.write(color('progress', ' ' + options.open)); - process.stdout.write(Array(n).join(options.complete)); - process.stdout.write(Array(i).join(options.incomplete)); - process.stdout.write(color('progress', options.close)); - if (options.verbose) { - process.stdout.write(color('progress', ' ' + complete + ' of ' + total)); - } - }); - - // tests are complete, output some stats - // and the failures if any - runner.on('end', function(){ - cursor.show(); - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -Progress.prototype = new F; -Progress.prototype.constructor = Progress; - - -}); // module: reporters/progress.js - -require.register("reporters/spec.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `Spec`. - */ - -exports = module.exports = Spec; - -/** - * Initialize a new `Spec` test reporter. - * - * @param {Runner} runner - * @api public - */ - -function Spec(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , indents = 0 - , n = 0; - - function indent() { - return Array(indents).join(' ') - } - - runner.on('start', function(){ - console.log(); - }); - - runner.on('suite', function(suite){ - ++indents; - console.log(color('suite', '%s%s'), indent(), suite.title); - }); - - runner.on('suite end', function(suite){ - --indents; - if (1 == indents) console.log(); - }); - - runner.on('pending', function(test){ - var fmt = indent() + color('pending', ' - %s'); - console.log(fmt, test.title); - }); - - runner.on('pass', function(test){ - if ('fast' == test.speed) { - var fmt = indent() - + color('checkmark', ' ' + Base.symbols.ok) - + color('pass', ' %s'); - cursor.CR(); - console.log(fmt, test.title); - } else { - var fmt = indent() - + color('checkmark', ' ' + Base.symbols.ok) - + color('pass', ' %s') - + color(test.speed, ' (%dms)'); - cursor.CR(); - console.log(fmt, test.title, test.duration); - } - }); - - runner.on('fail', function(test, err){ - cursor.CR(); - console.log(indent() + color('fail', ' %d) %s'), ++n, test.title); - }); - - runner.on('end', self.epilogue.bind(self)); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -Spec.prototype = new F; -Spec.prototype.constructor = Spec; - - -}); // module: reporters/spec.js - -require.register("reporters/tap.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `TAP`. - */ - -exports = module.exports = TAP; - -/** - * Initialize a new `TAP` reporter. - * - * @param {Runner} runner - * @api public - */ - -function TAP(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , n = 1 - , passes = 0 - , failures = 0; - - runner.on('start', function(){ - var total = runner.grepTotal(runner.suite); - console.log('%d..%d', 1, total); - }); - - runner.on('test end', function(){ - ++n; - }); - - runner.on('pending', function(test){ - console.log('ok %d %s # SKIP -', n, title(test)); - }); - - runner.on('pass', function(test){ - passes++; - console.log('ok %d %s', n, title(test)); - }); - - runner.on('fail', function(test, err){ - failures++; - console.log('not ok %d %s', n, title(test)); - if (err.stack) console.log(err.stack.replace(/^/gm, ' ')); - }); - - runner.on('end', function(){ - console.log('# tests ' + (passes + failures)); - console.log('# pass ' + passes); - console.log('# fail ' + failures); - }); -} - -/** - * Return a TAP-safe title of `test` - * - * @param {Object} test - * @return {String} - * @api private - */ - -function title(test) { - return test.fullTitle().replace(/#/g, ''); -} - -}); // module: reporters/tap.js - -require.register("reporters/xunit.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils') - , fs = require('browser/fs') - , escape = utils.escape; - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Expose `XUnit`. - */ - -exports = module.exports = XUnit; - -/** - * Initialize a new `XUnit` reporter. - * - * @param {Runner} runner - * @api public - */ - -function XUnit(runner, options) { - Base.call(this, runner); - var stats = this.stats - , tests = [] - , self = this; - - if (options.reporterOptions && options.reporterOptions.output) { - if (! fs.createWriteStream) { - throw new Error('file output not supported in browser'); - } - self.fileStream = fs.createWriteStream(options.reporterOptions.output); - } - - runner.on('pending', function(test){ - tests.push(test); - }); - - runner.on('pass', function(test){ - tests.push(test); - }); - - runner.on('fail', function(test){ - tests.push(test); - }); - - runner.on('end', function(){ - self.write(tag('testsuite', { - name: 'Mocha Tests' - , tests: stats.tests - , failures: stats.failures - , errors: stats.failures - , skipped: stats.tests - stats.failures - stats.passes - , timestamp: (new Date).toUTCString() - , time: (stats.duration / 1000) || 0 - }, false)); - - tests.forEach(function(t) { self.test(t); }); - self.write(''); - }); -} - -/** - * Override done to close the stream (if it's a file). - */ -XUnit.prototype.done = function(failures, fn) { - if (this.fileStream) { - this.fileStream.end(function() { - fn(failures); - }); - } else { - fn(failures); - } -}; - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -XUnit.prototype = new F; -XUnit.prototype.constructor = XUnit; - - -/** - * Write out the given line - */ -XUnit.prototype.write = function(line) { - if (this.fileStream) { - this.fileStream.write(line + '\n'); - } else { - console.log(line); - } -}; - -/** - * Output tag for the given `test.` - */ - -XUnit.prototype.test = function(test, ostream) { - var attrs = { - classname: test.parent.fullTitle() - , name: test.title - , time: (test.duration / 1000) || 0 - }; - - if ('failed' == test.state) { - var err = test.err; - this.write(tag('testcase', attrs, false, tag('failure', {}, false, cdata(escape(err.message) + "\n" + err.stack)))); - } else if (test.pending) { - this.write(tag('testcase', attrs, false, tag('skipped', {}, true))); - } else { - this.write(tag('testcase', attrs, true) ); - } -}; - -/** - * HTML tag helper. - */ - -function tag(name, attrs, close, content) { - var end = close ? '/>' : '>' - , pairs = [] - , tag; - - for (var key in attrs) { - pairs.push(key + '="' + escape(attrs[key]) + '"'); - } - - tag = '<' + name + (pairs.length ? ' ' + pairs.join(' ') : '') + end; - if (content) tag += content + ''; -} - -}); // module: reporters/xunit.js - -require.register("runnable.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var EventEmitter = require('browser/events').EventEmitter - , debug = require('browser/debug')('mocha:runnable') - , Pending = require('./pending') - , milliseconds = require('./ms') - , utils = require('./utils'); - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Object#toString(). - */ - -var toString = Object.prototype.toString; - -/** - * Expose `Runnable`. - */ - -module.exports = Runnable; - -/** - * Initialize a new `Runnable` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Runnable(title, fn) { - this.title = title; - this.fn = fn; - this.async = fn && fn.length; - this.sync = ! this.async; - this._timeout = 2000; - this._slow = 75; - this._enableTimeouts = true; - this.timedOut = false; - this._trace = new Error('done() called multiple times') -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -function F(){}; -F.prototype = EventEmitter.prototype; -Runnable.prototype = new F; -Runnable.prototype.constructor = Runnable; - - -/** - * Set & get timeout `ms`. - * - * @param {Number|String} ms - * @return {Runnable|Number} ms or self - * @api private - */ - -Runnable.prototype.timeout = function(ms){ - if (0 == arguments.length) return this._timeout; - if (ms === 0) this._enableTimeouts = false; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._timeout = ms; - if (this.timer) this.resetTimeout(); - return this; -}; - -/** - * Set & get slow `ms`. - * - * @param {Number|String} ms - * @return {Runnable|Number} ms or self - * @api private - */ - -Runnable.prototype.slow = function(ms){ - if (0 === arguments.length) return this._slow; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._slow = ms; - return this; -}; - -/** - * Set and & get timeout `enabled`. - * - * @param {Boolean} enabled - * @return {Runnable|Boolean} enabled or self - * @api private - */ - -Runnable.prototype.enableTimeouts = function(enabled){ - if (arguments.length === 0) return this._enableTimeouts; - debug('enableTimeouts %s', enabled); - this._enableTimeouts = enabled; - return this; -}; - -/** - * Halt and mark as pending. - * - * @api private - */ - -Runnable.prototype.skip = function(){ - throw new Pending(); -}; - -/** - * Return the full title generated by recursively - * concatenating the parent's full title. - * - * @return {String} - * @api public - */ - -Runnable.prototype.fullTitle = function(){ - return this.parent.fullTitle() + ' ' + this.title; -}; - -/** - * Clear the timeout. - * - * @api private - */ - -Runnable.prototype.clearTimeout = function(){ - clearTimeout(this.timer); -}; - -/** - * Inspect the runnable void of private properties. - * - * @return {String} - * @api private - */ - -Runnable.prototype.inspect = function(){ - return JSON.stringify(this, function(key, val){ - if ('_' == key[0]) return; - if ('parent' == key) return '#'; - if ('ctx' == key) return '#'; - return val; - }, 2); -}; - -/** - * Reset the timeout. - * - * @api private - */ - -Runnable.prototype.resetTimeout = function(){ - var self = this; - var ms = this.timeout() || 1e9; - - if (!this._enableTimeouts) return; - this.clearTimeout(); - this.timer = setTimeout(function(){ - if (!self._enableTimeouts) return; - self.callback(new Error('timeout of ' + ms + 'ms exceeded. Ensure the done() callback is being called in this test.')); - self.timedOut = true; - }, ms); -}; - -/** - * Whitelist these globals for this test run - * - * @api private - */ -Runnable.prototype.globals = function(arr){ - var self = this; - this._allowedGlobals = arr; -}; - -/** - * Run the test and invoke `fn(err)`. - * - * @param {Function} fn - * @api private - */ - -Runnable.prototype.run = function(fn){ - var self = this - , start = new Date - , ctx = this.ctx - , finished - , emitted; - - // Some times the ctx exists but it is not runnable - if (ctx && ctx.runnable) ctx.runnable(this); - - // called multiple times - function multiple(err) { - if (emitted) return; - emitted = true; - self.emit('error', err || new Error('done() called multiple times; stacktrace may be inaccurate')); - } - - // finished - function done(err) { - var ms = self.timeout(); - if (self.timedOut) return; - if (finished) return multiple(err || self._trace); - - // Discard the resolution if this test has already failed asynchronously - if (self.state) return; - - self.clearTimeout(); - self.duration = new Date - start; - finished = true; - if (!err && self.duration > ms && self._enableTimeouts) err = new Error('timeout of ' + ms + 'ms exceeded. Ensure the done() callback is being called in this test.'); - fn(err); - } - - // for .resetTimeout() - this.callback = done; - - // explicit async with `done` argument - if (this.async) { - this.resetTimeout(); - - try { - this.fn.call(ctx, function(err){ - if (err instanceof Error || toString.call(err) === "[object Error]") return done(err); - if (null != err) { - if (Object.prototype.toString.call(err) === '[object Object]') { - return done(new Error('done() invoked with non-Error: ' + JSON.stringify(err))); - } else { - return done(new Error('done() invoked with non-Error: ' + err)); - } - } - done(); - }); - } catch (err) { - done(utils.getError(err)); - } - return; - } - - if (this.asyncOnly) { - return done(new Error('--async-only option in use without declaring `done()`')); - } - - // sync or promise-returning - try { - if (this.pending) { - done(); - } else { - callFn(this.fn); - } - } catch (err) { - done(utils.getError(err)); - } - - function callFn(fn) { - var result = fn.call(ctx); - if (result && typeof result.then === 'function') { - self.resetTimeout(); - result - .then(function() { - done() - }, - function(reason) { - done(reason || new Error('Promise rejected with no or falsy reason')) - }); - } else { - done(); - } - } -}; - -}); // module: runnable.js - -require.register("runner.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var EventEmitter = require('browser/events').EventEmitter - , debug = require('browser/debug')('mocha:runner') - , Pending = require('./pending') - , Test = require('./test') - , utils = require('./utils') - , filter = utils.filter - , keys = utils.keys - , type = utils.type - , stringify = utils.stringify - , stackFilter = utils.stackTraceFilter(); - -/** - * Non-enumerable globals. - */ - -var globals = [ - 'setTimeout', - 'clearTimeout', - 'setInterval', - 'clearInterval', - 'XMLHttpRequest', - 'Date', - 'setImmediate', - 'clearImmediate' -]; - -/** - * Expose `Runner`. - */ - -module.exports = Runner; - -/** - * Initialize a `Runner` for the given `suite`. - * - * Events: - * - * - `start` execution started - * - `end` execution complete - * - `suite` (suite) test suite execution started - * - `suite end` (suite) all tests (and sub-suites) have finished - * - `test` (test) test execution started - * - `test end` (test) test completed - * - `hook` (hook) hook execution started - * - `hook end` (hook) hook complete - * - `pass` (test) test passed - * - `fail` (test, err) test failed - * - `pending` (test) test pending - * - * @param {Suite} suite Root suite - * @param {boolean} [delay] Whether or not to delay execution of root suite - * until ready. - * @api public - */ - -function Runner(suite, delay) { - var self = this; - this._globals = []; - this._abort = false; - this._delay = delay; - this.suite = suite; - this.total = suite.total(); - this.failures = 0; - this.on('test end', function(test){ self.checkGlobals(test); }); - this.on('hook end', function(hook){ self.checkGlobals(hook); }); - this.grep(/.*/); - this.globals(this.globalProps().concat(extraGlobals())); -} - -/** - * Wrapper for setImmediate, process.nextTick, or browser polyfill. - * - * @param {Function} fn - * @api private - */ - -Runner.immediately = global.setImmediate || process.nextTick; - -/** - * Inherit from `EventEmitter.prototype`. - */ - -function F(){}; -F.prototype = EventEmitter.prototype; -Runner.prototype = new F; -Runner.prototype.constructor = Runner; - - -/** - * Run tests with full titles matching `re`. Updates runner.total - * with number of tests matched. - * - * @param {RegExp} re - * @param {Boolean} invert - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.grep = function(re, invert){ - debug('grep %s', re); - this._grep = re; - this._invert = invert; - this.total = this.grepTotal(this.suite); - return this; -}; - -/** - * Returns the number of tests matching the grep search for the - * given suite. - * - * @param {Suite} suite - * @return {Number} - * @api public - */ - -Runner.prototype.grepTotal = function(suite) { - var self = this; - var total = 0; - - suite.eachTest(function(test){ - var match = self._grep.test(test.fullTitle()); - if (self._invert) match = !match; - if (match) total++; - }); - - return total; -}; - -/** - * Return a list of global properties. - * - * @return {Array} - * @api private - */ - -Runner.prototype.globalProps = function() { - var props = utils.keys(global); - - // non-enumerables - for (var i = 0; i < globals.length; ++i) { - if (~utils.indexOf(props, globals[i])) continue; - props.push(globals[i]); - } - - return props; -}; - -/** - * Allow the given `arr` of globals. - * - * @param {Array} arr - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.globals = function(arr){ - if (0 == arguments.length) return this._globals; - debug('globals %j', arr); - this._globals = this._globals.concat(arr); - return this; -}; - -/** - * Check for global variable leaks. - * - * @api private - */ - -Runner.prototype.checkGlobals = function(test){ - if (this.ignoreLeaks) return; - var ok = this._globals; - - var globals = this.globalProps(); - var leaks; - - if (test) { - ok = ok.concat(test._allowedGlobals || []); - } - - if(this.prevGlobalsLength == globals.length) return; - this.prevGlobalsLength = globals.length; - - leaks = filterLeaks(ok, globals); - this._globals = this._globals.concat(leaks); - - if (leaks.length > 1) { - this.fail(test, new Error('global leaks detected: ' + leaks.join(', ') + '')); - } else if (leaks.length) { - this.fail(test, new Error('global leak detected: ' + leaks[0])); - } -}; - -/** - * Fail the given `test`. - * - * @param {Test} test - * @param {Error} err - * @api private - */ - -Runner.prototype.fail = function(test, err) { - ++this.failures; - test.state = 'failed'; - - if (!(err instanceof Error)) { - err = new Error('the ' + type(err) + ' ' + stringify(err) + ' was thrown, throw an Error :)'); - } - - err.stack = (this.fullStackTrace || !err.stack) - ? err.stack - : stackFilter(err.stack); - - this.emit('fail', test, err); -}; - -/** - * Fail the given `hook` with `err`. - * - * Hook failures work in the following pattern: - * - If bail, then exit - * - Failed `before` hook skips all tests in a suite and subsuites, - * but jumps to corresponding `after` hook - * - Failed `before each` hook skips remaining tests in a - * suite and jumps to corresponding `after each` hook, - * which is run only once - * - Failed `after` hook does not alter - * execution order - * - Failed `after each` hook skips remaining tests in a - * suite and subsuites, but executes other `after each` - * hooks - * - * @param {Hook} hook - * @param {Error} err - * @api private - */ - -Runner.prototype.failHook = function(hook, err){ - this.fail(hook, err); - if (this.suite.bail()) { - this.emit('end'); - } -}; - -/** - * Run hook `name` callbacks and then invoke `fn()`. - * - * @param {String} name - * @param {Function} function - * @api private - */ - -Runner.prototype.hook = function(name, fn){ - var suite = this.suite - , hooks = suite['_' + name] - , self = this - , timer; - - function next(i) { - var hook = hooks[i]; - if (!hook) return fn(); - self.currentRunnable = hook; - - hook.ctx.currentTest = self.test; - - self.emit('hook', hook); - - hook.on('error', function(err){ - self.failHook(hook, err); - }); - - hook.run(function(err){ - hook.removeAllListeners('error'); - var testError = hook.error(); - if (testError) self.fail(self.test, testError); - if (err) { - if (err instanceof Pending) { - suite.pending = true; - } else { - self.failHook(hook, err); - - // stop executing hooks, notify callee of hook err - return fn(err); - } - } - self.emit('hook end', hook); - delete hook.ctx.currentTest; - next(++i); - }); - } - - Runner.immediately(function(){ - next(0); - }); -}; - -/** - * Run hook `name` for the given array of `suites` - * in order, and callback `fn(err, errSuite)`. - * - * @param {String} name - * @param {Array} suites - * @param {Function} fn - * @api private - */ - -Runner.prototype.hooks = function(name, suites, fn){ - var self = this - , orig = this.suite; - - function next(suite) { - self.suite = suite; - - if (!suite) { - self.suite = orig; - return fn(); - } - - self.hook(name, function(err){ - if (err) { - var errSuite = self.suite; - self.suite = orig; - return fn(err, errSuite); - } - - next(suites.pop()); - }); - } - - next(suites.pop()); -}; - -/** - * Run hooks from the top level down. - * - * @param {String} name - * @param {Function} fn - * @api private - */ - -Runner.prototype.hookUp = function(name, fn){ - var suites = [this.suite].concat(this.parents()).reverse(); - this.hooks(name, suites, fn); -}; - -/** - * Run hooks from the bottom up. - * - * @param {String} name - * @param {Function} fn - * @api private - */ - -Runner.prototype.hookDown = function(name, fn){ - var suites = [this.suite].concat(this.parents()); - this.hooks(name, suites, fn); -}; - -/** - * Return an array of parent Suites from - * closest to furthest. - * - * @return {Array} - * @api private - */ - -Runner.prototype.parents = function(){ - var suite = this.suite - , suites = []; - while (suite = suite.parent) suites.push(suite); - return suites; -}; - -/** - * Run the current test and callback `fn(err)`. - * - * @param {Function} fn - * @api private - */ - -Runner.prototype.runTest = function(fn){ - var test = this.test - , self = this; - - if (this.asyncOnly) test.asyncOnly = true; - - try { - test.on('error', function(err){ - self.fail(test, err); - }); - test.run(fn); - } catch (err) { - fn(err); - } -}; - -/** - * Run tests in the given `suite` and invoke - * the callback `fn()` when complete. - * - * @param {Suite} suite - * @param {Function} fn - * @api private - */ - -Runner.prototype.runTests = function(suite, fn){ - var self = this - , tests = suite.tests.slice() - , test; - - - function hookErr(err, errSuite, after) { - // before/after Each hook for errSuite failed: - var orig = self.suite; - - // for failed 'after each' hook start from errSuite parent, - // otherwise start from errSuite itself - self.suite = after ? errSuite.parent : errSuite; - - if (self.suite) { - // call hookUp afterEach - self.hookUp('afterEach', function(err2, errSuite2) { - self.suite = orig; - // some hooks may fail even now - if (err2) return hookErr(err2, errSuite2, true); - // report error suite - fn(errSuite); - }); - } else { - // there is no need calling other 'after each' hooks - self.suite = orig; - fn(errSuite); - } - } - - function next(err, errSuite) { - // if we bail after first err - if (self.failures && suite._bail) return fn(); - - if (self._abort) return fn(); - - if (err) return hookErr(err, errSuite, true); - - // next test - test = tests.shift(); - - // all done - if (!test) return fn(); - - // grep - var match = self._grep.test(test.fullTitle()); - if (self._invert) match = !match; - if (!match) return next(); - - // pending - if (test.pending) { - self.emit('pending', test); - self.emit('test end', test); - return next(); - } - - // execute test and hook(s) - self.emit('test', self.test = test); - self.hookDown('beforeEach', function(err, errSuite){ - - if (suite.pending) { - self.emit('pending', test); - self.emit('test end', test); - return next(); - } - if (err) return hookErr(err, errSuite, false); - - self.currentRunnable = self.test; - self.runTest(function(err){ - test = self.test; - - if (err) { - if (err instanceof Pending) { - self.emit('pending', test); - } else { - self.fail(test, err); - } - self.emit('test end', test); - - if (err instanceof Pending) { - return next(); - } - - return self.hookUp('afterEach', next); - } - - test.state = 'passed'; - self.emit('pass', test); - self.emit('test end', test); - self.hookUp('afterEach', next); - }); - }); - } - - this.next = next; - next(); -}; - -/** - * Run the given `suite` and invoke the - * callback `fn()` when complete. - * - * @param {Suite} suite - * @param {Function} fn - * @api private - */ - -Runner.prototype.runSuite = function(suite, fn){ - var total = this.grepTotal(suite) - , self = this - , i = 0; - - debug('run suite %s', suite.fullTitle()); - - if (!total) return fn(); - - this.emit('suite', this.suite = suite); - - function next(errSuite) { - if (errSuite) { - // current suite failed on a hook from errSuite - if (errSuite == suite) { - // if errSuite is current suite - // continue to the next sibling suite - return done(); - } else { - // errSuite is among the parents of current suite - // stop execution of errSuite and all sub-suites - return done(errSuite); - } - } - - if (self._abort) return done(); - - var curr = suite.suites[i++]; - if (!curr) return done(); - self.runSuite(curr, next); - } - - function done(errSuite) { - self.suite = suite; - self.hook('afterAll', function(){ - self.emit('suite end', suite); - fn(errSuite); - }); - } - - this.hook('beforeAll', function(err){ - if (err) return done(); - self.runTests(suite, next); - }); -}; - -/** - * Handle uncaught exceptions. - * - * @param {Error} err - * @api private - */ - -Runner.prototype.uncaught = function(err){ - if (err) { - debug('uncaught exception %s', err !== function () { - return this; - }.call(err) ? err : ( err.message || err )); - } else { - debug('uncaught undefined exception'); - err = utils.undefinedError(); - } - err.uncaught = true; - - var runnable = this.currentRunnable; - if (!runnable) return; - - runnable.clearTimeout(); - - // Ignore errors if complete - if (runnable.state) return; - this.fail(runnable, err); - - // recover from test - if ('test' == runnable.type) { - this.emit('test end', runnable); - this.hookUp('afterEach', this.next); - return; - } - - // bail on hooks - this.emit('end'); -}; - -/** - * Run the root suite and invoke `fn(failures)` - * on completion. - * - * @param {Function} fn - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.run = function(fn){ - var self = this, - rootSuite = this.suite; - - fn = fn || function(){}; - - function uncaught(err){ - self.uncaught(err); - } - - function start() { - self.emit('start'); - self.runSuite(rootSuite, function(){ - debug('finished running'); - self.emit('end'); - }); - } - - debug('start'); - - // callback - this.on('end', function(){ - debug('end'); - process.removeListener('uncaughtException', uncaught); - fn(self.failures); - }); - - // uncaught exception - process.on('uncaughtException', uncaught); - - if (this._delay) { - // for reporters, I guess. - // might be nice to debounce some dots while we wait. - this.emit('waiting', rootSuite); - rootSuite.once('run', start); - } - else { - start(); - } - - return this; -}; - -/** - * Cleanly abort execution - * - * @return {Runner} for chaining - * @api public - */ -Runner.prototype.abort = function(){ - debug('aborting'); - this._abort = true; -}; - -/** - * Filter leaks with the given globals flagged as `ok`. - * - * @param {Array} ok - * @param {Array} globals - * @return {Array} - * @api private - */ - -function filterLeaks(ok, globals) { - return filter(globals, function(key){ - // Firefox and Chrome exposes iframes as index inside the window object - if (/^d+/.test(key)) return false; - - // in firefox - // if runner runs in an iframe, this iframe's window.getInterface method not init at first - // it is assigned in some seconds - if (global.navigator && /^getInterface/.test(key)) return false; - - // an iframe could be approached by window[iframeIndex] - // in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak - if (global.navigator && /^\d+/.test(key)) return false; - - // Opera and IE expose global variables for HTML element IDs (issue #243) - if (/^mocha-/.test(key)) return false; - - var matched = filter(ok, function(ok){ - if (~ok.indexOf('*')) return 0 == key.indexOf(ok.split('*')[0]); - return key == ok; - }); - return matched.length == 0 && (!global.navigator || 'onerror' !== key); - }); -} - -/** - * Array of globals dependent on the environment. - * - * @return {Array} - * @api private - */ - -function extraGlobals() { - if (typeof(process) === 'object' && - typeof(process.version) === 'string') { - - var nodeVersion = process.version.split('.').reduce(function(a, v) { - return a << 8 | v; - }); - - // 'errno' was renamed to process._errno in v0.9.11. - - if (nodeVersion < 0x00090B) { - return ['errno']; - } - } - - return []; -} - -}); // module: runner.js - -require.register("suite.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var EventEmitter = require('browser/events').EventEmitter - , debug = require('browser/debug')('mocha:suite') - , milliseconds = require('./ms') - , utils = require('./utils') - , Hook = require('./hook'); - -/** - * Expose `Suite`. - */ - -exports = module.exports = Suite; - -/** - * Create a new `Suite` with the given `title` - * and parent `Suite`. When a suite with the - * same title is already present, that suite - * is returned to provide nicer reporter - * and more flexible meta-testing. - * - * @param {Suite} parent - * @param {String} title - * @return {Suite} - * @api public - */ - -exports.create = function(parent, title){ - var suite = new Suite(title, parent.ctx); - suite.parent = parent; - if (parent.pending) suite.pending = true; - title = suite.fullTitle(); - parent.addSuite(suite); - return suite; -}; - -/** - * Initialize a new `Suite` with the given - * `title` and `ctx`. - * - * @param {String} title - * @param {Context} ctx - * @api private - */ - -function Suite(title, parentContext) { - this.title = title; - var context = function() {}; - context.prototype = parentContext; - this.ctx = new context(); - this.suites = []; - this.tests = []; - this.pending = false; - this._beforeEach = []; - this._beforeAll = []; - this._afterEach = []; - this._afterAll = []; - this.root = !title; - this._timeout = 2000; - this._enableTimeouts = true; - this._slow = 75; - this._bail = false; - this.delayed = false; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -function F(){}; -F.prototype = EventEmitter.prototype; -Suite.prototype = new F; -Suite.prototype.constructor = Suite; - - -/** - * Return a clone of this `Suite`. - * - * @return {Suite} - * @api private - */ - -Suite.prototype.clone = function(){ - var suite = new Suite(this.title); - debug('clone'); - suite.ctx = this.ctx; - suite.timeout(this.timeout()); - suite.enableTimeouts(this.enableTimeouts()); - suite.slow(this.slow()); - suite.bail(this.bail()); - return suite; -}; - -/** - * Set timeout `ms` or short-hand such as "2s". - * - * @param {Number|String} ms - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.timeout = function(ms){ - if (0 == arguments.length) return this._timeout; - if (ms.toString() === '0') this._enableTimeouts = false; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._timeout = parseInt(ms, 10); - return this; -}; - -/** - * Set timeout `enabled`. - * - * @param {Boolean} enabled - * @return {Suite|Boolean} self or enabled - * @api private - */ - -Suite.prototype.enableTimeouts = function(enabled){ - if (arguments.length === 0) return this._enableTimeouts; - debug('enableTimeouts %s', enabled); - this._enableTimeouts = enabled; - return this; -}; - -/** - * Set slow `ms` or short-hand such as "2s". - * - * @param {Number|String} ms - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.slow = function(ms){ - if (0 === arguments.length) return this._slow; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('slow %d', ms); - this._slow = ms; - return this; -}; - -/** - * Sets whether to bail after first error. - * - * @param {Boolean} bail - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.bail = function(bail){ - if (0 == arguments.length) return this._bail; - debug('bail %s', bail); - this._bail = bail; - return this; -}; - -/** - * Run `fn(test[, done])` before running tests. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.beforeAll = function(title, fn){ - if (this.pending) return this; - if ('function' === typeof title) { - fn = title; - title = fn.name; - } - title = '"before all" hook' + (title ? ': ' + title : ''); - - var hook = new Hook(title, fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.enableTimeouts(this.enableTimeouts()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._beforeAll.push(hook); - this.emit('beforeAll', hook); - return this; -}; - -/** - * Run `fn(test[, done])` after running tests. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.afterAll = function(title, fn){ - if (this.pending) return this; - if ('function' === typeof title) { - fn = title; - title = fn.name; - } - title = '"after all" hook' + (title ? ': ' + title : ''); - - var hook = new Hook(title, fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.enableTimeouts(this.enableTimeouts()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._afterAll.push(hook); - this.emit('afterAll', hook); - return this; -}; - -/** - * Run `fn(test[, done])` before each test case. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.beforeEach = function(title, fn){ - if (this.pending) return this; - if ('function' === typeof title) { - fn = title; - title = fn.name; - } - title = '"before each" hook' + (title ? ': ' + title : ''); - - var hook = new Hook(title, fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.enableTimeouts(this.enableTimeouts()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._beforeEach.push(hook); - this.emit('beforeEach', hook); - return this; -}; - -/** - * Run `fn(test[, done])` after each test case. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.afterEach = function(title, fn){ - if (this.pending) return this; - if ('function' === typeof title) { - fn = title; - title = fn.name; - } - title = '"after each" hook' + (title ? ': ' + title : ''); - - var hook = new Hook(title, fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.enableTimeouts(this.enableTimeouts()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._afterEach.push(hook); - this.emit('afterEach', hook); - return this; -}; - -/** - * Add a test `suite`. - * - * @param {Suite} suite - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.addSuite = function(suite){ - suite.parent = this; - suite.timeout(this.timeout()); - suite.enableTimeouts(this.enableTimeouts()); - suite.slow(this.slow()); - suite.bail(this.bail()); - this.suites.push(suite); - this.emit('suite', suite); - return this; -}; - -/** - * Add a `test` to this suite. - * - * @param {Test} test - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.addTest = function(test){ - test.parent = this; - test.timeout(this.timeout()); - test.enableTimeouts(this.enableTimeouts()); - test.slow(this.slow()); - test.ctx = this.ctx; - this.tests.push(test); - this.emit('test', test); - return this; -}; - -/** - * Return the full title generated by recursively - * concatenating the parent's full title. - * - * @return {String} - * @api public - */ - -Suite.prototype.fullTitle = function(){ - if (this.parent) { - var full = this.parent.fullTitle(); - if (full) return full + ' ' + this.title; - } - return this.title; -}; - -/** - * Return the total number of tests. - * - * @return {Number} - * @api public - */ - -Suite.prototype.total = function(){ - return utils.reduce(this.suites, function(sum, suite){ - return sum + suite.total(); - }, 0) + this.tests.length; -}; - -/** - * Iterates through each suite recursively to find - * all tests. Applies a function in the format - * `fn(test)`. - * - * @param {Function} fn - * @return {Suite} - * @api private - */ - -Suite.prototype.eachTest = function(fn){ - utils.forEach(this.tests, fn); - utils.forEach(this.suites, function(suite){ - suite.eachTest(fn); - }); - return this; -}; - -/** - * This will run the root suite if we happen to be running in delayed mode. - */ -Suite.prototype.run = function run() { - if (this.root) { - this.emit('run'); - } -}; - -}); // module: suite.js - -require.register("test.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Runnable = require('./runnable'); - -/** - * Expose `Test`. - */ - -module.exports = Test; - -/** - * Initialize a new `Test` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Test(title, fn) { - Runnable.call(this, title, fn); - this.pending = !fn; - this.type = 'test'; -} - -/** - * Inherit from `Runnable.prototype`. - */ - -function F(){}; -F.prototype = Runnable.prototype; -Test.prototype = new F; -Test.prototype.constructor = Test; - - -}); // module: test.js - -require.register("utils.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var fs = require('browser/fs') - , path = require('browser/path') - , basename = path.basename - , exists = fs.existsSync || path.existsSync - , glob = require('browser/glob') - , join = path.join - , debug = require('browser/debug')('mocha:watch'); - -/** - * Ignored directories. - */ - -var ignore = ['node_modules', '.git']; - -/** - * Escape special characters in the given string of html. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function(html){ - return String(html) - .replace(/&/g, '&') - .replace(/"/g, '"') - .replace(//g, '>'); -}; - -/** - * Array#forEach (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} scope - * @api private - */ - -exports.forEach = function(arr, fn, scope){ - for (var i = 0, l = arr.length; i < l; i++) - fn.call(scope, arr[i], i); -}; - -/** - * Array#map (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} scope - * @api private - */ - -exports.map = function(arr, fn, scope){ - var result = []; - for (var i = 0, l = arr.length; i < l; i++) - result.push(fn.call(scope, arr[i], i, arr)); - return result; -}; - -/** - * Array#indexOf (<=IE8) - * - * @parma {Array} arr - * @param {Object} obj to find index of - * @param {Number} start - * @api private - */ - -exports.indexOf = function(arr, obj, start){ - for (var i = start || 0, l = arr.length; i < l; i++) { - if (arr[i] === obj) - return i; - } - return -1; -}; - -/** - * Array#reduce (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} initial value - * @api private - */ - -exports.reduce = function(arr, fn, val){ - var rval = val; - - for (var i = 0, l = arr.length; i < l; i++) { - rval = fn(rval, arr[i], i, arr); - } - - return rval; -}; - -/** - * Array#filter (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @api private - */ - -exports.filter = function(arr, fn){ - var ret = []; - - for (var i = 0, l = arr.length; i < l; i++) { - var val = arr[i]; - if (fn(val, i, arr)) ret.push(val); - } - - return ret; -}; - -/** - * Object.keys (<=IE8) - * - * @param {Object} obj - * @return {Array} keys - * @api private - */ - -exports.keys = Object.keys || function(obj) { - var keys = [] - , has = Object.prototype.hasOwnProperty; // for `window` on <=IE8 - - for (var key in obj) { - if (has.call(obj, key)) { - keys.push(key); - } - } - - return keys; -}; - -/** - * Watch the given `files` for changes - * and invoke `fn(file)` on modification. - * - * @param {Array} files - * @param {Function} fn - * @api private - */ - -exports.watch = function(files, fn){ - var options = { interval: 100 }; - files.forEach(function(file){ - debug('file %s', file); - fs.watchFile(file, options, function(curr, prev){ - if (prev.mtime < curr.mtime) fn(file); - }); - }); -}; - -/** - * Array.isArray (<=IE8) - * - * @param {Object} obj - * @return {Boolean} - * @api private - */ -var isArray = Array.isArray || function (obj) { - return '[object Array]' == {}.toString.call(obj); -}; - -/** - * @description - * Buffer.prototype.toJSON polyfill - * @type {Function} - */ -if(typeof Buffer !== 'undefined' && Buffer.prototype) { - Buffer.prototype.toJSON = Buffer.prototype.toJSON || function () { - return Array.prototype.slice.call(this, 0); - }; -} - -/** - * Ignored files. - */ - -function ignored(path){ - return !~ignore.indexOf(path); -} - -/** - * Lookup files in the given `dir`. - * - * @return {Array} - * @api private - */ - -exports.files = function(dir, ext, ret){ - ret = ret || []; - ext = ext || ['js']; - - var re = new RegExp('\\.(' + ext.join('|') + ')$'); - - fs.readdirSync(dir) - .filter(ignored) - .forEach(function(path){ - path = join(dir, path); - if (fs.statSync(path).isDirectory()) { - exports.files(path, ext, ret); - } else if (path.match(re)) { - ret.push(path); - } - }); - - return ret; -}; - -/** - * Compute a slug from the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.slug = function(str){ - return str - .toLowerCase() - .replace(/ +/g, '-') - .replace(/[^-\w]/g, ''); -}; - -/** - * Strip the function definition from `str`, - * and re-indent for pre whitespace. - */ - -exports.clean = function(str) { - str = str - .replace(/\r\n?|[\n\u2028\u2029]/g, "\n").replace(/^\uFEFF/, '') - .replace(/^function *\(.*\)\s*{|\(.*\) *=> *{?/, '') - .replace(/\s+\}$/, ''); - - var spaces = str.match(/^\n?( *)/)[1].length - , tabs = str.match(/^\n?(\t*)/)[1].length - , re = new RegExp('^\n?' + (tabs ? '\t' : ' ') + '{' + (tabs ? tabs : spaces) + '}', 'gm'); - - str = str.replace(re, ''); - - return exports.trim(str); -}; - -/** - * Trim the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.trim = function(str){ - return str.replace(/^\s+|\s+$/g, ''); -}; - -/** - * Parse the given `qs`. - * - * @param {String} qs - * @return {Object} - * @api private - */ - -exports.parseQuery = function(qs){ - return exports.reduce(qs.replace('?', '').split('&'), function(obj, pair){ - var i = pair.indexOf('=') - , key = pair.slice(0, i) - , val = pair.slice(++i); - - obj[key] = decodeURIComponent(val); - return obj; - }, {}); -}; - -/** - * Highlight the given string of `js`. - * - * @param {String} js - * @return {String} - * @api private - */ - -function highlight(js) { - return js - .replace(//g, '>') - .replace(/\/\/(.*)/gm, '//$1') - .replace(/('.*?')/gm, '$1') - .replace(/(\d+\.\d+)/gm, '$1') - .replace(/(\d+)/gm, '$1') - .replace(/\bnew[ \t]+(\w+)/gm, 'new $1') - .replace(/\b(function|new|throw|return|var|if|else)\b/gm, '$1') -} - -/** - * Highlight the contents of tag `name`. - * - * @param {String} name - * @api private - */ - -exports.highlightTags = function(name) { - var code = document.getElementById('mocha').getElementsByTagName(name); - for (var i = 0, len = code.length; i < len; ++i) { - code[i].innerHTML = highlight(code[i].innerHTML); - } -}; - -/** - * If a value could have properties, and has none, this function is called, which returns - * a string representation of the empty value. - * - * Functions w/ no properties return `'[Function]'` - * Arrays w/ length === 0 return `'[]'` - * Objects w/ no properties return `'{}'` - * All else: return result of `value.toString()` - * - * @param {*} value Value to inspect - * @param {string} [type] The type of the value, if known. - * @returns {string} - */ -var emptyRepresentation = function emptyRepresentation(value, type) { - type = type || exports.type(value); - - switch(type) { - case 'function': - return '[Function]'; - case 'object': - return '{}'; - case 'array': - return '[]'; - default: - return value.toString(); - } -}; - -/** - * Takes some variable and asks `{}.toString()` what it thinks it is. - * @param {*} value Anything - * @example - * type({}) // 'object' - * type([]) // 'array' - * type(1) // 'number' - * type(false) // 'boolean' - * type(Infinity) // 'number' - * type(null) // 'null' - * type(new Date()) // 'date' - * type(/foo/) // 'regexp' - * type('type') // 'string' - * type(global) // 'global' - * @api private - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString - * @returns {string} - */ -exports.type = function type(value) { - if (typeof Buffer !== 'undefined' && Buffer.isBuffer(value)) { - return 'buffer'; - } - return Object.prototype.toString.call(value) - .replace(/^\[.+\s(.+?)\]$/, '$1') - .toLowerCase(); -}; - -/** - * @summary Stringify `value`. - * @description Different behavior depending on type of value. - * - If `value` is undefined or null, return `'[undefined]'` or `'[null]'`, respectively. - * - If `value` is not an object, function or array, return result of `value.toString()` wrapped in double-quotes. - * - If `value` is an *empty* object, function, or array, return result of function - * {@link emptyRepresentation}. - * - If `value` has properties, call {@link exports.canonicalize} on it, then return result of - * JSON.stringify(). - * - * @see exports.type - * @param {*} value - * @return {string} - * @api private - */ - -exports.stringify = function(value) { - var type = exports.type(value); - - if (!~exports.indexOf(['object', 'array', 'function'], type)) { - if(type != 'buffer') { - return jsonStringify(value); - } - var json = value.toJSON(); - // Based on the toJSON result - return jsonStringify(json.data && json.type ? json.data : json, 2) - .replace(/,(\n|$)/g, '$1'); - } - - for (var prop in value) { - if (Object.prototype.hasOwnProperty.call(value, prop)) { - return jsonStringify(exports.canonicalize(value), 2).replace(/,(\n|$)/g, '$1'); - } - } - - return emptyRepresentation(value, type); -}; - -/** - * @description - * like JSON.stringify but more sense. - * @param {Object} object - * @param {Number=} spaces - * @param {number=} depth - * @returns {*} - * @private - */ -function jsonStringify(object, spaces, depth) { - if(typeof spaces == 'undefined') return _stringify(object); // primitive types - - depth = depth || 1; - var space = spaces * depth - , str = isArray(object) ? '[' : '{' - , end = isArray(object) ? ']' : '}' - , length = object.length || exports.keys(object).length - , repeat = function(s, n) { return new Array(n).join(s); }; // `.repeat()` polyfill - - function _stringify(val) { - switch (exports.type(val)) { - case 'null': - case 'undefined': - val = '[' + val + ']'; - break; - case 'array': - case 'object': - val = jsonStringify(val, spaces, depth + 1); - break; - case 'boolean': - case 'regexp': - case 'number': - val = val === 0 && (1/val) === -Infinity // `-0` - ? '-0' - : val.toString(); - break; - case 'date': - val = '[Date: ' + val.toISOString() + ']'; - break; - case 'buffer': - var json = val.toJSON(); - // Based on the toJSON result - json = json.data && json.type ? json.data : json; - val = '[Buffer: ' + jsonStringify(json, 2, depth + 1) + ']'; - break; - default: - val = (val == '[Function]' || val == '[Circular]') - ? val - : '"' + val + '"'; //string - } - return val; - } - - for(var i in object) { - if(!object.hasOwnProperty(i)) continue; // not my business - --length; - str += '\n ' + repeat(' ', space) - + (isArray(object) ? '' : '"' + i + '": ') // key - + _stringify(object[i]) // value - + (length ? ',' : ''); // comma - } - - return str + (str.length != 1 // [], {} - ? '\n' + repeat(' ', --space) + end - : end); -} - -/** - * Return if obj is a Buffer - * @param {Object} arg - * @return {Boolean} - * @api private - */ -exports.isBuffer = function (arg) { - return typeof Buffer !== 'undefined' && Buffer.isBuffer(arg); -}; - -/** - * @summary Return a new Thing that has the keys in sorted order. Recursive. - * @description If the Thing... - * - has already been seen, return string `'[Circular]'` - * - is `undefined`, return string `'[undefined]'` - * - is `null`, return value `null` - * - is some other primitive, return the value - * - is not a primitive or an `Array`, `Object`, or `Function`, return the value of the Thing's `toString()` method - * - is a non-empty `Array`, `Object`, or `Function`, return the result of calling this function again. - * - is an empty `Array`, `Object`, or `Function`, return the result of calling `emptyRepresentation()` - * - * @param {*} value Thing to inspect. May or may not have properties. - * @param {Array} [stack=[]] Stack of seen values - * @return {(Object|Array|Function|string|undefined)} - * @see {@link exports.stringify} - * @api private - */ - -exports.canonicalize = function(value, stack) { - var canonicalizedObj, - type = exports.type(value), - prop, - withStack = function withStack(value, fn) { - stack.push(value); - fn(); - stack.pop(); - }; - - stack = stack || []; - - if (exports.indexOf(stack, value) !== -1) { - return '[Circular]'; - } - - switch(type) { - case 'undefined': - case 'buffer': - case 'null': - canonicalizedObj = value; - break; - case 'array': - withStack(value, function () { - canonicalizedObj = exports.map(value, function (item) { - return exports.canonicalize(item, stack); - }); - }); - break; - case 'function': - for (prop in value) { - canonicalizedObj = {}; - break; - } - if (!canonicalizedObj) { - canonicalizedObj = emptyRepresentation(value, type); - break; - } - /* falls through */ - case 'object': - canonicalizedObj = canonicalizedObj || {}; - withStack(value, function () { - exports.forEach(exports.keys(value).sort(), function (key) { - canonicalizedObj[key] = exports.canonicalize(value[key], stack); - }); - }); - break; - case 'date': - case 'number': - case 'regexp': - case 'boolean': - canonicalizedObj = value; - break; - default: - canonicalizedObj = value.toString(); - } - - return canonicalizedObj; -}; - -/** - * Lookup file names at the given `path`. - */ -exports.lookupFiles = function lookupFiles(path, extensions, recursive) { - var files = []; - var re = new RegExp('\\.(' + extensions.join('|') + ')$'); - - if (!exists(path)) { - if (exists(path + '.js')) { - path += '.js'; - } else { - files = glob.sync(path); - if (!files.length) throw new Error("cannot resolve path (or pattern) '" + path + "'"); - return files; - } - } - - try { - var stat = fs.statSync(path); - if (stat.isFile()) return path; - } - catch (ignored) { - return; - } - - fs.readdirSync(path).forEach(function(file) { - file = join(path, file); - try { - var stat = fs.statSync(file); - if (stat.isDirectory()) { - if (recursive) { - files = files.concat(lookupFiles(file, extensions, recursive)); - } - return; - } - } - catch (ignored) { - return; - } - if (!stat.isFile() || !re.test(file) || basename(file)[0] === '.') return; - files.push(file); - }); - - return files; -}; - -/** - * Generate an undefined error with a message warning the user. - * - * @return {Error} - */ - -exports.undefinedError = function() { - return new Error('Caught undefined error, did you throw without specifying what?'); -}; - -/** - * Generate an undefined error if `err` is not defined. - * - * @param {Error} err - * @return {Error} - */ - -exports.getError = function(err) { - return err || exports.undefinedError(); -}; - - -/** - * @summary - * This Filter based on `mocha-clean` module.(see: `github.com/rstacruz/mocha-clean`) - * @description - * When invoking this function you get a filter function that get the Error.stack as an input, - * and return a prettify output. - * (i.e: strip Mocha, node_modules, bower and componentJS from stack trace). - * @returns {Function} - */ - -exports.stackTraceFilter = function() { - var slash = '/' - , is = typeof document === 'undefined' - ? { node: true } - : { browser: true } - , cwd = is.node - ? process.cwd() + slash - : location.href.replace(/\/[^\/]*$/, '/'); - - function isNodeModule (line) { - return (~line.indexOf('node_modules')); - } - - function isMochaInternal (line) { - return (~line.indexOf('node_modules' + slash + 'mocha')) || - (~line.indexOf('components' + slash + 'mochajs')) || - (~line.indexOf('components' + slash + 'mocha')); - } - - // node_modules, bower, componentJS - function isBrowserModule(line) { - return (~line.indexOf('node_modules')) || - (~line.indexOf('components')); - } - - function isNodeInternal (line) { - return (~line.indexOf('(timers.js:')) || - (~line.indexOf('(events.js:')) || - (~line.indexOf('(node.js:')) || - (~line.indexOf('(module.js:')) || - (~line.indexOf('GeneratorFunctionPrototype.next (native)')) || - false - } - - return function(stack) { - stack = stack.split('\n'); - - stack = exports.reduce(stack, function(list, line) { - if (is.node && (isNodeModule(line) || - isMochaInternal(line) || - isNodeInternal(line))) - return list; - - if (is.browser && (isBrowserModule(line))) - return list; - - // Clean up cwd(absolute) - list.push(line.replace(cwd, '')); - return list; - }, []); - - return stack.join('\n'); - } -}; -}); // module: utils.js -// The global object is "self" in Web Workers. -var global = (function() { return this; })(); - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date; -var setTimeout = global.setTimeout; -var setInterval = global.setInterval; -var clearTimeout = global.clearTimeout; -var clearInterval = global.clearInterval; - -/** - * Node shims. - * - * These are meant only to allow - * mocha.js to run untouched, not - * to allow running node code in - * the browser. - */ - -var process = {}; -process.exit = function(status){}; -process.stdout = {}; - -var uncaughtExceptionHandlers = []; - -var originalOnerrorHandler = global.onerror; - -/** - * Remove uncaughtException listener. - * Revert to original onerror handler if previously defined. - */ - -process.removeListener = function(e, fn){ - if ('uncaughtException' == e) { - if (originalOnerrorHandler) { - global.onerror = originalOnerrorHandler; - } else { - global.onerror = function() {}; - } - var i = Mocha.utils.indexOf(uncaughtExceptionHandlers, fn); - if (i != -1) { uncaughtExceptionHandlers.splice(i, 1); } - } -}; - -/** - * Implements uncaughtException listener. - */ - -process.on = function(e, fn){ - if ('uncaughtException' == e) { - global.onerror = function(err, url, line){ - fn(new Error(err + ' (' + url + ':' + line + ')')); - return true; - }; - uncaughtExceptionHandlers.push(fn); - } -}; - -/** - * Expose mocha. - */ - -var Mocha = global.Mocha = require('mocha'), - mocha = global.mocha = new Mocha({ reporter: 'html' }); - -// The BDD UI is registered by default, but no UI will be functional in the -// browser without an explicit call to the overridden `mocha.ui` (see below). -// Ensure that this default UI does not expose its methods to the global scope. -mocha.suite.removeAllListeners('pre-require'); - -var immediateQueue = [] - , immediateTimeout; - -function timeslice() { - var immediateStart = new Date().getTime(); - while (immediateQueue.length && (new Date().getTime() - immediateStart) < 100) { - immediateQueue.shift()(); - } - if (immediateQueue.length) { - immediateTimeout = setTimeout(timeslice, 0); - } else { - immediateTimeout = null; - } -} - -/** - * High-performance override of Runner.immediately. - */ - -Mocha.Runner.immediately = function(callback) { - immediateQueue.push(callback); - if (!immediateTimeout) { - immediateTimeout = setTimeout(timeslice, 0); - } -}; - -/** - * Function to allow assertion libraries to throw errors directly into mocha. - * This is useful when running tests in a browser because window.onerror will - * only receive the 'message' attribute of the Error. - */ -mocha.throwError = function(err) { - Mocha.utils.forEach(uncaughtExceptionHandlers, function (fn) { - fn(err); - }); - throw err; -}; - -/** - * Override ui to ensure that the ui functions are initialized. - * Normally this would happen in Mocha.prototype.loadFiles. - */ - -mocha.ui = function(ui){ - Mocha.prototype.ui.call(this, ui); - this.suite.emit('pre-require', global, null, this); - return this; -}; - -/** - * Setup mocha with the given setting options. - */ - -mocha.setup = function(opts){ - if ('string' == typeof opts) opts = { ui: opts }; - for (var opt in opts) this[opt](opts[opt]); - return this; -}; - -/** - * Run mocha, returning the Runner. - */ - -mocha.run = function(fn){ - var options = mocha.options; - mocha.globals('location'); - - var query = Mocha.utils.parseQuery(global.location.search || ''); - if (query.grep) mocha.grep(new RegExp(query.grep)); - if (query.fgrep) mocha.grep(query.fgrep); - if (query.invert) mocha.invert(); - - return Mocha.prototype.run.call(mocha, function(err){ - // The DOM Document is not available in Web Workers. - var document = global.document; - if (document && document.getElementById('mocha') && options.noHighlighting !== true) { - Mocha.utils.highlightTags('code'); - } - if (fn) fn(err); - }); -}; - -/** - * Expose the process shim. - */ - -Mocha.process = process; -})(); diff --git a/cli/node_modules/mocha/node_modules/.bin/jade b/cli/node_modules/mocha/node_modules/.bin/jade deleted file mode 120000 index 571fae734..000000000 --- a/cli/node_modules/mocha/node_modules/.bin/jade +++ /dev/null @@ -1 +0,0 @@ -../jade/bin/jade \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/.bin/mkdirp b/cli/node_modules/mocha/node_modules/.bin/mkdirp deleted file mode 120000 index 017896ceb..000000000 --- a/cli/node_modules/mocha/node_modules/.bin/mkdirp +++ /dev/null @@ -1 +0,0 @@ -../mkdirp/bin/cmd.js \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/.bin/supports-color b/cli/node_modules/mocha/node_modules/.bin/supports-color deleted file mode 120000 index af0f05efe..000000000 --- a/cli/node_modules/mocha/node_modules/.bin/supports-color +++ /dev/null @@ -1 +0,0 @@ -../supports-color/cli.js \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/commander/Readme.md b/cli/node_modules/mocha/node_modules/commander/Readme.md deleted file mode 100644 index 7bb60b2c6..000000000 --- a/cli/node_modules/mocha/node_modules/commander/Readme.md +++ /dev/null @@ -1,208 +0,0 @@ -# Commander.js - - The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander). - - [![Build Status](https://api.travis-ci.org/visionmedia/commander.js.svg)](http://travis-ci.org/visionmedia/commander.js) - -## Installation - - $ npm install commander - -## Option parsing - - Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander'); - -program - .version('0.0.1') - .option('-p, --peppers', 'Add peppers') - .option('-P, --pineapple', 'Add pineapple') - .option('-b, --bbq', 'Add bbq sauce') - .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble') - .parse(process.argv); - -console.log('you ordered a pizza with:'); -if (program.peppers) console.log(' - peppers'); -if (program.pineapple) console.log(' - pineapple'); -if (program.bbq) console.log(' - bbq'); -console.log(' - %s cheese', program.cheese); -``` - - Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. - -## Automated --help - - The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free: - -``` - $ ./examples/pizza --help - - Usage: pizza [options] - - Options: - - -V, --version output the version number - -p, --peppers Add peppers - -P, --pineapple Add pineapple - -b, --bbq Add bbq sauce - -c, --cheese Add the specified type of cheese [marble] - -h, --help output usage information - -``` - -## Coercion - -```js -function range(val) { - return val.split('..').map(Number); -} - -function list(val) { - return val.split(','); -} - -function collect(val, memo) { - memo.push(val); - return memo; -} - -function increaseVerbosity(v, total) { - return total + 1; -} - -program - .version('0.0.1') - .usage('[options] ') - .option('-i, --integer ', 'An integer argument', parseInt) - .option('-f, --float ', 'A float argument', parseFloat) - .option('-r, --range ..', 'A range', range) - .option('-l, --list ', 'A list', list) - .option('-o, --optional [value]', 'An optional value') - .option('-c, --collect [value]', 'A repeatable value', collect, []) - .option('-v, --verbose', 'A value that can be increased', increaseVerbosity, 0) - .parse(process.argv); - -console.log(' int: %j', program.integer); -console.log(' float: %j', program.float); -console.log(' optional: %j', program.optional); -program.range = program.range || []; -console.log(' range: %j..%j', program.range[0], program.range[1]); -console.log(' list: %j', program.list); -console.log(' collect: %j', program.collect); -console.log(' verbosity: %j', program.verbose); -console.log(' args: %j', program.args); -``` - -## Custom help - - You can display arbitrary `-h, --help` information - by listening for "--help". Commander will automatically - exit once you are done so that the remainder of your program - does not execute causing undesired behaviours, for example - in the following executable "stuff" will not output when - `--help` is used. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('../'); - -function list(val) { - return val.split(',').map(Number); -} - -program - .version('0.0.1') - .option('-f, --foo', 'enable some foo') - .option('-b, --bar', 'enable some bar') - .option('-B, --baz', 'enable some baz'); - -// must be before .parse() since -// node's emit() is immediate - -program.on('--help', function(){ - console.log(' Examples:'); - console.log(''); - console.log(' $ custom-help --help'); - console.log(' $ custom-help -h'); - console.log(''); -}); - -program.parse(process.argv); - -console.log('stuff'); -``` - -yielding the following help output: - -``` - -Usage: custom-help [options] - -Options: - - -h, --help output usage information - -V, --version output the version number - -f, --foo enable some foo - -b, --bar enable some bar - -B, --baz enable some baz - -Examples: - - $ custom-help --help - $ custom-help -h - -``` - -## .outputHelp() - - Output help information without exiting. - -## .help() - - Output help information and exit immediately. - -## Links - - - [API documentation](http://visionmedia.github.com/commander.js/) - - [ascii tables](https://github.com/LearnBoost/cli-table) - - [progress bars](https://github.com/visionmedia/node-progress) - - [more progress bars](https://github.com/substack/node-multimeter) - - [examples](https://github.com/visionmedia/commander.js/tree/master/examples) - -## License - -(The MIT License) - -Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/cli/node_modules/mocha/node_modules/commander/index.js b/cli/node_modules/mocha/node_modules/commander/index.js deleted file mode 100644 index 8378d19a2..000000000 --- a/cli/node_modules/mocha/node_modules/commander/index.js +++ /dev/null @@ -1,876 +0,0 @@ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter; -var spawn = require('child_process').spawn; -var path = require('path'); -var dirname = path.dirname; -var basename = path.basename; - -/** - * Expose the root command. - */ - -exports = module.exports = new Command; - -/** - * Expose `Command`. - */ - -exports.Command = Command; - -/** - * Expose `Option`. - */ - -exports.Option = Option; - -/** - * Initialize a new `Option` with the given `flags` and `description`. - * - * @param {String} flags - * @param {String} description - * @api public - */ - -function Option(flags, description) { - this.flags = flags; - this.required = ~flags.indexOf('<'); - this.optional = ~flags.indexOf('['); - this.bool = !~flags.indexOf('-no-'); - flags = flags.split(/[ ,|]+/); - if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift(); - this.long = flags.shift(); - this.description = description || ''; -} - -/** - * Return option name. - * - * @return {String} - * @api private - */ - -Option.prototype.name = function(){ - return this.long - .replace('--', '') - .replace('no-', ''); -}; - -/** - * Check if `arg` matches the short or long flag. - * - * @param {String} arg - * @return {Boolean} - * @api private - */ - -Option.prototype.is = function(arg){ - return arg == this.short - || arg == this.long; -}; - -/** - * Initialize a new `Command`. - * - * @param {String} name - * @api public - */ - -function Command(name) { - this.commands = []; - this.options = []; - this._execs = []; - this._args = []; - this._name = name; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Command.prototype.__proto__ = EventEmitter.prototype; - -/** - * Add command `name`. - * - * The `.action()` callback is invoked when the - * command `name` is specified via __ARGV__, - * and the remaining arguments are applied to the - * function for access. - * - * When the `name` is "*" an un-matched command - * will be passed as the first arg, followed by - * the rest of __ARGV__ remaining. - * - * Examples: - * - * program - * .version('0.0.1') - * .option('-C, --chdir ', 'change the working directory') - * .option('-c, --config ', 'set config path. defaults to ./deploy.conf') - * .option('-T, --no-tests', 'ignore test hook') - * - * program - * .command('setup') - * .description('run remote setup commands') - * .action(function(){ - * console.log('setup'); - * }); - * - * program - * .command('exec ') - * .description('run the given remote command') - * .action(function(cmd){ - * console.log('exec "%s"', cmd); - * }); - * - * program - * .command('*') - * .description('deploy the given env') - * .action(function(env){ - * console.log('deploying "%s"', env); - * }); - * - * program.parse(process.argv); - * - * @param {String} name - * @param {String} [desc] - * @return {Command} the new command - * @api public - */ - -Command.prototype.command = function(name, desc) { - var args = name.split(/ +/); - var cmd = new Command(args.shift()); - if (desc) cmd.description(desc); - if (desc) this.executables = true; - if (desc) this._execs[cmd._name] = true; - this.commands.push(cmd); - cmd.parseExpectedArgs(args); - cmd.parent = this; - if (desc) return this; - return cmd; -}; - -/** - * Add an implicit `help [cmd]` subcommand - * which invokes `--help` for the given command. - * - * @api private - */ - -Command.prototype.addImplicitHelpCommand = function() { - this.command('help [cmd]', 'display help for [cmd]'); -}; - -/** - * Parse expected `args`. - * - * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. - * - * @param {Array} args - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parseExpectedArgs = function(args){ - if (!args.length) return; - var self = this; - args.forEach(function(arg){ - switch (arg[0]) { - case '<': - self._args.push({ required: true, name: arg.slice(1, -1) }); - break; - case '[': - self._args.push({ required: false, name: arg.slice(1, -1) }); - break; - } - }); - return this; -}; - -/** - * Register callback `fn` for the command. - * - * Examples: - * - * program - * .command('help') - * .description('display verbose help') - * .action(function(){ - * // output help here - * }); - * - * @param {Function} fn - * @return {Command} for chaining - * @api public - */ - -Command.prototype.action = function(fn){ - var self = this; - var listener = function(args, unknown){ - // Parse any so-far unknown options - args = args || []; - unknown = unknown || []; - - var parsed = self.parseOptions(unknown); - - // Output help if necessary - outputHelpIfNecessary(self, parsed.unknown); - - // If there are still any unknown options, then we simply - // die, unless someone asked for help, in which case we give it - // to them, and then we die. - if (parsed.unknown.length > 0) { - self.unknownOption(parsed.unknown[0]); - } - - // Leftover arguments need to be pushed back. Fixes issue #56 - if (parsed.args.length) args = parsed.args.concat(args); - - self._args.forEach(function(arg, i){ - if (arg.required && null == args[i]) { - self.missingArgument(arg.name); - } - }); - - // Always append ourselves to the end of the arguments, - // to make sure we match the number of arguments the user - // expects - if (self._args.length) { - args[self._args.length] = self; - } else { - args.push(self); - } - - fn.apply(this, args); - }; - this.parent.on(this._name, listener); - if (this._alias) this.parent.on(this._alias, listener); - return this; -}; - -/** - * Define option with `flags`, `description` and optional - * coercion `fn`. - * - * The `flags` string should contain both the short and long flags, - * separated by comma, a pipe or space. The following are all valid - * all will output this way when `--help` is used. - * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" - * - * Examples: - * - * // simple boolean defaulting to false - * program.option('-p, --pepper', 'add pepper'); - * - * --pepper - * program.pepper - * // => Boolean - * - * // simple boolean defaulting to true - * program.option('-C, --no-cheese', 'remove cheese'); - * - * program.cheese - * // => true - * - * --no-cheese - * program.cheese - * // => false - * - * // required argument - * program.option('-C, --chdir ', 'change the working directory'); - * - * --chdir /tmp - * program.chdir - * // => "/tmp" - * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); - * - * @param {String} flags - * @param {String} description - * @param {Function|Mixed} fn or default - * @param {Mixed} defaultValue - * @return {Command} for chaining - * @api public - */ - -Command.prototype.option = function(flags, description, fn, defaultValue){ - var self = this - , option = new Option(flags, description) - , oname = option.name() - , name = camelcase(oname); - - // default as 3rd arg - if ('function' != typeof fn) defaultValue = fn, fn = null; - - // preassign default value only for --no-*, [optional], or - if (false == option.bool || option.optional || option.required) { - // when --no-* we make sure default is true - if (false == option.bool) defaultValue = true; - // preassign only if we have a default - if (undefined !== defaultValue) self[name] = defaultValue; - } - - // register the option - this.options.push(option); - - // when it's passed assign the value - // and conditionally invoke the callback - this.on(oname, function(val){ - // coercion - if (null !== val && fn) val = fn(val, undefined === self[name] ? defaultValue : self[name]); - - // unassigned or bool - if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) { - // if no value, bool true, and we have a default, then use it! - if (null == val) { - self[name] = option.bool - ? defaultValue || true - : false; - } else { - self[name] = val; - } - } else if (null !== val) { - // reassign - self[name] = val; - } - }); - - return this; -}; - -/** - * Parse `argv`, settings options and invoking commands when defined. - * - * @param {Array} argv - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parse = function(argv){ - // implicit help - if (this.executables) this.addImplicitHelpCommand(); - - // store raw args - this.rawArgs = argv; - - // guess name - this._name = this._name || basename(argv[1], '.js'); - - // process argv - var parsed = this.parseOptions(this.normalize(argv.slice(2))); - var args = this.args = parsed.args; - - var result = this.parseArgs(this.args, parsed.unknown); - - // executable sub-commands - var name = result.args[0]; - if (this._execs[name]) return this.executeSubCommand(argv, args, parsed.unknown); - - return result; -}; - -/** - * Execute a sub-command executable. - * - * @param {Array} argv - * @param {Array} args - * @param {Array} unknown - * @api private - */ - -Command.prototype.executeSubCommand = function(argv, args, unknown) { - args = args.concat(unknown); - - if (!args.length) this.help(); - if ('help' == args[0] && 1 == args.length) this.help(); - - // --help - if ('help' == args[0]) { - args[0] = args[1]; - args[1] = '--help'; - } - - // executable - var dir = dirname(argv[1]); - var bin = basename(argv[1], '.js') + '-' + args[0]; - - // check for ./ first - var local = path.join(dir, bin); - - // run it - args = args.slice(1); - args.unshift(local); - var proc = spawn('node', args, { stdio: 'inherit', customFds: [0, 1, 2] }); - proc.on('error', function(err){ - if (err.code == "ENOENT") { - console.error('\n %s(1) does not exist, try --help\n', bin); - } else if (err.code == "EACCES") { - console.error('\n %s(1) not executable. try chmod or run with root\n', bin); - } - }); - - this.runningCommand = proc; -}; - -/** - * Normalize `args`, splitting joined short flags. For example - * the arg "-abc" is equivalent to "-a -b -c". - * This also normalizes equal sign and splits "--abc=def" into "--abc def". - * - * @param {Array} args - * @return {Array} - * @api private - */ - -Command.prototype.normalize = function(args){ - var ret = [] - , arg - , lastOpt - , index; - - for (var i = 0, len = args.length; i < len; ++i) { - arg = args[i]; - i > 0 && (lastOpt = this.optionFor(args[i-1])); - - if (lastOpt && lastOpt.required) { - ret.push(arg); - } else if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) { - arg.slice(1).split('').forEach(function(c){ - ret.push('-' + c); - }); - } else if (/^--/.test(arg) && ~(index = arg.indexOf('='))) { - ret.push(arg.slice(0, index), arg.slice(index + 1)); - } else { - ret.push(arg); - } - } - - return ret; -}; - -/** - * Parse command `args`. - * - * When listener(s) are available those - * callbacks are invoked, otherwise the "*" - * event is emitted and those actions are invoked. - * - * @param {Array} args - * @return {Command} for chaining - * @api private - */ - -Command.prototype.parseArgs = function(args, unknown){ - var cmds = this.commands - , len = cmds.length - , name; - - if (args.length) { - name = args[0]; - if (this.listeners(name).length) { - this.emit(args.shift(), args, unknown); - } else { - this.emit('*', args); - } - } else { - outputHelpIfNecessary(this, unknown); - - // If there were no args and we have unknown options, - // then they are extraneous and we need to error. - if (unknown.length > 0) { - this.unknownOption(unknown[0]); - } - } - - return this; -}; - -/** - * Return an option matching `arg` if any. - * - * @param {String} arg - * @return {Option} - * @api private - */ - -Command.prototype.optionFor = function(arg){ - for (var i = 0, len = this.options.length; i < len; ++i) { - if (this.options[i].is(arg)) { - return this.options[i]; - } - } -}; - -/** - * Parse options from `argv` returning `argv` - * void of these options. - * - * @param {Array} argv - * @return {Array} - * @api public - */ - -Command.prototype.parseOptions = function(argv){ - var args = [] - , len = argv.length - , literal - , option - , arg; - - var unknownOptions = []; - - // parse options - for (var i = 0; i < len; ++i) { - arg = argv[i]; - - // literal args after -- - if ('--' == arg) { - literal = true; - continue; - } - - if (literal) { - args.push(arg); - continue; - } - - // find matching Option - option = this.optionFor(arg); - - // option is defined - if (option) { - // requires arg - if (option.required) { - arg = argv[++i]; - if (null == arg) return this.optionMissingArgument(option); - this.emit(option.name(), arg); - // optional arg - } else if (option.optional) { - arg = argv[i+1]; - if (null == arg || ('-' == arg[0] && '-' != arg)) { - arg = null; - } else { - ++i; - } - this.emit(option.name(), arg); - // bool - } else { - this.emit(option.name()); - } - continue; - } - - // looks like an option - if (arg.length > 1 && '-' == arg[0]) { - unknownOptions.push(arg); - - // If the next argument looks like it might be - // an argument for this option, we pass it on. - // If it isn't, then it'll simply be ignored - if (argv[i+1] && '-' != argv[i+1][0]) { - unknownOptions.push(argv[++i]); - } - continue; - } - - // arg - args.push(arg); - } - - return { args: args, unknown: unknownOptions }; -}; - -/** - * Argument `name` is missing. - * - * @param {String} name - * @api private - */ - -Command.prototype.missingArgument = function(name){ - console.error(); - console.error(" error: missing required argument `%s'", name); - console.error(); - process.exit(1); -}; - -/** - * `Option` is missing an argument, but received `flag` or nothing. - * - * @param {String} option - * @param {String} flag - * @api private - */ - -Command.prototype.optionMissingArgument = function(option, flag){ - console.error(); - if (flag) { - console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag); - } else { - console.error(" error: option `%s' argument missing", option.flags); - } - console.error(); - process.exit(1); -}; - -/** - * Unknown option `flag`. - * - * @param {String} flag - * @api private - */ - -Command.prototype.unknownOption = function(flag){ - console.error(); - console.error(" error: unknown option `%s'", flag); - console.error(); - process.exit(1); -}; - - -/** - * Set the program version to `str`. - * - * This method auto-registers the "-V, --version" flag - * which will print the version number when passed. - * - * @param {String} str - * @param {String} flags - * @return {Command} for chaining - * @api public - */ - -Command.prototype.version = function(str, flags){ - if (0 == arguments.length) return this._version; - this._version = str; - flags = flags || '-V, --version'; - this.option(flags, 'output the version number'); - this.on('version', function(){ - console.log(str); - process.exit(0); - }); - return this; -}; - -/** - * Set the description `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.description = function(str){ - if (0 == arguments.length) return this._description; - this._description = str; - return this; -}; - -/** - * Set an alias for the command - * - * @param {String} alias - * @return {String|Command} - * @api public - */ - -Command.prototype.alias = function(alias){ - if (0 == arguments.length) return this._alias; - this._alias = alias; - return this; -}; - -/** - * Set / get the command usage `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.usage = function(str){ - var args = this._args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }); - - var usage = '[options' - + (this.commands.length ? '] [command' : '') - + ']' - + (this._args.length ? ' ' + args : ''); - - if (0 == arguments.length) return this._usage || usage; - this._usage = str; - - return this; -}; - -/** - * Return the largest option length. - * - * @return {Number} - * @api private - */ - -Command.prototype.largestOptionLength = function(){ - return this.options.reduce(function(max, option){ - return Math.max(max, option.flags.length); - }, 0); -}; - -/** - * Return help for options. - * - * @return {String} - * @api private - */ - -Command.prototype.optionHelp = function(){ - var width = this.largestOptionLength(); - - // Prepend the help information - return [pad('-h, --help', width) + ' ' + 'output usage information'] - .concat(this.options.map(function(option){ - return pad(option.flags, width) - + ' ' + option.description; - })) - .join('\n'); -}; - -/** - * Return command help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.commandHelp = function(){ - if (!this.commands.length) return ''; - return [ - '' - , ' Commands:' - , '' - , this.commands.map(function(cmd){ - var args = cmd._args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }).join(' '); - - return cmd._name - + (cmd._alias - ? '|' + cmd._alias - : '') - + (cmd.options.length - ? ' [options]' - : '') + ' ' + args - + (cmd.description() - ? '\n ' + cmd.description() - : '') - + '\n'; - }).join('\n').replace(/^/gm, ' ') - , '' - ].join('\n'); -}; - -/** - * Return program help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.helpInformation = function(){ - return [ - '' - , ' Usage: ' + this._name - + (this._alias - ? '|' + this._alias - : '') - + ' ' + this.usage() - , '' + this.commandHelp() - , ' Options:' - , '' - , '' + this.optionHelp().replace(/^/gm, ' ') - , '' - , '' - ].join('\n'); -}; - -/** - * Output help information for this command - * - * @api public - */ - -Command.prototype.outputHelp = function(){ - process.stdout.write(this.helpInformation()); - this.emit('--help'); -}; - -/** - * Output help information and exit. - * - * @api public - */ - -Command.prototype.help = function(){ - this.outputHelp(); - process.exit(); -}; - -/** - * Camel-case the given `flag` - * - * @param {String} flag - * @return {String} - * @api private - */ - -function camelcase(flag) { - return flag.split('-').reduce(function(str, word){ - return str + word[0].toUpperCase() + word.slice(1); - }); -} - -/** - * Pad `str` to `width`. - * - * @param {String} str - * @param {Number} width - * @return {String} - * @api private - */ - -function pad(str, width) { - var len = Math.max(0, width - str.length); - return str + Array(len + 1).join(' '); -} - -/** - * Output help information if necessary - * - * @param {Command} command to output help for - * @param {Array} array of options to search for -h or --help - * @api private - */ - -function outputHelpIfNecessary(cmd, options) { - options = options || []; - for (var i = 0; i < options.length; i++) { - if (options[i] == '--help' || options[i] == '-h') { - cmd.outputHelp(); - process.exit(0); - } - } -} diff --git a/cli/node_modules/mocha/node_modules/commander/package.json b/cli/node_modules/mocha/node_modules/commander/package.json deleted file mode 100644 index de917f52a..000000000 --- a/cli/node_modules/mocha/node_modules/commander/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "commander", - "version": "2.3.0", - "description": "the complete solution for node.js command-line programs", - "keywords": [ - "command", - "option", - "parser", - "prompt", - "stdin" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "repository": { - "type": "git", - "url": "https://github.com/visionmedia/commander.js.git" - }, - "devDependencies": { - "should": ">= 0.0.1" - }, - "scripts": { - "test": "make test" - }, - "main": "index", - "engines": { - "node": ">= 0.6.x" - }, - "files": [ - "index.js" - ], - "gitHead": "7e9f407ec03d4371a478c2fe417db4998ecb6169", - "bugs": { - "url": "https://github.com/visionmedia/commander.js/issues" - }, - "homepage": "https://github.com/visionmedia/commander.js", - "_id": "commander@2.3.0", - "_shasum": "fd430e889832ec353b9acd1de217c11cb3eef873", - "_from": "commander@2.3.0", - "_npmVersion": "1.4.21", - "_npmUser": { - "name": "somekittens", - "email": "rkoutnik@gmail.com" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "somekittens", - "email": "rkoutnik@gmail.com" - }, - { - "name": "zhiyelee", - "email": "zhiyelee@gmail.com" - }, - { - "name": "thethomaseffect", - "email": "thethomaseffect@gmail.com" - } - ], - "dist": { - "shasum": "fd430e889832ec353b9acd1de217c11cb3eef873", - "tarball": "http://registry.npmjs.org/commander/-/commander-2.3.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/commander/-/commander-2.3.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/mocha/node_modules/debug/.jshintrc b/cli/node_modules/mocha/node_modules/debug/.jshintrc deleted file mode 100644 index 299877f26..000000000 --- a/cli/node_modules/mocha/node_modules/debug/.jshintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "laxbreak": true -} diff --git a/cli/node_modules/mocha/node_modules/debug/.npmignore b/cli/node_modules/mocha/node_modules/debug/.npmignore deleted file mode 100644 index 7e6163db0..000000000 --- a/cli/node_modules/mocha/node_modules/debug/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -support -test -examples -example -*.sock -dist diff --git a/cli/node_modules/mocha/node_modules/debug/History.md b/cli/node_modules/mocha/node_modules/debug/History.md deleted file mode 100644 index 79429ff30..000000000 --- a/cli/node_modules/mocha/node_modules/debug/History.md +++ /dev/null @@ -1,150 +0,0 @@ - -2.0.0 / 2014-09-01 -================== - - * package: update "browserify" to v5.11.0 - * node: use stderr rather than stdout for logging (#29, @stephenmathieson) - -1.0.4 / 2014-07-15 -================== - - * dist: recompile - * example: remove `console.info()` log usage - * example: add "Content-Type" UTF-8 header to browser example - * browser: place %c marker after the space character - * browser: reset the "content" color via `color: inherit` - * browser: add colors support for Firefox >= v31 - * debug: prefer an instance `log()` function over the global one (#119) - * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) - -1.0.3 / 2014-07-09 -================== - - * Add support for multiple wildcards in namespaces (#122, @seegno) - * browser: fix lint - -1.0.2 / 2014-06-10 -================== - - * browser: update color palette (#113, @gscottolson) - * common: make console logging function configurable (#108, @timoxley) - * node: fix %o colors on old node <= 0.8.x - * Makefile: find node path using shell/which (#109, @timoxley) - -1.0.1 / 2014-06-06 -================== - - * browser: use `removeItem()` to clear localStorage - * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) - * package: add "contributors" section - * node: fix comment typo - * README: list authors - -1.0.0 / 2014-06-04 -================== - - * make ms diff be global, not be scope - * debug: ignore empty strings in enable() - * node: make DEBUG_COLORS able to disable coloring - * *: export the `colors` array - * npmignore: don't publish the `dist` dir - * Makefile: refactor to use browserify - * package: add "browserify" as a dev dependency - * Readme: add Web Inspector Colors section - * node: reset terminal color for the debug content - * node: map "%o" to `util.inspect()` - * browser: map "%j" to `JSON.stringify()` - * debug: add custom "formatters" - * debug: use "ms" module for humanizing the diff - * Readme: add "bash" syntax highlighting - * browser: add Firebug color support - * browser: add colors for WebKit browsers - * node: apply log to `console` - * rewrite: abstract common logic for Node & browsers - * add .jshintrc file - -0.8.1 / 2014-04-14 -================== - - * package: re-add the "component" section - -0.8.0 / 2014-03-30 -================== - - * add `enable()` method for nodejs. Closes #27 - * change from stderr to stdout - * remove unnecessary index.js file - -0.7.4 / 2013-11-13 -================== - - * remove "browserify" key from package.json (fixes something in browserify) - -0.7.3 / 2013-10-30 -================== - - * fix: catch localStorage security error when cookies are blocked (Chrome) - * add debug(err) support. Closes #46 - * add .browser prop to package.json. Closes #42 - -0.7.2 / 2013-02-06 -================== - - * fix package.json - * fix: Mobile Safari (private mode) is broken with debug - * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript - -0.7.1 / 2013-02-05 -================== - - * add repository URL to package.json - * add DEBUG_COLORED to force colored output - * add browserify support - * fix component. Closes #24 - -0.7.0 / 2012-05-04 -================== - - * Added .component to package.json - * Added debug.component.js build - -0.6.0 / 2012-03-16 -================== - - * Added support for "-" prefix in DEBUG [Vinay Pulim] - * Added `.enabled` flag to the node version [TooTallNate] - -0.5.0 / 2012-02-02 -================== - - * Added: humanize diffs. Closes #8 - * Added `debug.disable()` to the CS variant - * Removed padding. Closes #10 - * Fixed: persist client-side variant again. Closes #9 - -0.4.0 / 2012-02-01 -================== - - * Added browser variant support for older browsers [TooTallNate] - * Added `debug.enable('project:*')` to browser variant [TooTallNate] - * Added padding to diff (moved it to the right) - -0.3.0 / 2012-01-26 -================== - - * Added millisecond diff when isatty, otherwise UTC string - -0.2.0 / 2012-01-22 -================== - - * Added wildcard support - -0.1.0 / 2011-12-02 -================== - - * Added: remove colors unless stderr isatty [TooTallNate] - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/cli/node_modules/mocha/node_modules/debug/Makefile b/cli/node_modules/mocha/node_modules/debug/Makefile deleted file mode 100644 index b0bde6e63..000000000 --- a/cli/node_modules/mocha/node_modules/debug/Makefile +++ /dev/null @@ -1,33 +0,0 @@ - -# get Makefile directory name: http://stackoverflow.com/a/5982798/376773 -THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) -THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) - -# BIN directory -BIN := $(THIS_DIR)/node_modules/.bin - -# applications -NODE ?= $(shell which node) -NPM ?= $(NODE) $(shell which npm) -BROWSERIFY ?= $(NODE) $(BIN)/browserify - -all: dist/debug.js - -install: node_modules - -clean: - @rm -rf node_modules dist - -dist: - @mkdir -p $@ - -dist/debug.js: node_modules browser.js debug.js dist - @$(BROWSERIFY) \ - --standalone debug \ - . > $@ - -node_modules: package.json - @NODE_ENV= $(NPM) install - @touch node_modules - -.PHONY: all install clean diff --git a/cli/node_modules/mocha/node_modules/debug/Readme.md b/cli/node_modules/mocha/node_modules/debug/Readme.md deleted file mode 100644 index e59b9adae..000000000 --- a/cli/node_modules/mocha/node_modules/debug/Readme.md +++ /dev/null @@ -1,156 +0,0 @@ -# debug - - tiny node.js debugging utility modelled after node core's debugging technique. - -## Installation - -```bash -$ npm install debug -``` - -## Usage - - With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility. - -Example _app.js_: - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %s', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example _worker.js_: - -```js -var debug = require('debug')('worker'); - -setInterval(function(){ - debug('doing some work'); -}, 1000); -``` - - The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: - - ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) - - ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) - -## Millisecond diff - - When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) - - When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: - - ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) - -## Conventions - - If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". - -## Wildcards - - The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect.compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - - You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:". - -## Browser support - - Debug works in the browser as well, currently persisted by `localStorage`. For example if you have `worker:a` and `worker:b` as shown below, and wish to debug both type `debug.enable('worker:*')` in the console and refresh the page, this will remain until you disable with `debug.disable()`. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - b('doing some work'); -}, 1200); -``` - -#### Web Inspector Colors - - Colors are also enabled on "Web Inspectors" that understand the `%c` formatting - option. These are WebKit web inspectors, Firefox ([since version - 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) - and the Firebug plugin for Firefox (any version). - - Colored output looks something like: - - ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png) - -### stderr vs stdout - -You can set an alternative logging method per-namespace by overriding the `log` method on a per-namespace or globally: - -Example _stderr.js_: - -```js -var debug = require('../'); -var log = debug('app:log'); - -// by default console.log is used -log('goes to stdout!'); - -var error = debug('app:error'); -// set this namespace to log via console.error -error.log = console.error.bind(console); // don't forget to bind to console! -error('goes to stderr'); -log('still goes to stdout!'); - -// set all output to go via console.warn -// overrides all per-namespace log settings -debug.log = console.warn.bind(console); -log('now goes to stderr via console.warn'); -error('still goes to stderr, but via console.warn now'); -``` - -## Authors - - - TJ Holowaychuk - - Nathan Rajlich - -## License - -(The MIT License) - -Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/cli/node_modules/mocha/node_modules/debug/browser.js b/cli/node_modules/mocha/node_modules/debug/browser.js deleted file mode 100644 index ce6369f1c..000000000 --- a/cli/node_modules/mocha/node_modules/debug/browser.js +++ /dev/null @@ -1,147 +0,0 @@ - -/** - * This is the web browser implementation of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = require('./debug'); -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; - -/** - * Colors. - */ - -exports.colors = [ - 'lightseagreen', - 'forestgreen', - 'goldenrod', - 'dodgerblue', - 'darkorchid', - 'crimson' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -function useColors() { - // is webkit? http://stackoverflow.com/a/16459606/376773 - return ('WebkitAppearance' in document.documentElement.style) || - // is firebug? http://stackoverflow.com/a/398120/376773 - (window.console && (console.firebug || (console.exception && console.table))) || - // is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31); -} - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -exports.formatters.j = function(v) { - return JSON.stringify(v); -}; - - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs() { - var args = arguments; - var useColors = this.useColors; - - args[0] = (useColors ? '%c' : '') - + this.namespace - + (useColors ? ' %c' : ' ') - + args[0] - + (useColors ? '%c ' : ' ') - + '+' + exports.humanize(this.diff); - - if (!useColors) return args; - - var c = 'color: ' + this.color; - args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1)); - - // the final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - var index = 0; - var lastC = 0; - args[0].replace(/%[a-z%]/g, function(match) { - if ('%%' === match) return; - index++; - if ('%c' === match) { - // we only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); - return args; -} - -/** - * Invokes `console.log()` when available. - * No-op when `console.log` is not a "function". - * - * @api public - */ - -function log() { - // This hackery is required for IE8, - // where the `console.log` function doesn't have 'apply' - return 'object' == typeof console - && 'function' == typeof console.log - && Function.prototype.apply.call(console.log, console, arguments); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - -function save(namespaces) { - try { - if (null == namespaces) { - localStorage.removeItem('debug'); - } else { - localStorage.debug = namespaces; - } - } catch(e) {} -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - var r; - try { - r = localStorage.debug; - } catch(e) {} - return r; -} - -/** - * Enable namespaces listed in `localStorage.debug` initially. - */ - -exports.enable(load()); diff --git a/cli/node_modules/mocha/node_modules/debug/component.json b/cli/node_modules/mocha/node_modules/debug/component.json deleted file mode 100644 index db1ceed12..000000000 --- a/cli/node_modules/mocha/node_modules/debug/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "debug", - "repo": "visionmedia/debug", - "description": "small debugging utility", - "version": "2.0.0", - "keywords": [ - "debug", - "log", - "debugger" - ], - "main": "browser.js", - "scripts": [ - "browser.js", - "debug.js" - ], - "dependencies": { - "guille/ms.js": "0.6.1" - } -} diff --git a/cli/node_modules/mocha/node_modules/debug/debug.js b/cli/node_modules/mocha/node_modules/debug/debug.js deleted file mode 100644 index 7571a8605..000000000 --- a/cli/node_modules/mocha/node_modules/debug/debug.js +++ /dev/null @@ -1,197 +0,0 @@ - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = debug; -exports.coerce = coerce; -exports.disable = disable; -exports.enable = enable; -exports.enabled = enabled; -exports.humanize = require('ms'); - -/** - * The currently active debug mode names, and names to skip. - */ - -exports.names = []; -exports.skips = []; - -/** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lowercased letter, i.e. "n". - */ - -exports.formatters = {}; - -/** - * Previously assigned color. - */ - -var prevColor = 0; - -/** - * Previous log timestamp. - */ - -var prevTime; - -/** - * Select a color. - * - * @return {Number} - * @api private - */ - -function selectColor() { - return exports.colors[prevColor++ % exports.colors.length]; -} - -/** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - -function debug(namespace) { - - // define the `disabled` version - function disabled() { - } - disabled.enabled = false; - - // define the `enabled` version - function enabled() { - - var self = enabled; - - // set `diff` timestamp - var curr = +new Date(); - var ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - // add the `color` if not set - if (null == self.useColors) self.useColors = exports.useColors(); - if (null == self.color && self.useColors) self.color = selectColor(); - - var args = Array.prototype.slice.call(arguments); - - args[0] = exports.coerce(args[0]); - - if ('string' !== typeof args[0]) { - // anything else let's inspect with %o - args = ['%o'].concat(args); - } - - // apply any `formatters` transformations - var index = 0; - args[0] = args[0].replace(/%([a-z%])/g, function(match, format) { - // if we encounter an escaped % then don't increase the array index - if (match === '%%') return match; - index++; - var formatter = exports.formatters[format]; - if ('function' === typeof formatter) { - var val = args[index]; - match = formatter.call(self, val); - - // now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - if ('function' === typeof exports.formatArgs) { - args = exports.formatArgs.apply(self, args); - } - var logFn = enabled.log || exports.log || console.log.bind(console); - logFn.apply(self, args); - } - enabled.enabled = true; - - var fn = exports.enabled(namespace) ? enabled : disabled; - - fn.namespace = namespace; - - return fn; -} - -/** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - -function enable(namespaces) { - exports.save(namespaces); - - var split = (namespaces || '').split(/[\s,]+/); - var len = split.length; - - for (var i = 0; i < len; i++) { - if (!split[i]) continue; // ignore empty strings - namespaces = split[i].replace(/\*/g, '.*?'); - if (namespaces[0] === '-') { - exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - exports.names.push(new RegExp('^' + namespaces + '$')); - } - } -} - -/** - * Disable debug output. - * - * @api public - */ - -function disable() { - exports.enable(''); -} - -/** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - -function enabled(name) { - var i, len; - for (i = 0, len = exports.skips.length; i < len; i++) { - if (exports.skips[i].test(name)) { - return false; - } - } - for (i = 0, len = exports.names.length; i < len; i++) { - if (exports.names[i].test(name)) { - return true; - } - } - return false; -} - -/** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - -function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; -} diff --git a/cli/node_modules/mocha/node_modules/debug/node.js b/cli/node_modules/mocha/node_modules/debug/node.js deleted file mode 100644 index db86f6471..000000000 --- a/cli/node_modules/mocha/node_modules/debug/node.js +++ /dev/null @@ -1,129 +0,0 @@ - -/** - * Module dependencies. - */ - -var tty = require('tty'); -var util = require('util'); - -/** - * This is the Node.js implementation of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = require('./debug'); -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - var debugColors = (process.env.DEBUG_COLORS || '').trim().toLowerCase(); - if (0 === debugColors.length) { - return tty.isatty(1); - } else { - return '0' !== debugColors - && 'no' !== debugColors - && 'false' !== debugColors - && 'disabled' !== debugColors; - } -} - -/** - * Map %o to `util.inspect()`, since Node doesn't do that out of the box. - */ - -var inspect = (4 === util.inspect.length ? - // node <= 0.8.x - function (v, colors) { - return util.inspect(v, void 0, void 0, colors); - } : - // node > 0.8.x - function (v, colors) { - return util.inspect(v, { colors: colors }); - } -); - -exports.formatters.o = function(v) { - return inspect(v, this.useColors) - .replace(/\s*\n\s*/g, ' '); -}; - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs() { - var args = arguments; - var useColors = this.useColors; - var name = this.namespace; - - if (useColors) { - var c = this.color; - - args[0] = ' \u001b[9' + c + 'm' + name + ' ' - + '\u001b[0m' - + args[0] + '\u001b[3' + c + 'm' - + ' +' + exports.humanize(this.diff) + '\u001b[0m'; - } else { - args[0] = new Date().toUTCString() - + ' ' + name + ' ' + args[0]; - } - return args; -} - -/** - * Invokes `console.error()` with the specified arguments. - */ - -function log() { - return console.error.apply(console, arguments); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - -function save(namespaces) { - if (null == namespaces) { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } else { - process.env.DEBUG = namespaces; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Enable namespaces listed in `process.env.DEBUG` initially. - */ - -exports.enable(load()); diff --git a/cli/node_modules/mocha/node_modules/debug/node_modules/ms/.npmignore b/cli/node_modules/mocha/node_modules/debug/node_modules/ms/.npmignore deleted file mode 100644 index d1aa0ce42..000000000 --- a/cli/node_modules/mocha/node_modules/debug/node_modules/ms/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules -test -History.md -Makefile -component.json diff --git a/cli/node_modules/mocha/node_modules/debug/node_modules/ms/README.md b/cli/node_modules/mocha/node_modules/debug/node_modules/ms/README.md deleted file mode 100644 index d4ab12a73..000000000 --- a/cli/node_modules/mocha/node_modules/debug/node_modules/ms/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# ms.js: miliseconds conversion utility - -```js -ms('1d') // 86400000 -ms('10h') // 36000000 -ms('2h') // 7200000 -ms('1m') // 60000 -ms('5s') // 5000 -ms('100') // 100 -``` - -```js -ms(60000) // "1m" -ms(2 * 60000) // "2m" -ms(ms('10 hours')) // "10h" -``` - -```js -ms(60000, { long: true }) // "1 minute" -ms(2 * 60000, { long: true }) // "2 minutes" -ms(ms('10 hours', { long: true })) // "10 hours" -``` - -- Node/Browser compatible. Published as `ms` in NPM. -- If a number is supplied to `ms`, a string with a unit is returned. -- If a string that contains the number is supplied, it returns it as -a number (e.g: it returns `100` for `'100'`). -- If you pass a string with a number and a valid unit, the number of -equivalent ms is returned. - -## License - -MIT \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/debug/node_modules/ms/index.js b/cli/node_modules/mocha/node_modules/debug/node_modules/ms/index.js deleted file mode 100644 index c5847f8dd..000000000 --- a/cli/node_modules/mocha/node_modules/debug/node_modules/ms/index.js +++ /dev/null @@ -1,111 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} options - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options){ - options = options || {}; - if ('string' == typeof val) return parse(val); - return options.long - ? long(val) - : short(val); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - var match = /^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(str); - if (!match) return; - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'y': - return n * y; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 's': - return n * s; - case 'ms': - return n; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function short(ms) { - if (ms >= d) return Math.round(ms / d) + 'd'; - if (ms >= h) return Math.round(ms / h) + 'h'; - if (ms >= m) return Math.round(ms / m) + 'm'; - if (ms >= s) return Math.round(ms / s) + 's'; - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function long(ms) { - return plural(ms, d, 'day') - || plural(ms, h, 'hour') - || plural(ms, m, 'minute') - || plural(ms, s, 'second') - || ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, n, name) { - if (ms < n) return; - if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name; - return Math.ceil(ms / n) + ' ' + name + 's'; -} diff --git a/cli/node_modules/mocha/node_modules/debug/node_modules/ms/package.json b/cli/node_modules/mocha/node_modules/debug/node_modules/ms/package.json deleted file mode 100644 index 0839b5950..000000000 --- a/cli/node_modules/mocha/node_modules/debug/node_modules/ms/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "ms", - "version": "0.6.2", - "description": "Tiny ms conversion utility", - "repository": { - "type": "git", - "url": "git://github.com/guille/ms.js.git" - }, - "main": "./index", - "devDependencies": { - "mocha": "*", - "expect.js": "*", - "serve": "*" - }, - "component": { - "scripts": { - "ms/index.js": "index.js" - } - }, - "bugs": { - "url": "https://github.com/guille/ms.js/issues" - }, - "_id": "ms@0.6.2", - "dist": { - "shasum": "d89c2124c6fdc1353d65a8b77bf1aac4b193708c", - "tarball": "http://registry.npmjs.org/ms/-/ms-0.6.2.tgz" - }, - "_from": "ms@0.6.2", - "_npmVersion": "1.2.30", - "_npmUser": { - "name": "rauchg", - "email": "rauchg@gmail.com" - }, - "maintainers": [ - { - "name": "rauchg", - "email": "rauchg@gmail.com" - } - ], - "directories": {}, - "_shasum": "d89c2124c6fdc1353d65a8b77bf1aac4b193708c", - "_resolved": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz", - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/guille/ms.js" -} diff --git a/cli/node_modules/mocha/node_modules/debug/package.json b/cli/node_modules/mocha/node_modules/debug/package.json deleted file mode 100644 index f51603526..000000000 --- a/cli/node_modules/mocha/node_modules/debug/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "debug", - "version": "2.0.0", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" - }, - "description": "small debugging utility", - "keywords": [ - "debug", - "log", - "debugger" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "contributors": [ - { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io" - } - ], - "dependencies": { - "ms": "0.6.2" - }, - "devDependencies": { - "browserify": "5.11.0", - "mocha": "*" - }, - "main": "./node.js", - "browser": "./browser.js", - "component": { - "scripts": { - "debug/index.js": "browser.js", - "debug/debug.js": "debug.js" - } - }, - "gitHead": "c61ae82bde19c6fdedfc6684817ff7eb541ff029", - "bugs": { - "url": "https://github.com/visionmedia/debug/issues" - }, - "homepage": "https://github.com/visionmedia/debug", - "_id": "debug@2.0.0", - "scripts": {}, - "_shasum": "89bd9df6732b51256bc6705342bba02ed12131ef", - "_from": "debug@2.0.0", - "_npmVersion": "1.4.21", - "_npmUser": { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - } - ], - "dist": { - "shasum": "89bd9df6732b51256bc6705342bba02ed12131ef", - "tarball": "http://registry.npmjs.org/debug/-/debug-2.0.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/debug/-/debug-2.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/mocha/node_modules/diff/README.md b/cli/node_modules/mocha/node_modules/diff/README.md deleted file mode 100644 index b867e19a7..000000000 --- a/cli/node_modules/mocha/node_modules/diff/README.md +++ /dev/null @@ -1,181 +0,0 @@ -# jsdiff - -[![Build Status](https://secure.travis-ci.org/kpdecker/jsdiff.png)](http://travis-ci.org/kpdecker/jsdiff) - -A javascript text differencing implementation. - -Based on the algorithm proposed in -["An O(ND) Difference Algorithm and its Variations" (Myers, 1986)](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927). - -## Installation - - npm install diff - -or - - bower install jsdiff - -or - - git clone git://github.com/kpdecker/jsdiff.git - -## API - -* `JsDiff.diffChars(oldStr, newStr[, callback])` - diffs two blocks of text, comparing character by character. - - Returns a list of change objects (See below). - -* `JsDiff.diffWords(oldStr, newStr[, callback])` - diffs two blocks of text, comparing word by word, ignoring whitespace. - - Returns a list of change objects (See below). - -* `JsDiff.diffWordsWithSpace(oldStr, newStr[, callback])` - diffs two blocks of text, comparing word by word, treating whitespace as significant. - - Returns a list of change objects (See below). - -* `JsDiff.diffLines(oldStr, newStr[, callback])` - diffs two blocks of text, comparing line by line. - - Returns a list of change objects (See below). - -* `JsDiff.diffTrimmedLines(oldStr, newStr[, callback])` - diffs two blocks of text, comparing line by line, ignoring leading and trailing whitespace. - - Returns a list of change objects (See below). - -* `JsDiff.diffSentences(oldStr, newStr[, callback])` - diffs two blocks of text, comparing sentence by sentence. - - Returns a list of change objects (See below). - -* `JsDiff.diffCss(oldStr, newStr[, callback])` - diffs two blocks of text, comparing CSS tokens. - - Returns a list of change objects (See below). - -* `JsDiff.diffJson(oldObj, newObj[, callback])` - diffs two JSON objects, comparing the fields defined on each. The order of fields, etc does not matter in this comparison. - - Returns a list of change objects (See below). - -* `JsDiff.createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader)` - creates a unified diff patch. - - Parameters: - * `oldFileName` : String to be output in the filename section of the patch for the removals - * `newFileName` : String to be output in the filename section of the patch for the additions - * `oldStr` : Original string value - * `newStr` : New string value - * `oldHeader` : Additional information to include in the old file header - * `newHeader` : Additional information to include in thew new file header - -* `JsDiff.createPatch(fileName, oldStr, newStr, oldHeader, newHeader)` - creates a unified diff patch. - - Just like JsDiff.createTwoFilesPatch, but with oldFileName being equal to newFileName. - -* `JsDiff.applyPatch(oldStr, diffStr)` - applies a unified diff patch. - - Return a string containing new version of provided data. - -* `convertChangesToXML(changes)` - converts a list of changes to a serialized XML format - - -All methods above which accept the optional callback method will run in sync mode when that parameter is omitted and in async mode when supplied. This allows for larger diffs without blocking the event loop. - -### Change Objects -Many of the methods above return change objects. These objects are consist of the following fields: - -* `value`: Text content -* `added`: True if the value was inserted into the new string -* `removed`: True of the value was removed from the old string - -Note that some cases may omit a particular flag field. Comparison on the flag fields should always be done in a truthy or falsy manner. - -## Examples - -Basic example in Node - -```js -require('colors') -var jsdiff = require('diff'); - -var one = 'beep boop'; -var other = 'beep boob blah'; - -var diff = jsdiff.diffChars(one, other); - -diff.forEach(function(part){ - // green for additions, red for deletions - // grey for common parts - var color = part.added ? 'green' : - part.removed ? 'red' : 'grey'; - process.stderr.write(part.value[color]); -}); - -console.log() -``` -Running the above program should yield - -Node Example - -Basic example in a web page - -```html -
    
    -
    -
    -```
    -
    -Open the above .html file in a browser and you should see
    -
    -Node Example
    -
    -**[Full online demo](http://kpdecker.github.com/jsdiff)**
    -
    -## License
    -
    -Software License Agreement (BSD License)
    -
    -Copyright (c) 2009-2011, Kevin Decker kpdecker@gmail.com
    -
    -All rights reserved.
    -
    -Redistribution and use of this software in source and binary forms, with or without modification,
    -are permitted provided that the following conditions are met:
    -
    -* Redistributions of source code must retain the above
    -  copyright notice, this list of conditions and the
    -  following disclaimer.
    -
    -* Redistributions in binary form must reproduce the above
    -  copyright notice, this list of conditions and the
    -  following disclaimer in the documentation and/or other
    -  materials provided with the distribution.
    -
    -* Neither the name of Kevin Decker nor the names of its
    -  contributors may be used to endorse or promote products
    -  derived from this software without specific prior
    -  written permission.
    -
    -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
    -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
    -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
    -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    -
    -
    -[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/kpdecker/jsdiff/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
    diff --git a/cli/node_modules/mocha/node_modules/diff/diff.js b/cli/node_modules/mocha/node_modules/diff/diff.js
    deleted file mode 100644
    index 421854a12..000000000
    --- a/cli/node_modules/mocha/node_modules/diff/diff.js
    +++ /dev/null
    @@ -1,619 +0,0 @@
    -/* See LICENSE file for terms of use */
    -
    -/*
    - * Text diff implementation.
    - *
    - * This library supports the following APIS:
    - * JsDiff.diffChars: Character by character diff
    - * JsDiff.diffWords: Word (as defined by \b regex) diff which ignores whitespace
    - * JsDiff.diffLines: Line based diff
    - *
    - * JsDiff.diffCss: Diff targeted at CSS content
    - *
    - * These methods are based on the implementation proposed in
    - * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986).
    - * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927
    - */
    -(function(global, undefined) {
    -  var objectPrototypeToString = Object.prototype.toString;
    -
    -  /*istanbul ignore next*/
    -  function map(arr, mapper, that) {
    -    if (Array.prototype.map) {
    -      return Array.prototype.map.call(arr, mapper, that);
    -    }
    -
    -    var other = new Array(arr.length);
    -
    -    for (var i = 0, n = arr.length; i < n; i++) {
    -      other[i] = mapper.call(that, arr[i], i, arr);
    -    }
    -    return other;
    -  }
    -  function clonePath(path) {
    -    return { newPos: path.newPos, components: path.components.slice(0) };
    -  }
    -  function removeEmpty(array) {
    -    var ret = [];
    -    for (var i = 0; i < array.length; i++) {
    -      if (array[i]) {
    -        ret.push(array[i]);
    -      }
    -    }
    -    return ret;
    -  }
    -  function escapeHTML(s) {
    -    var n = s;
    -    n = n.replace(/&/g, '&');
    -    n = n.replace(//g, '>');
    -    n = n.replace(/"/g, '"');
    -
    -    return n;
    -  }
    -
    -  // This function handles the presence of circular references by bailing out when encountering an
    -  // object that is already on the "stack" of items being processed.
    -  function canonicalize(obj, stack, replacementStack) {
    -    stack = stack || [];
    -    replacementStack = replacementStack || [];
    -
    -    var i;
    -
    -    for (i = 0; i < stack.length; i += 1) {
    -      if (stack[i] === obj) {
    -        return replacementStack[i];
    -      }
    -    }
    -
    -    var canonicalizedObj;
    -
    -    if ('[object Array]' === objectPrototypeToString.call(obj)) {
    -      stack.push(obj);
    -      canonicalizedObj = new Array(obj.length);
    -      replacementStack.push(canonicalizedObj);
    -      for (i = 0; i < obj.length; i += 1) {
    -        canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack);
    -      }
    -      stack.pop();
    -      replacementStack.pop();
    -    } else if (typeof obj === 'object' && obj !== null) {
    -      stack.push(obj);
    -      canonicalizedObj = {};
    -      replacementStack.push(canonicalizedObj);
    -      var sortedKeys = [],
    -          key;
    -      for (key in obj) {
    -        sortedKeys.push(key);
    -      }
    -      sortedKeys.sort();
    -      for (i = 0; i < sortedKeys.length; i += 1) {
    -        key = sortedKeys[i];
    -        canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack);
    -      }
    -      stack.pop();
    -      replacementStack.pop();
    -    } else {
    -      canonicalizedObj = obj;
    -    }
    -    return canonicalizedObj;
    -  }
    -
    -  function buildValues(components, newString, oldString, useLongestToken) {
    -    var componentPos = 0,
    -        componentLen = components.length,
    -        newPos = 0,
    -        oldPos = 0;
    -
    -    for (; componentPos < componentLen; componentPos++) {
    -      var component = components[componentPos];
    -      if (!component.removed) {
    -        if (!component.added && useLongestToken) {
    -          var value = newString.slice(newPos, newPos + component.count);
    -          value = map(value, function(value, i) {
    -            var oldValue = oldString[oldPos + i];
    -            return oldValue.length > value.length ? oldValue : value;
    -          });
    -
    -          component.value = value.join('');
    -        } else {
    -          component.value = newString.slice(newPos, newPos + component.count).join('');
    -        }
    -        newPos += component.count;
    -
    -        // Common case
    -        if (!component.added) {
    -          oldPos += component.count;
    -        }
    -      } else {
    -        component.value = oldString.slice(oldPos, oldPos + component.count).join('');
    -        oldPos += component.count;
    -
    -        // Reverse add and remove so removes are output first to match common convention
    -        // The diffing algorithm is tied to add then remove output and this is the simplest
    -        // route to get the desired output with minimal overhead.
    -        if (componentPos && components[componentPos - 1].added) {
    -          var tmp = components[componentPos - 1];
    -          components[componentPos - 1] = components[componentPos];
    -          components[componentPos] = tmp;
    -        }
    -      }
    -    }
    -
    -    return components;
    -  }
    -
    -  function Diff(ignoreWhitespace) {
    -    this.ignoreWhitespace = ignoreWhitespace;
    -  }
    -  Diff.prototype = {
    -    diff: function(oldString, newString, callback) {
    -      var self = this;
    -
    -      function done(value) {
    -        if (callback) {
    -          setTimeout(function() { callback(undefined, value); }, 0);
    -          return true;
    -        } else {
    -          return value;
    -        }
    -      }
    -
    -      // Handle the identity case (this is due to unrolling editLength == 0
    -      if (newString === oldString) {
    -        return done([{ value: newString }]);
    -      }
    -      if (!newString) {
    -        return done([{ value: oldString, removed: true }]);
    -      }
    -      if (!oldString) {
    -        return done([{ value: newString, added: true }]);
    -      }
    -
    -      newString = this.tokenize(newString);
    -      oldString = this.tokenize(oldString);
    -
    -      var newLen = newString.length, oldLen = oldString.length;
    -      var editLength = 1;
    -      var maxEditLength = newLen + oldLen;
    -      var bestPath = [{ newPos: -1, components: [] }];
    -
    -      // Seed editLength = 0, i.e. the content starts with the same values
    -      var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
    -      if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
    -        // Identity per the equality and tokenizer
    -        return done([{value: newString.join('')}]);
    -      }
    -
    -      // Main worker method. checks all permutations of a given edit length for acceptance.
    -      function execEditLength() {
    -        for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
    -          var basePath;
    -          var addPath = bestPath[diagonalPath - 1],
    -              removePath = bestPath[diagonalPath + 1],
    -              oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
    -          if (addPath) {
    -            // No one else is going to attempt to use this value, clear it
    -            bestPath[diagonalPath - 1] = undefined;
    -          }
    -
    -          var canAdd = addPath && addPath.newPos + 1 < newLen,
    -              canRemove = removePath && 0 <= oldPos && oldPos < oldLen;
    -          if (!canAdd && !canRemove) {
    -            // If this path is a terminal then prune
    -            bestPath[diagonalPath] = undefined;
    -            continue;
    -          }
    -
    -          // Select the diagonal that we want to branch from. We select the prior
    -          // path whose position in the new string is the farthest from the origin
    -          // and does not pass the bounds of the diff graph
    -          if (!canAdd || (canRemove && addPath.newPos < removePath.newPos)) {
    -            basePath = clonePath(removePath);
    -            self.pushComponent(basePath.components, undefined, true);
    -          } else {
    -            basePath = addPath;   // No need to clone, we've pulled it from the list
    -            basePath.newPos++;
    -            self.pushComponent(basePath.components, true, undefined);
    -          }
    -
    -          oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath);
    -
    -          // If we have hit the end of both strings, then we are done
    -          if (basePath.newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
    -            return done(buildValues(basePath.components, newString, oldString, self.useLongestToken));
    -          } else {
    -            // Otherwise track this path as a potential candidate and continue.
    -            bestPath[diagonalPath] = basePath;
    -          }
    -        }
    -
    -        editLength++;
    -      }
    -
    -      // Performs the length of edit iteration. Is a bit fugly as this has to support the
    -      // sync and async mode which is never fun. Loops over execEditLength until a value
    -      // is produced.
    -      if (callback) {
    -        (function exec() {
    -          setTimeout(function() {
    -            // This should not happen, but we want to be safe.
    -            /*istanbul ignore next */
    -            if (editLength > maxEditLength) {
    -              return callback();
    -            }
    -
    -            if (!execEditLength()) {
    -              exec();
    -            }
    -          }, 0);
    -        }());
    -      } else {
    -        while (editLength <= maxEditLength) {
    -          var ret = execEditLength();
    -          if (ret) {
    -            return ret;
    -          }
    -        }
    -      }
    -    },
    -
    -    pushComponent: function(components, added, removed) {
    -      var last = components[components.length - 1];
    -      if (last && last.added === added && last.removed === removed) {
    -        // We need to clone here as the component clone operation is just
    -        // as shallow array clone
    -        components[components.length - 1] = {count: last.count + 1, added: added, removed: removed };
    -      } else {
    -        components.push({count: 1, added: added, removed: removed });
    -      }
    -    },
    -    extractCommon: function(basePath, newString, oldString, diagonalPath) {
    -      var newLen = newString.length,
    -          oldLen = oldString.length,
    -          newPos = basePath.newPos,
    -          oldPos = newPos - diagonalPath,
    -
    -          commonCount = 0;
    -      while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
    -        newPos++;
    -        oldPos++;
    -        commonCount++;
    -      }
    -
    -      if (commonCount) {
    -        basePath.components.push({count: commonCount});
    -      }
    -
    -      basePath.newPos = newPos;
    -      return oldPos;
    -    },
    -
    -    equals: function(left, right) {
    -      var reWhitespace = /\S/;
    -      return left === right || (this.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right));
    -    },
    -    tokenize: function(value) {
    -      return value.split('');
    -    }
    -  };
    -
    -  var CharDiff = new Diff();
    -
    -  var WordDiff = new Diff(true);
    -  var WordWithSpaceDiff = new Diff();
    -  WordDiff.tokenize = WordWithSpaceDiff.tokenize = function(value) {
    -    return removeEmpty(value.split(/(\s+|\b)/));
    -  };
    -
    -  var CssDiff = new Diff(true);
    -  CssDiff.tokenize = function(value) {
    -    return removeEmpty(value.split(/([{}:;,]|\s+)/));
    -  };
    -
    -  var LineDiff = new Diff();
    -
    -  var TrimmedLineDiff = new Diff();
    -  TrimmedLineDiff.ignoreTrim = true;
    -
    -  LineDiff.tokenize = TrimmedLineDiff.tokenize = function(value) {
    -    var retLines = [],
    -        lines = value.split(/^/m);
    -    for (var i = 0; i < lines.length; i++) {
    -      var line = lines[i],
    -          lastLine = lines[i - 1],
    -          lastLineLastChar = lastLine && lastLine[lastLine.length - 1];
    -
    -      // Merge lines that may contain windows new lines
    -      if (line === '\n' && lastLineLastChar === '\r') {
    -          retLines[retLines.length - 1] = retLines[retLines.length - 1].slice(0, -1) + '\r\n';
    -      } else {
    -        if (this.ignoreTrim) {
    -          line = line.trim();
    -          // add a newline unless this is the last line.
    -          if (i < lines.length - 1) {
    -            line += '\n';
    -          }
    -        }
    -        retLines.push(line);
    -      }
    -    }
    -
    -    return retLines;
    -  };
    -
    -  var PatchDiff = new Diff();
    -  PatchDiff.tokenize = function(value) {
    -    var ret = [],
    -        linesAndNewlines = value.split(/(\n|\r\n)/);
    -
    -    // Ignore the final empty token that occurs if the string ends with a new line
    -    if (!linesAndNewlines[linesAndNewlines.length - 1]) {
    -      linesAndNewlines.pop();
    -    }
    -
    -    // Merge the content and line separators into single tokens
    -    for (var i = 0; i < linesAndNewlines.length; i++) {
    -      var line = linesAndNewlines[i];
    -
    -      if (i % 2) {
    -        ret[ret.length - 1] += line;
    -      } else {
    -        ret.push(line);
    -      }
    -    }
    -    return ret;
    -  };
    -
    -  var SentenceDiff = new Diff();
    -  SentenceDiff.tokenize = function(value) {
    -    return removeEmpty(value.split(/(\S.+?[.!?])(?=\s+|$)/));
    -  };
    -
    -  var JsonDiff = new Diff();
    -  // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a
    -  // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output:
    -  JsonDiff.useLongestToken = true;
    -  JsonDiff.tokenize = LineDiff.tokenize;
    -  JsonDiff.equals = function(left, right) {
    -    return LineDiff.equals(left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'));
    -  };
    -
    -  var JsDiff = {
    -    Diff: Diff,
    -
    -    diffChars: function(oldStr, newStr, callback) { return CharDiff.diff(oldStr, newStr, callback); },
    -    diffWords: function(oldStr, newStr, callback) { return WordDiff.diff(oldStr, newStr, callback); },
    -    diffWordsWithSpace: function(oldStr, newStr, callback) { return WordWithSpaceDiff.diff(oldStr, newStr, callback); },
    -    diffLines: function(oldStr, newStr, callback) { return LineDiff.diff(oldStr, newStr, callback); },
    -    diffTrimmedLines: function(oldStr, newStr, callback) { return TrimmedLineDiff.diff(oldStr, newStr, callback); },
    -
    -    diffSentences: function(oldStr, newStr, callback) { return SentenceDiff.diff(oldStr, newStr, callback); },
    -
    -    diffCss: function(oldStr, newStr, callback) { return CssDiff.diff(oldStr, newStr, callback); },
    -    diffJson: function(oldObj, newObj, callback) {
    -      return JsonDiff.diff(
    -        typeof oldObj === 'string' ? oldObj : JSON.stringify(canonicalize(oldObj), undefined, '  '),
    -        typeof newObj === 'string' ? newObj : JSON.stringify(canonicalize(newObj), undefined, '  '),
    -        callback
    -      );
    -    },
    -
    -    createTwoFilesPatch: function(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader) {
    -      var ret = [];
    -
    -      if (oldFileName == newFileName) {
    -        ret.push('Index: ' + oldFileName);
    -      }
    -      ret.push('===================================================================');
    -      ret.push('--- ' + oldFileName + (typeof oldHeader === 'undefined' ? '' : '\t' + oldHeader));
    -      ret.push('+++ ' + newFileName + (typeof newHeader === 'undefined' ? '' : '\t' + newHeader));
    -
    -      var diff = PatchDiff.diff(oldStr, newStr);
    -      diff.push({value: '', lines: []});   // Append an empty value to make cleanup easier
    -
    -      // Formats a given set of lines for printing as context lines in a patch
    -      function contextLines(lines) {
    -        return map(lines, function(entry) { return ' ' + entry; });
    -      }
    -
    -      // Outputs the no newline at end of file warning if needed
    -      function eofNL(curRange, i, current) {
    -        var last = diff[diff.length - 2],
    -            isLast = i === diff.length - 2,
    -            isLastOfType = i === diff.length - 3 && current.added !== last.added;
    -
    -        // Figure out if this is the last line for the given file and missing NL
    -        if (!(/\n$/.test(current.value)) && (isLast || isLastOfType)) {
    -          curRange.push('\\ No newline at end of file');
    -        }
    -      }
    -
    -      var oldRangeStart = 0, newRangeStart = 0, curRange = [],
    -          oldLine = 1, newLine = 1;
    -      for (var i = 0; i < diff.length; i++) {
    -        var current = diff[i],
    -            lines = current.lines || current.value.replace(/\n$/, '').split('\n');
    -        current.lines = lines;
    -
    -        if (current.added || current.removed) {
    -          // If we have previous context, start with that
    -          if (!oldRangeStart) {
    -            var prev = diff[i - 1];
    -            oldRangeStart = oldLine;
    -            newRangeStart = newLine;
    -
    -            if (prev) {
    -              curRange = contextLines(prev.lines.slice(-4));
    -              oldRangeStart -= curRange.length;
    -              newRangeStart -= curRange.length;
    -            }
    -          }
    -
    -          // Output our changes
    -          curRange.push.apply(curRange, map(lines, function(entry) {
    -            return (current.added ? '+' : '-') + entry;
    -          }));
    -          eofNL(curRange, i, current);
    -
    -          // Track the updated file position
    -          if (current.added) {
    -            newLine += lines.length;
    -          } else {
    -            oldLine += lines.length;
    -          }
    -        } else {
    -          // Identical context lines. Track line changes
    -          if (oldRangeStart) {
    -            // Close out any changes that have been output (or join overlapping)
    -            if (lines.length <= 8 && i < diff.length - 2) {
    -              // Overlapping
    -              curRange.push.apply(curRange, contextLines(lines));
    -            } else {
    -              // end the range and output
    -              var contextSize = Math.min(lines.length, 4);
    -              ret.push(
    -                  '@@ -' + oldRangeStart + ',' + (oldLine - oldRangeStart + contextSize)
    -                  + ' +' + newRangeStart + ',' + (newLine - newRangeStart + contextSize)
    -                  + ' @@');
    -              ret.push.apply(ret, curRange);
    -              ret.push.apply(ret, contextLines(lines.slice(0, contextSize)));
    -              if (lines.length <= 4) {
    -                eofNL(ret, i, current);
    -              }
    -
    -              oldRangeStart = 0;
    -              newRangeStart = 0;
    -              curRange = [];
    -            }
    -          }
    -          oldLine += lines.length;
    -          newLine += lines.length;
    -        }
    -      }
    -
    -      return ret.join('\n') + '\n';
    -    },
    -
    -    createPatch: function(fileName, oldStr, newStr, oldHeader, newHeader) {
    -      return JsDiff.createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader);
    -    },
    -
    -    applyPatch: function(oldStr, uniDiff) {
    -      var diffstr = uniDiff.split('\n'),
    -          hunks = [],
    -          i = 0,
    -          remEOFNL = false,
    -          addEOFNL = false;
    -
    -      // Skip to the first change hunk
    -      while (i < diffstr.length && !(/^@@/.test(diffstr[i]))) {
    -        i++;
    -      }
    -
    -      // Parse the unified diff
    -      for (; i < diffstr.length; i++) {
    -        if (diffstr[i][0] === '@') {
    -          var chnukHeader = diffstr[i].split(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/);
    -          hunks.unshift({
    -            start: chnukHeader[3],
    -            oldlength: +chnukHeader[2],
    -            removed: [],
    -            newlength: chnukHeader[4],
    -            added: []
    -          });
    -        } else if (diffstr[i][0] === '+') {
    -          hunks[0].added.push(diffstr[i].substr(1));
    -        } else if (diffstr[i][0] === '-') {
    -          hunks[0].removed.push(diffstr[i].substr(1));
    -        } else if (diffstr[i][0] === ' ') {
    -          hunks[0].added.push(diffstr[i].substr(1));
    -          hunks[0].removed.push(diffstr[i].substr(1));
    -        } else if (diffstr[i][0] === '\\') {
    -          if (diffstr[i - 1][0] === '+') {
    -            remEOFNL = true;
    -          } else if (diffstr[i - 1][0] === '-') {
    -            addEOFNL = true;
    -          }
    -        }
    -      }
    -
    -      // Apply the diff to the input
    -      var lines = oldStr.split('\n');
    -      for (i = hunks.length - 1; i >= 0; i--) {
    -        var hunk = hunks[i];
    -        // Sanity check the input string. Bail if we don't match.
    -        for (var j = 0; j < hunk.oldlength; j++) {
    -          if (lines[hunk.start - 1 + j] !== hunk.removed[j]) {
    -            return false;
    -          }
    -        }
    -        Array.prototype.splice.apply(lines, [hunk.start - 1, hunk.oldlength].concat(hunk.added));
    -      }
    -
    -      // Handle EOFNL insertion/removal
    -      if (remEOFNL) {
    -        while (!lines[lines.length - 1]) {
    -          lines.pop();
    -        }
    -      } else if (addEOFNL) {
    -        lines.push('');
    -      }
    -      return lines.join('\n');
    -    },
    -
    -    convertChangesToXML: function(changes) {
    -      var ret = [];
    -      for (var i = 0; i < changes.length; i++) {
    -        var change = changes[i];
    -        if (change.added) {
    -          ret.push('');
    -        } else if (change.removed) {
    -          ret.push('');
    -        }
    -
    -        ret.push(escapeHTML(change.value));
    -
    -        if (change.added) {
    -          ret.push('');
    -        } else if (change.removed) {
    -          ret.push('');
    -        }
    -      }
    -      return ret.join('');
    -    },
    -
    -    // See: http://code.google.com/p/google-diff-match-patch/wiki/API
    -    convertChangesToDMP: function(changes) {
    -      var ret = [],
    -          change,
    -          operation;
    -      for (var i = 0; i < changes.length; i++) {
    -        change = changes[i];
    -        if (change.added) {
    -          operation = 1;
    -        } else if (change.removed) {
    -          operation = -1;
    -        } else {
    -          operation = 0;
    -        }
    -
    -        ret.push([operation, change.value]);
    -      }
    -      return ret;
    -    },
    -
    -    canonicalize: canonicalize
    -  };
    -
    -  /*istanbul ignore next */
    -  /*global module */
    -  if (typeof module !== 'undefined' && module.exports) {
    -    module.exports = JsDiff;
    -  } else if (typeof define === 'function' && define.amd) {
    -    /*global define */
    -    define([], function() { return JsDiff; });
    -  } else if (typeof global.JsDiff === 'undefined') {
    -    global.JsDiff = JsDiff;
    -  }
    -}(this));
    diff --git a/cli/node_modules/mocha/node_modules/diff/package.json b/cli/node_modules/mocha/node_modules/diff/package.json
    deleted file mode 100644
    index 6b1a82b99..000000000
    --- a/cli/node_modules/mocha/node_modules/diff/package.json
    +++ /dev/null
    @@ -1,63 +0,0 @@
    -{
    -  "name": "diff",
    -  "version": "1.4.0",
    -  "description": "A javascript text diff implementation.",
    -  "keywords": [
    -    "diff",
    -    "javascript"
    -  ],
    -  "maintainers": [
    -    {
    -      "name": "kpdecker",
    -      "email": "kpdecker@gmail.com"
    -    }
    -  ],
    -  "bugs": {
    -    "url": "http://github.com/kpdecker/jsdiff/issues",
    -    "email": "kpdecker@gmail.com"
    -  },
    -  "licenses": [
    -    {
    -      "type": "BSD",
    -      "url": "http://github.com/kpdecker/jsdiff/blob/master/LICENSE"
    -    }
    -  ],
    -  "repository": {
    -    "type": "git",
    -    "url": "git://github.com/kpdecker/jsdiff.git"
    -  },
    -  "engines": {
    -    "node": ">=0.3.1"
    -  },
    -  "main": "./diff",
    -  "scripts": {
    -    "test": "istanbul cover node_modules/.bin/_mocha test/*.js && istanbul check-coverage --statements 100 --functions 100 --branches 100 --lines 100 coverage/coverage.json"
    -  },
    -  "dependencies": {},
    -  "devDependencies": {
    -    "colors": "^1.1.0",
    -    "istanbul": "^0.3.2",
    -    "mocha": "^2.2.4",
    -    "should": "^6.0.1"
    -  },
    -  "optionalDependencies": {},
    -  "files": [
    -    "diff.js"
    -  ],
    -  "gitHead": "27a750e9116e6ade6303bc24a9be72f6845e00ed",
    -  "homepage": "https://github.com/kpdecker/jsdiff",
    -  "_id": "diff@1.4.0",
    -  "_shasum": "7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf",
    -  "_from": "diff@1.4.0",
    -  "_npmVersion": "1.4.28",
    -  "_npmUser": {
    -    "name": "kpdecker",
    -    "email": "kpdecker@gmail.com"
    -  },
    -  "dist": {
    -    "shasum": "7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf",
    -    "tarball": "http://registry.npmjs.org/diff/-/diff-1.4.0.tgz"
    -  },
    -  "directories": {},
    -  "_resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz"
    -}
    diff --git a/cli/node_modules/mocha/node_modules/escape-string-regexp/index.js b/cli/node_modules/mocha/node_modules/escape-string-regexp/index.js
    deleted file mode 100644
    index ac6572cab..000000000
    --- a/cli/node_modules/mocha/node_modules/escape-string-regexp/index.js
    +++ /dev/null
    @@ -1,11 +0,0 @@
    -'use strict';
    -
    -var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
    -
    -module.exports = function (str) {
    -	if (typeof str !== 'string') {
    -		throw new TypeError('Expected a string');
    -	}
    -
    -	return str.replace(matchOperatorsRe,  '\\$&');
    -};
    diff --git a/cli/node_modules/mocha/node_modules/escape-string-regexp/package.json b/cli/node_modules/mocha/node_modules/escape-string-regexp/package.json
    deleted file mode 100644
    index 5da6f01d8..000000000
    --- a/cli/node_modules/mocha/node_modules/escape-string-regexp/package.json
    +++ /dev/null
    @@ -1,69 +0,0 @@
    -{
    -  "name": "escape-string-regexp",
    -  "version": "1.0.2",
    -  "description": "Escape RegExp special characters",
    -  "license": "MIT",
    -  "repository": {
    -    "type": "git",
    -    "url": "https://github.com/sindresorhus/escape-string-regexp"
    -  },
    -  "author": {
    -    "name": "Sindre Sorhus",
    -    "email": "sindresorhus@gmail.com",
    -    "url": "http://sindresorhus.com"
    -  },
    -  "engines": {
    -    "node": ">=0.8.0"
    -  },
    -  "scripts": {
    -    "test": "mocha"
    -  },
    -  "files": [
    -    "index.js"
    -  ],
    -  "keywords": [
    -    "regex",
    -    "regexp",
    -    "re",
    -    "regular",
    -    "expression",
    -    "escape",
    -    "string",
    -    "str",
    -    "special",
    -    "characters"
    -  ],
    -  "devDependencies": {
    -    "mocha": "*"
    -  },
    -  "gitHead": "0587ee0ee03ea3fcbfa3c15cf67b47f214e20987",
    -  "bugs": {
    -    "url": "https://github.com/sindresorhus/escape-string-regexp/issues"
    -  },
    -  "homepage": "https://github.com/sindresorhus/escape-string-regexp",
    -  "_id": "escape-string-regexp@1.0.2",
    -  "_shasum": "4dbc2fe674e71949caf3fb2695ce7f2dc1d9a8d1",
    -  "_from": "escape-string-regexp@1.0.2",
    -  "_npmVersion": "1.4.23",
    -  "_npmUser": {
    -    "name": "jbnicolai",
    -    "email": "jappelman@xebia.com"
    -  },
    -  "maintainers": [
    -    {
    -      "name": "sindresorhus",
    -      "email": "sindresorhus@gmail.com"
    -    },
    -    {
    -      "name": "jbnicolai",
    -      "email": "jappelman@xebia.com"
    -    }
    -  ],
    -  "dist": {
    -    "shasum": "4dbc2fe674e71949caf3fb2695ce7f2dc1d9a8d1",
    -    "tarball": "http://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz"
    -  },
    -  "directories": {},
    -  "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz",
    -  "readme": "ERROR: No README data found!"
    -}
    diff --git a/cli/node_modules/mocha/node_modules/escape-string-regexp/readme.md b/cli/node_modules/mocha/node_modules/escape-string-regexp/readme.md
    deleted file mode 100644
    index 808a963a8..000000000
    --- a/cli/node_modules/mocha/node_modules/escape-string-regexp/readme.md
    +++ /dev/null
    @@ -1,27 +0,0 @@
    -# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp)
    -
    -> Escape RegExp special characters
    -
    -
    -## Install
    -
    -```sh
    -$ npm install --save escape-string-regexp
    -```
    -
    -
    -## Usage
    -
    -```js
    -var escapeStringRegexp = require('escape-string-regexp');
    -
    -var escapedString = escapeStringRegexp('how much $ for a unicorn?');
    -//=> how much \$ for a unicorn\?
    -
    -new RegExp(escapedString);
    -```
    -
    -
    -## License
    -
    -MIT © [Sindre Sorhus](http://sindresorhus.com)
    diff --git a/cli/node_modules/mocha/node_modules/glob/.npmignore b/cli/node_modules/mocha/node_modules/glob/.npmignore
    deleted file mode 100644
    index 2af4b71c9..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/.npmignore
    +++ /dev/null
    @@ -1,2 +0,0 @@
    -.*.swp
    -test/a/
    diff --git a/cli/node_modules/mocha/node_modules/glob/.travis.yml b/cli/node_modules/mocha/node_modules/glob/.travis.yml
    deleted file mode 100644
    index baa0031d5..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/.travis.yml
    +++ /dev/null
    @@ -1,3 +0,0 @@
    -language: node_js
    -node_js:
    -  - 0.8
    diff --git a/cli/node_modules/mocha/node_modules/glob/LICENSE b/cli/node_modules/mocha/node_modules/glob/LICENSE
    deleted file mode 100644
    index 0c44ae716..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/LICENSE
    +++ /dev/null
    @@ -1,27 +0,0 @@
    -Copyright (c) Isaac Z. Schlueter ("Author")
    -All rights reserved.
    -
    -The BSD License
    -
    -Redistribution and use in source and binary forms, with or without
    -modification, are permitted provided that the following conditions
    -are met:
    -
    -1. Redistributions of source code must retain the above copyright
    -   notice, this list of conditions and the following disclaimer.
    -
    -2. Redistributions in binary form must reproduce the above copyright
    -   notice, this list of conditions and the following disclaimer in the
    -   documentation and/or other materials provided with the distribution.
    -
    -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
    -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    -PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
    -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
    -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
    -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
    -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    diff --git a/cli/node_modules/mocha/node_modules/glob/README.md b/cli/node_modules/mocha/node_modules/glob/README.md
    deleted file mode 100644
    index cc6916451..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/README.md
    +++ /dev/null
    @@ -1,250 +0,0 @@
    -# Glob
    -
    -Match files using the patterns the shell uses, like stars and stuff.
    -
    -This is a glob implementation in JavaScript.  It uses the `minimatch`
    -library to do its matching.
    -
    -## Attention: node-glob users!
    -
    -The API has changed dramatically between 2.x and 3.x. This library is
    -now 100% JavaScript, and the integer flags have been replaced with an
    -options object.
    -
    -Also, there's an event emitter class, proper tests, and all the other
    -things you've come to expect from node modules.
    -
    -And best of all, no compilation!
    -
    -## Usage
    -
    -```javascript
    -var glob = require("glob")
    -
    -// options is optional
    -glob("**/*.js", options, function (er, files) {
    -  // files is an array of filenames.
    -  // If the `nonull` option is set, and nothing
    -  // was found, then files is ["**/*.js"]
    -  // er is an error object or null.
    -})
    -```
    -
    -## Features
    -
    -Please see the [minimatch
    -documentation](https://github.com/isaacs/minimatch) for more details.
    -
    -Supports these glob features:
    -
    -* Brace Expansion
    -* Extended glob matching
    -* "Globstar" `**` matching
    -
    -See:
    -
    -* `man sh`
    -* `man bash`
    -* `man 3 fnmatch`
    -* `man 5 gitignore`
    -* [minimatch documentation](https://github.com/isaacs/minimatch)
    -
    -## glob(pattern, [options], cb)
    -
    -* `pattern` {String} Pattern to be matched
    -* `options` {Object}
    -* `cb` {Function}
    -  * `err` {Error | null}
    -  * `matches` {Array} filenames found matching the pattern
    -
    -Perform an asynchronous glob search.
    -
    -## glob.sync(pattern, [options])
    -
    -* `pattern` {String} Pattern to be matched
    -* `options` {Object}
    -* return: {Array} filenames found matching the pattern
    -
    -Perform a synchronous glob search.
    -
    -## Class: glob.Glob
    -
    -Create a Glob object by instanting the `glob.Glob` class.
    -
    -```javascript
    -var Glob = require("glob").Glob
    -var mg = new Glob(pattern, options, cb)
    -```
    -
    -It's an EventEmitter, and starts walking the filesystem to find matches
    -immediately.
    -
    -### new glob.Glob(pattern, [options], [cb])
    -
    -* `pattern` {String} pattern to search for
    -* `options` {Object}
    -* `cb` {Function} Called when an error occurs, or matches are found
    -  * `err` {Error | null}
    -  * `matches` {Array} filenames found matching the pattern
    -
    -Note that if the `sync` flag is set in the options, then matches will
    -be immediately available on the `g.found` member.
    -
    -### Properties
    -
    -* `minimatch` The minimatch object that the glob uses.
    -* `options` The options object passed in.
    -* `error` The error encountered.  When an error is encountered, the
    -  glob object is in an undefined state, and should be discarded.
    -* `aborted` Boolean which is set to true when calling `abort()`.  There
    -  is no way at this time to continue a glob search after aborting, but
    -  you can re-use the statCache to avoid having to duplicate syscalls.
    -* `statCache` Collection of all the stat results the glob search
    -  performed.
    -* `cache` Convenience object.  Each field has the following possible
    -  values:
    -  * `false` - Path does not exist
    -  * `true` - Path exists
    -  * `1` - Path exists, and is not a directory
    -  * `2` - Path exists, and is a directory
    -  * `[file, entries, ...]` - Path exists, is a directory, and the
    -    array value is the results of `fs.readdir`
    -
    -### Events
    -
    -* `end` When the matching is finished, this is emitted with all the
    -  matches found.  If the `nonull` option is set, and no match was found,
    -  then the `matches` list contains the original pattern.  The matches
    -  are sorted, unless the `nosort` flag is set.
    -* `match` Every time a match is found, this is emitted with the matched.
    -* `error` Emitted when an unexpected error is encountered, or whenever
    -  any fs error occurs if `options.strict` is set.
    -* `abort` When `abort()` is called, this event is raised.
    -
    -### Methods
    -
    -* `abort` Stop the search.
    -
    -### Options
    -
    -All the options that can be passed to Minimatch can also be passed to
    -Glob to change pattern matching behavior.  Also, some have been added,
    -or have glob-specific ramifications.
    -
    -All options are false by default, unless otherwise noted.
    -
    -All options are added to the glob object, as well.
    -
    -* `cwd` The current working directory in which to search.  Defaults
    -  to `process.cwd()`.
    -* `root` The place where patterns starting with `/` will be mounted
    -  onto.  Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix
    -  systems, and `C:\` or some such on Windows.)
    -* `dot` Include `.dot` files in normal matches and `globstar` matches.
    -  Note that an explicit dot in a portion of the pattern will always
    -  match dot files.
    -* `nomount` By default, a pattern starting with a forward-slash will be
    -  "mounted" onto the root setting, so that a valid filesystem path is
    -  returned.  Set this flag to disable that behavior.
    -* `mark` Add a `/` character to directory matches.  Note that this
    -  requires additional stat calls.
    -* `nosort` Don't sort the results.
    -* `stat` Set to true to stat *all* results.  This reduces performance
    -  somewhat, and is completely unnecessary, unless `readdir` is presumed
    -  to be an untrustworthy indicator of file existence.  It will cause
    -  ELOOP to be triggered one level sooner in the case of cyclical
    -  symbolic links.
    -* `silent` When an unusual error is encountered
    -  when attempting to read a directory, a warning will be printed to
    -  stderr.  Set the `silent` option to true to suppress these warnings.
    -* `strict` When an unusual error is encountered
    -  when attempting to read a directory, the process will just continue on
    -  in search of other matches.  Set the `strict` option to raise an error
    -  in these cases.
    -* `cache` See `cache` property above.  Pass in a previously generated
    -  cache object to save some fs calls.
    -* `statCache` A cache of results of filesystem information, to prevent
    -  unnecessary stat calls.  While it should not normally be necessary to
    -  set this, you may pass the statCache from one glob() call to the
    -  options object of another, if you know that the filesystem will not
    -  change between calls.  (See "Race Conditions" below.)
    -* `sync` Perform a synchronous glob search.
    -* `nounique` In some cases, brace-expanded patterns can result in the
    -  same file showing up multiple times in the result set.  By default,
    -  this implementation prevents duplicates in the result set.
    -  Set this flag to disable that behavior.
    -* `nonull` Set to never return an empty set, instead returning a set
    -  containing the pattern itself.  This is the default in glob(3).
    -* `nocase` Perform a case-insensitive match.  Note that case-insensitive
    -  filesystems will sometimes result in glob returning results that are
    -  case-insensitively matched anyway, since readdir and stat will not
    -  raise an error.
    -* `debug` Set to enable debug logging in minimatch and glob.
    -* `globDebug` Set to enable debug logging in glob, but not minimatch.
    -
    -## Comparisons to other fnmatch/glob implementations
    -
    -While strict compliance with the existing standards is a worthwhile
    -goal, some discrepancies exist between node-glob and other
    -implementations, and are intentional.
    -
    -If the pattern starts with a `!` character, then it is negated.  Set the
    -`nonegate` flag to suppress this behavior, and treat leading `!`
    -characters normally.  This is perhaps relevant if you wish to start the
    -pattern with a negative extglob pattern like `!(a|B)`.  Multiple `!`
    -characters at the start of a pattern will negate the pattern multiple
    -times.
    -
    -If a pattern starts with `#`, then it is treated as a comment, and
    -will not match anything.  Use `\#` to match a literal `#` at the
    -start of a line, or set the `nocomment` flag to suppress this behavior.
    -
    -The double-star character `**` is supported by default, unless the
    -`noglobstar` flag is set.  This is supported in the manner of bsdglob
    -and bash 4.1, where `**` only has special significance if it is the only
    -thing in a path part.  That is, `a/**/b` will match `a/x/y/b`, but
    -`a/**b` will not.
    -
    -If an escaped pattern has no matches, and the `nonull` flag is set,
    -then glob returns the pattern as-provided, rather than
    -interpreting the character escapes.  For example,
    -`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
    -`"*a?"`.  This is akin to setting the `nullglob` option in bash, except
    -that it does not resolve escaped pattern characters.
    -
    -If brace expansion is not disabled, then it is performed before any
    -other interpretation of the glob pattern.  Thus, a pattern like
    -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
    -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
    -checked for validity.  Since those two are valid, matching proceeds.
    -
    -## Windows
    -
    -**Please only use forward-slashes in glob expressions.**
    -
    -Though windows uses either `/` or `\` as its path separator, only `/`
    -characters are used by this glob implementation.  You must use
    -forward-slashes **only** in glob expressions.  Back-slashes will always
    -be interpreted as escape characters, not path separators.
    -
    -Results from absolute patterns such as `/foo/*` are mounted onto the
    -root setting using `path.join`.  On windows, this will by default result
    -in `/foo/*` matching `C:\foo\bar.txt`.
    -
    -## Race Conditions
    -
    -Glob searching, by its very nature, is susceptible to race conditions,
    -since it relies on directory walking and such.
    -
    -As a result, it is possible that a file that exists when glob looks for
    -it may have been deleted or modified by the time it returns the result.
    -
    -As part of its internal implementation, this program caches all stat
    -and readdir calls that it makes, in order to cut down on system
    -overhead.  However, this also makes it even more susceptible to races,
    -especially if the cache or statCache objects are reused between glob
    -calls.
    -
    -Users are thus advised not to use a glob result as a guarantee of
    -filesystem state in the face of rapid changes.  For the vast majority
    -of operations, this is never a problem.
    diff --git a/cli/node_modules/mocha/node_modules/glob/examples/g.js b/cli/node_modules/mocha/node_modules/glob/examples/g.js
    deleted file mode 100644
    index be122df00..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/examples/g.js
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -var Glob = require("../").Glob
    -
    -var pattern = "test/a/**/[cg]/../[cg]"
    -console.log(pattern)
    -
    -var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) {
    -  console.log("matches", matches)
    -})
    -console.log("after")
    diff --git a/cli/node_modules/mocha/node_modules/glob/examples/usr-local.js b/cli/node_modules/mocha/node_modules/glob/examples/usr-local.js
    deleted file mode 100644
    index 327a425e4..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/examples/usr-local.js
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -var Glob = require("../").Glob
    -
    -var pattern = "{./*/*,/*,/usr/local/*}"
    -console.log(pattern)
    -
    -var mg = new Glob(pattern, {mark: true}, function (er, matches) {
    -  console.log("matches", matches)
    -})
    -console.log("after")
    diff --git a/cli/node_modules/mocha/node_modules/glob/glob.js b/cli/node_modules/mocha/node_modules/glob/glob.js
    deleted file mode 100644
    index f0118a4f4..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/glob.js
    +++ /dev/null
    @@ -1,675 +0,0 @@
    -// Approach:
    -//
    -// 1. Get the minimatch set
    -// 2. For each pattern in the set, PROCESS(pattern)
    -// 3. Store matches per-set, then uniq them
    -//
    -// PROCESS(pattern)
    -// Get the first [n] items from pattern that are all strings
    -// Join these together.  This is PREFIX.
    -//   If there is no more remaining, then stat(PREFIX) and
    -//   add to matches if it succeeds.  END.
    -// readdir(PREFIX) as ENTRIES
    -//   If fails, END
    -//   If pattern[n] is GLOBSTAR
    -//     // handle the case where the globstar match is empty
    -//     // by pruning it out, and testing the resulting pattern
    -//     PROCESS(pattern[0..n] + pattern[n+1 .. $])
    -//     // handle other cases.
    -//     for ENTRY in ENTRIES (not dotfiles)
    -//       // attach globstar + tail onto the entry
    -//       PROCESS(pattern[0..n] + ENTRY + pattern[n .. $])
    -//
    -//   else // not globstar
    -//     for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
    -//       Test ENTRY against pattern[n]
    -//       If fails, continue
    -//       If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
    -//
    -// Caveat:
    -//   Cache all stats and readdirs results to minimize syscall.  Since all
    -//   we ever care about is existence and directory-ness, we can just keep
    -//   `true` for files, and [children,...] for directories, or `false` for
    -//   things that don't exist.
    -
    -
    -
    -module.exports = glob
    -
    -var fs = require("graceful-fs")
    -, minimatch = require("minimatch")
    -, Minimatch = minimatch.Minimatch
    -, inherits = require("inherits")
    -, EE = require("events").EventEmitter
    -, path = require("path")
    -, isDir = {}
    -, assert = require("assert").ok
    -
    -function glob (pattern, options, cb) {
    -  if (typeof options === "function") cb = options, options = {}
    -  if (!options) options = {}
    -
    -  if (typeof options === "number") {
    -    deprecated()
    -    return
    -  }
    -
    -  var g = new Glob(pattern, options, cb)
    -  return g.sync ? g.found : g
    -}
    -
    -glob.fnmatch = deprecated
    -
    -function deprecated () {
    -  throw new Error("glob's interface has changed. Please see the docs.")
    -}
    -
    -glob.sync = globSync
    -function globSync (pattern, options) {
    -  if (typeof options === "number") {
    -    deprecated()
    -    return
    -  }
    -
    -  options = options || {}
    -  options.sync = true
    -  return glob(pattern, options)
    -}
    -
    -
    -glob.Glob = Glob
    -inherits(Glob, EE)
    -function Glob (pattern, options, cb) {
    -  if (!(this instanceof Glob)) {
    -    return new Glob(pattern, options, cb)
    -  }
    -
    -  if (typeof cb === "function") {
    -    this.on("error", cb)
    -    this.on("end", function (matches) {
    -      cb(null, matches)
    -    })
    -  }
    -
    -  options = options || {}
    -
    -  this.EOF = {}
    -  this._emitQueue = []
    -
    -  this.maxDepth = options.maxDepth || 1000
    -  this.maxLength = options.maxLength || Infinity
    -  this.cache = options.cache || {}
    -  this.statCache = options.statCache || {}
    -
    -  this.changedCwd = false
    -  var cwd = process.cwd()
    -  if (!options.hasOwnProperty("cwd")) this.cwd = cwd
    -  else {
    -    this.cwd = options.cwd
    -    this.changedCwd = path.resolve(options.cwd) !== cwd
    -  }
    -
    -  this.root = options.root || path.resolve(this.cwd, "/")
    -  this.root = path.resolve(this.root)
    -  if (process.platform === "win32")
    -    this.root = this.root.replace(/\\/g, "/")
    -
    -  this.nomount = !!options.nomount
    -
    -  if (!pattern) {
    -    throw new Error("must provide pattern")
    -  }
    -
    -  // base-matching: just use globstar for that.
    -  if (options.matchBase && -1 === pattern.indexOf("/")) {
    -    if (options.noglobstar) {
    -      throw new Error("base matching requires globstar")
    -    }
    -    pattern = "**/" + pattern
    -  }
    -
    -  this.strict = options.strict !== false
    -  this.dot = !!options.dot
    -  this.mark = !!options.mark
    -  this.sync = !!options.sync
    -  this.nounique = !!options.nounique
    -  this.nonull = !!options.nonull
    -  this.nosort = !!options.nosort
    -  this.nocase = !!options.nocase
    -  this.stat = !!options.stat
    -
    -  this.debug = !!options.debug || !!options.globDebug
    -  if (this.debug)
    -    this.log = console.error
    -
    -  this.silent = !!options.silent
    -
    -  var mm = this.minimatch = new Minimatch(pattern, options)
    -  this.options = mm.options
    -  pattern = this.pattern = mm.pattern
    -
    -  this.error = null
    -  this.aborted = false
    -
    -  // list of all the patterns that ** has resolved do, so
    -  // we can avoid visiting multiple times.
    -  this._globstars = {}
    -
    -  EE.call(this)
    -
    -  // process each pattern in the minimatch set
    -  var n = this.minimatch.set.length
    -
    -  // The matches are stored as {: true,...} so that
    -  // duplicates are automagically pruned.
    -  // Later, we do an Object.keys() on these.
    -  // Keep them as a list so we can fill in when nonull is set.
    -  this.matches = new Array(n)
    -
    -  this.minimatch.set.forEach(iterator.bind(this))
    -  function iterator (pattern, i, set) {
    -    this._process(pattern, 0, i, function (er) {
    -      if (er) this.emit("error", er)
    -      if (-- n <= 0) this._finish()
    -    })
    -  }
    -}
    -
    -Glob.prototype.log = function () {}
    -
    -Glob.prototype._finish = function () {
    -  assert(this instanceof Glob)
    -
    -  var nou = this.nounique
    -  , all = nou ? [] : {}
    -
    -  for (var i = 0, l = this.matches.length; i < l; i ++) {
    -    var matches = this.matches[i]
    -    this.log("matches[%d] =", i, matches)
    -    // do like the shell, and spit out the literal glob
    -    if (!matches) {
    -      if (this.nonull) {
    -        var literal = this.minimatch.globSet[i]
    -        if (nou) all.push(literal)
    -        else all[literal] = true
    -      }
    -    } else {
    -      // had matches
    -      var m = Object.keys(matches)
    -      if (nou) all.push.apply(all, m)
    -      else m.forEach(function (m) {
    -        all[m] = true
    -      })
    -    }
    -  }
    -
    -  if (!nou) all = Object.keys(all)
    -
    -  if (!this.nosort) {
    -    all = all.sort(this.nocase ? alphasorti : alphasort)
    -  }
    -
    -  if (this.mark) {
    -    // at *some* point we statted all of these
    -    all = all.map(function (m) {
    -      var sc = this.cache[m]
    -      if (!sc)
    -        return m
    -      var isDir = (Array.isArray(sc) || sc === 2)
    -      if (isDir && m.slice(-1) !== "/") {
    -        return m + "/"
    -      }
    -      if (!isDir && m.slice(-1) === "/") {
    -        return m.replace(/\/+$/, "")
    -      }
    -      return m
    -    }, this)
    -  }
    -
    -  this.log("emitting end", all)
    -
    -  this.EOF = this.found = all
    -  this.emitMatch(this.EOF)
    -}
    -
    -function alphasorti (a, b) {
    -  a = a.toLowerCase()
    -  b = b.toLowerCase()
    -  return alphasort(a, b)
    -}
    -
    -function alphasort (a, b) {
    -  return a > b ? 1 : a < b ? -1 : 0
    -}
    -
    -Glob.prototype.abort = function () {
    -  this.aborted = true
    -  this.emit("abort")
    -}
    -
    -Glob.prototype.pause = function () {
    -  if (this.paused) return
    -  if (this.sync)
    -    this.emit("error", new Error("Can't pause/resume sync glob"))
    -  this.paused = true
    -  this.emit("pause")
    -}
    -
    -Glob.prototype.resume = function () {
    -  if (!this.paused) return
    -  if (this.sync)
    -    this.emit("error", new Error("Can't pause/resume sync glob"))
    -  this.paused = false
    -  this.emit("resume")
    -  this._processEmitQueue()
    -  //process.nextTick(this.emit.bind(this, "resume"))
    -}
    -
    -Glob.prototype.emitMatch = function (m) {
    -  if (!this.stat || this.statCache[m] || m === this.EOF) {
    -    this._emitQueue.push(m)
    -    this._processEmitQueue()
    -  } else {
    -    this._stat(m, function(exists, isDir) {
    -      if (exists) {
    -        this._emitQueue.push(m)
    -        this._processEmitQueue()
    -      }
    -    })
    -  }
    -}
    -
    -Glob.prototype._processEmitQueue = function (m) {
    -  while (!this._processingEmitQueue &&
    -         !this.paused) {
    -    this._processingEmitQueue = true
    -    var m = this._emitQueue.shift()
    -    if (!m) {
    -      this._processingEmitQueue = false
    -      break
    -    }
    -
    -    this.log('emit!', m === this.EOF ? "end" : "match")
    -
    -    this.emit(m === this.EOF ? "end" : "match", m)
    -    this._processingEmitQueue = false
    -  }
    -}
    -
    -Glob.prototype._process = function (pattern, depth, index, cb_) {
    -  assert(this instanceof Glob)
    -
    -  var cb = function cb (er, res) {
    -    assert(this instanceof Glob)
    -    if (this.paused) {
    -      if (!this._processQueue) {
    -        this._processQueue = []
    -        this.once("resume", function () {
    -          var q = this._processQueue
    -          this._processQueue = null
    -          q.forEach(function (cb) { cb() })
    -        })
    -      }
    -      this._processQueue.push(cb_.bind(this, er, res))
    -    } else {
    -      cb_.call(this, er, res)
    -    }
    -  }.bind(this)
    -
    -  if (this.aborted) return cb()
    -
    -  if (depth > this.maxDepth) return cb()
    -
    -  // Get the first [n] parts of pattern that are all strings.
    -  var n = 0
    -  while (typeof pattern[n] === "string") {
    -    n ++
    -  }
    -  // now n is the index of the first one that is *not* a string.
    -
    -  // see if there's anything else
    -  var prefix
    -  switch (n) {
    -    // if not, then this is rather simple
    -    case pattern.length:
    -      prefix = pattern.join("/")
    -      this._stat(prefix, function (exists, isDir) {
    -        // either it's there, or it isn't.
    -        // nothing more to do, either way.
    -        if (exists) {
    -          if (prefix && isAbsolute(prefix) && !this.nomount) {
    -            if (prefix.charAt(0) === "/") {
    -              prefix = path.join(this.root, prefix)
    -            } else {
    -              prefix = path.resolve(this.root, prefix)
    -            }
    -          }
    -
    -          if (process.platform === "win32")
    -            prefix = prefix.replace(/\\/g, "/")
    -
    -          this.matches[index] = this.matches[index] || {}
    -          this.matches[index][prefix] = true
    -          this.emitMatch(prefix)
    -        }
    -        return cb()
    -      })
    -      return
    -
    -    case 0:
    -      // pattern *starts* with some non-trivial item.
    -      // going to readdir(cwd), but not include the prefix in matches.
    -      prefix = null
    -      break
    -
    -    default:
    -      // pattern has some string bits in the front.
    -      // whatever it starts with, whether that's "absolute" like /foo/bar,
    -      // or "relative" like "../baz"
    -      prefix = pattern.slice(0, n)
    -      prefix = prefix.join("/")
    -      break
    -  }
    -
    -  // get the list of entries.
    -  var read
    -  if (prefix === null) read = "."
    -  else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) {
    -    if (!prefix || !isAbsolute(prefix)) {
    -      prefix = path.join("/", prefix)
    -    }
    -    read = prefix = path.resolve(prefix)
    -
    -    // if (process.platform === "win32")
    -    //   read = prefix = prefix.replace(/^[a-zA-Z]:|\\/g, "/")
    -
    -    this.log('absolute: ', prefix, this.root, pattern, read)
    -  } else {
    -    read = prefix
    -  }
    -
    -  this.log('readdir(%j)', read, this.cwd, this.root)
    -
    -  return this._readdir(read, function (er, entries) {
    -    if (er) {
    -      // not a directory!
    -      // this means that, whatever else comes after this, it can never match
    -      return cb()
    -    }
    -
    -    // globstar is special
    -    if (pattern[n] === minimatch.GLOBSTAR) {
    -      // test without the globstar, and with every child both below
    -      // and replacing the globstar.
    -      var s = [ pattern.slice(0, n).concat(pattern.slice(n + 1)) ]
    -      entries.forEach(function (e) {
    -        if (e.charAt(0) === "." && !this.dot) return
    -        // instead of the globstar
    -        s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1)))
    -        // below the globstar
    -        s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n)))
    -      }, this)
    -
    -      s = s.filter(function (pattern) {
    -        var key = gsKey(pattern)
    -        var seen = !this._globstars[key]
    -        this._globstars[key] = true
    -        return seen
    -      }, this)
    -
    -      if (!s.length)
    -        return cb()
    -
    -      // now asyncForEach over this
    -      var l = s.length
    -      , errState = null
    -      s.forEach(function (gsPattern) {
    -        this._process(gsPattern, depth + 1, index, function (er) {
    -          if (errState) return
    -          if (er) return cb(errState = er)
    -          if (--l <= 0) return cb()
    -        })
    -      }, this)
    -
    -      return
    -    }
    -
    -    // not a globstar
    -    // It will only match dot entries if it starts with a dot, or if
    -    // dot is set.  Stuff like @(.foo|.bar) isn't allowed.
    -    var pn = pattern[n]
    -    var rawGlob = pattern[n]._glob
    -    , dotOk = this.dot || rawGlob.charAt(0) === "."
    -
    -    entries = entries.filter(function (e) {
    -      return (e.charAt(0) !== "." || dotOk) &&
    -             e.match(pattern[n])
    -    })
    -
    -    // If n === pattern.length - 1, then there's no need for the extra stat
    -    // *unless* the user has specified "mark" or "stat" explicitly.
    -    // We know that they exist, since the readdir returned them.
    -    if (n === pattern.length - 1 &&
    -        !this.mark &&
    -        !this.stat) {
    -      entries.forEach(function (e) {
    -        if (prefix) {
    -          if (prefix !== "/") e = prefix + "/" + e
    -          else e = prefix + e
    -        }
    -        if (e.charAt(0) === "/" && !this.nomount) {
    -          e = path.join(this.root, e)
    -        }
    -
    -        if (process.platform === "win32")
    -          e = e.replace(/\\/g, "/")
    -
    -        this.matches[index] = this.matches[index] || {}
    -        this.matches[index][e] = true
    -        this.emitMatch(e)
    -      }, this)
    -      return cb.call(this)
    -    }
    -
    -
    -    // now test all the remaining entries as stand-ins for that part
    -    // of the pattern.
    -    var l = entries.length
    -    , errState = null
    -    if (l === 0) return cb() // no matches possible
    -    entries.forEach(function (e) {
    -      var p = pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1))
    -      this._process(p, depth + 1, index, function (er) {
    -        if (errState) return
    -        if (er) return cb(errState = er)
    -        if (--l === 0) return cb.call(this)
    -      })
    -    }, this)
    -  })
    -
    -}
    -
    -function gsKey (pattern) {
    -  return '**' + pattern.map(function (p) {
    -    return (p === minimatch.GLOBSTAR) ? '**' : (''+p)
    -  }).join('/')
    -}
    -
    -Glob.prototype._stat = function (f, cb) {
    -  assert(this instanceof Glob)
    -  var abs = f
    -  if (f.charAt(0) === "/") {
    -    abs = path.join(this.root, f)
    -  } else if (this.changedCwd) {
    -    abs = path.resolve(this.cwd, f)
    -  }
    -
    -  if (f.length > this.maxLength) {
    -    var er = new Error("Path name too long")
    -    er.code = "ENAMETOOLONG"
    -    er.path = f
    -    return this._afterStat(f, abs, cb, er)
    -  }
    -
    -  this.log('stat', [this.cwd, f, '=', abs])
    -
    -  if (!this.stat && this.cache.hasOwnProperty(f)) {
    -    var exists = this.cache[f]
    -    , isDir = exists && (Array.isArray(exists) || exists === 2)
    -    if (this.sync) return cb.call(this, !!exists, isDir)
    -    return process.nextTick(cb.bind(this, !!exists, isDir))
    -  }
    -
    -  var stat = this.statCache[abs]
    -  if (this.sync || stat) {
    -    var er
    -    try {
    -      stat = fs.statSync(abs)
    -    } catch (e) {
    -      er = e
    -    }
    -    this._afterStat(f, abs, cb, er, stat)
    -  } else {
    -    fs.stat(abs, this._afterStat.bind(this, f, abs, cb))
    -  }
    -}
    -
    -Glob.prototype._afterStat = function (f, abs, cb, er, stat) {
    -  var exists
    -  assert(this instanceof Glob)
    -
    -  if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) {
    -    this.log("should be ENOTDIR, fake it")
    -
    -    er = new Error("ENOTDIR, not a directory '" + abs + "'")
    -    er.path = abs
    -    er.code = "ENOTDIR"
    -    stat = null
    -  }
    -
    -  var emit = !this.statCache[abs]
    -  this.statCache[abs] = stat
    -
    -  if (er || !stat) {
    -    exists = false
    -  } else {
    -    exists = stat.isDirectory() ? 2 : 1
    -    if (emit)
    -      this.emit('stat', f, stat)
    -  }
    -  this.cache[f] = this.cache[f] || exists
    -  cb.call(this, !!exists, exists === 2)
    -}
    -
    -Glob.prototype._readdir = function (f, cb) {
    -  assert(this instanceof Glob)
    -  var abs = f
    -  if (f.charAt(0) === "/") {
    -    abs = path.join(this.root, f)
    -  } else if (isAbsolute(f)) {
    -    abs = f
    -  } else if (this.changedCwd) {
    -    abs = path.resolve(this.cwd, f)
    -  }
    -
    -  if (f.length > this.maxLength) {
    -    var er = new Error("Path name too long")
    -    er.code = "ENAMETOOLONG"
    -    er.path = f
    -    return this._afterReaddir(f, abs, cb, er)
    -  }
    -
    -  this.log('readdir', [this.cwd, f, abs])
    -  if (this.cache.hasOwnProperty(f)) {
    -    var c = this.cache[f]
    -    if (Array.isArray(c)) {
    -      if (this.sync) return cb.call(this, null, c)
    -      return process.nextTick(cb.bind(this, null, c))
    -    }
    -
    -    if (!c || c === 1) {
    -      // either ENOENT or ENOTDIR
    -      var code = c ? "ENOTDIR" : "ENOENT"
    -      , er = new Error((c ? "Not a directory" : "Not found") + ": " + f)
    -      er.path = f
    -      er.code = code
    -      this.log(f, er)
    -      if (this.sync) return cb.call(this, er)
    -      return process.nextTick(cb.bind(this, er))
    -    }
    -
    -    // at this point, c === 2, meaning it's a dir, but we haven't
    -    // had to read it yet, or c === true, meaning it's *something*
    -    // but we don't have any idea what.  Need to read it, either way.
    -  }
    -
    -  if (this.sync) {
    -    var er, entries
    -    try {
    -      entries = fs.readdirSync(abs)
    -    } catch (e) {
    -      er = e
    -    }
    -    return this._afterReaddir(f, abs, cb, er, entries)
    -  }
    -
    -  fs.readdir(abs, this._afterReaddir.bind(this, f, abs, cb))
    -}
    -
    -Glob.prototype._afterReaddir = function (f, abs, cb, er, entries) {
    -  assert(this instanceof Glob)
    -  if (entries && !er) {
    -    this.cache[f] = entries
    -    // if we haven't asked to stat everything for suresies, then just
    -    // assume that everything in there exists, so we can avoid
    -    // having to stat it a second time.  This also gets us one step
    -    // further into ELOOP territory.
    -    if (!this.mark && !this.stat) {
    -      entries.forEach(function (e) {
    -        if (f === "/") e = f + e
    -        else e = f + "/" + e
    -        this.cache[e] = true
    -      }, this)
    -    }
    -
    -    return cb.call(this, er, entries)
    -  }
    -
    -  // now handle errors, and cache the information
    -  if (er) switch (er.code) {
    -    case "ENOTDIR": // totally normal. means it *does* exist.
    -      this.cache[f] = 1
    -      return cb.call(this, er)
    -    case "ENOENT": // not terribly unusual
    -    case "ELOOP":
    -    case "ENAMETOOLONG":
    -    case "UNKNOWN":
    -      this.cache[f] = false
    -      return cb.call(this, er)
    -    default: // some unusual error.  Treat as failure.
    -      this.cache[f] = false
    -      if (this.strict) this.emit("error", er)
    -      if (!this.silent) console.error("glob error", er)
    -      return cb.call(this, er)
    -  }
    -}
    -
    -var isAbsolute = process.platform === "win32" ? absWin : absUnix
    -
    -function absWin (p) {
    -  if (absUnix(p)) return true
    -  // pull off the device/UNC bit from a windows path.
    -  // from node's lib/path.js
    -  var splitDeviceRe =
    -      /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/
    -    , result = splitDeviceRe.exec(p)
    -    , device = result[1] || ''
    -    , isUnc = device && device.charAt(1) !== ':'
    -    , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute
    -
    -  return isAbsolute
    -}
    -
    -function absUnix (p) {
    -  return p.charAt(0) === "/" || p === ""
    -}
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/.npmignore b/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/.npmignore
    deleted file mode 100644
    index c2658d7d1..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/.npmignore
    +++ /dev/null
    @@ -1 +0,0 @@
    -node_modules/
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/LICENSE b/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/LICENSE
    deleted file mode 100644
    index 0c44ae716..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/LICENSE
    +++ /dev/null
    @@ -1,27 +0,0 @@
    -Copyright (c) Isaac Z. Schlueter ("Author")
    -All rights reserved.
    -
    -The BSD License
    -
    -Redistribution and use in source and binary forms, with or without
    -modification, are permitted provided that the following conditions
    -are met:
    -
    -1. Redistributions of source code must retain the above copyright
    -   notice, this list of conditions and the following disclaimer.
    -
    -2. Redistributions in binary form must reproduce the above copyright
    -   notice, this list of conditions and the following disclaimer in the
    -   documentation and/or other materials provided with the distribution.
    -
    -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
    -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    -PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
    -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
    -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
    -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
    -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/README.md b/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/README.md
    deleted file mode 100644
    index eb1a10935..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/README.md
    +++ /dev/null
    @@ -1,26 +0,0 @@
    -# graceful-fs
    -
    -graceful-fs functions as a drop-in replacement for the fs module,
    -making various improvements.
    -
    -The improvements are meant to normalize behavior across different
    -platforms and environments, and to make filesystem access more
    -resilient to errors.
    -
    -## Improvements over fs module
    -
    -graceful-fs:
    -
    -* Queues up `open` and `readdir` calls, and retries them once
    -  something closes if there is an EMFILE error from too many file
    -  descriptors.
    -* fixes `lchmod` for Node versions prior to 0.6.2.
    -* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
    -* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
    -  `lchown` if the user isn't root.
    -* makes `lchmod` and `lchown` become noops, if not available.
    -* retries reading a file if `read` results in EAGAIN error.
    -
    -On Windows, it retries renaming a file for up to one second if `EACCESS`
    -or `EPERM` error occurs, likely because antivirus software has locked
    -the directory.
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/graceful-fs.js b/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/graceful-fs.js
    deleted file mode 100644
    index c84db9101..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/graceful-fs.js
    +++ /dev/null
    @@ -1,160 +0,0 @@
    -// Monkey-patching the fs module.
    -// It's ugly, but there is simply no other way to do this.
    -var fs = module.exports = require('fs')
    -
    -var assert = require('assert')
    -
    -// fix up some busted stuff, mostly on windows and old nodes
    -require('./polyfills.js')
    -
    -// The EMFILE enqueuing stuff
    -
    -var util = require('util')
    -
    -function noop () {}
    -
    -var debug = noop
    -if (util.debuglog)
    -  debug = util.debuglog('gfs')
    -else if (/\bgfs\b/i.test(process.env.NODE_DEBUG || ''))
    -  debug = function() {
    -    var m = util.format.apply(util, arguments)
    -    m = 'GFS: ' + m.split(/\n/).join('\nGFS: ')
    -    console.error(m)
    -  }
    -
    -if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) {
    -  process.on('exit', function() {
    -    debug('fds', fds)
    -    debug(queue)
    -    assert.equal(queue.length, 0)
    -  })
    -}
    -
    -
    -var originalOpen = fs.open
    -fs.open = open
    -
    -function open(path, flags, mode, cb) {
    -  if (typeof mode === "function") cb = mode, mode = null
    -  if (typeof cb !== "function") cb = noop
    -  new OpenReq(path, flags, mode, cb)
    -}
    -
    -function OpenReq(path, flags, mode, cb) {
    -  this.path = path
    -  this.flags = flags
    -  this.mode = mode
    -  this.cb = cb
    -  Req.call(this)
    -}
    -
    -util.inherits(OpenReq, Req)
    -
    -OpenReq.prototype.process = function() {
    -  originalOpen.call(fs, this.path, this.flags, this.mode, this.done)
    -}
    -
    -var fds = {}
    -OpenReq.prototype.done = function(er, fd) {
    -  debug('open done', er, fd)
    -  if (fd)
    -    fds['fd' + fd] = this.path
    -  Req.prototype.done.call(this, er, fd)
    -}
    -
    -
    -var originalReaddir = fs.readdir
    -fs.readdir = readdir
    -
    -function readdir(path, cb) {
    -  if (typeof cb !== "function") cb = noop
    -  new ReaddirReq(path, cb)
    -}
    -
    -function ReaddirReq(path, cb) {
    -  this.path = path
    -  this.cb = cb
    -  Req.call(this)
    -}
    -
    -util.inherits(ReaddirReq, Req)
    -
    -ReaddirReq.prototype.process = function() {
    -  originalReaddir.call(fs, this.path, this.done)
    -}
    -
    -ReaddirReq.prototype.done = function(er, files) {
    -  if (files && files.sort)
    -    files = files.sort()
    -  Req.prototype.done.call(this, er, files)
    -  onclose()
    -}
    -
    -
    -var originalClose = fs.close
    -fs.close = close
    -
    -function close (fd, cb) {
    -  debug('close', fd)
    -  if (typeof cb !== "function") cb = noop
    -  delete fds['fd' + fd]
    -  originalClose.call(fs, fd, function(er) {
    -    onclose()
    -    cb(er)
    -  })
    -}
    -
    -
    -var originalCloseSync = fs.closeSync
    -fs.closeSync = closeSync
    -
    -function closeSync (fd) {
    -  try {
    -    return originalCloseSync(fd)
    -  } finally {
    -    onclose()
    -  }
    -}
    -
    -
    -// Req class
    -function Req () {
    -  // start processing
    -  this.done = this.done.bind(this)
    -  this.failures = 0
    -  this.process()
    -}
    -
    -Req.prototype.done = function (er, result) {
    -  var tryAgain = false
    -  if (er) {
    -    var code = er.code
    -    var tryAgain = code === "EMFILE"
    -    if (process.platform === "win32")
    -      tryAgain = tryAgain || code === "OK"
    -  }
    -
    -  if (tryAgain) {
    -    this.failures ++
    -    enqueue(this)
    -  } else {
    -    var cb = this.cb
    -    cb(er, result)
    -  }
    -}
    -
    -var queue = []
    -
    -function enqueue(req) {
    -  queue.push(req)
    -  debug('enqueue %d %s', queue.length, req.constructor.name, req)
    -}
    -
    -function onclose() {
    -  var req = queue.shift()
    -  if (req) {
    -    debug('process', req.constructor.name, req)
    -    req.process()
    -  }
    -}
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/package.json b/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/package.json
    deleted file mode 100644
    index 7ee49d466..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/package.json
    +++ /dev/null
    @@ -1,65 +0,0 @@
    -{
    -  "author": {
    -    "name": "Isaac Z. Schlueter",
    -    "email": "i@izs.me",
    -    "url": "http://blog.izs.me"
    -  },
    -  "name": "graceful-fs",
    -  "description": "A drop-in replacement for fs, making various improvements.",
    -  "version": "2.0.3",
    -  "repository": {
    -    "type": "git",
    -    "url": "git://github.com/isaacs/node-graceful-fs.git"
    -  },
    -  "main": "graceful-fs.js",
    -  "engines": {
    -    "node": ">=0.4.0"
    -  },
    -  "directories": {
    -    "test": "test"
    -  },
    -  "scripts": {
    -    "test": "tap test/*.js"
    -  },
    -  "keywords": [
    -    "fs",
    -    "module",
    -    "reading",
    -    "retry",
    -    "retries",
    -    "queue",
    -    "error",
    -    "errors",
    -    "handling",
    -    "EMFILE",
    -    "EAGAIN",
    -    "EINVAL",
    -    "EPERM",
    -    "EACCESS"
    -  ],
    -  "license": "BSD",
    -  "bugs": {
    -    "url": "https://github.com/isaacs/node-graceful-fs/issues"
    -  },
    -  "homepage": "https://github.com/isaacs/node-graceful-fs",
    -  "_id": "graceful-fs@2.0.3",
    -  "dist": {
    -    "shasum": "7cd2cdb228a4a3f36e95efa6cc142de7d1a136d0",
    -    "tarball": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.3.tgz"
    -  },
    -  "_from": "graceful-fs@>=2.0.0 <2.1.0",
    -  "_npmVersion": "1.4.6",
    -  "_npmUser": {
    -    "name": "isaacs",
    -    "email": "i@izs.me"
    -  },
    -  "maintainers": [
    -    {
    -      "name": "isaacs",
    -      "email": "i@izs.me"
    -    }
    -  ],
    -  "_shasum": "7cd2cdb228a4a3f36e95efa6cc142de7d1a136d0",
    -  "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.3.tgz",
    -  "readme": "ERROR: No README data found!"
    -}
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/polyfills.js b/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/polyfills.js
    deleted file mode 100644
    index afc83b3f2..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/polyfills.js
    +++ /dev/null
    @@ -1,228 +0,0 @@
    -var fs = require('fs')
    -var constants = require('constants')
    -
    -var origCwd = process.cwd
    -var cwd = null
    -process.cwd = function() {
    -  if (!cwd)
    -    cwd = origCwd.call(process)
    -  return cwd
    -}
    -var chdir = process.chdir
    -process.chdir = function(d) {
    -  cwd = null
    -  chdir.call(process, d)
    -}
    -
    -// (re-)implement some things that are known busted or missing.
    -
    -// lchmod, broken prior to 0.6.2
    -// back-port the fix here.
    -if (constants.hasOwnProperty('O_SYMLINK') &&
    -    process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
    -  fs.lchmod = function (path, mode, callback) {
    -    callback = callback || noop
    -    fs.open( path
    -           , constants.O_WRONLY | constants.O_SYMLINK
    -           , mode
    -           , function (err, fd) {
    -      if (err) {
    -        callback(err)
    -        return
    -      }
    -      // prefer to return the chmod error, if one occurs,
    -      // but still try to close, and report closing errors if they occur.
    -      fs.fchmod(fd, mode, function (err) {
    -        fs.close(fd, function(err2) {
    -          callback(err || err2)
    -        })
    -      })
    -    })
    -  }
    -
    -  fs.lchmodSync = function (path, mode) {
    -    var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
    -
    -    // prefer to return the chmod error, if one occurs,
    -    // but still try to close, and report closing errors if they occur.
    -    var err, err2
    -    try {
    -      var ret = fs.fchmodSync(fd, mode)
    -    } catch (er) {
    -      err = er
    -    }
    -    try {
    -      fs.closeSync(fd)
    -    } catch (er) {
    -      err2 = er
    -    }
    -    if (err || err2) throw (err || err2)
    -    return ret
    -  }
    -}
    -
    -
    -// lutimes implementation, or no-op
    -if (!fs.lutimes) {
    -  if (constants.hasOwnProperty("O_SYMLINK")) {
    -    fs.lutimes = function (path, at, mt, cb) {
    -      fs.open(path, constants.O_SYMLINK, function (er, fd) {
    -        cb = cb || noop
    -        if (er) return cb(er)
    -        fs.futimes(fd, at, mt, function (er) {
    -          fs.close(fd, function (er2) {
    -            return cb(er || er2)
    -          })
    -        })
    -      })
    -    }
    -
    -    fs.lutimesSync = function (path, at, mt) {
    -      var fd = fs.openSync(path, constants.O_SYMLINK)
    -        , err
    -        , err2
    -        , ret
    -
    -      try {
    -        var ret = fs.futimesSync(fd, at, mt)
    -      } catch (er) {
    -        err = er
    -      }
    -      try {
    -        fs.closeSync(fd)
    -      } catch (er) {
    -        err2 = er
    -      }
    -      if (err || err2) throw (err || err2)
    -      return ret
    -    }
    -
    -  } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) {
    -    // maybe utimensat will be bound soonish?
    -    fs.lutimes = function (path, at, mt, cb) {
    -      fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb)
    -    }
    -
    -    fs.lutimesSync = function (path, at, mt) {
    -      return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW)
    -    }
    -
    -  } else {
    -    fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) }
    -    fs.lutimesSync = function () {}
    -  }
    -}
    -
    -
    -// https://github.com/isaacs/node-graceful-fs/issues/4
    -// Chown should not fail on einval or eperm if non-root.
    -
    -fs.chown = chownFix(fs.chown)
    -fs.fchown = chownFix(fs.fchown)
    -fs.lchown = chownFix(fs.lchown)
    -
    -fs.chownSync = chownFixSync(fs.chownSync)
    -fs.fchownSync = chownFixSync(fs.fchownSync)
    -fs.lchownSync = chownFixSync(fs.lchownSync)
    -
    -function chownFix (orig) {
    -  if (!orig) return orig
    -  return function (target, uid, gid, cb) {
    -    return orig.call(fs, target, uid, gid, function (er, res) {
    -      if (chownErOk(er)) er = null
    -      cb(er, res)
    -    })
    -  }
    -}
    -
    -function chownFixSync (orig) {
    -  if (!orig) return orig
    -  return function (target, uid, gid) {
    -    try {
    -      return orig.call(fs, target, uid, gid)
    -    } catch (er) {
    -      if (!chownErOk(er)) throw er
    -    }
    -  }
    -}
    -
    -function chownErOk (er) {
    -  // if there's no getuid, or if getuid() is something other than 0,
    -  // and the error is EINVAL or EPERM, then just ignore it.
    -  // This specific case is a silent failure in cp, install, tar,
    -  // and most other unix tools that manage permissions.
    -  // When running as root, or if other types of errors are encountered,
    -  // then it's strict.
    -  if (!er || (!process.getuid || process.getuid() !== 0)
    -      && (er.code === "EINVAL" || er.code === "EPERM")) return true
    -}
    -
    -
    -// if lchmod/lchown do not exist, then make them no-ops
    -if (!fs.lchmod) {
    -  fs.lchmod = function (path, mode, cb) {
    -    process.nextTick(cb)
    -  }
    -  fs.lchmodSync = function () {}
    -}
    -if (!fs.lchown) {
    -  fs.lchown = function (path, uid, gid, cb) {
    -    process.nextTick(cb)
    -  }
    -  fs.lchownSync = function () {}
    -}
    -
    -
    -
    -// on Windows, A/V software can lock the directory, causing this
    -// to fail with an EACCES or EPERM if the directory contains newly
    -// created files.  Try again on failure, for up to 1 second.
    -if (process.platform === "win32") {
    -  var rename_ = fs.rename
    -  fs.rename = function rename (from, to, cb) {
    -    var start = Date.now()
    -    rename_(from, to, function CB (er) {
    -      if (er
    -          && (er.code === "EACCES" || er.code === "EPERM")
    -          && Date.now() - start < 1000) {
    -        return rename_(from, to, CB)
    -      }
    -      cb(er)
    -    })
    -  }
    -}
    -
    -
    -// if read() returns EAGAIN, then just try it again.
    -var read = fs.read
    -fs.read = function (fd, buffer, offset, length, position, callback_) {
    -  var callback
    -  if (callback_ && typeof callback_ === 'function') {
    -    var eagCounter = 0
    -    callback = function (er, _, __) {
    -      if (er && er.code === 'EAGAIN' && eagCounter < 10) {
    -        eagCounter ++
    -        return read.call(fs, fd, buffer, offset, length, position, callback)
    -      }
    -      callback_.apply(this, arguments)
    -    }
    -  }
    -  return read.call(fs, fd, buffer, offset, length, position, callback)
    -}
    -
    -var readSync = fs.readSync
    -fs.readSync = function (fd, buffer, offset, length, position) {
    -  var eagCounter = 0
    -  while (true) {
    -    try {
    -      return readSync.call(fs, fd, buffer, offset, length, position)
    -    } catch (er) {
    -      if (er.code === 'EAGAIN' && eagCounter < 10) {
    -        eagCounter ++
    -        continue
    -      }
    -      throw er
    -    }
    -  }
    -}
    -
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/test/open.js b/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/test/open.js
    deleted file mode 100644
    index 104f36b0b..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/test/open.js
    +++ /dev/null
    @@ -1,39 +0,0 @@
    -var test = require('tap').test
    -var fs = require('../graceful-fs.js')
    -
    -test('graceful fs is monkeypatched fs', function (t) {
    -  t.equal(fs, require('fs'))
    -  t.end()
    -})
    -
    -test('open an existing file works', function (t) {
    -  var fd = fs.openSync(__filename, 'r')
    -  fs.closeSync(fd)
    -  fs.open(__filename, 'r', function (er, fd) {
    -    if (er) throw er
    -    fs.close(fd, function (er) {
    -      if (er) throw er
    -      t.pass('works')
    -      t.end()
    -    })
    -  })
    -})
    -
    -test('open a non-existing file throws', function (t) {
    -  var er
    -  try {
    -    var fd = fs.openSync('this file does not exist', 'r')
    -  } catch (x) {
    -    er = x
    -  }
    -  t.ok(er, 'should throw')
    -  t.notOk(fd, 'should not get an fd')
    -  t.equal(er.code, 'ENOENT')
    -
    -  fs.open('neither does this file', 'r', function (er, fd) {
    -    t.ok(er, 'should throw')
    -    t.notOk(fd, 'should not get an fd')
    -    t.equal(er.code, 'ENOENT')
    -    t.end()
    -  })
    -})
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/test/readdir-sort.js b/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/test/readdir-sort.js
    deleted file mode 100644
    index aeaedf1c1..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/test/readdir-sort.js
    +++ /dev/null
    @@ -1,21 +0,0 @@
    -var test = require("tap").test
    -var fs = require("fs")
    -
    -var readdir = fs.readdir
    -fs.readdir = function(path, cb) {
    -  process.nextTick(function() {
    -    cb(null, ["b", "z", "a"])
    -  })
    -}
    -
    -var g = require("../")
    -
    -test("readdir reorder", function (t) {
    -  g.readdir("whatevers", function (er, files) {
    -    if (er)
    -      throw er
    -    console.error(files)
    -    t.same(files, [ "a", "b", "z" ])
    -    t.end()
    -  })
    -})
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/inherits/LICENSE b/cli/node_modules/mocha/node_modules/glob/node_modules/inherits/LICENSE
    deleted file mode 100644
    index dea3013d6..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/inherits/LICENSE
    +++ /dev/null
    @@ -1,16 +0,0 @@
    -The ISC License
    -
    -Copyright (c) Isaac Z. Schlueter
    -
    -Permission to use, copy, modify, and/or distribute this software for any
    -purpose with or without fee is hereby granted, provided that the above
    -copyright notice and this permission notice appear in all copies.
    -
    -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
    -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    -PERFORMANCE OF THIS SOFTWARE.
    -
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/inherits/README.md b/cli/node_modules/mocha/node_modules/glob/node_modules/inherits/README.md
    deleted file mode 100644
    index b1c566585..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/inherits/README.md
    +++ /dev/null
    @@ -1,42 +0,0 @@
    -Browser-friendly inheritance fully compatible with standard node.js
    -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).
    -
    -This package exports standard `inherits` from node.js `util` module in
    -node environment, but also provides alternative browser-friendly
    -implementation through [browser
    -field](https://gist.github.com/shtylman/4339901). Alternative
    -implementation is a literal copy of standard one located in standalone
    -module to avoid requiring of `util`. It also has a shim for old
    -browsers with no `Object.create` support.
    -
    -While keeping you sure you are using standard `inherits`
    -implementation in node.js environment, it allows bundlers such as
    -[browserify](https://github.com/substack/node-browserify) to not
    -include full `util` package to your client code if all you need is
    -just `inherits` function. It worth, because browser shim for `util`
    -package is large and `inherits` is often the single function you need
    -from it.
    -
    -It's recommended to use this package instead of
    -`require('util').inherits` for any code that has chances to be used
    -not only in node.js but in browser too.
    -
    -## usage
    -
    -```js
    -var inherits = require('inherits');
    -// then use exactly as the standard one
    -```
    -
    -## note on version ~1.0
    -
    -Version ~1.0 had completely different motivation and is not compatible
    -neither with 2.0 nor with standard node.js `inherits`.
    -
    -If you are using version ~1.0 and planning to switch to ~2.0, be
    -careful:
    -
    -* new version uses `super_` instead of `super` for referencing
    -  superclass
    -* new version overwrites current prototype while old one preserves any
    -  existing fields on it
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits.js b/cli/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits.js
    deleted file mode 100644
    index 29f5e24f5..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits.js
    +++ /dev/null
    @@ -1 +0,0 @@
    -module.exports = require('util').inherits
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits_browser.js b/cli/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits_browser.js
    deleted file mode 100644
    index c1e78a75e..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits_browser.js
    +++ /dev/null
    @@ -1,23 +0,0 @@
    -if (typeof Object.create === 'function') {
    -  // implementation from standard node.js 'util' module
    -  module.exports = function inherits(ctor, superCtor) {
    -    ctor.super_ = superCtor
    -    ctor.prototype = Object.create(superCtor.prototype, {
    -      constructor: {
    -        value: ctor,
    -        enumerable: false,
    -        writable: true,
    -        configurable: true
    -      }
    -    });
    -  };
    -} else {
    -  // old school shim for old browsers
    -  module.exports = function inherits(ctor, superCtor) {
    -    ctor.super_ = superCtor
    -    var TempCtor = function () {}
    -    TempCtor.prototype = superCtor.prototype
    -    ctor.prototype = new TempCtor()
    -    ctor.prototype.constructor = ctor
    -  }
    -}
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/inherits/package.json b/cli/node_modules/mocha/node_modules/glob/node_modules/inherits/package.json
    deleted file mode 100644
    index a703bddd5..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/inherits/package.json
    +++ /dev/null
    @@ -1,50 +0,0 @@
    -{
    -  "name": "inherits",
    -  "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
    -  "version": "2.0.1",
    -  "keywords": [
    -    "inheritance",
    -    "class",
    -    "klass",
    -    "oop",
    -    "object-oriented",
    -    "inherits",
    -    "browser",
    -    "browserify"
    -  ],
    -  "main": "./inherits.js",
    -  "browser": "./inherits_browser.js",
    -  "repository": {
    -    "type": "git",
    -    "url": "git://github.com/isaacs/inherits"
    -  },
    -  "license": "ISC",
    -  "scripts": {
    -    "test": "node test"
    -  },
    -  "bugs": {
    -    "url": "https://github.com/isaacs/inherits/issues"
    -  },
    -  "_id": "inherits@2.0.1",
    -  "dist": {
    -    "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1",
    -    "tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
    -  },
    -  "_from": "inherits@>=2.0.0 <3.0.0",
    -  "_npmVersion": "1.3.8",
    -  "_npmUser": {
    -    "name": "isaacs",
    -    "email": "i@izs.me"
    -  },
    -  "maintainers": [
    -    {
    -      "name": "isaacs",
    -      "email": "i@izs.me"
    -    }
    -  ],
    -  "directories": {},
    -  "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1",
    -  "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
    -  "readme": "ERROR: No README data found!",
    -  "homepage": "https://github.com/isaacs/inherits"
    -}
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/inherits/test.js b/cli/node_modules/mocha/node_modules/glob/node_modules/inherits/test.js
    deleted file mode 100644
    index fc53012d3..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/inherits/test.js
    +++ /dev/null
    @@ -1,25 +0,0 @@
    -var inherits = require('./inherits.js')
    -var assert = require('assert')
    -
    -function test(c) {
    -  assert(c.constructor === Child)
    -  assert(c.constructor.super_ === Parent)
    -  assert(Object.getPrototypeOf(c) === Child.prototype)
    -  assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype)
    -  assert(c instanceof Child)
    -  assert(c instanceof Parent)
    -}
    -
    -function Child() {
    -  Parent.call(this)
    -  test(this)
    -}
    -
    -function Parent() {}
    -
    -inherits(Child, Parent)
    -
    -var c = new Child
    -test(c)
    -
    -console.log('ok')
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/.npmignore b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/.npmignore
    deleted file mode 100644
    index 3c3629e64..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/.npmignore
    +++ /dev/null
    @@ -1 +0,0 @@
    -node_modules
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/LICENSE b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/LICENSE
    deleted file mode 100644
    index 05a401094..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/LICENSE
    +++ /dev/null
    @@ -1,23 +0,0 @@
    -Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
    -All rights reserved.
    -
    -Permission is hereby granted, free of charge, to any person
    -obtaining a copy of this software and associated documentation
    -files (the "Software"), to deal in the Software without
    -restriction, including without limitation the rights to use,
    -copy, modify, merge, publish, distribute, sublicense, and/or sell
    -copies of the Software, and to permit persons to whom the
    -Software is furnished to do so, subject to the following
    -conditions:
    -
    -The above copyright notice and this permission notice shall be
    -included in all copies or substantial portions of the Software.
    -
    -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    -OTHER DEALINGS IN THE SOFTWARE.
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/README.md b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/README.md
    deleted file mode 100644
    index 978268e27..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/README.md
    +++ /dev/null
    @@ -1,218 +0,0 @@
    -# minimatch
    -
    -A minimal matching utility.
    -
    -[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)
    -
    -
    -This is the matching library used internally by npm.
    -
    -Eventually, it will replace the C binding in node-glob.
    -
    -It works by converting glob expressions into JavaScript `RegExp`
    -objects.
    -
    -## Usage
    -
    -```javascript
    -var minimatch = require("minimatch")
    -
    -minimatch("bar.foo", "*.foo") // true!
    -minimatch("bar.foo", "*.bar") // false!
    -minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy!
    -```
    -
    -## Features
    -
    -Supports these glob features:
    -
    -* Brace Expansion
    -* Extended glob matching
    -* "Globstar" `**` matching
    -
    -See:
    -
    -* `man sh`
    -* `man bash`
    -* `man 3 fnmatch`
    -* `man 5 gitignore`
    -
    -## Minimatch Class
    -
    -Create a minimatch object by instanting the `minimatch.Minimatch` class.
    -
    -```javascript
    -var Minimatch = require("minimatch").Minimatch
    -var mm = new Minimatch(pattern, options)
    -```
    -
    -### Properties
    -
    -* `pattern` The original pattern the minimatch object represents.
    -* `options` The options supplied to the constructor.
    -* `set` A 2-dimensional array of regexp or string expressions.
    -  Each row in the
    -  array corresponds to a brace-expanded pattern.  Each item in the row
    -  corresponds to a single path-part.  For example, the pattern
    -  `{a,b/c}/d` would expand to a set of patterns like:
    -
    -        [ [ a, d ]
    -        , [ b, c, d ] ]
    -
    -    If a portion of the pattern doesn't have any "magic" in it
    -    (that is, it's something like `"foo"` rather than `fo*o?`), then it
    -    will be left as a string rather than converted to a regular
    -    expression.
    -
    -* `regexp` Created by the `makeRe` method.  A single regular expression
    -  expressing the entire pattern.  This is useful in cases where you wish
    -  to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
    -* `negate` True if the pattern is negated.
    -* `comment` True if the pattern is a comment.
    -* `empty` True if the pattern is `""`.
    -
    -### Methods
    -
    -* `makeRe` Generate the `regexp` member if necessary, and return it.
    -  Will return `false` if the pattern is invalid.
    -* `match(fname)` Return true if the filename matches the pattern, or
    -  false otherwise.
    -* `matchOne(fileArray, patternArray, partial)` Take a `/`-split
    -  filename, and match it against a single row in the `regExpSet`.  This
    -  method is mainly for internal use, but is exposed so that it can be
    -  used by a glob-walker that needs to avoid excessive filesystem calls.
    -
    -All other methods are internal, and will be called as necessary.
    -
    -## Functions
    -
    -The top-level exported function has a `cache` property, which is an LRU
    -cache set to store 100 items.  So, calling these methods repeatedly
    -with the same pattern and options will use the same Minimatch object,
    -saving the cost of parsing it multiple times.
    -
    -### minimatch(path, pattern, options)
    -
    -Main export.  Tests a path against the pattern using the options.
    -
    -```javascript
    -var isJS = minimatch(file, "*.js", { matchBase: true })
    -```
    -
    -### minimatch.filter(pattern, options)
    -
    -Returns a function that tests its
    -supplied argument, suitable for use with `Array.filter`.  Example:
    -
    -```javascript
    -var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
    -```
    -
    -### minimatch.match(list, pattern, options)
    -
    -Match against the list of
    -files, in the style of fnmatch or glob.  If nothing is matched, and
    -options.nonull is set, then return a list containing the pattern itself.
    -
    -```javascript
    -var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
    -```
    -
    -### minimatch.makeRe(pattern, options)
    -
    -Make a regular expression object from the pattern.
    -
    -## Options
    -
    -All options are `false` by default.
    -
    -### debug
    -
    -Dump a ton of stuff to stderr.
    -
    -### nobrace
    -
    -Do not expand `{a,b}` and `{1..3}` brace sets.
    -
    -### noglobstar
    -
    -Disable `**` matching against multiple folder names.
    -
    -### dot
    -
    -Allow patterns to match filenames starting with a period, even if
    -the pattern does not explicitly have a period in that spot.
    -
    -Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`
    -is set.
    -
    -### noext
    -
    -Disable "extglob" style patterns like `+(a|b)`.
    -
    -### nocase
    -
    -Perform a case-insensitive match.
    -
    -### nonull
    -
    -When a match is not found by `minimatch.match`, return a list containing
    -the pattern itself.  When set, an empty list is returned if there are
    -no matches.
    -
    -### matchBase
    -
    -If set, then patterns without slashes will be matched
    -against the basename of the path if it contains slashes.  For example,
    -`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
    -
    -### nocomment
    -
    -Suppress the behavior of treating `#` at the start of a pattern as a
    -comment.
    -
    -### nonegate
    -
    -Suppress the behavior of treating a leading `!` character as negation.
    -
    -### flipNegate
    -
    -Returns from negate expressions the same as if they were not negated.
    -(Ie, true on a hit, false on a miss.)
    -
    -
    -## Comparisons to other fnmatch/glob implementations
    -
    -While strict compliance with the existing standards is a worthwhile
    -goal, some discrepancies exist between minimatch and other
    -implementations, and are intentional.
    -
    -If the pattern starts with a `!` character, then it is negated.  Set the
    -`nonegate` flag to suppress this behavior, and treat leading `!`
    -characters normally.  This is perhaps relevant if you wish to start the
    -pattern with a negative extglob pattern like `!(a|B)`.  Multiple `!`
    -characters at the start of a pattern will negate the pattern multiple
    -times.
    -
    -If a pattern starts with `#`, then it is treated as a comment, and
    -will not match anything.  Use `\#` to match a literal `#` at the
    -start of a line, or set the `nocomment` flag to suppress this behavior.
    -
    -The double-star character `**` is supported by default, unless the
    -`noglobstar` flag is set.  This is supported in the manner of bsdglob
    -and bash 4.1, where `**` only has special significance if it is the only
    -thing in a path part.  That is, `a/**/b` will match `a/x/y/b`, but
    -`a/**b` will not.
    -
    -If an escaped pattern has no matches, and the `nonull` flag is set,
    -then minimatch.match returns the pattern as-provided, rather than
    -interpreting the character escapes.  For example,
    -`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
    -`"*a?"`.  This is akin to setting the `nullglob` option in bash, except
    -that it does not resolve escaped pattern characters.
    -
    -If brace expansion is not disabled, then it is performed before any
    -other interpretation of the glob pattern.  Thus, a pattern like
    -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
    -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
    -checked for validity.  Since those two are valid, matching proceeds.
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/minimatch.js b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/minimatch.js
    deleted file mode 100644
    index c633f89fa..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/minimatch.js
    +++ /dev/null
    @@ -1,1055 +0,0 @@
    -;(function (require, exports, module, platform) {
    -
    -if (module) module.exports = minimatch
    -else exports.minimatch = minimatch
    -
    -if (!require) {
    -  require = function (id) {
    -    switch (id) {
    -      case "sigmund": return function sigmund (obj) {
    -        return JSON.stringify(obj)
    -      }
    -      case "path": return { basename: function (f) {
    -        f = f.split(/[\/\\]/)
    -        var e = f.pop()
    -        if (!e) e = f.pop()
    -        return e
    -      }}
    -      case "lru-cache": return function LRUCache () {
    -        // not quite an LRU, but still space-limited.
    -        var cache = {}
    -        var cnt = 0
    -        this.set = function (k, v) {
    -          cnt ++
    -          if (cnt >= 100) cache = {}
    -          cache[k] = v
    -        }
    -        this.get = function (k) { return cache[k] }
    -      }
    -    }
    -  }
    -}
    -
    -minimatch.Minimatch = Minimatch
    -
    -var LRU = require("lru-cache")
    -  , cache = minimatch.cache = new LRU({max: 100})
    -  , GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
    -  , sigmund = require("sigmund")
    -
    -var path = require("path")
    -  // any single thing other than /
    -  // don't need to escape / when using new RegExp()
    -  , qmark = "[^/]"
    -
    -  // * => any number of characters
    -  , star = qmark + "*?"
    -
    -  // ** when dots are allowed.  Anything goes, except .. and .
    -  // not (^ or / followed by one or two dots followed by $ or /),
    -  // followed by anything, any number of times.
    -  , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?"
    -
    -  // not a ^ or / followed by a dot,
    -  // followed by anything, any number of times.
    -  , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?"
    -
    -  // characters that need to be escaped in RegExp.
    -  , reSpecials = charSet("().*{}+?[]^$\\!")
    -
    -// "abc" -> { a:true, b:true, c:true }
    -function charSet (s) {
    -  return s.split("").reduce(function (set, c) {
    -    set[c] = true
    -    return set
    -  }, {})
    -}
    -
    -// normalizes slashes.
    -var slashSplit = /\/+/
    -
    -minimatch.filter = filter
    -function filter (pattern, options) {
    -  options = options || {}
    -  return function (p, i, list) {
    -    return minimatch(p, pattern, options)
    -  }
    -}
    -
    -function ext (a, b) {
    -  a = a || {}
    -  b = b || {}
    -  var t = {}
    -  Object.keys(b).forEach(function (k) {
    -    t[k] = b[k]
    -  })
    -  Object.keys(a).forEach(function (k) {
    -    t[k] = a[k]
    -  })
    -  return t
    -}
    -
    -minimatch.defaults = function (def) {
    -  if (!def || !Object.keys(def).length) return minimatch
    -
    -  var orig = minimatch
    -
    -  var m = function minimatch (p, pattern, options) {
    -    return orig.minimatch(p, pattern, ext(def, options))
    -  }
    -
    -  m.Minimatch = function Minimatch (pattern, options) {
    -    return new orig.Minimatch(pattern, ext(def, options))
    -  }
    -
    -  return m
    -}
    -
    -Minimatch.defaults = function (def) {
    -  if (!def || !Object.keys(def).length) return Minimatch
    -  return minimatch.defaults(def).Minimatch
    -}
    -
    -
    -function minimatch (p, pattern, options) {
    -  if (typeof pattern !== "string") {
    -    throw new TypeError("glob pattern string required")
    -  }
    -
    -  if (!options) options = {}
    -
    -  // shortcut: comments match nothing.
    -  if (!options.nocomment && pattern.charAt(0) === "#") {
    -    return false
    -  }
    -
    -  // "" only matches ""
    -  if (pattern.trim() === "") return p === ""
    -
    -  return new Minimatch(pattern, options).match(p)
    -}
    -
    -function Minimatch (pattern, options) {
    -  if (!(this instanceof Minimatch)) {
    -    return new Minimatch(pattern, options, cache)
    -  }
    -
    -  if (typeof pattern !== "string") {
    -    throw new TypeError("glob pattern string required")
    -  }
    -
    -  if (!options) options = {}
    -  pattern = pattern.trim()
    -
    -  // windows: need to use /, not \
    -  // On other platforms, \ is a valid (albeit bad) filename char.
    -  if (platform === "win32") {
    -    pattern = pattern.split("\\").join("/")
    -  }
    -
    -  // lru storage.
    -  // these things aren't particularly big, but walking down the string
    -  // and turning it into a regexp can get pretty costly.
    -  var cacheKey = pattern + "\n" + sigmund(options)
    -  var cached = minimatch.cache.get(cacheKey)
    -  if (cached) return cached
    -  minimatch.cache.set(cacheKey, this)
    -
    -  this.options = options
    -  this.set = []
    -  this.pattern = pattern
    -  this.regexp = null
    -  this.negate = false
    -  this.comment = false
    -  this.empty = false
    -
    -  // make the set of regexps etc.
    -  this.make()
    -}
    -
    -Minimatch.prototype.debug = function() {}
    -
    -Minimatch.prototype.make = make
    -function make () {
    -  // don't do it more than once.
    -  if (this._made) return
    -
    -  var pattern = this.pattern
    -  var options = this.options
    -
    -  // empty patterns and comments match nothing.
    -  if (!options.nocomment && pattern.charAt(0) === "#") {
    -    this.comment = true
    -    return
    -  }
    -  if (!pattern) {
    -    this.empty = true
    -    return
    -  }
    -
    -  // step 1: figure out negation, etc.
    -  this.parseNegate()
    -
    -  // step 2: expand braces
    -  var set = this.globSet = this.braceExpand()
    -
    -  if (options.debug) this.debug = console.error
    -
    -  this.debug(this.pattern, set)
    -
    -  // step 3: now we have a set, so turn each one into a series of path-portion
    -  // matching patterns.
    -  // These will be regexps, except in the case of "**", which is
    -  // set to the GLOBSTAR object for globstar behavior,
    -  // and will not contain any / characters
    -  set = this.globParts = set.map(function (s) {
    -    return s.split(slashSplit)
    -  })
    -
    -  this.debug(this.pattern, set)
    -
    -  // glob --> regexps
    -  set = set.map(function (s, si, set) {
    -    return s.map(this.parse, this)
    -  }, this)
    -
    -  this.debug(this.pattern, set)
    -
    -  // filter out everything that didn't compile properly.
    -  set = set.filter(function (s) {
    -    return -1 === s.indexOf(false)
    -  })
    -
    -  this.debug(this.pattern, set)
    -
    -  this.set = set
    -}
    -
    -Minimatch.prototype.parseNegate = parseNegate
    -function parseNegate () {
    -  var pattern = this.pattern
    -    , negate = false
    -    , options = this.options
    -    , negateOffset = 0
    -
    -  if (options.nonegate) return
    -
    -  for ( var i = 0, l = pattern.length
    -      ; i < l && pattern.charAt(i) === "!"
    -      ; i ++) {
    -    negate = !negate
    -    negateOffset ++
    -  }
    -
    -  if (negateOffset) this.pattern = pattern.substr(negateOffset)
    -  this.negate = negate
    -}
    -
    -// Brace expansion:
    -// a{b,c}d -> abd acd
    -// a{b,}c -> abc ac
    -// a{0..3}d -> a0d a1d a2d a3d
    -// a{b,c{d,e}f}g -> abg acdfg acefg
    -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
    -//
    -// Invalid sets are not expanded.
    -// a{2..}b -> a{2..}b
    -// a{b}c -> a{b}c
    -minimatch.braceExpand = function (pattern, options) {
    -  return new Minimatch(pattern, options).braceExpand()
    -}
    -
    -Minimatch.prototype.braceExpand = braceExpand
    -function braceExpand (pattern, options) {
    -  options = options || this.options
    -  pattern = typeof pattern === "undefined"
    -    ? this.pattern : pattern
    -
    -  if (typeof pattern === "undefined") {
    -    throw new Error("undefined pattern")
    -  }
    -
    -  if (options.nobrace ||
    -      !pattern.match(/\{.*\}/)) {
    -    // shortcut. no need to expand.
    -    return [pattern]
    -  }
    -
    -  var escaping = false
    -
    -  // examples and comments refer to this crazy pattern:
    -  // a{b,c{d,e},{f,g}h}x{y,z}
    -  // expected:
    -  // abxy
    -  // abxz
    -  // acdxy
    -  // acdxz
    -  // acexy
    -  // acexz
    -  // afhxy
    -  // afhxz
    -  // aghxy
    -  // aghxz
    -
    -  // everything before the first \{ is just a prefix.
    -  // So, we pluck that off, and work with the rest,
    -  // and then prepend it to everything we find.
    -  if (pattern.charAt(0) !== "{") {
    -    this.debug(pattern)
    -    var prefix = null
    -    for (var i = 0, l = pattern.length; i < l; i ++) {
    -      var c = pattern.charAt(i)
    -      this.debug(i, c)
    -      if (c === "\\") {
    -        escaping = !escaping
    -      } else if (c === "{" && !escaping) {
    -        prefix = pattern.substr(0, i)
    -        break
    -      }
    -    }
    -
    -    // actually no sets, all { were escaped.
    -    if (prefix === null) {
    -      this.debug("no sets")
    -      return [pattern]
    -    }
    -
    -   var tail = braceExpand.call(this, pattern.substr(i), options)
    -    return tail.map(function (t) {
    -      return prefix + t
    -    })
    -  }
    -
    -  // now we have something like:
    -  // {b,c{d,e},{f,g}h}x{y,z}
    -  // walk through the set, expanding each part, until
    -  // the set ends.  then, we'll expand the suffix.
    -  // If the set only has a single member, then'll put the {} back
    -
    -  // first, handle numeric sets, since they're easier
    -  var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/)
    -  if (numset) {
    -    this.debug("numset", numset[1], numset[2])
    -    var suf = braceExpand.call(this, pattern.substr(numset[0].length), options)
    -      , start = +numset[1]
    -      , end = +numset[2]
    -      , inc = start > end ? -1 : 1
    -      , set = []
    -    for (var i = start; i != (end + inc); i += inc) {
    -      // append all the suffixes
    -      for (var ii = 0, ll = suf.length; ii < ll; ii ++) {
    -        set.push(i + suf[ii])
    -      }
    -    }
    -    return set
    -  }
    -
    -  // ok, walk through the set
    -  // We hope, somewhat optimistically, that there
    -  // will be a } at the end.
    -  // If the closing brace isn't found, then the pattern is
    -  // interpreted as braceExpand("\\" + pattern) so that
    -  // the leading \{ will be interpreted literally.
    -  var i = 1 // skip the \{
    -    , depth = 1
    -    , set = []
    -    , member = ""
    -    , sawEnd = false
    -    , escaping = false
    -
    -  function addMember () {
    -    set.push(member)
    -    member = ""
    -  }
    -
    -  this.debug("Entering for")
    -  FOR: for (i = 1, l = pattern.length; i < l; i ++) {
    -    var c = pattern.charAt(i)
    -    this.debug("", i, c)
    -
    -    if (escaping) {
    -      escaping = false
    -      member += "\\" + c
    -    } else {
    -      switch (c) {
    -        case "\\":
    -          escaping = true
    -          continue
    -
    -        case "{":
    -          depth ++
    -          member += "{"
    -          continue
    -
    -        case "}":
    -          depth --
    -          // if this closes the actual set, then we're done
    -          if (depth === 0) {
    -            addMember()
    -            // pluck off the close-brace
    -            i ++
    -            break FOR
    -          } else {
    -            member += c
    -            continue
    -          }
    -
    -        case ",":
    -          if (depth === 1) {
    -            addMember()
    -          } else {
    -            member += c
    -          }
    -          continue
    -
    -        default:
    -          member += c
    -          continue
    -      } // switch
    -    } // else
    -  } // for
    -
    -  // now we've either finished the set, and the suffix is
    -  // pattern.substr(i), or we have *not* closed the set,
    -  // and need to escape the leading brace
    -  if (depth !== 0) {
    -    this.debug("didn't close", pattern)
    -    return braceExpand.call(this, "\\" + pattern, options)
    -  }
    -
    -  // x{y,z} -> ["xy", "xz"]
    -  this.debug("set", set)
    -  this.debug("suffix", pattern.substr(i))
    -  var suf = braceExpand.call(this, pattern.substr(i), options)
    -  // ["b", "c{d,e}","{f,g}h"] ->
    -  //   [["b"], ["cd", "ce"], ["fh", "gh"]]
    -  var addBraces = set.length === 1
    -  this.debug("set pre-expanded", set)
    -  set = set.map(function (p) {
    -    return braceExpand.call(this, p, options)
    -  }, this)
    -  this.debug("set expanded", set)
    -
    -
    -  // [["b"], ["cd", "ce"], ["fh", "gh"]] ->
    -  //   ["b", "cd", "ce", "fh", "gh"]
    -  set = set.reduce(function (l, r) {
    -    return l.concat(r)
    -  })
    -
    -  if (addBraces) {
    -    set = set.map(function (s) {
    -      return "{" + s + "}"
    -    })
    -  }
    -
    -  // now attach the suffixes.
    -  var ret = []
    -  for (var i = 0, l = set.length; i < l; i ++) {
    -    for (var ii = 0, ll = suf.length; ii < ll; ii ++) {
    -      ret.push(set[i] + suf[ii])
    -    }
    -  }
    -  return ret
    -}
    -
    -// parse a component of the expanded set.
    -// At this point, no pattern may contain "/" in it
    -// so we're going to return a 2d array, where each entry is the full
    -// pattern, split on '/', and then turned into a regular expression.
    -// A regexp is made at the end which joins each array with an
    -// escaped /, and another full one which joins each regexp with |.
    -//
    -// Following the lead of Bash 4.1, note that "**" only has special meaning
    -// when it is the *only* thing in a path portion.  Otherwise, any series
    -// of * is equivalent to a single *.  Globstar behavior is enabled by
    -// default, and can be disabled by setting options.noglobstar.
    -Minimatch.prototype.parse = parse
    -var SUBPARSE = {}
    -function parse (pattern, isSub) {
    -  var options = this.options
    -
    -  // shortcuts
    -  if (!options.noglobstar && pattern === "**") return GLOBSTAR
    -  if (pattern === "") return ""
    -
    -  var re = ""
    -    , hasMagic = !!options.nocase
    -    , escaping = false
    -    // ? => one single character
    -    , patternListStack = []
    -    , plType
    -    , stateChar
    -    , inClass = false
    -    , reClassStart = -1
    -    , classStart = -1
    -    // . and .. never match anything that doesn't start with .,
    -    // even when options.dot is set.
    -    , patternStart = pattern.charAt(0) === "." ? "" // anything
    -      // not (start or / followed by . or .. followed by / or end)
    -      : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))"
    -      : "(?!\\.)"
    -    , self = this
    -
    -  function clearStateChar () {
    -    if (stateChar) {
    -      // we had some state-tracking character
    -      // that wasn't consumed by this pass.
    -      switch (stateChar) {
    -        case "*":
    -          re += star
    -          hasMagic = true
    -          break
    -        case "?":
    -          re += qmark
    -          hasMagic = true
    -          break
    -        default:
    -          re += "\\"+stateChar
    -          break
    -      }
    -      self.debug('clearStateChar %j %j', stateChar, re)
    -      stateChar = false
    -    }
    -  }
    -
    -  for ( var i = 0, len = pattern.length, c
    -      ; (i < len) && (c = pattern.charAt(i))
    -      ; i ++ ) {
    -
    -    this.debug("%s\t%s %s %j", pattern, i, re, c)
    -
    -    // skip over any that are escaped.
    -    if (escaping && reSpecials[c]) {
    -      re += "\\" + c
    -      escaping = false
    -      continue
    -    }
    -
    -    SWITCH: switch (c) {
    -      case "/":
    -        // completely not allowed, even escaped.
    -        // Should already be path-split by now.
    -        return false
    -
    -      case "\\":
    -        clearStateChar()
    -        escaping = true
    -        continue
    -
    -      // the various stateChar values
    -      // for the "extglob" stuff.
    -      case "?":
    -      case "*":
    -      case "+":
    -      case "@":
    -      case "!":
    -        this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c)
    -
    -        // all of those are literals inside a class, except that
    -        // the glob [!a] means [^a] in regexp
    -        if (inClass) {
    -          this.debug('  in class')
    -          if (c === "!" && i === classStart + 1) c = "^"
    -          re += c
    -          continue
    -        }
    -
    -        // if we already have a stateChar, then it means
    -        // that there was something like ** or +? in there.
    -        // Handle the stateChar, then proceed with this one.
    -        self.debug('call clearStateChar %j', stateChar)
    -        clearStateChar()
    -        stateChar = c
    -        // if extglob is disabled, then +(asdf|foo) isn't a thing.
    -        // just clear the statechar *now*, rather than even diving into
    -        // the patternList stuff.
    -        if (options.noext) clearStateChar()
    -        continue
    -
    -      case "(":
    -        if (inClass) {
    -          re += "("
    -          continue
    -        }
    -
    -        if (!stateChar) {
    -          re += "\\("
    -          continue
    -        }
    -
    -        plType = stateChar
    -        patternListStack.push({ type: plType
    -                              , start: i - 1
    -                              , reStart: re.length })
    -        // negation is (?:(?!js)[^/]*)
    -        re += stateChar === "!" ? "(?:(?!" : "(?:"
    -        this.debug('plType %j %j', stateChar, re)
    -        stateChar = false
    -        continue
    -
    -      case ")":
    -        if (inClass || !patternListStack.length) {
    -          re += "\\)"
    -          continue
    -        }
    -
    -        clearStateChar()
    -        hasMagic = true
    -        re += ")"
    -        plType = patternListStack.pop().type
    -        // negation is (?:(?!js)[^/]*)
    -        // The others are (?:)
    -        switch (plType) {
    -          case "!":
    -            re += "[^/]*?)"
    -            break
    -          case "?":
    -          case "+":
    -          case "*": re += plType
    -          case "@": break // the default anyway
    -        }
    -        continue
    -
    -      case "|":
    -        if (inClass || !patternListStack.length || escaping) {
    -          re += "\\|"
    -          escaping = false
    -          continue
    -        }
    -
    -        clearStateChar()
    -        re += "|"
    -        continue
    -
    -      // these are mostly the same in regexp and glob
    -      case "[":
    -        // swallow any state-tracking char before the [
    -        clearStateChar()
    -
    -        if (inClass) {
    -          re += "\\" + c
    -          continue
    -        }
    -
    -        inClass = true
    -        classStart = i
    -        reClassStart = re.length
    -        re += c
    -        continue
    -
    -      case "]":
    -        //  a right bracket shall lose its special
    -        //  meaning and represent itself in
    -        //  a bracket expression if it occurs
    -        //  first in the list.  -- POSIX.2 2.8.3.2
    -        if (i === classStart + 1 || !inClass) {
    -          re += "\\" + c
    -          escaping = false
    -          continue
    -        }
    -
    -        // finish up the class.
    -        hasMagic = true
    -        inClass = false
    -        re += c
    -        continue
    -
    -      default:
    -        // swallow any state char that wasn't consumed
    -        clearStateChar()
    -
    -        if (escaping) {
    -          // no need
    -          escaping = false
    -        } else if (reSpecials[c]
    -                   && !(c === "^" && inClass)) {
    -          re += "\\"
    -        }
    -
    -        re += c
    -
    -    } // switch
    -  } // for
    -
    -
    -  // handle the case where we left a class open.
    -  // "[abc" is valid, equivalent to "\[abc"
    -  if (inClass) {
    -    // split where the last [ was, and escape it
    -    // this is a huge pita.  We now have to re-walk
    -    // the contents of the would-be class to re-translate
    -    // any characters that were passed through as-is
    -    var cs = pattern.substr(classStart + 1)
    -      , sp = this.parse(cs, SUBPARSE)
    -    re = re.substr(0, reClassStart) + "\\[" + sp[0]
    -    hasMagic = hasMagic || sp[1]
    -  }
    -
    -  // handle the case where we had a +( thing at the *end*
    -  // of the pattern.
    -  // each pattern list stack adds 3 chars, and we need to go through
    -  // and escape any | chars that were passed through as-is for the regexp.
    -  // Go through and escape them, taking care not to double-escape any
    -  // | chars that were already escaped.
    -  var pl
    -  while (pl = patternListStack.pop()) {
    -    var tail = re.slice(pl.reStart + 3)
    -    // maybe some even number of \, then maybe 1 \, followed by a |
    -    tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) {
    -      if (!$2) {
    -        // the | isn't already escaped, so escape it.
    -        $2 = "\\"
    -      }
    -
    -      // need to escape all those slashes *again*, without escaping the
    -      // one that we need for escaping the | character.  As it works out,
    -      // escaping an even number of slashes can be done by simply repeating
    -      // it exactly after itself.  That's why this trick works.
    -      //
    -      // I am sorry that you have to see this.
    -      return $1 + $1 + $2 + "|"
    -    })
    -
    -    this.debug("tail=%j\n   %s", tail, tail)
    -    var t = pl.type === "*" ? star
    -          : pl.type === "?" ? qmark
    -          : "\\" + pl.type
    -
    -    hasMagic = true
    -    re = re.slice(0, pl.reStart)
    -       + t + "\\("
    -       + tail
    -  }
    -
    -  // handle trailing things that only matter at the very end.
    -  clearStateChar()
    -  if (escaping) {
    -    // trailing \\
    -    re += "\\\\"
    -  }
    -
    -  // only need to apply the nodot start if the re starts with
    -  // something that could conceivably capture a dot
    -  var addPatternStart = false
    -  switch (re.charAt(0)) {
    -    case ".":
    -    case "[":
    -    case "(": addPatternStart = true
    -  }
    -
    -  // if the re is not "" at this point, then we need to make sure
    -  // it doesn't match against an empty path part.
    -  // Otherwise a/* will match a/, which it should not.
    -  if (re !== "" && hasMagic) re = "(?=.)" + re
    -
    -  if (addPatternStart) re = patternStart + re
    -
    -  // parsing just a piece of a larger pattern.
    -  if (isSub === SUBPARSE) {
    -    return [ re, hasMagic ]
    -  }
    -
    -  // skip the regexp for non-magical patterns
    -  // unescape anything in it, though, so that it'll be
    -  // an exact match against a file etc.
    -  if (!hasMagic) {
    -    return globUnescape(pattern)
    -  }
    -
    -  var flags = options.nocase ? "i" : ""
    -    , regExp = new RegExp("^" + re + "$", flags)
    -
    -  regExp._glob = pattern
    -  regExp._src = re
    -
    -  return regExp
    -}
    -
    -minimatch.makeRe = function (pattern, options) {
    -  return new Minimatch(pattern, options || {}).makeRe()
    -}
    -
    -Minimatch.prototype.makeRe = makeRe
    -function makeRe () {
    -  if (this.regexp || this.regexp === false) return this.regexp
    -
    -  // at this point, this.set is a 2d array of partial
    -  // pattern strings, or "**".
    -  //
    -  // It's better to use .match().  This function shouldn't
    -  // be used, really, but it's pretty convenient sometimes,
    -  // when you just want to work with a regex.
    -  var set = this.set
    -
    -  if (!set.length) return this.regexp = false
    -  var options = this.options
    -
    -  var twoStar = options.noglobstar ? star
    -      : options.dot ? twoStarDot
    -      : twoStarNoDot
    -    , flags = options.nocase ? "i" : ""
    -
    -  var re = set.map(function (pattern) {
    -    return pattern.map(function (p) {
    -      return (p === GLOBSTAR) ? twoStar
    -           : (typeof p === "string") ? regExpEscape(p)
    -           : p._src
    -    }).join("\\\/")
    -  }).join("|")
    -
    -  // must match entire pattern
    -  // ending in a * or ** will make it less strict.
    -  re = "^(?:" + re + ")$"
    -
    -  // can match anything, as long as it's not this.
    -  if (this.negate) re = "^(?!" + re + ").*$"
    -
    -  try {
    -    return this.regexp = new RegExp(re, flags)
    -  } catch (ex) {
    -    return this.regexp = false
    -  }
    -}
    -
    -minimatch.match = function (list, pattern, options) {
    -  var mm = new Minimatch(pattern, options)
    -  list = list.filter(function (f) {
    -    return mm.match(f)
    -  })
    -  if (options.nonull && !list.length) {
    -    list.push(pattern)
    -  }
    -  return list
    -}
    -
    -Minimatch.prototype.match = match
    -function match (f, partial) {
    -  this.debug("match", f, this.pattern)
    -  // short-circuit in the case of busted things.
    -  // comments, etc.
    -  if (this.comment) return false
    -  if (this.empty) return f === ""
    -
    -  if (f === "/" && partial) return true
    -
    -  var options = this.options
    -
    -  // windows: need to use /, not \
    -  // On other platforms, \ is a valid (albeit bad) filename char.
    -  if (platform === "win32") {
    -    f = f.split("\\").join("/")
    -  }
    -
    -  // treat the test path as a set of pathparts.
    -  f = f.split(slashSplit)
    -  this.debug(this.pattern, "split", f)
    -
    -  // just ONE of the pattern sets in this.set needs to match
    -  // in order for it to be valid.  If negating, then just one
    -  // match means that we have failed.
    -  // Either way, return on the first hit.
    -
    -  var set = this.set
    -  this.debug(this.pattern, "set", set)
    -
    -  var splitFile = path.basename(f.join("/")).split("/")
    -
    -  for (var i = 0, l = set.length; i < l; i ++) {
    -    var pattern = set[i], file = f
    -    if (options.matchBase && pattern.length === 1) {
    -      file = splitFile
    -    }
    -    var hit = this.matchOne(file, pattern, partial)
    -    if (hit) {
    -      if (options.flipNegate) return true
    -      return !this.negate
    -    }
    -  }
    -
    -  // didn't get any hits.  this is success if it's a negative
    -  // pattern, failure otherwise.
    -  if (options.flipNegate) return false
    -  return this.negate
    -}
    -
    -// set partial to true to test if, for example,
    -// "/a/b" matches the start of "/*/b/*/d"
    -// Partial means, if you run out of file before you run
    -// out of pattern, then that's fine, as long as all
    -// the parts match.
    -Minimatch.prototype.matchOne = function (file, pattern, partial) {
    -  var options = this.options
    -
    -  this.debug("matchOne",
    -              { "this": this
    -              , file: file
    -              , pattern: pattern })
    -
    -  this.debug("matchOne", file.length, pattern.length)
    -
    -  for ( var fi = 0
    -          , pi = 0
    -          , fl = file.length
    -          , pl = pattern.length
    -      ; (fi < fl) && (pi < pl)
    -      ; fi ++, pi ++ ) {
    -
    -    this.debug("matchOne loop")
    -    var p = pattern[pi]
    -      , f = file[fi]
    -
    -    this.debug(pattern, p, f)
    -
    -    // should be impossible.
    -    // some invalid regexp stuff in the set.
    -    if (p === false) return false
    -
    -    if (p === GLOBSTAR) {
    -      this.debug('GLOBSTAR', [pattern, p, f])
    -
    -      // "**"
    -      // a/**/b/**/c would match the following:
    -      // a/b/x/y/z/c
    -      // a/x/y/z/b/c
    -      // a/b/x/b/x/c
    -      // a/b/c
    -      // To do this, take the rest of the pattern after
    -      // the **, and see if it would match the file remainder.
    -      // If so, return success.
    -      // If not, the ** "swallows" a segment, and try again.
    -      // This is recursively awful.
    -      //
    -      // a/**/b/**/c matching a/b/x/y/z/c
    -      // - a matches a
    -      // - doublestar
    -      //   - matchOne(b/x/y/z/c, b/**/c)
    -      //     - b matches b
    -      //     - doublestar
    -      //       - matchOne(x/y/z/c, c) -> no
    -      //       - matchOne(y/z/c, c) -> no
    -      //       - matchOne(z/c, c) -> no
    -      //       - matchOne(c, c) yes, hit
    -      var fr = fi
    -        , pr = pi + 1
    -      if (pr === pl) {
    -        this.debug('** at the end')
    -        // a ** at the end will just swallow the rest.
    -        // We have found a match.
    -        // however, it will not swallow /.x, unless
    -        // options.dot is set.
    -        // . and .. are *never* matched by **, for explosively
    -        // exponential reasons.
    -        for ( ; fi < fl; fi ++) {
    -          if (file[fi] === "." || file[fi] === ".." ||
    -              (!options.dot && file[fi].charAt(0) === ".")) return false
    -        }
    -        return true
    -      }
    -
    -      // ok, let's see if we can swallow whatever we can.
    -      WHILE: while (fr < fl) {
    -        var swallowee = file[fr]
    -
    -        this.debug('\nglobstar while',
    -                    file, fr, pattern, pr, swallowee)
    -
    -        // XXX remove this slice.  Just pass the start index.
    -        if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
    -          this.debug('globstar found match!', fr, fl, swallowee)
    -          // found a match.
    -          return true
    -        } else {
    -          // can't swallow "." or ".." ever.
    -          // can only swallow ".foo" when explicitly asked.
    -          if (swallowee === "." || swallowee === ".." ||
    -              (!options.dot && swallowee.charAt(0) === ".")) {
    -            this.debug("dot detected!", file, fr, pattern, pr)
    -            break WHILE
    -          }
    -
    -          // ** swallows a segment, and continue.
    -          this.debug('globstar swallow a segment, and continue')
    -          fr ++
    -        }
    -      }
    -      // no match was found.
    -      // However, in partial mode, we can't say this is necessarily over.
    -      // If there's more *pattern* left, then 
    -      if (partial) {
    -        // ran out of file
    -        this.debug("\n>>> no match, partial?", file, fr, pattern, pr)
    -        if (fr === fl) return true
    -      }
    -      return false
    -    }
    -
    -    // something other than **
    -    // non-magic patterns just have to match exactly
    -    // patterns with magic have been turned into regexps.
    -    var hit
    -    if (typeof p === "string") {
    -      if (options.nocase) {
    -        hit = f.toLowerCase() === p.toLowerCase()
    -      } else {
    -        hit = f === p
    -      }
    -      this.debug("string match", p, f, hit)
    -    } else {
    -      hit = f.match(p)
    -      this.debug("pattern match", p, f, hit)
    -    }
    -
    -    if (!hit) return false
    -  }
    -
    -  // Note: ending in / means that we'll get a final ""
    -  // at the end of the pattern.  This can only match a
    -  // corresponding "" at the end of the file.
    -  // If the file ends in /, then it can only match a
    -  // a pattern that ends in /, unless the pattern just
    -  // doesn't have any more for it. But, a/b/ should *not*
    -  // match "a/b/*", even though "" matches against the
    -  // [^/]*? pattern, except in partial mode, where it might
    -  // simply not be reached yet.
    -  // However, a/b/ should still satisfy a/*
    -
    -  // now either we fell off the end of the pattern, or we're done.
    -  if (fi === fl && pi === pl) {
    -    // ran out of pattern and filename at the same time.
    -    // an exact hit!
    -    return true
    -  } else if (fi === fl) {
    -    // ran out of file, but still had pattern left.
    -    // this is ok if we're doing the match as part of
    -    // a glob fs traversal.
    -    return partial
    -  } else if (pi === pl) {
    -    // ran out of pattern, still have file left.
    -    // this is only acceptable if we're on the very last
    -    // empty segment of a file with a trailing slash.
    -    // a/* should match a/b/
    -    var emptyFileEnd = (fi === fl - 1) && (file[fi] === "")
    -    return emptyFileEnd
    -  }
    -
    -  // should be unreachable.
    -  throw new Error("wtf?")
    -}
    -
    -
    -// replace stuff like \* with *
    -function globUnescape (s) {
    -  return s.replace(/\\(.)/g, "$1")
    -}
    -
    -
    -function regExpEscape (s) {
    -  return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
    -}
    -
    -})( typeof require === "function" ? require : null,
    -    this,
    -    typeof module === "object" ? module : null,
    -    typeof process === "object" ? process.platform : "win32"
    -  )
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore
    deleted file mode 100644
    index 07e6e472c..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore
    +++ /dev/null
    @@ -1 +0,0 @@
    -/node_modules
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.travis.yml b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.travis.yml
    deleted file mode 100644
    index 4af02b3d1..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.travis.yml
    +++ /dev/null
    @@ -1,8 +0,0 @@
    -language: node_js
    -node_js:
    -  - '0.8'
    -  - '0.10'
    -  - '0.12'
    -  - 'iojs'
    -before_install:
    -  - npm install -g npm@latest
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS
    deleted file mode 100644
    index 4a0bc5033..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS
    +++ /dev/null
    @@ -1,14 +0,0 @@
    -# Authors, sorted by whether or not they are me
    -Isaac Z. Schlueter 
    -Brian Cottingham 
    -Carlos Brito Lage 
    -Jesse Dailey 
    -Kevin O'Hara 
    -Marco Rogers 
    -Mark Cavage 
    -Marko Mikulicic 
    -Nathan Rajlich 
    -Satheesh Natesan 
    -Trent Mick 
    -ashleybrener 
    -n4kz 
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE
    deleted file mode 100644
    index 19129e315..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE
    +++ /dev/null
    @@ -1,15 +0,0 @@
    -The ISC License
    -
    -Copyright (c) Isaac Z. Schlueter and Contributors
    -
    -Permission to use, copy, modify, and/or distribute this software for any
    -purpose with or without fee is hereby granted, provided that the above
    -copyright notice and this permission notice appear in all copies.
    -
    -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
    -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md
    deleted file mode 100644
    index a8bba688f..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md
    +++ /dev/null
    @@ -1,109 +0,0 @@
    -# lru cache
    -
    -A cache object that deletes the least-recently-used items.
    -
    -## Usage:
    -
    -```javascript
    -var LRU = require("lru-cache")
    -  , options = { max: 500
    -              , length: function (n) { return n * 2 }
    -              , dispose: function (key, n) { n.close() }
    -              , maxAge: 1000 * 60 * 60 }
    -  , cache = LRU(options)
    -  , otherCache = LRU(50) // sets just the max size
    -
    -cache.set("key", "value")
    -cache.get("key") // "value"
    -
    -cache.reset()    // empty the cache
    -```
    -
    -If you put more stuff in it, then items will fall out.
    -
    -If you try to put an oversized thing in it, then it'll fall out right
    -away.
    -
    -## Options
    -
    -* `max` The maximum size of the cache, checked by applying the length
    -  function to all values in the cache.  Not setting this is kind of
    -  silly, since that's the whole purpose of this lib, but it defaults
    -  to `Infinity`.
    -* `maxAge` Maximum age in ms.  Items are not pro-actively pruned out
    -  as they age, but if you try to get an item that is too old, it'll
    -  drop it and return undefined instead of giving it to you.
    -* `length` Function that is used to calculate the length of stored
    -  items.  If you're storing strings or buffers, then you probably want
    -  to do something like `function(n){return n.length}`.  The default is
    -  `function(n){return 1}`, which is fine if you want to store `n`
    -  like-sized things.
    -* `dispose` Function that is called on items when they are dropped
    -  from the cache.  This can be handy if you want to close file
    -  descriptors or do other cleanup tasks when items are no longer
    -  accessible.  Called with `key, value`.  It's called *before*
    -  actually removing the item from the internal cache, so if you want
    -  to immediately put it back in, you'll have to do that in a
    -  `nextTick` or `setTimeout` callback or it won't do anything.
    -* `stale` By default, if you set a `maxAge`, it'll only actually pull
    -  stale items out of the cache when you `get(key)`.  (That is, it's
    -  not pre-emptively doing a `setTimeout` or anything.)  If you set
    -  `stale:true`, it'll return the stale value before deleting it.  If
    -  you don't set this, then it'll return `undefined` when you try to
    -  get a stale entry, as if it had already been deleted.
    -
    -## API
    -
    -* `set(key, value, maxAge)`
    -* `get(key) => value`
    -
    -    Both of these will update the "recently used"-ness of the key.
    -    They do what you think. `max` is optional and overrides the
    -    cache `max` option if provided.
    -
    -* `peek(key)`
    -
    -    Returns the key value (or `undefined` if not found) without
    -    updating the "recently used"-ness of the key.
    -
    -    (If you find yourself using this a lot, you *might* be using the
    -    wrong sort of data structure, but there are some use cases where
    -    it's handy.)
    -
    -* `del(key)`
    -
    -    Deletes a key out of the cache.
    -
    -* `reset()`
    -
    -    Clear the cache entirely, throwing away all values.
    -
    -* `has(key)`
    -
    -    Check if a key is in the cache, without updating the recent-ness
    -    or deleting it for being stale.
    -
    -* `forEach(function(value,key,cache), [thisp])`
    -
    -    Just like `Array.prototype.forEach`.  Iterates over all the keys
    -    in the cache, in order of recent-ness.  (Ie, more recently used
    -    items are iterated over first.)
    -
    -* `keys()`
    -
    -    Return an array of the keys in the cache.
    -
    -* `values()`
    -
    -    Return an array of the values in the cache.
    -
    -* `length()`
    -
    -    Return total length of objects in cache taking into account
    -    `length` options function.
    -
    -* `itemCount()`
    -
    -    Return total quantity of objects currently in cache. Note, that
    -    `stale` (see options) items are returned as part of this item
    -    count.
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js
    deleted file mode 100644
    index d66e7a238..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js
    +++ /dev/null
    @@ -1,274 +0,0 @@
    -;(function () { // closure for web browsers
    -
    -if (typeof module === 'object' && module.exports) {
    -  module.exports = LRUCache
    -} else {
    -  // just set the global for non-node platforms.
    -  this.LRUCache = LRUCache
    -}
    -
    -function hOP (obj, key) {
    -  return Object.prototype.hasOwnProperty.call(obj, key)
    -}
    -
    -function naiveLength () { return 1 }
    -
    -function LRUCache (options) {
    -  if (!(this instanceof LRUCache))
    -    return new LRUCache(options)
    -
    -  if (typeof options === 'number')
    -    options = { max: options }
    -
    -  if (!options)
    -    options = {}
    -
    -  this._max = options.max
    -  // Kind of weird to have a default max of Infinity, but oh well.
    -  if (!this._max || !(typeof this._max === "number") || this._max <= 0 )
    -    this._max = Infinity
    -
    -  this._lengthCalculator = options.length || naiveLength
    -  if (typeof this._lengthCalculator !== "function")
    -    this._lengthCalculator = naiveLength
    -
    -  this._allowStale = options.stale || false
    -  this._maxAge = options.maxAge || null
    -  this._dispose = options.dispose
    -  this.reset()
    -}
    -
    -// resize the cache when the max changes.
    -Object.defineProperty(LRUCache.prototype, "max",
    -  { set : function (mL) {
    -      if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity
    -      this._max = mL
    -      if (this._length > this._max) trim(this)
    -    }
    -  , get : function () { return this._max }
    -  , enumerable : true
    -  })
    -
    -// resize the cache when the lengthCalculator changes.
    -Object.defineProperty(LRUCache.prototype, "lengthCalculator",
    -  { set : function (lC) {
    -      if (typeof lC !== "function") {
    -        this._lengthCalculator = naiveLength
    -        this._length = this._itemCount
    -        for (var key in this._cache) {
    -          this._cache[key].length = 1
    -        }
    -      } else {
    -        this._lengthCalculator = lC
    -        this._length = 0
    -        for (var key in this._cache) {
    -          this._cache[key].length = this._lengthCalculator(this._cache[key].value)
    -          this._length += this._cache[key].length
    -        }
    -      }
    -
    -      if (this._length > this._max) trim(this)
    -    }
    -  , get : function () { return this._lengthCalculator }
    -  , enumerable : true
    -  })
    -
    -Object.defineProperty(LRUCache.prototype, "length",
    -  { get : function () { return this._length }
    -  , enumerable : true
    -  })
    -
    -
    -Object.defineProperty(LRUCache.prototype, "itemCount",
    -  { get : function () { return this._itemCount }
    -  , enumerable : true
    -  })
    -
    -LRUCache.prototype.forEach = function (fn, thisp) {
    -  thisp = thisp || this
    -  var i = 0
    -  var itemCount = this._itemCount
    -
    -  for (var k = this._mru - 1; k >= 0 && i < itemCount; k--) if (this._lruList[k]) {
    -    i++
    -    var hit = this._lruList[k]
    -    if (isStale(this, hit)) {
    -      del(this, hit)
    -      if (!this._allowStale) hit = undefined
    -    }
    -    if (hit) {
    -      fn.call(thisp, hit.value, hit.key, this)
    -    }
    -  }
    -}
    -
    -LRUCache.prototype.keys = function () {
    -  var keys = new Array(this._itemCount)
    -  var i = 0
    -  for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) {
    -    var hit = this._lruList[k]
    -    keys[i++] = hit.key
    -  }
    -  return keys
    -}
    -
    -LRUCache.prototype.values = function () {
    -  var values = new Array(this._itemCount)
    -  var i = 0
    -  for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) {
    -    var hit = this._lruList[k]
    -    values[i++] = hit.value
    -  }
    -  return values
    -}
    -
    -LRUCache.prototype.reset = function () {
    -  if (this._dispose && this._cache) {
    -    for (var k in this._cache) {
    -      this._dispose(k, this._cache[k].value)
    -    }
    -  }
    -
    -  this._cache = Object.create(null) // hash of items by key
    -  this._lruList = Object.create(null) // list of items in order of use recency
    -  this._mru = 0 // most recently used
    -  this._lru = 0 // least recently used
    -  this._length = 0 // number of items in the list
    -  this._itemCount = 0
    -}
    -
    -// Provided for debugging/dev purposes only. No promises whatsoever that
    -// this API stays stable.
    -LRUCache.prototype.dump = function () {
    -  return this._cache
    -}
    -
    -LRUCache.prototype.dumpLru = function () {
    -  return this._lruList
    -}
    -
    -LRUCache.prototype.set = function (key, value, maxAge) {
    -  maxAge = maxAge || this._maxAge
    -  var now = maxAge ? Date.now() : 0
    -
    -  if (hOP(this._cache, key)) {
    -    // dispose of the old one before overwriting
    -    if (this._dispose)
    -      this._dispose(key, this._cache[key].value)
    -
    -    this._cache[key].now = now
    -    this._cache[key].maxAge = maxAge
    -    this._cache[key].value = value
    -    this.get(key)
    -    return true
    -  }
    -
    -  var len = this._lengthCalculator(value)
    -  var hit = new Entry(key, value, this._mru++, len, now, maxAge)
    -
    -  // oversized objects fall out of cache automatically.
    -  if (hit.length > this._max) {
    -    if (this._dispose) this._dispose(key, value)
    -    return false
    -  }
    -
    -  this._length += hit.length
    -  this._lruList[hit.lu] = this._cache[key] = hit
    -  this._itemCount ++
    -
    -  if (this._length > this._max)
    -    trim(this)
    -
    -  return true
    -}
    -
    -LRUCache.prototype.has = function (key) {
    -  if (!hOP(this._cache, key)) return false
    -  var hit = this._cache[key]
    -  if (isStale(this, hit)) {
    -    return false
    -  }
    -  return true
    -}
    -
    -LRUCache.prototype.get = function (key) {
    -  return get(this, key, true)
    -}
    -
    -LRUCache.prototype.peek = function (key) {
    -  return get(this, key, false)
    -}
    -
    -LRUCache.prototype.pop = function () {
    -  var hit = this._lruList[this._lru]
    -  del(this, hit)
    -  return hit || null
    -}
    -
    -LRUCache.prototype.del = function (key) {
    -  del(this, this._cache[key])
    -}
    -
    -function get (self, key, doUse) {
    -  var hit = self._cache[key]
    -  if (hit) {
    -    if (isStale(self, hit)) {
    -      del(self, hit)
    -      if (!self._allowStale) hit = undefined
    -    } else {
    -      if (doUse) use(self, hit)
    -    }
    -    if (hit) hit = hit.value
    -  }
    -  return hit
    -}
    -
    -function isStale(self, hit) {
    -  if (!hit || (!hit.maxAge && !self._maxAge)) return false
    -  var stale = false;
    -  var diff = Date.now() - hit.now
    -  if (hit.maxAge) {
    -    stale = diff > hit.maxAge
    -  } else {
    -    stale = self._maxAge && (diff > self._maxAge)
    -  }
    -  return stale;
    -}
    -
    -function use (self, hit) {
    -  shiftLU(self, hit)
    -  hit.lu = self._mru ++
    -  self._lruList[hit.lu] = hit
    -}
    -
    -function trim (self) {
    -  while (self._lru < self._mru && self._length > self._max)
    -    del(self, self._lruList[self._lru])
    -}
    -
    -function shiftLU (self, hit) {
    -  delete self._lruList[ hit.lu ]
    -  while (self._lru < self._mru && !self._lruList[self._lru]) self._lru ++
    -}
    -
    -function del (self, hit) {
    -  if (hit) {
    -    if (self._dispose) self._dispose(hit.key, hit.value)
    -    self._length -= hit.length
    -    self._itemCount --
    -    delete self._cache[ hit.key ]
    -    shiftLU(self, hit)
    -  }
    -}
    -
    -// classy, since V8 prefers predictable objects.
    -function Entry (key, value, lu, length, now, maxAge) {
    -  this.key = key
    -  this.value = value
    -  this.lu = lu
    -  this.length = length
    -  this.now = now
    -  if (maxAge) this.maxAge = maxAge
    -}
    -
    -})()
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json
    deleted file mode 100644
    index 92aad1277..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json
    +++ /dev/null
    @@ -1,58 +0,0 @@
    -{
    -  "name": "lru-cache",
    -  "description": "A cache object that deletes the least-recently-used items.",
    -  "version": "2.6.5",
    -  "author": {
    -    "name": "Isaac Z. Schlueter",
    -    "email": "i@izs.me"
    -  },
    -  "keywords": [
    -    "mru",
    -    "lru",
    -    "cache"
    -  ],
    -  "scripts": {
    -    "test": "tap test --gc"
    -  },
    -  "main": "lib/lru-cache.js",
    -  "repository": {
    -    "type": "git",
    -    "url": "git://github.com/isaacs/node-lru-cache.git"
    -  },
    -  "devDependencies": {
    -    "tap": "^1.2.0",
    -    "weak": ""
    -  },
    -  "license": "ISC",
    -  "gitHead": "7062a0c891bfb80a294be9217e4de0f882e75776",
    -  "bugs": {
    -    "url": "https://github.com/isaacs/node-lru-cache/issues"
    -  },
    -  "homepage": "https://github.com/isaacs/node-lru-cache#readme",
    -  "_id": "lru-cache@2.6.5",
    -  "_shasum": "e56d6354148ede8d7707b58d143220fd08df0fd5",
    -  "_from": "lru-cache@>=2.0.0 <3.0.0",
    -  "_npmVersion": "3.0.0",
    -  "_nodeVersion": "2.2.1",
    -  "_npmUser": {
    -    "name": "isaacs",
    -    "email": "isaacs@npmjs.com"
    -  },
    -  "dist": {
    -    "shasum": "e56d6354148ede8d7707b58d143220fd08df0fd5",
    -    "tarball": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.6.5.tgz"
    -  },
    -  "maintainers": [
    -    {
    -      "name": "isaacs",
    -      "email": "isaacs@npmjs.com"
    -    },
    -    {
    -      "name": "othiym23",
    -      "email": "ogd@aoaioxxysz.net"
    -    }
    -  ],
    -  "directories": {},
    -  "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.5.tgz",
    -  "readme": "ERROR: No README data found!"
    -}
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js
    deleted file mode 100644
    index 949113e9c..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js
    +++ /dev/null
    @@ -1,395 +0,0 @@
    -var test = require("tap").test
    -  , LRU = require("../")
    -
    -test("basic", function (t) {
    -  var cache = new LRU({max: 10})
    -  cache.set("key", "value")
    -  t.equal(cache.get("key"), "value")
    -  t.equal(cache.get("nada"), undefined)
    -  t.equal(cache.length, 1)
    -  t.equal(cache.max, 10)
    -  t.end()
    -})
    -
    -test("least recently set", function (t) {
    -  var cache = new LRU(2)
    -  cache.set("a", "A")
    -  cache.set("b", "B")
    -  cache.set("c", "C")
    -  t.equal(cache.get("c"), "C")
    -  t.equal(cache.get("b"), "B")
    -  t.equal(cache.get("a"), undefined)
    -  t.end()
    -})
    -
    -test("lru recently gotten", function (t) {
    -  var cache = new LRU(2)
    -  cache.set("a", "A")
    -  cache.set("b", "B")
    -  cache.get("a")
    -  cache.set("c", "C")
    -  t.equal(cache.get("c"), "C")
    -  t.equal(cache.get("b"), undefined)
    -  t.equal(cache.get("a"), "A")
    -  t.end()
    -})
    -
    -test("del", function (t) {
    -  var cache = new LRU(2)
    -  cache.set("a", "A")
    -  cache.del("a")
    -  t.equal(cache.get("a"), undefined)
    -  t.end()
    -})
    -
    -test("max", function (t) {
    -  var cache = new LRU(3)
    -
    -  // test changing the max, verify that the LRU items get dropped.
    -  cache.max = 100
    -  for (var i = 0; i < 100; i ++) cache.set(i, i)
    -  t.equal(cache.length, 100)
    -  for (var i = 0; i < 100; i ++) {
    -    t.equal(cache.get(i), i)
    -  }
    -  cache.max = 3
    -  t.equal(cache.length, 3)
    -  for (var i = 0; i < 97; i ++) {
    -    t.equal(cache.get(i), undefined)
    -  }
    -  for (var i = 98; i < 100; i ++) {
    -    t.equal(cache.get(i), i)
    -  }
    -
    -  // now remove the max restriction, and try again.
    -  cache.max = "hello"
    -  for (var i = 0; i < 100; i ++) cache.set(i, i)
    -  t.equal(cache.length, 100)
    -  for (var i = 0; i < 100; i ++) {
    -    t.equal(cache.get(i), i)
    -  }
    -  // should trigger an immediate resize
    -  cache.max = 3
    -  t.equal(cache.length, 3)
    -  for (var i = 0; i < 97; i ++) {
    -    t.equal(cache.get(i), undefined)
    -  }
    -  for (var i = 98; i < 100; i ++) {
    -    t.equal(cache.get(i), i)
    -  }
    -  t.end()
    -})
    -
    -test("reset", function (t) {
    -  var cache = new LRU(10)
    -  cache.set("a", "A")
    -  cache.set("b", "B")
    -  cache.reset()
    -  t.equal(cache.length, 0)
    -  t.equal(cache.max, 10)
    -  t.equal(cache.get("a"), undefined)
    -  t.equal(cache.get("b"), undefined)
    -  t.end()
    -})
    -
    -
    -// Note: `.dump()` is a debugging tool only. No guarantees are made
    -// about the format/layout of the response.
    -test("dump", function (t) {
    -  var cache = new LRU(10)
    -  var d = cache.dump();
    -  t.equal(Object.keys(d).length, 0, "nothing in dump for empty cache")
    -  cache.set("a", "A")
    -  var d = cache.dump()  // { a: { key: "a", value: "A", lu: 0 } }
    -  t.ok(d.a)
    -  t.equal(d.a.key, "a")
    -  t.equal(d.a.value, "A")
    -  t.equal(d.a.lu, 0)
    -
    -  cache.set("b", "B")
    -  cache.get("b")
    -  d = cache.dump()
    -  t.ok(d.b)
    -  t.equal(d.b.key, "b")
    -  t.equal(d.b.value, "B")
    -  t.equal(d.b.lu, 2)
    -
    -  t.end()
    -})
    -
    -
    -test("basic with weighed length", function (t) {
    -  var cache = new LRU({
    -    max: 100,
    -    length: function (item) { return item.size }
    -  })
    -  cache.set("key", {val: "value", size: 50})
    -  t.equal(cache.get("key").val, "value")
    -  t.equal(cache.get("nada"), undefined)
    -  t.equal(cache.lengthCalculator(cache.get("key")), 50)
    -  t.equal(cache.length, 50)
    -  t.equal(cache.max, 100)
    -  t.end()
    -})
    -
    -
    -test("weighed length item too large", function (t) {
    -  var cache = new LRU({
    -    max: 10,
    -    length: function (item) { return item.size }
    -  })
    -  t.equal(cache.max, 10)
    -
    -  // should fall out immediately
    -  cache.set("key", {val: "value", size: 50})
    -
    -  t.equal(cache.length, 0)
    -  t.equal(cache.get("key"), undefined)
    -  t.end()
    -})
    -
    -test("least recently set with weighed length", function (t) {
    -  var cache = new LRU({
    -    max:8,
    -    length: function (item) { return item.length }
    -  })
    -  cache.set("a", "A")
    -  cache.set("b", "BB")
    -  cache.set("c", "CCC")
    -  cache.set("d", "DDDD")
    -  t.equal(cache.get("d"), "DDDD")
    -  t.equal(cache.get("c"), "CCC")
    -  t.equal(cache.get("b"), undefined)
    -  t.equal(cache.get("a"), undefined)
    -  t.end()
    -})
    -
    -test("lru recently gotten with weighed length", function (t) {
    -  var cache = new LRU({
    -    max: 8,
    -    length: function (item) { return item.length }
    -  })
    -  cache.set("a", "A")
    -  cache.set("b", "BB")
    -  cache.set("c", "CCC")
    -  cache.get("a")
    -  cache.get("b")
    -  cache.set("d", "DDDD")
    -  t.equal(cache.get("c"), undefined)
    -  t.equal(cache.get("d"), "DDDD")
    -  t.equal(cache.get("b"), "BB")
    -  t.equal(cache.get("a"), "A")
    -  t.end()
    -})
    -
    -test("set returns proper booleans", function(t) {
    -  var cache = new LRU({
    -    max: 5,
    -    length: function (item) { return item.length }
    -  })
    -
    -  t.equal(cache.set("a", "A"), true)
    -
    -  // should return false for max exceeded
    -  t.equal(cache.set("b", "donuts"), false)
    -
    -  t.equal(cache.set("b", "B"), true)
    -  t.equal(cache.set("c", "CCCC"), true)
    -  t.end()
    -})
    -
    -test("drop the old items", function(t) {
    -  var cache = new LRU({
    -    max: 5,
    -    maxAge: 50
    -  })
    -
    -  cache.set("a", "A")
    -
    -  setTimeout(function () {
    -    cache.set("b", "b")
    -    t.equal(cache.get("a"), "A")
    -  }, 25)
    -
    -  setTimeout(function () {
    -    cache.set("c", "C")
    -    // timed out
    -    t.notOk(cache.get("a"))
    -  }, 60 + 25)
    -
    -  setTimeout(function () {
    -    t.notOk(cache.get("b"))
    -    t.equal(cache.get("c"), "C")
    -  }, 90)
    -
    -  setTimeout(function () {
    -    t.notOk(cache.get("c"))
    -    t.end()
    -  }, 155)
    -})
    -
    -test("individual item can have it's own maxAge", function(t) {
    -  var cache = new LRU({
    -    max: 5,
    -    maxAge: 50
    -  })
    -
    -  cache.set("a", "A", 20)
    -  setTimeout(function () {
    -    t.notOk(cache.get("a"))
    -    t.end()
    -  }, 25)
    -})
    -
    -test("individual item can have it's own maxAge > cache's", function(t) {
    -  var cache = new LRU({
    -    max: 5,
    -    maxAge: 20
    -  })
    -
    -  cache.set("a", "A", 50)
    -  setTimeout(function () {
    -    t.equal(cache.get("a"), "A")
    -    t.end()
    -  }, 25)
    -})
    -
    -test("disposal function", function(t) {
    -  var disposed = false
    -  var cache = new LRU({
    -    max: 1,
    -    dispose: function (k, n) {
    -      disposed = n
    -    }
    -  })
    -
    -  cache.set(1, 1)
    -  cache.set(2, 2)
    -  t.equal(disposed, 1)
    -  cache.set(3, 3)
    -  t.equal(disposed, 2)
    -  cache.reset()
    -  t.equal(disposed, 3)
    -  t.end()
    -})
    -
    -test("disposal function on too big of item", function(t) {
    -  var disposed = false
    -  var cache = new LRU({
    -    max: 1,
    -    length: function (k) {
    -      return k.length
    -    },
    -    dispose: function (k, n) {
    -      disposed = n
    -    }
    -  })
    -  var obj = [ 1, 2 ]
    -
    -  t.equal(disposed, false)
    -  cache.set("obj", obj)
    -  t.equal(disposed, obj)
    -  t.end()
    -})
    -
    -test("has()", function(t) {
    -  var cache = new LRU({
    -    max: 1,
    -    maxAge: 10
    -  })
    -
    -  cache.set('foo', 'bar')
    -  t.equal(cache.has('foo'), true)
    -  cache.set('blu', 'baz')
    -  t.equal(cache.has('foo'), false)
    -  t.equal(cache.has('blu'), true)
    -  setTimeout(function() {
    -    t.equal(cache.has('blu'), false)
    -    t.end()
    -  }, 15)
    -})
    -
    -test("stale", function(t) {
    -  var cache = new LRU({
    -    maxAge: 10,
    -    stale: true
    -  })
    -
    -  cache.set('foo', 'bar')
    -  t.equal(cache.get('foo'), 'bar')
    -  t.equal(cache.has('foo'), true)
    -  setTimeout(function() {
    -    t.equal(cache.has('foo'), false)
    -    t.equal(cache.get('foo'), 'bar')
    -    t.equal(cache.get('foo'), undefined)
    -    t.end()
    -  }, 15)
    -})
    -
    -test("lru update via set", function(t) {
    -  var cache = LRU({ max: 2 });
    -
    -  cache.set('foo', 1);
    -  cache.set('bar', 2);
    -  cache.del('bar');
    -  cache.set('baz', 3);
    -  cache.set('qux', 4);
    -
    -  t.equal(cache.get('foo'), undefined)
    -  t.equal(cache.get('bar'), undefined)
    -  t.equal(cache.get('baz'), 3)
    -  t.equal(cache.get('qux'), 4)
    -  t.end()
    -})
    -
    -test("least recently set w/ peek", function (t) {
    -  var cache = new LRU(2)
    -  cache.set("a", "A")
    -  cache.set("b", "B")
    -  t.equal(cache.peek("a"), "A")
    -  cache.set("c", "C")
    -  t.equal(cache.get("c"), "C")
    -  t.equal(cache.get("b"), "B")
    -  t.equal(cache.get("a"), undefined)
    -  t.end()
    -})
    -
    -test("pop the least used item", function (t) {
    -  var cache = new LRU(3)
    -  , last
    -
    -  cache.set("a", "A")
    -  cache.set("b", "B")
    -  cache.set("c", "C")
    -
    -  t.equal(cache.length, 3)
    -  t.equal(cache.max, 3)
    -
    -  // Ensure we pop a, c, b
    -  cache.get("b", "B")
    -
    -  last = cache.pop()
    -  t.equal(last.key, "a")
    -  t.equal(last.value, "A")
    -  t.equal(cache.length, 2)
    -  t.equal(cache.max, 3)
    -
    -  last = cache.pop()
    -  t.equal(last.key, "c")
    -  t.equal(last.value, "C")
    -  t.equal(cache.length, 1)
    -  t.equal(cache.max, 3)
    -
    -  last = cache.pop()
    -  t.equal(last.key, "b")
    -  t.equal(last.value, "B")
    -  t.equal(cache.length, 0)
    -  t.equal(cache.max, 3)
    -
    -  last = cache.pop()
    -  t.equal(last, null)
    -  t.equal(cache.length, 0)
    -  t.equal(cache.max, 3)
    -
    -  t.end()
    -})
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js
    deleted file mode 100644
    index 4190417cb..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js
    +++ /dev/null
    @@ -1,120 +0,0 @@
    -var test = require('tap').test
    -var LRU = require('../')
    -
    -test('forEach', function (t) {
    -  var l = new LRU(5)
    -  for (var i = 0; i < 10; i ++) {
    -    l.set(i.toString(), i.toString(2))
    -  }
    -
    -  var i = 9
    -  l.forEach(function (val, key, cache) {
    -    t.equal(cache, l)
    -    t.equal(key, i.toString())
    -    t.equal(val, i.toString(2))
    -    i -= 1
    -  })
    -
    -  // get in order of most recently used
    -  l.get(6)
    -  l.get(8)
    -
    -  var order = [ 8, 6, 9, 7, 5 ]
    -  var i = 0
    -
    -  l.forEach(function (val, key, cache) {
    -    var j = order[i ++]
    -    t.equal(cache, l)
    -    t.equal(key, j.toString())
    -    t.equal(val, j.toString(2))
    -  })
    -  t.equal(i, order.length);
    -
    -  t.end()
    -})
    -
    -test('keys() and values()', function (t) {
    -  var l = new LRU(5)
    -  for (var i = 0; i < 10; i ++) {
    -    l.set(i.toString(), i.toString(2))
    -  }
    -
    -  t.similar(l.keys(), ['9', '8', '7', '6', '5'])
    -  t.similar(l.values(), ['1001', '1000', '111', '110', '101'])
    -
    -  // get in order of most recently used
    -  l.get(6)
    -  l.get(8)
    -
    -  t.similar(l.keys(), ['8', '6', '9', '7', '5'])
    -  t.similar(l.values(), ['1000', '110', '1001', '111', '101'])
    -
    -  t.end()
    -})
    -
    -test('all entries are iterated over', function(t) {
    -  var l = new LRU(5)
    -  for (var i = 0; i < 10; i ++) {
    -    l.set(i.toString(), i.toString(2))
    -  }
    -
    -  var i = 0
    -  l.forEach(function (val, key, cache) {
    -    if (i > 0) {
    -      cache.del(key)
    -    }
    -    i += 1
    -  })
    -
    -  t.equal(i, 5)
    -  t.equal(l.keys().length, 1)
    -
    -  t.end()
    -})
    -
    -test('all stale entries are removed', function(t) {
    -  var l = new LRU({ max: 5, maxAge: -5, stale: true })
    -  for (var i = 0; i < 10; i ++) {
    -    l.set(i.toString(), i.toString(2))
    -  }
    -
    -  var i = 0
    -  l.forEach(function () {
    -    i += 1
    -  })
    -
    -  t.equal(i, 5)
    -  t.equal(l.keys().length, 0)
    -
    -  t.end()
    -})
    -
    -test('expires', function (t) {
    -  var l = new LRU({
    -    max: 10,
    -    maxAge: 50
    -  })
    -  for (var i = 0; i < 10; i++) {
    -    l.set(i.toString(), i.toString(2), ((i % 2) ? 25 : undefined))
    -  }
    -
    -  var i = 0
    -  var order = [ 8, 6, 4, 2, 0 ]
    -  setTimeout(function () {
    -    l.forEach(function (val, key, cache) {
    -      var j = order[i++]
    -      t.equal(cache, l)
    -      t.equal(key, j.toString())
    -      t.equal(val, j.toString(2))
    -    })
    -    t.equal(i, order.length);
    -
    -    setTimeout(function () {
    -      var count = 0;
    -      l.forEach(function (val, key, cache) { count++; })
    -      t.equal(0, count);
    -      t.end()
    -    }, 25)
    -
    -  }, 26)
    -})
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js
    deleted file mode 100644
    index b5912f6f1..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js
    +++ /dev/null
    @@ -1,51 +0,0 @@
    -#!/usr/bin/env node --expose_gc
    -
    -
    -var weak = require('weak');
    -var test = require('tap').test
    -var LRU = require('../')
    -var l = new LRU({ max: 10 })
    -var refs = 0
    -function X() {
    -  refs ++
    -  weak(this, deref)
    -}
    -
    -function deref() {
    -  refs --
    -}
    -
    -test('no leaks', function (t) {
    -  // fill up the cache
    -  for (var i = 0; i < 100; i++) {
    -    l.set(i, new X);
    -    // throw some gets in there, too.
    -    if (i % 2 === 0)
    -      l.get(i / 2)
    -  }
    -
    -  gc()
    -
    -  var start = process.memoryUsage()
    -
    -  // capture the memory
    -  var startRefs = refs
    -
    -  // do it again, but more
    -  for (var i = 0; i < 10000; i++) {
    -    l.set(i, new X);
    -    // throw some gets in there, too.
    -    if (i % 2 === 0)
    -      l.get(i / 2)
    -  }
    -
    -  gc()
    -
    -  var end = process.memoryUsage()
    -  t.equal(refs, startRefs, 'no leaky refs')
    -
    -  console.error('start: %j\n' +
    -                'end:   %j', start, end);
    -  t.pass();
    -  t.end();
    -})
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE
    deleted file mode 100644
    index 19129e315..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE
    +++ /dev/null
    @@ -1,15 +0,0 @@
    -The ISC License
    -
    -Copyright (c) Isaac Z. Schlueter and Contributors
    -
    -Permission to use, copy, modify, and/or distribute this software for any
    -purpose with or without fee is hereby granted, provided that the above
    -copyright notice and this permission notice appear in all copies.
    -
    -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
    -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md
    deleted file mode 100644
    index 25a38a53f..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md
    +++ /dev/null
    @@ -1,53 +0,0 @@
    -# sigmund
    -
    -Quick and dirty signatures for Objects.
    -
    -This is like a much faster `deepEquals` comparison, which returns a
    -string key suitable for caches and the like.
    -
    -## Usage
    -
    -```javascript
    -function doSomething (someObj) {
    -  var key = sigmund(someObj, maxDepth) // max depth defaults to 10
    -  var cached = cache.get(key)
    -  if (cached) return cached
    -
    -  var result = expensiveCalculation(someObj)
    -  cache.set(key, result)
    -  return result
    -}
    -```
    -
    -The resulting key will be as unique and reproducible as calling
    -`JSON.stringify` or `util.inspect` on the object, but is much faster.
    -In order to achieve this speed, some differences are glossed over.
    -For example, the object `{0:'foo'}` will be treated identically to the
    -array `['foo']`.
    -
    -Also, just as there is no way to summon the soul from the scribblings
    -of a cocaine-addled psychoanalyst, there is no way to revive the object
    -from the signature string that sigmund gives you.  In fact, it's
    -barely even readable.
    -
    -As with `util.inspect` and `JSON.stringify`, larger objects will
    -produce larger signature strings.
    -
    -Because sigmund is a bit less strict than the more thorough
    -alternatives, the strings will be shorter, and also there is a
    -slightly higher chance for collisions.  For example, these objects
    -have the same signature:
    -
    -    var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}
    -    var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}
    -
    -Like a good Freudian, sigmund is most effective when you already have
    -some understanding of what you're looking for.  It can help you help
    -yourself, but you must be willing to do some work as well.
    -
    -Cycles are handled, and cyclical objects are silently omitted (though
    -the key is included in the signature output.)
    -
    -The second argument is the maximum depth, which defaults to 10,
    -because that is the maximum object traversal depth covered by most
    -insurance carriers.
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js
    deleted file mode 100644
    index 5acfd6d90..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js
    +++ /dev/null
    @@ -1,283 +0,0 @@
    -// different ways to id objects
    -// use a req/res pair, since it's crazy deep and cyclical
    -
    -// sparseFE10 and sigmund are usually pretty close, which is to be expected,
    -// since they are essentially the same algorithm, except that sigmund handles
    -// regular expression objects properly.
    -
    -
    -var http = require('http')
    -var util = require('util')
    -var sigmund = require('./sigmund.js')
    -var sreq, sres, creq, cres, test
    -
    -http.createServer(function (q, s) {
    -  sreq = q
    -  sres = s
    -  sres.end('ok')
    -  this.close(function () { setTimeout(function () {
    -    start()
    -  }, 200) })
    -}).listen(1337, function () {
    -  creq = http.get({ port: 1337 })
    -  creq.on('response', function (s) { cres = s })
    -})
    -
    -function start () {
    -  test = [sreq, sres, creq, cres]
    -  // test = sreq
    -  // sreq.sres = sres
    -  // sreq.creq = creq
    -  // sreq.cres = cres
    -
    -  for (var i in exports.compare) {
    -    console.log(i)
    -    var hash = exports.compare[i]()
    -    console.log(hash)
    -    console.log(hash.length)
    -    console.log('')
    -  }
    -
    -  require('bench').runMain()
    -}
    -
    -function customWs (obj, md, d) {
    -  d = d || 0
    -  var to = typeof obj
    -  if (to === 'undefined' || to === 'function' || to === null) return ''
    -  if (d > md || !obj || to !== 'object') return ('' + obj).replace(/[\n ]+/g, '')
    -
    -  if (Array.isArray(obj)) {
    -    return obj.map(function (i, _, __) {
    -      return customWs(i, md, d + 1)
    -    }).reduce(function (a, b) { return a + b }, '')
    -  }
    -
    -  var keys = Object.keys(obj)
    -  return keys.map(function (k, _, __) {
    -    return k + ':' + customWs(obj[k], md, d + 1)
    -  }).reduce(function (a, b) { return a + b }, '')
    -}
    -
    -function custom (obj, md, d) {
    -  d = d || 0
    -  var to = typeof obj
    -  if (to === 'undefined' || to === 'function' || to === null) return ''
    -  if (d > md || !obj || to !== 'object') return '' + obj
    -
    -  if (Array.isArray(obj)) {
    -    return obj.map(function (i, _, __) {
    -      return custom(i, md, d + 1)
    -    }).reduce(function (a, b) { return a + b }, '')
    -  }
    -
    -  var keys = Object.keys(obj)
    -  return keys.map(function (k, _, __) {
    -    return k + ':' + custom(obj[k], md, d + 1)
    -  }).reduce(function (a, b) { return a + b }, '')
    -}
    -
    -function sparseFE2 (obj, maxDepth) {
    -  var seen = []
    -  var soFar = ''
    -  function ch (v, depth) {
    -    if (depth > maxDepth) return
    -    if (typeof v === 'function' || typeof v === 'undefined') return
    -    if (typeof v !== 'object' || !v) {
    -      soFar += v
    -      return
    -    }
    -    if (seen.indexOf(v) !== -1 || depth === maxDepth) return
    -    seen.push(v)
    -    soFar += '{'
    -    Object.keys(v).forEach(function (k, _, __) {
    -      // pseudo-private values.  skip those.
    -      if (k.charAt(0) === '_') return
    -      var to = typeof v[k]
    -      if (to === 'function' || to === 'undefined') return
    -      soFar += k + ':'
    -      ch(v[k], depth + 1)
    -    })
    -    soFar += '}'
    -  }
    -  ch(obj, 0)
    -  return soFar
    -}
    -
    -function sparseFE (obj, maxDepth) {
    -  var seen = []
    -  var soFar = ''
    -  function ch (v, depth) {
    -    if (depth > maxDepth) return
    -    if (typeof v === 'function' || typeof v === 'undefined') return
    -    if (typeof v !== 'object' || !v) {
    -      soFar += v
    -      return
    -    }
    -    if (seen.indexOf(v) !== -1 || depth === maxDepth) return
    -    seen.push(v)
    -    soFar += '{'
    -    Object.keys(v).forEach(function (k, _, __) {
    -      // pseudo-private values.  skip those.
    -      if (k.charAt(0) === '_') return
    -      var to = typeof v[k]
    -      if (to === 'function' || to === 'undefined') return
    -      soFar += k
    -      ch(v[k], depth + 1)
    -    })
    -  }
    -  ch(obj, 0)
    -  return soFar
    -}
    -
    -function sparse (obj, maxDepth) {
    -  var seen = []
    -  var soFar = ''
    -  function ch (v, depth) {
    -    if (depth > maxDepth) return
    -    if (typeof v === 'function' || typeof v === 'undefined') return
    -    if (typeof v !== 'object' || !v) {
    -      soFar += v
    -      return
    -    }
    -    if (seen.indexOf(v) !== -1 || depth === maxDepth) return
    -    seen.push(v)
    -    soFar += '{'
    -    for (var k in v) {
    -      // pseudo-private values.  skip those.
    -      if (k.charAt(0) === '_') continue
    -      var to = typeof v[k]
    -      if (to === 'function' || to === 'undefined') continue
    -      soFar += k
    -      ch(v[k], depth + 1)
    -    }
    -  }
    -  ch(obj, 0)
    -  return soFar
    -}
    -
    -function noCommas (obj, maxDepth) {
    -  var seen = []
    -  var soFar = ''
    -  function ch (v, depth) {
    -    if (depth > maxDepth) return
    -    if (typeof v === 'function' || typeof v === 'undefined') return
    -    if (typeof v !== 'object' || !v) {
    -      soFar += v
    -      return
    -    }
    -    if (seen.indexOf(v) !== -1 || depth === maxDepth) return
    -    seen.push(v)
    -    soFar += '{'
    -    for (var k in v) {
    -      // pseudo-private values.  skip those.
    -      if (k.charAt(0) === '_') continue
    -      var to = typeof v[k]
    -      if (to === 'function' || to === 'undefined') continue
    -      soFar += k + ':'
    -      ch(v[k], depth + 1)
    -    }
    -    soFar += '}'
    -  }
    -  ch(obj, 0)
    -  return soFar
    -}
    -
    -
    -function flatten (obj, maxDepth) {
    -  var seen = []
    -  var soFar = ''
    -  function ch (v, depth) {
    -    if (depth > maxDepth) return
    -    if (typeof v === 'function' || typeof v === 'undefined') return
    -    if (typeof v !== 'object' || !v) {
    -      soFar += v
    -      return
    -    }
    -    if (seen.indexOf(v) !== -1 || depth === maxDepth) return
    -    seen.push(v)
    -    soFar += '{'
    -    for (var k in v) {
    -      // pseudo-private values.  skip those.
    -      if (k.charAt(0) === '_') continue
    -      var to = typeof v[k]
    -      if (to === 'function' || to === 'undefined') continue
    -      soFar += k + ':'
    -      ch(v[k], depth + 1)
    -      soFar += ','
    -    }
    -    soFar += '}'
    -  }
    -  ch(obj, 0)
    -  return soFar
    -}
    -
    -exports.compare =
    -{
    -  // 'custom 2': function () {
    -  //   return custom(test, 2, 0)
    -  // },
    -  // 'customWs 2': function () {
    -  //   return customWs(test, 2, 0)
    -  // },
    -  'JSON.stringify (guarded)': function () {
    -    var seen = []
    -    return JSON.stringify(test, function (k, v) {
    -      if (typeof v !== 'object' || !v) return v
    -      if (seen.indexOf(v) !== -1) return undefined
    -      seen.push(v)
    -      return v
    -    })
    -  },
    -
    -  'flatten 10': function () {
    -    return flatten(test, 10)
    -  },
    -
    -  // 'flattenFE 10': function () {
    -  //   return flattenFE(test, 10)
    -  // },
    -
    -  'noCommas 10': function () {
    -    return noCommas(test, 10)
    -  },
    -
    -  'sparse 10': function () {
    -    return sparse(test, 10)
    -  },
    -
    -  'sparseFE 10': function () {
    -    return sparseFE(test, 10)
    -  },
    -
    -  'sparseFE2 10': function () {
    -    return sparseFE2(test, 10)
    -  },
    -
    -  sigmund: function() {
    -    return sigmund(test, 10)
    -  },
    -
    -
    -  // 'util.inspect 1': function () {
    -  //   return util.inspect(test, false, 1, false)
    -  // },
    -  // 'util.inspect undefined': function () {
    -  //   util.inspect(test)
    -  // },
    -  // 'util.inspect 2': function () {
    -  //   util.inspect(test, false, 2, false)
    -  // },
    -  // 'util.inspect 3': function () {
    -  //   util.inspect(test, false, 3, false)
    -  // },
    -  // 'util.inspect 4': function () {
    -  //   util.inspect(test, false, 4, false)
    -  // },
    -  // 'util.inspect Infinity': function () {
    -  //   util.inspect(test, false, Infinity, false)
    -  // }
    -}
    -
    -/** results
    -**/
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json
    deleted file mode 100644
    index 4255e77a9..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json
    +++ /dev/null
    @@ -1,60 +0,0 @@
    -{
    -  "name": "sigmund",
    -  "version": "1.0.1",
    -  "description": "Quick and dirty signatures for Objects.",
    -  "main": "sigmund.js",
    -  "directories": {
    -    "test": "test"
    -  },
    -  "dependencies": {},
    -  "devDependencies": {
    -    "tap": "~0.3.0"
    -  },
    -  "scripts": {
    -    "test": "tap test/*.js",
    -    "bench": "node bench.js"
    -  },
    -  "repository": {
    -    "type": "git",
    -    "url": "git://github.com/isaacs/sigmund.git"
    -  },
    -  "keywords": [
    -    "object",
    -    "signature",
    -    "key",
    -    "data",
    -    "psychoanalysis"
    -  ],
    -  "author": {
    -    "name": "Isaac Z. Schlueter",
    -    "email": "i@izs.me",
    -    "url": "http://blog.izs.me/"
    -  },
    -  "license": "ISC",
    -  "gitHead": "527f97aa5bb253d927348698c0cd3bb267d098c6",
    -  "bugs": {
    -    "url": "https://github.com/isaacs/sigmund/issues"
    -  },
    -  "homepage": "https://github.com/isaacs/sigmund#readme",
    -  "_id": "sigmund@1.0.1",
    -  "_shasum": "3ff21f198cad2175f9f3b781853fd94d0d19b590",
    -  "_from": "sigmund@>=1.0.0 <1.1.0",
    -  "_npmVersion": "2.10.0",
    -  "_nodeVersion": "2.0.1",
    -  "_npmUser": {
    -    "name": "isaacs",
    -    "email": "isaacs@npmjs.com"
    -  },
    -  "dist": {
    -    "shasum": "3ff21f198cad2175f9f3b781853fd94d0d19b590",
    -    "tarball": "http://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz"
    -  },
    -  "maintainers": [
    -    {
    -      "name": "isaacs",
    -      "email": "i@izs.me"
    -    }
    -  ],
    -  "_resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
    -  "readme": "ERROR: No README data found!"
    -}
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js
    deleted file mode 100644
    index 82c7ab8ce..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js
    +++ /dev/null
    @@ -1,39 +0,0 @@
    -module.exports = sigmund
    -function sigmund (subject, maxSessions) {
    -    maxSessions = maxSessions || 10;
    -    var notes = [];
    -    var analysis = '';
    -    var RE = RegExp;
    -
    -    function psychoAnalyze (subject, session) {
    -        if (session > maxSessions) return;
    -
    -        if (typeof subject === 'function' ||
    -            typeof subject === 'undefined') {
    -            return;
    -        }
    -
    -        if (typeof subject !== 'object' || !subject ||
    -            (subject instanceof RE)) {
    -            analysis += subject;
    -            return;
    -        }
    -
    -        if (notes.indexOf(subject) !== -1 || session === maxSessions) return;
    -
    -        notes.push(subject);
    -        analysis += '{';
    -        Object.keys(subject).forEach(function (issue, _, __) {
    -            // pseudo-private values.  skip those.
    -            if (issue.charAt(0) === '_') return;
    -            var to = typeof subject[issue];
    -            if (to === 'function' || to === 'undefined') return;
    -            analysis += issue;
    -            psychoAnalyze(subject[issue], session + 1);
    -        });
    -    }
    -    psychoAnalyze(subject, 0);
    -    return analysis;
    -}
    -
    -// vim: set softtabstop=4 shiftwidth=4:
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js
    deleted file mode 100644
    index 50c53a13e..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js
    +++ /dev/null
    @@ -1,24 +0,0 @@
    -var test = require('tap').test
    -var sigmund = require('../sigmund.js')
    -
    -
    -// occasionally there are duplicates
    -// that's an acceptable edge-case.  JSON.stringify and util.inspect
    -// have some collision potential as well, though less, and collision
    -// detection is expensive.
    -var hash = '{abc/def/g{0h1i2{jkl'
    -var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}
    -var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}
    -
    -var obj3 = JSON.parse(JSON.stringify(obj1))
    -obj3.c = /def/
    -obj3.g[2].cycle = obj3
    -var cycleHash = '{abc/def/g{0h1i2{jklcycle'
    -
    -test('basic', function (t) {
    -    t.equal(sigmund(obj1), hash)
    -    t.equal(sigmund(obj2), hash)
    -    t.equal(sigmund(obj3), cycleHash)
    -    t.end()
    -})
    -
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/package.json b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/package.json
    deleted file mode 100644
    index 5acdd2132..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/package.json
    +++ /dev/null
    @@ -1,57 +0,0 @@
    -{
    -  "author": {
    -    "name": "Isaac Z. Schlueter",
    -    "email": "i@izs.me",
    -    "url": "http://blog.izs.me"
    -  },
    -  "name": "minimatch",
    -  "description": "a glob matcher in javascript",
    -  "version": "0.2.14",
    -  "repository": {
    -    "type": "git",
    -    "url": "git://github.com/isaacs/minimatch.git"
    -  },
    -  "main": "minimatch.js",
    -  "scripts": {
    -    "test": "tap test/*.js"
    -  },
    -  "engines": {
    -    "node": "*"
    -  },
    -  "dependencies": {
    -    "lru-cache": "2",
    -    "sigmund": "~1.0.0"
    -  },
    -  "devDependencies": {
    -    "tap": ""
    -  },
    -  "license": {
    -    "type": "MIT",
    -    "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE"
    -  },
    -  "bugs": {
    -    "url": "https://github.com/isaacs/minimatch/issues"
    -  },
    -  "homepage": "https://github.com/isaacs/minimatch",
    -  "_id": "minimatch@0.2.14",
    -  "dist": {
    -    "shasum": "c74e780574f63c6f9a090e90efbe6ef53a6a756a",
    -    "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz"
    -  },
    -  "_from": "minimatch@>=0.2.11 <0.3.0",
    -  "_npmVersion": "1.3.17",
    -  "_npmUser": {
    -    "name": "isaacs",
    -    "email": "i@izs.me"
    -  },
    -  "maintainers": [
    -    {
    -      "name": "isaacs",
    -      "email": "i@izs.me"
    -    }
    -  ],
    -  "directories": {},
    -  "_shasum": "c74e780574f63c6f9a090e90efbe6ef53a6a756a",
    -  "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz",
    -  "readme": "ERROR: No README data found!"
    -}
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/basic.js b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/basic.js
    deleted file mode 100644
    index ae7ac73c7..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/basic.js
    +++ /dev/null
    @@ -1,399 +0,0 @@
    -// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test
    -//
    -// TODO: Some of these tests do very bad things with backslashes, and will
    -// most likely fail badly on windows.  They should probably be skipped.
    -
    -var tap = require("tap")
    -  , globalBefore = Object.keys(global)
    -  , mm = require("../")
    -  , files = [ "a", "b", "c", "d", "abc"
    -            , "abd", "abe", "bb", "bcd"
    -            , "ca", "cb", "dd", "de"
    -            , "bdir/", "bdir/cfile"]
    -  , next = files.concat([ "a-b", "aXb"
    -                        , ".x", ".y" ])
    -
    -
    -var patterns =
    -  [ "http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test"
    -  , ["a*", ["a", "abc", "abd", "abe"]]
    -  , ["X*", ["X*"], {nonull: true}]
    -
    -  // allow null glob expansion
    -  , ["X*", []]
    -
    -  // isaacs: Slightly different than bash/sh/ksh
    -  // \\* is not un-escaped to literal "*" in a failed match,
    -  // but it does make it get treated as a literal star
    -  , ["\\*", ["\\*"], {nonull: true}]
    -  , ["\\**", ["\\**"], {nonull: true}]
    -  , ["\\*\\*", ["\\*\\*"], {nonull: true}]
    -
    -  , ["b*/", ["bdir/"]]
    -  , ["c*", ["c", "ca", "cb"]]
    -  , ["**", files]
    -
    -  , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}]
    -  , ["s/\\..*//", ["s/\\..*//"], {nonull: true}]
    -
    -  , "legendary larry crashes bashes"
    -  , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"
    -    , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}]
    -  , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"
    -    , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}]
    -
    -  , "character classes"
    -  , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]]
    -  , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd",
    -     "bdir/", "ca", "cb", "dd", "de"]]
    -  , ["a*[^c]", ["abd", "abe"]]
    -  , function () { files.push("a-b", "aXb") }
    -  , ["a[X-]b", ["a-b", "aXb"]]
    -  , function () { files.push(".x", ".y") }
    -  , ["[^a-c]*", ["d", "dd", "de"]]
    -  , function () { files.push("a*b/", "a*b/ooo") }
    -  , ["a\\*b/*", ["a*b/ooo"]]
    -  , ["a\\*?/*", ["a*b/ooo"]]
    -  , ["*\\\\!*", [], {null: true}, ["echo !7"]]
    -  , ["*\\!*", ["echo !7"], null, ["echo !7"]]
    -  , ["*.\\*", ["r.*"], null, ["r.*"]]
    -  , ["a[b]c", ["abc"]]
    -  , ["a[\\b]c", ["abc"]]
    -  , ["a?c", ["abc"]]
    -  , ["a\\*c", [], {null: true}, ["abc"]]
    -  , ["", [""], { null: true }, [""]]
    -
    -  , "http://www.opensource.apple.com/source/bash/bash-23/" +
    -    "bash/tests/glob-test"
    -  , function () { files.push("man/", "man/man1/", "man/man1/bash.1") }
    -  , ["*/man*/bash.*", ["man/man1/bash.1"]]
    -  , ["man/man1/bash.1", ["man/man1/bash.1"]]
    -  , ["a***c", ["abc"], null, ["abc"]]
    -  , ["a*****?c", ["abc"], null, ["abc"]]
    -  , ["?*****??", ["abc"], null, ["abc"]]
    -  , ["*****??", ["abc"], null, ["abc"]]
    -  , ["?*****?c", ["abc"], null, ["abc"]]
    -  , ["?***?****c", ["abc"], null, ["abc"]]
    -  , ["?***?****?", ["abc"], null, ["abc"]]
    -  , ["?***?****", ["abc"], null, ["abc"]]
    -  , ["*******c", ["abc"], null, ["abc"]]
    -  , ["*******?", ["abc"], null, ["abc"]]
    -  , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
    -  , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
    -  , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]]
    -  , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
    -  , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]]
    -  , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]]
    -  , ["[-abc]", ["-"], null, ["-"]]
    -  , ["[abc-]", ["-"], null, ["-"]]
    -  , ["\\", ["\\"], null, ["\\"]]
    -  , ["[\\\\]", ["\\"], null, ["\\"]]
    -  , ["[[]", ["["], null, ["["]]
    -  , ["[", ["["], null, ["["]]
    -  , ["[*", ["[abc"], null, ["[abc"]]
    -  , "a right bracket shall lose its special meaning and\n" +
    -    "represent itself in a bracket expression if it occurs\n" +
    -    "first in the list.  -- POSIX.2 2.8.3.2"
    -  , ["[]]", ["]"], null, ["]"]]
    -  , ["[]-]", ["]"], null, ["]"]]
    -  , ["[a-\z]", ["p"], null, ["p"]]
    -  , ["??**********?****?", [], { null: true }, ["abc"]]
    -  , ["??**********?****c", [], { null: true }, ["abc"]]
    -  , ["?************c****?****", [], { null: true }, ["abc"]]
    -  , ["*c*?**", [], { null: true }, ["abc"]]
    -  , ["a*****c*?**", [], { null: true }, ["abc"]]
    -  , ["a********???*******", [], { null: true }, ["abc"]]
    -  , ["[]", [], { null: true }, ["a"]]
    -  , ["[abc", [], { null: true }, ["["]]
    -
    -  , "nocase tests"
    -  , ["XYZ", ["xYz"], { nocase: true, null: true }
    -    , ["xYz", "ABC", "IjK"]]
    -  , ["ab*", ["ABC"], { nocase: true, null: true }
    -    , ["xYz", "ABC", "IjK"]]
    -  , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true }
    -    , ["xYz", "ABC", "IjK"]]
    -
    -  // [ pattern, [matches], MM opts, files, TAP opts]
    -  , "onestar/twostar"
    -  , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]]
    -  , ["{/?,*}", ["/a", "bb"], {null: true}
    -    , ["/a", "/b/b", "/a/b/c", "bb"]]
    -
    -  , "dots should not match unless requested"
    -  , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]]
    -
    -  // .. and . can only match patterns starting with .,
    -  // even when options.dot is set.
    -  , function () {
    -      files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"]
    -    }
    -  , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}]
    -  , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}]
    -  , ["a/*/b", ["a/c/b"], {dot:false}]
    -  , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}]
    -
    -
    -  // this also tests that changing the options needs
    -  // to change the cache key, even if the pattern is
    -  // the same!
    -  , ["**", ["a/b","a/.d",".a/.d"], { dot: true }
    -    , [ ".a/.d", "a/.d", "a/b"]]
    -
    -  , "paren sets cannot contain slashes"
    -  , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]]
    -
    -  // brace sets trump all else.
    -  //
    -  // invalid glob pattern.  fails on bash4 and bsdglob.
    -  // however, in this implementation, it's easier just
    -  // to do the intuitive thing, and let brace-expansion
    -  // actually come before parsing any extglob patterns,
    -  // like the documentation seems to say.
    -  //
    -  // XXX: if anyone complains about this, either fix it
    -  // or tell them to grow up and stop complaining.
    -  //
    -  // bash/bsdglob says this:
    -  // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]]
    -  // but we do this instead:
    -  , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]]
    -
    -  // test partial parsing in the presence of comment/negation chars
    -  , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]]
    -  , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]]
    -
    -  // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped.
    -  , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g"
    -    , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"]
    -    , {}
    -    , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]]
    -
    -
    -  // crazy nested {,,} and *(||) tests.
    -  , function () {
    -      files = [ "a", "b", "c", "d"
    -              , "ab", "ac", "ad"
    -              , "bc", "cb"
    -              , "bc,d", "c,db", "c,d"
    -              , "d)", "(b|c", "*(b|c"
    -              , "b|c", "b|cc", "cb|c"
    -              , "x(a|b|c)", "x(a|c)"
    -              , "(a|b|c)", "(a|c)"]
    -    }
    -  , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]]
    -  , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]]
    -  // a
    -  // *(b|c)
    -  // *(b|d)
    -  , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]]
    -  , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]]
    -
    -
    -  // test various flag settings.
    -  , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"]
    -    , { noext: true } ]
    -  , ["a?b", ["x/y/acb", "acb/"], {matchBase: true}
    -    , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ]
    -  , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]]
    -
    -
    -  // begin channelling Boole and deMorgan...
    -  , "negation tests"
    -  , function () {
    -      files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"]
    -    }
    -
    -  // anything that is NOT a* matches.
    -  , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]]
    -
    -  // anything that IS !a* matches.
    -  , ["!a*", ["!ab", "!abc"], {nonegate: true}]
    -
    -  // anything that IS a* matches
    -  , ["!!a*", ["a!b"]]
    -
    -  // anything that is NOT !a* matches
    -  , ["!\\!a*", ["a!b", "d", "e", "\\!a"]]
    -
    -  // negation nestled within a pattern
    -  , function () {
    -      files = [ "foo.js"
    -              , "foo.bar"
    -              // can't match this one without negative lookbehind.
    -              , "foo.js.js"
    -              , "blar.js"
    -              , "foo."
    -              , "boo.js.boo" ]
    -    }
    -  , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ]
    -
    -  // https://github.com/isaacs/minimatch/issues/5
    -  , function () {
    -      files = [ 'a/b/.x/c'
    -              , 'a/b/.x/c/d'
    -              , 'a/b/.x/c/d/e'
    -              , 'a/b/.x'
    -              , 'a/b/.x/'
    -              , 'a/.x/b'
    -              , '.x'
    -              , '.x/'
    -              , '.x/a'
    -              , '.x/a/b'
    -              , 'a/.x/b/.x/c'
    -              , '.x/.x' ]
    -  }
    -  , ["**/.x/**", [ '.x/'
    -                 , '.x/a'
    -                 , '.x/a/b'
    -                 , 'a/.x/b'
    -                 , 'a/b/.x/'
    -                 , 'a/b/.x/c'
    -                 , 'a/b/.x/c/d'
    -                 , 'a/b/.x/c/d/e' ] ]
    -
    -  ]
    -
    -var regexps =
    -  [ '/^(?:(?=.)a[^/]*?)$/',
    -    '/^(?:(?=.)X[^/]*?)$/',
    -    '/^(?:(?=.)X[^/]*?)$/',
    -    '/^(?:\\*)$/',
    -    '/^(?:(?=.)\\*[^/]*?)$/',
    -    '/^(?:\\*\\*)$/',
    -    '/^(?:(?=.)b[^/]*?\\/)$/',
    -    '/^(?:(?=.)c[^/]*?)$/',
    -    '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/',
    -    '/^(?:\\.\\.\\/(?!\\.)(?=.)[^/]*?\\/)$/',
    -    '/^(?:s\\/(?=.)\\.\\.[^/]*?\\/)$/',
    -    '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/1\\/)$/',
    -    '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/\u0001\\/)$/',
    -    '/^(?:(?!\\.)(?=.)[a-c]b[^/]*?)$/',
    -    '/^(?:(?!\\.)(?=.)[a-y][^/]*?[^c])$/',
    -    '/^(?:(?=.)a[^/]*?[^c])$/',
    -    '/^(?:(?=.)a[X-]b)$/',
    -    '/^(?:(?!\\.)(?=.)[^a-c][^/]*?)$/',
    -    '/^(?:a\\*b\\/(?!\\.)(?=.)[^/]*?)$/',
    -    '/^(?:(?=.)a\\*[^/]\\/(?!\\.)(?=.)[^/]*?)$/',
    -    '/^(?:(?!\\.)(?=.)[^/]*?\\\\\\![^/]*?)$/',
    -    '/^(?:(?!\\.)(?=.)[^/]*?\\![^/]*?)$/',
    -    '/^(?:(?!\\.)(?=.)[^/]*?\\.\\*)$/',
    -    '/^(?:(?=.)a[b]c)$/',
    -    '/^(?:(?=.)a[b]c)$/',
    -    '/^(?:(?=.)a[^/]c)$/',
    -    '/^(?:a\\*c)$/',
    -    'false',
    -    '/^(?:(?!\\.)(?=.)[^/]*?\\/(?=.)man[^/]*?\\/(?=.)bash\\.[^/]*?)$/',
    -    '/^(?:man\\/man1\\/bash\\.1)$/',
    -    '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?c)$/',
    -    '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/',
    -    '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/',
    -    '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/',
    -    '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/',
    -    '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/',
    -    '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/',
    -    '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/',
    -    '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c)$/',
    -    '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/])$/',
    -    '/^(?:(?=.)a[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/',
    -    '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/',
    -    '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k[^/]*?[^/]*?[^/]*?)$/',
    -    '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k)$/',
    -    '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k[^/]*?[^/]*?)$/',
    -    '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/',
    -    '/^(?:(?!\\.)(?=.)[-abc])$/',
    -    '/^(?:(?!\\.)(?=.)[abc-])$/',
    -    '/^(?:\\\\)$/',
    -    '/^(?:(?!\\.)(?=.)[\\\\])$/',
    -    '/^(?:(?!\\.)(?=.)[\\[])$/',
    -    '/^(?:\\[)$/',
    -    '/^(?:(?=.)\\[(?!\\.)(?=.)[^/]*?)$/',
    -    '/^(?:(?!\\.)(?=.)[\\]])$/',
    -    '/^(?:(?!\\.)(?=.)[\\]-])$/',
    -    '/^(?:(?!\\.)(?=.)[a-z])$/',
    -    '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/',
    -    '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/',
    -    '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/',
    -    '/^(?:(?!\\.)(?=.)[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/',
    -    '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/',
    -    '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/',
    -    '/^(?:\\[\\])$/',
    -    '/^(?:\\[abc)$/',
    -    '/^(?:(?=.)XYZ)$/i',
    -    '/^(?:(?=.)ab[^/]*?)$/i',
    -    '/^(?:(?!\\.)(?=.)[ia][^/][ck])$/i',
    -    '/^(?:\\/(?!\\.)(?=.)[^/]*?|(?!\\.)(?=.)[^/]*?)$/',
    -    '/^(?:\\/(?!\\.)(?=.)[^/]|(?!\\.)(?=.)[^/]*?)$/',
    -    '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/',
    -    '/^(?:a\\/(?!(?:^|\\/)\\.{1,2}(?:$|\\/))(?=.)[^/]*?\\/b)$/',
    -    '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/',
    -    '/^(?:a\\/(?!\\.)(?=.)[^/]*?\\/b)$/',
    -    '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/',
    -    '/^(?:(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?)$/',
    -    '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\/b\\))$/',
    -    '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/',
    -    '/^(?:(?=.)\\[(?=.)\\!a[^/]*?)$/',
    -    '/^(?:(?=.)\\[(?=.)#a[^/]*?)$/',
    -    '/^(?:(?=.)\\+\\(a\\|[^/]*?\\|c\\\\\\\\\\|d\\\\\\\\\\|e\\\\\\\\\\\\\\\\\\|f\\\\\\\\\\\\\\\\\\|g)$/',
    -    '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/',
    -    '/^(?:a|(?!\\.)(?=.)[^/]*?\\(b\\|c|d\\))$/',
    -    '/^(?:a|(?!\\.)(?=.)(?:b|c)*|(?!\\.)(?=.)(?:b|d)*)$/',
    -    '/^(?:(?!\\.)(?=.)(?:a|b|c)*|(?!\\.)(?=.)(?:a|c)*)$/',
    -    '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\|b\\|c\\)|(?!\\.)(?=.)[^/]*?\\(a\\|c\\))$/',
    -    '/^(?:(?=.)a[^/]b)$/',
    -    '/^(?:(?=.)#[^/]*?)$/',
    -    '/^(?!^(?:(?=.)a[^/]*?)$).*$/',
    -    '/^(?:(?=.)\\!a[^/]*?)$/',
    -    '/^(?:(?=.)a[^/]*?)$/',
    -    '/^(?!^(?:(?=.)\\!a[^/]*?)$).*$/',
    -    '/^(?:(?!\\.)(?=.)[^/]*?\\.(?:(?!js)[^/]*?))$/',
    -    '/^(?:(?:(?!(?:\\/|^)\\.).)*?\\/\\.x\\/(?:(?!(?:\\/|^)\\.).)*?)$/' ]
    -var re = 0;
    -
    -tap.test("basic tests", function (t) {
    -  var start = Date.now()
    -
    -  // [ pattern, [matches], MM opts, files, TAP opts]
    -  patterns.forEach(function (c) {
    -    if (typeof c === "function") return c()
    -    if (typeof c === "string") return t.comment(c)
    -
    -    var pattern = c[0]
    -      , expect = c[1].sort(alpha)
    -      , options = c[2] || {}
    -      , f = c[3] || files
    -      , tapOpts = c[4] || {}
    -
    -    // options.debug = true
    -    var m = new mm.Minimatch(pattern, options)
    -    var r = m.makeRe()
    -    var expectRe = regexps[re++]
    -    tapOpts.re = String(r) || JSON.stringify(r)
    -    tapOpts.files = JSON.stringify(f)
    -    tapOpts.pattern = pattern
    -    tapOpts.set = m.set
    -    tapOpts.negated = m.negate
    -
    -    var actual = mm.match(f, pattern, options)
    -    actual.sort(alpha)
    -
    -    t.equivalent( actual, expect
    -                , JSON.stringify(pattern) + " " + JSON.stringify(expect)
    -                , tapOpts )
    -
    -    t.equal(tapOpts.re, expectRe, tapOpts)
    -  })
    -
    -  t.comment("time=" + (Date.now() - start) + "ms")
    -  t.end()
    -})
    -
    -tap.test("global leak test", function (t) {
    -  var globalAfter = Object.keys(global)
    -  t.equivalent(globalAfter, globalBefore, "no new globals, please")
    -  t.end()
    -})
    -
    -function alpha (a, b) {
    -  return a > b ? 1 : -1
    -}
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/brace-expand.js b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/brace-expand.js
    deleted file mode 100644
    index 7ee278a27..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/brace-expand.js
    +++ /dev/null
    @@ -1,33 +0,0 @@
    -var tap = require("tap")
    -  , minimatch = require("../")
    -
    -tap.test("brace expansion", function (t) {
    -  // [ pattern, [expanded] ]
    -  ; [ [ "a{b,c{d,e},{f,g}h}x{y,z}"
    -      , [ "abxy"
    -        , "abxz"
    -        , "acdxy"
    -        , "acdxz"
    -        , "acexy"
    -        , "acexz"
    -        , "afhxy"
    -        , "afhxz"
    -        , "aghxy"
    -        , "aghxz" ] ]
    -    , [ "a{1..5}b"
    -      , [ "a1b"
    -        , "a2b"
    -        , "a3b"
    -        , "a4b"
    -        , "a5b" ] ]
    -    , [ "a{b}c", ["a{b}c"] ]
    -  ].forEach(function (tc) {
    -    var p = tc[0]
    -      , expect = tc[1]
    -    t.equivalent(minimatch.braceExpand(p), expect, p)
    -  })
    -  console.error("ending")
    -  t.end()
    -})
    -
    -
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/caching.js b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/caching.js
    deleted file mode 100644
    index 0fec4b0fa..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/caching.js
    +++ /dev/null
    @@ -1,14 +0,0 @@
    -var Minimatch = require("../minimatch.js").Minimatch
    -var tap = require("tap")
    -tap.test("cache test", function (t) {
    -  var mm1 = new Minimatch("a?b")
    -  var mm2 = new Minimatch("a?b")
    -  t.equal(mm1, mm2, "should get the same object")
    -  // the lru should drop it after 100 entries
    -  for (var i = 0; i < 100; i ++) {
    -    new Minimatch("a"+i)
    -  }
    -  mm2 = new Minimatch("a?b")
    -  t.notEqual(mm1, mm2, "cache should have dropped")
    -  t.end()
    -})
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/defaults.js b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/defaults.js
    deleted file mode 100644
    index 25f1f601c..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/defaults.js
    +++ /dev/null
    @@ -1,274 +0,0 @@
    -// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test
    -//
    -// TODO: Some of these tests do very bad things with backslashes, and will
    -// most likely fail badly on windows.  They should probably be skipped.
    -
    -var tap = require("tap")
    -  , globalBefore = Object.keys(global)
    -  , mm = require("../")
    -  , files = [ "a", "b", "c", "d", "abc"
    -            , "abd", "abe", "bb", "bcd"
    -            , "ca", "cb", "dd", "de"
    -            , "bdir/", "bdir/cfile"]
    -  , next = files.concat([ "a-b", "aXb"
    -                        , ".x", ".y" ])
    -
    -tap.test("basic tests", function (t) {
    -  var start = Date.now()
    -
    -  // [ pattern, [matches], MM opts, files, TAP opts]
    -  ; [ "http://www.bashcookbook.com/bashinfo" +
    -      "/source/bash-1.14.7/tests/glob-test"
    -    , ["a*", ["a", "abc", "abd", "abe"]]
    -    , ["X*", ["X*"], {nonull: true}]
    -
    -    // allow null glob expansion
    -    , ["X*", []]
    -
    -    // isaacs: Slightly different than bash/sh/ksh
    -    // \\* is not un-escaped to literal "*" in a failed match,
    -    // but it does make it get treated as a literal star
    -    , ["\\*", ["\\*"], {nonull: true}]
    -    , ["\\**", ["\\**"], {nonull: true}]
    -    , ["\\*\\*", ["\\*\\*"], {nonull: true}]
    -
    -    , ["b*/", ["bdir/"]]
    -    , ["c*", ["c", "ca", "cb"]]
    -    , ["**", files]
    -
    -    , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}]
    -    , ["s/\\..*//", ["s/\\..*//"], {nonull: true}]
    -
    -    , "legendary larry crashes bashes"
    -    , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"
    -      , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}]
    -    , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"
    -      , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}]
    -
    -    , "character classes"
    -    , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]]
    -    , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd",
    -       "bdir/", "ca", "cb", "dd", "de"]]
    -    , ["a*[^c]", ["abd", "abe"]]
    -    , function () { files.push("a-b", "aXb") }
    -    , ["a[X-]b", ["a-b", "aXb"]]
    -    , function () { files.push(".x", ".y") }
    -    , ["[^a-c]*", ["d", "dd", "de"]]
    -    , function () { files.push("a*b/", "a*b/ooo") }
    -    , ["a\\*b/*", ["a*b/ooo"]]
    -    , ["a\\*?/*", ["a*b/ooo"]]
    -    , ["*\\\\!*", [], {null: true}, ["echo !7"]]
    -    , ["*\\!*", ["echo !7"], null, ["echo !7"]]
    -    , ["*.\\*", ["r.*"], null, ["r.*"]]
    -    , ["a[b]c", ["abc"]]
    -    , ["a[\\b]c", ["abc"]]
    -    , ["a?c", ["abc"]]
    -    , ["a\\*c", [], {null: true}, ["abc"]]
    -    , ["", [""], { null: true }, [""]]
    -
    -    , "http://www.opensource.apple.com/source/bash/bash-23/" +
    -      "bash/tests/glob-test"
    -    , function () { files.push("man/", "man/man1/", "man/man1/bash.1") }
    -    , ["*/man*/bash.*", ["man/man1/bash.1"]]
    -    , ["man/man1/bash.1", ["man/man1/bash.1"]]
    -    , ["a***c", ["abc"], null, ["abc"]]
    -    , ["a*****?c", ["abc"], null, ["abc"]]
    -    , ["?*****??", ["abc"], null, ["abc"]]
    -    , ["*****??", ["abc"], null, ["abc"]]
    -    , ["?*****?c", ["abc"], null, ["abc"]]
    -    , ["?***?****c", ["abc"], null, ["abc"]]
    -    , ["?***?****?", ["abc"], null, ["abc"]]
    -    , ["?***?****", ["abc"], null, ["abc"]]
    -    , ["*******c", ["abc"], null, ["abc"]]
    -    , ["*******?", ["abc"], null, ["abc"]]
    -    , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
    -    , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
    -    , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]]
    -    , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
    -    , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]]
    -    , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]]
    -    , ["[-abc]", ["-"], null, ["-"]]
    -    , ["[abc-]", ["-"], null, ["-"]]
    -    , ["\\", ["\\"], null, ["\\"]]
    -    , ["[\\\\]", ["\\"], null, ["\\"]]
    -    , ["[[]", ["["], null, ["["]]
    -    , ["[", ["["], null, ["["]]
    -    , ["[*", ["[abc"], null, ["[abc"]]
    -    , "a right bracket shall lose its special meaning and\n" +
    -      "represent itself in a bracket expression if it occurs\n" +
    -      "first in the list.  -- POSIX.2 2.8.3.2"
    -    , ["[]]", ["]"], null, ["]"]]
    -    , ["[]-]", ["]"], null, ["]"]]
    -    , ["[a-\z]", ["p"], null, ["p"]]
    -    , ["??**********?****?", [], { null: true }, ["abc"]]
    -    , ["??**********?****c", [], { null: true }, ["abc"]]
    -    , ["?************c****?****", [], { null: true }, ["abc"]]
    -    , ["*c*?**", [], { null: true }, ["abc"]]
    -    , ["a*****c*?**", [], { null: true }, ["abc"]]
    -    , ["a********???*******", [], { null: true }, ["abc"]]
    -    , ["[]", [], { null: true }, ["a"]]
    -    , ["[abc", [], { null: true }, ["["]]
    -
    -    , "nocase tests"
    -    , ["XYZ", ["xYz"], { nocase: true, null: true }
    -      , ["xYz", "ABC", "IjK"]]
    -    , ["ab*", ["ABC"], { nocase: true, null: true }
    -      , ["xYz", "ABC", "IjK"]]
    -    , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true }
    -      , ["xYz", "ABC", "IjK"]]
    -
    -    // [ pattern, [matches], MM opts, files, TAP opts]
    -    , "onestar/twostar"
    -    , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]]
    -    , ["{/?,*}", ["/a", "bb"], {null: true}
    -      , ["/a", "/b/b", "/a/b/c", "bb"]]
    -
    -    , "dots should not match unless requested"
    -    , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]]
    -
    -    // .. and . can only match patterns starting with .,
    -    // even when options.dot is set.
    -    , function () {
    -        files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"]
    -      }
    -    , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}]
    -    , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}]
    -    , ["a/*/b", ["a/c/b"], {dot:false}]
    -    , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}]
    -
    -
    -    // this also tests that changing the options needs
    -    // to change the cache key, even if the pattern is
    -    // the same!
    -    , ["**", ["a/b","a/.d",".a/.d"], { dot: true }
    -      , [ ".a/.d", "a/.d", "a/b"]]
    -
    -    , "paren sets cannot contain slashes"
    -    , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]]
    -
    -    // brace sets trump all else.
    -    //
    -    // invalid glob pattern.  fails on bash4 and bsdglob.
    -    // however, in this implementation, it's easier just
    -    // to do the intuitive thing, and let brace-expansion
    -    // actually come before parsing any extglob patterns,
    -    // like the documentation seems to say.
    -    //
    -    // XXX: if anyone complains about this, either fix it
    -    // or tell them to grow up and stop complaining.
    -    //
    -    // bash/bsdglob says this:
    -    // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]]
    -    // but we do this instead:
    -    , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]]
    -
    -    // test partial parsing in the presence of comment/negation chars
    -    , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]]
    -    , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]]
    -
    -    // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped.
    -    , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g"
    -      , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"]
    -      , {}
    -      , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]]
    -
    -
    -    // crazy nested {,,} and *(||) tests.
    -    , function () {
    -        files = [ "a", "b", "c", "d"
    -                , "ab", "ac", "ad"
    -                , "bc", "cb"
    -                , "bc,d", "c,db", "c,d"
    -                , "d)", "(b|c", "*(b|c"
    -                , "b|c", "b|cc", "cb|c"
    -                , "x(a|b|c)", "x(a|c)"
    -                , "(a|b|c)", "(a|c)"]
    -      }
    -    , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]]
    -    , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]]
    -    // a
    -    // *(b|c)
    -    // *(b|d)
    -    , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]]
    -    , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]]
    -
    -
    -    // test various flag settings.
    -    , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"]
    -      , { noext: true } ]
    -    , ["a?b", ["x/y/acb", "acb/"], {matchBase: true}
    -      , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ]
    -    , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]]
    -
    -
    -    // begin channelling Boole and deMorgan...
    -    , "negation tests"
    -    , function () {
    -        files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"]
    -      }
    -
    -    // anything that is NOT a* matches.
    -    , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]]
    -
    -    // anything that IS !a* matches.
    -    , ["!a*", ["!ab", "!abc"], {nonegate: true}]
    -
    -    // anything that IS a* matches
    -    , ["!!a*", ["a!b"]]
    -
    -    // anything that is NOT !a* matches
    -    , ["!\\!a*", ["a!b", "d", "e", "\\!a"]]
    -
    -    // negation nestled within a pattern
    -    , function () {
    -        files = [ "foo.js"
    -                , "foo.bar"
    -                // can't match this one without negative lookbehind.
    -                , "foo.js.js"
    -                , "blar.js"
    -                , "foo."
    -                , "boo.js.boo" ]
    -      }
    -    , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ]
    -
    -    ].forEach(function (c) {
    -      if (typeof c === "function") return c()
    -      if (typeof c === "string") return t.comment(c)
    -
    -      var pattern = c[0]
    -        , expect = c[1].sort(alpha)
    -        , options = c[2] || {}
    -        , f = c[3] || files
    -        , tapOpts = c[4] || {}
    -
    -      // options.debug = true
    -      var Class = mm.defaults(options).Minimatch
    -      var m = new Class(pattern, {})
    -      var r = m.makeRe()
    -      tapOpts.re = String(r) || JSON.stringify(r)
    -      tapOpts.files = JSON.stringify(f)
    -      tapOpts.pattern = pattern
    -      tapOpts.set = m.set
    -      tapOpts.negated = m.negate
    -
    -      var actual = mm.match(f, pattern, options)
    -      actual.sort(alpha)
    -
    -      t.equivalent( actual, expect
    -                  , JSON.stringify(pattern) + " " + JSON.stringify(expect)
    -                  , tapOpts )
    -    })
    -
    -  t.comment("time=" + (Date.now() - start) + "ms")
    -  t.end()
    -})
    -
    -tap.test("global leak test", function (t) {
    -  var globalAfter = Object.keys(global)
    -  t.equivalent(globalAfter, globalBefore, "no new globals, please")
    -  t.end()
    -})
    -
    -function alpha (a, b) {
    -  return a > b ? 1 : -1
    -}
    diff --git a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js b/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js
    deleted file mode 100644
    index 6676e2629..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js
    +++ /dev/null
    @@ -1,8 +0,0 @@
    -var test = require('tap').test
    -var minimatch = require('../')
    -
    -test('extglob ending with statechar', function(t) {
    -  t.notOk(minimatch('ax', 'a?(b*)'))
    -  t.ok(minimatch('ax', '?(a*|b)'))
    -  t.end()
    -})
    diff --git a/cli/node_modules/mocha/node_modules/glob/package.json b/cli/node_modules/mocha/node_modules/glob/package.json
    deleted file mode 100644
    index 3ffcb1bf2..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/package.json
    +++ /dev/null
    @@ -1,57 +0,0 @@
    -{
    -  "author": {
    -    "name": "Isaac Z. Schlueter",
    -    "email": "i@izs.me",
    -    "url": "http://blog.izs.me/"
    -  },
    -  "name": "glob",
    -  "description": "a little globber",
    -  "version": "3.2.3",
    -  "repository": {
    -    "type": "git",
    -    "url": "git://github.com/isaacs/node-glob.git"
    -  },
    -  "main": "glob.js",
    -  "engines": {
    -    "node": "*"
    -  },
    -  "dependencies": {
    -    "minimatch": "~0.2.11",
    -    "graceful-fs": "~2.0.0",
    -    "inherits": "2"
    -  },
    -  "devDependencies": {
    -    "tap": "~0.4.0",
    -    "mkdirp": "0",
    -    "rimraf": "1"
    -  },
    -  "scripts": {
    -    "test": "tap test/*.js"
    -  },
    -  "license": "BSD",
    -  "bugs": {
    -    "url": "https://github.com/isaacs/node-glob/issues"
    -  },
    -  "_id": "glob@3.2.3",
    -  "dist": {
    -    "shasum": "e313eeb249c7affaa5c475286b0e115b59839467",
    -    "tarball": "http://registry.npmjs.org/glob/-/glob-3.2.3.tgz"
    -  },
    -  "_from": "glob@3.2.3",
    -  "_npmVersion": "1.3.2",
    -  "_npmUser": {
    -    "name": "isaacs",
    -    "email": "i@izs.me"
    -  },
    -  "maintainers": [
    -    {
    -      "name": "isaacs",
    -      "email": "i@izs.me"
    -    }
    -  ],
    -  "directories": {},
    -  "_shasum": "e313eeb249c7affaa5c475286b0e115b59839467",
    -  "_resolved": "https://registry.npmjs.org/glob/-/glob-3.2.3.tgz",
    -  "readme": "ERROR: No README data found!",
    -  "homepage": "https://github.com/isaacs/node-glob"
    -}
    diff --git a/cli/node_modules/mocha/node_modules/glob/test/00-setup.js b/cli/node_modules/mocha/node_modules/glob/test/00-setup.js
    deleted file mode 100644
    index 245afafda..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/test/00-setup.js
    +++ /dev/null
    @@ -1,176 +0,0 @@
    -// just a little pre-run script to set up the fixtures.
    -// zz-finish cleans it up
    -
    -var mkdirp = require("mkdirp")
    -var path = require("path")
    -var i = 0
    -var tap = require("tap")
    -var fs = require("fs")
    -var rimraf = require("rimraf")
    -
    -var files =
    -[ "a/.abcdef/x/y/z/a"
    -, "a/abcdef/g/h"
    -, "a/abcfed/g/h"
    -, "a/b/c/d"
    -, "a/bc/e/f"
    -, "a/c/d/c/b"
    -, "a/cb/e/f"
    -]
    -
    -var symlinkTo = path.resolve(__dirname, "a/symlink/a/b/c")
    -var symlinkFrom = "../.."
    -
    -files = files.map(function (f) {
    -  return path.resolve(__dirname, f)
    -})
    -
    -tap.test("remove fixtures", function (t) {
    -  rimraf(path.resolve(__dirname, "a"), function (er) {
    -    t.ifError(er, "remove fixtures")
    -    t.end()
    -  })
    -})
    -
    -files.forEach(function (f) {
    -  tap.test(f, function (t) {
    -    var d = path.dirname(f)
    -    mkdirp(d, 0755, function (er) {
    -      if (er) {
    -        t.fail(er)
    -        return t.bailout()
    -      }
    -      fs.writeFile(f, "i like tests", function (er) {
    -        t.ifError(er, "make file")
    -        t.end()
    -      })
    -    })
    -  })
    -})
    -
    -if (process.platform !== "win32") {
    -  tap.test("symlinky", function (t) {
    -    var d = path.dirname(symlinkTo)
    -    console.error("mkdirp", d)
    -    mkdirp(d, 0755, function (er) {
    -      t.ifError(er)
    -      fs.symlink(symlinkFrom, symlinkTo, "dir", function (er) {
    -        t.ifError(er, "make symlink")
    -        t.end()
    -      })
    -    })
    -  })
    -}
    -
    -;["foo","bar","baz","asdf","quux","qwer","rewq"].forEach(function (w) {
    -  w = "/tmp/glob-test/" + w
    -  tap.test("create " + w, function (t) {
    -    mkdirp(w, function (er) {
    -      if (er)
    -        throw er
    -      t.pass(w)
    -      t.end()
    -    })
    -  })
    -})
    -
    -
    -// generate the bash pattern test-fixtures if possible
    -if (process.platform === "win32" || !process.env.TEST_REGEN) {
    -  console.error("Windows, or TEST_REGEN unset.  Using cached fixtures.")
    -  return
    -}
    -
    -var spawn = require("child_process").spawn;
    -var globs =
    -  // put more patterns here.
    -  // anything that would be directly in / should be in /tmp/glob-test
    -  ["test/a/*/+(c|g)/./d"
    -  ,"test/a/**/[cg]/../[cg]"
    -  ,"test/a/{b,c,d,e,f}/**/g"
    -  ,"test/a/b/**"
    -  ,"test/**/g"
    -  ,"test/a/abc{fed,def}/g/h"
    -  ,"test/a/abc{fed/g,def}/**/"
    -  ,"test/a/abc{fed/g,def}/**///**/"
    -  ,"test/**/a/**/"
    -  ,"test/+(a|b|c)/a{/,bc*}/**"
    -  ,"test/*/*/*/f"
    -  ,"test/**/f"
    -  ,"test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**"
    -  ,"{./*/*,/tmp/glob-test/*}"
    -  ,"{/tmp/glob-test/*,*}" // evil owl face!  how you taunt me!
    -  ,"test/a/!(symlink)/**"
    -  ]
    -var bashOutput = {}
    -var fs = require("fs")
    -
    -globs.forEach(function (pattern) {
    -  tap.test("generate fixture " + pattern, function (t) {
    -    var cmd = "shopt -s globstar && " +
    -              "shopt -s extglob && " +
    -              "shopt -s nullglob && " +
    -              // "shopt >&2; " +
    -              "eval \'for i in " + pattern + "; do echo $i; done\'"
    -    var cp = spawn("bash", ["-c", cmd], { cwd: path.dirname(__dirname) })
    -    var out = []
    -    cp.stdout.on("data", function (c) {
    -      out.push(c)
    -    })
    -    cp.stderr.pipe(process.stderr)
    -    cp.on("close", function (code) {
    -      out = flatten(out)
    -      if (!out)
    -        out = []
    -      else
    -        out = cleanResults(out.split(/\r*\n/))
    -
    -      bashOutput[pattern] = out
    -      t.notOk(code, "bash test should finish nicely")
    -      t.end()
    -    })
    -  })
    -})
    -
    -tap.test("save fixtures", function (t) {
    -  var fname = path.resolve(__dirname, "bash-results.json")
    -  var data = JSON.stringify(bashOutput, null, 2) + "\n"
    -  fs.writeFile(fname, data, function (er) {
    -    t.ifError(er)
    -    t.end()
    -  })
    -})
    -
    -function cleanResults (m) {
    -  // normalize discrepancies in ordering, duplication,
    -  // and ending slashes.
    -  return m.map(function (m) {
    -    return m.replace(/\/+/g, "/").replace(/\/$/, "")
    -  }).sort(alphasort).reduce(function (set, f) {
    -    if (f !== set[set.length - 1]) set.push(f)
    -    return set
    -  }, []).sort(alphasort).map(function (f) {
    -    // de-windows
    -    return (process.platform !== 'win32') ? f
    -           : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/')
    -  })
    -}
    -
    -function flatten (chunks) {
    -  var s = 0
    -  chunks.forEach(function (c) { s += c.length })
    -  var out = new Buffer(s)
    -  s = 0
    -  chunks.forEach(function (c) {
    -    c.copy(out, s)
    -    s += c.length
    -  })
    -
    -  return out.toString().trim()
    -}
    -
    -function alphasort (a, b) {
    -  a = a.toLowerCase()
    -  b = b.toLowerCase()
    -  return a > b ? 1 : a < b ? -1 : 0
    -}
    diff --git a/cli/node_modules/mocha/node_modules/glob/test/bash-comparison.js b/cli/node_modules/mocha/node_modules/glob/test/bash-comparison.js
    deleted file mode 100644
    index 239ed1a9c..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/test/bash-comparison.js
    +++ /dev/null
    @@ -1,63 +0,0 @@
    -// basic test
    -// show that it does the same thing by default as the shell.
    -var tap = require("tap")
    -, child_process = require("child_process")
    -, bashResults = require("./bash-results.json")
    -, globs = Object.keys(bashResults)
    -, glob = require("../")
    -, path = require("path")
    -
    -// run from the root of the project
    -// this is usually where you're at anyway, but be sure.
    -process.chdir(path.resolve(__dirname, ".."))
    -
    -function alphasort (a, b) {
    -  a = a.toLowerCase()
    -  b = b.toLowerCase()
    -  return a > b ? 1 : a < b ? -1 : 0
    -}
    -
    -globs.forEach(function (pattern) {
    -  var expect = bashResults[pattern]
    -  // anything regarding the symlink thing will fail on windows, so just skip it
    -  if (process.platform === "win32" &&
    -      expect.some(function (m) {
    -        return /\/symlink\//.test(m)
    -      }))
    -    return
    -
    -  tap.test(pattern, function (t) {
    -    glob(pattern, function (er, matches) {
    -      if (er)
    -        throw er
    -
    -      // sort and unmark, just to match the shell results
    -      matches = cleanResults(matches)
    -
    -      t.deepEqual(matches, expect, pattern)
    -      t.end()
    -    })
    -  })
    -
    -  tap.test(pattern + " sync", function (t) {
    -    var matches = cleanResults(glob.sync(pattern))
    -
    -    t.deepEqual(matches, expect, "should match shell")
    -    t.end()
    -  })
    -})
    -
    -function cleanResults (m) {
    -  // normalize discrepancies in ordering, duplication,
    -  // and ending slashes.
    -  return m.map(function (m) {
    -    return m.replace(/\/+/g, "/").replace(/\/$/, "")
    -  }).sort(alphasort).reduce(function (set, f) {
    -    if (f !== set[set.length - 1]) set.push(f)
    -    return set
    -  }, []).sort(alphasort).map(function (f) {
    -    // de-windows
    -    return (process.platform !== 'win32') ? f
    -           : f.replace(/^[a-zA-Z]:[\/\\]+/, '/').replace(/[\\\/]+/g, '/')
    -  })
    -}
    diff --git a/cli/node_modules/mocha/node_modules/glob/test/bash-results.json b/cli/node_modules/mocha/node_modules/glob/test/bash-results.json
    deleted file mode 100644
    index a9bc347de..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/test/bash-results.json
    +++ /dev/null
    @@ -1,350 +0,0 @@
    -{
    -  "test/a/*/+(c|g)/./d": [
    -    "test/a/b/c/./d"
    -  ],
    -  "test/a/**/[cg]/../[cg]": [
    -    "test/a/abcdef/g/../g",
    -    "test/a/abcfed/g/../g",
    -    "test/a/b/c/../c",
    -    "test/a/c/../c",
    -    "test/a/c/d/c/../c",
    -    "test/a/symlink/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c"
    -  ],
    -  "test/a/{b,c,d,e,f}/**/g": [],
    -  "test/a/b/**": [
    -    "test/a/b",
    -    "test/a/b/c",
    -    "test/a/b/c/d"
    -  ],
    -  "test/**/g": [
    -    "test/a/abcdef/g",
    -    "test/a/abcfed/g"
    -  ],
    -  "test/a/abc{fed,def}/g/h": [
    -    "test/a/abcdef/g/h",
    -    "test/a/abcfed/g/h"
    -  ],
    -  "test/a/abc{fed/g,def}/**/": [
    -    "test/a/abcdef",
    -    "test/a/abcdef/g",
    -    "test/a/abcfed/g"
    -  ],
    -  "test/a/abc{fed/g,def}/**///**/": [
    -    "test/a/abcdef",
    -    "test/a/abcdef/g",
    -    "test/a/abcfed/g"
    -  ],
    -  "test/**/a/**/": [
    -    "test/a",
    -    "test/a/abcdef",
    -    "test/a/abcdef/g",
    -    "test/a/abcfed",
    -    "test/a/abcfed/g",
    -    "test/a/b",
    -    "test/a/b/c",
    -    "test/a/bc",
    -    "test/a/bc/e",
    -    "test/a/c",
    -    "test/a/c/d",
    -    "test/a/c/d/c",
    -    "test/a/cb",
    -    "test/a/cb/e",
    -    "test/a/symlink",
    -    "test/a/symlink/a",
    -    "test/a/symlink/a/b",
    -    "test/a/symlink/a/b/c",
    -    "test/a/symlink/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b"
    -  ],
    -  "test/+(a|b|c)/a{/,bc*}/**": [
    -    "test/a/abcdef",
    -    "test/a/abcdef/g",
    -    "test/a/abcdef/g/h",
    -    "test/a/abcfed",
    -    "test/a/abcfed/g",
    -    "test/a/abcfed/g/h"
    -  ],
    -  "test/*/*/*/f": [
    -    "test/a/bc/e/f",
    -    "test/a/cb/e/f"
    -  ],
    -  "test/**/f": [
    -    "test/a/bc/e/f",
    -    "test/a/cb/e/f"
    -  ],
    -  "test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**": [
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
    -    "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c"
    -  ],
    -  "{./*/*,/tmp/glob-test/*}": [
    -    "./examples/g.js",
    -    "./examples/usr-local.js",
    -    "./node_modules/graceful-fs",
    -    "./node_modules/inherits",
    -    "./node_modules/minimatch",
    -    "./node_modules/mkdirp",
    -    "./node_modules/rimraf",
    -    "./node_modules/tap",
    -    "./test/00-setup.js",
    -    "./test/a",
    -    "./test/bash-comparison.js",
    -    "./test/bash-results.json",
    -    "./test/cwd-test.js",
    -    "./test/globstar-match.js",
    -    "./test/mark.js",
    -    "./test/nocase-nomagic.js",
    -    "./test/pause-resume.js",
    -    "./test/root-nomount.js",
    -    "./test/root.js",
    -    "./test/stat.js",
    -    "./test/zz-cleanup.js",
    -    "/tmp/glob-test/asdf",
    -    "/tmp/glob-test/bar",
    -    "/tmp/glob-test/baz",
    -    "/tmp/glob-test/foo",
    -    "/tmp/glob-test/quux",
    -    "/tmp/glob-test/qwer",
    -    "/tmp/glob-test/rewq"
    -  ],
    -  "{/tmp/glob-test/*,*}": [
    -    "/tmp/glob-test/asdf",
    -    "/tmp/glob-test/bar",
    -    "/tmp/glob-test/baz",
    -    "/tmp/glob-test/foo",
    -    "/tmp/glob-test/quux",
    -    "/tmp/glob-test/qwer",
    -    "/tmp/glob-test/rewq",
    -    "examples",
    -    "glob.js",
    -    "LICENSE",
    -    "node_modules",
    -    "package.json",
    -    "README.md",
    -    "test"
    -  ],
    -  "test/a/!(symlink)/**": [
    -    "test/a/abcdef",
    -    "test/a/abcdef/g",
    -    "test/a/abcdef/g/h",
    -    "test/a/abcfed",
    -    "test/a/abcfed/g",
    -    "test/a/abcfed/g/h",
    -    "test/a/b",
    -    "test/a/b/c",
    -    "test/a/b/c/d",
    -    "test/a/bc",
    -    "test/a/bc/e",
    -    "test/a/bc/e/f",
    -    "test/a/c",
    -    "test/a/c/d",
    -    "test/a/c/d/c",
    -    "test/a/c/d/c/b",
    -    "test/a/cb",
    -    "test/a/cb/e",
    -    "test/a/cb/e/f"
    -  ]
    -}
    diff --git a/cli/node_modules/mocha/node_modules/glob/test/cwd-test.js b/cli/node_modules/mocha/node_modules/glob/test/cwd-test.js
    deleted file mode 100644
    index 352c27efa..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/test/cwd-test.js
    +++ /dev/null
    @@ -1,55 +0,0 @@
    -var tap = require("tap")
    -
    -var origCwd = process.cwd()
    -process.chdir(__dirname)
    -
    -tap.test("changing cwd and searching for **/d", function (t) {
    -  var glob = require('../')
    -  var path = require('path')
    -  t.test('.', function (t) {
    -    glob('**/d', function (er, matches) {
    -      t.ifError(er)
    -      t.like(matches, [ 'a/b/c/d', 'a/c/d' ])
    -      t.end()
    -    })
    -  })
    -
    -  t.test('a', function (t) {
    -    glob('**/d', {cwd:path.resolve('a')}, function (er, matches) {
    -      t.ifError(er)
    -      t.like(matches, [ 'b/c/d', 'c/d' ])
    -      t.end()
    -    })
    -  })
    -
    -  t.test('a/b', function (t) {
    -    glob('**/d', {cwd:path.resolve('a/b')}, function (er, matches) {
    -      t.ifError(er)
    -      t.like(matches, [ 'c/d' ])
    -      t.end()
    -    })
    -  })
    -
    -  t.test('a/b/', function (t) {
    -    glob('**/d', {cwd:path.resolve('a/b/')}, function (er, matches) {
    -      t.ifError(er)
    -      t.like(matches, [ 'c/d' ])
    -      t.end()
    -    })
    -  })
    -
    -  t.test('.', function (t) {
    -    glob('**/d', {cwd: process.cwd()}, function (er, matches) {
    -      t.ifError(er)
    -      t.like(matches, [ 'a/b/c/d', 'a/c/d' ])
    -      t.end()
    -    })
    -  })
    -
    -  t.test('cd -', function (t) {
    -    process.chdir(origCwd)
    -    t.end()
    -  })
    -
    -  t.end()
    -})
    diff --git a/cli/node_modules/mocha/node_modules/glob/test/globstar-match.js b/cli/node_modules/mocha/node_modules/glob/test/globstar-match.js
    deleted file mode 100644
    index 9b234fa2a..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/test/globstar-match.js
    +++ /dev/null
    @@ -1,19 +0,0 @@
    -var Glob = require("../glob.js").Glob
    -var test = require('tap').test
    -
    -test('globstar should not have dupe matches', function(t) {
    -  var pattern = 'a/**/[gh]'
    -  var g = new Glob(pattern, { cwd: __dirname })
    -  var matches = []
    -  g.on('match', function(m) {
    -    console.error('match %j', m)
    -    matches.push(m)
    -  })
    -  g.on('end', function(set) {
    -    console.error('set', set)
    -    matches = matches.sort()
    -    set = set.sort()
    -    t.same(matches, set, 'should have same set of matches')
    -    t.end()
    -  })
    -})
    diff --git a/cli/node_modules/mocha/node_modules/glob/test/mark.js b/cli/node_modules/mocha/node_modules/glob/test/mark.js
    deleted file mode 100644
    index ed68a335c..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/test/mark.js
    +++ /dev/null
    @@ -1,74 +0,0 @@
    -var test = require("tap").test
    -var glob = require('../')
    -process.chdir(__dirname)
    -
    -test("mark, no / on pattern", function (t) {
    -  glob("a/*", {mark: true}, function (er, results) {
    -    if (er)
    -      throw er
    -    var expect = [ 'a/abcdef/',
    -                   'a/abcfed/',
    -                   'a/b/',
    -                   'a/bc/',
    -                   'a/c/',
    -                   'a/cb/' ]
    -
    -    if (process.platform !== "win32")
    -      expect.push('a/symlink/')
    -
    -    t.same(results, expect)
    -    t.end()
    -  })
    -})
    -
    -test("mark=false, no / on pattern", function (t) {
    -  glob("a/*", function (er, results) {
    -    if (er)
    -      throw er
    -    var expect = [ 'a/abcdef',
    -                   'a/abcfed',
    -                   'a/b',
    -                   'a/bc',
    -                   'a/c',
    -                   'a/cb' ]
    -
    -    if (process.platform !== "win32")
    -      expect.push('a/symlink')
    -    t.same(results, expect)
    -    t.end()
    -  })
    -})
    -
    -test("mark=true, / on pattern", function (t) {
    -  glob("a/*/", {mark: true}, function (er, results) {
    -    if (er)
    -      throw er
    -    var expect = [ 'a/abcdef/',
    -                    'a/abcfed/',
    -                    'a/b/',
    -                    'a/bc/',
    -                    'a/c/',
    -                    'a/cb/' ]
    -    if (process.platform !== "win32")
    -      expect.push('a/symlink/')
    -    t.same(results, expect)
    -    t.end()
    -  })
    -})
    -
    -test("mark=false, / on pattern", function (t) {
    -  glob("a/*/", function (er, results) {
    -    if (er)
    -      throw er
    -    var expect = [ 'a/abcdef/',
    -                   'a/abcfed/',
    -                   'a/b/',
    -                   'a/bc/',
    -                   'a/c/',
    -                   'a/cb/' ]
    -    if (process.platform !== "win32")
    -      expect.push('a/symlink/')
    -    t.same(results, expect)
    -    t.end()
    -  })
    -})
    diff --git a/cli/node_modules/mocha/node_modules/glob/test/nocase-nomagic.js b/cli/node_modules/mocha/node_modules/glob/test/nocase-nomagic.js
    deleted file mode 100644
    index d86297098..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/test/nocase-nomagic.js
    +++ /dev/null
    @@ -1,113 +0,0 @@
    -var fs = require('graceful-fs');
    -var test = require('tap').test;
    -var glob = require('../');
    -
    -test('mock fs', function(t) {
    -  var stat = fs.stat
    -  var statSync = fs.statSync
    -  var readdir = fs.readdir
    -  var readdirSync = fs.readdirSync
    -
    -  function fakeStat(path) {
    -    var ret
    -    switch (path.toLowerCase()) {
    -      case '/tmp': case '/tmp/':
    -        ret = { isDirectory: function() { return true } }
    -        break
    -      case '/tmp/a':
    -        ret = { isDirectory: function() { return false } }
    -        break
    -    }
    -    return ret
    -  }
    -
    -  fs.stat = function(path, cb) {
    -    var f = fakeStat(path);
    -    if (f) {
    -      process.nextTick(function() {
    -        cb(null, f)
    -      })
    -    } else {
    -      stat.call(fs, path, cb)
    -    }
    -  }
    -
    -  fs.statSync = function(path) {
    -    return fakeStat(path) || statSync.call(fs, path)
    -  }
    -
    -  function fakeReaddir(path) {
    -    var ret
    -    switch (path.toLowerCase()) {
    -      case '/tmp': case '/tmp/':
    -        ret = [ 'a', 'A' ]
    -        break
    -      case '/':
    -        ret = ['tmp', 'tMp', 'tMP', 'TMP']
    -    }
    -    return ret
    -  }
    -
    -  fs.readdir = function(path, cb) {
    -    var f = fakeReaddir(path)
    -    if (f)
    -      process.nextTick(function() {
    -        cb(null, f)
    -      })
    -    else
    -      readdir.call(fs, path, cb)
    -  }
    -
    -  fs.readdirSync = function(path) {
    -    return fakeReaddir(path) || readdirSync.call(fs, path)
    -  }
    -
    -  t.pass('mocked')
    -  t.end()
    -})
    -
    -test('nocase, nomagic', function(t) {
    -  var n = 2
    -  var want = [ '/TMP/A',
    -               '/TMP/a',
    -               '/tMP/A',
    -               '/tMP/a',
    -               '/tMp/A',
    -               '/tMp/a',
    -               '/tmp/A',
    -               '/tmp/a' ]
    -  glob('/tmp/a', { nocase: true }, function(er, res) {
    -    if (er)
    -      throw er
    -    t.same(res.sort(), want)
    -    if (--n === 0) t.end()
    -  })
    -  glob('/tmp/A', { nocase: true }, function(er, res) {
    -    if (er)
    -      throw er
    -    t.same(res.sort(), want)
    -    if (--n === 0) t.end()
    -  })
    -})
    -
    -test('nocase, with some magic', function(t) {
    -  t.plan(2)
    -  var want = [ '/TMP/A',
    -               '/TMP/a',
    -               '/tMP/A',
    -               '/tMP/a',
    -               '/tMp/A',
    -               '/tMp/a',
    -               '/tmp/A',
    -               '/tmp/a' ]
    -  glob('/tmp/*', { nocase: true }, function(er, res) {
    -    if (er)
    -      throw er
    -    t.same(res.sort(), want)
    -  })
    -  glob('/tmp/*', { nocase: true }, function(er, res) {
    -    if (er)
    -      throw er
    -    t.same(res.sort(), want)
    -  })
    -})
    diff --git a/cli/node_modules/mocha/node_modules/glob/test/pause-resume.js b/cli/node_modules/mocha/node_modules/glob/test/pause-resume.js
    deleted file mode 100644
    index e1ffbab1c..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/test/pause-resume.js
    +++ /dev/null
    @@ -1,73 +0,0 @@
    -// show that no match events happen while paused.
    -var tap = require("tap")
    -, child_process = require("child_process")
    -// just some gnarly pattern with lots of matches
    -, pattern = "test/a/!(symlink)/**"
    -, bashResults = require("./bash-results.json")
    -, patterns = Object.keys(bashResults)
    -, glob = require("../")
    -, Glob = glob.Glob
    -, path = require("path")
    -
    -// run from the root of the project
    -// this is usually where you're at anyway, but be sure.
    -process.chdir(path.resolve(__dirname, ".."))
    -
    -function alphasort (a, b) {
    -  a = a.toLowerCase()
    -  b = b.toLowerCase()
    -  return a > b ? 1 : a < b ? -1 : 0
    -}
    -
    -function cleanResults (m) {
    -  // normalize discrepancies in ordering, duplication,
    -  // and ending slashes.
    -  return m.map(function (m) {
    -    return m.replace(/\/+/g, "/").replace(/\/$/, "")
    -  }).sort(alphasort).reduce(function (set, f) {
    -    if (f !== set[set.length - 1]) set.push(f)
    -    return set
    -  }, []).sort(alphasort).map(function (f) {
    -    // de-windows
    -    return (process.platform !== 'win32') ? f
    -           : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/')
    -  })
    -}
    -
    -var globResults = []
    -tap.test("use a Glob object, and pause/resume it", function (t) {
    -  var g = new Glob(pattern)
    -  , paused = false
    -  , res = []
    -  , expect = bashResults[pattern]
    -
    -  g.on("pause", function () {
    -    console.error("pause")
    -  })
    -
    -  g.on("resume", function () {
    -    console.error("resume")
    -  })
    -
    -  g.on("match", function (m) {
    -    t.notOk(g.paused, "must not be paused")
    -    globResults.push(m)
    -    g.pause()
    -    t.ok(g.paused, "must be paused")
    -    setTimeout(g.resume.bind(g), 10)
    -  })
    -
    -  g.on("end", function (matches) {
    -    t.pass("reached glob end")
    -    globResults = cleanResults(globResults)
    -    matches = cleanResults(matches)
    -    t.deepEqual(matches, globResults,
    -      "end event matches should be the same as match events")
    -
    -    t.deepEqual(matches, expect,
    -      "glob matches should be the same as bash results")
    -
    -    t.end()
    -  })
    -})
    -
    diff --git a/cli/node_modules/mocha/node_modules/glob/test/root-nomount.js b/cli/node_modules/mocha/node_modules/glob/test/root-nomount.js
    deleted file mode 100644
    index 3ac5979b0..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/test/root-nomount.js
    +++ /dev/null
    @@ -1,39 +0,0 @@
    -var tap = require("tap")
    -
    -var origCwd = process.cwd()
    -process.chdir(__dirname)
    -
    -tap.test("changing root and searching for /b*/**", function (t) {
    -  var glob = require('../')
    -  var path = require('path')
    -  t.test('.', function (t) {
    -    glob('/b*/**', { globDebug: true, root: '.', nomount: true }, function (er, matches) {
    -      t.ifError(er)
    -      t.like(matches, [])
    -      t.end()
    -    })
    -  })
    -
    -  t.test('a', function (t) {
    -    glob('/b*/**', { globDebug: true, root: path.resolve('a'), nomount: true }, function (er, matches) {
    -      t.ifError(er)
    -      t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ])
    -      t.end()
    -    })
    -  })
    -
    -  t.test('root=a, cwd=a/b', function (t) {
    -    glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b'), nomount: true }, function (er, matches) {
    -      t.ifError(er)
    -      t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ])
    -      t.end()
    -    })
    -  })
    -
    -  t.test('cd -', function (t) {
    -    process.chdir(origCwd)
    -    t.end()
    -  })
    -
    -  t.end()
    -})
    diff --git a/cli/node_modules/mocha/node_modules/glob/test/root.js b/cli/node_modules/mocha/node_modules/glob/test/root.js
    deleted file mode 100644
    index 95c23f99c..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/test/root.js
    +++ /dev/null
    @@ -1,46 +0,0 @@
    -var t = require("tap")
    -
    -var origCwd = process.cwd()
    -process.chdir(__dirname)
    -
    -var glob = require('../')
    -var path = require('path')
    -
    -t.test('.', function (t) {
    -  glob('/b*/**', { globDebug: true, root: '.' }, function (er, matches) {
    -    t.ifError(er)
    -    t.like(matches, [])
    -    t.end()
    -  })
    -})
    -
    -
    -t.test('a', function (t) {
    -  console.error("root=" + path.resolve('a'))
    -  glob('/b*/**', { globDebug: true, root: path.resolve('a') }, function (er, matches) {
    -    t.ifError(er)
    -    var wanted = [
    -        '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f'
    -      ].map(function (m) {
    -        return path.join(path.resolve('a'), m).replace(/\\/g, '/')
    -      })
    -
    -    t.like(matches, wanted)
    -    t.end()
    -  })
    -})
    -
    -t.test('root=a, cwd=a/b', function (t) {
    -  glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b') }, function (er, matches) {
    -    t.ifError(er)
    -    t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) {
    -      return path.join(path.resolve('a'), m).replace(/\\/g, '/')
    -    }))
    -    t.end()
    -  })
    -})
    -
    -t.test('cd -', function (t) {
    -  process.chdir(origCwd)
    -  t.end()
    -})
    diff --git a/cli/node_modules/mocha/node_modules/glob/test/stat.js b/cli/node_modules/mocha/node_modules/glob/test/stat.js
    deleted file mode 100644
    index 62917114b..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/test/stat.js
    +++ /dev/null
    @@ -1,32 +0,0 @@
    -var glob = require('../')
    -var test = require('tap').test
    -var path = require('path')
    -
    -test('stat all the things', function(t) {
    -  var g = new glob.Glob('a/*abc*/**', { stat: true, cwd: __dirname })
    -  var matches = []
    -  g.on('match', function(m) {
    -    matches.push(m)
    -  })
    -  var stats = []
    -  g.on('stat', function(m) {
    -    stats.push(m)
    -  })
    -  g.on('end', function(eof) {
    -    stats = stats.sort()
    -    matches = matches.sort()
    -    eof = eof.sort()
    -    t.same(stats, matches)
    -    t.same(eof, matches)
    -    var cache = Object.keys(this.statCache)
    -    t.same(cache.map(function (f) {
    -      return path.relative(__dirname, f)
    -    }).sort(), matches)
    -
    -    cache.forEach(function(c) {
    -      t.equal(typeof this.statCache[c], 'object')
    -    }, this)
    -
    -    t.end()
    -  })
    -})
    diff --git a/cli/node_modules/mocha/node_modules/glob/test/zz-cleanup.js b/cli/node_modules/mocha/node_modules/glob/test/zz-cleanup.js
    deleted file mode 100644
    index e085f0fa7..000000000
    --- a/cli/node_modules/mocha/node_modules/glob/test/zz-cleanup.js
    +++ /dev/null
    @@ -1,11 +0,0 @@
    -// remove the fixtures
    -var tap = require("tap")
    -, rimraf = require("rimraf")
    -, path = require("path")
    -
    -tap.test("cleanup fixtures", function (t) {
    -  rimraf(path.resolve(__dirname, "a"), function (er) {
    -    t.ifError(er, "removed")
    -    t.end()
    -  })
    -})
    diff --git a/cli/node_modules/mocha/node_modules/growl/History.md b/cli/node_modules/mocha/node_modules/growl/History.md
    deleted file mode 100644
    index a4b7b49f2..000000000
    --- a/cli/node_modules/mocha/node_modules/growl/History.md
    +++ /dev/null
    @@ -1,63 +0,0 @@
    -
    -1.7.0 / 2012-12-30 
    -==================
    -
    -  * support transient notifications in Gnome
    -
    -1.6.1 / 2012-09-25 
    -==================
    -
    -  * restore compatibility with node < 0.8 [fgnass]
    -
    -1.6.0 / 2012-09-06 
    -==================
    -
    -  * add notification center support [drudge]
    -
    -1.5.1 / 2012-04-08 
    -==================
    -
    -  * Merge pull request #16 from KyleAMathews/patch-1
    -  * Fixes #15
    -
    -1.5.0 / 2012-02-08 
    -==================
    -
    -  * Added windows support [perfusorius]
    -
    -1.4.1 / 2011-12-28 
    -==================
    -
    -  * Fixed: dont exit(). Closes #9
    -
    -1.4.0 / 2011-12-17 
    -==================
    -
    -  * Changed API: `growl.notify()` -> `growl()`
    -
    -1.3.0 / 2011-12-17 
    -==================
    -
    -  * Added support for Ubuntu/Debian/Linux users [niftylettuce]
    -  * Fixed: send notifications even if title not specified [alessioalex]
    -
    -1.2.0 / 2011-10-06 
    -==================
    -
    -  * Add support for priority.
    -
    -1.1.0 / 2011-03-15 
    -==================
    -
    -  * Added optional callbacks
    -  * Added parsing of version
    -
    -1.0.1 / 2010-03-26
    -==================
    -
    -  * Fixed; sys.exec -> child_process.exec to support latest node
    -
    -1.0.0 / 2010-03-19
    -==================
    -  
    -  * Initial release
    diff --git a/cli/node_modules/mocha/node_modules/growl/Readme.md b/cli/node_modules/mocha/node_modules/growl/Readme.md
    deleted file mode 100644
    index 48d717ccb..000000000
    --- a/cli/node_modules/mocha/node_modules/growl/Readme.md
    +++ /dev/null
    @@ -1,99 +0,0 @@
    -# Growl for nodejs
    -
    -Growl support for Nodejs. This is essentially a port of my [Ruby Growl Library](http://github.com/visionmedia/growl). Ubuntu/Linux support added thanks to [@niftylettuce](http://github.com/niftylettuce). 
    -
    -## Installation
    -
    -### Install 
    -
    -### Mac OS X (Darwin):
    -
    -  Install [growlnotify(1)](http://growl.info/extras.php#growlnotify). On OS X 10.8, Notification Center is supported using [terminal-notifier](https://github.com/alloy/terminal-notifier). To install:
    -  
    -      $ sudo gem install terminal-notifier
    -      
    -  Install [npm](http://npmjs.org/) and run:
    -  
    -      $ npm install growl
    -
    -### Ubuntu (Linux):
    -
    -  Install `notify-send` through the [libnotify-bin](http://packages.ubuntu.com/libnotify-bin) package:
    -
    -      $ sudo apt-get install libnotify-bin
    -
    -  Install [npm](http://npmjs.org/) and run:
    -  
    -      $ npm install growl
    -
    -### Windows:
    -
    -  Download and install [Growl for Windows](http://www.growlforwindows.com/gfw/default.aspx)
    -
    -  Download [growlnotify](http://www.growlforwindows.com/gfw/help/growlnotify.aspx) - **IMPORTANT :** Unpack growlnotify to a folder that is present in your path!
    -
    -  Install [npm](http://npmjs.org/) and run:
    -  
    -      $ npm install growl
    -
    -## Examples
    -
    -Callback functions are optional
    -
    -    var growl = require('growl')
    -    growl('You have mail!')
    -    growl('5 new messages', { sticky: true })
    -    growl('5 new emails', { title: 'Email Client', image: 'Safari', sticky: true })
    -    growl('Message with title', { title: 'Title'})
    -    growl('Set priority', { priority: 2 })
    -    growl('Show Safari icon', { image: 'Safari' })
    -    growl('Show icon', { image: 'path/to/icon.icns' })
    -    growl('Show image', { image: 'path/to/my.image.png' })
    -    growl('Show png filesystem icon', { image: 'png' })
    -    growl('Show pdf filesystem icon', { image: 'article.pdf' })
    -    growl('Show pdf filesystem icon', { image: 'article.pdf' }, function(err){
    -      // ... notified
    -    })
    -
    -## Options
    -
    -  - title
    -    - notification title
    -  - name
    -    - application name
    -  - priority
    -    - priority for the notification (default is 0)
    -  - sticky
    -    - weither or not the notification should remainin until closed
    -  - image
    -    - Auto-detects the context:
    -      - path to an icon sets --iconpath
    -      - path to an image sets --image
    -      - capitalized word sets --appIcon
    -      - filename uses extname as --icon
    -      - otherwise treated as --icon
    -      
    -## License 
    -
    -(The MIT License)
    -
    -Copyright (c) 2009 TJ Holowaychuk 
    -
    -Permission is hereby granted, free of charge, to any person obtaining
    -a copy of this software and associated documentation files (the
    -'Software'), to deal in the Software without restriction, including
    -without limitation the rights to use, copy, modify, merge, publish,
    -distribute, sublicense, and/or sell copies of the Software, and to
    -permit persons to whom the Software is furnished to do so, subject to
    -the following conditions:
    -
    -The above copyright notice and this permission notice shall be
    -included in all copies or substantial portions of the Software.
    -
    -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
    -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
    -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
    -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    diff --git a/cli/node_modules/mocha/node_modules/growl/lib/growl.js b/cli/node_modules/mocha/node_modules/growl/lib/growl.js
    deleted file mode 100644
    index c034c3efd..000000000
    --- a/cli/node_modules/mocha/node_modules/growl/lib/growl.js
    +++ /dev/null
    @@ -1,234 +0,0 @@
    -// Growl - Copyright TJ Holowaychuk  (MIT Licensed)
    -
    -/**
    - * Module dependencies.
    - */
    -
    -var exec = require('child_process').exec
    -  , fs = require('fs')
    -  , path = require('path')
    -  , exists = fs.existsSync || path.existsSync
    -  , os = require('os')
    -  , quote = JSON.stringify
    -  , cmd;
    -
    -function which(name) {
    -  var paths = process.env.PATH.split(':');
    -  var loc;
    -  
    -  for (var i = 0, len = paths.length; i < len; ++i) {
    -    loc = path.join(paths[i], name);
    -    if (exists(loc)) return loc;
    -  }
    -}
    -
    -switch(os.type()) {
    -  case 'Darwin':
    -    if (which('terminal-notifier')) {
    -      cmd = {
    -          type: "Darwin-NotificationCenter"
    -        , pkg: "terminal-notifier"
    -        , msg: '-message'
    -        , title: '-title'
    -        , subtitle: '-subtitle'
    -        , priority: {
    -              cmd: '-execute'
    -            , range: []
    -          }
    -      };
    -    } else {
    -      cmd = {
    -          type: "Darwin-Growl"
    -        , pkg: "growlnotify"
    -        , msg: '-m'
    -        , sticky: '--sticky'
    -        , priority: {
    -              cmd: '--priority'
    -            , range: [
    -                -2
    -              , -1
    -              , 0
    -              , 1
    -              , 2
    -              , "Very Low"
    -              , "Moderate"
    -              , "Normal"
    -              , "High"
    -              , "Emergency"
    -            ]
    -          }
    -      };
    -    }
    -    break;
    -  case 'Linux':
    -    cmd = {
    -        type: "Linux"
    -      , pkg: "notify-send"
    -      , msg: ''
    -      , sticky: '-t 0'
    -      , icon: '-i'
    -      , priority: {
    -          cmd: '-u'
    -        , range: [
    -            "low"
    -          , "normal"
    -          , "critical"
    -        ]
    -      }
    -    };
    -    break;
    -  case 'Windows_NT':
    -    cmd = {
    -        type: "Windows"
    -      , pkg: "growlnotify"
    -      , msg: ''
    -      , sticky: '/s:true'
    -      , title: '/t:'
    -      , icon: '/i:'
    -      , priority: {
    -            cmd: '/p:'
    -          , range: [
    -              -2
    -            , -1
    -            , 0
    -            , 1
    -            , 2
    -          ]
    -        }
    -    };
    -    break;
    -}
    -
    -/**
    - * Expose `growl`.
    - */
    -
    -exports = module.exports = growl;
    -
    -/**
    - * Node-growl version.
    - */
    -
    -exports.version = '1.4.1'
    -
    -/**
    - * Send growl notification _msg_ with _options_.
    - *
    - * Options:
    - *
    - *  - title   Notification title
    - *  - sticky  Make the notification stick (defaults to false)
    - *  - priority  Specify an int or named key (default is 0)
    - *  - name    Application name (defaults to growlnotify)
    - *  - image
    - *    - path to an icon sets --iconpath
    - *    - path to an image sets --image
    - *    - capitalized word sets --appIcon
    - *    - filename uses extname as --icon
    - *    - otherwise treated as --icon
    - *
    - * Examples:
    - *
    - *   growl('New email')
    - *   growl('5 new emails', { title: 'Thunderbird' })
    - *   growl('Email sent', function(){
    - *     // ... notification sent
    - *   })
    - *
    - * @param {string} msg
    - * @param {object} options
    - * @param {function} fn
    - * @api public
    - */
    -
    -function growl(msg, options, fn) {
    -  var image
    -    , args
    -    , options = options || {}
    -    , fn = fn || function(){};
    -
    -  // noop
    -  if (!cmd) return fn(new Error('growl not supported on this platform'));
    -  args = [cmd.pkg];
    -
    -  // image
    -  if (image = options.image) {
    -    switch(cmd.type) {
    -      case 'Darwin-Growl':
    -        var flag, ext = path.extname(image).substr(1)
    -        flag = flag || ext == 'icns' && 'iconpath'
    -        flag = flag || /^[A-Z]/.test(image) && 'appIcon'
    -        flag = flag || /^png|gif|jpe?g$/.test(ext) && 'image'
    -        flag = flag || ext && (image = ext) && 'icon'
    -        flag = flag || 'icon'
    -        args.push('--' + flag, quote(image))
    -        break;
    -      case 'Linux':
    -        args.push(cmd.icon, quote(image));
    -        // libnotify defaults to sticky, set a hint for transient notifications
    -        if (!options.sticky) args.push('--hint=int:transient:1');
    -        break;
    -      case 'Windows':
    -        args.push(cmd.icon + quote(image));
    -        break;
    -    }
    -  }
    -
    -  // sticky
    -  if (options.sticky) args.push(cmd.sticky);
    -
    -  // priority
    -  if (options.priority) {
    -    var priority = options.priority + '';
    -    var checkindexOf = cmd.priority.range.indexOf(priority);
    -    if (~cmd.priority.range.indexOf(priority)) {
    -      args.push(cmd.priority, options.priority);
    -    }
    -  }
    -
    -  // name
    -  if (options.name && cmd.type === "Darwin-Growl") {
    -    args.push('--name', options.name);
    -  }
    -
    -  switch(cmd.type) {
    -    case 'Darwin-Growl':
    -      args.push(cmd.msg);
    -      args.push(quote(msg));
    -      if (options.title) args.push(quote(options.title));
    -      break;
    -    case 'Darwin-NotificationCenter':
    -      args.push(cmd.msg);
    -      args.push(quote(msg));
    -      if (options.title) {
    -        args.push(cmd.title);
    -        args.push(quote(options.title));
    -      }
    -      if (options.subtitle) {
    -        args.push(cmd.subtitle);
    -        args.push(quote(options.subtitle));
    -      }
    -      break;
    -    case 'Darwin-Growl':
    -      args.push(cmd.msg);
    -      args.push(quote(msg));
    -      if (options.title) args.push(quote(options.title));
    -      break;
    -    case 'Linux':
    -      if (options.title) {
    -        args.push(quote(options.title));
    -        args.push(cmd.msg);
    -        args.push(quote(msg));
    -      } else {
    -        args.push(quote(msg));
    -      }
    -      break;
    -    case 'Windows':
    -      args.push(quote(msg));
    -      if (options.title) args.push(cmd.title + quote(options.title));
    -      break;
    -  }
    -
    -  // execute
    -  exec(args.join(' '), fn);
    -};
    diff --git a/cli/node_modules/mocha/node_modules/growl/package.json b/cli/node_modules/mocha/node_modules/growl/package.json
    deleted file mode 100644
    index 0a2ce0097..000000000
    --- a/cli/node_modules/mocha/node_modules/growl/package.json
    +++ /dev/null
    @@ -1,45 +0,0 @@
    -{
    -  "name": "growl",
    -  "version": "1.8.1",
    -  "description": "Growl unobtrusive notifications",
    -  "author": {
    -    "name": "TJ Holowaychuk",
    -    "email": "tj@vision-media.ca"
    -  },
    -  "maintainers": [
    -    {
    -      "name": "tjholowaychuk",
    -      "email": "tj@vision-media.ca"
    -    },
    -    {
    -      "name": "jbnicolai",
    -      "email": "jappelman@xebia.com"
    -    }
    -  ],
    -  "repository": {
    -    "type": "git",
    -    "url": "git://github.com/visionmedia/node-growl.git"
    -  },
    -  "main": "./lib/growl.js",
    -  "gitHead": "882ced3155a57f566887c884d5c6dccb7df435c1",
    -  "bugs": {
    -    "url": "https://github.com/visionmedia/node-growl/issues"
    -  },
    -  "homepage": "https://github.com/visionmedia/node-growl",
    -  "_id": "growl@1.8.1",
    -  "scripts": {},
    -  "_shasum": "4b2dec8d907e93db336624dcec0183502f8c9428",
    -  "_from": "growl@1.8.1",
    -  "_npmVersion": "1.4.20",
    -  "_npmUser": {
    -    "name": "jbnicolai",
    -    "email": "jappelman@xebia.com"
    -  },
    -  "dist": {
    -    "shasum": "4b2dec8d907e93db336624dcec0183502f8c9428",
    -    "tarball": "http://registry.npmjs.org/growl/-/growl-1.8.1.tgz"
    -  },
    -  "directories": {},
    -  "_resolved": "https://registry.npmjs.org/growl/-/growl-1.8.1.tgz",
    -  "readme": "ERROR: No README data found!"
    -}
    diff --git a/cli/node_modules/mocha/node_modules/growl/test.js b/cli/node_modules/mocha/node_modules/growl/test.js
    deleted file mode 100644
    index cf22d90b2..000000000
    --- a/cli/node_modules/mocha/node_modules/growl/test.js
    +++ /dev/null
    @@ -1,20 +0,0 @@
    -
    -var growl = require('./lib/growl')
    -
    -growl('You have mail!')
    -growl('5 new messages', { sticky: true })
    -growl('5 new emails', { title: 'Email Client', image: 'Safari', sticky: true })
    -growl('Message with title', { title: 'Title'})
    -growl('Set priority', { priority: 2 })
    -growl('Show Safari icon', { image: 'Safari' })
    -growl('Show icon', { image: 'path/to/icon.icns' })
    -growl('Show image', { image: 'path/to/my.image.png' })
    -growl('Show png filesystem icon', { image: 'png' })
    -growl('Show pdf filesystem icon', { image: 'article.pdf' })
    -growl('Show pdf filesystem icon', { image: 'article.pdf' }, function(){
    -  console.log('callback');
    -})
    -growl('Show pdf filesystem icon', { title: 'Use show()', image: 'article.pdf' })
    -growl('here \' are \n some \\ characters that " need escaping', {}, function(error, stdout, stderr) {
    -  if (error !== null) throw new Error('escaping failed:\n' + stdout + stderr);
    -})
    diff --git a/cli/node_modules/mocha/node_modules/jade/.npmignore b/cli/node_modules/mocha/node_modules/jade/.npmignore
    deleted file mode 100644
    index b9af3d4be..000000000
    --- a/cli/node_modules/mocha/node_modules/jade/.npmignore
    +++ /dev/null
    @@ -1,15 +0,0 @@
    -test
    -support
    -benchmarks
    -examples
    -lib-cov
    -coverage.html
    -.gitmodules
    -.travis.yml
    -History.md
    -Readme.md
    -Makefile
    -test/
    -support/
    -benchmarks/
    -examples/
    diff --git a/cli/node_modules/mocha/node_modules/jade/LICENSE b/cli/node_modules/mocha/node_modules/jade/LICENSE
    deleted file mode 100644
    index 8ad0e0d3e..000000000
    --- a/cli/node_modules/mocha/node_modules/jade/LICENSE
    +++ /dev/null
    @@ -1,22 +0,0 @@
    -(The MIT License)
    -
    -Copyright (c) 2009-2010 TJ Holowaychuk 
    -
    -Permission is hereby granted, free of charge, to any person obtaining
    -a copy of this software and associated documentation files (the
    -'Software'), to deal in the Software without restriction, including
    -without limitation the rights to use, copy, modify, merge, publish,
    -distribute, sublicense, and/or sell copies of the Software, and to
    -permit persons to whom the Software is furnished to do so, subject to
    -the following conditions:
    -
    -The above copyright notice and this permission notice shall be
    -included in all copies or substantial portions of the Software.
    -
    -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
    -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
    -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
    -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    \ No newline at end of file
    diff --git a/cli/node_modules/mocha/node_modules/jade/bin/jade b/cli/node_modules/mocha/node_modules/jade/bin/jade
    deleted file mode 100755
    index 7e6002f90..000000000
    --- a/cli/node_modules/mocha/node_modules/jade/bin/jade
    +++ /dev/null
    @@ -1,147 +0,0 @@
    -#!/usr/bin/env node
    -
    -/**
    - * Module dependencies.
    - */
    -
    -var fs = require('fs')
    -  , program = require('commander')
    -  , path = require('path')
    -  , basename = path.basename
    -  , dirname = path.dirname
    -  , resolve = path.resolve
    -  , join = path.join
    -  , mkdirp = require('mkdirp')
    -  , jade = require('../');
    -
    -// jade options
    -
    -var options = {};
    -
    -// options
    -
    -program
    -  .version(jade.version)
    -  .usage('[options] [dir|file ...]')
    -  .option('-o, --obj ', 'javascript options object')
    -  .option('-O, --out 
    ', 'output the compiled html to ') - .option('-p, --path ', 'filename used to resolve includes') - .option('-P, --pretty', 'compile pretty html output') - .option('-c, --client', 'compile for client-side runtime.js') - .option('-D, --no-debug', 'compile without debugging (smaller functions)') - -program.on('--help', function(){ - console.log(' Examples:'); - console.log(''); - console.log(' # translate jade the templates dir'); - console.log(' $ jade templates'); - console.log(''); - console.log(' # create {foo,bar}.html'); - console.log(' $ jade {foo,bar}.jade'); - console.log(''); - console.log(' # jade over stdio'); - console.log(' $ jade < my.jade > my.html'); - console.log(''); - console.log(' # jade over stdio'); - console.log(' $ echo "h1 Jade!" | jade'); - console.log(''); - console.log(' # foo, bar dirs rendering to /tmp'); - console.log(' $ jade foo bar --out /tmp '); - console.log(''); -}); - -program.parse(process.argv); - -// options given, parse them - -if (program.obj) options = eval('(' + program.obj + ')'); - -// --filename - -if (program.path) options.filename = program.path; - -// --no-debug - -options.compileDebug = program.debug; - -// --client - -options.client = program.client; - -// --pretty - -options.pretty = program.pretty; - -// left-over args are file paths - -var files = program.args; - -// compile files - -if (files.length) { - console.log(); - files.forEach(renderFile); - process.on('exit', console.log); -// stdio -} else { - stdin(); -} - -/** - * Compile from stdin. - */ - -function stdin() { - var buf = ''; - process.stdin.setEncoding('utf8'); - process.stdin.on('data', function(chunk){ buf += chunk; }); - process.stdin.on('end', function(){ - var fn = jade.compile(buf, options); - var output = options.client - ? fn.toString() - : fn(options); - process.stdout.write(output); - }).resume(); -} - -/** - * Process the given path, compiling the jade files found. - * Always walk the subdirectories. - */ - -function renderFile(path) { - var re = /\.jade$/; - fs.lstat(path, function(err, stat) { - if (err) throw err; - // Found jade file - if (stat.isFile() && re.test(path)) { - fs.readFile(path, 'utf8', function(err, str){ - if (err) throw err; - options.filename = path; - var fn = jade.compile(str, options); - var extname = options.client ? '.js' : '.html'; - path = path.replace(re, extname); - if (program.out) path = join(program.out, basename(path)); - var dir = resolve(dirname(path)); - mkdirp(dir, 0755, function(err){ - if (err) throw err; - var output = options.client - ? fn.toString() - : fn(options); - fs.writeFile(path, output, function(err){ - if (err) throw err; - console.log(' \033[90mrendered \033[36m%s\033[0m', path); - }); - }); - }); - // Found directory - } else if (stat.isDirectory()) { - fs.readdir(path, function(err, files) { - if (err) throw err; - files.map(function(filename) { - return path + '/' + filename; - }).forEach(renderFile); - }); - } - }); -} diff --git a/cli/node_modules/mocha/node_modules/jade/index.js b/cli/node_modules/mocha/node_modules/jade/index.js deleted file mode 100644 index 8ad059f77..000000000 --- a/cli/node_modules/mocha/node_modules/jade/index.js +++ /dev/null @@ -1,4 +0,0 @@ - -module.exports = process.env.JADE_COV - ? require('./lib-cov/jade') - : require('./lib/jade'); \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/jade.js b/cli/node_modules/mocha/node_modules/jade/jade.js deleted file mode 100644 index 1983a2039..000000000 --- a/cli/node_modules/mocha/node_modules/jade/jade.js +++ /dev/null @@ -1,3586 +0,0 @@ -(function() { - -// CommonJS require() - -function require(p){ - var path = require.resolve(p) - , mod = require.modules[path]; - if (!mod) throw new Error('failed to require "' + p + '"'); - if (!mod.exports) { - mod.exports = {}; - mod.call(mod.exports, mod, mod.exports, require.relative(path)); - } - return mod.exports; - } - -require.modules = {}; - -require.resolve = function (path){ - var orig = path - , reg = path + '.js' - , index = path + '/index.js'; - return require.modules[reg] && reg - || require.modules[index] && index - || orig; - }; - -require.register = function (path, fn){ - require.modules[path] = fn; - }; - -require.relative = function (parent) { - return function(p){ - if ('.' != p.charAt(0)) return require(p); - - var path = parent.split('/') - , segs = p.split('/'); - path.pop(); - - for (var i = 0; i < segs.length; i++) { - var seg = segs[i]; - if ('..' == seg) path.pop(); - else if ('.' != seg) path.push(seg); - } - - return require(path.join('/')); - }; - }; - - -require.register("compiler.js", function(module, exports, require){ - -/*! - * Jade - Compiler - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var nodes = require('./nodes') - , filters = require('./filters') - , doctypes = require('./doctypes') - , selfClosing = require('./self-closing') - , runtime = require('./runtime') - , utils = require('./utils'); - - - if (!Object.keys) { - Object.keys = function(obj){ - var arr = []; - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - arr.push(key); - } - } - return arr; - } - } - - if (!String.prototype.trimLeft) { - String.prototype.trimLeft = function(){ - return this.replace(/^\s+/, ''); - } - } - - - -/** - * Initialize `Compiler` with the given `node`. - * - * @param {Node} node - * @param {Object} options - * @api public - */ - -var Compiler = module.exports = function Compiler(node, options) { - this.options = options = options || {}; - this.node = node; - this.hasCompiledDoctype = false; - this.hasCompiledTag = false; - this.pp = options.pretty || false; - this.debug = false !== options.compileDebug; - this.indents = 0; - this.parentIndents = 0; - if (options.doctype) this.setDoctype(options.doctype); -}; - -/** - * Compiler prototype. - */ - -Compiler.prototype = { - - /** - * Compile parse tree to JavaScript. - * - * @api public - */ - - compile: function(){ - this.buf = ['var interp;']; - if (this.pp) this.buf.push("var __indent = [];"); - this.lastBufferedIdx = -1; - this.visit(this.node); - return this.buf.join('\n'); - }, - - /** - * Sets the default doctype `name`. Sets terse mode to `true` when - * html 5 is used, causing self-closing tags to end with ">" vs "/>", - * and boolean attributes are not mirrored. - * - * @param {string} name - * @api public - */ - - setDoctype: function(name){ - var doctype = doctypes[(name || 'default').toLowerCase()]; - doctype = doctype || ''; - this.doctype = doctype; - this.terse = '5' == name || 'html' == name; - this.xml = 0 == this.doctype.indexOf(' 1 && !escape && block.nodes[0].isText && block.nodes[1].isText) - this.prettyIndent(1, true); - - for (var i = 0; i < len; ++i) { - // Pretty print text - if (pp && i > 0 && !escape && block.nodes[i].isText && block.nodes[i-1].isText) - this.prettyIndent(1, false); - - this.visit(block.nodes[i]); - // Multiple text nodes are separated by newlines - if (block.nodes[i+1] && block.nodes[i].isText && block.nodes[i+1].isText) - this.buffer('\\n'); - } - }, - - /** - * Visit `doctype`. Sets terse mode to `true` when html 5 - * is used, causing self-closing tags to end with ">" vs "/>", - * and boolean attributes are not mirrored. - * - * @param {Doctype} doctype - * @api public - */ - - visitDoctype: function(doctype){ - if (doctype && (doctype.val || !this.doctype)) { - this.setDoctype(doctype.val || 'default'); - } - - if (this.doctype) this.buffer(this.doctype); - this.hasCompiledDoctype = true; - }, - - /** - * Visit `mixin`, generating a function that - * may be called within the template. - * - * @param {Mixin} mixin - * @api public - */ - - visitMixin: function(mixin){ - var name = mixin.name.replace(/-/g, '_') + '_mixin' - , args = mixin.args || '' - , block = mixin.block - , attrs = mixin.attrs - , pp = this.pp; - - if (mixin.call) { - if (pp) this.buf.push("__indent.push('" + Array(this.indents + 1).join(' ') + "');") - if (block || attrs.length) { - - this.buf.push(name + '.call({'); - - if (block) { - this.buf.push('block: function(){'); - - // Render block with no indents, dynamically added when rendered - this.parentIndents++; - var _indents = this.indents; - this.indents = 0; - this.visit(mixin.block); - this.indents = _indents; - this.parentIndents--; - - if (attrs.length) { - this.buf.push('},'); - } else { - this.buf.push('}'); - } - } - - if (attrs.length) { - var val = this.attrs(attrs); - if (val.inherits) { - this.buf.push('attributes: merge({' + val.buf - + '}, attributes), escaped: merge(' + val.escaped + ', escaped, true)'); - } else { - this.buf.push('attributes: {' + val.buf + '}, escaped: ' + val.escaped); - } - } - - if (args) { - this.buf.push('}, ' + args + ');'); - } else { - this.buf.push('});'); - } - - } else { - this.buf.push(name + '(' + args + ');'); - } - if (pp) this.buf.push("__indent.pop();") - } else { - this.buf.push('var ' + name + ' = function(' + args + '){'); - this.buf.push('var block = this.block, attributes = this.attributes || {}, escaped = this.escaped || {};'); - this.parentIndents++; - this.visit(block); - this.parentIndents--; - this.buf.push('};'); - } - }, - - /** - * Visit `tag` buffering tag markup, generating - * attributes, visiting the `tag`'s code and block. - * - * @param {Tag} tag - * @api public - */ - - visitTag: function(tag){ - this.indents++; - var name = tag.name - , pp = this.pp; - - if (tag.buffer) name = "' + (" + name + ") + '"; - - if (!this.hasCompiledTag) { - if (!this.hasCompiledDoctype && 'html' == name) { - this.visitDoctype(); - } - this.hasCompiledTag = true; - } - - // pretty print - if (pp && !tag.isInline()) - this.prettyIndent(0, true); - - if ((~selfClosing.indexOf(name) || tag.selfClosing) && !this.xml) { - this.buffer('<' + name); - this.visitAttributes(tag.attrs); - this.terse - ? this.buffer('>') - : this.buffer('/>'); - } else { - // Optimize attributes buffering - if (tag.attrs.length) { - this.buffer('<' + name); - if (tag.attrs.length) this.visitAttributes(tag.attrs); - this.buffer('>'); - } else { - this.buffer('<' + name + '>'); - } - if (tag.code) this.visitCode(tag.code); - this.escape = 'pre' == tag.name; - this.visit(tag.block); - - // pretty print - if (pp && !tag.isInline() && 'pre' != tag.name && !tag.canInline()) - this.prettyIndent(0, true); - - this.buffer(''); - } - this.indents--; - }, - - /** - * Visit `filter`, throwing when the filter does not exist. - * - * @param {Filter} filter - * @api public - */ - - visitFilter: function(filter){ - var fn = filters[filter.name]; - - // unknown filter - if (!fn) { - if (filter.isASTFilter) { - throw new Error('unknown ast filter "' + filter.name + ':"'); - } else { - throw new Error('unknown filter ":' + filter.name + '"'); - } - } - - if (filter.isASTFilter) { - this.buf.push(fn(filter.block, this, filter.attrs)); - } else { - var text = filter.block.nodes.map(function(node){ return node.val }).join('\n'); - filter.attrs = filter.attrs || {}; - filter.attrs.filename = this.options.filename; - this.buffer(utils.text(fn(text, filter.attrs))); - } - }, - - /** - * Visit `text` node. - * - * @param {Text} text - * @api public - */ - - visitText: function(text){ - text = utils.text(text.val.replace(/\\/g, '\\\\')); - if (this.escape) text = escape(text); - this.buffer(text); - }, - - /** - * Visit a `comment`, only buffering when the buffer flag is set. - * - * @param {Comment} comment - * @api public - */ - - visitComment: function(comment){ - if (!comment.buffer) return; - if (this.pp) this.prettyIndent(1, true); - this.buffer(''); - }, - - /** - * Visit a `BlockComment`. - * - * @param {Comment} comment - * @api public - */ - - visitBlockComment: function(comment){ - if (!comment.buffer) return; - if (0 == comment.val.trim().indexOf('if')) { - this.buffer(''); - } else { - this.buffer(''); - } - }, - - /** - * Visit `code`, respecting buffer / escape flags. - * If the code is followed by a block, wrap it in - * a self-calling function. - * - * @param {Code} code - * @api public - */ - - visitCode: function(code){ - // Wrap code blocks with {}. - // we only wrap unbuffered code blocks ATM - // since they are usually flow control - - // Buffer code - if (code.buffer) { - var val = code.val.trimLeft(); - this.buf.push('var __val__ = ' + val); - val = 'null == __val__ ? "" : __val__'; - if (code.escape) val = 'escape(' + val + ')'; - this.buf.push("buf.push(" + val + ");"); - } else { - this.buf.push(code.val); - } - - // Block support - if (code.block) { - if (!code.buffer) this.buf.push('{'); - this.visit(code.block); - if (!code.buffer) this.buf.push('}'); - } - }, - - /** - * Visit `each` block. - * - * @param {Each} each - * @api public - */ - - visitEach: function(each){ - this.buf.push('' - + '// iterate ' + each.obj + '\n' - + ';(function(){\n' - + ' if (\'number\' == typeof ' + each.obj + '.length) {\n' - + ' for (var ' + each.key + ' = 0, $$l = ' + each.obj + '.length; ' + each.key + ' < $$l; ' + each.key + '++) {\n' - + ' var ' + each.val + ' = ' + each.obj + '[' + each.key + '];\n'); - - this.visit(each.block); - - this.buf.push('' - + ' }\n' - + ' } else {\n' - + ' for (var ' + each.key + ' in ' + each.obj + ') {\n' - + ' if (' + each.obj + '.hasOwnProperty(' + each.key + ')){' - + ' var ' + each.val + ' = ' + each.obj + '[' + each.key + '];\n'); - - this.visit(each.block); - - this.buf.push(' }\n'); - - this.buf.push(' }\n }\n}).call(this);\n'); - }, - - /** - * Visit `attrs`. - * - * @param {Array} attrs - * @api public - */ - - visitAttributes: function(attrs){ - var val = this.attrs(attrs); - if (val.inherits) { - this.buf.push("buf.push(attrs(merge({ " + val.buf + - " }, attributes), merge(" + val.escaped + ", escaped, true)));"); - } else if (val.constant) { - eval('var buf={' + val.buf + '};'); - this.buffer(runtime.attrs(buf, JSON.parse(val.escaped)), true); - } else { - this.buf.push("buf.push(attrs({ " + val.buf + " }, " + val.escaped + "));"); - } - }, - - /** - * Compile attributes. - */ - - attrs: function(attrs){ - var buf = [] - , classes = [] - , escaped = {} - , constant = attrs.every(function(attr){ return isConstant(attr.val) }) - , inherits = false; - - if (this.terse) buf.push('terse: true'); - - attrs.forEach(function(attr){ - if (attr.name == 'attributes') return inherits = true; - escaped[attr.name] = attr.escaped; - if (attr.name == 'class') { - classes.push('(' + attr.val + ')'); - } else { - var pair = "'" + attr.name + "':(" + attr.val + ')'; - buf.push(pair); - } - }); - - if (classes.length) { - classes = classes.join(" + ' ' + "); - buf.push("class: " + classes); - } - - return { - buf: buf.join(', ').replace('class:', '"class":'), - escaped: JSON.stringify(escaped), - inherits: inherits, - constant: constant - }; - } -}; - -/** - * Check if expression can be evaluated to a constant - * - * @param {String} expression - * @return {Boolean} - * @api private - */ - -function isConstant(val){ - // Check strings/literals - if (/^ *("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|true|false|null|undefined) *$/i.test(val)) - return true; - - // Check numbers - if (!isNaN(Number(val))) - return true; - - // Check arrays - var matches; - if (matches = /^ *\[(.*)\] *$/.exec(val)) - return matches[1].split(',').every(isConstant); - - return false; -} - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -function escape(html){ - return String(html) - .replace(/&(?!\w+;)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -} -}); // module: compiler.js - -require.register("doctypes.js", function(module, exports, require){ - -/*! - * Jade - doctypes - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = { - '5': '' - , 'default': '' - , 'xml': '' - , 'transitional': '' - , 'strict': '' - , 'frameset': '' - , '1.1': '' - , 'basic': '' - , 'mobile': '' -}; -}); // module: doctypes.js - -require.register("filters.js", function(module, exports, require){ - -/*! - * Jade - filters - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = { - - /** - * Wrap text with CDATA block. - */ - - cdata: function(str){ - return ''; - }, - - /** - * Transform sass to css, wrapped in style tags. - */ - - sass: function(str){ - str = str.replace(/\\n/g, '\n'); - var sass = require('sass').render(str).replace(/\n/g, '\\n'); - return ''; - }, - - /** - * Transform stylus to css, wrapped in style tags. - */ - - stylus: function(str, options){ - var ret; - str = str.replace(/\\n/g, '\n'); - var stylus = require('stylus'); - stylus(str, options).render(function(err, css){ - if (err) throw err; - ret = css.replace(/\n/g, '\\n'); - }); - return ''; - }, - - /** - * Transform less to css, wrapped in style tags. - */ - - less: function(str){ - var ret; - str = str.replace(/\\n/g, '\n'); - require('less').render(str, function(err, css){ - if (err) throw err; - ret = ''; - }); - return ret; - }, - - /** - * Transform markdown to html. - */ - - markdown: function(str){ - var md; - - // support markdown / discount - try { - md = require('markdown'); - } catch (err){ - try { - md = require('discount'); - } catch (err) { - try { - md = require('markdown-js'); - } catch (err) { - try { - md = require('marked'); - } catch (err) { - throw new - Error('Cannot find markdown library, install markdown, discount, or marked.'); - } - } - } - } - - str = str.replace(/\\n/g, '\n'); - return md.parse(str).replace(/\n/g, '\\n').replace(/'/g,'''); - }, - - /** - * Transform coffeescript to javascript. - */ - - coffeescript: function(str){ - str = str.replace(/\\n/g, '\n'); - var js = require('coffee-script').compile(str).replace(/\\/g, '\\\\').replace(/\n/g, '\\n'); - return ''; - } -}; - -}); // module: filters.js - -require.register("inline-tags.js", function(module, exports, require){ - -/*! - * Jade - inline tags - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = [ - 'a' - , 'abbr' - , 'acronym' - , 'b' - , 'br' - , 'code' - , 'em' - , 'font' - , 'i' - , 'img' - , 'ins' - , 'kbd' - , 'map' - , 'samp' - , 'small' - , 'span' - , 'strong' - , 'sub' - , 'sup' -]; -}); // module: inline-tags.js - -require.register("jade.js", function(module, exports, require){ -/*! - * Jade - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Parser = require('./parser') - , Lexer = require('./lexer') - , Compiler = require('./compiler') - , runtime = require('./runtime') - -/** - * Library version. - */ - -exports.version = '0.26.1'; - -/** - * Expose self closing tags. - */ - -exports.selfClosing = require('./self-closing'); - -/** - * Default supported doctypes. - */ - -exports.doctypes = require('./doctypes'); - -/** - * Text filters. - */ - -exports.filters = require('./filters'); - -/** - * Utilities. - */ - -exports.utils = require('./utils'); - -/** - * Expose `Compiler`. - */ - -exports.Compiler = Compiler; - -/** - * Expose `Parser`. - */ - -exports.Parser = Parser; - -/** - * Expose `Lexer`. - */ - -exports.Lexer = Lexer; - -/** - * Nodes. - */ - -exports.nodes = require('./nodes'); - -/** - * Jade runtime helpers. - */ - -exports.runtime = runtime; - -/** - * Template function cache. - */ - -exports.cache = {}; - -/** - * Parse the given `str` of jade and return a function body. - * - * @param {String} str - * @param {Object} options - * @return {String} - * @api private - */ - -function parse(str, options){ - try { - // Parse - var parser = new Parser(str, options.filename, options); - - // Compile - var compiler = new (options.compiler || Compiler)(parser.parse(), options) - , js = compiler.compile(); - - // Debug compiler - if (options.debug) { - console.error('\nCompiled Function:\n\n\033[90m%s\033[0m', js.replace(/^/gm, ' ')); - } - - return '' - + 'var buf = [];\n' - + (options.self - ? 'var self = locals || {};\n' + js - : 'with (locals || {}) {\n' + js + '\n}\n') - + 'return buf.join("");'; - } catch (err) { - parser = parser.context(); - runtime.rethrow(err, parser.filename, parser.lexer.lineno); - } -} - -/** - * Compile a `Function` representation of the given jade `str`. - * - * Options: - * - * - `compileDebug` when `false` debugging code is stripped from the compiled template - * - `client` when `true` the helper functions `escape()` etc will reference `jade.escape()` - * for use with the Jade client-side runtime.js - * - * @param {String} str - * @param {Options} options - * @return {Function} - * @api public - */ - -exports.compile = function(str, options){ - var options = options || {} - , client = options.client - , filename = options.filename - ? JSON.stringify(options.filename) - : 'undefined' - , fn; - - if (options.compileDebug !== false) { - fn = [ - 'var __jade = [{ lineno: 1, filename: ' + filename + ' }];' - , 'try {' - , parse(String(str), options) - , '} catch (err) {' - , ' rethrow(err, __jade[0].filename, __jade[0].lineno);' - , '}' - ].join('\n'); - } else { - fn = parse(String(str), options); - } - - if (client) { - fn = 'attrs = attrs || jade.attrs; escape = escape || jade.escape; rethrow = rethrow || jade.rethrow; merge = merge || jade.merge;\n' + fn; - } - - fn = new Function('locals, attrs, escape, rethrow, merge', fn); - - if (client) return fn; - - return function(locals){ - return fn(locals, runtime.attrs, runtime.escape, runtime.rethrow, runtime.merge); - }; -}; - -/** - * Render the given `str` of jade and invoke - * the callback `fn(err, str)`. - * - * Options: - * - * - `cache` enable template caching - * - `filename` filename required for `include` / `extends` and caching - * - * @param {String} str - * @param {Object|Function} options or fn - * @param {Function} fn - * @api public - */ - -exports.render = function(str, options, fn){ - // swap args - if ('function' == typeof options) { - fn = options, options = {}; - } - - // cache requires .filename - if (options.cache && !options.filename) { - return fn(new Error('the "filename" option is required for caching')); - } - - try { - var path = options.filename; - var tmpl = options.cache - ? exports.cache[path] || (exports.cache[path] = exports.compile(str, options)) - : exports.compile(str, options); - fn(null, tmpl(options)); - } catch (err) { - fn(err); - } -}; - -/** - * Render a Jade file at the given `path` and callback `fn(err, str)`. - * - * @param {String} path - * @param {Object|Function} options or callback - * @param {Function} fn - * @api public - */ - -exports.renderFile = function(path, options, fn){ - var key = path + ':string'; - - if ('function' == typeof options) { - fn = options, options = {}; - } - - try { - options.filename = path; - var str = options.cache - ? exports.cache[key] || (exports.cache[key] = fs.readFileSync(path, 'utf8')) - : fs.readFileSync(path, 'utf8'); - exports.render(str, options, fn); - } catch (err) { - fn(err); - } -}; - -/** - * Express support. - */ - -exports.__express = exports.renderFile; - -}); // module: jade.js - -require.register("lexer.js", function(module, exports, require){ - -/*! - * Jade - Lexer - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Initialize `Lexer` with the given `str`. - * - * Options: - * - * - `colons` allow colons for attr delimiters - * - * @param {String} str - * @param {Object} options - * @api private - */ - -var Lexer = module.exports = function Lexer(str, options) { - options = options || {}; - this.input = str.replace(/\r\n|\r/g, '\n'); - this.colons = options.colons; - this.deferredTokens = []; - this.lastIndents = 0; - this.lineno = 1; - this.stash = []; - this.indentStack = []; - this.indentRe = null; - this.pipeless = false; -}; - -/** - * Lexer prototype. - */ - -Lexer.prototype = { - - /** - * Construct a token with the given `type` and `val`. - * - * @param {String} type - * @param {String} val - * @return {Object} - * @api private - */ - - tok: function(type, val){ - return { - type: type - , line: this.lineno - , val: val - } - }, - - /** - * Consume the given `len` of input. - * - * @param {Number} len - * @api private - */ - - consume: function(len){ - this.input = this.input.substr(len); - }, - - /** - * Scan for `type` with the given `regexp`. - * - * @param {String} type - * @param {RegExp} regexp - * @return {Object} - * @api private - */ - - scan: function(regexp, type){ - var captures; - if (captures = regexp.exec(this.input)) { - this.consume(captures[0].length); - return this.tok(type, captures[1]); - } - }, - - /** - * Defer the given `tok`. - * - * @param {Object} tok - * @api private - */ - - defer: function(tok){ - this.deferredTokens.push(tok); - }, - - /** - * Lookahead `n` tokens. - * - * @param {Number} n - * @return {Object} - * @api private - */ - - lookahead: function(n){ - var fetch = n - this.stash.length; - while (fetch-- > 0) this.stash.push(this.next()); - return this.stash[--n]; - }, - - /** - * Return the indexOf `start` / `end` delimiters. - * - * @param {String} start - * @param {String} end - * @return {Number} - * @api private - */ - - indexOfDelimiters: function(start, end){ - var str = this.input - , nstart = 0 - , nend = 0 - , pos = 0; - for (var i = 0, len = str.length; i < len; ++i) { - if (start == str.charAt(i)) { - ++nstart; - } else if (end == str.charAt(i)) { - if (++nend == nstart) { - pos = i; - break; - } - } - } - return pos; - }, - - /** - * Stashed token. - */ - - stashed: function() { - return this.stash.length - && this.stash.shift(); - }, - - /** - * Deferred token. - */ - - deferred: function() { - return this.deferredTokens.length - && this.deferredTokens.shift(); - }, - - /** - * end-of-source. - */ - - eos: function() { - if (this.input.length) return; - if (this.indentStack.length) { - this.indentStack.shift(); - return this.tok('outdent'); - } else { - return this.tok('eos'); - } - }, - - /** - * Blank line. - */ - - blank: function() { - var captures; - if (captures = /^\n *\n/.exec(this.input)) { - this.consume(captures[0].length - 1); - if (this.pipeless) return this.tok('text', ''); - return this.next(); - } - }, - - /** - * Comment. - */ - - comment: function() { - var captures; - if (captures = /^ *\/\/(-)?([^\n]*)/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('comment', captures[2]); - tok.buffer = '-' != captures[1]; - return tok; - } - }, - - /** - * Interpolated tag. - */ - - interpolation: function() { - var captures; - if (captures = /^#\{(.*?)\}/.exec(this.input)) { - this.consume(captures[0].length); - return this.tok('interpolation', captures[1]); - } - }, - - /** - * Tag. - */ - - tag: function() { - var captures; - if (captures = /^(\w[-:\w]*)(\/?)/.exec(this.input)) { - this.consume(captures[0].length); - var tok, name = captures[1]; - if (':' == name[name.length - 1]) { - name = name.slice(0, -1); - tok = this.tok('tag', name); - this.defer(this.tok(':')); - while (' ' == this.input[0]) this.input = this.input.substr(1); - } else { - tok = this.tok('tag', name); - } - tok.selfClosing = !! captures[2]; - return tok; - } - }, - - /** - * Filter. - */ - - filter: function() { - return this.scan(/^:(\w+)/, 'filter'); - }, - - /** - * Doctype. - */ - - doctype: function() { - return this.scan(/^(?:!!!|doctype) *([^\n]+)?/, 'doctype'); - }, - - /** - * Id. - */ - - id: function() { - return this.scan(/^#([\w-]+)/, 'id'); - }, - - /** - * Class. - */ - - className: function() { - return this.scan(/^\.([\w-]+)/, 'class'); - }, - - /** - * Text. - */ - - text: function() { - return this.scan(/^(?:\| ?| ?)?([^\n]+)/, 'text'); - }, - - /** - * Extends. - */ - - "extends": function() { - return this.scan(/^extends? +([^\n]+)/, 'extends'); - }, - - /** - * Block prepend. - */ - - prepend: function() { - var captures; - if (captures = /^prepend +([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var mode = 'prepend' - , name = captures[1] - , tok = this.tok('block', name); - tok.mode = mode; - return tok; - } - }, - - /** - * Block append. - */ - - append: function() { - var captures; - if (captures = /^append +([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var mode = 'append' - , name = captures[1] - , tok = this.tok('block', name); - tok.mode = mode; - return tok; - } - }, - - /** - * Block. - */ - - block: function() { - var captures; - if (captures = /^block\b *(?:(prepend|append) +)?([^\n]*)/.exec(this.input)) { - this.consume(captures[0].length); - var mode = captures[1] || 'replace' - , name = captures[2] - , tok = this.tok('block', name); - - tok.mode = mode; - return tok; - } - }, - - /** - * Yield. - */ - - yield: function() { - return this.scan(/^yield */, 'yield'); - }, - - /** - * Include. - */ - - include: function() { - return this.scan(/^include +([^\n]+)/, 'include'); - }, - - /** - * Case. - */ - - "case": function() { - return this.scan(/^case +([^\n]+)/, 'case'); - }, - - /** - * When. - */ - - when: function() { - return this.scan(/^when +([^:\n]+)/, 'when'); - }, - - /** - * Default. - */ - - "default": function() { - return this.scan(/^default */, 'default'); - }, - - /** - * Assignment. - */ - - assignment: function() { - var captures; - if (captures = /^(\w+) += *([^;\n]+)( *;? *)/.exec(this.input)) { - this.consume(captures[0].length); - var name = captures[1] - , val = captures[2]; - return this.tok('code', 'var ' + name + ' = (' + val + ');'); - } - }, - - /** - * Call mixin. - */ - - call: function(){ - var captures; - if (captures = /^\+([-\w]+)/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('call', captures[1]); - - // Check for args (not attributes) - if (captures = /^ *\((.*?)\)/.exec(this.input)) { - if (!/^ *[-\w]+ *=/.test(captures[1])) { - this.consume(captures[0].length); - tok.args = captures[1]; - } - } - - return tok; - } - }, - - /** - * Mixin. - */ - - mixin: function(){ - var captures; - if (captures = /^mixin +([-\w]+)(?: *\((.*)\))?/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('mixin', captures[1]); - tok.args = captures[2]; - return tok; - } - }, - - /** - * Conditional. - */ - - conditional: function() { - var captures; - if (captures = /^(if|unless|else if|else)\b([^\n]*)/.exec(this.input)) { - this.consume(captures[0].length); - var type = captures[1] - , js = captures[2]; - - switch (type) { - case 'if': js = 'if (' + js + ')'; break; - case 'unless': js = 'if (!(' + js + '))'; break; - case 'else if': js = 'else if (' + js + ')'; break; - case 'else': js = 'else'; break; - } - - return this.tok('code', js); - } - }, - - /** - * While. - */ - - "while": function() { - var captures; - if (captures = /^while +([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - return this.tok('code', 'while (' + captures[1] + ')'); - } - }, - - /** - * Each. - */ - - each: function() { - var captures; - if (captures = /^(?:- *)?(?:each|for) +(\w+)(?: *, *(\w+))? * in *([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('each', captures[1]); - tok.key = captures[2] || '$index'; - tok.code = captures[3]; - return tok; - } - }, - - /** - * Code. - */ - - code: function() { - var captures; - if (captures = /^(!?=|-)([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var flags = captures[1]; - captures[1] = captures[2]; - var tok = this.tok('code', captures[1]); - tok.escape = flags[0] === '='; - tok.buffer = flags[0] === '=' || flags[1] === '='; - return tok; - } - }, - - /** - * Attributes. - */ - - attrs: function() { - if ('(' == this.input.charAt(0)) { - var index = this.indexOfDelimiters('(', ')') - , str = this.input.substr(1, index-1) - , tok = this.tok('attrs') - , len = str.length - , colons = this.colons - , states = ['key'] - , escapedAttr - , key = '' - , val = '' - , quote - , c - , p; - - function state(){ - return states[states.length - 1]; - } - - function interpolate(attr) { - return attr.replace(/#\{([^}]+)\}/g, function(_, expr){ - return quote + " + (" + expr + ") + " + quote; - }); - } - - this.consume(index + 1); - tok.attrs = {}; - tok.escaped = {}; - - function parse(c) { - var real = c; - // TODO: remove when people fix ":" - if (colons && ':' == c) c = '='; - switch (c) { - case ',': - case '\n': - switch (state()) { - case 'expr': - case 'array': - case 'string': - case 'object': - val += c; - break; - default: - states.push('key'); - val = val.trim(); - key = key.trim(); - if ('' == key) return; - key = key.replace(/^['"]|['"]$/g, '').replace('!', ''); - tok.escaped[key] = escapedAttr; - tok.attrs[key] = '' == val - ? true - : interpolate(val); - key = val = ''; - } - break; - case '=': - switch (state()) { - case 'key char': - key += real; - break; - case 'val': - case 'expr': - case 'array': - case 'string': - case 'object': - val += real; - break; - default: - escapedAttr = '!' != p; - states.push('val'); - } - break; - case '(': - if ('val' == state() - || 'expr' == state()) states.push('expr'); - val += c; - break; - case ')': - if ('expr' == state() - || 'val' == state()) states.pop(); - val += c; - break; - case '{': - if ('val' == state()) states.push('object'); - val += c; - break; - case '}': - if ('object' == state()) states.pop(); - val += c; - break; - case '[': - if ('val' == state()) states.push('array'); - val += c; - break; - case ']': - if ('array' == state()) states.pop(); - val += c; - break; - case '"': - case "'": - switch (state()) { - case 'key': - states.push('key char'); - break; - case 'key char': - states.pop(); - break; - case 'string': - if (c == quote) states.pop(); - val += c; - break; - default: - states.push('string'); - val += c; - quote = c; - } - break; - case '': - break; - default: - switch (state()) { - case 'key': - case 'key char': - key += c; - break; - default: - val += c; - } - } - p = c; - } - - for (var i = 0; i < len; ++i) { - parse(str.charAt(i)); - } - - parse(','); - - if ('/' == this.input.charAt(0)) { - this.consume(1); - tok.selfClosing = true; - } - - return tok; - } - }, - - /** - * Indent | Outdent | Newline. - */ - - indent: function() { - var captures, re; - - // established regexp - if (this.indentRe) { - captures = this.indentRe.exec(this.input); - // determine regexp - } else { - // tabs - re = /^\n(\t*) */; - captures = re.exec(this.input); - - // spaces - if (captures && !captures[1].length) { - re = /^\n( *)/; - captures = re.exec(this.input); - } - - // established - if (captures && captures[1].length) this.indentRe = re; - } - - if (captures) { - var tok - , indents = captures[1].length; - - ++this.lineno; - this.consume(indents + 1); - - if (' ' == this.input[0] || '\t' == this.input[0]) { - throw new Error('Invalid indentation, you can use tabs or spaces but not both'); - } - - // blank line - if ('\n' == this.input[0]) return this.tok('newline'); - - // outdent - if (this.indentStack.length && indents < this.indentStack[0]) { - while (this.indentStack.length && this.indentStack[0] > indents) { - this.stash.push(this.tok('outdent')); - this.indentStack.shift(); - } - tok = this.stash.pop(); - // indent - } else if (indents && indents != this.indentStack[0]) { - this.indentStack.unshift(indents); - tok = this.tok('indent', indents); - // newline - } else { - tok = this.tok('newline'); - } - - return tok; - } - }, - - /** - * Pipe-less text consumed only when - * pipeless is true; - */ - - pipelessText: function() { - if (this.pipeless) { - if ('\n' == this.input[0]) return; - var i = this.input.indexOf('\n'); - if (-1 == i) i = this.input.length; - var str = this.input.substr(0, i); - this.consume(str.length); - return this.tok('text', str); - } - }, - - /** - * ':' - */ - - colon: function() { - return this.scan(/^: */, ':'); - }, - - /** - * Return the next token object, or those - * previously stashed by lookahead. - * - * @return {Object} - * @api private - */ - - advance: function(){ - return this.stashed() - || this.next(); - }, - - /** - * Return the next token object. - * - * @return {Object} - * @api private - */ - - next: function() { - return this.deferred() - || this.blank() - || this.eos() - || this.pipelessText() - || this.yield() - || this.doctype() - || this.interpolation() - || this["case"]() - || this.when() - || this["default"]() - || this["extends"]() - || this.append() - || this.prepend() - || this.block() - || this.include() - || this.mixin() - || this.call() - || this.conditional() - || this.each() - || this["while"]() - || this.assignment() - || this.tag() - || this.filter() - || this.code() - || this.id() - || this.className() - || this.attrs() - || this.indent() - || this.comment() - || this.colon() - || this.text(); - } -}; - -}); // module: lexer.js - -require.register("nodes/attrs.js", function(module, exports, require){ - -/*! - * Jade - nodes - Attrs - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'), - Block = require('./block'); - -/** - * Initialize a `Attrs` node. - * - * @api public - */ - -var Attrs = module.exports = function Attrs() { - this.attrs = []; -}; - -/** - * Inherit from `Node`. - */ - -Attrs.prototype = new Node; -Attrs.prototype.constructor = Attrs; - - -/** - * Set attribute `name` to `val`, keep in mind these become - * part of a raw js object literal, so to quote a value you must - * '"quote me"', otherwise or example 'user.name' is literal JavaScript. - * - * @param {String} name - * @param {String} val - * @param {Boolean} escaped - * @return {Tag} for chaining - * @api public - */ - -Attrs.prototype.setAttribute = function(name, val, escaped){ - this.attrs.push({ name: name, val: val, escaped: escaped }); - return this; -}; - -/** - * Remove attribute `name` when present. - * - * @param {String} name - * @api public - */ - -Attrs.prototype.removeAttribute = function(name){ - for (var i = 0, len = this.attrs.length; i < len; ++i) { - if (this.attrs[i] && this.attrs[i].name == name) { - delete this.attrs[i]; - } - } -}; - -/** - * Get attribute value by `name`. - * - * @param {String} name - * @return {String} - * @api public - */ - -Attrs.prototype.getAttribute = function(name){ - for (var i = 0, len = this.attrs.length; i < len; ++i) { - if (this.attrs[i] && this.attrs[i].name == name) { - return this.attrs[i].val; - } - } -}; - -}); // module: nodes/attrs.js - -require.register("nodes/block-comment.js", function(module, exports, require){ - -/*! - * Jade - nodes - BlockComment - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `BlockComment` with the given `block`. - * - * @param {String} val - * @param {Block} block - * @param {Boolean} buffer - * @api public - */ - -var BlockComment = module.exports = function BlockComment(val, block, buffer) { - this.block = block; - this.val = val; - this.buffer = buffer; -}; - -/** - * Inherit from `Node`. - */ - -BlockComment.prototype = new Node; -BlockComment.prototype.constructor = BlockComment; - -}); // module: nodes/block-comment.js - -require.register("nodes/block.js", function(module, exports, require){ - -/*! - * Jade - nodes - Block - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a new `Block` with an optional `node`. - * - * @param {Node} node - * @api public - */ - -var Block = module.exports = function Block(node){ - this.nodes = []; - if (node) this.push(node); -}; - -/** - * Inherit from `Node`. - */ - -Block.prototype = new Node; -Block.prototype.constructor = Block; - - -/** - * Block flag. - */ - -Block.prototype.isBlock = true; - -/** - * Replace the nodes in `other` with the nodes - * in `this` block. - * - * @param {Block} other - * @api private - */ - -Block.prototype.replace = function(other){ - other.nodes = this.nodes; -}; - -/** - * Pust the given `node`. - * - * @param {Node} node - * @return {Number} - * @api public - */ - -Block.prototype.push = function(node){ - return this.nodes.push(node); -}; - -/** - * Check if this block is empty. - * - * @return {Boolean} - * @api public - */ - -Block.prototype.isEmpty = function(){ - return 0 == this.nodes.length; -}; - -/** - * Unshift the given `node`. - * - * @param {Node} node - * @return {Number} - * @api public - */ - -Block.prototype.unshift = function(node){ - return this.nodes.unshift(node); -}; - -/** - * Return the "last" block, or the first `yield` node. - * - * @return {Block} - * @api private - */ - -Block.prototype.includeBlock = function(){ - var ret = this - , node; - - for (var i = 0, len = this.nodes.length; i < len; ++i) { - node = this.nodes[i]; - if (node.yield) return node; - else if (node.textOnly) continue; - else if (node.includeBlock) ret = node.includeBlock(); - else if (node.block && !node.block.isEmpty()) ret = node.block.includeBlock(); - } - - return ret; -}; - -/** - * Return a clone of this block. - * - * @return {Block} - * @api private - */ - -Block.prototype.clone = function(){ - var clone = new Block; - for (var i = 0, len = this.nodes.length; i < len; ++i) { - clone.push(this.nodes[i].clone()); - } - return clone; -}; - - -}); // module: nodes/block.js - -require.register("nodes/case.js", function(module, exports, require){ - -/*! - * Jade - nodes - Case - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a new `Case` with `expr`. - * - * @param {String} expr - * @api public - */ - -var Case = exports = module.exports = function Case(expr, block){ - this.expr = expr; - this.block = block; -}; - -/** - * Inherit from `Node`. - */ - -Case.prototype = new Node; -Case.prototype.constructor = Case; - - -var When = exports.When = function When(expr, block){ - this.expr = expr; - this.block = block; - this.debug = false; -}; - -/** - * Inherit from `Node`. - */ - -When.prototype = new Node; -When.prototype.constructor = When; - - - -}); // module: nodes/case.js - -require.register("nodes/code.js", function(module, exports, require){ - -/*! - * Jade - nodes - Code - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Code` node with the given code `val`. - * Code may also be optionally buffered and escaped. - * - * @param {String} val - * @param {Boolean} buffer - * @param {Boolean} escape - * @api public - */ - -var Code = module.exports = function Code(val, buffer, escape) { - this.val = val; - this.buffer = buffer; - this.escape = escape; - if (val.match(/^ *else/)) this.debug = false; -}; - -/** - * Inherit from `Node`. - */ - -Code.prototype = new Node; -Code.prototype.constructor = Code; - -}); // module: nodes/code.js - -require.register("nodes/comment.js", function(module, exports, require){ - -/*! - * Jade - nodes - Comment - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Comment` with the given `val`, optionally `buffer`, - * otherwise the comment may render in the output. - * - * @param {String} val - * @param {Boolean} buffer - * @api public - */ - -var Comment = module.exports = function Comment(val, buffer) { - this.val = val; - this.buffer = buffer; -}; - -/** - * Inherit from `Node`. - */ - -Comment.prototype = new Node; -Comment.prototype.constructor = Comment; - -}); // module: nodes/comment.js - -require.register("nodes/doctype.js", function(module, exports, require){ - -/*! - * Jade - nodes - Doctype - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Doctype` with the given `val`. - * - * @param {String} val - * @api public - */ - -var Doctype = module.exports = function Doctype(val) { - this.val = val; -}; - -/** - * Inherit from `Node`. - */ - -Doctype.prototype = new Node; -Doctype.prototype.constructor = Doctype; - -}); // module: nodes/doctype.js - -require.register("nodes/each.js", function(module, exports, require){ - -/*! - * Jade - nodes - Each - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize an `Each` node, representing iteration - * - * @param {String} obj - * @param {String} val - * @param {String} key - * @param {Block} block - * @api public - */ - -var Each = module.exports = function Each(obj, val, key, block) { - this.obj = obj; - this.val = val; - this.key = key; - this.block = block; -}; - -/** - * Inherit from `Node`. - */ - -Each.prototype = new Node; -Each.prototype.constructor = Each; - -}); // module: nodes/each.js - -require.register("nodes/filter.js", function(module, exports, require){ - -/*! - * Jade - nodes - Filter - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node') - , Block = require('./block'); - -/** - * Initialize a `Filter` node with the given - * filter `name` and `block`. - * - * @param {String} name - * @param {Block|Node} block - * @api public - */ - -var Filter = module.exports = function Filter(name, block, attrs) { - this.name = name; - this.block = block; - this.attrs = attrs; - this.isASTFilter = !block.nodes.every(function(node){ return node.isText }); -}; - -/** - * Inherit from `Node`. - */ - -Filter.prototype = new Node; -Filter.prototype.constructor = Filter; - -}); // module: nodes/filter.js - -require.register("nodes/index.js", function(module, exports, require){ - -/*! - * Jade - nodes - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -exports.Node = require('./node'); -exports.Tag = require('./tag'); -exports.Code = require('./code'); -exports.Each = require('./each'); -exports.Case = require('./case'); -exports.Text = require('./text'); -exports.Block = require('./block'); -exports.Mixin = require('./mixin'); -exports.Filter = require('./filter'); -exports.Comment = require('./comment'); -exports.Literal = require('./literal'); -exports.BlockComment = require('./block-comment'); -exports.Doctype = require('./doctype'); - -}); // module: nodes/index.js - -require.register("nodes/literal.js", function(module, exports, require){ - -/*! - * Jade - nodes - Literal - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Literal` node with the given `str. - * - * @param {String} str - * @api public - */ - -var Literal = module.exports = function Literal(str) { - this.str = str - .replace(/\\/g, "\\\\") - .replace(/\n|\r\n/g, "\\n") - .replace(/'/g, "\\'"); -}; - -/** - * Inherit from `Node`. - */ - -Literal.prototype = new Node; -Literal.prototype.constructor = Literal; - - -}); // module: nodes/literal.js - -require.register("nodes/mixin.js", function(module, exports, require){ - -/*! - * Jade - nodes - Mixin - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Attrs = require('./attrs'); - -/** - * Initialize a new `Mixin` with `name` and `block`. - * - * @param {String} name - * @param {String} args - * @param {Block} block - * @api public - */ - -var Mixin = module.exports = function Mixin(name, args, block, call){ - this.name = name; - this.args = args; - this.block = block; - this.attrs = []; - this.call = call; -}; - -/** - * Inherit from `Attrs`. - */ - -Mixin.prototype = new Attrs; -Mixin.prototype.constructor = Mixin; - - - -}); // module: nodes/mixin.js - -require.register("nodes/node.js", function(module, exports, require){ - -/*! - * Jade - nodes - Node - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Initialize a `Node`. - * - * @api public - */ - -var Node = module.exports = function Node(){}; - -/** - * Clone this node (return itself) - * - * @return {Node} - * @api private - */ - -Node.prototype.clone = function(){ - return this; -}; - -}); // module: nodes/node.js - -require.register("nodes/tag.js", function(module, exports, require){ - -/*! - * Jade - nodes - Tag - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Attrs = require('./attrs'), - Block = require('./block'), - inlineTags = require('../inline-tags'); - -/** - * Initialize a `Tag` node with the given tag `name` and optional `block`. - * - * @param {String} name - * @param {Block} block - * @api public - */ - -var Tag = module.exports = function Tag(name, block) { - this.name = name; - this.attrs = []; - this.block = block || new Block; -}; - -/** - * Inherit from `Attrs`. - */ - -Tag.prototype = new Attrs; -Tag.prototype.constructor = Tag; - - -/** - * Clone this tag. - * - * @return {Tag} - * @api private - */ - -Tag.prototype.clone = function(){ - var clone = new Tag(this.name, this.block.clone()); - clone.line = this.line; - clone.attrs = this.attrs; - clone.textOnly = this.textOnly; - return clone; -}; - -/** - * Check if this tag is an inline tag. - * - * @return {Boolean} - * @api private - */ - -Tag.prototype.isInline = function(){ - return ~inlineTags.indexOf(this.name); -}; - -/** - * Check if this tag's contents can be inlined. Used for pretty printing. - * - * @return {Boolean} - * @api private - */ - -Tag.prototype.canInline = function(){ - var nodes = this.block.nodes; - - function isInline(node){ - // Recurse if the node is a block - if (node.isBlock) return node.nodes.every(isInline); - return node.isText || (node.isInline && node.isInline()); - } - - // Empty tag - if (!nodes.length) return true; - - // Text-only or inline-only tag - if (1 == nodes.length) return isInline(nodes[0]); - - // Multi-line inline-only tag - if (this.block.nodes.every(isInline)) { - for (var i = 1, len = nodes.length; i < len; ++i) { - if (nodes[i-1].isText && nodes[i].isText) - return false; - } - return true; - } - - // Mixed tag - return false; -}; -}); // module: nodes/tag.js - -require.register("nodes/text.js", function(module, exports, require){ - -/*! - * Jade - nodes - Text - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Text` node with optional `line`. - * - * @param {String} line - * @api public - */ - -var Text = module.exports = function Text(line) { - this.val = ''; - if ('string' == typeof line) this.val = line; -}; - -/** - * Inherit from `Node`. - */ - -Text.prototype = new Node; -Text.prototype.constructor = Text; - - -/** - * Flag as text. - */ - -Text.prototype.isText = true; -}); // module: nodes/text.js - -require.register("parser.js", function(module, exports, require){ - -/*! - * Jade - Parser - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Lexer = require('./lexer') - , nodes = require('./nodes'); - -/** - * Initialize `Parser` with the given input `str` and `filename`. - * - * @param {String} str - * @param {String} filename - * @param {Object} options - * @api public - */ - -var Parser = exports = module.exports = function Parser(str, filename, options){ - this.input = str; - this.lexer = new Lexer(str, options); - this.filename = filename; - this.blocks = {}; - this.mixins = {}; - this.options = options; - this.contexts = [this]; -}; - -/** - * Tags that may not contain tags. - */ - -var textOnly = exports.textOnly = ['script', 'style']; - -/** - * Parser prototype. - */ - -Parser.prototype = { - - /** - * Push `parser` onto the context stack, - * or pop and return a `Parser`. - */ - - context: function(parser){ - if (parser) { - this.contexts.push(parser); - } else { - return this.contexts.pop(); - } - }, - - /** - * Return the next token object. - * - * @return {Object} - * @api private - */ - - advance: function(){ - return this.lexer.advance(); - }, - - /** - * Skip `n` tokens. - * - * @param {Number} n - * @api private - */ - - skip: function(n){ - while (n--) this.advance(); - }, - - /** - * Single token lookahead. - * - * @return {Object} - * @api private - */ - - peek: function() { - return this.lookahead(1); - }, - - /** - * Return lexer lineno. - * - * @return {Number} - * @api private - */ - - line: function() { - return this.lexer.lineno; - }, - - /** - * `n` token lookahead. - * - * @param {Number} n - * @return {Object} - * @api private - */ - - lookahead: function(n){ - return this.lexer.lookahead(n); - }, - - /** - * Parse input returning a string of js for evaluation. - * - * @return {String} - * @api public - */ - - parse: function(){ - var block = new nodes.Block, parser; - block.line = this.line(); - - while ('eos' != this.peek().type) { - if ('newline' == this.peek().type) { - this.advance(); - } else { - block.push(this.parseExpr()); - } - } - - if (parser = this.extending) { - this.context(parser); - var ast = parser.parse(); - this.context(); - // hoist mixins - for (var name in this.mixins) - ast.unshift(this.mixins[name]); - return ast; - } - - return block; - }, - - /** - * Expect the given type, or throw an exception. - * - * @param {String} type - * @api private - */ - - expect: function(type){ - if (this.peek().type === type) { - return this.advance(); - } else { - throw new Error('expected "' + type + '", but got "' + this.peek().type + '"'); - } - }, - - /** - * Accept the given `type`. - * - * @param {String} type - * @api private - */ - - accept: function(type){ - if (this.peek().type === type) { - return this.advance(); - } - }, - - /** - * tag - * | doctype - * | mixin - * | include - * | filter - * | comment - * | text - * | each - * | code - * | yield - * | id - * | class - * | interpolation - */ - - parseExpr: function(){ - switch (this.peek().type) { - case 'tag': - return this.parseTag(); - case 'mixin': - return this.parseMixin(); - case 'block': - return this.parseBlock(); - case 'case': - return this.parseCase(); - case 'when': - return this.parseWhen(); - case 'default': - return this.parseDefault(); - case 'extends': - return this.parseExtends(); - case 'include': - return this.parseInclude(); - case 'doctype': - return this.parseDoctype(); - case 'filter': - return this.parseFilter(); - case 'comment': - return this.parseComment(); - case 'text': - return this.parseText(); - case 'each': - return this.parseEach(); - case 'code': - return this.parseCode(); - case 'call': - return this.parseCall(); - case 'interpolation': - return this.parseInterpolation(); - case 'yield': - this.advance(); - var block = new nodes.Block; - block.yield = true; - return block; - case 'id': - case 'class': - var tok = this.advance(); - this.lexer.defer(this.lexer.tok('tag', 'div')); - this.lexer.defer(tok); - return this.parseExpr(); - default: - throw new Error('unexpected token "' + this.peek().type + '"'); - } - }, - - /** - * Text - */ - - parseText: function(){ - var tok = this.expect('text') - , node = new nodes.Text(tok.val); - node.line = this.line(); - return node; - }, - - /** - * ':' expr - * | block - */ - - parseBlockExpansion: function(){ - if (':' == this.peek().type) { - this.advance(); - return new nodes.Block(this.parseExpr()); - } else { - return this.block(); - } - }, - - /** - * case - */ - - parseCase: function(){ - var val = this.expect('case').val - , node = new nodes.Case(val); - node.line = this.line(); - node.block = this.block(); - return node; - }, - - /** - * when - */ - - parseWhen: function(){ - var val = this.expect('when').val - return new nodes.Case.When(val, this.parseBlockExpansion()); - }, - - /** - * default - */ - - parseDefault: function(){ - this.expect('default'); - return new nodes.Case.When('default', this.parseBlockExpansion()); - }, - - /** - * code - */ - - parseCode: function(){ - var tok = this.expect('code') - , node = new nodes.Code(tok.val, tok.buffer, tok.escape) - , block - , i = 1; - node.line = this.line(); - while (this.lookahead(i) && 'newline' == this.lookahead(i).type) ++i; - block = 'indent' == this.lookahead(i).type; - if (block) { - this.skip(i-1); - node.block = this.block(); - } - return node; - }, - - /** - * comment - */ - - parseComment: function(){ - var tok = this.expect('comment') - , node; - - if ('indent' == this.peek().type) { - node = new nodes.BlockComment(tok.val, this.block(), tok.buffer); - } else { - node = new nodes.Comment(tok.val, tok.buffer); - } - - node.line = this.line(); - return node; - }, - - /** - * doctype - */ - - parseDoctype: function(){ - var tok = this.expect('doctype') - , node = new nodes.Doctype(tok.val); - node.line = this.line(); - return node; - }, - - /** - * filter attrs? text-block - */ - - parseFilter: function(){ - var block - , tok = this.expect('filter') - , attrs = this.accept('attrs'); - - this.lexer.pipeless = true; - block = this.parseTextBlock(); - this.lexer.pipeless = false; - - var node = new nodes.Filter(tok.val, block, attrs && attrs.attrs); - node.line = this.line(); - return node; - }, - - /** - * tag ':' attrs? block - */ - - parseASTFilter: function(){ - var block - , tok = this.expect('tag') - , attrs = this.accept('attrs'); - - this.expect(':'); - block = this.block(); - - var node = new nodes.Filter(tok.val, block, attrs && attrs.attrs); - node.line = this.line(); - return node; - }, - - /** - * each block - */ - - parseEach: function(){ - var tok = this.expect('each') - , node = new nodes.Each(tok.code, tok.val, tok.key); - node.line = this.line(); - node.block = this.block(); - return node; - }, - - /** - * 'extends' name - */ - - parseExtends: function(){ - var path = require('path') - , fs = require('fs') - , dirname = path.dirname - , basename = path.basename - , join = path.join; - - if (!this.filename) - throw new Error('the "filename" option is required to extend templates'); - - var path = this.expect('extends').val.trim() - , dir = dirname(this.filename); - - var path = join(dir, path + '.jade') - , str = fs.readFileSync(path, 'utf8') - , parser = new Parser(str, path, this.options); - - parser.blocks = this.blocks; - parser.contexts = this.contexts; - this.extending = parser; - - // TODO: null node - return new nodes.Literal(''); - }, - - /** - * 'block' name block - */ - - parseBlock: function(){ - var block = this.expect('block') - , mode = block.mode - , name = block.val.trim(); - - block = 'indent' == this.peek().type - ? this.block() - : new nodes.Block(new nodes.Literal('')); - - var prev = this.blocks[name]; - - if (prev) { - switch (prev.mode) { - case 'append': - block.nodes = block.nodes.concat(prev.nodes); - prev = block; - break; - case 'prepend': - block.nodes = prev.nodes.concat(block.nodes); - prev = block; - break; - } - } - - block.mode = mode; - return this.blocks[name] = prev || block; - }, - - /** - * include block? - */ - - parseInclude: function(){ - var path = require('path') - , fs = require('fs') - , dirname = path.dirname - , basename = path.basename - , join = path.join; - - var path = this.expect('include').val.trim() - , dir = dirname(this.filename); - - if (!this.filename) - throw new Error('the "filename" option is required to use includes'); - - // no extension - if (!~basename(path).indexOf('.')) { - path += '.jade'; - } - - // non-jade - if ('.jade' != path.substr(-5)) { - var path = join(dir, path) - , str = fs.readFileSync(path, 'utf8'); - return new nodes.Literal(str); - } - - var path = join(dir, path) - , str = fs.readFileSync(path, 'utf8') - , parser = new Parser(str, path, this.options); - parser.blocks = this.blocks; - parser.mixins = this.mixins; - - this.context(parser); - var ast = parser.parse(); - this.context(); - ast.filename = path; - - if ('indent' == this.peek().type) { - ast.includeBlock().push(this.block()); - } - - return ast; - }, - - /** - * call ident block - */ - - parseCall: function(){ - var tok = this.expect('call') - , name = tok.val - , args = tok.args - , mixin = new nodes.Mixin(name, args, new nodes.Block, true); - - this.tag(mixin); - if (mixin.block.isEmpty()) mixin.block = null; - return mixin; - }, - - /** - * mixin block - */ - - parseMixin: function(){ - var tok = this.expect('mixin') - , name = tok.val - , args = tok.args - , mixin; - - // definition - if ('indent' == this.peek().type) { - mixin = new nodes.Mixin(name, args, this.block(), false); - this.mixins[name] = mixin; - return mixin; - // call - } else { - return new nodes.Mixin(name, args, null, true); - } - }, - - /** - * indent (text | newline)* outdent - */ - - parseTextBlock: function(){ - var block = new nodes.Block; - block.line = this.line(); - var spaces = this.expect('indent').val; - if (null == this._spaces) this._spaces = spaces; - var indent = Array(spaces - this._spaces + 1).join(' '); - while ('outdent' != this.peek().type) { - switch (this.peek().type) { - case 'newline': - this.advance(); - break; - case 'indent': - this.parseTextBlock().nodes.forEach(function(node){ - block.push(node); - }); - break; - default: - var text = new nodes.Text(indent + this.advance().val); - text.line = this.line(); - block.push(text); - } - } - - if (spaces == this._spaces) this._spaces = null; - this.expect('outdent'); - return block; - }, - - /** - * indent expr* outdent - */ - - block: function(){ - var block = new nodes.Block; - block.line = this.line(); - this.expect('indent'); - while ('outdent' != this.peek().type) { - if ('newline' == this.peek().type) { - this.advance(); - } else { - block.push(this.parseExpr()); - } - } - this.expect('outdent'); - return block; - }, - - /** - * interpolation (attrs | class | id)* (text | code | ':')? newline* block? - */ - - parseInterpolation: function(){ - var tok = this.advance(); - var tag = new nodes.Tag(tok.val); - tag.buffer = true; - return this.tag(tag); - }, - - /** - * tag (attrs | class | id)* (text | code | ':')? newline* block? - */ - - parseTag: function(){ - // ast-filter look-ahead - var i = 2; - if ('attrs' == this.lookahead(i).type) ++i; - if (':' == this.lookahead(i).type) { - if ('indent' == this.lookahead(++i).type) { - return this.parseASTFilter(); - } - } - - var tok = this.advance() - , tag = new nodes.Tag(tok.val); - - tag.selfClosing = tok.selfClosing; - - return this.tag(tag); - }, - - /** - * Parse tag. - */ - - tag: function(tag){ - var dot; - - tag.line = this.line(); - - // (attrs | class | id)* - out: - while (true) { - switch (this.peek().type) { - case 'id': - case 'class': - var tok = this.advance(); - tag.setAttribute(tok.type, "'" + tok.val + "'"); - continue; - case 'attrs': - var tok = this.advance() - , obj = tok.attrs - , escaped = tok.escaped - , names = Object.keys(obj); - - if (tok.selfClosing) tag.selfClosing = true; - - for (var i = 0, len = names.length; i < len; ++i) { - var name = names[i] - , val = obj[name]; - tag.setAttribute(name, val, escaped[name]); - } - continue; - default: - break out; - } - } - - // check immediate '.' - if ('.' == this.peek().val) { - dot = tag.textOnly = true; - this.advance(); - } - - // (text | code | ':')? - switch (this.peek().type) { - case 'text': - tag.block.push(this.parseText()); - break; - case 'code': - tag.code = this.parseCode(); - break; - case ':': - this.advance(); - tag.block = new nodes.Block; - tag.block.push(this.parseExpr()); - break; - } - - // newline* - while ('newline' == this.peek().type) this.advance(); - - tag.textOnly = tag.textOnly || ~textOnly.indexOf(tag.name); - - // script special-case - if ('script' == tag.name) { - var type = tag.getAttribute('type'); - if (!dot && type && 'text/javascript' != type.replace(/^['"]|['"]$/g, '')) { - tag.textOnly = false; - } - } - - // block? - if ('indent' == this.peek().type) { - if (tag.textOnly) { - this.lexer.pipeless = true; - tag.block = this.parseTextBlock(); - this.lexer.pipeless = false; - } else { - var block = this.block(); - if (tag.block) { - for (var i = 0, len = block.nodes.length; i < len; ++i) { - tag.block.push(block.nodes[i]); - } - } else { - tag.block = block; - } - } - } - - return tag; - } -}; - -}); // module: parser.js - -require.register("runtime.js", function(module, exports, require){ - -/*! - * Jade - runtime - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Lame Array.isArray() polyfill for now. - */ - -if (!Array.isArray) { - Array.isArray = function(arr){ - return '[object Array]' == Object.prototype.toString.call(arr); - }; -} - -/** - * Lame Object.keys() polyfill for now. - */ - -if (!Object.keys) { - Object.keys = function(obj){ - var arr = []; - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - arr.push(key); - } - } - return arr; - } -} - -/** - * Merge two attribute objects giving precedence - * to values in object `b`. Classes are special-cased - * allowing for arrays and merging/joining appropriately - * resulting in a string. - * - * @param {Object} a - * @param {Object} b - * @return {Object} a - * @api private - */ - -exports.merge = function merge(a, b) { - var ac = a['class']; - var bc = b['class']; - - if (ac || bc) { - ac = ac || []; - bc = bc || []; - if (!Array.isArray(ac)) ac = [ac]; - if (!Array.isArray(bc)) bc = [bc]; - ac = ac.filter(nulls); - bc = bc.filter(nulls); - a['class'] = ac.concat(bc).join(' '); - } - - for (var key in b) { - if (key != 'class') { - a[key] = b[key]; - } - } - - return a; -}; - -/** - * Filter null `val`s. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - -function nulls(val) { - return val != null; -} - -/** - * Render the given attributes object. - * - * @param {Object} obj - * @param {Object} escaped - * @return {String} - * @api private - */ - -exports.attrs = function attrs(obj, escaped){ - var buf = [] - , terse = obj.terse; - - delete obj.terse; - var keys = Object.keys(obj) - , len = keys.length; - - if (len) { - buf.push(''); - for (var i = 0; i < len; ++i) { - var key = keys[i] - , val = obj[key]; - - if ('boolean' == typeof val || null == val) { - if (val) { - terse - ? buf.push(key) - : buf.push(key + '="' + key + '"'); - } - } else if (0 == key.indexOf('data') && 'string' != typeof val) { - buf.push(key + "='" + JSON.stringify(val) + "'"); - } else if ('class' == key && Array.isArray(val)) { - buf.push(key + '="' + exports.escape(val.join(' ')) + '"'); - } else if (escaped && escaped[key]) { - buf.push(key + '="' + exports.escape(val) + '"'); - } else { - buf.push(key + '="' + val + '"'); - } - } - } - - return buf.join(' '); -}; - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function escape(html){ - return String(html) - .replace(/&(?!(\w+|\#\d+);)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -}; - -/** - * Re-throw the given `err` in context to the - * the jade in `filename` at the given `lineno`. - * - * @param {Error} err - * @param {String} filename - * @param {String} lineno - * @api private - */ - -exports.rethrow = function rethrow(err, filename, lineno){ - if (!filename) throw err; - - var context = 3 - , str = require('fs').readFileSync(filename, 'utf8') - , lines = str.split('\n') - , start = Math.max(lineno - context, 0) - , end = Math.min(lines.length, lineno + context); - - // Error context - var context = lines.slice(start, end).map(function(line, i){ - var curr = i + start + 1; - return (curr == lineno ? ' > ' : ' ') - + curr - + '| ' - + line; - }).join('\n'); - - // Alter exception message - err.path = filename; - err.message = (filename || 'Jade') + ':' + lineno - + '\n' + context + '\n\n' + err.message; - throw err; -}; - -}); // module: runtime.js - -require.register("self-closing.js", function(module, exports, require){ - -/*! - * Jade - self closing tags - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = [ - 'meta' - , 'img' - , 'link' - , 'input' - , 'source' - , 'area' - , 'base' - , 'col' - , 'br' - , 'hr' -]; -}); // module: self-closing.js - -require.register("utils.js", function(module, exports, require){ - -/*! - * Jade - utils - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Convert interpolation in the given string to JavaScript. - * - * @param {String} str - * @return {String} - * @api private - */ - -var interpolate = exports.interpolate = function(str){ - return str.replace(/(\\)?([#!]){(.*?)}/g, function(str, escape, flag, code){ - return escape - ? str - : "' + " - + ('!' == flag ? '' : 'escape') - + "((interp = " + code.replace(/\\'/g, "'") - + ") == null ? '' : interp) + '"; - }); -}; - -/** - * Escape single quotes in `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -var escape = exports.escape = function(str) { - return str.replace(/'/g, "\\'"); -}; - -/** - * Interpolate, and escape the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.text = function(str){ - return interpolate(escape(str)); -}; -}); // module: utils.js - -window.jade = require("jade"); -})(); diff --git a/cli/node_modules/mocha/node_modules/jade/jade.md b/cli/node_modules/mocha/node_modules/jade/jade.md deleted file mode 100644 index 051dc0311..000000000 --- a/cli/node_modules/mocha/node_modules/jade/jade.md +++ /dev/null @@ -1,510 +0,0 @@ - -# Jade - - The jade template engine for node.js - -## Synopsis - - jade [-h|--help] [-v|--version] [-o|--obj STR] - [-O|--out DIR] [-p|--path PATH] [-P|--pretty] - [-c|--client] [-D|--no-debug] - -## Examples - - translate jade the templates dir - - $ jade templates - - create {foo,bar}.html - - $ jade {foo,bar}.jade - - jade over stdio - - $ jade < my.jade > my.html - - jade over s - - $ echo "h1 Jade!" | jade - - foo, bar dirs rendering to /tmp - - $ jade foo bar --out /tmp - - compile client-side templates without debugging - instrumentation, making the output javascript - very light-weight. This requires runtime.js - in your projects. - - $ jade --client --no-debug < my.jade - -## Tags - - Tags are simply nested via whitespace, closing - tags defined for you. These indents are called "blocks". - - ul - li - a Foo - li - a Bar - - You may have several tags in one "block": - - ul - li - a Foo - a Bar - a Baz - -## Self-closing Tags - - Some tags are flagged as self-closing by default, such - as `meta`, `link`, and so on. To explicitly self-close - a tag simply append the `/` character: - - foo/ - foo(bar='baz')/ - - Would yield: - - - - -## Attributes - - Tag attributes look similar to HTML, however - the values are regular JavaScript, here are - some examples: - - a(href='google.com') Google - a(class='button', href='google.com') Google - - As mentioned the attribute values are just JavaScript, - this means ternary operations and other JavaScript expressions - work just fine: - - body(class=user.authenticated ? 'authenticated' : 'anonymous') - a(href=user.website || 'http://google.com') - - Multiple lines work too: - - input(type='checkbox', - name='agreement', - checked) - - Multiple lines without the comma work fine: - - input(type='checkbox' - name='agreement' - checked) - - Funky whitespace? fine: - - input( - type='checkbox' - name='agreement' - checked) - -## Boolean attributes - - Boolean attributes are mirrored by Jade, and accept - bools, aka _true_ or _false_. When no value is specified - _true_ is assumed. For example: - - input(type="checkbox", checked) - // => "" - - For example if the checkbox was for an agreement, perhaps `user.agreed` - was _true_ the following would also output 'checked="checked"': - - input(type="checkbox", checked=user.agreed) - -## Class attributes - - The _class_ attribute accepts an array of classes, - this can be handy when generated from a javascript - function etc: - - classes = ['foo', 'bar', 'baz'] - a(class=classes) - // => "" - -## Class literal - - Classes may be defined using a ".CLASSNAME" syntax: - - .button - // => "
    " - - Or chained: - - .large.button - // => "
    " - - The previous defaulted to divs, however you - may also specify the tag type: - - h1.title My Title - // => "

    My Title

    " - -## Id literal - - Much like the class literal there's an id literal: - - #user-1 - // => "
    " - - Again we may specify the tag as well: - - ul#menu - li: a(href='/home') Home - li: a(href='/store') Store - li: a(href='/contact') Contact - - Finally all of these may be used in any combination, - the following are all valid tags: - - a.button#contact(style: 'color: red') Contact - a.button(style: 'color: red')#contact Contact - a(style: 'color: red').button#contact Contact - -## Block expansion - - Jade supports the concept of "block expansion", in which - using a trailing ":" after a tag will inject a block: - - ul - li: a Foo - li: a Bar - li: a Baz - -## Text - - Arbitrary text may follow tags: - - p Welcome to my site - - yields: - -

    Welcome to my site

    - -## Pipe text - - Another form of text is "pipe" text. Pipes act - as the text margin for large bodies of text. - - p - | This is a large - | body of text for - | this tag. - | - | Nothing too - | exciting. - - yields: - -

    This is a large - body of text for - this tag. - - Nothing too - exciting. -

    - - Using pipes we can also specify regular Jade tags - within the text: - - p - | Click to visit - a(href='http://google.com') Google - | if you want. - -## Text only tags - - As an alternative to pipe text you may add - a trailing "." to indicate that the block - contains nothing but plain-text, no tags: - - p. - This is a large - body of text for - this tag. - - Nothing too - exciting. - - Some tags are text-only by default, for example - _script_, _textarea_, and _style_ tags do not - contain nested HTML so Jade implies the trailing ".": - - script - if (foo) { - bar(); - } - - style - body { - padding: 50px; - font: 14px Helvetica; - } - -## Template script tags - - Sometimes it's useful to define HTML in script - tags using Jade, typically for client-side templates. - - To do this simply give the _script_ tag an arbitrary - _type_ attribute such as _text/x-template_: - - script(type='text/template') - h1 Look! - p Jade still works in here! - -## Interpolation - - Both plain-text and piped-text support interpolation, - which comes in two forms, escapes and non-escaped. The - following will output the _user.name_ in the paragraph - but HTML within it will be escaped to prevent XSS attacks: - - p Welcome #{user.name} - - The following syntax is identical however it will _not_ escape - HTML, and should only be used with strings that you trust: - - p Welcome !{user.name} - -## Inline HTML - - Sometimes constructing small inline snippets of HTML - in Jade can be annoying, luckily we can add plain - HTML as well: - - p Welcome #{user.name} - -## Code - - To buffer output with Jade simply use _=_ at the beginning - of a line or after a tag. This method escapes any HTML - present in the string. - - p= user.description - - To buffer output unescaped use the _!=_ variant, but again - be careful of XSS. - - p!= user.description - - The final way to mess with JavaScript code in Jade is the unbuffered - _-_, which can be used for conditionals, defining variables etc: - - - var user = { description: 'foo bar baz' } - #user - - if (user.description) { - h2 Description - p.description= user.description - - } - - When compiled blocks are wrapped in anonymous functions, so the - following is also valid, without braces: - - - var user = { description: 'foo bar baz' } - #user - - if (user.description) - h2 Description - p.description= user.description - - If you really want you could even use `.forEach()` and others: - - - users.forEach(function(user){ - .user - h2= user.name - p User #{user.name} is #{user.age} years old - - }) - - Taking this further Jade provides some syntax for conditionals, - iteration, switch statements etc. Let's look at those next! - -## Assignment - - Jade's first-class assignment is simple, simply use the _=_ - operator and Jade will _var_ it for you. The following are equivalent: - - - var user = { name: 'tobi' } - user = { name: 'tobi' } - -## Conditionals - - Jade's first-class conditional syntax allows for optional - parenthesis, and you may now omit the leading _-_ otherwise - it's identical, still just regular javascript: - - user = { description: 'foo bar baz' } - #user - if user.description - h2 Description - p.description= user.description - - Jade provides the negated version, _unless_ as well, the following - are equivalent: - - - if (!(user.isAnonymous)) - p You're logged in as #{user.name} - - unless user.isAnonymous - p You're logged in as #{user.name} - -## Iteration - - JavaScript's _for_ loops don't look very declarative, so Jade - also provides its own _for_ loop construct, aliased as _each_: - - for user in users - .user - h2= user.name - p user #{user.name} is #{user.age} year old - - As mentioned _each_ is identical: - - each user in users - .user - h2= user.name - - If necessary the index is available as well: - - for user, i in users - .user(class='user-#{i}') - h2= user.name - - Remember, it's just JavaScript: - - ul#letters - for letter in ['a', 'b', 'c'] - li= letter - -## Mixins - - Mixins provide a way to define jade "functions" which "mix in" - their contents when called. This is useful for abstracting - out large fragments of Jade. - - The simplest possible mixin which accepts no arguments might - look like this: - - mixin hello - p Hello - - You use a mixin by placing `+` before the name: - - +hello - - For something a little more dynamic, mixins can take - arguments, the mixin itself is converted to a javascript - function internally: - - mixin hello(user) - p Hello #{user} - - +hello('Tobi') - - Yields: - -

    Hello Tobi

    - - Mixins may optionally take blocks, when a block is passed - its contents becomes the implicit `block` argument. For - example here is a mixin passed a block, and also invoked - without passing a block: - - mixin article(title) - .article - .article-wrapper - h1= title - if block - block - else - p No content provided - - +article('Hello world') - - +article('Hello world') - p This is my - p Amazing article - - yields: - -
    -
    -

    Hello world

    -

    No content provided

    -
    -
    - -
    -
    -

    Hello world

    -

    This is my

    -

    Amazing article

    -
    -
    - - Mixins can even take attributes, just like a tag. When - attributes are passed they become the implicit `attributes` - argument. Individual attributes can be accessed just like - normal object properties: - - mixin centered - .centered(class=attributes.class) - block - - +centered.bold Hello world - - +centered.red - p This is my - p Amazing article - - yields: - -
    Hello world
    -
    -

    This is my

    -

    Amazing article

    -
    - - If you use `attributes` directly, *all* passed attributes - get used: - - mixin link - a.menu(attributes) - block - - +link.highlight(href='#top') Top - +link#sec1.plain(href='#section1') Section 1 - +link#sec2.plain(href='#section2') Section 2 - - yields: - - Top - Section 1 - Section 2 - - If you pass arguments, they must directly follow the mixin: - - mixin list(arr) - if block - .title - block - ul(attributes) - each item in arr - li= item - - +list(['foo', 'bar', 'baz'])(id='myList', class='bold') - - yields: - -
      -
    • foo
    • -
    • bar
    • -
    • baz
    • -
    diff --git a/cli/node_modules/mocha/node_modules/jade/jade.min.js b/cli/node_modules/mocha/node_modules/jade/jade.min.js deleted file mode 100644 index 72e4535e0..000000000 --- a/cli/node_modules/mocha/node_modules/jade/jade.min.js +++ /dev/null @@ -1,2 +0,0 @@ -(function(){function require(p){var path=require.resolve(p),mod=require.modules[path];if(!mod)throw new Error('failed to require "'+p+'"');return mod.exports||(mod.exports={},mod.call(mod.exports,mod,mod.exports,require.relative(path))),mod.exports}require.modules={},require.resolve=function(path){var orig=path,reg=path+".js",index=path+"/index.js";return require.modules[reg]&®||require.modules[index]&&index||orig},require.register=function(path,fn){require.modules[path]=fn},require.relative=function(parent){return function(p){if("."!=p.charAt(0))return require(p);var path=parent.split("/"),segs=p.split("/");path.pop();for(var i=0;i",this.doctype=doctype,this.terse="5"==name||"html"==name,this.xml=0==this.doctype.indexOf("1&&!escape&&block.nodes[0].isText&&block.nodes[1].isText&&this.prettyIndent(1,!0);for(var i=0;i0&&!escape&&block.nodes[i].isText&&block.nodes[i-1].isText&&this.prettyIndent(1,!1),this.visit(block.nodes[i]),block.nodes[i+1]&&block.nodes[i].isText&&block.nodes[i+1].isText&&this.buffer("\\n")},visitDoctype:function(doctype){doctype&&(doctype.val||!this.doctype)&&this.setDoctype(doctype.val||"default"),this.doctype&&this.buffer(this.doctype),this.hasCompiledDoctype=!0},visitMixin:function(mixin){var name=mixin.name.replace(/-/g,"_")+"_mixin",args=mixin.args||"",block=mixin.block,attrs=mixin.attrs,pp=this.pp;if(mixin.call){pp&&this.buf.push("__indent.push('"+Array(this.indents+1).join(" ")+"');");if(block||attrs.length){this.buf.push(name+".call({");if(block){this.buf.push("block: function(){"),this.parentIndents++;var _indents=this.indents;this.indents=0,this.visit(mixin.block),this.indents=_indents,this.parentIndents--,attrs.length?this.buf.push("},"):this.buf.push("}")}if(attrs.length){var val=this.attrs(attrs);val.inherits?this.buf.push("attributes: merge({"+val.buf+"}, attributes), escaped: merge("+val.escaped+", escaped, true)"):this.buf.push("attributes: {"+val.buf+"}, escaped: "+val.escaped)}args?this.buf.push("}, "+args+");"):this.buf.push("});")}else this.buf.push(name+"("+args+");");pp&&this.buf.push("__indent.pop();")}else this.buf.push("var "+name+" = function("+args+"){"),this.buf.push("var block = this.block, attributes = this.attributes || {}, escaped = this.escaped || {};"),this.parentIndents++,this.visit(block),this.parentIndents--,this.buf.push("};")},visitTag:function(tag){this.indents++;var name=tag.name,pp=this.pp;tag.buffer&&(name="' + ("+name+") + '"),this.hasCompiledTag||(!this.hasCompiledDoctype&&"html"==name&&this.visitDoctype(),this.hasCompiledTag=!0),pp&&!tag.isInline()&&this.prettyIndent(0,!0),(~selfClosing.indexOf(name)||tag.selfClosing)&&!this.xml?(this.buffer("<"+name),this.visitAttributes(tag.attrs),this.terse?this.buffer(">"):this.buffer("/>")):(tag.attrs.length?(this.buffer("<"+name),tag.attrs.length&&this.visitAttributes(tag.attrs),this.buffer(">")):this.buffer("<"+name+">"),tag.code&&this.visitCode(tag.code),this.escape="pre"==tag.name,this.visit(tag.block),pp&&!tag.isInline()&&"pre"!=tag.name&&!tag.canInline()&&this.prettyIndent(0,!0),this.buffer("")),this.indents--},visitFilter:function(filter){var fn=filters[filter.name];if(!fn)throw filter.isASTFilter?new Error('unknown ast filter "'+filter.name+':"'):new Error('unknown filter ":'+filter.name+'"');if(filter.isASTFilter)this.buf.push(fn(filter.block,this,filter.attrs));else{var text=filter.block.nodes.map(function(node){return node.val}).join("\n");filter.attrs=filter.attrs||{},filter.attrs.filename=this.options.filename,this.buffer(utils.text(fn(text,filter.attrs)))}},visitText:function(text){text=utils.text(text.val.replace(/\\/g,"\\\\")),this.escape&&(text=escape(text)),this.buffer(text)},visitComment:function(comment){if(!comment.buffer)return;this.pp&&this.prettyIndent(1,!0),this.buffer("")},visitBlockComment:function(comment){if(!comment.buffer)return;0==comment.val.trim().indexOf("if")?(this.buffer("")):(this.buffer(""))},visitCode:function(code){if(code.buffer){var val=code.val.trimLeft();this.buf.push("var __val__ = "+val),val='null == __val__ ? "" : __val__',code.escape&&(val="escape("+val+")"),this.buf.push("buf.push("+val+");")}else this.buf.push(code.val);code.block&&(code.buffer||this.buf.push("{"),this.visit(code.block),code.buffer||this.buf.push("}"))},visitEach:function(each){this.buf.push("// iterate "+each.obj+"\n"+";(function(){\n"+" if ('number' == typeof "+each.obj+".length) {\n"+" for (var "+each.key+" = 0, $$l = "+each.obj+".length; "+each.key+" < $$l; "+each.key+"++) {\n"+" var "+each.val+" = "+each.obj+"["+each.key+"];\n"),this.visit(each.block),this.buf.push(" }\n } else {\n for (var "+each.key+" in "+each.obj+") {\n"+" if ("+each.obj+".hasOwnProperty("+each.key+")){"+" var "+each.val+" = "+each.obj+"["+each.key+"];\n"),this.visit(each.block),this.buf.push(" }\n"),this.buf.push(" }\n }\n}).call(this);\n")},visitAttributes:function(attrs){var val=this.attrs(attrs);val.inherits?this.buf.push("buf.push(attrs(merge({ "+val.buf+" }, attributes), merge("+val.escaped+", escaped, true)));"):val.constant?(eval("var buf={"+val.buf+"};"),this.buffer(runtime.attrs(buf,JSON.parse(val.escaped)),!0)):this.buf.push("buf.push(attrs({ "+val.buf+" }, "+val.escaped+"));")},attrs:function(attrs){var buf=[],classes=[],escaped={},constant=attrs.every(function(attr){return isConstant(attr.val)}),inherits=!1;return this.terse&&buf.push("terse: true"),attrs.forEach(function(attr){if(attr.name=="attributes")return inherits=!0;escaped[attr.name]=attr.escaped;if(attr.name=="class")classes.push("("+attr.val+")");else{var pair="'"+attr.name+"':("+attr.val+")";buf.push(pair)}}),classes.length&&(classes=classes.join(" + ' ' + "),buf.push("class: "+classes)),{buf:buf.join(", ").replace("class:",'"class":'),escaped:JSON.stringify(escaped),inherits:inherits,constant:constant}}};function isConstant(val){if(/^ *("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|true|false|null|undefined) *$/i.test(val))return!0;if(!isNaN(Number(val)))return!0;var matches;return(matches=/^ *\[(.*)\] *$/.exec(val))?matches[1].split(",").every(isConstant):!1}function escape(html){return String(html).replace(/&(?!\w+;)/g,"&").replace(//g,">").replace(/"/g,""")}}),require.register("doctypes.js",function(module,exports,require){module.exports={5:"","default":"",xml:'',transitional:'',strict:'',frameset:'',1.1:'',basic:'',mobile:''}}),require.register("filters.js",function(module,exports,require){module.exports={cdata:function(str){return""},sass:function(str){str=str.replace(/\\n/g,"\n");var sass=require("sass").render(str).replace(/\n/g,"\\n");return'"},stylus:function(str,options){var ret;str=str.replace(/\\n/g,"\n");var stylus=require("stylus");return stylus(str,options).render(function(err,css){if(err)throw err;ret=css.replace(/\n/g,"\\n")}),'"},less:function(str){var ret;return str=str.replace(/\\n/g,"\n"),require("less").render(str,function(err,css){if(err)throw err;ret='"}),ret},markdown:function(str){var md;try{md=require("markdown")}catch(err){try{md=require("discount")}catch(err){try{md=require("markdown-js")}catch(err){try{md=require("marked")}catch(err){throw new Error("Cannot find markdown library, install markdown, discount, or marked.")}}}}return str=str.replace(/\\n/g,"\n"),md.parse(str).replace(/\n/g,"\\n").replace(/'/g,"'")},coffeescript:function(str){str=str.replace(/\\n/g,"\n");var js=require("coffee-script").compile(str).replace(/\\/g,"\\\\").replace(/\n/g,"\\n");return'"}}}),require.register("inline-tags.js",function(module,exports,require){module.exports=["a","abbr","acronym","b","br","code","em","font","i","img","ins","kbd","map","samp","small","span","strong","sub","sup"]}),require.register("jade.js",function(module,exports,require){var Parser=require("./parser"),Lexer=require("./lexer"),Compiler=require("./compiler"),runtime=require("./runtime");exports.version="0.26.1",exports.selfClosing=require("./self-closing"),exports.doctypes=require("./doctypes"),exports.filters=require("./filters"),exports.utils=require("./utils"),exports.Compiler=Compiler,exports.Parser=Parser,exports.Lexer=Lexer,exports.nodes=require("./nodes"),exports.runtime=runtime,exports.cache={};function parse(str,options){try{var parser=new Parser(str,options.filename,options),compiler=new(options.compiler||Compiler)(parser.parse(),options),js=compiler.compile();return options.debug&&console.error("\nCompiled Function:\n\n%s",js.replace(/^/gm," ")),"var buf = [];\n"+(options.self?"var self = locals || {};\n"+js:"with (locals || {}) {\n"+js+"\n}\n")+'return buf.join("");'}catch(err){parser=parser.context(),runtime.rethrow(err,parser.filename,parser.lexer.lineno)}}exports.compile=function(str,options){var options=options||{},client=options.client,filename=options.filename?JSON.stringify(options.filename):"undefined",fn;return options.compileDebug!==!1?fn=["var __jade = [{ lineno: 1, filename: "+filename+" }];","try {",parse(String(str),options),"} catch (err) {"," rethrow(err, __jade[0].filename, __jade[0].lineno);","}"].join("\n"):fn=parse(String(str),options),client&&(fn="attrs = attrs || jade.attrs; escape = escape || jade.escape; rethrow = rethrow || jade.rethrow; merge = merge || jade.merge;\n"+fn),fn=new Function("locals, attrs, escape, rethrow, merge",fn),client?fn:function(locals){return fn(locals,runtime.attrs,runtime.escape,runtime.rethrow,runtime.merge)}},exports.render=function(str,options,fn){"function"==typeof options&&(fn=options,options={});if(options.cache&&!options.filename)return fn(new Error('the "filename" option is required for caching'));try{var path=options.filename,tmpl=options.cache?exports.cache[path]||(exports.cache[path]=exports.compile(str,options)):exports.compile(str,options);fn(null,tmpl(options))}catch(err){fn(err)}},exports.renderFile=function(path,options,fn){var key=path+":string";"function"==typeof options&&(fn=options,options={});try{options.filename=path;var str=options.cache?exports.cache[key]||(exports.cache[key]=fs.readFileSync(path,"utf8")):fs.readFileSync(path,"utf8");exports.render(str,options,fn)}catch(err){fn(err)}},exports.__express=exports.renderFile}),require.register("lexer.js",function(module,exports,require){var Lexer=module.exports=function Lexer(str,options){options=options||{},this.input=str.replace(/\r\n|\r/g,"\n"),this.colons=options.colons,this.deferredTokens=[],this.lastIndents=0,this.lineno=1,this.stash=[],this.indentStack=[],this.indentRe=null,this.pipeless=!1};Lexer.prototype={tok:function(type,val){return{type:type,line:this.lineno,val:val}},consume:function(len){this.input=this.input.substr(len)},scan:function(regexp,type){var captures;if(captures=regexp.exec(this.input))return this.consume(captures[0].length),this.tok(type,captures[1])},defer:function(tok){this.deferredTokens.push(tok)},lookahead:function(n){var fetch=n-this.stash.length;while(fetch-->0)this.stash.push(this.next());return this.stash[--n]},indexOfDelimiters:function(start,end){var str=this.input,nstart=0,nend=0,pos=0;for(var i=0,len=str.length;iindents)this.stash.push(this.tok("outdent")),this.indentStack.shift();tok=this.stash.pop()}else indents&&indents!=this.indentStack[0]?(this.indentStack.unshift(indents),tok=this.tok("indent",indents)):tok=this.tok("newline");return tok}},pipelessText:function(){if(this.pipeless){if("\n"==this.input[0])return;var i=this.input.indexOf("\n");-1==i&&(i=this.input.length);var str=this.input.substr(0,i);return this.consume(str.length),this.tok("text",str)}},colon:function(){return this.scan(/^: */,":")},advance:function(){return this.stashed()||this.next()},next:function(){return this.deferred()||this.blank()||this.eos()||this.pipelessText()||this.yield()||this.doctype()||this.interpolation()||this["case"]()||this.when()||this["default"]()||this["extends"]()||this.append()||this.prepend()||this.block()||this.include()||this.mixin()||this.call()||this.conditional()||this.each()||this["while"]()||this.assignment()||this.tag()||this.filter()||this.code()||this.id()||this.className()||this.attrs()||this.indent()||this.comment()||this.colon()||this.text()}}}),require.register("nodes/attrs.js",function(module,exports,require){var Node=require("./node"),Block=require("./block"),Attrs=module.exports=function Attrs(){this.attrs=[]};Attrs.prototype=new Node,Attrs.prototype.constructor=Attrs,Attrs.prototype.setAttribute=function(name,val,escaped){return this.attrs.push({name:name,val:val,escaped:escaped}),this},Attrs.prototype.removeAttribute=function(name){for(var i=0,len=this.attrs.length;i/g,">").replace(/"/g,""")},exports.rethrow=function rethrow(err,filename,lineno){if(!filename)throw err;var context=3,str=require("fs").readFileSync(filename,"utf8"),lines=str.split("\n"),start=Math.max(lineno-context,0),end=Math.min(lines.length,lineno+context),context=lines.slice(start,end).map(function(line,i){var curr=i+start+1;return(curr==lineno?" > ":" ")+curr+"| "+line}).join("\n");throw err.path=filename,err.message=(filename||"Jade")+":"+lineno+"\n"+context+"\n\n"+err.message,err}}),require.register("self-closing.js",function(module,exports,require){module.exports=["meta","img","link","input","source","area","base","col","br","hr"]}),require.register("utils.js",function(module,exports,require){var interpolate=exports.interpolate=function(str){return str.replace(/(\\)?([#!]){(.*?)}/g,function(str,escape,flag,code){return escape?str:"' + "+("!"==flag?"":"escape")+"((interp = "+code.replace(/\\'/g,"'")+") == null ? '' : interp) + '"})},escape=exports.escape=function(str){return str.replace(/'/g,"\\'")};exports.text=function(str){return interpolate(escape(str))}}),window.jade=require("jade")})(); \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/lib/compiler.js b/cli/node_modules/mocha/node_modules/jade/lib/compiler.js deleted file mode 100644 index 516ac83dd..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/compiler.js +++ /dev/null @@ -1,642 +0,0 @@ - -/*! - * Jade - Compiler - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var nodes = require('./nodes') - , filters = require('./filters') - , doctypes = require('./doctypes') - , selfClosing = require('./self-closing') - , runtime = require('./runtime') - , utils = require('./utils'); - -// if browser -// -// if (!Object.keys) { -// Object.keys = function(obj){ -// var arr = []; -// for (var key in obj) { -// if (obj.hasOwnProperty(key)) { -// arr.push(key); -// } -// } -// return arr; -// } -// } -// -// if (!String.prototype.trimLeft) { -// String.prototype.trimLeft = function(){ -// return this.replace(/^\s+/, ''); -// } -// } -// -// end - - -/** - * Initialize `Compiler` with the given `node`. - * - * @param {Node} node - * @param {Object} options - * @api public - */ - -var Compiler = module.exports = function Compiler(node, options) { - this.options = options = options || {}; - this.node = node; - this.hasCompiledDoctype = false; - this.hasCompiledTag = false; - this.pp = options.pretty || false; - this.debug = false !== options.compileDebug; - this.indents = 0; - this.parentIndents = 0; - if (options.doctype) this.setDoctype(options.doctype); -}; - -/** - * Compiler prototype. - */ - -Compiler.prototype = { - - /** - * Compile parse tree to JavaScript. - * - * @api public - */ - - compile: function(){ - this.buf = ['var interp;']; - if (this.pp) this.buf.push("var __indent = [];"); - this.lastBufferedIdx = -1; - this.visit(this.node); - return this.buf.join('\n'); - }, - - /** - * Sets the default doctype `name`. Sets terse mode to `true` when - * html 5 is used, causing self-closing tags to end with ">" vs "/>", - * and boolean attributes are not mirrored. - * - * @param {string} name - * @api public - */ - - setDoctype: function(name){ - var doctype = doctypes[(name || 'default').toLowerCase()]; - doctype = doctype || ''; - this.doctype = doctype; - this.terse = '5' == name || 'html' == name; - this.xml = 0 == this.doctype.indexOf(' 1 && !escape && block.nodes[0].isText && block.nodes[1].isText) - this.prettyIndent(1, true); - - for (var i = 0; i < len; ++i) { - // Pretty print text - if (pp && i > 0 && !escape && block.nodes[i].isText && block.nodes[i-1].isText) - this.prettyIndent(1, false); - - this.visit(block.nodes[i]); - // Multiple text nodes are separated by newlines - if (block.nodes[i+1] && block.nodes[i].isText && block.nodes[i+1].isText) - this.buffer('\\n'); - } - }, - - /** - * Visit `doctype`. Sets terse mode to `true` when html 5 - * is used, causing self-closing tags to end with ">" vs "/>", - * and boolean attributes are not mirrored. - * - * @param {Doctype} doctype - * @api public - */ - - visitDoctype: function(doctype){ - if (doctype && (doctype.val || !this.doctype)) { - this.setDoctype(doctype.val || 'default'); - } - - if (this.doctype) this.buffer(this.doctype); - this.hasCompiledDoctype = true; - }, - - /** - * Visit `mixin`, generating a function that - * may be called within the template. - * - * @param {Mixin} mixin - * @api public - */ - - visitMixin: function(mixin){ - var name = mixin.name.replace(/-/g, '_') + '_mixin' - , args = mixin.args || '' - , block = mixin.block - , attrs = mixin.attrs - , pp = this.pp; - - if (mixin.call) { - if (pp) this.buf.push("__indent.push('" + Array(this.indents + 1).join(' ') + "');") - if (block || attrs.length) { - - this.buf.push(name + '.call({'); - - if (block) { - this.buf.push('block: function(){'); - - // Render block with no indents, dynamically added when rendered - this.parentIndents++; - var _indents = this.indents; - this.indents = 0; - this.visit(mixin.block); - this.indents = _indents; - this.parentIndents--; - - if (attrs.length) { - this.buf.push('},'); - } else { - this.buf.push('}'); - } - } - - if (attrs.length) { - var val = this.attrs(attrs); - if (val.inherits) { - this.buf.push('attributes: merge({' + val.buf - + '}, attributes), escaped: merge(' + val.escaped + ', escaped, true)'); - } else { - this.buf.push('attributes: {' + val.buf + '}, escaped: ' + val.escaped); - } - } - - if (args) { - this.buf.push('}, ' + args + ');'); - } else { - this.buf.push('});'); - } - - } else { - this.buf.push(name + '(' + args + ');'); - } - if (pp) this.buf.push("__indent.pop();") - } else { - this.buf.push('var ' + name + ' = function(' + args + '){'); - this.buf.push('var block = this.block, attributes = this.attributes || {}, escaped = this.escaped || {};'); - this.parentIndents++; - this.visit(block); - this.parentIndents--; - this.buf.push('};'); - } - }, - - /** - * Visit `tag` buffering tag markup, generating - * attributes, visiting the `tag`'s code and block. - * - * @param {Tag} tag - * @api public - */ - - visitTag: function(tag){ - this.indents++; - var name = tag.name - , pp = this.pp; - - if (tag.buffer) name = "' + (" + name + ") + '"; - - if (!this.hasCompiledTag) { - if (!this.hasCompiledDoctype && 'html' == name) { - this.visitDoctype(); - } - this.hasCompiledTag = true; - } - - // pretty print - if (pp && !tag.isInline()) - this.prettyIndent(0, true); - - if ((~selfClosing.indexOf(name) || tag.selfClosing) && !this.xml) { - this.buffer('<' + name); - this.visitAttributes(tag.attrs); - this.terse - ? this.buffer('>') - : this.buffer('/>'); - } else { - // Optimize attributes buffering - if (tag.attrs.length) { - this.buffer('<' + name); - if (tag.attrs.length) this.visitAttributes(tag.attrs); - this.buffer('>'); - } else { - this.buffer('<' + name + '>'); - } - if (tag.code) this.visitCode(tag.code); - this.escape = 'pre' == tag.name; - this.visit(tag.block); - - // pretty print - if (pp && !tag.isInline() && 'pre' != tag.name && !tag.canInline()) - this.prettyIndent(0, true); - - this.buffer(''); - } - this.indents--; - }, - - /** - * Visit `filter`, throwing when the filter does not exist. - * - * @param {Filter} filter - * @api public - */ - - visitFilter: function(filter){ - var fn = filters[filter.name]; - - // unknown filter - if (!fn) { - if (filter.isASTFilter) { - throw new Error('unknown ast filter "' + filter.name + ':"'); - } else { - throw new Error('unknown filter ":' + filter.name + '"'); - } - } - - if (filter.isASTFilter) { - this.buf.push(fn(filter.block, this, filter.attrs)); - } else { - var text = filter.block.nodes.map(function(node){ return node.val }).join('\n'); - filter.attrs = filter.attrs || {}; - filter.attrs.filename = this.options.filename; - this.buffer(utils.text(fn(text, filter.attrs))); - } - }, - - /** - * Visit `text` node. - * - * @param {Text} text - * @api public - */ - - visitText: function(text){ - text = utils.text(text.val.replace(/\\/g, '\\\\')); - if (this.escape) text = escape(text); - this.buffer(text); - }, - - /** - * Visit a `comment`, only buffering when the buffer flag is set. - * - * @param {Comment} comment - * @api public - */ - - visitComment: function(comment){ - if (!comment.buffer) return; - if (this.pp) this.prettyIndent(1, true); - this.buffer(''); - }, - - /** - * Visit a `BlockComment`. - * - * @param {Comment} comment - * @api public - */ - - visitBlockComment: function(comment){ - if (!comment.buffer) return; - if (0 == comment.val.trim().indexOf('if')) { - this.buffer(''); - } else { - this.buffer(''); - } - }, - - /** - * Visit `code`, respecting buffer / escape flags. - * If the code is followed by a block, wrap it in - * a self-calling function. - * - * @param {Code} code - * @api public - */ - - visitCode: function(code){ - // Wrap code blocks with {}. - // we only wrap unbuffered code blocks ATM - // since they are usually flow control - - // Buffer code - if (code.buffer) { - var val = code.val.trimLeft(); - this.buf.push('var __val__ = ' + val); - val = 'null == __val__ ? "" : __val__'; - if (code.escape) val = 'escape(' + val + ')'; - this.buf.push("buf.push(" + val + ");"); - } else { - this.buf.push(code.val); - } - - // Block support - if (code.block) { - if (!code.buffer) this.buf.push('{'); - this.visit(code.block); - if (!code.buffer) this.buf.push('}'); - } - }, - - /** - * Visit `each` block. - * - * @param {Each} each - * @api public - */ - - visitEach: function(each){ - this.buf.push('' - + '// iterate ' + each.obj + '\n' - + ';(function(){\n' - + ' if (\'number\' == typeof ' + each.obj + '.length) {\n' - + ' for (var ' + each.key + ' = 0, $$l = ' + each.obj + '.length; ' + each.key + ' < $$l; ' + each.key + '++) {\n' - + ' var ' + each.val + ' = ' + each.obj + '[' + each.key + '];\n'); - - this.visit(each.block); - - this.buf.push('' - + ' }\n' - + ' } else {\n' - + ' for (var ' + each.key + ' in ' + each.obj + ') {\n' - // if browser - // + ' if (' + each.obj + '.hasOwnProperty(' + each.key + ')){' - // end - + ' var ' + each.val + ' = ' + each.obj + '[' + each.key + '];\n'); - - this.visit(each.block); - - // if browser - // this.buf.push(' }\n'); - // end - - this.buf.push(' }\n }\n}).call(this);\n'); - }, - - /** - * Visit `attrs`. - * - * @param {Array} attrs - * @api public - */ - - visitAttributes: function(attrs){ - var val = this.attrs(attrs); - if (val.inherits) { - this.buf.push("buf.push(attrs(merge({ " + val.buf + - " }, attributes), merge(" + val.escaped + ", escaped, true)));"); - } else if (val.constant) { - eval('var buf={' + val.buf + '};'); - this.buffer(runtime.attrs(buf, JSON.parse(val.escaped)), true); - } else { - this.buf.push("buf.push(attrs({ " + val.buf + " }, " + val.escaped + "));"); - } - }, - - /** - * Compile attributes. - */ - - attrs: function(attrs){ - var buf = [] - , classes = [] - , escaped = {} - , constant = attrs.every(function(attr){ return isConstant(attr.val) }) - , inherits = false; - - if (this.terse) buf.push('terse: true'); - - attrs.forEach(function(attr){ - if (attr.name == 'attributes') return inherits = true; - escaped[attr.name] = attr.escaped; - if (attr.name == 'class') { - classes.push('(' + attr.val + ')'); - } else { - var pair = "'" + attr.name + "':(" + attr.val + ')'; - buf.push(pair); - } - }); - - if (classes.length) { - classes = classes.join(" + ' ' + "); - buf.push("class: " + classes); - } - - return { - buf: buf.join(', ').replace('class:', '"class":'), - escaped: JSON.stringify(escaped), - inherits: inherits, - constant: constant - }; - } -}; - -/** - * Check if expression can be evaluated to a constant - * - * @param {String} expression - * @return {Boolean} - * @api private - */ - -function isConstant(val){ - // Check strings/literals - if (/^ *("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|true|false|null|undefined) *$/i.test(val)) - return true; - - // Check numbers - if (!isNaN(Number(val))) - return true; - - // Check arrays - var matches; - if (matches = /^ *\[(.*)\] *$/.exec(val)) - return matches[1].split(',').every(isConstant); - - return false; -} - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -function escape(html){ - return String(html) - .replace(/&(?!\w+;)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -} \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/lib/doctypes.js b/cli/node_modules/mocha/node_modules/jade/lib/doctypes.js deleted file mode 100644 index e87ca1e4c..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/doctypes.js +++ /dev/null @@ -1,18 +0,0 @@ - -/*! - * Jade - doctypes - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = { - '5': '' - , 'default': '' - , 'xml': '' - , 'transitional': '' - , 'strict': '' - , 'frameset': '' - , '1.1': '' - , 'basic': '' - , 'mobile': '' -}; \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/lib/filters.js b/cli/node_modules/mocha/node_modules/jade/lib/filters.js deleted file mode 100644 index fdb634cb7..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/filters.js +++ /dev/null @@ -1,97 +0,0 @@ - -/*! - * Jade - filters - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = { - - /** - * Wrap text with CDATA block. - */ - - cdata: function(str){ - return ''; - }, - - /** - * Transform sass to css, wrapped in style tags. - */ - - sass: function(str){ - str = str.replace(/\\n/g, '\n'); - var sass = require('sass').render(str).replace(/\n/g, '\\n'); - return ''; - }, - - /** - * Transform stylus to css, wrapped in style tags. - */ - - stylus: function(str, options){ - var ret; - str = str.replace(/\\n/g, '\n'); - var stylus = require('stylus'); - stylus(str, options).render(function(err, css){ - if (err) throw err; - ret = css.replace(/\n/g, '\\n'); - }); - return ''; - }, - - /** - * Transform less to css, wrapped in style tags. - */ - - less: function(str){ - var ret; - str = str.replace(/\\n/g, '\n'); - require('less').render(str, function(err, css){ - if (err) throw err; - ret = ''; - }); - return ret; - }, - - /** - * Transform markdown to html. - */ - - markdown: function(str){ - var md; - - // support markdown / discount - try { - md = require('markdown'); - } catch (err){ - try { - md = require('discount'); - } catch (err) { - try { - md = require('markdown-js'); - } catch (err) { - try { - md = require('marked'); - } catch (err) { - throw new - Error('Cannot find markdown library, install markdown, discount, or marked.'); - } - } - } - } - - str = str.replace(/\\n/g, '\n'); - return md.parse(str).replace(/\n/g, '\\n').replace(/'/g,'''); - }, - - /** - * Transform coffeescript to javascript. - */ - - coffeescript: function(str){ - str = str.replace(/\\n/g, '\n'); - var js = require('coffee-script').compile(str).replace(/\\/g, '\\\\').replace(/\n/g, '\\n'); - return ''; - } -}; diff --git a/cli/node_modules/mocha/node_modules/jade/lib/inline-tags.js b/cli/node_modules/mocha/node_modules/jade/lib/inline-tags.js deleted file mode 100644 index 491de0b51..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/inline-tags.js +++ /dev/null @@ -1,28 +0,0 @@ - -/*! - * Jade - inline tags - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = [ - 'a' - , 'abbr' - , 'acronym' - , 'b' - , 'br' - , 'code' - , 'em' - , 'font' - , 'i' - , 'img' - , 'ins' - , 'kbd' - , 'map' - , 'samp' - , 'small' - , 'span' - , 'strong' - , 'sub' - , 'sup' -]; \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/lib/jade.js b/cli/node_modules/mocha/node_modules/jade/lib/jade.js deleted file mode 100644 index 00f0abb1d..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/jade.js +++ /dev/null @@ -1,237 +0,0 @@ -/*! - * Jade - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Parser = require('./parser') - , Lexer = require('./lexer') - , Compiler = require('./compiler') - , runtime = require('./runtime') -// if node - , fs = require('fs'); -// end - -/** - * Library version. - */ - -exports.version = '0.26.3'; - -/** - * Expose self closing tags. - */ - -exports.selfClosing = require('./self-closing'); - -/** - * Default supported doctypes. - */ - -exports.doctypes = require('./doctypes'); - -/** - * Text filters. - */ - -exports.filters = require('./filters'); - -/** - * Utilities. - */ - -exports.utils = require('./utils'); - -/** - * Expose `Compiler`. - */ - -exports.Compiler = Compiler; - -/** - * Expose `Parser`. - */ - -exports.Parser = Parser; - -/** - * Expose `Lexer`. - */ - -exports.Lexer = Lexer; - -/** - * Nodes. - */ - -exports.nodes = require('./nodes'); - -/** - * Jade runtime helpers. - */ - -exports.runtime = runtime; - -/** - * Template function cache. - */ - -exports.cache = {}; - -/** - * Parse the given `str` of jade and return a function body. - * - * @param {String} str - * @param {Object} options - * @return {String} - * @api private - */ - -function parse(str, options){ - try { - // Parse - var parser = new Parser(str, options.filename, options); - - // Compile - var compiler = new (options.compiler || Compiler)(parser.parse(), options) - , js = compiler.compile(); - - // Debug compiler - if (options.debug) { - console.error('\nCompiled Function:\n\n\033[90m%s\033[0m', js.replace(/^/gm, ' ')); - } - - return '' - + 'var buf = [];\n' - + (options.self - ? 'var self = locals || {};\n' + js - : 'with (locals || {}) {\n' + js + '\n}\n') - + 'return buf.join("");'; - } catch (err) { - parser = parser.context(); - runtime.rethrow(err, parser.filename, parser.lexer.lineno); - } -} - -/** - * Compile a `Function` representation of the given jade `str`. - * - * Options: - * - * - `compileDebug` when `false` debugging code is stripped from the compiled template - * - `client` when `true` the helper functions `escape()` etc will reference `jade.escape()` - * for use with the Jade client-side runtime.js - * - * @param {String} str - * @param {Options} options - * @return {Function} - * @api public - */ - -exports.compile = function(str, options){ - var options = options || {} - , client = options.client - , filename = options.filename - ? JSON.stringify(options.filename) - : 'undefined' - , fn; - - if (options.compileDebug !== false) { - fn = [ - 'var __jade = [{ lineno: 1, filename: ' + filename + ' }];' - , 'try {' - , parse(String(str), options) - , '} catch (err) {' - , ' rethrow(err, __jade[0].filename, __jade[0].lineno);' - , '}' - ].join('\n'); - } else { - fn = parse(String(str), options); - } - - if (client) { - fn = 'attrs = attrs || jade.attrs; escape = escape || jade.escape; rethrow = rethrow || jade.rethrow; merge = merge || jade.merge;\n' + fn; - } - - fn = new Function('locals, attrs, escape, rethrow, merge', fn); - - if (client) return fn; - - return function(locals){ - return fn(locals, runtime.attrs, runtime.escape, runtime.rethrow, runtime.merge); - }; -}; - -/** - * Render the given `str` of jade and invoke - * the callback `fn(err, str)`. - * - * Options: - * - * - `cache` enable template caching - * - `filename` filename required for `include` / `extends` and caching - * - * @param {String} str - * @param {Object|Function} options or fn - * @param {Function} fn - * @api public - */ - -exports.render = function(str, options, fn){ - // swap args - if ('function' == typeof options) { - fn = options, options = {}; - } - - // cache requires .filename - if (options.cache && !options.filename) { - return fn(new Error('the "filename" option is required for caching')); - } - - try { - var path = options.filename; - var tmpl = options.cache - ? exports.cache[path] || (exports.cache[path] = exports.compile(str, options)) - : exports.compile(str, options); - fn(null, tmpl(options)); - } catch (err) { - fn(err); - } -}; - -/** - * Render a Jade file at the given `path` and callback `fn(err, str)`. - * - * @param {String} path - * @param {Object|Function} options or callback - * @param {Function} fn - * @api public - */ - -exports.renderFile = function(path, options, fn){ - var key = path + ':string'; - - if ('function' == typeof options) { - fn = options, options = {}; - } - - try { - options.filename = path; - var str = options.cache - ? exports.cache[key] || (exports.cache[key] = fs.readFileSync(path, 'utf8')) - : fs.readFileSync(path, 'utf8'); - exports.render(str, options, fn); - } catch (err) { - fn(err); - } -}; - -/** - * Express support. - */ - -exports.__express = exports.renderFile; diff --git a/cli/node_modules/mocha/node_modules/jade/lib/lexer.js b/cli/node_modules/mocha/node_modules/jade/lib/lexer.js deleted file mode 100644 index bca314a9f..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/lexer.js +++ /dev/null @@ -1,771 +0,0 @@ - -/*! - * Jade - Lexer - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Initialize `Lexer` with the given `str`. - * - * Options: - * - * - `colons` allow colons for attr delimiters - * - * @param {String} str - * @param {Object} options - * @api private - */ - -var Lexer = module.exports = function Lexer(str, options) { - options = options || {}; - this.input = str.replace(/\r\n|\r/g, '\n'); - this.colons = options.colons; - this.deferredTokens = []; - this.lastIndents = 0; - this.lineno = 1; - this.stash = []; - this.indentStack = []; - this.indentRe = null; - this.pipeless = false; -}; - -/** - * Lexer prototype. - */ - -Lexer.prototype = { - - /** - * Construct a token with the given `type` and `val`. - * - * @param {String} type - * @param {String} val - * @return {Object} - * @api private - */ - - tok: function(type, val){ - return { - type: type - , line: this.lineno - , val: val - } - }, - - /** - * Consume the given `len` of input. - * - * @param {Number} len - * @api private - */ - - consume: function(len){ - this.input = this.input.substr(len); - }, - - /** - * Scan for `type` with the given `regexp`. - * - * @param {String} type - * @param {RegExp} regexp - * @return {Object} - * @api private - */ - - scan: function(regexp, type){ - var captures; - if (captures = regexp.exec(this.input)) { - this.consume(captures[0].length); - return this.tok(type, captures[1]); - } - }, - - /** - * Defer the given `tok`. - * - * @param {Object} tok - * @api private - */ - - defer: function(tok){ - this.deferredTokens.push(tok); - }, - - /** - * Lookahead `n` tokens. - * - * @param {Number} n - * @return {Object} - * @api private - */ - - lookahead: function(n){ - var fetch = n - this.stash.length; - while (fetch-- > 0) this.stash.push(this.next()); - return this.stash[--n]; - }, - - /** - * Return the indexOf `start` / `end` delimiters. - * - * @param {String} start - * @param {String} end - * @return {Number} - * @api private - */ - - indexOfDelimiters: function(start, end){ - var str = this.input - , nstart = 0 - , nend = 0 - , pos = 0; - for (var i = 0, len = str.length; i < len; ++i) { - if (start == str.charAt(i)) { - ++nstart; - } else if (end == str.charAt(i)) { - if (++nend == nstart) { - pos = i; - break; - } - } - } - return pos; - }, - - /** - * Stashed token. - */ - - stashed: function() { - return this.stash.length - && this.stash.shift(); - }, - - /** - * Deferred token. - */ - - deferred: function() { - return this.deferredTokens.length - && this.deferredTokens.shift(); - }, - - /** - * end-of-source. - */ - - eos: function() { - if (this.input.length) return; - if (this.indentStack.length) { - this.indentStack.shift(); - return this.tok('outdent'); - } else { - return this.tok('eos'); - } - }, - - /** - * Blank line. - */ - - blank: function() { - var captures; - if (captures = /^\n *\n/.exec(this.input)) { - this.consume(captures[0].length - 1); - if (this.pipeless) return this.tok('text', ''); - return this.next(); - } - }, - - /** - * Comment. - */ - - comment: function() { - var captures; - if (captures = /^ *\/\/(-)?([^\n]*)/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('comment', captures[2]); - tok.buffer = '-' != captures[1]; - return tok; - } - }, - - /** - * Interpolated tag. - */ - - interpolation: function() { - var captures; - if (captures = /^#\{(.*?)\}/.exec(this.input)) { - this.consume(captures[0].length); - return this.tok('interpolation', captures[1]); - } - }, - - /** - * Tag. - */ - - tag: function() { - var captures; - if (captures = /^(\w[-:\w]*)(\/?)/.exec(this.input)) { - this.consume(captures[0].length); - var tok, name = captures[1]; - if (':' == name[name.length - 1]) { - name = name.slice(0, -1); - tok = this.tok('tag', name); - this.defer(this.tok(':')); - while (' ' == this.input[0]) this.input = this.input.substr(1); - } else { - tok = this.tok('tag', name); - } - tok.selfClosing = !! captures[2]; - return tok; - } - }, - - /** - * Filter. - */ - - filter: function() { - return this.scan(/^:(\w+)/, 'filter'); - }, - - /** - * Doctype. - */ - - doctype: function() { - return this.scan(/^(?:!!!|doctype) *([^\n]+)?/, 'doctype'); - }, - - /** - * Id. - */ - - id: function() { - return this.scan(/^#([\w-]+)/, 'id'); - }, - - /** - * Class. - */ - - className: function() { - return this.scan(/^\.([\w-]+)/, 'class'); - }, - - /** - * Text. - */ - - text: function() { - return this.scan(/^(?:\| ?| ?)?([^\n]+)/, 'text'); - }, - - /** - * Extends. - */ - - "extends": function() { - return this.scan(/^extends? +([^\n]+)/, 'extends'); - }, - - /** - * Block prepend. - */ - - prepend: function() { - var captures; - if (captures = /^prepend +([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var mode = 'prepend' - , name = captures[1] - , tok = this.tok('block', name); - tok.mode = mode; - return tok; - } - }, - - /** - * Block append. - */ - - append: function() { - var captures; - if (captures = /^append +([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var mode = 'append' - , name = captures[1] - , tok = this.tok('block', name); - tok.mode = mode; - return tok; - } - }, - - /** - * Block. - */ - - block: function() { - var captures; - if (captures = /^block\b *(?:(prepend|append) +)?([^\n]*)/.exec(this.input)) { - this.consume(captures[0].length); - var mode = captures[1] || 'replace' - , name = captures[2] - , tok = this.tok('block', name); - - tok.mode = mode; - return tok; - } - }, - - /** - * Yield. - */ - - yield: function() { - return this.scan(/^yield */, 'yield'); - }, - - /** - * Include. - */ - - include: function() { - return this.scan(/^include +([^\n]+)/, 'include'); - }, - - /** - * Case. - */ - - "case": function() { - return this.scan(/^case +([^\n]+)/, 'case'); - }, - - /** - * When. - */ - - when: function() { - return this.scan(/^when +([^:\n]+)/, 'when'); - }, - - /** - * Default. - */ - - "default": function() { - return this.scan(/^default */, 'default'); - }, - - /** - * Assignment. - */ - - assignment: function() { - var captures; - if (captures = /^(\w+) += *([^;\n]+)( *;? *)/.exec(this.input)) { - this.consume(captures[0].length); - var name = captures[1] - , val = captures[2]; - return this.tok('code', 'var ' + name + ' = (' + val + ');'); - } - }, - - /** - * Call mixin. - */ - - call: function(){ - var captures; - if (captures = /^\+([-\w]+)/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('call', captures[1]); - - // Check for args (not attributes) - if (captures = /^ *\((.*?)\)/.exec(this.input)) { - if (!/^ *[-\w]+ *=/.test(captures[1])) { - this.consume(captures[0].length); - tok.args = captures[1]; - } - } - - return tok; - } - }, - - /** - * Mixin. - */ - - mixin: function(){ - var captures; - if (captures = /^mixin +([-\w]+)(?: *\((.*)\))?/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('mixin', captures[1]); - tok.args = captures[2]; - return tok; - } - }, - - /** - * Conditional. - */ - - conditional: function() { - var captures; - if (captures = /^(if|unless|else if|else)\b([^\n]*)/.exec(this.input)) { - this.consume(captures[0].length); - var type = captures[1] - , js = captures[2]; - - switch (type) { - case 'if': js = 'if (' + js + ')'; break; - case 'unless': js = 'if (!(' + js + '))'; break; - case 'else if': js = 'else if (' + js + ')'; break; - case 'else': js = 'else'; break; - } - - return this.tok('code', js); - } - }, - - /** - * While. - */ - - "while": function() { - var captures; - if (captures = /^while +([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - return this.tok('code', 'while (' + captures[1] + ')'); - } - }, - - /** - * Each. - */ - - each: function() { - var captures; - if (captures = /^(?:- *)?(?:each|for) +(\w+)(?: *, *(\w+))? * in *([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('each', captures[1]); - tok.key = captures[2] || '$index'; - tok.code = captures[3]; - return tok; - } - }, - - /** - * Code. - */ - - code: function() { - var captures; - if (captures = /^(!?=|-)([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var flags = captures[1]; - captures[1] = captures[2]; - var tok = this.tok('code', captures[1]); - tok.escape = flags[0] === '='; - tok.buffer = flags[0] === '=' || flags[1] === '='; - return tok; - } - }, - - /** - * Attributes. - */ - - attrs: function() { - if ('(' == this.input.charAt(0)) { - var index = this.indexOfDelimiters('(', ')') - , str = this.input.substr(1, index-1) - , tok = this.tok('attrs') - , len = str.length - , colons = this.colons - , states = ['key'] - , escapedAttr - , key = '' - , val = '' - , quote - , c - , p; - - function state(){ - return states[states.length - 1]; - } - - function interpolate(attr) { - return attr.replace(/#\{([^}]+)\}/g, function(_, expr){ - return quote + " + (" + expr + ") + " + quote; - }); - } - - this.consume(index + 1); - tok.attrs = {}; - tok.escaped = {}; - - function parse(c) { - var real = c; - // TODO: remove when people fix ":" - if (colons && ':' == c) c = '='; - switch (c) { - case ',': - case '\n': - switch (state()) { - case 'expr': - case 'array': - case 'string': - case 'object': - val += c; - break; - default: - states.push('key'); - val = val.trim(); - key = key.trim(); - if ('' == key) return; - key = key.replace(/^['"]|['"]$/g, '').replace('!', ''); - tok.escaped[key] = escapedAttr; - tok.attrs[key] = '' == val - ? true - : interpolate(val); - key = val = ''; - } - break; - case '=': - switch (state()) { - case 'key char': - key += real; - break; - case 'val': - case 'expr': - case 'array': - case 'string': - case 'object': - val += real; - break; - default: - escapedAttr = '!' != p; - states.push('val'); - } - break; - case '(': - if ('val' == state() - || 'expr' == state()) states.push('expr'); - val += c; - break; - case ')': - if ('expr' == state() - || 'val' == state()) states.pop(); - val += c; - break; - case '{': - if ('val' == state()) states.push('object'); - val += c; - break; - case '}': - if ('object' == state()) states.pop(); - val += c; - break; - case '[': - if ('val' == state()) states.push('array'); - val += c; - break; - case ']': - if ('array' == state()) states.pop(); - val += c; - break; - case '"': - case "'": - switch (state()) { - case 'key': - states.push('key char'); - break; - case 'key char': - states.pop(); - break; - case 'string': - if (c == quote) states.pop(); - val += c; - break; - default: - states.push('string'); - val += c; - quote = c; - } - break; - case '': - break; - default: - switch (state()) { - case 'key': - case 'key char': - key += c; - break; - default: - val += c; - } - } - p = c; - } - - for (var i = 0; i < len; ++i) { - parse(str.charAt(i)); - } - - parse(','); - - if ('/' == this.input.charAt(0)) { - this.consume(1); - tok.selfClosing = true; - } - - return tok; - } - }, - - /** - * Indent | Outdent | Newline. - */ - - indent: function() { - var captures, re; - - // established regexp - if (this.indentRe) { - captures = this.indentRe.exec(this.input); - // determine regexp - } else { - // tabs - re = /^\n(\t*) */; - captures = re.exec(this.input); - - // spaces - if (captures && !captures[1].length) { - re = /^\n( *)/; - captures = re.exec(this.input); - } - - // established - if (captures && captures[1].length) this.indentRe = re; - } - - if (captures) { - var tok - , indents = captures[1].length; - - ++this.lineno; - this.consume(indents + 1); - - if (' ' == this.input[0] || '\t' == this.input[0]) { - throw new Error('Invalid indentation, you can use tabs or spaces but not both'); - } - - // blank line - if ('\n' == this.input[0]) return this.tok('newline'); - - // outdent - if (this.indentStack.length && indents < this.indentStack[0]) { - while (this.indentStack.length && this.indentStack[0] > indents) { - this.stash.push(this.tok('outdent')); - this.indentStack.shift(); - } - tok = this.stash.pop(); - // indent - } else if (indents && indents != this.indentStack[0]) { - this.indentStack.unshift(indents); - tok = this.tok('indent', indents); - // newline - } else { - tok = this.tok('newline'); - } - - return tok; - } - }, - - /** - * Pipe-less text consumed only when - * pipeless is true; - */ - - pipelessText: function() { - if (this.pipeless) { - if ('\n' == this.input[0]) return; - var i = this.input.indexOf('\n'); - if (-1 == i) i = this.input.length; - var str = this.input.substr(0, i); - this.consume(str.length); - return this.tok('text', str); - } - }, - - /** - * ':' - */ - - colon: function() { - return this.scan(/^: */, ':'); - }, - - /** - * Return the next token object, or those - * previously stashed by lookahead. - * - * @return {Object} - * @api private - */ - - advance: function(){ - return this.stashed() - || this.next(); - }, - - /** - * Return the next token object. - * - * @return {Object} - * @api private - */ - - next: function() { - return this.deferred() - || this.blank() - || this.eos() - || this.pipelessText() - || this.yield() - || this.doctype() - || this.interpolation() - || this["case"]() - || this.when() - || this["default"]() - || this["extends"]() - || this.append() - || this.prepend() - || this.block() - || this.include() - || this.mixin() - || this.call() - || this.conditional() - || this.each() - || this["while"]() - || this.assignment() - || this.tag() - || this.filter() - || this.code() - || this.id() - || this.className() - || this.attrs() - || this.indent() - || this.comment() - || this.colon() - || this.text(); - } -}; diff --git a/cli/node_modules/mocha/node_modules/jade/lib/nodes/attrs.js b/cli/node_modules/mocha/node_modules/jade/lib/nodes/attrs.js deleted file mode 100644 index 5de9b59cc..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/nodes/attrs.js +++ /dev/null @@ -1,77 +0,0 @@ - -/*! - * Jade - nodes - Attrs - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'), - Block = require('./block'); - -/** - * Initialize a `Attrs` node. - * - * @api public - */ - -var Attrs = module.exports = function Attrs() { - this.attrs = []; -}; - -/** - * Inherit from `Node`. - */ - -Attrs.prototype.__proto__ = Node.prototype; - -/** - * Set attribute `name` to `val`, keep in mind these become - * part of a raw js object literal, so to quote a value you must - * '"quote me"', otherwise or example 'user.name' is literal JavaScript. - * - * @param {String} name - * @param {String} val - * @param {Boolean} escaped - * @return {Tag} for chaining - * @api public - */ - -Attrs.prototype.setAttribute = function(name, val, escaped){ - this.attrs.push({ name: name, val: val, escaped: escaped }); - return this; -}; - -/** - * Remove attribute `name` when present. - * - * @param {String} name - * @api public - */ - -Attrs.prototype.removeAttribute = function(name){ - for (var i = 0, len = this.attrs.length; i < len; ++i) { - if (this.attrs[i] && this.attrs[i].name == name) { - delete this.attrs[i]; - } - } -}; - -/** - * Get attribute value by `name`. - * - * @param {String} name - * @return {String} - * @api public - */ - -Attrs.prototype.getAttribute = function(name){ - for (var i = 0, len = this.attrs.length; i < len; ++i) { - if (this.attrs[i] && this.attrs[i].name == name) { - return this.attrs[i].val; - } - } -}; diff --git a/cli/node_modules/mocha/node_modules/jade/lib/nodes/block-comment.js b/cli/node_modules/mocha/node_modules/jade/lib/nodes/block-comment.js deleted file mode 100644 index 4f41e4a57..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/nodes/block-comment.js +++ /dev/null @@ -1,33 +0,0 @@ - -/*! - * Jade - nodes - BlockComment - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `BlockComment` with the given `block`. - * - * @param {String} val - * @param {Block} block - * @param {Boolean} buffer - * @api public - */ - -var BlockComment = module.exports = function BlockComment(val, block, buffer) { - this.block = block; - this.val = val; - this.buffer = buffer; -}; - -/** - * Inherit from `Node`. - */ - -BlockComment.prototype.__proto__ = Node.prototype; \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/lib/nodes/block.js b/cli/node_modules/mocha/node_modules/jade/lib/nodes/block.js deleted file mode 100644 index bb00a1d9b..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/nodes/block.js +++ /dev/null @@ -1,121 +0,0 @@ - -/*! - * Jade - nodes - Block - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a new `Block` with an optional `node`. - * - * @param {Node} node - * @api public - */ - -var Block = module.exports = function Block(node){ - this.nodes = []; - if (node) this.push(node); -}; - -/** - * Inherit from `Node`. - */ - -Block.prototype.__proto__ = Node.prototype; - -/** - * Block flag. - */ - -Block.prototype.isBlock = true; - -/** - * Replace the nodes in `other` with the nodes - * in `this` block. - * - * @param {Block} other - * @api private - */ - -Block.prototype.replace = function(other){ - other.nodes = this.nodes; -}; - -/** - * Pust the given `node`. - * - * @param {Node} node - * @return {Number} - * @api public - */ - -Block.prototype.push = function(node){ - return this.nodes.push(node); -}; - -/** - * Check if this block is empty. - * - * @return {Boolean} - * @api public - */ - -Block.prototype.isEmpty = function(){ - return 0 == this.nodes.length; -}; - -/** - * Unshift the given `node`. - * - * @param {Node} node - * @return {Number} - * @api public - */ - -Block.prototype.unshift = function(node){ - return this.nodes.unshift(node); -}; - -/** - * Return the "last" block, or the first `yield` node. - * - * @return {Block} - * @api private - */ - -Block.prototype.includeBlock = function(){ - var ret = this - , node; - - for (var i = 0, len = this.nodes.length; i < len; ++i) { - node = this.nodes[i]; - if (node.yield) return node; - else if (node.textOnly) continue; - else if (node.includeBlock) ret = node.includeBlock(); - else if (node.block && !node.block.isEmpty()) ret = node.block.includeBlock(); - } - - return ret; -}; - -/** - * Return a clone of this block. - * - * @return {Block} - * @api private - */ - -Block.prototype.clone = function(){ - var clone = new Block; - for (var i = 0, len = this.nodes.length; i < len; ++i) { - clone.push(this.nodes[i].clone()); - } - return clone; -}; - diff --git a/cli/node_modules/mocha/node_modules/jade/lib/nodes/case.js b/cli/node_modules/mocha/node_modules/jade/lib/nodes/case.js deleted file mode 100644 index 08ff03378..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/nodes/case.js +++ /dev/null @@ -1,43 +0,0 @@ - -/*! - * Jade - nodes - Case - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a new `Case` with `expr`. - * - * @param {String} expr - * @api public - */ - -var Case = exports = module.exports = function Case(expr, block){ - this.expr = expr; - this.block = block; -}; - -/** - * Inherit from `Node`. - */ - -Case.prototype.__proto__ = Node.prototype; - -var When = exports.When = function When(expr, block){ - this.expr = expr; - this.block = block; - this.debug = false; -}; - -/** - * Inherit from `Node`. - */ - -When.prototype.__proto__ = Node.prototype; - diff --git a/cli/node_modules/mocha/node_modules/jade/lib/nodes/code.js b/cli/node_modules/mocha/node_modules/jade/lib/nodes/code.js deleted file mode 100644 index babc67598..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/nodes/code.js +++ /dev/null @@ -1,35 +0,0 @@ - -/*! - * Jade - nodes - Code - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Code` node with the given code `val`. - * Code may also be optionally buffered and escaped. - * - * @param {String} val - * @param {Boolean} buffer - * @param {Boolean} escape - * @api public - */ - -var Code = module.exports = function Code(val, buffer, escape) { - this.val = val; - this.buffer = buffer; - this.escape = escape; - if (val.match(/^ *else/)) this.debug = false; -}; - -/** - * Inherit from `Node`. - */ - -Code.prototype.__proto__ = Node.prototype; \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/lib/nodes/comment.js b/cli/node_modules/mocha/node_modules/jade/lib/nodes/comment.js deleted file mode 100644 index 2e1469e7e..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/nodes/comment.js +++ /dev/null @@ -1,32 +0,0 @@ - -/*! - * Jade - nodes - Comment - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Comment` with the given `val`, optionally `buffer`, - * otherwise the comment may render in the output. - * - * @param {String} val - * @param {Boolean} buffer - * @api public - */ - -var Comment = module.exports = function Comment(val, buffer) { - this.val = val; - this.buffer = buffer; -}; - -/** - * Inherit from `Node`. - */ - -Comment.prototype.__proto__ = Node.prototype; \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/lib/nodes/doctype.js b/cli/node_modules/mocha/node_modules/jade/lib/nodes/doctype.js deleted file mode 100644 index b8f33e56c..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/nodes/doctype.js +++ /dev/null @@ -1,29 +0,0 @@ - -/*! - * Jade - nodes - Doctype - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Doctype` with the given `val`. - * - * @param {String} val - * @api public - */ - -var Doctype = module.exports = function Doctype(val) { - this.val = val; -}; - -/** - * Inherit from `Node`. - */ - -Doctype.prototype.__proto__ = Node.prototype; \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/lib/nodes/each.js b/cli/node_modules/mocha/node_modules/jade/lib/nodes/each.js deleted file mode 100644 index f54101f13..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/nodes/each.js +++ /dev/null @@ -1,35 +0,0 @@ - -/*! - * Jade - nodes - Each - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize an `Each` node, representing iteration - * - * @param {String} obj - * @param {String} val - * @param {String} key - * @param {Block} block - * @api public - */ - -var Each = module.exports = function Each(obj, val, key, block) { - this.obj = obj; - this.val = val; - this.key = key; - this.block = block; -}; - -/** - * Inherit from `Node`. - */ - -Each.prototype.__proto__ = Node.prototype; \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/lib/nodes/filter.js b/cli/node_modules/mocha/node_modules/jade/lib/nodes/filter.js deleted file mode 100644 index 851a0040a..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/nodes/filter.js +++ /dev/null @@ -1,35 +0,0 @@ - -/*! - * Jade - nodes - Filter - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node') - , Block = require('./block'); - -/** - * Initialize a `Filter` node with the given - * filter `name` and `block`. - * - * @param {String} name - * @param {Block|Node} block - * @api public - */ - -var Filter = module.exports = function Filter(name, block, attrs) { - this.name = name; - this.block = block; - this.attrs = attrs; - this.isASTFilter = !block.nodes.every(function(node){ return node.isText }); -}; - -/** - * Inherit from `Node`. - */ - -Filter.prototype.__proto__ = Node.prototype; \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/lib/nodes/index.js b/cli/node_modules/mocha/node_modules/jade/lib/nodes/index.js deleted file mode 100644 index 386ad2f9d..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/nodes/index.js +++ /dev/null @@ -1,20 +0,0 @@ - -/*! - * Jade - nodes - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -exports.Node = require('./node'); -exports.Tag = require('./tag'); -exports.Code = require('./code'); -exports.Each = require('./each'); -exports.Case = require('./case'); -exports.Text = require('./text'); -exports.Block = require('./block'); -exports.Mixin = require('./mixin'); -exports.Filter = require('./filter'); -exports.Comment = require('./comment'); -exports.Literal = require('./literal'); -exports.BlockComment = require('./block-comment'); -exports.Doctype = require('./doctype'); diff --git a/cli/node_modules/mocha/node_modules/jade/lib/nodes/literal.js b/cli/node_modules/mocha/node_modules/jade/lib/nodes/literal.js deleted file mode 100644 index fde586be0..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/nodes/literal.js +++ /dev/null @@ -1,32 +0,0 @@ - -/*! - * Jade - nodes - Literal - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Literal` node with the given `str. - * - * @param {String} str - * @api public - */ - -var Literal = module.exports = function Literal(str) { - this.str = str - .replace(/\\/g, "\\\\") - .replace(/\n|\r\n/g, "\\n") - .replace(/'/g, "\\'"); -}; - -/** - * Inherit from `Node`. - */ - -Literal.prototype.__proto__ = Node.prototype; diff --git a/cli/node_modules/mocha/node_modules/jade/lib/nodes/mixin.js b/cli/node_modules/mocha/node_modules/jade/lib/nodes/mixin.js deleted file mode 100644 index 8407bc792..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/nodes/mixin.js +++ /dev/null @@ -1,36 +0,0 @@ - -/*! - * Jade - nodes - Mixin - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Attrs = require('./attrs'); - -/** - * Initialize a new `Mixin` with `name` and `block`. - * - * @param {String} name - * @param {String} args - * @param {Block} block - * @api public - */ - -var Mixin = module.exports = function Mixin(name, args, block, call){ - this.name = name; - this.args = args; - this.block = block; - this.attrs = []; - this.call = call; -}; - -/** - * Inherit from `Attrs`. - */ - -Mixin.prototype.__proto__ = Attrs.prototype; - diff --git a/cli/node_modules/mocha/node_modules/jade/lib/nodes/node.js b/cli/node_modules/mocha/node_modules/jade/lib/nodes/node.js deleted file mode 100644 index e98f042c5..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/nodes/node.js +++ /dev/null @@ -1,25 +0,0 @@ - -/*! - * Jade - nodes - Node - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Initialize a `Node`. - * - * @api public - */ - -var Node = module.exports = function Node(){}; - -/** - * Clone this node (return itself) - * - * @return {Node} - * @api private - */ - -Node.prototype.clone = function(){ - return this; -}; diff --git a/cli/node_modules/mocha/node_modules/jade/lib/nodes/tag.js b/cli/node_modules/mocha/node_modules/jade/lib/nodes/tag.js deleted file mode 100644 index 4b6728adc..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/nodes/tag.js +++ /dev/null @@ -1,95 +0,0 @@ - -/*! - * Jade - nodes - Tag - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Attrs = require('./attrs'), - Block = require('./block'), - inlineTags = require('../inline-tags'); - -/** - * Initialize a `Tag` node with the given tag `name` and optional `block`. - * - * @param {String} name - * @param {Block} block - * @api public - */ - -var Tag = module.exports = function Tag(name, block) { - this.name = name; - this.attrs = []; - this.block = block || new Block; -}; - -/** - * Inherit from `Attrs`. - */ - -Tag.prototype.__proto__ = Attrs.prototype; - -/** - * Clone this tag. - * - * @return {Tag} - * @api private - */ - -Tag.prototype.clone = function(){ - var clone = new Tag(this.name, this.block.clone()); - clone.line = this.line; - clone.attrs = this.attrs; - clone.textOnly = this.textOnly; - return clone; -}; - -/** - * Check if this tag is an inline tag. - * - * @return {Boolean} - * @api private - */ - -Tag.prototype.isInline = function(){ - return ~inlineTags.indexOf(this.name); -}; - -/** - * Check if this tag's contents can be inlined. Used for pretty printing. - * - * @return {Boolean} - * @api private - */ - -Tag.prototype.canInline = function(){ - var nodes = this.block.nodes; - - function isInline(node){ - // Recurse if the node is a block - if (node.isBlock) return node.nodes.every(isInline); - return node.isText || (node.isInline && node.isInline()); - } - - // Empty tag - if (!nodes.length) return true; - - // Text-only or inline-only tag - if (1 == nodes.length) return isInline(nodes[0]); - - // Multi-line inline-only tag - if (this.block.nodes.every(isInline)) { - for (var i = 1, len = nodes.length; i < len; ++i) { - if (nodes[i-1].isText && nodes[i].isText) - return false; - } - return true; - } - - // Mixed tag - return false; -}; \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/lib/nodes/text.js b/cli/node_modules/mocha/node_modules/jade/lib/nodes/text.js deleted file mode 100644 index 3b5dd5573..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/nodes/text.js +++ /dev/null @@ -1,36 +0,0 @@ - -/*! - * Jade - nodes - Text - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Text` node with optional `line`. - * - * @param {String} line - * @api public - */ - -var Text = module.exports = function Text(line) { - this.val = ''; - if ('string' == typeof line) this.val = line; -}; - -/** - * Inherit from `Node`. - */ - -Text.prototype.__proto__ = Node.prototype; - -/** - * Flag as text. - */ - -Text.prototype.isText = true; \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/lib/parser.js b/cli/node_modules/mocha/node_modules/jade/lib/parser.js deleted file mode 100644 index 92f2af0cd..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/parser.js +++ /dev/null @@ -1,710 +0,0 @@ - -/*! - * Jade - Parser - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Lexer = require('./lexer') - , nodes = require('./nodes'); - -/** - * Initialize `Parser` with the given input `str` and `filename`. - * - * @param {String} str - * @param {String} filename - * @param {Object} options - * @api public - */ - -var Parser = exports = module.exports = function Parser(str, filename, options){ - this.input = str; - this.lexer = new Lexer(str, options); - this.filename = filename; - this.blocks = {}; - this.mixins = {}; - this.options = options; - this.contexts = [this]; -}; - -/** - * Tags that may not contain tags. - */ - -var textOnly = exports.textOnly = ['script', 'style']; - -/** - * Parser prototype. - */ - -Parser.prototype = { - - /** - * Push `parser` onto the context stack, - * or pop and return a `Parser`. - */ - - context: function(parser){ - if (parser) { - this.contexts.push(parser); - } else { - return this.contexts.pop(); - } - }, - - /** - * Return the next token object. - * - * @return {Object} - * @api private - */ - - advance: function(){ - return this.lexer.advance(); - }, - - /** - * Skip `n` tokens. - * - * @param {Number} n - * @api private - */ - - skip: function(n){ - while (n--) this.advance(); - }, - - /** - * Single token lookahead. - * - * @return {Object} - * @api private - */ - - peek: function() { - return this.lookahead(1); - }, - - /** - * Return lexer lineno. - * - * @return {Number} - * @api private - */ - - line: function() { - return this.lexer.lineno; - }, - - /** - * `n` token lookahead. - * - * @param {Number} n - * @return {Object} - * @api private - */ - - lookahead: function(n){ - return this.lexer.lookahead(n); - }, - - /** - * Parse input returning a string of js for evaluation. - * - * @return {String} - * @api public - */ - - parse: function(){ - var block = new nodes.Block, parser; - block.line = this.line(); - - while ('eos' != this.peek().type) { - if ('newline' == this.peek().type) { - this.advance(); - } else { - block.push(this.parseExpr()); - } - } - - if (parser = this.extending) { - this.context(parser); - var ast = parser.parse(); - this.context(); - // hoist mixins - for (var name in this.mixins) - ast.unshift(this.mixins[name]); - return ast; - } - - return block; - }, - - /** - * Expect the given type, or throw an exception. - * - * @param {String} type - * @api private - */ - - expect: function(type){ - if (this.peek().type === type) { - return this.advance(); - } else { - throw new Error('expected "' + type + '", but got "' + this.peek().type + '"'); - } - }, - - /** - * Accept the given `type`. - * - * @param {String} type - * @api private - */ - - accept: function(type){ - if (this.peek().type === type) { - return this.advance(); - } - }, - - /** - * tag - * | doctype - * | mixin - * | include - * | filter - * | comment - * | text - * | each - * | code - * | yield - * | id - * | class - * | interpolation - */ - - parseExpr: function(){ - switch (this.peek().type) { - case 'tag': - return this.parseTag(); - case 'mixin': - return this.parseMixin(); - case 'block': - return this.parseBlock(); - case 'case': - return this.parseCase(); - case 'when': - return this.parseWhen(); - case 'default': - return this.parseDefault(); - case 'extends': - return this.parseExtends(); - case 'include': - return this.parseInclude(); - case 'doctype': - return this.parseDoctype(); - case 'filter': - return this.parseFilter(); - case 'comment': - return this.parseComment(); - case 'text': - return this.parseText(); - case 'each': - return this.parseEach(); - case 'code': - return this.parseCode(); - case 'call': - return this.parseCall(); - case 'interpolation': - return this.parseInterpolation(); - case 'yield': - this.advance(); - var block = new nodes.Block; - block.yield = true; - return block; - case 'id': - case 'class': - var tok = this.advance(); - this.lexer.defer(this.lexer.tok('tag', 'div')); - this.lexer.defer(tok); - return this.parseExpr(); - default: - throw new Error('unexpected token "' + this.peek().type + '"'); - } - }, - - /** - * Text - */ - - parseText: function(){ - var tok = this.expect('text') - , node = new nodes.Text(tok.val); - node.line = this.line(); - return node; - }, - - /** - * ':' expr - * | block - */ - - parseBlockExpansion: function(){ - if (':' == this.peek().type) { - this.advance(); - return new nodes.Block(this.parseExpr()); - } else { - return this.block(); - } - }, - - /** - * case - */ - - parseCase: function(){ - var val = this.expect('case').val - , node = new nodes.Case(val); - node.line = this.line(); - node.block = this.block(); - return node; - }, - - /** - * when - */ - - parseWhen: function(){ - var val = this.expect('when').val - return new nodes.Case.When(val, this.parseBlockExpansion()); - }, - - /** - * default - */ - - parseDefault: function(){ - this.expect('default'); - return new nodes.Case.When('default', this.parseBlockExpansion()); - }, - - /** - * code - */ - - parseCode: function(){ - var tok = this.expect('code') - , node = new nodes.Code(tok.val, tok.buffer, tok.escape) - , block - , i = 1; - node.line = this.line(); - while (this.lookahead(i) && 'newline' == this.lookahead(i).type) ++i; - block = 'indent' == this.lookahead(i).type; - if (block) { - this.skip(i-1); - node.block = this.block(); - } - return node; - }, - - /** - * comment - */ - - parseComment: function(){ - var tok = this.expect('comment') - , node; - - if ('indent' == this.peek().type) { - node = new nodes.BlockComment(tok.val, this.block(), tok.buffer); - } else { - node = new nodes.Comment(tok.val, tok.buffer); - } - - node.line = this.line(); - return node; - }, - - /** - * doctype - */ - - parseDoctype: function(){ - var tok = this.expect('doctype') - , node = new nodes.Doctype(tok.val); - node.line = this.line(); - return node; - }, - - /** - * filter attrs? text-block - */ - - parseFilter: function(){ - var block - , tok = this.expect('filter') - , attrs = this.accept('attrs'); - - this.lexer.pipeless = true; - block = this.parseTextBlock(); - this.lexer.pipeless = false; - - var node = new nodes.Filter(tok.val, block, attrs && attrs.attrs); - node.line = this.line(); - return node; - }, - - /** - * tag ':' attrs? block - */ - - parseASTFilter: function(){ - var block - , tok = this.expect('tag') - , attrs = this.accept('attrs'); - - this.expect(':'); - block = this.block(); - - var node = new nodes.Filter(tok.val, block, attrs && attrs.attrs); - node.line = this.line(); - return node; - }, - - /** - * each block - */ - - parseEach: function(){ - var tok = this.expect('each') - , node = new nodes.Each(tok.code, tok.val, tok.key); - node.line = this.line(); - node.block = this.block(); - return node; - }, - - /** - * 'extends' name - */ - - parseExtends: function(){ - var path = require('path') - , fs = require('fs') - , dirname = path.dirname - , basename = path.basename - , join = path.join; - - if (!this.filename) - throw new Error('the "filename" option is required to extend templates'); - - var path = this.expect('extends').val.trim() - , dir = dirname(this.filename); - - var path = join(dir, path + '.jade') - , str = fs.readFileSync(path, 'utf8') - , parser = new Parser(str, path, this.options); - - parser.blocks = this.blocks; - parser.contexts = this.contexts; - this.extending = parser; - - // TODO: null node - return new nodes.Literal(''); - }, - - /** - * 'block' name block - */ - - parseBlock: function(){ - var block = this.expect('block') - , mode = block.mode - , name = block.val.trim(); - - block = 'indent' == this.peek().type - ? this.block() - : new nodes.Block(new nodes.Literal('')); - - var prev = this.blocks[name]; - - if (prev) { - switch (prev.mode) { - case 'append': - block.nodes = block.nodes.concat(prev.nodes); - prev = block; - break; - case 'prepend': - block.nodes = prev.nodes.concat(block.nodes); - prev = block; - break; - } - } - - block.mode = mode; - return this.blocks[name] = prev || block; - }, - - /** - * include block? - */ - - parseInclude: function(){ - var path = require('path') - , fs = require('fs') - , dirname = path.dirname - , basename = path.basename - , join = path.join; - - var path = this.expect('include').val.trim() - , dir = dirname(this.filename); - - if (!this.filename) - throw new Error('the "filename" option is required to use includes'); - - // no extension - if (!~basename(path).indexOf('.')) { - path += '.jade'; - } - - // non-jade - if ('.jade' != path.substr(-5)) { - var path = join(dir, path) - , str = fs.readFileSync(path, 'utf8'); - return new nodes.Literal(str); - } - - var path = join(dir, path) - , str = fs.readFileSync(path, 'utf8') - , parser = new Parser(str, path, this.options); - parser.blocks = this.blocks; - parser.mixins = this.mixins; - - this.context(parser); - var ast = parser.parse(); - this.context(); - ast.filename = path; - - if ('indent' == this.peek().type) { - ast.includeBlock().push(this.block()); - } - - return ast; - }, - - /** - * call ident block - */ - - parseCall: function(){ - var tok = this.expect('call') - , name = tok.val - , args = tok.args - , mixin = new nodes.Mixin(name, args, new nodes.Block, true); - - this.tag(mixin); - if (mixin.block.isEmpty()) mixin.block = null; - return mixin; - }, - - /** - * mixin block - */ - - parseMixin: function(){ - var tok = this.expect('mixin') - , name = tok.val - , args = tok.args - , mixin; - - // definition - if ('indent' == this.peek().type) { - mixin = new nodes.Mixin(name, args, this.block(), false); - this.mixins[name] = mixin; - return mixin; - // call - } else { - return new nodes.Mixin(name, args, null, true); - } - }, - - /** - * indent (text | newline)* outdent - */ - - parseTextBlock: function(){ - var block = new nodes.Block; - block.line = this.line(); - var spaces = this.expect('indent').val; - if (null == this._spaces) this._spaces = spaces; - var indent = Array(spaces - this._spaces + 1).join(' '); - while ('outdent' != this.peek().type) { - switch (this.peek().type) { - case 'newline': - this.advance(); - break; - case 'indent': - this.parseTextBlock().nodes.forEach(function(node){ - block.push(node); - }); - break; - default: - var text = new nodes.Text(indent + this.advance().val); - text.line = this.line(); - block.push(text); - } - } - - if (spaces == this._spaces) this._spaces = null; - this.expect('outdent'); - return block; - }, - - /** - * indent expr* outdent - */ - - block: function(){ - var block = new nodes.Block; - block.line = this.line(); - this.expect('indent'); - while ('outdent' != this.peek().type) { - if ('newline' == this.peek().type) { - this.advance(); - } else { - block.push(this.parseExpr()); - } - } - this.expect('outdent'); - return block; - }, - - /** - * interpolation (attrs | class | id)* (text | code | ':')? newline* block? - */ - - parseInterpolation: function(){ - var tok = this.advance(); - var tag = new nodes.Tag(tok.val); - tag.buffer = true; - return this.tag(tag); - }, - - /** - * tag (attrs | class | id)* (text | code | ':')? newline* block? - */ - - parseTag: function(){ - // ast-filter look-ahead - var i = 2; - if ('attrs' == this.lookahead(i).type) ++i; - if (':' == this.lookahead(i).type) { - if ('indent' == this.lookahead(++i).type) { - return this.parseASTFilter(); - } - } - - var tok = this.advance() - , tag = new nodes.Tag(tok.val); - - tag.selfClosing = tok.selfClosing; - - return this.tag(tag); - }, - - /** - * Parse tag. - */ - - tag: function(tag){ - var dot; - - tag.line = this.line(); - - // (attrs | class | id)* - out: - while (true) { - switch (this.peek().type) { - case 'id': - case 'class': - var tok = this.advance(); - tag.setAttribute(tok.type, "'" + tok.val + "'"); - continue; - case 'attrs': - var tok = this.advance() - , obj = tok.attrs - , escaped = tok.escaped - , names = Object.keys(obj); - - if (tok.selfClosing) tag.selfClosing = true; - - for (var i = 0, len = names.length; i < len; ++i) { - var name = names[i] - , val = obj[name]; - tag.setAttribute(name, val, escaped[name]); - } - continue; - default: - break out; - } - } - - // check immediate '.' - if ('.' == this.peek().val) { - dot = tag.textOnly = true; - this.advance(); - } - - // (text | code | ':')? - switch (this.peek().type) { - case 'text': - tag.block.push(this.parseText()); - break; - case 'code': - tag.code = this.parseCode(); - break; - case ':': - this.advance(); - tag.block = new nodes.Block; - tag.block.push(this.parseExpr()); - break; - } - - // newline* - while ('newline' == this.peek().type) this.advance(); - - tag.textOnly = tag.textOnly || ~textOnly.indexOf(tag.name); - - // script special-case - if ('script' == tag.name) { - var type = tag.getAttribute('type'); - if (!dot && type && 'text/javascript' != type.replace(/^['"]|['"]$/g, '')) { - tag.textOnly = false; - } - } - - // block? - if ('indent' == this.peek().type) { - if (tag.textOnly) { - this.lexer.pipeless = true; - tag.block = this.parseTextBlock(); - this.lexer.pipeless = false; - } else { - var block = this.block(); - if (tag.block) { - for (var i = 0, len = block.nodes.length; i < len; ++i) { - tag.block.push(block.nodes[i]); - } - } else { - tag.block = block; - } - } - } - - return tag; - } -}; diff --git a/cli/node_modules/mocha/node_modules/jade/lib/runtime.js b/cli/node_modules/mocha/node_modules/jade/lib/runtime.js deleted file mode 100644 index fb711f5e0..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/runtime.js +++ /dev/null @@ -1,174 +0,0 @@ - -/*! - * Jade - runtime - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Lame Array.isArray() polyfill for now. - */ - -if (!Array.isArray) { - Array.isArray = function(arr){ - return '[object Array]' == Object.prototype.toString.call(arr); - }; -} - -/** - * Lame Object.keys() polyfill for now. - */ - -if (!Object.keys) { - Object.keys = function(obj){ - var arr = []; - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - arr.push(key); - } - } - return arr; - } -} - -/** - * Merge two attribute objects giving precedence - * to values in object `b`. Classes are special-cased - * allowing for arrays and merging/joining appropriately - * resulting in a string. - * - * @param {Object} a - * @param {Object} b - * @return {Object} a - * @api private - */ - -exports.merge = function merge(a, b) { - var ac = a['class']; - var bc = b['class']; - - if (ac || bc) { - ac = ac || []; - bc = bc || []; - if (!Array.isArray(ac)) ac = [ac]; - if (!Array.isArray(bc)) bc = [bc]; - ac = ac.filter(nulls); - bc = bc.filter(nulls); - a['class'] = ac.concat(bc).join(' '); - } - - for (var key in b) { - if (key != 'class') { - a[key] = b[key]; - } - } - - return a; -}; - -/** - * Filter null `val`s. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - -function nulls(val) { - return val != null; -} - -/** - * Render the given attributes object. - * - * @param {Object} obj - * @param {Object} escaped - * @return {String} - * @api private - */ - -exports.attrs = function attrs(obj, escaped){ - var buf = [] - , terse = obj.terse; - - delete obj.terse; - var keys = Object.keys(obj) - , len = keys.length; - - if (len) { - buf.push(''); - for (var i = 0; i < len; ++i) { - var key = keys[i] - , val = obj[key]; - - if ('boolean' == typeof val || null == val) { - if (val) { - terse - ? buf.push(key) - : buf.push(key + '="' + key + '"'); - } - } else if (0 == key.indexOf('data') && 'string' != typeof val) { - buf.push(key + "='" + JSON.stringify(val) + "'"); - } else if ('class' == key && Array.isArray(val)) { - buf.push(key + '="' + exports.escape(val.join(' ')) + '"'); - } else if (escaped && escaped[key]) { - buf.push(key + '="' + exports.escape(val) + '"'); - } else { - buf.push(key + '="' + val + '"'); - } - } - } - - return buf.join(' '); -}; - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function escape(html){ - return String(html) - .replace(/&(?!(\w+|\#\d+);)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -}; - -/** - * Re-throw the given `err` in context to the - * the jade in `filename` at the given `lineno`. - * - * @param {Error} err - * @param {String} filename - * @param {String} lineno - * @api private - */ - -exports.rethrow = function rethrow(err, filename, lineno){ - if (!filename) throw err; - - var context = 3 - , str = require('fs').readFileSync(filename, 'utf8') - , lines = str.split('\n') - , start = Math.max(lineno - context, 0) - , end = Math.min(lines.length, lineno + context); - - // Error context - var context = lines.slice(start, end).map(function(line, i){ - var curr = i + start + 1; - return (curr == lineno ? ' > ' : ' ') - + curr - + '| ' - + line; - }).join('\n'); - - // Alter exception message - err.path = filename; - err.message = (filename || 'Jade') + ':' + lineno - + '\n' + context + '\n\n' + err.message; - throw err; -}; diff --git a/cli/node_modules/mocha/node_modules/jade/lib/self-closing.js b/cli/node_modules/mocha/node_modules/jade/lib/self-closing.js deleted file mode 100644 index 054877121..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/self-closing.js +++ /dev/null @@ -1,19 +0,0 @@ - -/*! - * Jade - self closing tags - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = [ - 'meta' - , 'img' - , 'link' - , 'input' - , 'source' - , 'area' - , 'base' - , 'col' - , 'br' - , 'hr' -]; \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/lib/utils.js b/cli/node_modules/mocha/node_modules/jade/lib/utils.js deleted file mode 100644 index ff46d022d..000000000 --- a/cli/node_modules/mocha/node_modules/jade/lib/utils.js +++ /dev/null @@ -1,49 +0,0 @@ - -/*! - * Jade - utils - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Convert interpolation in the given string to JavaScript. - * - * @param {String} str - * @return {String} - * @api private - */ - -var interpolate = exports.interpolate = function(str){ - return str.replace(/(\\)?([#!]){(.*?)}/g, function(str, escape, flag, code){ - return escape - ? str - : "' + " - + ('!' == flag ? '' : 'escape') - + "((interp = " + code.replace(/\\'/g, "'") - + ") == null ? '' : interp) + '"; - }); -}; - -/** - * Escape single quotes in `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -var escape = exports.escape = function(str) { - return str.replace(/'/g, "\\'"); -}; - -/** - * Interpolate, and escape the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.text = function(str){ - return interpolate(escape(str)); -}; \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/commander/.npmignore b/cli/node_modules/mocha/node_modules/jade/node_modules/commander/.npmignore deleted file mode 100644 index f1250e584..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/commander/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/commander/.travis.yml b/cli/node_modules/mocha/node_modules/jade/node_modules/commander/.travis.yml deleted file mode 100644 index f1d0f13c8..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/commander/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/commander/History.md b/cli/node_modules/mocha/node_modules/jade/node_modules/commander/History.md deleted file mode 100644 index 4961d2e27..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/commander/History.md +++ /dev/null @@ -1,107 +0,0 @@ - -0.6.1 / 2012-06-01 -================== - - * Added: append (yes or no) on confirmation - * Added: allow node.js v0.7.x - -0.6.0 / 2012-04-10 -================== - - * Added `.prompt(obj, callback)` support. Closes #49 - * Added default support to .choose(). Closes #41 - * Fixed the choice example - -0.5.1 / 2011-12-20 -================== - - * Fixed `password()` for recent nodes. Closes #36 - -0.5.0 / 2011-12-04 -================== - - * Added sub-command option support [itay] - -0.4.3 / 2011-12-04 -================== - - * Fixed custom help ordering. Closes #32 - -0.4.2 / 2011-11-24 -================== - - * Added travis support - * Fixed: line-buffered input automatically trimmed. Closes #31 - -0.4.1 / 2011-11-18 -================== - - * Removed listening for "close" on --help - -0.4.0 / 2011-11-15 -================== - - * Added support for `--`. Closes #24 - -0.3.3 / 2011-11-14 -================== - - * Fixed: wait for close event when writing help info [Jerry Hamlet] - -0.3.2 / 2011-11-01 -================== - - * Fixed long flag definitions with values [felixge] - -0.3.1 / 2011-10-31 -================== - - * Changed `--version` short flag to `-V` from `-v` - * Changed `.version()` so it's configurable [felixge] - -0.3.0 / 2011-10-31 -================== - - * Added support for long flags only. Closes #18 - -0.2.1 / 2011-10-24 -================== - - * "node": ">= 0.4.x < 0.7.0". Closes #20 - -0.2.0 / 2011-09-26 -================== - - * Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs] - -0.1.0 / 2011-08-24 -================== - - * Added support for custom `--help` output - -0.0.5 / 2011-08-18 -================== - - * Changed: when the user enters nothing prompt for password again - * Fixed issue with passwords beginning with numbers [NuckChorris] - -0.0.4 / 2011-08-15 -================== - - * Fixed `Commander#args` - -0.0.3 / 2011-08-15 -================== - - * Added default option value support - -0.0.2 / 2011-08-15 -================== - - * Added mask support to `Command#password(str[, mask], fn)` - * Added `Command#password(str, fn)` - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/commander/Makefile b/cli/node_modules/mocha/node_modules/jade/node_modules/commander/Makefile deleted file mode 100644 index 007462553..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/commander/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -TESTS = $(shell find test/test.*.js) - -test: - @./test/run $(TESTS) - -.PHONY: test \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/commander/Readme.md b/cli/node_modules/mocha/node_modules/jade/node_modules/commander/Readme.md deleted file mode 100644 index b8328c375..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/commander/Readme.md +++ /dev/null @@ -1,262 +0,0 @@ -# Commander.js - - The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander). - - [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js) - -## Installation - - $ npm install commander - -## Option parsing - - Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander'); - -program - .version('0.0.1') - .option('-p, --peppers', 'Add peppers') - .option('-P, --pineapple', 'Add pineapple') - .option('-b, --bbq', 'Add bbq sauce') - .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble') - .parse(process.argv); - -console.log('you ordered a pizza with:'); -if (program.peppers) console.log(' - peppers'); -if (program.pineapple) console.log(' - pineappe'); -if (program.bbq) console.log(' - bbq'); -console.log(' - %s cheese', program.cheese); -``` - - Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. - -## Automated --help - - The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free: - -``` - $ ./examples/pizza --help - - Usage: pizza [options] - - Options: - - -V, --version output the version number - -p, --peppers Add peppers - -P, --pineapple Add pineappe - -b, --bbq Add bbq sauce - -c, --cheese Add the specified type of cheese [marble] - -h, --help output usage information - -``` - -## Coercion - -```js -function range(val) { - return val.split('..').map(Number); -} - -function list(val) { - return val.split(','); -} - -program - .version('0.0.1') - .usage('[options] ') - .option('-i, --integer ', 'An integer argument', parseInt) - .option('-f, --float ', 'A float argument', parseFloat) - .option('-r, --range ..', 'A range', range) - .option('-l, --list ', 'A list', list) - .option('-o, --optional [value]', 'An optional value') - .parse(process.argv); - -console.log(' int: %j', program.integer); -console.log(' float: %j', program.float); -console.log(' optional: %j', program.optional); -program.range = program.range || []; -console.log(' range: %j..%j', program.range[0], program.range[1]); -console.log(' list: %j', program.list); -console.log(' args: %j', program.args); -``` - -## Custom help - - You can display arbitrary `-h, --help` information - by listening for "--help". Commander will automatically - exit once you are done so that the remainder of your program - does not execute causing undesired behaviours, for example - in the following executable "stuff" will not output when - `--help` is used. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('../'); - -function list(val) { - return val.split(',').map(Number); -} - -program - .version('0.0.1') - .option('-f, --foo', 'enable some foo') - .option('-b, --bar', 'enable some bar') - .option('-B, --baz', 'enable some baz'); - -// must be before .parse() since -// node's emit() is immediate - -program.on('--help', function(){ - console.log(' Examples:'); - console.log(''); - console.log(' $ custom-help --help'); - console.log(' $ custom-help -h'); - console.log(''); -}); - -program.parse(process.argv); - -console.log('stuff'); -``` - -yielding the following help output: - -``` - -Usage: custom-help [options] - -Options: - - -h, --help output usage information - -V, --version output the version number - -f, --foo enable some foo - -b, --bar enable some bar - -B, --baz enable some baz - -Examples: - - $ custom-help --help - $ custom-help -h - -``` - -## .prompt(msg, fn) - - Single-line prompt: - -```js -program.prompt('name: ', function(name){ - console.log('hi %s', name); -}); -``` - - Multi-line prompt: - -```js -program.prompt('description:', function(name){ - console.log('hi %s', name); -}); -``` - - Coercion: - -```js -program.prompt('Age: ', Number, function(age){ - console.log('age: %j', age); -}); -``` - -```js -program.prompt('Birthdate: ', Date, function(date){ - console.log('date: %s', date); -}); -``` - -## .password(msg[, mask], fn) - -Prompt for password without echoing: - -```js -program.password('Password: ', function(pass){ - console.log('got "%s"', pass); - process.stdin.destroy(); -}); -``` - -Prompt for password with mask char "*": - -```js -program.password('Password: ', '*', function(pass){ - console.log('got "%s"', pass); - process.stdin.destroy(); -}); -``` - -## .confirm(msg, fn) - - Confirm with the given `msg`: - -```js -program.confirm('continue? ', function(ok){ - console.log(' got %j', ok); -}); -``` - -## .choose(list, fn) - - Let the user choose from a `list`: - -```js -var list = ['tobi', 'loki', 'jane', 'manny', 'luna']; - -console.log('Choose the coolest pet:'); -program.choose(list, function(i){ - console.log('you chose %d "%s"', i, list[i]); -}); -``` - -## Links - - - [API documentation](http://visionmedia.github.com/commander.js/) - - [ascii tables](https://github.com/LearnBoost/cli-table) - - [progress bars](https://github.com/visionmedia/node-progress) - - [more progress bars](https://github.com/substack/node-multimeter) - - [examples](https://github.com/visionmedia/commander.js/tree/master/examples) - -## License - -(The MIT License) - -Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/commander/index.js b/cli/node_modules/mocha/node_modules/jade/node_modules/commander/index.js deleted file mode 100644 index 06ec1e4bc..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/commander/index.js +++ /dev/null @@ -1,2 +0,0 @@ - -module.exports = require('./lib/commander'); \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/commander/lib/commander.js b/cli/node_modules/mocha/node_modules/jade/node_modules/commander/lib/commander.js deleted file mode 100644 index 5ba87ebb8..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/commander/lib/commander.js +++ /dev/null @@ -1,1026 +0,0 @@ - -/*! - * commander - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , path = require('path') - , tty = require('tty') - , basename = path.basename; - -/** - * Expose the root command. - */ - -exports = module.exports = new Command; - -/** - * Expose `Command`. - */ - -exports.Command = Command; - -/** - * Expose `Option`. - */ - -exports.Option = Option; - -/** - * Initialize a new `Option` with the given `flags` and `description`. - * - * @param {String} flags - * @param {String} description - * @api public - */ - -function Option(flags, description) { - this.flags = flags; - this.required = ~flags.indexOf('<'); - this.optional = ~flags.indexOf('['); - this.bool = !~flags.indexOf('-no-'); - flags = flags.split(/[ ,|]+/); - if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift(); - this.long = flags.shift(); - this.description = description; -} - -/** - * Return option name. - * - * @return {String} - * @api private - */ - -Option.prototype.name = function(){ - return this.long - .replace('--', '') - .replace('no-', ''); -}; - -/** - * Check if `arg` matches the short or long flag. - * - * @param {String} arg - * @return {Boolean} - * @api private - */ - -Option.prototype.is = function(arg){ - return arg == this.short - || arg == this.long; -}; - -/** - * Initialize a new `Command`. - * - * @param {String} name - * @api public - */ - -function Command(name) { - this.commands = []; - this.options = []; - this.args = []; - this.name = name; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Command.prototype.__proto__ = EventEmitter.prototype; - -/** - * Add command `name`. - * - * The `.action()` callback is invoked when the - * command `name` is specified via __ARGV__, - * and the remaining arguments are applied to the - * function for access. - * - * When the `name` is "*" an un-matched command - * will be passed as the first arg, followed by - * the rest of __ARGV__ remaining. - * - * Examples: - * - * program - * .version('0.0.1') - * .option('-C, --chdir ', 'change the working directory') - * .option('-c, --config ', 'set config path. defaults to ./deploy.conf') - * .option('-T, --no-tests', 'ignore test hook') - * - * program - * .command('setup') - * .description('run remote setup commands') - * .action(function(){ - * console.log('setup'); - * }); - * - * program - * .command('exec ') - * .description('run the given remote command') - * .action(function(cmd){ - * console.log('exec "%s"', cmd); - * }); - * - * program - * .command('*') - * .description('deploy the given env') - * .action(function(env){ - * console.log('deploying "%s"', env); - * }); - * - * program.parse(process.argv); - * - * @param {String} name - * @return {Command} the new command - * @api public - */ - -Command.prototype.command = function(name){ - var args = name.split(/ +/); - var cmd = new Command(args.shift()); - this.commands.push(cmd); - cmd.parseExpectedArgs(args); - cmd.parent = this; - return cmd; -}; - -/** - * Parse expected `args`. - * - * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. - * - * @param {Array} args - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parseExpectedArgs = function(args){ - if (!args.length) return; - var self = this; - args.forEach(function(arg){ - switch (arg[0]) { - case '<': - self.args.push({ required: true, name: arg.slice(1, -1) }); - break; - case '[': - self.args.push({ required: false, name: arg.slice(1, -1) }); - break; - } - }); - return this; -}; - -/** - * Register callback `fn` for the command. - * - * Examples: - * - * program - * .command('help') - * .description('display verbose help') - * .action(function(){ - * // output help here - * }); - * - * @param {Function} fn - * @return {Command} for chaining - * @api public - */ - -Command.prototype.action = function(fn){ - var self = this; - this.parent.on(this.name, function(args, unknown){ - // Parse any so-far unknown options - unknown = unknown || []; - var parsed = self.parseOptions(unknown); - - // Output help if necessary - outputHelpIfNecessary(self, parsed.unknown); - - // If there are still any unknown options, then we simply - // die, unless someone asked for help, in which case we give it - // to them, and then we die. - if (parsed.unknown.length > 0) { - self.unknownOption(parsed.unknown[0]); - } - - self.args.forEach(function(arg, i){ - if (arg.required && null == args[i]) { - self.missingArgument(arg.name); - } - }); - - // Always append ourselves to the end of the arguments, - // to make sure we match the number of arguments the user - // expects - if (self.args.length) { - args[self.args.length] = self; - } else { - args.push(self); - } - - fn.apply(this, args); - }); - return this; -}; - -/** - * Define option with `flags`, `description` and optional - * coercion `fn`. - * - * The `flags` string should contain both the short and long flags, - * separated by comma, a pipe or space. The following are all valid - * all will output this way when `--help` is used. - * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" - * - * Examples: - * - * // simple boolean defaulting to false - * program.option('-p, --pepper', 'add pepper'); - * - * --pepper - * program.pepper - * // => Boolean - * - * // simple boolean defaulting to false - * program.option('-C, --no-cheese', 'remove cheese'); - * - * program.cheese - * // => true - * - * --no-cheese - * program.cheese - * // => true - * - * // required argument - * program.option('-C, --chdir ', 'change the working directory'); - * - * --chdir /tmp - * program.chdir - * // => "/tmp" - * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); - * - * @param {String} flags - * @param {String} description - * @param {Function|Mixed} fn or default - * @param {Mixed} defaultValue - * @return {Command} for chaining - * @api public - */ - -Command.prototype.option = function(flags, description, fn, defaultValue){ - var self = this - , option = new Option(flags, description) - , oname = option.name() - , name = camelcase(oname); - - // default as 3rd arg - if ('function' != typeof fn) defaultValue = fn, fn = null; - - // preassign default value only for --no-*, [optional], or - if (false == option.bool || option.optional || option.required) { - // when --no-* we make sure default is true - if (false == option.bool) defaultValue = true; - // preassign only if we have a default - if (undefined !== defaultValue) self[name] = defaultValue; - } - - // register the option - this.options.push(option); - - // when it's passed assign the value - // and conditionally invoke the callback - this.on(oname, function(val){ - // coercion - if (null != val && fn) val = fn(val); - - // unassigned or bool - if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) { - // if no value, bool true, and we have a default, then use it! - if (null == val) { - self[name] = option.bool - ? defaultValue || true - : false; - } else { - self[name] = val; - } - } else if (null !== val) { - // reassign - self[name] = val; - } - }); - - return this; -}; - -/** - * Parse `argv`, settings options and invoking commands when defined. - * - * @param {Array} argv - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parse = function(argv){ - // store raw args - this.rawArgs = argv; - - // guess name - if (!this.name) this.name = basename(argv[1]); - - // process argv - var parsed = this.parseOptions(this.normalize(argv.slice(2))); - this.args = parsed.args; - return this.parseArgs(this.args, parsed.unknown); -}; - -/** - * Normalize `args`, splitting joined short flags. For example - * the arg "-abc" is equivalent to "-a -b -c". - * - * @param {Array} args - * @return {Array} - * @api private - */ - -Command.prototype.normalize = function(args){ - var ret = [] - , arg; - - for (var i = 0, len = args.length; i < len; ++i) { - arg = args[i]; - if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) { - arg.slice(1).split('').forEach(function(c){ - ret.push('-' + c); - }); - } else { - ret.push(arg); - } - } - - return ret; -}; - -/** - * Parse command `args`. - * - * When listener(s) are available those - * callbacks are invoked, otherwise the "*" - * event is emitted and those actions are invoked. - * - * @param {Array} args - * @return {Command} for chaining - * @api private - */ - -Command.prototype.parseArgs = function(args, unknown){ - var cmds = this.commands - , len = cmds.length - , name; - - if (args.length) { - name = args[0]; - if (this.listeners(name).length) { - this.emit(args.shift(), args, unknown); - } else { - this.emit('*', args); - } - } else { - outputHelpIfNecessary(this, unknown); - - // If there were no args and we have unknown options, - // then they are extraneous and we need to error. - if (unknown.length > 0) { - this.unknownOption(unknown[0]); - } - } - - return this; -}; - -/** - * Return an option matching `arg` if any. - * - * @param {String} arg - * @return {Option} - * @api private - */ - -Command.prototype.optionFor = function(arg){ - for (var i = 0, len = this.options.length; i < len; ++i) { - if (this.options[i].is(arg)) { - return this.options[i]; - } - } -}; - -/** - * Parse options from `argv` returning `argv` - * void of these options. - * - * @param {Array} argv - * @return {Array} - * @api public - */ - -Command.prototype.parseOptions = function(argv){ - var args = [] - , len = argv.length - , literal - , option - , arg; - - var unknownOptions = []; - - // parse options - for (var i = 0; i < len; ++i) { - arg = argv[i]; - - // literal args after -- - if ('--' == arg) { - literal = true; - continue; - } - - if (literal) { - args.push(arg); - continue; - } - - // find matching Option - option = this.optionFor(arg); - - // option is defined - if (option) { - // requires arg - if (option.required) { - arg = argv[++i]; - if (null == arg) return this.optionMissingArgument(option); - if ('-' == arg[0]) return this.optionMissingArgument(option, arg); - this.emit(option.name(), arg); - // optional arg - } else if (option.optional) { - arg = argv[i+1]; - if (null == arg || '-' == arg[0]) { - arg = null; - } else { - ++i; - } - this.emit(option.name(), arg); - // bool - } else { - this.emit(option.name()); - } - continue; - } - - // looks like an option - if (arg.length > 1 && '-' == arg[0]) { - unknownOptions.push(arg); - - // If the next argument looks like it might be - // an argument for this option, we pass it on. - // If it isn't, then it'll simply be ignored - if (argv[i+1] && '-' != argv[i+1][0]) { - unknownOptions.push(argv[++i]); - } - continue; - } - - // arg - args.push(arg); - } - - return { args: args, unknown: unknownOptions }; -}; - -/** - * Argument `name` is missing. - * - * @param {String} name - * @api private - */ - -Command.prototype.missingArgument = function(name){ - console.error(); - console.error(" error: missing required argument `%s'", name); - console.error(); - process.exit(1); -}; - -/** - * `Option` is missing an argument, but received `flag` or nothing. - * - * @param {String} option - * @param {String} flag - * @api private - */ - -Command.prototype.optionMissingArgument = function(option, flag){ - console.error(); - if (flag) { - console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag); - } else { - console.error(" error: option `%s' argument missing", option.flags); - } - console.error(); - process.exit(1); -}; - -/** - * Unknown option `flag`. - * - * @param {String} flag - * @api private - */ - -Command.prototype.unknownOption = function(flag){ - console.error(); - console.error(" error: unknown option `%s'", flag); - console.error(); - process.exit(1); -}; - -/** - * Set the program version to `str`. - * - * This method auto-registers the "-V, --version" flag - * which will print the version number when passed. - * - * @param {String} str - * @param {String} flags - * @return {Command} for chaining - * @api public - */ - -Command.prototype.version = function(str, flags){ - if (0 == arguments.length) return this._version; - this._version = str; - flags = flags || '-V, --version'; - this.option(flags, 'output the version number'); - this.on('version', function(){ - console.log(str); - process.exit(0); - }); - return this; -}; - -/** - * Set the description `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.description = function(str){ - if (0 == arguments.length) return this._description; - this._description = str; - return this; -}; - -/** - * Set / get the command usage `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.usage = function(str){ - var args = this.args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }); - - var usage = '[options' - + (this.commands.length ? '] [command' : '') - + ']' - + (this.args.length ? ' ' + args : ''); - if (0 == arguments.length) return this._usage || usage; - this._usage = str; - - return this; -}; - -/** - * Return the largest option length. - * - * @return {Number} - * @api private - */ - -Command.prototype.largestOptionLength = function(){ - return this.options.reduce(function(max, option){ - return Math.max(max, option.flags.length); - }, 0); -}; - -/** - * Return help for options. - * - * @return {String} - * @api private - */ - -Command.prototype.optionHelp = function(){ - var width = this.largestOptionLength(); - - // Prepend the help information - return [pad('-h, --help', width) + ' ' + 'output usage information'] - .concat(this.options.map(function(option){ - return pad(option.flags, width) - + ' ' + option.description; - })) - .join('\n'); -}; - -/** - * Return command help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.commandHelp = function(){ - if (!this.commands.length) return ''; - return [ - '' - , ' Commands:' - , '' - , this.commands.map(function(cmd){ - var args = cmd.args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }).join(' '); - - return cmd.name - + (cmd.options.length - ? ' [options]' - : '') + ' ' + args - + (cmd.description() - ? '\n' + cmd.description() - : ''); - }).join('\n\n').replace(/^/gm, ' ') - , '' - ].join('\n'); -}; - -/** - * Return program help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.helpInformation = function(){ - return [ - '' - , ' Usage: ' + this.name + ' ' + this.usage() - , '' + this.commandHelp() - , ' Options:' - , '' - , '' + this.optionHelp().replace(/^/gm, ' ') - , '' - , '' - ].join('\n'); -}; - -/** - * Prompt for a `Number`. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptForNumber = function(str, fn){ - var self = this; - this.promptSingleLine(str, function parseNumber(val){ - val = Number(val); - if (isNaN(val)) return self.promptSingleLine(str + '(must be a number) ', parseNumber); - fn(val); - }); -}; - -/** - * Prompt for a `Date`. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptForDate = function(str, fn){ - var self = this; - this.promptSingleLine(str, function parseDate(val){ - val = new Date(val); - if (isNaN(val.getTime())) return self.promptSingleLine(str + '(must be a date) ', parseDate); - fn(val); - }); -}; - -/** - * Single-line prompt. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptSingleLine = function(str, fn){ - if ('function' == typeof arguments[2]) { - return this['promptFor' + (fn.name || fn)](str, arguments[2]); - } - - process.stdout.write(str); - process.stdin.setEncoding('utf8'); - process.stdin.once('data', function(val){ - fn(val.trim()); - }).resume(); -}; - -/** - * Multi-line prompt. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptMultiLine = function(str, fn){ - var buf = []; - console.log(str); - process.stdin.setEncoding('utf8'); - process.stdin.on('data', function(val){ - if ('\n' == val || '\r\n' == val) { - process.stdin.removeAllListeners('data'); - fn(buf.join('\n')); - } else { - buf.push(val.trimRight()); - } - }).resume(); -}; - -/** - * Prompt `str` and callback `fn(val)` - * - * Commander supports single-line and multi-line prompts. - * To issue a single-line prompt simply add white-space - * to the end of `str`, something like "name: ", whereas - * for a multi-line prompt omit this "description:". - * - * - * Examples: - * - * program.prompt('Username: ', function(name){ - * console.log('hi %s', name); - * }); - * - * program.prompt('Description:', function(desc){ - * console.log('description was "%s"', desc.trim()); - * }); - * - * @param {String|Object} str - * @param {Function} fn - * @api public - */ - -Command.prototype.prompt = function(str, fn){ - var self = this; - - if ('string' == typeof str) { - if (/ $/.test(str)) return this.promptSingleLine.apply(this, arguments); - this.promptMultiLine(str, fn); - } else { - var keys = Object.keys(str) - , obj = {}; - - function next() { - var key = keys.shift() - , label = str[key]; - - if (!key) return fn(obj); - self.prompt(label, function(val){ - obj[key] = val; - next(); - }); - } - - next(); - } -}; - -/** - * Prompt for password with `str`, `mask` char and callback `fn(val)`. - * - * The mask string defaults to '', aka no output is - * written while typing, you may want to use "*" etc. - * - * Examples: - * - * program.password('Password: ', function(pass){ - * console.log('got "%s"', pass); - * process.stdin.destroy(); - * }); - * - * program.password('Password: ', '*', function(pass){ - * console.log('got "%s"', pass); - * process.stdin.destroy(); - * }); - * - * @param {String} str - * @param {String} mask - * @param {Function} fn - * @api public - */ - -Command.prototype.password = function(str, mask, fn){ - var self = this - , buf = ''; - - // default mask - if ('function' == typeof mask) { - fn = mask; - mask = ''; - } - - process.stdin.resume(); - tty.setRawMode(true); - process.stdout.write(str); - - // keypress - process.stdin.on('keypress', function(c, key){ - if (key && 'enter' == key.name) { - console.log(); - process.stdin.removeAllListeners('keypress'); - tty.setRawMode(false); - if (!buf.trim().length) return self.password(str, mask, fn); - fn(buf); - return; - } - - if (key && key.ctrl && 'c' == key.name) { - console.log('%s', buf); - process.exit(); - } - - process.stdout.write(mask); - buf += c; - }).resume(); -}; - -/** - * Confirmation prompt with `str` and callback `fn(bool)` - * - * Examples: - * - * program.confirm('continue? ', function(ok){ - * console.log(' got %j', ok); - * process.stdin.destroy(); - * }); - * - * @param {String} str - * @param {Function} fn - * @api public - */ - - -Command.prototype.confirm = function(str, fn, verbose){ - var self = this; - this.prompt(str, function(ok){ - if (!ok.trim()) { - if (!verbose) str += '(yes or no) '; - return self.confirm(str, fn, true); - } - fn(parseBool(ok)); - }); -}; - -/** - * Choice prompt with `list` of items and callback `fn(index, item)` - * - * Examples: - * - * var list = ['tobi', 'loki', 'jane', 'manny', 'luna']; - * - * console.log('Choose the coolest pet:'); - * program.choose(list, function(i){ - * console.log('you chose %d "%s"', i, list[i]); - * process.stdin.destroy(); - * }); - * - * @param {Array} list - * @param {Number|Function} index or fn - * @param {Function} fn - * @api public - */ - -Command.prototype.choose = function(list, index, fn){ - var self = this - , hasDefault = 'number' == typeof index; - - if (!hasDefault) { - fn = index; - index = null; - } - - list.forEach(function(item, i){ - if (hasDefault && i == index) { - console.log('* %d) %s', i + 1, item); - } else { - console.log(' %d) %s', i + 1, item); - } - }); - - function again() { - self.prompt(' : ', function(val){ - val = parseInt(val, 10) - 1; - if (hasDefault && isNaN(val)) val = index; - - if (null == list[val]) { - again(); - } else { - fn(val, list[val]); - } - }); - } - - again(); -}; - -/** - * Camel-case the given `flag` - * - * @param {String} flag - * @return {String} - * @api private - */ - -function camelcase(flag) { - return flag.split('-').reduce(function(str, word){ - return str + word[0].toUpperCase() + word.slice(1); - }); -} - -/** - * Parse a boolean `str`. - * - * @param {String} str - * @return {Boolean} - * @api private - */ - -function parseBool(str) { - return /^y|yes|ok|true$/i.test(str); -} - -/** - * Pad `str` to `width`. - * - * @param {String} str - * @param {Number} width - * @return {String} - * @api private - */ - -function pad(str, width) { - var len = Math.max(0, width - str.length); - return str + Array(len + 1).join(' '); -} - -/** - * Output help information if necessary - * - * @param {Command} command to output help for - * @param {Array} array of options to search for -h or --help - * @api private - */ - -function outputHelpIfNecessary(cmd, options) { - options = options || []; - for (var i = 0; i < options.length; i++) { - if (options[i] == '--help' || options[i] == '-h') { - process.stdout.write(cmd.helpInformation()); - cmd.emit('--help'); - process.exit(0); - } - } -} diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/commander/package.json b/cli/node_modules/mocha/node_modules/jade/node_modules/commander/package.json deleted file mode 100644 index d7795e32d..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/commander/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "commander", - "version": "0.6.1", - "description": "the complete solution for node.js command-line programs", - "keywords": [ - "command", - "option", - "parser", - "prompt", - "stdin" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/commander.js.git" - }, - "dependencies": {}, - "devDependencies": { - "should": ">= 0.0.1" - }, - "scripts": { - "test": "make test" - }, - "main": "index", - "engines": { - "node": ">= 0.4.x" - }, - "_npmUser": { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - "_id": "commander@0.6.1", - "optionalDependencies": {}, - "_engineSupported": true, - "_npmVersion": "1.1.0-3", - "_nodeVersion": "v0.6.12", - "_defaultsLoaded": true, - "dist": { - "shasum": "fa68a14f6a945d54dbbe50d8cdb3320e9e3b1a06", - "tarball": "http://registry.npmjs.org/commander/-/commander-0.6.1.tgz" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - } - ], - "directories": {}, - "_shasum": "fa68a14f6a945d54dbbe50d8cdb3320e9e3b1a06", - "_resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz", - "_from": "commander@0.6.1", - "bugs": { - "url": "https://github.com/visionmedia/commander.js/issues" - }, - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/visionmedia/commander.js" -} diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.orig b/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.orig deleted file mode 100644 index 9303c347e..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.orig +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.rej b/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.rej deleted file mode 100644 index 69244ff87..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.rej +++ /dev/null @@ -1,5 +0,0 @@ ---- /dev/null -+++ .gitignore -@@ -0,0 +1,2 @@ -+node_modules/ -+npm-debug.log \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.npmignore b/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.npmignore deleted file mode 100644 index 9303c347e..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/LICENSE b/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/LICENSE deleted file mode 100644 index 432d1aeb0..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/README.markdown b/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/README.markdown deleted file mode 100644 index b4dd75fdc..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/README.markdown +++ /dev/null @@ -1,54 +0,0 @@ -mkdirp -====== - -Like `mkdir -p`, but in node.js! - -example -======= - -pow.js ------- - var mkdirp = require('mkdirp'); - - mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') - }); - -Output - pow! - -And now /tmp/foo/bar/baz exists, huzzah! - -methods -======= - -var mkdirp = require('mkdirp'); - -mkdirp(dir, mode, cb) ---------------------- - -Create a new directory and any necessary subdirectories at `dir` with octal -permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -mkdirp.sync(dir, mode) ----------------------- - -Synchronously create a new directory and any necessary subdirectories at `dir` -with octal permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -install -======= - -With [npm](http://npmjs.org) do: - - npm install mkdirp - -license -======= - -MIT/X11 diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js b/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js deleted file mode 100644 index e6924212e..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js +++ /dev/null @@ -1,6 +0,0 @@ -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.orig b/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.orig deleted file mode 100644 index 774146221..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.orig +++ /dev/null @@ -1,6 +0,0 @@ -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', 0755, function (err) { - if (err) console.error(err) - else console.log('pow!') -}); diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.rej b/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.rej deleted file mode 100644 index 81e7f4311..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.rej +++ /dev/null @@ -1,19 +0,0 @@ ---- examples/pow.js -+++ examples/pow.js -@@ -1,6 +1,15 @@ --var mkdirp = require('mkdirp').mkdirp; -+var mkdirp = require('../').mkdirp, -+ mkdirpSync = require('../').mkdirpSync; - - mkdirp('/tmp/foo/bar/baz', 0755, function (err) { - if (err) console.error(err) - else console.log('pow!') - }); -+ -+try { -+ mkdirpSync('/tmp/bar/foo/baz', 0755); -+ console.log('double pow!'); -+} -+catch (ex) { -+ console.log(ex); -+} \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/index.js b/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/index.js deleted file mode 100644 index 25f43adfa..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/index.js +++ /dev/null @@ -1,79 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, mode, f) { - if (typeof mode === 'function' || mode === undefined) { - f = mode; - mode = 0777 & (~process.umask()); - } - - var cb = f || function () {}; - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - fs.mkdir(p, mode, function (er) { - if (!er) return cb(); - switch (er.code) { - case 'ENOENT': - mkdirP(path.dirname(p), mode, function (er) { - if (er) cb(er); - else mkdirP(p, mode, cb); - }); - break; - - case 'EEXIST': - fs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original EEXIST be the failure reason. - if (er2 || !stat.isDirectory()) cb(er) - else cb(); - }); - break; - - default: - cb(er); - break; - } - }); -} - -mkdirP.sync = function sync (p, mode) { - if (mode === undefined) { - mode = 0777 & (~process.umask()); - } - - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - try { - fs.mkdirSync(p, mode) - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - var err1 = sync(path.dirname(p), mode) - if (err1) throw err1; - else return sync(p, mode); - break; - - case 'EEXIST' : - var stat; - try { - stat = fs.statSync(p); - } - catch (err1) { - throw err0 - } - if (!stat.isDirectory()) throw err0; - else return null; - break; - default : - throw err0 - break; - } - } - - return null; -}; diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/package.json b/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/package.json deleted file mode 100644 index 39708fc67..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "mkdirp", - "description": "Recursively mkdir, like `mkdir -p`", - "version": "0.3.0", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "main": "./index", - "keywords": [ - "mkdir", - "directory" - ], - "repository": { - "type": "git", - "url": "git://github.com/substack/node-mkdirp.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "devDependencies": { - "tap": "0.0.x" - }, - "license": "MIT/X11", - "engines": { - "node": "*" - }, - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "_id": "mkdirp@0.3.0", - "dependencies": {}, - "_engineSupported": true, - "_npmVersion": "1.0.106", - "_nodeVersion": "v0.4.12", - "_defaultsLoaded": true, - "dist": { - "shasum": "1bbf5ab1ba827af23575143490426455f481fe1e", - "tarball": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "directories": {}, - "_shasum": "1bbf5ab1ba827af23575143490426455f481fe1e", - "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", - "_from": "mkdirp@0.3.0", - "bugs": { - "url": "https://github.com/substack/node-mkdirp/issues" - }, - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/substack/node-mkdirp" -} diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/chmod.js b/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/chmod.js deleted file mode 100644 index 520dcb8e9..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/chmod.js +++ /dev/null @@ -1,38 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -test('chmod-pre', function (t) { - var mode = 0744 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.equal(stat && stat.mode & 0777, mode, 'should be 0744'); - t.end(); - }); - }); -}); - -test('chmod', function (t) { - var mode = 0755 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.end(); - }); - }); -}); diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/clobber.js b/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/clobber.js deleted file mode 100644 index 0eb709987..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/clobber.js +++ /dev/null @@ -1,37 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -// a file in the way -var itw = ps.slice(0, 3).join('/'); - - -test('clobber-pre', function (t) { - console.error("about to write to "+itw) - fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); - - fs.stat(itw, function (er, stat) { - t.ifError(er) - t.ok(stat && stat.isFile(), 'should be file') - t.end() - }) -}) - -test('clobber', function (t) { - t.plan(2); - mkdirp(file, 0755, function (err) { - t.ok(err); - t.equal(err.code, 'ENOTDIR'); - t.end(); - }); -}); diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/mkdirp.js b/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/mkdirp.js deleted file mode 100644 index b07cd70c1..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/mkdirp.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('woo', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm.js b/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm.js deleted file mode 100644 index 23a7abbd2..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('async perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); - -test('async root perm', function (t) { - mkdirp('/tmp', 0755, function (err) { - if (err) t.fail(err); - t.end(); - }); - t.end(); -}); diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm_sync.js b/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm_sync.js deleted file mode 100644 index f685f6090..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm_sync.js +++ /dev/null @@ -1,39 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; - - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); - -test('sync root perm', function (t) { - t.plan(1); - - var file = '/tmp'; - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/race.js b/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/race.js deleted file mode 100644 index 96a044763..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/race.js +++ /dev/null @@ -1,41 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('race', function (t) { - t.plan(4); - var ps = [ '', 'tmp' ]; - - for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); - } - var file = ps.join('/'); - - var res = 2; - mk(file, function () { - if (--res === 0) t.end(); - }); - - mk(file, function () { - if (--res === 0) t.end(); - }); - - function mk (file, cb) { - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - if (cb) cb(); - } - }) - }) - }); - } -}); diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/rel.js b/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/rel.js deleted file mode 100644 index 79858243a..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/rel.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('rel', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var cwd = process.cwd(); - process.chdir('/tmp'); - - var file = [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - process.chdir(cwd); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/sync.js b/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/sync.js deleted file mode 100644 index e0e389dea..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/sync.js +++ /dev/null @@ -1,27 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - var err = mkdirp.sync(file, 0755); - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) -}); diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask.js b/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask.js deleted file mode 100644 index 64ccafe22..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('implicit mode from umask', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0777 & (~process.umask())); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask_sync.js b/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask_sync.js deleted file mode 100644 index 83cba560f..000000000 --- a/cli/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask_sync.js +++ /dev/null @@ -1,27 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('umask sync modes', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - var err = mkdirp.sync(file); - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, (0777 & (~process.umask()))); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) -}); diff --git a/cli/node_modules/mocha/node_modules/jade/package.json b/cli/node_modules/mocha/node_modules/jade/package.json deleted file mode 100644 index 25f493c4c..000000000 --- a/cli/node_modules/mocha/node_modules/jade/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "jade", - "description": "Jade template engine", - "version": "0.26.3", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/jade" - }, - "main": "./index.js", - "bin": { - "jade": "./bin/jade" - }, - "man": [ - "./jade.1" - ], - "dependencies": { - "commander": "0.6.1", - "mkdirp": "0.3.0" - }, - "devDependencies": { - "mocha": "*", - "markdown": "*", - "stylus": "*", - "uubench": "*", - "should": "*", - "less": "*", - "uglify-js": "*" - }, - "component": { - "scripts": { - "jade": "runtime.js" - } - }, - "scripts": { - "prepublish": "npm prune" - }, - "_id": "jade@0.26.3", - "dist": { - "shasum": "8f10d7977d8d79f2f6ff862a81b0513ccb25686c", - "tarball": "http://registry.npmjs.org/jade/-/jade-0.26.3.tgz" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - } - ], - "directories": {}, - "_shasum": "8f10d7977d8d79f2f6ff862a81b0513ccb25686c", - "_resolved": "https://registry.npmjs.org/jade/-/jade-0.26.3.tgz", - "_from": "jade@0.26.3" -} diff --git a/cli/node_modules/mocha/node_modules/jade/runtime.js b/cli/node_modules/mocha/node_modules/jade/runtime.js deleted file mode 100644 index 0f5490778..000000000 --- a/cli/node_modules/mocha/node_modules/jade/runtime.js +++ /dev/null @@ -1,179 +0,0 @@ - -jade = (function(exports){ -/*! - * Jade - runtime - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Lame Array.isArray() polyfill for now. - */ - -if (!Array.isArray) { - Array.isArray = function(arr){ - return '[object Array]' == Object.prototype.toString.call(arr); - }; -} - -/** - * Lame Object.keys() polyfill for now. - */ - -if (!Object.keys) { - Object.keys = function(obj){ - var arr = []; - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - arr.push(key); - } - } - return arr; - } -} - -/** - * Merge two attribute objects giving precedence - * to values in object `b`. Classes are special-cased - * allowing for arrays and merging/joining appropriately - * resulting in a string. - * - * @param {Object} a - * @param {Object} b - * @return {Object} a - * @api private - */ - -exports.merge = function merge(a, b) { - var ac = a['class']; - var bc = b['class']; - - if (ac || bc) { - ac = ac || []; - bc = bc || []; - if (!Array.isArray(ac)) ac = [ac]; - if (!Array.isArray(bc)) bc = [bc]; - ac = ac.filter(nulls); - bc = bc.filter(nulls); - a['class'] = ac.concat(bc).join(' '); - } - - for (var key in b) { - if (key != 'class') { - a[key] = b[key]; - } - } - - return a; -}; - -/** - * Filter null `val`s. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - -function nulls(val) { - return val != null; -} - -/** - * Render the given attributes object. - * - * @param {Object} obj - * @param {Object} escaped - * @return {String} - * @api private - */ - -exports.attrs = function attrs(obj, escaped){ - var buf = [] - , terse = obj.terse; - - delete obj.terse; - var keys = Object.keys(obj) - , len = keys.length; - - if (len) { - buf.push(''); - for (var i = 0; i < len; ++i) { - var key = keys[i] - , val = obj[key]; - - if ('boolean' == typeof val || null == val) { - if (val) { - terse - ? buf.push(key) - : buf.push(key + '="' + key + '"'); - } - } else if (0 == key.indexOf('data') && 'string' != typeof val) { - buf.push(key + "='" + JSON.stringify(val) + "'"); - } else if ('class' == key && Array.isArray(val)) { - buf.push(key + '="' + exports.escape(val.join(' ')) + '"'); - } else if (escaped && escaped[key]) { - buf.push(key + '="' + exports.escape(val) + '"'); - } else { - buf.push(key + '="' + val + '"'); - } - } - } - - return buf.join(' '); -}; - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function escape(html){ - return String(html) - .replace(/&(?!(\w+|\#\d+);)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -}; - -/** - * Re-throw the given `err` in context to the - * the jade in `filename` at the given `lineno`. - * - * @param {Error} err - * @param {String} filename - * @param {String} lineno - * @api private - */ - -exports.rethrow = function rethrow(err, filename, lineno){ - if (!filename) throw err; - - var context = 3 - , str = require('fs').readFileSync(filename, 'utf8') - , lines = str.split('\n') - , start = Math.max(lineno - context, 0) - , end = Math.min(lines.length, lineno + context); - - // Error context - var context = lines.slice(start, end).map(function(line, i){ - var curr = i + start + 1; - return (curr == lineno ? ' > ' : ' ') - + curr - + '| ' - + line; - }).join('\n'); - - // Alter exception message - err.path = filename; - err.message = (filename || 'Jade') + ':' + lineno - + '\n' + context + '\n\n' + err.message; - throw err; -}; - - return exports; - -})({}); diff --git a/cli/node_modules/mocha/node_modules/jade/runtime.min.js b/cli/node_modules/mocha/node_modules/jade/runtime.min.js deleted file mode 100644 index 1714efb00..000000000 --- a/cli/node_modules/mocha/node_modules/jade/runtime.min.js +++ /dev/null @@ -1 +0,0 @@ -jade=function(exports){Array.isArray||(Array.isArray=function(arr){return"[object Array]"==Object.prototype.toString.call(arr)}),Object.keys||(Object.keys=function(obj){var arr=[];for(var key in obj)obj.hasOwnProperty(key)&&arr.push(key);return arr}),exports.merge=function merge(a,b){var ac=a["class"],bc=b["class"];if(ac||bc)ac=ac||[],bc=bc||[],Array.isArray(ac)||(ac=[ac]),Array.isArray(bc)||(bc=[bc]),ac=ac.filter(nulls),bc=bc.filter(nulls),a["class"]=ac.concat(bc).join(" ");for(var key in b)key!="class"&&(a[key]=b[key]);return a};function nulls(val){return val!=null}return exports.attrs=function attrs(obj,escaped){var buf=[],terse=obj.terse;delete obj.terse;var keys=Object.keys(obj),len=keys.length;if(len){buf.push("");for(var i=0;i/g,">").replace(/"/g,""")},exports.rethrow=function rethrow(err,filename,lineno){if(!filename)throw err;var context=3,str=require("fs").readFileSync(filename,"utf8"),lines=str.split("\n"),start=Math.max(lineno-context,0),end=Math.min(lines.length,lineno+context),context=lines.slice(start,end).map(function(line,i){var curr=i+start+1;return(curr==lineno?" > ":" ")+curr+"| "+line}).join("\n");throw err.path=filename,err.message=(filename||"Jade")+":"+lineno+"\n"+context+"\n\n"+err.message,err},exports}({}); \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/test.jade b/cli/node_modules/mocha/node_modules/jade/test.jade deleted file mode 100644 index b3a898895..000000000 --- a/cli/node_modules/mocha/node_modules/jade/test.jade +++ /dev/null @@ -1,7 +0,0 @@ -p. - This is a large - body of text for - this tag. - - Nothing too - exciting. \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/testing/head.jade b/cli/node_modules/mocha/node_modules/jade/testing/head.jade deleted file mode 100644 index 851540622..000000000 --- a/cli/node_modules/mocha/node_modules/jade/testing/head.jade +++ /dev/null @@ -1,5 +0,0 @@ -head - script(src='/jquery.js') - yield - if false - script(src='/jquery.ui.js') diff --git a/cli/node_modules/mocha/node_modules/jade/testing/index.jade b/cli/node_modules/mocha/node_modules/jade/testing/index.jade deleted file mode 100644 index 1032c5faf..000000000 --- a/cli/node_modules/mocha/node_modules/jade/testing/index.jade +++ /dev/null @@ -1,22 +0,0 @@ - -tag = 'p' -foo = 'bar' - -#{tag} value -#{tag}(foo='bar') value -#{foo ? 'a' : 'li'}(something) here - -mixin item(icon) - li - if attributes.href - a(attributes) - img.icon(src=icon) - block - else - span(attributes) - img.icon(src=icon) - block - -ul - +item('contact') Contact - +item(href='/contact') Contact diff --git a/cli/node_modules/mocha/node_modules/jade/testing/index.js b/cli/node_modules/mocha/node_modules/jade/testing/index.js deleted file mode 100644 index 226e8c010..000000000 --- a/cli/node_modules/mocha/node_modules/jade/testing/index.js +++ /dev/null @@ -1,11 +0,0 @@ - -/** - * Module dependencies. - */ - -var jade = require('../'); - -jade.renderFile('testing/index.jade', { pretty: true, debug: true, compileDebug: false }, function(err, str){ - if (err) throw err; - console.log(str); -}); \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/testing/layout.jade b/cli/node_modules/mocha/node_modules/jade/testing/layout.jade deleted file mode 100644 index 6923cf15e..000000000 --- a/cli/node_modules/mocha/node_modules/jade/testing/layout.jade +++ /dev/null @@ -1,6 +0,0 @@ -html - include head - script(src='/caustic.js') - script(src='/app.js') - body - block content \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/testing/user.jade b/cli/node_modules/mocha/node_modules/jade/testing/user.jade deleted file mode 100644 index 3c636b7c9..000000000 --- a/cli/node_modules/mocha/node_modules/jade/testing/user.jade +++ /dev/null @@ -1,7 +0,0 @@ -h1 Tobi -p Is a ferret - -ul - li: a foo - li: a bar - li: a baz \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/jade/testing/user.js b/cli/node_modules/mocha/node_modules/jade/testing/user.js deleted file mode 100644 index 2ecc45eda..000000000 --- a/cli/node_modules/mocha/node_modules/jade/testing/user.js +++ /dev/null @@ -1,27 +0,0 @@ -function anonymous(locals, attrs, escape, rethrow) { -var attrs = jade.attrs, escape = jade.escape, rethrow = jade.rethrow; -var __jade = [{ lineno: 1, filename: "testing/user.jade" }]; -try { -var buf = []; -with (locals || {}) { -var interp; -__jade.unshift({ lineno: 1, filename: __jade[0].filename }); -__jade.unshift({ lineno: 1, filename: __jade[0].filename }); -buf.push('

    Tobi'); -__jade.unshift({ lineno: undefined, filename: __jade[0].filename }); -__jade.shift(); -buf.push('

    '); -__jade.shift(); -__jade.unshift({ lineno: 2, filename: __jade[0].filename }); -buf.push('

    Is a ferret'); -__jade.unshift({ lineno: undefined, filename: __jade[0].filename }); -__jade.shift(); -buf.push('

    '); -__jade.shift(); -__jade.shift(); -} -return buf.join(""); -} catch (err) { - rethrow(err, __jade[0].filename, __jade[0].lineno); -} -} \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/mkdirp/.npmignore b/cli/node_modules/mocha/node_modules/mkdirp/.npmignore deleted file mode 100644 index 9303c347e..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log \ No newline at end of file diff --git a/cli/node_modules/mocha/node_modules/mkdirp/.travis.yml b/cli/node_modules/mocha/node_modules/mkdirp/.travis.yml deleted file mode 100644 index c693a939d..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - "0.10" diff --git a/cli/node_modules/mocha/node_modules/mkdirp/LICENSE b/cli/node_modules/mocha/node_modules/mkdirp/LICENSE deleted file mode 100644 index 432d1aeb0..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/cli/node_modules/mocha/node_modules/mkdirp/bin/cmd.js b/cli/node_modules/mocha/node_modules/mkdirp/bin/cmd.js deleted file mode 100755 index d95de15ae..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/bin/cmd.js +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node - -var mkdirp = require('../'); -var minimist = require('minimist'); -var fs = require('fs'); - -var argv = minimist(process.argv.slice(2), { - alias: { m: 'mode', h: 'help' }, - string: [ 'mode' ] -}); -if (argv.help) { - fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout); - return; -} - -var paths = argv._.slice(); -var mode = argv.mode ? parseInt(argv.mode, 8) : undefined; - -(function next () { - if (paths.length === 0) return; - var p = paths.shift(); - - if (mode === undefined) mkdirp(p, cb) - else mkdirp(p, mode, cb) - - function cb (err) { - if (err) { - console.error(err.message); - process.exit(1); - } - else next(); - } -})(); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/bin/usage.txt b/cli/node_modules/mocha/node_modules/mkdirp/bin/usage.txt deleted file mode 100644 index f952aa2c7..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/bin/usage.txt +++ /dev/null @@ -1,12 +0,0 @@ -usage: mkdirp [DIR1,DIR2..] {OPTIONS} - - Create each supplied directory including any necessary parent directories that - don't yet exist. - - If the directory already exists, do nothing. - -OPTIONS are: - - -m, --mode If a directory needs to be created, set the mode as an octal - permission string. - diff --git a/cli/node_modules/mocha/node_modules/mkdirp/examples/pow.js b/cli/node_modules/mocha/node_modules/mkdirp/examples/pow.js deleted file mode 100644 index e6924212e..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/examples/pow.js +++ /dev/null @@ -1,6 +0,0 @@ -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/index.js b/cli/node_modules/mocha/node_modules/mkdirp/index.js deleted file mode 100644 index a1742b206..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/index.js +++ /dev/null @@ -1,97 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, opts, f, made) { - if (typeof opts === 'function') { - f = opts; - opts = {}; - } - else if (!opts || typeof opts !== 'object') { - opts = { mode: opts }; - } - - var mode = opts.mode; - var xfs = opts.fs || fs; - - if (mode === undefined) { - mode = 0777 & (~process.umask()); - } - if (!made) made = null; - - var cb = f || function () {}; - p = path.resolve(p); - - xfs.mkdir(p, mode, function (er) { - if (!er) { - made = made || p; - return cb(null, made); - } - switch (er.code) { - case 'ENOENT': - mkdirP(path.dirname(p), opts, function (er, made) { - if (er) cb(er, made); - else mkdirP(p, opts, cb, made); - }); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - xfs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) cb(er, made) - else cb(null, made); - }); - break; - } - }); -} - -mkdirP.sync = function sync (p, opts, made) { - if (!opts || typeof opts !== 'object') { - opts = { mode: opts }; - } - - var mode = opts.mode; - var xfs = opts.fs || fs; - - if (mode === undefined) { - mode = 0777 & (~process.umask()); - } - if (!made) made = null; - - p = path.resolve(p); - - try { - xfs.mkdirSync(p, mode); - made = made || p; - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - made = sync(path.dirname(p), opts, made); - sync(p, opts, made); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - var stat; - try { - stat = xfs.statSync(p); - } - catch (err1) { - throw err0; - } - if (!stat.isDirectory()) throw err0; - break; - } - } - - return made; -}; diff --git a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/.travis.yml b/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/.travis.yml deleted file mode 100644 index cc4dba29d..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/LICENSE b/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/LICENSE deleted file mode 100644 index ee27ba4b4..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/example/parse.js b/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/example/parse.js deleted file mode 100644 index abff3e8ee..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/example/parse.js +++ /dev/null @@ -1,2 +0,0 @@ -var argv = require('../')(process.argv.slice(2)); -console.dir(argv); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/index.js b/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/index.js deleted file mode 100644 index 584f551a6..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/index.js +++ /dev/null @@ -1,187 +0,0 @@ -module.exports = function (args, opts) { - if (!opts) opts = {}; - - var flags = { bools : {}, strings : {} }; - - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - }); - - var aliases = {}; - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - - var defaults = opts['default'] || {}; - - var argv = { _ : [] }; - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--')+1); - args = args.slice(0, args.indexOf('--')); - } - - function setArg (key, val) { - var value = !flags.strings[key] && isNumber(val) - ? Number(val) : val - ; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - - if (/^--.+=/.test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - setArg(m[1], m[2]); - } - else if (/^--no-.+/.test(arg)) { - var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false); - } - else if (/^--.+/.test(arg)) { - var key = arg.match(/^--(.+)/)[1]; - var next = args[i + 1]; - if (next !== undefined && !/^-/.test(next) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true'); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true); - } - } - else if (/^-[^-]+/.test(arg)) { - var letters = arg.slice(1,-1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - var next = arg.slice(j+2); - - if (next === '-') { - setArg(letters[j], next) - continue; - } - - if (/[A-Za-z]/.test(letters[j]) - && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next); - broken = true; - break; - } - - if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2)); - broken = true; - break; - } - else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true); - } - } - - var key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, args[i+1]); - i++; - } - else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true'); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true); - } - } - } - else { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); - } - } - - Object.keys(defaults).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) { - setKey(argv, key.split('.'), defaults[key]); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[key]); - }); - } - }); - - notFlags.forEach(function(key) { - argv._.push(key); - }); - - return argv; -}; - -function hasKey (obj, keys) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - o = (o[key] || {}); - }); - - var key = keys[keys.length - 1]; - return key in o; -} - -function setKey (obj, keys, value) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - if (o[key] === undefined) o[key] = {}; - o = o[key]; - }); - - var key = keys[keys.length - 1]; - if (o[key] === undefined || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } -} - -function isNumber (x) { - if (typeof x === 'number') return true; - if (/^0x[0-9a-f]+$/i.test(x)) return true; - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - -function longest (xs) { - return Math.max.apply(null, xs.map(function (x) { return x.length })); -} diff --git a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/package.json b/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/package.json deleted file mode 100644 index 09e9ec441..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "minimist", - "version": "0.0.8", - "description": "parse argument options", - "main": "index.js", - "devDependencies": { - "tape": "~1.0.4", - "tap": "~0.4.0" - }, - "scripts": { - "test": "tap test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "ff/5", - "firefox/latest", - "chrome/10", - "chrome/latest", - "safari/5.1", - "safari/latest", - "opera/12" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/minimist.git" - }, - "homepage": "https://github.com/substack/minimist", - "keywords": [ - "argv", - "getopt", - "parser", - "optimist" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/substack/minimist/issues" - }, - "_id": "minimist@0.0.8", - "dist": { - "shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d", - "tarball": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" - }, - "_from": "minimist@0.0.8", - "_npmVersion": "1.4.3", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "directories": {}, - "_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d", - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/readme.markdown b/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/readme.markdown deleted file mode 100644 index c25635323..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/readme.markdown +++ /dev/null @@ -1,73 +0,0 @@ -# minimist - -parse argument options - -This module is the guts of optimist's argument parser without all the -fanciful decoration. - -[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) - -[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) - -# example - -``` js -var argv = require('minimist')(process.argv.slice(2)); -console.dir(argv); -``` - -``` -$ node example/parse.js -a beep -b boop -{ _: [], a: 'beep', b: 'boop' } -``` - -``` -$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz -{ _: [ 'foo', 'bar', 'baz' ], - x: 3, - y: 4, - n: 5, - a: true, - b: true, - c: true, - beep: 'boop' } -``` - -# methods - -``` js -var parseArgs = require('minimist') -``` - -## var argv = parseArgs(args, opts={}) - -Return an argument object `argv` populated with the array arguments from `args`. - -`argv._` contains all the arguments that didn't have an option associated with -them. - -Numeric-looking arguments will be returned as numbers unless `opts.string` or -`opts.boolean` is set for that argument name. - -Any arguments after `'--'` will not be parsed and will end up in `argv._`. - -options can be: - -* `opts.string` - a string or array of strings argument names to always treat as -strings -* `opts.boolean` - a string or array of strings to always treat as booleans -* `opts.alias` - an object mapping string names to strings or arrays of string -argument names to use as aliases -* `opts.default` - an object mapping string argument names to default values - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install minimist -``` - -# license - -MIT diff --git a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/dash.js b/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/dash.js deleted file mode 100644 index 8b034b99a..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/dash.js +++ /dev/null @@ -1,24 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('-', function (t) { - t.plan(5); - t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); - t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); - t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); - t.deepEqual( - parse([ '-b', '-' ], { boolean: 'b' }), - { b: true, _: [ '-' ] } - ); - t.deepEqual( - parse([ '-s', '-' ], { string: 's' }), - { s: '-', _: [] } - ); -}); - -test('-a -- b', function (t) { - t.plan(3); - t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/default_bool.js b/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/default_bool.js deleted file mode 100644 index f0041ee40..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/default_bool.js +++ /dev/null @@ -1,20 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('boolean default true', function (t) { - var argv = parse([], { - boolean: 'sometrue', - default: { sometrue: true } - }); - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = parse([], { - boolean: 'somefalse', - default: { somefalse: false } - }); - t.equal(argv.somefalse, false); - t.end(); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/dotted.js b/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/dotted.js deleted file mode 100644 index ef0ae349b..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/dotted.js +++ /dev/null @@ -1,16 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('dotted alias', function (t) { - var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 22); - t.equal(argv.aa.bb, 22); - t.end(); -}); - -test('dotted default', function (t) { - var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 11); - t.equal(argv.aa.bb, 11); - t.end(); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/long.js b/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/long.js deleted file mode 100644 index 5d3a1e09d..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/long.js +++ /dev/null @@ -1,31 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('long opts', function (t) { - t.deepEqual( - parse([ '--bool' ]), - { bool : true, _ : [] }, - 'long boolean' - ); - t.deepEqual( - parse([ '--pow', 'xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture sp' - ); - t.deepEqual( - parse([ '--pow=xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture eq' - ); - t.deepEqual( - parse([ '--host', 'localhost', '--port', '555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures sp' - ); - t.deepEqual( - parse([ '--host=localhost', '--port=555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures eq' - ); - t.end(); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/parse.js b/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/parse.js deleted file mode 100644 index 8a9064669..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/parse.js +++ /dev/null @@ -1,318 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse args', function (t) { - t.deepEqual( - parse([ '--no-moo' ]), - { moo : false, _ : [] }, - 'no' - ); - t.deepEqual( - parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), - { v : ['a','b','c'], _ : [] }, - 'multi' - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.deepEqual( - parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek' - ]), - { - c : true, - a : true, - t : true, - s : 'woo', - h : 'awesome', - b : true, - bool : true, - key : 'value', - multi : [ 'quux', 'baz' ], - meep : false, - name : 'meowmers', - _ : [ 'bare', '--not-a-flag', 'eek' ] - } - ); - t.end(); -}); - -test('nums', function (t) { - var argv = parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789' - ]); - t.deepEqual(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ] - }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv.y, 'number'); - t.deepEqual(typeof argv.z, 'number'); - t.deepEqual(typeof argv.w, 'string'); - t.deepEqual(typeof argv.hex, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); - -test('flag boolean', function (t) { - var argv = parse([ '-t', 'moo' ], { boolean: 't' }); - t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { - boolean: [ 't', 'verbose' ], - default: { verbose: true } - }); - - t.deepEqual(argv, { - verbose: false, - t: true, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean default false', function (t) { - var argv = parse(['moo'], { - boolean: ['t', 'verbose'], - default: { verbose: false, t: false } - }); - - t.deepEqual(argv, { - verbose: false, - t: false, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { - boolean: ['x','y','z'] - }); - - t.deepEqual(argv, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ] - }); - - t.deepEqual(typeof argv.x, 'boolean'); - t.deepEqual(typeof argv.y, 'boolean'); - t.deepEqual(typeof argv.z, 'boolean'); - t.end(); -}); - -test('newlines in params' , function (t) { - var args = parse([ '-s', "X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = parse([ "--s=X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - t.end(); -}); - -test('strings' , function (t) { - var s = parse([ '-s', '0001234' ], { string: 's' }).s; - t.equal(s, '0001234'); - t.equal(typeof s, 'string'); - - var x = parse([ '-x', '56' ], { string: 'x' }).x; - t.equal(x, '56'); - t.equal(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = parse([ ' ', ' ' ], { string: '_' })._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('empty strings', function(t) { - var s = parse([ '-s' ], { string: 's' }).s; - t.equal(s, ''); - t.equal(typeof s, 'string'); - - var str = parse([ '--str' ], { string: 'str' }).str; - t.equal(str, ''); - t.equal(typeof str, 'string'); - - var letters = parse([ '-art' ], { - string: [ 'a', 't' ] - }); - - t.equal(letters.a, ''); - t.equal(letters.r, true); - t.equal(letters.t, ''); - - t.end(); -}); - - -test('slashBreak', function (t) { - t.same( - parse([ '-I/foo/bar/baz' ]), - { I : '/foo/bar/baz', _ : [] } - ); - t.same( - parse([ '-xyz/foo/bar/baz' ]), - { x : true, y : true, z : '/foo/bar/baz', _ : [] } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: 'zoom' } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: [ 'zm', 'zoom' ] } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = parse([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop' - ]); - - t.same(argv.foo, { - bar : 3, - baz : 4, - quux : { - quibble : 5, - o_O : true - } - }); - t.same(argv.beep, { boop : true }); - t.end(); -}); - -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = parse(aliased, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var propertyArgv = parse(regular, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - alias: { 'h': 'herp' }, - boolean: 'herp' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = parse(['--boool', '--other=true'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = parse(['--boool', '--other=false'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js b/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js deleted file mode 100644 index 21851b036..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js +++ /dev/null @@ -1,9 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse with modifier functions' , function (t) { - t.plan(1); - - var argv = parse([ '-b', '123' ], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: ['123'] }); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/short.js b/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/short.js deleted file mode 100644 index d513a1c25..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/short.js +++ /dev/null @@ -1,67 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('numeric short args', function (t) { - t.plan(2); - t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); - t.deepEqual( - parse([ '-123', '456' ]), - { 1: true, 2: true, 3: 456, _: [] } - ); -}); - -test('short', function (t) { - t.deepEqual( - parse([ '-b' ]), - { b : true, _ : [] }, - 'short boolean' - ); - t.deepEqual( - parse([ 'foo', 'bar', 'baz' ]), - { _ : [ 'foo', 'bar', 'baz' ] }, - 'bare' - ); - t.deepEqual( - parse([ '-cats' ]), - { c : true, a : true, t : true, s : true, _ : [] }, - 'group' - ); - t.deepEqual( - parse([ '-cats', 'meow' ]), - { c : true, a : true, t : true, s : 'meow', _ : [] }, - 'short group next' - ); - t.deepEqual( - parse([ '-h', 'localhost' ]), - { h : 'localhost', _ : [] }, - 'short capture' - ); - t.deepEqual( - parse([ '-h', 'localhost', '-p', '555' ]), - { h : 'localhost', p : 555, _ : [] }, - 'short captures' - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.deepEqual( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/whitespace.js b/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/whitespace.js deleted file mode 100644 index 8a52a58ce..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/test/whitespace.js +++ /dev/null @@ -1,8 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('whitespace should be whitespace' , function (t) { - t.plan(1); - var x = parse([ '-x', '\t' ]).x; - t.equal(x, '\t'); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/package.json b/cli/node_modules/mocha/node_modules/mkdirp/package.json deleted file mode 100644 index a915c51f4..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "mkdirp", - "description": "Recursively mkdir, like `mkdir -p`", - "version": "0.5.0", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "main": "./index", - "keywords": [ - "mkdir", - "directory" - ], - "repository": { - "type": "git", - "url": "https://github.com/substack/node-mkdirp.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "dependencies": { - "minimist": "0.0.8" - }, - "devDependencies": { - "tap": "~0.4.0", - "mock-fs": "~2.2.0" - }, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/substack/node-mkdirp/issues" - }, - "homepage": "https://github.com/substack/node-mkdirp", - "_id": "mkdirp@0.5.0", - "dist": { - "shasum": "1d73076a6df986cd9344e15e71fcc05a4c9abf12", - "tarball": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz" - }, - "_from": "mkdirp@0.5.0", - "_npmVersion": "1.4.3", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "directories": {}, - "_shasum": "1d73076a6df986cd9344e15e71fcc05a4c9abf12", - "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/mocha/node_modules/mkdirp/readme.markdown b/cli/node_modules/mocha/node_modules/mkdirp/readme.markdown deleted file mode 100644 index 3cc131538..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/readme.markdown +++ /dev/null @@ -1,100 +0,0 @@ -# mkdirp - -Like `mkdir -p`, but in node.js! - -[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp) - -# example - -## pow.js - -```js -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); -``` - -Output - -``` -pow! -``` - -And now /tmp/foo/bar/baz exists, huzzah! - -# methods - -```js -var mkdirp = require('mkdirp'); -``` - -## mkdirp(dir, opts, cb) - -Create a new directory and any necessary subdirectories at `dir` with octal -permission string `opts.mode`. If `opts` is a non-object, it will be treated as -the `opts.mode`. - -If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -`cb(err, made)` fires with the error or the first directory `made` -that had to be created, if any. - -You can optionally pass in an alternate `fs` implementation by passing in -`opts.fs`. Your implementation should have `opts.fs.mkdir(path, mode, cb)` and -`opts.fs.stat(path, cb)`. - -## mkdirp.sync(dir, opts) - -Synchronously create a new directory and any necessary subdirectories at `dir` -with octal permission string `opts.mode`. If `opts` is a non-object, it will be -treated as the `opts.mode`. - -If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -Returns the first directory that had to be created, if any. - -You can optionally pass in an alternate `fs` implementation by passing in -`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` and -`opts.fs.statSync(path)`. - -# usage - -This package also ships with a `mkdirp` command. - -``` -usage: mkdirp [DIR1,DIR2..] {OPTIONS} - - Create each supplied directory including any necessary parent directories that - don't yet exist. - - If the directory already exists, do nothing. - -OPTIONS are: - - -m, --mode If a directory needs to be created, set the mode as an octal - permission string. - -``` - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install mkdirp -``` - -to get the library, or - -``` -npm install -g mkdirp -``` - -to get the command. - -# license - -MIT diff --git a/cli/node_modules/mocha/node_modules/mkdirp/test/chmod.js b/cli/node_modules/mocha/node_modules/mkdirp/test/chmod.js deleted file mode 100644 index 520dcb8e9..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/test/chmod.js +++ /dev/null @@ -1,38 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -test('chmod-pre', function (t) { - var mode = 0744 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.equal(stat && stat.mode & 0777, mode, 'should be 0744'); - t.end(); - }); - }); -}); - -test('chmod', function (t) { - var mode = 0755 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.end(); - }); - }); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/test/clobber.js b/cli/node_modules/mocha/node_modules/mkdirp/test/clobber.js deleted file mode 100644 index 0eb709987..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/test/clobber.js +++ /dev/null @@ -1,37 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -// a file in the way -var itw = ps.slice(0, 3).join('/'); - - -test('clobber-pre', function (t) { - console.error("about to write to "+itw) - fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); - - fs.stat(itw, function (er, stat) { - t.ifError(er) - t.ok(stat && stat.isFile(), 'should be file') - t.end() - }) -}) - -test('clobber', function (t) { - t.plan(2); - mkdirp(file, 0755, function (err) { - t.ok(err); - t.equal(err.code, 'ENOTDIR'); - t.end(); - }); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/test/mkdirp.js b/cli/node_modules/mocha/node_modules/mkdirp/test/mkdirp.js deleted file mode 100644 index 3b624ddbe..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/test/mkdirp.js +++ /dev/null @@ -1,26 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; - -test('woo', function (t) { - t.plan(5); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - t.ifError(err); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }) - }) - }); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/test/opts_fs.js b/cli/node_modules/mocha/node_modules/mkdirp/test/opts_fs.js deleted file mode 100644 index f1fbeca14..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/test/opts_fs.js +++ /dev/null @@ -1,27 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var test = require('tap').test; -var mockfs = require('mock-fs'); - -test('opts.fs', function (t) { - t.plan(5); - - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/beep/boop/' + [x,y,z].join('/'); - var xfs = mockfs.fs(); - - mkdirp(file, { fs: xfs, mode: 0755 }, function (err) { - t.ifError(err); - xfs.exists(file, function (ex) { - t.ok(ex, 'created file'); - xfs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }); - }); - }); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/test/opts_fs_sync.js b/cli/node_modules/mocha/node_modules/mkdirp/test/opts_fs_sync.js deleted file mode 100644 index 224b50642..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/test/opts_fs_sync.js +++ /dev/null @@ -1,25 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var test = require('tap').test; -var mockfs = require('mock-fs'); - -test('opts.fs sync', function (t) { - t.plan(4); - - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/beep/boop/' + [x,y,z].join('/'); - var xfs = mockfs.fs(); - - mkdirp.sync(file, { fs: xfs, mode: 0755 }); - xfs.exists(file, function (ex) { - t.ok(ex, 'created file'); - xfs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }); - }); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/test/perm.js b/cli/node_modules/mocha/node_modules/mkdirp/test/perm.js deleted file mode 100644 index 2c9759052..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/test/perm.js +++ /dev/null @@ -1,30 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; - -test('async perm', function (t) { - t.plan(5); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); - - mkdirp(file, 0755, function (err) { - t.ifError(err); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }) - }) - }); -}); - -test('async root perm', function (t) { - mkdirp('/tmp', 0755, function (err) { - if (err) t.fail(err); - t.end(); - }); - t.end(); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/test/perm_sync.js b/cli/node_modules/mocha/node_modules/mkdirp/test/perm_sync.js deleted file mode 100644 index 327e54b2e..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/test/perm_sync.js +++ /dev/null @@ -1,34 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; - -test('sync perm', function (t) { - t.plan(4); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; - - mkdirp.sync(file, 0755); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }); - }); -}); - -test('sync root perm', function (t) { - t.plan(3); - - var file = '/tmp'; - mkdirp.sync(file, 0755); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.ok(stat.isDirectory(), 'target not a directory'); - }) - }); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/test/race.js b/cli/node_modules/mocha/node_modules/mkdirp/test/race.js deleted file mode 100644 index 7c295f410..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/test/race.js +++ /dev/null @@ -1,40 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; - -test('race', function (t) { - t.plan(6); - var ps = [ '', 'tmp' ]; - - for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); - } - var file = ps.join('/'); - - var res = 2; - mk(file, function () { - if (--res === 0) t.end(); - }); - - mk(file, function () { - if (--res === 0) t.end(); - }); - - function mk (file, cb) { - mkdirp(file, 0755, function (err) { - t.ifError(err); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - if (cb) cb(); - }); - }) - }); - } -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/test/rel.js b/cli/node_modules/mocha/node_modules/mkdirp/test/rel.js deleted file mode 100644 index d1f175c24..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/test/rel.js +++ /dev/null @@ -1,30 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; - -test('rel', function (t) { - t.plan(5); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var cwd = process.cwd(); - process.chdir('/tmp'); - - var file = [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - t.ifError(err); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - process.chdir(cwd); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }) - }) - }); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/test/return.js b/cli/node_modules/mocha/node_modules/mkdirp/test/return.js deleted file mode 100644 index bce68e561..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/test/return.js +++ /dev/null @@ -1,25 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(4); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, '/tmp/' + x); - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, null); - }); - }); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/test/return_sync.js b/cli/node_modules/mocha/node_modules/mkdirp/test/return_sync.js deleted file mode 100644 index 7c222d355..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/test/return_sync.js +++ /dev/null @@ -1,24 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - // Note that this will throw on failure, which will fail the test. - var made = mkdirp.sync(file); - t.equal(made, '/tmp/' + x); - - // making the same file again should have no effect. - made = mkdirp.sync(file); - t.equal(made, null); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/test/root.js b/cli/node_modules/mocha/node_modules/mkdirp/test/root.js deleted file mode 100644 index 97ad7a2f3..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/test/root.js +++ /dev/null @@ -1,18 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('root', function (t) { - // '/' on unix, 'c:/' on windows. - var file = path.resolve('/'); - - mkdirp(file, 0755, function (err) { - if (err) throw err - fs.stat(file, function (er, stat) { - if (er) throw er - t.ok(stat.isDirectory(), 'target is a directory'); - t.end(); - }) - }); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/test/sync.js b/cli/node_modules/mocha/node_modules/mkdirp/test/sync.js deleted file mode 100644 index 88fa4324e..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/test/sync.js +++ /dev/null @@ -1,30 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; - -test('sync', function (t) { - t.plan(4); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file, 0755); - } catch (err) { - t.fail(err); - return t.end(); - } - - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }); - }); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/test/umask.js b/cli/node_modules/mocha/node_modules/mkdirp/test/umask.js deleted file mode 100644 index 82c393a00..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/test/umask.js +++ /dev/null @@ -1,26 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; - -test('implicit mode from umask', function (t) { - t.plan(5); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, function (err) { - t.ifError(err); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & 0777, 0777 & (~process.umask())); - t.ok(stat.isDirectory(), 'target not a directory'); - }); - }) - }); -}); diff --git a/cli/node_modules/mocha/node_modules/mkdirp/test/umask_sync.js b/cli/node_modules/mocha/node_modules/mkdirp/test/umask_sync.js deleted file mode 100644 index e537fbe4b..000000000 --- a/cli/node_modules/mocha/node_modules/mkdirp/test/umask_sync.js +++ /dev/null @@ -1,30 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; - -test('umask sync modes', function (t) { - t.plan(4); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file); - } catch (err) { - t.fail(err); - return t.end(); - } - - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & 0777, (0777 & (~process.umask()))); - t.ok(stat.isDirectory(), 'target not a directory'); - }); - }); -}); diff --git a/cli/node_modules/mocha/node_modules/supports-color/cli.js b/cli/node_modules/mocha/node_modules/supports-color/cli.js deleted file mode 100755 index e74698766..000000000 --- a/cli/node_modules/mocha/node_modules/supports-color/cli.js +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node -'use strict'; -var pkg = require('./package.json'); -var supportsColor = require('./'); -var argv = process.argv.slice(2); - -function help() { - console.log([ - '', - ' ' + pkg.description, - '', - ' Usage', - ' supports-color', - '', - ' Exits with code 0 if color is supported and 1 if not' - ].join('\n')); -} - -if (argv.indexOf('--help') !== -1) { - help(); - return; -} - -if (argv.indexOf('--version') !== -1) { - console.log(pkg.version); - return; -} - -process.exit(supportsColor ? 0 : 1); diff --git a/cli/node_modules/mocha/node_modules/supports-color/index.js b/cli/node_modules/mocha/node_modules/supports-color/index.js deleted file mode 100644 index a2b978450..000000000 --- a/cli/node_modules/mocha/node_modules/supports-color/index.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; -var argv = process.argv; - -module.exports = (function () { - if (argv.indexOf('--no-color') !== -1 || - argv.indexOf('--no-colors') !== -1 || - argv.indexOf('--color=false') !== -1) { - return false; - } - - if (argv.indexOf('--color') !== -1 || - argv.indexOf('--colors') !== -1 || - argv.indexOf('--color=true') !== -1 || - argv.indexOf('--color=always') !== -1) { - return true; - } - - if (process.stdout && !process.stdout.isTTY) { - return false; - } - - if (process.platform === 'win32') { - return true; - } - - if ('COLORTERM' in process.env) { - return true; - } - - if (process.env.TERM === 'dumb') { - return false; - } - - if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { - return true; - } - - return false; -})(); diff --git a/cli/node_modules/mocha/node_modules/supports-color/license b/cli/node_modules/mocha/node_modules/supports-color/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/cli/node_modules/mocha/node_modules/supports-color/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/cli/node_modules/mocha/node_modules/supports-color/package.json b/cli/node_modules/mocha/node_modules/supports-color/package.json deleted file mode 100644 index eb78419f2..000000000 --- a/cli/node_modules/mocha/node_modules/supports-color/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "name": "supports-color", - "version": "1.2.1", - "description": "Detect whether a terminal supports color", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/sindresorhus/supports-color" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - } - ], - "bin": { - "supports-color": "cli.js" - }, - "engines": { - "node": ">=0.8.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js", - "cli.js" - ], - "keywords": [ - "cli", - "bin", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "supports", - "capability", - "detect" - ], - "devDependencies": { - "mocha": "*", - "require-uncached": "^1.0.2" - }, - "gitHead": "ffe5e224bd24dc0410787b94e192d240be025aec", - "bugs": { - "url": "https://github.com/sindresorhus/supports-color/issues" - }, - "homepage": "https://github.com/sindresorhus/supports-color", - "_id": "supports-color@1.2.1", - "_shasum": "12ee21507086cd98c1058d9ec0f4ac476b7af3b2", - "_from": "supports-color@>=1.2.0 <1.3.0", - "_npmVersion": "2.1.16", - "_nodeVersion": "0.10.35", - "_npmUser": { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - }, - "dist": { - "shasum": "12ee21507086cd98c1058d9ec0f4ac476b7af3b2", - "tarball": "http://registry.npmjs.org/supports-color/-/supports-color-1.2.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.2.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/mocha/node_modules/supports-color/readme.md b/cli/node_modules/mocha/node_modules/supports-color/readme.md deleted file mode 100644 index 32d4f46e9..000000000 --- a/cli/node_modules/mocha/node_modules/supports-color/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# supports-color [![Build Status](https://travis-ci.org/sindresorhus/supports-color.svg?branch=master)](https://travis-ci.org/sindresorhus/supports-color) - -> Detect whether a terminal supports color - - -## Install - -```sh -$ npm install --save supports-color -``` - - -## Usage - -```js -var supportsColor = require('supports-color'); - -if (supportsColor) { - console.log('Terminal supports color'); -} -``` - -It obeys the `--color` and `--no-color` CLI flags. - - -## CLI - -```sh -$ npm install --global supports-color -``` - -``` -$ supports-color --help - - Usage - supports-color - - Exits with code 0 if color is supported and 1 if not -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/cli/node_modules/mocha/package.json b/cli/node_modules/mocha/package.json deleted file mode 100644 index fd2104f9c..000000000 --- a/cli/node_modules/mocha/package.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "name": "mocha", - "version": "2.2.5", - "description": "simple, flexible, fun test framework", - "keywords": [ - "mocha", - "test", - "bdd", - "tdd", - "tap" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "contributors": [ - { - "name": "Joshua Appelman", - "email": "joshua@jbna.nl" - }, - { - "name": "Christoffer Hallas", - "email": "christoffer.hallas@gmail.com" - }, - { - "name": "Christopher Hiller", - "email": "chiller@badwing.com" - }, - { - "name": "Travis Jeffery", - "email": "tj@travisjeffery.com" - }, - { - "name": "Daniel St. Jules", - "email": "danielst.jules@gmail.com" - }, - { - "name": "David da Silva Contín", - "email": "dasilvacontin@gmail.com" - }, - { - "name": "Ariel Mashraki", - "email": "ariel@mashraki.co.il" - }, - { - "name": "Pawel Kozlowski", - "email": "pkozlowski.opensource@gmail.com" - } - ], - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/mochajs/mocha.git" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "travisjeffery", - "email": "tj@travisjeffery.com" - }, - { - "name": "boneskull", - "email": "chiller@badwing.com" - } - ], - "main": "./index", - "browser": "./mocha.js", - "bin": { - "mocha": "./bin/mocha", - "_mocha": "./bin/_mocha" - }, - "engines": { - "node": ">= 0.8.x" - }, - "scripts": { - "test": "make test-all" - }, - "dependencies": { - "commander": "2.3.0", - "debug": "2.0.0", - "diff": "1.4.0", - "escape-string-regexp": "1.0.2", - "glob": "3.2.3", - "growl": "1.8.1", - "jade": "0.26.3", - "mkdirp": "0.5.0", - "supports-color": "~1.2.0" - }, - "devDependencies": { - "coffee-script": "~1.8.0", - "should": "~4.0.0" - }, - "files": [ - "bin", - "images", - "lib", - "index.js", - "mocha.css", - "mocha.js", - "LICENSE" - ], - "licenses": [ - { - "type": "MIT", - "url": "https://raw.github.com/mochajs/mocha/master/LICENSE" - } - ], - "bugs": { - "url": "https://github.com/mochajs/mocha/issues" - }, - "homepage": "https://github.com/mochajs/mocha", - "_id": "mocha@2.2.5", - "_shasum": "d3b72a4fe49ec9439353f1ac893dbc430d993140", - "_from": "mocha@*", - "_npmVersion": "1.4.9", - "_npmUser": { - "name": "travisjeffery", - "email": "tj@travisjeffery.com" - }, - "dist": { - "shasum": "d3b72a4fe49ec9439353f1ac893dbc430d993140", - "tarball": "http://registry.npmjs.org/mocha/-/mocha-2.2.5.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/mocha/-/mocha-2.2.5.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/node-uuid/.npmignore b/cli/node_modules/node-uuid/.npmignore deleted file mode 100644 index fd4f2b066..000000000 --- a/cli/node_modules/node-uuid/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.DS_Store diff --git a/cli/node_modules/node-uuid/LICENSE.md b/cli/node_modules/node-uuid/LICENSE.md deleted file mode 100644 index 652609b37..000000000 --- a/cli/node_modules/node-uuid/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2010-2012 Robert Kieffer - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/cli/node_modules/node-uuid/README.md b/cli/node_modules/node-uuid/README.md deleted file mode 100644 index b7d04c940..000000000 --- a/cli/node_modules/node-uuid/README.md +++ /dev/null @@ -1,243 +0,0 @@ -# node-uuid - -Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. - -Features: - -* Generate RFC4122 version 1 or version 4 UUIDs -* Runs in node.js and all browsers. -* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid'). -* Cryptographically strong random # generation on supporting platforms -* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! ) -* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html) -* Comes with a Command Line Interface for generating uuids on the command line - -## Getting Started - -Install it in your browser: - -```html - -``` - -Or in node.js: - -``` -npm install node-uuid -``` - -```javascript -var uuid = require('node-uuid'); -``` - -Then create some ids ... - -```javascript -// Generate a v1 (time-based) id -uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' - -// Generate a v4 (random) id -uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1' -``` - -## API - -### uuid.v1([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v1 (timestamp-based) UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. - * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. - * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used. - * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Notes: - -1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v1({ - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678 -}); // -> "710b962e-041c-11e1-9234-0123456789ab" -``` - -Example: In-place generation of two binary IDs - -```javascript -// Generate two ids in an array -var arr = new Array(32); // -> [] -uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15] -uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15] - -// Optionally use uuid.unparse() to get stringify the ids -uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115' -uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115' -``` - -### uuid.v4([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v4 UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values - * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v4({ - random: [ - 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, - 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 - ] -}); -// -> "109156be-c4fb-41ea-b1b4-efe1671c5836" -``` - -Example: Generate two IDs in a single buffer - -```javascript -var buffer = new Array(32); // (or 'new Buffer' in node.js) -uuid.v4(null, buffer, 0); -uuid.v4(null, buffer, 16); -``` - -### uuid.parse(id[, buffer[, offset]]) -### uuid.unparse(buffer[, offset]) - -Parse and unparse UUIDs - - * `id` - (String) UUID(-like) string - * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used - * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0 - -Example parsing and unparsing a UUID string - -```javascript -var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> -var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10' -``` - -### uuid.noConflict() - -(Browsers only) Set `uuid` property back to it's previous value. - -Returns the node-uuid object. - -Example: - -```javascript -var myUuid = uuid.noConflict(); -myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' -``` - -## Deprecated APIs - -Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version. - -### uuid([format [, buffer [, offset]]]) - -uuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary). - -### uuid.BufferClass - -The class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API. - -## Command Line Interface - -To use the executable, it's probably best to install this library globally. - -`npm install -g node-uuid` - -Usage: - -``` -USAGE: uuid [version] [options] - - -options: - ---help Display this message and exit -``` - -`version` must be an RFC4122 version that is supported by this library, which is currently version 1 and version 4 (denoted by "v1" and "v4", respectively). `version` defaults to version 4 when not supplied. - -### Examples - -``` -> uuid -3a91f950-dec8-4688-ba14-5b7bbfc7a563 -``` - -``` -> uuid v1 -9d0b43e0-7696-11e3-964b-250efa37a98e -``` - -``` -> uuid v4 -6790ac7c-24ac-4f98-8464-42f6d98a53ae -``` - -## Testing - -In node.js - -``` -npm test -``` - -In Browser - -``` -open test/test.html -``` - -### Benchmarking - -Requires node.js - -``` -npm install uuid uuid-js -node benchmark/benchmark.js -``` - -For a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark) - -For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance). - -## Release notes - -### 1.4.0 - -* Improved module context detection -* Removed public RNG functions - -### 1.3.2 - -* Improve tests and handling of v1() options (Issue #24) -* Expose RNG option to allow for perf testing with different generators - -### 1.3.0 - -* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! -* Support for node.js crypto API -* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/cli/node_modules/node-uuid/benchmark/README.md b/cli/node_modules/node-uuid/benchmark/README.md deleted file mode 100644 index aaeb2ea01..000000000 --- a/cli/node_modules/node-uuid/benchmark/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# node-uuid Benchmarks - -### Results - -To see the results of our benchmarks visit https://github.com/broofa/node-uuid/wiki/Benchmark - -### Run them yourself - -node-uuid comes with some benchmarks to measure performance of generating UUIDs. These can be run using node.js. node-uuid is being benchmarked against some other uuid modules, that are available through npm namely `uuid` and `uuid-js`. - -To prepare and run the benchmark issue; - -``` -npm install uuid uuid-js -node benchmark/benchmark.js -``` - -You'll see an output like this one: - -``` -# v4 -nodeuuid.v4(): 854700 uuids/second -nodeuuid.v4('binary'): 788643 uuids/second -nodeuuid.v4('binary', buffer): 1336898 uuids/second -uuid(): 479386 uuids/second -uuid('binary'): 582072 uuids/second -uuidjs.create(4): 312304 uuids/second - -# v1 -nodeuuid.v1(): 938086 uuids/second -nodeuuid.v1('binary'): 683060 uuids/second -nodeuuid.v1('binary', buffer): 1644736 uuids/second -uuidjs.create(1): 190621 uuids/second -``` - -* The `uuid()` entries are for Nikhil Marathe's [uuid module](https://bitbucket.org/nikhilm/uuidjs) which is a wrapper around the native libuuid library. -* The `uuidjs()` entries are for Patrick Negri's [uuid-js module](https://github.com/pnegri/uuid-js) which is a pure javascript implementation based on [UUID.js](https://github.com/LiosK/UUID.js) by LiosK. - -If you want to get more reliable results you can run the benchmark multiple times and write the output into a log file: - -``` -for i in {0..9}; do node benchmark/benchmark.js >> benchmark/bench_0.4.12.log; done; -``` - -If you're interested in how performance varies between different node versions, you can issue the above command multiple times. - -You can then use the shell script `bench.sh` provided in this directory to calculate the averages over all benchmark runs and draw a nice plot: - -``` -(cd benchmark/ && ./bench.sh) -``` - -This assumes you have [gnuplot](http://www.gnuplot.info/) and [ImageMagick](http://www.imagemagick.org/) installed. You'll find a nice `bench.png` graph in the `benchmark/` directory then. diff --git a/cli/node_modules/node-uuid/benchmark/bench.gnu b/cli/node_modules/node-uuid/benchmark/bench.gnu deleted file mode 100644 index a342fbbe0..000000000 --- a/cli/node_modules/node-uuid/benchmark/bench.gnu +++ /dev/null @@ -1,174 +0,0 @@ -#!/opt/local/bin/gnuplot -persist -# -# -# G N U P L O T -# Version 4.4 patchlevel 3 -# last modified March 2011 -# System: Darwin 10.8.0 -# -# Copyright (C) 1986-1993, 1998, 2004, 2007-2010 -# Thomas Williams, Colin Kelley and many others -# -# gnuplot home: http://www.gnuplot.info -# faq, bugs, etc: type "help seeking-assistance" -# immediate help: type "help" -# plot window: hit 'h' -set terminal postscript eps noenhanced defaultplex \ - leveldefault color colortext \ - solid linewidth 1.2 butt noclip \ - palfuncparam 2000,0.003 \ - "Helvetica" 14 -set output 'bench.eps' -unset clip points -set clip one -unset clip two -set bar 1.000000 front -set border 31 front linetype -1 linewidth 1.000 -set xdata -set ydata -set zdata -set x2data -set y2data -set timefmt x "%d/%m/%y,%H:%M" -set timefmt y "%d/%m/%y,%H:%M" -set timefmt z "%d/%m/%y,%H:%M" -set timefmt x2 "%d/%m/%y,%H:%M" -set timefmt y2 "%d/%m/%y,%H:%M" -set timefmt cb "%d/%m/%y,%H:%M" -set boxwidth -set style fill empty border -set style rectangle back fc lt -3 fillstyle solid 1.00 border lt -1 -set style circle radius graph 0.02, first 0, 0 -set dummy x,y -set format x "% g" -set format y "% g" -set format x2 "% g" -set format y2 "% g" -set format z "% g" -set format cb "% g" -set angles radians -unset grid -set key title "" -set key outside left top horizontal Right noreverse enhanced autotitles columnhead nobox -set key noinvert samplen 4 spacing 1 width 0 height 0 -set key maxcolumns 2 maxrows 0 -unset label -unset arrow -set style increment default -unset style line -set style line 1 linetype 1 linewidth 2.000 pointtype 1 pointsize default pointinterval 0 -unset style arrow -set style histogram clustered gap 2 title offset character 0, 0, 0 -unset logscale -set offsets graph 0.05, 0.15, 0, 0 -set pointsize 1.5 -set pointintervalbox 1 -set encoding default -unset polar -unset parametric -unset decimalsign -set view 60, 30, 1, 1 -set samples 100, 100 -set isosamples 10, 10 -set surface -unset contour -set clabel '%8.3g' -set mapping cartesian -set datafile separator whitespace -unset hidden3d -set cntrparam order 4 -set cntrparam linear -set cntrparam levels auto 5 -set cntrparam points 5 -set size ratio 0 1,1 -set origin 0,0 -set style data points -set style function lines -set xzeroaxis linetype -2 linewidth 1.000 -set yzeroaxis linetype -2 linewidth 1.000 -set zzeroaxis linetype -2 linewidth 1.000 -set x2zeroaxis linetype -2 linewidth 1.000 -set y2zeroaxis linetype -2 linewidth 1.000 -set ticslevel 0.5 -set mxtics default -set mytics default -set mztics default -set mx2tics default -set my2tics default -set mcbtics default -set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set xtics norangelimit -set xtics () -set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set ytics autofreq norangelimit -set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0 -set ztics autofreq norangelimit -set nox2tics -set noy2tics -set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set cbtics autofreq norangelimit -set title "" -set title offset character 0, 0, 0 font "" norotate -set timestamp bottom -set timestamp "" -set timestamp offset character 0, 0, 0 font "" norotate -set rrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) -set autoscale rfixmin -set autoscale rfixmax -set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) -set autoscale tfixmin -set autoscale tfixmax -set urange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale ufixmin -set autoscale ufixmax -set vrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale vfixmin -set autoscale vfixmax -set xlabel "" -set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate -set x2label "" -set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate -set xrange [ * : * ] noreverse nowriteback # (currently [-0.150000:3.15000] ) -set autoscale xfixmin -set autoscale xfixmax -set x2range [ * : * ] noreverse nowriteback # (currently [0.00000:3.00000] ) -set autoscale x2fixmin -set autoscale x2fixmax -set ylabel "" -set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set y2label "" -set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set yrange [ 0.00000 : 1.90000e+06 ] noreverse nowriteback # (currently [:] ) -set autoscale yfixmin -set autoscale yfixmax -set y2range [ * : * ] noreverse nowriteback # (currently [0.00000:1.90000e+06] ) -set autoscale y2fixmin -set autoscale y2fixmax -set zlabel "" -set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate -set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale zfixmin -set autoscale zfixmax -set cblabel "" -set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set cbrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) -set autoscale cbfixmin -set autoscale cbfixmax -set zero 1e-08 -set lmargin -1 -set bmargin -1 -set rmargin -1 -set tmargin -1 -set pm3d explicit at s -set pm3d scansautomatic -set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean -set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB -set palette rgbformulae 7, 5, 15 -set colorbox default -set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault -set loadpath -set fontpath -set fit noerrorvariables -GNUTERM = "aqua" -plot 'bench_results.txt' using 2:xticlabel(1) w lp lw 2, '' using 3:xticlabel(1) w lp lw 2, '' using 4:xticlabel(1) w lp lw 2, '' using 5:xticlabel(1) w lp lw 2, '' using 6:xticlabel(1) w lp lw 2, '' using 7:xticlabel(1) w lp lw 2, '' using 8:xticlabel(1) w lp lw 2, '' using 9:xticlabel(1) w lp lw 2 -# EOF diff --git a/cli/node_modules/node-uuid/benchmark/bench.sh b/cli/node_modules/node-uuid/benchmark/bench.sh deleted file mode 100755 index d870a0cb0..000000000 --- a/cli/node_modules/node-uuid/benchmark/bench.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# for a given node version run: -# for i in {0..9}; do node benchmark.js >> bench_0.6.2.log; done; - -PATTERNS=('nodeuuid.v1()' "nodeuuid.v1('binary'," 'nodeuuid.v4()' "nodeuuid.v4('binary'," "uuid()" "uuid('binary')" 'uuidjs.create(1)' 'uuidjs.create(4)' '140byte') -FILES=(node_uuid_v1_string node_uuid_v1_buf node_uuid_v4_string node_uuid_v4_buf libuuid_v4_string libuuid_v4_binary uuidjs_v1_string uuidjs_v4_string 140byte_es) -INDICES=(2 3 2 3 2 2 2 2 2) -VERSIONS=$( ls bench_*.log | sed -e 's/^bench_\([0-9\.]*\)\.log/\1/' | tr "\\n" " " ) -TMPJOIN="tmp_join" -OUTPUT="bench_results.txt" - -for I in ${!FILES[*]}; do - F=${FILES[$I]} - P=${PATTERNS[$I]} - INDEX=${INDICES[$I]} - echo "version $F" > $F - for V in $VERSIONS; do - (VAL=$( grep "$P" bench_$V.log | LC_ALL=en_US awk '{ sum += $'$INDEX' } END { print sum/NR }' ); echo $V $VAL) >> $F - done - if [ $I == 0 ]; then - cat $F > $TMPJOIN - else - join $TMPJOIN $F > $OUTPUT - cp $OUTPUT $TMPJOIN - fi - rm $F -done - -rm $TMPJOIN - -gnuplot bench.gnu -convert -density 200 -resize 800x560 -flatten bench.eps bench.png -rm bench.eps diff --git a/cli/node_modules/node-uuid/benchmark/benchmark-native.c b/cli/node_modules/node-uuid/benchmark/benchmark-native.c deleted file mode 100644 index dbfc75f6d..000000000 --- a/cli/node_modules/node-uuid/benchmark/benchmark-native.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -Test performance of native C UUID generation - -To Compile: cc -luuid benchmark-native.c -o benchmark-native -*/ - -#include -#include -#include -#include - -int main() { - uuid_t myid; - char buf[36+1]; - int i; - struct timeval t; - double start, finish; - - gettimeofday(&t, NULL); - start = t.tv_sec + t.tv_usec/1e6; - - int n = 2e5; - for (i = 0; i < n; i++) { - uuid_generate(myid); - uuid_unparse(myid, buf); - } - - gettimeofday(&t, NULL); - finish = t.tv_sec + t.tv_usec/1e6; - double dur = finish - start; - - printf("%d uuids/sec", (int)(n/dur)); - return 0; -} diff --git a/cli/node_modules/node-uuid/benchmark/benchmark.js b/cli/node_modules/node-uuid/benchmark/benchmark.js deleted file mode 100644 index 40e6efbe7..000000000 --- a/cli/node_modules/node-uuid/benchmark/benchmark.js +++ /dev/null @@ -1,84 +0,0 @@ -try { - var nodeuuid = require('../uuid'); -} catch (e) { - console.error('node-uuid require failed - skipping tests'); -} - -try { - var uuid = require('uuid'); -} catch (e) { - console.error('uuid require failed - skipping tests'); -} - -try { - var uuidjs = require('uuid-js'); -} catch (e) { - console.error('uuid-js require failed - skipping tests'); -} - -var N = 5e5; - -function rate(msg, t) { - console.log(msg + ': ' + - (N / (Date.now() - t) * 1e3 | 0) + - ' uuids/second'); -} - -console.log('# v4'); - -// node-uuid - string form -if (nodeuuid) { - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4(); - rate('nodeuuid.v4() - using node.js crypto RNG', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4({rng: nodeuuid.mathRNG}); - rate('nodeuuid.v4() - using Math.random() RNG', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary'); - rate('nodeuuid.v4(\'binary\')', t); - - var buffer = new nodeuuid.BufferClass(16); - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary', buffer); - rate('nodeuuid.v4(\'binary\', buffer)', t); -} - -// libuuid - string form -if (uuid) { - for (var i = 0, t = Date.now(); i < N; i++) uuid(); - rate('uuid()', t); - - for (var i = 0, t = Date.now(); i < N; i++) uuid('binary'); - rate('uuid(\'binary\')', t); -} - -// uuid-js - string form -if (uuidjs) { - for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(4); - rate('uuidjs.create(4)', t); -} - -// 140byte.es -for (var i = 0, t = Date.now(); i < N; i++) 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(s,r){r=Math.random()*16|0;return (s=='x'?r:r&0x3|0x8).toString(16)}); -rate('140byte.es_v4', t); - -console.log(''); -console.log('# v1'); - -// node-uuid - v1 string form -if (nodeuuid) { - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1(); - rate('nodeuuid.v1()', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary'); - rate('nodeuuid.v1(\'binary\')', t); - - var buffer = new nodeuuid.BufferClass(16); - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary', buffer); - rate('nodeuuid.v1(\'binary\', buffer)', t); -} - -// uuid-js - v1 string form -if (uuidjs) { - for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(1); - rate('uuidjs.create(1)', t); -} diff --git a/cli/node_modules/node-uuid/bin/uuid b/cli/node_modules/node-uuid/bin/uuid deleted file mode 100755 index f732e9918..000000000 --- a/cli/node_modules/node-uuid/bin/uuid +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env node - -var path = require('path'); -var uuid = require(path.join(__dirname, '..')); - -var arg = process.argv[2]; - -if ('--help' === arg) { - console.log('\n USAGE: uuid [version] [options]\n\n'); - console.log(' options:\n'); - console.log(' --help Display this message and exit\n'); - process.exit(0); -} - -if (null == arg) { - console.log(uuid()); - process.exit(0); -} - -if ('v1' !== arg && 'v4' !== arg) { - console.error('Version must be RFC4122 version 1 or version 4, denoted as "v1" or "v4"'); - process.exit(1); -} - -console.log(uuid[arg]()); -process.exit(0); diff --git a/cli/node_modules/node-uuid/bower.json b/cli/node_modules/node-uuid/bower.json deleted file mode 100644 index 1656dc819..000000000 --- a/cli/node_modules/node-uuid/bower.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "node-uuid", - "version": "1.4.3", - "homepage": "https://github.com/broofa/node-uuid", - "authors": [ - "Robert Kieffer " - ], - "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "main": "uuid.js", - "keywords": [ - "uuid", - "gid", - "rfc4122" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ] -} diff --git a/cli/node_modules/node-uuid/component.json b/cli/node_modules/node-uuid/component.json deleted file mode 100644 index 149f84b22..000000000 --- a/cli/node_modules/node-uuid/component.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "node-uuid", - "repo": "broofa/node-uuid", - "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "version": "1.4.3", - "author": "Robert Kieffer ", - "contributors": [ - {"name": "Christoph Tavan ", "github": "https://github.com/ctavan"} - ], - "keywords": ["uuid", "guid", "rfc4122"], - "dependencies": {}, - "development": {}, - "main": "uuid.js", - "scripts": [ - "uuid.js" - ], - "license": "MIT" -} diff --git a/cli/node_modules/node-uuid/package.json b/cli/node_modules/node-uuid/package.json deleted file mode 100644 index 3f13a2980..000000000 --- a/cli/node_modules/node-uuid/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "node-uuid", - "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "url": "http://github.com/broofa/node-uuid", - "keywords": [ - "uuid", - "guid", - "rfc4122" - ], - "author": { - "name": "Robert Kieffer", - "email": "robert@broofa.com" - }, - "contributors": [ - { - "name": "Christoph Tavan", - "email": "dev@tavan.de" - } - ], - "bin": { - "uuid": "./bin/uuid" - }, - "scripts": { - "test": "node test/test.js" - }, - "lib": ".", - "main": "./uuid.js", - "repository": { - "type": "git", - "url": "https://github.com/broofa/node-uuid.git" - }, - "version": "1.4.3", - "licenses": [ - { - "type": "MIT", - "url": "https://raw.github.com/broofa/node-uuid/master/LICENSE.md" - } - ], - "gitHead": "886463c660a095dfebfa69603921a8d156fdb12c", - "bugs": { - "url": "https://github.com/broofa/node-uuid/issues" - }, - "homepage": "https://github.com/broofa/node-uuid", - "_id": "node-uuid@1.4.3", - "_shasum": "319bb7a56e7cb63f00b5c0cd7851cd4b4ddf1df9", - "_from": "node-uuid@>=1.4.2 <2.0.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "broofa", - "email": "robert@broofa.com" - }, - "maintainers": [ - { - "name": "broofa", - "email": "robert@broofa.com" - } - ], - "dist": { - "shasum": "319bb7a56e7cb63f00b5c0cd7851cd4b4ddf1df9", - "tarball": "http://registry.npmjs.org/node-uuid/-/node-uuid-1.4.3.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/node-uuid/test/compare_v1.js b/cli/node_modules/node-uuid/test/compare_v1.js deleted file mode 100644 index 05af82215..000000000 --- a/cli/node_modules/node-uuid/test/compare_v1.js +++ /dev/null @@ -1,63 +0,0 @@ -var assert = require('assert'), - nodeuuid = require('../uuid'), - uuidjs = require('uuid-js'), - libuuid = require('uuid').generate, - util = require('util'), - exec = require('child_process').exec, - os = require('os'); - -// On Mac Os X / macports there's only the ossp-uuid package that provides uuid -// On Linux there's uuid-runtime which provides uuidgen -var uuidCmd = os.type() === 'Darwin' ? 'uuid -1' : 'uuidgen -t'; - -function compare(ids) { - console.log(ids); - for (var i = 0; i < ids.length; i++) { - var id = ids[i].split('-'); - id = [id[2], id[1], id[0]].join(''); - ids[i] = id; - } - var sorted = ([].concat(ids)).sort(); - - if (sorted.toString() !== ids.toString()) { - console.log('Warning: sorted !== ids'); - } else { - console.log('everything in order!'); - } -} - -// Test time order of v1 uuids -var ids = []; -while (ids.length < 10e3) ids.push(nodeuuid.v1()); - -var max = 10; -console.log('node-uuid:'); -ids = []; -for (var i = 0; i < max; i++) ids.push(nodeuuid.v1()); -compare(ids); - -console.log(''); -console.log('uuidjs:'); -ids = []; -for (var i = 0; i < max; i++) ids.push(uuidjs.create(1).toString()); -compare(ids); - -console.log(''); -console.log('libuuid:'); -ids = []; -var count = 0; -var last = function() { - compare(ids); -} -var cb = function(err, stdout, stderr) { - ids.push(stdout.substring(0, stdout.length-1)); - count++; - if (count < max) { - return next(); - } - last(); -}; -var next = function() { - exec(uuidCmd, cb); -}; -next(); diff --git a/cli/node_modules/node-uuid/test/test.html b/cli/node_modules/node-uuid/test/test.html deleted file mode 100644 index d80326ec5..000000000 --- a/cli/node_modules/node-uuid/test/test.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - diff --git a/cli/node_modules/node-uuid/test/test.js b/cli/node_modules/node-uuid/test/test.js deleted file mode 100644 index 246922561..000000000 --- a/cli/node_modules/node-uuid/test/test.js +++ /dev/null @@ -1,228 +0,0 @@ -if (!this.uuid) { - // node.js - uuid = require('../uuid'); -} - -// -// x-platform log/assert shims -// - -function _log(msg, type) { - type = type || 'log'; - - if (typeof(document) != 'undefined') { - document.write('
    ' + msg.replace(/\n/g, '
    ') + '
    '); - } - if (typeof(console) != 'undefined') { - var color = { - log: '\033[39m', - warn: '\033[33m', - error: '\033[31m' - }; - console[type](color[type] + msg + color.log); - } -} - -function log(msg) {_log(msg, 'log');} -function warn(msg) {_log(msg, 'warn');} -function error(msg) {_log(msg, 'error');} - -function assert(res, msg) { - if (!res) { - error('FAIL: ' + msg); - } else { - log('Pass: ' + msg); - } -} - -// -// Unit tests -// - -// Verify ordering of v1 ids created with explicit times -var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00 - -function compare(name, ids) { - ids = ids.map(function(id) { - return id.split('-').reverse().join('-'); - }).sort(); - var sorted = ([].concat(ids)).sort(); - - assert(sorted.toString() == ids.toString(), name + ' have expected order'); -} - -// Verify ordering of v1 ids created using default behavior -compare('uuids with current time', [ - uuid.v1(), - uuid.v1(), - uuid.v1(), - uuid.v1(), - uuid.v1() -]); - -// Verify ordering of v1 ids created with explicit times -compare('uuids with time option', [ - uuid.v1({msecs: TIME - 10*3600*1000}), - uuid.v1({msecs: TIME - 1}), - uuid.v1({msecs: TIME}), - uuid.v1({msecs: TIME + 1}), - uuid.v1({msecs: TIME + 28*24*3600*1000}) -]); - -assert( - uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}), - 'IDs created at same msec are different' -); - -// Verify throw if too many ids created -var thrown = false; -try { - uuid.v1({msecs: TIME, nsecs: 10000}); -} catch (e) { - thrown = true; -} -assert(thrown, 'Exception thrown when > 10K ids created in 1 ms'); - -// Verify clock regression bumps clockseq -var uidt = uuid.v1({msecs: TIME}); -var uidtb = uuid.v1({msecs: TIME - 1}); -assert( - parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1, - 'Clock regression by msec increments the clockseq' -); - -// Verify clock regression bumps clockseq -var uidtn = uuid.v1({msecs: TIME, nsecs: 10}); -var uidtnb = uuid.v1({msecs: TIME, nsecs: 9}); -assert( - parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1, - 'Clock regression by nsec increments the clockseq' -); - -// Verify explicit options produce expected id -var id = uuid.v1({ - msecs: 1321651533573, - nsecs: 5432, - clockseq: 0x385c, - node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ] -}); -assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id'); - -// Verify adjacent ids across a msec boundary are 1 time unit apart -var u0 = uuid.v1({msecs: TIME, nsecs: 9999}); -var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0}); - -var before = u0.split('-')[0], after = u1.split('-')[0]; -var dt = parseInt(after, 16) - parseInt(before, 16); -assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart'); - -// -// Test parse/unparse -// - -id = '00112233445566778899aabbccddeeff'; -assert(uuid.unparse(uuid.parse(id.substr(0,10))) == - '00112233-4400-0000-0000-000000000000', 'Short parse'); -assert(uuid.unparse(uuid.parse('(this is the uuid -> ' + id + id)) == - '00112233-4455-6677-8899-aabbccddeeff', 'Dirty parse'); - -// -// Perf tests -// - -var generators = { - v1: uuid.v1, - v4: uuid.v4 -}; - -var UUID_FORMAT = { - v1: /[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i, - v4: /[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i -}; - -var N = 1e4; - -// Get %'age an actual value differs from the ideal value -function divergence(actual, ideal) { - return Math.round(100*100*(actual - ideal)/ideal)/100; -} - -function rate(msg, t) { - log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids\/second'); -} - -for (var version in generators) { - var counts = {}, max = 0; - var generator = generators[version]; - var format = UUID_FORMAT[version]; - - log('\nSanity check ' + N + ' ' + version + ' uuids'); - for (var i = 0, ok = 0; i < N; i++) { - id = generator(); - if (!format.test(id)) { - throw Error(id + ' is not a valid UUID string'); - } - - if (id != uuid.unparse(uuid.parse(id))) { - assert(fail, id + ' is not a valid id'); - } - - // Count digits for our randomness check - if (version == 'v4') { - var digits = id.replace(/-/g, '').split(''); - for (var j = digits.length-1; j >= 0; j--) { - var c = digits[j]; - max = Math.max(max, counts[c] = (counts[c] || 0) + 1); - } - } - } - - // Check randomness for v4 UUIDs - if (version == 'v4') { - // Limit that we get worried about randomness. (Purely empirical choice, this!) - var limit = 2*100*Math.sqrt(1/N); - - log('\nChecking v4 randomness. Distribution of Hex Digits (% deviation from ideal)'); - - for (var i = 0; i < 16; i++) { - var c = i.toString(16); - var bar = '', n = counts[c], p = Math.round(n/max*100|0); - - // 1-3,5-8, and D-F: 1:16 odds over 30 digits - var ideal = N*30/16; - if (i == 4) { - // 4: 1:1 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1 + 30/16); - } else if (i >= 8 && i <= 11) { - // 8-B: 1:4 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1/4 + 30/16); - } else { - // Otherwise: 1:16 odds on 30 digits - ideal = N*30/16; - } - var d = divergence(n, ideal); - - // Draw bar using UTF squares (just for grins) - var s = n/max*50 | 0; - while (s--) bar += '='; - - assert(Math.abs(d) < limit, c + ' |' + bar + '| ' + counts[c] + ' (' + d + '% < ' + limit + '%)'); - } - } -} - -// Perf tests -for (var version in generators) { - log('\nPerformance testing ' + version + ' UUIDs'); - var generator = generators[version]; - var buf = new uuid.BufferClass(16); - - for (var i = 0, t = Date.now(); i < N; i++) generator(); - rate('uuid.' + version + '()', t); - - for (var i = 0, t = Date.now(); i < N; i++) generator('binary'); - rate('uuid.' + version + '(\'binary\')', t); - - for (var i = 0, t = Date.now(); i < N; i++) generator('binary', buf); - rate('uuid.' + version + '(\'binary\', buffer)', t); -} diff --git a/cli/node_modules/node-uuid/uuid.js b/cli/node_modules/node-uuid/uuid.js deleted file mode 100644 index 0a6176979..000000000 --- a/cli/node_modules/node-uuid/uuid.js +++ /dev/null @@ -1,247 +0,0 @@ -// uuid.js -// -// Copyright (c) 2010-2012 Robert Kieffer -// MIT License - http://opensource.org/licenses/mit-license.php - -(function() { - var _global = this; - - // Unique ID creation requires a high quality random # generator. We feature - // detect to determine the best RNG source, normalizing to a function that - // returns 128-bits of randomness, since that's what's usually required - var _rng; - - // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html - // - // Moderately fast, high quality - if (typeof(_global.require) == 'function') { - try { - var _rb = _global.require('crypto').randomBytes; - _rng = _rb && function() {return _rb(16);}; - } catch(e) {} - } - - if (!_rng && _global.crypto && crypto.getRandomValues) { - // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto - // - // Moderately fast, high quality - var _rnds8 = new Uint8Array(16); - _rng = function whatwgRNG() { - crypto.getRandomValues(_rnds8); - return _rnds8; - }; - } - - if (!_rng) { - // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). It's fast, but is of unspecified - // quality. - var _rnds = new Array(16); - _rng = function() { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) r = Math.random() * 0x100000000; - _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return _rnds; - }; - } - - // Buffer class to use - var BufferClass = typeof(_global.Buffer) == 'function' ? _global.Buffer : Array; - - // Maps for number <-> hex string conversion - var _byteToHex = []; - var _hexToByte = {}; - for (var i = 0; i < 256; i++) { - _byteToHex[i] = (i + 0x100).toString(16).substr(1); - _hexToByte[_byteToHex[i]] = i; - } - - // **`parse()` - Parse a UUID into it's component bytes** - function parse(s, buf, offset) { - var i = (buf && offset) || 0, ii = 0; - - buf = buf || []; - s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) { - if (ii < 16) { // Don't overflow! - buf[i + ii++] = _hexToByte[oct]; - } - }); - - // Zero out remaining bytes if string was short - while (ii < 16) { - buf[i + ii++] = 0; - } - - return buf; - } - - // **`unparse()` - Convert UUID byte array (ala parse()) into a string** - function unparse(buf, offset) { - var i = offset || 0, bth = _byteToHex; - return bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]]; - } - - // **`v1()` - Generate time-based UUID** - // - // Inspired by https://github.com/LiosK/UUID.js - // and http://docs.python.org/library/uuid.html - - // random #'s we need to init node and clockseq - var _seedBytes = _rng(); - - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - var _nodeId = [ - _seedBytes[0] | 0x01, - _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] - ]; - - // Per 4.2.2, randomize (14 bit) clockseq - var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; - - // Previous uuid creation time - var _lastMSecs = 0, _lastNSecs = 0; - - // See https://github.com/broofa/node-uuid for API details - function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; - - options = options || {}; - - var clockseq = options.clockseq != null ? options.clockseq : _clockseq; - - // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var msecs = options.msecs != null ? options.msecs : new Date().getTime(); - - // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - var nsecs = options.nsecs != null ? options.nsecs : _lastNSecs + 1; - - // Time since last uuid creation (in msecs) - var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; - - // Per 4.2.1.2, Bump clockseq on clock regression - if (dt < 0 && options.clockseq == null) { - clockseq = clockseq + 1 & 0x3fff; - } - - // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) { - nsecs = 0; - } - - // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { - throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; - - // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; - - // `time_low` - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; - - // `time_mid` - var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; - - // `time_high_and_version` - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - b[i++] = tmh >>> 16 & 0xff; - - // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - b[i++] = clockseq >>> 8 | 0x80; - - // `clock_seq_low` - b[i++] = clockseq & 0xff; - - // `node` - var node = options.node || _nodeId; - for (var n = 0; n < 6; n++) { - b[i + n] = node[n]; - } - - return buf ? buf : unparse(b); - } - - // **`v4()` - Generate random UUID** - - // See https://github.com/broofa/node-uuid for API details - function v4(options, buf, offset) { - // Deprecated - 'format' argument, as supported in v1.2 - var i = buf && offset || 0; - - if (typeof(options) == 'string') { - buf = options == 'binary' ? new BufferClass(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || _rng)(); - - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ii++) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || unparse(rnds); - } - - // Export public API - var uuid = v4; - uuid.v1 = v1; - uuid.v4 = v4; - uuid.parse = parse; - uuid.unparse = unparse; - uuid.BufferClass = BufferClass; - - if (typeof(module) != 'undefined' && module.exports) { - // Publish as node.js module - module.exports = uuid; - } else if (typeof define === 'function' && define.amd) { - // Publish as AMD module - define(function() {return uuid;}); - - - } else { - // Publish as global (in browsers) - var _previousRoot = _global.uuid; - - // **`noConflict()` - (browser only) to reset global 'uuid' var** - uuid.noConflict = function() { - _global.uuid = _previousRoot; - return uuid; - }; - - _global.uuid = uuid; - } -}).call(this); diff --git a/cli/node_modules/node-zip/.npmignore b/cli/node_modules/node-zip/.npmignore deleted file mode 100644 index f12e0d2f1..000000000 --- a/cli/node_modules/node-zip/.npmignore +++ /dev/null @@ -1,15 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -node_modules -npm-debug.log diff --git a/cli/node_modules/node-zip/Makefile b/cli/node_modules/node-zip/Makefile deleted file mode 100644 index 4427bcc9a..000000000 --- a/cli/node_modules/node-zip/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -all: - bin/packer diff --git a/cli/node_modules/node-zip/README.md b/cli/node_modules/node-zip/README.md deleted file mode 100644 index e58d0c9cb..000000000 --- a/cli/node_modules/node-zip/README.md +++ /dev/null @@ -1,64 +0,0 @@ -node-zip -======== - -node-zip - Zip/Unzip files ported from JSZip - -Installation ------------- - - npm install node-zip - - -Usage ------ - -Zip: - - var zip = new require('node-zip')(); - zip.file('test.file', 'hello there'); - var data = zip.generate({base64:false,compression:'DEFLATE'}); - console.log(data); // ugly data - - -Unzip: - - var zip = new require('node-zip')(data, {base64: false, checkCRC32: true}); - console.log(zip.files['test.file']); // hello there - - -You can also load directly: - - require('node-zip'); - var zip = new JSZip(data, options) - ... - -Write to a file (IMPORTANT: use *binary* encode, thanks to @Acek) - - var fs = require("fs"); - zip.file('test.txt', 'hello there'); - var data = zip.generate({base64:false,compression:'DEFLATE'}); - fs.writeFileSync('test.zip', data, 'binary'); - -Testing -------- - - npm install -g jasmine-node - jasmine-node test - -Manual ------- - -node-zip uses JSZip, please refer to their website for further information: -http://stuartk.com/jszip/ - -Contributors ------------- - -> David Duponchel [@dduponchel](https://github.com/dduponchel) - -Feel free to send your pull requests and contribute to this project - -License -------- - -MIT \ No newline at end of file diff --git a/cli/node_modules/node-zip/bin/nodezip b/cli/node_modules/node-zip/bin/nodezip deleted file mode 100755 index 8c3f865cf..000000000 --- a/cli/node_modules/node-zip/bin/nodezip +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -var fs=require("fs"),JSZip=require("jszip"),path=require("path"),args=process.argv.slice(2),zip=new JSZip;if(/-h|-H|--help|-\?/.test(args)||!args.length){printHelp()}else{var command=args.shift();if(command=="-c"){var zipfile=args.shift();console.log("Creating %s...",zipfile);args.forEach(function(file){if(fs.existsSync(file)){addFile(file)}else{console.error("Error: file %s not found.",file);process.exit(2)}});console.log("Deflating...");fs.writeFileSync(zipfile,zip.generate({type:"nodebuffer",compression:"DEFLATE"}));console.log("Done.")}else if(command=="-x"){var zipfile=args.shift();var destination=args.shift();var zipdata=fs.readFileSync(zipfile);console.log("Reading %s...",zipfile);try{var zip=new JSZip(zipdata,{checkCRC32:true})}catch(e){console.error("Error: invalid file");process.exit(2)}Object.keys(zip.files).forEach(function(filepath){file=zip.files[filepath];if(destination)filepath=destination+path.sep+filepath;if(file.options.dir){console.log(" Creating",filepath);mkdirRecursively(filepath)}else{console.log(" Inflating",filepath);fs.writeFileSync(filepath,file.asNodeBuffer())}});console.log("Done.")}else{console.error("Error: wrong command");printHelp()}}function printHelp(){console.error("Usage:");console.error(" -c zipfile file1 [file2] [...] Create zip file with file/directory list");console.error(" -x zipfile [destination] Extract zip file");console.error(" -h | -H | --help | -? Show help");process.exit(1)}function addFile(filepath){if(fs.lstatSync(filepath).isDirectory()){console.log(" Adding folder",filepath);zip.folder(filepath);var directory=fs.readdirSync(filepath);directory.forEach(function(subfilepath){addFile(path.join(filepath,subfilepath))})}else{console.log(" Adding file",filepath);zip.file(filepath,fs.readFileSync(filepath,"binary"))}}function mkdirRecursively(folderpath,mode){try{fs.mkdirSync(folderpath,mode);return true}catch(e){if(e.errno==34){mkdirRecursively(path.dirname(folderpath),mode);mkdirRecursively(folderpath,mode)}else if(e.errno==47){return true}else{console.log("Error: Unable to create folder %s (errno: %s)",folderpath,e.errno);process.exit(2)}}} \ No newline at end of file diff --git a/cli/node_modules/node-zip/bin/packer b/cli/node_modules/node-zip/bin/packer deleted file mode 100755 index e0b381ebf..000000000 --- a/cli/node_modules/node-zip/bin/packer +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -type -P uglifyjs &>/dev/null || { npm install uglify-js -g; } -echo "#!/usr/bin/env node" > bin/nodezip -cat lib/nodezip-cli.js >> bin/nodezip.tmp -uglifyjs bin/nodezip.tmp >> bin/nodezip -rm bin/nodezip.tmp -chmod +x bin/nodezip -echo "done: bin/nodezip" \ No newline at end of file diff --git a/cli/node_modules/node-zip/lib/nodezip-cli.js b/cli/node_modules/node-zip/lib/nodezip-cli.js deleted file mode 100644 index 5c611820d..000000000 --- a/cli/node_modules/node-zip/lib/nodezip-cli.js +++ /dev/null @@ -1,92 +0,0 @@ -var fs = require('fs'), - JSZip = require('jszip'), - path = require('path'), - args = process.argv.slice(2), - zip = new JSZip(); - -if(/-h|-H|--help|-\?/.test(args)||!args.length) { - printHelp(); -} else { - var command = args.shift(); - if(command == '-c') { - var zipfile = args.shift(); - console.log('Creating %s...', zipfile); - args.forEach(function(file) { - if(fs.existsSync(file)) { - addFile(file); - } else { - console.error('Error: file %s not found.', file); - process.exit(2); - } - }); - console.log("Deflating...") - fs.writeFileSync(zipfile, zip.generate({type:"nodebuffer", compression:'DEFLATE'})); - console.log("Done.") - } else if(command == '-x') { - var zipfile = args.shift(); - var destination = args.shift(); - var zipdata = fs.readFileSync(zipfile); - console.log('Reading %s...', zipfile); - try { - var zip = new JSZip(zipdata, {checkCRC32: true}); - } catch(e) { - console.error("Error: invalid file"); - process.exit(2); - } - Object.keys(zip.files).forEach(function(filepath) { - file = zip.files[filepath]; - if (destination) filepath = destination + path.sep + filepath - if(file.options.dir) { - console.log(' Creating', filepath); - mkdirRecursively(filepath); - } else { - console.log(' Inflating', filepath); - // TODO: add prompt if file exists - fs.writeFileSync(filepath, file.asNodeBuffer()); - } - }); - console.log('Done.'); - } else { - console.error('Error: wrong command') - printHelp(); - } -} - -function printHelp() { - console.error('Usage:'); - console.error(' -c zipfile file1 [file2] [...] Create zip file with file/directory list'); - console.error(' -x zipfile [destination] Extract zip file'); - console.error(' -h | -H | --help | -? Show help'); - process.exit(1); -} - -function addFile(filepath) { - if(fs.lstatSync(filepath).isDirectory()) { - console.log(" Adding folder", filepath); - zip.folder(filepath); - var directory = fs.readdirSync(filepath); - directory.forEach(function(subfilepath) { - addFile(path.join(filepath,subfilepath)); - }); - } else { - console.log(" Adding file", filepath) - zip.file(filepath, fs.readFileSync(filepath, 'binary')); - } -} - -function mkdirRecursively(folderpath, mode) { - try { - fs.mkdirSync(folderpath, mode); - return true; - } catch(e) { - if (e.errno == 34) { - mkdirRecursively(path.dirname(folderpath), mode); - mkdirRecursively(folderpath, mode); - } else if (e.errno == 47) { - return true; - } else { - console.log("Error: Unable to create folder %s (errno: %s)", folderpath, e.errno) - process.exit(2); - } - } -}; diff --git a/cli/node_modules/node-zip/lib/nodezip.js b/cli/node_modules/node-zip/lib/nodezip.js deleted file mode 100644 index 6596508fd..000000000 --- a/cli/node_modules/node-zip/lib/nodezip.js +++ /dev/null @@ -1,5 +0,0 @@ -var fs = require('fs'); -var JSZip = require('jszip'); - -global.JSZip = JSZip; -module.exports = function(data, options) { return new JSZip(data, options) }; diff --git a/cli/node_modules/node-zip/node_modules/jszip/.jshintignore b/cli/node_modules/node-zip/node_modules/jszip/.jshintignore deleted file mode 100644 index f05b1f265..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/.jshintignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -test diff --git a/cli/node_modules/node-zip/node_modules/jszip/.jshintrc b/cli/node_modules/node-zip/node_modules/jszip/.jshintrc deleted file mode 100644 index 0f34a5f14..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/.jshintrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "undef": true, - "strict": true, - "sub": true, - - "globals": { - "TextEncoder": false, - "TextDecoder": false - }, - "browser": true, - "node": true -} diff --git a/cli/node_modules/node-zip/node_modules/jszip/.npmignore b/cli/node_modules/node-zip/node_modules/jszip/.npmignore deleted file mode 100644 index 03046662e..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -_config.yml -bower.json -component.json -dist -docs -documentation -Gruntfile.js -index.html -test diff --git a/cli/node_modules/node-zip/node_modules/jszip/.travis.yml b/cli/node_modules/node-zip/node_modules/jszip/.travis.yml deleted file mode 100644 index 07c062465..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js -node_js: -- '0.10' -script: npm run $COMMAND -env: - matrix: - - COMMAND=test-node - - COMMAND=test-browser - global: - - secure: MhA8GHU42X3GWTUMaqdZVvarx4BMjhQCUGNi3kvuD/iCmKVb7gMwj4jbds7AcJdsCRsRk8bBGzZs/E7HidBJMPDa5DhgLKy9EV1s42JlHq8lVzbJeWIGgrtyJvhVUkGRy2OJjnDSgh3U6elkQmvDn74jreSQc6m/yGoPFF1nqq8= - - secure: qREw6aUu2DnB+2reMuHgygSkumRiJvt7Z5Fz4uEVoraqbe65e4PGhtzypr9uIgCN43vxS2D5tAIeDbfid5VQrWFUQnrC9O5Z5qgVPsKN94zZ1tvYurXI4wRlAg58nNjkfGXWhLI3VUjjDTp5gYcMqgfe5hpEFYUPnUQkKGnaqAk= diff --git a/cli/node_modules/node-zip/node_modules/jszip/CHANGES.md b/cli/node_modules/node-zip/node_modules/jszip/CHANGES.md deleted file mode 100644 index 1b137765d..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/CHANGES.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: Changelog -layout: default -section: main ---- - -### v2.5.0 2015-03-10 -- add support for custom mime-types (see [#199](https://github.com/Stuk/jszip/issues/199)). -- add an option to set the DEFLATE level (see [#201](https://github.com/Stuk/jszip/issues/201)). -- improve the error message with corrupted zip (see [#202](https://github.com/Stuk/jszip/issues/202)). -- add support for UNIX / DOS permissions (see [#200](https://github.com/Stuk/jszip/issues/200) and [#205](https://github.com/Stuk/jszip/issues/205)). - -### v2.4.0 2014-07-24 -- update pako to 0.2.5 (see [#156](https://github.com/Stuk/jszip/issues/156)). -- make JSZip work in a Firefox addon context (see [#151](https://github.com/Stuk/jszip/issues/151)). -- add an option (`createFolders`) to control the subfolder generation (see [#154](https://github.com/Stuk/jszip/issues/154)). -- allow `Buffer` polyfill in the browser (see [#139](https://github.com/Stuk/jszip/issues/139)). - -### v2.3.0 2014-06-18 -- don't generate subfolders (see [#130](https://github.com/Stuk/jszip/issues/130)). -- add comment support (see [#134](https://github.com/Stuk/jszip/issues/134)). -- on `ZipObject#options`, the attributes `date` and `dir` have been deprecated and are now on `ZipObject` (see [the upgrade guide](http://stuk.github.io/jszip/documentation/upgrade_guide.html)). -- on `ZipObject#options`, the attributes `base64` and `binary` have been deprecated (see [the upgrade guide](http://stuk.github.io/jszip/documentation/upgrade_guide.html)). -- deprecate internal functions exposed in the public API (see [#123](https://github.com/Stuk/jszip/issues/123)). -- improve UTF-8 support (see [#142](https://github.com/Stuk/jszip/issues/142)). - -### v2.2.2, 2014-05-01 - - update pako to v0.2.1, fix an error when decompressing some files (see [#126](https://github.com/Stuk/jszip/issues/126)). - -### v2.2.1, 2014-04-23 - - fix unreadable generated file on Windows 8 (see [#112](https://github.com/Stuk/jszip/issues/112)). - - replace zlibjs with pako. - -### v2.2.0, 2014-02-25 - - make the `new` operator optional before the `JSZip` constructor (see [#93](https://github.com/Stuk/jszip/pull/93)). - - update zlibjs to v0.2.0. - -### v2.1.1, 2014-02-13 - - use the npm package for zlib.js instead of the github url. - -### v2.1.0, 2014-02-06 - - split the files and use Browserify to generate the final file (see [#74](https://github.com/Stuk/jszip/pull/74)) - - packaging change : instead of 4 files (jszip.js, jszip-load.js, jszip-inflate.js, jszip-deflate.js) we now have 2 files : dist/jszip.js and dist/jszip.min.js - - add component/bower support - - rename variable: 'byte' is a reserved word (see [#76](https://github.com/Stuk/jszip/pull/76)) - - add support for the unicode path extra field (see [#82](https://github.com/Stuk/jszip/pull/82)) - - ensure that the generated files have a header with the licenses (see [#80](https://github.com/Stuk/jszip/pull/80)) - -# v2.0.0, 2013-10-20 - - - `JSZipBase64` has been renamed to `JSZip.base64`. - - The `data` attribute on the object returned by `zip.file(name)` has been removed. Use `asText()`, `asBinary()`, `asUint8Array()`, `asArrayBuffer()` or `asNodeBuffer()`. - - - [Fix issue with Android browser](https://github.com/Stuk/jszip/pull/60) - - - The compression/decompression methods now give their input type with the `compressInputType` and `uncompressInputType` attributes. - - Lazily decompress data when needed and [improve performance in general](https://github.com/Stuk/jszip/pull/56) - - [Add support for `Buffer` in Node.js](https://github.com/Stuk/jszip/pull/57). - - Package for CommonJS/npm. - -### v1.0.1, 2013-03-04 - - - Fixed an issue when generating a compressed zip file with empty files or folders, see #33. - - With bad data (null or undefined), asText/asBinary/asUint8Array/asArrayBuffer methods now return an empty string, see #36. - -# v1.0.0, 2013-02-14 - -- First release after a long period without version. - diff --git a/cli/node_modules/node-zip/node_modules/jszip/CHANGES.md.orig b/cli/node_modules/node-zip/node_modules/jszip/CHANGES.md.orig deleted file mode 100644 index e7ebc9097..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/CHANGES.md.orig +++ /dev/null @@ -1,49 +0,0 @@ -<<<<<<< HEAD -### v2.2.1, 2014-04-23 - - fix unreadable generated file on Windows 8 (see [#112](https://github.com/Stuk/jszip/issues/112)). - - replace zlibjs with pako. -======= ---- -title: Changelog -layout: default -section: main ---- - ->>>>>>> Rewrite the documentation - -### v2.2.0, 2014-02-25 - - make the `new` operator optional before the `JSZip` constructor (see [#93](https://github.com/Stuk/jszip/pull/93)). - - update zlibjs to v0.2.0. - -### v2.1.1, 2014-02-13 - - use the npm package for zlib.js instead of the github url. - -### v2.1.0, 2014-02-06 - - split the files and use Browserify to generate the final file (see [#74](https://github.com/Stuk/jszip/pull/74)) - - packaging change : instead of 4 files (jszip.js, jszip-load.js, jszip-inflate.js, jszip-deflate.js) we now have 2 files : dist/jszip.js and dist/jszip.min.js - - add component/bower support - - rename variable: 'byte' is a reserved word (see [#76](https://github.com/Stuk/jszip/pull/76)) - - add support for the unicode path extra field (see [#82](https://github.com/Stuk/jszip/pull/82)) - - ensure that the generated files have a header with the licenses (see [#80](https://github.com/Stuk/jszip/pull/80)) - -# v2.0.0, 2013-10-20 - - - `JSZipBase64` has been renamed to `JSZip.base64`. - - The `data` attribute on the object returned by `zip.file(name)` has been removed. Use `asText()`, `asBinary()`, `asUint8Array()`, `asArrayBuffer()` or `asNodeBuffer()`. - - - [Fix issue with Android browser](https://github.com/Stuk/jszip/pull/60) - - - The compression/decompression methods now give their input type with the `compressInputType` and `uncompressInputType` attributes. - - Lazily decompress data when needed and [improve performance in general](https://github.com/Stuk/jszip/pull/56) - - [Add support for `Buffer` in Node.js](https://github.com/Stuk/jszip/pull/57). - - Package for CommonJS/npm. - -### v1.0.1, 2013-03-04 - - - Fixed an issue when generating a compressed zip file with empty files or folders, see #33. - - With bad data (null or undefined), asText/asBinary/asUint8Array/asArrayBuffer methods now return an empty string, see #36. - -# v1.0.0, 2013-02-14 - -- First release after a long period without version. - diff --git a/cli/node_modules/node-zip/node_modules/jszip/LICENSE.markdown b/cli/node_modules/node-zip/node_modules/jszip/LICENSE.markdown deleted file mode 100644 index c0b10c095..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/LICENSE.markdown +++ /dev/null @@ -1,651 +0,0 @@ -JSZip is dual licensed. You may use it under the MIT license *or* the GPLv3 -license. - -The MIT License -=============== - -Copyright (c) 2009-2014 Stuart Knightley, David Duponchel, Franz Buchinger, António Afonso - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -GPL version 3 -============= - - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS diff --git a/cli/node_modules/node-zip/node_modules/jszip/README.markdown b/cli/node_modules/node-zip/node_modules/jszip/README.markdown deleted file mode 100644 index 5cfa5dd76..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/README.markdown +++ /dev/null @@ -1,41 +0,0 @@ -JSZip -===== - -A library for creating, reading and editing .zip files with Javascript, with a -lovely and simple API. - -See http://stuartk.com/jszip for all the documentation. - -```javascript -var zip = new JSZip(); - -zip.file("Hello.txt", "Hello World\n"); - -var img = zip.folder("images"); -img.file("smile.gif", imgData, {base64: true}); - -var content = zip.generate({type:"blob"}); - -// see FileSaver.js -saveAs(content, "example.zip"); - -/* -Results in a zip containing -Hello.txt -images/ - smile.gif -*/ -``` - -Test status ------------ - -[![Build Status](https://api.travis-ci.org/Stuk/jszip.svg?branch=master)](http://travis-ci.org/Stuk/jszip) - -[![Selenium Test Status](https://saucelabs.com/browser-matrix/jszip.svg)](https://saucelabs.com/u/jszip) - -License -------- - -JSZip is dual-licensed. You may use it under the MIT license *or* the GPLv3 -license. See [LICENSE.markdown](LICENSE.markdown). diff --git a/cli/node_modules/node-zip/node_modules/jszip/index.html.orig b/cli/node_modules/node-zip/node_modules/jszip/index.html.orig deleted file mode 100644 index 8fe485c17..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/index.html.orig +++ /dev/null @@ -1,702 +0,0 @@ ---- -title: JSZip -layout: default -section: main ---- - -
    - -

    Support

    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    OperaFirefoxSafariChromeInternet ExplorerNode.js
    YesYesYesYesYesYes
    Tested with the latest versionTested with 3.0 / 3.6 / latest versionTested with the latest versionTested with the latest versionTested with IE 6 / 7 / 8 / 9 / 10Tested with node.js 0.8 and 0.10
    - -

    Getting help

    - -

    -Having trouble ? We'd like to help ! -

    -
      -
    • - Try the FAQ, it has - answers to common questions. -
    • -
    • - If you're looking for informations about a specific method, try the - documentation. -
    • -
    • - Check the - examples. -
    • -
    • - Report bugs in our - Bug tracker. -
    • -
    - -

    Test status

    - -
    -
    Travis build :
    -
    - - - -
    -
    Saucelabs build :
    -
    - - - -
    -
    Live tests :
    -
    - See for yourself ! -
    -
    diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/base64.js b/cli/node_modules/node-zip/node_modules/jszip/lib/base64.js deleted file mode 100644 index 13b48634c..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/base64.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict'; -// private property -var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - - -// public method for encoding -exports.encode = function(input, utf8) { - var output = ""; - var chr1, chr2, chr3, enc1, enc2, enc3, enc4; - var i = 0; - - while (i < input.length) { - - chr1 = input.charCodeAt(i++); - chr2 = input.charCodeAt(i++); - chr3 = input.charCodeAt(i++); - - enc1 = chr1 >> 2; - enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); - enc4 = chr3 & 63; - - if (isNaN(chr2)) { - enc3 = enc4 = 64; - } - else if (isNaN(chr3)) { - enc4 = 64; - } - - output = output + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4); - - } - - return output; -}; - -// public method for decoding -exports.decode = function(input, utf8) { - var output = ""; - var chr1, chr2, chr3; - var enc1, enc2, enc3, enc4; - var i = 0; - - input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - - while (i < input.length) { - - enc1 = _keyStr.indexOf(input.charAt(i++)); - enc2 = _keyStr.indexOf(input.charAt(i++)); - enc3 = _keyStr.indexOf(input.charAt(i++)); - enc4 = _keyStr.indexOf(input.charAt(i++)); - - chr1 = (enc1 << 2) | (enc2 >> 4); - chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); - chr3 = ((enc3 & 3) << 6) | enc4; - - output = output + String.fromCharCode(chr1); - - if (enc3 != 64) { - output = output + String.fromCharCode(chr2); - } - if (enc4 != 64) { - output = output + String.fromCharCode(chr3); - } - - } - - return output; - -}; diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/compressedObject.js b/cli/node_modules/node-zip/node_modules/jszip/lib/compressedObject.js deleted file mode 100644 index d6de504ec..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/compressedObject.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; -function CompressedObject() { - this.compressedSize = 0; - this.uncompressedSize = 0; - this.crc32 = 0; - this.compressionMethod = null; - this.compressedContent = null; -} - -CompressedObject.prototype = { - /** - * Return the decompressed content in an unspecified format. - * The format will depend on the decompressor. - * @return {Object} the decompressed content. - */ - getContent: function() { - return null; // see implementation - }, - /** - * Return the compressed content in an unspecified format. - * The format will depend on the compressed conten source. - * @return {Object} the compressed content. - */ - getCompressedContent: function() { - return null; // see implementation - } -}; -module.exports = CompressedObject; diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/compressions.js b/cli/node_modules/node-zip/node_modules/jszip/lib/compressions.js deleted file mode 100644 index a2c13ff01..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/compressions.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; -exports.STORE = { - magic: "\x00\x00", - compress: function(content, compressionOptions) { - return content; // no compression - }, - uncompress: function(content) { - return content; // no compression - }, - compressInputType: null, - uncompressInputType: null -}; -exports.DEFLATE = require('./flate'); diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/crc32.js b/cli/node_modules/node-zip/node_modules/jszip/lib/crc32.js deleted file mode 100644 index 48d4a4a48..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/crc32.js +++ /dev/null @@ -1,102 +0,0 @@ -'use strict'; - -var utils = require('./utils'); - -var table = [ - 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, - 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, - 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, - 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, - 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, - 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, - 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, - 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, - 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, - 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, - 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, - 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, - 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, - 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, - 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, - 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, - 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, - 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, - 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, - 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, - 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, - 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, - 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, - 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, - 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, - 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, - 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, - 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, - 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, - 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, - 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, - 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, - 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, - 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, - 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, - 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, - 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, - 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, - 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, - 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, - 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, - 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, - 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, - 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, - 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, - 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, - 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, - 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, - 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, - 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, - 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, - 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, - 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, - 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, - 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, - 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, - 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, - 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, - 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, - 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, - 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, - 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, - 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, - 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D -]; - -/** - * - * Javascript crc32 - * http://www.webtoolkit.info/ - * - */ -module.exports = function crc32(input, crc) { - if (typeof input === "undefined" || !input.length) { - return 0; - } - - var isArray = utils.getTypeOf(input) !== "string"; - - if (typeof(crc) == "undefined") { - crc = 0; - } - var x = 0; - var y = 0; - var b = 0; - - crc = crc ^ (-1); - for (var i = 0, iTop = input.length; i < iTop; i++) { - b = isArray ? input[i] : input.charCodeAt(i); - y = (crc ^ b) & 0xFF; - x = table[y]; - crc = (crc >>> 8) ^ x; - } - - return crc ^ (-1); -}; -// vim: set shiftwidth=4 softtabstop=4: diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/dataReader.js b/cli/node_modules/node-zip/node_modules/jszip/lib/dataReader.js deleted file mode 100644 index 22e8cb38a..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/dataReader.js +++ /dev/null @@ -1,107 +0,0 @@ -'use strict'; -var utils = require('./utils'); - -function DataReader(data) { - this.data = null; // type : see implementation - this.length = 0; - this.index = 0; -} -DataReader.prototype = { - /** - * Check that the offset will not go too far. - * @param {string} offset the additional offset to check. - * @throws {Error} an Error if the offset is out of bounds. - */ - checkOffset: function(offset) { - this.checkIndex(this.index + offset); - }, - /** - * Check that the specifed index will not be too far. - * @param {string} newIndex the index to check. - * @throws {Error} an Error if the index is out of bounds. - */ - checkIndex: function(newIndex) { - if (this.length < newIndex || newIndex < 0) { - throw new Error("End of data reached (data length = " + this.length + ", asked index = " + (newIndex) + "). Corrupted zip ?"); - } - }, - /** - * Change the index. - * @param {number} newIndex The new index. - * @throws {Error} if the new index is out of the data. - */ - setIndex: function(newIndex) { - this.checkIndex(newIndex); - this.index = newIndex; - }, - /** - * Skip the next n bytes. - * @param {number} n the number of bytes to skip. - * @throws {Error} if the new index is out of the data. - */ - skip: function(n) { - this.setIndex(this.index + n); - }, - /** - * Get the byte at the specified index. - * @param {number} i the index to use. - * @return {number} a byte. - */ - byteAt: function(i) { - // see implementations - }, - /** - * Get the next number with a given byte size. - * @param {number} size the number of bytes to read. - * @return {number} the corresponding number. - */ - readInt: function(size) { - var result = 0, - i; - this.checkOffset(size); - for (i = this.index + size - 1; i >= this.index; i--) { - result = (result << 8) + this.byteAt(i); - } - this.index += size; - return result; - }, - /** - * Get the next string with a given byte size. - * @param {number} size the number of bytes to read. - * @return {string} the corresponding string. - */ - readString: function(size) { - return utils.transformTo("string", this.readData(size)); - }, - /** - * Get raw data without conversion, bytes. - * @param {number} size the number of bytes to read. - * @return {Object} the raw data, implementation specific. - */ - readData: function(size) { - // see implementations - }, - /** - * Find the last occurence of a zip signature (4 bytes). - * @param {string} sig the signature to find. - * @return {number} the index of the last occurence, -1 if not found. - */ - lastIndexOfSignature: function(sig) { - // see implementations - }, - /** - * Get the next date. - * @return {Date} the date. - */ - readDate: function() { - var dostime = this.readInt(4); - return new Date( - ((dostime >> 25) & 0x7f) + 1980, // year - ((dostime >> 21) & 0x0f) - 1, // month - (dostime >> 16) & 0x1f, // day - (dostime >> 11) & 0x1f, // hour - (dostime >> 5) & 0x3f, // minute - (dostime & 0x1f) << 1); // second - } -}; -module.exports = DataReader; diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/defaults.js b/cli/node_modules/node-zip/node_modules/jszip/lib/defaults.js deleted file mode 100644 index 720c4daba..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/defaults.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; -exports.base64 = false; -exports.binary = false; -exports.dir = false; -exports.createFolders = false; -exports.date = null; -exports.compression = null; -exports.compressionOptions = null; -exports.comment = null; -exports.unixPermissions = null; -exports.dosPermissions = null; diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/deprecatedPublicUtils.js b/cli/node_modules/node-zip/node_modules/jszip/lib/deprecatedPublicUtils.js deleted file mode 100644 index 0c6b9b8eb..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/deprecatedPublicUtils.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict'; -var utils = require('./utils'); - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.string2binary = function(str) { - return utils.string2binary(str); -}; - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.string2Uint8Array = function(str) { - return utils.transformTo("uint8array", str); -}; - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.uint8Array2String = function(array) { - return utils.transformTo("string", array); -}; - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.string2Blob = function(str) { - var buffer = utils.transformTo("arraybuffer", str); - return utils.arrayBuffer2Blob(buffer); -}; - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.arrayBuffer2Blob = function(buffer) { - return utils.arrayBuffer2Blob(buffer); -}; - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.transformTo = function(outputType, input) { - return utils.transformTo(outputType, input); -}; - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.getTypeOf = function(input) { - return utils.getTypeOf(input); -}; - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.checkSupport = function(type) { - return utils.checkSupport(type); -}; - -/** - * @deprecated - * This value will be removed in a future version without replacement. - */ -exports.MAX_VALUE_16BITS = utils.MAX_VALUE_16BITS; - -/** - * @deprecated - * This value will be removed in a future version without replacement. - */ -exports.MAX_VALUE_32BITS = utils.MAX_VALUE_32BITS; - - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.pretty = function(str) { - return utils.pretty(str); -}; - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.findCompression = function(compressionMethod) { - return utils.findCompression(compressionMethod); -}; - -/** - * @deprecated - * This function will be removed in a future version without replacement. - */ -exports.isRegExp = function (object) { - return utils.isRegExp(object); -}; - diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/flate.js b/cli/node_modules/node-zip/node_modules/jszip/lib/flate.js deleted file mode 100644 index d138177f7..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/flate.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; -var USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Uint32Array !== 'undefined'); - -var pako = require("pako"); -exports.uncompressInputType = USE_TYPEDARRAY ? "uint8array" : "array"; -exports.compressInputType = USE_TYPEDARRAY ? "uint8array" : "array"; - -exports.magic = "\x08\x00"; -exports.compress = function(input, compressionOptions) { - return pako.deflateRaw(input, { - level : compressionOptions.level || -1 // default compression - }); -}; -exports.uncompress = function(input) { - return pako.inflateRaw(input); -}; diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/index.js b/cli/node_modules/node-zip/node_modules/jszip/lib/index.js deleted file mode 100644 index 96c3389dc..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/index.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -var base64 = require('./base64'); - -/** -Usage: - zip = new JSZip(); - zip.file("hello.txt", "Hello, World!").file("tempfile", "nothing"); - zip.folder("images").file("smile.gif", base64Data, {base64: true}); - zip.file("Xmas.txt", "Ho ho ho !", {date : new Date("December 25, 2007 00:00:01")}); - zip.remove("tempfile"); - - base64zip = zip.generate(); - -**/ - -/** - * Representation a of zip file in js - * @constructor - * @param {String=|ArrayBuffer=|Uint8Array=} data the data to load, if any (optional). - * @param {Object=} options the options for creating this objects (optional). - */ -function JSZip(data, options) { - // if this constructor is used without `new`, it adds `new` before itself: - if(!(this instanceof JSZip)) return new JSZip(data, options); - - // object containing the files : - // { - // "folder/" : {...}, - // "folder/data.txt" : {...} - // } - this.files = {}; - - this.comment = null; - - // Where we are in the hierarchy - this.root = ""; - if (data) { - this.load(data, options); - } - this.clone = function() { - var newObj = new JSZip(); - for (var i in this) { - if (typeof this[i] !== "function") { - newObj[i] = this[i]; - } - } - return newObj; - }; -} -JSZip.prototype = require('./object'); -JSZip.prototype.load = require('./load'); -JSZip.support = require('./support'); -JSZip.defaults = require('./defaults'); - -/** - * @deprecated - * This namespace will be removed in a future version without replacement. - */ -JSZip.utils = require('./deprecatedPublicUtils'); - -JSZip.base64 = { - /** - * @deprecated - * This method will be removed in a future version without replacement. - */ - encode : function(input) { - return base64.encode(input); - }, - /** - * @deprecated - * This method will be removed in a future version without replacement. - */ - decode : function(input) { - return base64.decode(input); - } -}; -JSZip.compressions = require('./compressions'); -module.exports = JSZip; diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/license_header.js b/cli/node_modules/node-zip/node_modules/jszip/lib/license_header.js deleted file mode 100644 index b156bc76f..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/license_header.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - -JSZip - A Javascript class for generating and reading zip files - - -(c) 2009-2014 Stuart Knightley -Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. - -JSZip uses the library pako released under the MIT license : -https://github.com/nodeca/pako/blob/master/LICENSE -*/ diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/load.js b/cli/node_modules/node-zip/node_modules/jszip/lib/load.js deleted file mode 100644 index e00311014..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/load.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; -var base64 = require('./base64'); -var ZipEntries = require('./zipEntries'); -module.exports = function(data, options) { - var files, zipEntries, i, input; - options = options || {}; - if (options.base64) { - data = base64.decode(data); - } - - zipEntries = new ZipEntries(data, options); - files = zipEntries.files; - for (i = 0; i < files.length; i++) { - input = files[i]; - this.file(input.fileName, input.decompressed, { - binary: true, - optimizedBinaryString: true, - date: input.date, - dir: input.dir, - comment : input.fileComment.length ? input.fileComment : null, - unixPermissions : input.unixPermissions, - dosPermissions : input.dosPermissions, - createFolders: options.createFolders - }); - } - if (zipEntries.zipComment.length) { - this.comment = zipEntries.zipComment; - } - - return this; -}; diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/nodeBuffer.js b/cli/node_modules/node-zip/node_modules/jszip/lib/nodeBuffer.js deleted file mode 100644 index 84694f6a9..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/nodeBuffer.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; -module.exports = function(data, encoding){ - return new Buffer(data, encoding); -}; -module.exports.test = function(b){ - return Buffer.isBuffer(b); -}; diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/nodeBufferReader.js b/cli/node_modules/node-zip/node_modules/jszip/lib/nodeBufferReader.js deleted file mode 100644 index 223bd0b9a..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/nodeBufferReader.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; -var Uint8ArrayReader = require('./uint8ArrayReader'); - -function NodeBufferReader(data) { - this.data = data; - this.length = this.data.length; - this.index = 0; -} -NodeBufferReader.prototype = new Uint8ArrayReader(); - -/** - * @see DataReader.readData - */ -NodeBufferReader.prototype.readData = function(size) { - this.checkOffset(size); - var result = this.data.slice(this.index, this.index + size); - this.index += size; - return result; -}; -module.exports = NodeBufferReader; diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/object.js b/cli/node_modules/node-zip/node_modules/jszip/lib/object.js deleted file mode 100644 index 3b5e5b8b0..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/object.js +++ /dev/null @@ -1,883 +0,0 @@ -'use strict'; -var support = require('./support'); -var utils = require('./utils'); -var crc32 = require('./crc32'); -var signature = require('./signature'); -var defaults = require('./defaults'); -var base64 = require('./base64'); -var compressions = require('./compressions'); -var CompressedObject = require('./compressedObject'); -var nodeBuffer = require('./nodeBuffer'); -var utf8 = require('./utf8'); -var StringWriter = require('./stringWriter'); -var Uint8ArrayWriter = require('./uint8ArrayWriter'); - -/** - * Returns the raw data of a ZipObject, decompress the content if necessary. - * @param {ZipObject} file the file to use. - * @return {String|ArrayBuffer|Uint8Array|Buffer} the data. - */ -var getRawData = function(file) { - if (file._data instanceof CompressedObject) { - file._data = file._data.getContent(); - file.options.binary = true; - file.options.base64 = false; - - if (utils.getTypeOf(file._data) === "uint8array") { - var copy = file._data; - // when reading an arraybuffer, the CompressedObject mechanism will keep it and subarray() a Uint8Array. - // if we request a file in the same format, we might get the same Uint8Array or its ArrayBuffer (the original zip file). - file._data = new Uint8Array(copy.length); - // with an empty Uint8Array, Opera fails with a "Offset larger than array size" - if (copy.length !== 0) { - file._data.set(copy, 0); - } - } - } - return file._data; -}; - -/** - * Returns the data of a ZipObject in a binary form. If the content is an unicode string, encode it. - * @param {ZipObject} file the file to use. - * @return {String|ArrayBuffer|Uint8Array|Buffer} the data. - */ -var getBinaryData = function(file) { - var result = getRawData(file), - type = utils.getTypeOf(result); - if (type === "string") { - if (!file.options.binary) { - // unicode text ! - // unicode string => binary string is a painful process, check if we can avoid it. - if (support.nodebuffer) { - return nodeBuffer(result, "utf-8"); - } - } - return file.asBinary(); - } - return result; -}; - -/** - * Transform this._data into a string. - * @param {function} filter a function String -> String, applied if not null on the result. - * @return {String} the string representing this._data. - */ -var dataToString = function(asUTF8) { - var result = getRawData(this); - if (result === null || typeof result === "undefined") { - return ""; - } - // if the data is a base64 string, we decode it before checking the encoding ! - if (this.options.base64) { - result = base64.decode(result); - } - if (asUTF8 && this.options.binary) { - // JSZip.prototype.utf8decode supports arrays as input - // skip to array => string step, utf8decode will do it. - result = out.utf8decode(result); - } - else { - // no utf8 transformation, do the array => string step. - result = utils.transformTo("string", result); - } - - if (!asUTF8 && !this.options.binary) { - result = utils.transformTo("string", out.utf8encode(result)); - } - return result; -}; -/** - * A simple object representing a file in the zip file. - * @constructor - * @param {string} name the name of the file - * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data - * @param {Object} options the options of the file - */ -var ZipObject = function(name, data, options) { - this.name = name; - this.dir = options.dir; - this.date = options.date; - this.comment = options.comment; - this.unixPermissions = options.unixPermissions; - this.dosPermissions = options.dosPermissions; - - this._data = data; - this.options = options; - - /* - * This object contains initial values for dir and date. - * With them, we can check if the user changed the deprecated metadata in - * `ZipObject#options` or not. - */ - this._initialMetadata = { - dir : options.dir, - date : options.date - }; -}; - -ZipObject.prototype = { - /** - * Return the content as UTF8 string. - * @return {string} the UTF8 string. - */ - asText: function() { - return dataToString.call(this, true); - }, - /** - * Returns the binary content. - * @return {string} the content as binary. - */ - asBinary: function() { - return dataToString.call(this, false); - }, - /** - * Returns the content as a nodejs Buffer. - * @return {Buffer} the content as a Buffer. - */ - asNodeBuffer: function() { - var result = getBinaryData(this); - return utils.transformTo("nodebuffer", result); - }, - /** - * Returns the content as an Uint8Array. - * @return {Uint8Array} the content as an Uint8Array. - */ - asUint8Array: function() { - var result = getBinaryData(this); - return utils.transformTo("uint8array", result); - }, - /** - * Returns the content as an ArrayBuffer. - * @return {ArrayBuffer} the content as an ArrayBufer. - */ - asArrayBuffer: function() { - return this.asUint8Array().buffer; - } -}; - -/** - * Transform an integer into a string in hexadecimal. - * @private - * @param {number} dec the number to convert. - * @param {number} bytes the number of bytes to generate. - * @returns {string} the result. - */ -var decToHex = function(dec, bytes) { - var hex = "", - i; - for (i = 0; i < bytes; i++) { - hex += String.fromCharCode(dec & 0xff); - dec = dec >>> 8; - } - return hex; -}; - -/** - * Merge the objects passed as parameters into a new one. - * @private - * @param {...Object} var_args All objects to merge. - * @return {Object} a new object with the data of the others. - */ -var extend = function() { - var result = {}, i, attr; - for (i = 0; i < arguments.length; i++) { // arguments is not enumerable in some browsers - for (attr in arguments[i]) { - if (arguments[i].hasOwnProperty(attr) && typeof result[attr] === "undefined") { - result[attr] = arguments[i][attr]; - } - } - } - return result; -}; - -/** - * Transforms the (incomplete) options from the user into the complete - * set of options to create a file. - * @private - * @param {Object} o the options from the user. - * @return {Object} the complete set of options. - */ -var prepareFileAttrs = function(o) { - o = o || {}; - if (o.base64 === true && (o.binary === null || o.binary === undefined)) { - o.binary = true; - } - o = extend(o, defaults); - o.date = o.date || new Date(); - if (o.compression !== null) o.compression = o.compression.toUpperCase(); - - return o; -}; - -/** - * Add a file in the current folder. - * @private - * @param {string} name the name of the file - * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file - * @param {Object} o the options of the file - * @return {Object} the new file. - */ -var fileAdd = function(name, data, o) { - // be sure sub folders exist - var dataType = utils.getTypeOf(data), - parent; - - o = prepareFileAttrs(o); - - if (typeof o.unixPermissions === "string") { - o.unixPermissions = parseInt(o.unixPermissions, 8); - } - - // UNX_IFDIR 0040000 see zipinfo.c - if (o.unixPermissions && (o.unixPermissions & 0x4000)) { - o.dir = true; - } - // Bit 4 Directory - if (o.dosPermissions && (o.dosPermissions & 0x0010)) { - o.dir = true; - } - - if (o.dir) { - name = forceTrailingSlash(name); - } - - if (o.createFolders && (parent = parentFolder(name))) { - folderAdd.call(this, parent, true); - } - - if (o.dir || data === null || typeof data === "undefined") { - o.base64 = false; - o.binary = false; - data = null; - dataType = null; - } - else if (dataType === "string") { - if (o.binary && !o.base64) { - // optimizedBinaryString == true means that the file has already been filtered with a 0xFF mask - if (o.optimizedBinaryString !== true) { - // this is a string, not in a base64 format. - // Be sure that this is a correct "binary string" - data = utils.string2binary(data); - } - } - } - else { // arraybuffer, uint8array, ... - o.base64 = false; - o.binary = true; - - if (!dataType && !(data instanceof CompressedObject)) { - throw new Error("The data of '" + name + "' is in an unsupported format !"); - } - - // special case : it's way easier to work with Uint8Array than with ArrayBuffer - if (dataType === "arraybuffer") { - data = utils.transformTo("uint8array", data); - } - } - - var object = new ZipObject(name, data, o); - this.files[name] = object; - return object; -}; - -/** - * Find the parent folder of the path. - * @private - * @param {string} path the path to use - * @return {string} the parent folder, or "" - */ -var parentFolder = function (path) { - if (path.slice(-1) == '/') { - path = path.substring(0, path.length - 1); - } - var lastSlash = path.lastIndexOf('/'); - return (lastSlash > 0) ? path.substring(0, lastSlash) : ""; -}; - - -/** - * Returns the path with a slash at the end. - * @private - * @param {String} path the path to check. - * @return {String} the path with a trailing slash. - */ -var forceTrailingSlash = function(path) { - // Check the name ends with a / - if (path.slice(-1) != "/") { - path += "/"; // IE doesn't like substr(-1) - } - return path; -}; -/** - * Add a (sub) folder in the current folder. - * @private - * @param {string} name the folder's name - * @param {boolean=} [createFolders] If true, automatically create sub - * folders. Defaults to false. - * @return {Object} the new folder. - */ -var folderAdd = function(name, createFolders) { - createFolders = (typeof createFolders !== 'undefined') ? createFolders : false; - - name = forceTrailingSlash(name); - - // Does this folder already exist? - if (!this.files[name]) { - fileAdd.call(this, name, null, { - dir: true, - createFolders: createFolders - }); - } - return this.files[name]; -}; - -/** - * Generate a JSZip.CompressedObject for a given zipOject. - * @param {ZipObject} file the object to read. - * @param {JSZip.compression} compression the compression to use. - * @param {Object} compressionOptions the options to use when compressing. - * @return {JSZip.CompressedObject} the compressed result. - */ -var generateCompressedObjectFrom = function(file, compression, compressionOptions) { - var result = new CompressedObject(), - content; - - // the data has not been decompressed, we might reuse things ! - if (file._data instanceof CompressedObject) { - result.uncompressedSize = file._data.uncompressedSize; - result.crc32 = file._data.crc32; - - if (result.uncompressedSize === 0 || file.dir) { - compression = compressions['STORE']; - result.compressedContent = ""; - result.crc32 = 0; - } - else if (file._data.compressionMethod === compression.magic) { - result.compressedContent = file._data.getCompressedContent(); - } - else { - content = file._data.getContent(); - // need to decompress / recompress - result.compressedContent = compression.compress(utils.transformTo(compression.compressInputType, content), compressionOptions); - } - } - else { - // have uncompressed data - content = getBinaryData(file); - if (!content || content.length === 0 || file.dir) { - compression = compressions['STORE']; - content = ""; - } - result.uncompressedSize = content.length; - result.crc32 = crc32(content); - result.compressedContent = compression.compress(utils.transformTo(compression.compressInputType, content), compressionOptions); - } - - result.compressedSize = result.compressedContent.length; - result.compressionMethod = compression.magic; - - return result; -}; - - - - -/** - * Generate the UNIX part of the external file attributes. - * @param {Object} unixPermissions the unix permissions or null. - * @param {Boolean} isDir true if the entry is a directory, false otherwise. - * @return {Number} a 32 bit integer. - * - * adapted from http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute : - * - * TTTTsstrwxrwxrwx0000000000ADVSHR - * ^^^^____________________________ file type, see zipinfo.c (UNX_*) - * ^^^_________________________ setuid, setgid, sticky - * ^^^^^^^^^________________ permissions - * ^^^^^^^^^^______ not used ? - * ^^^^^^ DOS attribute bits : Archive, Directory, Volume label, System file, Hidden, Read only - */ -var generateUnixExternalFileAttr = function (unixPermissions, isDir) { - - var result = unixPermissions; - if (!unixPermissions) { - // I can't use octal values in strict mode, hence the hexa. - // 040775 => 0x41fd - // 0100664 => 0x81b4 - result = isDir ? 0x41fd : 0x81b4; - } - - return (result & 0xFFFF) << 16; -}; - -/** - * Generate the DOS part of the external file attributes. - * @param {Object} dosPermissions the dos permissions or null. - * @param {Boolean} isDir true if the entry is a directory, false otherwise. - * @return {Number} a 32 bit integer. - * - * Bit 0 Read-Only - * Bit 1 Hidden - * Bit 2 System - * Bit 3 Volume Label - * Bit 4 Directory - * Bit 5 Archive - */ -var generateDosExternalFileAttr = function (dosPermissions, isDir) { - - // the dir flag is already set for compatibility - - return (dosPermissions || 0) & 0x3F; -}; - -/** - * Generate the various parts used in the construction of the final zip file. - * @param {string} name the file name. - * @param {ZipObject} file the file content. - * @param {JSZip.CompressedObject} compressedObject the compressed object. - * @param {number} offset the current offset from the start of the zip file. - * @param {String} platform let's pretend we are this platform (change platform dependents fields) - * @return {object} the zip parts. - */ -var generateZipParts = function(name, file, compressedObject, offset, platform) { - var data = compressedObject.compressedContent, - utfEncodedFileName = utils.transformTo("string", utf8.utf8encode(file.name)), - comment = file.comment || "", - utfEncodedComment = utils.transformTo("string", utf8.utf8encode(comment)), - useUTF8ForFileName = utfEncodedFileName.length !== file.name.length, - useUTF8ForComment = utfEncodedComment.length !== comment.length, - o = file.options, - dosTime, - dosDate, - extraFields = "", - unicodePathExtraField = "", - unicodeCommentExtraField = "", - dir, date; - - - // handle the deprecated options.dir - if (file._initialMetadata.dir !== file.dir) { - dir = file.dir; - } else { - dir = o.dir; - } - - // handle the deprecated options.date - if(file._initialMetadata.date !== file.date) { - date = file.date; - } else { - date = o.date; - } - - var extFileAttr = 0; - var versionMadeBy = 0; - if (dir) { - // dos or unix, we set the dos dir flag - extFileAttr |= 0x00010; - } - if(platform === "UNIX") { - versionMadeBy = 0x031E; // UNIX, version 3.0 - extFileAttr |= generateUnixExternalFileAttr(file.unixPermissions, dir); - } else { // DOS or other, fallback to DOS - versionMadeBy = 0x0014; // DOS, version 2.0 - extFileAttr |= generateDosExternalFileAttr(file.dosPermissions, dir); - } - - // date - // @see http://www.delorie.com/djgpp/doc/rbinter/it/52/13.html - // @see http://www.delorie.com/djgpp/doc/rbinter/it/65/16.html - // @see http://www.delorie.com/djgpp/doc/rbinter/it/66/16.html - - dosTime = date.getHours(); - dosTime = dosTime << 6; - dosTime = dosTime | date.getMinutes(); - dosTime = dosTime << 5; - dosTime = dosTime | date.getSeconds() / 2; - - dosDate = date.getFullYear() - 1980; - dosDate = dosDate << 4; - dosDate = dosDate | (date.getMonth() + 1); - dosDate = dosDate << 5; - dosDate = dosDate | date.getDate(); - - if (useUTF8ForFileName) { - // set the unicode path extra field. unzip needs at least one extra - // field to correctly handle unicode path, so using the path is as good - // as any other information. This could improve the situation with - // other archive managers too. - // This field is usually used without the utf8 flag, with a non - // unicode path in the header (winrar, winzip). This helps (a bit) - // with the messy Windows' default compressed folders feature but - // breaks on p7zip which doesn't seek the unicode path extra field. - // So for now, UTF-8 everywhere ! - unicodePathExtraField = - // Version - decToHex(1, 1) + - // NameCRC32 - decToHex(crc32(utfEncodedFileName), 4) + - // UnicodeName - utfEncodedFileName; - - extraFields += - // Info-ZIP Unicode Path Extra Field - "\x75\x70" + - // size - decToHex(unicodePathExtraField.length, 2) + - // content - unicodePathExtraField; - } - - if(useUTF8ForComment) { - - unicodeCommentExtraField = - // Version - decToHex(1, 1) + - // CommentCRC32 - decToHex(this.crc32(utfEncodedComment), 4) + - // UnicodeName - utfEncodedComment; - - extraFields += - // Info-ZIP Unicode Path Extra Field - "\x75\x63" + - // size - decToHex(unicodeCommentExtraField.length, 2) + - // content - unicodeCommentExtraField; - } - - var header = ""; - - // version needed to extract - header += "\x0A\x00"; - // general purpose bit flag - // set bit 11 if utf8 - header += (useUTF8ForFileName || useUTF8ForComment) ? "\x00\x08" : "\x00\x00"; - // compression method - header += compressedObject.compressionMethod; - // last mod file time - header += decToHex(dosTime, 2); - // last mod file date - header += decToHex(dosDate, 2); - // crc-32 - header += decToHex(compressedObject.crc32, 4); - // compressed size - header += decToHex(compressedObject.compressedSize, 4); - // uncompressed size - header += decToHex(compressedObject.uncompressedSize, 4); - // file name length - header += decToHex(utfEncodedFileName.length, 2); - // extra field length - header += decToHex(extraFields.length, 2); - - - var fileRecord = signature.LOCAL_FILE_HEADER + header + utfEncodedFileName + extraFields; - - var dirRecord = signature.CENTRAL_FILE_HEADER + - // version made by (00: DOS) - decToHex(versionMadeBy, 2) + - // file header (common to file and central directory) - header + - // file comment length - decToHex(utfEncodedComment.length, 2) + - // disk number start - "\x00\x00" + - // internal file attributes TODO - "\x00\x00" + - // external file attributes - decToHex(extFileAttr, 4) + - // relative offset of local header - decToHex(offset, 4) + - // file name - utfEncodedFileName + - // extra field - extraFields + - // file comment - utfEncodedComment; - - return { - fileRecord: fileRecord, - dirRecord: dirRecord, - compressedObject: compressedObject - }; -}; - - -// return the actual prototype of JSZip -var out = { - /** - * Read an existing zip and merge the data in the current JSZip object. - * The implementation is in jszip-load.js, don't forget to include it. - * @param {String|ArrayBuffer|Uint8Array|Buffer} stream The stream to load - * @param {Object} options Options for loading the stream. - * options.base64 : is the stream in base64 ? default : false - * @return {JSZip} the current JSZip object - */ - load: function(stream, options) { - throw new Error("Load method is not defined. Is the file jszip-load.js included ?"); - }, - - /** - * Filter nested files/folders with the specified function. - * @param {Function} search the predicate to use : - * function (relativePath, file) {...} - * It takes 2 arguments : the relative path and the file. - * @return {Array} An array of matching elements. - */ - filter: function(search) { - var result = [], - filename, relativePath, file, fileClone; - for (filename in this.files) { - if (!this.files.hasOwnProperty(filename)) { - continue; - } - file = this.files[filename]; - // return a new object, don't let the user mess with our internal objects :) - fileClone = new ZipObject(file.name, file._data, extend(file.options)); - relativePath = filename.slice(this.root.length, filename.length); - if (filename.slice(0, this.root.length) === this.root && // the file is in the current root - search(relativePath, fileClone)) { // and the file matches the function - result.push(fileClone); - } - } - return result; - }, - - /** - * Add a file to the zip file, or search a file. - * @param {string|RegExp} name The name of the file to add (if data is defined), - * the name of the file to find (if no data) or a regex to match files. - * @param {String|ArrayBuffer|Uint8Array|Buffer} data The file data, either raw or base64 encoded - * @param {Object} o File options - * @return {JSZip|Object|Array} this JSZip object (when adding a file), - * a file (when searching by string) or an array of files (when searching by regex). - */ - file: function(name, data, o) { - if (arguments.length === 1) { - if (utils.isRegExp(name)) { - var regexp = name; - return this.filter(function(relativePath, file) { - return !file.dir && regexp.test(relativePath); - }); - } - else { // text - return this.filter(function(relativePath, file) { - return !file.dir && relativePath === name; - })[0] || null; - } - } - else { // more than one argument : we have data ! - name = this.root + name; - fileAdd.call(this, name, data, o); - } - return this; - }, - - /** - * Add a directory to the zip file, or search. - * @param {String|RegExp} arg The name of the directory to add, or a regex to search folders. - * @return {JSZip} an object with the new directory as the root, or an array containing matching folders. - */ - folder: function(arg) { - if (!arg) { - return this; - } - - if (utils.isRegExp(arg)) { - return this.filter(function(relativePath, file) { - return file.dir && arg.test(relativePath); - }); - } - - // else, name is a new folder - var name = this.root + arg; - var newFolder = folderAdd.call(this, name); - - // Allow chaining by returning a new object with this folder as the root - var ret = this.clone(); - ret.root = newFolder.name; - return ret; - }, - - /** - * Delete a file, or a directory and all sub-files, from the zip - * @param {string} name the name of the file to delete - * @return {JSZip} this JSZip object - */ - remove: function(name) { - name = this.root + name; - var file = this.files[name]; - if (!file) { - // Look for any folders - if (name.slice(-1) != "/") { - name += "/"; - } - file = this.files[name]; - } - - if (file && !file.dir) { - // file - delete this.files[name]; - } else { - // maybe a folder, delete recursively - var kids = this.filter(function(relativePath, file) { - return file.name.slice(0, name.length) === name; - }); - for (var i = 0; i < kids.length; i++) { - delete this.files[kids[i].name]; - } - } - - return this; - }, - - /** - * Generate the complete zip file - * @param {Object} options the options to generate the zip file : - * - base64, (deprecated, use type instead) true to generate base64. - * - compression, "STORE" by default. - * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob. - * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the zip file - */ - generate: function(options) { - options = extend(options || {}, { - base64: true, - compression: "STORE", - compressionOptions : null, - type: "base64", - platform: "DOS", - comment: null, - mimeType: 'application/zip' - }); - - utils.checkSupport(options.type); - - // accept nodejs `process.platform` - if( - options.platform === 'darwin' || - options.platform === 'freebsd' || - options.platform === 'linux' || - options.platform === 'sunos' - ) { - options.platform = "UNIX"; - } - if (options.platform === 'win32') { - options.platform = "DOS"; - } - - var zipData = [], - localDirLength = 0, - centralDirLength = 0, - writer, i, - utfEncodedComment = utils.transformTo("string", this.utf8encode(options.comment || this.comment || "")); - - // first, generate all the zip parts. - for (var name in this.files) { - if (!this.files.hasOwnProperty(name)) { - continue; - } - var file = this.files[name]; - - var compressionName = file.options.compression || options.compression.toUpperCase(); - var compression = compressions[compressionName]; - if (!compression) { - throw new Error(compressionName + " is not a valid compression method !"); - } - var compressionOptions = file.options.compressionOptions || options.compressionOptions || {}; - - var compressedObject = generateCompressedObjectFrom.call(this, file, compression, compressionOptions); - - var zipPart = generateZipParts.call(this, name, file, compressedObject, localDirLength, options.platform); - localDirLength += zipPart.fileRecord.length + compressedObject.compressedSize; - centralDirLength += zipPart.dirRecord.length; - zipData.push(zipPart); - } - - var dirEnd = ""; - - // end of central dir signature - dirEnd = signature.CENTRAL_DIRECTORY_END + - // number of this disk - "\x00\x00" + - // number of the disk with the start of the central directory - "\x00\x00" + - // total number of entries in the central directory on this disk - decToHex(zipData.length, 2) + - // total number of entries in the central directory - decToHex(zipData.length, 2) + - // size of the central directory 4 bytes - decToHex(centralDirLength, 4) + - // offset of start of central directory with respect to the starting disk number - decToHex(localDirLength, 4) + - // .ZIP file comment length - decToHex(utfEncodedComment.length, 2) + - // .ZIP file comment - utfEncodedComment; - - - // we have all the parts (and the total length) - // time to create a writer ! - var typeName = options.type.toLowerCase(); - if(typeName==="uint8array"||typeName==="arraybuffer"||typeName==="blob"||typeName==="nodebuffer") { - writer = new Uint8ArrayWriter(localDirLength + centralDirLength + dirEnd.length); - }else{ - writer = new StringWriter(localDirLength + centralDirLength + dirEnd.length); - } - - for (i = 0; i < zipData.length; i++) { - writer.append(zipData[i].fileRecord); - writer.append(zipData[i].compressedObject.compressedContent); - } - for (i = 0; i < zipData.length; i++) { - writer.append(zipData[i].dirRecord); - } - - writer.append(dirEnd); - - var zip = writer.finalize(); - - - - switch(options.type.toLowerCase()) { - // case "zip is an Uint8Array" - case "uint8array" : - case "arraybuffer" : - case "nodebuffer" : - return utils.transformTo(options.type.toLowerCase(), zip); - case "blob" : - return utils.arrayBuffer2Blob(utils.transformTo("arraybuffer", zip), options.mimeType); - // case "zip is a string" - case "base64" : - return (options.base64) ? base64.encode(zip) : zip; - default : // case "string" : - return zip; - } - - }, - - /** - * @deprecated - * This method will be removed in a future version without replacement. - */ - crc32: function (input, crc) { - return crc32(input, crc); - }, - - /** - * @deprecated - * This method will be removed in a future version without replacement. - */ - utf8encode: function (string) { - return utils.transformTo("string", utf8.utf8encode(string)); - }, - - /** - * @deprecated - * This method will be removed in a future version without replacement. - */ - utf8decode: function (input) { - return utf8.utf8decode(input); - } -}; -module.exports = out; diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/signature.js b/cli/node_modules/node-zip/node_modules/jszip/lib/signature.js deleted file mode 100644 index 4ee817b83..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/signature.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; -exports.LOCAL_FILE_HEADER = "PK\x03\x04"; -exports.CENTRAL_FILE_HEADER = "PK\x01\x02"; -exports.CENTRAL_DIRECTORY_END = "PK\x05\x06"; -exports.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x06\x07"; -exports.ZIP64_CENTRAL_DIRECTORY_END = "PK\x06\x06"; -exports.DATA_DESCRIPTOR = "PK\x07\x08"; diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/stringReader.js b/cli/node_modules/node-zip/node_modules/jszip/lib/stringReader.js deleted file mode 100644 index 895331e41..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/stringReader.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; -var DataReader = require('./dataReader'); -var utils = require('./utils'); - -function StringReader(data, optimizedBinaryString) { - this.data = data; - if (!optimizedBinaryString) { - this.data = utils.string2binary(this.data); - } - this.length = this.data.length; - this.index = 0; -} -StringReader.prototype = new DataReader(); -/** - * @see DataReader.byteAt - */ -StringReader.prototype.byteAt = function(i) { - return this.data.charCodeAt(i); -}; -/** - * @see DataReader.lastIndexOfSignature - */ -StringReader.prototype.lastIndexOfSignature = function(sig) { - return this.data.lastIndexOf(sig); -}; -/** - * @see DataReader.readData - */ -StringReader.prototype.readData = function(size) { - this.checkOffset(size); - // this will work because the constructor applied the "& 0xff" mask. - var result = this.data.slice(this.index, this.index + size); - this.index += size; - return result; -}; -module.exports = StringReader; diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/stringWriter.js b/cli/node_modules/node-zip/node_modules/jszip/lib/stringWriter.js deleted file mode 100644 index 45db54841..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/stringWriter.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -var utils = require('./utils'); - -/** - * An object to write any content to a string. - * @constructor - */ -var StringWriter = function() { - this.data = []; -}; -StringWriter.prototype = { - /** - * Append any content to the current string. - * @param {Object} input the content to add. - */ - append: function(input) { - input = utils.transformTo("string", input); - this.data.push(input); - }, - /** - * Finalize the construction an return the result. - * @return {string} the generated string. - */ - finalize: function() { - return this.data.join(""); - } -}; - -module.exports = StringWriter; diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/support.js b/cli/node_modules/node-zip/node_modules/jszip/lib/support.js deleted file mode 100644 index b9bbb1f5f..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/support.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; -exports.base64 = true; -exports.array = true; -exports.string = true; -exports.arraybuffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined"; -// contains true if JSZip can read/generate nodejs Buffer, false otherwise. -// Browserify will provide a Buffer implementation for browsers, which is -// an augmented Uint8Array (i.e., can be used as either Buffer or U8). -exports.nodebuffer = typeof Buffer !== "undefined"; -// contains true if JSZip can read/generate Uint8Array, false otherwise. -exports.uint8array = typeof Uint8Array !== "undefined"; - -if (typeof ArrayBuffer === "undefined") { - exports.blob = false; -} -else { - var buffer = new ArrayBuffer(0); - try { - exports.blob = new Blob([buffer], { - type: "application/zip" - }).size === 0; - } - catch (e) { - try { - var Builder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder; - var builder = new Builder(); - builder.append(buffer); - exports.blob = builder.getBlob('application/zip').size === 0; - } - catch (e) { - exports.blob = false; - } - } -} diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/uint8ArrayReader.js b/cli/node_modules/node-zip/node_modules/jszip/lib/uint8ArrayReader.js deleted file mode 100644 index ce8d1a8ba..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/uint8ArrayReader.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; -var DataReader = require('./dataReader'); - -function Uint8ArrayReader(data) { - if (data) { - this.data = data; - this.length = this.data.length; - this.index = 0; - } -} -Uint8ArrayReader.prototype = new DataReader(); -/** - * @see DataReader.byteAt - */ -Uint8ArrayReader.prototype.byteAt = function(i) { - return this.data[i]; -}; -/** - * @see DataReader.lastIndexOfSignature - */ -Uint8ArrayReader.prototype.lastIndexOfSignature = function(sig) { - var sig0 = sig.charCodeAt(0), - sig1 = sig.charCodeAt(1), - sig2 = sig.charCodeAt(2), - sig3 = sig.charCodeAt(3); - for (var i = this.length - 4; i >= 0; --i) { - if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) { - return i; - } - } - - return -1; -}; -/** - * @see DataReader.readData - */ -Uint8ArrayReader.prototype.readData = function(size) { - this.checkOffset(size); - if(size === 0) { - // in IE10, when using subarray(idx, idx), we get the array [0x00] instead of []. - return new Uint8Array(0); - } - var result = this.data.subarray(this.index, this.index + size); - this.index += size; - return result; -}; -module.exports = Uint8ArrayReader; diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/uint8ArrayWriter.js b/cli/node_modules/node-zip/node_modules/jszip/lib/uint8ArrayWriter.js deleted file mode 100644 index 405397f7f..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/uint8ArrayWriter.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -var utils = require('./utils'); - -/** - * An object to write any content to an Uint8Array. - * @constructor - * @param {number} length The length of the array. - */ -var Uint8ArrayWriter = function(length) { - this.data = new Uint8Array(length); - this.index = 0; -}; -Uint8ArrayWriter.prototype = { - /** - * Append any content to the current array. - * @param {Object} input the content to add. - */ - append: function(input) { - if (input.length !== 0) { - // with an empty Uint8Array, Opera fails with a "Offset larger than array size" - input = utils.transformTo("uint8array", input); - this.data.set(input, this.index); - this.index += input.length; - } - }, - /** - * Finalize the construction an return the result. - * @return {Uint8Array} the generated array. - */ - finalize: function() { - return this.data; - } -}; - -module.exports = Uint8ArrayWriter; diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/utf8.js b/cli/node_modules/node-zip/node_modules/jszip/lib/utf8.js deleted file mode 100644 index 8cc16b476..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/utf8.js +++ /dev/null @@ -1,207 +0,0 @@ -'use strict'; - -var utils = require('./utils'); -var support = require('./support'); -var nodeBuffer = require('./nodeBuffer'); - -/** - * The following functions come from pako, from pako/lib/utils/strings - * released under the MIT license, see pako https://github.com/nodeca/pako/ - */ - -// Table with utf8 lengths (calculated by first byte of sequence) -// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS, -// because max possible codepoint is 0x10ffff -var _utf8len = new Array(256); -for (var i=0; i<256; i++) { - _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1); -} -_utf8len[254]=_utf8len[254]=1; // Invalid sequence start - -// convert string to array (typed, when possible) -var string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) { - c2 = str.charCodeAt(m_pos+1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - if (support.uint8array) { - buf = new Uint8Array(buf_len); - } else { - buf = new Array(buf_len); - } - - // convert - for (i=0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) { - c2 = str.charCodeAt(m_pos+1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -var utf8border = function(buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max-1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Fuckup - very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means vuffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; - -// convert array to string -var buf2string = function (buf) { - var str, i, out, c, c_len; - var len = buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len*2); - - for (out=0, i=0; i 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - // shrinkBuf(utf16buf, out) - if (utf16buf.length !== out) { - if(utf16buf.subarray) { - utf16buf = utf16buf.subarray(0, out); - } else { - utf16buf.length = out; - } - } - - // return String.fromCharCode.apply(null, utf16buf); - return utils.applyFromCharCode(utf16buf); -}; - - -// That's all for the pako functions. - - -/** - * Transform a javascript string into an array (typed if possible) of bytes, - * UTF-8 encoded. - * @param {String} str the string to encode - * @return {Array|Uint8Array|Buffer} the UTF-8 encoded string. - */ -exports.utf8encode = function utf8encode(str) { - if (support.nodebuffer) { - return nodeBuffer(str, "utf-8"); - } - - return string2buf(str); -}; - - -/** - * Transform a bytes array (or a representation) representing an UTF-8 encoded - * string into a javascript string. - * @param {Array|Uint8Array|Buffer} buf the data de decode - * @return {String} the decoded string. - */ -exports.utf8decode = function utf8decode(buf) { - if (support.nodebuffer) { - return utils.transformTo("nodebuffer", buf).toString("utf-8"); - } - - buf = utils.transformTo(support.uint8array ? "uint8array" : "array", buf); - - // return buf2string(buf); - // Chrome prefers to work with "small" chunks of data - // for the method buf2string. - // Firefox and Chrome has their own shortcut, IE doesn't seem to really care. - var result = [], k = 0, len = buf.length, chunk = 65536; - while (k < len) { - var nextBoundary = utf8border(buf, Math.min(k + chunk, len)); - if (support.uint8array) { - result.push(buf2string(buf.subarray(k, nextBoundary))); - } else { - result.push(buf2string(buf.slice(k, nextBoundary))); - } - k = nextBoundary; - } - return result.join(""); - -}; -// vim: set shiftwidth=4 softtabstop=4: diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/utils.js b/cli/node_modules/node-zip/node_modules/jszip/lib/utils.js deleted file mode 100644 index da54747ae..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/utils.js +++ /dev/null @@ -1,326 +0,0 @@ -'use strict'; -var support = require('./support'); -var compressions = require('./compressions'); -var nodeBuffer = require('./nodeBuffer'); -/** - * Convert a string to a "binary string" : a string containing only char codes between 0 and 255. - * @param {string} str the string to transform. - * @return {String} the binary string. - */ -exports.string2binary = function(str) { - var result = ""; - for (var i = 0; i < str.length; i++) { - result += String.fromCharCode(str.charCodeAt(i) & 0xff); - } - return result; -}; -exports.arrayBuffer2Blob = function(buffer, mimeType) { - exports.checkSupport("blob"); - mimeType = mimeType || 'application/zip'; - - try { - // Blob constructor - return new Blob([buffer], { - type: mimeType - }); - } - catch (e) { - - try { - // deprecated, browser only, old way - var Builder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder; - var builder = new Builder(); - builder.append(buffer); - return builder.getBlob(mimeType); - } - catch (e) { - - // well, fuck ?! - throw new Error("Bug : can't construct the Blob."); - } - } - - -}; -/** - * The identity function. - * @param {Object} input the input. - * @return {Object} the same input. - */ -function identity(input) { - return input; -} - -/** - * Fill in an array with a string. - * @param {String} str the string to use. - * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to fill in (will be mutated). - * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array. - */ -function stringToArrayLike(str, array) { - for (var i = 0; i < str.length; ++i) { - array[i] = str.charCodeAt(i) & 0xFF; - } - return array; -} - -/** - * Transform an array-like object to a string. - * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform. - * @return {String} the result. - */ -function arrayLikeToString(array) { - // Performances notes : - // -------------------- - // String.fromCharCode.apply(null, array) is the fastest, see - // see http://jsperf.com/converting-a-uint8array-to-a-string/2 - // but the stack is limited (and we can get huge arrays !). - // - // result += String.fromCharCode(array[i]); generate too many strings ! - // - // This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2 - var chunk = 65536; - var result = [], - len = array.length, - type = exports.getTypeOf(array), - k = 0, - canUseApply = true; - try { - switch(type) { - case "uint8array": - String.fromCharCode.apply(null, new Uint8Array(0)); - break; - case "nodebuffer": - String.fromCharCode.apply(null, nodeBuffer(0)); - break; - } - } catch(e) { - canUseApply = false; - } - - // no apply : slow and painful algorithm - // default browser on android 4.* - if (!canUseApply) { - var resultStr = ""; - for(var i = 0; i < array.length;i++) { - resultStr += String.fromCharCode(array[i]); - } - return resultStr; - } - while (k < len && chunk > 1) { - try { - if (type === "array" || type === "nodebuffer") { - result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len)))); - } - else { - result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len)))); - } - k += chunk; - } - catch (e) { - chunk = Math.floor(chunk / 2); - } - } - return result.join(""); -} - -exports.applyFromCharCode = arrayLikeToString; - - -/** - * Copy the data from an array-like to an other array-like. - * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayFrom the origin array. - * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayTo the destination array which will be mutated. - * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated destination array. - */ -function arrayLikeToArrayLike(arrayFrom, arrayTo) { - for (var i = 0; i < arrayFrom.length; i++) { - arrayTo[i] = arrayFrom[i]; - } - return arrayTo; -} - -// a matrix containing functions to transform everything into everything. -var transform = {}; - -// string to ? -transform["string"] = { - "string": identity, - "array": function(input) { - return stringToArrayLike(input, new Array(input.length)); - }, - "arraybuffer": function(input) { - return transform["string"]["uint8array"](input).buffer; - }, - "uint8array": function(input) { - return stringToArrayLike(input, new Uint8Array(input.length)); - }, - "nodebuffer": function(input) { - return stringToArrayLike(input, nodeBuffer(input.length)); - } -}; - -// array to ? -transform["array"] = { - "string": arrayLikeToString, - "array": identity, - "arraybuffer": function(input) { - return (new Uint8Array(input)).buffer; - }, - "uint8array": function(input) { - return new Uint8Array(input); - }, - "nodebuffer": function(input) { - return nodeBuffer(input); - } -}; - -// arraybuffer to ? -transform["arraybuffer"] = { - "string": function(input) { - return arrayLikeToString(new Uint8Array(input)); - }, - "array": function(input) { - return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength)); - }, - "arraybuffer": identity, - "uint8array": function(input) { - return new Uint8Array(input); - }, - "nodebuffer": function(input) { - return nodeBuffer(new Uint8Array(input)); - } -}; - -// uint8array to ? -transform["uint8array"] = { - "string": arrayLikeToString, - "array": function(input) { - return arrayLikeToArrayLike(input, new Array(input.length)); - }, - "arraybuffer": function(input) { - return input.buffer; - }, - "uint8array": identity, - "nodebuffer": function(input) { - return nodeBuffer(input); - } -}; - -// nodebuffer to ? -transform["nodebuffer"] = { - "string": arrayLikeToString, - "array": function(input) { - return arrayLikeToArrayLike(input, new Array(input.length)); - }, - "arraybuffer": function(input) { - return transform["nodebuffer"]["uint8array"](input).buffer; - }, - "uint8array": function(input) { - return arrayLikeToArrayLike(input, new Uint8Array(input.length)); - }, - "nodebuffer": identity -}; - -/** - * Transform an input into any type. - * The supported output type are : string, array, uint8array, arraybuffer, nodebuffer. - * If no output type is specified, the unmodified input will be returned. - * @param {String} outputType the output type. - * @param {String|Array|ArrayBuffer|Uint8Array|Buffer} input the input to convert. - * @throws {Error} an Error if the browser doesn't support the requested output type. - */ -exports.transformTo = function(outputType, input) { - if (!input) { - // undefined, null, etc - // an empty string won't harm. - input = ""; - } - if (!outputType) { - return input; - } - exports.checkSupport(outputType); - var inputType = exports.getTypeOf(input); - var result = transform[inputType][outputType](input); - return result; -}; - -/** - * Return the type of the input. - * The type will be in a format valid for JSZip.utils.transformTo : string, array, uint8array, arraybuffer. - * @param {Object} input the input to identify. - * @return {String} the (lowercase) type of the input. - */ -exports.getTypeOf = function(input) { - if (typeof input === "string") { - return "string"; - } - if (Object.prototype.toString.call(input) === "[object Array]") { - return "array"; - } - if (support.nodebuffer && nodeBuffer.test(input)) { - return "nodebuffer"; - } - if (support.uint8array && input instanceof Uint8Array) { - return "uint8array"; - } - if (support.arraybuffer && input instanceof ArrayBuffer) { - return "arraybuffer"; - } -}; - -/** - * Throw an exception if the type is not supported. - * @param {String} type the type to check. - * @throws {Error} an Error if the browser doesn't support the requested type. - */ -exports.checkSupport = function(type) { - var supported = support[type.toLowerCase()]; - if (!supported) { - throw new Error(type + " is not supported by this browser"); - } -}; -exports.MAX_VALUE_16BITS = 65535; -exports.MAX_VALUE_32BITS = -1; // well, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" is parsed as -1 - -/** - * Prettify a string read as binary. - * @param {string} str the string to prettify. - * @return {string} a pretty string. - */ -exports.pretty = function(str) { - var res = '', - code, i; - for (i = 0; i < (str || "").length; i++) { - code = str.charCodeAt(i); - res += '\\x' + (code < 16 ? "0" : "") + code.toString(16).toUpperCase(); - } - return res; -}; - -/** - * Find a compression registered in JSZip. - * @param {string} compressionMethod the method magic to find. - * @return {Object|null} the JSZip compression object, null if none found. - */ -exports.findCompression = function(compressionMethod) { - for (var method in compressions) { - if (!compressions.hasOwnProperty(method)) { - continue; - } - if (compressions[method].magic === compressionMethod) { - return compressions[method]; - } - } - return null; -}; -/** -* Cross-window, cross-Node-context regular expression detection -* @param {Object} object Anything -* @return {Boolean} true if the object is a regular expression, -* false otherwise -*/ -exports.isRegExp = function (object) { - return Object.prototype.toString.call(object) === "[object RegExp]"; -}; - diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/zipEntries.js b/cli/node_modules/node-zip/node_modules/jszip/lib/zipEntries.js deleted file mode 100644 index 4b825613c..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/zipEntries.js +++ /dev/null @@ -1,221 +0,0 @@ -'use strict'; -var StringReader = require('./stringReader'); -var NodeBufferReader = require('./nodeBufferReader'); -var Uint8ArrayReader = require('./uint8ArrayReader'); -var utils = require('./utils'); -var sig = require('./signature'); -var ZipEntry = require('./zipEntry'); -var support = require('./support'); -var jszipProto = require('./object'); -// class ZipEntries {{{ -/** - * All the entries in the zip file. - * @constructor - * @param {String|ArrayBuffer|Uint8Array} data the binary stream to load. - * @param {Object} loadOptions Options for loading the stream. - */ -function ZipEntries(data, loadOptions) { - this.files = []; - this.loadOptions = loadOptions; - if (data) { - this.load(data); - } -} -ZipEntries.prototype = { - /** - * Check that the reader is on the speficied signature. - * @param {string} expectedSignature the expected signature. - * @throws {Error} if it is an other signature. - */ - checkSignature: function(expectedSignature) { - var signature = this.reader.readString(4); - if (signature !== expectedSignature) { - throw new Error("Corrupted zip or bug : unexpected signature " + "(" + utils.pretty(signature) + ", expected " + utils.pretty(expectedSignature) + ")"); - } - }, - /** - * Read the end of the central directory. - */ - readBlockEndOfCentral: function() { - this.diskNumber = this.reader.readInt(2); - this.diskWithCentralDirStart = this.reader.readInt(2); - this.centralDirRecordsOnThisDisk = this.reader.readInt(2); - this.centralDirRecords = this.reader.readInt(2); - this.centralDirSize = this.reader.readInt(4); - this.centralDirOffset = this.reader.readInt(4); - - this.zipCommentLength = this.reader.readInt(2); - // warning : the encoding depends of the system locale - // On a linux machine with LANG=en_US.utf8, this field is utf8 encoded. - // On a windows machine, this field is encoded with the localized windows code page. - this.zipComment = this.reader.readString(this.zipCommentLength); - // To get consistent behavior with the generation part, we will assume that - // this is utf8 encoded. - this.zipComment = jszipProto.utf8decode(this.zipComment); - }, - /** - * Read the end of the Zip 64 central directory. - * Not merged with the method readEndOfCentral : - * The end of central can coexist with its Zip64 brother, - * I don't want to read the wrong number of bytes ! - */ - readBlockZip64EndOfCentral: function() { - this.zip64EndOfCentralSize = this.reader.readInt(8); - this.versionMadeBy = this.reader.readString(2); - this.versionNeeded = this.reader.readInt(2); - this.diskNumber = this.reader.readInt(4); - this.diskWithCentralDirStart = this.reader.readInt(4); - this.centralDirRecordsOnThisDisk = this.reader.readInt(8); - this.centralDirRecords = this.reader.readInt(8); - this.centralDirSize = this.reader.readInt(8); - this.centralDirOffset = this.reader.readInt(8); - - this.zip64ExtensibleData = {}; - var extraDataSize = this.zip64EndOfCentralSize - 44, - index = 0, - extraFieldId, - extraFieldLength, - extraFieldValue; - while (index < extraDataSize) { - extraFieldId = this.reader.readInt(2); - extraFieldLength = this.reader.readInt(4); - extraFieldValue = this.reader.readString(extraFieldLength); - this.zip64ExtensibleData[extraFieldId] = { - id: extraFieldId, - length: extraFieldLength, - value: extraFieldValue - }; - } - }, - /** - * Read the end of the Zip 64 central directory locator. - */ - readBlockZip64EndOfCentralLocator: function() { - this.diskWithZip64CentralDirStart = this.reader.readInt(4); - this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8); - this.disksCount = this.reader.readInt(4); - if (this.disksCount > 1) { - throw new Error("Multi-volumes zip are not supported"); - } - }, - /** - * Read the local files, based on the offset read in the central part. - */ - readLocalFiles: function() { - var i, file; - for (i = 0; i < this.files.length; i++) { - file = this.files[i]; - this.reader.setIndex(file.localHeaderOffset); - this.checkSignature(sig.LOCAL_FILE_HEADER); - file.readLocalPart(this.reader); - file.handleUTF8(); - file.processAttributes(); - } - }, - /** - * Read the central directory. - */ - readCentralDir: function() { - var file; - - this.reader.setIndex(this.centralDirOffset); - while (this.reader.readString(4) === sig.CENTRAL_FILE_HEADER) { - file = new ZipEntry({ - zip64: this.zip64 - }, this.loadOptions); - file.readCentralPart(this.reader); - this.files.push(file); - } - }, - /** - * Read the end of central directory. - */ - readEndOfCentral: function() { - var offset = this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END); - if (offset === -1) { - // Check if the content is a truncated zip or complete garbage. - // A "LOCAL_FILE_HEADER" is not required at the beginning (auto - // extractible zip for example) but it can give a good hint. - // If an ajax request was used without responseType, we will also - // get unreadable data. - var isGarbage = true; - try { - this.reader.setIndex(0); - this.checkSignature(sig.LOCAL_FILE_HEADER); - isGarbage = false; - } catch (e) {} - - if (isGarbage) { - throw new Error("Can't find end of central directory : is this a zip file ? " + - "If it is, see http://stuk.github.io/jszip/documentation/howto/read_zip.html"); - } else { - throw new Error("Corrupted zip : can't find end of central directory"); - } - } - this.reader.setIndex(offset); - this.checkSignature(sig.CENTRAL_DIRECTORY_END); - this.readBlockEndOfCentral(); - - - /* extract from the zip spec : - 4) If one of the fields in the end of central directory - record is too small to hold required data, the field - should be set to -1 (0xFFFF or 0xFFFFFFFF) and the - ZIP64 format record should be created. - 5) The end of central directory record and the - Zip64 end of central directory locator record must - reside on the same disk when splitting or spanning - an archive. - */ - if (this.diskNumber === utils.MAX_VALUE_16BITS || this.diskWithCentralDirStart === utils.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === utils.MAX_VALUE_16BITS || this.centralDirRecords === utils.MAX_VALUE_16BITS || this.centralDirSize === utils.MAX_VALUE_32BITS || this.centralDirOffset === utils.MAX_VALUE_32BITS) { - this.zip64 = true; - - /* - Warning : the zip64 extension is supported, but ONLY if the 64bits integer read from - the zip file can fit into a 32bits integer. This cannot be solved : Javascript represents - all numbers as 64-bit double precision IEEE 754 floating point numbers. - So, we have 53bits for integers and bitwise operations treat everything as 32bits. - see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Bitwise_Operators - and http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf section 8.5 - */ - - // should look for a zip64 EOCD locator - offset = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR); - if (offset === -1) { - throw new Error("Corrupted zip : can't find the ZIP64 end of central directory locator"); - } - this.reader.setIndex(offset); - this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR); - this.readBlockZip64EndOfCentralLocator(); - - // now the zip64 EOCD record - this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir); - this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END); - this.readBlockZip64EndOfCentral(); - } - }, - prepareReader: function(data) { - var type = utils.getTypeOf(data); - if (type === "string" && !support.uint8array) { - this.reader = new StringReader(data, this.loadOptions.optimizedBinaryString); - } - else if (type === "nodebuffer") { - this.reader = new NodeBufferReader(data); - } - else { - this.reader = new Uint8ArrayReader(utils.transformTo("uint8array", data)); - } - }, - /** - * Read a zip file and create ZipEntries. - * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file. - */ - load: function(data) { - this.prepareReader(data); - this.readEndOfCentral(); - this.readCentralDir(); - this.readLocalFiles(); - } -}; -// }}} end of ZipEntries -module.exports = ZipEntries; diff --git a/cli/node_modules/node-zip/node_modules/jszip/lib/zipEntry.js b/cli/node_modules/node-zip/node_modules/jszip/lib/zipEntry.js deleted file mode 100644 index 70a3ac0a0..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/lib/zipEntry.js +++ /dev/null @@ -1,310 +0,0 @@ -'use strict'; -var StringReader = require('./stringReader'); -var utils = require('./utils'); -var CompressedObject = require('./compressedObject'); -var jszipProto = require('./object'); - -var MADE_BY_DOS = 0x00; -var MADE_BY_UNIX = 0x03; - -// class ZipEntry {{{ -/** - * An entry in the zip file. - * @constructor - * @param {Object} options Options of the current file. - * @param {Object} loadOptions Options for loading the stream. - */ -function ZipEntry(options, loadOptions) { - this.options = options; - this.loadOptions = loadOptions; -} -ZipEntry.prototype = { - /** - * say if the file is encrypted. - * @return {boolean} true if the file is encrypted, false otherwise. - */ - isEncrypted: function() { - // bit 1 is set - return (this.bitFlag & 0x0001) === 0x0001; - }, - /** - * say if the file has utf-8 filename/comment. - * @return {boolean} true if the filename/comment is in utf-8, false otherwise. - */ - useUTF8: function() { - // bit 11 is set - return (this.bitFlag & 0x0800) === 0x0800; - }, - /** - * Prepare the function used to generate the compressed content from this ZipFile. - * @param {DataReader} reader the reader to use. - * @param {number} from the offset from where we should read the data. - * @param {number} length the length of the data to read. - * @return {Function} the callback to get the compressed content (the type depends of the DataReader class). - */ - prepareCompressedContent: function(reader, from, length) { - return function() { - var previousIndex = reader.index; - reader.setIndex(from); - var compressedFileData = reader.readData(length); - reader.setIndex(previousIndex); - - return compressedFileData; - }; - }, - /** - * Prepare the function used to generate the uncompressed content from this ZipFile. - * @param {DataReader} reader the reader to use. - * @param {number} from the offset from where we should read the data. - * @param {number} length the length of the data to read. - * @param {JSZip.compression} compression the compression used on this file. - * @param {number} uncompressedSize the uncompressed size to expect. - * @return {Function} the callback to get the uncompressed content (the type depends of the DataReader class). - */ - prepareContent: function(reader, from, length, compression, uncompressedSize) { - return function() { - - var compressedFileData = utils.transformTo(compression.uncompressInputType, this.getCompressedContent()); - var uncompressedFileData = compression.uncompress(compressedFileData); - - if (uncompressedFileData.length !== uncompressedSize) { - throw new Error("Bug : uncompressed data size mismatch"); - } - - return uncompressedFileData; - }; - }, - /** - * Read the local part of a zip file and add the info in this object. - * @param {DataReader} reader the reader to use. - */ - readLocalPart: function(reader) { - var compression, localExtraFieldsLength; - - // we already know everything from the central dir ! - // If the central dir data are false, we are doomed. - // On the bright side, the local part is scary : zip64, data descriptors, both, etc. - // The less data we get here, the more reliable this should be. - // Let's skip the whole header and dash to the data ! - reader.skip(22); - // in some zip created on windows, the filename stored in the central dir contains \ instead of /. - // Strangely, the filename here is OK. - // I would love to treat these zip files as corrupted (see http://www.info-zip.org/FAQ.html#backslashes - // or APPNOTE#4.4.17.1, "All slashes MUST be forward slashes '/'") but there are a lot of bad zip generators... - // Search "unzip mismatching "local" filename continuing with "central" filename version" on - // the internet. - // - // I think I see the logic here : the central directory is used to display - // content and the local directory is used to extract the files. Mixing / and \ - // may be used to display \ to windows users and use / when extracting the files. - // Unfortunately, this lead also to some issues : http://seclists.org/fulldisclosure/2009/Sep/394 - this.fileNameLength = reader.readInt(2); - localExtraFieldsLength = reader.readInt(2); // can't be sure this will be the same as the central dir - this.fileName = reader.readString(this.fileNameLength); - reader.skip(localExtraFieldsLength); - - if (this.compressedSize == -1 || this.uncompressedSize == -1) { - throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory " + "(compressedSize == -1 || uncompressedSize == -1)"); - } - - compression = utils.findCompression(this.compressionMethod); - if (compression === null) { // no compression found - throw new Error("Corrupted zip : compression " + utils.pretty(this.compressionMethod) + " unknown (inner file : " + this.fileName + ")"); - } - this.decompressed = new CompressedObject(); - this.decompressed.compressedSize = this.compressedSize; - this.decompressed.uncompressedSize = this.uncompressedSize; - this.decompressed.crc32 = this.crc32; - this.decompressed.compressionMethod = this.compressionMethod; - this.decompressed.getCompressedContent = this.prepareCompressedContent(reader, reader.index, this.compressedSize, compression); - this.decompressed.getContent = this.prepareContent(reader, reader.index, this.compressedSize, compression, this.uncompressedSize); - - // we need to compute the crc32... - if (this.loadOptions.checkCRC32) { - this.decompressed = utils.transformTo("string", this.decompressed.getContent()); - if (jszipProto.crc32(this.decompressed) !== this.crc32) { - throw new Error("Corrupted zip : CRC32 mismatch"); - } - } - }, - - /** - * Read the central part of a zip file and add the info in this object. - * @param {DataReader} reader the reader to use. - */ - readCentralPart: function(reader) { - this.versionMadeBy = reader.readInt(2); - this.versionNeeded = reader.readInt(2); - this.bitFlag = reader.readInt(2); - this.compressionMethod = reader.readString(2); - this.date = reader.readDate(); - this.crc32 = reader.readInt(4); - this.compressedSize = reader.readInt(4); - this.uncompressedSize = reader.readInt(4); - this.fileNameLength = reader.readInt(2); - this.extraFieldsLength = reader.readInt(2); - this.fileCommentLength = reader.readInt(2); - this.diskNumberStart = reader.readInt(2); - this.internalFileAttributes = reader.readInt(2); - this.externalFileAttributes = reader.readInt(4); - this.localHeaderOffset = reader.readInt(4); - - if (this.isEncrypted()) { - throw new Error("Encrypted zip are not supported"); - } - - this.fileName = reader.readString(this.fileNameLength); - this.readExtraFields(reader); - this.parseZIP64ExtraField(reader); - this.fileComment = reader.readString(this.fileCommentLength); - }, - - /** - * Parse the external file attributes and get the unix/dos permissions. - */ - processAttributes: function () { - this.unixPermissions = null; - this.dosPermissions = null; - var madeBy = this.versionMadeBy >> 8; - - // Check if we have the DOS directory flag set. - // We look for it in the DOS and UNIX permissions - // but some unknown platform could set it as a compatibility flag. - this.dir = this.externalFileAttributes & 0x0010 ? true : false; - - if(madeBy === MADE_BY_DOS) { - // first 6 bits (0 to 5) - this.dosPermissions = this.externalFileAttributes & 0x3F; - } - - if(madeBy === MADE_BY_UNIX) { - this.unixPermissions = (this.externalFileAttributes >> 16) & 0xFFFF; - // the octal permissions are in (this.unixPermissions & 0x01FF).toString(8); - } - - // fail safe : if the name ends with a / it probably means a folder - if (!this.dir && this.fileName.slice(-1) === '/') { - this.dir = true; - } - }, - - /** - * Parse the ZIP64 extra field and merge the info in the current ZipEntry. - * @param {DataReader} reader the reader to use. - */ - parseZIP64ExtraField: function(reader) { - - if (!this.extraFields[0x0001]) { - return; - } - - // should be something, preparing the extra reader - var extraReader = new StringReader(this.extraFields[0x0001].value); - - // I really hope that these 64bits integer can fit in 32 bits integer, because js - // won't let us have more. - if (this.uncompressedSize === utils.MAX_VALUE_32BITS) { - this.uncompressedSize = extraReader.readInt(8); - } - if (this.compressedSize === utils.MAX_VALUE_32BITS) { - this.compressedSize = extraReader.readInt(8); - } - if (this.localHeaderOffset === utils.MAX_VALUE_32BITS) { - this.localHeaderOffset = extraReader.readInt(8); - } - if (this.diskNumberStart === utils.MAX_VALUE_32BITS) { - this.diskNumberStart = extraReader.readInt(4); - } - }, - /** - * Read the central part of a zip file and add the info in this object. - * @param {DataReader} reader the reader to use. - */ - readExtraFields: function(reader) { - var start = reader.index, - extraFieldId, - extraFieldLength, - extraFieldValue; - - this.extraFields = this.extraFields || {}; - - while (reader.index < start + this.extraFieldsLength) { - extraFieldId = reader.readInt(2); - extraFieldLength = reader.readInt(2); - extraFieldValue = reader.readString(extraFieldLength); - - this.extraFields[extraFieldId] = { - id: extraFieldId, - length: extraFieldLength, - value: extraFieldValue - }; - } - }, - /** - * Apply an UTF8 transformation if needed. - */ - handleUTF8: function() { - if (this.useUTF8()) { - this.fileName = jszipProto.utf8decode(this.fileName); - this.fileComment = jszipProto.utf8decode(this.fileComment); - } else { - var upath = this.findExtraFieldUnicodePath(); - if (upath !== null) { - this.fileName = upath; - } - var ucomment = this.findExtraFieldUnicodeComment(); - if (ucomment !== null) { - this.fileComment = ucomment; - } - } - }, - - /** - * Find the unicode path declared in the extra field, if any. - * @return {String} the unicode path, null otherwise. - */ - findExtraFieldUnicodePath: function() { - var upathField = this.extraFields[0x7075]; - if (upathField) { - var extraReader = new StringReader(upathField.value); - - // wrong version - if (extraReader.readInt(1) !== 1) { - return null; - } - - // the crc of the filename changed, this field is out of date. - if (jszipProto.crc32(this.fileName) !== extraReader.readInt(4)) { - return null; - } - - return jszipProto.utf8decode(extraReader.readString(upathField.length - 5)); - } - return null; - }, - - /** - * Find the unicode comment declared in the extra field, if any. - * @return {String} the unicode comment, null otherwise. - */ - findExtraFieldUnicodeComment: function() { - var ucommentField = this.extraFields[0x6375]; - if (ucommentField) { - var extraReader = new StringReader(ucommentField.value); - - // wrong version - if (extraReader.readInt(1) !== 1) { - return null; - } - - // the crc of the comment changed, this field is out of date. - if (jszipProto.crc32(this.fileComment) !== extraReader.readInt(4)) { - return null; - } - - return jszipProto.utf8decode(extraReader.readString(ucommentField.length - 5)); - } - return null; - } -}; -module.exports = ZipEntry; diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/Gruntfile.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/Gruntfile.js deleted file mode 100644 index 2db1138f4..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/Gruntfile.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; - - -module.exports = function(grunt) { - var browsers = [{ - browserName: 'iphone', - platform: 'OS X 10.8', - version: '8.1' - }, { - browserName: 'android', - platform: 'Linux', - version: '5.0' - }, { - browserName: 'firefox', - platform: 'XP', - version: '35' - }, { - browserName: 'chrome', - platform: 'XP', - version: '41' - }, { - browserName: 'internet explorer', - platform: 'WIN7', - version: '11' - }, { - browserName: 'internet explorer', - platform: 'WIN7', - version: '10' - }, { - browserName: 'internet explorer', - platform: 'WIN7', - version: '9' - }, {/* - browserName: 'internet explorer', - platform: 'WIN7', - version: '8' - }, { - browserName: 'internet explorer', - platform: 'XP', - version: '7' - }, {*/ - browserName: 'safari', - platform: 'OS X 10.8', - version: '6' - }]; - - - grunt.initConfig({ - connect: { - server: { - options: { - base: '', - port: 9999 - } - } - }, - 'saucelabs-mocha': { - all: { - options: { - urls: ['http://127.0.0.1:9999/test/browser/test.html'], - build: process.env.TRAVIS_JOB_NUMBER || ('local' + ~~(Math.random()*1000)), - browsers: browsers, - throttled: 3, - testname: process.env.SAUCE_PROJ || 'mocha tests' - } - } - }, - watch: {} - }); - - // Loading dependencies - for (var key in grunt.file.readJSON('package.json').devDependencies) { - if (key !== 'grunt' && key.indexOf('grunt') === 0) { grunt.loadNpmTasks(key); } - } - - //grunt.registerTask('dev', ['connect', 'watch']); - grunt.registerTask('test', ['connect', 'saucelabs-mocha']); -}; diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/HISTORY.md b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/HISTORY.md deleted file mode 100644 index b05c9dc63..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/HISTORY.md +++ /dev/null @@ -1,62 +0,0 @@ -0.2.7 / 2015-06-09 ------------------- - -- Added Z_SYNC_FLUSH support. Thanks to @TinoLange. - - -0.2.6 / 2015-03-24 ------------------- - -- Allow ArrayBuffer input. - - -0.2.5 / 2014-07-19 ------------------- - -- Workaround for Chrome 38.0.2096.0 script parser bug, #30. - - -0.2.4 / 2014-07-07 ------------------- - -- Fixed bug in inflate wrapper, #29 - - -0.2.3 / 2014-06-09 ------------------- - -- Maintenance release, dependencies update. - - -0.2.2 / 2014-06-04 ------------------- - -- Fixed iOS 5.1 Safary issue with `apply(typed_array)`, #26. - - -0.2.1 / 2014-05-01 ------------------- - -- Fixed collision on switch dynamic/fixed tables. - - -0.2.0 / 2014-04-18 ------------------- - -- Added custom gzip headers support. -- Added strings support. -- Improved memory allocations for small chunks. -- ZStream properties rename/cleanup. -- More coverage tests. - - -0.1.1 / 2014-03-20 ------------------- - -- Bugfixes for inflate/deflate. - - -0.1.0 / 2014-03-15 ------------------- - -- First release. diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/LICENSE b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/LICENSE deleted file mode 100644 index e6c9e5a5e..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -(The MIT License) - -Copyright (C) 2014 by Vitaly Puzrin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/README.md b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/README.md deleted file mode 100644 index 98d1d8e44..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/README.md +++ /dev/null @@ -1,171 +0,0 @@ -pako - zlib port to javascript, very fast! -========================================== - -[![Build Status](https://travis-ci.org/nodeca/pako.svg?branch=master)](https://travis-ci.org/nodeca/pako) -[![NPM version](https://img.shields.io/npm/v/pako.svg)](https://www.npmjs.org/package/pako) - -__Why pako is cool:__ - -- Almost as fast in modern JS engines as C implementation (see benchmarks). -- Works in browsers, you can browserify any separate component. -- Chunking support for big blobs. -- Results are binary equal to well known [zlib](http://www.zlib.net/) (now v1.2.8 ported). - -This project was done to understand how fast JS can be and is it necessary to -develop native C modules for CPU-intensive tasks. Enjoy the result! - - -__Famous projects, using pako:__ - -- [browserify](http://browserify.org/) (via [browserify-zlib](https://github.com/devongovett/browserify-zlib)) -- [JSZip](http://stuk.github.io/jszip/) -- [mincer](https://github.com/nodeca/mincer) -- [JS-Git](https://github.com/creationix/js-git) and - [Tedit](https://chrome.google.com/webstore/detail/tedit-development-environ/ooekdijbnbbjdfjocaiflnjgoohnblgf) - by [@creatronix](https://github.com/creationix) - - -__Benchmarks:__ - -``` -node v0.10.26, 1mb sample: - - deflate-dankogai x 4.73 ops/sec ±0.82% (15 runs sampled) - deflate-gildas x 4.58 ops/sec ±2.33% (15 runs sampled) - deflate-imaya x 3.22 ops/sec ±3.95% (12 runs sampled) - ! deflate-pako x 6.99 ops/sec ±0.51% (21 runs sampled) - deflate-pako-string x 5.89 ops/sec ±0.77% (18 runs sampled) - deflate-pako-untyped x 4.39 ops/sec ±1.58% (14 runs sampled) - * deflate-zlib x 14.71 ops/sec ±4.23% (59 runs sampled) - inflate-dankogai x 32.16 ops/sec ±0.13% (56 runs sampled) - inflate-imaya x 30.35 ops/sec ±0.92% (53 runs sampled) - ! inflate-pako x 69.89 ops/sec ±1.46% (71 runs sampled) - inflate-pako-string x 19.22 ops/sec ±1.86% (49 runs sampled) - inflate-pako-untyped x 17.19 ops/sec ±0.85% (32 runs sampled) - * inflate-zlib x 70.03 ops/sec ±1.64% (81 runs sampled) - -node v0.11.12, 1mb sample: - - deflate-dankogai x 5.60 ops/sec ±0.49% (17 runs sampled) - deflate-gildas x 5.06 ops/sec ±6.00% (16 runs sampled) - deflate-imaya x 3.52 ops/sec ±3.71% (13 runs sampled) - ! deflate-pako x 11.52 ops/sec ±0.22% (32 runs sampled) - deflate-pako-string x 9.53 ops/sec ±1.12% (27 runs sampled) - deflate-pako-untyped x 5.44 ops/sec ±0.72% (17 runs sampled) - * deflate-zlib x 14.05 ops/sec ±3.34% (63 runs sampled) - inflate-dankogai x 42.19 ops/sec ±0.09% (56 runs sampled) - inflate-imaya x 79.68 ops/sec ±1.07% (68 runs sampled) - ! inflate-pako x 97.52 ops/sec ±0.83% (80 runs sampled) - inflate-pako-string x 45.19 ops/sec ±1.69% (57 runs sampled) - inflate-pako-untyped x 24.35 ops/sec ±2.59% (40 runs sampled) - * inflate-zlib x 60.32 ops/sec ±1.36% (69 runs sampled) -``` - -zlib's test is partialy afferted by marshling (that make sense for inflate only). -You can change deflate level to 0 in benchmark source, to investigate details. -For deflate level 6 results can be considered as correct. - -__Install:__ - -node.js: - -``` -npm install pako -``` - -browser: - -``` -bower install pako -``` - - -Example & API -------------- - -Full docs - http://nodeca.github.io/pako/ - -```javascript -var pako = require('pako'); - -// Deflate -// -var input = new Uint8Array(); -//... fill input data here -var output = pako.deflate(input); - -// Inflate (simple wrapper can throw exception on broken stream) -// -var compressed = new Uint8Array(); -//... fill data to uncompress here -try { - var result = pako.inflate(compressed); -} catch (err) { - console.log(err); -} - -// -// Alternate interface for chunking & without exceptions -// - -var inflator = new pako.Inflate(); - -inflator.push(chunk1, false); -inflator.push(chunk2, false); -... -inflator.push(chunkN, true); // true -> last chunk - -if (inflator.err) { - console.log(inflator.msg); -} - -var output = inflator.result; - -``` - -Sometime you can wish to work with strings. For example, to send -big objects as json to server. Pako detects input data type. You can -force output to be string with option `{ to: 'string' }`. - -```javascript -var pako = require('pako'); - -var test = { my: 'super', puper: [456, 567], awesome: 'pako' }; - -var binaryString = pako.deflate(JSON.stringify(test), { to: 'string' }); - -// -// Here you can do base64 encode, make xhr requests and so on. -// - -var restored = JSON.parse(pako.inflate(binaryString, { to: 'string' })); -``` - - -Notes ------ - -Pako does not contain some specific zlib functions: - -- __deflate__ - methods `deflateCopy`, `deflateBound`, `deflateParams`, - `deflatePending`, `deflatePrime`, `deflateSetDictionary`, `deflateTune`. -- __inflate__ - `inflateGetDictionary`, `inflateCopy`, `inflateMark`, - `inflatePrime`, `inflateSetDictionary`, `inflateSync`, `inflateSyncPoint`, - `inflateUndermine`. - - -Authors -------- - -- Andrey Tupitsin [@anrd83](https://github.com/andr83) -- Vitaly Puzrin [@puzrin](https://github.com/puzrin) - -Personal thanks to Vyacheslav Egorov ([@mraleph](https://github.com/mraleph)) -for his awesome tutoruals about optimising JS code for v8, -[IRHydra](http://mrale.ph/irhydra/) tool and his advices. - - -License -------- - -MIT diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/bower.json b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/bower.json deleted file mode 100644 index f07874747..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/bower.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "pako", - "main": "dist/pako.js", - "homepage": "https://github.com/nodeca/pako", - "authors": [ - "Andrei Tuputcyn ", - "Vitaly Puzrin " - ], - "description": "deflate / inflate / gzip for bworser - very fast zlib port", - "keywords": ["zlib", "deflate", "inflate", "gzip"], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "Makefile", - "index*", - "lib", - "benchmark", - "coverage" - ] -} diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako.js deleted file mode 100644 index 9e563d526..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako.js +++ /dev/null @@ -1,6411 +0,0 @@ -/* pako 0.2.7 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o Array - * - * Chunks of output data, if [[Deflate#onData]] not overriden. - **/ - -/** - * Deflate.result -> Uint8Array|Array - * - * Compressed result, generated by default [[Deflate#onData]] - * and [[Deflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Deflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Deflate.err -> Number - * - * Error code after deflate finished. 0 (Z_OK) on success. - * You will not need it in real life, because deflate errors - * are possible only on wrong options or bad `onData` / `onEnd` - * custom handlers. - **/ - -/** - * Deflate.msg -> String - * - * Error message, if [[Deflate.err]] != 0 - **/ - - -/** - * new Deflate(options) - * - options (Object): zlib deflate options. - * - * Creates new deflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `level` - * - `windowBits` - * - `memLevel` - * - `strategy` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw deflate - * - `gzip` (Boolean) - create gzip wrapper - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - `header` (Object) - custom header for gzip - * - `text` (Boolean) - true if compressed data believed to be text - * - `time` (Number) - modification time, unix timestamp - * - `os` (Number) - operation system code - * - `extra` (Array) - array of bytes with extra data (max 65536) - * - `name` (String) - file name (binary string) - * - `comment` (String) - comment (binary string) - * - `hcrc` (Boolean) - true if header crc should be added - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var deflate = new pako.Deflate({ level: 3}); - * - * deflate.push(chunk1, false); - * deflate.push(chunk2, true); // true -> last chunk - * - * if (deflate.err) { throw new Error(deflate.err); } - * - * console.log(deflate.result); - * ``` - **/ -var Deflate = function(options) { - - this.options = utils.assign({ - level: Z_DEFAULT_COMPRESSION, - method: Z_DEFLATED, - chunkSize: 16384, - windowBits: 15, - memLevel: 8, - strategy: Z_DEFAULT_STRATEGY, - to: '' - }, options || {}); - - var opt = this.options; - - if (opt.raw && (opt.windowBits > 0)) { - opt.windowBits = -opt.windowBits; - } - - else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { - opt.windowBits += 16; - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new zstream(); - this.strm.avail_out = 0; - - var status = zlib_deflate.deflateInit2( - this.strm, - opt.level, - opt.method, - opt.windowBits, - opt.memLevel, - opt.strategy - ); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - if (opt.header) { - zlib_deflate.deflateSetHeader(this.strm, opt.header); - } -}; - -/** - * Deflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be - * converted to utf8 byte sequence. - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH. - * - * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with - * new compressed chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the compression context. - * - * On fail call [[Deflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * array format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Deflate.prototype.push = function(data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - - if (this.ended) { return false; } - - _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // If we need to compress text, change encoding to utf8. - strm.input = strings.string2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ - - if (status !== Z_STREAM_END && status !== Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { - if (this.options.to === 'string') { - this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); - - // Finalize on the last chunk. - if (_mode === Z_FINISH) { - status = zlib_deflate.deflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === Z_SYNC_FLUSH) { - this.onEnd(Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Deflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): ouput data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Deflate.prototype.onData = function(chunk) { - this.chunks.push(chunk); -}; - - -/** - * Deflate#onEnd(status) -> Void - * - status (Number): deflate status. 0 (Z_OK) on success, - * other if not. - * - * Called once after you tell deflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Deflate.prototype.onEnd = function(status) { - // On success - join - if (status === Z_OK) { - if (this.options.to === 'string') { - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * deflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * Compress `data` with deflate alrorythm and `options`. - * - * Supported options are: - * - * - level - * - windowBits - * - memLevel - * - strategy - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); - * - * console.log(pako.deflate(data)); - * ``` - **/ -function deflate(input, options) { - var deflator = new Deflate(options); - - deflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (deflator.err) { throw deflator.msg; } - - return deflator.result; -} - - -/** - * deflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function deflateRaw(input, options) { - options = options || {}; - options.raw = true; - return deflate(input, options); -} - - -/** - * gzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but create gzip wrapper instead of - * deflate one. - **/ -function gzip(input, options) { - options = options || {}; - options.gzip = true; - return deflate(input, options); -} - - -exports.Deflate = Deflate; -exports.deflate = deflate; -exports.deflateRaw = deflateRaw; -exports.gzip = gzip; - -},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate.js":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(require,module,exports){ -'use strict'; - - -var zlib_inflate = require('./zlib/inflate.js'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var c = require('./zlib/constants'); -var msg = require('./zlib/messages'); -var zstream = require('./zlib/zstream'); -var gzheader = require('./zlib/gzheader'); - -var toString = Object.prototype.toString; - -/** - * class Inflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[inflate]] - * and [[inflateRaw]]. - **/ - -/* internal - * inflate.chunks -> Array - * - * Chunks of output data, if [[Inflate#onData]] not overriden. - **/ - -/** - * Inflate.result -> Uint8Array|Array|String - * - * Uncompressed result, generated by default [[Inflate#onData]] - * and [[Inflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Inflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Inflate.err -> Number - * - * Error code after inflate finished. 0 (Z_OK) on success. - * Should be checked if broken data possible. - **/ - -/** - * Inflate.msg -> String - * - * Error message, if [[Inflate.err]] != 0 - **/ - - -/** - * new Inflate(options) - * - options (Object): zlib inflate options. - * - * Creates new inflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `windowBits` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw inflate - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * By default, when no options set, autodetect deflate/gzip data format via - * wrapper header. - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var inflate = new pako.Inflate({ level: 3}); - * - * inflate.push(chunk1, false); - * inflate.push(chunk2, true); // true -> last chunk - * - * if (inflate.err) { throw new Error(inflate.err); } - * - * console.log(inflate.result); - * ``` - **/ -var Inflate = function(options) { - - this.options = utils.assign({ - chunkSize: 16384, - windowBits: 0, - to: '' - }, options || {}); - - var opt = this.options; - - // Force window size for `raw` data, if not set directly, - // because we have no header for autodetect. - if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { - opt.windowBits = -opt.windowBits; - if (opt.windowBits === 0) { opt.windowBits = -15; } - } - - // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate - if ((opt.windowBits >= 0) && (opt.windowBits < 16) && - !(options && options.windowBits)) { - opt.windowBits += 32; - } - - // Gzip header has no info about windows size, we can do autodetect only - // for deflate. So, if window size not set, force it to max when gzip possible - if ((opt.windowBits > 15) && (opt.windowBits < 48)) { - // bit 3 (16) -> gzipped data - // bit 4 (32) -> autodetect gzip/deflate - if ((opt.windowBits & 15) === 0) { - opt.windowBits |= 15; - } - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new zstream(); - this.strm.avail_out = 0; - - var status = zlib_inflate.inflateInit2( - this.strm, - opt.windowBits - ); - - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - - this.header = new gzheader(); - - zlib_inflate.inflateGetHeader(this.strm, this.header); -}; - -/** - * Inflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH. - * - * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with - * new output chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the decompression context. - * - * On fail call [[Inflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Inflate.prototype.push = function(data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - var next_out_utf8, tail, utf8str; - - if (this.ended) { return false; } - _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // Only binary strings can be decompressed on practice - strm.input = strings.binstring2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - - status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ - - if (status !== c.Z_STREAM_END && status !== c.Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - - if (strm.next_out) { - if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { - - if (this.options.to === 'string') { - - next_out_utf8 = strings.utf8border(strm.output, strm.next_out); - - tail = strm.next_out - next_out_utf8; - utf8str = strings.buf2string(strm.output, next_out_utf8); - - // move tail - strm.next_out = tail; - strm.avail_out = chunkSize - tail; - if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } - - this.onData(utf8str); - - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } - } while ((strm.avail_in > 0) && status !== c.Z_STREAM_END); - - if (status === c.Z_STREAM_END) { - _mode = c.Z_FINISH; - } - - // Finalize on the last chunk. - if (_mode === c.Z_FINISH) { - status = zlib_inflate.inflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === c.Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === c.Z_SYNC_FLUSH) { - this.onEnd(c.Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Inflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): ouput data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Inflate.prototype.onData = function(chunk) { - this.chunks.push(chunk); -}; - - -/** - * Inflate#onEnd(status) -> Void - * - status (Number): inflate status. 0 (Z_OK) on success, - * other if not. - * - * Called either after you tell inflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Inflate.prototype.onEnd = function(status) { - // On success - join - if (status === c.Z_OK) { - if (this.options.to === 'string') { - // Glue & convert here, until we teach pako to send - // utf8 alligned strings to onData - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * inflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Decompress `data` with inflate/ungzip and `options`. Autodetect - * format via wrapper header by default. That's why we don't provide - * separate `ungzip` method. - * - * Supported options are: - * - * - windowBits - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) - * , output; - * - * try { - * output = pako.inflate(input); - * } catch (err) - * console.log(err); - * } - * ``` - **/ -function inflate(input, options) { - var inflator = new Inflate(options); - - inflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (inflator.err) { throw inflator.msg; } - - return inflator.result; -} - - -/** - * inflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * The same as [[inflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function inflateRaw(input, options) { - options = options || {}; - options.raw = true; - return inflate(input, options); -} - - -/** - * ungzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Just shortcut to [[inflate]], because it autodetects format - * by header.content. Done for convenience. - **/ - - -exports.Inflate = Inflate; -exports.inflate = inflate; -exports.inflateRaw = inflateRaw; -exports.ungzip = inflate; - -},{"./utils/common":3,"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate.js":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(require,module,exports){ -'use strict'; - - -var TYPED_OK = (typeof Uint8Array !== 'undefined') && - (typeof Uint16Array !== 'undefined') && - (typeof Int32Array !== 'undefined'); - - -exports.assign = function (obj /*from1, from2, from3, ...*/) { - var sources = Array.prototype.slice.call(arguments, 1); - while (sources.length) { - var source = sources.shift(); - if (!source) { continue; } - - if (typeof source !== 'object') { - throw new TypeError(source + 'must be non-object'); - } - - for (var p in source) { - if (source.hasOwnProperty(p)) { - obj[p] = source[p]; - } - } - } - - return obj; -}; - - -// reduce buffer size, avoiding mem copy -exports.shrinkBuf = function (buf, size) { - if (buf.length === size) { return buf; } - if (buf.subarray) { return buf.subarray(0, size); } - buf.length = size; - return buf; -}; - - -var fnTyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - if (src.subarray && dest.subarray) { - dest.set(src.subarray(src_offs, src_offs+len), dest_offs); - return; - } - // Fallback to ordinary array - for (var i=0; i= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254]=_utf8len[254]=1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) { - c2 = str.charCodeAt(m_pos+1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i=0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) { - c2 = str.charCodeAt(m_pos+1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // use fallback for big arrays to avoid stack overflow - if (len < 65537) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i=0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function(buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function(str) { - var buf = new utils.Buf8(str.length); - for (var i=0, len=buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len*2); - - for (out=0, i=0; i 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function(buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max-1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Fuckup - very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means vuffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; - -},{"./common":3}],5:[function(require,module,exports){ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It doesn't worth to make additional optimizationa as in original. -// Small size is preferable. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; - -},{}],6:[function(require,module,exports){ -module.exports = { - - /* Allowed flush values; see deflate() and inflate() below for details */ - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_TREES: 6, - - /* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - //Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - //Z_VERSION_ERROR: -6, - - /* compression levels */ - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - - - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - - /* Possible values of the data_type field (though see inflate()) */ - Z_BINARY: 0, - Z_TEXT: 1, - //Z_ASCII: 1, // = Z_TEXT (deprecated) - Z_UNKNOWN: 2, - - /* The deflate compression method */ - Z_DEFLATED: 8 - //Z_NULL: null // Use -1 or null inline, depending on var type -}; - -},{}],7:[function(require,module,exports){ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n =0; n < 256; n++) { - c = n; - for (var k =0; k < 8; k++) { - c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc = crc ^ (-1); - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; - -},{}],8:[function(require,module,exports){ -'use strict'; - -var utils = require('../utils/common'); -var trees = require('./trees'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var msg = require('./messages'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -var Z_NO_FLUSH = 0; -var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -//var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -//var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -//var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - - -/* compression levels */ -//var Z_NO_COMPRESSION = 0; -//var Z_BEST_SPEED = 1; -//var Z_BEST_COMPRESSION = 9; -var Z_DEFAULT_COMPRESSION = -1; - - -var Z_FILTERED = 1; -var Z_HUFFMAN_ONLY = 2; -var Z_RLE = 3; -var Z_FIXED = 4; -var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -//var Z_BINARY = 0; -//var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - - -/* The deflate compression method */ -var Z_DEFLATED = 8; - -/*============================================================================*/ - - -var MAX_MEM_LEVEL = 9; -/* Maximum value for memLevel in deflateInit2 */ -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_MEM_LEVEL = 8; - - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ -var LITERALS = 256; -/* number of literal bytes 0..255 */ -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ -var D_CODES = 30; -/* number of distance codes */ -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ -var HEAP_SIZE = 2*L_CODES + 1; -/* maximum heap size */ -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); - -var PRESET_DICT = 0x20; - -var INIT_STATE = 42; -var EXTRA_STATE = 69; -var NAME_STATE = 73; -var COMMENT_STATE = 91; -var HCRC_STATE = 103; -var BUSY_STATE = 113; -var FINISH_STATE = 666; - -var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ -var BS_BLOCK_DONE = 2; /* block flush performed */ -var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ -var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ - -var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. - -function err(strm, errorCode) { - strm.msg = msg[errorCode]; - return errorCode; -} - -function rank(f) { - return ((f) << 1) - ((f) > 4 ? 9 : 0); -} - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->output buffer and copying into it. - * (See also read_buf()). - */ -function flush_pending(strm) { - var s = strm.state; - - //_tr_flush_bits(s); - var len = s.pending; - if (len > strm.avail_out) { - len = strm.avail_out; - } - if (len === 0) { return; } - - utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); - strm.next_out += len; - s.pending_out += len; - strm.total_out += len; - strm.avail_out -= len; - s.pending -= len; - if (s.pending === 0) { - s.pending_out = 0; - } -} - - -function flush_block_only (s, last) { - trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); - s.block_start = s.strstart; - flush_pending(s.strm); -} - - -function put_byte(s, b) { - s.pending_buf[s.pending++] = b; -} - - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. - */ -function putShortMSB(s, b) { -// put_byte(s, (Byte)(b >> 8)); -// put_byte(s, (Byte)(b & 0xff)); - s.pending_buf[s.pending++] = (b >>> 8) & 0xff; - s.pending_buf[s.pending++] = b & 0xff; -} - - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->input buffer and copying from it. - * (See also flush_pending()). - */ -function read_buf(strm, buf, start, size) { - var len = strm.avail_in; - - if (len > size) { len = size; } - if (len === 0) { return 0; } - - strm.avail_in -= len; - - utils.arraySet(buf, strm.input, strm.next_in, len, start); - if (strm.state.wrap === 1) { - strm.adler = adler32(strm.adler, buf, len, start); - } - - else if (strm.state.wrap === 2) { - strm.adler = crc32(strm.adler, buf, len, start); - } - - strm.next_in += len; - strm.total_in += len; - - return len; -} - - -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. - */ -function longest_match(s, cur_match) { - var chain_length = s.max_chain_length; /* max hash chain length */ - var scan = s.strstart; /* current string */ - var match; /* matched string */ - var len; /* length of current match */ - var best_len = s.prev_length; /* best match length so far */ - var nice_match = s.nice_match; /* stop if match long enough */ - var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? - s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; - - var _win = s.window; // shortcut - - var wmask = s.w_mask; - var prev = s.prev; - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - - var strend = s.strstart + MAX_MATCH; - var scan_end1 = _win[scan + best_len - 1]; - var scan_end = _win[scan + best_len]; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s.prev_length >= s.good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if (nice_match > s.lookahead) { nice_match = s.lookahead; } - - // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - do { - // Assert(cur_match < s->strstart, "no future"); - match = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2. Note that the checks below - * for insufficient lookahead only occur occasionally for performance - * reasons. Therefore uninitialized memory will be accessed, and - * conditional jumps will be made that depend on those values. - * However the length of the match is limited to the lookahead, so - * the output of deflate is not affected by the uninitialized values. - */ - - if (_win[match + best_len] !== scan_end || - _win[match + best_len - 1] !== scan_end1 || - _win[match] !== _win[scan] || - _win[++match] !== _win[scan + 1]) { - continue; - } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2; - match++; - // Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - /*jshint noempty:false*/ - } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - scan < strend); - - // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - - if (len > best_len) { - s.match_start = cur_match; - best_len = len; - if (len >= nice_match) { - break; - } - scan_end1 = _win[scan + best_len - 1]; - scan_end = _win[scan + best_len]; - } - } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); - - if (best_len <= s.lookahead) { - return best_len; - } - return s.lookahead; -} - - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -function fill_window(s) { - var _w_size = s.w_size; - var p, n, m, more, str; - - //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = s.window_size - s.lookahead - s.strstart; - - // JS ints have 32 bit, block below not needed - /* Deal with !@#$% 64K limit: */ - //if (sizeof(int) <= 2) { - // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - // more = wsize; - // - // } else if (more == (unsigned)(-1)) { - // /* Very unlikely, but possible on 16 bit machine if - // * strstart == 0 && lookahead == 1 (input done a byte at time) - // */ - // more--; - // } - //} - - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { - - utils.arraySet(s.window, s.window, _w_size, _w_size, 0); - s.match_start -= _w_size; - s.strstart -= _w_size; - /* we now have strstart >= MAX_DIST */ - s.block_start -= _w_size; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - - n = s.hash_size; - p = n; - do { - m = s.head[--p]; - s.head[p] = (m >= _w_size ? m - _w_size : 0); - } while (--n); - - n = _w_size; - p = n; - do { - m = s.prev[--p]; - s.prev[p] = (m >= _w_size ? m - _w_size : 0); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); - - more += _w_size; - } - if (s.strm.avail_in === 0) { - break; - } - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - //Assert(more >= 2, "more < 2"); - n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); - s.lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s.lookahead + s.insert >= MIN_MATCH) { - str = s.strstart - s.insert; - s.ins_h = s.window[str]; - - /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; -//#if MIN_MATCH != 3 -// Call update_hash() MIN_MATCH-3 more times -//#endif - while (s.insert) { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH-1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = str; - str++; - s.insert--; - if (s.lookahead + s.insert < MIN_MATCH) { - break; - } - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ -// if (s.high_water < s.window_size) { -// var curr = s.strstart + s.lookahead; -// var init = 0; -// -// if (s.high_water < curr) { -// /* Previous high water mark below current data -- zero WIN_INIT -// * bytes or up to end of window, whichever is less. -// */ -// init = s.window_size - curr; -// if (init > WIN_INIT) -// init = WIN_INIT; -// zmemzero(s->window + curr, (unsigned)init); -// s->high_water = curr + init; -// } -// else if (s->high_water < (ulg)curr + WIN_INIT) { -// /* High water mark at or above current data, but below current data -// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up -// * to end of window, whichever is less. -// */ -// init = (ulg)curr + WIN_INIT - s->high_water; -// if (init > s->window_size - s->high_water) -// init = s->window_size - s->high_water; -// zmemzero(s->window + s->high_water, (unsigned)init); -// s->high_water += init; -// } -// } -// -// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, -// "not enough room for search"); -} - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. - */ -function deflate_stored(s, flush) { - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: - */ - var max_block_size = 0xffff; - - if (max_block_size > s.pending_buf_size - 5) { - max_block_size = s.pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s.lookahead <= 1) { - - //Assert(s->strstart < s->w_size+MAX_DIST(s) || - // s->block_start >= (long)s->w_size, "slide too late"); -// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || -// s.block_start >= s.w_size)) { -// throw new Error("slide too late"); -// } - - fill_window(s); - if (s.lookahead === 0 && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - - if (s.lookahead === 0) { - break; - } - /* flush the current block */ - } - //Assert(s->block_start >= 0L, "block gone"); -// if (s.block_start < 0) throw new Error("block gone"); - - s.strstart += s.lookahead; - s.lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - var max_start = s.block_start + max_block_size; - - if (s.strstart === 0 || s.strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s.lookahead = s.strstart - max_start; - s.strstart = max_start; - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - - - } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: - */ - if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - - s.insert = 0; - - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - - if (s.strstart > s.block_start) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_NEED_MORE; -} - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ -function deflate_fast(s, flush) { - var hash_head; /* head of the hash chain */ - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; /* flush the current block */ - } - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - } - if (s.match_length >= MIN_MATCH) { - // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only - - /*** _tr_tally_dist(s, s.strstart - s.match_start, - s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { - s.match_length--; /* string at strstart already in table */ - do { - s.strstart++; - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s.match_length !== 0); - s.strstart++; - } else - { - s.strstart += s.match_length; - s.match_length = 0; - s.ins_h = s.window[s.strstart]; - /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; - -//#if MIN_MATCH != 3 -// Call UPDATE_HASH() MIN_MATCH-3 more times -//#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s.window[s.strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = ((s.strstart < (MIN_MATCH-1)) ? s.strstart : MIN_MATCH-1); - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ -function deflate_slow(s, flush) { - var hash_head; /* head of hash chain */ - var bflush; /* set if current block must be flushed */ - - var max_insert; - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - */ - s.prev_length = s.match_length; - s.prev_match = s.match_start; - s.match_length = MIN_MATCH-1; - - if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && - s.strstart - hash_head <= (s.w_size-MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - - if (s.match_length <= 5 && - (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s.match_length = MIN_MATCH-1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { - max_insert = s.strstart + s.lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - //check_match(s, s.strstart-1, s.prev_match, s.prev_length); - - /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, - s.prev_length - MIN_MATCH, bflush);***/ - bflush = trees._tr_tally(s, s.strstart - 1- s.prev_match, s.prev_length - MIN_MATCH); - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s.lookahead -= s.prev_length-1; - s.prev_length -= 2; - do { - if (++s.strstart <= max_insert) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - } while (--s.prev_length !== 0); - s.match_available = 0; - s.match_length = MIN_MATCH-1; - s.strstart++; - - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - } else if (s.match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart-1]); - - if (bflush) { - /*** FLUSH_BLOCK_ONLY(s, 0) ***/ - flush_block_only(s, false); - /***/ - } - s.strstart++; - s.lookahead--; - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s.match_available = 1; - s.strstart++; - s.lookahead--; - } - } - //Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s.match_available) { - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart-1]); - - s.match_available = 0; - } - s.insert = s.strstart < MIN_MATCH-1 ? s.strstart : MIN_MATCH-1; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_BLOCK_DONE; -} - - -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) - */ -function deflate_rle(s, flush) { - var bflush; /* set if current block must be flushed */ - var prev; /* byte at distance one to match */ - var scan, strend; /* scan goes up to strend for length of run */ - - var _win = s.window; - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s.lookahead <= MAX_MATCH) { - fill_window(s); - if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s.match_length = 0; - if (s.lookahead >= MIN_MATCH && s.strstart > 0) { - scan = s.strstart - 1; - prev = _win[scan]; - if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { - strend = s.strstart + MAX_MATCH; - do { - /*jshint noempty:false*/ - } while (prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - scan < strend); - s.match_length = MAX_MATCH - (strend - scan); - if (s.match_length > s.lookahead) { - s.match_length = s.lookahead; - } - } - //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s.match_length >= MIN_MATCH) { - //check_match(s, s.strstart, s.strstart - 1, s.match_length); - - /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - s.strstart += s.match_length; - s.match_length = 0; - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -function deflate_huff(s, flush) { - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s.lookahead === 0) { - fill_window(s); - if (s.lookahead === 0) { - if (flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s.match_length = 0; - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - s.lookahead--; - s.strstart++; - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ -var Config = function (good_length, max_lazy, nice_length, max_chain, func) { - this.good_length = good_length; - this.max_lazy = max_lazy; - this.nice_length = nice_length; - this.max_chain = max_chain; - this.func = func; -}; - -var configuration_table; - -configuration_table = [ - /* good lazy nice chain */ - new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ - new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ - new Config(4, 5, 16, 8, deflate_fast), /* 2 */ - new Config(4, 6, 32, 32, deflate_fast), /* 3 */ - - new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ - new Config(8, 16, 32, 32, deflate_slow), /* 5 */ - new Config(8, 16, 128, 128, deflate_slow), /* 6 */ - new Config(8, 32, 128, 256, deflate_slow), /* 7 */ - new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ - new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ -]; - - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -function lm_init(s) { - s.window_size = 2 * s.w_size; - - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - - /* Set the default configuration parameters: - */ - s.max_lazy_match = configuration_table[s.level].max_lazy; - s.good_match = configuration_table[s.level].good_length; - s.nice_match = configuration_table[s.level].nice_length; - s.max_chain_length = configuration_table[s.level].max_chain; - - s.strstart = 0; - s.block_start = 0; - s.lookahead = 0; - s.insert = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - s.ins_h = 0; -} - - -function DeflateState() { - this.strm = null; /* pointer back to this zlib stream */ - this.status = 0; /* as the name implies */ - this.pending_buf = null; /* output still pending */ - this.pending_buf_size = 0; /* size of pending_buf */ - this.pending_out = 0; /* next pending byte to output to the stream */ - this.pending = 0; /* nb of bytes in the pending buffer */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.gzhead = null; /* gzip header information to write */ - this.gzindex = 0; /* where in extra, name, or comment */ - this.method = Z_DEFLATED; /* can only be DEFLATED */ - this.last_flush = -1; /* value of flush param for previous deflate call */ - - this.w_size = 0; /* LZ77 window size (32K by default) */ - this.w_bits = 0; /* log2(w_size) (8..16) */ - this.w_mask = 0; /* w_size - 1 */ - - this.window = null; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. - */ - - this.window_size = 0; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - this.prev = null; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - this.head = null; /* Heads of the hash chains or NIL. */ - - this.ins_h = 0; /* hash index of string to be inserted */ - this.hash_size = 0; /* number of elements in hash table */ - this.hash_bits = 0; /* log2(hash_size) */ - this.hash_mask = 0; /* hash_size-1 */ - - this.hash_shift = 0; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - this.block_start = 0; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - this.match_length = 0; /* length of best match */ - this.prev_match = 0; /* previous match */ - this.match_available = 0; /* set if previous match exists */ - this.strstart = 0; /* start of string to insert */ - this.match_start = 0; /* start of matching string */ - this.lookahead = 0; /* number of valid bytes ahead in window */ - - this.prev_length = 0; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - this.max_chain_length = 0; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - this.max_lazy_match = 0; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ - // That's alias to max_lazy_match, don't use directly - //this.max_insert_length = 0; - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - this.level = 0; /* compression level (1..9) */ - this.strategy = 0; /* favor or force Huffman coding*/ - - this.good_match = 0; - /* Use a faster search when the previous match is longer than this */ - - this.nice_match = 0; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - - /* Didn't use ct_data typedef below to suppress compiler warning */ - - // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - // Use flat array of DOUBLE size, with interleaved fata, - // because JS does not support effective - this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); - this.dyn_dtree = new utils.Buf16((2*D_CODES+1) * 2); - this.bl_tree = new utils.Buf16((2*BL_CODES+1) * 2); - zero(this.dyn_ltree); - zero(this.dyn_dtree); - zero(this.bl_tree); - - this.l_desc = null; /* desc. for literal tree */ - this.d_desc = null; /* desc. for distance tree */ - this.bl_desc = null; /* desc. for bit length tree */ - - //ush bl_count[MAX_BITS+1]; - this.bl_count = new utils.Buf16(MAX_BITS+1); - /* number of codes at each bit length for an optimal tree */ - - //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - this.heap = new utils.Buf16(2*L_CODES+1); /* heap used to build the Huffman trees */ - zero(this.heap); - - this.heap_len = 0; /* number of elements in the heap */ - this.heap_max = 0; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - this.depth = new utils.Buf16(2*L_CODES+1); //uch depth[2*L_CODES+1]; - zero(this.depth); - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - this.l_buf = 0; /* buffer index for literals or lengths */ - - this.lit_bufsize = 0; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - this.last_lit = 0; /* running index in l_buf */ - - this.d_buf = 0; - /* Buffer index for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - this.opt_len = 0; /* bit length of current block with optimal trees */ - this.static_len = 0; /* bit length of current block with static trees */ - this.matches = 0; /* number of string matches in current block */ - this.insert = 0; /* bytes at end of window left to insert */ - - - this.bi_buf = 0; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - this.bi_valid = 0; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - - // Used for window memory init. We safely ignore it for JS. That makes - // sense only for pointers and memory check tools. - //this.high_water = 0; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ -} - - -function deflateResetKeep(strm) { - var s; - - if (!strm || !strm.state) { - return err(strm, Z_STREAM_ERROR); - } - - strm.total_in = strm.total_out = 0; - strm.data_type = Z_UNKNOWN; - - s = strm.state; - s.pending = 0; - s.pending_out = 0; - - if (s.wrap < 0) { - s.wrap = -s.wrap; - /* was made negative by deflate(..., Z_FINISH); */ - } - s.status = (s.wrap ? INIT_STATE : BUSY_STATE); - strm.adler = (s.wrap === 2) ? - 0 // crc32(0, Z_NULL, 0) - : - 1; // adler32(0, Z_NULL, 0) - s.last_flush = Z_NO_FLUSH; - trees._tr_init(s); - return Z_OK; -} - - -function deflateReset(strm) { - var ret = deflateResetKeep(strm); - if (ret === Z_OK) { - lm_init(strm.state); - } - return ret; -} - - -function deflateSetHeader(strm, head) { - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } - strm.state.gzhead = head; - return Z_OK; -} - - -function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { - if (!strm) { // === Z_NULL - return Z_STREAM_ERROR; - } - var wrap = 1; - - if (level === Z_DEFAULT_COMPRESSION) { - level = 6; - } - - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; - windowBits = -windowBits; - } - - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ - windowBits -= 16; - } - - - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { - return err(strm, Z_STREAM_ERROR); - } - - - if (windowBits === 8) { - windowBits = 9; - } - /* until 256-byte window bug fixed */ - - var s = new DeflateState(); - - strm.state = s; - s.strm = strm; - - s.wrap = wrap; - s.gzhead = null; - s.w_bits = windowBits; - s.w_size = 1 << s.w_bits; - s.w_mask = s.w_size - 1; - - s.hash_bits = memLevel + 7; - s.hash_size = 1 << s.hash_bits; - s.hash_mask = s.hash_size - 1; - s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); - - s.window = new utils.Buf8(s.w_size * 2); - s.head = new utils.Buf16(s.hash_size); - s.prev = new utils.Buf16(s.w_size); - - // Don't need mem init magic for JS. - //s.high_water = 0; /* nothing written to s->window yet */ - - s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - - s.pending_buf_size = s.lit_bufsize * 4; - s.pending_buf = new utils.Buf8(s.pending_buf_size); - - s.d_buf = s.lit_bufsize >> 1; - s.l_buf = (1 + 2) * s.lit_bufsize; - - s.level = level; - s.strategy = strategy; - s.method = method; - - return deflateReset(strm); -} - -function deflateInit(strm, level) { - return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); -} - - -function deflate(strm, flush) { - var old_flush, s; - var beg, val; // for gzip header write only - - if (!strm || !strm.state || - flush > Z_BLOCK || flush < 0) { - return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; - } - - s = strm.state; - - if (!strm.output || - (!strm.input && strm.avail_in !== 0) || - (s.status === FINISH_STATE && flush !== Z_FINISH)) { - return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); - } - - s.strm = strm; /* just in case */ - old_flush = s.last_flush; - s.last_flush = flush; - - /* Write the header */ - if (s.status === INIT_STATE) { - - if (s.wrap === 2) { // GZIP header - strm.adler = 0; //crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (!s.gzhead) { // s->gzhead == Z_NULL - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s.status = BUSY_STATE; - } - else { - put_byte(s, (s.gzhead.text ? 1 : 0) + - (s.gzhead.hcrc ? 2 : 0) + - (!s.gzhead.extra ? 0 : 4) + - (!s.gzhead.name ? 0 : 8) + - (!s.gzhead.comment ? 0 : 16) - ); - put_byte(s, s.gzhead.time & 0xff); - put_byte(s, (s.gzhead.time >> 8) & 0xff); - put_byte(s, (s.gzhead.time >> 16) & 0xff); - put_byte(s, (s.gzhead.time >> 24) & 0xff); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, s.gzhead.os & 0xff); - if (s.gzhead.extra && s.gzhead.extra.length) { - put_byte(s, s.gzhead.extra.length & 0xff); - put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); - } - if (s.gzhead.hcrc) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); - } - s.gzindex = 0; - s.status = EXTRA_STATE; - } - } - else // DEFLATE header - { - var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; - var level_flags = -1; - - if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { - level_flags = 0; - } else if (s.level < 6) { - level_flags = 1; - } else if (s.level === 6) { - level_flags = 2; - } else { - level_flags = 3; - } - header |= (level_flags << 6); - if (s.strstart !== 0) { header |= PRESET_DICT; } - header += 31 - (header % 31); - - s.status = BUSY_STATE; - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s.strstart !== 0) { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - strm.adler = 1; // adler32(0L, Z_NULL, 0); - } - } - -//#ifdef GZIP - if (s.status === EXTRA_STATE) { - if (s.gzhead.extra/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - - while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - break; - } - } - put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); - s.gzindex++; - } - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (s.gzindex === s.gzhead.extra.length) { - s.gzindex = 0; - s.status = NAME_STATE; - } - } - else { - s.status = NAME_STATE; - } - } - if (s.status === NAME_STATE) { - if (s.gzhead.name/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.name.length) { - val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.gzindex = 0; - s.status = COMMENT_STATE; - } - } - else { - s.status = COMMENT_STATE; - } - } - if (s.status === COMMENT_STATE) { - if (s.gzhead.comment/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.comment.length) { - val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.status = HCRC_STATE; - } - } - else { - s.status = HCRC_STATE; - } - } - if (s.status === HCRC_STATE) { - if (s.gzhead.hcrc) { - if (s.pending + 2 > s.pending_buf_size) { - flush_pending(strm); - } - if (s.pending + 2 <= s.pending_buf_size) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - strm.adler = 0; //crc32(0L, Z_NULL, 0); - s.status = BUSY_STATE; - } - } - else { - s.status = BUSY_STATE; - } - } -//#endif - - /* Flush as much pending output as possible */ - if (s.pending !== 0) { - flush_pending(strm); - if (strm.avail_out === 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s.last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUF_ERROR. - */ - } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && - flush !== Z_FINISH) { - return err(strm, Z_BUF_ERROR); - } - - /* User must not provide more input after the first FINISH: */ - if (s.status === FINISH_STATE && strm.avail_in !== 0) { - return err(strm, Z_BUF_ERROR); - } - - /* Start a new block or continue the current one. - */ - if (strm.avail_in !== 0 || s.lookahead !== 0 || - (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { - var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : - (s.strategy === Z_RLE ? deflate_rle(s, flush) : - configuration_table[s.level].func(s, flush)); - - if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { - s.status = FINISH_STATE; - } - if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { - if (strm.avail_out === 0) { - s.last_flush = -1; - /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate === BS_BLOCK_DONE) { - if (flush === Z_PARTIAL_FLUSH) { - trees._tr_align(s); - } - else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ - - trees._tr_stored_block(s, 0, 0, false); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush === Z_FULL_FLUSH) { - /*** CLEAR_HASH(s); ***/ /* forget history */ - zero(s.head); // Fill with NIL (= 0); - - if (s.lookahead === 0) { - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - } - } - flush_pending(strm); - if (strm.avail_out === 0) { - s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - //Assert(strm->avail_out > 0, "bug2"); - //if (strm.avail_out <= 0) { throw new Error("bug2");} - - if (flush !== Z_FINISH) { return Z_OK; } - if (s.wrap <= 0) { return Z_STREAM_END; } - - /* Write the trailer */ - if (s.wrap === 2) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - put_byte(s, (strm.adler >> 16) & 0xff); - put_byte(s, (strm.adler >> 24) & 0xff); - put_byte(s, strm.total_in & 0xff); - put_byte(s, (strm.total_in >> 8) & 0xff); - put_byte(s, (strm.total_in >> 16) & 0xff); - put_byte(s, (strm.total_in >> 24) & 0xff); - } - else - { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - if (s.wrap > 0) { s.wrap = -s.wrap; } - /* write the trailer only once! */ - return s.pending !== 0 ? Z_OK : Z_STREAM_END; -} - -function deflateEnd(strm) { - var status; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - status = strm.state.status; - if (status !== INIT_STATE && - status !== EXTRA_STATE && - status !== NAME_STATE && - status !== COMMENT_STATE && - status !== HCRC_STATE && - status !== BUSY_STATE && - status !== FINISH_STATE - ) { - return err(strm, Z_STREAM_ERROR); - } - - strm.state = null; - - return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; -} - -/* ========================================================================= - * Copy the source state to the destination state - */ -//function deflateCopy(dest, source) { -// -//} - -exports.deflateInit = deflateInit; -exports.deflateInit2 = deflateInit2; -exports.deflateReset = deflateReset; -exports.deflateResetKeep = deflateResetKeep; -exports.deflateSetHeader = deflateSetHeader; -exports.deflate = deflate; -exports.deflateEnd = deflateEnd; -exports.deflateInfo = 'pako deflate (from Nodeca project)'; - -/* Not implemented -exports.deflateBound = deflateBound; -exports.deflateCopy = deflateCopy; -exports.deflateSetDictionary = deflateSetDictionary; -exports.deflateParams = deflateParams; -exports.deflatePending = deflatePending; -exports.deflatePrime = deflatePrime; -exports.deflateTune = deflateTune; -*/ - -},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,"./trees":14}],9:[function(require,module,exports){ -'use strict'; - - -function GZheader() { - /* true if compressed data believed to be text */ - this.text = 0; - /* modification time */ - this.time = 0; - /* extra flags (not used when writing a gzip file) */ - this.xflags = 0; - /* operating system */ - this.os = 0; - /* pointer to extra field or Z_NULL if none */ - this.extra = null; - /* extra field length (valid if extra != Z_NULL) */ - this.extra_len = 0; // Actually, we don't need it in JS, - // but leave for few code modifications - - // - // Setup limits is not necessary because in js we should not preallocate memory - // for inflate use constant limit in 65536 bytes - // - - /* space at extra (only when reading header) */ - // this.extra_max = 0; - /* pointer to zero-terminated file name or Z_NULL */ - this.name = ''; - /* space at name (only when reading header) */ - // this.name_max = 0; - /* pointer to zero-terminated comment or Z_NULL */ - this.comment = ''; - /* space at comment (only when reading header) */ - // this.comm_max = 0; - /* true if there was or will be a header crc */ - this.hcrc = 0; - /* true when done reading gzip header (not used when writing a gzip file) */ - this.done = false; -} - -module.exports = GZheader; - -},{}],10:[function(require,module,exports){ -'use strict'; - -// See state defs from inflate.js -var BAD = 30; /* got a data error -- remain here until reset */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state.mode === LEN - strm.avail_in >= 6 - strm.avail_out >= 258 - start >= strm.avail_out - state.bits < 8 - - On return, state.mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm.avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm.avail_out >= 258 for each loop to avoid checking for - output space. - */ -module.exports = function inflate_fast(strm, start) { - var state; - var _in; /* local strm.input */ - var last; /* have enough input while in < last */ - var _out; /* local strm.output */ - var beg; /* inflate()'s initial strm.output */ - var end; /* while out < end, enough space available */ -//#ifdef INFLATE_STRICT - var dmax; /* maximum distance from zlib header */ -//#endif - var wsize; /* window size or zero if not using window */ - var whave; /* valid bytes in the window */ - var wnext; /* window write index */ - var window; /* allocated sliding window, if wsize != 0 */ - var hold; /* local strm.hold */ - var bits; /* local strm.bits */ - var lcode; /* local strm.lencode */ - var dcode; /* local strm.distcode */ - var lmask; /* mask for first level of length codes */ - var dmask; /* mask for first level of distance codes */ - var here; /* retrieved table entry */ - var op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - var len; /* match length, unused bytes */ - var dist; /* match distance */ - var from; /* where to copy match from */ - var from_source; - - - var input, output; // JS specific, because we have no pointers - - /* copy state to local variables */ - state = strm.state; - //here = state.here; - _in = strm.next_in; - input = strm.input; - last = _in + (strm.avail_in - 5); - _out = strm.next_out; - output = strm.output; - beg = _out - (start - strm.avail_out); - end = _out + (strm.avail_out - 257); -//#ifdef INFLATE_STRICT - dmax = state.dmax; -//#endif - wsize = state.wsize; - whave = state.whave; - wnext = state.wnext; - window = state.window; - hold = state.hold; - bits = state.bits; - lcode = state.lencode; - dcode = state.distcode; - lmask = (1 << state.lenbits) - 1; - dmask = (1 << state.distbits) - 1; - - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - - top: - do { - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - - here = lcode[hold & lmask]; - - dolen: - for (;;) { // Goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - if (op === 0) { /* literal */ - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - output[_out++] = here & 0xffff/*here.val*/; - } - else if (op & 16) { /* length base */ - len = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - len += hold & ((1 << op) - 1); - hold >>>= op; - bits -= op; - } - //Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - here = dcode[hold & dmask]; - - dodist: - for (;;) { // goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - - if (op & 16) { /* distance base */ - dist = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - } - dist += hold & ((1 << op) - 1); -//#ifdef INFLATE_STRICT - if (dist > dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } -//#endif - hold >>>= op; - bits -= op; - //Tracevv((stderr, "inflate: distance %u\n", dist)); - op = _out - beg; /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } - -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// if (len <= op - whave) { -// do { -// output[_out++] = 0; -// } while (--len); -// continue top; -// } -// len -= op - whave; -// do { -// output[_out++] = 0; -// } while (--op > whave); -// if (op === 0) { -// from = _out - dist; -// do { -// output[_out++] = output[from++]; -// } while (--len); -// continue top; -// } -//#endif - } - from = 0; // window index - from_source = window; - if (wnext === 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - else if (wnext < op) { /* wrap around window */ - from += wsize + wnext - op; - op -= wnext; - if (op < len) { /* some from end of window */ - len -= op; - do { - output[_out++] = window[from++]; - } while (--op); - from = 0; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - output[_out++] = window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - while (len > 2) { - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - len -= 3; - } - if (len) { - output[_out++] = from_source[from++]; - if (len > 1) { - output[_out++] = from_source[from++]; - } - } - } - else { - from = _out - dist; /* copy direct from output */ - do { /* minimum length is three */ - output[_out++] = output[from++]; - output[_out++] = output[from++]; - output[_out++] = output[from++]; - len -= 3; - } while (len > 2); - if (len) { - output[_out++] = output[from++]; - if (len > 1) { - output[_out++] = output[from++]; - } - } - } - } - else if ((op & 64) === 0) { /* 2nd level distance code */ - here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dodist; - } - else { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } - else if ((op & 64) === 0) { /* 2nd level length code */ - here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dolen; - } - else if (op & 32) { /* end-of-block */ - //Tracevv((stderr, "inflate: end of block\n")); - state.mode = TYPE; - break top; - } - else { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } while (_in < last && _out < end); - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - _in -= len; - bits -= len << 3; - hold &= (1 << bits) - 1; - - /* update state and return */ - strm.next_in = _in; - strm.next_out = _out; - strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); - strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); - state.hold = hold; - state.bits = bits; - return; -}; - -},{}],11:[function(require,module,exports){ -'use strict'; - - -var utils = require('../utils/common'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var inflate_fast = require('./inffast'); -var inflate_table = require('./inftrees'); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -//var Z_NO_FLUSH = 0; -//var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -//var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - -/* The deflate compression method */ -var Z_DEFLATED = 8; - - -/* STATES ====================================================================*/ -/* ===========================================================================*/ - - -var HEAD = 1; /* i: waiting for magic header */ -var FLAGS = 2; /* i: waiting for method and flags (gzip) */ -var TIME = 3; /* i: waiting for modification time (gzip) */ -var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ -var EXLEN = 5; /* i: waiting for extra length (gzip) */ -var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ -var NAME = 7; /* i: waiting for end of file name (gzip) */ -var COMMENT = 8; /* i: waiting for end of comment (gzip) */ -var HCRC = 9; /* i: waiting for header crc (gzip) */ -var DICTID = 10; /* i: waiting for dictionary check value */ -var DICT = 11; /* waiting for inflateSetDictionary() call */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ -var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ -var STORED = 14; /* i: waiting for stored size (length and complement) */ -var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ -var COPY = 16; /* i/o: waiting for input or output to copy stored block */ -var TABLE = 17; /* i: waiting for dynamic block table lengths */ -var LENLENS = 18; /* i: waiting for code length code lengths */ -var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ -var LEN_ = 20; /* i: same as LEN below, but only first time in */ -var LEN = 21; /* i: waiting for length/lit/eob code */ -var LENEXT = 22; /* i: waiting for length extra bits */ -var DIST = 23; /* i: waiting for distance code */ -var DISTEXT = 24; /* i: waiting for distance extra bits */ -var MATCH = 25; /* o: waiting for output space to copy string */ -var LIT = 26; /* o: waiting for output space to write literal */ -var CHECK = 27; /* i: waiting for 32-bit check value */ -var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ -var DONE = 29; /* finished check, done -- remain here until reset */ -var BAD = 30; /* got a data error -- remain here until reset */ -var MEM = 31; /* got an inflate() memory error -- remain here until reset */ -var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ - -/* ===========================================================================*/ - - - -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_WBITS = MAX_WBITS; - - -function ZSWAP32(q) { - return (((q >>> 24) & 0xff) + - ((q >>> 8) & 0xff00) + - ((q & 0xff00) << 8) + - ((q & 0xff) << 24)); -} - - -function InflateState() { - this.mode = 0; /* current inflate mode */ - this.last = false; /* true if processing last block */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.havedict = false; /* true if dictionary provided */ - this.flags = 0; /* gzip header method and flags (0 if zlib) */ - this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ - this.check = 0; /* protected copy of check value */ - this.total = 0; /* protected copy of output count */ - // TODO: may be {} - this.head = null; /* where to save gzip header information */ - - /* sliding window */ - this.wbits = 0; /* log base 2 of requested window size */ - this.wsize = 0; /* window size or zero if not using window */ - this.whave = 0; /* valid bytes in the window */ - this.wnext = 0; /* window write index */ - this.window = null; /* allocated sliding window, if needed */ - - /* bit accumulator */ - this.hold = 0; /* input bit accumulator */ - this.bits = 0; /* number of bits in "in" */ - - /* for string and stored block copying */ - this.length = 0; /* literal or length of data to copy */ - this.offset = 0; /* distance back to copy string from */ - - /* for table and code decoding */ - this.extra = 0; /* extra bits needed */ - - /* fixed and dynamic code tables */ - this.lencode = null; /* starting table for length/literal codes */ - this.distcode = null; /* starting table for distance codes */ - this.lenbits = 0; /* index bits for lencode */ - this.distbits = 0; /* index bits for distcode */ - - /* dynamic table building */ - this.ncode = 0; /* number of code length code lengths */ - this.nlen = 0; /* number of length code lengths */ - this.ndist = 0; /* number of distance code lengths */ - this.have = 0; /* number of code lengths in lens[] */ - this.next = null; /* next available space in codes[] */ - - this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ - this.work = new utils.Buf16(288); /* work area for code table building */ - - /* - because we don't have pointers in js, we use lencode and distcode directly - as buffers so we don't need codes - */ - //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ - this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ - this.distdyn = null; /* dynamic table for distance codes (JS specific) */ - this.sane = 0; /* if false, allow invalid distance too far */ - this.back = 0; /* bits back of last unprocessed length/lit */ - this.was = 0; /* initial length of match */ -} - -function inflateResetKeep(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - strm.total_in = strm.total_out = state.total = 0; - strm.msg = ''; /*Z_NULL*/ - if (state.wrap) { /* to support ill-conceived Java test suite */ - strm.adler = state.wrap & 1; - } - state.mode = HEAD; - state.last = 0; - state.havedict = 0; - state.dmax = 32768; - state.head = null/*Z_NULL*/; - state.hold = 0; - state.bits = 0; - //state.lencode = state.distcode = state.next = state.codes; - state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); - state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); - - state.sane = 1; - state.back = -1; - //Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - -function inflateReset(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - state.wsize = 0; - state.whave = 0; - state.wnext = 0; - return inflateResetKeep(strm); - -} - -function inflateReset2(strm, windowBits) { - var wrap; - var state; - - /* get the state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - - /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } - else { - wrap = (windowBits >> 4) + 1; - if (windowBits < 48) { - windowBits &= 15; - } - } - - /* set number of window bits, free window if different */ - if (windowBits && (windowBits < 8 || windowBits > 15)) { - return Z_STREAM_ERROR; - } - if (state.window !== null && state.wbits !== windowBits) { - state.window = null; - } - - /* update state and reset the rest of it */ - state.wrap = wrap; - state.wbits = windowBits; - return inflateReset(strm); -} - -function inflateInit2(strm, windowBits) { - var ret; - var state; - - if (!strm) { return Z_STREAM_ERROR; } - //strm.msg = Z_NULL; /* in case we return an error */ - - state = new InflateState(); - - //if (state === Z_NULL) return Z_MEM_ERROR; - //Tracev((stderr, "inflate: allocated\n")); - strm.state = state; - state.window = null/*Z_NULL*/; - ret = inflateReset2(strm, windowBits); - if (ret !== Z_OK) { - strm.state = null/*Z_NULL*/; - } - return ret; -} - -function inflateInit(strm) { - return inflateInit2(strm, DEF_WBITS); -} - - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -var virgin = true; - -var lenfix, distfix; // We have no pointers in JS, so keep tables separate - -function fixedtables(state) { - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - var sym; - - lenfix = new utils.Buf32(512); - distfix = new utils.Buf32(32); - - /* literal/length table */ - sym = 0; - while (sym < 144) { state.lens[sym++] = 8; } - while (sym < 256) { state.lens[sym++] = 9; } - while (sym < 280) { state.lens[sym++] = 7; } - while (sym < 288) { state.lens[sym++] = 8; } - - inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, {bits: 9}); - - /* distance table */ - sym = 0; - while (sym < 32) { state.lens[sym++] = 5; } - - inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, {bits: 5}); - - /* do this just once */ - virgin = false; - } - - state.lencode = lenfix; - state.lenbits = 9; - state.distcode = distfix; - state.distbits = 5; -} - - -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. If window does not exist yet, create it. This is only called - when a window is already in use, or when output has been written during this - inflate call, but the end of the deflate stream has not been reached yet. - It is also called to create a window for dictionary data when a dictionary - is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -function updatewindow(strm, src, end, copy) { - var dist; - var state = strm.state; - - /* if it hasn't been done already, allocate space for the window */ - if (state.window === null) { - state.wsize = 1 << state.wbits; - state.wnext = 0; - state.whave = 0; - - state.window = new utils.Buf8(state.wsize); - } - - /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state.wsize) { - utils.arraySet(state.window,src, end - state.wsize, state.wsize, 0); - state.wnext = 0; - state.whave = state.wsize; - } - else { - dist = state.wsize - state.wnext; - if (dist > copy) { - dist = copy; - } - //zmemcpy(state->window + state->wnext, end - copy, dist); - utils.arraySet(state.window,src, end - copy, dist, state.wnext); - copy -= dist; - if (copy) { - //zmemcpy(state->window, end - copy, copy); - utils.arraySet(state.window,src, end - copy, copy, 0); - state.wnext = copy; - state.whave = state.wsize; - } - else { - state.wnext += dist; - if (state.wnext === state.wsize) { state.wnext = 0; } - if (state.whave < state.wsize) { state.whave += dist; } - } - } - return 0; -} - -function inflate(strm, flush) { - var state; - var input, output; // input/output buffers - var next; /* next input INDEX */ - var put; /* next output INDEX */ - var have, left; /* available input and output */ - var hold; /* bit buffer */ - var bits; /* bits in bit buffer */ - var _in, _out; /* save starting available input and output */ - var copy; /* number of stored or match bytes to copy */ - var from; /* where to copy match bytes from */ - var from_source; - var here = 0; /* current decoding table entry */ - var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) - //var last; /* parent table entry */ - var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) - var len; /* length to copy for repeats, bits to drop */ - var ret; /* return code */ - var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ - var opts; - - var n; // temporary var for NEED_BITS - - var order = /* permutation of code lengths */ - [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - - - if (!strm || !strm.state || !strm.output || - (!strm.input && strm.avail_in !== 0)) { - return Z_STREAM_ERROR; - } - - state = strm.state; - if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ - - - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - _in = have; - _out = left; - ret = Z_OK; - - inf_leave: // goto emulation - for (;;) { - switch (state.mode) { - case HEAD: - if (state.wrap === 0) { - state.mode = TYPEDO; - break; - } - //=== NEEDBITS(16); - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ - state.check = 0/*crc32(0L, Z_NULL, 0)*/; - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = FLAGS; - break; - } - state.flags = 0; /* expect zlib header */ - if (state.head) { - state.head.done = false; - } - if (!(state.wrap & 1) || /* check if zlib header allowed */ - (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { - strm.msg = 'incorrect header check'; - state.mode = BAD; - break; - } - if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// - len = (hold & 0x0f)/*BITS(4)*/ + 8; - if (state.wbits === 0) { - state.wbits = len; - } - else if (len > state.wbits) { - strm.msg = 'invalid window size'; - state.mode = BAD; - break; - } - state.dmax = 1 << len; - //Tracev((stderr, "inflate: zlib header ok\n")); - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = hold & 0x200 ? DICTID : TYPE; - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - break; - case FLAGS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.flags = hold; - if ((state.flags & 0xff) !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - if (state.flags & 0xe000) { - strm.msg = 'unknown header flags set'; - state.mode = BAD; - break; - } - if (state.head) { - state.head.text = ((hold >> 8) & 1); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = TIME; - /* falls through */ - case TIME: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.time = hold; - } - if (state.flags & 0x0200) { - //=== CRC4(state.check, hold) - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - hbuf[2] = (hold >>> 16) & 0xff; - hbuf[3] = (hold >>> 24) & 0xff; - state.check = crc32(state.check, hbuf, 4, 0); - //=== - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = OS; - /* falls through */ - case OS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.xflags = (hold & 0xff); - state.head.os = (hold >> 8); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = EXLEN; - /* falls through */ - case EXLEN: - if (state.flags & 0x0400) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length = hold; - if (state.head) { - state.head.extra_len = hold; - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - else if (state.head) { - state.head.extra = null/*Z_NULL*/; - } - state.mode = EXTRA; - /* falls through */ - case EXTRA: - if (state.flags & 0x0400) { - copy = state.length; - if (copy > have) { copy = have; } - if (copy) { - if (state.head) { - len = state.head.extra_len - state.length; - if (!state.head.extra) { - // Use untyped array for more conveniend processing later - state.head.extra = new Array(state.head.extra_len); - } - utils.arraySet( - state.head.extra, - input, - next, - // extra field is limited to 65536 bytes - // - no need for additional size check - copy, - /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ - len - ); - //zmemcpy(state.head.extra + len, next, - // len + copy > state.head.extra_max ? - // state.head.extra_max - len : copy); - } - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - state.length -= copy; - } - if (state.length) { break inf_leave; } - } - state.length = 0; - state.mode = NAME; - /* falls through */ - case NAME: - if (state.flags & 0x0800) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - // TODO: 2 or 1 bytes? - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.name_max*/)) { - state.head.name += String.fromCharCode(len); - } - } while (len && copy < have); - - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.name = null; - } - state.length = 0; - state.mode = COMMENT; - /* falls through */ - case COMMENT: - if (state.flags & 0x1000) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.comm_max*/)) { - state.head.comment += String.fromCharCode(len); - } - } while (len && copy < have); - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.comment = null; - } - state.mode = HCRC; - /* falls through */ - case HCRC: - if (state.flags & 0x0200) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.check & 0xffff)) { - strm.msg = 'header crc mismatch'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - if (state.head) { - state.head.hcrc = ((state.flags >> 9) & 1); - state.head.done = true; - } - strm.adler = state.check = 0 /*crc32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - break; - case DICTID: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - strm.adler = state.check = ZSWAP32(hold); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = DICT; - /* falls through */ - case DICT: - if (state.havedict === 0) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - return Z_NEED_DICT; - } - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - /* falls through */ - case TYPE: - if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } - /* falls through */ - case TYPEDO: - if (state.last) { - //--- BYTEBITS() ---// - hold >>>= bits & 7; - bits -= bits & 7; - //---// - state.mode = CHECK; - break; - } - //=== NEEDBITS(3); */ - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.last = (hold & 0x01)/*BITS(1)*/; - //--- DROPBITS(1) ---// - hold >>>= 1; - bits -= 1; - //---// - - switch ((hold & 0x03)/*BITS(2)*/) { - case 0: /* stored block */ - //Tracev((stderr, "inflate: stored block%s\n", - // state.last ? " (last)" : "")); - state.mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - //Tracev((stderr, "inflate: fixed codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = LEN_; /* decode codes */ - if (flush === Z_TREES) { - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break inf_leave; - } - break; - case 2: /* dynamic block */ - //Tracev((stderr, "inflate: dynamic codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = TABLE; - break; - case 3: - strm.msg = 'invalid block type'; - state.mode = BAD; - } - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break; - case STORED: - //--- BYTEBITS() ---// /* go to byte boundary */ - hold >>>= bits & 7; - bits -= bits & 7; - //---// - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { - strm.msg = 'invalid stored block lengths'; - state.mode = BAD; - break; - } - state.length = hold & 0xffff; - //Tracev((stderr, "inflate: stored length %u\n", - // state.length)); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = COPY_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case COPY_: - state.mode = COPY; - /* falls through */ - case COPY: - copy = state.length; - if (copy) { - if (copy > have) { copy = have; } - if (copy > left) { copy = left; } - if (copy === 0) { break inf_leave; } - //--- zmemcpy(put, next, copy); --- - utils.arraySet(output, input, next, copy, put); - //---// - have -= copy; - next += copy; - left -= copy; - put += copy; - state.length -= copy; - break; - } - //Tracev((stderr, "inflate: stored end\n")); - state.mode = TYPE; - break; - case TABLE: - //=== NEEDBITS(14); */ - while (bits < 14) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// -//#ifndef PKZIP_BUG_WORKAROUND - if (state.nlen > 286 || state.ndist > 30) { - strm.msg = 'too many length or distance symbols'; - state.mode = BAD; - break; - } -//#endif - //Tracev((stderr, "inflate: table sizes ok\n")); - state.have = 0; - state.mode = LENLENS; - /* falls through */ - case LENLENS: - while (state.have < state.ncode) { - //=== NEEDBITS(3); - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - while (state.have < 19) { - state.lens[order[state.have++]] = 0; - } - // We have separate tables & no pointers. 2 commented lines below not needed. - //state.next = state.codes; - //state.lencode = state.next; - // Switch to use dynamic table - state.lencode = state.lendyn; - state.lenbits = 7; - - opts = {bits: state.lenbits}; - ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); - state.lenbits = opts.bits; - - if (ret) { - strm.msg = 'invalid code lengths set'; - state.mode = BAD; - break; - } - //Tracev((stderr, "inflate: code lengths ok\n")); - state.have = 0; - state.mode = CODELENS; - /* falls through */ - case CODELENS: - while (state.have < state.nlen + state.ndist) { - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_val < 16) { - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.lens[state.have++] = here_val; - } - else { - if (here_val === 16) { - //=== NEEDBITS(here.bits + 2); - n = here_bits + 2; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - if (state.have === 0) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - len = state.lens[state.have - 1]; - copy = 3 + (hold & 0x03);//BITS(2); - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - } - else if (here_val === 17) { - //=== NEEDBITS(here.bits + 3); - n = here_bits + 3; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 3 + (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - else { - //=== NEEDBITS(here.bits + 7); - n = here_bits + 7; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 11 + (hold & 0x7f);//BITS(7); - //--- DROPBITS(7) ---// - hold >>>= 7; - bits -= 7; - //---// - } - if (state.have + copy > state.nlen + state.ndist) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - while (copy--) { - state.lens[state.have++] = len; - } - } - } - - /* handle error breaks in while */ - if (state.mode === BAD) { break; } - - /* check for end-of-block code (better have one) */ - if (state.lens[256] === 0) { - strm.msg = 'invalid code -- missing end-of-block'; - state.mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state.lenbits = 9; - - opts = {bits: state.lenbits}; - ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.lenbits = opts.bits; - // state.lencode = state.next; - - if (ret) { - strm.msg = 'invalid literal/lengths set'; - state.mode = BAD; - break; - } - - state.distbits = 6; - //state.distcode.copy(state.codes); - // Switch to use dynamic table - state.distcode = state.distdyn; - opts = {bits: state.distbits}; - ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.distbits = opts.bits; - // state.distcode = state.next; - - if (ret) { - strm.msg = 'invalid distances set'; - state.mode = BAD; - break; - } - //Tracev((stderr, 'inflate: codes ok\n')); - state.mode = LEN_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case LEN_: - state.mode = LEN; - /* falls through */ - case LEN: - if (have >= 6 && left >= 258) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - inflate_fast(strm, _out); - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - if (state.mode === TYPE) { - state.back = -1; - } - break; - } - state.back = 0; - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) -1)]; /*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if (here_bits <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_op && (here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.lencode[last_val + - ((hold & ((1 << (last_bits + last_op)) -1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - state.length = here_val; - if (here_op === 0) { - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - state.mode = LIT; - break; - } - if (here_op & 32) { - //Tracevv((stderr, "inflate: end of block\n")); - state.back = -1; - state.mode = TYPE; - break; - } - if (here_op & 64) { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break; - } - state.extra = here_op & 15; - state.mode = LENEXT; - /* falls through */ - case LENEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length += hold & ((1 << state.extra) -1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } - //Tracevv((stderr, "inflate: length %u\n", state.length)); - state.was = state.length; - state.mode = DIST; - /* falls through */ - case DIST: - for (;;) { - here = state.distcode[hold & ((1 << state.distbits) -1)];/*BITS(state.distbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if ((here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.distcode[last_val + - ((hold & ((1 << (last_bits + last_op)) -1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - if (here_op & 64) { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break; - } - state.offset = here_val; - state.extra = (here_op) & 15; - state.mode = DISTEXT; - /* falls through */ - case DISTEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.offset += hold & ((1 << state.extra) -1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } -//#ifdef INFLATE_STRICT - if (state.offset > state.dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -//#endif - //Tracevv((stderr, "inflate: distance %u\n", state.offset)); - state.mode = MATCH; - /* falls through */ - case MATCH: - if (left === 0) { break inf_leave; } - copy = _out - left; - if (state.offset > copy) { /* copy from window */ - copy = state.offset - copy; - if (copy > state.whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// Trace((stderr, "inflate.c too far\n")); -// copy -= state.whave; -// if (copy > state.length) { copy = state.length; } -// if (copy > left) { copy = left; } -// left -= copy; -// state.length -= copy; -// do { -// output[put++] = 0; -// } while (--copy); -// if (state.length === 0) { state.mode = LEN; } -// break; -//#endif - } - if (copy > state.wnext) { - copy -= state.wnext; - from = state.wsize - copy; - } - else { - from = state.wnext - copy; - } - if (copy > state.length) { copy = state.length; } - from_source = state.window; - } - else { /* copy from output */ - from_source = output; - from = put - state.offset; - copy = state.length; - } - if (copy > left) { copy = left; } - left -= copy; - state.length -= copy; - do { - output[put++] = from_source[from++]; - } while (--copy); - if (state.length === 0) { state.mode = LEN; } - break; - case LIT: - if (left === 0) { break inf_leave; } - output[put++] = state.length; - left--; - state.mode = LEN; - break; - case CHECK: - if (state.wrap) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - // Use '|' insdead of '+' to make sure that result is signed - hold |= input[next++] << bits; - bits += 8; - } - //===// - _out -= left; - strm.total_out += _out; - state.total += _out; - if (_out) { - strm.adler = state.check = - /*UPDATE(state.check, put - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); - - } - _out = left; - // NB: crc32 stored as signed 32-bit int, ZSWAP32 returns signed too - if ((state.flags ? hold : ZSWAP32(hold)) !== state.check) { - strm.msg = 'incorrect data check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: check matches trailer\n")); - } - state.mode = LENGTH; - /* falls through */ - case LENGTH: - if (state.wrap && state.flags) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.total & 0xffffffff)) { - strm.msg = 'incorrect length check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: length matches trailer\n")); - } - state.mode = DONE; - /* falls through */ - case DONE: - ret = Z_STREAM_END; - break inf_leave; - case BAD: - ret = Z_DATA_ERROR; - break inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - /* falls through */ - default: - return Z_STREAM_ERROR; - } - } - - // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" - - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call updatewindow() to create and/or update the window state. - Note: a memory error from inflate() is non-recoverable. - */ - - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - - if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && - (state.mode < CHECK || flush !== Z_FINISH))) { - if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { - state.mode = MEM; - return Z_MEM_ERROR; - } - } - _in -= strm.avail_in; - _out -= strm.avail_out; - strm.total_in += _in; - strm.total_out += _out; - state.total += _out; - if (state.wrap && _out) { - strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); - } - strm.data_type = state.bits + (state.last ? 64 : 0) + - (state.mode === TYPE ? 128 : 0) + - (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); - if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { - ret = Z_BUF_ERROR; - } - return ret; -} - -function inflateEnd(strm) { - - if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { - return Z_STREAM_ERROR; - } - - var state = strm.state; - if (state.window) { - state.window = null; - } - strm.state = null; - return Z_OK; -} - -function inflateGetHeader(strm, head) { - var state; - - /* check state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } - - /* save header structure */ - state.head = head; - head.done = false; - return Z_OK; -} - - -exports.inflateReset = inflateReset; -exports.inflateReset2 = inflateReset2; -exports.inflateResetKeep = inflateResetKeep; -exports.inflateInit = inflateInit; -exports.inflateInit2 = inflateInit2; -exports.inflate = inflate; -exports.inflateEnd = inflateEnd; -exports.inflateGetHeader = inflateGetHeader; -exports.inflateInfo = 'pako inflate (from Nodeca project)'; - -/* Not implemented -exports.inflateCopy = inflateCopy; -exports.inflateGetDictionary = inflateGetDictionary; -exports.inflateMark = inflateMark; -exports.inflatePrime = inflatePrime; -exports.inflateSetDictionary = inflateSetDictionary; -exports.inflateSync = inflateSync; -exports.inflateSyncPoint = inflateSyncPoint; -exports.inflateUndermine = inflateUndermine; -*/ - -},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(require,module,exports){ -'use strict'; - - -var utils = require('../utils/common'); - -var MAXBITS = 15; -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -var lbase = [ /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 -]; - -var lext = [ /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 -]; - -var dbase = [ /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0 -]; - -var dext = [ /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64 -]; - -module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) -{ - var bits = opts.bits; - //here = opts.here; /* table entry for duplication */ - - var len = 0; /* a code's length in bits */ - var sym = 0; /* index of code symbols */ - var min = 0, max = 0; /* minimum and maximum code lengths */ - var root = 0; /* number of index bits for root table */ - var curr = 0; /* number of index bits for current table */ - var drop = 0; /* code bits to drop for sub-table */ - var left = 0; /* number of prefix codes available */ - var used = 0; /* code entries in table used */ - var huff = 0; /* Huffman code */ - var incr; /* for incrementing code, index */ - var fill; /* index for replicating entries */ - var low; /* low bits for current root entry */ - var mask; /* mask for low root bits */ - var next; /* next available space in table */ - var base = null; /* base value table to use */ - var base_index = 0; -// var shoextra; /* extra bits table to use */ - var end; /* use base and extra for symbol > end */ - var count = new utils.Buf16(MAXBITS+1); //[MAXBITS+1]; /* number of codes of each length */ - var offs = new utils.Buf16(MAXBITS+1); //[MAXBITS+1]; /* offsets in table for each length */ - var extra = null; - var extra_index = 0; - - var here_bits, here_op, here_val; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) { - count[len] = 0; - } - for (sym = 0; sym < codes; sym++) { - count[lens[lens_index + sym]]++; - } - - /* bound code lengths, force root to be within code lengths */ - root = bits; - for (max = MAXBITS; max >= 1; max--) { - if (count[max] !== 0) { break; } - } - if (root > max) { - root = max; - } - if (max === 0) { /* no symbols to code at all */ - //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ - //table.bits[opts.table_index] = 1; //here.bits = (var char)1; - //table.val[opts.table_index++] = 0; //here.val = (var short)0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - - //table.op[opts.table_index] = 64; - //table.bits[opts.table_index] = 1; - //table.val[opts.table_index++] = 0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - opts.bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min < max; min++) { - if (count[min] !== 0) { break; } - } - if (root < min) { - root = min; - } - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) { - return -1; - } /* over-subscribed */ - } - if (left > 0 && (type === CODES || max !== 1)) { - return -1; /* incomplete set */ - } - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) { - offs[len + 1] = offs[len] + count[len]; - } - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) { - if (lens[lens_index + sym] !== 0) { - work[offs[lens[lens_index + sym]]++] = sym; - } - } - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftrees.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - // poor man optimization - use if-else instead of switch, - // to avoid deopts in old v8 - if (type === CODES) { - base = extra = work; /* dummy value--not used */ - end = 19; - - } else if (type === LENS) { - base = lbase; - base_index -= 257; - extra = lext; - extra_index -= 257; - end = 256; - - } else { /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } - - /* initialize opts for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = table_index; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = -1; /* trigger new sub-table when len > root */ - used = 1 << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - var i=0; - /* process all codes and make table entries */ - for (;;) { - i++; - /* create table entry */ - here_bits = len - drop; - if (work[sym] < end) { - here_op = 0; - here_val = work[sym]; - } - else if (work[sym] > end) { - here_op = extra[extra_index + work[sym]]; - here_val = base[base_index + work[sym]]; - } - else { - here_op = 32 + 64; /* end of block */ - here_val = 0; - } - - /* replicate for those indices with low len bits equal to huff */ - incr = 1 << (len - drop); - fill = 1 << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; - } while (fill !== 0); - - /* backwards increment the len-bit code huff */ - incr = 1 << (len - 1); - while (huff & incr) { - incr >>= 1; - } - if (incr !== 0) { - huff &= incr - 1; - huff += incr; - } else { - huff = 0; - } - - /* go to next symbol, update count, len */ - sym++; - if (--count[len] === 0) { - if (len === max) { break; } - len = lens[lens_index + work[sym]]; - } - - /* create new sub-table if needed */ - if (len > root && (huff & mask) !== low) { - /* if first time, transition to sub-tables */ - if (drop === 0) { - drop = root; - } - - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = 1 << curr; - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) { break; } - curr++; - left <<= 1; - } - - /* check for enough space */ - used += 1 << curr; - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* point entry in root table to sub-table */ - low = huff & mask; - /*table.op[low] = curr; - table.bits[low] = root; - table.val[low] = next - opts.table_index;*/ - table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; - } - } - - /* fill in remaining table entry if code is incomplete (guaranteed to have - at most one remaining entry, since if the code is incomplete, the - maximum code length that was allowed to get this far is one bit) */ - if (huff !== 0) { - //table.op[next + huff] = 64; /* invalid code marker */ - //table.bits[next + huff] = len - drop; - //table.val[next + huff] = 0; - table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; - } - - /* set return parameters */ - //opts.table_index += used; - opts.bits = root; - return 0; -}; - -},{"../utils/common":3}],13:[function(require,module,exports){ -'use strict'; - -module.exports = { - '2': 'need dictionary', /* Z_NEED_DICT 2 */ - '1': 'stream end', /* Z_STREAM_END 1 */ - '0': '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; - -},{}],14:[function(require,module,exports){ -'use strict'; - - -var utils = require('../utils/common'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -//var Z_FILTERED = 1; -//var Z_HUFFMAN_ONLY = 2; -//var Z_RLE = 3; -var Z_FIXED = 4; -//var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -var Z_BINARY = 0; -var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - -/*============================================================================*/ - - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - -// From zutil.h - -var STORED_BLOCK = 0; -var STATIC_TREES = 1; -var DYN_TREES = 2; -/* The three kinds of block type */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -/* The minimum and maximum match lengths */ - -// From deflate.h -/* =========================================================================== - * Internal compression state. - */ - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ - -var LITERALS = 256; -/* number of literal bytes 0..255 */ - -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ - -var D_CODES = 30; -/* number of distance codes */ - -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ - -var HEAP_SIZE = 2*L_CODES + 1; -/* maximum heap size */ - -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var Buf_size = 16; -/* size of bit buffer in bi_buf */ - - -/* =========================================================================== - * Constants - */ - -var MAX_BL_BITS = 7; -/* Bit length codes must not exceed MAX_BL_BITS bits */ - -var END_BLOCK = 256; -/* end of block literal code */ - -var REP_3_6 = 16; -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ - -var REPZ_3_10 = 17; -/* repeat a zero length 3-10 times (3 bits of repeat count) */ - -var REPZ_11_138 = 18; -/* repeat a zero length 11-138 times (7 bits of repeat count) */ - -var extra_lbits = /* extra bits for each length code */ - [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; - -var extra_dbits = /* extra bits for each distance code */ - [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; - -var extra_blbits = /* extra bits for each bit length code */ - [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; - -var bl_order = - [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ - -/* =========================================================================== - * Local data. These are initialized only once. - */ - -// We pre-fill arrays with 0 to avoid uninitialized gaps - -var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ - -// !!!! Use flat array insdead of structure, Freq = i*2, Len = i*2+1 -var static_ltree = new Array((L_CODES+2) * 2); -zero(static_ltree); -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -var static_dtree = new Array(D_CODES * 2); -zero(static_dtree); -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -var _dist_code = new Array(DIST_CODE_LEN); -zero(_dist_code); -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -var _length_code = new Array(MAX_MATCH-MIN_MATCH+1); -zero(_length_code); -/* length code for each normalized match length (0 == MIN_MATCH) */ - -var base_length = new Array(LENGTH_CODES); -zero(base_length); -/* First normalized length for each code (0 = MIN_MATCH) */ - -var base_dist = new Array(D_CODES); -zero(base_dist); -/* First normalized distance for each code (0 = distance of 1) */ - - -var StaticTreeDesc = function (static_tree, extra_bits, extra_base, elems, max_length) { - - this.static_tree = static_tree; /* static tree or NULL */ - this.extra_bits = extra_bits; /* extra bits for each code or NULL */ - this.extra_base = extra_base; /* base index for extra_bits */ - this.elems = elems; /* max number of elements in the tree */ - this.max_length = max_length; /* max bit length for the codes */ - - // show if `static_tree` has data or dummy - needed for monomorphic objects - this.has_stree = static_tree && static_tree.length; -}; - - -var static_l_desc; -var static_d_desc; -var static_bl_desc; - - -var TreeDesc = function(dyn_tree, stat_desc) { - this.dyn_tree = dyn_tree; /* the dynamic tree */ - this.max_code = 0; /* largest code with non zero frequency */ - this.stat_desc = stat_desc; /* the corresponding static tree */ -}; - - - -function d_code(dist) { - return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; -} - - -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -function put_short (s, w) { -// put_byte(s, (uch)((w) & 0xff)); -// put_byte(s, (uch)((ush)(w) >> 8)); - s.pending_buf[s.pending++] = (w) & 0xff; - s.pending_buf[s.pending++] = (w >>> 8) & 0xff; -} - - -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -function send_bits(s, value, length) { - if (s.bi_valid > (Buf_size - length)) { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - put_short(s, s.bi_buf); - s.bi_buf = value >> (Buf_size - s.bi_valid); - s.bi_valid += length - Buf_size; - } else { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - s.bi_valid += length; - } -} - - -function send_code(s, c, tree) { - send_bits(s, tree[c*2]/*.Code*/, tree[c*2 + 1]/*.Len*/); -} - - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -function bi_reverse(code, len) { - var res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; -} - - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -function bi_flush(s) { - if (s.bi_valid === 16) { - put_short(s, s.bi_buf); - s.bi_buf = 0; - s.bi_valid = 0; - - } else if (s.bi_valid >= 8) { - s.pending_buf[s.pending++] = s.bi_buf & 0xff; - s.bi_buf >>= 8; - s.bi_valid -= 8; - } -} - - -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ -function gen_bitlen(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var max_code = desc.max_code; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var extra = desc.stat_desc.extra_bits; - var base = desc.stat_desc.extra_base; - var max_length = desc.stat_desc.max_length; - var h; /* heap index */ - var n, m; /* iterate over the tree elements */ - var bits; /* bit length */ - var xbits; /* extra bits */ - var f; /* frequency */ - var overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) { - s.bl_count[bits] = 0; - } - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s.heap[s.heap_max]*2 + 1]/*.Len*/ = 0; /* root of the heap */ - - for (h = s.heap_max+1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n*2 +1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n*2 + 1]/*.Len*/ = bits; - /* We overwrite tree[n].Dad which is no longer needed */ - - if (n > max_code) { continue; } /* not a leaf node */ - - s.bl_count[bits]++; - xbits = 0; - if (n >= base) { - xbits = extra[n-base]; - } - f = tree[n * 2]/*.Freq*/; - s.opt_len += f * (bits + xbits); - if (has_stree) { - s.static_len += f * (stree[n*2 + 1]/*.Len*/ + xbits); - } - } - if (overflow === 0) { return; } - - // Trace((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length-1; - while (s.bl_count[bits] === 0) { bits--; } - s.bl_count[bits]--; /* move one leaf down the tree */ - s.bl_count[bits+1] += 2; /* move one overflow item as its brother */ - s.bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > max_code) { continue; } - if (tree[m*2 + 1]/*.Len*/ !== bits) { - // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s.opt_len += (bits - tree[m*2 + 1]/*.Len*/)*tree[m*2]/*.Freq*/; - tree[m*2 + 1]/*.Len*/ = bits; - } - n--; - } - } -} - - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -function gen_codes(tree, max_code, bl_count) -// ct_data *tree; /* the tree to decorate */ -// int max_code; /* largest code with non zero frequency */ -// ushf *bl_count; /* number of codes at each bit length */ -{ - var next_code = new Array(MAX_BITS+1); /* next code value for each bit length */ - var code = 0; /* running code value */ - var bits; /* bit index */ - var n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = (code + bl_count[bits-1]) << 1; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES-1; code++) { - base_length[code] = length; - for (n = 0; n < (1< dist code (0..29) */ - dist = 0; - for (code = 0 ; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1<>= 7; /* from now on, all distances are divided by 128 */ - for (; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) { - _dist_code[256 + dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: 256+dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) { - bl_count[bits] = 0; - } - - n = 0; - while (n <= 143) { - static_ltree[n*2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - while (n <= 255) { - static_ltree[n*2 + 1]/*.Len*/ = 9; - n++; - bl_count[9]++; - } - while (n <= 279) { - static_ltree[n*2 + 1]/*.Len*/ = 7; - n++; - bl_count[7]++; - } - while (n <= 287) { - static_ltree[n*2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes(static_ltree, L_CODES+1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n*2 + 1]/*.Len*/ = 5; - static_dtree[n*2]/*.Code*/ = bi_reverse(n, 5); - } - - // Now data ready and we can init static trees - static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS); - static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); - static_bl_desc =new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); - - //static_init_done = true; -} - - -/* =========================================================================== - * Initialize a new block. - */ -function init_block(s) { - var n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n*2]/*.Freq*/ = 0; } - for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n*2]/*.Freq*/ = 0; } - for (n = 0; n < BL_CODES; n++) { s.bl_tree[n*2]/*.Freq*/ = 0; } - - s.dyn_ltree[END_BLOCK*2]/*.Freq*/ = 1; - s.opt_len = s.static_len = 0; - s.last_lit = s.matches = 0; -} - - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -function bi_windup(s) -{ - if (s.bi_valid > 8) { - put_short(s, s.bi_buf); - } else if (s.bi_valid > 0) { - //put_byte(s, (Byte)s->bi_buf); - s.pending_buf[s.pending++] = s.bi_buf; - } - s.bi_buf = 0; - s.bi_valid = 0; -} - -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -function copy_block(s, buf, len, header) -//DeflateState *s; -//charf *buf; /* the input data */ -//unsigned len; /* its length */ -//int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, len); - put_short(s, ~len); - } -// while (len--) { -// put_byte(s, *buf++); -// } - utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); - s.pending += len; -} - -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -function smaller(tree, n, m, depth) { - var _n2 = n*2; - var _m2 = m*2; - return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || - (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); -} - -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -function pqdownheap(s, tree, k) -// deflate_state *s; -// ct_data *tree; /* the tree to restore */ -// int k; /* node to move down */ -{ - var v = s.heap[k]; - var j = k << 1; /* left son of k */ - while (j <= s.heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s.heap_len && - smaller(tree, s.heap[j+1], s.heap[j], s.depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s.heap[j], s.depth)) { break; } - - /* Exchange v with the smallest son */ - s.heap[k] = s.heap[j]; - k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s.heap[k] = v; -} - - -// inlined manually -// var SMALLEST = 1; - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -function compress_block(s, ltree, dtree) -// deflate_state *s; -// const ct_data *ltree; /* literal tree */ -// const ct_data *dtree; /* distance tree */ -{ - var dist; /* distance of matched string */ - var lc; /* match length or unmatched char (if dist == 0) */ - var lx = 0; /* running index in l_buf */ - var code; /* the code to send */ - var extra; /* number of extra bits to send */ - - if (s.last_lit !== 0) { - do { - dist = (s.pending_buf[s.d_buf + lx*2] << 8) | (s.pending_buf[s.d_buf + lx*2 + 1]); - lc = s.pending_buf[s.l_buf + lx]; - lx++; - - if (dist === 0) { - send_code(s, lc, ltree); /* send a literal byte */ - //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code+LITERALS+1, ltree); /* send the length code */ - extra = extra_lbits[code]; - if (extra !== 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - //Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra !== 0) { - dist -= base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ - //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, - // "pendingBuf overflow"); - - } while (lx < s.last_lit); - } - - send_code(s, END_BLOCK, ltree); -} - - -/* =========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ -function build_tree(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var elems = desc.stat_desc.elems; - var n, m; /* iterate over heap elements */ - var max_code = -1; /* largest code with non zero frequency */ - var node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - s.heap_len = 0; - s.heap_max = HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n * 2]/*.Freq*/ !== 0) { - s.heap[++s.heap_len] = max_code = n; - s.depth[n] = 0; - - } else { - tree[n*2 + 1]/*.Len*/ = 0; - } - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s.heap_len < 2) { - node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); - tree[node * 2]/*.Freq*/ = 1; - s.depth[node] = 0; - s.opt_len--; - - if (has_stree) { - s.static_len -= stree[node*2 + 1]/*.Len*/; - } - /* node is 0 or 1 so it does not have extra bits */ - } - desc.max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - //pqremove(s, tree, n); /* n = node of least frequency */ - /*** pqremove ***/ - n = s.heap[1/*SMALLEST*/]; - s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; - pqdownheap(s, tree, 1/*SMALLEST*/); - /***/ - - m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ - - s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ - s.heap[--s.heap_max] = m; - - /* Create a new node father of n and m */ - tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; - s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; - tree[n*2 + 1]/*.Dad*/ = tree[m*2 + 1]/*.Dad*/ = node; - - /* and insert the new node in the heap */ - s.heap[1/*SMALLEST*/] = node++; - pqdownheap(s, tree, 1/*SMALLEST*/); - - } while (s.heap_len >= 2); - - s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, desc); - - /* The field len is now set, we can generate the bit codes */ - gen_codes(tree, max_code, s.bl_count); -} - - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. - */ -function scan_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0*2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code+1)*2 + 1]/*.Len*/ = 0xffff; /* guard */ - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n+1)*2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - s.bl_tree[curlen * 2]/*.Freq*/ += count; - - } else if (curlen !== 0) { - - if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } - s.bl_tree[REP_3_6*2]/*.Freq*/++; - - } else if (count <= 10) { - s.bl_tree[REPZ_3_10*2]/*.Freq*/++; - - } else { - s.bl_tree[REPZ_11_138*2]/*.Freq*/++; - } - - count = 0; - prevlen = curlen; - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ -function send_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0*2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - /* tree[max_code+1].Len = -1; */ /* guard already set */ - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n+1)*2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); - - } else if (curlen !== 0) { - if (curlen !== prevlen) { - send_code(s, curlen, s.bl_tree); - count--; - } - //Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s.bl_tree); - send_bits(s, count-3, 2); - - } else if (count <= 10) { - send_code(s, REPZ_3_10, s.bl_tree); - send_bits(s, count-3, 3); - - } else { - send_code(s, REPZ_11_138, s.bl_tree); - send_bits(s, count-11, 7); - } - - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -function build_bl_tree(s) { - var max_blindex; /* index of last bit length code of non zero freq */ - - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, s.dyn_ltree, s.l_desc.max_code); - scan_tree(s, s.dyn_dtree, s.d_desc.max_code); - - /* Build the bit length tree: */ - build_tree(s, s.bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { - if (s.bl_tree[bl_order[max_blindex]*2 + 1]/*.Len*/ !== 0) { - break; - } - } - /* Update opt_len to include the bit length tree and counts */ - s.opt_len += 3*(max_blindex+1) + 5+5+4; - //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - // s->opt_len, s->static_len)); - - return max_blindex; -} - - -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -function send_all_trees(s, lcodes, dcodes, blcodes) -// deflate_state *s; -// int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - var rank; /* index in bl_order */ - - //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - // "too many codes"); - //Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes-1, 5); - send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s.bl_tree[bl_order[rank]*2 + 1]/*.Len*/, 3); - } - //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_ltree, lcodes-1); /* literal tree */ - //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_dtree, dcodes-1); /* distance tree */ - //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} - - -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "black list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -function detect_data_type(s) { - /* black_mask is the bit mask of black-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - var black_mask = 0xf3ffc07f; - var n; - - /* Check for non-textual ("black-listed") bytes. */ - for (n = 0; n <= 31; n++, black_mask >>>= 1) { - if ((black_mask & 1) && (s.dyn_ltree[n*2]/*.Freq*/ !== 0)) { - return Z_BINARY; - } - } - - /* Check for textual ("white-listed") bytes. */ - if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || - s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - for (n = 32; n < LITERALS; n++) { - if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - } - - /* There are no "black-listed" or "white-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - - -var static_init_done = false; - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -function _tr_init(s) -{ - - if (!static_init_done) { - tr_static_init(); - static_init_done = true; - } - - s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); - s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); - s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); - - s.bi_buf = 0; - s.bi_valid = 0; - - /* Initialize the first block of the first file: */ - init_block(s); -} - - -/* =========================================================================== - * Send a stored block - */ -function _tr_stored_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - send_bits(s, (STORED_BLOCK<<1)+(last ? 1 : 0), 3); /* send block type */ - copy_block(s, buf, stored_len, true); /* with header */ -} - - -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - */ -function _tr_align(s) { - send_bits(s, STATIC_TREES<<1, 3); - send_code(s, END_BLOCK, static_ltree); - bi_flush(s); -} - - -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ -function _tr_flush_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block, or NULL if too old */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - var max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s.level > 0) { - - /* Check if the file is binary or text */ - if (s.strm.data_type === Z_UNKNOWN) { - s.strm.data_type = detect_data_type(s); - } - - /* Construct the literal and distance trees */ - build_tree(s, s.l_desc); - // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - - build_tree(s, s.d_desc); - // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); - - /* Determine the best encoding. Compute the block lengths in bytes. */ - opt_lenb = (s.opt_len+3+7) >>> 3; - static_lenb = (s.static_len+3+7) >>> 3; - - // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - // s->last_lit)); - - if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } - - } else { - // Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } - - if ((stored_len+4 <= opt_lenb) && (buf !== -1)) { - /* 4: two words for the lengths */ - - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, last); - - } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { - - send_bits(s, (STATIC_TREES<<1) + (last ? 1 : 0), 3); - compress_block(s, static_ltree, static_dtree); - - } else { - send_bits(s, (DYN_TREES<<1) + (last ? 1 : 0), 3); - send_all_trees(s, s.l_desc.max_code+1, s.d_desc.max_code+1, max_blindex+1); - compress_block(s, s.dyn_ltree, s.dyn_dtree); - } - // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. - */ - init_block(s); - - if (last) { - bi_windup(s); - } - // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - // s->compressed_len-7*last)); -} - -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -function _tr_tally(s, dist, lc) -// deflate_state *s; -// unsigned dist; /* distance of matched string */ -// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - //var out_length, in_length, dcode; - - s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; - s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; - - s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; - s.last_lit++; - - if (dist === 0) { - /* lc is the unmatched char */ - s.dyn_ltree[lc*2]/*.Freq*/++; - } else { - s.matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - //Assert((ush)dist < (ush)MAX_DIST(s) && - // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++; - s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; - } - -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility - -//#ifdef TRUNCATE_BLOCK -// /* Try to guess if it is profitable to stop the current block here */ -// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { -// /* Compute an upper bound for the compressed length */ -// out_length = s.last_lit*8; -// in_length = s.strstart - s.block_start; -// -// for (dcode = 0; dcode < D_CODES; dcode++) { -// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); -// } -// out_length >>>= 3; -// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", -// // s->last_lit, in_length, out_length, -// // 100L - out_length*100L/in_length)); -// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { -// return true; -// } -// } -//#endif - - return (s.last_lit === s.lit_bufsize-1); - /* We avoid equality with lit_bufsize because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ -} - -exports._tr_init = _tr_init; -exports._tr_stored_block = _tr_stored_block; -exports._tr_flush_block = _tr_flush_block; -exports._tr_tally = _tr_tally; -exports._tr_align = _tr_align; - -},{"../utils/common":3}],15:[function(require,module,exports){ -'use strict'; - - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; - -},{}],"/":[function(require,module,exports){ -// Top level file is just a mixin of submodules & constants -'use strict'; - -var assign = require('./lib/utils/common').assign; - -var deflate = require('./lib/deflate'); -var inflate = require('./lib/inflate'); -var constants = require('./lib/zlib/constants'); - -var pako = {}; - -assign(pako, deflate, inflate, constants); - -module.exports = pako; - -},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/") -}); \ No newline at end of file diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako.min.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako.min.js deleted file mode 100644 index a622e14b8..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* pako 0.2.7 nodeca/pako */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.pako=t()}}(function(){return function t(e,a,i){function n(s,o){if(!a[s]){if(!e[s]){var l="function"==typeof require&&require;if(!o&&l)return l(s,!0);if(r)return r(s,!0);var h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var d=a[s]={exports:{}};e[s][0].call(d.exports,function(t){var a=e[s][1][t];return n(a?a:t)},d,d.exports,t,e,a,i)}return a[s].exports}for(var r="function"==typeof require&&require,s=0;s0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var a=s.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==c)throw new Error(h[a]);e.header&&s.deflateSetHeader(this.strm,e.header)};v.prototype.push=function(t,e){var a,i,n=this.strm,r=this.options.chunkSize;if(this.ended)return!1;i=e===~~e?e:e===!0?u:_,"string"==typeof t?n.input=l.string2buf(t):"[object ArrayBuffer]"===f.call(t)?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;do{if(0===n.avail_out&&(n.output=new o.Buf8(r),n.next_out=0,n.avail_out=r),a=s.deflate(n,i),a!==b&&a!==c)return this.onEnd(a),this.ended=!0,!1;(0===n.avail_out||0===n.avail_in&&(i===u||i===g))&&this.onData("string"===this.options.to?l.buf2binstring(o.shrinkBuf(n.output,n.next_out)):o.shrinkBuf(n.output,n.next_out))}while((n.avail_in>0||0===n.avail_out)&&a!==b);return i===u?(a=s.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===c):i===g?(this.onEnd(c),n.avail_out=0,!0):!0},v.prototype.onData=function(t){this.chunks.push(t)},v.prototype.onEnd=function(t){t===c&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Deflate=v,a.deflate=i,a.deflateRaw=n,a.gzip=r},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate.js":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(t,e,a){"use strict";function i(t,e){var a=new u(e);if(a.push(t,!0),a.err)throw a.msg;return a.result}function n(t,e){return e=e||{},e.raw=!0,i(t,e)}var r=t("./zlib/inflate.js"),s=t("./utils/common"),o=t("./utils/strings"),l=t("./zlib/constants"),h=t("./zlib/messages"),d=t("./zlib/zstream"),f=t("./zlib/gzheader"),_=Object.prototype.toString,u=function(t){this.options=s.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0===(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var a=r.inflateInit2(this.strm,e.windowBits);if(a!==l.Z_OK)throw new Error(h[a]);this.header=new f,r.inflateGetHeader(this.strm,this.header)};u.prototype.push=function(t,e){var a,i,n,h,d,f=this.strm,u=this.options.chunkSize;if(this.ended)return!1;i=e===~~e?e:e===!0?l.Z_FINISH:l.Z_NO_FLUSH,"string"==typeof t?f.input=o.binstring2buf(t):"[object ArrayBuffer]"===_.call(t)?f.input=new Uint8Array(t):f.input=t,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new s.Buf8(u),f.next_out=0,f.avail_out=u),a=r.inflate(f,l.Z_NO_FLUSH),a!==l.Z_STREAM_END&&a!==l.Z_OK)return this.onEnd(a),this.ended=!0,!1;f.next_out&&(0===f.avail_out||a===l.Z_STREAM_END||0===f.avail_in&&(i===l.Z_FINISH||i===l.Z_SYNC_FLUSH))&&("string"===this.options.to?(n=o.utf8border(f.output,f.next_out),h=f.next_out-n,d=o.buf2string(f.output,n),f.next_out=h,f.avail_out=u-h,h&&s.arraySet(f.output,f.output,n,h,0),this.onData(d)):this.onData(s.shrinkBuf(f.output,f.next_out)))}while(f.avail_in>0&&a!==l.Z_STREAM_END);return a===l.Z_STREAM_END&&(i=l.Z_FINISH),i===l.Z_FINISH?(a=r.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===l.Z_OK):i===l.Z_SYNC_FLUSH?(this.onEnd(l.Z_OK),f.avail_out=0,!0):!0},u.prototype.onData=function(t){this.chunks.push(t)},u.prototype.onEnd=function(t){t===l.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Inflate=u,a.inflate=i,a.inflateRaw=n,a.ungzip=i},{"./utils/common":3,"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate.js":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(t,e,a){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;a.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(var i in a)a.hasOwnProperty(i)&&(t[i]=a[i])}}return t},a.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var n={arraySet:function(t,e,a,i,n){if(e.subarray&&t.subarray)return void t.set(e.subarray(a,a+i),n);for(var r=0;i>r;r++)t[n+r]=e[a+r]},flattenChunks:function(t){var e,a,i,n,r,s;for(i=0,e=0,a=t.length;a>e;e++)i+=t[e].length;for(s=new Uint8Array(i),n=0,e=0,a=t.length;a>e;e++)r=t[e],s.set(r,n),n+=r.length;return s}},r={arraySet:function(t,e,a,i,n){for(var r=0;i>r;r++)t[n+r]=e[a+r]},flattenChunks:function(t){return[].concat.apply([],t)}};a.setTyped=function(t){t?(a.Buf8=Uint8Array,a.Buf16=Uint16Array,a.Buf32=Int32Array,a.assign(a,n)):(a.Buf8=Array,a.Buf16=Array,a.Buf32=Array,a.assign(a,r))},a.setTyped(i)},{}],4:[function(t,e,a){"use strict";function i(t,e){if(65537>e&&(t.subarray&&s||!t.subarray&&r))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var a="",i=0;e>i;i++)a+=String.fromCharCode(t[i]);return a}var n=t("./common"),r=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(o){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(o){s=!1}for(var l=new n.Buf8(256),h=0;256>h;h++)l[h]=h>=252?6:h>=248?5:h>=240?4:h>=224?3:h>=192?2:1;l[254]=l[254]=1,a.string2buf=function(t){var e,a,i,r,s,o=t.length,l=0;for(r=0;o>r;r++)a=t.charCodeAt(r),55296===(64512&a)&&o>r+1&&(i=t.charCodeAt(r+1),56320===(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),r++)),l+=128>a?1:2048>a?2:65536>a?3:4;for(e=new n.Buf8(l),s=0,r=0;l>s;r++)a=t.charCodeAt(r),55296===(64512&a)&&o>r+1&&(i=t.charCodeAt(r+1),56320===(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),r++)),128>a?e[s++]=a:2048>a?(e[s++]=192|a>>>6,e[s++]=128|63&a):65536>a?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},a.buf2binstring=function(t){return i(t,t.length)},a.binstring2buf=function(t){for(var e=new n.Buf8(t.length),a=0,i=e.length;i>a;a++)e[a]=t.charCodeAt(a);return e},a.buf2string=function(t,e){var a,n,r,s,o=e||t.length,h=new Array(2*o);for(n=0,a=0;o>a;)if(r=t[a++],128>r)h[n++]=r;else if(s=l[r],s>4)h[n++]=65533,a+=s-1;else{for(r&=2===s?31:3===s?15:7;s>1&&o>a;)r=r<<6|63&t[a++],s--;s>1?h[n++]=65533:65536>r?h[n++]=r:(r-=65536,h[n++]=55296|r>>10&1023,h[n++]=56320|1023&r)}return i(h,n)},a.utf8border=function(t,e){var a;for(e=e||t.length,e>t.length&&(e=t.length),a=e-1;a>=0&&128===(192&t[a]);)a--;return 0>a?e:0===a?e:a+l[t[a]]>e?a:e}},{"./common":3}],5:[function(t,e,a){"use strict";function i(t,e,a,i){for(var n=65535&t|0,r=t>>>16&65535|0,s=0;0!==a;){s=a>2e3?2e3:a,a-=s;do n=n+e[i++]|0,r=r+n|0;while(--s);n%=65521,r%=65521}return n|r<<16|0}e.exports=i},{}],6:[function(t,e,a){e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(t,e,a){"use strict";function i(){for(var t,e=[],a=0;256>a;a++){t=a;for(var i=0;8>i;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}function n(t,e,a,i){var n=r,s=i+a;t=-1^t;for(var o=i;s>o;o++)t=t>>>8^n[255&(t^e[o])];return-1^t}var r=i();e.exports=n},{}],8:[function(t,e,a){"use strict";function i(t,e){return t.msg=N[e],e}function n(t){return(t<<1)-(t>4?9:0)}function r(t){for(var e=t.length;--e>=0;)t[e]=0}function s(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(A.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function o(t,e){Z._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,s(t.strm)}function l(t,e){t.pending_buf[t.pending++]=e}function h(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function d(t,e,a,i){var n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,A.arraySet(e,t.input,t.next_in,n,a),1===t.state.wrap?t.adler=R(t.adler,e,n,a):2===t.state.wrap&&(t.adler=C(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)}function f(t,e){var a,i,n=t.max_chain_length,r=t.strstart,s=t.prev_length,o=t.nice_match,l=t.strstart>t.w_size-ht?t.strstart-(t.w_size-ht):0,h=t.window,d=t.w_mask,f=t.prev,_=t.strstart+lt,u=h[r+s-1],c=h[r+s];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do if(a=e,h[a+s]===c&&h[a+s-1]===u&&h[a]===h[r]&&h[++a]===h[r+1]){r+=2,a++;do;while(h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&_>r);if(i=lt-(_-r),r=_-lt,i>s){if(t.match_start=e,s=i,i>=o)break;u=h[r+s-1],c=h[r+s]}}while((e=f[e&d])>l&&0!==--n);return s<=t.lookahead?s:t.lookahead}function _(t){var e,a,i,n,r,s=t.w_size;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-ht)){A.arraySet(t.window,t.window,s,s,0),t.match_start-=s,t.strstart-=s,t.block_start-=s,a=t.hash_size,e=a;do i=t.head[--e],t.head[e]=i>=s?i-s:0;while(--a);a=s,e=a;do i=t.prev[--e],t.prev[e]=i>=s?i-s:0;while(--a);n+=s}if(0===t.strm.avail_in)break;if(a=d(t.strm,t.window,t.strstart+t.lookahead,n),t.lookahead+=a,t.lookahead+t.insert>=ot)for(r=t.strstart-t.insert,t.ins_h=t.window[r],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(_(t),0===t.lookahead&&e===I)return wt;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+a;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,o(t,!1),0===t.strm.avail_out))return wt;if(t.strstart-t.block_start>=t.w_size-ht&&(o(t,!1),0===t.strm.avail_out))return wt}return t.insert=0,e===U?(o(t,!0),0===t.strm.avail_out?vt:kt):t.strstart>t.block_start&&(o(t,!1),0===t.strm.avail_out)?wt:wt}function c(t,e){for(var a,i;;){if(t.lookahead=ot&&(t.ins_h=(t.ins_h<=ot)if(i=Z._tr_tally(t,t.strstart-t.match_start,t.match_length-ot),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=ot){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<=ot&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=ot-1)),t.prev_length>=ot&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-ot,i=Z._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-ot),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=n&&(t.ins_h=(t.ins_h<=ot&&t.strstart>0&&(n=t.strstart-1,i=s[n],i===s[++n]&&i===s[++n]&&i===s[++n])){r=t.strstart+lt;do;while(i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&r>n);t.match_length=lt-(r-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=ot?(a=Z._tr_tally(t,1,t.match_length-ot),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=Z._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(o(t,!1),0===t.strm.avail_out))return wt}return t.insert=0,e===U?(o(t,!0),0===t.strm.avail_out?vt:kt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?wt:pt}function m(t,e){for(var a;;){if(0===t.lookahead&&(_(t),0===t.lookahead)){if(e===I)return wt;break}if(t.match_length=0,a=Z._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(o(t,!1),0===t.strm.avail_out))return wt}return t.insert=0,e===U?(o(t,!0),0===t.strm.avail_out?vt:kt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?wt:pt}function w(t){t.window_size=2*t.w_size,r(t.head),t.max_lazy_match=E[t.level].max_lazy,t.good_match=E[t.level].good_length,t.nice_match=E[t.level].nice_length,t.max_chain_length=E[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=ot-1,t.match_available=0,t.ins_h=0}function p(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=J,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new A.Buf16(2*rt),this.dyn_dtree=new A.Buf16(2*(2*it+1)),this.bl_tree=new A.Buf16(2*(2*nt+1)),r(this.dyn_ltree),r(this.dyn_dtree),r(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new A.Buf16(st+1),this.heap=new A.Buf16(2*at+1),r(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new A.Buf16(2*at+1),r(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function v(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=W,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?ft:gt,t.adler=2===e.wrap?0:1,e.last_flush=I,Z._tr_init(e),F):i(t,H)}function k(t){var e=v(t);return e===F&&w(t.state),e}function x(t,e){return t&&t.state?2!==t.state.wrap?H:(t.state.gzhead=e,F):H}function y(t,e,a,n,r,s){if(!t)return H;var o=1;if(e===K&&(e=6),0>n?(o=0,n=-n):n>15&&(o=2,n-=16),1>r||r>Q||a!==J||8>n||n>15||0>e||e>9||0>s||s>G)return i(t,H);8===n&&(n=9);var l=new p;return t.state=l,l.strm=t,l.wrap=o,l.gzhead=null,l.w_bits=n,l.w_size=1<>1,l.l_buf=3*l.lit_bufsize,l.level=e,l.strategy=s,l.method=a,k(t)}function z(t,e){return y(t,e,J,V,$,X)}function B(t,e){var a,o,d,f;if(!t||!t.state||e>D||0>e)return t?i(t,H):H;if(o=t.state,!t.output||!t.input&&0!==t.avail_in||o.status===mt&&e!==U)return i(t,0===t.avail_out?M:H);if(o.strm=t,a=o.last_flush,o.last_flush=e,o.status===ft)if(2===o.wrap)t.adler=0,l(o,31),l(o,139),l(o,8),o.gzhead?(l(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),l(o,255&o.gzhead.time),l(o,o.gzhead.time>>8&255),l(o,o.gzhead.time>>16&255),l(o,o.gzhead.time>>24&255),l(o,9===o.level?2:o.strategy>=Y||o.level<2?4:0),l(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(l(o,255&o.gzhead.extra.length),l(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(t.adler=C(t.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=_t):(l(o,0),l(o,0),l(o,0),l(o,0),l(o,0),l(o,9===o.level?2:o.strategy>=Y||o.level<2?4:0),l(o,xt),o.status=gt);else{var _=J+(o.w_bits-8<<4)<<8,u=-1;u=o.strategy>=Y||o.level<2?0:o.level<6?1:6===o.level?2:3,_|=u<<6,0!==o.strstart&&(_|=dt),_+=31-_%31,o.status=gt,h(o,_),0!==o.strstart&&(h(o,t.adler>>>16),h(o,65535&t.adler)),t.adler=1}if(o.status===_t)if(o.gzhead.extra){for(d=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>d&&(t.adler=C(t.adler,o.pending_buf,o.pending-d,d)),s(t),d=o.pending,o.pending!==o.pending_buf_size));)l(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>d&&(t.adler=C(t.adler,o.pending_buf,o.pending-d,d)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=ut)}else o.status=ut;if(o.status===ut)if(o.gzhead.name){d=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>d&&(t.adler=C(t.adler,o.pending_buf,o.pending-d,d)),s(t),d=o.pending,o.pending===o.pending_buf_size)){f=1;break}f=o.gzindexd&&(t.adler=C(t.adler,o.pending_buf,o.pending-d,d)),0===f&&(o.gzindex=0,o.status=ct)}else o.status=ct;if(o.status===ct)if(o.gzhead.comment){d=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>d&&(t.adler=C(t.adler,o.pending_buf,o.pending-d,d)),s(t),d=o.pending,o.pending===o.pending_buf_size)){f=1;break}f=o.gzindexd&&(t.adler=C(t.adler,o.pending_buf,o.pending-d,d)),0===f&&(o.status=bt)}else o.status=bt;if(o.status===bt&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&s(t),o.pending+2<=o.pending_buf_size&&(l(o,255&t.adler),l(o,t.adler>>8&255),t.adler=0,o.status=gt)):o.status=gt),0!==o.pending){if(s(t),0===t.avail_out)return o.last_flush=-1,F}else if(0===t.avail_in&&n(e)<=n(a)&&e!==U)return i(t,M);if(o.status===mt&&0!==t.avail_in)return i(t,M);if(0!==t.avail_in||0!==o.lookahead||e!==I&&o.status!==mt){var c=o.strategy===Y?m(o,e):o.strategy===q?g(o,e):E[o.level].func(o,e);if((c===vt||c===kt)&&(o.status=mt),c===wt||c===vt)return 0===t.avail_out&&(o.last_flush=-1),F;if(c===pt&&(e===O?Z._tr_align(o):e!==D&&(Z._tr_stored_block(o,0,0,!1),e===T&&(r(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),s(t),0===t.avail_out))return o.last_flush=-1,F}return e!==U?F:o.wrap<=0?L:(2===o.wrap?(l(o,255&t.adler),l(o,t.adler>>8&255),l(o,t.adler>>16&255),l(o,t.adler>>24&255),l(o,255&t.total_in),l(o,t.total_in>>8&255),l(o,t.total_in>>16&255),l(o,t.total_in>>24&255)):(h(o,t.adler>>>16),h(o,65535&t.adler)),s(t),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?F:L)}function S(t){var e;return t&&t.state?(e=t.state.status,e!==ft&&e!==_t&&e!==ut&&e!==ct&&e!==bt&&e!==gt&&e!==mt?i(t,H):(t.state=null,e===gt?i(t,j):F)):H}var E,A=t("../utils/common"),Z=t("./trees"),R=t("./adler32"),C=t("./crc32"),N=t("./messages"),I=0,O=1,T=3,U=4,D=5,F=0,L=1,H=-2,j=-3,M=-5,K=-1,P=1,Y=2,q=3,G=4,X=0,W=2,J=8,Q=9,V=15,$=8,tt=29,et=256,at=et+1+tt,it=30,nt=19,rt=2*at+1,st=15,ot=3,lt=258,ht=lt+ot+1,dt=32,ft=42,_t=69,ut=73,ct=91,bt=103,gt=113,mt=666,wt=1,pt=2,vt=3,kt=4,xt=3,yt=function(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n};E=[new yt(0,0,0,0,u),new yt(4,4,8,4,c),new yt(4,5,16,8,c),new yt(4,6,32,32,c),new yt(4,4,16,16,b),new yt(8,16,32,32,b),new yt(8,16,128,128,b),new yt(8,32,128,256,b),new yt(32,128,258,1024,b),new yt(32,258,258,4096,b)],a.deflateInit=z,a.deflateInit2=y,a.deflateReset=k,a.deflateResetKeep=v,a.deflateSetHeader=x,a.deflate=B,a.deflateEnd=S,a.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,"./trees":14}],9:[function(t,e,a){"use strict";function i(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}e.exports=i},{}],10:[function(t,e,a){"use strict";var i=30,n=12;e.exports=function(t,e){var a,r,s,o,l,h,d,f,_,u,c,b,g,m,w,p,v,k,x,y,z,B,S,E,A;a=t.state,r=t.next_in,E=t.input,s=r+(t.avail_in-5),o=t.next_out,A=t.output,l=o-(e-t.avail_out),h=o+(t.avail_out-257),d=a.dmax,f=a.wsize,_=a.whave,u=a.wnext,c=a.window,b=a.hold,g=a.bits,m=a.lencode,w=a.distcode,p=(1<g&&(b+=E[r++]<>>24,b>>>=x,g-=x,x=k>>>16&255,0===x)A[o++]=65535&k;else{if(!(16&x)){if(0===(64&x)){k=m[(65535&k)+(b&(1<g&&(b+=E[r++]<>>=x,g-=x),15>g&&(b+=E[r++]<>>24,b>>>=x,g-=x,x=k>>>16&255,!(16&x)){if(0===(64&x)){k=w[(65535&k)+(b&(1<g&&(b+=E[r++]<g&&(b+=E[r++]<d){t.msg="invalid distance too far back",a.mode=i;break t}if(b>>>=x,g-=x,x=o-l,z>x){if(x=z-x,x>_&&a.sane){t.msg="invalid distance too far back",a.mode=i;break t}if(B=0,S=c,0===u){if(B+=f-x,y>x){y-=x;do A[o++]=c[B++];while(--x);B=o-z,S=A}}else if(x>u){if(B+=f+u-x,x-=u,y>x){y-=x;do A[o++]=c[B++];while(--x);if(B=0,y>u){x=u,y-=x;do A[o++]=c[B++];while(--x);B=o-z,S=A}}}else if(B+=u-x,y>x){y-=x;do A[o++]=c[B++];while(--x);B=o-z,S=A}for(;y>2;)A[o++]=S[B++],A[o++]=S[B++],A[o++]=S[B++],y-=3;y&&(A[o++]=S[B++],y>1&&(A[o++]=S[B++]))}else{B=o-z;do A[o++]=A[B++],A[o++]=A[B++],A[o++]=A[B++],y-=3;while(y>2);y&&(A[o++]=A[B++],y>1&&(A[o++]=A[B++]))}break}}break}}while(s>r&&h>o);y=g>>3,r-=y,g-=y<<3,b&=(1<r?5+(s-r):5-(r-s),t.avail_out=h>o?257+(h-o):257-(o-h),a.hold=b,a.bits=g}},{}],11:[function(t,e,a){"use strict";function i(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function n(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new m.Buf16(320),this.work=new m.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function r(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=U,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new m.Buf32(ct),e.distcode=e.distdyn=new m.Buf32(bt),e.sane=1,e.back=-1,A):C}function s(t){var e;return t&&t.state?(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,r(t)):C}function o(t,e){var a,i;return t&&t.state?(i=t.state,0>e?(a=0,e=-e):(a=(e>>4)+1,48>e&&(e&=15)),e&&(8>e||e>15)?C:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,s(t))):C}function l(t,e){var a,i;return t?(i=new n,t.state=i,i.window=null,a=o(t,e),a!==A&&(t.state=null),a):C}function h(t){return l(t,mt)}function d(t){if(wt){var e;for(b=new m.Buf32(512),g=new m.Buf32(32),e=0;144>e;)t.lens[e++]=8;for(;256>e;)t.lens[e++]=9;for(;280>e;)t.lens[e++]=7;for(;288>e;)t.lens[e++]=8;for(k(y,t.lens,0,288,b,0,t.work,{bits:9}),e=0;32>e;)t.lens[e++]=5;k(z,t.lens,0,32,g,0,t.work,{bits:5}),wt=!1}t.lencode=b,t.lenbits=9,t.distcode=g,t.distbits=5}function f(t,e,a,i){var n,r=t.state;return null===r.window&&(r.wsize=1<=r.wsize?(m.arraySet(r.window,e,a-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(n=r.wsize-r.wnext,n>i&&(n=i),m.arraySet(r.window,e,a-i,n,r.wnext),i-=n,i?(m.arraySet(r.window,e,a-i,i,0),r.wnext=i,r.whave=r.wsize):(r.wnext+=n,r.wnext===r.wsize&&(r.wnext=0),r.whaveu;){if(0===l)break t;l--,_+=n[s++]<>>8&255,a.check=p(a.check,Et,2,0),_=0,u=0,a.mode=D;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&_)<<8)+(_>>8))%31){t.msg="incorrect header check",a.mode=ft;break}if((15&_)!==T){t.msg="unknown compression method",a.mode=ft;break}if(_>>>=4,u-=4,xt=(15&_)+8,0===a.wbits)a.wbits=xt;else if(xt>a.wbits){t.msg="invalid window size",a.mode=ft;break}a.dmax=1<u;){if(0===l)break t;l--,_+=n[s++]<>8&1),512&a.flags&&(Et[0]=255&_,Et[1]=_>>>8&255,a.check=p(a.check,Et,2,0)),_=0,u=0,a.mode=F;case F:for(;32>u;){if(0===l)break t;l--,_+=n[s++]<>>8&255,Et[2]=_>>>16&255,Et[3]=_>>>24&255,a.check=p(a.check,Et,4,0)),_=0,u=0,a.mode=L;case L:for(;16>u;){if(0===l)break t;l--,_+=n[s++]<>8),512&a.flags&&(Et[0]=255&_,Et[1]=_>>>8&255,a.check=p(a.check,Et,2,0)),_=0,u=0,a.mode=H;case H:if(1024&a.flags){for(;16>u;){if(0===l)break t;l--,_+=n[s++]<>>8&255,a.check=p(a.check,Et,2,0)),_=0,u=0}else a.head&&(a.head.extra=null);a.mode=j;case j:if(1024&a.flags&&(g=a.length,g>l&&(g=l),g&&(a.head&&(xt=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),m.arraySet(a.head.extra,n,s,g,xt)),512&a.flags&&(a.check=p(a.check,n,g,s)),l-=g,s+=g,a.length-=g),a.length))break t;a.length=0,a.mode=M;case M:if(2048&a.flags){if(0===l)break t;g=0;do xt=n[s+g++],a.head&&xt&&a.length<65536&&(a.head.name+=String.fromCharCode(xt));while(xt&&l>g);if(512&a.flags&&(a.check=p(a.check,n,g,s)),l-=g,s+=g,xt)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=K;case K:if(4096&a.flags){if(0===l)break t;g=0;do xt=n[s+g++],a.head&&xt&&a.length<65536&&(a.head.comment+=String.fromCharCode(xt));while(xt&&l>g);if(512&a.flags&&(a.check=p(a.check,n,g,s)),l-=g,s+=g,xt)break t}else a.head&&(a.head.comment=null);a.mode=P;case P:if(512&a.flags){for(;16>u;){if(0===l)break t;l--,_+=n[s++]<>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=G;break;case Y:for(;32>u;){if(0===l)break t;l--,_+=n[s++]<>>=7&u,u-=7&u,a.mode=lt;break}for(;3>u;){if(0===l)break t;l--,_+=n[s++]<>>=1,u-=1,3&_){case 0:a.mode=W;break;case 1:if(d(a),a.mode=et,e===E){_>>>=2,u-=2;break t}break;case 2:a.mode=V;break;case 3:t.msg="invalid block type",a.mode=ft}_>>>=2,u-=2;break;case W:for(_>>>=7&u,u-=7&u;32>u;){if(0===l)break t;l--,_+=n[s++]<>>16^65535)){t.msg="invalid stored block lengths",a.mode=ft;break}if(a.length=65535&_,_=0,u=0,a.mode=J,e===E)break t;case J:a.mode=Q;case Q:if(g=a.length){if(g>l&&(g=l),g>h&&(g=h),0===g)break t;m.arraySet(r,n,s,g,o),l-=g,s+=g,h-=g,o+=g,a.length-=g;break}a.mode=G;break;case V:for(;14>u;){if(0===l)break t;l--,_+=n[s++]<>>=5,u-=5,a.ndist=(31&_)+1,_>>>=5,u-=5,a.ncode=(15&_)+4,_>>>=4,u-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=ft;break}a.have=0,a.mode=$;case $:for(;a.haveu;){if(0===l)break t;l--,_+=n[s++]<>>=3,u-=3}for(;a.have<19;)a.lens[At[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,zt={bits:a.lenbits},yt=k(x,a.lens,0,19,a.lencode,0,a.work,zt),a.lenbits=zt.bits,yt){t.msg="invalid code lengths set",a.mode=ft;break}a.have=0,a.mode=tt;case tt:for(;a.have>>24,mt=St>>>16&255,wt=65535&St,!(u>=gt);){if(0===l)break t;l--,_+=n[s++]<wt)_>>>=gt,u-=gt,a.lens[a.have++]=wt;else{if(16===wt){for(Bt=gt+2;Bt>u;){if(0===l)break t;l--,_+=n[s++]<>>=gt,u-=gt,0===a.have){t.msg="invalid bit length repeat",a.mode=ft;break}xt=a.lens[a.have-1],g=3+(3&_),_>>>=2,u-=2}else if(17===wt){for(Bt=gt+3;Bt>u;){if(0===l)break t;l--,_+=n[s++]<>>=gt,u-=gt,xt=0,g=3+(7&_),_>>>=3,u-=3}else{for(Bt=gt+7;Bt>u;){if(0===l)break t;l--,_+=n[s++]<>>=gt,u-=gt,xt=0,g=11+(127&_),_>>>=7,u-=7}if(a.have+g>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=ft;break}for(;g--;)a.lens[a.have++]=xt}}if(a.mode===ft)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=ft;break}if(a.lenbits=9,zt={bits:a.lenbits},yt=k(y,a.lens,0,a.nlen,a.lencode,0,a.work,zt), -a.lenbits=zt.bits,yt){t.msg="invalid literal/lengths set",a.mode=ft;break}if(a.distbits=6,a.distcode=a.distdyn,zt={bits:a.distbits},yt=k(z,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,zt),a.distbits=zt.bits,yt){t.msg="invalid distances set",a.mode=ft;break}if(a.mode=et,e===E)break t;case et:a.mode=at;case at:if(l>=6&&h>=258){t.next_out=o,t.avail_out=h,t.next_in=s,t.avail_in=l,a.hold=_,a.bits=u,v(t,b),o=t.next_out,r=t.output,h=t.avail_out,s=t.next_in,n=t.input,l=t.avail_in,_=a.hold,u=a.bits,a.mode===G&&(a.back=-1);break}for(a.back=0;St=a.lencode[_&(1<>>24,mt=St>>>16&255,wt=65535&St,!(u>=gt);){if(0===l)break t;l--,_+=n[s++]<>pt)],gt=St>>>24,mt=St>>>16&255,wt=65535&St,!(u>=pt+gt);){if(0===l)break t;l--,_+=n[s++]<>>=pt,u-=pt,a.back+=pt}if(_>>>=gt,u-=gt,a.back+=gt,a.length=wt,0===mt){a.mode=ot;break}if(32&mt){a.back=-1,a.mode=G;break}if(64&mt){t.msg="invalid literal/length code",a.mode=ft;break}a.extra=15&mt,a.mode=it;case it:if(a.extra){for(Bt=a.extra;Bt>u;){if(0===l)break t;l--,_+=n[s++]<>>=a.extra,u-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=nt;case nt:for(;St=a.distcode[_&(1<>>24,mt=St>>>16&255,wt=65535&St,!(u>=gt);){if(0===l)break t;l--,_+=n[s++]<>pt)],gt=St>>>24,mt=St>>>16&255,wt=65535&St,!(u>=pt+gt);){if(0===l)break t;l--,_+=n[s++]<>>=pt,u-=pt,a.back+=pt}if(_>>>=gt,u-=gt,a.back+=gt,64&mt){t.msg="invalid distance code",a.mode=ft;break}a.offset=wt,a.extra=15&mt,a.mode=rt;case rt:if(a.extra){for(Bt=a.extra;Bt>u;){if(0===l)break t;l--,_+=n[s++]<>>=a.extra,u-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=ft;break}a.mode=st;case st:if(0===h)break t;if(g=b-h,a.offset>g){if(g=a.offset-g,g>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=ft;break}g>a.wnext?(g-=a.wnext,ct=a.wsize-g):ct=a.wnext-g,g>a.length&&(g=a.length),bt=a.window}else bt=r,ct=o-a.offset,g=a.length;g>h&&(g=h),h-=g,a.length-=g;do r[o++]=bt[ct++];while(--g);0===a.length&&(a.mode=at);break;case ot:if(0===h)break t;r[o++]=a.length,h--,a.mode=at;break;case lt:if(a.wrap){for(;32>u;){if(0===l)break t;l--,_|=n[s++]<u;){if(0===l)break t;l--,_+=n[s++]<=Z;Z++)j[Z]=0;for(R=0;c>R;R++)j[e[a+R]]++;for(I=A,N=n;N>=1&&0===j[N];N--);if(I>N&&(I=N),0===N)return b[g++]=20971520,b[g++]=20971520,w.bits=1,0;for(C=1;N>C&&0===j[C];C++);for(C>I&&(I=C),U=1,Z=1;n>=Z;Z++)if(U<<=1,U-=j[Z],0>U)return-1;if(U>0&&(t===o||1!==N))return-1;for(M[1]=0,Z=1;n>Z;Z++)M[Z+1]=M[Z]+j[Z];for(R=0;c>R;R++)0!==e[a+R]&&(m[M[e[a+R]]++]=R);if(t===o?(L=K=m,z=19):t===l?(L=d,H-=257,K=f,P-=257,z=256):(L=_,K=u,z=-1),F=0,R=0,Z=C,y=g,O=I,T=0,k=-1,D=1<r||t===h&&D>s)return 1;for(var Y=0;;){Y++,B=Z-T,m[R]z?(S=K[P+m[R]],E=L[H+m[R]]):(S=96,E=0),p=1<>T)+v]=B<<24|S<<16|E|0;while(0!==v);for(p=1<>=1;if(0!==p?(F&=p-1,F+=p):F=0,R++,0===--j[Z]){if(Z===N)break;Z=e[a+m[R]]}if(Z>I&&(F&x)!==k){for(0===T&&(T=I),y+=C,O=Z-T,U=1<O+T&&(U-=j[O+T],!(0>=U));)O++,U<<=1;if(D+=1<r||t===h&&D>s)return 1;k=F&x,b[k]=I<<24|O<<16|y-g|0}}return 0!==F&&(b[y+F]=Z-T<<24|64<<16|0),w.bits=I,0}},{"../utils/common":3}],13:[function(t,e,a){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(t,e,a){"use strict";function i(t){for(var e=t.length;--e>=0;)t[e]=0}function n(t){return 256>t?st[t]:st[256+(t>>>7)]}function r(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function s(t,e,a){t.bi_valid>G-a?(t.bi_buf|=e<>G-t.bi_valid,t.bi_valid+=a-G):(t.bi_buf|=e<>>=1,a<<=1;while(--e>0);return a>>>1}function h(t){16===t.bi_valid?(r(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}function d(t,e){var a,i,n,r,s,o,l=e.dyn_tree,h=e.max_code,d=e.stat_desc.static_tree,f=e.stat_desc.has_stree,_=e.stat_desc.extra_bits,u=e.stat_desc.extra_base,c=e.stat_desc.max_length,b=0;for(r=0;q>=r;r++)t.bl_count[r]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;Y>a;a++)i=t.heap[a],r=l[2*l[2*i+1]+1]+1,r>c&&(r=c,b++),l[2*i+1]=r,i>h||(t.bl_count[r]++,s=0,i>=u&&(s=_[i-u]),o=l[2*i],t.opt_len+=o*(r+s),f&&(t.static_len+=o*(d[2*i+1]+s)));if(0!==b){do{for(r=c-1;0===t.bl_count[r];)r--;t.bl_count[r]--,t.bl_count[r+1]+=2,t.bl_count[c]--,b-=2}while(b>0);for(r=c;0!==r;r--)for(i=t.bl_count[r];0!==i;)n=t.heap[--a],n>h||(l[2*n+1]!==r&&(t.opt_len+=(r-l[2*n+1])*l[2*n],l[2*n+1]=r),i--)}}function f(t,e,a){var i,n,r=new Array(q+1),s=0;for(i=1;q>=i;i++)r[i]=s=s+a[i-1]<<1;for(n=0;e>=n;n++){var o=t[2*n+1];0!==o&&(t[2*n]=l(r[o]++,o))}}function _(){var t,e,a,i,n,r=new Array(q+1);for(a=0,i=0;H-1>i;i++)for(lt[i]=a,t=0;t<1<<$[i];t++)ot[a++]=i;for(ot[a-1]=i,n=0,i=0;16>i;i++)for(ht[i]=n,t=0;t<1<>=7;K>i;i++)for(ht[i]=n<<7,t=0;t<1<=e;e++)r[e]=0;for(t=0;143>=t;)nt[2*t+1]=8,t++,r[8]++;for(;255>=t;)nt[2*t+1]=9,t++,r[9]++;for(;279>=t;)nt[2*t+1]=7,t++,r[7]++;for(;287>=t;)nt[2*t+1]=8,t++,r[8]++;for(f(nt,M+1,r),t=0;K>t;t++)rt[2*t+1]=5,rt[2*t]=l(t,5);dt=new ut(nt,$,j+1,M,q),ft=new ut(rt,tt,0,K,q),_t=new ut(new Array(0),et,0,P,X)}function u(t){var e;for(e=0;M>e;e++)t.dyn_ltree[2*e]=0;for(e=0;K>e;e++)t.dyn_dtree[2*e]=0;for(e=0;P>e;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*W]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function c(t){t.bi_valid>8?r(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function b(t,e,a,i){c(t),i&&(r(t,a),r(t,~a)),R.arraySet(t.pending_buf,t.window,e,a,t.pending),t.pending+=a}function g(t,e,a,i){var n=2*e,r=2*a;return t[n]a;a++)0!==r[2*a]?(t.heap[++t.heap_len]=h=a,t.depth[a]=0):r[2*a+1]=0;for(;t.heap_len<2;)n=t.heap[++t.heap_len]=2>h?++h:0,r[2*n]=1,t.depth[n]=0,t.opt_len--,o&&(t.static_len-=s[2*n+1]);for(e.max_code=h,a=t.heap_len>>1;a>=1;a--)m(t,r,a);n=l;do a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],m(t,r,1),i=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=i,r[2*n]=r[2*a]+r[2*i],t.depth[n]=(t.depth[a]>=t.depth[i]?t.depth[a]:t.depth[i])+1,r[2*a+1]=r[2*i+1]=n,t.heap[1]=n++,m(t,r,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],d(t,e),f(r,h,t.bl_count)}function v(t,e,a){var i,n,r=-1,s=e[1],o=0,l=7,h=4;for(0===s&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;a>=i;i++)n=s,s=e[2*(i+1)+1],++oo?t.bl_tree[2*n]+=o:0!==n?(n!==r&&t.bl_tree[2*n]++,t.bl_tree[2*J]++):10>=o?t.bl_tree[2*Q]++:t.bl_tree[2*V]++,o=0,r=n,0===s?(l=138,h=3):n===s?(l=6,h=3):(l=7,h=4))}function k(t,e,a){var i,n,r=-1,l=e[1],h=0,d=7,f=4;for(0===l&&(d=138,f=3),i=0;a>=i;i++)if(n=l,l=e[2*(i+1)+1],!(++hh){do o(t,n,t.bl_tree);while(0!==--h)}else 0!==n?(n!==r&&(o(t,n,t.bl_tree),h--),o(t,J,t.bl_tree),s(t,h-3,2)):10>=h?(o(t,Q,t.bl_tree),s(t,h-3,3)):(o(t,V,t.bl_tree),s(t,h-11,7));h=0,r=n,0===l?(d=138,f=3):n===l?(d=6,f=3):(d=7,f=4)}}function x(t){var e;for(v(t,t.dyn_ltree,t.l_desc.max_code),v(t,t.dyn_dtree,t.d_desc.max_code),p(t,t.bl_desc),e=P-1;e>=3&&0===t.bl_tree[2*at[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}function y(t,e,a,i){var n;for(s(t,e-257,5),s(t,a-1,5),s(t,i-4,4),n=0;i>n;n++)s(t,t.bl_tree[2*at[n]+1],3);k(t,t.dyn_ltree,e-1),k(t,t.dyn_dtree,a-1)}function z(t){var e,a=4093624447;for(e=0;31>=e;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return N;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return I;for(e=32;j>e;e++)if(0!==t.dyn_ltree[2*e])return I;return N}function B(t){bt||(_(),bt=!0),t.l_desc=new ct(t.dyn_ltree,dt),t.d_desc=new ct(t.dyn_dtree,ft),t.bl_desc=new ct(t.bl_tree,_t),t.bi_buf=0,t.bi_valid=0,u(t)}function S(t,e,a,i){s(t,(T<<1)+(i?1:0),3),b(t,e,a,!0)}function E(t){s(t,U<<1,3),o(t,W,nt),h(t)}function A(t,e,a,i){var n,r,o=0;t.level>0?(t.strm.data_type===O&&(t.strm.data_type=z(t)),p(t,t.l_desc),p(t,t.d_desc),o=x(t),n=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,n>=r&&(n=r)):n=r=a+5,n>=a+4&&-1!==e?S(t,e,a,i):t.strategy===C||r===n?(s(t,(U<<1)+(i?1:0),3),w(t,nt,rt)):(s(t,(D<<1)+(i?1:0),3),y(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),w(t,t.dyn_ltree,t.dyn_dtree)),u(t),i&&c(t)}function Z(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(ot[a]+j+1)]++,t.dyn_dtree[2*n(e)]++),t.last_lit===t.lit_bufsize-1}var R=t("../utils/common"),C=4,N=0,I=1,O=2,T=0,U=1,D=2,F=3,L=258,H=29,j=256,M=j+1+H,K=30,P=19,Y=2*M+1,q=15,G=16,X=7,W=256,J=16,Q=17,V=18,$=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],tt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],et=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],at=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],it=512,nt=new Array(2*(M+2));i(nt);var rt=new Array(2*K);i(rt);var st=new Array(it);i(st);var ot=new Array(L-F+1);i(ot);var lt=new Array(H);i(lt);var ht=new Array(K);i(ht);var dt,ft,_t,ut=function(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length},ct=function(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e},bt=!1;a._tr_init=B,a._tr_stored_block=S,a._tr_flush_block=A,a._tr_tally=Z,a._tr_align=E},{"../utils/common":3}],15:[function(t,e,a){"use strict";function i(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}e.exports=i},{}],"/":[function(t,e,a){"use strict";var i=t("./lib/utils/common").assign,n=t("./lib/deflate"),r=t("./lib/inflate"),s=t("./lib/zlib/constants"),o={};i(o,n,r,s),e.exports=o},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")}); diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako_deflate.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako_deflate.js deleted file mode 100644 index 23bea42c7..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako_deflate.js +++ /dev/null @@ -1,3762 +0,0 @@ -/* pako 0.2.7 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254]=_utf8len[254]=1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) { - c2 = str.charCodeAt(m_pos+1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i=0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) { - c2 = str.charCodeAt(m_pos+1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // use fallback for big arrays to avoid stack overflow - if (len < 65537) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i=0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function(buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function(str) { - var buf = new utils.Buf8(str.length); - for (var i=0, len=buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len*2); - - for (out=0, i=0; i 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function(buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max-1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Fuckup - very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means vuffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; - -},{"./common":1}],3:[function(require,module,exports){ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It doesn't worth to make additional optimizationa as in original. -// Small size is preferable. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; - -},{}],4:[function(require,module,exports){ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n =0; n < 256; n++) { - c = n; - for (var k =0; k < 8; k++) { - c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc = crc ^ (-1); - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; - -},{}],5:[function(require,module,exports){ -'use strict'; - -var utils = require('../utils/common'); -var trees = require('./trees'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var msg = require('./messages'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -var Z_NO_FLUSH = 0; -var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -//var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -//var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -//var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - - -/* compression levels */ -//var Z_NO_COMPRESSION = 0; -//var Z_BEST_SPEED = 1; -//var Z_BEST_COMPRESSION = 9; -var Z_DEFAULT_COMPRESSION = -1; - - -var Z_FILTERED = 1; -var Z_HUFFMAN_ONLY = 2; -var Z_RLE = 3; -var Z_FIXED = 4; -var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -//var Z_BINARY = 0; -//var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - - -/* The deflate compression method */ -var Z_DEFLATED = 8; - -/*============================================================================*/ - - -var MAX_MEM_LEVEL = 9; -/* Maximum value for memLevel in deflateInit2 */ -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_MEM_LEVEL = 8; - - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ -var LITERALS = 256; -/* number of literal bytes 0..255 */ -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ -var D_CODES = 30; -/* number of distance codes */ -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ -var HEAP_SIZE = 2*L_CODES + 1; -/* maximum heap size */ -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); - -var PRESET_DICT = 0x20; - -var INIT_STATE = 42; -var EXTRA_STATE = 69; -var NAME_STATE = 73; -var COMMENT_STATE = 91; -var HCRC_STATE = 103; -var BUSY_STATE = 113; -var FINISH_STATE = 666; - -var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ -var BS_BLOCK_DONE = 2; /* block flush performed */ -var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ -var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ - -var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. - -function err(strm, errorCode) { - strm.msg = msg[errorCode]; - return errorCode; -} - -function rank(f) { - return ((f) << 1) - ((f) > 4 ? 9 : 0); -} - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->output buffer and copying into it. - * (See also read_buf()). - */ -function flush_pending(strm) { - var s = strm.state; - - //_tr_flush_bits(s); - var len = s.pending; - if (len > strm.avail_out) { - len = strm.avail_out; - } - if (len === 0) { return; } - - utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); - strm.next_out += len; - s.pending_out += len; - strm.total_out += len; - strm.avail_out -= len; - s.pending -= len; - if (s.pending === 0) { - s.pending_out = 0; - } -} - - -function flush_block_only (s, last) { - trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); - s.block_start = s.strstart; - flush_pending(s.strm); -} - - -function put_byte(s, b) { - s.pending_buf[s.pending++] = b; -} - - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. - */ -function putShortMSB(s, b) { -// put_byte(s, (Byte)(b >> 8)); -// put_byte(s, (Byte)(b & 0xff)); - s.pending_buf[s.pending++] = (b >>> 8) & 0xff; - s.pending_buf[s.pending++] = b & 0xff; -} - - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->input buffer and copying from it. - * (See also flush_pending()). - */ -function read_buf(strm, buf, start, size) { - var len = strm.avail_in; - - if (len > size) { len = size; } - if (len === 0) { return 0; } - - strm.avail_in -= len; - - utils.arraySet(buf, strm.input, strm.next_in, len, start); - if (strm.state.wrap === 1) { - strm.adler = adler32(strm.adler, buf, len, start); - } - - else if (strm.state.wrap === 2) { - strm.adler = crc32(strm.adler, buf, len, start); - } - - strm.next_in += len; - strm.total_in += len; - - return len; -} - - -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. - */ -function longest_match(s, cur_match) { - var chain_length = s.max_chain_length; /* max hash chain length */ - var scan = s.strstart; /* current string */ - var match; /* matched string */ - var len; /* length of current match */ - var best_len = s.prev_length; /* best match length so far */ - var nice_match = s.nice_match; /* stop if match long enough */ - var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? - s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; - - var _win = s.window; // shortcut - - var wmask = s.w_mask; - var prev = s.prev; - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - - var strend = s.strstart + MAX_MATCH; - var scan_end1 = _win[scan + best_len - 1]; - var scan_end = _win[scan + best_len]; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s.prev_length >= s.good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if (nice_match > s.lookahead) { nice_match = s.lookahead; } - - // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - do { - // Assert(cur_match < s->strstart, "no future"); - match = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2. Note that the checks below - * for insufficient lookahead only occur occasionally for performance - * reasons. Therefore uninitialized memory will be accessed, and - * conditional jumps will be made that depend on those values. - * However the length of the match is limited to the lookahead, so - * the output of deflate is not affected by the uninitialized values. - */ - - if (_win[match + best_len] !== scan_end || - _win[match + best_len - 1] !== scan_end1 || - _win[match] !== _win[scan] || - _win[++match] !== _win[scan + 1]) { - continue; - } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2; - match++; - // Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - /*jshint noempty:false*/ - } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - scan < strend); - - // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - - if (len > best_len) { - s.match_start = cur_match; - best_len = len; - if (len >= nice_match) { - break; - } - scan_end1 = _win[scan + best_len - 1]; - scan_end = _win[scan + best_len]; - } - } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); - - if (best_len <= s.lookahead) { - return best_len; - } - return s.lookahead; -} - - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -function fill_window(s) { - var _w_size = s.w_size; - var p, n, m, more, str; - - //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = s.window_size - s.lookahead - s.strstart; - - // JS ints have 32 bit, block below not needed - /* Deal with !@#$% 64K limit: */ - //if (sizeof(int) <= 2) { - // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - // more = wsize; - // - // } else if (more == (unsigned)(-1)) { - // /* Very unlikely, but possible on 16 bit machine if - // * strstart == 0 && lookahead == 1 (input done a byte at time) - // */ - // more--; - // } - //} - - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { - - utils.arraySet(s.window, s.window, _w_size, _w_size, 0); - s.match_start -= _w_size; - s.strstart -= _w_size; - /* we now have strstart >= MAX_DIST */ - s.block_start -= _w_size; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - - n = s.hash_size; - p = n; - do { - m = s.head[--p]; - s.head[p] = (m >= _w_size ? m - _w_size : 0); - } while (--n); - - n = _w_size; - p = n; - do { - m = s.prev[--p]; - s.prev[p] = (m >= _w_size ? m - _w_size : 0); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); - - more += _w_size; - } - if (s.strm.avail_in === 0) { - break; - } - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - //Assert(more >= 2, "more < 2"); - n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); - s.lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s.lookahead + s.insert >= MIN_MATCH) { - str = s.strstart - s.insert; - s.ins_h = s.window[str]; - - /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; -//#if MIN_MATCH != 3 -// Call update_hash() MIN_MATCH-3 more times -//#endif - while (s.insert) { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH-1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = str; - str++; - s.insert--; - if (s.lookahead + s.insert < MIN_MATCH) { - break; - } - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ -// if (s.high_water < s.window_size) { -// var curr = s.strstart + s.lookahead; -// var init = 0; -// -// if (s.high_water < curr) { -// /* Previous high water mark below current data -- zero WIN_INIT -// * bytes or up to end of window, whichever is less. -// */ -// init = s.window_size - curr; -// if (init > WIN_INIT) -// init = WIN_INIT; -// zmemzero(s->window + curr, (unsigned)init); -// s->high_water = curr + init; -// } -// else if (s->high_water < (ulg)curr + WIN_INIT) { -// /* High water mark at or above current data, but below current data -// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up -// * to end of window, whichever is less. -// */ -// init = (ulg)curr + WIN_INIT - s->high_water; -// if (init > s->window_size - s->high_water) -// init = s->window_size - s->high_water; -// zmemzero(s->window + s->high_water, (unsigned)init); -// s->high_water += init; -// } -// } -// -// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, -// "not enough room for search"); -} - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. - */ -function deflate_stored(s, flush) { - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: - */ - var max_block_size = 0xffff; - - if (max_block_size > s.pending_buf_size - 5) { - max_block_size = s.pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s.lookahead <= 1) { - - //Assert(s->strstart < s->w_size+MAX_DIST(s) || - // s->block_start >= (long)s->w_size, "slide too late"); -// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || -// s.block_start >= s.w_size)) { -// throw new Error("slide too late"); -// } - - fill_window(s); - if (s.lookahead === 0 && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - - if (s.lookahead === 0) { - break; - } - /* flush the current block */ - } - //Assert(s->block_start >= 0L, "block gone"); -// if (s.block_start < 0) throw new Error("block gone"); - - s.strstart += s.lookahead; - s.lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - var max_start = s.block_start + max_block_size; - - if (s.strstart === 0 || s.strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s.lookahead = s.strstart - max_start; - s.strstart = max_start; - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - - - } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: - */ - if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - - s.insert = 0; - - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - - if (s.strstart > s.block_start) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_NEED_MORE; -} - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ -function deflate_fast(s, flush) { - var hash_head; /* head of the hash chain */ - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; /* flush the current block */ - } - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - } - if (s.match_length >= MIN_MATCH) { - // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only - - /*** _tr_tally_dist(s, s.strstart - s.match_start, - s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { - s.match_length--; /* string at strstart already in table */ - do { - s.strstart++; - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s.match_length !== 0); - s.strstart++; - } else - { - s.strstart += s.match_length; - s.match_length = 0; - s.ins_h = s.window[s.strstart]; - /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; - -//#if MIN_MATCH != 3 -// Call UPDATE_HASH() MIN_MATCH-3 more times -//#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s.window[s.strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = ((s.strstart < (MIN_MATCH-1)) ? s.strstart : MIN_MATCH-1); - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ -function deflate_slow(s, flush) { - var hash_head; /* head of hash chain */ - var bflush; /* set if current block must be flushed */ - - var max_insert; - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - */ - s.prev_length = s.match_length; - s.prev_match = s.match_start; - s.match_length = MIN_MATCH-1; - - if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && - s.strstart - hash_head <= (s.w_size-MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - - if (s.match_length <= 5 && - (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s.match_length = MIN_MATCH-1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { - max_insert = s.strstart + s.lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - //check_match(s, s.strstart-1, s.prev_match, s.prev_length); - - /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, - s.prev_length - MIN_MATCH, bflush);***/ - bflush = trees._tr_tally(s, s.strstart - 1- s.prev_match, s.prev_length - MIN_MATCH); - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s.lookahead -= s.prev_length-1; - s.prev_length -= 2; - do { - if (++s.strstart <= max_insert) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - } while (--s.prev_length !== 0); - s.match_available = 0; - s.match_length = MIN_MATCH-1; - s.strstart++; - - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - } else if (s.match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart-1]); - - if (bflush) { - /*** FLUSH_BLOCK_ONLY(s, 0) ***/ - flush_block_only(s, false); - /***/ - } - s.strstart++; - s.lookahead--; - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s.match_available = 1; - s.strstart++; - s.lookahead--; - } - } - //Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s.match_available) { - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart-1]); - - s.match_available = 0; - } - s.insert = s.strstart < MIN_MATCH-1 ? s.strstart : MIN_MATCH-1; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_BLOCK_DONE; -} - - -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) - */ -function deflate_rle(s, flush) { - var bflush; /* set if current block must be flushed */ - var prev; /* byte at distance one to match */ - var scan, strend; /* scan goes up to strend for length of run */ - - var _win = s.window; - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s.lookahead <= MAX_MATCH) { - fill_window(s); - if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s.match_length = 0; - if (s.lookahead >= MIN_MATCH && s.strstart > 0) { - scan = s.strstart - 1; - prev = _win[scan]; - if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { - strend = s.strstart + MAX_MATCH; - do { - /*jshint noempty:false*/ - } while (prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - scan < strend); - s.match_length = MAX_MATCH - (strend - scan); - if (s.match_length > s.lookahead) { - s.match_length = s.lookahead; - } - } - //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s.match_length >= MIN_MATCH) { - //check_match(s, s.strstart, s.strstart - 1, s.match_length); - - /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - s.strstart += s.match_length; - s.match_length = 0; - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -function deflate_huff(s, flush) { - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s.lookahead === 0) { - fill_window(s); - if (s.lookahead === 0) { - if (flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s.match_length = 0; - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - s.lookahead--; - s.strstart++; - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ -var Config = function (good_length, max_lazy, nice_length, max_chain, func) { - this.good_length = good_length; - this.max_lazy = max_lazy; - this.nice_length = nice_length; - this.max_chain = max_chain; - this.func = func; -}; - -var configuration_table; - -configuration_table = [ - /* good lazy nice chain */ - new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ - new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ - new Config(4, 5, 16, 8, deflate_fast), /* 2 */ - new Config(4, 6, 32, 32, deflate_fast), /* 3 */ - - new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ - new Config(8, 16, 32, 32, deflate_slow), /* 5 */ - new Config(8, 16, 128, 128, deflate_slow), /* 6 */ - new Config(8, 32, 128, 256, deflate_slow), /* 7 */ - new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ - new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ -]; - - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -function lm_init(s) { - s.window_size = 2 * s.w_size; - - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - - /* Set the default configuration parameters: - */ - s.max_lazy_match = configuration_table[s.level].max_lazy; - s.good_match = configuration_table[s.level].good_length; - s.nice_match = configuration_table[s.level].nice_length; - s.max_chain_length = configuration_table[s.level].max_chain; - - s.strstart = 0; - s.block_start = 0; - s.lookahead = 0; - s.insert = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - s.ins_h = 0; -} - - -function DeflateState() { - this.strm = null; /* pointer back to this zlib stream */ - this.status = 0; /* as the name implies */ - this.pending_buf = null; /* output still pending */ - this.pending_buf_size = 0; /* size of pending_buf */ - this.pending_out = 0; /* next pending byte to output to the stream */ - this.pending = 0; /* nb of bytes in the pending buffer */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.gzhead = null; /* gzip header information to write */ - this.gzindex = 0; /* where in extra, name, or comment */ - this.method = Z_DEFLATED; /* can only be DEFLATED */ - this.last_flush = -1; /* value of flush param for previous deflate call */ - - this.w_size = 0; /* LZ77 window size (32K by default) */ - this.w_bits = 0; /* log2(w_size) (8..16) */ - this.w_mask = 0; /* w_size - 1 */ - - this.window = null; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. - */ - - this.window_size = 0; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - this.prev = null; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - this.head = null; /* Heads of the hash chains or NIL. */ - - this.ins_h = 0; /* hash index of string to be inserted */ - this.hash_size = 0; /* number of elements in hash table */ - this.hash_bits = 0; /* log2(hash_size) */ - this.hash_mask = 0; /* hash_size-1 */ - - this.hash_shift = 0; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - this.block_start = 0; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - this.match_length = 0; /* length of best match */ - this.prev_match = 0; /* previous match */ - this.match_available = 0; /* set if previous match exists */ - this.strstart = 0; /* start of string to insert */ - this.match_start = 0; /* start of matching string */ - this.lookahead = 0; /* number of valid bytes ahead in window */ - - this.prev_length = 0; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - this.max_chain_length = 0; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - this.max_lazy_match = 0; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ - // That's alias to max_lazy_match, don't use directly - //this.max_insert_length = 0; - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - this.level = 0; /* compression level (1..9) */ - this.strategy = 0; /* favor or force Huffman coding*/ - - this.good_match = 0; - /* Use a faster search when the previous match is longer than this */ - - this.nice_match = 0; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - - /* Didn't use ct_data typedef below to suppress compiler warning */ - - // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - // Use flat array of DOUBLE size, with interleaved fata, - // because JS does not support effective - this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); - this.dyn_dtree = new utils.Buf16((2*D_CODES+1) * 2); - this.bl_tree = new utils.Buf16((2*BL_CODES+1) * 2); - zero(this.dyn_ltree); - zero(this.dyn_dtree); - zero(this.bl_tree); - - this.l_desc = null; /* desc. for literal tree */ - this.d_desc = null; /* desc. for distance tree */ - this.bl_desc = null; /* desc. for bit length tree */ - - //ush bl_count[MAX_BITS+1]; - this.bl_count = new utils.Buf16(MAX_BITS+1); - /* number of codes at each bit length for an optimal tree */ - - //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - this.heap = new utils.Buf16(2*L_CODES+1); /* heap used to build the Huffman trees */ - zero(this.heap); - - this.heap_len = 0; /* number of elements in the heap */ - this.heap_max = 0; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - this.depth = new utils.Buf16(2*L_CODES+1); //uch depth[2*L_CODES+1]; - zero(this.depth); - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - this.l_buf = 0; /* buffer index for literals or lengths */ - - this.lit_bufsize = 0; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - this.last_lit = 0; /* running index in l_buf */ - - this.d_buf = 0; - /* Buffer index for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - this.opt_len = 0; /* bit length of current block with optimal trees */ - this.static_len = 0; /* bit length of current block with static trees */ - this.matches = 0; /* number of string matches in current block */ - this.insert = 0; /* bytes at end of window left to insert */ - - - this.bi_buf = 0; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - this.bi_valid = 0; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - - // Used for window memory init. We safely ignore it for JS. That makes - // sense only for pointers and memory check tools. - //this.high_water = 0; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ -} - - -function deflateResetKeep(strm) { - var s; - - if (!strm || !strm.state) { - return err(strm, Z_STREAM_ERROR); - } - - strm.total_in = strm.total_out = 0; - strm.data_type = Z_UNKNOWN; - - s = strm.state; - s.pending = 0; - s.pending_out = 0; - - if (s.wrap < 0) { - s.wrap = -s.wrap; - /* was made negative by deflate(..., Z_FINISH); */ - } - s.status = (s.wrap ? INIT_STATE : BUSY_STATE); - strm.adler = (s.wrap === 2) ? - 0 // crc32(0, Z_NULL, 0) - : - 1; // adler32(0, Z_NULL, 0) - s.last_flush = Z_NO_FLUSH; - trees._tr_init(s); - return Z_OK; -} - - -function deflateReset(strm) { - var ret = deflateResetKeep(strm); - if (ret === Z_OK) { - lm_init(strm.state); - } - return ret; -} - - -function deflateSetHeader(strm, head) { - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } - strm.state.gzhead = head; - return Z_OK; -} - - -function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { - if (!strm) { // === Z_NULL - return Z_STREAM_ERROR; - } - var wrap = 1; - - if (level === Z_DEFAULT_COMPRESSION) { - level = 6; - } - - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; - windowBits = -windowBits; - } - - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ - windowBits -= 16; - } - - - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { - return err(strm, Z_STREAM_ERROR); - } - - - if (windowBits === 8) { - windowBits = 9; - } - /* until 256-byte window bug fixed */ - - var s = new DeflateState(); - - strm.state = s; - s.strm = strm; - - s.wrap = wrap; - s.gzhead = null; - s.w_bits = windowBits; - s.w_size = 1 << s.w_bits; - s.w_mask = s.w_size - 1; - - s.hash_bits = memLevel + 7; - s.hash_size = 1 << s.hash_bits; - s.hash_mask = s.hash_size - 1; - s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); - - s.window = new utils.Buf8(s.w_size * 2); - s.head = new utils.Buf16(s.hash_size); - s.prev = new utils.Buf16(s.w_size); - - // Don't need mem init magic for JS. - //s.high_water = 0; /* nothing written to s->window yet */ - - s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - - s.pending_buf_size = s.lit_bufsize * 4; - s.pending_buf = new utils.Buf8(s.pending_buf_size); - - s.d_buf = s.lit_bufsize >> 1; - s.l_buf = (1 + 2) * s.lit_bufsize; - - s.level = level; - s.strategy = strategy; - s.method = method; - - return deflateReset(strm); -} - -function deflateInit(strm, level) { - return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); -} - - -function deflate(strm, flush) { - var old_flush, s; - var beg, val; // for gzip header write only - - if (!strm || !strm.state || - flush > Z_BLOCK || flush < 0) { - return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; - } - - s = strm.state; - - if (!strm.output || - (!strm.input && strm.avail_in !== 0) || - (s.status === FINISH_STATE && flush !== Z_FINISH)) { - return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); - } - - s.strm = strm; /* just in case */ - old_flush = s.last_flush; - s.last_flush = flush; - - /* Write the header */ - if (s.status === INIT_STATE) { - - if (s.wrap === 2) { // GZIP header - strm.adler = 0; //crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (!s.gzhead) { // s->gzhead == Z_NULL - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s.status = BUSY_STATE; - } - else { - put_byte(s, (s.gzhead.text ? 1 : 0) + - (s.gzhead.hcrc ? 2 : 0) + - (!s.gzhead.extra ? 0 : 4) + - (!s.gzhead.name ? 0 : 8) + - (!s.gzhead.comment ? 0 : 16) - ); - put_byte(s, s.gzhead.time & 0xff); - put_byte(s, (s.gzhead.time >> 8) & 0xff); - put_byte(s, (s.gzhead.time >> 16) & 0xff); - put_byte(s, (s.gzhead.time >> 24) & 0xff); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, s.gzhead.os & 0xff); - if (s.gzhead.extra && s.gzhead.extra.length) { - put_byte(s, s.gzhead.extra.length & 0xff); - put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); - } - if (s.gzhead.hcrc) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); - } - s.gzindex = 0; - s.status = EXTRA_STATE; - } - } - else // DEFLATE header - { - var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; - var level_flags = -1; - - if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { - level_flags = 0; - } else if (s.level < 6) { - level_flags = 1; - } else if (s.level === 6) { - level_flags = 2; - } else { - level_flags = 3; - } - header |= (level_flags << 6); - if (s.strstart !== 0) { header |= PRESET_DICT; } - header += 31 - (header % 31); - - s.status = BUSY_STATE; - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s.strstart !== 0) { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - strm.adler = 1; // adler32(0L, Z_NULL, 0); - } - } - -//#ifdef GZIP - if (s.status === EXTRA_STATE) { - if (s.gzhead.extra/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - - while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - break; - } - } - put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); - s.gzindex++; - } - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (s.gzindex === s.gzhead.extra.length) { - s.gzindex = 0; - s.status = NAME_STATE; - } - } - else { - s.status = NAME_STATE; - } - } - if (s.status === NAME_STATE) { - if (s.gzhead.name/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.name.length) { - val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.gzindex = 0; - s.status = COMMENT_STATE; - } - } - else { - s.status = COMMENT_STATE; - } - } - if (s.status === COMMENT_STATE) { - if (s.gzhead.comment/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.comment.length) { - val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.status = HCRC_STATE; - } - } - else { - s.status = HCRC_STATE; - } - } - if (s.status === HCRC_STATE) { - if (s.gzhead.hcrc) { - if (s.pending + 2 > s.pending_buf_size) { - flush_pending(strm); - } - if (s.pending + 2 <= s.pending_buf_size) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - strm.adler = 0; //crc32(0L, Z_NULL, 0); - s.status = BUSY_STATE; - } - } - else { - s.status = BUSY_STATE; - } - } -//#endif - - /* Flush as much pending output as possible */ - if (s.pending !== 0) { - flush_pending(strm); - if (strm.avail_out === 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s.last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUF_ERROR. - */ - } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && - flush !== Z_FINISH) { - return err(strm, Z_BUF_ERROR); - } - - /* User must not provide more input after the first FINISH: */ - if (s.status === FINISH_STATE && strm.avail_in !== 0) { - return err(strm, Z_BUF_ERROR); - } - - /* Start a new block or continue the current one. - */ - if (strm.avail_in !== 0 || s.lookahead !== 0 || - (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { - var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : - (s.strategy === Z_RLE ? deflate_rle(s, flush) : - configuration_table[s.level].func(s, flush)); - - if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { - s.status = FINISH_STATE; - } - if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { - if (strm.avail_out === 0) { - s.last_flush = -1; - /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate === BS_BLOCK_DONE) { - if (flush === Z_PARTIAL_FLUSH) { - trees._tr_align(s); - } - else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ - - trees._tr_stored_block(s, 0, 0, false); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush === Z_FULL_FLUSH) { - /*** CLEAR_HASH(s); ***/ /* forget history */ - zero(s.head); // Fill with NIL (= 0); - - if (s.lookahead === 0) { - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - } - } - flush_pending(strm); - if (strm.avail_out === 0) { - s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - //Assert(strm->avail_out > 0, "bug2"); - //if (strm.avail_out <= 0) { throw new Error("bug2");} - - if (flush !== Z_FINISH) { return Z_OK; } - if (s.wrap <= 0) { return Z_STREAM_END; } - - /* Write the trailer */ - if (s.wrap === 2) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - put_byte(s, (strm.adler >> 16) & 0xff); - put_byte(s, (strm.adler >> 24) & 0xff); - put_byte(s, strm.total_in & 0xff); - put_byte(s, (strm.total_in >> 8) & 0xff); - put_byte(s, (strm.total_in >> 16) & 0xff); - put_byte(s, (strm.total_in >> 24) & 0xff); - } - else - { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - if (s.wrap > 0) { s.wrap = -s.wrap; } - /* write the trailer only once! */ - return s.pending !== 0 ? Z_OK : Z_STREAM_END; -} - -function deflateEnd(strm) { - var status; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - status = strm.state.status; - if (status !== INIT_STATE && - status !== EXTRA_STATE && - status !== NAME_STATE && - status !== COMMENT_STATE && - status !== HCRC_STATE && - status !== BUSY_STATE && - status !== FINISH_STATE - ) { - return err(strm, Z_STREAM_ERROR); - } - - strm.state = null; - - return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; -} - -/* ========================================================================= - * Copy the source state to the destination state - */ -//function deflateCopy(dest, source) { -// -//} - -exports.deflateInit = deflateInit; -exports.deflateInit2 = deflateInit2; -exports.deflateReset = deflateReset; -exports.deflateResetKeep = deflateResetKeep; -exports.deflateSetHeader = deflateSetHeader; -exports.deflate = deflate; -exports.deflateEnd = deflateEnd; -exports.deflateInfo = 'pako deflate (from Nodeca project)'; - -/* Not implemented -exports.deflateBound = deflateBound; -exports.deflateCopy = deflateCopy; -exports.deflateSetDictionary = deflateSetDictionary; -exports.deflateParams = deflateParams; -exports.deflatePending = deflatePending; -exports.deflatePrime = deflatePrime; -exports.deflateTune = deflateTune; -*/ - -},{"../utils/common":1,"./adler32":3,"./crc32":4,"./messages":6,"./trees":7}],6:[function(require,module,exports){ -'use strict'; - -module.exports = { - '2': 'need dictionary', /* Z_NEED_DICT 2 */ - '1': 'stream end', /* Z_STREAM_END 1 */ - '0': '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; - -},{}],7:[function(require,module,exports){ -'use strict'; - - -var utils = require('../utils/common'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -//var Z_FILTERED = 1; -//var Z_HUFFMAN_ONLY = 2; -//var Z_RLE = 3; -var Z_FIXED = 4; -//var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -var Z_BINARY = 0; -var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - -/*============================================================================*/ - - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - -// From zutil.h - -var STORED_BLOCK = 0; -var STATIC_TREES = 1; -var DYN_TREES = 2; -/* The three kinds of block type */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -/* The minimum and maximum match lengths */ - -// From deflate.h -/* =========================================================================== - * Internal compression state. - */ - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ - -var LITERALS = 256; -/* number of literal bytes 0..255 */ - -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ - -var D_CODES = 30; -/* number of distance codes */ - -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ - -var HEAP_SIZE = 2*L_CODES + 1; -/* maximum heap size */ - -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var Buf_size = 16; -/* size of bit buffer in bi_buf */ - - -/* =========================================================================== - * Constants - */ - -var MAX_BL_BITS = 7; -/* Bit length codes must not exceed MAX_BL_BITS bits */ - -var END_BLOCK = 256; -/* end of block literal code */ - -var REP_3_6 = 16; -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ - -var REPZ_3_10 = 17; -/* repeat a zero length 3-10 times (3 bits of repeat count) */ - -var REPZ_11_138 = 18; -/* repeat a zero length 11-138 times (7 bits of repeat count) */ - -var extra_lbits = /* extra bits for each length code */ - [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; - -var extra_dbits = /* extra bits for each distance code */ - [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; - -var extra_blbits = /* extra bits for each bit length code */ - [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; - -var bl_order = - [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ - -/* =========================================================================== - * Local data. These are initialized only once. - */ - -// We pre-fill arrays with 0 to avoid uninitialized gaps - -var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ - -// !!!! Use flat array insdead of structure, Freq = i*2, Len = i*2+1 -var static_ltree = new Array((L_CODES+2) * 2); -zero(static_ltree); -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -var static_dtree = new Array(D_CODES * 2); -zero(static_dtree); -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -var _dist_code = new Array(DIST_CODE_LEN); -zero(_dist_code); -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -var _length_code = new Array(MAX_MATCH-MIN_MATCH+1); -zero(_length_code); -/* length code for each normalized match length (0 == MIN_MATCH) */ - -var base_length = new Array(LENGTH_CODES); -zero(base_length); -/* First normalized length for each code (0 = MIN_MATCH) */ - -var base_dist = new Array(D_CODES); -zero(base_dist); -/* First normalized distance for each code (0 = distance of 1) */ - - -var StaticTreeDesc = function (static_tree, extra_bits, extra_base, elems, max_length) { - - this.static_tree = static_tree; /* static tree or NULL */ - this.extra_bits = extra_bits; /* extra bits for each code or NULL */ - this.extra_base = extra_base; /* base index for extra_bits */ - this.elems = elems; /* max number of elements in the tree */ - this.max_length = max_length; /* max bit length for the codes */ - - // show if `static_tree` has data or dummy - needed for monomorphic objects - this.has_stree = static_tree && static_tree.length; -}; - - -var static_l_desc; -var static_d_desc; -var static_bl_desc; - - -var TreeDesc = function(dyn_tree, stat_desc) { - this.dyn_tree = dyn_tree; /* the dynamic tree */ - this.max_code = 0; /* largest code with non zero frequency */ - this.stat_desc = stat_desc; /* the corresponding static tree */ -}; - - - -function d_code(dist) { - return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; -} - - -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -function put_short (s, w) { -// put_byte(s, (uch)((w) & 0xff)); -// put_byte(s, (uch)((ush)(w) >> 8)); - s.pending_buf[s.pending++] = (w) & 0xff; - s.pending_buf[s.pending++] = (w >>> 8) & 0xff; -} - - -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -function send_bits(s, value, length) { - if (s.bi_valid > (Buf_size - length)) { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - put_short(s, s.bi_buf); - s.bi_buf = value >> (Buf_size - s.bi_valid); - s.bi_valid += length - Buf_size; - } else { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - s.bi_valid += length; - } -} - - -function send_code(s, c, tree) { - send_bits(s, tree[c*2]/*.Code*/, tree[c*2 + 1]/*.Len*/); -} - - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -function bi_reverse(code, len) { - var res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; -} - - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -function bi_flush(s) { - if (s.bi_valid === 16) { - put_short(s, s.bi_buf); - s.bi_buf = 0; - s.bi_valid = 0; - - } else if (s.bi_valid >= 8) { - s.pending_buf[s.pending++] = s.bi_buf & 0xff; - s.bi_buf >>= 8; - s.bi_valid -= 8; - } -} - - -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ -function gen_bitlen(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var max_code = desc.max_code; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var extra = desc.stat_desc.extra_bits; - var base = desc.stat_desc.extra_base; - var max_length = desc.stat_desc.max_length; - var h; /* heap index */ - var n, m; /* iterate over the tree elements */ - var bits; /* bit length */ - var xbits; /* extra bits */ - var f; /* frequency */ - var overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) { - s.bl_count[bits] = 0; - } - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s.heap[s.heap_max]*2 + 1]/*.Len*/ = 0; /* root of the heap */ - - for (h = s.heap_max+1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n*2 +1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n*2 + 1]/*.Len*/ = bits; - /* We overwrite tree[n].Dad which is no longer needed */ - - if (n > max_code) { continue; } /* not a leaf node */ - - s.bl_count[bits]++; - xbits = 0; - if (n >= base) { - xbits = extra[n-base]; - } - f = tree[n * 2]/*.Freq*/; - s.opt_len += f * (bits + xbits); - if (has_stree) { - s.static_len += f * (stree[n*2 + 1]/*.Len*/ + xbits); - } - } - if (overflow === 0) { return; } - - // Trace((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length-1; - while (s.bl_count[bits] === 0) { bits--; } - s.bl_count[bits]--; /* move one leaf down the tree */ - s.bl_count[bits+1] += 2; /* move one overflow item as its brother */ - s.bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > max_code) { continue; } - if (tree[m*2 + 1]/*.Len*/ !== bits) { - // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s.opt_len += (bits - tree[m*2 + 1]/*.Len*/)*tree[m*2]/*.Freq*/; - tree[m*2 + 1]/*.Len*/ = bits; - } - n--; - } - } -} - - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -function gen_codes(tree, max_code, bl_count) -// ct_data *tree; /* the tree to decorate */ -// int max_code; /* largest code with non zero frequency */ -// ushf *bl_count; /* number of codes at each bit length */ -{ - var next_code = new Array(MAX_BITS+1); /* next code value for each bit length */ - var code = 0; /* running code value */ - var bits; /* bit index */ - var n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = (code + bl_count[bits-1]) << 1; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES-1; code++) { - base_length[code] = length; - for (n = 0; n < (1< dist code (0..29) */ - dist = 0; - for (code = 0 ; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1<>= 7; /* from now on, all distances are divided by 128 */ - for (; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) { - _dist_code[256 + dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: 256+dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) { - bl_count[bits] = 0; - } - - n = 0; - while (n <= 143) { - static_ltree[n*2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - while (n <= 255) { - static_ltree[n*2 + 1]/*.Len*/ = 9; - n++; - bl_count[9]++; - } - while (n <= 279) { - static_ltree[n*2 + 1]/*.Len*/ = 7; - n++; - bl_count[7]++; - } - while (n <= 287) { - static_ltree[n*2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes(static_ltree, L_CODES+1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n*2 + 1]/*.Len*/ = 5; - static_dtree[n*2]/*.Code*/ = bi_reverse(n, 5); - } - - // Now data ready and we can init static trees - static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS); - static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); - static_bl_desc =new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); - - //static_init_done = true; -} - - -/* =========================================================================== - * Initialize a new block. - */ -function init_block(s) { - var n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n*2]/*.Freq*/ = 0; } - for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n*2]/*.Freq*/ = 0; } - for (n = 0; n < BL_CODES; n++) { s.bl_tree[n*2]/*.Freq*/ = 0; } - - s.dyn_ltree[END_BLOCK*2]/*.Freq*/ = 1; - s.opt_len = s.static_len = 0; - s.last_lit = s.matches = 0; -} - - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -function bi_windup(s) -{ - if (s.bi_valid > 8) { - put_short(s, s.bi_buf); - } else if (s.bi_valid > 0) { - //put_byte(s, (Byte)s->bi_buf); - s.pending_buf[s.pending++] = s.bi_buf; - } - s.bi_buf = 0; - s.bi_valid = 0; -} - -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -function copy_block(s, buf, len, header) -//DeflateState *s; -//charf *buf; /* the input data */ -//unsigned len; /* its length */ -//int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, len); - put_short(s, ~len); - } -// while (len--) { -// put_byte(s, *buf++); -// } - utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); - s.pending += len; -} - -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -function smaller(tree, n, m, depth) { - var _n2 = n*2; - var _m2 = m*2; - return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || - (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); -} - -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -function pqdownheap(s, tree, k) -// deflate_state *s; -// ct_data *tree; /* the tree to restore */ -// int k; /* node to move down */ -{ - var v = s.heap[k]; - var j = k << 1; /* left son of k */ - while (j <= s.heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s.heap_len && - smaller(tree, s.heap[j+1], s.heap[j], s.depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s.heap[j], s.depth)) { break; } - - /* Exchange v with the smallest son */ - s.heap[k] = s.heap[j]; - k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s.heap[k] = v; -} - - -// inlined manually -// var SMALLEST = 1; - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -function compress_block(s, ltree, dtree) -// deflate_state *s; -// const ct_data *ltree; /* literal tree */ -// const ct_data *dtree; /* distance tree */ -{ - var dist; /* distance of matched string */ - var lc; /* match length or unmatched char (if dist == 0) */ - var lx = 0; /* running index in l_buf */ - var code; /* the code to send */ - var extra; /* number of extra bits to send */ - - if (s.last_lit !== 0) { - do { - dist = (s.pending_buf[s.d_buf + lx*2] << 8) | (s.pending_buf[s.d_buf + lx*2 + 1]); - lc = s.pending_buf[s.l_buf + lx]; - lx++; - - if (dist === 0) { - send_code(s, lc, ltree); /* send a literal byte */ - //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code+LITERALS+1, ltree); /* send the length code */ - extra = extra_lbits[code]; - if (extra !== 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - //Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra !== 0) { - dist -= base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ - //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, - // "pendingBuf overflow"); - - } while (lx < s.last_lit); - } - - send_code(s, END_BLOCK, ltree); -} - - -/* =========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ -function build_tree(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var elems = desc.stat_desc.elems; - var n, m; /* iterate over heap elements */ - var max_code = -1; /* largest code with non zero frequency */ - var node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - s.heap_len = 0; - s.heap_max = HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n * 2]/*.Freq*/ !== 0) { - s.heap[++s.heap_len] = max_code = n; - s.depth[n] = 0; - - } else { - tree[n*2 + 1]/*.Len*/ = 0; - } - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s.heap_len < 2) { - node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); - tree[node * 2]/*.Freq*/ = 1; - s.depth[node] = 0; - s.opt_len--; - - if (has_stree) { - s.static_len -= stree[node*2 + 1]/*.Len*/; - } - /* node is 0 or 1 so it does not have extra bits */ - } - desc.max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - //pqremove(s, tree, n); /* n = node of least frequency */ - /*** pqremove ***/ - n = s.heap[1/*SMALLEST*/]; - s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; - pqdownheap(s, tree, 1/*SMALLEST*/); - /***/ - - m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ - - s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ - s.heap[--s.heap_max] = m; - - /* Create a new node father of n and m */ - tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; - s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; - tree[n*2 + 1]/*.Dad*/ = tree[m*2 + 1]/*.Dad*/ = node; - - /* and insert the new node in the heap */ - s.heap[1/*SMALLEST*/] = node++; - pqdownheap(s, tree, 1/*SMALLEST*/); - - } while (s.heap_len >= 2); - - s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, desc); - - /* The field len is now set, we can generate the bit codes */ - gen_codes(tree, max_code, s.bl_count); -} - - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. - */ -function scan_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0*2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code+1)*2 + 1]/*.Len*/ = 0xffff; /* guard */ - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n+1)*2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - s.bl_tree[curlen * 2]/*.Freq*/ += count; - - } else if (curlen !== 0) { - - if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } - s.bl_tree[REP_3_6*2]/*.Freq*/++; - - } else if (count <= 10) { - s.bl_tree[REPZ_3_10*2]/*.Freq*/++; - - } else { - s.bl_tree[REPZ_11_138*2]/*.Freq*/++; - } - - count = 0; - prevlen = curlen; - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ -function send_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0*2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - /* tree[max_code+1].Len = -1; */ /* guard already set */ - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n+1)*2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); - - } else if (curlen !== 0) { - if (curlen !== prevlen) { - send_code(s, curlen, s.bl_tree); - count--; - } - //Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s.bl_tree); - send_bits(s, count-3, 2); - - } else if (count <= 10) { - send_code(s, REPZ_3_10, s.bl_tree); - send_bits(s, count-3, 3); - - } else { - send_code(s, REPZ_11_138, s.bl_tree); - send_bits(s, count-11, 7); - } - - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -function build_bl_tree(s) { - var max_blindex; /* index of last bit length code of non zero freq */ - - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, s.dyn_ltree, s.l_desc.max_code); - scan_tree(s, s.dyn_dtree, s.d_desc.max_code); - - /* Build the bit length tree: */ - build_tree(s, s.bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { - if (s.bl_tree[bl_order[max_blindex]*2 + 1]/*.Len*/ !== 0) { - break; - } - } - /* Update opt_len to include the bit length tree and counts */ - s.opt_len += 3*(max_blindex+1) + 5+5+4; - //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - // s->opt_len, s->static_len)); - - return max_blindex; -} - - -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -function send_all_trees(s, lcodes, dcodes, blcodes) -// deflate_state *s; -// int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - var rank; /* index in bl_order */ - - //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - // "too many codes"); - //Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes-1, 5); - send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s.bl_tree[bl_order[rank]*2 + 1]/*.Len*/, 3); - } - //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_ltree, lcodes-1); /* literal tree */ - //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_dtree, dcodes-1); /* distance tree */ - //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} - - -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "black list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -function detect_data_type(s) { - /* black_mask is the bit mask of black-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - var black_mask = 0xf3ffc07f; - var n; - - /* Check for non-textual ("black-listed") bytes. */ - for (n = 0; n <= 31; n++, black_mask >>>= 1) { - if ((black_mask & 1) && (s.dyn_ltree[n*2]/*.Freq*/ !== 0)) { - return Z_BINARY; - } - } - - /* Check for textual ("white-listed") bytes. */ - if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || - s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - for (n = 32; n < LITERALS; n++) { - if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - } - - /* There are no "black-listed" or "white-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - - -var static_init_done = false; - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -function _tr_init(s) -{ - - if (!static_init_done) { - tr_static_init(); - static_init_done = true; - } - - s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); - s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); - s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); - - s.bi_buf = 0; - s.bi_valid = 0; - - /* Initialize the first block of the first file: */ - init_block(s); -} - - -/* =========================================================================== - * Send a stored block - */ -function _tr_stored_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - send_bits(s, (STORED_BLOCK<<1)+(last ? 1 : 0), 3); /* send block type */ - copy_block(s, buf, stored_len, true); /* with header */ -} - - -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - */ -function _tr_align(s) { - send_bits(s, STATIC_TREES<<1, 3); - send_code(s, END_BLOCK, static_ltree); - bi_flush(s); -} - - -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ -function _tr_flush_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block, or NULL if too old */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - var max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s.level > 0) { - - /* Check if the file is binary or text */ - if (s.strm.data_type === Z_UNKNOWN) { - s.strm.data_type = detect_data_type(s); - } - - /* Construct the literal and distance trees */ - build_tree(s, s.l_desc); - // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - - build_tree(s, s.d_desc); - // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); - - /* Determine the best encoding. Compute the block lengths in bytes. */ - opt_lenb = (s.opt_len+3+7) >>> 3; - static_lenb = (s.static_len+3+7) >>> 3; - - // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - // s->last_lit)); - - if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } - - } else { - // Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } - - if ((stored_len+4 <= opt_lenb) && (buf !== -1)) { - /* 4: two words for the lengths */ - - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, last); - - } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { - - send_bits(s, (STATIC_TREES<<1) + (last ? 1 : 0), 3); - compress_block(s, static_ltree, static_dtree); - - } else { - send_bits(s, (DYN_TREES<<1) + (last ? 1 : 0), 3); - send_all_trees(s, s.l_desc.max_code+1, s.d_desc.max_code+1, max_blindex+1); - compress_block(s, s.dyn_ltree, s.dyn_dtree); - } - // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. - */ - init_block(s); - - if (last) { - bi_windup(s); - } - // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - // s->compressed_len-7*last)); -} - -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -function _tr_tally(s, dist, lc) -// deflate_state *s; -// unsigned dist; /* distance of matched string */ -// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - //var out_length, in_length, dcode; - - s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; - s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; - - s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; - s.last_lit++; - - if (dist === 0) { - /* lc is the unmatched char */ - s.dyn_ltree[lc*2]/*.Freq*/++; - } else { - s.matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - //Assert((ush)dist < (ush)MAX_DIST(s) && - // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++; - s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; - } - -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility - -//#ifdef TRUNCATE_BLOCK -// /* Try to guess if it is profitable to stop the current block here */ -// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { -// /* Compute an upper bound for the compressed length */ -// out_length = s.last_lit*8; -// in_length = s.strstart - s.block_start; -// -// for (dcode = 0; dcode < D_CODES; dcode++) { -// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); -// } -// out_length >>>= 3; -// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", -// // s->last_lit, in_length, out_length, -// // 100L - out_length*100L/in_length)); -// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { -// return true; -// } -// } -//#endif - - return (s.last_lit === s.lit_bufsize-1); - /* We avoid equality with lit_bufsize because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ -} - -exports._tr_init = _tr_init; -exports._tr_stored_block = _tr_stored_block; -exports._tr_flush_block = _tr_flush_block; -exports._tr_tally = _tr_tally; -exports._tr_align = _tr_align; - -},{"../utils/common":1}],8:[function(require,module,exports){ -'use strict'; - - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; - -},{}],"/lib/deflate.js":[function(require,module,exports){ -'use strict'; - - -var zlib_deflate = require('./zlib/deflate.js'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var msg = require('./zlib/messages'); -var zstream = require('./zlib/zstream'); - -var toString = Object.prototype.toString; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - -var Z_NO_FLUSH = 0; -var Z_FINISH = 4; - -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_SYNC_FLUSH = 2; - -var Z_DEFAULT_COMPRESSION = -1; - -var Z_DEFAULT_STRATEGY = 0; - -var Z_DEFLATED = 8; - -/* ===========================================================================*/ - - -/** - * class Deflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[deflate]], - * [[deflateRaw]] and [[gzip]]. - **/ - -/* internal - * Deflate.chunks -> Array - * - * Chunks of output data, if [[Deflate#onData]] not overriden. - **/ - -/** - * Deflate.result -> Uint8Array|Array - * - * Compressed result, generated by default [[Deflate#onData]] - * and [[Deflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Deflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Deflate.err -> Number - * - * Error code after deflate finished. 0 (Z_OK) on success. - * You will not need it in real life, because deflate errors - * are possible only on wrong options or bad `onData` / `onEnd` - * custom handlers. - **/ - -/** - * Deflate.msg -> String - * - * Error message, if [[Deflate.err]] != 0 - **/ - - -/** - * new Deflate(options) - * - options (Object): zlib deflate options. - * - * Creates new deflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `level` - * - `windowBits` - * - `memLevel` - * - `strategy` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw deflate - * - `gzip` (Boolean) - create gzip wrapper - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - `header` (Object) - custom header for gzip - * - `text` (Boolean) - true if compressed data believed to be text - * - `time` (Number) - modification time, unix timestamp - * - `os` (Number) - operation system code - * - `extra` (Array) - array of bytes with extra data (max 65536) - * - `name` (String) - file name (binary string) - * - `comment` (String) - comment (binary string) - * - `hcrc` (Boolean) - true if header crc should be added - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var deflate = new pako.Deflate({ level: 3}); - * - * deflate.push(chunk1, false); - * deflate.push(chunk2, true); // true -> last chunk - * - * if (deflate.err) { throw new Error(deflate.err); } - * - * console.log(deflate.result); - * ``` - **/ -var Deflate = function(options) { - - this.options = utils.assign({ - level: Z_DEFAULT_COMPRESSION, - method: Z_DEFLATED, - chunkSize: 16384, - windowBits: 15, - memLevel: 8, - strategy: Z_DEFAULT_STRATEGY, - to: '' - }, options || {}); - - var opt = this.options; - - if (opt.raw && (opt.windowBits > 0)) { - opt.windowBits = -opt.windowBits; - } - - else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { - opt.windowBits += 16; - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new zstream(); - this.strm.avail_out = 0; - - var status = zlib_deflate.deflateInit2( - this.strm, - opt.level, - opt.method, - opt.windowBits, - opt.memLevel, - opt.strategy - ); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - if (opt.header) { - zlib_deflate.deflateSetHeader(this.strm, opt.header); - } -}; - -/** - * Deflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be - * converted to utf8 byte sequence. - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH. - * - * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with - * new compressed chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the compression context. - * - * On fail call [[Deflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * array format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Deflate.prototype.push = function(data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - - if (this.ended) { return false; } - - _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // If we need to compress text, change encoding to utf8. - strm.input = strings.string2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ - - if (status !== Z_STREAM_END && status !== Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { - if (this.options.to === 'string') { - this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); - - // Finalize on the last chunk. - if (_mode === Z_FINISH) { - status = zlib_deflate.deflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === Z_SYNC_FLUSH) { - this.onEnd(Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Deflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): ouput data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Deflate.prototype.onData = function(chunk) { - this.chunks.push(chunk); -}; - - -/** - * Deflate#onEnd(status) -> Void - * - status (Number): deflate status. 0 (Z_OK) on success, - * other if not. - * - * Called once after you tell deflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Deflate.prototype.onEnd = function(status) { - // On success - join - if (status === Z_OK) { - if (this.options.to === 'string') { - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * deflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * Compress `data` with deflate alrorythm and `options`. - * - * Supported options are: - * - * - level - * - windowBits - * - memLevel - * - strategy - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); - * - * console.log(pako.deflate(data)); - * ``` - **/ -function deflate(input, options) { - var deflator = new Deflate(options); - - deflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (deflator.err) { throw deflator.msg; } - - return deflator.result; -} - - -/** - * deflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function deflateRaw(input, options) { - options = options || {}; - options.raw = true; - return deflate(input, options); -} - - -/** - * gzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but create gzip wrapper instead of - * deflate one. - **/ -function gzip(input, options) { - options = options || {}; - options.gzip = true; - return deflate(input, options); -} - - -exports.Deflate = Deflate; -exports.deflate = deflate; -exports.deflateRaw = deflateRaw; -exports.gzip = gzip; - -},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate.js":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js") -}); \ No newline at end of file diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako_deflate.min.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako_deflate.min.js deleted file mode 100644 index df8d4183c..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako_deflate.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* pako 0.2.7 nodeca/pako */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.pako=t()}}(function(){return function t(e,a,n){function r(s,h){if(!a[s]){if(!e[s]){var l="function"==typeof require&&require;if(!h&&l)return l(s,!0);if(i)return i(s,!0);var o=new Error("Cannot find module '"+s+"'");throw o.code="MODULE_NOT_FOUND",o}var _=a[s]={exports:{}};e[s][0].call(_.exports,function(t){var a=e[s][1][t];return r(a?a:t)},_,_.exports,t,e,a,n)}return a[s].exports}for(var i="function"==typeof require&&require,s=0;si;i++)t[r+i]=e[a+i]},flattenChunks:function(t){var e,a,n,r,i,s;for(n=0,e=0,a=t.length;a>e;e++)n+=t[e].length;for(s=new Uint8Array(n),r=0,e=0,a=t.length;a>e;e++)i=t[e],s.set(i,r),r+=i.length;return s}},i={arraySet:function(t,e,a,n,r){for(var i=0;n>i;i++)t[r+i]=e[a+i]},flattenChunks:function(t){return[].concat.apply([],t)}};a.setTyped=function(t){t?(a.Buf8=Uint8Array,a.Buf16=Uint16Array,a.Buf32=Int32Array,a.assign(a,r)):(a.Buf8=Array,a.Buf16=Array,a.Buf32=Array,a.assign(a,i))},a.setTyped(n)},{}],2:[function(t,e,a){"use strict";function n(t,e){if(65537>e&&(t.subarray&&s||!t.subarray&&i))return String.fromCharCode.apply(null,r.shrinkBuf(t,e));for(var a="",n=0;e>n;n++)a+=String.fromCharCode(t[n]);return a}var r=t("./common"),i=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(h){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(h){s=!1}for(var l=new r.Buf8(256),o=0;256>o;o++)l[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;l[254]=l[254]=1,a.string2buf=function(t){var e,a,n,i,s,h=t.length,l=0;for(i=0;h>i;i++)a=t.charCodeAt(i),55296===(64512&a)&&h>i+1&&(n=t.charCodeAt(i+1),56320===(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),i++)),l+=128>a?1:2048>a?2:65536>a?3:4;for(e=new r.Buf8(l),s=0,i=0;l>s;i++)a=t.charCodeAt(i),55296===(64512&a)&&h>i+1&&(n=t.charCodeAt(i+1),56320===(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),i++)),128>a?e[s++]=a:2048>a?(e[s++]=192|a>>>6,e[s++]=128|63&a):65536>a?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},a.buf2binstring=function(t){return n(t,t.length)},a.binstring2buf=function(t){for(var e=new r.Buf8(t.length),a=0,n=e.length;n>a;a++)e[a]=t.charCodeAt(a);return e},a.buf2string=function(t,e){var a,r,i,s,h=e||t.length,o=new Array(2*h);for(r=0,a=0;h>a;)if(i=t[a++],128>i)o[r++]=i;else if(s=l[i],s>4)o[r++]=65533,a+=s-1;else{for(i&=2===s?31:3===s?15:7;s>1&&h>a;)i=i<<6|63&t[a++],s--;s>1?o[r++]=65533:65536>i?o[r++]=i:(i-=65536,o[r++]=55296|i>>10&1023,o[r++]=56320|1023&i)}return n(o,r)},a.utf8border=function(t,e){var a;for(e=e||t.length,e>t.length&&(e=t.length),a=e-1;a>=0&&128===(192&t[a]);)a--;return 0>a?e:0===a?e:a+l[t[a]]>e?a:e}},{"./common":1}],3:[function(t,e,a){"use strict";function n(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){s=a>2e3?2e3:a,a-=s;do r=r+e[n++]|0,i=i+r|0;while(--s);r%=65521,i%=65521}return r|i<<16|0}e.exports=n},{}],4:[function(t,e,a){"use strict";function n(){for(var t,e=[],a=0;256>a;a++){t=a;for(var n=0;8>n;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}function r(t,e,a,n){var r=i,s=n+a;t=-1^t;for(var h=n;s>h;h++)t=t>>>8^r[255&(t^e[h])];return-1^t}var i=n();e.exports=r},{}],5:[function(t,e,a){"use strict";function n(t,e){return t.msg=I[e],e}function r(t){return(t<<1)-(t>4?9:0)}function i(t){for(var e=t.length;--e>=0;)t[e]=0}function s(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(S.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function h(t,e){j._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,s(t.strm)}function l(t,e){t.pending_buf[t.pending++]=e}function o(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function _(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,S.arraySet(e,t.input,t.next_in,r,a),1===t.state.wrap?t.adler=E(t.adler,e,r,a):2===t.state.wrap&&(t.adler=U(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)}function d(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-ot?t.strstart-(t.w_size-ot):0,o=t.window,_=t.w_mask,d=t.prev,u=t.strstart+lt,f=o[i+s-1],c=o[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do if(a=e,o[a+s]===c&&o[a+s-1]===f&&o[a]===o[i]&&o[++a]===o[i+1]){i+=2,a++;do;while(o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&u>i);if(n=lt-(u-i),i=u-lt,n>s){if(t.match_start=e,s=n,n>=h)break;f=o[i+s-1],c=o[i+s]}}while((e=d[e&_])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead}function u(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-ot)){S.arraySet(t.window,t.window,s,s,0),t.match_start-=s,t.strstart-=s,t.block_start-=s,a=t.hash_size,e=a;do n=t.head[--e],t.head[e]=n>=s?n-s:0;while(--a);a=s,e=a;do n=t.prev[--e],t.prev[e]=n>=s?n-s:0;while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=_(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=ht)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(u(t),0===t.lookahead&&e===D)return bt;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,h(t,!1),0===t.strm.avail_out))return bt;if(t.strstart-t.block_start>=t.w_size-ot&&(h(t,!1),0===t.strm.avail_out))return bt}return t.insert=0,e===T?(h(t,!0),0===t.strm.avail_out?wt:yt):t.strstart>t.block_start&&(h(t,!1),0===t.strm.avail_out)?bt:bt}function c(t,e){for(var a,n;;){if(t.lookahead=ht&&(t.ins_h=(t.ins_h<=ht)if(n=j._tr_tally(t,t.strstart-t.match_start,t.match_length-ht),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=ht){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<=ht&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=ht-1)),t.prev_length>=ht&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-ht,n=j._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-ht),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=r&&(t.ins_h=(t.ins_h<=ht&&t.strstart>0&&(r=t.strstart-1,n=s[r],n===s[++r]&&n===s[++r]&&n===s[++r])){i=t.strstart+lt;do;while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&i>r);t.match_length=lt-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=ht?(a=j._tr_tally(t,1,t.match_length-ht),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=j._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(h(t,!1),0===t.strm.avail_out))return bt}return t.insert=0,e===T?(h(t,!0),0===t.strm.avail_out?wt:yt):t.last_lit&&(h(t,!1),0===t.strm.avail_out)?bt:vt}function m(t,e){for(var a;;){if(0===t.lookahead&&(u(t),0===t.lookahead)){if(e===D)return bt;break}if(t.match_length=0,a=j._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(h(t,!1),0===t.strm.avail_out))return bt}return t.insert=0,e===T?(h(t,!0),0===t.strm.avail_out?wt:yt):t.last_lit&&(h(t,!1),0===t.strm.avail_out)?bt:vt}function b(t){t.window_size=2*t.w_size,i(t.head),t.max_lazy_match=C[t.level].max_lazy,t.good_match=C[t.level].good_length,t.nice_match=C[t.level].nice_length,t.max_chain_length=C[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=ht-1,t.match_available=0,t.ins_h=0}function v(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=X,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new S.Buf16(2*it),this.dyn_dtree=new S.Buf16(2*(2*nt+1)),this.bl_tree=new S.Buf16(2*(2*rt+1)),i(this.dyn_ltree),i(this.dyn_dtree),i(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new S.Buf16(st+1),this.heap=new S.Buf16(2*at+1),i(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new S.Buf16(2*at+1),i(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function w(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=W,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?dt:pt,t.adler=2===e.wrap?0:1,e.last_flush=D,j._tr_init(e),N):n(t,H)}function y(t){var e=w(t);return e===N&&b(t.state),e}function z(t,e){return t&&t.state?2!==t.state.wrap?H:(t.state.gzhead=e,N):H}function k(t,e,a,r,i,s){if(!t)return H;var h=1;if(e===M&&(e=6),0>r?(h=0,r=-r):r>15&&(h=2,r-=16),1>i||i>Y||a!==X||8>r||r>15||0>e||e>9||0>s||s>Q)return n(t,H);8===r&&(r=9);var l=new v;return t.state=l,l.strm=t,l.wrap=h,l.gzhead=null,l.w_bits=r,l.w_size=1<>1,l.l_buf=3*l.lit_bufsize,l.level=e,l.strategy=s,l.method=a,y(t)}function x(t,e){return k(t,e,X,Z,$,V)}function B(t,e){var a,h,_,d;if(!t||!t.state||e>L||0>e)return t?n(t,H):H;if(h=t.state,!t.output||!t.input&&0!==t.avail_in||h.status===mt&&e!==T)return n(t,0===t.avail_out?K:H);if(h.strm=t,a=h.last_flush,h.last_flush=e,h.status===dt)if(2===h.wrap)t.adler=0,l(h,31),l(h,139),l(h,8),h.gzhead?(l(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),l(h,255&h.gzhead.time),l(h,h.gzhead.time>>8&255),l(h,h.gzhead.time>>16&255),l(h,h.gzhead.time>>24&255),l(h,9===h.level?2:h.strategy>=G||h.level<2?4:0),l(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(l(h,255&h.gzhead.extra.length),l(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(t.adler=U(t.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=ut):(l(h,0),l(h,0),l(h,0),l(h,0),l(h,0),l(h,9===h.level?2:h.strategy>=G||h.level<2?4:0),l(h,zt),h.status=pt);else{var u=X+(h.w_bits-8<<4)<<8,f=-1;f=h.strategy>=G||h.level<2?0:h.level<6?1:6===h.level?2:3,u|=f<<6,0!==h.strstart&&(u|=_t),u+=31-u%31,h.status=pt,o(h,u),0!==h.strstart&&(o(h,t.adler>>>16),o(h,65535&t.adler)),t.adler=1}if(h.status===ut)if(h.gzhead.extra){for(_=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>_&&(t.adler=U(t.adler,h.pending_buf,h.pending-_,_)),s(t),_=h.pending,h.pending!==h.pending_buf_size));)l(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>_&&(t.adler=U(t.adler,h.pending_buf,h.pending-_,_)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=ft)}else h.status=ft;if(h.status===ft)if(h.gzhead.name){_=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>_&&(t.adler=U(t.adler,h.pending_buf,h.pending-_,_)),s(t),_=h.pending,h.pending===h.pending_buf_size)){d=1;break}d=h.gzindex_&&(t.adler=U(t.adler,h.pending_buf,h.pending-_,_)),0===d&&(h.gzindex=0,h.status=ct)}else h.status=ct;if(h.status===ct)if(h.gzhead.comment){_=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>_&&(t.adler=U(t.adler,h.pending_buf,h.pending-_,_)),s(t),_=h.pending,h.pending===h.pending_buf_size)){d=1;break}d=h.gzindex_&&(t.adler=U(t.adler,h.pending_buf,h.pending-_,_)),0===d&&(h.status=gt)}else h.status=gt;if(h.status===gt&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&s(t),h.pending+2<=h.pending_buf_size&&(l(h,255&t.adler),l(h,t.adler>>8&255),t.adler=0,h.status=pt)):h.status=pt),0!==h.pending){if(s(t),0===t.avail_out)return h.last_flush=-1,N}else if(0===t.avail_in&&r(e)<=r(a)&&e!==T)return n(t,K);if(h.status===mt&&0!==t.avail_in)return n(t,K);if(0!==t.avail_in||0!==h.lookahead||e!==D&&h.status!==mt){var c=h.strategy===G?m(h,e):h.strategy===J?p(h,e):C[h.level].func(h,e);if((c===wt||c===yt)&&(h.status=mt),c===bt||c===wt)return 0===t.avail_out&&(h.last_flush=-1),N;if(c===vt&&(e===O?j._tr_align(h):e!==L&&(j._tr_stored_block(h,0,0,!1),e===q&&(i(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),s(t),0===t.avail_out))return h.last_flush=-1,N}return e!==T?N:h.wrap<=0?R:(2===h.wrap?(l(h,255&t.adler),l(h,t.adler>>8&255),l(h,t.adler>>16&255),l(h,t.adler>>24&255),l(h,255&t.total_in),l(h,t.total_in>>8&255),l(h,t.total_in>>16&255),l(h,t.total_in>>24&255)):(o(h,t.adler>>>16),o(h,65535&t.adler)),s(t),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?N:R)}function A(t){var e;return t&&t.state?(e=t.state.status,e!==dt&&e!==ut&&e!==ft&&e!==ct&&e!==gt&&e!==pt&&e!==mt?n(t,H):(t.state=null,e===pt?n(t,F):N)):H}var C,S=t("../utils/common"),j=t("./trees"),E=t("./adler32"),U=t("./crc32"),I=t("./messages"),D=0,O=1,q=3,T=4,L=5,N=0,R=1,H=-2,F=-3,K=-5,M=-1,P=1,G=2,J=3,Q=4,V=0,W=2,X=8,Y=9,Z=15,$=8,tt=29,et=256,at=et+1+tt,nt=30,rt=19,it=2*at+1,st=15,ht=3,lt=258,ot=lt+ht+1,_t=32,dt=42,ut=69,ft=73,ct=91,gt=103,pt=113,mt=666,bt=1,vt=2,wt=3,yt=4,zt=3,kt=function(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r};C=[new kt(0,0,0,0,f),new kt(4,4,8,4,c),new kt(4,5,16,8,c),new kt(4,6,32,32,c),new kt(4,4,16,16,g),new kt(8,16,32,32,g),new kt(8,16,128,128,g),new kt(8,32,128,256,g),new kt(32,128,258,1024,g),new kt(32,258,258,4096,g)],a.deflateInit=x,a.deflateInit2=k,a.deflateReset=y,a.deflateResetKeep=w,a.deflateSetHeader=z,a.deflate=B,a.deflateEnd=A,a.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":4,"./messages":6,"./trees":7}],6:[function(t,e,a){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],7:[function(t,e,a){"use strict";function n(t){for(var e=t.length;--e>=0;)t[e]=0}function r(t){return 256>t?st[t]:st[256+(t>>>7)]}function i(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function s(t,e,a){t.bi_valid>Q-a?(t.bi_buf|=e<>Q-t.bi_valid,t.bi_valid+=a-Q):(t.bi_buf|=e<>>=1,a<<=1;while(--e>0);return a>>>1}function o(t){16===t.bi_valid?(i(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}function _(t,e){var a,n,r,i,s,h,l=e.dyn_tree,o=e.max_code,_=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,g=0;for(i=0;J>=i;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;G>a;a++)n=t.heap[a],i=l[2*l[2*n+1]+1]+1,i>c&&(i=c,g++),l[2*n+1]=i,n>o||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(_[2*n+1]+s)));if(0!==g){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,g-=2}while(g>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)r=t.heap[--a],r>o||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}function d(t,e,a){var n,r,i=new Array(J+1),s=0;for(n=1;J>=n;n++)i[n]=s=s+a[n-1]<<1;for(r=0;e>=r;r++){var h=t[2*r+1];0!==h&&(t[2*r]=l(i[h]++,h))}}function u(){var t,e,a,n,r,i=new Array(J+1);for(a=0,n=0;H-1>n;n++)for(lt[n]=a,t=0;t<1<<$[n];t++)ht[a++]=n;for(ht[a-1]=n,r=0,n=0;16>n;n++)for(ot[n]=r,t=0;t<1<>=7;M>n;n++)for(ot[n]=r<<7,t=0;t<1<=e;e++)i[e]=0;for(t=0;143>=t;)rt[2*t+1]=8,t++,i[8]++;for(;255>=t;)rt[2*t+1]=9,t++,i[9]++;for(;279>=t;)rt[2*t+1]=7,t++,i[7]++;for(;287>=t;)rt[2*t+1]=8,t++,i[8]++;for(d(rt,K+1,i),t=0;M>t;t++)it[2*t+1]=5,it[2*t]=l(t,5);_t=new ft(rt,$,F+1,K,J),dt=new ft(it,tt,0,M,J),ut=new ft(new Array(0),et,0,P,V)}function f(t){var e;for(e=0;K>e;e++)t.dyn_ltree[2*e]=0;for(e=0;M>e;e++)t.dyn_dtree[2*e]=0;for(e=0;P>e;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*W]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function c(t){t.bi_valid>8?i(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function g(t,e,a,n){c(t),n&&(i(t,a),i(t,~a)),E.arraySet(t.pending_buf,t.window,e,a,t.pending),t.pending+=a}function p(t,e,a,n){var r=2*e,i=2*a;return t[r]a;a++)0!==i[2*a]?(t.heap[++t.heap_len]=o=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)r=t.heap[++t.heap_len]=2>o?++o:0,i[2*r]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=o,a=t.heap_len>>1;a>=1;a--)m(t,i,a);r=l;do a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],m(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,m(t,i,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],_(t,e),d(i,o,t.bl_count)}function w(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,o=4;for(0===s&&(l=138,o=3),e[2*(a+1)+1]=65535,n=0;a>=n;n++)r=s,s=e[2*(n+1)+1],++hh?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[2*X]++):10>=h?t.bl_tree[2*Y]++:t.bl_tree[2*Z]++,h=0,i=r,0===s?(l=138,o=3):r===s?(l=6,o=3):(l=7,o=4))}function y(t,e,a){var n,r,i=-1,l=e[1],o=0,_=7,d=4;for(0===l&&(_=138,d=3),n=0;a>=n;n++)if(r=l,l=e[2*(n+1)+1],!(++o<_&&r===l)){if(d>o){do h(t,r,t.bl_tree);while(0!==--o)}else 0!==r?(r!==i&&(h(t,r,t.bl_tree),o--),h(t,X,t.bl_tree),s(t,o-3,2)):10>=o?(h(t,Y,t.bl_tree),s(t,o-3,3)):(h(t,Z,t.bl_tree),s(t,o-11,7));o=0,i=r,0===l?(_=138,d=3):r===l?(_=6,d=3):(_=7,d=4)}}function z(t){var e;for(w(t,t.dyn_ltree,t.l_desc.max_code),w(t,t.dyn_dtree,t.d_desc.max_code),v(t,t.bl_desc),e=P-1;e>=3&&0===t.bl_tree[2*at[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}function k(t,e,a,n){var r;for(s(t,e-257,5),s(t,a-1,5),s(t,n-4,4),r=0;n>r;r++)s(t,t.bl_tree[2*at[r]+1],3);y(t,t.dyn_ltree,e-1),y(t,t.dyn_dtree,a-1)}function x(t){var e,a=4093624447;for(e=0;31>=e;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return I;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return D;for(e=32;F>e;e++)if(0!==t.dyn_ltree[2*e])return D;return I}function B(t){gt||(u(),gt=!0),t.l_desc=new ct(t.dyn_ltree,_t),t.d_desc=new ct(t.dyn_dtree,dt),t.bl_desc=new ct(t.bl_tree,ut),t.bi_buf=0,t.bi_valid=0,f(t)}function A(t,e,a,n){s(t,(q<<1)+(n?1:0),3),g(t,e,a,!0)}function C(t){s(t,T<<1,3),h(t,W,rt),o(t)}function S(t,e,a,n){var r,i,h=0;t.level>0?(t.strm.data_type===O&&(t.strm.data_type=x(t)),v(t,t.l_desc),v(t,t.d_desc),h=z(t),r=t.opt_len+3+7>>>3,i=t.static_len+3+7>>>3,r>=i&&(r=i)):r=i=a+5,r>=a+4&&-1!==e?A(t,e,a,n):t.strategy===U||i===r?(s(t,(T<<1)+(n?1:0),3),b(t,rt,it)):(s(t,(L<<1)+(n?1:0),3),k(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),b(t,t.dyn_ltree,t.dyn_dtree)),f(t),n&&c(t)}function j(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(ht[a]+F+1)]++,t.dyn_dtree[2*r(e)]++),t.last_lit===t.lit_bufsize-1}var E=t("../utils/common"),U=4,I=0,D=1,O=2,q=0,T=1,L=2,N=3,R=258,H=29,F=256,K=F+1+H,M=30,P=19,G=2*K+1,J=15,Q=16,V=7,W=256,X=16,Y=17,Z=18,$=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],tt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],et=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],at=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],nt=512,rt=new Array(2*(K+2));n(rt);var it=new Array(2*M);n(it);var st=new Array(nt);n(st);var ht=new Array(R-N+1);n(ht);var lt=new Array(H);n(lt);var ot=new Array(M);n(ot);var _t,dt,ut,ft=function(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length},ct=function(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e},gt=!1;a._tr_init=B,a._tr_stored_block=A,a._tr_flush_block=S,a._tr_tally=j,a._tr_align=C},{"../utils/common":1}],8:[function(t,e,a){"use strict";function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}e.exports=n},{}],"/lib/deflate.js":[function(t,e,a){"use strict";function n(t,e){var a=new w(e);if(a.push(t,!0),a.err)throw a.msg;return a.result}function r(t,e){return e=e||{},e.raw=!0,n(t,e)}function i(t,e){return e=e||{},e.gzip=!0,n(t,e)}var s=t("./zlib/deflate.js"),h=t("./utils/common"),l=t("./utils/strings"),o=t("./zlib/messages"),_=t("./zlib/zstream"),d=Object.prototype.toString,u=0,f=4,c=0,g=1,p=2,m=-1,b=0,v=8,w=function(t){this.options=h.assign({level:m,method:v,chunkSize:16384,windowBits:15,memLevel:8,strategy:b,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new _,this.strm.avail_out=0;var a=s.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==c)throw new Error(o[a]);e.header&&s.deflateSetHeader(this.strm,e.header)};w.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;n=e===~~e?e:e===!0?f:u,"string"==typeof t?r.input=l.string2buf(t):"[object ArrayBuffer]"===d.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(0===r.avail_out&&(r.output=new h.Buf8(i),r.next_out=0,r.avail_out=i),a=s.deflate(r,n),a!==g&&a!==c)return this.onEnd(a),this.ended=!0,!1;(0===r.avail_out||0===r.avail_in&&(n===f||n===p))&&this.onData("string"===this.options.to?l.buf2binstring(h.shrinkBuf(r.output,r.next_out)):h.shrinkBuf(r.output,r.next_out))}while((r.avail_in>0||0===r.avail_out)&&a!==g);return n===f?(a=s.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===c):n===p?(this.onEnd(c),r.avail_out=0,!0):!0},w.prototype.onData=function(t){this.chunks.push(t)},w.prototype.onEnd=function(t){t===c&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=h.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Deflate=w,a.deflate=n,a.deflateRaw=r,a.gzip=i},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate.js":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js")}); diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako_inflate.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako_inflate.js deleted file mode 100644 index 69febcd9f..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako_inflate.js +++ /dev/null @@ -1,3049 +0,0 @@ -/* pako 0.2.7 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254]=_utf8len[254]=1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) { - c2 = str.charCodeAt(m_pos+1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i=0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) { - c2 = str.charCodeAt(m_pos+1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // use fallback for big arrays to avoid stack overflow - if (len < 65537) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i=0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function(buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function(str) { - var buf = new utils.Buf8(str.length); - for (var i=0, len=buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len*2); - - for (out=0, i=0; i 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function(buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max-1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Fuckup - very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means vuffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; - -},{"./common":1}],3:[function(require,module,exports){ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It doesn't worth to make additional optimizationa as in original. -// Small size is preferable. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; - -},{}],4:[function(require,module,exports){ -module.exports = { - - /* Allowed flush values; see deflate() and inflate() below for details */ - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_TREES: 6, - - /* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - //Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - //Z_VERSION_ERROR: -6, - - /* compression levels */ - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - - - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - - /* Possible values of the data_type field (though see inflate()) */ - Z_BINARY: 0, - Z_TEXT: 1, - //Z_ASCII: 1, // = Z_TEXT (deprecated) - Z_UNKNOWN: 2, - - /* The deflate compression method */ - Z_DEFLATED: 8 - //Z_NULL: null // Use -1 or null inline, depending on var type -}; - -},{}],5:[function(require,module,exports){ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n =0; n < 256; n++) { - c = n; - for (var k =0; k < 8; k++) { - c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc = crc ^ (-1); - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; - -},{}],6:[function(require,module,exports){ -'use strict'; - - -function GZheader() { - /* true if compressed data believed to be text */ - this.text = 0; - /* modification time */ - this.time = 0; - /* extra flags (not used when writing a gzip file) */ - this.xflags = 0; - /* operating system */ - this.os = 0; - /* pointer to extra field or Z_NULL if none */ - this.extra = null; - /* extra field length (valid if extra != Z_NULL) */ - this.extra_len = 0; // Actually, we don't need it in JS, - // but leave for few code modifications - - // - // Setup limits is not necessary because in js we should not preallocate memory - // for inflate use constant limit in 65536 bytes - // - - /* space at extra (only when reading header) */ - // this.extra_max = 0; - /* pointer to zero-terminated file name or Z_NULL */ - this.name = ''; - /* space at name (only when reading header) */ - // this.name_max = 0; - /* pointer to zero-terminated comment or Z_NULL */ - this.comment = ''; - /* space at comment (only when reading header) */ - // this.comm_max = 0; - /* true if there was or will be a header crc */ - this.hcrc = 0; - /* true when done reading gzip header (not used when writing a gzip file) */ - this.done = false; -} - -module.exports = GZheader; - -},{}],7:[function(require,module,exports){ -'use strict'; - -// See state defs from inflate.js -var BAD = 30; /* got a data error -- remain here until reset */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state.mode === LEN - strm.avail_in >= 6 - strm.avail_out >= 258 - start >= strm.avail_out - state.bits < 8 - - On return, state.mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm.avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm.avail_out >= 258 for each loop to avoid checking for - output space. - */ -module.exports = function inflate_fast(strm, start) { - var state; - var _in; /* local strm.input */ - var last; /* have enough input while in < last */ - var _out; /* local strm.output */ - var beg; /* inflate()'s initial strm.output */ - var end; /* while out < end, enough space available */ -//#ifdef INFLATE_STRICT - var dmax; /* maximum distance from zlib header */ -//#endif - var wsize; /* window size or zero if not using window */ - var whave; /* valid bytes in the window */ - var wnext; /* window write index */ - var window; /* allocated sliding window, if wsize != 0 */ - var hold; /* local strm.hold */ - var bits; /* local strm.bits */ - var lcode; /* local strm.lencode */ - var dcode; /* local strm.distcode */ - var lmask; /* mask for first level of length codes */ - var dmask; /* mask for first level of distance codes */ - var here; /* retrieved table entry */ - var op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - var len; /* match length, unused bytes */ - var dist; /* match distance */ - var from; /* where to copy match from */ - var from_source; - - - var input, output; // JS specific, because we have no pointers - - /* copy state to local variables */ - state = strm.state; - //here = state.here; - _in = strm.next_in; - input = strm.input; - last = _in + (strm.avail_in - 5); - _out = strm.next_out; - output = strm.output; - beg = _out - (start - strm.avail_out); - end = _out + (strm.avail_out - 257); -//#ifdef INFLATE_STRICT - dmax = state.dmax; -//#endif - wsize = state.wsize; - whave = state.whave; - wnext = state.wnext; - window = state.window; - hold = state.hold; - bits = state.bits; - lcode = state.lencode; - dcode = state.distcode; - lmask = (1 << state.lenbits) - 1; - dmask = (1 << state.distbits) - 1; - - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - - top: - do { - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - - here = lcode[hold & lmask]; - - dolen: - for (;;) { // Goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - if (op === 0) { /* literal */ - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - output[_out++] = here & 0xffff/*here.val*/; - } - else if (op & 16) { /* length base */ - len = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - len += hold & ((1 << op) - 1); - hold >>>= op; - bits -= op; - } - //Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - here = dcode[hold & dmask]; - - dodist: - for (;;) { // goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - - if (op & 16) { /* distance base */ - dist = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - } - dist += hold & ((1 << op) - 1); -//#ifdef INFLATE_STRICT - if (dist > dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } -//#endif - hold >>>= op; - bits -= op; - //Tracevv((stderr, "inflate: distance %u\n", dist)); - op = _out - beg; /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } - -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// if (len <= op - whave) { -// do { -// output[_out++] = 0; -// } while (--len); -// continue top; -// } -// len -= op - whave; -// do { -// output[_out++] = 0; -// } while (--op > whave); -// if (op === 0) { -// from = _out - dist; -// do { -// output[_out++] = output[from++]; -// } while (--len); -// continue top; -// } -//#endif - } - from = 0; // window index - from_source = window; - if (wnext === 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - else if (wnext < op) { /* wrap around window */ - from += wsize + wnext - op; - op -= wnext; - if (op < len) { /* some from end of window */ - len -= op; - do { - output[_out++] = window[from++]; - } while (--op); - from = 0; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - output[_out++] = window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - while (len > 2) { - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - len -= 3; - } - if (len) { - output[_out++] = from_source[from++]; - if (len > 1) { - output[_out++] = from_source[from++]; - } - } - } - else { - from = _out - dist; /* copy direct from output */ - do { /* minimum length is three */ - output[_out++] = output[from++]; - output[_out++] = output[from++]; - output[_out++] = output[from++]; - len -= 3; - } while (len > 2); - if (len) { - output[_out++] = output[from++]; - if (len > 1) { - output[_out++] = output[from++]; - } - } - } - } - else if ((op & 64) === 0) { /* 2nd level distance code */ - here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dodist; - } - else { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } - else if ((op & 64) === 0) { /* 2nd level length code */ - here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dolen; - } - else if (op & 32) { /* end-of-block */ - //Tracevv((stderr, "inflate: end of block\n")); - state.mode = TYPE; - break top; - } - else { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } while (_in < last && _out < end); - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - _in -= len; - bits -= len << 3; - hold &= (1 << bits) - 1; - - /* update state and return */ - strm.next_in = _in; - strm.next_out = _out; - strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); - strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); - state.hold = hold; - state.bits = bits; - return; -}; - -},{}],8:[function(require,module,exports){ -'use strict'; - - -var utils = require('../utils/common'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var inflate_fast = require('./inffast'); -var inflate_table = require('./inftrees'); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -//var Z_NO_FLUSH = 0; -//var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -//var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - -/* The deflate compression method */ -var Z_DEFLATED = 8; - - -/* STATES ====================================================================*/ -/* ===========================================================================*/ - - -var HEAD = 1; /* i: waiting for magic header */ -var FLAGS = 2; /* i: waiting for method and flags (gzip) */ -var TIME = 3; /* i: waiting for modification time (gzip) */ -var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ -var EXLEN = 5; /* i: waiting for extra length (gzip) */ -var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ -var NAME = 7; /* i: waiting for end of file name (gzip) */ -var COMMENT = 8; /* i: waiting for end of comment (gzip) */ -var HCRC = 9; /* i: waiting for header crc (gzip) */ -var DICTID = 10; /* i: waiting for dictionary check value */ -var DICT = 11; /* waiting for inflateSetDictionary() call */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ -var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ -var STORED = 14; /* i: waiting for stored size (length and complement) */ -var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ -var COPY = 16; /* i/o: waiting for input or output to copy stored block */ -var TABLE = 17; /* i: waiting for dynamic block table lengths */ -var LENLENS = 18; /* i: waiting for code length code lengths */ -var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ -var LEN_ = 20; /* i: same as LEN below, but only first time in */ -var LEN = 21; /* i: waiting for length/lit/eob code */ -var LENEXT = 22; /* i: waiting for length extra bits */ -var DIST = 23; /* i: waiting for distance code */ -var DISTEXT = 24; /* i: waiting for distance extra bits */ -var MATCH = 25; /* o: waiting for output space to copy string */ -var LIT = 26; /* o: waiting for output space to write literal */ -var CHECK = 27; /* i: waiting for 32-bit check value */ -var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ -var DONE = 29; /* finished check, done -- remain here until reset */ -var BAD = 30; /* got a data error -- remain here until reset */ -var MEM = 31; /* got an inflate() memory error -- remain here until reset */ -var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ - -/* ===========================================================================*/ - - - -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_WBITS = MAX_WBITS; - - -function ZSWAP32(q) { - return (((q >>> 24) & 0xff) + - ((q >>> 8) & 0xff00) + - ((q & 0xff00) << 8) + - ((q & 0xff) << 24)); -} - - -function InflateState() { - this.mode = 0; /* current inflate mode */ - this.last = false; /* true if processing last block */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.havedict = false; /* true if dictionary provided */ - this.flags = 0; /* gzip header method and flags (0 if zlib) */ - this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ - this.check = 0; /* protected copy of check value */ - this.total = 0; /* protected copy of output count */ - // TODO: may be {} - this.head = null; /* where to save gzip header information */ - - /* sliding window */ - this.wbits = 0; /* log base 2 of requested window size */ - this.wsize = 0; /* window size or zero if not using window */ - this.whave = 0; /* valid bytes in the window */ - this.wnext = 0; /* window write index */ - this.window = null; /* allocated sliding window, if needed */ - - /* bit accumulator */ - this.hold = 0; /* input bit accumulator */ - this.bits = 0; /* number of bits in "in" */ - - /* for string and stored block copying */ - this.length = 0; /* literal or length of data to copy */ - this.offset = 0; /* distance back to copy string from */ - - /* for table and code decoding */ - this.extra = 0; /* extra bits needed */ - - /* fixed and dynamic code tables */ - this.lencode = null; /* starting table for length/literal codes */ - this.distcode = null; /* starting table for distance codes */ - this.lenbits = 0; /* index bits for lencode */ - this.distbits = 0; /* index bits for distcode */ - - /* dynamic table building */ - this.ncode = 0; /* number of code length code lengths */ - this.nlen = 0; /* number of length code lengths */ - this.ndist = 0; /* number of distance code lengths */ - this.have = 0; /* number of code lengths in lens[] */ - this.next = null; /* next available space in codes[] */ - - this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ - this.work = new utils.Buf16(288); /* work area for code table building */ - - /* - because we don't have pointers in js, we use lencode and distcode directly - as buffers so we don't need codes - */ - //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ - this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ - this.distdyn = null; /* dynamic table for distance codes (JS specific) */ - this.sane = 0; /* if false, allow invalid distance too far */ - this.back = 0; /* bits back of last unprocessed length/lit */ - this.was = 0; /* initial length of match */ -} - -function inflateResetKeep(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - strm.total_in = strm.total_out = state.total = 0; - strm.msg = ''; /*Z_NULL*/ - if (state.wrap) { /* to support ill-conceived Java test suite */ - strm.adler = state.wrap & 1; - } - state.mode = HEAD; - state.last = 0; - state.havedict = 0; - state.dmax = 32768; - state.head = null/*Z_NULL*/; - state.hold = 0; - state.bits = 0; - //state.lencode = state.distcode = state.next = state.codes; - state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); - state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); - - state.sane = 1; - state.back = -1; - //Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - -function inflateReset(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - state.wsize = 0; - state.whave = 0; - state.wnext = 0; - return inflateResetKeep(strm); - -} - -function inflateReset2(strm, windowBits) { - var wrap; - var state; - - /* get the state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - - /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } - else { - wrap = (windowBits >> 4) + 1; - if (windowBits < 48) { - windowBits &= 15; - } - } - - /* set number of window bits, free window if different */ - if (windowBits && (windowBits < 8 || windowBits > 15)) { - return Z_STREAM_ERROR; - } - if (state.window !== null && state.wbits !== windowBits) { - state.window = null; - } - - /* update state and reset the rest of it */ - state.wrap = wrap; - state.wbits = windowBits; - return inflateReset(strm); -} - -function inflateInit2(strm, windowBits) { - var ret; - var state; - - if (!strm) { return Z_STREAM_ERROR; } - //strm.msg = Z_NULL; /* in case we return an error */ - - state = new InflateState(); - - //if (state === Z_NULL) return Z_MEM_ERROR; - //Tracev((stderr, "inflate: allocated\n")); - strm.state = state; - state.window = null/*Z_NULL*/; - ret = inflateReset2(strm, windowBits); - if (ret !== Z_OK) { - strm.state = null/*Z_NULL*/; - } - return ret; -} - -function inflateInit(strm) { - return inflateInit2(strm, DEF_WBITS); -} - - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -var virgin = true; - -var lenfix, distfix; // We have no pointers in JS, so keep tables separate - -function fixedtables(state) { - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - var sym; - - lenfix = new utils.Buf32(512); - distfix = new utils.Buf32(32); - - /* literal/length table */ - sym = 0; - while (sym < 144) { state.lens[sym++] = 8; } - while (sym < 256) { state.lens[sym++] = 9; } - while (sym < 280) { state.lens[sym++] = 7; } - while (sym < 288) { state.lens[sym++] = 8; } - - inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, {bits: 9}); - - /* distance table */ - sym = 0; - while (sym < 32) { state.lens[sym++] = 5; } - - inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, {bits: 5}); - - /* do this just once */ - virgin = false; - } - - state.lencode = lenfix; - state.lenbits = 9; - state.distcode = distfix; - state.distbits = 5; -} - - -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. If window does not exist yet, create it. This is only called - when a window is already in use, or when output has been written during this - inflate call, but the end of the deflate stream has not been reached yet. - It is also called to create a window for dictionary data when a dictionary - is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -function updatewindow(strm, src, end, copy) { - var dist; - var state = strm.state; - - /* if it hasn't been done already, allocate space for the window */ - if (state.window === null) { - state.wsize = 1 << state.wbits; - state.wnext = 0; - state.whave = 0; - - state.window = new utils.Buf8(state.wsize); - } - - /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state.wsize) { - utils.arraySet(state.window,src, end - state.wsize, state.wsize, 0); - state.wnext = 0; - state.whave = state.wsize; - } - else { - dist = state.wsize - state.wnext; - if (dist > copy) { - dist = copy; - } - //zmemcpy(state->window + state->wnext, end - copy, dist); - utils.arraySet(state.window,src, end - copy, dist, state.wnext); - copy -= dist; - if (copy) { - //zmemcpy(state->window, end - copy, copy); - utils.arraySet(state.window,src, end - copy, copy, 0); - state.wnext = copy; - state.whave = state.wsize; - } - else { - state.wnext += dist; - if (state.wnext === state.wsize) { state.wnext = 0; } - if (state.whave < state.wsize) { state.whave += dist; } - } - } - return 0; -} - -function inflate(strm, flush) { - var state; - var input, output; // input/output buffers - var next; /* next input INDEX */ - var put; /* next output INDEX */ - var have, left; /* available input and output */ - var hold; /* bit buffer */ - var bits; /* bits in bit buffer */ - var _in, _out; /* save starting available input and output */ - var copy; /* number of stored or match bytes to copy */ - var from; /* where to copy match bytes from */ - var from_source; - var here = 0; /* current decoding table entry */ - var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) - //var last; /* parent table entry */ - var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) - var len; /* length to copy for repeats, bits to drop */ - var ret; /* return code */ - var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ - var opts; - - var n; // temporary var for NEED_BITS - - var order = /* permutation of code lengths */ - [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - - - if (!strm || !strm.state || !strm.output || - (!strm.input && strm.avail_in !== 0)) { - return Z_STREAM_ERROR; - } - - state = strm.state; - if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ - - - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - _in = have; - _out = left; - ret = Z_OK; - - inf_leave: // goto emulation - for (;;) { - switch (state.mode) { - case HEAD: - if (state.wrap === 0) { - state.mode = TYPEDO; - break; - } - //=== NEEDBITS(16); - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ - state.check = 0/*crc32(0L, Z_NULL, 0)*/; - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = FLAGS; - break; - } - state.flags = 0; /* expect zlib header */ - if (state.head) { - state.head.done = false; - } - if (!(state.wrap & 1) || /* check if zlib header allowed */ - (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { - strm.msg = 'incorrect header check'; - state.mode = BAD; - break; - } - if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// - len = (hold & 0x0f)/*BITS(4)*/ + 8; - if (state.wbits === 0) { - state.wbits = len; - } - else if (len > state.wbits) { - strm.msg = 'invalid window size'; - state.mode = BAD; - break; - } - state.dmax = 1 << len; - //Tracev((stderr, "inflate: zlib header ok\n")); - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = hold & 0x200 ? DICTID : TYPE; - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - break; - case FLAGS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.flags = hold; - if ((state.flags & 0xff) !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - if (state.flags & 0xe000) { - strm.msg = 'unknown header flags set'; - state.mode = BAD; - break; - } - if (state.head) { - state.head.text = ((hold >> 8) & 1); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = TIME; - /* falls through */ - case TIME: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.time = hold; - } - if (state.flags & 0x0200) { - //=== CRC4(state.check, hold) - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - hbuf[2] = (hold >>> 16) & 0xff; - hbuf[3] = (hold >>> 24) & 0xff; - state.check = crc32(state.check, hbuf, 4, 0); - //=== - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = OS; - /* falls through */ - case OS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.xflags = (hold & 0xff); - state.head.os = (hold >> 8); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = EXLEN; - /* falls through */ - case EXLEN: - if (state.flags & 0x0400) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length = hold; - if (state.head) { - state.head.extra_len = hold; - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - else if (state.head) { - state.head.extra = null/*Z_NULL*/; - } - state.mode = EXTRA; - /* falls through */ - case EXTRA: - if (state.flags & 0x0400) { - copy = state.length; - if (copy > have) { copy = have; } - if (copy) { - if (state.head) { - len = state.head.extra_len - state.length; - if (!state.head.extra) { - // Use untyped array for more conveniend processing later - state.head.extra = new Array(state.head.extra_len); - } - utils.arraySet( - state.head.extra, - input, - next, - // extra field is limited to 65536 bytes - // - no need for additional size check - copy, - /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ - len - ); - //zmemcpy(state.head.extra + len, next, - // len + copy > state.head.extra_max ? - // state.head.extra_max - len : copy); - } - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - state.length -= copy; - } - if (state.length) { break inf_leave; } - } - state.length = 0; - state.mode = NAME; - /* falls through */ - case NAME: - if (state.flags & 0x0800) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - // TODO: 2 or 1 bytes? - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.name_max*/)) { - state.head.name += String.fromCharCode(len); - } - } while (len && copy < have); - - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.name = null; - } - state.length = 0; - state.mode = COMMENT; - /* falls through */ - case COMMENT: - if (state.flags & 0x1000) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.comm_max*/)) { - state.head.comment += String.fromCharCode(len); - } - } while (len && copy < have); - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.comment = null; - } - state.mode = HCRC; - /* falls through */ - case HCRC: - if (state.flags & 0x0200) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.check & 0xffff)) { - strm.msg = 'header crc mismatch'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - if (state.head) { - state.head.hcrc = ((state.flags >> 9) & 1); - state.head.done = true; - } - strm.adler = state.check = 0 /*crc32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - break; - case DICTID: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - strm.adler = state.check = ZSWAP32(hold); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = DICT; - /* falls through */ - case DICT: - if (state.havedict === 0) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - return Z_NEED_DICT; - } - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - /* falls through */ - case TYPE: - if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } - /* falls through */ - case TYPEDO: - if (state.last) { - //--- BYTEBITS() ---// - hold >>>= bits & 7; - bits -= bits & 7; - //---// - state.mode = CHECK; - break; - } - //=== NEEDBITS(3); */ - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.last = (hold & 0x01)/*BITS(1)*/; - //--- DROPBITS(1) ---// - hold >>>= 1; - bits -= 1; - //---// - - switch ((hold & 0x03)/*BITS(2)*/) { - case 0: /* stored block */ - //Tracev((stderr, "inflate: stored block%s\n", - // state.last ? " (last)" : "")); - state.mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - //Tracev((stderr, "inflate: fixed codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = LEN_; /* decode codes */ - if (flush === Z_TREES) { - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break inf_leave; - } - break; - case 2: /* dynamic block */ - //Tracev((stderr, "inflate: dynamic codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = TABLE; - break; - case 3: - strm.msg = 'invalid block type'; - state.mode = BAD; - } - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break; - case STORED: - //--- BYTEBITS() ---// /* go to byte boundary */ - hold >>>= bits & 7; - bits -= bits & 7; - //---// - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { - strm.msg = 'invalid stored block lengths'; - state.mode = BAD; - break; - } - state.length = hold & 0xffff; - //Tracev((stderr, "inflate: stored length %u\n", - // state.length)); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = COPY_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case COPY_: - state.mode = COPY; - /* falls through */ - case COPY: - copy = state.length; - if (copy) { - if (copy > have) { copy = have; } - if (copy > left) { copy = left; } - if (copy === 0) { break inf_leave; } - //--- zmemcpy(put, next, copy); --- - utils.arraySet(output, input, next, copy, put); - //---// - have -= copy; - next += copy; - left -= copy; - put += copy; - state.length -= copy; - break; - } - //Tracev((stderr, "inflate: stored end\n")); - state.mode = TYPE; - break; - case TABLE: - //=== NEEDBITS(14); */ - while (bits < 14) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// -//#ifndef PKZIP_BUG_WORKAROUND - if (state.nlen > 286 || state.ndist > 30) { - strm.msg = 'too many length or distance symbols'; - state.mode = BAD; - break; - } -//#endif - //Tracev((stderr, "inflate: table sizes ok\n")); - state.have = 0; - state.mode = LENLENS; - /* falls through */ - case LENLENS: - while (state.have < state.ncode) { - //=== NEEDBITS(3); - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - while (state.have < 19) { - state.lens[order[state.have++]] = 0; - } - // We have separate tables & no pointers. 2 commented lines below not needed. - //state.next = state.codes; - //state.lencode = state.next; - // Switch to use dynamic table - state.lencode = state.lendyn; - state.lenbits = 7; - - opts = {bits: state.lenbits}; - ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); - state.lenbits = opts.bits; - - if (ret) { - strm.msg = 'invalid code lengths set'; - state.mode = BAD; - break; - } - //Tracev((stderr, "inflate: code lengths ok\n")); - state.have = 0; - state.mode = CODELENS; - /* falls through */ - case CODELENS: - while (state.have < state.nlen + state.ndist) { - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_val < 16) { - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.lens[state.have++] = here_val; - } - else { - if (here_val === 16) { - //=== NEEDBITS(here.bits + 2); - n = here_bits + 2; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - if (state.have === 0) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - len = state.lens[state.have - 1]; - copy = 3 + (hold & 0x03);//BITS(2); - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - } - else if (here_val === 17) { - //=== NEEDBITS(here.bits + 3); - n = here_bits + 3; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 3 + (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - else { - //=== NEEDBITS(here.bits + 7); - n = here_bits + 7; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 11 + (hold & 0x7f);//BITS(7); - //--- DROPBITS(7) ---// - hold >>>= 7; - bits -= 7; - //---// - } - if (state.have + copy > state.nlen + state.ndist) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - while (copy--) { - state.lens[state.have++] = len; - } - } - } - - /* handle error breaks in while */ - if (state.mode === BAD) { break; } - - /* check for end-of-block code (better have one) */ - if (state.lens[256] === 0) { - strm.msg = 'invalid code -- missing end-of-block'; - state.mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state.lenbits = 9; - - opts = {bits: state.lenbits}; - ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.lenbits = opts.bits; - // state.lencode = state.next; - - if (ret) { - strm.msg = 'invalid literal/lengths set'; - state.mode = BAD; - break; - } - - state.distbits = 6; - //state.distcode.copy(state.codes); - // Switch to use dynamic table - state.distcode = state.distdyn; - opts = {bits: state.distbits}; - ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.distbits = opts.bits; - // state.distcode = state.next; - - if (ret) { - strm.msg = 'invalid distances set'; - state.mode = BAD; - break; - } - //Tracev((stderr, 'inflate: codes ok\n')); - state.mode = LEN_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case LEN_: - state.mode = LEN; - /* falls through */ - case LEN: - if (have >= 6 && left >= 258) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - inflate_fast(strm, _out); - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - if (state.mode === TYPE) { - state.back = -1; - } - break; - } - state.back = 0; - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) -1)]; /*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if (here_bits <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_op && (here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.lencode[last_val + - ((hold & ((1 << (last_bits + last_op)) -1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - state.length = here_val; - if (here_op === 0) { - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - state.mode = LIT; - break; - } - if (here_op & 32) { - //Tracevv((stderr, "inflate: end of block\n")); - state.back = -1; - state.mode = TYPE; - break; - } - if (here_op & 64) { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break; - } - state.extra = here_op & 15; - state.mode = LENEXT; - /* falls through */ - case LENEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length += hold & ((1 << state.extra) -1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } - //Tracevv((stderr, "inflate: length %u\n", state.length)); - state.was = state.length; - state.mode = DIST; - /* falls through */ - case DIST: - for (;;) { - here = state.distcode[hold & ((1 << state.distbits) -1)];/*BITS(state.distbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if ((here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.distcode[last_val + - ((hold & ((1 << (last_bits + last_op)) -1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - if (here_op & 64) { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break; - } - state.offset = here_val; - state.extra = (here_op) & 15; - state.mode = DISTEXT; - /* falls through */ - case DISTEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.offset += hold & ((1 << state.extra) -1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } -//#ifdef INFLATE_STRICT - if (state.offset > state.dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -//#endif - //Tracevv((stderr, "inflate: distance %u\n", state.offset)); - state.mode = MATCH; - /* falls through */ - case MATCH: - if (left === 0) { break inf_leave; } - copy = _out - left; - if (state.offset > copy) { /* copy from window */ - copy = state.offset - copy; - if (copy > state.whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// Trace((stderr, "inflate.c too far\n")); -// copy -= state.whave; -// if (copy > state.length) { copy = state.length; } -// if (copy > left) { copy = left; } -// left -= copy; -// state.length -= copy; -// do { -// output[put++] = 0; -// } while (--copy); -// if (state.length === 0) { state.mode = LEN; } -// break; -//#endif - } - if (copy > state.wnext) { - copy -= state.wnext; - from = state.wsize - copy; - } - else { - from = state.wnext - copy; - } - if (copy > state.length) { copy = state.length; } - from_source = state.window; - } - else { /* copy from output */ - from_source = output; - from = put - state.offset; - copy = state.length; - } - if (copy > left) { copy = left; } - left -= copy; - state.length -= copy; - do { - output[put++] = from_source[from++]; - } while (--copy); - if (state.length === 0) { state.mode = LEN; } - break; - case LIT: - if (left === 0) { break inf_leave; } - output[put++] = state.length; - left--; - state.mode = LEN; - break; - case CHECK: - if (state.wrap) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - // Use '|' insdead of '+' to make sure that result is signed - hold |= input[next++] << bits; - bits += 8; - } - //===// - _out -= left; - strm.total_out += _out; - state.total += _out; - if (_out) { - strm.adler = state.check = - /*UPDATE(state.check, put - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); - - } - _out = left; - // NB: crc32 stored as signed 32-bit int, ZSWAP32 returns signed too - if ((state.flags ? hold : ZSWAP32(hold)) !== state.check) { - strm.msg = 'incorrect data check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: check matches trailer\n")); - } - state.mode = LENGTH; - /* falls through */ - case LENGTH: - if (state.wrap && state.flags) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.total & 0xffffffff)) { - strm.msg = 'incorrect length check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: length matches trailer\n")); - } - state.mode = DONE; - /* falls through */ - case DONE: - ret = Z_STREAM_END; - break inf_leave; - case BAD: - ret = Z_DATA_ERROR; - break inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - /* falls through */ - default: - return Z_STREAM_ERROR; - } - } - - // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" - - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call updatewindow() to create and/or update the window state. - Note: a memory error from inflate() is non-recoverable. - */ - - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - - if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && - (state.mode < CHECK || flush !== Z_FINISH))) { - if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { - state.mode = MEM; - return Z_MEM_ERROR; - } - } - _in -= strm.avail_in; - _out -= strm.avail_out; - strm.total_in += _in; - strm.total_out += _out; - state.total += _out; - if (state.wrap && _out) { - strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); - } - strm.data_type = state.bits + (state.last ? 64 : 0) + - (state.mode === TYPE ? 128 : 0) + - (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); - if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { - ret = Z_BUF_ERROR; - } - return ret; -} - -function inflateEnd(strm) { - - if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { - return Z_STREAM_ERROR; - } - - var state = strm.state; - if (state.window) { - state.window = null; - } - strm.state = null; - return Z_OK; -} - -function inflateGetHeader(strm, head) { - var state; - - /* check state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } - - /* save header structure */ - state.head = head; - head.done = false; - return Z_OK; -} - - -exports.inflateReset = inflateReset; -exports.inflateReset2 = inflateReset2; -exports.inflateResetKeep = inflateResetKeep; -exports.inflateInit = inflateInit; -exports.inflateInit2 = inflateInit2; -exports.inflate = inflate; -exports.inflateEnd = inflateEnd; -exports.inflateGetHeader = inflateGetHeader; -exports.inflateInfo = 'pako inflate (from Nodeca project)'; - -/* Not implemented -exports.inflateCopy = inflateCopy; -exports.inflateGetDictionary = inflateGetDictionary; -exports.inflateMark = inflateMark; -exports.inflatePrime = inflatePrime; -exports.inflateSetDictionary = inflateSetDictionary; -exports.inflateSync = inflateSync; -exports.inflateSyncPoint = inflateSyncPoint; -exports.inflateUndermine = inflateUndermine; -*/ - -},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(require,module,exports){ -'use strict'; - - -var utils = require('../utils/common'); - -var MAXBITS = 15; -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -var lbase = [ /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 -]; - -var lext = [ /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 -]; - -var dbase = [ /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0 -]; - -var dext = [ /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64 -]; - -module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) -{ - var bits = opts.bits; - //here = opts.here; /* table entry for duplication */ - - var len = 0; /* a code's length in bits */ - var sym = 0; /* index of code symbols */ - var min = 0, max = 0; /* minimum and maximum code lengths */ - var root = 0; /* number of index bits for root table */ - var curr = 0; /* number of index bits for current table */ - var drop = 0; /* code bits to drop for sub-table */ - var left = 0; /* number of prefix codes available */ - var used = 0; /* code entries in table used */ - var huff = 0; /* Huffman code */ - var incr; /* for incrementing code, index */ - var fill; /* index for replicating entries */ - var low; /* low bits for current root entry */ - var mask; /* mask for low root bits */ - var next; /* next available space in table */ - var base = null; /* base value table to use */ - var base_index = 0; -// var shoextra; /* extra bits table to use */ - var end; /* use base and extra for symbol > end */ - var count = new utils.Buf16(MAXBITS+1); //[MAXBITS+1]; /* number of codes of each length */ - var offs = new utils.Buf16(MAXBITS+1); //[MAXBITS+1]; /* offsets in table for each length */ - var extra = null; - var extra_index = 0; - - var here_bits, here_op, here_val; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) { - count[len] = 0; - } - for (sym = 0; sym < codes; sym++) { - count[lens[lens_index + sym]]++; - } - - /* bound code lengths, force root to be within code lengths */ - root = bits; - for (max = MAXBITS; max >= 1; max--) { - if (count[max] !== 0) { break; } - } - if (root > max) { - root = max; - } - if (max === 0) { /* no symbols to code at all */ - //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ - //table.bits[opts.table_index] = 1; //here.bits = (var char)1; - //table.val[opts.table_index++] = 0; //here.val = (var short)0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - - //table.op[opts.table_index] = 64; - //table.bits[opts.table_index] = 1; - //table.val[opts.table_index++] = 0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - opts.bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min < max; min++) { - if (count[min] !== 0) { break; } - } - if (root < min) { - root = min; - } - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) { - return -1; - } /* over-subscribed */ - } - if (left > 0 && (type === CODES || max !== 1)) { - return -1; /* incomplete set */ - } - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) { - offs[len + 1] = offs[len] + count[len]; - } - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) { - if (lens[lens_index + sym] !== 0) { - work[offs[lens[lens_index + sym]]++] = sym; - } - } - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftrees.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - // poor man optimization - use if-else instead of switch, - // to avoid deopts in old v8 - if (type === CODES) { - base = extra = work; /* dummy value--not used */ - end = 19; - - } else if (type === LENS) { - base = lbase; - base_index -= 257; - extra = lext; - extra_index -= 257; - end = 256; - - } else { /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } - - /* initialize opts for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = table_index; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = -1; /* trigger new sub-table when len > root */ - used = 1 << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - var i=0; - /* process all codes and make table entries */ - for (;;) { - i++; - /* create table entry */ - here_bits = len - drop; - if (work[sym] < end) { - here_op = 0; - here_val = work[sym]; - } - else if (work[sym] > end) { - here_op = extra[extra_index + work[sym]]; - here_val = base[base_index + work[sym]]; - } - else { - here_op = 32 + 64; /* end of block */ - here_val = 0; - } - - /* replicate for those indices with low len bits equal to huff */ - incr = 1 << (len - drop); - fill = 1 << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; - } while (fill !== 0); - - /* backwards increment the len-bit code huff */ - incr = 1 << (len - 1); - while (huff & incr) { - incr >>= 1; - } - if (incr !== 0) { - huff &= incr - 1; - huff += incr; - } else { - huff = 0; - } - - /* go to next symbol, update count, len */ - sym++; - if (--count[len] === 0) { - if (len === max) { break; } - len = lens[lens_index + work[sym]]; - } - - /* create new sub-table if needed */ - if (len > root && (huff & mask) !== low) { - /* if first time, transition to sub-tables */ - if (drop === 0) { - drop = root; - } - - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = 1 << curr; - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) { break; } - curr++; - left <<= 1; - } - - /* check for enough space */ - used += 1 << curr; - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* point entry in root table to sub-table */ - low = huff & mask; - /*table.op[low] = curr; - table.bits[low] = root; - table.val[low] = next - opts.table_index;*/ - table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; - } - } - - /* fill in remaining table entry if code is incomplete (guaranteed to have - at most one remaining entry, since if the code is incomplete, the - maximum code length that was allowed to get this far is one bit) */ - if (huff !== 0) { - //table.op[next + huff] = 64; /* invalid code marker */ - //table.bits[next + huff] = len - drop; - //table.val[next + huff] = 0; - table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; - } - - /* set return parameters */ - //opts.table_index += used; - opts.bits = root; - return 0; -}; - -},{"../utils/common":1}],10:[function(require,module,exports){ -'use strict'; - -module.exports = { - '2': 'need dictionary', /* Z_NEED_DICT 2 */ - '1': 'stream end', /* Z_STREAM_END 1 */ - '0': '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; - -},{}],11:[function(require,module,exports){ -'use strict'; - - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; - -},{}],"/lib/inflate.js":[function(require,module,exports){ -'use strict'; - - -var zlib_inflate = require('./zlib/inflate.js'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var c = require('./zlib/constants'); -var msg = require('./zlib/messages'); -var zstream = require('./zlib/zstream'); -var gzheader = require('./zlib/gzheader'); - -var toString = Object.prototype.toString; - -/** - * class Inflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[inflate]] - * and [[inflateRaw]]. - **/ - -/* internal - * inflate.chunks -> Array - * - * Chunks of output data, if [[Inflate#onData]] not overriden. - **/ - -/** - * Inflate.result -> Uint8Array|Array|String - * - * Uncompressed result, generated by default [[Inflate#onData]] - * and [[Inflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Inflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Inflate.err -> Number - * - * Error code after inflate finished. 0 (Z_OK) on success. - * Should be checked if broken data possible. - **/ - -/** - * Inflate.msg -> String - * - * Error message, if [[Inflate.err]] != 0 - **/ - - -/** - * new Inflate(options) - * - options (Object): zlib inflate options. - * - * Creates new inflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `windowBits` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw inflate - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * By default, when no options set, autodetect deflate/gzip data format via - * wrapper header. - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var inflate = new pako.Inflate({ level: 3}); - * - * inflate.push(chunk1, false); - * inflate.push(chunk2, true); // true -> last chunk - * - * if (inflate.err) { throw new Error(inflate.err); } - * - * console.log(inflate.result); - * ``` - **/ -var Inflate = function(options) { - - this.options = utils.assign({ - chunkSize: 16384, - windowBits: 0, - to: '' - }, options || {}); - - var opt = this.options; - - // Force window size for `raw` data, if not set directly, - // because we have no header for autodetect. - if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { - opt.windowBits = -opt.windowBits; - if (opt.windowBits === 0) { opt.windowBits = -15; } - } - - // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate - if ((opt.windowBits >= 0) && (opt.windowBits < 16) && - !(options && options.windowBits)) { - opt.windowBits += 32; - } - - // Gzip header has no info about windows size, we can do autodetect only - // for deflate. So, if window size not set, force it to max when gzip possible - if ((opt.windowBits > 15) && (opt.windowBits < 48)) { - // bit 3 (16) -> gzipped data - // bit 4 (32) -> autodetect gzip/deflate - if ((opt.windowBits & 15) === 0) { - opt.windowBits |= 15; - } - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new zstream(); - this.strm.avail_out = 0; - - var status = zlib_inflate.inflateInit2( - this.strm, - opt.windowBits - ); - - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - - this.header = new gzheader(); - - zlib_inflate.inflateGetHeader(this.strm, this.header); -}; - -/** - * Inflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH. - * - * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with - * new output chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the decompression context. - * - * On fail call [[Inflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Inflate.prototype.push = function(data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - var next_out_utf8, tail, utf8str; - - if (this.ended) { return false; } - _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // Only binary strings can be decompressed on practice - strm.input = strings.binstring2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - - status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ - - if (status !== c.Z_STREAM_END && status !== c.Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - - if (strm.next_out) { - if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { - - if (this.options.to === 'string') { - - next_out_utf8 = strings.utf8border(strm.output, strm.next_out); - - tail = strm.next_out - next_out_utf8; - utf8str = strings.buf2string(strm.output, next_out_utf8); - - // move tail - strm.next_out = tail; - strm.avail_out = chunkSize - tail; - if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } - - this.onData(utf8str); - - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } - } while ((strm.avail_in > 0) && status !== c.Z_STREAM_END); - - if (status === c.Z_STREAM_END) { - _mode = c.Z_FINISH; - } - - // Finalize on the last chunk. - if (_mode === c.Z_FINISH) { - status = zlib_inflate.inflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === c.Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === c.Z_SYNC_FLUSH) { - this.onEnd(c.Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Inflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): ouput data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Inflate.prototype.onData = function(chunk) { - this.chunks.push(chunk); -}; - - -/** - * Inflate#onEnd(status) -> Void - * - status (Number): inflate status. 0 (Z_OK) on success, - * other if not. - * - * Called either after you tell inflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Inflate.prototype.onEnd = function(status) { - // On success - join - if (status === c.Z_OK) { - if (this.options.to === 'string') { - // Glue & convert here, until we teach pako to send - // utf8 alligned strings to onData - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * inflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Decompress `data` with inflate/ungzip and `options`. Autodetect - * format via wrapper header by default. That's why we don't provide - * separate `ungzip` method. - * - * Supported options are: - * - * - windowBits - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) - * , output; - * - * try { - * output = pako.inflate(input); - * } catch (err) - * console.log(err); - * } - * ``` - **/ -function inflate(input, options) { - var inflator = new Inflate(options); - - inflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (inflator.err) { throw inflator.msg; } - - return inflator.result; -} - - -/** - * inflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * The same as [[inflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function inflateRaw(input, options) { - options = options || {}; - options.raw = true; - return inflate(input, options); -} - - -/** - * ungzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Just shortcut to [[inflate]], because it autodetects format - * by header.content. Done for convenience. - **/ - - -exports.Inflate = Inflate; -exports.inflate = inflate; -exports.inflateRaw = inflateRaw; -exports.ungzip = inflate; - -},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate.js":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js") -}); \ No newline at end of file diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako_inflate.min.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako_inflate.min.js deleted file mode 100644 index a3646f3fb..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/dist/pako_inflate.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* pako 0.2.7 nodeca/pako */ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.pako=e()}}(function(){return function e(t,i,n){function a(o,s){if(!i[o]){if(!t[o]){var f="function"==typeof require&&require;if(!s&&f)return f(o,!0);if(r)return r(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var d=i[o]={exports:{}};t[o][0].call(d.exports,function(e){var i=t[o][1][e];return a(i?i:e)},d,d.exports,e,t,i,n)}return i[o].exports}for(var r="function"==typeof require&&require,o=0;or;r++)e[a+r]=t[i+r]},flattenChunks:function(e){var t,i,n,a,r,o;for(n=0,t=0,i=e.length;i>t;t++)n+=e[t].length;for(o=new Uint8Array(n),a=0,t=0,i=e.length;i>t;t++)r=e[t],o.set(r,a),a+=r.length;return o}},r={arraySet:function(e,t,i,n,a){for(var r=0;n>r;r++)e[a+r]=t[i+r]},flattenChunks:function(e){return[].concat.apply([],e)}};i.setTyped=function(e){e?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,a)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,r))},i.setTyped(n)},{}],2:[function(e,t,i){"use strict";function n(e,t){if(65537>t&&(e.subarray&&o||!e.subarray&&r))return String.fromCharCode.apply(null,a.shrinkBuf(e,t));for(var i="",n=0;t>n;n++)i+=String.fromCharCode(e[n]);return i}var a=e("./common"),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(s){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(s){o=!1}for(var f=new a.Buf8(256),l=0;256>l;l++)f[l]=l>=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;f[254]=f[254]=1,i.string2buf=function(e){var t,i,n,r,o,s=e.length,f=0;for(r=0;s>r;r++)i=e.charCodeAt(r),55296===(64512&i)&&s>r+1&&(n=e.charCodeAt(r+1),56320===(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),r++)),f+=128>i?1:2048>i?2:65536>i?3:4;for(t=new a.Buf8(f),o=0,r=0;f>o;r++)i=e.charCodeAt(r),55296===(64512&i)&&s>r+1&&(n=e.charCodeAt(r+1),56320===(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),r++)),128>i?t[o++]=i:2048>i?(t[o++]=192|i>>>6,t[o++]=128|63&i):65536>i?(t[o++]=224|i>>>12,t[o++]=128|i>>>6&63,t[o++]=128|63&i):(t[o++]=240|i>>>18,t[o++]=128|i>>>12&63,t[o++]=128|i>>>6&63,t[o++]=128|63&i);return t},i.buf2binstring=function(e){return n(e,e.length)},i.binstring2buf=function(e){for(var t=new a.Buf8(e.length),i=0,n=t.length;n>i;i++)t[i]=e.charCodeAt(i);return t},i.buf2string=function(e,t){var i,a,r,o,s=t||e.length,l=new Array(2*s);for(a=0,i=0;s>i;)if(r=e[i++],128>r)l[a++]=r;else if(o=f[r],o>4)l[a++]=65533,i+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&s>i;)r=r<<6|63&e[i++],o--;o>1?l[a++]=65533:65536>r?l[a++]=r:(r-=65536,l[a++]=55296|r>>10&1023,l[a++]=56320|1023&r)}return n(l,a)},i.utf8border=function(e,t){var i;for(t=t||e.length,t>e.length&&(t=e.length),i=t-1;i>=0&&128===(192&e[i]);)i--;return 0>i?t:0===i?t:i+f[e[i]]>t?i:t}},{"./common":1}],3:[function(e,t,i){"use strict";function n(e,t,i,n){for(var a=65535&e|0,r=e>>>16&65535|0,o=0;0!==i;){o=i>2e3?2e3:i,i-=o;do a=a+t[n++]|0,r=r+a|0;while(--o);a%=65521,r%=65521}return a|r<<16|0}t.exports=n},{}],4:[function(e,t,i){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,i){"use strict";function n(){for(var e,t=[],i=0;256>i;i++){e=i;for(var n=0;8>n;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}function a(e,t,i,n){var a=r,o=n+i;e=-1^e;for(var s=n;o>s;s++)e=e>>>8^a[255&(e^t[s])];return-1^e}var r=n();t.exports=a},{}],6:[function(e,t,i){"use strict";function n(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}t.exports=n},{}],7:[function(e,t,i){"use strict";var n=30,a=12;t.exports=function(e,t){var i,r,o,s,f,l,d,u,h,c,b,w,m,k,_,g,v,p,x,y,S,E,B,Z,A;i=e.state,r=e.next_in,Z=e.input,o=r+(e.avail_in-5),s=e.next_out,A=e.output,f=s-(t-e.avail_out),l=s+(e.avail_out-257),d=i.dmax,u=i.wsize,h=i.whave,c=i.wnext,b=i.window,w=i.hold,m=i.bits,k=i.lencode,_=i.distcode,g=(1<m&&(w+=Z[r++]<>>24,w>>>=x,m-=x,x=p>>>16&255,0===x)A[s++]=65535&p;else{if(!(16&x)){if(0===(64&x)){p=k[(65535&p)+(w&(1<m&&(w+=Z[r++]<>>=x,m-=x),15>m&&(w+=Z[r++]<>>24,w>>>=x,m-=x,x=p>>>16&255,!(16&x)){if(0===(64&x)){p=_[(65535&p)+(w&(1<m&&(w+=Z[r++]<m&&(w+=Z[r++]<d){e.msg="invalid distance too far back",i.mode=n;break e}if(w>>>=x,m-=x,x=s-f,S>x){if(x=S-x,x>h&&i.sane){e.msg="invalid distance too far back",i.mode=n;break e}if(E=0,B=b,0===c){if(E+=u-x,y>x){y-=x;do A[s++]=b[E++];while(--x);E=s-S,B=A}}else if(x>c){if(E+=u+c-x,x-=c,y>x){y-=x;do A[s++]=b[E++];while(--x);if(E=0,y>c){x=c,y-=x;do A[s++]=b[E++];while(--x);E=s-S,B=A}}}else if(E+=c-x,y>x){y-=x;do A[s++]=b[E++];while(--x);E=s-S,B=A}for(;y>2;)A[s++]=B[E++],A[s++]=B[E++],A[s++]=B[E++],y-=3;y&&(A[s++]=B[E++],y>1&&(A[s++]=B[E++]))}else{E=s-S;do A[s++]=A[E++],A[s++]=A[E++],A[s++]=A[E++],y-=3;while(y>2);y&&(A[s++]=A[E++],y>1&&(A[s++]=A[E++]))}break}}break}}while(o>r&&l>s);y=m>>3,r-=y,m-=y<<3,w&=(1<r?5+(o-r):5-(r-o),e.avail_out=l>s?257+(l-s):257-(s-l),i.hold=w,i.bits=m}},{}],8:[function(e,t,i){"use strict";function n(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function a(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new k.Buf16(320),this.work=new k.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function r(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=F,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new k.Buf32(be),t.distcode=t.distdyn=new k.Buf32(we),t.sane=1,t.back=-1,A):R}function o(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,r(e)):R}function s(e,t){var i,n;return e&&e.state?(n=e.state,0>t?(i=0,t=-t):(i=(t>>4)+1,48>t&&(t&=15)),t&&(8>t||t>15)?R:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,o(e))):R}function f(e,t){var i,n;return e?(n=new a,e.state=n,n.window=null,i=s(e,t),i!==A&&(e.state=null),i):R}function l(e){return f(e,ke)}function d(e){if(_e){var t;for(w=new k.Buf32(512),m=new k.Buf32(32),t=0;144>t;)e.lens[t++]=8;for(;256>t;)e.lens[t++]=9;for(;280>t;)e.lens[t++]=7;for(;288>t;)e.lens[t++]=8;for(p(y,e.lens,0,288,w,0,e.work,{bits:9}),t=0;32>t;)e.lens[t++]=5;p(S,e.lens,0,32,m,0,e.work,{bits:5}),_e=!1}e.lencode=w,e.lenbits=9,e.distcode=m,e.distbits=5}function u(e,t,i,n){var a,r=e.state;return null===r.window&&(r.wsize=1<=r.wsize?(k.arraySet(r.window,t,i-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(a=r.wsize-r.wnext,a>n&&(a=n),k.arraySet(r.window,t,i-n,a,r.wnext),n-=a,n?(k.arraySet(r.window,t,i-n,n,0),r.wnext=n,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whavec;){if(0===f)break e;f--,h+=a[o++]<>>8&255,i.check=g(i.check,Ze,2,0),h=0,c=0,i.mode=U;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&h)<<8)+(h>>8))%31){e.msg="incorrect header check",i.mode=ue;break}if((15&h)!==T){e.msg="unknown compression method",i.mode=ue;break}if(h>>>=4,c-=4,xe=(15&h)+8,0===i.wbits)i.wbits=xe;else if(xe>i.wbits){e.msg="invalid window size",i.mode=ue;break}i.dmax=1<c;){if(0===f)break e;f--,h+=a[o++]<>8&1),512&i.flags&&(Ze[0]=255&h,Ze[1]=h>>>8&255,i.check=g(i.check,Ze,2,0)),h=0,c=0,i.mode=D;case D:for(;32>c;){if(0===f)break e;f--,h+=a[o++]<>>8&255,Ze[2]=h>>>16&255,Ze[3]=h>>>24&255,i.check=g(i.check,Ze,4,0)),h=0,c=0,i.mode=L;case L:for(;16>c;){if(0===f)break e;f--,h+=a[o++]<>8),512&i.flags&&(Ze[0]=255&h,Ze[1]=h>>>8&255,i.check=g(i.check,Ze,2,0)),h=0,c=0,i.mode=H;case H:if(1024&i.flags){for(;16>c;){if(0===f)break e;f--,h+=a[o++]<>>8&255,i.check=g(i.check,Ze,2,0)),h=0,c=0}else i.head&&(i.head.extra=null);i.mode=j;case j:if(1024&i.flags&&(m=i.length,m>f&&(m=f),m&&(i.head&&(xe=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),k.arraySet(i.head.extra,a,o,m,xe)),512&i.flags&&(i.check=g(i.check,a,m,o)),f-=m,o+=m,i.length-=m),i.length))break e;i.length=0,i.mode=M;case M:if(2048&i.flags){if(0===f)break e;m=0;do xe=a[o+m++],i.head&&xe&&i.length<65536&&(i.head.name+=String.fromCharCode(xe));while(xe&&f>m);if(512&i.flags&&(i.check=g(i.check,a,m,o)),f-=m,o+=m,xe)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=K;case K:if(4096&i.flags){if(0===f)break e;m=0;do xe=a[o+m++],i.head&&xe&&i.length<65536&&(i.head.comment+=String.fromCharCode(xe));while(xe&&f>m);if(512&i.flags&&(i.check=g(i.check,a,m,o)),f-=m,o+=m,xe)break e}else i.head&&(i.head.comment=null);i.mode=P;case P:if(512&i.flags){for(;16>c;){if(0===f)break e;f--,h+=a[o++]<>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=G;break;case Y:for(;32>c;){if(0===f)break e;f--,h+=a[o++]<>>=7&c,c-=7&c,i.mode=fe;break}for(;3>c;){if(0===f)break e;f--,h+=a[o++]<>>=1,c-=1,3&h){case 0:i.mode=W;break;case 1:if(d(i),i.mode=te,t===Z){h>>>=2,c-=2;break e}break;case 2:i.mode=V;break;case 3:e.msg="invalid block type",i.mode=ue}h>>>=2,c-=2;break;case W:for(h>>>=7&c,c-=7&c;32>c;){if(0===f)break e;f--,h+=a[o++]<>>16^65535)){e.msg="invalid stored block lengths",i.mode=ue;break}if(i.length=65535&h,h=0,c=0,i.mode=J,t===Z)break e;case J:i.mode=Q;case Q:if(m=i.length){if(m>f&&(m=f),m>l&&(m=l),0===m)break e;k.arraySet(r,a,o,m,s),f-=m,o+=m,l-=m,s+=m,i.length-=m;break}i.mode=G;break;case V:for(;14>c;){if(0===f)break e;f--,h+=a[o++]<>>=5,c-=5,i.ndist=(31&h)+1,h>>>=5,c-=5,i.ncode=(15&h)+4,h>>>=4,c-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=ue;break}i.have=0,i.mode=$;case $:for(;i.havec;){if(0===f)break e;f--,h+=a[o++]<>>=3,c-=3}for(;i.have<19;)i.lens[Ae[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,Se={bits:i.lenbits},ye=p(x,i.lens,0,19,i.lencode,0,i.work,Se),i.lenbits=Se.bits,ye){e.msg="invalid code lengths set",i.mode=ue;break}i.have=0,i.mode=ee;case ee:for(;i.have>>24,ke=Be>>>16&255,_e=65535&Be,!(c>=me);){if(0===f)break e;f--,h+=a[o++]<_e)h>>>=me,c-=me,i.lens[i.have++]=_e;else{if(16===_e){for(Ee=me+2;Ee>c;){if(0===f)break e;f--,h+=a[o++]<>>=me,c-=me,0===i.have){e.msg="invalid bit length repeat",i.mode=ue;break}xe=i.lens[i.have-1],m=3+(3&h),h>>>=2,c-=2}else if(17===_e){for(Ee=me+3;Ee>c;){if(0===f)break e;f--,h+=a[o++]<>>=me,c-=me,xe=0,m=3+(7&h),h>>>=3,c-=3}else{for(Ee=me+7;Ee>c;){if(0===f)break e;f--,h+=a[o++]<>>=me,c-=me,xe=0,m=11+(127&h),h>>>=7,c-=7}if(i.have+m>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=ue;break}for(;m--;)i.lens[i.have++]=xe}}if(i.mode===ue)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=ue;break}if(i.lenbits=9,Se={bits:i.lenbits},ye=p(y,i.lens,0,i.nlen,i.lencode,0,i.work,Se),i.lenbits=Se.bits,ye){e.msg="invalid literal/lengths set",i.mode=ue;break}if(i.distbits=6,i.distcode=i.distdyn,Se={bits:i.distbits},ye=p(S,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,Se),i.distbits=Se.bits,ye){e.msg="invalid distances set",i.mode=ue;break}if(i.mode=te,t===Z)break e;case te:i.mode=ie;case ie:if(f>=6&&l>=258){e.next_out=s,e.avail_out=l,e.next_in=o,e.avail_in=f,i.hold=h,i.bits=c,v(e,w),s=e.next_out,r=e.output,l=e.avail_out,o=e.next_in,a=e.input,f=e.avail_in,h=i.hold,c=i.bits,i.mode===G&&(i.back=-1);break}for(i.back=0;Be=i.lencode[h&(1<>>24,ke=Be>>>16&255,_e=65535&Be,!(c>=me);){if(0===f)break e;f--,h+=a[o++]<>ge)],me=Be>>>24,ke=Be>>>16&255,_e=65535&Be,!(c>=ge+me);){if(0===f)break e;f--,h+=a[o++]<>>=ge,c-=ge,i.back+=ge}if(h>>>=me,c-=me,i.back+=me,i.length=_e,0===ke){i.mode=se;break}if(32&ke){i.back=-1,i.mode=G;break}if(64&ke){e.msg="invalid literal/length code",i.mode=ue;break}i.extra=15&ke,i.mode=ne;case ne:if(i.extra){for(Ee=i.extra;Ee>c;){if(0===f)break e;f--,h+=a[o++]<>>=i.extra,c-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=ae;case ae:for(;Be=i.distcode[h&(1<>>24,ke=Be>>>16&255,_e=65535&Be,!(c>=me);){if(0===f)break e;f--,h+=a[o++]<>ge)],me=Be>>>24,ke=Be>>>16&255,_e=65535&Be,!(c>=ge+me);){if(0===f)break e;f--,h+=a[o++]<>>=ge,c-=ge,i.back+=ge}if(h>>>=me,c-=me,i.back+=me,64&ke){e.msg="invalid distance code",i.mode=ue;break}i.offset=_e,i.extra=15&ke,i.mode=re;case re:if(i.extra){for(Ee=i.extra;Ee>c;){if(0===f)break e;f--,h+=a[o++]<>>=i.extra,c-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=ue;break}i.mode=oe;case oe:if(0===l)break e;if(m=w-l,i.offset>m){if(m=i.offset-m,m>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=ue;break}m>i.wnext?(m-=i.wnext,be=i.wsize-m):be=i.wnext-m,m>i.length&&(m=i.length),we=i.window}else we=r,be=s-i.offset,m=i.length;m>l&&(m=l),l-=m,i.length-=m;do r[s++]=we[be++];while(--m);0===i.length&&(i.mode=ie);break;case se:if(0===l)break e;r[s++]=i.length,l--,i.mode=ie;break;case fe:if(i.wrap){for(;32>c;){if(0===f)break e;f--,h|=a[o++]<c;){if(0===f)break e;f--,h+=a[o++]<=z;z++)j[z]=0;for(N=0;b>N;N++)j[t[i+N]]++;for(O=A,C=a;C>=1&&0===j[C];C--);if(O>C&&(O=C),0===C)return w[m++]=20971520,w[m++]=20971520,_.bits=1,0;for(R=1;C>R&&0===j[R];R++);for(R>O&&(O=R),F=1,z=1;a>=z;z++)if(F<<=1,F-=j[z],0>F)return-1;if(F>0&&(e===s||1!==C))return-1;for(M[1]=0,z=1;a>z;z++)M[z+1]=M[z]+j[z];for(N=0;b>N;N++)0!==t[i+N]&&(k[M[t[i+N]]++]=N);if(e===s?(L=K=k,S=19):e===f?(L=d,H-=257,K=u,P-=257,S=256):(L=h,K=c,S=-1),D=0,N=0,z=R,y=m,I=O,T=0,p=-1,U=1<r||e===l&&U>o)return 1;for(var Y=0;;){Y++,E=z-T,k[N]S?(B=K[P+k[N]],Z=L[H+k[N]]):(B=96,Z=0),g=1<>T)+v]=E<<24|B<<16|Z|0;while(0!==v);for(g=1<>=1;if(0!==g?(D&=g-1,D+=g):D=0,N++,0===--j[z]){if(z===C)break;z=t[i+k[N]]}if(z>O&&(D&x)!==p){for(0===T&&(T=O),y+=R,I=z-T,F=1<I+T&&(F-=j[I+T],!(0>=F));)I++,F<<=1;if(U+=1<r||e===l&&U>o)return 1;p=D&x,w[p]=O<<24|I<<16|y-m|0}}return 0!==D&&(w[y+D]=z-T<<24|64<<16|0),_.bits=O,0}},{"../utils/common":1}],10:[function(e,t,i){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,i){"use strict";function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=n},{}],"/lib/inflate.js":[function(e,t,i){"use strict";function n(e,t){var i=new c(t);if(i.push(e,!0),i.err)throw i.msg;return i.result}function a(e,t){return t=t||{},t.raw=!0,n(e,t)}var r=e("./zlib/inflate.js"),o=e("./utils/common"),s=e("./utils/strings"),f=e("./zlib/constants"),l=e("./zlib/messages"),d=e("./zlib/zstream"),u=e("./zlib/gzheader"),h=Object.prototype.toString,c=function(e){this.options=o.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0===(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var i=r.inflateInit2(this.strm,t.windowBits);if(i!==f.Z_OK)throw new Error(l[i]);this.header=new u,r.inflateGetHeader(this.strm,this.header)};c.prototype.push=function(e,t){var i,n,a,l,d,u=this.strm,c=this.options.chunkSize;if(this.ended)return!1;n=t===~~t?t:t===!0?f.Z_FINISH:f.Z_NO_FLUSH,"string"==typeof e?u.input=s.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?u.input=new Uint8Array(e):u.input=e,u.next_in=0,u.avail_in=u.input.length;do{if(0===u.avail_out&&(u.output=new o.Buf8(c),u.next_out=0,u.avail_out=c),i=r.inflate(u,f.Z_NO_FLUSH),i!==f.Z_STREAM_END&&i!==f.Z_OK)return this.onEnd(i),this.ended=!0,!1;u.next_out&&(0===u.avail_out||i===f.Z_STREAM_END||0===u.avail_in&&(n===f.Z_FINISH||n===f.Z_SYNC_FLUSH))&&("string"===this.options.to?(a=s.utf8border(u.output,u.next_out),l=u.next_out-a,d=s.buf2string(u.output,a),u.next_out=l,u.avail_out=c-l,l&&o.arraySet(u.output,u.output,a,l,0),this.onData(d)):this.onData(o.shrinkBuf(u.output,u.next_out)))}while(u.avail_in>0&&i!==f.Z_STREAM_END);return i===f.Z_STREAM_END&&(n=f.Z_FINISH),n===f.Z_FINISH?(i=r.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===f.Z_OK):n===f.Z_SYNC_FLUSH?(this.onEnd(f.Z_OK),u.avail_out=0,!0):!0},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){e===f.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},i.Inflate=c,i.inflate=n,i.inflateRaw=a,i.ungzip=n},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate.js":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")}); diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/doc/index.html b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/doc/index.html deleted file mode 100644 index f116b1aae..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/doc/index.html +++ /dev/null @@ -1,1626 +0,0 @@ -pako 0.2.6 API documentation

    pako - zlib port to javascript, very fast!

    -

    Build Status -NPM version

    -

    Why pako is cool:

    -
      -
    • Almost as fast in modern JS engines as C implementation (see benchmarks).
    • -
    • Works in browsers, you can browserify any separate component.
    • -
    • Chunking support for big blobs.
    • -
    • Results are binary equal to well known zlib (now v1.2.8 ported).
    • -
    -

    This project was done to understand how fast JS can be and is it necessary to -develop native C modules for CPU-intensive tasks. Enjoy the result!

    -

    Famous projects, using pako:

    - -

    Benchmarks:

    -
    node v0.10.26, 1mb sample:
    -
    -   deflate-dankogai x 4.73 ops/sec ±0.82% (15 runs sampled)
    -   deflate-gildas x 4.58 ops/sec ±2.33% (15 runs sampled)
    -   deflate-imaya x 3.22 ops/sec ±3.95% (12 runs sampled)
    - ! deflate-pako x 6.99 ops/sec ±0.51% (21 runs sampled)
    -   deflate-pako-string x 5.89 ops/sec ±0.77% (18 runs sampled)
    -   deflate-pako-untyped x 4.39 ops/sec ±1.58% (14 runs sampled)
    - * deflate-zlib x 14.71 ops/sec ±4.23% (59 runs sampled)
    -   inflate-dankogai x 32.16 ops/sec ±0.13% (56 runs sampled)
    -   inflate-imaya x 30.35 ops/sec ±0.92% (53 runs sampled)
    - ! inflate-pako x 69.89 ops/sec ±1.46% (71 runs sampled)
    -   inflate-pako-string x 19.22 ops/sec ±1.86% (49 runs sampled)
    -   inflate-pako-untyped x 17.19 ops/sec ±0.85% (32 runs sampled)
    - * inflate-zlib x 70.03 ops/sec ±1.64% (81 runs sampled)
    -
    -node v0.11.12, 1mb sample:
    -
    -   deflate-dankogai x 5.60 ops/sec ±0.49% (17 runs sampled)
    -   deflate-gildas x 5.06 ops/sec ±6.00% (16 runs sampled)
    -   deflate-imaya x 3.52 ops/sec ±3.71% (13 runs sampled)
    - ! deflate-pako x 11.52 ops/sec ±0.22% (32 runs sampled)
    -   deflate-pako-string x 9.53 ops/sec ±1.12% (27 runs sampled)
    -   deflate-pako-untyped x 5.44 ops/sec ±0.72% (17 runs sampled)
    - * deflate-zlib x 14.05 ops/sec ±3.34% (63 runs sampled)
    -   inflate-dankogai x 42.19 ops/sec ±0.09% (56 runs sampled)
    -   inflate-imaya x 79.68 ops/sec ±1.07% (68 runs sampled)
    - ! inflate-pako x 97.52 ops/sec ±0.83% (80 runs sampled)
    -   inflate-pako-string x 45.19 ops/sec ±1.69% (57 runs sampled)
    -   inflate-pako-untyped x 24.35 ops/sec ±2.59% (40 runs sampled)
    - * inflate-zlib x 60.32 ops/sec ±1.36% (69 runs sampled)
    -

    zlib's test is partialy afferted by marshling (that make sense for inflate only). -You can change deflate level to 0 in benchmark source, to investigate details. -For deflate level 6 results can be considered as correct.

    -

    Install:

    -

    node.js:

    -
    npm install pako
    -

    browser:

    -
    bower install pako
    -

    Example & API

    -

    Full docs - http://nodeca.github.io/pako/

    -
    var pako = require('pako');
    -
    -// Deflate
    -//
    -var input = new Uint8Array();
    -//... fill input data here
    -var output = pako.deflate(input);
    -
    -// Inflate (simple wrapper can throw exception on broken stream)
    -//
    -var compressed = new Uint8Array();
    -//... fill data to uncompress here
    -try {
    -  var result = pako.inflate(compressed);
    -catch (err) {
    -  console.log(err);
    -}
    -
    -//
    -// Alternate interface for chunking & without exceptions
    -//
    -
    -var inflator = new pako.Inflate();
    -
    -inflator.push(chunk1, false);
    -inflator.push(chunk2, false);
    -...
    -inflator.push(chunkN, true); // true -> last chunk
    -
    -if (inflator.err) {
    -  console.log(inflator.msg);
    -}
    -
    -var output = inflator.result;
    -

    Sometime you can wish to work with strings. For example, to send -big objects as json to server. Pako detects input data type. You can -force output to be string with option { to: 'string' }.

    -
    var pako = require('pako');
    -
    -var test = { my: 'super', puper: [456, 567], awesome: 'pako' };
    -
    -var binaryString = pako.deflate(JSON.stringify(test), { to: 'string' });
    -
    -//
    -// Here you can do base64 encode, make xhr requests and so on.
    -//
    -
    -var restored = JSON.parse(pako.inflate(binaryString, { to: 'string' }));
    -

    Notes

    -

    Pako does not contain some specific zlib functions:

    -
      -
    • deflate - methods deflateCopy, deflateBound, deflateParams, -deflatePending, deflatePrime, deflateSetDictionary, deflateTune.
    • -
    • inflate - inflateGetDictionary, inflateCopy, inflateMark, -inflatePrime, inflateSetDictionary, inflateSync, inflateSyncPoint, -inflateUndermine.
    • -
    -

    Authors

    - -

    Personal thanks to Vyacheslav Egorov (@mraleph) -for his awesome tutoruals about optimising JS code for v8, -IRHydra tool and his advices.

    -

    License

    -

    MIT

    -
    constructor

    Deflate.new

      • new Deflate(options)
      • options
        • Object
      • zlib deflate options.

        -

    Creates new deflator instance with specified params. Throws exception -on bad params. Supported options:

    -
      -
    • level
    • -
    • windowBits
    • -
    • memLevel
    • -
    • strategy
    • -
    -

    http://zlib.net/manual.html#Advanced -for more information on these.

    -

    Additional options, for internal needs:

    -
      -
    • chunkSize - size of generated data chunks (16K by default)
    • -
    • raw (Boolean) - do raw deflate
    • -
    • gzip (Boolean) - create gzip wrapper
    • -
    • to (String) - if equal to 'string', then result will be "binary string" - (each char code [0..255])
    • -
    • header (Object) - custom header for gzip
        -
      • text (Boolean) - true if compressed data believed to be text
      • -
      • time (Number) - modification time, unix timestamp
      • -
      • os (Number) - operation system code
      • -
      • extra (Array) - array of bytes with extra data (max 65536)
      • -
      • name (String) - file name (binary string)
      • -
      • comment (String) - comment (binary string)
      • -
      • hcrc (Boolean) - true if header crc should be added
      • -
      -
    • -
    -
    Example:
    -
    var pako = require('pako')
    -  , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])
    -  , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);
    -
    -var deflate = new pako.Deflate({ level: 3});
    -
    -deflate.push(chunk1, false);
    -deflate.push(chunk2, true);  // true -> last chunk
    -
    -if (deflate.err) { throw new Error(deflate.err); }
    -
    -console.log(deflate.result);
    -
    class property

    Deflate.err

      • Deflate.err
        • Number

    Error code after deflate finished. 0 (Z_OK) on success. -You will not need it in real life, because deflate errors -are possible only on wrong options or bad onData / onEnd -custom handlers.

    -
    instance method

    Deflate#onData

      • Deflate#onData(chunk)
        • Void
      • chunk
        • Uint8Array
        • Array
        • String
      • ouput data. Type of array depends -on js engine support. When string output requested, each chunk -will be string.

        -

    By default, stores data blocks in chunks[] property and glue -those in onEnd. Override this handler, if you need another behaviour.

    -
    instance method

    Deflate#onEnd

      • Deflate#onEnd(status)
        • Void
      • status
        • Number
      • deflate status. 0 (Z_OK) on success, -other if not.

        -

    Called once after you tell deflate that input stream complete -or error happenned. By default - join collected chunks, -free memory and fill results / err properties.

    -
    instance method

    Deflate#push

      • Deflate#push(data[, mode])
        • Boolean
      • data
        • Uint8Array
        • Array
        • ArrayBuffer
        • String
      • input data. Strings will be -converted to utf8 byte sequence.

        -
      • mode
        • Number
        • Boolean
      • 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. -See constants. Skipped or false means Z_NO_FLUSH, true meansh Z_FINISH.

        -

    Sends input data to deflate pipe, generating Deflate#onData calls with -new compressed chunks. Returns true on success. The last data block must have -mode Z_FINISH (or true). That flush internal pending buffers and call -Deflate#onEnd.

    -

    On fail call Deflate#onEnd with error code and return false.

    -

    We strongly recommend to use Uint8Array on input for best speed (output -array format is detected automatically). Also, don't skip last param and always -use the same type in your code (boolean or number). That will improve JS speed.

    -

    For regular Array-s make sure all elements are [0..255].

    -
    Example
    -
    push(chunk, false); // push one of data chunks
    -...
    -push(chunk, true);  // push last chunk
    -
    method

    deflate

      • deflate(data[, options])
        • Uint8Array
        • Array
        • String
      • data
        • Uint8Array
        • Array
        • String
      • input data to compress.

        -
      • options
        • Object
      • zlib deflate options.

        -

    Compress data with deflate alrorythm and options.

    -

    Supported options are:

    -
      -
    • level
    • -
    • windowBits
    • -
    • memLevel
    • -
    • strategy
    • -
    -

    http://zlib.net/manual.html#Advanced -for more information on these.

    -

    Sugar (options):

    -
      -
    • raw (Boolean) - say that we work with raw stream, if you don't wish to specify -negative windowBits implicitly.
    • -
    • to (String) - if equal to 'string', then result will be "binary string" - (each char code [0..255])
    • -
    -
    Example:
    -
    var pako = require('pako')
    -  , data = Uint8Array([1,2,3,4,5,6,7,8,9]);
    -
    -console.log(pako.deflate(data));
    -
    method

    deflateRaw

      • deflateRaw(data[, options])
        • Uint8Array
        • Array
        • String
      • data
        • Uint8Array
        • Array
        • String
      • input data to compress.

        -
      • options
        • Object
      • zlib deflate options.

        -

    The same as deflate, but creates raw data, without wrapper -(header and adler32 crc).

    -
    method

    gzip

      • gzip(data[, options])
        • Uint8Array
        • Array
        • String
      • data
        • Uint8Array
        • Array
        • String
      • input data to compress.

        -
      • options
        • Object
      • zlib deflate options.

        -

    The same as deflate, but create gzip wrapper instead of -deflate one.

    -
    constructor

    Inflate.new

      • new Inflate(options)
      • options
        • Object
      • zlib inflate options.

        -

    Creates new inflator instance with specified params. Throws exception -on bad params. Supported options:

    -
      -
    • windowBits
    • -
    -

    http://zlib.net/manual.html#Advanced -for more information on these.

    -

    Additional options, for internal needs:

    -
      -
    • chunkSize - size of generated data chunks (16K by default)
    • -
    • raw (Boolean) - do raw inflate
    • -
    • to (String) - if equal to 'string', then result will be converted -from utf8 to utf16 (javascript) string. When string output requested, -chunk length can differ from chunkSize, depending on content.
    • -
    -

    By default, when no options set, autodetect deflate/gzip data format via -wrapper header.

    -
    Example:
    -
    var pako = require('pako')
    -  , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])
    -  , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);
    -
    -var inflate = new pako.Inflate({ level: 3});
    -
    -inflate.push(chunk1, false);
    -inflate.push(chunk2, true);  // true -> last chunk
    -
    -if (inflate.err) { throw new Error(inflate.err); }
    -
    -console.log(inflate.result);
    -
    class property

    Inflate.err

      • Inflate.err
        • Number

    Error code after inflate finished. 0 (Z_OK) on success. -Should be checked if broken data possible.

    -
    instance method

    Inflate#onData

      • Inflate#onData(chunk)
        • Void
      • chunk
        • Uint8Array
        • Array
        • String
      • ouput data. Type of array depends -on js engine support. When string output requested, each chunk -will be string.

        -

    By default, stores data blocks in chunks[] property and glue -those in onEnd. Override this handler, if you need another behaviour.

    -
    instance method

    Inflate#onEnd

      • Inflate#onEnd(status)
        • Void
      • status
        • Number
      • inflate status. 0 (Z_OK) on success, -other if not.

        -

    Called once after you tell inflate that input stream complete -or error happenned. By default - join collected chunks, -free memory and fill results / err properties.

    -
    instance method

    Inflate#push

      • Inflate#push(data[, mode])
        • Boolean
      • data
        • Uint8Array
        • Array
        • ArrayBuffer
        • String
      • input data

        -
      • mode
        • Number
        • Boolean
      • 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. -See constants. Skipped or false means Z_NO_FLUSH, true meansh Z_FINISH.

        -

    Sends input data to inflate pipe, generating Inflate#onData calls with -new output chunks. Returns true on success. The last data block must have -mode Z_FINISH (or true). That flush internal pending buffers and call -Inflate#onEnd.

    -

    On fail call Inflate#onEnd with error code and return false.

    -

    We strongly recommend to use Uint8Array on input for best speed (output -format is detected automatically). Also, don't skip last param and always -use the same type in your code (boolean or number). That will improve JS speed.

    -

    For regular Array-s make sure all elements are [0..255].

    -
    Example
    -
    push(chunk, false); // push one of data chunks
    -...
    -push(chunk, true);  // push last chunk
    -
    method

    inflate

      • inflate(data[, options])
        • Uint8Array
        • Array
        • String
      • data
        • Uint8Array
        • Array
        • String
      • input data to decompress.

        -
      • options
        • Object
      • zlib inflate options.

        -

    Decompress data with inflate/ungzip and options. Autodetect -format via wrapper header by default. That's why we don't provide -separate ungzip method.

    -

    Supported options are:

    -
      -
    • windowBits
    • -
    -

    http://zlib.net/manual.html#Advanced -for more information.

    -

    Sugar (options):

    -
      -
    • raw (Boolean) - say that we work with raw stream, if you don't wish to specify -negative windowBits implicitly.
    • -
    • to (String) - if equal to 'string', then result will be converted -from utf8 to utf16 (javascript) string. When string output requested, -chunk length can differ from chunkSize, depending on content.
    • -
    -
    Example:
    -
    var pako = require('pako')
    -  , input = pako.deflate([1,2,3,4,5,6,7,8,9])
    -  , output;
    -
    -try {
    -  output = pako.inflate(input);
    -} catch (err)
    -  console.log(err);
    -}
    -
    method

    inflateRaw

      • inflateRaw(data[, options])
        • Uint8Array
        • Array
        • String
      • data
        • Uint8Array
        • Array
        • String
      • input data to decompress.

        -
      • options
        • Object
      • zlib inflate options.

        -

    The same as inflate, but creates raw data, without wrapper -(header and adler32 crc).

    -
    method

    ungzip

      • ungzip(data[, options])
        • Uint8Array
        • Array
        • String
      • data
        • Uint8Array
        • Array
        • String
      • input data to decompress.

        -
      • options
        • Object
      • zlib inflate options.

        -

    Just shortcut to inflate, because it autodetects format -by header.content. Done for convenience.

    -

    Last updated on Tue, 24 Mar 2015 02:38:32 GMT. Generated by ndoc

    \ No newline at end of file diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/index.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/index.js deleted file mode 100644 index cd0725152..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/index.js +++ /dev/null @@ -1,14 +0,0 @@ -// Top level file is just a mixin of submodules & constants -'use strict'; - -var assign = require('./lib/utils/common').assign; - -var deflate = require('./lib/deflate'); -var inflate = require('./lib/inflate'); -var constants = require('./lib/zlib/constants'); - -var pako = {}; - -assign(pako, deflate, inflate, constants); - -module.exports = pako; diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/deflate.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/deflate.js deleted file mode 100644 index 676856147..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/deflate.js +++ /dev/null @@ -1,376 +0,0 @@ -'use strict'; - - -var zlib_deflate = require('./zlib/deflate.js'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var msg = require('./zlib/messages'); -var zstream = require('./zlib/zstream'); - -var toString = Object.prototype.toString; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - -var Z_NO_FLUSH = 0; -var Z_FINISH = 4; - -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_SYNC_FLUSH = 2; - -var Z_DEFAULT_COMPRESSION = -1; - -var Z_DEFAULT_STRATEGY = 0; - -var Z_DEFLATED = 8; - -/* ===========================================================================*/ - - -/** - * class Deflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[deflate]], - * [[deflateRaw]] and [[gzip]]. - **/ - -/* internal - * Deflate.chunks -> Array - * - * Chunks of output data, if [[Deflate#onData]] not overriden. - **/ - -/** - * Deflate.result -> Uint8Array|Array - * - * Compressed result, generated by default [[Deflate#onData]] - * and [[Deflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Deflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Deflate.err -> Number - * - * Error code after deflate finished. 0 (Z_OK) on success. - * You will not need it in real life, because deflate errors - * are possible only on wrong options or bad `onData` / `onEnd` - * custom handlers. - **/ - -/** - * Deflate.msg -> String - * - * Error message, if [[Deflate.err]] != 0 - **/ - - -/** - * new Deflate(options) - * - options (Object): zlib deflate options. - * - * Creates new deflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `level` - * - `windowBits` - * - `memLevel` - * - `strategy` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw deflate - * - `gzip` (Boolean) - create gzip wrapper - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - `header` (Object) - custom header for gzip - * - `text` (Boolean) - true if compressed data believed to be text - * - `time` (Number) - modification time, unix timestamp - * - `os` (Number) - operation system code - * - `extra` (Array) - array of bytes with extra data (max 65536) - * - `name` (String) - file name (binary string) - * - `comment` (String) - comment (binary string) - * - `hcrc` (Boolean) - true if header crc should be added - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var deflate = new pako.Deflate({ level: 3}); - * - * deflate.push(chunk1, false); - * deflate.push(chunk2, true); // true -> last chunk - * - * if (deflate.err) { throw new Error(deflate.err); } - * - * console.log(deflate.result); - * ``` - **/ -var Deflate = function(options) { - - this.options = utils.assign({ - level: Z_DEFAULT_COMPRESSION, - method: Z_DEFLATED, - chunkSize: 16384, - windowBits: 15, - memLevel: 8, - strategy: Z_DEFAULT_STRATEGY, - to: '' - }, options || {}); - - var opt = this.options; - - if (opt.raw && (opt.windowBits > 0)) { - opt.windowBits = -opt.windowBits; - } - - else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { - opt.windowBits += 16; - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new zstream(); - this.strm.avail_out = 0; - - var status = zlib_deflate.deflateInit2( - this.strm, - opt.level, - opt.method, - opt.windowBits, - opt.memLevel, - opt.strategy - ); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - if (opt.header) { - zlib_deflate.deflateSetHeader(this.strm, opt.header); - } -}; - -/** - * Deflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be - * converted to utf8 byte sequence. - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH. - * - * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with - * new compressed chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the compression context. - * - * On fail call [[Deflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * array format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Deflate.prototype.push = function(data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - - if (this.ended) { return false; } - - _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // If we need to compress text, change encoding to utf8. - strm.input = strings.string2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ - - if (status !== Z_STREAM_END && status !== Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { - if (this.options.to === 'string') { - this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); - - // Finalize on the last chunk. - if (_mode === Z_FINISH) { - status = zlib_deflate.deflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === Z_SYNC_FLUSH) { - this.onEnd(Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Deflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): ouput data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Deflate.prototype.onData = function(chunk) { - this.chunks.push(chunk); -}; - - -/** - * Deflate#onEnd(status) -> Void - * - status (Number): deflate status. 0 (Z_OK) on success, - * other if not. - * - * Called once after you tell deflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Deflate.prototype.onEnd = function(status) { - // On success - join - if (status === Z_OK) { - if (this.options.to === 'string') { - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * deflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * Compress `data` with deflate alrorythm and `options`. - * - * Supported options are: - * - * - level - * - windowBits - * - memLevel - * - strategy - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); - * - * console.log(pako.deflate(data)); - * ``` - **/ -function deflate(input, options) { - var deflator = new Deflate(options); - - deflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (deflator.err) { throw deflator.msg; } - - return deflator.result; -} - - -/** - * deflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function deflateRaw(input, options) { - options = options || {}; - options.raw = true; - return deflate(input, options); -} - - -/** - * gzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but create gzip wrapper instead of - * deflate one. - **/ -function gzip(input, options) { - options = options || {}; - options.gzip = true; - return deflate(input, options); -} - - -exports.Deflate = Deflate; -exports.deflate = deflate; -exports.deflateRaw = deflateRaw; -exports.gzip = gzip; diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/inflate.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/inflate.js deleted file mode 100644 index f7543366e..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/inflate.js +++ /dev/null @@ -1,379 +0,0 @@ -'use strict'; - - -var zlib_inflate = require('./zlib/inflate.js'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var c = require('./zlib/constants'); -var msg = require('./zlib/messages'); -var zstream = require('./zlib/zstream'); -var gzheader = require('./zlib/gzheader'); - -var toString = Object.prototype.toString; - -/** - * class Inflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[inflate]] - * and [[inflateRaw]]. - **/ - -/* internal - * inflate.chunks -> Array - * - * Chunks of output data, if [[Inflate#onData]] not overriden. - **/ - -/** - * Inflate.result -> Uint8Array|Array|String - * - * Uncompressed result, generated by default [[Inflate#onData]] - * and [[Inflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Inflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Inflate.err -> Number - * - * Error code after inflate finished. 0 (Z_OK) on success. - * Should be checked if broken data possible. - **/ - -/** - * Inflate.msg -> String - * - * Error message, if [[Inflate.err]] != 0 - **/ - - -/** - * new Inflate(options) - * - options (Object): zlib inflate options. - * - * Creates new inflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `windowBits` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw inflate - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * By default, when no options set, autodetect deflate/gzip data format via - * wrapper header. - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var inflate = new pako.Inflate({ level: 3}); - * - * inflate.push(chunk1, false); - * inflate.push(chunk2, true); // true -> last chunk - * - * if (inflate.err) { throw new Error(inflate.err); } - * - * console.log(inflate.result); - * ``` - **/ -var Inflate = function(options) { - - this.options = utils.assign({ - chunkSize: 16384, - windowBits: 0, - to: '' - }, options || {}); - - var opt = this.options; - - // Force window size for `raw` data, if not set directly, - // because we have no header for autodetect. - if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { - opt.windowBits = -opt.windowBits; - if (opt.windowBits === 0) { opt.windowBits = -15; } - } - - // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate - if ((opt.windowBits >= 0) && (opt.windowBits < 16) && - !(options && options.windowBits)) { - opt.windowBits += 32; - } - - // Gzip header has no info about windows size, we can do autodetect only - // for deflate. So, if window size not set, force it to max when gzip possible - if ((opt.windowBits > 15) && (opt.windowBits < 48)) { - // bit 3 (16) -> gzipped data - // bit 4 (32) -> autodetect gzip/deflate - if ((opt.windowBits & 15) === 0) { - opt.windowBits |= 15; - } - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new zstream(); - this.strm.avail_out = 0; - - var status = zlib_inflate.inflateInit2( - this.strm, - opt.windowBits - ); - - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - - this.header = new gzheader(); - - zlib_inflate.inflateGetHeader(this.strm, this.header); -}; - -/** - * Inflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH. - * - * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with - * new output chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the decompression context. - * - * On fail call [[Inflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Inflate.prototype.push = function(data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - var next_out_utf8, tail, utf8str; - - if (this.ended) { return false; } - _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // Only binary strings can be decompressed on practice - strm.input = strings.binstring2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - - status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ - - if (status !== c.Z_STREAM_END && status !== c.Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - - if (strm.next_out) { - if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { - - if (this.options.to === 'string') { - - next_out_utf8 = strings.utf8border(strm.output, strm.next_out); - - tail = strm.next_out - next_out_utf8; - utf8str = strings.buf2string(strm.output, next_out_utf8); - - // move tail - strm.next_out = tail; - strm.avail_out = chunkSize - tail; - if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } - - this.onData(utf8str); - - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } - } while ((strm.avail_in > 0) && status !== c.Z_STREAM_END); - - if (status === c.Z_STREAM_END) { - _mode = c.Z_FINISH; - } - - // Finalize on the last chunk. - if (_mode === c.Z_FINISH) { - status = zlib_inflate.inflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === c.Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === c.Z_SYNC_FLUSH) { - this.onEnd(c.Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Inflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): ouput data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Inflate.prototype.onData = function(chunk) { - this.chunks.push(chunk); -}; - - -/** - * Inflate#onEnd(status) -> Void - * - status (Number): inflate status. 0 (Z_OK) on success, - * other if not. - * - * Called either after you tell inflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Inflate.prototype.onEnd = function(status) { - // On success - join - if (status === c.Z_OK) { - if (this.options.to === 'string') { - // Glue & convert here, until we teach pako to send - // utf8 alligned strings to onData - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * inflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Decompress `data` with inflate/ungzip and `options`. Autodetect - * format via wrapper header by default. That's why we don't provide - * separate `ungzip` method. - * - * Supported options are: - * - * - windowBits - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) - * , output; - * - * try { - * output = pako.inflate(input); - * } catch (err) - * console.log(err); - * } - * ``` - **/ -function inflate(input, options) { - var inflator = new Inflate(options); - - inflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (inflator.err) { throw inflator.msg; } - - return inflator.result; -} - - -/** - * inflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * The same as [[inflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function inflateRaw(input, options) { - options = options || {}; - options.raw = true; - return inflate(input, options); -} - - -/** - * ungzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Just shortcut to [[inflate]], because it autodetects format - * by header.content. Done for convenience. - **/ - - -exports.Inflate = Inflate; -exports.inflate = inflate; -exports.inflateRaw = inflateRaw; -exports.ungzip = inflate; diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/utils/common.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/utils/common.js deleted file mode 100644 index 67aaba1b3..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/utils/common.js +++ /dev/null @@ -1,102 +0,0 @@ -'use strict'; - - -var TYPED_OK = (typeof Uint8Array !== 'undefined') && - (typeof Uint16Array !== 'undefined') && - (typeof Int32Array !== 'undefined'); - - -exports.assign = function (obj /*from1, from2, from3, ...*/) { - var sources = Array.prototype.slice.call(arguments, 1); - while (sources.length) { - var source = sources.shift(); - if (!source) { continue; } - - if (typeof source !== 'object') { - throw new TypeError(source + 'must be non-object'); - } - - for (var p in source) { - if (source.hasOwnProperty(p)) { - obj[p] = source[p]; - } - } - } - - return obj; -}; - - -// reduce buffer size, avoiding mem copy -exports.shrinkBuf = function (buf, size) { - if (buf.length === size) { return buf; } - if (buf.subarray) { return buf.subarray(0, size); } - buf.length = size; - return buf; -}; - - -var fnTyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - if (src.subarray && dest.subarray) { - dest.set(src.subarray(src_offs, src_offs+len), dest_offs); - return; - } - // Fallback to ordinary array - for (var i=0; i= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254]=_utf8len[254]=1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) { - c2 = str.charCodeAt(m_pos+1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i=0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) { - c2 = str.charCodeAt(m_pos+1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // use fallback for big arrays to avoid stack overflow - if (len < 65537) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i=0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function(buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function(str) { - var buf = new utils.Buf8(str.length); - for (var i=0, len=buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len*2); - - for (out=0, i=0; i 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function(buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max-1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Fuckup - very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means vuffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/adler32.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/adler32.js deleted file mode 100644 index dcefe9379..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/adler32.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It doesn't worth to make additional optimizationa as in original. -// Small size is preferable. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/constants.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/constants.js deleted file mode 100644 index f32af66f2..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/constants.js +++ /dev/null @@ -1,47 +0,0 @@ -module.exports = { - - /* Allowed flush values; see deflate() and inflate() below for details */ - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_TREES: 6, - - /* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - //Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - //Z_VERSION_ERROR: -6, - - /* compression levels */ - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - - - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - - /* Possible values of the data_type field (though see inflate()) */ - Z_BINARY: 0, - Z_TEXT: 1, - //Z_ASCII: 1, // = Z_TEXT (deprecated) - Z_UNKNOWN: 2, - - /* The deflate compression method */ - Z_DEFLATED: 8 - //Z_NULL: null // Use -1 or null inline, depending on var type -}; diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/crc32.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/crc32.js deleted file mode 100644 index 767aa805d..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/crc32.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n =0; n < 256; n++) { - c = n; - for (var k =0; k < 8; k++) { - c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc = crc ^ (-1); - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/deflate.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/deflate.js deleted file mode 100644 index ff0bb0614..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/deflate.js +++ /dev/null @@ -1,1765 +0,0 @@ -'use strict'; - -var utils = require('../utils/common'); -var trees = require('./trees'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var msg = require('./messages'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -var Z_NO_FLUSH = 0; -var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -//var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -//var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -//var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - - -/* compression levels */ -//var Z_NO_COMPRESSION = 0; -//var Z_BEST_SPEED = 1; -//var Z_BEST_COMPRESSION = 9; -var Z_DEFAULT_COMPRESSION = -1; - - -var Z_FILTERED = 1; -var Z_HUFFMAN_ONLY = 2; -var Z_RLE = 3; -var Z_FIXED = 4; -var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -//var Z_BINARY = 0; -//var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - - -/* The deflate compression method */ -var Z_DEFLATED = 8; - -/*============================================================================*/ - - -var MAX_MEM_LEVEL = 9; -/* Maximum value for memLevel in deflateInit2 */ -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_MEM_LEVEL = 8; - - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ -var LITERALS = 256; -/* number of literal bytes 0..255 */ -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ -var D_CODES = 30; -/* number of distance codes */ -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ -var HEAP_SIZE = 2*L_CODES + 1; -/* maximum heap size */ -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); - -var PRESET_DICT = 0x20; - -var INIT_STATE = 42; -var EXTRA_STATE = 69; -var NAME_STATE = 73; -var COMMENT_STATE = 91; -var HCRC_STATE = 103; -var BUSY_STATE = 113; -var FINISH_STATE = 666; - -var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ -var BS_BLOCK_DONE = 2; /* block flush performed */ -var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ -var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ - -var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. - -function err(strm, errorCode) { - strm.msg = msg[errorCode]; - return errorCode; -} - -function rank(f) { - return ((f) << 1) - ((f) > 4 ? 9 : 0); -} - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->output buffer and copying into it. - * (See also read_buf()). - */ -function flush_pending(strm) { - var s = strm.state; - - //_tr_flush_bits(s); - var len = s.pending; - if (len > strm.avail_out) { - len = strm.avail_out; - } - if (len === 0) { return; } - - utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); - strm.next_out += len; - s.pending_out += len; - strm.total_out += len; - strm.avail_out -= len; - s.pending -= len; - if (s.pending === 0) { - s.pending_out = 0; - } -} - - -function flush_block_only (s, last) { - trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); - s.block_start = s.strstart; - flush_pending(s.strm); -} - - -function put_byte(s, b) { - s.pending_buf[s.pending++] = b; -} - - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. - */ -function putShortMSB(s, b) { -// put_byte(s, (Byte)(b >> 8)); -// put_byte(s, (Byte)(b & 0xff)); - s.pending_buf[s.pending++] = (b >>> 8) & 0xff; - s.pending_buf[s.pending++] = b & 0xff; -} - - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->input buffer and copying from it. - * (See also flush_pending()). - */ -function read_buf(strm, buf, start, size) { - var len = strm.avail_in; - - if (len > size) { len = size; } - if (len === 0) { return 0; } - - strm.avail_in -= len; - - utils.arraySet(buf, strm.input, strm.next_in, len, start); - if (strm.state.wrap === 1) { - strm.adler = adler32(strm.adler, buf, len, start); - } - - else if (strm.state.wrap === 2) { - strm.adler = crc32(strm.adler, buf, len, start); - } - - strm.next_in += len; - strm.total_in += len; - - return len; -} - - -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. - */ -function longest_match(s, cur_match) { - var chain_length = s.max_chain_length; /* max hash chain length */ - var scan = s.strstart; /* current string */ - var match; /* matched string */ - var len; /* length of current match */ - var best_len = s.prev_length; /* best match length so far */ - var nice_match = s.nice_match; /* stop if match long enough */ - var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? - s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; - - var _win = s.window; // shortcut - - var wmask = s.w_mask; - var prev = s.prev; - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - - var strend = s.strstart + MAX_MATCH; - var scan_end1 = _win[scan + best_len - 1]; - var scan_end = _win[scan + best_len]; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s.prev_length >= s.good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if (nice_match > s.lookahead) { nice_match = s.lookahead; } - - // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - do { - // Assert(cur_match < s->strstart, "no future"); - match = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2. Note that the checks below - * for insufficient lookahead only occur occasionally for performance - * reasons. Therefore uninitialized memory will be accessed, and - * conditional jumps will be made that depend on those values. - * However the length of the match is limited to the lookahead, so - * the output of deflate is not affected by the uninitialized values. - */ - - if (_win[match + best_len] !== scan_end || - _win[match + best_len - 1] !== scan_end1 || - _win[match] !== _win[scan] || - _win[++match] !== _win[scan + 1]) { - continue; - } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2; - match++; - // Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - /*jshint noempty:false*/ - } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - scan < strend); - - // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - - if (len > best_len) { - s.match_start = cur_match; - best_len = len; - if (len >= nice_match) { - break; - } - scan_end1 = _win[scan + best_len - 1]; - scan_end = _win[scan + best_len]; - } - } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); - - if (best_len <= s.lookahead) { - return best_len; - } - return s.lookahead; -} - - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -function fill_window(s) { - var _w_size = s.w_size; - var p, n, m, more, str; - - //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = s.window_size - s.lookahead - s.strstart; - - // JS ints have 32 bit, block below not needed - /* Deal with !@#$% 64K limit: */ - //if (sizeof(int) <= 2) { - // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - // more = wsize; - // - // } else if (more == (unsigned)(-1)) { - // /* Very unlikely, but possible on 16 bit machine if - // * strstart == 0 && lookahead == 1 (input done a byte at time) - // */ - // more--; - // } - //} - - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { - - utils.arraySet(s.window, s.window, _w_size, _w_size, 0); - s.match_start -= _w_size; - s.strstart -= _w_size; - /* we now have strstart >= MAX_DIST */ - s.block_start -= _w_size; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - - n = s.hash_size; - p = n; - do { - m = s.head[--p]; - s.head[p] = (m >= _w_size ? m - _w_size : 0); - } while (--n); - - n = _w_size; - p = n; - do { - m = s.prev[--p]; - s.prev[p] = (m >= _w_size ? m - _w_size : 0); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); - - more += _w_size; - } - if (s.strm.avail_in === 0) { - break; - } - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - //Assert(more >= 2, "more < 2"); - n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); - s.lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s.lookahead + s.insert >= MIN_MATCH) { - str = s.strstart - s.insert; - s.ins_h = s.window[str]; - - /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; -//#if MIN_MATCH != 3 -// Call update_hash() MIN_MATCH-3 more times -//#endif - while (s.insert) { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH-1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = str; - str++; - s.insert--; - if (s.lookahead + s.insert < MIN_MATCH) { - break; - } - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ -// if (s.high_water < s.window_size) { -// var curr = s.strstart + s.lookahead; -// var init = 0; -// -// if (s.high_water < curr) { -// /* Previous high water mark below current data -- zero WIN_INIT -// * bytes or up to end of window, whichever is less. -// */ -// init = s.window_size - curr; -// if (init > WIN_INIT) -// init = WIN_INIT; -// zmemzero(s->window + curr, (unsigned)init); -// s->high_water = curr + init; -// } -// else if (s->high_water < (ulg)curr + WIN_INIT) { -// /* High water mark at or above current data, but below current data -// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up -// * to end of window, whichever is less. -// */ -// init = (ulg)curr + WIN_INIT - s->high_water; -// if (init > s->window_size - s->high_water) -// init = s->window_size - s->high_water; -// zmemzero(s->window + s->high_water, (unsigned)init); -// s->high_water += init; -// } -// } -// -// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, -// "not enough room for search"); -} - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. - */ -function deflate_stored(s, flush) { - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: - */ - var max_block_size = 0xffff; - - if (max_block_size > s.pending_buf_size - 5) { - max_block_size = s.pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s.lookahead <= 1) { - - //Assert(s->strstart < s->w_size+MAX_DIST(s) || - // s->block_start >= (long)s->w_size, "slide too late"); -// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || -// s.block_start >= s.w_size)) { -// throw new Error("slide too late"); -// } - - fill_window(s); - if (s.lookahead === 0 && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - - if (s.lookahead === 0) { - break; - } - /* flush the current block */ - } - //Assert(s->block_start >= 0L, "block gone"); -// if (s.block_start < 0) throw new Error("block gone"); - - s.strstart += s.lookahead; - s.lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - var max_start = s.block_start + max_block_size; - - if (s.strstart === 0 || s.strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s.lookahead = s.strstart - max_start; - s.strstart = max_start; - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - - - } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: - */ - if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - - s.insert = 0; - - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - - if (s.strstart > s.block_start) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_NEED_MORE; -} - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ -function deflate_fast(s, flush) { - var hash_head; /* head of the hash chain */ - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; /* flush the current block */ - } - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - } - if (s.match_length >= MIN_MATCH) { - // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only - - /*** _tr_tally_dist(s, s.strstart - s.match_start, - s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { - s.match_length--; /* string at strstart already in table */ - do { - s.strstart++; - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s.match_length !== 0); - s.strstart++; - } else - { - s.strstart += s.match_length; - s.match_length = 0; - s.ins_h = s.window[s.strstart]; - /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; - -//#if MIN_MATCH != 3 -// Call UPDATE_HASH() MIN_MATCH-3 more times -//#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s.window[s.strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = ((s.strstart < (MIN_MATCH-1)) ? s.strstart : MIN_MATCH-1); - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ -function deflate_slow(s, flush) { - var hash_head; /* head of hash chain */ - var bflush; /* set if current block must be flushed */ - - var max_insert; - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - */ - s.prev_length = s.match_length; - s.prev_match = s.match_start; - s.match_length = MIN_MATCH-1; - - if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && - s.strstart - hash_head <= (s.w_size-MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - - if (s.match_length <= 5 && - (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s.match_length = MIN_MATCH-1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { - max_insert = s.strstart + s.lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - //check_match(s, s.strstart-1, s.prev_match, s.prev_length); - - /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, - s.prev_length - MIN_MATCH, bflush);***/ - bflush = trees._tr_tally(s, s.strstart - 1- s.prev_match, s.prev_length - MIN_MATCH); - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s.lookahead -= s.prev_length-1; - s.prev_length -= 2; - do { - if (++s.strstart <= max_insert) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - } while (--s.prev_length !== 0); - s.match_available = 0; - s.match_length = MIN_MATCH-1; - s.strstart++; - - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - } else if (s.match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart-1]); - - if (bflush) { - /*** FLUSH_BLOCK_ONLY(s, 0) ***/ - flush_block_only(s, false); - /***/ - } - s.strstart++; - s.lookahead--; - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s.match_available = 1; - s.strstart++; - s.lookahead--; - } - } - //Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s.match_available) { - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart-1]); - - s.match_available = 0; - } - s.insert = s.strstart < MIN_MATCH-1 ? s.strstart : MIN_MATCH-1; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_BLOCK_DONE; -} - - -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) - */ -function deflate_rle(s, flush) { - var bflush; /* set if current block must be flushed */ - var prev; /* byte at distance one to match */ - var scan, strend; /* scan goes up to strend for length of run */ - - var _win = s.window; - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s.lookahead <= MAX_MATCH) { - fill_window(s); - if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s.match_length = 0; - if (s.lookahead >= MIN_MATCH && s.strstart > 0) { - scan = s.strstart - 1; - prev = _win[scan]; - if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { - strend = s.strstart + MAX_MATCH; - do { - /*jshint noempty:false*/ - } while (prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - scan < strend); - s.match_length = MAX_MATCH - (strend - scan); - if (s.match_length > s.lookahead) { - s.match_length = s.lookahead; - } - } - //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s.match_length >= MIN_MATCH) { - //check_match(s, s.strstart, s.strstart - 1, s.match_length); - - /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - s.strstart += s.match_length; - s.match_length = 0; - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -function deflate_huff(s, flush) { - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s.lookahead === 0) { - fill_window(s); - if (s.lookahead === 0) { - if (flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s.match_length = 0; - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - s.lookahead--; - s.strstart++; - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ -var Config = function (good_length, max_lazy, nice_length, max_chain, func) { - this.good_length = good_length; - this.max_lazy = max_lazy; - this.nice_length = nice_length; - this.max_chain = max_chain; - this.func = func; -}; - -var configuration_table; - -configuration_table = [ - /* good lazy nice chain */ - new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ - new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ - new Config(4, 5, 16, 8, deflate_fast), /* 2 */ - new Config(4, 6, 32, 32, deflate_fast), /* 3 */ - - new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ - new Config(8, 16, 32, 32, deflate_slow), /* 5 */ - new Config(8, 16, 128, 128, deflate_slow), /* 6 */ - new Config(8, 32, 128, 256, deflate_slow), /* 7 */ - new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ - new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ -]; - - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -function lm_init(s) { - s.window_size = 2 * s.w_size; - - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - - /* Set the default configuration parameters: - */ - s.max_lazy_match = configuration_table[s.level].max_lazy; - s.good_match = configuration_table[s.level].good_length; - s.nice_match = configuration_table[s.level].nice_length; - s.max_chain_length = configuration_table[s.level].max_chain; - - s.strstart = 0; - s.block_start = 0; - s.lookahead = 0; - s.insert = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - s.ins_h = 0; -} - - -function DeflateState() { - this.strm = null; /* pointer back to this zlib stream */ - this.status = 0; /* as the name implies */ - this.pending_buf = null; /* output still pending */ - this.pending_buf_size = 0; /* size of pending_buf */ - this.pending_out = 0; /* next pending byte to output to the stream */ - this.pending = 0; /* nb of bytes in the pending buffer */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.gzhead = null; /* gzip header information to write */ - this.gzindex = 0; /* where in extra, name, or comment */ - this.method = Z_DEFLATED; /* can only be DEFLATED */ - this.last_flush = -1; /* value of flush param for previous deflate call */ - - this.w_size = 0; /* LZ77 window size (32K by default) */ - this.w_bits = 0; /* log2(w_size) (8..16) */ - this.w_mask = 0; /* w_size - 1 */ - - this.window = null; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. - */ - - this.window_size = 0; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - this.prev = null; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - this.head = null; /* Heads of the hash chains or NIL. */ - - this.ins_h = 0; /* hash index of string to be inserted */ - this.hash_size = 0; /* number of elements in hash table */ - this.hash_bits = 0; /* log2(hash_size) */ - this.hash_mask = 0; /* hash_size-1 */ - - this.hash_shift = 0; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - this.block_start = 0; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - this.match_length = 0; /* length of best match */ - this.prev_match = 0; /* previous match */ - this.match_available = 0; /* set if previous match exists */ - this.strstart = 0; /* start of string to insert */ - this.match_start = 0; /* start of matching string */ - this.lookahead = 0; /* number of valid bytes ahead in window */ - - this.prev_length = 0; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - this.max_chain_length = 0; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - this.max_lazy_match = 0; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ - // That's alias to max_lazy_match, don't use directly - //this.max_insert_length = 0; - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - this.level = 0; /* compression level (1..9) */ - this.strategy = 0; /* favor or force Huffman coding*/ - - this.good_match = 0; - /* Use a faster search when the previous match is longer than this */ - - this.nice_match = 0; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - - /* Didn't use ct_data typedef below to suppress compiler warning */ - - // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - // Use flat array of DOUBLE size, with interleaved fata, - // because JS does not support effective - this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); - this.dyn_dtree = new utils.Buf16((2*D_CODES+1) * 2); - this.bl_tree = new utils.Buf16((2*BL_CODES+1) * 2); - zero(this.dyn_ltree); - zero(this.dyn_dtree); - zero(this.bl_tree); - - this.l_desc = null; /* desc. for literal tree */ - this.d_desc = null; /* desc. for distance tree */ - this.bl_desc = null; /* desc. for bit length tree */ - - //ush bl_count[MAX_BITS+1]; - this.bl_count = new utils.Buf16(MAX_BITS+1); - /* number of codes at each bit length for an optimal tree */ - - //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - this.heap = new utils.Buf16(2*L_CODES+1); /* heap used to build the Huffman trees */ - zero(this.heap); - - this.heap_len = 0; /* number of elements in the heap */ - this.heap_max = 0; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - this.depth = new utils.Buf16(2*L_CODES+1); //uch depth[2*L_CODES+1]; - zero(this.depth); - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - this.l_buf = 0; /* buffer index for literals or lengths */ - - this.lit_bufsize = 0; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - this.last_lit = 0; /* running index in l_buf */ - - this.d_buf = 0; - /* Buffer index for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - this.opt_len = 0; /* bit length of current block with optimal trees */ - this.static_len = 0; /* bit length of current block with static trees */ - this.matches = 0; /* number of string matches in current block */ - this.insert = 0; /* bytes at end of window left to insert */ - - - this.bi_buf = 0; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - this.bi_valid = 0; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - - // Used for window memory init. We safely ignore it for JS. That makes - // sense only for pointers and memory check tools. - //this.high_water = 0; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ -} - - -function deflateResetKeep(strm) { - var s; - - if (!strm || !strm.state) { - return err(strm, Z_STREAM_ERROR); - } - - strm.total_in = strm.total_out = 0; - strm.data_type = Z_UNKNOWN; - - s = strm.state; - s.pending = 0; - s.pending_out = 0; - - if (s.wrap < 0) { - s.wrap = -s.wrap; - /* was made negative by deflate(..., Z_FINISH); */ - } - s.status = (s.wrap ? INIT_STATE : BUSY_STATE); - strm.adler = (s.wrap === 2) ? - 0 // crc32(0, Z_NULL, 0) - : - 1; // adler32(0, Z_NULL, 0) - s.last_flush = Z_NO_FLUSH; - trees._tr_init(s); - return Z_OK; -} - - -function deflateReset(strm) { - var ret = deflateResetKeep(strm); - if (ret === Z_OK) { - lm_init(strm.state); - } - return ret; -} - - -function deflateSetHeader(strm, head) { - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } - strm.state.gzhead = head; - return Z_OK; -} - - -function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { - if (!strm) { // === Z_NULL - return Z_STREAM_ERROR; - } - var wrap = 1; - - if (level === Z_DEFAULT_COMPRESSION) { - level = 6; - } - - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; - windowBits = -windowBits; - } - - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ - windowBits -= 16; - } - - - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { - return err(strm, Z_STREAM_ERROR); - } - - - if (windowBits === 8) { - windowBits = 9; - } - /* until 256-byte window bug fixed */ - - var s = new DeflateState(); - - strm.state = s; - s.strm = strm; - - s.wrap = wrap; - s.gzhead = null; - s.w_bits = windowBits; - s.w_size = 1 << s.w_bits; - s.w_mask = s.w_size - 1; - - s.hash_bits = memLevel + 7; - s.hash_size = 1 << s.hash_bits; - s.hash_mask = s.hash_size - 1; - s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); - - s.window = new utils.Buf8(s.w_size * 2); - s.head = new utils.Buf16(s.hash_size); - s.prev = new utils.Buf16(s.w_size); - - // Don't need mem init magic for JS. - //s.high_water = 0; /* nothing written to s->window yet */ - - s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - - s.pending_buf_size = s.lit_bufsize * 4; - s.pending_buf = new utils.Buf8(s.pending_buf_size); - - s.d_buf = s.lit_bufsize >> 1; - s.l_buf = (1 + 2) * s.lit_bufsize; - - s.level = level; - s.strategy = strategy; - s.method = method; - - return deflateReset(strm); -} - -function deflateInit(strm, level) { - return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); -} - - -function deflate(strm, flush) { - var old_flush, s; - var beg, val; // for gzip header write only - - if (!strm || !strm.state || - flush > Z_BLOCK || flush < 0) { - return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; - } - - s = strm.state; - - if (!strm.output || - (!strm.input && strm.avail_in !== 0) || - (s.status === FINISH_STATE && flush !== Z_FINISH)) { - return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); - } - - s.strm = strm; /* just in case */ - old_flush = s.last_flush; - s.last_flush = flush; - - /* Write the header */ - if (s.status === INIT_STATE) { - - if (s.wrap === 2) { // GZIP header - strm.adler = 0; //crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (!s.gzhead) { // s->gzhead == Z_NULL - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s.status = BUSY_STATE; - } - else { - put_byte(s, (s.gzhead.text ? 1 : 0) + - (s.gzhead.hcrc ? 2 : 0) + - (!s.gzhead.extra ? 0 : 4) + - (!s.gzhead.name ? 0 : 8) + - (!s.gzhead.comment ? 0 : 16) - ); - put_byte(s, s.gzhead.time & 0xff); - put_byte(s, (s.gzhead.time >> 8) & 0xff); - put_byte(s, (s.gzhead.time >> 16) & 0xff); - put_byte(s, (s.gzhead.time >> 24) & 0xff); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, s.gzhead.os & 0xff); - if (s.gzhead.extra && s.gzhead.extra.length) { - put_byte(s, s.gzhead.extra.length & 0xff); - put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); - } - if (s.gzhead.hcrc) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); - } - s.gzindex = 0; - s.status = EXTRA_STATE; - } - } - else // DEFLATE header - { - var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; - var level_flags = -1; - - if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { - level_flags = 0; - } else if (s.level < 6) { - level_flags = 1; - } else if (s.level === 6) { - level_flags = 2; - } else { - level_flags = 3; - } - header |= (level_flags << 6); - if (s.strstart !== 0) { header |= PRESET_DICT; } - header += 31 - (header % 31); - - s.status = BUSY_STATE; - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s.strstart !== 0) { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - strm.adler = 1; // adler32(0L, Z_NULL, 0); - } - } - -//#ifdef GZIP - if (s.status === EXTRA_STATE) { - if (s.gzhead.extra/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - - while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - break; - } - } - put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); - s.gzindex++; - } - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (s.gzindex === s.gzhead.extra.length) { - s.gzindex = 0; - s.status = NAME_STATE; - } - } - else { - s.status = NAME_STATE; - } - } - if (s.status === NAME_STATE) { - if (s.gzhead.name/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.name.length) { - val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.gzindex = 0; - s.status = COMMENT_STATE; - } - } - else { - s.status = COMMENT_STATE; - } - } - if (s.status === COMMENT_STATE) { - if (s.gzhead.comment/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.comment.length) { - val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.status = HCRC_STATE; - } - } - else { - s.status = HCRC_STATE; - } - } - if (s.status === HCRC_STATE) { - if (s.gzhead.hcrc) { - if (s.pending + 2 > s.pending_buf_size) { - flush_pending(strm); - } - if (s.pending + 2 <= s.pending_buf_size) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - strm.adler = 0; //crc32(0L, Z_NULL, 0); - s.status = BUSY_STATE; - } - } - else { - s.status = BUSY_STATE; - } - } -//#endif - - /* Flush as much pending output as possible */ - if (s.pending !== 0) { - flush_pending(strm); - if (strm.avail_out === 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s.last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUF_ERROR. - */ - } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && - flush !== Z_FINISH) { - return err(strm, Z_BUF_ERROR); - } - - /* User must not provide more input after the first FINISH: */ - if (s.status === FINISH_STATE && strm.avail_in !== 0) { - return err(strm, Z_BUF_ERROR); - } - - /* Start a new block or continue the current one. - */ - if (strm.avail_in !== 0 || s.lookahead !== 0 || - (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { - var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : - (s.strategy === Z_RLE ? deflate_rle(s, flush) : - configuration_table[s.level].func(s, flush)); - - if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { - s.status = FINISH_STATE; - } - if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { - if (strm.avail_out === 0) { - s.last_flush = -1; - /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate === BS_BLOCK_DONE) { - if (flush === Z_PARTIAL_FLUSH) { - trees._tr_align(s); - } - else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ - - trees._tr_stored_block(s, 0, 0, false); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush === Z_FULL_FLUSH) { - /*** CLEAR_HASH(s); ***/ /* forget history */ - zero(s.head); // Fill with NIL (= 0); - - if (s.lookahead === 0) { - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - } - } - flush_pending(strm); - if (strm.avail_out === 0) { - s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - //Assert(strm->avail_out > 0, "bug2"); - //if (strm.avail_out <= 0) { throw new Error("bug2");} - - if (flush !== Z_FINISH) { return Z_OK; } - if (s.wrap <= 0) { return Z_STREAM_END; } - - /* Write the trailer */ - if (s.wrap === 2) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - put_byte(s, (strm.adler >> 16) & 0xff); - put_byte(s, (strm.adler >> 24) & 0xff); - put_byte(s, strm.total_in & 0xff); - put_byte(s, (strm.total_in >> 8) & 0xff); - put_byte(s, (strm.total_in >> 16) & 0xff); - put_byte(s, (strm.total_in >> 24) & 0xff); - } - else - { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - if (s.wrap > 0) { s.wrap = -s.wrap; } - /* write the trailer only once! */ - return s.pending !== 0 ? Z_OK : Z_STREAM_END; -} - -function deflateEnd(strm) { - var status; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - status = strm.state.status; - if (status !== INIT_STATE && - status !== EXTRA_STATE && - status !== NAME_STATE && - status !== COMMENT_STATE && - status !== HCRC_STATE && - status !== BUSY_STATE && - status !== FINISH_STATE - ) { - return err(strm, Z_STREAM_ERROR); - } - - strm.state = null; - - return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; -} - -/* ========================================================================= - * Copy the source state to the destination state - */ -//function deflateCopy(dest, source) { -// -//} - -exports.deflateInit = deflateInit; -exports.deflateInit2 = deflateInit2; -exports.deflateReset = deflateReset; -exports.deflateResetKeep = deflateResetKeep; -exports.deflateSetHeader = deflateSetHeader; -exports.deflate = deflate; -exports.deflateEnd = deflateEnd; -exports.deflateInfo = 'pako deflate (from Nodeca project)'; - -/* Not implemented -exports.deflateBound = deflateBound; -exports.deflateCopy = deflateCopy; -exports.deflateSetDictionary = deflateSetDictionary; -exports.deflateParams = deflateParams; -exports.deflatePending = deflatePending; -exports.deflatePrime = deflatePrime; -exports.deflateTune = deflateTune; -*/ diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/gzheader.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/gzheader.js deleted file mode 100644 index 300bdee82..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/gzheader.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - - -function GZheader() { - /* true if compressed data believed to be text */ - this.text = 0; - /* modification time */ - this.time = 0; - /* extra flags (not used when writing a gzip file) */ - this.xflags = 0; - /* operating system */ - this.os = 0; - /* pointer to extra field or Z_NULL if none */ - this.extra = null; - /* extra field length (valid if extra != Z_NULL) */ - this.extra_len = 0; // Actually, we don't need it in JS, - // but leave for few code modifications - - // - // Setup limits is not necessary because in js we should not preallocate memory - // for inflate use constant limit in 65536 bytes - // - - /* space at extra (only when reading header) */ - // this.extra_max = 0; - /* pointer to zero-terminated file name or Z_NULL */ - this.name = ''; - /* space at name (only when reading header) */ - // this.name_max = 0; - /* pointer to zero-terminated comment or Z_NULL */ - this.comment = ''; - /* space at comment (only when reading header) */ - // this.comm_max = 0; - /* true if there was or will be a header crc */ - this.hcrc = 0; - /* true when done reading gzip header (not used when writing a gzip file) */ - this.done = false; -} - -module.exports = GZheader; diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/inffast.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/inffast.js deleted file mode 100644 index 1bcae7f8e..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/inffast.js +++ /dev/null @@ -1,325 +0,0 @@ -'use strict'; - -// See state defs from inflate.js -var BAD = 30; /* got a data error -- remain here until reset */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state.mode === LEN - strm.avail_in >= 6 - strm.avail_out >= 258 - start >= strm.avail_out - state.bits < 8 - - On return, state.mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm.avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm.avail_out >= 258 for each loop to avoid checking for - output space. - */ -module.exports = function inflate_fast(strm, start) { - var state; - var _in; /* local strm.input */ - var last; /* have enough input while in < last */ - var _out; /* local strm.output */ - var beg; /* inflate()'s initial strm.output */ - var end; /* while out < end, enough space available */ -//#ifdef INFLATE_STRICT - var dmax; /* maximum distance from zlib header */ -//#endif - var wsize; /* window size or zero if not using window */ - var whave; /* valid bytes in the window */ - var wnext; /* window write index */ - var window; /* allocated sliding window, if wsize != 0 */ - var hold; /* local strm.hold */ - var bits; /* local strm.bits */ - var lcode; /* local strm.lencode */ - var dcode; /* local strm.distcode */ - var lmask; /* mask for first level of length codes */ - var dmask; /* mask for first level of distance codes */ - var here; /* retrieved table entry */ - var op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - var len; /* match length, unused bytes */ - var dist; /* match distance */ - var from; /* where to copy match from */ - var from_source; - - - var input, output; // JS specific, because we have no pointers - - /* copy state to local variables */ - state = strm.state; - //here = state.here; - _in = strm.next_in; - input = strm.input; - last = _in + (strm.avail_in - 5); - _out = strm.next_out; - output = strm.output; - beg = _out - (start - strm.avail_out); - end = _out + (strm.avail_out - 257); -//#ifdef INFLATE_STRICT - dmax = state.dmax; -//#endif - wsize = state.wsize; - whave = state.whave; - wnext = state.wnext; - window = state.window; - hold = state.hold; - bits = state.bits; - lcode = state.lencode; - dcode = state.distcode; - lmask = (1 << state.lenbits) - 1; - dmask = (1 << state.distbits) - 1; - - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - - top: - do { - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - - here = lcode[hold & lmask]; - - dolen: - for (;;) { // Goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - if (op === 0) { /* literal */ - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - output[_out++] = here & 0xffff/*here.val*/; - } - else if (op & 16) { /* length base */ - len = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - len += hold & ((1 << op) - 1); - hold >>>= op; - bits -= op; - } - //Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - here = dcode[hold & dmask]; - - dodist: - for (;;) { // goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - - if (op & 16) { /* distance base */ - dist = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - } - dist += hold & ((1 << op) - 1); -//#ifdef INFLATE_STRICT - if (dist > dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } -//#endif - hold >>>= op; - bits -= op; - //Tracevv((stderr, "inflate: distance %u\n", dist)); - op = _out - beg; /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } - -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// if (len <= op - whave) { -// do { -// output[_out++] = 0; -// } while (--len); -// continue top; -// } -// len -= op - whave; -// do { -// output[_out++] = 0; -// } while (--op > whave); -// if (op === 0) { -// from = _out - dist; -// do { -// output[_out++] = output[from++]; -// } while (--len); -// continue top; -// } -//#endif - } - from = 0; // window index - from_source = window; - if (wnext === 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - else if (wnext < op) { /* wrap around window */ - from += wsize + wnext - op; - op -= wnext; - if (op < len) { /* some from end of window */ - len -= op; - do { - output[_out++] = window[from++]; - } while (--op); - from = 0; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - output[_out++] = window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - while (len > 2) { - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - len -= 3; - } - if (len) { - output[_out++] = from_source[from++]; - if (len > 1) { - output[_out++] = from_source[from++]; - } - } - } - else { - from = _out - dist; /* copy direct from output */ - do { /* minimum length is three */ - output[_out++] = output[from++]; - output[_out++] = output[from++]; - output[_out++] = output[from++]; - len -= 3; - } while (len > 2); - if (len) { - output[_out++] = output[from++]; - if (len > 1) { - output[_out++] = output[from++]; - } - } - } - } - else if ((op & 64) === 0) { /* 2nd level distance code */ - here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dodist; - } - else { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } - else if ((op & 64) === 0) { /* 2nd level length code */ - here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dolen; - } - else if (op & 32) { /* end-of-block */ - //Tracevv((stderr, "inflate: end of block\n")); - state.mode = TYPE; - break top; - } - else { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } while (_in < last && _out < end); - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - _in -= len; - bits -= len << 3; - hold &= (1 << bits) - 1; - - /* update state and return */ - strm.next_in = _in; - strm.next_out = _out; - strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); - strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); - state.hold = hold; - state.bits = bits; - return; -}; diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/inflate.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/inflate.js deleted file mode 100644 index a92af636d..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/inflate.js +++ /dev/null @@ -1,1503 +0,0 @@ -'use strict'; - - -var utils = require('../utils/common'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var inflate_fast = require('./inffast'); -var inflate_table = require('./inftrees'); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -//var Z_NO_FLUSH = 0; -//var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -//var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - -/* The deflate compression method */ -var Z_DEFLATED = 8; - - -/* STATES ====================================================================*/ -/* ===========================================================================*/ - - -var HEAD = 1; /* i: waiting for magic header */ -var FLAGS = 2; /* i: waiting for method and flags (gzip) */ -var TIME = 3; /* i: waiting for modification time (gzip) */ -var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ -var EXLEN = 5; /* i: waiting for extra length (gzip) */ -var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ -var NAME = 7; /* i: waiting for end of file name (gzip) */ -var COMMENT = 8; /* i: waiting for end of comment (gzip) */ -var HCRC = 9; /* i: waiting for header crc (gzip) */ -var DICTID = 10; /* i: waiting for dictionary check value */ -var DICT = 11; /* waiting for inflateSetDictionary() call */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ -var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ -var STORED = 14; /* i: waiting for stored size (length and complement) */ -var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ -var COPY = 16; /* i/o: waiting for input or output to copy stored block */ -var TABLE = 17; /* i: waiting for dynamic block table lengths */ -var LENLENS = 18; /* i: waiting for code length code lengths */ -var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ -var LEN_ = 20; /* i: same as LEN below, but only first time in */ -var LEN = 21; /* i: waiting for length/lit/eob code */ -var LENEXT = 22; /* i: waiting for length extra bits */ -var DIST = 23; /* i: waiting for distance code */ -var DISTEXT = 24; /* i: waiting for distance extra bits */ -var MATCH = 25; /* o: waiting for output space to copy string */ -var LIT = 26; /* o: waiting for output space to write literal */ -var CHECK = 27; /* i: waiting for 32-bit check value */ -var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ -var DONE = 29; /* finished check, done -- remain here until reset */ -var BAD = 30; /* got a data error -- remain here until reset */ -var MEM = 31; /* got an inflate() memory error -- remain here until reset */ -var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ - -/* ===========================================================================*/ - - - -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_WBITS = MAX_WBITS; - - -function ZSWAP32(q) { - return (((q >>> 24) & 0xff) + - ((q >>> 8) & 0xff00) + - ((q & 0xff00) << 8) + - ((q & 0xff) << 24)); -} - - -function InflateState() { - this.mode = 0; /* current inflate mode */ - this.last = false; /* true if processing last block */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.havedict = false; /* true if dictionary provided */ - this.flags = 0; /* gzip header method and flags (0 if zlib) */ - this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ - this.check = 0; /* protected copy of check value */ - this.total = 0; /* protected copy of output count */ - // TODO: may be {} - this.head = null; /* where to save gzip header information */ - - /* sliding window */ - this.wbits = 0; /* log base 2 of requested window size */ - this.wsize = 0; /* window size or zero if not using window */ - this.whave = 0; /* valid bytes in the window */ - this.wnext = 0; /* window write index */ - this.window = null; /* allocated sliding window, if needed */ - - /* bit accumulator */ - this.hold = 0; /* input bit accumulator */ - this.bits = 0; /* number of bits in "in" */ - - /* for string and stored block copying */ - this.length = 0; /* literal or length of data to copy */ - this.offset = 0; /* distance back to copy string from */ - - /* for table and code decoding */ - this.extra = 0; /* extra bits needed */ - - /* fixed and dynamic code tables */ - this.lencode = null; /* starting table for length/literal codes */ - this.distcode = null; /* starting table for distance codes */ - this.lenbits = 0; /* index bits for lencode */ - this.distbits = 0; /* index bits for distcode */ - - /* dynamic table building */ - this.ncode = 0; /* number of code length code lengths */ - this.nlen = 0; /* number of length code lengths */ - this.ndist = 0; /* number of distance code lengths */ - this.have = 0; /* number of code lengths in lens[] */ - this.next = null; /* next available space in codes[] */ - - this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ - this.work = new utils.Buf16(288); /* work area for code table building */ - - /* - because we don't have pointers in js, we use lencode and distcode directly - as buffers so we don't need codes - */ - //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ - this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ - this.distdyn = null; /* dynamic table for distance codes (JS specific) */ - this.sane = 0; /* if false, allow invalid distance too far */ - this.back = 0; /* bits back of last unprocessed length/lit */ - this.was = 0; /* initial length of match */ -} - -function inflateResetKeep(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - strm.total_in = strm.total_out = state.total = 0; - strm.msg = ''; /*Z_NULL*/ - if (state.wrap) { /* to support ill-conceived Java test suite */ - strm.adler = state.wrap & 1; - } - state.mode = HEAD; - state.last = 0; - state.havedict = 0; - state.dmax = 32768; - state.head = null/*Z_NULL*/; - state.hold = 0; - state.bits = 0; - //state.lencode = state.distcode = state.next = state.codes; - state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); - state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); - - state.sane = 1; - state.back = -1; - //Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - -function inflateReset(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - state.wsize = 0; - state.whave = 0; - state.wnext = 0; - return inflateResetKeep(strm); - -} - -function inflateReset2(strm, windowBits) { - var wrap; - var state; - - /* get the state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - - /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } - else { - wrap = (windowBits >> 4) + 1; - if (windowBits < 48) { - windowBits &= 15; - } - } - - /* set number of window bits, free window if different */ - if (windowBits && (windowBits < 8 || windowBits > 15)) { - return Z_STREAM_ERROR; - } - if (state.window !== null && state.wbits !== windowBits) { - state.window = null; - } - - /* update state and reset the rest of it */ - state.wrap = wrap; - state.wbits = windowBits; - return inflateReset(strm); -} - -function inflateInit2(strm, windowBits) { - var ret; - var state; - - if (!strm) { return Z_STREAM_ERROR; } - //strm.msg = Z_NULL; /* in case we return an error */ - - state = new InflateState(); - - //if (state === Z_NULL) return Z_MEM_ERROR; - //Tracev((stderr, "inflate: allocated\n")); - strm.state = state; - state.window = null/*Z_NULL*/; - ret = inflateReset2(strm, windowBits); - if (ret !== Z_OK) { - strm.state = null/*Z_NULL*/; - } - return ret; -} - -function inflateInit(strm) { - return inflateInit2(strm, DEF_WBITS); -} - - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -var virgin = true; - -var lenfix, distfix; // We have no pointers in JS, so keep tables separate - -function fixedtables(state) { - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - var sym; - - lenfix = new utils.Buf32(512); - distfix = new utils.Buf32(32); - - /* literal/length table */ - sym = 0; - while (sym < 144) { state.lens[sym++] = 8; } - while (sym < 256) { state.lens[sym++] = 9; } - while (sym < 280) { state.lens[sym++] = 7; } - while (sym < 288) { state.lens[sym++] = 8; } - - inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, {bits: 9}); - - /* distance table */ - sym = 0; - while (sym < 32) { state.lens[sym++] = 5; } - - inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, {bits: 5}); - - /* do this just once */ - virgin = false; - } - - state.lencode = lenfix; - state.lenbits = 9; - state.distcode = distfix; - state.distbits = 5; -} - - -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. If window does not exist yet, create it. This is only called - when a window is already in use, or when output has been written during this - inflate call, but the end of the deflate stream has not been reached yet. - It is also called to create a window for dictionary data when a dictionary - is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -function updatewindow(strm, src, end, copy) { - var dist; - var state = strm.state; - - /* if it hasn't been done already, allocate space for the window */ - if (state.window === null) { - state.wsize = 1 << state.wbits; - state.wnext = 0; - state.whave = 0; - - state.window = new utils.Buf8(state.wsize); - } - - /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state.wsize) { - utils.arraySet(state.window,src, end - state.wsize, state.wsize, 0); - state.wnext = 0; - state.whave = state.wsize; - } - else { - dist = state.wsize - state.wnext; - if (dist > copy) { - dist = copy; - } - //zmemcpy(state->window + state->wnext, end - copy, dist); - utils.arraySet(state.window,src, end - copy, dist, state.wnext); - copy -= dist; - if (copy) { - //zmemcpy(state->window, end - copy, copy); - utils.arraySet(state.window,src, end - copy, copy, 0); - state.wnext = copy; - state.whave = state.wsize; - } - else { - state.wnext += dist; - if (state.wnext === state.wsize) { state.wnext = 0; } - if (state.whave < state.wsize) { state.whave += dist; } - } - } - return 0; -} - -function inflate(strm, flush) { - var state; - var input, output; // input/output buffers - var next; /* next input INDEX */ - var put; /* next output INDEX */ - var have, left; /* available input and output */ - var hold; /* bit buffer */ - var bits; /* bits in bit buffer */ - var _in, _out; /* save starting available input and output */ - var copy; /* number of stored or match bytes to copy */ - var from; /* where to copy match bytes from */ - var from_source; - var here = 0; /* current decoding table entry */ - var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) - //var last; /* parent table entry */ - var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) - var len; /* length to copy for repeats, bits to drop */ - var ret; /* return code */ - var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ - var opts; - - var n; // temporary var for NEED_BITS - - var order = /* permutation of code lengths */ - [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - - - if (!strm || !strm.state || !strm.output || - (!strm.input && strm.avail_in !== 0)) { - return Z_STREAM_ERROR; - } - - state = strm.state; - if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ - - - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - _in = have; - _out = left; - ret = Z_OK; - - inf_leave: // goto emulation - for (;;) { - switch (state.mode) { - case HEAD: - if (state.wrap === 0) { - state.mode = TYPEDO; - break; - } - //=== NEEDBITS(16); - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ - state.check = 0/*crc32(0L, Z_NULL, 0)*/; - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = FLAGS; - break; - } - state.flags = 0; /* expect zlib header */ - if (state.head) { - state.head.done = false; - } - if (!(state.wrap & 1) || /* check if zlib header allowed */ - (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { - strm.msg = 'incorrect header check'; - state.mode = BAD; - break; - } - if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// - len = (hold & 0x0f)/*BITS(4)*/ + 8; - if (state.wbits === 0) { - state.wbits = len; - } - else if (len > state.wbits) { - strm.msg = 'invalid window size'; - state.mode = BAD; - break; - } - state.dmax = 1 << len; - //Tracev((stderr, "inflate: zlib header ok\n")); - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = hold & 0x200 ? DICTID : TYPE; - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - break; - case FLAGS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.flags = hold; - if ((state.flags & 0xff) !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - if (state.flags & 0xe000) { - strm.msg = 'unknown header flags set'; - state.mode = BAD; - break; - } - if (state.head) { - state.head.text = ((hold >> 8) & 1); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = TIME; - /* falls through */ - case TIME: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.time = hold; - } - if (state.flags & 0x0200) { - //=== CRC4(state.check, hold) - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - hbuf[2] = (hold >>> 16) & 0xff; - hbuf[3] = (hold >>> 24) & 0xff; - state.check = crc32(state.check, hbuf, 4, 0); - //=== - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = OS; - /* falls through */ - case OS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.xflags = (hold & 0xff); - state.head.os = (hold >> 8); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = EXLEN; - /* falls through */ - case EXLEN: - if (state.flags & 0x0400) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length = hold; - if (state.head) { - state.head.extra_len = hold; - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - else if (state.head) { - state.head.extra = null/*Z_NULL*/; - } - state.mode = EXTRA; - /* falls through */ - case EXTRA: - if (state.flags & 0x0400) { - copy = state.length; - if (copy > have) { copy = have; } - if (copy) { - if (state.head) { - len = state.head.extra_len - state.length; - if (!state.head.extra) { - // Use untyped array for more conveniend processing later - state.head.extra = new Array(state.head.extra_len); - } - utils.arraySet( - state.head.extra, - input, - next, - // extra field is limited to 65536 bytes - // - no need for additional size check - copy, - /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ - len - ); - //zmemcpy(state.head.extra + len, next, - // len + copy > state.head.extra_max ? - // state.head.extra_max - len : copy); - } - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - state.length -= copy; - } - if (state.length) { break inf_leave; } - } - state.length = 0; - state.mode = NAME; - /* falls through */ - case NAME: - if (state.flags & 0x0800) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - // TODO: 2 or 1 bytes? - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.name_max*/)) { - state.head.name += String.fromCharCode(len); - } - } while (len && copy < have); - - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.name = null; - } - state.length = 0; - state.mode = COMMENT; - /* falls through */ - case COMMENT: - if (state.flags & 0x1000) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.comm_max*/)) { - state.head.comment += String.fromCharCode(len); - } - } while (len && copy < have); - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.comment = null; - } - state.mode = HCRC; - /* falls through */ - case HCRC: - if (state.flags & 0x0200) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.check & 0xffff)) { - strm.msg = 'header crc mismatch'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - if (state.head) { - state.head.hcrc = ((state.flags >> 9) & 1); - state.head.done = true; - } - strm.adler = state.check = 0 /*crc32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - break; - case DICTID: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - strm.adler = state.check = ZSWAP32(hold); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = DICT; - /* falls through */ - case DICT: - if (state.havedict === 0) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - return Z_NEED_DICT; - } - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - /* falls through */ - case TYPE: - if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } - /* falls through */ - case TYPEDO: - if (state.last) { - //--- BYTEBITS() ---// - hold >>>= bits & 7; - bits -= bits & 7; - //---// - state.mode = CHECK; - break; - } - //=== NEEDBITS(3); */ - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.last = (hold & 0x01)/*BITS(1)*/; - //--- DROPBITS(1) ---// - hold >>>= 1; - bits -= 1; - //---// - - switch ((hold & 0x03)/*BITS(2)*/) { - case 0: /* stored block */ - //Tracev((stderr, "inflate: stored block%s\n", - // state.last ? " (last)" : "")); - state.mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - //Tracev((stderr, "inflate: fixed codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = LEN_; /* decode codes */ - if (flush === Z_TREES) { - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break inf_leave; - } - break; - case 2: /* dynamic block */ - //Tracev((stderr, "inflate: dynamic codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = TABLE; - break; - case 3: - strm.msg = 'invalid block type'; - state.mode = BAD; - } - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break; - case STORED: - //--- BYTEBITS() ---// /* go to byte boundary */ - hold >>>= bits & 7; - bits -= bits & 7; - //---// - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { - strm.msg = 'invalid stored block lengths'; - state.mode = BAD; - break; - } - state.length = hold & 0xffff; - //Tracev((stderr, "inflate: stored length %u\n", - // state.length)); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = COPY_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case COPY_: - state.mode = COPY; - /* falls through */ - case COPY: - copy = state.length; - if (copy) { - if (copy > have) { copy = have; } - if (copy > left) { copy = left; } - if (copy === 0) { break inf_leave; } - //--- zmemcpy(put, next, copy); --- - utils.arraySet(output, input, next, copy, put); - //---// - have -= copy; - next += copy; - left -= copy; - put += copy; - state.length -= copy; - break; - } - //Tracev((stderr, "inflate: stored end\n")); - state.mode = TYPE; - break; - case TABLE: - //=== NEEDBITS(14); */ - while (bits < 14) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// -//#ifndef PKZIP_BUG_WORKAROUND - if (state.nlen > 286 || state.ndist > 30) { - strm.msg = 'too many length or distance symbols'; - state.mode = BAD; - break; - } -//#endif - //Tracev((stderr, "inflate: table sizes ok\n")); - state.have = 0; - state.mode = LENLENS; - /* falls through */ - case LENLENS: - while (state.have < state.ncode) { - //=== NEEDBITS(3); - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - while (state.have < 19) { - state.lens[order[state.have++]] = 0; - } - // We have separate tables & no pointers. 2 commented lines below not needed. - //state.next = state.codes; - //state.lencode = state.next; - // Switch to use dynamic table - state.lencode = state.lendyn; - state.lenbits = 7; - - opts = {bits: state.lenbits}; - ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); - state.lenbits = opts.bits; - - if (ret) { - strm.msg = 'invalid code lengths set'; - state.mode = BAD; - break; - } - //Tracev((stderr, "inflate: code lengths ok\n")); - state.have = 0; - state.mode = CODELENS; - /* falls through */ - case CODELENS: - while (state.have < state.nlen + state.ndist) { - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_val < 16) { - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.lens[state.have++] = here_val; - } - else { - if (here_val === 16) { - //=== NEEDBITS(here.bits + 2); - n = here_bits + 2; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - if (state.have === 0) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - len = state.lens[state.have - 1]; - copy = 3 + (hold & 0x03);//BITS(2); - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - } - else if (here_val === 17) { - //=== NEEDBITS(here.bits + 3); - n = here_bits + 3; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 3 + (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - else { - //=== NEEDBITS(here.bits + 7); - n = here_bits + 7; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 11 + (hold & 0x7f);//BITS(7); - //--- DROPBITS(7) ---// - hold >>>= 7; - bits -= 7; - //---// - } - if (state.have + copy > state.nlen + state.ndist) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - while (copy--) { - state.lens[state.have++] = len; - } - } - } - - /* handle error breaks in while */ - if (state.mode === BAD) { break; } - - /* check for end-of-block code (better have one) */ - if (state.lens[256] === 0) { - strm.msg = 'invalid code -- missing end-of-block'; - state.mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state.lenbits = 9; - - opts = {bits: state.lenbits}; - ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.lenbits = opts.bits; - // state.lencode = state.next; - - if (ret) { - strm.msg = 'invalid literal/lengths set'; - state.mode = BAD; - break; - } - - state.distbits = 6; - //state.distcode.copy(state.codes); - // Switch to use dynamic table - state.distcode = state.distdyn; - opts = {bits: state.distbits}; - ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.distbits = opts.bits; - // state.distcode = state.next; - - if (ret) { - strm.msg = 'invalid distances set'; - state.mode = BAD; - break; - } - //Tracev((stderr, 'inflate: codes ok\n')); - state.mode = LEN_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case LEN_: - state.mode = LEN; - /* falls through */ - case LEN: - if (have >= 6 && left >= 258) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - inflate_fast(strm, _out); - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - if (state.mode === TYPE) { - state.back = -1; - } - break; - } - state.back = 0; - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) -1)]; /*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if (here_bits <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_op && (here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.lencode[last_val + - ((hold & ((1 << (last_bits + last_op)) -1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - state.length = here_val; - if (here_op === 0) { - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - state.mode = LIT; - break; - } - if (here_op & 32) { - //Tracevv((stderr, "inflate: end of block\n")); - state.back = -1; - state.mode = TYPE; - break; - } - if (here_op & 64) { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break; - } - state.extra = here_op & 15; - state.mode = LENEXT; - /* falls through */ - case LENEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length += hold & ((1 << state.extra) -1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } - //Tracevv((stderr, "inflate: length %u\n", state.length)); - state.was = state.length; - state.mode = DIST; - /* falls through */ - case DIST: - for (;;) { - here = state.distcode[hold & ((1 << state.distbits) -1)];/*BITS(state.distbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if ((here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.distcode[last_val + - ((hold & ((1 << (last_bits + last_op)) -1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - if (here_op & 64) { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break; - } - state.offset = here_val; - state.extra = (here_op) & 15; - state.mode = DISTEXT; - /* falls through */ - case DISTEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.offset += hold & ((1 << state.extra) -1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } -//#ifdef INFLATE_STRICT - if (state.offset > state.dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -//#endif - //Tracevv((stderr, "inflate: distance %u\n", state.offset)); - state.mode = MATCH; - /* falls through */ - case MATCH: - if (left === 0) { break inf_leave; } - copy = _out - left; - if (state.offset > copy) { /* copy from window */ - copy = state.offset - copy; - if (copy > state.whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// Trace((stderr, "inflate.c too far\n")); -// copy -= state.whave; -// if (copy > state.length) { copy = state.length; } -// if (copy > left) { copy = left; } -// left -= copy; -// state.length -= copy; -// do { -// output[put++] = 0; -// } while (--copy); -// if (state.length === 0) { state.mode = LEN; } -// break; -//#endif - } - if (copy > state.wnext) { - copy -= state.wnext; - from = state.wsize - copy; - } - else { - from = state.wnext - copy; - } - if (copy > state.length) { copy = state.length; } - from_source = state.window; - } - else { /* copy from output */ - from_source = output; - from = put - state.offset; - copy = state.length; - } - if (copy > left) { copy = left; } - left -= copy; - state.length -= copy; - do { - output[put++] = from_source[from++]; - } while (--copy); - if (state.length === 0) { state.mode = LEN; } - break; - case LIT: - if (left === 0) { break inf_leave; } - output[put++] = state.length; - left--; - state.mode = LEN; - break; - case CHECK: - if (state.wrap) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - // Use '|' insdead of '+' to make sure that result is signed - hold |= input[next++] << bits; - bits += 8; - } - //===// - _out -= left; - strm.total_out += _out; - state.total += _out; - if (_out) { - strm.adler = state.check = - /*UPDATE(state.check, put - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); - - } - _out = left; - // NB: crc32 stored as signed 32-bit int, ZSWAP32 returns signed too - if ((state.flags ? hold : ZSWAP32(hold)) !== state.check) { - strm.msg = 'incorrect data check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: check matches trailer\n")); - } - state.mode = LENGTH; - /* falls through */ - case LENGTH: - if (state.wrap && state.flags) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.total & 0xffffffff)) { - strm.msg = 'incorrect length check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: length matches trailer\n")); - } - state.mode = DONE; - /* falls through */ - case DONE: - ret = Z_STREAM_END; - break inf_leave; - case BAD: - ret = Z_DATA_ERROR; - break inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - /* falls through */ - default: - return Z_STREAM_ERROR; - } - } - - // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" - - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call updatewindow() to create and/or update the window state. - Note: a memory error from inflate() is non-recoverable. - */ - - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - - if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && - (state.mode < CHECK || flush !== Z_FINISH))) { - if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { - state.mode = MEM; - return Z_MEM_ERROR; - } - } - _in -= strm.avail_in; - _out -= strm.avail_out; - strm.total_in += _in; - strm.total_out += _out; - state.total += _out; - if (state.wrap && _out) { - strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); - } - strm.data_type = state.bits + (state.last ? 64 : 0) + - (state.mode === TYPE ? 128 : 0) + - (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); - if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { - ret = Z_BUF_ERROR; - } - return ret; -} - -function inflateEnd(strm) { - - if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { - return Z_STREAM_ERROR; - } - - var state = strm.state; - if (state.window) { - state.window = null; - } - strm.state = null; - return Z_OK; -} - -function inflateGetHeader(strm, head) { - var state; - - /* check state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } - - /* save header structure */ - state.head = head; - head.done = false; - return Z_OK; -} - - -exports.inflateReset = inflateReset; -exports.inflateReset2 = inflateReset2; -exports.inflateResetKeep = inflateResetKeep; -exports.inflateInit = inflateInit; -exports.inflateInit2 = inflateInit2; -exports.inflate = inflate; -exports.inflateEnd = inflateEnd; -exports.inflateGetHeader = inflateGetHeader; -exports.inflateInfo = 'pako inflate (from Nodeca project)'; - -/* Not implemented -exports.inflateCopy = inflateCopy; -exports.inflateGetDictionary = inflateGetDictionary; -exports.inflateMark = inflateMark; -exports.inflatePrime = inflatePrime; -exports.inflateSetDictionary = inflateSetDictionary; -exports.inflateSync = inflateSync; -exports.inflateSyncPoint = inflateSyncPoint; -exports.inflateUndermine = inflateUndermine; -*/ diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/inftrees.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/inftrees.js deleted file mode 100644 index 1852df2fb..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/inftrees.js +++ /dev/null @@ -1,327 +0,0 @@ -'use strict'; - - -var utils = require('../utils/common'); - -var MAXBITS = 15; -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -var lbase = [ /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 -]; - -var lext = [ /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 -]; - -var dbase = [ /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0 -]; - -var dext = [ /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64 -]; - -module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) -{ - var bits = opts.bits; - //here = opts.here; /* table entry for duplication */ - - var len = 0; /* a code's length in bits */ - var sym = 0; /* index of code symbols */ - var min = 0, max = 0; /* minimum and maximum code lengths */ - var root = 0; /* number of index bits for root table */ - var curr = 0; /* number of index bits for current table */ - var drop = 0; /* code bits to drop for sub-table */ - var left = 0; /* number of prefix codes available */ - var used = 0; /* code entries in table used */ - var huff = 0; /* Huffman code */ - var incr; /* for incrementing code, index */ - var fill; /* index for replicating entries */ - var low; /* low bits for current root entry */ - var mask; /* mask for low root bits */ - var next; /* next available space in table */ - var base = null; /* base value table to use */ - var base_index = 0; -// var shoextra; /* extra bits table to use */ - var end; /* use base and extra for symbol > end */ - var count = new utils.Buf16(MAXBITS+1); //[MAXBITS+1]; /* number of codes of each length */ - var offs = new utils.Buf16(MAXBITS+1); //[MAXBITS+1]; /* offsets in table for each length */ - var extra = null; - var extra_index = 0; - - var here_bits, here_op, here_val; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) { - count[len] = 0; - } - for (sym = 0; sym < codes; sym++) { - count[lens[lens_index + sym]]++; - } - - /* bound code lengths, force root to be within code lengths */ - root = bits; - for (max = MAXBITS; max >= 1; max--) { - if (count[max] !== 0) { break; } - } - if (root > max) { - root = max; - } - if (max === 0) { /* no symbols to code at all */ - //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ - //table.bits[opts.table_index] = 1; //here.bits = (var char)1; - //table.val[opts.table_index++] = 0; //here.val = (var short)0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - - //table.op[opts.table_index] = 64; - //table.bits[opts.table_index] = 1; - //table.val[opts.table_index++] = 0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - opts.bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min < max; min++) { - if (count[min] !== 0) { break; } - } - if (root < min) { - root = min; - } - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) { - return -1; - } /* over-subscribed */ - } - if (left > 0 && (type === CODES || max !== 1)) { - return -1; /* incomplete set */ - } - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) { - offs[len + 1] = offs[len] + count[len]; - } - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) { - if (lens[lens_index + sym] !== 0) { - work[offs[lens[lens_index + sym]]++] = sym; - } - } - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftrees.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - // poor man optimization - use if-else instead of switch, - // to avoid deopts in old v8 - if (type === CODES) { - base = extra = work; /* dummy value--not used */ - end = 19; - - } else if (type === LENS) { - base = lbase; - base_index -= 257; - extra = lext; - extra_index -= 257; - end = 256; - - } else { /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } - - /* initialize opts for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = table_index; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = -1; /* trigger new sub-table when len > root */ - used = 1 << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - var i=0; - /* process all codes and make table entries */ - for (;;) { - i++; - /* create table entry */ - here_bits = len - drop; - if (work[sym] < end) { - here_op = 0; - here_val = work[sym]; - } - else if (work[sym] > end) { - here_op = extra[extra_index + work[sym]]; - here_val = base[base_index + work[sym]]; - } - else { - here_op = 32 + 64; /* end of block */ - here_val = 0; - } - - /* replicate for those indices with low len bits equal to huff */ - incr = 1 << (len - drop); - fill = 1 << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; - } while (fill !== 0); - - /* backwards increment the len-bit code huff */ - incr = 1 << (len - 1); - while (huff & incr) { - incr >>= 1; - } - if (incr !== 0) { - huff &= incr - 1; - huff += incr; - } else { - huff = 0; - } - - /* go to next symbol, update count, len */ - sym++; - if (--count[len] === 0) { - if (len === max) { break; } - len = lens[lens_index + work[sym]]; - } - - /* create new sub-table if needed */ - if (len > root && (huff & mask) !== low) { - /* if first time, transition to sub-tables */ - if (drop === 0) { - drop = root; - } - - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = 1 << curr; - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) { break; } - curr++; - left <<= 1; - } - - /* check for enough space */ - used += 1 << curr; - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* point entry in root table to sub-table */ - low = huff & mask; - /*table.op[low] = curr; - table.bits[low] = root; - table.val[low] = next - opts.table_index;*/ - table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; - } - } - - /* fill in remaining table entry if code is incomplete (guaranteed to have - at most one remaining entry, since if the code is incomplete, the - maximum code length that was allowed to get this far is one bit) */ - if (huff !== 0) { - //table.op[next + huff] = 64; /* invalid code marker */ - //table.bits[next + huff] = len - drop; - //table.val[next + huff] = 0; - table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; - } - - /* set return parameters */ - //opts.table_index += used; - opts.bits = root; - return 0; -}; diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/messages.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/messages.js deleted file mode 100644 index 75bd583dc..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/messages.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -module.exports = { - '2': 'need dictionary', /* Z_NEED_DICT 2 */ - '1': 'stream end', /* Z_STREAM_END 1 */ - '0': '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/trees.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/trees.js deleted file mode 100644 index a2a5f6617..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/trees.js +++ /dev/null @@ -1,1199 +0,0 @@ -'use strict'; - - -var utils = require('../utils/common'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -//var Z_FILTERED = 1; -//var Z_HUFFMAN_ONLY = 2; -//var Z_RLE = 3; -var Z_FIXED = 4; -//var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -var Z_BINARY = 0; -var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - -/*============================================================================*/ - - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - -// From zutil.h - -var STORED_BLOCK = 0; -var STATIC_TREES = 1; -var DYN_TREES = 2; -/* The three kinds of block type */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -/* The minimum and maximum match lengths */ - -// From deflate.h -/* =========================================================================== - * Internal compression state. - */ - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ - -var LITERALS = 256; -/* number of literal bytes 0..255 */ - -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ - -var D_CODES = 30; -/* number of distance codes */ - -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ - -var HEAP_SIZE = 2*L_CODES + 1; -/* maximum heap size */ - -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var Buf_size = 16; -/* size of bit buffer in bi_buf */ - - -/* =========================================================================== - * Constants - */ - -var MAX_BL_BITS = 7; -/* Bit length codes must not exceed MAX_BL_BITS bits */ - -var END_BLOCK = 256; -/* end of block literal code */ - -var REP_3_6 = 16; -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ - -var REPZ_3_10 = 17; -/* repeat a zero length 3-10 times (3 bits of repeat count) */ - -var REPZ_11_138 = 18; -/* repeat a zero length 11-138 times (7 bits of repeat count) */ - -var extra_lbits = /* extra bits for each length code */ - [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; - -var extra_dbits = /* extra bits for each distance code */ - [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; - -var extra_blbits = /* extra bits for each bit length code */ - [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; - -var bl_order = - [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ - -/* =========================================================================== - * Local data. These are initialized only once. - */ - -// We pre-fill arrays with 0 to avoid uninitialized gaps - -var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ - -// !!!! Use flat array insdead of structure, Freq = i*2, Len = i*2+1 -var static_ltree = new Array((L_CODES+2) * 2); -zero(static_ltree); -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -var static_dtree = new Array(D_CODES * 2); -zero(static_dtree); -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -var _dist_code = new Array(DIST_CODE_LEN); -zero(_dist_code); -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -var _length_code = new Array(MAX_MATCH-MIN_MATCH+1); -zero(_length_code); -/* length code for each normalized match length (0 == MIN_MATCH) */ - -var base_length = new Array(LENGTH_CODES); -zero(base_length); -/* First normalized length for each code (0 = MIN_MATCH) */ - -var base_dist = new Array(D_CODES); -zero(base_dist); -/* First normalized distance for each code (0 = distance of 1) */ - - -var StaticTreeDesc = function (static_tree, extra_bits, extra_base, elems, max_length) { - - this.static_tree = static_tree; /* static tree or NULL */ - this.extra_bits = extra_bits; /* extra bits for each code or NULL */ - this.extra_base = extra_base; /* base index for extra_bits */ - this.elems = elems; /* max number of elements in the tree */ - this.max_length = max_length; /* max bit length for the codes */ - - // show if `static_tree` has data or dummy - needed for monomorphic objects - this.has_stree = static_tree && static_tree.length; -}; - - -var static_l_desc; -var static_d_desc; -var static_bl_desc; - - -var TreeDesc = function(dyn_tree, stat_desc) { - this.dyn_tree = dyn_tree; /* the dynamic tree */ - this.max_code = 0; /* largest code with non zero frequency */ - this.stat_desc = stat_desc; /* the corresponding static tree */ -}; - - - -function d_code(dist) { - return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; -} - - -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -function put_short (s, w) { -// put_byte(s, (uch)((w) & 0xff)); -// put_byte(s, (uch)((ush)(w) >> 8)); - s.pending_buf[s.pending++] = (w) & 0xff; - s.pending_buf[s.pending++] = (w >>> 8) & 0xff; -} - - -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -function send_bits(s, value, length) { - if (s.bi_valid > (Buf_size - length)) { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - put_short(s, s.bi_buf); - s.bi_buf = value >> (Buf_size - s.bi_valid); - s.bi_valid += length - Buf_size; - } else { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - s.bi_valid += length; - } -} - - -function send_code(s, c, tree) { - send_bits(s, tree[c*2]/*.Code*/, tree[c*2 + 1]/*.Len*/); -} - - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -function bi_reverse(code, len) { - var res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; -} - - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -function bi_flush(s) { - if (s.bi_valid === 16) { - put_short(s, s.bi_buf); - s.bi_buf = 0; - s.bi_valid = 0; - - } else if (s.bi_valid >= 8) { - s.pending_buf[s.pending++] = s.bi_buf & 0xff; - s.bi_buf >>= 8; - s.bi_valid -= 8; - } -} - - -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ -function gen_bitlen(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var max_code = desc.max_code; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var extra = desc.stat_desc.extra_bits; - var base = desc.stat_desc.extra_base; - var max_length = desc.stat_desc.max_length; - var h; /* heap index */ - var n, m; /* iterate over the tree elements */ - var bits; /* bit length */ - var xbits; /* extra bits */ - var f; /* frequency */ - var overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) { - s.bl_count[bits] = 0; - } - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s.heap[s.heap_max]*2 + 1]/*.Len*/ = 0; /* root of the heap */ - - for (h = s.heap_max+1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n*2 +1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n*2 + 1]/*.Len*/ = bits; - /* We overwrite tree[n].Dad which is no longer needed */ - - if (n > max_code) { continue; } /* not a leaf node */ - - s.bl_count[bits]++; - xbits = 0; - if (n >= base) { - xbits = extra[n-base]; - } - f = tree[n * 2]/*.Freq*/; - s.opt_len += f * (bits + xbits); - if (has_stree) { - s.static_len += f * (stree[n*2 + 1]/*.Len*/ + xbits); - } - } - if (overflow === 0) { return; } - - // Trace((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length-1; - while (s.bl_count[bits] === 0) { bits--; } - s.bl_count[bits]--; /* move one leaf down the tree */ - s.bl_count[bits+1] += 2; /* move one overflow item as its brother */ - s.bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > max_code) { continue; } - if (tree[m*2 + 1]/*.Len*/ !== bits) { - // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s.opt_len += (bits - tree[m*2 + 1]/*.Len*/)*tree[m*2]/*.Freq*/; - tree[m*2 + 1]/*.Len*/ = bits; - } - n--; - } - } -} - - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -function gen_codes(tree, max_code, bl_count) -// ct_data *tree; /* the tree to decorate */ -// int max_code; /* largest code with non zero frequency */ -// ushf *bl_count; /* number of codes at each bit length */ -{ - var next_code = new Array(MAX_BITS+1); /* next code value for each bit length */ - var code = 0; /* running code value */ - var bits; /* bit index */ - var n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = (code + bl_count[bits-1]) << 1; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES-1; code++) { - base_length[code] = length; - for (n = 0; n < (1< dist code (0..29) */ - dist = 0; - for (code = 0 ; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1<>= 7; /* from now on, all distances are divided by 128 */ - for (; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) { - _dist_code[256 + dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: 256+dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) { - bl_count[bits] = 0; - } - - n = 0; - while (n <= 143) { - static_ltree[n*2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - while (n <= 255) { - static_ltree[n*2 + 1]/*.Len*/ = 9; - n++; - bl_count[9]++; - } - while (n <= 279) { - static_ltree[n*2 + 1]/*.Len*/ = 7; - n++; - bl_count[7]++; - } - while (n <= 287) { - static_ltree[n*2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes(static_ltree, L_CODES+1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n*2 + 1]/*.Len*/ = 5; - static_dtree[n*2]/*.Code*/ = bi_reverse(n, 5); - } - - // Now data ready and we can init static trees - static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS); - static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); - static_bl_desc =new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); - - //static_init_done = true; -} - - -/* =========================================================================== - * Initialize a new block. - */ -function init_block(s) { - var n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n*2]/*.Freq*/ = 0; } - for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n*2]/*.Freq*/ = 0; } - for (n = 0; n < BL_CODES; n++) { s.bl_tree[n*2]/*.Freq*/ = 0; } - - s.dyn_ltree[END_BLOCK*2]/*.Freq*/ = 1; - s.opt_len = s.static_len = 0; - s.last_lit = s.matches = 0; -} - - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -function bi_windup(s) -{ - if (s.bi_valid > 8) { - put_short(s, s.bi_buf); - } else if (s.bi_valid > 0) { - //put_byte(s, (Byte)s->bi_buf); - s.pending_buf[s.pending++] = s.bi_buf; - } - s.bi_buf = 0; - s.bi_valid = 0; -} - -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -function copy_block(s, buf, len, header) -//DeflateState *s; -//charf *buf; /* the input data */ -//unsigned len; /* its length */ -//int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, len); - put_short(s, ~len); - } -// while (len--) { -// put_byte(s, *buf++); -// } - utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); - s.pending += len; -} - -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -function smaller(tree, n, m, depth) { - var _n2 = n*2; - var _m2 = m*2; - return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || - (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); -} - -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -function pqdownheap(s, tree, k) -// deflate_state *s; -// ct_data *tree; /* the tree to restore */ -// int k; /* node to move down */ -{ - var v = s.heap[k]; - var j = k << 1; /* left son of k */ - while (j <= s.heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s.heap_len && - smaller(tree, s.heap[j+1], s.heap[j], s.depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s.heap[j], s.depth)) { break; } - - /* Exchange v with the smallest son */ - s.heap[k] = s.heap[j]; - k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s.heap[k] = v; -} - - -// inlined manually -// var SMALLEST = 1; - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -function compress_block(s, ltree, dtree) -// deflate_state *s; -// const ct_data *ltree; /* literal tree */ -// const ct_data *dtree; /* distance tree */ -{ - var dist; /* distance of matched string */ - var lc; /* match length or unmatched char (if dist == 0) */ - var lx = 0; /* running index in l_buf */ - var code; /* the code to send */ - var extra; /* number of extra bits to send */ - - if (s.last_lit !== 0) { - do { - dist = (s.pending_buf[s.d_buf + lx*2] << 8) | (s.pending_buf[s.d_buf + lx*2 + 1]); - lc = s.pending_buf[s.l_buf + lx]; - lx++; - - if (dist === 0) { - send_code(s, lc, ltree); /* send a literal byte */ - //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code+LITERALS+1, ltree); /* send the length code */ - extra = extra_lbits[code]; - if (extra !== 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - //Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra !== 0) { - dist -= base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ - //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, - // "pendingBuf overflow"); - - } while (lx < s.last_lit); - } - - send_code(s, END_BLOCK, ltree); -} - - -/* =========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ -function build_tree(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var elems = desc.stat_desc.elems; - var n, m; /* iterate over heap elements */ - var max_code = -1; /* largest code with non zero frequency */ - var node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - s.heap_len = 0; - s.heap_max = HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n * 2]/*.Freq*/ !== 0) { - s.heap[++s.heap_len] = max_code = n; - s.depth[n] = 0; - - } else { - tree[n*2 + 1]/*.Len*/ = 0; - } - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s.heap_len < 2) { - node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); - tree[node * 2]/*.Freq*/ = 1; - s.depth[node] = 0; - s.opt_len--; - - if (has_stree) { - s.static_len -= stree[node*2 + 1]/*.Len*/; - } - /* node is 0 or 1 so it does not have extra bits */ - } - desc.max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - //pqremove(s, tree, n); /* n = node of least frequency */ - /*** pqremove ***/ - n = s.heap[1/*SMALLEST*/]; - s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; - pqdownheap(s, tree, 1/*SMALLEST*/); - /***/ - - m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ - - s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ - s.heap[--s.heap_max] = m; - - /* Create a new node father of n and m */ - tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; - s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; - tree[n*2 + 1]/*.Dad*/ = tree[m*2 + 1]/*.Dad*/ = node; - - /* and insert the new node in the heap */ - s.heap[1/*SMALLEST*/] = node++; - pqdownheap(s, tree, 1/*SMALLEST*/); - - } while (s.heap_len >= 2); - - s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, desc); - - /* The field len is now set, we can generate the bit codes */ - gen_codes(tree, max_code, s.bl_count); -} - - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. - */ -function scan_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0*2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code+1)*2 + 1]/*.Len*/ = 0xffff; /* guard */ - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n+1)*2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - s.bl_tree[curlen * 2]/*.Freq*/ += count; - - } else if (curlen !== 0) { - - if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } - s.bl_tree[REP_3_6*2]/*.Freq*/++; - - } else if (count <= 10) { - s.bl_tree[REPZ_3_10*2]/*.Freq*/++; - - } else { - s.bl_tree[REPZ_11_138*2]/*.Freq*/++; - } - - count = 0; - prevlen = curlen; - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ -function send_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0*2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - /* tree[max_code+1].Len = -1; */ /* guard already set */ - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n+1)*2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); - - } else if (curlen !== 0) { - if (curlen !== prevlen) { - send_code(s, curlen, s.bl_tree); - count--; - } - //Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s.bl_tree); - send_bits(s, count-3, 2); - - } else if (count <= 10) { - send_code(s, REPZ_3_10, s.bl_tree); - send_bits(s, count-3, 3); - - } else { - send_code(s, REPZ_11_138, s.bl_tree); - send_bits(s, count-11, 7); - } - - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -function build_bl_tree(s) { - var max_blindex; /* index of last bit length code of non zero freq */ - - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, s.dyn_ltree, s.l_desc.max_code); - scan_tree(s, s.dyn_dtree, s.d_desc.max_code); - - /* Build the bit length tree: */ - build_tree(s, s.bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { - if (s.bl_tree[bl_order[max_blindex]*2 + 1]/*.Len*/ !== 0) { - break; - } - } - /* Update opt_len to include the bit length tree and counts */ - s.opt_len += 3*(max_blindex+1) + 5+5+4; - //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - // s->opt_len, s->static_len)); - - return max_blindex; -} - - -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -function send_all_trees(s, lcodes, dcodes, blcodes) -// deflate_state *s; -// int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - var rank; /* index in bl_order */ - - //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - // "too many codes"); - //Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes-1, 5); - send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s.bl_tree[bl_order[rank]*2 + 1]/*.Len*/, 3); - } - //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_ltree, lcodes-1); /* literal tree */ - //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_dtree, dcodes-1); /* distance tree */ - //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} - - -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "black list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -function detect_data_type(s) { - /* black_mask is the bit mask of black-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - var black_mask = 0xf3ffc07f; - var n; - - /* Check for non-textual ("black-listed") bytes. */ - for (n = 0; n <= 31; n++, black_mask >>>= 1) { - if ((black_mask & 1) && (s.dyn_ltree[n*2]/*.Freq*/ !== 0)) { - return Z_BINARY; - } - } - - /* Check for textual ("white-listed") bytes. */ - if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || - s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - for (n = 32; n < LITERALS; n++) { - if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - } - - /* There are no "black-listed" or "white-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - - -var static_init_done = false; - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -function _tr_init(s) -{ - - if (!static_init_done) { - tr_static_init(); - static_init_done = true; - } - - s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); - s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); - s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); - - s.bi_buf = 0; - s.bi_valid = 0; - - /* Initialize the first block of the first file: */ - init_block(s); -} - - -/* =========================================================================== - * Send a stored block - */ -function _tr_stored_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - send_bits(s, (STORED_BLOCK<<1)+(last ? 1 : 0), 3); /* send block type */ - copy_block(s, buf, stored_len, true); /* with header */ -} - - -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - */ -function _tr_align(s) { - send_bits(s, STATIC_TREES<<1, 3); - send_code(s, END_BLOCK, static_ltree); - bi_flush(s); -} - - -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ -function _tr_flush_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block, or NULL if too old */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - var max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s.level > 0) { - - /* Check if the file is binary or text */ - if (s.strm.data_type === Z_UNKNOWN) { - s.strm.data_type = detect_data_type(s); - } - - /* Construct the literal and distance trees */ - build_tree(s, s.l_desc); - // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - - build_tree(s, s.d_desc); - // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); - - /* Determine the best encoding. Compute the block lengths in bytes. */ - opt_lenb = (s.opt_len+3+7) >>> 3; - static_lenb = (s.static_len+3+7) >>> 3; - - // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - // s->last_lit)); - - if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } - - } else { - // Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } - - if ((stored_len+4 <= opt_lenb) && (buf !== -1)) { - /* 4: two words for the lengths */ - - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, last); - - } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { - - send_bits(s, (STATIC_TREES<<1) + (last ? 1 : 0), 3); - compress_block(s, static_ltree, static_dtree); - - } else { - send_bits(s, (DYN_TREES<<1) + (last ? 1 : 0), 3); - send_all_trees(s, s.l_desc.max_code+1, s.d_desc.max_code+1, max_blindex+1); - compress_block(s, s.dyn_ltree, s.dyn_dtree); - } - // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. - */ - init_block(s); - - if (last) { - bi_windup(s); - } - // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - // s->compressed_len-7*last)); -} - -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -function _tr_tally(s, dist, lc) -// deflate_state *s; -// unsigned dist; /* distance of matched string */ -// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - //var out_length, in_length, dcode; - - s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; - s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; - - s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; - s.last_lit++; - - if (dist === 0) { - /* lc is the unmatched char */ - s.dyn_ltree[lc*2]/*.Freq*/++; - } else { - s.matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - //Assert((ush)dist < (ush)MAX_DIST(s) && - // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++; - s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; - } - -// (!) This block is disabled in zlib defailts, -// don't enable it for binary compatibility - -//#ifdef TRUNCATE_BLOCK -// /* Try to guess if it is profitable to stop the current block here */ -// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { -// /* Compute an upper bound for the compressed length */ -// out_length = s.last_lit*8; -// in_length = s.strstart - s.block_start; -// -// for (dcode = 0; dcode < D_CODES; dcode++) { -// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); -// } -// out_length >>>= 3; -// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", -// // s->last_lit, in_length, out_length, -// // 100L - out_length*100L/in_length)); -// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { -// return true; -// } -// } -//#endif - - return (s.last_lit === s.lit_bufsize-1); - /* We avoid equality with lit_bufsize because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ -} - -exports._tr_init = _tr_init; -exports._tr_stored_block = _tr_stored_block; -exports._tr_flush_block = _tr_flush_block; -exports._tr_tally = _tr_tally; -exports._tr_align = _tr_align; diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/zstream.js b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/zstream.js deleted file mode 100644 index 2d93a3912..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/lib/zlib/zstream.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; diff --git a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/package.json b/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/package.json deleted file mode 100644 index 02e78d9f7..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/node_modules/pako/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "name": "pako", - "description": "zlib port to javascript - fast, modularized, with browser support", - "version": "0.2.7", - "keywords": [ - "zlib", - "deflate", - "inflate", - "gzip" - ], - "homepage": "https://github.com/nodeca/pako", - "contributors": [ - { - "name": "Andrei Tuputcyn", - "url": "https://github.com/andr83" - }, - { - "name": "Vitaly Puzrin", - "url": "https://github.com/puzrin" - } - ], - "bugs": { - "url": "https://github.com/nodeca/pako/issues" - }, - "license": { - "type": "MIT", - "url": "https://github.com/nodeca/pako/blob/master/LICENSE" - }, - "repository": { - "type": "git", - "url": "git://github.com/nodeca/pako.git" - }, - "main": "./index.js", - "devDependencies": { - "mocha": "*", - "benchmark": "*", - "ansi": "*", - "browserify": "*", - "eslint": "0.17.1", - "eslint-plugin-nodeca": "~1.0.3", - "uglify-js": "*", - "istanbul": "*", - "ndoc": "*", - "lodash": "*", - "async": "*", - "grunt": "~0.4.4", - "grunt-cli": "~0.1.13", - "grunt-saucelabs": "~8.6.0", - "grunt-contrib-connect": "~0.9.0" - }, - "gitHead": "8070869d8cef31f291e02498c28d7f423de34ade", - "_id": "pako@0.2.7", - "scripts": {}, - "_shasum": "90e8917affd5ee2b69dfe943ec16b783c4e0c441", - "_from": "pako@>=0.2.5 <0.3.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "vitaly", - "email": "vitaly@rcdesign.ru" - }, - "maintainers": [ - { - "name": "vitaly", - "email": "vitaly@rcdesign.ru" - } - ], - "dist": { - "shasum": "90e8917affd5ee2b69dfe943ec16b783c4e0c441", - "tarball": "http://registry.npmjs.org/pako/-/pako-0.2.7.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/pako/-/pako-0.2.7.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/node-zip/node_modules/jszip/package.json b/cli/node_modules/node-zip/node_modules/jszip/package.json deleted file mode 100644 index 96d763007..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "name": "jszip", - "version": "2.5.0", - "author": { - "name": "Stuart Knightley", - "email": "stuart@stuartk.com" - }, - "description": "Create, read and edit .zip files with Javascript http://stuartk.com/jszip", - "scripts": { - "test": "npm run test-node && npm run test-browser", - "test-node": "cd test && qunit -c node.js -t test.js", - "test-browser": "grunt build && grunt test", - "lint": "grunt jshint" - }, - "contributors": [ - { - "name": "Franz Buchinger" - }, - { - "name": "António Afonso" - }, - { - "name": "David Duponchel" - }, - { - "name": "yiminghe" - } - ], - "main": "./lib/index", - "repository": { - "type": "git", - "url": "https://github.com/Stuk/jszip.git" - }, - "keywords": [ - "zip", - "deflate", - "inflate" - ], - "devDependencies": { - "qunit": "~0.6.3", - "grunt": "~0.4.1", - "grunt-cli": "~0.1.9", - "grunt-saucelabs": "~7.0.0", - "grunt-contrib-connect": "~0.7.1", - "jshint": "~2.5.1", - "browserify": "~4.1.4", - "grunt-browserify": "~2.1.0", - "grunt-contrib-jshint": "~0.10.0", - "grunt-contrib-uglify": "~0.4.0", - "jszip-utils": "~0.0.2" - }, - "dependencies": { - "pako": "~0.2.5" - }, - "license": "MIT or GPLv3", - "gitHead": "9ab3ed85da96700f32f50e01b87f2a4bde010390", - "bugs": { - "url": "https://github.com/Stuk/jszip/issues" - }, - "homepage": "https://github.com/Stuk/jszip", - "_id": "jszip@2.5.0", - "_shasum": "7444fd8551ddf3e5da7198fea0c91bc8308cc274", - "_from": "jszip@2.5.0", - "_npmVersion": "2.5.1", - "_nodeVersion": "1.3.0", - "_npmUser": { - "name": "stuk", - "email": "stuart@stuartk.com" - }, - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "stuk", - "email": "stuart@stuartk.com" - } - ], - "dist": { - "shasum": "7444fd8551ddf3e5da7198fea0c91bc8308cc274", - "tarball": "http://registry.npmjs.org/jszip/-/jszip-2.5.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/jszip/-/jszip-2.5.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/node-zip/node_modules/jszip/vendor/FileSaver.js b/cli/node_modules/node-zip/node_modules/jszip/vendor/FileSaver.js deleted file mode 100644 index 112efb072..000000000 --- a/cli/node_modules/node-zip/node_modules/jszip/vendor/FileSaver.js +++ /dev/null @@ -1,247 +0,0 @@ -/*! FileSaver.js - * A saveAs() FileSaver implementation. - * 2014-01-24 - * - * By Eli Grey, http://eligrey.com - * License: X11/MIT - * See LICENSE.md - */ - -/*global self */ -/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */ - -/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ - -var saveAs = saveAs - // IE 10+ (native saveAs) - || (typeof navigator !== "undefined" && - navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator)) - // Everyone else - || (function(view) { - "use strict"; - // IE <10 is explicitly unsupported - if (typeof navigator !== "undefined" && - /MSIE [1-9]\./.test(navigator.userAgent)) { - return; - } - var - doc = view.document - // only get URL when necessary in case BlobBuilder.js hasn't overridden it yet - , get_URL = function() { - return view.URL || view.webkitURL || view; - } - , URL = view.URL || view.webkitURL || view - , save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a") - , can_use_save_link = !view.externalHost && "download" in save_link - , click = function(node) { - var event = doc.createEvent("MouseEvents"); - event.initMouseEvent( - "click", true, false, view, 0, 0, 0, 0, 0 - , false, false, false, false, 0, null - ); - node.dispatchEvent(event); - } - , webkit_req_fs = view.webkitRequestFileSystem - , req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem - , throw_outside = function(ex) { - (view.setImmediate || view.setTimeout)(function() { - throw ex; - }, 0); - } - , force_saveable_type = "application/octet-stream" - , fs_min_size = 0 - , deletion_queue = [] - , process_deletion_queue = function() { - var i = deletion_queue.length; - while (i--) { - var file = deletion_queue[i]; - if (typeof file === "string") { // file is an object URL - URL.revokeObjectURL(file); - } else { // file is a File - file.remove(); - } - } - deletion_queue.length = 0; // clear queue - } - , dispatch = function(filesaver, event_types, event) { - event_types = [].concat(event_types); - var i = event_types.length; - while (i--) { - var listener = filesaver["on" + event_types[i]]; - if (typeof listener === "function") { - try { - listener.call(filesaver, event || filesaver); - } catch (ex) { - throw_outside(ex); - } - } - } - } - , FileSaver = function(blob, name) { - // First try a.download, then web filesystem, then object URLs - var - filesaver = this - , type = blob.type - , blob_changed = false - , object_url - , target_view - , get_object_url = function() { - var object_url = get_URL().createObjectURL(blob); - deletion_queue.push(object_url); - return object_url; - } - , dispatch_all = function() { - dispatch(filesaver, "writestart progress write writeend".split(" ")); - } - // on any filesys errors revert to saving with object URLs - , fs_error = function() { - // don't create more object URLs than needed - if (blob_changed || !object_url) { - object_url = get_object_url(blob); - } - if (target_view) { - target_view.location.href = object_url; - } else { - window.open(object_url, "_blank"); - } - filesaver.readyState = filesaver.DONE; - dispatch_all(); - } - , abortable = function(func) { - return function() { - if (filesaver.readyState !== filesaver.DONE) { - return func.apply(this, arguments); - } - }; - } - , create_if_not_found = {create: true, exclusive: false} - , slice - ; - filesaver.readyState = filesaver.INIT; - if (!name) { - name = "download"; - } - if (can_use_save_link) { - object_url = get_object_url(blob); - // FF for Android has a nasty garbage collection mechanism - // that turns all objects that are not pure javascript into 'deadObject' - // this means `doc` and `save_link` are unusable and need to be recreated - // `view` is usable though: - doc = view.document; - save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a"); - save_link.href = object_url; - save_link.download = name; - var event = doc.createEvent("MouseEvents"); - event.initMouseEvent( - "click", true, false, view, 0, 0, 0, 0, 0 - , false, false, false, false, 0, null - ); - save_link.dispatchEvent(event); - filesaver.readyState = filesaver.DONE; - dispatch_all(); - return; - } - // Object and web filesystem URLs have a problem saving in Google Chrome when - // viewed in a tab, so I force save with application/octet-stream - // http://code.google.com/p/chromium/issues/detail?id=91158 - if (view.chrome && type && type !== force_saveable_type) { - slice = blob.slice || blob.webkitSlice; - blob = slice.call(blob, 0, blob.size, force_saveable_type); - blob_changed = true; - } - // Since I can't be sure that the guessed media type will trigger a download - // in WebKit, I append .download to the filename. - // https://bugs.webkit.org/show_bug.cgi?id=65440 - if (webkit_req_fs && name !== "download") { - name += ".download"; - } - if (type === force_saveable_type || webkit_req_fs) { - target_view = view; - } - if (!req_fs) { - fs_error(); - return; - } - fs_min_size += blob.size; - req_fs(view.TEMPORARY, fs_min_size, abortable(function(fs) { - fs.root.getDirectory("saved", create_if_not_found, abortable(function(dir) { - var save = function() { - dir.getFile(name, create_if_not_found, abortable(function(file) { - file.createWriter(abortable(function(writer) { - writer.onwriteend = function(event) { - target_view.location.href = file.toURL(); - deletion_queue.push(file); - filesaver.readyState = filesaver.DONE; - dispatch(filesaver, "writeend", event); - }; - writer.onerror = function() { - var error = writer.error; - if (error.code !== error.ABORT_ERR) { - fs_error(); - } - }; - "writestart progress write abort".split(" ").forEach(function(event) { - writer["on" + event] = filesaver["on" + event]; - }); - writer.write(blob); - filesaver.abort = function() { - writer.abort(); - filesaver.readyState = filesaver.DONE; - }; - filesaver.readyState = filesaver.WRITING; - }), fs_error); - }), fs_error); - }; - dir.getFile(name, {create: false}, abortable(function(file) { - // delete file if it already exists - file.remove(); - save(); - }), abortable(function(ex) { - if (ex.code === ex.NOT_FOUND_ERR) { - save(); - } else { - fs_error(); - } - })); - }), fs_error); - }), fs_error); - } - , FS_proto = FileSaver.prototype - , saveAs = function(blob, name) { - return new FileSaver(blob, name); - } - ; - FS_proto.abort = function() { - var filesaver = this; - filesaver.readyState = filesaver.DONE; - dispatch(filesaver, "abort"); - }; - FS_proto.readyState = FS_proto.INIT = 0; - FS_proto.WRITING = 1; - FS_proto.DONE = 2; - - FS_proto.error = - FS_proto.onwritestart = - FS_proto.onprogress = - FS_proto.onwrite = - FS_proto.onabort = - FS_proto.onerror = - FS_proto.onwriteend = - null; - - view.addEventListener("unload", process_deletion_queue, false); - saveAs.unload = function() { - process_deletion_queue(); - view.removeEventListener("unload", process_deletion_queue, false); - }; - return saveAs; -}( - typeof self !== "undefined" && self - || typeof window !== "undefined" && window - || this.content -)); -// `self` is undefined in Firefox for Android content script context -// while `this` is nsIContentFrameMessageManager -// with an attribute `content` that corresponds to the window - -if (typeof module !== "undefined") module.exports = saveAs; diff --git a/cli/node_modules/node-zip/package.json b/cli/node_modules/node-zip/package.json deleted file mode 100644 index e71c3f9f8..000000000 --- a/cli/node_modules/node-zip/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "author": { - "name": "Diego Araos", - "email": "d@wehack.it", - "url": "http://wehack.it/" - }, - "name": "node-zip", - "description": "node-zip - Zip/Unzip files ported from JSZip", - "version": "1.1.1", - "homepage": "https://github.com/daraosn/node-zip", - "repository": { - "url": "git://github.com/daraosn/node-zip.git" - }, - "contributors": [ - { - "name": "David Duponchel", - "email": "d.duponchel@gmail.com" - } - ], - "keywords": [ - "zip", - "unzip", - "jszip", - "node-zip", - "compression" - ], - "bin": { - "nodezip": "bin/nodezip" - }, - "main": "lib/nodezip.js", - "dependencies": { - "jszip": "2.5.0" - }, - "devDependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "gitHead": "43a426966a85b84ae04e6b15fa9fc53e8db8e9bf", - "bugs": { - "url": "https://github.com/daraosn/node-zip/issues" - }, - "_id": "node-zip@1.1.1", - "scripts": {}, - "_shasum": "94d1ad674a3cd46a1588dd736f4a9a78c757eb62", - "_from": "node-zip@>=1.1.0 <2.0.0", - "_npmVersion": "2.1.11", - "_nodeVersion": "0.10.33", - "_npmUser": { - "name": "daraosn", - "email": "d@wehack.it" - }, - "dist": { - "shasum": "94d1ad674a3cd46a1588dd736f4a9a78c757eb62", - "tarball": "http://registry.npmjs.org/node-zip/-/node-zip-1.1.1.tgz" - }, - "maintainers": [ - { - "name": "daraosn", - "email": "d@wehack.it" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/node-zip/-/node-zip-1.1.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/node-zip/test/nodezip_spec.js b/cli/node_modules/node-zip/test/nodezip_spec.js deleted file mode 100644 index 1da23b155..000000000 --- a/cli/node_modules/node-zip/test/nodezip_spec.js +++ /dev/null @@ -1,41 +0,0 @@ -describe('nodezip', function() { - beforeEach(function() { - this.nodezip = require('..')(); - }); - - describe('when initialized', function() { - it('should load JSZip in this.nodezip', function() { - expect(this.nodezip.options).not.toBeNull(); - }); - - it('should declare JSZip', function() { - expect(JSZip).not.toBeNull(); - }); - }); - - describe('when archiving a dummy file', function() { - beforeEach(function() { - this.fs = require("fs"); - this.dummyFile = this.nodezip.file('test.file', 'hello there'); - this.dummyFileData = this.dummyFile.generate({base64:false,compression:'DEFLATE'}); - }); - - it('should contain valid data', function() { - expect(this.dummyFileData).not.toBeNull(); - expect(this.dummyFileData).toMatch(/^PK/); - expect(this.dummyFileData).toMatch(/test.file/); - }); - - it('should be able to write file', function() { - this.fs.writeFileSync('test.zip', this.dummyFileData, 'binary'); - expect(this.fs.lstatSync('test.zip')).not.toBeNull() - }); - - it('should be able to deflate file', function() { - this.dummyFileData = this.fs.readFileSync('test.zip', 'binary'); - this.dummyFile = new JSZip(this.dummyFileData, {base64: false, checkCRC32: true}); - expect(this.dummyFile.files['test.file'].asText()).toEqual("hello there"); - this.fs.unlink('test.zip'); - }); - }); -}); \ No newline at end of file diff --git a/cli/node_modules/rimraf/LICENSE b/cli/node_modules/rimraf/LICENSE deleted file mode 100644 index 19129e315..000000000 --- a/cli/node_modules/rimraf/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/cli/node_modules/rimraf/README.md b/cli/node_modules/rimraf/README.md deleted file mode 100644 index 18659f67f..000000000 --- a/cli/node_modules/rimraf/README.md +++ /dev/null @@ -1,38 +0,0 @@ -[![Build Status](https://travis-ci.org/isaacs/rimraf.svg?branch=master)](https://travis-ci.org/isaacs/rimraf) [![Dependency Status](https://david-dm.org/isaacs/rimraf.svg)](https://david-dm.org/isaacs/rimraf) [![devDependency Status](https://david-dm.org/isaacs/rimraf/dev-status.svg)](https://david-dm.org/isaacs/rimraf#info=devDependencies) - -The [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node. - -Install with `npm install rimraf`, or just drop rimraf.js somewhere. - -## API - -`rimraf(f, callback)` - -The callback will be called with an error if there is one. Certain -errors are handled for you: - -* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of - `opts.maxBusyTries` times before giving up, adding 100ms of wait - between each attempt. The default `maxBusyTries` is 3. -* `ENOENT` - If the file doesn't exist, rimraf will return - successfully, since your desired outcome is already the case. -* `EMFILE` - Since `readdir` requires opening a file descriptor, it's - possible to hit `EMFILE` if too many file descriptors are in use. - In the sync case, there's nothing to be done for this. But in the - async case, rimraf will gradually back off with timeouts up to - `opts.emfileWait` ms, which defaults to 1000. - -## rimraf.sync - -It can remove stuff synchronously, too. But that's not so good. Use -the async API. It's better. - -## CLI - -If installed with `npm install rimraf -g` it can be used as a global -command `rimraf [ ...]` which is useful for cross platform support. - -## mkdirp - -If you need to create a directory recursively, check out -[mkdirp](https://github.com/substack/node-mkdirp). diff --git a/cli/node_modules/rimraf/bin.js b/cli/node_modules/rimraf/bin.js deleted file mode 100755 index 1bd5a0d16..000000000 --- a/cli/node_modules/rimraf/bin.js +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env node - -var rimraf = require('./') - -var help = false -var dashdash = false -var args = process.argv.slice(2).filter(function(arg) { - if (dashdash) - return !!arg - else if (arg === '--') - dashdash = true - else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) - help = true - else - return !!arg -}); - -if (help || args.length === 0) { - // If they didn't ask for help, then this is not a "success" - var log = help ? console.log : console.error - log('Usage: rimraf [ ...]') - log('') - log(' Deletes all files and folders at "path" recursively.') - log('') - log('Options:') - log('') - log(' -h, --help Display this usage info') - process.exit(help ? 0 : 1) -} else - go(0) - -function go (n) { - if (n >= args.length) - return - rimraf(args[n], function (er) { - if (er) - throw er - go(n+1) - }) -} diff --git a/cli/node_modules/rimraf/node_modules/glob/LICENSE b/cli/node_modules/rimraf/node_modules/glob/LICENSE deleted file mode 100644 index 19129e315..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/cli/node_modules/rimraf/node_modules/glob/README.md b/cli/node_modules/rimraf/node_modules/glob/README.md deleted file mode 100644 index 063cf950a..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/README.md +++ /dev/null @@ -1,377 +0,0 @@ -[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Dependency Status](https://david-dm.org/isaacs/node-glob.svg)](https://david-dm.org/isaacs/node-glob) [![devDependency Status](https://david-dm.org/isaacs/node-glob/dev-status.svg)](https://david-dm.org/isaacs/node-glob#info=devDependencies) [![optionalDependency Status](https://david-dm.org/isaacs/node-glob/optional-status.svg)](https://david-dm.org/isaacs/node-glob#info=optionalDependencies) - -# Glob - -Match files using the patterns the shell uses, like stars and stuff. - -This is a glob implementation in JavaScript. It uses the `minimatch` -library to do its matching. - -![](oh-my-glob.gif) - -## Usage - -```javascript -var glob = require("glob") - -// options is optional -glob("**/*.js", options, function (er, files) { - // files is an array of filenames. - // If the `nonull` option is set, and nothing - // was found, then files is ["**/*.js"] - // er is an error object or null. -}) -``` - -## Glob Primer - -"Globs" are the patterns you type when you do stuff like `ls *.js` on -the command line, or put `build/*` in a `.gitignore` file. - -Before parsing the path part patterns, braced sections are expanded -into a set. Braced sections start with `{` and end with `}`, with any -number of comma-delimited sections within. Braced sections may contain -slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. - -The following characters have special magic meaning when used in a -path portion: - -* `*` Matches 0 or more characters in a single path portion -* `?` Matches 1 character -* `[...]` Matches a range of characters, similar to a RegExp range. - If the first character of the range is `!` or `^` then it matches - any character not in the range. -* `!(pattern|pattern|pattern)` Matches anything that does not match - any of the patterns provided. -* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the - patterns provided. -* `+(pattern|pattern|pattern)` Matches one or more occurrences of the - patterns provided. -* `*(a|b|c)` Matches zero or more occurrences of the patterns provided -* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns - provided -* `**` If a "globstar" is alone in a path portion, then it matches - zero or more directories and subdirectories searching for matches. - It does not crawl symlinked directories. - -### Dots - -If a file or directory path portion has a `.` as the first character, -then it will not match any glob pattern unless that pattern's -corresponding path part also has a `.` as its first character. - -For example, the pattern `a/.*/c` would match the file at `a/.b/c`. -However the pattern `a/*/c` would not, because `*` does not start with -a dot character. - -You can make glob treat dots as normal characters by setting -`dot:true` in the options. - -### Basename Matching - -If you set `matchBase:true` in the options, and the pattern has no -slashes in it, then it will seek for any file anywhere in the tree -with a matching basename. For example, `*.js` would match -`test/simple/basic.js`. - -### Negation - -The intent for negation would be for a pattern starting with `!` to -match everything that *doesn't* match the supplied pattern. However, -the implementation is weird, and for the time being, this should be -avoided. The behavior is deprecated in version 5, and will be removed -entirely in version 6. - -### Empty Sets - -If no matching files are found, then an empty array is returned. This -differs from the shell, where the pattern itself is returned. For -example: - - $ echo a*s*d*f - a*s*d*f - -To get the bash-style behavior, set the `nonull:true` in the options. - -### See Also: - -* `man sh` -* `man bash` (Search for "Pattern Matching") -* `man 3 fnmatch` -* `man 5 gitignore` -* [minimatch documentation](https://github.com/isaacs/minimatch) - -## glob.hasMagic(pattern, [options]) - -Returns `true` if there are any special characters in the pattern, and -`false` otherwise. - -Note that the options affect the results. If `noext:true` is set in -the options object, then `+(a|b)` will not be considered a magic -pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` -then that is considered magical, unless `nobrace:true` is set in the -options. - -## glob(pattern, [options], cb) - -* `pattern` {String} Pattern to be matched -* `options` {Object} -* `cb` {Function} - * `err` {Error | null} - * `matches` {Array} filenames found matching the pattern - -Perform an asynchronous glob search. - -## glob.sync(pattern, [options]) - -* `pattern` {String} Pattern to be matched -* `options` {Object} -* return: {Array} filenames found matching the pattern - -Perform a synchronous glob search. - -## Class: glob.Glob - -Create a Glob object by instantiating the `glob.Glob` class. - -```javascript -var Glob = require("glob").Glob -var mg = new Glob(pattern, options, cb) -``` - -It's an EventEmitter, and starts walking the filesystem to find matches -immediately. - -### new glob.Glob(pattern, [options], [cb]) - -* `pattern` {String} pattern to search for -* `options` {Object} -* `cb` {Function} Called when an error occurs, or matches are found - * `err` {Error | null} - * `matches` {Array} filenames found matching the pattern - -Note that if the `sync` flag is set in the options, then matches will -be immediately available on the `g.found` member. - -### Properties - -* `minimatch` The minimatch object that the glob uses. -* `options` The options object passed in. -* `aborted` Boolean which is set to true when calling `abort()`. There - is no way at this time to continue a glob search after aborting, but - you can re-use the statCache to avoid having to duplicate syscalls. -* `cache` Convenience object. Each field has the following possible - values: - * `false` - Path does not exist - * `true` - Path exists - * `'DIR'` - Path exists, and is not a directory - * `'FILE'` - Path exists, and is a directory - * `[file, entries, ...]` - Path exists, is a directory, and the - array value is the results of `fs.readdir` -* `statCache` Cache of `fs.stat` results, to prevent statting the same - path multiple times. -* `symlinks` A record of which paths are symbolic links, which is - relevant in resolving `**` patterns. -* `realpathCache` An optional object which is passed to `fs.realpath` - to minimize unnecessary syscalls. It is stored on the instantiated - Glob object, and may be re-used. - -### Events - -* `end` When the matching is finished, this is emitted with all the - matches found. If the `nonull` option is set, and no match was found, - then the `matches` list contains the original pattern. The matches - are sorted, unless the `nosort` flag is set. -* `match` Every time a match is found, this is emitted with the matched. -* `error` Emitted when an unexpected error is encountered, or whenever - any fs error occurs if `options.strict` is set. -* `abort` When `abort()` is called, this event is raised. - -### Methods - -* `pause` Temporarily stop the search -* `resume` Resume the search -* `abort` Stop the search forever - -### Options - -All the options that can be passed to Minimatch can also be passed to -Glob to change pattern matching behavior. Also, some have been added, -or have glob-specific ramifications. - -All options are false by default, unless otherwise noted. - -All options are added to the Glob object, as well. - -If you are running many `glob` operations, you can pass a Glob object -as the `options` argument to a subsequent operation to shortcut some -`stat` and `readdir` calls. At the very least, you may pass in shared -`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that -parallel glob operations will be sped up by sharing information about -the filesystem. - -* `cwd` The current working directory in which to search. Defaults - to `process.cwd()`. -* `root` The place where patterns starting with `/` will be mounted - onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix - systems, and `C:\` or some such on Windows.) -* `dot` Include `.dot` files in normal matches and `globstar` matches. - Note that an explicit dot in a portion of the pattern will always - match dot files. -* `nomount` By default, a pattern starting with a forward-slash will be - "mounted" onto the root setting, so that a valid filesystem path is - returned. Set this flag to disable that behavior. -* `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. -* `nosort` Don't sort the results. -* `stat` Set to true to stat *all* results. This reduces performance - somewhat, and is completely unnecessary, unless `readdir` is presumed - to be an untrustworthy indicator of file existence. -* `silent` When an unusual error is encountered when attempting to - read a directory, a warning will be printed to stderr. Set the - `silent` option to true to suppress these warnings. -* `strict` When an unusual error is encountered when attempting to - read a directory, the process will just continue on in search of - other matches. Set the `strict` option to raise an error in these - cases. -* `cache` See `cache` property above. Pass in a previously generated - cache object to save some fs calls. -* `statCache` A cache of results of filesystem information, to prevent - unnecessary stat calls. While it should not normally be necessary - to set this, you may pass the statCache from one glob() call to the - options object of another, if you know that the filesystem will not - change between calls. (See "Race Conditions" below.) -* `symlinks` A cache of known symbolic links. You may pass in a - previously generated `symlinks` object to save `lstat` calls when - resolving `**` matches. -* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. -* `nounique` In some cases, brace-expanded patterns can result in the - same file showing up multiple times in the result set. By default, - this implementation prevents duplicates in the result set. Set this - flag to disable that behavior. -* `nonull` Set to never return an empty set, instead returning a set - containing the pattern itself. This is the default in glob(3). -* `debug` Set to enable debug logging in minimatch and glob. -* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. -* `noglobstar` Do not match `**` against multiple filenames. (Ie, - treat it as a normal `*` instead.) -* `noext` Do not match `+(a|b)` "extglob" patterns. -* `nocase` Perform a case-insensitive match. Note: on - case-insensitive filesystems, non-magic patterns will match by - default, since `stat` and `readdir` will not raise errors. -* `matchBase` Perform a basename-only match if the pattern does not - contain any slash characters. That is, `*.js` would be treated as - equivalent to `**/*.js`, matching all js files in all directories. -* `nodir` Do not match directories, only files. (Note: to match - *only* directories, simply put a `/` at the end of the pattern.) -* `ignore` Add a pattern or an array of patterns to exclude matches. -* `follow` Follow symlinked directories when expanding `**` patterns. - Note that this can result in a lot of duplicate references in the - presence of cyclic links. -* `realpath` Set to true to call `fs.realpath` on all of the results. - In the case of a symlink that cannot be resolved, the full absolute - path to the matched entry is returned (though it will usually be a - broken symlink) -* `nonegate` Suppress deprecated `negate` behavior. (See below.) - Default=true -* `nocomment` Suppress deprecated `comment` behavior. (See below.) - Default=true - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between node-glob and other -implementations, and are intentional. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.3, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -Note that symlinked directories are not crawled as part of a `**`, -though their contents may match against subsequent portions of the -pattern. This prevents infinite loops and duplicates and the like. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then glob returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - -### Comments and Negation - -**Note**: In version 5 of this module, negation and comments are -**disabled** by default. You can explicitly set `nonegate:false` or -`nocomment:false` to re-enable them. They are going away entirely in -version 6. - -The intent for negation would be for a pattern starting with `!` to -match everything that *doesn't* match the supplied pattern. However, -the implementation is weird. It is better to use the `ignore` option -to set a pattern or set of patterns to exclude from matches. If you -want the "everything except *x*" type of behavior, you can use `**` as -the main pattern, and set an `ignore` for the things to exclude. - -The comments feature is added in minimatch, primarily to more easily -support use cases like ignore files, where a `#` at the start of a -line makes the pattern "empty". However, in the context of a -straightforward filesystem globber, "comments" don't make much sense. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only `/` -characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will always -be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto the -root setting using `path.join`. On windows, this will by default result -in `/foo/*` matching `C:\foo\bar.txt`. - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race conditions, -since it relies on directory walking and such. - -As a result, it is possible that a file that exists when glob looks for -it may have been deleted or modified by the time it returns the result. - -As part of its internal implementation, this program caches all stat -and readdir calls that it makes, in order to cut down on system -overhead. However, this also makes it even more susceptible to races, -especially if the cache or statCache objects are reused between glob -calls. - -Users are thus advised not to use a glob result as a guarantee of -filesystem state in the face of rapid changes. For the vast majority -of operations, this is never a problem. - -## Contributing - -Any change to behavior (including bugfixes) must come with a test. - -Patches that fail tests or reduce performance will be rejected. - -``` -# to run tests -npm test - -# to re-generate test fixtures -npm run test-regen - -# to benchmark against bash/zsh -npm run bench - -# to profile javascript -npm run prof -``` diff --git a/cli/node_modules/rimraf/node_modules/glob/common.js b/cli/node_modules/rimraf/node_modules/glob/common.js deleted file mode 100644 index e36a631ca..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/common.js +++ /dev/null @@ -1,245 +0,0 @@ -exports.alphasort = alphasort -exports.alphasorti = alphasorti -exports.setopts = setopts -exports.ownProp = ownProp -exports.makeAbs = makeAbs -exports.finish = finish -exports.mark = mark -exports.isIgnored = isIgnored -exports.childrenIgnored = childrenIgnored - -function ownProp (obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field) -} - -var path = require("path") -var minimatch = require("minimatch") -var isAbsolute = require("path-is-absolute") -var Minimatch = minimatch.Minimatch - -function alphasorti (a, b) { - return a.toLowerCase().localeCompare(b.toLowerCase()) -} - -function alphasort (a, b) { - return a.localeCompare(b) -} - -function setupIgnores (self, options) { - self.ignore = options.ignore || [] - - if (!Array.isArray(self.ignore)) - self.ignore = [self.ignore] - - if (self.ignore.length) { - self.ignore = self.ignore.map(ignoreMap) - } -} - -function ignoreMap (pattern) { - var gmatcher = null - if (pattern.slice(-3) === '/**') { - var gpattern = pattern.replace(/(\/\*\*)+$/, '') - gmatcher = new Minimatch(gpattern) - } - - return { - matcher: new Minimatch(pattern), - gmatcher: gmatcher - } -} - -function setopts (self, pattern, options) { - if (!options) - options = {} - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - self.silent = !!options.silent - self.pattern = pattern - self.strict = options.strict !== false - self.realpath = !!options.realpath - self.realpathCache = options.realpathCache || Object.create(null) - self.follow = !!options.follow - self.dot = !!options.dot - self.mark = !!options.mark - self.nodir = !!options.nodir - if (self.nodir) - self.mark = true - self.sync = !!options.sync - self.nounique = !!options.nounique - self.nonull = !!options.nonull - self.nosort = !!options.nosort - self.nocase = !!options.nocase - self.stat = !!options.stat - self.noprocess = !!options.noprocess - - self.maxLength = options.maxLength || Infinity - self.cache = options.cache || Object.create(null) - self.statCache = options.statCache || Object.create(null) - self.symlinks = options.symlinks || Object.create(null) - - setupIgnores(self, options) - - self.changedCwd = false - var cwd = process.cwd() - if (!ownProp(options, "cwd")) - self.cwd = cwd - else { - self.cwd = options.cwd - self.changedCwd = path.resolve(options.cwd) !== cwd - } - - self.root = options.root || path.resolve(self.cwd, "/") - self.root = path.resolve(self.root) - if (process.platform === "win32") - self.root = self.root.replace(/\\/g, "/") - - self.nomount = !!options.nomount - - // disable comments and negation unless the user explicitly - // passes in false as the option. - options.nonegate = options.nonegate === false ? false : true - options.nocomment = options.nocomment === false ? false : true - deprecationWarning(options) - - self.minimatch = new Minimatch(pattern, options) - self.options = self.minimatch.options -} - -// TODO(isaacs): remove entirely in v6 -// exported to reset in tests -exports.deprecationWarned -function deprecationWarning(options) { - if (!options.nonegate || !options.nocomment) { - if (process.noDeprecation !== true && !exports.deprecationWarned) { - var msg = 'glob WARNING: comments and negation will be disabled in v6' - if (process.throwDeprecation) - throw new Error(msg) - else if (process.traceDeprecation) - console.trace(msg) - else - console.error(msg) - - exports.deprecationWarned = true - } - } -} - -function finish (self) { - var nou = self.nounique - var all = nou ? [] : Object.create(null) - - for (var i = 0, l = self.matches.length; i < l; i ++) { - var matches = self.matches[i] - if (!matches || Object.keys(matches).length === 0) { - if (self.nonull) { - // do like the shell, and spit out the literal glob - var literal = self.minimatch.globSet[i] - if (nou) - all.push(literal) - else - all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) - all.push.apply(all, m) - else - m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) - all = Object.keys(all) - - if (!self.nosort) - all = all.sort(self.nocase ? alphasorti : alphasort) - - // at *some* point we statted all of these - if (self.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self._mark(all[i]) - } - if (self.nodir) { - all = all.filter(function (e) { - return !(/\/$/.test(e)) - }) - } - } - - if (self.ignore.length) - all = all.filter(function(m) { - return !isIgnored(self, m) - }) - - self.found = all -} - -function mark (self, p) { - var abs = makeAbs(self, p) - var c = self.cache[abs] - var m = p - if (c) { - var isDir = c === 'DIR' || Array.isArray(c) - var slash = p.slice(-1) === '/' - - if (isDir && !slash) - m += '/' - else if (!isDir && slash) - m = m.slice(0, -1) - - if (m !== p) { - var mabs = makeAbs(self, m) - self.statCache[mabs] = self.statCache[abs] - self.cache[mabs] = self.cache[abs] - } - } - - return m -} - -// lotta situps... -function makeAbs (self, f) { - var abs = f - if (f.charAt(0) === '/') { - abs = path.join(self.root, f) - } else if (isAbsolute(f) || f === '') { - abs = f - } else if (self.changedCwd) { - abs = path.resolve(self.cwd, f) - } else { - abs = path.resolve(f) - } - return abs -} - - -// Return true, if pattern ends with globstar '**', for the accompanying parent directory. -// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents -function isIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - -function childrenIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path)) - }) -} diff --git a/cli/node_modules/rimraf/node_modules/glob/glob.js b/cli/node_modules/rimraf/node_modules/glob/glob.js deleted file mode 100644 index 022d2ac8c..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/glob.js +++ /dev/null @@ -1,752 +0,0 @@ -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern, false) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern, inGlobStar) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// -// If inGlobStar and PREFIX is symlink and points to dir -// set ENTRIES = [] -// else readdir(PREFIX) as ENTRIES -// If fail, END -// -// with ENTRIES -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// // Mark that this entry is a globstar match -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - -module.exports = glob - -var fs = require('fs') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var inherits = require('inherits') -var EE = require('events').EventEmitter -var path = require('path') -var assert = require('assert') -var isAbsolute = require('path-is-absolute') -var globSync = require('./sync.js') -var common = require('./common.js') -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var setopts = common.setopts -var ownProp = common.ownProp -var inflight = require('inflight') -var util = require('util') -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -var once = require('once') - -function glob (pattern, options, cb) { - if (typeof options === 'function') cb = options, options = {} - if (!options) options = {} - - if (options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return globSync(pattern, options) - } - - return new Glob(pattern, options, cb) -} - -glob.sync = globSync -var GlobSync = glob.GlobSync = globSync.GlobSync - -// old api surface -glob.glob = glob - -glob.hasMagic = function (pattern, options_) { - var options = util._extend({}, options_) - options.noprocess = true - - var g = new Glob(pattern, options) - var set = g.minimatch.set - if (set.length > 1) - return true - - for (var j = 0; j < set[0].length; j++) { - if (typeof set[0][j] !== 'string') - return true - } - - return false -} - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - - if (options && options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return new GlobSync(pattern, options) - } - - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb) - - setopts(this, pattern, options) - this._didRealPath = false - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - if (typeof cb === 'function') { - cb = once(cb) - this.on('error', cb) - this.on('end', function (matches) { - cb(null, matches) - }) - } - - var self = this - var n = this.minimatch.set.length - this._processing = 0 - this.matches = new Array(n) - - this._emitQueue = [] - this._processQueue = [] - this.paused = false - - if (this.noprocess) - return this - - if (n === 0) - return done() - - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false, done) - } - - function done () { - --self._processing - if (self._processing <= 0) - self._finish() - } -} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - if (this.aborted) - return - - if (this.realpath && !this._didRealpath) - return this._realpath() - - common.finish(this) - this.emit('end', this.found) -} - -Glob.prototype._realpath = function () { - if (this._didRealpath) - return - - this._didRealpath = true - - var n = this.matches.length - if (n === 0) - return this._finish() - - var self = this - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next) - - function next () { - if (--n === 0) - self._finish() - } -} - -Glob.prototype._realpathSet = function (index, cb) { - var matchset = this.matches[index] - if (!matchset) - return cb() - - var found = Object.keys(matchset) - var self = this - var n = found.length - - if (n === 0) - return cb() - - var set = this.matches[index] = Object.create(null) - found.forEach(function (p, i) { - // If there's a problem with the stat, then it means that - // one or more of the links in the realpath couldn't be - // resolved. just return the abs value in that case. - p = self._makeAbs(p) - fs.realpath(p, self.realpathCache, function (er, real) { - if (!er) - set[real] = true - else if (er.syscall === 'stat') - set[p] = true - else - self.emit('error', er) // srsly wtf right here - - if (--n === 0) { - self.matches[index] = set - cb() - } - }) - }) -} - -Glob.prototype._mark = function (p) { - return common.mark(this, p) -} - -Glob.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit('abort') -} - -Glob.prototype.pause = function () { - if (!this.paused) { - this.paused = true - this.emit('pause') - } -} - -Glob.prototype.resume = function () { - if (this.paused) { - this.emit('resume') - this.paused = false - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0) - this._emitQueue.length = 0 - for (var i = 0; i < eq.length; i ++) { - var e = eq[i] - this._emitMatch(e[0], e[1]) - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0) - this._processQueue.length = 0 - for (var i = 0; i < pq.length; i ++) { - var p = pq[i] - this._processing-- - this._process(p[0], p[1], p[2], p[3]) - } - } - } -} - -Glob.prototype._process = function (pattern, index, inGlobStar, cb) { - assert(this instanceof Glob) - assert(typeof cb === 'function') - - if (this.aborted) - return - - this._processing++ - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]) - return - } - - //console.error('PROCESS %d', this._processing, pattern) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index, cb) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip _processing - if (childrenIgnored(this, read)) - return cb() - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) -} - -Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - -Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return cb() - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return cb() - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return cb() - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - this._process([e].concat(remain), index, inGlobStar, cb) - } - cb() -} - -Glob.prototype._emitMatch = function (index, e) { - if (this.aborted) - return - - if (this.matches[index][e]) - return - - if (isIgnored(this, e)) - return - - if (this.paused) { - this._emitQueue.push([index, e]) - return - } - - var abs = this._makeAbs(e) - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - if (this.mark) - e = this._mark(e) - - this.matches[index][e] = true - - var st = this.statCache[abs] - if (st) - this.emit('stat', e, st) - - this.emit('match', e) -} - -Glob.prototype._readdirInGlobStar = function (abs, cb) { - if (this.aborted) - return - - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false, cb) - - var lstatkey = 'lstat\0' + abs - var self = this - var lstatcb = inflight(lstatkey, lstatcb_) - - if (lstatcb) - fs.lstat(abs, lstatcb) - - function lstatcb_ (er, lstat) { - if (er) - return cb() - - var isSym = lstat.isSymbolicLink() - self.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && !lstat.isDirectory()) { - self.cache[abs] = 'FILE' - cb() - } else - self._readdir(abs, false, cb) - } -} - -Glob.prototype._readdir = function (abs, inGlobStar, cb) { - if (this.aborted) - return - - cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) - if (!cb) - return - - //console.error('RD %j %j', +inGlobStar, abs) - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return cb() - - if (Array.isArray(c)) - return cb(null, c) - } - - var self = this - fs.readdir(abs, readdirCb(this, abs, cb)) -} - -function readdirCb (self, abs, cb) { - return function (er, entries) { - if (er) - self._readdirError(abs, er, cb) - else - self._readdirEntries(abs, entries, cb) - } -} - -Glob.prototype._readdirEntries = function (abs, entries, cb) { - if (this.aborted) - return - - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - return cb(null, entries) -} - -Glob.prototype._readdirError = function (f, er, cb) { - if (this.aborted) - return - - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - this.cache[this._makeAbs(f)] = 'FILE' - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) { - this.emit('error', er) - // If the error is handled, then we abort - // if not, we threw out of here - this.abort() - } - if (!this.silent) - console.error('glob error', er) - break - } - - return cb() -} - -Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - - -Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - //console.error('pgs2', prefix, remain[0], entries) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return cb() - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false, cb) - - var isSym = this.symlinks[abs] - var len = entries.length - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return cb() - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true, cb) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true, cb) - } - - cb() -} - -Glob.prototype._processSimple = function (prefix, index, cb) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var self = this - this._stat(prefix, function (er, exists) { - self._processSimple2(prefix, index, er, exists, cb) - }) -} -Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { - - //console.error('ps2', prefix, exists) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return cb() - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) - cb() -} - -// Returns either 'DIR', 'FILE', or false -Glob.prototype._stat = function (f, cb) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return cb() - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return cb(null, c) - - if (needDir && c === 'FILE') - return cb() - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (stat !== undefined) { - if (stat === false) - return cb(null, stat) - else { - var type = stat.isDirectory() ? 'DIR' : 'FILE' - if (needDir && type === 'FILE') - return cb() - else - return cb(null, type, stat) - } - } - - var self = this - var statcb = inflight('stat\0' + abs, lstatcb_) - if (statcb) - fs.lstat(abs, statcb) - - function lstatcb_ (er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - // If it's a symlink, then treat it as the target, unless - // the target does not exist, then treat it as a file. - return fs.stat(abs, function (er, stat) { - if (er) - self._stat2(f, abs, null, lstat, cb) - else - self._stat2(f, abs, er, stat, cb) - }) - } else { - self._stat2(f, abs, er, lstat, cb) - } - } -} - -Glob.prototype._stat2 = function (f, abs, er, stat, cb) { - if (er) { - this.statCache[abs] = false - return cb() - } - - var needDir = f.slice(-1) === '/' - this.statCache[abs] = stat - - if (abs.slice(-1) === '/' && !stat.isDirectory()) - return cb(null, false, stat) - - var c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c !== 'DIR') - return cb() - - return cb(null, c, stat) -} diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc b/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc deleted file mode 100644 index b7a1550ef..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "env" : { - "node" : true - }, - "rules" : { - "semi": [2, "never"], - "strict": 0, - "quotes": [1, "single", "avoid-escape"], - "no-use-before-define": 0, - "curly": 0, - "no-underscore-dangle": 0, - "no-lonely-if": 1, - "no-unused-vars": [2, {"vars" : "all", "args" : "after-used"}], - "no-mixed-requires": 0, - "space-infix-ops": 0 - } -} diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/LICENSE b/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/LICENSE deleted file mode 100644 index 05eeeb88c..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/README.md b/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/README.md deleted file mode 100644 index 6dc892917..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# inflight - -Add callbacks to requests in flight to avoid async duplication - -## USAGE - -```javascript -var inflight = require('inflight') - -// some request that does some stuff -function req(key, callback) { - // key is any random string. like a url or filename or whatever. - // - // will return either a falsey value, indicating that the - // request for this key is already in flight, or a new callback - // which when called will call all callbacks passed to inflightk - // with the same key - callback = inflight(key, callback) - - // If we got a falsey value back, then there's already a req going - if (!callback) return - - // this is where you'd fetch the url or whatever - // callback is also once()-ified, so it can safely be assigned - // to multiple events etc. First call wins. - setTimeout(function() { - callback(null, key) - }, 100) -} - -// only assigns a single setTimeout -// when it dings, all cbs get called -req('foo', cb1) -req('foo', cb2) -req('foo', cb3) -req('foo', cb4) -``` diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/inflight.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/inflight.js deleted file mode 100644 index 8bc96cbd3..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/inflight.js +++ /dev/null @@ -1,44 +0,0 @@ -var wrappy = require('wrappy') -var reqs = Object.create(null) -var once = require('once') - -module.exports = wrappy(inflight) - -function inflight (key, cb) { - if (reqs[key]) { - reqs[key].push(cb) - return null - } else { - reqs[key] = [cb] - return makeres(key) - } -} - -function makeres (key) { - return once(function RES () { - var cbs = reqs[key] - var len = cbs.length - var args = slice(arguments) - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args) - } - if (cbs.length > len) { - // added more in the interim. - // de-zalgo, just in case, but don't call again. - cbs.splice(0, len) - process.nextTick(function () { - RES.apply(null, args) - }) - } else { - delete reqs[key] - } - }) -} - -function slice (args) { - var length = args.length - var array = [] - - for (var i = 0; i < length; i++) array[i] = args[i] - return array -} diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE b/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE deleted file mode 100644 index 19129e315..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md b/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md deleted file mode 100644 index 98eab2522..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# wrappy - -Callback wrapping utility - -## USAGE - -```javascript -var wrappy = require("wrappy") - -// var wrapper = wrappy(wrapperFunction) - -// make sure a cb is called only once -// See also: http://npm.im/once for this specific use case -var once = wrappy(function (cb) { - var called = false - return function () { - if (called) return - called = true - return cb.apply(this, arguments) - } -}) - -function printBoo () { - console.log('boo') -} -// has some rando property -printBoo.iAmBooPrinter = true - -var onlyPrintOnce = once(printBoo) - -onlyPrintOnce() // prints 'boo' -onlyPrintOnce() // does nothing - -// random property is retained! -assert.equal(onlyPrintOnce.iAmBooPrinter, true) -``` diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json b/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json deleted file mode 100644 index 8145dc8c4..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "wrappy", - "version": "1.0.1", - "description": "Callback wrapping utility", - "main": "wrappy.js", - "directories": { - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "tap": "^0.4.12" - }, - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/wrappy" - }, - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "ISC", - "bugs": { - "url": "https://github.com/npm/wrappy/issues" - }, - "homepage": "https://github.com/npm/wrappy", - "gitHead": "006a8cbac6b99988315834c207896eed71fd069a", - "_id": "wrappy@1.0.1", - "_shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", - "_from": "wrappy@>=1.0.0 <2.0.0", - "_npmVersion": "2.0.0", - "_nodeVersion": "0.10.31", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "dist": { - "shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", - "tarball": "http://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" - }, - "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js deleted file mode 100644 index 5ed0fcdfd..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js +++ /dev/null @@ -1,51 +0,0 @@ -var test = require('tap').test -var wrappy = require('../wrappy.js') - -test('basic', function (t) { - function onceifier (cb) { - var called = false - return function () { - if (called) return - called = true - return cb.apply(this, arguments) - } - } - onceifier.iAmOnce = {} - var once = wrappy(onceifier) - t.equal(once.iAmOnce, onceifier.iAmOnce) - - var called = 0 - function boo () { - t.equal(called, 0) - called++ - } - // has some rando property - boo.iAmBoo = true - - var onlyPrintOnce = once(boo) - - onlyPrintOnce() // prints 'boo' - onlyPrintOnce() // does nothing - t.equal(called, 1) - - // random property is retained! - t.equal(onlyPrintOnce.iAmBoo, true) - - var logs = [] - var logwrap = wrappy(function (msg, cb) { - logs.push(msg + ' wrapping cb') - return function () { - logs.push(msg + ' before cb') - var ret = cb.apply(this, arguments) - logs.push(msg + ' after cb') - } - }) - - var c = logwrap('foo', function () { - t.same(logs, [ 'foo wrapping cb', 'foo before cb' ]) - }) - c() - t.same(logs, [ 'foo wrapping cb', 'foo before cb', 'foo after cb' ]) - - t.end() -}) diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js deleted file mode 100644 index bb7e7d6fc..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js +++ /dev/null @@ -1,33 +0,0 @@ -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper - - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) - } - return ret - } -} diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json b/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json deleted file mode 100644 index a6645bc54..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "inflight", - "version": "1.0.4", - "description": "Add callbacks to requests in flight to avoid async duplication", - "main": "inflight.js", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - }, - "devDependencies": { - "tap": "^0.4.10" - }, - "scripts": { - "test": "tap test.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/inflight" - }, - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/inflight/issues" - }, - "homepage": "https://github.com/isaacs/inflight", - "license": "ISC", - "gitHead": "c7b5531d572a867064d4a1da9e013e8910b7d1ba", - "_id": "inflight@1.0.4", - "_shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a", - "_from": "inflight@>=1.0.4 <2.0.0", - "_npmVersion": "2.1.3", - "_nodeVersion": "0.10.32", - "_npmUser": { - "name": "othiym23", - "email": "ogd@aoaioxxysz.net" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - }, - { - "name": "othiym23", - "email": "ogd@aoaioxxysz.net" - }, - { - "name": "iarna", - "email": "me@re-becca.org" - } - ], - "dist": { - "shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a", - "tarball": "http://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js deleted file mode 100644 index 2bb75b388..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js +++ /dev/null @@ -1,97 +0,0 @@ -var test = require('tap').test -var inf = require('./inflight.js') - - -function req (key, cb) { - cb = inf(key, cb) - if (cb) setTimeout(function () { - cb(key) - cb(key) - }) - return cb -} - -test('basic', function (t) { - var calleda = false - var a = req('key', function (k) { - t.notOk(calleda) - calleda = true - t.equal(k, 'key') - if (calledb) t.end() - }) - t.ok(a, 'first returned cb function') - - var calledb = false - var b = req('key', function (k) { - t.notOk(calledb) - calledb = true - t.equal(k, 'key') - if (calleda) t.end() - }) - - t.notOk(b, 'second should get falsey inflight response') -}) - -test('timing', function (t) { - var expect = [ - 'method one', - 'start one', - 'end one', - 'two', - 'tick', - 'three' - ] - var i = 0 - - function log (m) { - t.equal(m, expect[i], m + ' === ' + expect[i]) - ++i - if (i === expect.length) - t.end() - } - - function method (name, cb) { - log('method ' + name) - process.nextTick(cb) - } - - var one = inf('foo', function () { - log('start one') - var three = inf('foo', function () { - log('three') - }) - if (three) method('three', three) - log('end one') - }) - - method('one', one) - - var two = inf('foo', function () { - log('two') - }) - if (two) method('one', two) - - process.nextTick(log.bind(null, 'tick')) -}) - -test('parameters', function (t) { - t.plan(8) - - var a = inf('key', function (first, second, third) { - t.equal(first, 1) - t.equal(second, 2) - t.equal(third, 3) - }) - t.ok(a, 'first returned cb function') - - var b = inf('key', function (first, second, third) { - t.equal(first, 1) - t.equal(second, 2) - t.equal(third, 3) - }) - t.notOk(b, 'second should get falsey inflight response') - - setTimeout(function () { - a(1, 2, 3) - }) -}) diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/LICENSE b/cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013d6..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/README.md b/cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/README.md deleted file mode 100644 index b1c566585..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Browser-friendly inheritance fully compatible with standard node.js -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). - -This package exports standard `inherits` from node.js `util` module in -node environment, but also provides alternative browser-friendly -implementation through [browser -field](https://gist.github.com/shtylman/4339901). Alternative -implementation is a literal copy of standard one located in standalone -module to avoid requiring of `util`. It also has a shim for old -browsers with no `Object.create` support. - -While keeping you sure you are using standard `inherits` -implementation in node.js environment, it allows bundlers such as -[browserify](https://github.com/substack/node-browserify) to not -include full `util` package to your client code if all you need is -just `inherits` function. It worth, because browser shim for `util` -package is large and `inherits` is often the single function you need -from it. - -It's recommended to use this package instead of -`require('util').inherits` for any code that has chances to be used -not only in node.js but in browser too. - -## usage - -```js -var inherits = require('inherits'); -// then use exactly as the standard one -``` - -## note on version ~1.0 - -Version ~1.0 had completely different motivation and is not compatible -neither with 2.0 nor with standard node.js `inherits`. - -If you are using version ~1.0 and planning to switch to ~2.0, be -careful: - -* new version uses `super_` instead of `super` for referencing - superclass -* new version overwrites current prototype while old one preserves any - existing fields on it diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits.js deleted file mode 100644 index 29f5e24f5..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('util').inherits diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits_browser.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits_browser.js deleted file mode 100644 index c1e78a75e..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits_browser.js +++ /dev/null @@ -1,23 +0,0 @@ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json b/cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json deleted file mode 100644 index a703bddd5..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "inherits", - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "version": "2.0.1", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "main": "./inherits.js", - "browser": "./inherits_browser.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/inherits" - }, - "license": "ISC", - "scripts": { - "test": "node test" - }, - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "_id": "inherits@2.0.1", - "dist": { - "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", - "tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" - }, - "_from": "inherits@>=2.0.0 <3.0.0", - "_npmVersion": "1.3.8", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "directories": {}, - "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/isaacs/inherits" -} diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/test.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/test.js deleted file mode 100644 index fc53012d3..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/inherits/test.js +++ /dev/null @@ -1,25 +0,0 @@ -var inherits = require('./inherits.js') -var assert = require('assert') - -function test(c) { - assert(c.constructor === Child) - assert(c.constructor.super_ === Parent) - assert(Object.getPrototypeOf(c) === Child.prototype) - assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) - assert(c instanceof Child) - assert(c instanceof Parent) -} - -function Child() { - Parent.call(this) - test(this) -} - -function Parent() {} - -inherits(Child, Parent) - -var c = new Child -test(c) - -console.log('ok') diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/LICENSE b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/LICENSE deleted file mode 100644 index 19129e315..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/README.md b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/README.md deleted file mode 100644 index d458bc2e0..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/README.md +++ /dev/null @@ -1,216 +0,0 @@ -# minimatch - -A minimal matching utility. - -[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch) - - -This is the matching library used internally by npm. - -It works by converting glob expressions into JavaScript `RegExp` -objects. - -## Usage - -```javascript -var minimatch = require("minimatch") - -minimatch("bar.foo", "*.foo") // true! -minimatch("bar.foo", "*.bar") // false! -minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! -``` - -## Features - -Supports these glob features: - -* Brace Expansion -* Extended glob matching -* "Globstar" `**` matching - -See: - -* `man sh` -* `man bash` -* `man 3 fnmatch` -* `man 5 gitignore` - -## Minimatch Class - -Create a minimatch object by instanting the `minimatch.Minimatch` class. - -```javascript -var Minimatch = require("minimatch").Minimatch -var mm = new Minimatch(pattern, options) -``` - -### Properties - -* `pattern` The original pattern the minimatch object represents. -* `options` The options supplied to the constructor. -* `set` A 2-dimensional array of regexp or string expressions. - Each row in the - array corresponds to a brace-expanded pattern. Each item in the row - corresponds to a single path-part. For example, the pattern - `{a,b/c}/d` would expand to a set of patterns like: - - [ [ a, d ] - , [ b, c, d ] ] - - If a portion of the pattern doesn't have any "magic" in it - (that is, it's something like `"foo"` rather than `fo*o?`), then it - will be left as a string rather than converted to a regular - expression. - -* `regexp` Created by the `makeRe` method. A single regular expression - expressing the entire pattern. This is useful in cases where you wish - to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. -* `negate` True if the pattern is negated. -* `comment` True if the pattern is a comment. -* `empty` True if the pattern is `""`. - -### Methods - -* `makeRe` Generate the `regexp` member if necessary, and return it. - Will return `false` if the pattern is invalid. -* `match(fname)` Return true if the filename matches the pattern, or - false otherwise. -* `matchOne(fileArray, patternArray, partial)` Take a `/`-split - filename, and match it against a single row in the `regExpSet`. This - method is mainly for internal use, but is exposed so that it can be - used by a glob-walker that needs to avoid excessive filesystem calls. - -All other methods are internal, and will be called as necessary. - -## Functions - -The top-level exported function has a `cache` property, which is an LRU -cache set to store 100 items. So, calling these methods repeatedly -with the same pattern and options will use the same Minimatch object, -saving the cost of parsing it multiple times. - -### minimatch(path, pattern, options) - -Main export. Tests a path against the pattern using the options. - -```javascript -var isJS = minimatch(file, "*.js", { matchBase: true }) -``` - -### minimatch.filter(pattern, options) - -Returns a function that tests its -supplied argument, suitable for use with `Array.filter`. Example: - -```javascript -var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) -``` - -### minimatch.match(list, pattern, options) - -Match against the list of -files, in the style of fnmatch or glob. If nothing is matched, and -options.nonull is set, then return a list containing the pattern itself. - -```javascript -var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) -``` - -### minimatch.makeRe(pattern, options) - -Make a regular expression object from the pattern. - -## Options - -All options are `false` by default. - -### debug - -Dump a ton of stuff to stderr. - -### nobrace - -Do not expand `{a,b}` and `{1..3}` brace sets. - -### noglobstar - -Disable `**` matching against multiple folder names. - -### dot - -Allow patterns to match filenames starting with a period, even if -the pattern does not explicitly have a period in that spot. - -Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` -is set. - -### noext - -Disable "extglob" style patterns like `+(a|b)`. - -### nocase - -Perform a case-insensitive match. - -### nonull - -When a match is not found by `minimatch.match`, return a list containing -the pattern itself if this option is set. When not set, an empty list -is returned if there are no matches. - -### matchBase - -If set, then patterns without slashes will be matched -against the basename of the path if it contains slashes. For example, -`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. - -### nocomment - -Suppress the behavior of treating `#` at the start of a pattern as a -comment. - -### nonegate - -Suppress the behavior of treating a leading `!` character as negation. - -### flipNegate - -Returns from negate expressions the same as if they were not negated. -(Ie, true on a hit, false on a miss.) - - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between minimatch and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then minimatch.match returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/browser.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/browser.js deleted file mode 100644 index 7d0515920..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/browser.js +++ /dev/null @@ -1,1159 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.minimatch = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o any number of characters -var star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} - -function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - // "" only matches "" - if (pattern.trim() === '') return p === '' - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return - - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = console.error - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} - -Minimatch.prototype.braceExpand = braceExpand - -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - if (typeof pattern === 'undefined') { - throw new Error('undefined pattern') - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR - if (pattern === '') return '' - - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var plType - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - - switch (c) { - case '/': - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - plType = stateChar - patternListStack.push({ - type: plType, - start: i - 1, - reStart: re.length - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - - clearStateChar() - hasMagic = true - re += ')' - var pl = patternListStack.pop() - plType = pl.type - // negation is (?:(?!js)[^/]*) - // The others are (?:) - switch (plType) { - case '!': - negativeLists.push(pl) - re += ')[^/]*?)' - pl.reEnd = re.length - break - case '?': - case '+': - case '*': - re += plType - break - case '@': break // the default anyway - } - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } - - clearStateChar() - re += '|' - continue - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + 3) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] - - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - - nlLast += nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? 'i' : '' - var regExp = new RegExp('^' + re + '$', flags) - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) { - this.regexp = false - } - return this.regexp -} - -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = match -function match (f, partial) { - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) - - this.debug('matchOne', file.length, pattern.length) - - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } - - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd - } - - // should be unreachable. - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} - -},{"brace-expansion":2,"path":undefined}],2:[function(require,module,exports){ -var concatMap = require('concat-map'); -var balanced = require('balanced-match'); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str) { - if (!str) - return []; - - var expansions = expand(escapeBraces(str)); - return expansions.filter(identity).map(unescapeBraces); -} - -function identity(e) { - return e; -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = /^(.*,)+(.+)?$/.test(m.body); - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0]).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - expansions.push([pre, N[j], post[k]].join('')) - } - } - - return expansions; -} - - -},{"balanced-match":3,"concat-map":4}],3:[function(require,module,exports){ -module.exports = balanced; -function balanced(a, b, str) { - var bal = 0; - var m = {}; - var ended = false; - - for (var i = 0; i < str.length; i++) { - if (a == str.substr(i, a.length)) { - if (!('start' in m)) m.start = i; - bal++; - } - else if (b == str.substr(i, b.length) && 'start' in m) { - ended = true; - bal--; - if (!bal) { - m.end = i; - m.pre = str.substr(0, m.start); - m.body = (m.end - m.start > 1) - ? str.substring(m.start + a.length, m.end) - : ''; - m.post = str.slice(m.end + b.length); - return m; - } - } - } - - // if we opened more than we closed, find the one we closed - if (bal && ended) { - var start = m.start + a.length; - m = balanced(a, b, str.substr(start)); - if (m) { - m.start += start; - m.end += start; - m.pre = str.slice(0, start) + m.pre; - } - return m; - } -} - -},{}],4:[function(require,module,exports){ -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (Array.isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; -}; - -},{}]},{},[1])(1) -}); \ No newline at end of file diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js deleted file mode 100644 index ec4c05c57..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js +++ /dev/null @@ -1,912 +0,0 @@ -module.exports = minimatch -minimatch.Minimatch = Minimatch - -var path = { sep: '/' } -try { - path = require('path') -} catch (er) {} - -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = require('brace-expansion') - -// any single thing other than / -// don't need to escape / when using new RegExp() -var qmark = '[^/]' - -// * => any number of characters -var star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} - -function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - // "" only matches "" - if (pattern.trim() === '') return p === '' - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return - - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = console.error - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} - -Minimatch.prototype.braceExpand = braceExpand - -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - if (typeof pattern === 'undefined') { - throw new Error('undefined pattern') - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR - if (pattern === '') return '' - - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var plType - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - - switch (c) { - case '/': - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - plType = stateChar - patternListStack.push({ - type: plType, - start: i - 1, - reStart: re.length - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - - clearStateChar() - hasMagic = true - re += ')' - var pl = patternListStack.pop() - plType = pl.type - // negation is (?:(?!js)[^/]*) - // The others are (?:) - switch (plType) { - case '!': - negativeLists.push(pl) - re += ')[^/]*?)' - pl.reEnd = re.length - break - case '?': - case '+': - case '*': - re += plType - break - case '@': break // the default anyway - } - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } - - clearStateChar() - re += '|' - continue - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + 3) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] - - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - - nlLast += nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? 'i' : '' - var regExp = new RegExp('^' + re + '$', flags) - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) { - this.regexp = false - } - return this.regexp -} - -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = match -function match (f, partial) { - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) - - this.debug('matchOne', file.length, pattern.length) - - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } - - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd - } - - // should be unreachable. - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore deleted file mode 100644 index 249bc20eb..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -*.sw* diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.travis.yml b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.travis.yml deleted file mode 100644 index 6e5919de3..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md deleted file mode 100644 index 62bc7bae3..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +++ /dev/null @@ -1,121 +0,0 @@ -# brace-expansion - -[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), -as known from sh/bash, in JavaScript. - -[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) - -[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) - -## Example - -```js -var expand = require('brace-expansion'); - -expand('file-{a,b,c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('-v{,,}') -// => ['-v', '-v', '-v'] - -expand('file{0..2}.jpg') -// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] - -expand('file-{a..c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('file{2..0}.jpg') -// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] - -expand('file{0..4..2}.jpg') -// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] - -expand('file-{a..e..2}.jpg') -// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] - -expand('file{00..10..5}.jpg') -// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] - -expand('{{A..C},{a..c}}') -// => ['A', 'B', 'C', 'a', 'b', 'c'] - -expand('ppp{,config,oe{,conf}}') -// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] -``` - -## API - -```js -var expand = require('brace-expansion'); -``` - -### var expanded = expand(str) - -Return an array of all possible and valid expansions of `str`. If none are -found, `[str]` is returned. - -Valid expansions are: - -```js -/^(.*,)+(.+)?$/ -// {a,b,...} -``` - -A comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -A numeric sequence from `x` to `y` inclusive, with optional increment. -If `x` or `y` start with a leading `0`, all the numbers will be padded -to have equal length. Negative numbers and backwards iteration work too. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -An alphabetic sequence from `x` to `y` inclusive, with optional increment. -`x` and `y` must be exactly one character, and if given, `incr` must be a -number. - -For compatibility reasons, the string `${` is not eligible for brace expansion. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install brace-expansion -``` - -## Contributors - -- [Julian Gruber](https://github.com/juliangruber) -- [Isaac Z. Schlueter](https://github.com/isaacs) - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js deleted file mode 100644 index 60ecfc74d..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +++ /dev/null @@ -1,8 +0,0 @@ -var expand = require('./'); - -console.log(expand('http://any.org/archive{1996..1999}/vol{1..4}/part{a,b,c}.html')); -console.log(expand('http://www.numericals.com/file{1..100..10}.txt')); -console.log(expand('http://www.letters.com/file{a..z..2}.txt')); -console.log(expand('mkdir /usr/local/src/bash/{old,new,dist,bugs}')); -console.log(expand('chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}')); - diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js deleted file mode 100644 index a23104e95..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +++ /dev/null @@ -1,191 +0,0 @@ -var concatMap = require('concat-map'); -var balanced = require('balanced-match'); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str) { - if (!str) - return []; - - return expand(escapeBraces(str), true).map(unescapeBraces); -} - -function identity(e) { - return e; -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = /^(.*,)+(.+)?$/.test(m.body); - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - - return expansions; -} - diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore deleted file mode 100644 index fd4f2b066..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.DS_Store diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml deleted file mode 100644 index cc4dba29d..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile deleted file mode 100644 index fa5da71a6..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +++ /dev/null @@ -1,6 +0,0 @@ - -test: - @node_modules/.bin/tape test/*.js - -.PHONY: test - diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md deleted file mode 100644 index 2aff0ebff..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +++ /dev/null @@ -1,80 +0,0 @@ -# balanced-match - -Match balanced string pairs, like `{` and `}` or `` and ``. - -[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) -[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) - -[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) - -## Example - -Get the first matching pair of braces: - -```js -var balanced = require('balanced-match'); - -console.log(balanced('{', '}', 'pre{in{nested}}post')); -console.log(balanced('{', '}', 'pre{first}between{second}post')); -``` - -The matches are: - -```bash -$ node example.js -{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } -{ start: 3, - end: 9, - pre: 'pre', - body: 'first', - post: 'between{second}post' } -``` - -## API - -### var m = balanced(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -object with those keys: - -* **start** the index of the first match of `a` -* **end** the index of the matching `b` -* **pre** the preamble, `a` and `b` not included -* **body** the match, `a` and `b` not included -* **post** the postscript, `a` and `b` not included - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']`. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install balanced-match -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js deleted file mode 100644 index c02ad348e..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +++ /dev/null @@ -1,5 +0,0 @@ -var balanced = require('./'); - -console.log(balanced('{', '}', 'pre{in{nested}}post')); -console.log(balanced('{', '}', 'pre{first}between{second}post')); - diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js deleted file mode 100644 index d165ae817..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +++ /dev/null @@ -1,38 +0,0 @@ -module.exports = balanced; -function balanced(a, b, str) { - var bal = 0; - var m = {}; - var ended = false; - - for (var i = 0; i < str.length; i++) { - if (a == str.substr(i, a.length)) { - if (!('start' in m)) m.start = i; - bal++; - } - else if (b == str.substr(i, b.length) && 'start' in m) { - ended = true; - bal--; - if (!bal) { - m.end = i; - m.pre = str.substr(0, m.start); - m.body = (m.end - m.start > 1) - ? str.substring(m.start + a.length, m.end) - : ''; - m.post = str.slice(m.end + b.length); - return m; - } - } - } - - // if we opened more than we closed, find the one we closed - if (bal && ended) { - var start = m.start + a.length; - m = balanced(a, b, str.substr(start)); - if (m) { - m.start += start; - m.end += start; - m.pre = str.slice(0, start) + m.pre; - } - return m; - } -} diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json deleted file mode 100644 index ede6efefa..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "balanced-match", - "description": "Match balanced character pairs, like \"{\" and \"}\"", - "version": "0.2.0", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/balanced-match.git" - }, - "homepage": "https://github.com/juliangruber/balanced-match", - "main": "index.js", - "scripts": { - "test": "make test" - }, - "dependencies": {}, - "devDependencies": { - "tape": "~1.1.1" - }, - "keywords": [ - "match", - "regexp", - "test", - "balanced", - "parse" - ], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "gitHead": "ba40ed78e7114a4a67c51da768a100184dead39c", - "bugs": { - "url": "https://github.com/juliangruber/balanced-match/issues" - }, - "_id": "balanced-match@0.2.0", - "_shasum": "38f6730c03aab6d5edbb52bd934885e756d71674", - "_from": "balanced-match@>=0.2.0 <0.3.0", - "_npmVersion": "2.1.8", - "_nodeVersion": "0.10.32", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - } - ], - "dist": { - "shasum": "38f6730c03aab6d5edbb52bd934885e756d71674", - "tarball": "http://registry.npmjs.org/balanced-match/-/balanced-match-0.2.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js deleted file mode 100644 index 36bfd3995..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +++ /dev/null @@ -1,56 +0,0 @@ -var test = require('tape'); -var balanced = require('..'); - -test('balanced', function(t) { - t.deepEqual(balanced('{', '}', 'pre{in{nest}}post'), { - start: 3, - end: 12, - pre: 'pre', - body: 'in{nest}', - post: 'post' - }); - t.deepEqual(balanced('{', '}', '{{{{{{{{{in}post'), { - start: 8, - end: 11, - pre: '{{{{{{{{', - body: 'in', - post: 'post' - }); - t.deepEqual(balanced('{', '}', 'pre{body{in}post'), { - start: 8, - end: 11, - pre: 'pre{body', - body: 'in', - post: 'post' - }); - t.deepEqual(balanced('{', '}', 'pre}{in{nest}}post'), { - start: 4, - end: 13, - pre: 'pre}', - body: 'in{nest}', - post: 'post' - }); - t.deepEqual(balanced('{', '}', 'pre{body}between{body2}post'), { - start: 3, - end: 8, - pre: 'pre', - body: 'body', - post: 'between{body2}post' - }); - t.notOk(balanced('{', '}', 'nope'), 'should be notOk'); - t.deepEqual(balanced('', '', 'preinnestpost'), { - start: 3, - end: 19, - pre: 'pre', - body: 'innest', - post: 'post' - }); - t.deepEqual(balanced('', '', 'pre
    -
    - -JSZip is a javascript library for creating, reading and editing .zip files, with a -lovely and simple API. - -
    -
    - -
    -
    - -

    Example

    - - - - - -
    - -
    -

    Why?

    -
      -
    1. JavaScript today is capable of generating a lot of data. The easiest way to deliver multiple files to your users is in a zip file. Instead of wasting server resources and bandwidth you can get the client to do it for you.
    2. -
    3. Because it's cool!
    4. -
    -
    - -
    -

    Where?

    -

    - Download - from Github -

    - -

    - See also: the test suite -

    -
    -
    -
    -

    Tell me more!

    - -

    Browser support

    - - - - - - - - - - -
    Opera Firefox Safari Chrome Internet Explorer
    Yes Yes Yes Yes Yes
    Tested with the latest versionTested with 3.0 / 3.6 / latest versionTested with the latest versionTested with the latest versionTested with IE 6 / 7 / 8 / 9 / 10
    - -

    While JSZip should work everywhere, the tricky part is to give the zip file to the user.

    - -

    Browser support for data URI scheme with zip

    - - - - - - - - - - -
    Opera Firefox Safari Chrome Internet Explorer
    7.5+ 3.0+ Yes Yes No
    Filename is "default.zip"Filename is random alphanumeric with ".part" extensionFilename is "Unknown" (no extension)Filename is "download.zip" on OSX and Linux, and just "download" on Windows (issue #9)Only supports data URLs for some content. (May be able to use MHTML?)
    - -

    Filename problems

    -

    The biggest issue with JSZip is that the filenames are very awkward, Firefox generates filenames such as a5sZQRsx.zip.part (see bugs 367231 and 532230), and Safari isn't much better with just Unknown. Sadly there is no pure Javascript solution (and working in every browsers) to this. However...

    - -

    Solution-ish: Downloadify

    -

    Downloadify uses a small Flash SWF to download files to a user's computer with a filename that you can choose. Doug Neiner has added the dataType option to allow you to pass a zip for downloading. Follow the Downloadify demo with the following changes:

    -
    -zip = new JSZip();
    -zip.file("Hello.", "hello.txt");
    -Downloadify.create('downloadify',{
    -...
    -  data: function(){
    -    return zip.generate();
    -  },
    -...
    -  dataType: 'base64'
    -});
    - -

    Other solution-ish: Blob URL / FileSaver / FileSaver.js

    -

    With some recent browsers come a new way to download Blobs (a zip file for example) : blob urls. The download attribute on <a> allows you to give the name of the file. Blob urls start to be widely supported but this attribute is currently only supported in Chrome and Firefox (>= 20). See the example. Note : on IE 10/11, using a blob url as a href doesn't seem to work.

    -
    -var blob = zip.generate({type:"blob"});
    -myLink.href = window.URL.createObjectURL(blob);
    -myLink.download = "myFile.zip";
    - -

    An other solution is the FileSaver interface, created (at the time of writing) with saveAs. This works on Chrome and IE >= 10 (not in compatibility view) but not Firefox.

    -
    -var blob = zip.generate({type:"blob"});
    -window.saveAs(blob, "hello.zip");
    - -

    Finally, you can use the polyfill FileSaver.js which will use a FileSaver if present or else a blob url.

    - -

    Usage with Google Gears

    -

    - Franz Buchinger has written a brilliant tutorial on using JSZip with Google Gears (part 2). If you want to let your Gears users download several files at once I really recommend having a look at some of his examples.

    - -

    Reading a zip file from an ajax call

    -

    - When doing an ajax call to get the binary data, the browser will try to interpret the binary as text, corrupting it. The solution is to set the mimetype to 'text/plain; charset=x-user-defined'. This solution works well in all browsers but IE. If you need IE support, please see what is done in the file test/index.html. -

    -

    An other solution is to use a modern browser (supporting xhr2) : setting xhr.type = 'arraybuffer'; will do the trick, JSZip supports ArrayBuffers. Please see the example. - -

    Reading a local zip file (File API)

    -

    - JSZip supports (if available in the browser) the File API : reading a local zip file is simple : new JSZip(readerEvent.target.result);. Please see the complete example for more details. -

    - -

    Documentation

    - -

    new JSZip() or JSZip()

    -
    -
    Description :
    -
    The default constructor.
    -
    Returns :
    -
    A new JSZip.
    -
    -
    -var zip = new JSZip();
    -// same as
    -var zip = JSZip();
    - -

    new JSZip(data [,options]) or JSZip(data [,options])

    -
    -
    Description :
    -
    Create a new JSZip file and load an existing zip file. See the documentation of load() for more details and this for the limitations.
    -
    Parameters :
    -
    data (same types as load()) the content of the zip file to load.
    -
    options (Object) options to pass to the load() method..
    -
    Returns :
    -
    A new JSZip.
    -
    -
    -new JSZip(zipDataFromXHR, {base64:false});
    -// same as
    -JSZip(zipDataFromXHR, {base64:false});
    -// same as
    -var zip = new JSZip();
    -zip.load(zipDataFromXHR, {base64:false});
    - -

    file(name)

    -
    -
    Description :
    -
    Get a file with the specified name.
    -
    Parameters :
    -
    name (String) the name of the file.
    -
    Returns :
    -
    The file if any, null otherwise. The file has the following structure : - -
    -
    -
    -var zip = new JSZip();
    -zip.file("file.txt", "content");
    -
    -zip.file("file.txt").name // "file.txt"
    -zip.file("file.txt").asText() // "content"
    -zip.file("file.txt").options.dir // false
    -
    -// utf8 example
    -var zip = new JSZip(zipFromAjaxWithUTF8);
    -zip.file("amount.txt").asText() // "€15"
    -zip.file("amount.txt").asArrayBuffer() // an ArrayBuffer containing €15
    -zip.file("amount.txt").asUint8Array() // an Uint8Array containing €15
    -
    - -

    file(regex)

    -
    -
    Description :
    -
    Search a file in the current folder and subfolders with a regular expression. The regex is tested against the relative filename.
    -
    Parameters :
    -
    regex (RegExp) the regex to use.
    -
    Returns :
    -
    An array of matching files (an empty array if none matched).
    -
    -
    -var zip = new JSZip();
    -zip.file("file1.txt", "content");
    -zip.file("file2.txt", "content");
    -
    -zip.file(/file/); // array of size 2
    -
    -// example with a relative path :
    -var folder = zip.folder("sub");
    -folder
    -  .file("file3.txt", "content")  // relative path from folder : file3.txt
    -  .file("file4.txt", "content"); // relative path from folder : file4.txt
    -
    -folder.file(/file/);  // array of size 2
    -folder.file(/^file/); // array of size 2, the relative paths start with file
    -
    -// arrays contain objects in the form:
    -// {name: "file2.txt", dir: false, asText : function () {...}, ...}
    - -

    file(name, data [,options])

    -
    -
    Description :
    -
    Add a file to the zip file.
    -
    Parameters :
    -
    name (String) the name of the file.
    -
    data (String/ArrayBuffer/Uint8Array/Buffer) the content of the file.
    -
    options (Object) the options : -
      -
    • base64 (boolean) set to true if the data - is base64 encoded. For example image data from a <canvas> element. - Plain text and HTML do not need this option.
    • -
    • binary (boolean) defaults to true if the data - is base64 encoded, false otherwise. If set to false then - UTF-8 characters will be encoded. If the data is an ArrayBuffer or an Uint8Array, this will be set to true.
    • -
    • date (Date) use it to specify the last modification date. - If not set the current date is used.
    • -
    • compression (String), default null. If set, specifies the file compression method to use. If not, the default file compression is used, cf generate(options).
    • -
    • optimizedBinaryString (boolean), default false. Set it to true if (and only if) the input is a string and - has already been prepared with a 0xFF mask.
    • -
    -
    -
    Returns :
    -
    A JSZip object, for chaining.
    -
    -
    -zip.file("Hello.txt", "Hello World\n");
    -zip.file("smile.gif", "R0lGODdhBQAFAIACAAAAAP/eACwAAAAABQAFAAACCIwPkWerClIBADs=", {base64: true});
    -zip.file("magic.txt", "U2VjcmV0IGNvZGU=", {base64: true, binary: false});
    -zip.file("Xmas.txt", "Ho ho ho !", {date : new Date("December 25, 2007 00:00:01")});
    -zip.file("folder/file.txt", "file in folder");
    -
    -zip.file("animals.txt", "dog,platypus\n").file("people.txt", "james,sebastian\n");
    -
    -// result : Hello.txt, smile.gif, magic.txt, Xmas.txt, animals.txt, people.txt,
    -// folder/, folder/file.txt
    - -

    folder(name)

    -
    -
    Description :
    -
    Add a directory to the zip file.
    -
    Parameters :
    -
    name (String) the name of the directory.
    -
    Returns :
    -
    a new JSZip (for chaining), with the new folder as root.
    -
    -
    -zip.folder("images");
    -zip.folder("css").file("style.css", "body {background: #FF0000}");
    -// or specify an absolute path (using forward slashes)
    -zip.file("css/font.css", "body {font-family: sans-serif}")
    -
    -// result : images/, css/, css/style.css, css/font.css
    - -

    folder(regex)

    -
    -
    Description :
    -
    Search a subdirectory.
    -
    Search a subdirectory in the current directory with a regular expression. The regex is tested against the relative path.
    -
    Parameters :
    -
    regex (RegExp) the regex to use.
    -
    Returns :
    -
    An array of matching folders (an empty array if none matched).
    -
    -
    -var zip = new JSZip();
    -zip.folder("home/Pierre/videos");
    -zip.folder("home/Pierre/photos");
    -zip.folder("home/Jean/videos");
    -zip.folder("home/Jean/photos");
    -
    -zip.folder(/videos/); // array of size 2
    -
    -zip.folder("home/Jean").folder(/^vid/); // array of 1
    - -

    remove(name)

    -

    Delete a file or folder.

    -
    -
    Description :
    -
    Delete a file or folder (recursively).
    -
    Parameters :
    -
    name (String) the name of the file/folder to delete.
    -
    Returns :
    -
    The current JSZip object.
    -
    -
    -var zip = new JSZip();
    -zip.file("Hello.txt", "Hello World\n");
    -zip.file("temp.txt", "nothing").remove("temp.txt");
    -// result : Hello.txt
    -
    -zip.folder("css").file("style.css", "body {background: #FF0000}");
    -zip.remove("Hello.txt").remove("css");
    -//result : empty zip
    - -

    generate(options)

    -
    -
    Description :
    -
    Generates the complete zip file.
    -
    Parameters :
    -
    options (Object) the options to generate the zip file : -
      -
    • base64 (boolean) deprecated, use "type" instead. false to get the result as a raw byte string. - Default : true, encode as base64.
    • -
    • compression (String) the default file compression method to use. "STORE" (no compression) by default, - you can use "DEFLATE" or write your own.
    • -
    • type (String) the type of zip to return. The possible values are : -
        -
      • base64 (default) : the result will be a string, the binary in a base64 form.
      • -
      • string : the result will be a string in "binary" form, 1 byte per char.
      • -
      • uint8array : the result will be a Uint8Array containing the zip. This requires a compatible browser.
      • -
      • arraybuffer : the result will be a ArrayBuffer containing the zip. This requires a compatible browser.
      • -
      • blob : the result will be a Blob containing the zip. This requires a compatible browser.
      • -
      • nodebuffer : the result will be a nodejs Buffer containing the zip. This requires nodejs.
      • -
      -
    • -
    -
    -
    Returns :
    -
    The generated zip file.
    -
    - HTML5 note : when using type = "uint8array", "arraybuffer" or "blob", be sure to check if the browser supports it (you can use JSZip.support). - This method will throw an exception otherwise. -
    -content = zip.generate(); // base64
    -location.href="data:application/zip;base64,"+content;
    - -
    -var blobLink = document.getElementById('blobLink');
    -blobLink.download = "hello.zip";
    -blobLink.href = window.URL.createObjectURL(
    -   zip.generate({type:"blob"})
    -);
    - -
    -content = zip.generate({type:"string"});
    -for (var c = 0; c < content.length; c++) {
    -    console.log(content.charCodeAt(c));
    -    // do other things
    -}
    - -

    load(data, options)

    -
    -
    Description :
    -
    Read an existing zip and merge the data in the current JSZip object. This technique has some limitations, see below.
    -
    Parameters :
    -
    data (String/ArrayBuffer/Uint8Array/Buffer) the zip file
    -
    options (Object) the options to load the zip file : -
      -
    • base64 (boolean) true if the data is base64 encoded, false for binary. Default : false.
    • -
    • checkCRC32 (boolean) true if the read data should be checked against its CRC32. Default : false.
    • -
    • optimizedBinaryString (boolean), default false. Set it to true if (and only if) the input is a string and - has already been prepared with a 0xFF mask.
    • -
    -
    -
    Returns :
    -
    The current JSZip object.
    -
    -
    -var zip = new JSZip();
    -zip.load(zipDataFromXHR);
    - -
    Zip features supported by this method
    -
      -
    • Compression (DEFLATE supported)
    • -
    • zip with data descriptor
    • -
    • ZIP64
    • -
    • UTF8 in file name, UTF8 in file content
    • -
    -
    Zip features not (yet) supported
    -
      -
    • password protected zip
    • -
    • multi-volume zip
    • -
    - -

    filter(predicate)

    -
    -
    Description :
    -
    Filter nested files/folders with the specified function.
    -
    Parameters :
    -
    predicate (function) the predicate to use : function (relativePath, file) {...} It takes 2 arguments : the relative path and the file. -
      -
    • relativePath (String) The filename and its path, reliatively to the current folder.
    • -
    • file (Object) The file being tested. Like the result of file(name), the file has the form {name:"...", options:{...}, asText:function,...}.
    • -
    • Return true if the file should be included, false otherwise.
    • -
    -
    -
    Returns :
    -
    An array of matching elements.
    -
    -
    -var zip = new JSZip().folder("dir");
    -zip.file("readme.txt", "content");
    -zip.filter(function (relativePath, file){
    -  // relativePath == "readme.txt"
    -  // file = {name:"dir/readme.txt",options:{...},asText:function}
    -  return true/false;
    -});
    - -

    JSZip.support

    -

    - If the browser supports them, JSZip can take advantage of some new features : ArrayBuffer, Blob, Uint8Array. - To know if JSZip can use them, you can check the JSZip.support object. It contains the following - properties : -

      -
    • arraybuffer : true if JSZip can read and generate ArrayBuffer, false otherwise.
    • -
    • uint8array : true if JSZip can read and generate Uint8Array, false otherwise.
    • -
    • blob : true if JSZip can read and generate Blob, false otherwise.
    • -
    • nodebuffer : true if JSZip can read and generate nodejs Buffer, false otherwise.
    • -
    -

    - -

    Loading zip files, limitations

    -

    Not supported features

    -

    - All the features of zip files are not supported. - Classic zip files will work but encrypted zip, multi-volume, etc are not supported - and the load() method will throw an Error. -

    -

    ZIP64 and 32bit integers

    -

    - ZIP64 files can be loaded, but only if the zip file is not "too big". ZIP64 uses 64bits integers - but Javascript represents all numbers as - - 64-bit double precision IEEE 754 floating point numbers (see section 8.5). - So, we have 53bits for integers and - - bitwise operations treat everything as 32bits. - So if all the 64bits integers can fit into 32 bits integers, everything will be fine. If - it's not the case, you will have other problems anyway (see next limitation). -

    -

    Performance issues

    -

    - An other limitation comes from the browser (and the machine running the browser). - A compressed zip file of 10MB is "easily" opened by firefox/chrome/opera/IE10 but - will crash older IE. Also keep in mind that strings in javascript are encoded in UTF-16 : - a 10MB ascii text file will take 20MB of memory. -

    -

    - If you're having performance issues, please consider the following : -

      -
    • Don't use IE < 10. Everything is better with WebGL support.
    • -
    • - If you load the file from an ajax call, ask your XHR an ArrayBuffer. - Loading a string is asking for troubles. -
    • -
    • - If you want to get the content of an ASCII file as a string, consider using - asBinary() instead of asText(). The transformation - "binary string" -> "utf string" is a consuming process. -
    • -
    -

    -

    The output zip will differ from the input zip

    -

    - Reading and generating a zip file won't give you back the same file. - Some data are discarded (file metadata) and other are added (subfolders). -

    - -

    Changelog

    - -

    Migrating Guide

    -

    From 2.0.0 to 2.1.0

    -

    -

      -
    • The packaging changed : instead of loading jszip.js, jszip-load.js, jszip-inflate.js, jszip-deflate.js, just include dist/jszip.js or dist/jszip.min.js
    • -
    -

    -

    From 1.x to 2.x

    -

    -

      -
    • JSZipBase64 has been renamed to JSZip.base64.
    • -
    • - The data attribute doesn't exist anymore : - use the getters asText(), asBinary(), etc -
    • -
    • - The compression/decompression methods now give their input type with the - compressInputType and uncompressInputType attributes. -
    - - Example for the data attribute : -
    // before
    -zip.file("test.txt").data;
    -zip.files["test.txt"].data;
    -zip.file("image.png").data;
    -zip.files["image.png"].data;
    -
    -// after
    -zip.file("test.txt").asText();
    -zip.files["test.txt"].asText();
    -zip.file("image.png").asBinary();
    -zip.files["image.png"].asBinary();
    -      

    -
    - -
    -

    Anything else?

    - -

    License

    -

    - MIT license or GPLv3 -

    - -

    Version

    -

    2.2.1

    -

    See the migrating guide when updating the library!

    - -

    Todo

    -
      -
    • Set correct version needed to extract
    • -
    • Set correct version made by
    • -
    • Set internal and external file attributes in central directory
    • -
    • Allow setting of attributes/other info in add() options object
    • -
    • Look into using MHTML for IE
    • -
    - -

    Who?

    -

    Stuart Knightley, with contributions from:

    - - -

    Contact and bugs

    - -
    -======= -var content = zip.generate({type:"blob"}); -// see FileSaver.js -saveAs(content, "example.zip"); - - ->>>>>>> Rewrite the documentation - -
    -
    - -

    Installation

    - -

    - With npm : npm install jszip -

    -

    - With bower : bower install Stuk/jszip -

    -

    - With component : component install Stuk/jszip -

    -

    - Manually : download JSZip - and include the file dist/jszip.js or dist/jszip.min.js -

    -
    -

    - Installed ? Great ! You can now check our - guides and examples ! -

    -
    -
    innestpost'), { - start: 7, - end: 23, - pre: 'pre', - body: 'innest', - post: 'post' - }); - t.end(); -}); diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml deleted file mode 100644 index f1d0f13c8..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE deleted file mode 100644 index ee27ba4b4..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown deleted file mode 100644 index 408f70a1b..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +++ /dev/null @@ -1,62 +0,0 @@ -concat-map -========== - -Concatenative mapdashery. - -[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) - -[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) - -example -======= - -``` js -var concatMap = require('concat-map'); -var xs = [ 1, 2, 3, 4, 5, 6 ]; -var ys = concatMap(xs, function (x) { - return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; -}); -console.dir(ys); -``` - -*** - -``` -[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] -``` - -methods -======= - -``` js -var concatMap = require('concat-map') -``` - -concatMap(xs, fn) ------------------ - -Return an array of concatenated elements by calling `fn(x, i)` for each element -`x` and each index `i` in the array `xs`. - -When `fn(x, i)` returns an array, its result will be concatenated with the -result array. If `fn(x, i)` returns anything else, that value will be pushed -onto the end of the result array. - -install -======= - -With [npm](http://npmjs.org) do: - -``` -npm install concat-map -``` - -license -======= - -MIT - -notes -===== - -This module was written while sitting high above the ground in a tree. diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js deleted file mode 100644 index 33656217b..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +++ /dev/null @@ -1,6 +0,0 @@ -var concatMap = require('../'); -var xs = [ 1, 2, 3, 4, 5, 6 ]; -var ys = concatMap(xs, function (x) { - return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; -}); -console.dir(ys); diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js deleted file mode 100644 index b29a7812e..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json deleted file mode 100644 index b51613809..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "concat-map", - "description": "concatenative mapdashery", - "version": "0.0.1", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-concat-map.git" - }, - "main": "index.js", - "keywords": [ - "concat", - "concatMap", - "map", - "functional", - "higher-order" - ], - "directories": { - "example": "example", - "test": "test" - }, - "scripts": { - "test": "tape test/*.js" - }, - "devDependencies": { - "tape": "~2.4.0" - }, - "license": "MIT", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "testling": { - "files": "test/*.js", - "browsers": { - "ie": [ - 6, - 7, - 8, - 9 - ], - "ff": [ - 3.5, - 10, - 15 - ], - "chrome": [ - 10, - 22 - ], - "safari": [ - 5.1 - ], - "opera": [ - 12 - ] - } - }, - "bugs": { - "url": "https://github.com/substack/node-concat-map/issues" - }, - "homepage": "https://github.com/substack/node-concat-map", - "_id": "concat-map@0.0.1", - "dist": { - "shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", - "tarball": "http://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - }, - "_from": "concat-map@0.0.1", - "_npmVersion": "1.3.21", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", - "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js deleted file mode 100644 index fdbd7022f..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +++ /dev/null @@ -1,39 +0,0 @@ -var concatMap = require('../'); -var test = require('tape'); - -test('empty or not', function (t) { - var xs = [ 1, 2, 3, 4, 5, 6 ]; - var ixes = []; - var ys = concatMap(xs, function (x, ix) { - ixes.push(ix); - return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; - }); - t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); - t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); - t.end(); -}); - -test('always something', function (t) { - var xs = [ 'a', 'b', 'c', 'd' ]; - var ys = concatMap(xs, function (x) { - return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; - }); - t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); - t.end(); -}); - -test('scalars', function (t) { - var xs = [ 'a', 'b', 'c', 'd' ]; - var ys = concatMap(xs, function (x) { - return x === 'b' ? [ 'B', 'B', 'B' ] : x; - }); - t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); - t.end(); -}); - -test('undefs', function (t) { - var xs = [ 'a', 'b', 'c', 'd' ]; - var ys = concatMap(xs, function () {}); - t.same(ys, [ undefined, undefined, undefined, undefined ]); - t.end(); -}); diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json deleted file mode 100644 index 5f1866c8b..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "brace-expansion", - "description": "Brace expansion as known from sh/bash", - "version": "1.1.0", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/brace-expansion.git" - }, - "homepage": "https://github.com/juliangruber/brace-expansion", - "main": "index.js", - "scripts": { - "test": "tape test/*.js", - "gentest": "bash test/generate.sh" - }, - "dependencies": { - "balanced-match": "^0.2.0", - "concat-map": "0.0.1" - }, - "devDependencies": { - "tape": "^3.0.3" - }, - "keywords": [], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "gitHead": "b5fa3b1c74e5e2dba2d0efa19b28335641bc1164", - "bugs": { - "url": "https://github.com/juliangruber/brace-expansion/issues" - }, - "_id": "brace-expansion@1.1.0", - "_shasum": "c9b7d03c03f37bc704be100e522b40db8f6cfcd9", - "_from": "brace-expansion@>=1.0.0 <2.0.0", - "_npmVersion": "2.1.10", - "_nodeVersion": "0.10.32", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - } - ], - "dist": { - "shasum": "c9b7d03c03f37bc704be100e522b40db8f6cfcd9", - "tarball": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js deleted file mode 100644 index 5fe2b8ad4..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js +++ /dev/null @@ -1,32 +0,0 @@ -var test = require('tape'); -var expand = require('..'); -var fs = require('fs'); -var resfile = __dirname + '/bash-results.txt'; -var cases = fs.readFileSync(resfile, 'utf8').split('><><><><'); - -// throw away the EOF marker -cases.pop() - -test('matches bash expansions', function(t) { - cases.forEach(function(testcase) { - var set = testcase.split('\n'); - var pattern = set.shift(); - var actual = expand(pattern); - - // If it expands to the empty string, then it's actually - // just nothing, but Bash is a singly typed language, so - // "nothing" is the same as "". - if (set.length === 1 && set[0] === '') { - set = [] - } else { - // otherwise, strip off the [] that were added so that - // "" expansions would be preserved properly. - set = set.map(function (s) { - return s.replace(/^\[|\]$/g, '') - }) - } - - t.same(actual, set, pattern); - }); - t.end(); -}) diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt deleted file mode 100644 index 958148d26..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt +++ /dev/null @@ -1,1075 +0,0 @@ -A{b,{d,e},{f,g}}Z -[AbZ] -[AdZ] -[AeZ] -[AfZ] -[AgZ]><><><><><><><\{a,b}{{a,b},a,b} -[{a,b}a] -[{a,b}b] -[{a,b}a] -[{a,b}b]><><><><{{a,b} -[{a] -[{b]><><><><{a,b}} -[a}] -[b}]><><><><{,} -><><><><><><><{,}b -[b] -[b]><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><{-01..5} -[-01] -[000] -[001] -[002] -[003] -[004] -[005]><><><><{-05..100..5} -[-05] -[000] -[005] -[010] -[015] -[020] -[025] -[030] -[035] -[040] -[045] -[050] -[055] -[060] -[065] -[070] -[075] -[080] -[085] -[090] -[095] -[100]><><><><{-05..100} -[-05] -[-04] -[-03] -[-02] -[-01] -[000] -[001] -[002] -[003] -[004] -[005] -[006] -[007] -[008] -[009] -[010] -[011] -[012] -[013] -[014] -[015] -[016] -[017] -[018] -[019] -[020] -[021] -[022] -[023] -[024] -[025] -[026] -[027] -[028] -[029] -[030] -[031] -[032] -[033] -[034] -[035] -[036] -[037] -[038] -[039] -[040] -[041] -[042] -[043] -[044] -[045] -[046] -[047] -[048] -[049] -[050] -[051] -[052] -[053] -[054] -[055] -[056] -[057] -[058] -[059] -[060] -[061] -[062] -[063] -[064] -[065] -[066] -[067] -[068] -[069] -[070] -[071] -[072] -[073] -[074] -[075] -[076] -[077] -[078] -[079] -[080] -[081] -[082] -[083] -[084] -[085] -[086] -[087] -[088] -[089] -[090] -[091] -[092] -[093] -[094] -[095] -[096] -[097] -[098] -[099] -[100]><><><><{0..5..2} -[0] -[2] -[4]><><><><{0001..05..2} -[0001] -[0003] -[0005]><><><><{0001..-5..2} -[0001] -[-001] -[-003] -[-005]><><><><{0001..-5..-2} -[0001] -[-001] -[-003] -[-005]><><><><{0001..5..-2} -[0001] -[0003] -[0005]><><><><{01..5} -[01] -[02] -[03] -[04] -[05]><><><><{1..05} -[01] -[02] -[03] -[04] -[05]><><><><{1..05..3} -[01] -[04]><><><><{05..100} -[005] -[006] -[007] -[008] -[009] -[010] -[011] -[012] -[013] -[014] -[015] -[016] -[017] -[018] -[019] -[020] -[021] -[022] -[023] -[024] -[025] -[026] -[027] -[028] -[029] -[030] -[031] -[032] -[033] -[034] -[035] -[036] -[037] -[038] -[039] -[040] -[041] -[042] -[043] -[044] -[045] -[046] -[047] -[048] -[049] -[050] -[051] -[052] -[053] -[054] -[055] -[056] -[057] -[058] -[059] -[060] -[061] -[062] -[063] -[064] -[065] -[066] -[067] -[068] -[069] -[070] -[071] -[072] -[073] -[074] -[075] -[076] -[077] -[078] -[079] -[080] -[081] -[082] -[083] -[084] -[085] -[086] -[087] -[088] -[089] -[090] -[091] -[092] -[093] -[094] -[095] -[096] -[097] -[098] -[099] -[100]><><><><{0a..0z} -[{0a..0z}]><><><><{a,b\}c,d} -[a] -[b}c] -[d]><><><><{a,b{c,d} -[{a,bc] -[{a,bd]><><><><{a,b}c,d} -[ac,d}] -[bc,d}]><><><><{a..F} -[a] -[`] -[_] -[^] -[]] -[] -[[] -[Z] -[Y] -[X] -[W] -[V] -[U] -[T] -[S] -[R] -[Q] -[P] -[O] -[N] -[M] -[L] -[K] -[J] -[I] -[H] -[G] -[F]><><><><{A..f} -[A] -[B] -[C] -[D] -[E] -[F] -[G] -[H] -[I] -[J] -[K] -[L] -[M] -[N] -[O] -[P] -[Q] -[R] -[S] -[T] -[U] -[V] -[W] -[X] -[Y] -[Z] -[[] -[] -[]] -[^] -[_] -[`] -[a] -[b] -[c] -[d] -[e] -[f]><><><><{a..Z} -[a] -[`] -[_] -[^] -[]] -[] -[[] -[Z]><><><><{A..z} -[A] -[B] -[C] -[D] -[E] -[F] -[G] -[H] -[I] -[J] -[K] -[L] -[M] -[N] -[O] -[P] -[Q] -[R] -[S] -[T] -[U] -[V] -[W] -[X] -[Y] -[Z] -[[] -[] -[]] -[^] -[_] -[`] -[a] -[b] -[c] -[d] -[e] -[f] -[g] -[h] -[i] -[j] -[k] -[l] -[m] -[n] -[o] -[p] -[q] -[r] -[s] -[t] -[u] -[v] -[w] -[x] -[y] -[z]><><><><{z..A} -[z] -[y] -[x] -[w] -[v] -[u] -[t] -[s] -[r] -[q] -[p] -[o] -[n] -[m] -[l] -[k] -[j] -[i] -[h] -[g] -[f] -[e] -[d] -[c] -[b] -[a] -[`] -[_] -[^] -[]] -[] -[[] -[Z] -[Y] -[X] -[W] -[V] -[U] -[T] -[S] -[R] -[Q] -[P] -[O] -[N] -[M] -[L] -[K] -[J] -[I] -[H] -[G] -[F] -[E] -[D] -[C] -[B] -[A]><><><><{Z..a} -[Z] -[[] -[] -[]] -[^] -[_] -[`] -[a]><><><><{a..F..2} -[a] -[_] -[]] -[[] -[Y] -[W] -[U] -[S] -[Q] -[O] -[M] -[K] -[I] -[G]><><><><{A..f..02} -[A] -[C] -[E] -[G] -[I] -[K] -[M] -[O] -[Q] -[S] -[U] -[W] -[Y] -[[] -[]] -[_] -[a] -[c] -[e]><><><><{a..Z..5} -[a] -[]><><><><><><><{A..z..10} -[A] -[K] -[U] -[_] -[i] -[s]><><><><{z..A..-2} -[z] -[x] -[v] -[t] -[r] -[p] -[n] -[l] -[j] -[h] -[f] -[d] -[b] -[`] -[^] -[] -[Z] -[X] -[V] -[T] -[R] -[P] -[N] -[L] -[J] -[H] -[F] -[D] -[B]><><><><{Z..a..20} -[Z]><><><><{a{,b} -[{a] -[{ab]><><><><{a},b} -[a}] -[b]><><><><{x,y{,}g} -[x] -[yg] -[yg]><><><><{x,y{}g} -[x] -[y{}g]><><><><{{a,b} -[{a] -[{b]><><><><{{a,b},c} -[a] -[b] -[c]><><><><{{a,b}c} -[{ac}] -[{bc}]><><><><{{a,b},} -[a] -[b]><><><><><><><{{a,b},}c -[ac] -[bc] -[c]><><><><{{a,b}.} -[{a.}] -[{b.}]><><><><{{a,b}} -[{a}] -[{b}]><><><><><><>< -><><><><{-10..00} -[-10] -[-09] -[-08] -[-07] -[-06] -[-05] -[-04] -[-03] -[-02] -[-01] -[000]><><><><{a,\\{a,b}c} -[a] -[\ac] -[\bc]><><><><{a,\{a,b}c} -[ac}] -[{ac}] -[bc}]><><><><><><><{-10.\.00} -[{-10..00}]><><><><><><><><><><{l,n,m}xyz -[lxyz] -[nxyz] -[mxyz]><><><><{abc\,def} -[{abc,def}]><><><><{abc} -[{abc}]><><><><{x\,y,\{abc\},trie} -[x,y] -[{abc}] -[trie]><><><><{} -[{}]><><><><} -[}]><><><><{ -[{]><><><><><><><{1..10} -[1] -[2] -[3] -[4] -[5] -[6] -[7] -[8] -[9] -[10]><><><><{0..10,braces} -[0..10] -[braces]><><><><{{0..10},braces} -[0] -[1] -[2] -[3] -[4] -[5] -[6] -[7] -[8] -[9] -[10] -[braces]><><><><><><><{3..3} -[3]><><><><><><><{10..1} -[10] -[9] -[8] -[7] -[6] -[5] -[4] -[3] -[2] -[1]><><><><{10..1}y -[10y] -[9y] -[8y] -[7y] -[6y] -[5y] -[4y] -[3y] -[2y] -[1y]><><><><><><><{a..f} -[a] -[b] -[c] -[d] -[e] -[f]><><><><{f..a} -[f] -[e] -[d] -[c] -[b] -[a]><><><><{a..A} -[a] -[`] -[_] -[^] -[]] -[] -[[] -[Z] -[Y] -[X] -[W] -[V] -[U] -[T] -[S] -[R] -[Q] -[P] -[O] -[N] -[M] -[L] -[K] -[J] -[I] -[H] -[G] -[F] -[E] -[D] -[C] -[B] -[A]><><><><{A..a} -[A] -[B] -[C] -[D] -[E] -[F] -[G] -[H] -[I] -[J] -[K] -[L] -[M] -[N] -[O] -[P] -[Q] -[R] -[S] -[T] -[U] -[V] -[W] -[X] -[Y] -[Z] -[[] -[] -[]] -[^] -[_] -[`] -[a]><><><><{f..f} -[f]><><><><{1..f} -[{1..f}]><><><><{f..1} -[{f..1}]><><><><{-1..-10} -[-1] -[-2] -[-3] -[-4] -[-5] -[-6] -[-7] -[-8] -[-9] -[-10]><><><><{-20..0} -[-20] -[-19] -[-18] -[-17] -[-16] -[-15] -[-14] -[-13] -[-12] -[-11] -[-10] -[-9] -[-8] -[-7] -[-6] -[-5] -[-4] -[-3] -[-2] -[-1] -[0]><><><><><><><><><><{klklkl}{1,2,3} -[{klklkl}1] -[{klklkl}2] -[{klklkl}3]><><><><{1..10..2} -[1] -[3] -[5] -[7] -[9]><><><><{-1..-10..2} -[-1] -[-3] -[-5] -[-7] -[-9]><><><><{-1..-10..-2} -[-1] -[-3] -[-5] -[-7] -[-9]><><><><{10..1..-2} -[10] -[8] -[6] -[4] -[2]><><><><{10..1..2} -[10] -[8] -[6] -[4] -[2]><><><><{1..20..2} -[1] -[3] -[5] -[7] -[9] -[11] -[13] -[15] -[17] -[19]><><><><{1..20..20} -[1]><><><><{100..0..5} -[100] -[95] -[90] -[85] -[80] -[75] -[70] -[65] -[60] -[55] -[50] -[45] -[40] -[35] -[30] -[25] -[20] -[15] -[10] -[5] -[0]><><><><{100..0..-5} -[100] -[95] -[90] -[85] -[80] -[75] -[70] -[65] -[60] -[55] -[50] -[45] -[40] -[35] -[30] -[25] -[20] -[15] -[10] -[5] -[0]><><><><{a..z} -[a] -[b] -[c] -[d] -[e] -[f] -[g] -[h] -[i] -[j] -[k] -[l] -[m] -[n] -[o] -[p] -[q] -[r] -[s] -[t] -[u] -[v] -[w] -[x] -[y] -[z]><><><><{a..z..2} -[a] -[c] -[e] -[g] -[i] -[k] -[m] -[o] -[q] -[s] -[u] -[w] -[y]><><><><{z..a..-2} -[z] -[x] -[v] -[t] -[r] -[p] -[n] -[l] -[j] -[h] -[f] -[d] -[b]><><><><{2147483645..2147483649} -[2147483645] -[2147483646] -[2147483647] -[2147483648] -[2147483649]><><><><{10..0..2} -[10] -[8] -[6] -[4] -[2] -[0]><><><><{10..0..-2} -[10] -[8] -[6] -[4] -[2] -[0]><><><><{-50..-0..5} -[-50] -[-45] -[-40] -[-35] -[-30] -[-25] -[-20] -[-15] -[-10] -[-5] -[0]><><><><{1..10.f} -[{1..10.f}]><><><><{1..ff} -[{1..ff}]><><><><{1..10..ff} -[{1..10..ff}]><><><><{1.20..2} -[{1.20..2}]><><><><{1..20..f2} -[{1..20..f2}]><><><><{1..20..2f} -[{1..20..2f}]><><><><{1..2f..2} -[{1..2f..2}]><><><><{1..ff..2} -[{1..ff..2}]><><><><{1..ff} -[{1..ff}]><><><><{1..f} -[{1..f}]><><><><{1..0f} -[{1..0f}]><><><><{1..10f} -[{1..10f}]><><><><{1..10.f} -[{1..10.f}]><><><><{1..10.f} -[{1..10.f}]><><><>< \ No newline at end of file diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt deleted file mode 100644 index e5161c3da..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt +++ /dev/null @@ -1,182 +0,0 @@ -# skip quotes for now -# "{x,x}" -# {"x,x"} -# {x","x} -# '{a,b}{{a,b},a,b}' -A{b,{d,e},{f,g}}Z -PRE-{a,b}{{a,b},a,b}-POST -\\{a,b}{{a,b},a,b} -{{a,b} -{a,b}} -{,} -a{,} -{,}b -a{,}b -a{b}c -a{1..5}b -a{01..5}b -a{-01..5}b -a{-01..5..3}b -a{001..9}b -a{b,c{d,e},{f,g}h}x{y,z -a{b,c{d,e},{f,g}h}x{y,z\\} -a{b,c{d,e},{f,g}h}x{y,z} -a{b{c{d,e}f{x,y{{g}h -a{b{c{d,e}f{x,y{}g}h -a{b{c{d,e}f{x,y}}g}h -a{b{c{d,e}f}g}h -a{{x,y},z}b -f{x,y{g,z}}h -f{x,y{{g,z}}h -f{x,y{{g,z}}h} -f{x,y{{g}h -f{x,y{{g}}h -f{x,y{}g}h -z{a,b{,c}d -z{a,b},c}d -{-01..5} -{-05..100..5} -{-05..100} -{0..5..2} -{0001..05..2} -{0001..-5..2} -{0001..-5..-2} -{0001..5..-2} -{01..5} -{1..05} -{1..05..3} -{05..100} -{0a..0z} -{a,b\\}c,d} -{a,b{c,d} -{a,b}c,d} -{a..F} -{A..f} -{a..Z} -{A..z} -{z..A} -{Z..a} -{a..F..2} -{A..f..02} -{a..Z..5} -d{a..Z..5}b -{A..z..10} -{z..A..-2} -{Z..a..20} -{a{,b} -{a},b} -{x,y{,}g} -{x,y{}g} -{{a,b} -{{a,b},c} -{{a,b}c} -{{a,b},} -X{{a,b},}X -{{a,b},}c -{{a,b}.} -{{a,b}} -X{a..#}X -# this next one is an empty string - -{-10..00} -# Need to escape slashes in here for reasons i guess. -{a,\\\\{a,b}c} -{a,\\{a,b}c} -a,\\{b,c} -{-10.\\.00} -#### bash tests/braces.tests -# Note that some tests are edited out because some features of -# bash are intentionally not supported in this brace expander. -ff{c,b,a} -f{d,e,f}g -{l,n,m}xyz -{abc\\,def} -{abc} -{x\\,y,\\{abc\\},trie} -# not impementing back-ticks obviously -# XXXX\\{`echo a b c | tr ' ' ','`\\} -{} -# We only ever have to worry about parsing a single argument, -# not a command line, so spaces have a different meaning than bash. -# { } -} -{ -abcd{efgh -# spaces -# foo {1,2} bar -# not impementing back-ticks obviously -# `zecho foo {1,2} bar` -# $(zecho foo {1,2} bar) -# ${var} is not a variable here, like it is in bash. omit. -# foo{bar,${var}.} -# foo{bar,${var}} -# isaacs: skip quotes for now -# "${var}"{x,y} -# $var{x,y} -# ${var}{x,y} -# new sequence brace operators -{1..10} -# this doesn't work yet -{0..10,braces} -# but this does -{{0..10},braces} -x{{0..10},braces}y -{3..3} -x{3..3}y -{10..1} -{10..1}y -x{10..1}y -{a..f} -{f..a} -{a..A} -{A..a} -{f..f} -# mixes are incorrectly-formed brace expansions -{1..f} -{f..1} -# spaces -# 0{1..9} {10..20} -# do negative numbers work? -{-1..-10} -{-20..0} -# weirdly-formed brace expansions -- fixed in post-bash-3.1 -a-{b{d,e}}-c -a-{bdef-{g,i}-c -# isaacs: skip quotes for now -# {"klklkl"}{1,2,3} -# isaacs: this is a valid test, though -{klklkl}{1,2,3} -# {"x,x"} -{1..10..2} -{-1..-10..2} -{-1..-10..-2} -{10..1..-2} -{10..1..2} -{1..20..2} -{1..20..20} -{100..0..5} -{100..0..-5} -{a..z} -{a..z..2} -{z..a..-2} -# make sure brace expansion handles ints > 2**31 - 1 using intmax_t -{2147483645..2147483649} -# unwanted zero-padding -- fixed post-bash-4.0 -{10..0..2} -{10..0..-2} -{-50..-0..5} -# bad -{1..10.f} -{1..ff} -{1..10..ff} -{1.20..2} -{1..20..f2} -{1..20..2f} -{1..2f..2} -{1..ff..2} -{1..ff} -{1..f} -{1..0f} -{1..10f} -{1..10.f} -{1..10.f} diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js deleted file mode 100644 index 3fcc185a7..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js +++ /dev/null @@ -1,9 +0,0 @@ -var test = require('tape'); -var expand = require('..'); - -test('ignores ${', function(t) { - t.deepEqual(expand('${1..3}'), ['${1..3}']); - t.deepEqual(expand('${a,b}${c,d}'), ['${a,b}${c,d}']); - t.deepEqual(expand('x${a,b}x${c,d}x'), ['x${a,b}x${c,d}x']); - t.end(); -}); diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js deleted file mode 100644 index e429121ea..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js +++ /dev/null @@ -1,10 +0,0 @@ -var test = require('tape'); -var expand = require('..'); - -test('empty option', function(t) { - t.deepEqual(expand('-v{,,,,}'), [ - '-v', '-v', '-v', '-v', '-v' - ]); - t.end(); -}); - diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh deleted file mode 100644 index e040e664d..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -set -e - -# Bash 4.3 because of arbitrary need to pick a single standard. - -if [ "${BASH_VERSINFO[0]}" != "4" ] || [ "${BASH_VERSINFO[1]}" != "3" ]; then - echo "this script requires bash 4.3" >&2 - exit 1 -fi - -CDPATH= cd "$(dirname "$0")" - -js='require("./")(process.argv[1]).join(" ")' - -cat cases.txt | \ - while read case; do - if [ "${case:0:1}" = "#" ]; then - continue; - fi; - b="$($BASH -c 'for c in '"$case"'; do echo ["$c"]; done')" - echo "$case" - echo -n "$b><><><><"; - done > bash-results.txt diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js deleted file mode 100644 index 8d434c23d..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('tape'); -var expand = require('..'); - -test('negative increment', function(t) { - t.deepEqual(expand('{3..1}'), ['3', '2', '1']); - t.deepEqual(expand('{10..8}'), ['10', '9', '8']); - t.deepEqual(expand('{10..08}'), ['10', '09', '08']); - t.deepEqual(expand('{c..a}'), ['c', 'b', 'a']); - - t.deepEqual(expand('{4..0..2}'), ['4', '2', '0']); - t.deepEqual(expand('{4..0..-2}'), ['4', '2', '0']); - t.deepEqual(expand('{e..a..2}'), ['e', 'c', 'a']); - - t.end(); -}); diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js deleted file mode 100644 index 0862dc51f..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js +++ /dev/null @@ -1,16 +0,0 @@ -var test = require('tape'); -var expand = require('..'); - -test('nested', function(t) { - t.deepEqual(expand('{a,b{1..3},c}'), [ - 'a', 'b1', 'b2', 'b3', 'c' - ]); - t.deepEqual(expand('{{A..Z},{a..z}}'), - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('') - ); - t.deepEqual(expand('ppp{,config,oe{,conf}}'), [ - 'ppp', 'pppconfig', 'pppoe', 'pppoeconf' - ]); - t.end(); -}); - diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js deleted file mode 100644 index c00ad155f..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js +++ /dev/null @@ -1,10 +0,0 @@ -var test = require('tape'); -var expand = require('..'); - -test('order', function(t) { - t.deepEqual(expand('a{d,c,b}e'), [ - 'ade', 'ace', 'abe' - ]); - t.end(); -}); - diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js deleted file mode 100644 index e4158775f..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('tape'); -var expand = require('..'); - -test('pad', function(t) { - t.deepEqual(expand('{9..11}'), [ - '9', '10', '11' - ]); - t.deepEqual(expand('{09..11}'), [ - '09', '10', '11' - ]); - t.end(); -}); - diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js deleted file mode 100644 index 3038fba74..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js +++ /dev/null @@ -1,7 +0,0 @@ -var test = require('tape'); -var expand = require('..'); - -test('x and y of same type', function(t) { - t.deepEqual(expand('{a..9}'), ['{a..9}']); - t.end(); -}); diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js deleted file mode 100644 index f73a9579a..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js +++ /dev/null @@ -1,50 +0,0 @@ -var test = require('tape'); -var expand = require('..'); - -test('numeric sequences', function(t) { - t.deepEqual(expand('a{1..2}b{2..3}c'), [ - 'a1b2c', 'a1b3c', 'a2b2c', 'a2b3c' - ]); - t.deepEqual(expand('{1..2}{2..3}'), [ - '12', '13', '22', '23' - ]); - t.end(); -}); - -test('numeric sequences with step count', function(t) { - t.deepEqual(expand('{0..8..2}'), [ - '0', '2', '4', '6', '8' - ]); - t.deepEqual(expand('{1..8..2}'), [ - '1', '3', '5', '7' - ]); - t.end(); -}); - -test('numeric sequence with negative x / y', function(t) { - t.deepEqual(expand('{3..-2}'), [ - '3', '2', '1', '0', '-1', '-2' - ]); - t.end(); -}); - -test('alphabetic sequences', function(t) { - t.deepEqual(expand('1{a..b}2{b..c}3'), [ - '1a2b3', '1a2c3', '1b2b3', '1b2c3' - ]); - t.deepEqual(expand('{a..b}{b..c}'), [ - 'ab', 'ac', 'bb', 'bc' - ]); - t.end(); -}); - -test('alphabetic sequences with step count', function(t) { - t.deepEqual(expand('{a..k..2}'), [ - 'a', 'c', 'e', 'g', 'i', 'k' - ]); - t.deepEqual(expand('{b..k..2}'), [ - 'b', 'd', 'f', 'h', 'j' - ]); - t.end(); -}); - diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json b/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json deleted file mode 100644 index 3dc6beb49..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "name": "minimatch", - "description": "a glob matcher in javascript", - "version": "2.0.10", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "main": "minimatch.js", - "scripts": { - "posttest": "standard minimatch.js test/*.js", - "test": "tap test/*.js", - "prepublish": "browserify -o browser.js -e minimatch.js -s minimatch --bare" - }, - "engines": { - "node": "*" - }, - "dependencies": { - "brace-expansion": "^1.0.0" - }, - "devDependencies": { - "browserify": "^9.0.3", - "standard": "^3.7.2", - "tap": "^1.2.0" - }, - "license": "ISC", - "files": [ - "minimatch.js", - "browser.js" - ], - "gitHead": "6afb85f0c324b321f76a38df81891e562693e257", - "bugs": { - "url": "https://github.com/isaacs/minimatch/issues" - }, - "homepage": "https://github.com/isaacs/minimatch#readme", - "_id": "minimatch@2.0.10", - "_shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7", - "_from": "minimatch@>=2.0.1 <3.0.0", - "_npmVersion": "3.1.0", - "_nodeVersion": "2.2.1", - "_npmUser": { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - "dist": { - "shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7", - "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/once/LICENSE b/cli/node_modules/rimraf/node_modules/glob/node_modules/once/LICENSE deleted file mode 100644 index 19129e315..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/once/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/once/README.md b/cli/node_modules/rimraf/node_modules/glob/node_modules/once/README.md deleted file mode 100644 index a2981ea07..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/once/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# once - -Only call a function once. - -## usage - -```javascript -var once = require('once') - -function load (file, cb) { - cb = once(cb) - loader.load('file') - loader.once('load', cb) - loader.once('error', cb) -} -``` - -Or add to the Function.prototype in a responsible way: - -```javascript -// only has to be done once -require('once').proto() - -function load (file, cb) { - cb = cb.once() - loader.load('file') - loader.once('load', cb) - loader.once('error', cb) -} -``` - -Ironically, the prototype feature makes this module twice as -complicated as necessary. - -To check whether you function has been called, use `fn.called`. Once the -function is called for the first time the return value of the original -function is saved in `fn.value` and subsequent calls will continue to -return this value. - -```javascript -var once = require('once') - -function load (cb) { - cb = once(cb) - var stream = createStream() - stream.once('data', cb) - stream.once('end', function () { - if (!cb.called) cb(new Error('not found')) - }) -} -``` diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE b/cli/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE deleted file mode 100644 index 19129e315..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md b/cli/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md deleted file mode 100644 index 98eab2522..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# wrappy - -Callback wrapping utility - -## USAGE - -```javascript -var wrappy = require("wrappy") - -// var wrapper = wrappy(wrapperFunction) - -// make sure a cb is called only once -// See also: http://npm.im/once for this specific use case -var once = wrappy(function (cb) { - var called = false - return function () { - if (called) return - called = true - return cb.apply(this, arguments) - } -}) - -function printBoo () { - console.log('boo') -} -// has some rando property -printBoo.iAmBooPrinter = true - -var onlyPrintOnce = once(printBoo) - -onlyPrintOnce() // prints 'boo' -onlyPrintOnce() // does nothing - -// random property is retained! -assert.equal(onlyPrintOnce.iAmBooPrinter, true) -``` diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json b/cli/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json deleted file mode 100644 index 8145dc8c4..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "wrappy", - "version": "1.0.1", - "description": "Callback wrapping utility", - "main": "wrappy.js", - "directories": { - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "tap": "^0.4.12" - }, - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/wrappy" - }, - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "ISC", - "bugs": { - "url": "https://github.com/npm/wrappy/issues" - }, - "homepage": "https://github.com/npm/wrappy", - "gitHead": "006a8cbac6b99988315834c207896eed71fd069a", - "_id": "wrappy@1.0.1", - "_shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", - "_from": "wrappy@>=1.0.0 <2.0.0", - "_npmVersion": "2.0.0", - "_nodeVersion": "0.10.31", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "dist": { - "shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", - "tarball": "http://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" - }, - "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js deleted file mode 100644 index 5ed0fcdfd..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +++ /dev/null @@ -1,51 +0,0 @@ -var test = require('tap').test -var wrappy = require('../wrappy.js') - -test('basic', function (t) { - function onceifier (cb) { - var called = false - return function () { - if (called) return - called = true - return cb.apply(this, arguments) - } - } - onceifier.iAmOnce = {} - var once = wrappy(onceifier) - t.equal(once.iAmOnce, onceifier.iAmOnce) - - var called = 0 - function boo () { - t.equal(called, 0) - called++ - } - // has some rando property - boo.iAmBoo = true - - var onlyPrintOnce = once(boo) - - onlyPrintOnce() // prints 'boo' - onlyPrintOnce() // does nothing - t.equal(called, 1) - - // random property is retained! - t.equal(onlyPrintOnce.iAmBoo, true) - - var logs = [] - var logwrap = wrappy(function (msg, cb) { - logs.push(msg + ' wrapping cb') - return function () { - logs.push(msg + ' before cb') - var ret = cb.apply(this, arguments) - logs.push(msg + ' after cb') - } - }) - - var c = logwrap('foo', function () { - t.same(logs, [ 'foo wrapping cb', 'foo before cb' ]) - }) - c() - t.same(logs, [ 'foo wrapping cb', 'foo before cb', 'foo after cb' ]) - - t.end() -}) diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js deleted file mode 100644 index bb7e7d6fc..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +++ /dev/null @@ -1,33 +0,0 @@ -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper - - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) - } - return ret - } -} diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/once/once.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/once/once.js deleted file mode 100644 index 2e1e721bf..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/once/once.js +++ /dev/null @@ -1,21 +0,0 @@ -var wrappy = require('wrappy') -module.exports = wrappy(once) - -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) -}) - -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) - } - f.called = false - return f -} diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/once/package.json b/cli/node_modules/rimraf/node_modules/glob/node_modules/once/package.json deleted file mode 100644 index 8f46e507c..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/once/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "once", - "version": "1.3.2", - "description": "Run a function exactly one time", - "main": "once.js", - "directories": { - "test": "test" - }, - "dependencies": { - "wrappy": "1" - }, - "devDependencies": { - "tap": "~0.3.0" - }, - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/once.git" - }, - "keywords": [ - "once", - "function", - "one", - "single" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "ISC", - "gitHead": "e35eed5a7867574e2bf2260a1ba23970958b22f2", - "bugs": { - "url": "https://github.com/isaacs/once/issues" - }, - "homepage": "https://github.com/isaacs/once#readme", - "_id": "once@1.3.2", - "_shasum": "d8feeca93b039ec1dcdee7741c92bdac5e28081b", - "_from": "once@>=1.3.0 <2.0.0", - "_npmVersion": "2.9.1", - "_nodeVersion": "2.0.0", - "_npmUser": { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - "dist": { - "shasum": "d8feeca93b039ec1dcdee7741c92bdac5e28081b", - "tarball": "http://registry.npmjs.org/once/-/once-1.3.2.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "_resolved": "https://registry.npmjs.org/once/-/once-1.3.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/once/test/once.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/once/test/once.js deleted file mode 100644 index c618360df..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/once/test/once.js +++ /dev/null @@ -1,23 +0,0 @@ -var test = require('tap').test -var once = require('../once.js') - -test('once', function (t) { - var f = 0 - function fn (g) { - t.equal(f, 0) - f ++ - return f + g + this - } - fn.ownProperty = {} - var foo = once(fn) - t.equal(fn.ownProperty, foo.ownProperty) - t.notOk(foo.called) - for (var i = 0; i < 1E3; i++) { - t.same(f, i === 0 ? 0 : 1) - var g = foo.call(1, 1) - t.ok(foo.called) - t.same(g, 3) - t.same(f, 1) - } - t.end() -}) diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/index.js b/cli/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/index.js deleted file mode 100644 index 19f103f90..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/index.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -function posix(path) { - return path.charAt(0) === '/'; -}; - -function win32(path) { - // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path); - var device = result[1] || ''; - var isUnc = !!device && device.charAt(1) !== ':'; - - // UNC paths are always absolute - return !!result[2] || isUnc; -}; - -module.exports = process.platform === 'win32' ? win32 : posix; -module.exports.posix = posix; -module.exports.win32 = win32; diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/license b/cli/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json b/cli/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json deleted file mode 100644 index 301658ffd..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "path-is-absolute", - "version": "1.0.0", - "description": "Node.js 0.12 path.isAbsolute() ponyfill", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/sindresorhus/path-is-absolute" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "node test.js" - }, - "files": [ - "index.js" - ], - "keywords": [ - "path", - "paths", - "file", - "dir", - "absolute", - "isabsolute", - "is-absolute", - "built-in", - "util", - "utils", - "core", - "ponyfill", - "polyfill", - "shim", - "is", - "detect", - "check" - ], - "gitHead": "7a76a0c9f2263192beedbe0a820e4d0baee5b7a1", - "bugs": { - "url": "https://github.com/sindresorhus/path-is-absolute/issues" - }, - "homepage": "https://github.com/sindresorhus/path-is-absolute", - "_id": "path-is-absolute@1.0.0", - "_shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912", - "_from": "path-is-absolute@>=1.0.0 <2.0.0", - "_npmVersion": "2.5.1", - "_nodeVersion": "0.12.0", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "dist": { - "shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912", - "tarball": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/readme.md b/cli/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/readme.md deleted file mode 100644 index cdf94f430..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/readme.md +++ /dev/null @@ -1,51 +0,0 @@ -# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) - -> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) ponyfill - -> Ponyfill: A polyfill that doesn't overwrite the native method - - -## Install - -``` -$ npm install --save path-is-absolute -``` - - -## Usage - -```js -var pathIsAbsolute = require('path-is-absolute'); - -// Linux -pathIsAbsolute('/home/foo'); -//=> true - -// Windows -pathIsAbsolute('C:/Users/'); -//=> true - -// Any OS -pathIsAbsolute.posix('/home/foo'); -//=> true -``` - - -## API - -See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). - -### pathIsAbsolute(path) - -### pathIsAbsolute.posix(path) - -The Posix specific version. - -### pathIsAbsolute.win32(path) - -The Windows specific version. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/cli/node_modules/rimraf/node_modules/glob/package.json b/cli/node_modules/rimraf/node_modules/glob/package.json deleted file mode 100644 index 3fa7b78b5..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "name": "glob", - "description": "a little globber", - "version": "5.0.14", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "main": "glob.js", - "files": [ - "glob.js", - "sync.js", - "common.js" - ], - "engines": { - "node": "*" - }, - "dependencies": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^2.0.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "devDependencies": { - "mkdirp": "0", - "rimraf": "^2.2.8", - "tap": "^1.1.4", - "tick": "0.0.6" - }, - "scripts": { - "prepublish": "npm run benchclean", - "profclean": "rm -f v8.log profile.txt", - "test": "tap test/*.js --cov", - "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js", - "bench": "bash benchmark.sh", - "prof": "bash prof.sh && cat profile.txt", - "benchclean": "node benchclean.js" - }, - "license": "ISC", - "gitHead": "c47d4514f8f93f23b589afa18947306116bfe40f", - "bugs": { - "url": "https://github.com/isaacs/node-glob/issues" - }, - "homepage": "https://github.com/isaacs/node-glob#readme", - "_id": "glob@5.0.14", - "_shasum": "a811d507acb605441edd6cd2622a3c6f06cc00e1", - "_from": "glob@>=5.0.14 <6.0.0", - "_npmVersion": "3.1.0", - "_nodeVersion": "2.2.1", - "_npmUser": { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - "dist": { - "shasum": "a811d507acb605441edd6cd2622a3c6f06cc00e1", - "tarball": "http://registry.npmjs.org/glob/-/glob-5.0.14.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/glob/-/glob-5.0.14.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/rimraf/node_modules/glob/sync.js b/cli/node_modules/rimraf/node_modules/glob/sync.js deleted file mode 100644 index 09883d2ce..000000000 --- a/cli/node_modules/rimraf/node_modules/glob/sync.js +++ /dev/null @@ -1,460 +0,0 @@ -module.exports = globSync -globSync.GlobSync = GlobSync - -var fs = require('fs') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var Glob = require('./glob.js').Glob -var util = require('util') -var path = require('path') -var assert = require('assert') -var isAbsolute = require('path-is-absolute') -var common = require('./common.js') -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var setopts = common.setopts -var ownProp = common.ownProp -var childrenIgnored = common.childrenIgnored - -function globSync (pattern, options) { - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - return new GlobSync(pattern, options).found -} - -function GlobSync (pattern, options) { - if (!pattern) - throw new Error('must provide pattern') - - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options) - - setopts(this, pattern, options) - - if (this.noprocess) - return this - - var n = this.minimatch.set.length - this.matches = new Array(n) - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false) - } - this._finish() -} - -GlobSync.prototype._finish = function () { - assert(this instanceof GlobSync) - if (this.realpath) { - var self = this - this.matches.forEach(function (matchset, index) { - var set = self.matches[index] = Object.create(null) - for (var p in matchset) { - try { - p = self._makeAbs(p) - var real = fs.realpathSync(p, self.realpathCache) - set[real] = true - } catch (er) { - if (er.syscall === 'stat') - set[self._makeAbs(p)] = true - else - throw er - } - } - }) - } - common.finish(this) -} - - -GlobSync.prototype._process = function (pattern, index, inGlobStar) { - assert(this instanceof GlobSync) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // See if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip processing - if (childrenIgnored(this, read)) - return - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar) -} - - -GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar) - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix.slice(-1) !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this.matches[index][e] = true - } - // This was the last one, and no stats were needed - return - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) - newPattern = [prefix, e] - else - newPattern = [e] - this._process(newPattern.concat(remain), index, inGlobStar) - } -} - - -GlobSync.prototype._emitMatch = function (index, e) { - var abs = this._makeAbs(e) - if (this.mark) - e = this._mark(e) - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[this._makeAbs(e)] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - if (this.stat) - this._stat(e) -} - - -GlobSync.prototype._readdirInGlobStar = function (abs) { - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false) - - var entries - var lstat - var stat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - // lstat failed, doesn't exist - return null - } - - var isSym = lstat.isSymbolicLink() - this.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && !lstat.isDirectory()) - this.cache[abs] = 'FILE' - else - entries = this._readdir(abs, false) - - return entries -} - -GlobSync.prototype._readdir = function (abs, inGlobStar) { - var entries - - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return null - - if (Array.isArray(c)) - return c - } - - try { - return this._readdirEntries(abs, fs.readdirSync(abs)) - } catch (er) { - this._readdirError(abs, er) - return null - } -} - -GlobSync.prototype._readdirEntries = function (abs, entries) { - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - - // mark and cache dir-ness - return entries -} - -GlobSync.prototype._readdirError = function (f, er) { - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - this.cache[this._makeAbs(f)] = 'FILE' - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) - throw er - if (!this.silent) - console.error('glob error', er) - break - } -} - -GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { - - var entries = this._readdir(abs, inGlobStar) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false) - - var len = entries.length - var isSym = this.symlinks[abs] - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true) - } -} - -GlobSync.prototype._processSimple = function (prefix, index) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var exists = this._stat(prefix) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this.matches[index][prefix] = true -} - -// Returns either 'DIR', 'FILE', or false -GlobSync.prototype._stat = function (f) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return false - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return c - - if (needDir && c === 'FILE') - return false - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (!stat) { - var lstat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - return false - } - - if (lstat.isSymbolicLink()) { - try { - stat = fs.statSync(abs) - } catch (er) { - stat = lstat - } - } else { - stat = lstat - } - } - - this.statCache[abs] = stat - - var c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c !== 'DIR') - return false - - return c -} - -GlobSync.prototype._mark = function (p) { - return common.mark(this, p) -} - -GlobSync.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} diff --git a/cli/node_modules/rimraf/package.json b/cli/node_modules/rimraf/package.json deleted file mode 100644 index 6dfcaaacd..000000000 --- a/cli/node_modules/rimraf/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "rimraf", - "version": "2.4.2", - "main": "rimraf.js", - "description": "A deep deletion module for node (like `rm -rf`)", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "ISC", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/rimraf.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "bin": { - "rimraf": "./bin.js" - }, - "dependencies": { - "glob": "^5.0.14" - }, - "files": [ - "LICENSE", - "README.md", - "bin.js", - "rimraf.js" - ], - "devDependencies": { - "mkdirp": "^0.5.1", - "tap": "^1.3.1" - }, - "gitHead": "4359e9d3b3c0f26e6abe3139a00b93337f1689d7", - "bugs": { - "url": "https://github.com/isaacs/rimraf/issues" - }, - "homepage": "https://github.com/isaacs/rimraf#readme", - "_id": "rimraf@2.4.2", - "_shasum": "ab4f39b08b72eae07c3d9fe9f4831aebfc9f431d", - "_from": "rimraf@>=2.2.8 <3.0.0", - "_npmVersion": "3.1.0", - "_nodeVersion": "2.2.1", - "_npmUser": { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - "dist": { - "shasum": "ab4f39b08b72eae07c3d9fe9f4831aebfc9f431d", - "tarball": "http://registry.npmjs.org/rimraf/-/rimraf-2.4.2.tgz" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.4.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/rimraf/rimraf.js b/cli/node_modules/rimraf/rimraf.js deleted file mode 100644 index 447705ac9..000000000 --- a/cli/node_modules/rimraf/rimraf.js +++ /dev/null @@ -1,333 +0,0 @@ -module.exports = rimraf -rimraf.sync = rimrafSync - -var assert = require("assert") -var path = require("path") -var fs = require("fs") -var glob = require("glob") - -var globOpts = { - nosort: true, - nocomment: true, - nonegate: true, - silent: true -} - -// for EMFILE handling -var timeout = 0 - -var isWindows = (process.platform === "win32") - -function defaults (options) { - var methods = [ - 'unlink', - 'chmod', - 'stat', - 'lstat', - 'rmdir', - 'readdir' - ] - methods.forEach(function(m) { - options[m] = options[m] || fs[m] - m = m + 'Sync' - options[m] = options[m] || fs[m] - }) - - options.maxBusyTries = options.maxBusyTries || 3 - options.emfileWait = options.emfileWait || 1000 - options.disableGlob = options.disableGlob || false -} - -function rimraf (p, options, cb) { - if (typeof options === 'function') { - cb = options - options = {} - } - - assert(p, 'rimraf: missing path') - assert.equal(typeof p, 'string', 'rimraf: path should be a string') - assert(options, 'rimraf: missing options') - assert.equal(typeof options, 'object', 'rimraf: options should be object') - assert.equal(typeof cb, 'function', 'rimraf: callback function required') - - defaults(options) - - var busyTries = 0 - var errState = null - var n = 0 - - if (options.disableGlob || !glob.hasMagic(p)) - return afterGlob(null, [p]) - - fs.lstat(p, function (er, stat) { - if (!er) - return afterGlob(null, [p]) - - glob(p, globOpts, afterGlob) - }) - - function next (er) { - errState = errState || er - if (--n === 0) - cb(errState) - } - - function afterGlob (er, results) { - if (er) - return cb(er) - - n = results.length - if (n === 0) - return cb() - - results.forEach(function (p) { - rimraf_(p, options, function CB (er) { - if (er) { - if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY") && - busyTries < options.maxBusyTries) { - busyTries ++ - var time = busyTries * 100 - // try again, with the same exact callback as this one. - return setTimeout(function () { - rimraf_(p, options, CB) - }, time) - } - - // this one won't happen if graceful-fs is used. - if (er.code === "EMFILE" && timeout < options.emfileWait) { - return setTimeout(function () { - rimraf_(p, options, CB) - }, timeout ++) - } - - // already gone - if (er.code === "ENOENT") er = null - } - - timeout = 0 - next(er) - }) - }) - } -} - -// Two possible strategies. -// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR -// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR -// -// Both result in an extra syscall when you guess wrong. However, there -// are likely far more normal files in the world than directories. This -// is based on the assumption that a the average number of files per -// directory is >= 1. -// -// If anyone ever complains about this, then I guess the strategy could -// be made configurable somehow. But until then, YAGNI. -function rimraf_ (p, options, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - - // sunos lets the root user unlink directories, which is... weird. - // so we have to lstat here and make sure it's not a dir. - options.lstat(p, function (er, st) { - if (er && er.code === "ENOENT") - return cb(null) - - if (st && st.isDirectory()) - return rmdir(p, options, er, cb) - - options.unlink(p, function (er) { - if (er) { - if (er.code === "ENOENT") - return cb(null) - if (er.code === "EPERM") - return (isWindows) - ? fixWinEPERM(p, options, er, cb) - : rmdir(p, options, er, cb) - if (er.code === "EISDIR") - return rmdir(p, options, er, cb) - } - return cb(er) - }) - }) -} - -function fixWinEPERM (p, options, er, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - if (er) - assert(er instanceof Error) - - options.chmod(p, 666, function (er2) { - if (er2) - cb(er2.code === "ENOENT" ? null : er) - else - options.stat(p, function(er3, stats) { - if (er3) - cb(er3.code === "ENOENT" ? null : er) - else if (stats.isDirectory()) - rmdir(p, options, er, cb) - else - options.unlink(p, cb) - }) - }) -} - -function fixWinEPERMSync (p, options, er) { - assert(p) - assert(options) - if (er) - assert(er instanceof Error) - - try { - options.chmodSync(p, 666) - } catch (er2) { - if (er2.code === "ENOENT") - return - else - throw er - } - - try { - var stats = options.statSync(p) - } catch (er3) { - if (er3.code === "ENOENT") - return - else - throw er - } - - if (stats.isDirectory()) - rmdirSync(p, options, er) - else - options.unlinkSync(p) -} - -function rmdir (p, options, originalEr, cb) { - assert(p) - assert(options) - if (originalEr) - assert(originalEr instanceof Error) - assert(typeof cb === 'function') - - // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) - // if we guessed wrong, and it's not a directory, then - // raise the original error. - options.rmdir(p, function (er) { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, options, cb) - else if (er && er.code === "ENOTDIR") - cb(originalEr) - else - cb(er) - }) -} - -function rmkids(p, options, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - - options.readdir(p, function (er, files) { - if (er) - return cb(er) - var n = files.length - if (n === 0) - return options.rmdir(p, cb) - var errState - files.forEach(function (f) { - rimraf(path.join(p, f), options, function (er) { - if (errState) - return - if (er) - return cb(errState = er) - if (--n === 0) - options.rmdir(p, cb) - }) - }) - }) -} - -// this looks simpler, and is strictly *faster*, but will -// tie up the JavaScript thread and fail on excessively -// deep directory trees. -function rimrafSync (p, options) { - options = options || {} - defaults(options) - - assert(p, 'rimraf: missing path') - assert.equal(typeof p, 'string', 'rimraf: path should be a string') - assert(options, 'rimraf: missing options') - assert.equal(typeof options, 'object', 'rimraf: options should be object') - - var results - - if (options.disableGlob || !glob.hasMagic(p)) { - results = [p] - } else { - try { - fs.lstatSync(p) - results = [p] - } catch (er) { - results = glob.sync(p, globOpts) - } - } - - if (!results.length) - return - - for (var i = 0; i < results.length; i++) { - var p = results[i] - - try { - var st = options.lstatSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - } - - try { - // sunos lets the root user unlink directories, which is... weird. - if (st && st.isDirectory()) - rmdirSync(p, options, null) - else - options.unlinkSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) - if (er.code !== "EISDIR") - throw er - rmdirSync(p, options, er) - } - } -} - -function rmdirSync (p, options, originalEr) { - assert(p) - assert(options) - if (originalEr) - assert(originalEr instanceof Error) - - try { - options.rmdirSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "ENOTDIR") - throw originalEr - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p, options) - } -} - -function rmkidsSync (p, options) { - assert(p) - assert(options) - options.readdirSync(p).forEach(function (f) { - rimrafSync(path.join(p, f), options) - }) - options.rmdirSync(p, options) -} diff --git a/cli/node_modules/shortid/.npmignore b/cli/node_modules/shortid/.npmignore deleted file mode 100644 index 294641462..000000000 --- a/cli/node_modules/shortid/.npmignore +++ /dev/null @@ -1,7 +0,0 @@ -/templates/ -/examples/ -/test/ -/.idea/ -/browser/ -.jshintrc -.travis.yml diff --git a/cli/node_modules/shortid/Gruntfile.js b/cli/node_modules/shortid/Gruntfile.js deleted file mode 100644 index dc5e7112e..000000000 --- a/cli/node_modules/shortid/Gruntfile.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -module.exports = function (grunt) { - - require('time-grunt')(grunt); - - grunt.initConfig({ - browserify: { - browser: { - src: [ require('./package.json').main ], - dest: './browser/shortid.js' - }, - tests: { - src: [ - './test/**/*.test.js' - ], - dest: './browser/shortid.test.js' - } - }, - - open: { - test: { - path: './test/index.html', - app: 'Google Chrome' - } - }, - - mochaTest: { - notify: { - src: 'test/**/*.test.js', - options: { - reporter: 'spec', - timeout: 50000 - } - } - }, - - jshint: { - options: { - jshintrc: '.jshintrc' - }, - all: [ - 'Gruntfile.js', - 'lib/**/*.js', - 'tests/*' - ] - } - - }); - require('load-grunt-tasks')(grunt); - - grunt.registerTask('build', [ - 'browserify' - ]); - - grunt.registerTask('test', [ - 'jshint', - 'mochaTest' - ]); - - grunt.registerTask('default', [ - 'build', - 'test' - ]); -}; diff --git a/cli/node_modules/shortid/LICENSE b/cli/node_modules/shortid/LICENSE deleted file mode 100644 index c472d1ece..000000000 --- a/cli/node_modules/shortid/LICENSE +++ /dev/null @@ -1,34 +0,0 @@ -Copyright (c) Dylan Greene -All rights reserved. - -MIT +no-false-attribs License - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -Distributions of all or part of the Software intended to be used -by the recipients as they would use the unmodified Software, -containing modifications that substantially alter, remove, or -disable functionality of the Software, outside of the documented -configuration mechanisms provided by the Software, shall be -modified such that the Original Author's bug reporting email -addresses and urls are either replaced with the contact information -of the parties responsible for the changes, or removed entirely. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/cli/node_modules/shortid/README.md b/cli/node_modules/shortid/README.md deleted file mode 100644 index 3d2888e52..000000000 --- a/cli/node_modules/shortid/README.md +++ /dev/null @@ -1,255 +0,0 @@ -## shortid [![Build Status](http://img.shields.io/travis/dylang/shortid.svg)](https://travis-ci.org/dylang/shortid) [![shortid](http://img.shields.io/npm/dm/shortid.svg)](https://www.npmjs.org/package/shortid) - -> Amazingly short non-sequential url-friendly unique id generator. - - - - - - - - -ShortId creates amazingly short non-sequential url-friendly unique ids. Perfect for url shorteners, MongoDB and Reddis ids, and any other id users might see. - - * By default 7-14 url-friendly characters: `A-Z`, `a-z`, `0-9`, `_-` - * Non-sequential so they are not predictable. - * Supports `cluster` (automatically), custom seeds, custom alphabet. - * Can generate any number of ids without duplicates, even millions per day. - * Perfect for games, especially if you are concerned about cheating so you don't want an easily guessable id. - * Apps can be restarted any number of times without any chance of repeating an id. - * Popular replacement for Mongo ID/Mongoose ID. - * Works in Node, io.js, and web browsers. - * Includes [Mocha](http://visionmedia.github.com/mocha/) tests. - - - -### Usage - -```js -var shortid = require('shortid'); - -console.log(shortid.generate()); -//PPBqWA9 -``` - -Mongoose Unique Id -```js -_id: { - type: String, - unique: true, - 'default': shortid.generate -}, -``` - - - -### Browser Compatibility - -The best way to use `shortid` in the browser is via [browserify](http://browserify.org/) or [webpack](http://webpack.github.io/). - -These tools will automatically only include the files necessary for browser compatibility. - -All tests will run in the browser as well: - -```bash -## build the bundle, then open Mocha in a browser to see the tests run. -$ grunt build open -``` - - - -### Example - -```js -~/projects/shortid ❯ node examples/examples.js -eWRhpRV -23TplPdS -46Juzcyx -dBvJIh-H -2WEKaVNO -7oet_d9Z -dogPzIz8 -nYrnfYEv -a4vhAoFG -hwX6aOr7 -``` - - -#### Real World Examples - -`shortId` was created for Node Knockout 2011 winner for Most Fun [Doodle Or Die](http://doodleordie.com). -Millions of doodles have been saved with `shortId` filenames. Every log message gets a `shortId` to make it easy -for us to look up later. - -Here are some other projects that use shortId: - -* [bevy](https://npmjs.org/package/bevy) - A simple server to manage multiple Node services. -* [capre](https://npmjs.org/package/capre) - Cross-Server Data Replication. -* [cordova-build](https://www.npmjs.org/package/cordova-build) - an alternative to phonegap build that runs on your servers/agents. -* [couchdb-tools](https://www.npmjs.org/package/couchdb-tools) - A library of handy functions for use when working with CouchDB documents. -* [CleverStack/clever-email](https://github.com/CleverStack/clever-email) - E-mail system for CleverStack. -* [CloudTypes](https://github.com/ticup/CloudTypes) - JavaScript end2end implementation of the Cloud Types model for Eventual Consistency programming. -* [dnode-tarantula](https://github.com/jutaz/dnode-tarantula) - an asynchronous rpc and event system for node.js based on dnode-protocol and TCP sockets. -* [mongoose-url-shortener](https://www.npmjs.org/package/mongoose-url-shortener) - A simple URL Shortening library for NodeJS using Promises/A+ results. -* [mozilla/smokejumper](https://github.com/mozilla/smokejumper) - The Smoke Jumper project is an effort to bring dead simple, secure, P2P file sharing to Firefox. -* [shortness](https://npmjs.org/package/shortness) - Node based URL shortener that uses SQLite. -* [file-db](https://npmjs.org/package/file-db) - Document database that uses directories and files to store its data, supporting nested key-value objects in named collections. -* [resume-generator](https://www.npmjs.org/package/resume-generator) - Resume Generator. -* [riffmint](https://npmjs.org/package/riffmint) - Collaboration in musical space. -* [rap1ds/dippa](https://github.com/rap1ds/dippa) - Dippa Editor – A web-based LaTeX editor - - - - -### API - -`var shortid = require('shortid');` - ---------------------------------------- - -#### `shortid.generate()` - -__Returns__ `string` non-sequential unique id. - -__Example__ - -```js -users.insert({ - _id: shortid.generate() - name: ... - email: ... - }); -``` - ---------------------------------------- - -#### `characters(string)` - -__Default:__ `'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_'` - -__Returns__ new alphabet as a `string` - -__Recommendation:__ If you don't like _ or -, you can to set new characters to use. - -__Optional__ - -Change the characters used. - -You must provide a string of all 64 unique characters. Order is not important. - -The default characters provided were selected because they are url safe. - -__Example__ - -```js -// use $ and @ instead of - and _ -shortid.characters('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$@'); -``` - -```js -// any 64 unicode characters work, but I wouldn't recommend this. -shortid.characters('ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ①②③④⑤⑥⑦⑧⑨⑩⑪⑫'); -``` - - ---------------------------------------- - -#### `isValid(id)` - -__Returns__ `boolean` - -Check to see if an id is a valid `shortid`. Note: This only means the id _could_ have been generated by `shortid`, it doesn't guarantee it. - -__Example__ - -```js -shortid.isValid('41XTDbE'); -// true -``` - -```js -shortid.isValid('i have spaces'); -// false -``` - ---------------------------------------- - -#### `shortid.worker(integer)` - -__Default:__ `process.env.NODE_UNIQUE_ID || 0` - -__Recommendation:__ You typically won't want to change this. - -__Optional__ - -If you are running multiple server processes then you should make sure every one has a unique `worker` id. Should be an integer between 0 and 16. -If you do not do this there is very little chance of two servers generating the same id, but it is theatrically possible -if both are generated in the exact same second and are generating the same number of ids that second and a half-dozen random numbers are all exactly the same. - -__Example__ - -```js -shortId.seed(1000); -``` - ---------------------------------------- - -#### `shortid.seed(float)` - -__Default:__ `1` - -__Recommendation:__ You typically won't want to change this. - -__Optional__ - -Choose a unique value that will seed the random number generator so users won't be able to figure out the pattern of the unique ids. Call it just once in your application before using `shortId` and always use the same value in your application. - -Most developers won't need to use this, it's mainly for testing ShortId. - -If you are worried about users somehow decrypting the id then use it as a secret value for increased encryption. - -__Example__ - -```js -shortId.seed(1000); -``` - - - - - - -### About the Author - -Hi! Thanks for checking out this project! My name is **Dylan Greene**. When not overwhelmed with my two young kids I enjoy contributing -to the open source community. I'm also a tech lead at [Opower](http://opower.com). [![@dylang](https://img.shields.io/badge/github-dylang-green.svg)](https://github.com/dylang) [![@dylang](https://img.shields.io/badge/twitter-dylang-blue.svg)](https://twitter.com/dylang) - -Here's some of my other Node projects: - -| Name | Description | npm Downloads | -|---|---|---| -| [`grunt‑notify`](https://github.com/dylang/grunt-notify) | Automatic desktop notifications for Grunt errors and warnings using Growl for OS X or Windows, Mountain Lion and Mavericks Notification Center, and Notify-Send. | [![grunt-notify](https://img.shields.io/npm/dm/grunt-notify.svg?style=flat-square)](https://www.npmjs.org/package/grunt-notify) | -| [`npm‑check`](https://github.com/dylang/npm-check) | Check for outdated, incorrect, and unused dependencies. | [![npm-check](https://img.shields.io/npm/dm/npm-check.svg?style=flat-square)](https://www.npmjs.org/package/npm-check) | -| [`grunt‑prompt`](https://github.com/dylang/grunt-prompt) | Interactive prompt for your Grunt config using console checkboxes, text input with filtering, password fields. | [![grunt-prompt](https://img.shields.io/npm/dm/grunt-prompt.svg?style=flat-square)](https://www.npmjs.org/package/grunt-prompt) | -| [`rss`](https://github.com/dylang/node-rss) | RSS feed generator. Add RSS feeds to any project. Supports enclosures and GeoRSS. | [![rss](https://img.shields.io/npm/dm/rss.svg?style=flat-square)](https://www.npmjs.org/package/rss) | -| [`xml`](https://github.com/dylang/node-xml) | Fast and simple xml generator. Supports attributes, CDATA, etc. Includes tests and examples. | [![xml](https://img.shields.io/npm/dm/xml.svg?style=flat-square)](https://www.npmjs.org/package/xml) | -| [`changelog`](https://github.com/dylang/changelog) | Command line tool (and Node module) that generates a changelog in color output, markdown, or json for modules in npmjs.org's registry as well as any public github.com repo. | [![changelog](https://img.shields.io/npm/dm/changelog.svg?style=flat-square)](https://www.npmjs.org/package/changelog) | -| [`grunt‑attention`](https://github.com/dylang/grunt-attention) | Display attention-grabbing messages in the terminal | [![grunt-attention](https://img.shields.io/npm/dm/grunt-attention.svg?style=flat-square)](https://www.npmjs.org/package/grunt-attention) | -| [`observatory`](https://github.com/dylang/observatory) | Beautiful UI for showing tasks running on the command line. | [![observatory](https://img.shields.io/npm/dm/observatory.svg?style=flat-square)](https://www.npmjs.org/package/observatory) | -| [`anthology`](https://github.com/dylang/anthology) | Module information and stats for any @npmjs user | [![anthology](https://img.shields.io/npm/dm/anthology.svg?style=flat-square)](https://www.npmjs.org/package/anthology) | -| [`grunt‑cat`](https://github.com/dylang/grunt-cat) | Echo a file to the terminal. Works with text, figlets, ascii art, and full-color ansi. | [![grunt-cat](https://img.shields.io/npm/dm/grunt-cat.svg?style=flat-square)](https://www.npmjs.org/package/grunt-cat) | - -_This list was generated using [anthology](https://github.com/dylang/anthology)._ - - -### License -Copyright (c) 2015 Dylan Greene, contributors. - -Released under the [MIT license](https://tldrlegal.com/license/mit-license). - -Screenshots are [CC BY-SA](http://creativecommons.org/licenses/by-sa/4.0/) (Attribution-ShareAlike). - -*** -_Generated using [grunt-readme](https://github.com/assemble/grunt-readme) with [grunt-templates-dylang](https://github.com/dylang/grunt-templates-dylang) on Sunday, April 5, 2015._ -_To make changes to this document look in `/templates/readme/` - diff --git a/cli/node_modules/shortid/lib/alphabet.js b/cli/node_modules/shortid/lib/alphabet.js deleted file mode 100644 index fb7a20dc9..000000000 --- a/cli/node_modules/shortid/lib/alphabet.js +++ /dev/null @@ -1,98 +0,0 @@ -'use strict'; - -var randomFromSeed = require('./random/random-from-seed'); - -var ORIGINAL = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-'; -var alphabet; -var previousSeed; - -var shuffled; - -function reset() { - shuffled = false; -} - -function setCharacters(_alphabet_) { - if (!_alphabet_) { - if (alphabet !== ORIGINAL) { - alphabet = ORIGINAL; - reset(); - } - return; - } - - if (_alphabet_ === alphabet) { - return; - } - - if (_alphabet_.length !== ORIGINAL.length) { - throw new Error('Custom alphabet for shortid must be ' + ORIGINAL.length + ' unique characters. You submitted ' + _alphabet_.length + ' characters: ' + _alphabet_); - } - - var unique = _alphabet_.split('').filter(function(item, ind, arr){ - return ind !== arr.lastIndexOf(item); - }); - - if (unique.length) { - throw new Error('Custom alphabet for shortid must be ' + ORIGINAL.length + ' unique characters. These characters were not unique: ' + unique.join(', ')); - } - - alphabet = _alphabet_; - reset(); -} - -function characters(_alphabet_) { - setCharacters(_alphabet_); - return alphabet; -} - -function setSeed(seed) { - randomFromSeed.seed(seed); - if (previousSeed !== seed) { - reset(); - previousSeed = seed; - } -} - -function shuffle() { - if (!alphabet) { - setCharacters(ORIGINAL); - } - - var sourceArray = alphabet.split(''); - var targetArray = []; - var r = randomFromSeed.nextValue(); - var characterIndex; - - while (sourceArray.length > 0) { - r = randomFromSeed.nextValue(); - characterIndex = Math.floor(r * sourceArray.length); - targetArray.push(sourceArray.splice(characterIndex, 1)[0]); - } - return targetArray.join(''); -} - -function getShuffled() { - if (shuffled) { - return shuffled; - } - shuffled = shuffle(); - return shuffled; -} - -/** - * lookup shuffled letter - * @param index - * @returns {string} - */ -function lookup(index) { - var alphabetShuffled = getShuffled(); - return alphabetShuffled[index]; -} - -module.exports = { - characters: characters, - seed: setSeed, - lookup: lookup, - shuffled: getShuffled -}; diff --git a/cli/node_modules/shortid/lib/decode.js b/cli/node_modules/shortid/lib/decode.js deleted file mode 100644 index 6621342e8..000000000 --- a/cli/node_modules/shortid/lib/decode.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; -var alphabet = require('./alphabet'); - -/** - * Decode the id to get the version and worker - * Mainly for debugging and testing. - * @param id - the shortid-generated id. - */ -function decode(id) { - var characters = alphabet.shuffled(); - return { - version: characters.indexOf(id.substr(0, 1)) & 0x0f, - worker: characters.indexOf(id.substr(1, 1)) & 0x0f - }; -} - -module.exports = decode; diff --git a/cli/node_modules/shortid/lib/encode.js b/cli/node_modules/shortid/lib/encode.js deleted file mode 100644 index 2e20674d4..000000000 --- a/cli/node_modules/shortid/lib/encode.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -var randomByte = require('./random/random-byte'); - -function encode(lookup, number) { - var loopCounter = 0; - var done; - - var str = ''; - - while (!done) { - str = str + lookup( ( (number >> (4 * loopCounter)) & 0x0f ) | randomByte() ); - done = number < (Math.pow(16, loopCounter + 1 ) ); - loopCounter++; - } - return str; -} - -module.exports = encode; diff --git a/cli/node_modules/shortid/lib/index.js b/cli/node_modules/shortid/lib/index.js deleted file mode 100644 index 41bfb00b0..000000000 --- a/cli/node_modules/shortid/lib/index.js +++ /dev/null @@ -1,100 +0,0 @@ -'use strict'; - -var alphabet = require('./alphabet'); -var encode = require('./encode'); -var decode = require('./decode'); -var isValid = require('./is-valid'); - -// Ignore all milliseconds before a certain time to reduce the size of the date entropy without sacrificing uniqueness. -// This number should be updated every year or so to keep the generated id short. -// To regenerate `new Date() - 0` and bump the version. Always bump the version! -var REDUCE_TIME = 1426452414093; - -// don't change unless we change the algos or REDUCE_TIME -// must be an integer and less than 16 -var version = 5; - -// if you are using cluster or multiple servers use this to make each instance -// has a unique value for worker -// Note: I don't know if this is automatically set when using third -// party cluster solutions such as pm2. -var clusterWorkerId = require('./util/cluster-worker-id') || 0; - -// Counter is used when shortid is called multiple times in one second. -var counter; - -// Remember the last time shortid was called in case counter is needed. -var previousSeconds; - -/** - * Generate unique id - * Returns string id - */ -function generate() { - - var str = ''; - - var seconds = Math.floor((Date.now() - REDUCE_TIME) * 0.001); - - if (seconds === previousSeconds) { - counter++; - } else { - counter = 0; - previousSeconds = seconds; - } - - str = str + encode(alphabet.lookup, version); - str = str + encode(alphabet.lookup, clusterWorkerId); - if (counter > 0) { - str = str + encode(alphabet.lookup, counter); - } - str = str + encode(alphabet.lookup, seconds); - - return str; -} - - -/** - * Set the seed. - * Highly recommended if you don't want people to try to figure out your id schema. - * exposed as shortid.seed(int) - * @param seed Integer value to seed the random alphabet. ALWAYS USE THE SAME SEED or you might get overlaps. - */ -function seed(seedValue) { - alphabet.seed(seedValue); - return module.exports; -} - -/** - * Set the cluster worker or machine id - * exposed as shortid.worker(int) - * @param workerId worker must be positive integer. Number less than 16 is recommended. - * returns shortid module so it can be chained. - */ -function worker(workerId) { - clusterWorkerId = workerId; - return module.exports; -} - -/** - * - * sets new characters to use in the alphabet - * returns the shuffled alphabet - */ -function characters(newCharacters) { - if (newCharacters !== undefined) { - alphabet.characters(newCharacters); - } - - return alphabet.shuffled(); -} - - -// Export all other functions as properties of the generate function -module.exports = generate; -module.exports.generate = generate; -module.exports.seed = seed; -module.exports.worker = worker; -module.exports.characters = characters; -module.exports.decode = decode; -module.exports.isValid = isValid; diff --git a/cli/node_modules/shortid/lib/is-valid.js b/cli/node_modules/shortid/lib/is-valid.js deleted file mode 100644 index b8a8e43d9..000000000 --- a/cli/node_modules/shortid/lib/is-valid.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; -var alphabet = require('./alphabet'); - -function isShortId(id) { - if (!id || typeof id !== 'string' || id.length < 6 ) { - return false; - } - - var characters = alphabet.characters(); - var invalidCharacters = id.split('').map(function(char){ - if (characters.indexOf(char) === -1) { - return char; - } - }).join('').split('').join(''); - - return invalidCharacters.length === 0; -} - -module.exports = isShortId; diff --git a/cli/node_modules/shortid/lib/random/random-byte-browser.js b/cli/node_modules/shortid/lib/random/random-byte-browser.js deleted file mode 100644 index d74d3fa39..000000000 --- a/cli/node_modules/shortid/lib/random/random-byte-browser.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -var crypto = window.crypto || window.msCrypto; // IE 11 uses window.msCrypto - -function randomByte() { - if (!crypto || !crypto.getRandomValues) { - return Math.floor(Math.random() * 256) & 0x30; - } - var dest = new Uint8Array(1); - crypto.getRandomValues(dest); - return dest[0] & 0x30; -} - -module.exports = randomByte; diff --git a/cli/node_modules/shortid/lib/random/random-byte.js b/cli/node_modules/shortid/lib/random/random-byte.js deleted file mode 100644 index 7add0f58b..000000000 --- a/cli/node_modules/shortid/lib/random/random-byte.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -var crypto = require('crypto'); -var randomBytes = crypto.randomBytes; - -function randomByte() { - return randomBytes(1)[0] & 0x30; -} - -module.exports = randomByte; diff --git a/cli/node_modules/shortid/lib/random/random-from-seed.js b/cli/node_modules/shortid/lib/random/random-from-seed.js deleted file mode 100644 index d85579748..000000000 --- a/cli/node_modules/shortid/lib/random/random-from-seed.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -// Found this seed-based random generator somewhere -// Based on The Central Randomizer 1.3 (C) 1997 by Paul Houle (houle@msc.cornell.edu) - -var seed = 1; - -/** - * return a random number based on a seed - * @param seed - * @returns {number} - */ -function getNextValue() { - seed = (seed * 9301 + 49297) % 233280; - return seed/(233280.0); -} - -function setSeed(_seed_) { - seed = _seed_; -} - -module.exports = { - nextValue: getNextValue, - seed: setSeed -}; diff --git a/cli/node_modules/shortid/lib/util/cluster-worker-id-browser.js b/cli/node_modules/shortid/lib/util/cluster-worker-id-browser.js deleted file mode 100644 index 969aa9d9a..000000000 --- a/cli/node_modules/shortid/lib/util/cluster-worker-id-browser.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = 0; diff --git a/cli/node_modules/shortid/lib/util/cluster-worker-id.js b/cli/node_modules/shortid/lib/util/cluster-worker-id.js deleted file mode 100644 index 453a0665c..000000000 --- a/cli/node_modules/shortid/lib/util/cluster-worker-id.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = parseInt(process.env.NODE_UNIQUE_ID || 0, 10); diff --git a/cli/node_modules/shortid/package.json b/cli/node_modules/shortid/package.json deleted file mode 100644 index 239ce45c7..000000000 --- a/cli/node_modules/shortid/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "shortid", - "version": "2.2.2", - "description": "Amazingly short non-sequential url-friendly unique id generator.", - "main": "lib/index.js", - "scripts": { - "test": "grunt test" - }, - "keywords": [ - "short", - "tiny", - "id", - "uuid", - "bitly", - "shorten", - "mongoid", - "shortid", - "tinyid" - ], - "homepage": "https://github.com/dylang/shortid", - "author": { - "name": "Dylan Greene", - "email": "dylang@gmail.com" - }, - "repository": { - "type": "git", - "url": "https://github.com/dylang/shortid.git" - }, - "browser": { - "./lib/util/cluster-worker-id.js": "./lib/util/cluster-worker-id-browser.js", - "./lib/random/random-byte.js": "./lib/random/random-byte-browser.js" - }, - "devDependencies": { - "chai": "^2.2.0", - "envify": "^3.4.0", - "grunt": "^0.4.5", - "grunt-browserify": "^3.6.0", - "grunt-contrib-concat": "^0.5.1", - "grunt-contrib-jshint": "^0.11.1", - "grunt-contrib-uglify": "^0.8.1", - "grunt-mocha-test": "^0.12.7", - "grunt-notify": "^0.4.1", - "grunt-open": "^0.2.3", - "grunt-release": "^0.12.0", - "grunt-templates-dylang": "^1.0.10", - "load-grunt-tasks": "^3.1.0", - "mocha": "^2.2.1", - "time-grunt": "^1.1.0" - }, - "license": "MIT", - "gitHead": "2c47c2f6b3f38449518830602cff39b3485af0e4", - "bugs": { - "url": "https://github.com/dylang/shortid/issues" - }, - "_id": "shortid@2.2.2", - "_shasum": "7b76bffb6b719aef8b1886dab2488fb5a97ce53a", - "_from": "shortid@>=2.2.2 <3.0.0", - "_npmVersion": "2.7.5", - "_nodeVersion": "1.5.1", - "_npmUser": { - "name": "dylang", - "email": "dylang@gmail.com" - }, - "maintainers": [ - { - "name": "dylang", - "email": "dylang@gmail.com" - } - ], - "dist": { - "shasum": "7b76bffb6b719aef8b1886dab2488fb5a97ce53a", - "tarball": "http://registry.npmjs.org/shortid/-/shortid-2.2.2.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/shortid/-/shortid-2.2.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/should/.eslintrc b/cli/node_modules/should/.eslintrc deleted file mode 100644 index 2f3bee64c..000000000 --- a/cli/node_modules/should/.eslintrc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "rules": { - "quotes": [2, "single", "avoid-escape"], - "strict": 0, - "camelcase": 0, - "eqeqeq": [2, "smart"], - "curly": 0, - "no-wrap-func": 0, - "no-underscore-dangle": 0 - }, - "env": { - "node": true, - "browser": true, - "mocha": true, - "es6": true - } -} diff --git a/cli/node_modules/should/.npmignore b/cli/node_modules/should/.npmignore deleted file mode 100644 index 6e10b8676..000000000 --- a/cli/node_modules/should/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -examples -test -.idea \ No newline at end of file diff --git a/cli/node_modules/should/.travis.yml b/cli/node_modules/should/.travis.yml deleted file mode 100644 index 088aab302..000000000 --- a/cli/node_modules/should/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: -- '0.10' -script: -- test $SAUCE_USERNAME && npm run zuul || echo 'not running on saucelabs' -- npm test -env: - global: - - secure: aB4+vAj+mJHqQfnq9x10eZ5//erfxecs3l9u/oSJX1Ok+WLrpUW0x3qpaC1bEEPq4bkAuIifxohnPv0XTE3m8GyTfRHzqmeNnNQNsnex3IzunbU4aG7QyS3jFa6gjT5OrgPA+eHobNXBvwASZczighlWtoYKD5RW7Uak4E8EpPs= - - secure: kJaOWFzFnSGEZ4keShHST18OC6z+rmvnnht0SwqmhPlBX4nBQ2bdBR09n0O/GVQ0uAzohn1oObouQH0yuXpbgmk4whMVZgt8RPztusLskt88fE9EOPFNA+YOWNpmcelDiXsMXv7vN2bBlZJSrILUgUppuHIqsdqTGWut08l3Zhg= diff --git a/cli/node_modules/should/.zuul.yml b/cli/node_modules/should/.zuul.yml deleted file mode 100644 index 6895ed66b..000000000 --- a/cli/node_modules/should/.zuul.yml +++ /dev/null @@ -1,10 +0,0 @@ -ui: mocha-bdd -browsers: - - name: chrome - version: 38..latest - - name: ie - version: 9..latest - - name: firefox - version: 33..latest - - name: safari - version: 6..latest \ No newline at end of file diff --git a/cli/node_modules/should/CONTRIBUTING.md b/cli/node_modules/should/CONTRIBUTING.md deleted file mode 100644 index 6659c5517..000000000 --- a/cli/node_modules/should/CONTRIBUTING.md +++ /dev/null @@ -1,14 +0,0 @@ -Before contribute something: - -Follow simple rules: - -- Not violate [DRY](http://programmer.97things.oreilly.com/wiki/index.php/Don%27t_Repeat_Yourself). -- [Boy Scout Rule](http://programmer.97things.oreilly.com/wiki/index.php/The_Boy_Scout_Rule) needs to have been applied. - -1. Your code should look like all the other code - this project should look like it was written by one man, always. -2. If you want to propose something - just create an issue and describe your question with as much description as you can. -3. Please never send issues or pull requests about code style, jshint violations etc - I do not accept it (and you will spend your time for free). -4. If you think you have some general improvement, consider creating a pull request with it. -5. If you are not sure whether your improvement is general enough, just create your own plugin for should.js. (see should.use and Assertion.add usage). -6. If you add new code, it should be covered by tests. No tests - no code. -7. If you find a bug (or at least you think it is a bug), create an issue with the library version and test case that I can run and see what are you talking about, or at least full steps by which I can reproduce it. diff --git a/cli/node_modules/should/History.md b/cli/node_modules/should/History.md deleted file mode 100644 index e7c5548d9..000000000 --- a/cli/node_modules/should/History.md +++ /dev/null @@ -1,459 +0,0 @@ -7.0.2 / 2015-07-09 -================== - - * Bug in browser script and build - -7.0.1 / 2015-06-18 -================== - - * Fixes in should-type for dom nodes, host object and promises - -7.0.0 / 2015-06-18 -================== - - * Added support to `.eql` es6 set, map and symbol (`should-type`, `should-format`, `should-equal`) - * **Breaking Change** More accurate work with types (dom nodes, typed-arrays). - * **Breaking Change** Change result of should-type to be more accurate and consistent. - * Fixed should-equal options checks - * Fixed should-format typed arrays (more then 8 bits) - * Added aliases: .matchEach => .matchSome, .matchAny => .matchEvery (to be similar to array methods). See #65. - * **Breaking Change (possibly)** .matchEach and .matchAny now uses internally .match. See #65. - * **Breaking Change** No more getter assertions. No all assertions are functions. - * **Breaking Change** No more proxy returning, to check property names. - * **Breaking Change** `should-format` now looks more like chrome developer tools inpections. - -6.0.3 / 2015-05-18 -================== - - * Replace rest of usage after 6.0.2 - -6.0.2 / 2015-05-18 -================== - - * Replace in all internal assertions `should` usage to non getter form - -6.0.1 / 2015-04-15 -================== - - * Remove dummy debug messages - -6.0.0 / 2015-04-15 -================== - - * From .containDeep* removed .indexOf checks for strings, now it is just equality checks (see #55) - * Fix for .not.throws for generators - -5.2.0 / 2015-03-12 -================== - - * Added `.matchAny`, like `.matchEach` but with `some` semantics - -5.1.0 / 2015-03-05 -================== - - * Initial support of es6 generators, iterables, iterators and symbols - * .throwError now support generator functions - * Fix bug in .propertyByPath - -5.0.1 / 2015-02-21 -================== - - * Export utils via should.util - -5.0.0 / 2015-02-10 -================== - - * Remove old .eql implementation - * Refactor nested errors - * Added separate reporting message for false negative results like 10.should.not.equal(10) - * Make error.message lazy fix old perfomance bottlenecks for constructing messages for big objects - * Added .propertyWithDescriptor - -4.6.5 / 2015-02-05 -================== - - * Fix perfomance degradation on large objects - -4.6.4 / 2015-02-05 -================== - - * Fix end cases for .containDeep and .containDeepOrdered - -4.6.3 / 2015-02-01 -================== - - * Added small check for .noConflict - * Fix end cases for .containDeep and .containDeepOrdered - -4.6.2 / 2015-01-28 -================== - - * Make assertion properties configurable - -4.6.1 / 2015-01-18 -================== - - * Bump deps - * Set showDiff only if the same types - -4.6.0 / 2015-01-13 -================== - - * Wrap everywhere returned assertion with Proxy if available. - -4.5.2 / 2015-01-13 -================== - - * Fixed null properties in .containDeep and .containDeepOrdered - -4.5.1 / 2015-01-13 -================== - - * Fixed leaked \_eql - -4.5.0 / 2015-01-11 -================== - - * Added config flag .useOldDeepEqual to use old .eql implementation - -4.4.4 / 2015-01-08 -================== - - * Added .enumerables - -4.4.3 / 2015-01-08 -================== - - * Bump dependencies to get more accurate format of promise - * Added a lot of jsdocs - -4.4.2 / 2014-12-27 -================== - - * Remove breaking change with should-equal that check also object prototypes. Instead document how get both behaviours in .eql docs. - -4.4.1 / 2014-12-13 -================== - - * bump deps - -4.4.0 / 2014-12-12 -================== - - * assert methods reimplemented via assertion, deepEqual done via should-equal. To avoid possible confusion between should.deepEqual and a.should.eql(b) - * Possible fix for error tests - -4.3.1 / 2014-12-08 -================== - - * `.throw()` check if given object is a function - -4.3.0 / 2014-11-10 -================== - - * Remove node's version of .eql - * Added reason why .eql failed - -4.2.1 / 2014-11-07 -================== - - * Move inspection from .formattedObj to be in .getMessage - to make inspection as late as possible. - -4.2.0 / 2014-11-06 -================== - - * Remove node util.inspect and use instead own inspection module with type detection and browser types compatibility - -4.1.0 / 2014-10-19 -================== - - * As inspect function was moved to repo, refine how it show Dates (added millis via custom format) - * Added warnings for potential shoot in the leg: eql non strict and should unwrapping primitive wrappers - * Added possibility to disable any warnings via environment variable SHOULDJS_WARN and should.warn = false - * Added new deep equality check function - * Nested assertions can contribute to parent assertions own messages - -4.0.4 / 2014-06-09 -================== - - * Make all assertions enumerable in Assertion.prototype - -4.0.3 / 2014-06-09 -================== - - * Fix wrong/strange behaviour of .containDeep with equal keys. Now it check to contain element once. - * Added util.formatProp to format properties more accurate - -4.0.1 / 2014-06-04 -================== - - * Missing name in browser script - -4.0.0 / 2014-05-29 -================== - - * Breaking change: Move non core assertions out - * Added casting in properties assertions to String for all property names - * Added .propertyByPath assertion - * Breaking change: Remove deprecated .includeEql and .include - * Breaking change: .containDeep now do not check order for 2 arrays case - * Added .containDeepOrdered for old .containDeep - * Added support of array-like objects - * Added to .throw matching by error properties with .match - -3.3.2 / 2014-05-23 -================== - - * Fix for should.format - -3.3.1 / 2014-04-16 -================== - - * Added aliases for es reserved words - * Fix bug with ownProperty alias - * Fix bug with not function alias - -3.3.0 / 2014-04-07 -================== - - * Added .enumerable(name, val) - -3.2.0 / 2014-03-29 -================== - - * Added first version of .any modifier that affect assertions with multiple parameters - * .header now have more nice message - * assertion can now override how to show object - -3.1.4 / 2014-03-18 -================== - - * .Error now do not throw assertion error for custom errors. - -3.1.3 / 2014-02-25 -================== - - * Fix TypeError in .containEql - -3.1.2 / 2014-01-28 -================== - - * Fix for adding .inspect for JQuery object only in case when it is exist - -3.1.1 / 2014-01-28 -================== - - * Fix for HTMLElement in DOM less environments - -3.1.0 / 2014-01-23 -================== - - * Added jquery based browser extension - -3.0.1 / 2014-01-17 -================== - - * Fix: .lengthOf() - -3.0.0 / 2014-01-17 -================== - - * Split everything to smaller files - * Added huge extension to .match and .matchEach. Thanks @alsotang for initial code and idea. - * Added .containDeep and .containEql - * Separate build for browser and node.js - * Basic plugin system - * Breaking change: .Object now do not fail on arrays - * Breaking change: Additional messages now replaces generated and do not added - * Breaking change: .keys now check as is - no keys in args means no keys in object - * Deprecated: assert extension - * Deprecated: .include and .includeEql - * Now all assertions define only positive cases, should.js take care about negations and chains - -2.1.1 / 2013-12-05 -================== - - * Move date formatting out of should.inspect - -2.1.0 / 2013-11-11 -================== - - * Override .inspect for Date's to convert them to ISOString - -2.0.2 / 2013-10-21 -================== - - * Add '#of' as getter for chaining. - * Exclude browser script for .npmignore. - -2.0.1 / 2013-10-10 -================== - - * Fix wrong path in .npmignore. - -2.0.0 / 2013-10-10 -================== - - * breaking change: #a now getter like #an. Was replaced with #type(str) - * breaking change: #empty does not check length for objects. Now it check if object do not have own properties. - * #properties check if object have some properties - * util.inspect now exposed as should.inspect - * assertions for NaN, Infinity, Array, Object, String, Boolean, Number, Error, Function - * #equal got alias #exactly - -1.3.0 / 2013-09-13 -================== - - * fix doc for .keys. Closes #108. - * add #endWith() - * add .startWith (#119) - -1.2.2 / 2013-02-19 -================== - - * fix should.be.instanceOf() failure on Date - -1.2.1 / 2012-11-02 -================== - - * add .showDiff - * Make instanceOf and throwError be aliased like others [alFReD-NSH] - * Fix should[.not].exist not having stack trace #84 [alFReD-NSH] - -1.2.0 / 2012-09-21 -================== - - * Added #approximately(value, delta, description) for doing assertions on results of operations with numbers. [titarenko] - -1.1.1 / 2012-09-19 -================== - - * add .type for eql()s assert - -1.1.0 / 2012-07-30 -================== - - * add enclosing of failure message functions. Closes #81 - * add mocha .actual / .expected string support for all assertion values - -0.7.0 / 2012-07-17 -================== - - * add `.throw(Constructor)` support [snakamura] - -0.6.3 / 2012-04-26 -================== - - * Added object inclusion support back - -0.6.2 / 2012-04-26 -================== - - * Added homepage to package.json - * Fixed .equal() with dates. Closes #63 - -0.6.1 / 2012-04-10 -================== - - * package: add "repository" section [TooTallNate] - * use valueOf() to get the reference the object [TooTallNate] - -0.6.0 / 2012-03-01 -================== - - * Added `err.actual` and `err.expected` for .{eql,equal}() - * Added 'return this;' to 'get json' and 'get html' in order to provide chaining for should.be.json and should.be.html - -0.5.1 / 2012-01-13 -================== - - * Added better `.json` - * Added better `.html` - -0.5.0 / 2012-01-12 -================== - - * Added string matching to `.throw()` [serby] - * Added regexp matching to `.throw()` [serby] - * Added `.includeEql()` [RubenVerborgh] - * Added `.should.be.html` - * Added `.should.be.json` - * Added optional description args to most matchers [Mike Swift] - -0.4.2 / 2011-12-17 -================== - - * Fixed .header() for realzzz - -0.4.1 / 2011-12-16 -================== - - * Fixed: chain .header() to retain negation - -0.4.0 / 2011-12-16 -================== - - * Added `.should.throw()` - * Added `.include()` support for strings - * Added `.include()` support for arrays - * Removed `keys()` `.include` modifier support - * Removed `.object()` - * Removed `.string()` - * Removed `.contain()` - * Removed `.respondTo()` rubyism - * expresso -> mocha - -0.3.2 / 2011-10-24 -================== - - * Fixed tests for 0.5.x - * Fixed sys warning - -0.3.1 / 2011-08-22 -================== - - * configurable - -0.3.0 / 2011-08-20 -================== - - * Added assertion for inclusion of an object: `foo.should.include.object({ foo: 'bar' })` - -0.2.1 / 2011-05-13 -================== - - * Fixed .status(code). Closes #18 - -0.2.0 / 2011-04-17 -================== - - * Added `res.should.have.status(code)` method - * Added `res.should.have.header(field, val)` method - -0.1.0 / 2011-04-06 -================== - - * Added `should.exist(obj)` [aseemk] - * Added `should.not.exist(obj)` [aseemk] - -0.0.4 / 2010-11-24 -================== - - * Added `.ok` to assert truthfulness - * Added `.arguments` - * Fixed double required bug. [thanks dominictarr] - -0.0.3 / 2010-11-19 -================== - - * Added `true` / `false` assertions - -0.0.2 / 2010-11-19 -================== - - * Added chaining support - -0.0.1 / 2010-11-19 -================== - - * Initial release diff --git a/cli/node_modules/should/LICENSE b/cli/node_modules/should/LICENSE deleted file mode 100644 index e3fcf5909..000000000 --- a/cli/node_modules/should/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010-2014 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/cli/node_modules/should/Readme.md b/cli/node_modules/should/Readme.md deleted file mode 100644 index f330fdfc4..000000000 --- a/cli/node_modules/should/Readme.md +++ /dev/null @@ -1,216 +0,0 @@ -# should.js - -[![Join the chat at https://gitter.im/shouldjs/should.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/shouldjs/should.js) - -[![Build Status](https://travis-ci.org/shouldjs/should.js.svg?branch=master)](https://travis-ci.org/shouldjs/should.js) - -[![Selenium Test Status](https://saucelabs.com/browser-matrix/shouldjs.svg)](https://saucelabs.com/u/shouldjs) - -_should_ is an expressive, readable, framework-agnostic assertion library. The main goals of this library are __to be expressive__ and __to be helpful__. It keeps your test code clean, and your error messages helpful. - -By default (when you `require('should')`) _should_ extends the `Object.prototype` with a single non-enumerable getter that allows you to express how that object should behave. It also returns itself when required with `require`. - -It is also possible to use should.js without getter (it will not even try to exetend Object.prototype), just `require('should/as-function')`. Or if you already use version that auto add getter, you can call `.noConflict` function. - -**Results of `(something).should` getter and `should(something)` in most situations the same** - -### Upgrading instructions - -Please check [wiki page](https://github.com/shouldjs/should.js/wiki/Breaking-changes) for upgrading instructions. - -### FAQ - -You can take look in [FAQ](https://github.com/shouldjs/should.js/wiki/FAQ). - -## Example -```javascript -var should = require('should'); - -var user = { - name: 'tj' - , pets: ['tobi', 'loki', 'jane', 'bandit'] -}; - -user.should.have.property('name', 'tj'); -user.should.have.property('pets').with.lengthOf(4); - -// If the object was created with Object.create(null) -// then it doesn't inherit `Object.prototype`, so it will not have `.should` getter -// so you can do: -should(user).have.property('name', 'tj'); - -// also you can test in that way for null's -should(null).not.be.ok(); - -someAsyncTask(foo, function(err, result){ - should.not.exist(err); - should.exist(result); - result.bar.should.equal(foo); -}); -``` -## To begin - - 1. Install it: - - ```bash - $ npm install should --save-dev - ``` - - 2. Require it and use: - - ```js - var should = require('should'); - - (5).should.be.exactly(5).and.be.a.Number(); - ``` - - ```js - var should = require('should/as-function'); - - should(10).be.exactly(5).and.be.a.Number(); - ``` - -## In browser - -Well, even when browsers by complains of authors has 100% es5 support, it does not mean it has no bugs. Please see [wiki](https://github.com/shouldjs/should.js/wiki/Known-Bugs) for known bugs. - -If you want to use _should_ in browser, use the `should.js` file in the root of this repository, or build it yourself. To build a fresh version: - -```bash -$ npm install -$ gulp script -``` - -The script is exported to `window.Should`. It is the same as using `should` statically: - -```js -Should(5).be.exactly(5) -``` - -Also, in the case of node.js, `Object.prototype` is extended with `should` (hence the capital S in `window.Should`): - -```js -window.should.be.exactly(window); -// the same -// window is host object -should.be.exactly(window); -// you should not really care about it - -(5).should.be.exactly(5); -``` -You can easy install it with npm or bower: -``` -npm install should --save-dev -# or -bower install shouldjs/should.js -``` - -## API docs - -Actual api docs generated by jsdoc comments and available at [http://shouldjs.github.io](http://shouldjs.github.io). - -## Usage examples - -Please look on usage in [examples](https://github.com/shouldjs/examples) - -## .not - -`.not` negates the current assertion. - -## .any - -`.any` allow for assertions with multiple parameters to assert any of the parameters (but not all). This is similar to the native JavaScript [array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some). - -# Assertions -## chaining assertions - -Every assertion will return a `should.js`-wrapped Object, so assertions can be chained. -To help chained assertions read more clearly, you can use the following helpers anywhere in your chain: `.an`, `.of`, `.a`, `.and`, `.be`, `.have`, `.with`, `.is`, `.which`. Use them for better readability; they do nothing at all. -For example: -```js -user.should.be.an.instanceOf(Object).and.have.property('name', 'tj'); -user.pets.should.be.instanceof(Array).and.have.lengthOf(4); -``` -Almost all assertions return the same object - so you can easy chain them. But some (eg: `.length` and `.property`) move the assertion object to a property value, so be careful. - -## Adding own assertions - -Adding own assertion is pretty easy. You need to call `should.Assertion.add` function. It accept 2 arguments: - -1. name of assertion method (string) -2. assertion function (function) - -What assertion function should do. It should check only positive case. `should` will handle `.not` itself. -`this` in assertion function will be instance of `should.Assertion` and you **must** define in any way this.params object - in your assertion function call before assertion check happen. - -`params` object can contain several fields: - -- `operator` - it is string which describe your assertion -- `actual` it is actual value, you can assume it is your own this.obj if you need to define you own -- `expected` it is any value that expected to be matched this.obj - -You can assume its usage in generating AssertionError message like: expected `obj`? || this.obj not? `operator` `expected`? - -In `should` sources appeared 2 kinds of usage of this method. - -First not preferred and used **only** for shortcuts to other assertions, e.g how `.should.be.true()` defined: - -```javascript -Assertion.add('true', function() { - this.is.exactly(true); -}); -``` -There you can see that assertion function do not define own `this.params` and instead call within the same assertion `.exactly` -that will fill `this.params`. **You should use this way very carefully, but you can use it**. - -Second way preferred and i assume you will use it instead of first. - -```javascript -Assertion.add('true', function() { - this.params = { operator: 'to be true', expected: true }; - - should(this.obj).be.exactly(true); -}); -``` -in this case this.params defined and then used new assertion context (because called `.should`). Internally this way does not - create any edge cases as first. - -```javascript -Assertion.add('asset', function() { - this.params = { operator: 'to be asset' }; - - this.obj.should.have.property('id').which.is.a.Number(); - this.obj.should.have.property('path'); -}) - -//then -> ({ id: '10' }).should.be.an.asset(); -AssertionError: expected { id: '10' } to be asset - expected '10' to be a number - -> ({ id: 10 }).should.be.an.asset(); -AssertionError: expected { id: 10 } to be asset - expected { id: 10 } to have property path -``` - - -## Contributions - -[Actual list of contributors](https://github.com/visionmedia/should.js/graphs/contributors) if you want to show it your friends. - -To run the tests for _should_ simply run: - - $ npm test - -See also [CONTRIBUTING](./CONTRIBUTING.md). - -## OMG IT EXTENDS OBJECT???!?!@ - -Yes, yes it does, with a single getter _should_, and no it won't break your code, because it does this **properly** with a non-enumerable property. - -Also it is possible use it without extension. - -## License - -MIT © 2010-2014 TJ Holowaychuk diff --git a/cli/node_modules/should/as-function.js b/cli/node_modules/should/as-function.js deleted file mode 100644 index c3f0d0a8d..000000000 --- a/cli/node_modules/should/as-function.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/should'); diff --git a/cli/node_modules/should/bower.json b/cli/node_modules/should/bower.json deleted file mode 100644 index 1fb8787ea..000000000 --- a/cli/node_modules/should/bower.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "should", - "main": "should.js", - "homepage": "https://github.com/shouldjs/should.js", - "repository": { - "type": "git", - "url": "git://github.com/shouldjs/should.js.git" - }, - "authors": [ - "TJ Holowaychuk and contributors" - ], - "description": "test framework agnostic BDD-style assertions", - "keywords": [ - "test", - "bdd", - "assert", - "should" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "test", - "*.md", - "LICENSE", - "package.json" - ] -} diff --git a/cli/node_modules/should/gulpfile.js b/cli/node_modules/should/gulpfile.js deleted file mode 100644 index ffdab9e33..000000000 --- a/cli/node_modules/should/gulpfile.js +++ /dev/null @@ -1,40 +0,0 @@ -var gulp = require('gulp'); -var $ = require('gulp-load-plugins')({lazy: false}); - -var source = require('vinyl-source-stream2'); -var browserify = require('browserify'); - -var path = require('path'); - -var pkg = require('./package.json'); - -var banner = [ - '/*', - ' * <%= pkg.name %> - <%= pkg.description %>', - ' * @version v<%= pkg.version %>', - ' * @author <%= pkg.author %>', - ' * @link <%= pkg.homepage %>', - ' * @license <%= pkg.license %>', - ' */', - ''].join('\n'); - -gulp.task('script', function() { - var bundleStream = browserify({ - entries: pkg.main, - builtins: null, - insertGlobals: false, - detectGlobals: false, - standalone: 'Should', - fullPaths: false - }) - .bundle(); - - return bundleStream - .pipe(source('should.js')) - .pipe($.header(banner, {pkg: pkg})) - .pipe(gulp.dest('./')) - .pipe($.uglify()) - .pipe($.header(banner, {pkg: pkg})) - .pipe($.rename('should.min.js')) - .pipe(gulp.dest('./')); -}); diff --git a/cli/node_modules/should/index.js b/cli/node_modules/should/index.js deleted file mode 100644 index 9aa4ffc25..000000000 --- a/cli/node_modules/should/index.js +++ /dev/null @@ -1,14 +0,0 @@ -var should = require('./lib/should'); - -var defaultProto = Object.prototype; -var defaultProperty = 'should'; - -//Expose api via `Object#should`. -try { - var prevShould = should.extend(defaultProperty, defaultProto); - should._prevShould = prevShould; -} catch(e) { - //ignore errors -} - -module.exports = should; diff --git a/cli/node_modules/should/lib/assertion-error.js b/cli/node_modules/should/lib/assertion-error.js deleted file mode 100644 index 6505a9ba2..000000000 --- a/cli/node_modules/should/lib/assertion-error.js +++ /dev/null @@ -1,86 +0,0 @@ -var util = require('./util'); - -/** - * should AssertionError - * @param {Object} options - * @constructor - * @memberOf should - * @static - */ -var AssertionError = function AssertionError(options) { - util.merge(this, options); - - if(!options.message) { - Object.defineProperty(this, 'message', { - get: function() { - if(!this._message) { - this._message = this.generateMessage(); - this.generatedMessage = true; - } - return this._message; - }, - configurable: true, - enumerable: false - } - ); - } - - if(Error.captureStackTrace) { - Error.captureStackTrace(this, this.stackStartFunction); - } else { - // non v8 browsers so we can have a stacktrace - var err = new Error(); - if(err.stack) { - var out = err.stack; - - if(this.stackStartFunction) { - // try to strip useless frames - var fn_name = util.functionName(this.stackStartFunction); - var idx = out.indexOf('\n' + fn_name); - if(idx >= 0) { - // once we have located the function frame - // we need to strip out everything before it (and its line) - var next_line = out.indexOf('\n', idx + 1); - out = out.substring(next_line + 1); - } - } - - this.stack = out; - } - } -}; - - -var indent = ' '; -function prependIndent(line) { - return indent + line; -} - -function indentLines(text) { - return text.split('\n').map(prependIndent).join('\n'); -} - - -// assert.AssertionError instanceof Error -AssertionError.prototype = Object.create(Error.prototype, { - name: { - value: 'AssertionError' - }, - - generateMessage: { - value: function() { - if(!this.operator && this.previous) { - return this.previous.message; - } - var actual = util.format(this.actual); - var expected = 'expected' in this ? ' ' + util.format(this.expected) : ''; - var details = 'details' in this && this.details ? ' (' + this.details + ')' : ''; - - var previous = this.previous ? '\n' + indentLines(this.previous.message) : ''; - - return 'expected ' + actual + (this.negate ? ' not ' : ' ') + this.operator + expected + details + previous; - } - } -}); - -module.exports = AssertionError; diff --git a/cli/node_modules/should/lib/assertion.js b/cli/node_modules/should/lib/assertion.js deleted file mode 100644 index 644172423..000000000 --- a/cli/node_modules/should/lib/assertion.js +++ /dev/null @@ -1,206 +0,0 @@ -var AssertionError = require('./assertion-error'); -var util = require('./util'); - -/** - * should Assertion - * @param {*} obj Given object for assertion - * @constructor - * @memberOf should - * @static - */ -function Assertion(obj) { - this.obj = obj; - - this.anyOne = false; - this.negate = false; - - this.params = {actual: obj}; -} - -/** - * Way to extend Assertion function. It uses some logic - * to define only positive assertions and itself rule with negative assertion. - * - * All actions happen in subcontext and this method take care about negation. - * Potentially we can add some more modifiers that does not depends from state of assertion. - * @memberOf Assertion - * @category assertion - * @static - * @param {String} name Name of assertion. It will be used for defining method or getter on Assertion.prototype - * @param {Function} func Function that will be called on executing assertion - * @example - * - * Assertion.add('asset', function() { - * this.params = { operator: 'to be asset' }; - * - * this.obj.should.have.property('id').which.is.a.Number(); - * this.obj.should.have.property('path'); - * }); - */ -Assertion.add = function(name, func) { - var prop = {enumerable: true, configurable: true}; - - prop.value = function() { - var context = new Assertion(this.obj, this, name); - context.anyOne = this.anyOne; - - try { - func.apply(context, arguments); - } catch(e) { - //check for fail - if(e instanceof AssertionError) { - //negative fail - if(this.negate) { - this.obj = context.obj; - this.negate = false; - return this; - } - - if(context !== e.assertion) { - context.params.previous = e; - } - - //positive fail - context.negate = false; - context.fail(); - } - // throw if it is another exception - throw e; - } - - //negative pass - if(this.negate) { - context.negate = true;//because .fail will set negate - context.params.details = 'false negative fail'; - context.fail(); - } - - //positive pass - if(!this.params.operator) this.params = context.params;//shortcut - this.obj = context.obj; - this.negate = false; - return this; - }; - - Object.defineProperty(Assertion.prototype, name, prop); -}; - -Assertion.addChain = function(name, onCall) { - onCall = onCall || function() { - }; - Object.defineProperty(Assertion.prototype, name, { - get: function() { - onCall(); - return this; - }, - enumerable: true - }); -}; - -/** - * Create alias for some `Assertion` property - * - * @memberOf Assertion - * @category assertion - * @static - * @param {String} from Name of to map - * @param {String} to Name of alias - * @example - * - * Assertion.alias('true', 'True'); - */ -Assertion.alias = function(from, to) { - var desc = Object.getOwnPropertyDescriptor(Assertion.prototype, from); - if(!desc) throw new Error('Alias ' + from + ' -> ' + to + ' could not be created as ' + from + ' not defined'); - Object.defineProperty(Assertion.prototype, to, desc); -}; - -Assertion.prototype = { - constructor: Assertion, - - /** - * Base method for assertions. Before calling this method need to fill Assertion#params object. This method usually called from other assertion methods. - * `Assertion#params` can contain such properties: - * * `operator` - required string containing description of this assertion - * * `obj` - optional replacement for this.obj, it usefull if you prepare more clear object then given - * * `message` - if this property filled with string any others will be ignored and this one used as assertion message - * * `expected` - any object used when you need to assert relation between given object and expected. Like given == expected (== is a relation) - * * `details` - additional string with details to generated message - * - * @memberOf Assertion - * @category assertion - * @param {*} expr Any expression that will be used as a condition for asserting. - * @example - * - * var a = new should.Assertion(42); - * - * a.params = { - * operator: 'to be magic number', - * } - * - * a.assert(false); - * //throws AssertionError: expected 42 to be magic number - */ - assert: function(expr) { - if(expr) return this; - - var params = this.params; - - if('obj' in params && !('actual' in params)) { - params.actual = params.obj; - } else if(!('obj' in params) && !('actual' in params)) { - params.actual = this.obj; - } - - params.stackStartFunction = params.stackStartFunction || this.assert; - params.negate = this.negate; - - params.assertion = this; - - throw new AssertionError(params); - }, - - /** - * Shortcut for `Assertion#assert(false)`. - * - * @memberOf Assertion - * @category assertion - * @example - * - * var a = new should.Assertion(42); - * - * a.params = { - * operator: 'to be magic number', - * } - * - * a.fail(); - * //throws AssertionError: expected 42 to be magic number - */ - fail: function() { - return this.assert(false); - }, - - /** - * Negation modifier. Current assertion chain become negated. Each call invert negation on current assertion. - * - * @memberOf Assertion - * @category assertion - */ - get not() { - this.negate = !this.negate; - return this; - }, - - /** - * Any modifier - it affect on execution of sequenced assertion to do not `check all`, but `check any of`. - * - * @memberOf Assertion - * @category assertion - */ - get any() { - this.anyOne = true; - return this; - } -}; - -module.exports = Assertion; diff --git a/cli/node_modules/should/lib/config.js b/cli/node_modules/should/lib/config.js deleted file mode 100644 index 0757751ea..000000000 --- a/cli/node_modules/should/lib/config.js +++ /dev/null @@ -1,11 +0,0 @@ -var Formatter = require('should-format').Formatter; - -var config = { - checkProtoEql: false, - - getFormatter: function(opts) { - return new Formatter(opts || config); - } -}; - -module.exports = config; diff --git a/cli/node_modules/should/lib/ext/_assert.js b/cli/node_modules/should/lib/ext/_assert.js deleted file mode 100644 index 05e4aee6e..000000000 --- a/cli/node_modules/should/lib/ext/_assert.js +++ /dev/null @@ -1,279 +0,0 @@ -// implement assert interface using already written peaces of should.js - -// http://wiki.commonjs.org/wiki/Unit_Testing/1.0 -// -// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8! -// -// Originally from narwhal.js (http://narwhaljs.org) -// Copyright (c) 2009 Thomas Robinson <280north.com> -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the 'Software'), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -// when used in node, this will actually load the util module we depend on -// versus loading the builtin util module as happens otherwise -// this is a bug in node module loading as far as I am concerned -var Assertion = require('./../assertion'); - -var _deepEqual = require('should-equal'); - -var pSlice = Array.prototype.slice; - -// 1. The assert module provides functions that throw -// AssertionError's when particular conditions are not met. The -// assert module must conform to the following interface. - -var assert = module.exports = ok; - -// 3. All of the following functions must throw an AssertionError -// when a corresponding condition is not met, with a message that -// may be undefined if not provided. All assertion methods provide -// both the actual and expected values to the assertion error for -// display purposes. -/** - * Node.js standard [`assert.fail`](http://nodejs.org/api/assert.html#assert_assert_fail_actual_expected_message_operator). - * @static - * @memberOf should - * @category assertion assert - * @param {*} actual Actual object - * @param {*} expected Expected object - * @param {string} message Message for assertion - * @param {string} operator Operator text - */ -function fail(actual, expected, message, operator, stackStartFunction) { - var a = new Assertion(actual); - a.params = { - operator: operator, - expected: expected, - message: message, - stackStartFunction: stackStartFunction || fail - }; - - a.fail(); -} - -// EXTENSION! allows for well behaved errors defined elsewhere. -assert.fail = fail; - -// 4. Pure assertion tests whether a value is truthy, as determined -// by !!guard. -// assert.ok(guard, message_opt); -// This statement is equivalent to assert.equal(true, !!guard, -// message_opt);. To test strictly for the value true, use -// assert.strictEqual(true, guard, message_opt);. -/** - * Node.js standard [`assert.ok`](http://nodejs.org/api/assert.html#assert_assert_value_message_assert_ok_value_message). - * @static - * @memberOf should - * @category assertion assert - * @param {*} value - * @param {string} [message] - */ -function ok(value, message) { - if(!value) fail(value, true, message, '==', assert.ok); -} -assert.ok = ok; - -// 5. The equality assertion tests shallow, coercive equality with -// ==. -// assert.equal(actual, expected, message_opt); - -/** - * Node.js standard [`assert.equal`](http://nodejs.org/api/assert.html#assert_assert_equal_actual_expected_message). - * @static - * @memberOf should - * @category assertion assert - * @param {*} actual - * @param {*} expected - * @param {string} [message] - */ -assert.equal = function equal(actual, expected, message) { - if(actual != expected) fail(actual, expected, message, '==', assert.equal); -}; - -// 6. The non-equality assertion tests for whether two objects are not equal -// with != assert.notEqual(actual, expected, message_opt); -/** - * Node.js standard [`assert.notEqual`](http://nodejs.org/api/assert.html#assert_assert_notequal_actual_expected_message). - * @static - * @memberOf should - * @category assertion assert - * @param {*} actual - * @param {*} expected - * @param {string} [message] - */ -assert.notEqual = function notEqual(actual, expected, message) { - if(actual == expected) { - fail(actual, expected, message, '!=', assert.notEqual); - } -}; - -// 7. The equivalence assertion tests a deep equality relation. -// assert.deepEqual(actual, expected, message_opt); -/** - * Node.js standard [`assert.deepEqual`](http://nodejs.org/api/assert.html#assert_assert_deepequal_actual_expected_message). - * @static - * @memberOf should - * @category assertion assert - * @param {*} actual - * @param {*} expected - * @param {string} [message] - */ -assert.deepEqual = function deepEqual(actual, expected, message) { - if(!_deepEqual(actual, expected).result) { - fail(actual, expected, message, 'deepEqual', assert.deepEqual); - } -}; - - -// 8. The non-equivalence assertion tests for any deep inequality. -// assert.notDeepEqual(actual, expected, message_opt); -/** - * Node.js standard [`assert.notDeepEqual`](http://nodejs.org/api/assert.html#assert_assert_notdeepequal_actual_expected_message). - * @static - * @memberOf should - * @category assertion assert - * @param {*} actual - * @param {*} expected - * @param {string} [message] - */ -assert.notDeepEqual = function notDeepEqual(actual, expected, message) { - if(_deepEqual(actual, expected).result) { - fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); - } -}; - -// 9. The strict equality assertion tests strict equality, as determined by ===. -// assert.strictEqual(actual, expected, message_opt); -/** - * Node.js standard [`assert.strictEqual`](http://nodejs.org/api/assert.html#assert_assert_strictequal_actual_expected_message). - * @static - * @memberOf should - * @category assertion assert - * @param {*} actual - * @param {*} expected - * @param {string} [message] - */ -assert.strictEqual = function strictEqual(actual, expected, message) { - if(actual !== expected) { - fail(actual, expected, message, '===', assert.strictEqual); - } -}; - -// 10. The strict non-equality assertion tests for strict inequality, as -// determined by !==. assert.notStrictEqual(actual, expected, message_opt); -/** - * Node.js standard [`assert.notStrictEqual`](http://nodejs.org/api/assert.html#assert_assert_notstrictequal_actual_expected_message). - * @static - * @memberOf should - * @category assertion assert - * @param {*} actual - * @param {*} expected - * @param {string} [message] - */ -assert.notStrictEqual = function notStrictEqual(actual, expected, message) { - if(actual === expected) { - fail(actual, expected, message, '!==', assert.notStrictEqual); - } -}; - -function expectedException(actual, expected) { - if(!actual || !expected) { - return false; - } - - if(Object.prototype.toString.call(expected) == '[object RegExp]') { - return expected.test(actual); - } else if(actual instanceof expected) { - return true; - } else if(expected.call({}, actual) === true) { - return true; - } - - return false; -} - -function _throws(shouldThrow, block, expected, message) { - var actual; - - if(typeof expected == 'string') { - message = expected; - expected = null; - } - - try { - block(); - } catch(e) { - actual = e; - } - - message = (expected && expected.name ? ' (' + expected.name + ')' : '.') + - (message ? ' ' + message : '.'); - - if(shouldThrow && !actual) { - fail(actual, expected, 'Missing expected exception' + message); - } - - if(!shouldThrow && expectedException(actual, expected)) { - fail(actual, expected, 'Got unwanted exception' + message); - } - - if((shouldThrow && actual && expected && !expectedException(actual, expected)) || (!shouldThrow && actual)) { - throw actual; - } -} - -// 11. Expected to throw an error: -// assert.throws(block, Error_opt, message_opt); -/** - * Node.js standard [`assert.throws`](http://nodejs.org/api/assert.html#assert_assert_throws_block_error_message). - * @static - * @memberOf should - * @category assertion assert - * @param {Function} block - * @param {Function} [error] - * @param {String} [message] - */ -assert.throws = function(block, /*optional*/error, /*optional*/message) { - _throws.apply(this, [true].concat(pSlice.call(arguments))); -}; - -// EXTENSION! This is annoying to write outside this module. -/** - * Node.js standard [`assert.doesNotThrow`](http://nodejs.org/api/assert.html#assert_assert_doesnotthrow_block_message). - * @static - * @memberOf should - * @category assertion assert - * @param {Function} block - * @param {String} [message] - */ -assert.doesNotThrow = function(block, /*optional*/message) { - _throws.apply(this, [false].concat(pSlice.call(arguments))); -}; - -/** - * Node.js standard [`assert.ifError`](http://nodejs.org/api/assert.html#assert_assert_iferror_value). - * @static - * @memberOf should - * @category assertion assert - * @param {Error} err - */ -assert.ifError = function(err) { - if(err) { - throw err; - } -}; diff --git a/cli/node_modules/should/lib/ext/assert.js b/cli/node_modules/should/lib/ext/assert.js deleted file mode 100644 index 7ab15e48d..000000000 --- a/cli/node_modules/should/lib/ext/assert.js +++ /dev/null @@ -1,70 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util') - , assert = require('./_assert') - , AssertionError = require('../assertion-error'); - -module.exports = function(should) { - var i = should.format; - - /* - * Expose assert to should - * - * This allows you to do things like below - * without require()ing the assert module. - * - * should.equal(foo.bar, undefined); - * - */ - util.merge(should, assert); - - /** - * Assert _obj_ exists, with optional message. - * - * @static - * @memberOf should - * @category assertion assert - * @alias should.exists - * @param {*} obj - * @param {String} [msg] - * @example - * - * should.exist(1); - * should.exist(new Date()); - */ - should.exist = should.exists = function(obj, msg) { - if(null == obj) { - throw new AssertionError({ - message: msg || ('expected ' + i(obj) + ' to exist'), stackStartFunction: should.exist - }); - } - }; - - should.not = {}; - /** - * Asserts _obj_ does not exist, with optional message. - * - * @name not.exist - * @static - * @memberOf should - * @category assertion assert - * @alias should.not.exists - * @param {*} obj - * @param {String} [msg] - * @example - * - * should.not.exist(null); - * should.not.exist(void 0); - */ - should.not.exist = should.not.exists = function(obj, msg) { - if(null != obj) { - throw new AssertionError({ - message: msg || ('expected ' + i(obj) + ' to not exist'), stackStartFunction: should.not.exist - }); - } - }; -}; \ No newline at end of file diff --git a/cli/node_modules/should/lib/ext/bool.js b/cli/node_modules/should/lib/ext/bool.js deleted file mode 100644 index 8282a2419..000000000 --- a/cli/node_modules/should/lib/ext/bool.js +++ /dev/null @@ -1,67 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - /** - * Assert given object is exactly `true`. - * - * @name true - * @memberOf Assertion - * @category assertion bool - * @alias Assertion#True - * @example - * - * (true).should.be.true(); - * false.should.not.be.true(); - * - * ({ a: 10}).should.not.be.true(); - */ - Assertion.add('true', function() { - this.is.exactly(true); - }); - - Assertion.alias('true', 'True'); - - /** - * Assert given object is exactly `false`. - * - * @name false - * @memberOf Assertion - * @category assertion bool - * @alias Assertion#False - * @example - * - * (true).should.not.be.false(); - * false.should.be.false(); - */ - Assertion.add('false', function() { - this.is.exactly(false); - }); - - Assertion.alias('false', 'False'); - - /** - * Assert given object is thuthy according javascript type conversions. - * - * @name ok - * @memberOf Assertion - * @category assertion bool - * @example - * - * (true).should.be.ok(); - * ''.should.not.be.ok(); - * should(null).not.be.ok(); - * should(void 0).not.be.ok(); - * - * (10).should.be.ok(); - * (0).should.not.be.ok(); - */ - Assertion.add('ok', function() { - this.params = { operator: 'to be truthy' }; - - this.assert(this.obj); - }); -}; diff --git a/cli/node_modules/should/lib/ext/chain.js b/cli/node_modules/should/lib/ext/chain.js deleted file mode 100644 index c15adf7e2..000000000 --- a/cli/node_modules/should/lib/ext/chain.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports = function(should, Assertion) { - /** - * Simple chaining. It actually do nothing. - * - * @memberOf Assertion - * @name be - * @property {should.Assertion} be - * @alias Assertion#an - * @alias Assertion#of - * @alias Assertion#a - * @alias Assertion#and - * @alias Assertion#have - * @alias Assertion#has - * @alias Assertion#with - * @alias Assertion#is - * @alias Assertion#which - * @alias Assertion#the - * @alias Assertion#it - * @category assertion chaining - */ - ['an', 'of', 'a', 'and', 'be', 'has', 'have', 'with', 'is', 'which', 'the', 'it'].forEach(function(name) { - Assertion.addChain(name); - }); -}; diff --git a/cli/node_modules/should/lib/ext/contain.js b/cli/node_modules/should/lib/ext/contain.js deleted file mode 100644 index b10f49bb1..000000000 --- a/cli/node_modules/should/lib/ext/contain.js +++ /dev/null @@ -1,158 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util'); -var eql = require('should-equal'); - -module.exports = function(should, Assertion) { - var i = should.format; - - /** - * Assert that given object contain something that equal to `other`. It uses `should-equal` for equality checks. - * If given object is array it search that one of elements was equal to `other`. - * If given object is string it checks if `other` is a substring - expected that `other` is a string. - * If given object is Object it checks that `other` is a subobject - expected that `other` is a object. - * - * @name containEql - * @memberOf Assertion - * @category assertion contain - * @param {*} other Nested object - * @example - * - * [1, 2, 3].should.containEql(1); - * [{ a: 1 }, 'a', 10].should.containEql({ a: 1 }); - * - * 'abc'.should.containEql('b'); - * 'ab1c'.should.containEql(1); - * - * ({ a: 10, c: { d: 10 }}).should.containEql({ a: 10 }); - * ({ a: 10, c: { d: 10 }}).should.containEql({ c: { d: 10 }}); - * ({ a: 10, c: { d: 10 }}).should.containEql({ b: 10 }); - * // throws AssertionError: expected { a: 10, c: { d: 10 } } to contain { b: 10 } - * // expected { a: 10, c: { d: 10 } } to have property b - */ - Assertion.add('containEql', function(other) { - this.params = {operator: 'to contain ' + i(other)}; - - this.is.not.null().and.not.undefined(); - - var obj = this.obj; - - if(typeof obj == 'string') { - this.assert(obj.indexOf(String(other)) >= 0); - } else if(util.isIndexable(obj)) { - this.assert(util.some(obj, function(v) { - return eql(v, other).result; - })); - } else { - this.have.properties(other); - } - }); - - /** - * Assert that given object is contain equally structured object on the same depth level. - * If given object is an array and `other` is an array it checks that the eql elements is going in the same sequence in given array (recursive) - * If given object is an object it checks that the same keys contain deep equal values (recursive) - * On other cases it try to check with `.eql` - * - * @name containDeepOrdered - * @memberOf Assertion - * @category assertion contain - * @param {*} other Nested object - * @example - * - * [ 1, 2, 3].should.containDeepOrdered([1, 2]); - * [ 1, 2, [ 1, 2, 3 ]].should.containDeepOrdered([ 1, [ 2, 3 ]]); - * - * ({ a: 10, b: { c: 10, d: [1, 2, 3] }}).should.containDeepOrdered({a: 10}); - * ({ a: 10, b: { c: 10, d: [1, 2, 3] }}).should.containDeepOrdered({b: {c: 10}}); - * ({ a: 10, b: { c: 10, d: [1, 2, 3] }}).should.containDeepOrdered({b: {d: [1, 3]}}); - */ - Assertion.add('containDeepOrdered', function(other) { - this.params = {operator: 'to contain ' + i(other)}; - - var obj = this.obj; - if(typeof obj == 'string') {// expect other to be string - this.is.equal(String(other)); - } else if(util.isIndexable(obj) && util.isIndexable(other)) { - for(var objIdx = 0, otherIdx = 0, objLength = util.length(obj), otherLength = util.length(other); objIdx < objLength && otherIdx < otherLength; objIdx++) { - try { - should(obj[objIdx]).containDeepOrdered(other[otherIdx]); - otherIdx++; - } catch(e) { - if(e instanceof should.AssertionError) { - continue; - } - throw e; - } - } - - this.assert(otherIdx === otherLength); - } else if(obj != null && other != null && typeof obj == 'object' && typeof other == 'object') {// object contains object case - util.forEach(other, function(value, key) { - should(obj[key]).containDeepOrdered(value); - }); - - // if both objects is empty means we finish traversing - and we need to compare for hidden values - if(util.isEmptyObject(other)) { - this.eql(other); - } - } else { - this.eql(other); - } - }); - - /** - * The same like `Assertion#containDeepOrdered` but all checks on arrays without order. - * - * @name containDeep - * @memberOf Assertion - * @category assertion contain - * @param {*} other Nested object - * @example - * - * [ 1, 2, 3].should.containDeep([2, 1]); - * [ 1, 2, [ 1, 2, 3 ]].should.containDeep([ 1, [ 3, 1 ]]); - */ - Assertion.add('containDeep', function(other) { - this.params = {operator: 'to contain ' + i(other)}; - - var obj = this.obj; - if(typeof obj == 'string') {// expect other to be string - this.is.equal(String(other)); - } else if(util.isIndexable(obj) && util.isIndexable(other)) { - var usedKeys = {}; - util.forEach(other, function(otherItem) { - this.assert(util.some(obj, function(item, index) { - if(index in usedKeys) return false; - - try { - should(item).containDeep(otherItem); - usedKeys[index] = true; - return true; - } catch(e) { - if(e instanceof should.AssertionError) { - return false; - } - throw e; - } - })); - }, this); - } else if(obj != null && other != null && typeof obj == 'object' && typeof other == 'object') {// object contains object case - util.forEach(other, function(value, key) { - should(obj[key]).containDeep(value); - }); - - // if both objects is empty means we finish traversing - and we need to compare for hidden values - if(util.isEmptyObject(other)) { - this.eql(other); - } - } else { - this.eql(other); - } - }); - -}; diff --git a/cli/node_modules/should/lib/ext/eql.js b/cli/node_modules/should/lib/ext/eql.js deleted file mode 100644 index 7b40422f2..000000000 --- a/cli/node_modules/should/lib/ext/eql.js +++ /dev/null @@ -1,75 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var eql = require('should-equal'); -var type = require('should-type'); -var util = require('../util'); - -function formatEqlResult(r, a, b) { - return ((r.path.length > 0 ? 'at ' + r.path.map(util.formatProp).join(' -> ') : '') + - (r.a === a ? '' : ', A has ' + util.format(r.a)) + - (r.b === b ? '' : ' and B has ' + util.format(r.b)) + - (r.showReason ? ' because ' + r.reason : '')).trim(); -} - -module.exports = function(should, Assertion) { - - /** - * Deep object equality comparison. For full spec see [`should-equal tests`](https://github.com/shouldjs/equal/blob/master/test.js). - * - * @name eql - * @memberOf Assertion - * @category assertion equality - * @param {*} val Expected value - * @param {string} [description] Optional message - * @example - * - * (10).should.be.eql(10); - * ('10').should.not.be.eql(10); - * (-0).should.not.be.eql(+0); - * - * NaN.should.be.eql(NaN); - * - * ({ a: 10}).should.be.eql({ a: 10 }); - * [ 'a' ].should.not.be.eql({ '0': 'a' }); - */ - Assertion.add('eql', function(val, description) { - this.params = {operator: 'to equal', expected: val, message: description}; - - var result = eql(this.obj, val, should.config); - this.params.details = result.result ? '' : formatEqlResult(result, this.obj, val); - - this.params.showDiff = eql(type(this.obj), type(val)).result; - - this.assert(result.result); - }); - - /** - * Exact comparison using ===. - * - * @name equal - * @memberOf Assertion - * @category assertion equality - * @alias Assertion#exactly - * @param {*} val Expected value - * @param {string} [description] Optional message - * @example - * - * 10.should.be.equal(10); - * 'a'.should.be.exactly('a'); - * - * should(null).be.exactly(null); - */ - Assertion.add('equal', function(val, description) { - this.params = {operator: 'to be', expected: val, message: description}; - - this.params.showDiff = eql(type(this.obj), type(val)).result; - - this.assert(val === this.obj); - }); - - Assertion.alias('equal', 'exactly'); -}; diff --git a/cli/node_modules/should/lib/ext/error.js b/cli/node_modules/should/lib/ext/error.js deleted file mode 100644 index 73d737ccf..000000000 --- a/cli/node_modules/should/lib/ext/error.js +++ /dev/null @@ -1,109 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ -var util = require('../util'); - -module.exports = function(should, Assertion) { - var i = should.format; - - /** - * Assert given function throws error with such message. - * - * @name throw - * @memberOf Assertion - * @category assertion errors - * @alias Assertion#throwError - * @param {string|RegExp|Function|Object|GeneratorFunction|GeneratorObject} [message] Message to match or properties - * @param {Object} [properties] Optional properties that will be matched to thrown error - * @example - * - * (function(){ throw new Error('fail') }).should.throw(); - * (function(){ throw new Error('fail') }).should.throw('fail'); - * (function(){ throw new Error('fail') }).should.throw(/fail/); - * - * (function(){ throw new Error('fail') }).should.throw(Error); - * var error = new Error(); - * error.a = 10; - * (function(){ throw error; }).should.throw(Error, { a: 10 }); - * (function(){ throw error; }).should.throw({ a: 10 }); - * (function*() { - * yield throwError(); - * }).should.throw(); - */ - Assertion.add('throw', function(message, properties) { - var fn = this.obj - , err = {} - , errorInfo = '' - , thrown = false; - - if(util.isGeneratorFunction(fn)) { - return should(fn()).throw(message, properties); - } else if(util.isGeneratorObject(fn)) { - return should(fn.next.bind(fn)).throw(message, properties); - } - - this.is.a.Function(); - - var errorMatched = true; - - try { - fn(); - } catch(e) { - thrown = true; - err = e; - } - - if(thrown) { - if(message) { - if('string' == typeof message) { - errorMatched = message == err.message; - } else if(message instanceof RegExp) { - errorMatched = message.test(err.message); - } else if('function' == typeof message) { - errorMatched = err instanceof message; - } else if(null != message) { - try { - should(err).match(message); - } catch(e) { - if(e instanceof should.AssertionError) { - errorInfo = ": " + e.message; - errorMatched = false; - } else { - throw e; - } - } - } - - if(!errorMatched) { - if('string' == typeof message || message instanceof RegExp) { - errorInfo = " with a message matching " + i(message) + ", but got '" + err.message + "'"; - } else if('function' == typeof message) { - errorInfo = " of type " + util.functionName(message) + ", but got " + util.functionName(err.constructor); - } - } else if('function' == typeof message && properties) { - try { - should(err).match(properties); - } catch(e) { - if(e instanceof should.AssertionError) { - errorInfo = ": " + e.message; - errorMatched = false; - } else { - throw e; - } - } - } - } else { - errorInfo = " (got " + i(err) + ")"; - } - } - - this.params = { operator: 'to throw exception' + errorInfo }; - - this.assert(thrown); - this.assert(errorMatched); - }); - - Assertion.alias('throw', 'throwError'); -}; diff --git a/cli/node_modules/should/lib/ext/match.js b/cli/node_modules/should/lib/ext/match.js deleted file mode 100644 index ec610dd37..000000000 --- a/cli/node_modules/should/lib/ext/match.js +++ /dev/null @@ -1,191 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util'); -var eql = require('should-equal'); - -module.exports = function(should, Assertion) { - var i = should.format; - - /** - * Asserts if given object match `other` object, using some assumptions: - * First object matched if they are equal, - * If `other` is a regexp and given object is a string check on matching with regexp - * If `other` is a regexp and given object is an array check if all elements matched regexp - * If `other` is a regexp and given object is an object check values on matching regexp - * If `other` is a function check if this function throws AssertionError on given object or return false - it will be assumed as not matched - * If `other` is an object check if the same keys matched with above rules - * All other cases failed - * - * @name match - * @memberOf Assertion - * @category assertion matching - * @param {*} other Object to match - * @param {string} [description] Optional message - * @example - * 'foobar'.should.match(/^foo/); - * 'foobar'.should.not.match(/^bar/); - * - * ({ a: 'foo', c: 'barfoo' }).should.match(/foo$/); - * - * ['a', 'b', 'c'].should.match(/[a-z]/); - * - * (5).should.not.match(function(n) { - * return n < 0; - * }); - * (5).should.not.match(function(it) { - * it.should.be.an.Array(); - * }); - * ({ a: 10, b: 'abc', c: { d: 10 }, d: 0 }).should - * .match({ a: 10, b: /c$/, c: function(it) { - * return it.should.have.property('d', 10); - * }}); - * - * [10, 'abc', { d: 10 }, 0].should - * .match({ '0': 10, '1': /c$/, '2': function(it) { - * return it.should.have.property('d', 10); - * }}); - */ - Assertion.add('match', function(other, description) { - this.params = {operator: 'to match ' + i(other), message: description}; - - if(!eql(this.obj, other).result) { - if(other instanceof RegExp) { // something - regex - - if(typeof this.obj == 'string') { - - this.assert(other.exec(this.obj)); - } else if(util.isIndexable(this.obj)) { - util.forEach(this.obj, function(item) { - this.assert(other.exec(item));// should we try to convert to String and exec? - }, this); - } else if(null != this.obj && typeof this.obj == 'object') { - - var notMatchedProps = [], matchedProps = []; - util.forEach(this.obj, function(value, name) { - if(other.exec(value)) matchedProps.push(util.formatProp(name)); - else notMatchedProps.push(util.formatProp(name) + ' (' + i(value) + ')'); - }, this); - - if(notMatchedProps.length) - this.params.operator += '\n not matched properties: ' + notMatchedProps.join(', '); - if(matchedProps.length) - this.params.operator += '\n matched properties: ' + matchedProps.join(', '); - - this.assert(notMatchedProps.length == 0); - } // should we try to convert to String and exec? - } else if(typeof other == 'function') { - var res; - - res = other(this.obj); - - //if(res instanceof Assertion) { - // this.params.operator += '\n ' + res.getMessage(); - //} - - //if we throw exception ok - it is used .should inside - if(typeof res == 'boolean') { - this.assert(res); // if it is just boolean function assert on it - } - } else if(other != null && typeof other == 'object') { // try to match properties (for Object and Array) - notMatchedProps = []; - matchedProps = []; - - util.forEach(other, function(value, key) { - try { - should(this.obj[key]).match(value); - matchedProps.push(util.formatProp(key)); - } catch(e) { - if(e instanceof should.AssertionError) { - notMatchedProps.push(util.formatProp(key) + ' (' + i(this.obj[key]) + ')'); - } else { - throw e; - } - } - }, this); - - if(notMatchedProps.length) - this.params.operator += '\n not matched properties: ' + notMatchedProps.join(', '); - if(matchedProps.length) - this.params.operator += '\n matched properties: ' + matchedProps.join(', '); - - this.assert(notMatchedProps.length == 0); - } else { - this.assert(false); - } - } - }); - - /** - * Asserts if given object values or array elements all match `other` object, using some assumptions: - * First object matched if they are equal, - * If `other` is a regexp - matching with regexp - * If `other` is a function check if this function throws AssertionError on given object or return false - it will be assumed as not matched - * All other cases check if this `other` equal to each element - * - * @name matchEach - * @memberOf Assertion - * @category assertion matching - * @alias Assertion#matchSome - * @param {*} other Object to match - * @param {string} [description] Optional message - * @example - * [ 'a', 'b', 'c'].should.matchEach(/\w+/); - * [ 'a', 'a', 'a'].should.matchEach('a'); - * - * [ 'a', 'a', 'a'].should.matchEach(function(value) { value.should.be.eql('a') }); - * - * { a: 'a', b: 'a', c: 'a' }.should.matchEach(function(value) { value.should.be.eql('a') }); - */ - Assertion.add('matchEach', function(other, description) { - this.params = {operator: 'to match each ' + i(other), message: description}; - - util.forEach(this.obj, function(value) { - should(value).match(other); - }, this); - }); - - /** - * Asserts if any of given object values or array elements match `other` object, using some assumptions: - * First object matched if they are equal, - * If `other` is a regexp - matching with regexp - * If `other` is a function check if this function throws AssertionError on given object or return false - it will be assumed as not matched - * All other cases check if this `other` equal to each element - * - * @name matchAny - * @memberOf Assertion - * @category assertion matching - * @param {*} other Object to match - * @alias Assertion#matchEvery - * @param {string} [description] Optional message - * @example - * [ 'a', 'b', 'c'].should.matchAny(/\w+/); - * [ 'a', 'b', 'c'].should.matchAny('a'); - * - * [ 'a', 'b', 'c'].should.matchAny(function(value) { value.should.be.eql('a') }); - * - * { a: 'a', b: 'b', c: 'c' }.should.matchAny(function(value) { value.should.be.eql('a') }); - */ - Assertion.add('matchAny', function(other, description) { - this.params = {operator: 'to match any ' + i(other), message: description}; - - this.assert(util.some(this.obj, function(value) { - try { - should(value).match(other); - return true; - } catch(e) { - if(e instanceof should.AssertionError) { - // Caught an AssertionError, return false to the iterator - return false; - } - throw e; - } - })); - }); - - Assertion.alias('matchAny', 'matchSome'); - Assertion.alias('matchEach', 'matchEvery'); -}; diff --git a/cli/node_modules/should/lib/ext/number.js b/cli/node_modules/should/lib/ext/number.js deleted file mode 100644 index dafbc3aa6..000000000 --- a/cli/node_modules/should/lib/ext/number.js +++ /dev/null @@ -1,123 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - - /** - * Assert given object is NaN - * @name NaN - * @memberOf Assertion - * @category assertion numbers - * @example - * - * (10).should.not.be.NaN(); - * NaN.should.be.NaN(); - */ - Assertion.add('NaN', function() { - this.params = { operator: 'to be NaN' }; - - this.assert(this.obj !== this.obj); - }); - - /** - * Assert given object is not finite (positive or negative) - * - * @name Infinity - * @memberOf Assertion - * @category assertion numbers - * @example - * - * (10).should.not.be.Infinity(); - * NaN.should.not.be.Infinity(); - */ - Assertion.add('Infinity', function() { - this.params = { operator: 'to be Infinity' }; - - this.is.a.Number() - .and.not.a.NaN() - .and.assert(!isFinite(this.obj)); - }); - - /** - * Assert given number between `start` and `finish` or equal one of them. - * - * @name within - * @memberOf Assertion - * @category assertion numbers - * @param {number} start Start number - * @param {number} finish Finish number - * @param {string} [description] Optional message - * @example - * - * (10).should.be.within(0, 20); - */ - Assertion.add('within', function(start, finish, description) { - this.params = { operator: 'to be within ' + start + '..' + finish, message: description }; - - this.assert(this.obj >= start && this.obj <= finish); - }); - - /** - * Assert given number near some other `value` within `delta` - * - * @name approximately - * @memberOf Assertion - * @category assertion numbers - * @param {number} value Center number - * @param {number} delta Radius - * @param {string} [description] Optional message - * @example - * - * (9.99).should.be.approximately(10, 0.1); - */ - Assertion.add('approximately', function(value, delta, description) { - this.params = { operator: 'to be approximately ' + value + " ±" + delta, message: description }; - - this.assert(Math.abs(this.obj - value) <= delta); - }); - - /** - * Assert given number above `n`. - * - * @name above - * @alias Assertion#greaterThan - * @memberOf Assertion - * @category assertion numbers - * @param {number} n Margin number - * @param {string} [description] Optional message - * @example - * - * (10).should.be.above(0); - */ - Assertion.add('above', function(n, description) { - this.params = { operator: 'to be above ' + n, message: description }; - - this.assert(this.obj > n); - }); - - /** - * Assert given number below `n`. - * - * @name below - * @alias Assertion#lessThan - * @memberOf Assertion - * @category assertion numbers - * @param {number} n Margin number - * @param {string} [description] Optional message - * @example - * - * (0).should.be.above(10); - */ - Assertion.add('below', function(n, description) { - this.params = { operator: 'to be below ' + n, message: description }; - - this.assert(this.obj < n); - }); - - Assertion.alias('above', 'greaterThan'); - Assertion.alias('below', 'lessThan'); - -}; diff --git a/cli/node_modules/should/lib/ext/property.js b/cli/node_modules/should/lib/ext/property.js deleted file mode 100644 index 269ec2373..000000000 --- a/cli/node_modules/should/lib/ext/property.js +++ /dev/null @@ -1,370 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util'); -var eql = require('should-equal'); - -var aSlice = Array.prototype.slice; - -module.exports = function(should, Assertion) { - var i = should.format; - /** - * Asserts given object has some descriptor. **On success it change given object to be value of property**. - * - * @name propertyWithDescriptor - * @memberOf Assertion - * @category assertion property - * @param {string} name Name of property - * @param {Object} desc Descriptor like used in Object.defineProperty (not required to add all properties) - * @example - * - * ({ a: 10 }).should.have.propertyWithDescriptor('a', { enumerable: true }); - */ - Assertion.add('propertyWithDescriptor', function(name, desc) { - this.params = {actual: this.obj, operator: 'to have own property with descriptor ' + i(desc)}; - var obj = this.obj; - this.have.ownProperty(name); - should(Object.getOwnPropertyDescriptor(Object(obj), name)).have.properties(desc); - }); - - function processPropsArgs() { - var args = {}; - if(arguments.length > 1) { - args.names = aSlice.call(arguments); - } else { - var arg = arguments[0]; - if(typeof arg === 'string') { - args.names = [arg]; - } else if(util.isIndexable(arg)) { - args.names = arg; - } else { - args.names = Object.keys(arg); - args.values = arg; - } - } - return args; - } - - - /** - * Asserts given object has enumerable property with optionally value. **On success it change given object to be value of property**. - * - * @name enumerable - * @memberOf Assertion - * @category assertion property - * @param {string} name Name of property - * @param {*} [val] Optional property value to check - * @example - * - * ({ a: 10 }).should.have.enumerable('a'); - */ - Assertion.add('enumerable', function(name, val) { - name = util.convertPropertyName(name); - - this.params = { - operator: "to have enumerable property " + util.formatProp(name) + (arguments.length > 1 ? " equal to " + i(val): "") - }; - - var desc = { enumerable: true }; - if(arguments.length > 1) desc.value = val; - this.have.propertyWithDescriptor(name, desc); - }); - - /** - * Asserts given object has enumerable properties - * - * @name enumerables - * @memberOf Assertion - * @category assertion property - * @param {Array|...string|Object} names Names of property - * @example - * - * ({ a: 10, b: 10 }).should.have.enumerables('a'); - */ - Assertion.add('enumerables', function(names) { - var args = processPropsArgs.apply(null, arguments); - - this.params = { - operator: "to have enumerables " + args.names.map(util.formatProp) - }; - - var obj = this.obj; - args.names.forEach(function(name) { - should(obj).have.enumerable(name); - }); - }); - - /** - * Asserts given object has property with optionally value. **On success it change given object to be value of property**. - * - * @name property - * @memberOf Assertion - * @category assertion property - * @param {string} name Name of property - * @param {*} [val] Optional property value to check - * @example - * - * ({ a: 10 }).should.have.property('a'); - */ - Assertion.add('property', function(name, val) { - name = util.convertPropertyName(name); - if(arguments.length > 1) { - var p = {}; - p[name] = val; - this.have.properties(p); - } else { - this.have.properties(name); - } - this.obj = this.obj[name]; - }); - - /** - * Asserts given object has properties. On this method affect .any modifier, which allow to check not all properties. - * - * @name properties - * @memberOf Assertion - * @category assertion property - * @param {Array|...string|Object} names Names of property - * @example - * - * ({ a: 10 }).should.have.properties('a'); - * ({ a: 10, b: 20 }).should.have.properties([ 'a' ]); - * ({ a: 10, b: 20 }).should.have.properties({ b: 20 }); - */ - Assertion.add('properties', function(names) { - var values = {}; - if(arguments.length > 1) { - names = aSlice.call(arguments); - } else if(!Array.isArray(names)) { - if(typeof names == 'string' || typeof names == 'symbol') { - names = [names]; - } else { - values = names; - names = Object.keys(names); - } - } - - var obj = Object(this.obj), missingProperties = []; - - //just enumerate properties and check if they all present - names.forEach(function(name) { - if(!(name in obj)) missingProperties.push(util.formatProp(name)); - }); - - var props = missingProperties; - if(props.length === 0) { - props = names.map(util.formatProp); - } else if(this.anyOne) { - props = names.filter(function(name) { - return missingProperties.indexOf(util.formatProp(name)) < 0; - }).map(util.formatProp); - } - - var operator = (props.length === 1 ? - 'to have property ' : 'to have ' + (this.anyOne ? 'any of ' : '') + 'properties ') + props.join(', '); - - this.params = {obj: this.obj, operator: operator}; - - //check that all properties presented - //or if we request one of them that at least one them presented - this.assert(missingProperties.length === 0 || (this.anyOne && missingProperties.length != names.length)); - - // check if values in object matched expected - var valueCheckNames = Object.keys(values); - if(valueCheckNames.length) { - var wrongValues = []; - props = []; - - // now check values, as there we have all properties - valueCheckNames.forEach(function(name) { - var value = values[name]; - if(!eql(obj[name], value).result) { - wrongValues.push(util.formatProp(name) + ' of ' + i(value) + ' (got ' + i(obj[name]) + ')'); - } else { - props.push(util.formatProp(name) + ' of ' + i(value)); - } - }); - - if((wrongValues.length !== 0 && !this.anyOne) || (this.anyOne && props.length === 0)) { - props = wrongValues; - } - - operator = (props.length === 1 ? - 'to have property ' : 'to have ' + (this.anyOne ? 'any of ' : '') + 'properties ') + props.join(', '); - - this.params = {obj: this.obj, operator: operator}; - - //if there is no not matched values - //or there is at least one matched - this.assert(wrongValues.length === 0 || (this.anyOne && wrongValues.length != valueCheckNames.length)); - } - }); - - /** - * Asserts given object has property `length` with given value `n` - * - * @name length - * @alias Assertion#lengthOf - * @memberOf Assertion - * @category assertion property - * @param {number} n Expected length - * @param {string} [description] Optional message - * @example - * - * [1, 2].should.have.length(2); - */ - Assertion.add('length', function(n, description) { - this.have.property('length', n, description); - }); - - Assertion.alias('length', 'lengthOf'); - - var hasOwnProperty = Object.prototype.hasOwnProperty; - - /** - * Asserts given object has own property. **On success it change given object to be value of property**. - * - * @name ownProperty - * @alias Assertion#hasOwnProperty - * @memberOf Assertion - * @category assertion property - * @param {string} name Name of property - * @param {string} [description] Optional message - * @example - * - * ({ a: 10 }).should.have.ownProperty('a'); - */ - Assertion.add('ownProperty', function(name, description) { - name = util.convertPropertyName(name); - this.params = { - actual: this.obj, - operator: 'to have own property ' + util.formatProp(name), - message: description - }; - - this.assert(hasOwnProperty.call(this.obj, name)); - - this.obj = this.obj[name]; - }); - - Assertion.alias('ownProperty', 'hasOwnProperty'); - - /** - * Asserts given object is empty. For strings, arrays and arguments it checks .length property, for objects it checks keys. - * - * @name empty - * @memberOf Assertion - * @category assertion property - * @example - * - * ''.should.be.empty(); - * [].should.be.empty(); - * ({}).should.be.empty(); - */ - Assertion.add('empty', function() { - this.params = {operator: 'to be empty'}; - - if(util.length(this.obj) !== void 0) { - should(this.obj).have.property('length', 0); - } else { - var obj = Object(this.obj); // wrap to reference for booleans and numbers - for(var prop in obj) { - should(this.obj).not.have.ownProperty(prop); - } - } - }, true); - - /** - * Asserts given object has exact keys. Compared to `properties`, `keys` does not accept Object as a argument. - * - * @name keys - * @alias Assertion#key - * @memberOf Assertion - * @category assertion property - * @param {Array|...string} [keys] Keys to check - * @example - * - * ({ a: 10 }).should.have.keys('a'); - * ({ a: 10, b: 20 }).should.have.keys('a', 'b'); - * ({ a: 10, b: 20 }).should.have.keys([ 'a', 'b' ]); - * ({}).should.have.keys(); - */ - Assertion.add('keys', function(keys) { - if(arguments.length > 1) keys = aSlice.call(arguments); - else if(arguments.length === 1 && typeof keys === 'string') keys = [keys]; - else if(arguments.length === 0) keys = []; - - keys = keys.map(String); - - var obj = Object(this.obj); - - // first check if some keys are missing - var missingKeys = []; - keys.forEach(function(key) { - if(!hasOwnProperty.call(this.obj, key)) - missingKeys.push(util.formatProp(key)); - }, this); - - // second check for extra keys - var extraKeys = []; - Object.keys(obj).forEach(function(key) { - if(keys.indexOf(key) < 0) { - extraKeys.push(util.formatProp(key)); - } - }); - - var verb = keys.length === 0 ? 'to be empty' : - 'to have ' + (keys.length === 1 ? 'key ' : 'keys '); - - this.params = {operator: verb + keys.map(util.formatProp).join(', ')}; - - if(missingKeys.length > 0) - this.params.operator += '\n\tmissing keys: ' + missingKeys.join(', '); - - if(extraKeys.length > 0) - this.params.operator += '\n\textra keys: ' + extraKeys.join(', '); - - this.assert(missingKeys.length === 0 && extraKeys.length === 0); - }); - - Assertion.alias("keys", "key"); - - /** - * Asserts given object has nested property in depth by path. **On success it change given object to be value of final property**. - * - * @name propertyByPath - * @memberOf Assertion - * @category assertion property - * @param {Array|...string} properties Properties path to search - * @example - * - * ({ a: {b: 10}}).should.have.propertyByPath('a', 'b').eql(10); - */ - Assertion.add('propertyByPath', function(properties) { - if(arguments.length > 1) properties = aSlice.call(arguments); - else if(arguments.length === 1 && typeof properties == 'string') properties = [properties]; - else if(arguments.length === 0) properties = []; - - var allProps = properties.map(util.formatProp); - - properties = properties.map(String); - - var obj = should(Object(this.obj)); - - var foundProperties = []; - - var currentProperty; - while(currentProperty = properties.shift()) { - this.params = {operator: 'to have property by path ' + allProps.join(', ') + ' - failed on ' + util.formatProp(currentProperty)}; - obj = obj.have.property(currentProperty); - foundProperties.push(currentProperty); - } - - this.params = {obj: this.obj, operator: 'to have property by path ' + allProps.join(', ')}; - - this.obj = obj.obj; - }); -}; diff --git a/cli/node_modules/should/lib/ext/string.js b/cli/node_modules/should/lib/ext/string.js deleted file mode 100644 index 88a20113e..000000000 --- a/cli/node_modules/should/lib/ext/string.js +++ /dev/null @@ -1,41 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - /** - * Assert given string starts with prefix - * @name startWith - * @memberOf Assertion - * @category assertion strings - * @param {string} str Prefix - * @param {string} [description] Optional message - * @example - * - * 'abc'.should.startWith('a'); - */ - Assertion.add('startWith', function(str, description) { - this.params = { operator: 'to start with ' + should.format(str), message: description }; - - this.assert(0 === this.obj.indexOf(str)); - }); - - /** - * Assert given string starts with prefix - * @name endWith - * @memberOf Assertion - * @category assertion strings - * @param {string} str Prefix - * @param {string} [description] Optional message - * @example - * - * 'abca'.should.endWith('a'); - */ - Assertion.add('endWith', function(str, description) { - this.params = { operator: 'to end with ' + should.format(str), message: description }; - - this.assert(this.obj.indexOf(str, this.obj.length - str.length) >= 0); - }); -}; diff --git a/cli/node_modules/should/lib/ext/type.js b/cli/node_modules/should/lib/ext/type.js deleted file mode 100644 index de44caceb..000000000 --- a/cli/node_modules/should/lib/ext/type.js +++ /dev/null @@ -1,224 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util'); - -module.exports = function(should, Assertion) { - /** - * Assert given object is number - * @name Number - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('Number', function() { - this.params = {operator: 'to be a number'}; - - this.have.type('number'); - }); - - /** - * Assert given object is arguments - * @name arguments - * @alias Assertion#Arguments - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('arguments', function() { - this.params = {operator: 'to be arguments'}; - - this.have.class('Arguments'); - }); - - Assertion.alias('arguments', 'Arguments'); - - /** - * Assert given object has some type using `typeof` - * @name type - * @memberOf Assertion - * @param {string} type Type name - * @param {string} [description] Optional message - * @category assertion types - */ - Assertion.add('type', function(type, description) { - this.params = {operator: 'to have type ' + type, message: description}; - - should(typeof this.obj).be.exactly(type); - }); - - /** - * Assert given object is instance of `constructor` - * @name instanceof - * @alias Assertion#instanceOf - * @memberOf Assertion - * @param {Function} constructor Constructor function - * @param {string} [description] Optional message - * @category assertion types - */ - Assertion.add('instanceof', function(constructor, description) { - this.params = {operator: 'to be an instance of ' + util.functionName(constructor), message: description}; - - this.assert(Object(this.obj) instanceof constructor); - }); - - Assertion.alias('instanceof', 'instanceOf'); - - /** - * Assert given object is function - * @name Function - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('Function', function() { - this.params = {operator: 'to be a function'}; - - this.have.type('function'); - }); - - /** - * Assert given object is object - * @name Object - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('Object', function() { - this.params = {operator: 'to be an object'}; - - this.is.not.null().and.have.type('object'); - }); - - /** - * Assert given object is string - * @name String - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('String', function() { - this.params = {operator: 'to be a string'}; - - this.have.type('string'); - }); - - /** - * Assert given object is array - * @name Array - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('Array', function() { - this.params = {operator: 'to be an array'}; - - this.have.class('Array'); - }); - - /** - * Assert given object is boolean - * @name Boolean - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('Boolean', function() { - this.params = {operator: 'to be a boolean'}; - - this.have.type('boolean'); - }); - - /** - * Assert given object is error - * @name Error - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('Error', function() { - this.params = {operator: 'to be an error'}; - - this.have.instanceOf(Error); - }); - - /** - * Assert given object is null - * @name null - * @alias Assertion#Null - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('null', function() { - this.params = {operator: 'to be null'}; - - this.assert(this.obj === null); - }); - - Assertion.alias('null', 'Null'); - - /** - * Assert given object has some internal [[Class]], via Object.prototype.toString call - * @name class - * @alias Assertion#Class - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('class', function(cls) { - this.params = {operator: 'to have [[Class]] ' + cls}; - - this.assert(Object.prototype.toString.call(this.obj) === '[object ' + cls + ']'); - }); - - Assertion.alias('class', 'Class'); - - /** - * Assert given object is undefined - * @name undefined - * @alias Assertion#Undefined - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('undefined', function() { - this.params = {operator: 'to be undefined'}; - - this.assert(this.obj === void 0); - }); - - Assertion.alias('undefined', 'Undefined'); - - /** - * Assert given object supports es6 iterable protocol (just check - * that object has property Symbol.iterator, which is a function) - * @name iterable - * @memberOf Assertion - * @category assertion es6 - */ - Assertion.add('iterable', function() { - this.params = {operator: 'to be iterable'}; - - should(this.obj).have.property(Symbol.iterator).which.is.a.Function(); - }); - - /** - * Assert given object supports es6 iterator protocol (just check - * that object has property next, which is a function) - * @name iterator - * @memberOf Assertion - * @category assertion es6 - */ - Assertion.add('iterator', function() { - this.params = {operator: 'to be iterator'}; - - should(this.obj).have.property('next').which.is.a.Function(); - }); - - /** - * Assert given object is a generator object - * @name generator - * @memberOf Assertion - * @category assertion es6 - */ - Assertion.add('generator', function() { - this.params = {operator: 'to be generator'}; - - should(this.obj).be.iterable - .and.iterator - .and.it.is.equal(this.obj[Symbol.iterator]()); - }); -}; diff --git a/cli/node_modules/should/lib/should.js b/cli/node_modules/should/lib/should.js deleted file mode 100644 index 35d0a135e..000000000 --- a/cli/node_modules/should/lib/should.js +++ /dev/null @@ -1,158 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - - -var util = require('./util'); - -/** - * Our function should - * - * @param {*} obj Object to assert - * @returns {should.Assertion} Returns new Assertion for beginning assertion chain - * @example - * - * var should = require('should'); - * should('abc').be.a.String(); - */ -var should = function should(obj) { - return (new should.Assertion(obj)); -}; - -should.AssertionError = require('./assertion-error'); -should.Assertion = require('./assertion'); - -should.format = util.format; -should.type = require('should-type'); -should.util = util; - -/** - * Object with configuration. - * It contains such properties: - * * `checkProtoEql` boolean - Affect if `.eql` will check objects prototypes - * Also it can contain options for should-format. - * - * @type {Object} - * @memberOf should - * @static - * @example - * - * var a = { a: 10 }, b = Object.create(null); - * b.a = 10; - * - * a.should.be.eql(b); - * //not throws - * - * should.config.checkProtoEql = true; - * a.should.be.eql(b); - * //throws AssertionError: expected { a: 10 } to equal { a: 10 } (because A and B have different prototypes) - */ -should.config = require('./config'); - -//Expose should to external world. -exports = module.exports = should; - -/** - * Allow to extend given prototype with should property using given name. This getter will **unwrap** all standard wrappers like `Number`, `Boolean`, `String`. - * Using `should(obj)` is the equivalent of using `obj.should` with known issues (like nulls and method calls etc). - * - * @param {string} [propertyName] Name of property to add. Default is `'should'`. - * @param {Object} [proto] Prototype to extend with. Default is `Object.prototype`. - * @memberOf should - * @returns {{ name: string, descriptor: Object, proto: Object }} Descriptor enough to return all back - * @static - * @example - * - * var prev = should.extend('must', Object.prototype); - * - * 'abc'.must.startWith('a'); - * - * var should = should.noConflict(prev); - * should.not.exist(Object.prototype.must); - */ -should.extend = function(propertyName, proto) { - propertyName = propertyName || 'should'; - proto = proto || Object.prototype; - - var prevDescriptor = Object.getOwnPropertyDescriptor(proto, propertyName); - - Object.defineProperty(proto, propertyName, { - set: function() { - }, - get: function() { - return should(util.isWrapperType(this) ? this.valueOf() : this); - }, - configurable: true - }); - - return { name: propertyName, descriptor: prevDescriptor, proto: proto }; -}; - -/** - * Delete previous extension. If `desc` missing it will remove default extension. - * - * @param {{ name: string, descriptor: Object, proto: Object }} [desc] Returned from `should.extend` object - * @memberOf should - * @returns {Function} Returns should function - * @static - * @example - * - * var should = require('should').noConflict(); - * - * should(Object.prototype).not.have.property('should'); - * - * var prev = should.extend('must', Object.prototype); - * 'abc'.must.startWith('a'); - * should.noConflict(prev); - * - * should(Object.prototype).not.have.property('must'); - */ -should.noConflict = function(desc) { - desc = desc || should._prevShould; - - if(desc) { - delete desc.proto[desc.name]; - - if(desc.descriptor) { - Object.defineProperty(desc.proto, desc.name, desc.descriptor); - } - } - return should; -}; - -/** - * Simple utility function for a bit more easier should assertion extension - * @param {Function} f So called plugin function. It should accept 2 arguments: `should` function and `Assertion` constructor - * @memberOf should - * @returns {Function} Returns `should` function - * @static - * @example - * - * should.use(function(should, Assertion) { - * Assertion.add('asset', function() { - * this.params = { operator: 'to be asset' }; - * - * this.obj.should.have.property('id').which.is.a.Number(); - * this.obj.should.have.property('path'); - * }) - * }) - */ -should.use = function(f) { - f(should, should.Assertion); - return this; -}; - -should - .use(require('./ext/assert')) - .use(require('./ext/chain')) - .use(require('./ext/bool')) - .use(require('./ext/number')) - .use(require('./ext/eql')) - .use(require('./ext/type')) - .use(require('./ext/string')) - .use(require('./ext/property')) - .use(require('./ext/error')) - .use(require('./ext/match')) - .use(require('./ext/contain')); diff --git a/cli/node_modules/should/lib/util.js b/cli/node_modules/should/lib/util.js deleted file mode 100644 index 0ffbbbee8..000000000 --- a/cli/node_modules/should/lib/util.js +++ /dev/null @@ -1,135 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var type = require('should-type'); -var config = require('./config'); - -/** - * Check if given obj just a primitive type wrapper - * @param {Object} obj - * @returns {boolean} - * @private - */ -exports.isWrapperType = function(obj) { - return obj instanceof Number || obj instanceof String || obj instanceof Boolean; -}; - -exports.merge = function(a, b) { - if(a && b) { - for(var key in b) { - a[key] = b[key]; - } - } - return a; -}; - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -exports.forEach = function forEach(obj, f, context) { - if(exports.isGeneratorFunction(obj)) { - return forEach(obj(), f, context); - } else if (exports.isGeneratorObject(obj)) { - var value = obj.next(); - while(!value.done) { - if(f.call(context, value.value, 'value', obj) === false) - return; - value = obj.next(); - } - } else { - for(var prop in obj) { - if(hasOwnProperty.call(obj, prop)) { - if(f.call(context, obj[prop], prop, obj) === false) - return; - } - } - } -}; - -exports.some = function(obj, f, context) { - var res = false; - exports.forEach(obj, function(value, key) { - if(f.call(context, value, key, obj)) { - res = true; - return false; - } - }, context); - return res; -}; - -exports.isEmptyObject = function(obj) { - for(var prop in obj) { - if(hasOwnProperty.call(obj, prop)) { - return false; - } - } - return true; -}; - -exports.isIndexable = function(obj) { - var t = type(obj); - return (t.type === type.OBJECT && t.cls === type.ARRAY) || - (t.type === type.OBJECT && t.cls === type.BUFFER) || - (t.type === type.OBJECT && t.cls === type.ARGUMENTS) || - (t.type === type.OBJECT && t.cls === type.ARRAY_BUFFER) || - (t.type === type.OBJECT && t.cls === type.TYPED_ARRAY) || - (t.type === type.OBJECT && t.cls === type.DATA_VIEW) || - (t.type === type.OBJECT && t.cls === type.STRING) || - (t.type === type.STRING); -}; - -exports.length = function(obj) { - var t = type(obj); - switch(t.type) { - case type.STRING: - return obj.length; - case type.OBJECT: - switch(t.cls) { - case type.ARRAY_BUFFER: - case type.TYPED_ARRAY: - case type.DATA_VIEW: - return obj.byteLength; - - case type.ARRAY: - case type.BUFFER: - case type.ARGUMENTS: - case type.FUNCTION: - return obj.length; - } - } -}; - -exports.convertPropertyName = function(name) { - if(typeof name == 'symbol') { - return name; - } else { - return String(name); - } -}; - -exports.isGeneratorObject = function(obj) { - if(!obj) return false; - - return typeof obj.next == 'function' && - typeof obj[Symbol.iterator] == 'function' && - obj[Symbol.iterator]() === obj; -}; - -//TODO find better way -exports.isGeneratorFunction = function(f) { - if(typeof f != 'function') return false; - - return /^function\s*\*\s*/.test(f.toString()); -}; - -exports.format = function(value, opts) { - return config.getFormatter(opts).format(value); -}; - -exports.functionName = require('should-format').Formatter.functionName; - -exports.formatProp = function(value) { - return config.getFormatter().formatPropertyName(String(value)); -}; diff --git a/cli/node_modules/should/node_modules/should-equal/.eslintrc b/cli/node_modules/should/node_modules/should-equal/.eslintrc deleted file mode 100644 index c491a6ed7..000000000 --- a/cli/node_modules/should/node_modules/should-equal/.eslintrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "env": { - "node": true, - "browser": true - }, - "rules": { - "quotes": false, - "strict": false, - "curly": false, - "eqeqeq": false - } -} diff --git a/cli/node_modules/should/node_modules/should-equal/.npmignore b/cli/node_modules/should/node_modules/should-equal/.npmignore deleted file mode 100644 index 485dee64b..000000000 --- a/cli/node_modules/should/node_modules/should-equal/.npmignore +++ /dev/null @@ -1 +0,0 @@ -.idea diff --git a/cli/node_modules/should/node_modules/should-equal/.travis.yml b/cli/node_modules/should/node_modules/should-equal/.travis.yml deleted file mode 100644 index a355161b2..000000000 --- a/cli/node_modules/should/node_modules/should-equal/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: -- '0.10' -- '0.11' -script: -- npm test \ No newline at end of file diff --git a/cli/node_modules/should/node_modules/should-equal/LICENSE b/cli/node_modules/should/node_modules/should-equal/LICENSE deleted file mode 100644 index 326fe253d..000000000 --- a/cli/node_modules/should/node_modules/should-equal/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/cli/node_modules/should/node_modules/should-equal/README.md b/cli/node_modules/should/node_modules/should-equal/README.md deleted file mode 100644 index 60389bf0a..000000000 --- a/cli/node_modules/should/node_modules/should-equal/README.md +++ /dev/null @@ -1,20 +0,0 @@ -equal -===== - -[![Build Status](https://travis-ci.org/shouldjs/equal.svg?branch=master)](https://travis-ci.org/shouldjs/equal) - -Deep equality comparison implementation for should.js - -Function return an object that have result of comparison and description of fail: - -```js -> var a = {a:1,b:2,c:3,d:4,e:5,f:6,g:7,h:8,i:9,j:10}, -... b = {a:1,b:2,c:3,d:4,e:5,f:6,g:7,h:7,i:9,j:10}; -undefined -> eql(a, b); -{ result: false, - path: [ 'h' ], - reason: 'A and B are not equal', - a: 8, - b: 7 } -``` diff --git a/cli/node_modules/should/node_modules/should-equal/format.js b/cli/node_modules/should/node_modules/should-equal/format.js deleted file mode 100644 index 94dbfc14b..000000000 --- a/cli/node_modules/should/node_modules/should-equal/format.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = function format(msg) { - var args = arguments; - for(var i = 1, l = args.length; i < l; i++) { - msg = msg.replace(/%s/, args[i]); - } - return msg; -} diff --git a/cli/node_modules/should/node_modules/should-equal/index.js b/cli/node_modules/should/node_modules/should-equal/index.js deleted file mode 100644 index 5a0c6b9db..000000000 --- a/cli/node_modules/should/node_modules/should-equal/index.js +++ /dev/null @@ -1,340 +0,0 @@ -var getType = require('should-type'); -var format = require('./format'); -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function makeResult(r, path, reason, a, b) { - var o = {result: r}; - if(!r) { - o.path = path; - o.reason = reason; - o.a = a; - o.b = b; - } - return o; -} - -var EQUALS = makeResult(true); - -function typeToString(t) { - return t.type + (t.cls ? '(' + t.cls + (t.sub ? ' ' + t.sub : '') + ')' : ''); -} - - - -var REASON = { - PLUS_0_AND_MINUS_0: '+0 is not equal to -0', - DIFFERENT_TYPES: 'A has type %s and B has type %s', - NAN_NUMBER: 'NaN is not equal to any number', - EQUALITY: 'A is not equal to B', - EQUALITY_PROTOTYPE: 'A and B have different prototypes', - WRAPPED_VALUE: 'A wrapped value is not equal to B wrapped value', - FUNCTION_SOURCES: 'function A is not equal to B by source code value (via .toString call)', - MISSING_KEY: '%s has no key %s', - CIRCULAR_VALUES: 'A has circular reference that was visited not in the same time as B', - SET_MAP_MISSING_KEY: 'Set/Map missing key', - MAP_VALUE_EQUALITY: 'Values of the same key in A and B is not equal' -}; - -function eqInternal(a, b, opts, stackA, stackB, path) { - var r = EQUALS; - - function result(comparison, reason) { - return makeResult(comparison, path, reason, a, b); - } - - function checkPropertyEquality(property) { - return eqInternal(a[property], b[property], opts, stackA, stackB, path.concat([property])); - } - - - // equal a and b exit early - if(a === b) { - // check for +0 !== -0; - return result(a !== 0 || (1 / a == 1 / b), REASON.PLUS_0_AND_MINUS_0); - } - - var l, p; - - var typeA = getType(a), - typeB = getType(b); - - // if objects has different types they are not equals - var typeDifferents = typeA.type !== typeB.type || typeA.cls !== typeB.cls; - - if(typeDifferents || ((opts.checkSubType && typeA.sub !== typeB.sub) || !opts.checkSubType)) { - return result(false, format(REASON.DIFFERENT_TYPES, typeToString(typeA), typeToString(typeB))); - } - - //early checks for types - switch(typeA.type) { - case 'number': - // NaN !== NaN - return (a !== a) ? result(b !== b, REASON.NAN_NUMBER) - // but treat `+0` vs. `-0` as not equal - : (a === 0 ? result(1 / a === 1 / b, REASON.PLUS_0_AND_MINUS_0) : result(a === b, REASON.EQUALITY)); - - case 'boolean': - case 'string': - return result(a === b, REASON.EQUALITY); - - case 'function': - var fA = a.toString(), fB = b.toString(); - r = eqInternal(fA, fB, opts, stackA, stackB, path); - if(!r.result) { - r.reason = REASON.FUNCTION_SOURCES; - return r; - } - - break;//check user properties - - case 'object': - // additional checks for object instances - switch(typeA.cls) { - // check regexp flags - // TODO add es6 flags - case 'regexp': - p = ['source', 'global', 'multiline', 'lastIndex', 'ignoreCase']; - while(p.length) { - r = checkPropertyEquality(p.shift()); - if(!r.result) return r; - } - break;//check user properties - - //check by timestamp only - case 'date': - if(+a !== +b) { - return result(false, REASON.EQUALITY); - } - break;//check user properties - - //primitive type wrappers - case 'number': - case 'boolean': - case 'string': - r = eqInternal(a.valueOf(), b.valueOf(), opts, stackA, stackB, path); - if(!r.result) { - r.reason = REASON.WRAPPED_VALUE; - return r; - } - break;//check user properties - - //node buffer - case 'buffer': - //if length different it is obviously different - r = checkPropertyEquality('length'); - if(!r.result) return r; - - l = a.length; - while(l--) { - r = checkPropertyEquality(l); - if(!r.result) return r; - } - - //we do not check for user properties because - //node Buffer have some strange hidden properties - return EQUALS; - - case 'error': - //check defined properties - p = ['name', 'message']; - while(p.length) { - r = checkPropertyEquality(p.shift()); - if(!r.result) return r; - } - - break;//check user properties - - case 'array': - case 'arguments': - case 'typed-array': - r = checkPropertyEquality('length'); - if(!r.result) return r; - - break;//check user properties - - case 'array-buffer': - r = checkPropertyEquality('byteLength'); - if(!r.result) return r; - - break;//check user properties - - case 'map': - case 'set': - r = checkPropertyEquality('size'); - if(!r.result) return r; - - stackA.push(a); - stackB.push(b); - - var itA = a.entries(); - var nextA = itA.next(); - - while(!nextA.done) { - var key = nextA.value[0]; - //first check for primitive key if we can do light check - //using .has and .get - if(getType(key).type != 'object') { - if(b.has(key)) { - if(typeA.cls == 'map') { - //for map we also check its value to be equal - var value = b.get(key); - r = eqInternal(nextA.value[1], value, opts, stackA, stackB, path); - if(!r.result) { - r.a = nextA.value; - r.b = value; - r.reason = REASON.MAP_VALUE_EQUALITY; - - break; - } - } - - } else { - r = result(false, REASON.SET_MAP_MISSING_KEY); - r.a = key; - r.b = key; - - break; - } - } else { - //heavy check - //we search by iterator for key equality using equal - var itB = b.entries(); - var nextB = itB.next(); - - while(!nextB.done) { - //first check for keys - r = eqInternal(nextA.value[0], nextB.value[0], opts, stackA, stackB, path); - - if(!r.result) { - r.reason = REASON.SET_MAP_MISSING_KEY; - r.a = key; - r.b = key; - } else { - if(typeA.cls == 'map') { - r = eqInternal(nextA.value[1], nextB.value[1], opts, stackA, stackB, path); - - if(!r.result) { - r.a = nextA.value; - r.b = nextB.value; - r.reason = REASON.MAP_VALUE_EQUALITY; - } - } - - break; - } - - nextB = itB.next(); - } - } - - if(!r.result) { - break; - } - - nextA = itA.next(); - } - - stackA.pop(); - stackB.pop(); - - if(!r.result) { - r.reason = REASON.SET_MAP_MISSING_ENTRY; - return r; - } - - break; //check user properties - } - } - - // compare deep objects and arrays - // stacks contain references only - // - - l = stackA.length; - while(l--) { - if(stackA[l] == a) { - return result(stackB[l] == b, REASON.CIRCULAR_VALUES); - } - } - - // add `a` and `b` to the stack of traversed objects - stackA.push(a); - stackB.push(b); - - var key; - - for(key in b) { - if(hasOwnProperty.call(b, key)) { - r = result(hasOwnProperty.call(a, key), format(REASON.MISSING_KEY, 'A', key)); - if(!r.result) { - break; - } - - if(r.result) { - r = checkPropertyEquality(key); - if(!r.result) { - break; - } - } - } - } - - if(r.result) { - // ensure both objects have the same number of properties - for(key in a) { - if(hasOwnProperty.call(a, key)) { - r = result(hasOwnProperty.call(b, key), format(REASON.MISSING_KEY, 'B', key)); - if(!r.result) { - return r; - } - } - } - } - - stackA.pop(); - stackB.pop(); - - if(!r.result) return r; - - var prototypesEquals = false, canComparePrototypes = false; - - if(opts.checkProtoEql) { - if(Object.getPrototypeOf) {//TODO should i check prototypes for === or use eq? - prototypesEquals = Object.getPrototypeOf(a) === Object.getPrototypeOf(b); - canComparePrototypes = true; - } else if(a.__proto__ && b.__proto__) { - prototypesEquals = a.__proto__ === b.__proto__; - canComparePrototypes = true; - } - - if(canComparePrototypes && !prototypesEquals) { - r = result(prototypesEquals, REASON.EQUALITY_PROTOTYPE); - r.showReason = true; - if(!r.result) { - return r; - } - } - } - - return EQUALS; -} - -var defaultOptions = { - checkProtoEql: true, - checkSubType: true -}; - -function eq(a, b, opts) { - opts = opts || {}; - if(typeof opts.checkProtoEql !== 'boolean') - opts.checkProtoEql = defaultOptions.checkProtoEql; - if(typeof opts.checkSubType !== 'boolean') - opts.checkSubType = defaultOptions.checkSubType; - - var r = eqInternal(a, b, opts, [], [], []); - return r; -} - -module.exports = eq; - -eq.r = REASON; diff --git a/cli/node_modules/should/node_modules/should-equal/package.json b/cli/node_modules/should/node_modules/should-equal/package.json deleted file mode 100644 index 45012eabb..000000000 --- a/cli/node_modules/should/node_modules/should-equal/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "should-equal", - "version": "0.5.0", - "description": "Deep comparison of 2 instances for should.js", - "main": "index.js", - "scripts": { - "test": "mocha --ui bdd -R mocha-better-spec-reporter test.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/shouldjs/equal.git" - }, - "keywords": [ - "should.js", - "deep", - "equal" - ], - "author": { - "name": "Denis Bardadym", - "email": "bardadymchik@gmail.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/shouldjs/equal/issues" - }, - "homepage": "https://github.com/shouldjs/equal", - "devDependencies": { - "mocha": "latest", - "mocha-better-spec-reporter": "latest" - }, - "dependencies": { - "should-type": "0.2.0" - }, - "gitHead": "d0b73b18fd4a799765de477165caf60fee1f9397", - "_id": "should-equal@0.5.0", - "_shasum": "c797f135f3067feb69ebecdb306b1c3fe21b3e6f", - "_from": "should-equal@0.5.0", - "_npmVersion": "2.11.1", - "_nodeVersion": "2.3.0", - "_npmUser": { - "name": "btd", - "email": "bardadymchik@gmail.com" - }, - "maintainers": [ - { - "name": "btd", - "email": "bardadymchik@gmail.com" - } - ], - "dist": { - "shasum": "c797f135f3067feb69ebecdb306b1c3fe21b3e6f", - "tarball": "http://registry.npmjs.org/should-equal/-/should-equal-0.5.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/should-equal/-/should-equal-0.5.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/should/node_modules/should-equal/test.js b/cli/node_modules/should/node_modules/should-equal/test.js deleted file mode 100644 index 352424e2c..000000000 --- a/cli/node_modules/should/node_modules/should-equal/test.js +++ /dev/null @@ -1,420 +0,0 @@ -var assert = require('assert'); -var equal = require('./index'); - -function eq(a, b) { - var r = equal(a, b); - var msg = !r.result && (r.reason + ' at ' + r.path + ' ' + r.a + ' =/= ' + r.b); - if(!r.result) { - assert.equal(a, b, msg); - } - -} - -function ne(a, b) { - var r = equal(a, b); - assert.ok(!r.result); -} - -/* 1. simple tests */ - -/* 1.1. positive */ -it("NaN eqs NaN", function() { - return eq(NaN, NaN); -}); -it("finite integer n eqs n", function() { - return eq(1234, 1234); -}); -it("empty list eqs empty list", function() { - return eq([], []); -}); -it("empty obj eqs empty obj", function() { - return eq({}, {}); -}); -it("number eqs number of same value", function() { - return eq(123.45678, 123.45678); -}); -it("regex lit's w same pattern, flags are eq", function() { - return eq(/^abc[a-zA-Z]/, /^abc[a-zA-Z]/); -}); -it("pods w same properties are eq", function() { - return eq({ - a: 'b', - c: 'd' - }, { - a: 'b', - c: 'd' - }); -}); -it("pods that only differ wrt prop ord are eq", function() { - return eq({ - a: 'b', - c: 'd' - }, { - c: 'd', - a: 'b' - }); -}); - -/* 1.2. negative */ -it("obj doesn't eq list", function() { - return ne({}, []); -}); -it("obj in a list doesn't eq list in list", function() { - return ne([{}], [[]]); -}); -it("integer n doesn't eq rpr n", function() { - return ne(1234, '1234'); -}); -it("integer n doesn't eq n + 1", function() { - return ne(1234, 1235); -}); -it("empty list doesn't eq false", function() { - return ne([], false); -}); -it("list w an integer doesn't eq one w rpr n", function() { - return ne([3], ['3']); -}); -it("regex lit's w diff. patterns, same flags aren't eq", function() { - return ne(/^abc[a-zA-Z]/, /^abc[a-zA-Z]x/); -}); -it("regex lit's w same patterns, diff. flags aren't eq", function() { - return ne(/^abc[a-zA-Z]/, /^abc[a-zA-Z]/i); -}); -it("+0 should ne -0", function() { - return ne(+0, -0); -}); -it("number obj not eqs primitive number of same value", function() { - return ne(5, new Number(5)); -}); -it("string obj not eqs primitive string of same value", function() { - return ne('helo', new String('helo')); -}); -it("(1) bool obj not eqs primitive bool of same value", function() { - return ne(false, new Boolean(false)); -}); -it("(2) bool obj not eqs primitive bool of same value", function() { - return ne(true, new Boolean(true)); -}); -it("number obj eqs the same valued number object", function() { - return eq(new Number(5), new Number(5)); -}); - -/* 2. complex tests */ -it("obj w undef member not eqs other obj w/out same member", function() { - var d, e; - d = { - x: void 0 - }; - e = {}; - return ne(d, e); -}); -it("fn1: functions w same source are eq", function() { - var d, e; - d = function( a, b, c ){ return a * b * c; }; - e = function( a, b, c ){ return a * b * c; }; - return eq(d, e); -}); -it("fn2: functions w diff source aren't eq", function() { - var d, e; - d = function( a, b, c ){ return a * b * c; }; - e = function( a, b, c ){ return a * b * c; }; - return ne(d, e); -}); -it("fn3: equal functions w equal props are eq", function() { - var d, e; - d = function() { - return null; - }; - d.foo = { - some: 'meaningless', - properties: 'here' - }; - e = function() { - return null; - }; - e.foo = { - some: 'meaningless', - properties: 'here' - }; - return eq(d, e); -}); -it("fn4: equal functions w unequal props aren't eq", function() { - var d, e; - d = function() { - return null; - }; - d.foo = { - some: 'meaningless', - properties: 'here' - }; - e = function() { - return null; - }; - e.foo = { - some: 'meaningless', - properties: 'here!!!' - }; - return ne(d, e); -}); -it("list w named member eqs other list w same member", function() { - var d, e; - d = ['foo', null, 3]; - d['extra'] = 42; - e = ['foo', null, 3]; - e['extra'] = 42; - return eq(d, e); -}); -it("list w named member doesn't eq list w same member, other value", function() { - var d, e; - d = ['foo', null, 3]; - d['extra'] = 42; - e = ['foo', null, 3]; - e['extra'] = 108; - return ne(d, e); -}); -it("date eqs other date pointing to same time", function() { - var d, e; - d = new Date("1995-12-17T03:24:00"); - e = new Date("1995-12-17T03:24:00"); - return eq(d, e); -}); -it("date does not eq other date pointing to other time", function() { - var d, e; - d = new Date("1995-12-17T03:24:00"); - e = new Date("1995-12-17T03:24:01"); - return ne(d, e); -}); -it("str obj w props eq same str, same props", function() { - var d, e; - d = new String("helo test"); - d['abc'] = 42; - e = new String("helo test"); - e['abc'] = 42; - return eq(d, e); -}); -it("str obj w props not eq same str, other props", function() { - var d, e; - d = new String("helo test"); - d['abc'] = 42; - e = new String("helo test"); - e['def'] = 42; - return ne(d, e); -}); -it("str obj w props eq same str, same props (circ)", function() { - var c, d, e; - c = ['a list']; - c.push(c); - d = new String("helo test"); - d['abc'] = c; - e = new String("helo test"); - e['abc'] = c; - return eq(d, e); -}); -it("str obj w props not eq same str, other props (circ)", function() { - var c, d, e; - c = ['a list']; - c.push(c); - d = new String("helo test"); - d['abc'] = c; - e = new String("helo test"); - e['def'] = c; - return ne(d, e); -}); -/*it("(1) circ arrays w similar layout, same values aren't eq"] = function() { - var d, e; - d = [1, 2, 3]; - d.push(d); - e = [1, 2, 3]; - e.push(d); - return ne(d, e); -};*/ -it("(2) circ arrays w same layout, same values are eq", function() { - var d, e; - d = [1, 2, 3]; - d.push(d); - e = [1, 2, 3]; - e.push(e); - return eq(d, e); -}); -it("(fkling1) arrays w eq subarrays are eq", function() { - var a, b, bar, foo; - a = [1, 2, 3]; - b = [1, 2, 3]; - foo = [a, a]; - bar = [b, b]; - return eq(foo, bar); -}); -/*it("(fkling2) arrays w eq subarrays but diff distribution aren't eq"] = function() { - var a, b, bar, foo; - a = [1, 2, 3]; - b = [1, 2, 3]; - foo = [a, a]; - bar = [a, b]; - return ne(foo, bar); -};*/ - -/* joshwilsdon's test (https://github.com/joyent/node/issues/7161) */ -it("joshwilsdon", function() { - var count, d1, d2, errors, idx1, idx2, v1, v2, _i, _j, _len, _ref; - d1 = [ - NaN, void 0, null, true, false, Infinity, 0, 1, "a", "b", { - a: 1 - }, { - a: "a" - }, [ - { - a: 1 - } - ], [ - { - a: true - } - ], { - a: 1, - b: 2 - }, [1, 2], [1, 2, 3], { - a: "1" - }, { - a: "1", - b: "2" - } - ]; - d2 = [ - NaN, void 0, null, true, false, Infinity, 0, 1, "a", "b", { - a: 1 - }, { - a: "a" - }, [ - { - a: 1 - } - ], [ - { - a: true - } - ], { - a: 1, - b: 2 - }, [1, 2], [1, 2, 3], { - a: "1" - }, { - a: "1", - b: "2" - } - ]; - errors = []; - count = 0; - for (idx1 = _i = 0, _len = d1.length; _i < _len; idx1 = ++_i) { - v1 = d1[idx1]; - for (idx2 = _j = idx1, _ref = d2.length; idx1 <= _ref ? _j < _ref : _j > _ref; idx2 = idx1 <= _ref ? ++_j : --_j) { - count += 1; - v2 = d2[idx2]; - if (idx1 === idx2) { - if (!eq(v1, v2)) { - //errors.push("eq " + (rpr(v1)) + ", " + (rpr(v2))); - } - } else { - if (!ne(v1, v2)) { - //errors.push("ne " + (rpr(v1)) + ", " + (rpr(v2))); - } - } - } - } - return [count, errors]; -}); -it('node buffer', function() { - eq(new Buffer('abc'), new Buffer('abc')); - ne(new Buffer('abc'), new Buffer('abc1')); - ne(new Buffer('abd'), new Buffer('abc')); -}); -it('RegExp with props', function() { - var re1 = /a/; - re1.lastIndex = 3; - ne(re1, /a/); -}); -it('Date with props', function() { - var now = Date.now(); - - var d1 = new Date(now); - var d2 = new Date(now); - - d1.a = 10; - - ne(d1, d2); -}); -it('Check object prototypes', function() { - var nbRoot = { - toString: function() { return this.first + ' ' + this.last; } - }; - - function nameBuilder(first, last) { - this.first = first; - this.last = last; - return this; - } - nameBuilder.prototype = nbRoot; - - function nameBuilder2(first, last) { - this.first = first; - this.last = last; - return this; - } - nameBuilder2.prototype = nbRoot; - - var nb1 = new nameBuilder('Ryan', 'Dahl'); - var nb2 = new nameBuilder2('Ryan', 'Dahl'); - - eq(nb1, nb2); - - nameBuilder2.prototype = Object; - nb2 = new nameBuilder2('Ryan', 'Dahl'); - - ne(nb1, nb2); -}); - -it('typed arrays and array buffer', function() { - if(typeof Uint8Array !== 'undefined') { - var arr1 = new Uint8Array([21, 31]); - var arr2 = new Uint8Array([21, 31]); - - eq(arr1, arr2); - - eq(arr1.buffer, arr2.buffer); - } -}); - -it('es6 sets', function() { - if(typeof Set !== 'undefined') { - var s1 = new Set([1, 2, 3]); - var s2 = new Set([1, 2, 3]); - var s3 = new Set(['a', 'b', 'c']); - var s4 = new Set([]); - - var s5 = new Set([{ a: 1}, { a: 1}, { a: 1}]); - var s6 = new Set([{ a: 1}, { a: 1}, { a: 1}]); - - eq(s1, s2); - ne(s1, s3); - ne(s1, s4); - ne(s1, s5); - eq(s5, s6); - } -}); - -it('es6 maps', function() { - if(typeof Map !== 'undefined') { - var m1 = new Map([[1, 1], [2, 2], [3, 3]]); - var m2 = new Map([[1, 1], [2, 2], [3, 3]]); - - var m3 = new Map([[1, 2], [2, 3], [3, 4]]); - var m4 = new Map([[{ a: 10}, 2], [{ a: 11}, 2], [{ a: 12}, 2]]); - var m5 = new Map([[{ a: 11}, 2], [{ a: 12}, 2], [{ a: 13}, 2]]); - var m6 = new Map([[{ a: 11}, 2], [{ a: 12}, 2], [{ a: 13}, 2]]); - - eq(m1, m1); - eq(m1, m2); - ne(m3, m2); - ne(m4, m5); - eq(m5, m6); - } -}); diff --git a/cli/node_modules/should/node_modules/should-format/.eslintrc b/cli/node_modules/should/node_modules/should-format/.eslintrc deleted file mode 100644 index ff72293db..000000000 --- a/cli/node_modules/should/node_modules/should-format/.eslintrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "env": { - "browser": true, - "node": true - }, - - "rules": { - "quotes": false, - "curly": false, - "eqeqeq": false, - "no-underscore-dangle": false - } -} diff --git a/cli/node_modules/should/node_modules/should-format/.npmignore b/cli/node_modules/should/node_modules/should-format/.npmignore deleted file mode 100644 index 723ef36f4..000000000 --- a/cli/node_modules/should/node_modules/should-format/.npmignore +++ /dev/null @@ -1 +0,0 @@ -.idea \ No newline at end of file diff --git a/cli/node_modules/should/node_modules/should-format/.travis.yml b/cli/node_modules/should/node_modules/should-format/.travis.yml deleted file mode 100644 index a355161b2..000000000 --- a/cli/node_modules/should/node_modules/should-format/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: -- '0.10' -- '0.11' -script: -- npm test \ No newline at end of file diff --git a/cli/node_modules/should/node_modules/should-format/LICENSE b/cli/node_modules/should/node_modules/should-format/LICENSE deleted file mode 100644 index d7e0e57ac..000000000 --- a/cli/node_modules/should/node_modules/should-format/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/cli/node_modules/should/node_modules/should-format/README.md b/cli/node_modules/should/node_modules/should-format/README.md deleted file mode 100644 index 48b6ae76b..000000000 --- a/cli/node_modules/should/node_modules/should-format/README.md +++ /dev/null @@ -1,6 +0,0 @@ -format -====== - -[![Build Status](https://travis-ci.org/shouldjs/format.svg?branch=master)](https://travis-ci.org/shouldjs/format) - -Module for text inspections for instances diff --git a/cli/node_modules/should/node_modules/should-format/index.js b/cli/node_modules/should/node_modules/should-format/index.js deleted file mode 100644 index 21f8a889d..000000000 --- a/cli/node_modules/should/node_modules/should-format/index.js +++ /dev/null @@ -1,455 +0,0 @@ -var getType = require('should-type'); -var util = require('./util'); - -function genKeysFunc(f) { - return function(value) { - var k = f(value); - k.sort(); - return k; - }; -} - - -function Formatter(opts) { - opts = opts || {}; - - this.seen = []; - this.keys = genKeysFunc(opts.keys === false ? Object.getOwnPropertyNames : Object.keys); - - this.maxLineLength = typeof opts.maxLineLength === 'number' ? opts.maxLineLength : 60; - this.propSep = opts.propSep || ','; - - this.isUTCdate = !!opts.isUTCdate; -} - -Formatter.prototype = { - constructor: Formatter, - - format: function(value) { - var t = getType(value); - var name1 = t.type, name2 = t.type; - if(t.cls) { - name1 += '_' + t.cls; - name2 += '_' + t.cls; - } - if(t.sub) { - name2 += '_' + t.sub; - } - var f = this['_format_' + name2] || this['_format_' + name1] || this['_format_' + t.type] || this.defaultFormat; - return f.call(this, value).trim(); - }, - - _formatObject: function(value, opts) { - opts = opts || {}; - var mainKeys = opts.keys || this.keys(value); - - var len = 0; - - var formatPropertyValue = opts.formatPropertyValue || this.formatPropertyValue; - var formatPropertyName = opts.formatPropertyName || this.formatPropertyName; - var keyValueSep = opts.keyValueSep || ': '; - var keyFilter = opts.keyFilter || function() { return true; }; - - this.seen.push(value); - var keys = []; - - mainKeys.forEach(function(key) { - if(!keyFilter(key)) return; - - var fName = formatPropertyName.call(this, key); - - var f = (fName ? fName + keyValueSep : '') + formatPropertyValue.call(this, value, key); - len += f.length; - keys.push(f); - }, this); - this.seen.pop(); - - (opts.additionalProperties || []).forEach(function(keyValue) { - var f = keyValue[0] + keyValueSep + this.format(keyValue[1]); - len += f.length; - keys.push(f); - }, this); - - var prefix = opts.prefix || Formatter.constructorName(value) || ''; - if(prefix.length > 0) prefix += ' '; - - var lbracket, rbracket; - if(Array.isArray(opts.brackets)) { - lbracket = opts.brackets && opts.brackets[0]; - rbracket = opts.brackets && opts.brackets[1]; - } else { - lbracket = '{'; - rbracket = '}'; - } - - var rootValue = opts.value || ''; - - if(keys.length === 0) - return rootValue || (prefix + lbracket + rbracket); - - if(len <= this.maxLineLength) { - return prefix + lbracket + ' ' + (rootValue ? rootValue + ' ' : '') + keys.join(this.propSep + ' ') + ' ' + rbracket; - } else { - return prefix + lbracket + '\n' + (rootValue ? ' ' + rootValue + '\n' : '') + keys.map(util.addSpaces).join(this.propSep + '\n') + '\n' + rbracket; - } - }, - - formatObject: function(value, prefix, props) { - props = props || this.keys(value); - - var len = 0; - - this.seen.push(value); - props = props.map(function(prop) { - var f = this.formatProperty(value, prop); - len += f.length; - return f; - }, this); - this.seen.pop(); - - if(props.length === 0) return '{}'; - - if(len <= this.maxLineLength) { - return '{ ' + (prefix ? prefix + ' ' : '') + props.join(this.propSep + ' ') + ' }'; - } else { - return '{' + '\n' + (prefix ? ' ' + prefix + '\n' : '') + props.map(util.addSpaces).join(this.propSep + '\n') + '\n' + '}'; - } - }, - - formatPropertyName: function(name) { - return name.match(/^[a-zA-Z_$][a-zA-Z_$0-9]*$/) ? name : this.format(name); - }, - - formatProperty: function(value, prop) { - var desc = Formatter.getPropertyDescriptor(value, prop); - - var propName = this.formatPropertyName(prop); - - var propValue = desc.get && desc.set ? - '[Getter/Setter]' : desc.get ? - '[Getter]' : desc.set ? - '[Setter]' : this.seen.indexOf(desc.value) >= 0 ? - '[Circular]' : - this.format(desc.value); - - return propName + ': ' + propValue; - }, - - formatPropertyValue: function(value, prop) { - var desc = Formatter.getPropertyDescriptor(value, prop); - - var propValue = desc.get && desc.set ? - '[Getter/Setter]' : desc.get ? - '[Getter]' : desc.set ? - '[Setter]' : this.seen.indexOf(desc.value) >= 0 ? - '[Circular]' : - this.format(desc.value); - - return propValue; - } -}; - -Formatter.add = function add(type, cls, sub, f) { - var args = Array.prototype.slice.call(arguments); - f = args.pop(); - Formatter.prototype['_format_' + args.join('_')] = f; -}; - -Formatter.formatObjectWithPrefix = function formatObjectWithPrefix(f) { - return function(value) { - var prefix = f.call(this, value); - var props = this.keys(value); - if(props.length == 0) return prefix; - else return this.formatObject(value, prefix, props); - }; -}; - -var functionNameRE = /^\s*function\s*(\S*)\s*\(/; - -Formatter.functionName = function functionName(f) { - if(f.name) { - return f.name; - } - var name = f.toString().match(functionNameRE)[1]; - return name; -}; - -Formatter.constructorName = function(obj) { - while (obj) { - var descriptor = Object.getOwnPropertyDescriptor(obj, 'constructor'); - if (descriptor !== undefined && - typeof descriptor.value === 'function') { - - var name = Formatter.functionName(descriptor.value); - if(name !== '') { - return name; - } - } - - obj = Object.getPrototypeOf(obj); - } -}; - -Formatter.getPropertyDescriptor = function(obj, value) { - var desc; - try { - desc = Object.getOwnPropertyDescriptor(obj, value) || {value: obj[value]}; - } catch(e) { - desc = {value: e}; - } - return desc; -}; - -Formatter.generateFunctionForIndexedArray = function generateFunctionForIndexedArray(lengthProp, name, padding) { - return function(value) { - var max = this.byteArrayMaxLength || 50; - var length = value[lengthProp]; - var formattedValues = []; - var len = 0; - for(var i = 0; i < max && i < length; i++) { - var b = value[i] || 0; - var v = util.pad0(b.toString(16), padding); - len += v.length; - formattedValues.push(v); - } - var prefix = value.constructor.name || name || ''; - if(prefix) prefix += ' '; - - if(formattedValues.length === 0) - return prefix + '[]'; - - if(len <= this.maxLineLength) { - return prefix + '[ ' + formattedValues.join(this.propSep + ' ') + ' ' + ']'; - } else { - return prefix + '[\n' + formattedValues.map(util.addSpaces).join(this.propSep + '\n') + '\n' + ']'; - } - }; -}; - -['undefined', 'boolean', 'null', 'symbol'].forEach(function(name) { - Formatter.add(name, String); -}); - -['number', 'boolean'].forEach(function(name) { - Formatter.add('object', name, function(value) { - return this._formatObject(value, { - additionalProperties: [['[[PrimitiveValue]]', value.valueOf()]] - }); - }); -}); - -Formatter.add('object', 'string', function(value) { - var realValue = value.valueOf(); - - return this._formatObject(value, { - keyFilter: function(key) { - //skip useless indexed properties - return !(key.match(/\d+/) && parseInt(key, 10) < realValue.length); - }, - additionalProperties: [['[[PrimitiveValue]]', realValue]] - }); -}); - -Formatter.add('object', 'regexp', function(value) { - return this._formatObject(value, { - value: String(value) - }); -}); - -Formatter.add('number', function(value) { - if(value === 0 && 1 / value < 0) return '-0'; - return String(value); -}); - -Formatter.add('string', function(value) { - return '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; -}); - -Formatter.add('object', function(value) { - return this._formatObject(value); -}); - -Formatter.add('object', 'arguments', function(value) { - return this._formatObject(value, { - prefix: 'Arguments', - formatPropertyName: function(key) { - if(!key.match(/\d+/)) { - return this.formatPropertyName(key); - } - }, - brackets: ['[', ']'] - }); -}); - -Formatter.add('object', 'array', function(value) { - return this._formatObject(value, { - formatPropertyName: function(key) { - if(!key.match(/\d+/)) { - return this.formatPropertyName(key); - } - }, - brackets: ['[', ']'] - }); -}); - - -function formatDate(value, isUTC) { - var prefix = isUTC ? 'UTC' : ''; - - var date = value['get' + prefix + 'FullYear']() + - '-' + - util.pad0(value['get' + prefix + 'Month']() + 1, 2) + - '-' + - util.pad0(value['get' + prefix + 'Date'](), 2); - - var time = util.pad0(value['get' + prefix + 'Hours'](), 2) + - ':' + - util.pad0(value['get' + prefix + 'Minutes'](), 2) + - ':' + - util.pad0(value['get' + prefix + 'Seconds'](), 2) + - '.' + - util.pad0(value['get' + prefix + 'Milliseconds'](), 3); - - var to = value.getTimezoneOffset(); - var absTo = Math.abs(to); - var hours = Math.floor(absTo / 60); - var minutes = absTo - hours * 60; - var tzFormat = (to < 0 ? '+' : '-') + util.pad0(hours, 2) + util.pad0(minutes, 2); - - return date + ' ' + time + (isUTC ? '' : ' ' + tzFormat); -} - -Formatter.add('object', 'date', function(value) { - return this._formatObject(value, { value: formatDate(value, this.isUTCdate) }); -}); - -Formatter.add('function', function(value) { - return this._formatObject(value, { - additionalProperties: [['name', Formatter.functionName(value)]] - }); -}); - -Formatter.add('object', 'error', function(value) { - return this._formatObject(value, { - prefix: value.name, - additionalProperties: [['message', value.message]] - }); -}); - -Formatter.add('object', 'buffer', Formatter.generateFunctionForIndexedArray('length', 'Buffer', 2)); - -Formatter.add('object', 'array-buffer', Formatter.generateFunctionForIndexedArray('byteLength', 'ArrayBuffer', 2)); - -Formatter.add('object', 'typed-array', 'int8', Formatter.generateFunctionForIndexedArray('length', 'Int8Array', 2)); -Formatter.add('object', 'typed-array', 'uint8', Formatter.generateFunctionForIndexedArray('length', 'Uint8Array', 2)); -Formatter.add('object', 'typed-array', 'uint8clamped', Formatter.generateFunctionForIndexedArray('length', 'Uint8ClampedArray', 2)); - -Formatter.add('object', 'typed-array', 'int16', Formatter.generateFunctionForIndexedArray('length', 'Int16Array', 4)); -Formatter.add('object', 'typed-array', 'uint16', Formatter.generateFunctionForIndexedArray('length', 'Uint16Array', 4)); - -Formatter.add('object', 'typed-array', 'int32', Formatter.generateFunctionForIndexedArray('length', 'Int32Array', 8)); -Formatter.add('object', 'typed-array', 'uint32', Formatter.generateFunctionForIndexedArray('length', 'Uint32Array', 8)); - -//TODO add float32 and float64 - -Formatter.add('object', 'promise', function() { - return '[Promise]';//TODO it could be nice to inspect its state and value -}); - -Formatter.add('object', 'xhr', function() { - return '[XMLHttpRequest]';//TODO it could be nice to inspect its state -}); - -Formatter.add('object', 'html-element', function(value) { - return value.outerHTML; -}); - -Formatter.add('object', 'html-element', '#text', function(value) { - return value.nodeValue; -}); - -Formatter.add('object', 'html-element', '#document', function(value) { - return value.documentElement.outerHTML; -}); - -Formatter.add('object', 'host', function() { - return '[Host]'; -}); - -Formatter.add('object', 'set', function(value) { - var iter = value.values(); - var len = 0; - - this.seen.push(value); - - var props = []; - - var next = iter.next(); - while(!next.done) { - var val = next.value; - var f = this.format(val); - len += f.length; - props.push(f); - - next = iter.next(); - } - - this.seen.pop(); - - if(props.length === 0) return 'Set {}'; - - if(len <= this.maxLineLength) { - return 'Set { ' + props.join(this.propSep + ' ') + ' }'; - } else { - return 'Set {\n' + props.map(util.addSpaces).join(this.propSep + '\n') + '\n' + '}'; - } -}); - -Formatter.add('object', 'map', function(value) { - var iter = value.entries(); - var len = 0; - - this.seen.push(value); - - var props = []; - - var next = iter.next(); - while(!next.done) { - var val = next.value; - var fK = this.format(val[0]); - var fV = this.format(val[1]); - - var f; - if((fK.length + fV.length + 4) <= this.maxLineLength) { - f = fK + ' => ' + fV; - } else { - f = fK + ' =>\n' + fV; - } - - len += fK.length + fV.length + 4; - props.push(f); - - next = iter.next(); - } - - this.seen.pop(); - - if(props.length === 0) return 'Map {}'; - - if(len <= this.maxLineLength) { - return 'Map { ' + props.join(this.propSep + ' ') + ' }'; - } else { - return 'Map {\n' + props.map(util.addSpaces).join(this.propSep + '\n') + '\n' + '}'; - } -}); - -Formatter.prototype.defaultFormat = Formatter.prototype._format_object; - -function defaultFormat(value, opts) { - return new Formatter(opts).format(value); -} - -defaultFormat.Formatter = Formatter; -module.exports = defaultFormat; diff --git a/cli/node_modules/should/node_modules/should-format/package.json b/cli/node_modules/should/node_modules/should-format/package.json deleted file mode 100644 index 5535df1f7..000000000 --- a/cli/node_modules/should/node_modules/should-format/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "should-format", - "version": "0.3.0", - "description": "Formatting of objects for should.js", - "main": "index.js", - "repository": { - "type": "git", - "url": "git://github.com/shouldjs/format.git" - }, - "scripts": { - "test": "mocha -R mocha-better-spec-reporter tests/test.js", - "browserify": "rm tests/browser/tests.js && browserify tests/test.js >> tests/browser/tests.js" - }, - "keywords": [ - "should", - "format" - ], - "author": { - "name": "Denis Bardadym", - "email": "bardadymchik@gmail.com" - }, - "license": "MIT", - "devDependencies": { - "browserify": "latest", - "mocha": "latest", - "mocha-better-spec-reporter": "latest" - }, - "dependencies": { - "should-type": "0.2.0" - }, - "gitHead": "7c6a097907b9e39eb6fc6dd300f7da18e89e4d38", - "bugs": { - "url": "https://github.com/shouldjs/format/issues" - }, - "homepage": "https://github.com/shouldjs/format#readme", - "_id": "should-format@0.3.0", - "_shasum": "42007ec0aa1c86ea44914cc9111f1b9f27d3ceac", - "_from": "should-format@0.3.0", - "_npmVersion": "2.11.1", - "_nodeVersion": "2.3.0", - "_npmUser": { - "name": "btd", - "email": "bardadymchik@gmail.com" - }, - "maintainers": [ - { - "name": "btd", - "email": "bardadymchik@gmail.com" - } - ], - "dist": { - "shasum": "42007ec0aa1c86ea44914cc9111f1b9f27d3ceac", - "tarball": "http://registry.npmjs.org/should-format/-/should-format-0.3.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/should-format/-/should-format-0.3.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/should/node_modules/should-format/tests/browser/index.html b/cli/node_modules/should/node_modules/should-format/tests/browser/index.html deleted file mode 100644 index 0590d4aac..000000000 --- a/cli/node_modules/should/node_modules/should-format/tests/browser/index.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - Mocha - - - - - -
    - - - - - - diff --git a/cli/node_modules/should/node_modules/should-format/tests/browser/mocha.css b/cli/node_modules/should/node_modules/should-format/tests/browser/mocha.css deleted file mode 100644 index 42b9798fa..000000000 --- a/cli/node_modules/should/node_modules/should-format/tests/browser/mocha.css +++ /dev/null @@ -1,270 +0,0 @@ -@charset "utf-8"; - -body { - margin:0; -} - -#mocha { - font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif; - margin: 60px 50px; -} - -#mocha ul, -#mocha li { - margin: 0; - padding: 0; -} - -#mocha ul { - list-style: none; -} - -#mocha h1, -#mocha h2 { - margin: 0; -} - -#mocha h1 { - margin-top: 15px; - font-size: 1em; - font-weight: 200; -} - -#mocha h1 a { - text-decoration: none; - color: inherit; -} - -#mocha h1 a:hover { - text-decoration: underline; -} - -#mocha .suite .suite h1 { - margin-top: 0; - font-size: .8em; -} - -#mocha .hidden { - display: none; -} - -#mocha h2 { - font-size: 12px; - font-weight: normal; - cursor: pointer; -} - -#mocha .suite { - margin-left: 15px; -} - -#mocha .test { - margin-left: 15px; - overflow: hidden; -} - -#mocha .test.pending:hover h2::after { - content: '(pending)'; - font-family: arial, sans-serif; -} - -#mocha .test.pass.medium .duration { - background: #c09853; -} - -#mocha .test.pass.slow .duration { - background: #b94a48; -} - -#mocha .test.pass::before { - content: '✓'; - font-size: 12px; - display: block; - float: left; - margin-right: 5px; - color: #00d6b2; -} - -#mocha .test.pass .duration { - font-size: 9px; - margin-left: 5px; - padding: 2px 5px; - color: #fff; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.2); - -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.2); - box-shadow: inset 0 1px 1px rgba(0,0,0,.2); - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - -ms-border-radius: 5px; - -o-border-radius: 5px; - border-radius: 5px; -} - -#mocha .test.pass.fast .duration { - display: none; -} - -#mocha .test.pending { - color: #0b97c4; -} - -#mocha .test.pending::before { - content: '◦'; - color: #0b97c4; -} - -#mocha .test.fail { - color: #c00; -} - -#mocha .test.fail pre { - color: black; -} - -#mocha .test.fail::before { - content: '✖'; - font-size: 12px; - display: block; - float: left; - margin-right: 5px; - color: #c00; -} - -#mocha .test pre.error { - color: #c00; - max-height: 300px; - overflow: auto; -} - -/** - * (1): approximate for browsers not supporting calc - * (2): 42 = 2*15 + 2*10 + 2*1 (padding + margin + border) - * ^^ seriously - */ -#mocha .test pre { - display: block; - float: left; - clear: left; - font: 12px/1.5 monaco, monospace; - margin: 5px; - padding: 15px; - border: 1px solid #eee; - max-width: 85%; /*(1)*/ - max-width: calc(100% - 42px); /*(2)*/ - word-wrap: break-word; - border-bottom-color: #ddd; - -webkit-border-radius: 3px; - -webkit-box-shadow: 0 1px 3px #eee; - -moz-border-radius: 3px; - -moz-box-shadow: 0 1px 3px #eee; - border-radius: 3px; -} - -#mocha .test h2 { - position: relative; -} - -#mocha .test a.replay { - position: absolute; - top: 3px; - right: 0; - text-decoration: none; - vertical-align: middle; - display: block; - width: 15px; - height: 15px; - line-height: 15px; - text-align: center; - background: #eee; - font-size: 15px; - -moz-border-radius: 15px; - border-radius: 15px; - -webkit-transition: opacity 200ms; - -moz-transition: opacity 200ms; - transition: opacity 200ms; - opacity: 0.3; - color: #888; -} - -#mocha .test:hover a.replay { - opacity: 1; -} - -#mocha-report.pass .test.fail { - display: none; -} - -#mocha-report.fail .test.pass { - display: none; -} - -#mocha-report.pending .test.pass, -#mocha-report.pending .test.fail { - display: none; -} -#mocha-report.pending .test.pass.pending { - display: block; -} - -#mocha-error { - color: #c00; - font-size: 1.5em; - font-weight: 100; - letter-spacing: 1px; -} - -#mocha-stats { - position: fixed; - top: 15px; - right: 10px; - font-size: 12px; - margin: 0; - color: #888; - z-index: 1; -} - -#mocha-stats .progress { - float: right; - padding-top: 0; -} - -#mocha-stats em { - color: black; -} - -#mocha-stats a { - text-decoration: none; - color: inherit; -} - -#mocha-stats a:hover { - border-bottom: 1px solid #eee; -} - -#mocha-stats li { - display: inline-block; - margin: 0 5px; - list-style: none; - padding-top: 11px; -} - -#mocha-stats canvas { - width: 40px; - height: 40px; -} - -#mocha code .comment { color: #ddd; } -#mocha code .init { color: #2f6fad; } -#mocha code .string { color: #5890ad; } -#mocha code .keyword { color: #8a6343; } -#mocha code .number { color: #2f6fad; } - -@media screen and (max-device-width: 480px) { - #mocha { - margin: 60px 0px; - } - - #mocha #stats { - position: absolute; - } -} diff --git a/cli/node_modules/should/node_modules/should-format/tests/browser/mocha.js b/cli/node_modules/should/node_modules/should-format/tests/browser/mocha.js deleted file mode 100644 index 564a4f318..000000000 --- a/cli/node_modules/should/node_modules/should-format/tests/browser/mocha.js +++ /dev/null @@ -1,6069 +0,0 @@ -;(function(){ - -// CommonJS require() - -function require(p){ - var path = require.resolve(p) - , mod = require.modules[path]; - if (!mod) throw new Error('failed to require "' + p + '"'); - if (!mod.exports) { - mod.exports = {}; - mod.call(mod.exports, mod, mod.exports, require.relative(path)); - } - return mod.exports; - } - -require.modules = {}; - -require.resolve = function (path){ - var orig = path - , reg = path + '.js' - , index = path + '/index.js'; - return require.modules[reg] && reg - || require.modules[index] && index - || orig; - }; - -require.register = function (path, fn){ - require.modules[path] = fn; - }; - -require.relative = function (parent) { - return function(p){ - if ('.' != p.charAt(0)) return require(p); - - var path = parent.split('/') - , segs = p.split('/'); - path.pop(); - - for (var i = 0; i < segs.length; i++) { - var seg = segs[i]; - if ('..' == seg) path.pop(); - else if ('.' != seg) path.push(seg); - } - - return require(path.join('/')); - }; - }; - - -require.register("browser/debug.js", function(module, exports, require){ -module.exports = function(type){ - return function(){ - } -}; - -}); // module: browser/debug.js - -require.register("browser/diff.js", function(module, exports, require){ -/* See LICENSE file for terms of use */ - -/* - * Text diff implementation. - * - * This library supports the following APIS: - * JsDiff.diffChars: Character by character diff - * JsDiff.diffWords: Word (as defined by \b regex) diff which ignores whitespace - * JsDiff.diffLines: Line based diff - * - * JsDiff.diffCss: Diff targeted at CSS content - * - * These methods are based on the implementation proposed in - * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986). - * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927 - */ -var JsDiff = (function() { - /*jshint maxparams: 5*/ - function clonePath(path) { - return { newPos: path.newPos, components: path.components.slice(0) }; - } - function removeEmpty(array) { - var ret = []; - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } - } - return ret; - } - function escapeHTML(s) { - var n = s; - n = n.replace(/&/g, '&'); - n = n.replace(//g, '>'); - n = n.replace(/"/g, '"'); - - return n; - } - - var Diff = function(ignoreWhitespace) { - this.ignoreWhitespace = ignoreWhitespace; - }; - Diff.prototype = { - diff: function(oldString, newString) { - // Handle the identity case (this is due to unrolling editLength == 0 - if (newString === oldString) { - return [{ value: newString }]; - } - if (!newString) { - return [{ value: oldString, removed: true }]; - } - if (!oldString) { - return [{ value: newString, added: true }]; - } - - newString = this.tokenize(newString); - oldString = this.tokenize(oldString); - - var newLen = newString.length, oldLen = oldString.length; - var maxEditLength = newLen + oldLen; - var bestPath = [{ newPos: -1, components: [] }]; - - // Seed editLength = 0 - var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); - if (bestPath[0].newPos+1 >= newLen && oldPos+1 >= oldLen) { - return bestPath[0].components; - } - - for (var editLength = 1; editLength <= maxEditLength; editLength++) { - for (var diagonalPath = -1*editLength; diagonalPath <= editLength; diagonalPath+=2) { - var basePath; - var addPath = bestPath[diagonalPath-1], - removePath = bestPath[diagonalPath+1]; - oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; - if (addPath) { - // No one else is going to attempt to use this value, clear it - bestPath[diagonalPath-1] = undefined; - } - - var canAdd = addPath && addPath.newPos+1 < newLen; - var canRemove = removePath && 0 <= oldPos && oldPos < oldLen; - if (!canAdd && !canRemove) { - bestPath[diagonalPath] = undefined; - continue; - } - - // Select the diagonal that we want to branch from. We select the prior - // path whose position in the new string is the farthest from the origin - // and does not pass the bounds of the diff graph - if (!canAdd || (canRemove && addPath.newPos < removePath.newPos)) { - basePath = clonePath(removePath); - this.pushComponent(basePath.components, oldString[oldPos], undefined, true); - } else { - basePath = clonePath(addPath); - basePath.newPos++; - this.pushComponent(basePath.components, newString[basePath.newPos], true, undefined); - } - - var oldPos = this.extractCommon(basePath, newString, oldString, diagonalPath); - - if (basePath.newPos+1 >= newLen && oldPos+1 >= oldLen) { - return basePath.components; - } else { - bestPath[diagonalPath] = basePath; - } - } - } - }, - - pushComponent: function(components, value, added, removed) { - var last = components[components.length-1]; - if (last && last.added === added && last.removed === removed) { - // We need to clone here as the component clone operation is just - // as shallow array clone - components[components.length-1] = - {value: this.join(last.value, value), added: added, removed: removed }; - } else { - components.push({value: value, added: added, removed: removed }); - } - }, - extractCommon: function(basePath, newString, oldString, diagonalPath) { - var newLen = newString.length, - oldLen = oldString.length, - newPos = basePath.newPos, - oldPos = newPos - diagonalPath; - while (newPos+1 < newLen && oldPos+1 < oldLen && this.equals(newString[newPos+1], oldString[oldPos+1])) { - newPos++; - oldPos++; - - this.pushComponent(basePath.components, newString[newPos], undefined, undefined); - } - basePath.newPos = newPos; - return oldPos; - }, - - equals: function(left, right) { - var reWhitespace = /\S/; - if (this.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right)) { - return true; - } else { - return left === right; - } - }, - join: function(left, right) { - return left + right; - }, - tokenize: function(value) { - return value; - } - }; - - var CharDiff = new Diff(); - - var WordDiff = new Diff(true); - var WordWithSpaceDiff = new Diff(); - WordDiff.tokenize = WordWithSpaceDiff.tokenize = function(value) { - return removeEmpty(value.split(/(\s+|\b)/)); - }; - - var CssDiff = new Diff(true); - CssDiff.tokenize = function(value) { - return removeEmpty(value.split(/([{}:;,]|\s+)/)); - }; - - var LineDiff = new Diff(); - LineDiff.tokenize = function(value) { - return value.split(/^/m); - }; - - return { - Diff: Diff, - - diffChars: function(oldStr, newStr) { return CharDiff.diff(oldStr, newStr); }, - diffWords: function(oldStr, newStr) { return WordDiff.diff(oldStr, newStr); }, - diffWordsWithSpace: function(oldStr, newStr) { return WordWithSpaceDiff.diff(oldStr, newStr); }, - diffLines: function(oldStr, newStr) { return LineDiff.diff(oldStr, newStr); }, - - diffCss: function(oldStr, newStr) { return CssDiff.diff(oldStr, newStr); }, - - createPatch: function(fileName, oldStr, newStr, oldHeader, newHeader) { - var ret = []; - - ret.push('Index: ' + fileName); - ret.push('==================================================================='); - ret.push('--- ' + fileName + (typeof oldHeader === 'undefined' ? '' : '\t' + oldHeader)); - ret.push('+++ ' + fileName + (typeof newHeader === 'undefined' ? '' : '\t' + newHeader)); - - var diff = LineDiff.diff(oldStr, newStr); - if (!diff[diff.length-1].value) { - diff.pop(); // Remove trailing newline add - } - diff.push({value: '', lines: []}); // Append an empty value to make cleanup easier - - function contextLines(lines) { - return lines.map(function(entry) { return ' ' + entry; }); - } - function eofNL(curRange, i, current) { - var last = diff[diff.length-2], - isLast = i === diff.length-2, - isLastOfType = i === diff.length-3 && (current.added !== last.added || current.removed !== last.removed); - - // Figure out if this is the last line for the given file and missing NL - if (!/\n$/.test(current.value) && (isLast || isLastOfType)) { - curRange.push('\\ No newline at end of file'); - } - } - - var oldRangeStart = 0, newRangeStart = 0, curRange = [], - oldLine = 1, newLine = 1; - for (var i = 0; i < diff.length; i++) { - var current = diff[i], - lines = current.lines || current.value.replace(/\n$/, '').split('\n'); - current.lines = lines; - - if (current.added || current.removed) { - if (!oldRangeStart) { - var prev = diff[i-1]; - oldRangeStart = oldLine; - newRangeStart = newLine; - - if (prev) { - curRange = contextLines(prev.lines.slice(-4)); - oldRangeStart -= curRange.length; - newRangeStart -= curRange.length; - } - } - curRange.push.apply(curRange, lines.map(function(entry) { return (current.added?'+':'-') + entry; })); - eofNL(curRange, i, current); - - if (current.added) { - newLine += lines.length; - } else { - oldLine += lines.length; - } - } else { - if (oldRangeStart) { - // Close out any changes that have been output (or join overlapping) - if (lines.length <= 8 && i < diff.length-2) { - // Overlapping - curRange.push.apply(curRange, contextLines(lines)); - } else { - // end the range and output - var contextSize = Math.min(lines.length, 4); - ret.push( - '@@ -' + oldRangeStart + ',' + (oldLine-oldRangeStart+contextSize) - + ' +' + newRangeStart + ',' + (newLine-newRangeStart+contextSize) - + ' @@'); - ret.push.apply(ret, curRange); - ret.push.apply(ret, contextLines(lines.slice(0, contextSize))); - if (lines.length <= 4) { - eofNL(ret, i, current); - } - - oldRangeStart = 0; newRangeStart = 0; curRange = []; - } - } - oldLine += lines.length; - newLine += lines.length; - } - } - - return ret.join('\n') + '\n'; - }, - - applyPatch: function(oldStr, uniDiff) { - var diffstr = uniDiff.split('\n'); - var diff = []; - var remEOFNL = false, - addEOFNL = false; - - for (var i = (diffstr[0][0]==='I'?4:0); i < diffstr.length; i++) { - if(diffstr[i][0] === '@') { - var meh = diffstr[i].split(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/); - diff.unshift({ - start:meh[3], - oldlength:meh[2], - oldlines:[], - newlength:meh[4], - newlines:[] - }); - } else if(diffstr[i][0] === '+') { - diff[0].newlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === '-') { - diff[0].oldlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === ' ') { - diff[0].newlines.push(diffstr[i].substr(1)); - diff[0].oldlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === '\\') { - if (diffstr[i-1][0] === '+') { - remEOFNL = true; - } else if(diffstr[i-1][0] === '-') { - addEOFNL = true; - } - } - } - - var str = oldStr.split('\n'); - for (var i = diff.length - 1; i >= 0; i--) { - var d = diff[i]; - for (var j = 0; j < d.oldlength; j++) { - if(str[d.start-1+j] !== d.oldlines[j]) { - return false; - } - } - Array.prototype.splice.apply(str,[d.start-1,+d.oldlength].concat(d.newlines)); - } - - if (remEOFNL) { - while (!str[str.length-1]) { - str.pop(); - } - } else if (addEOFNL) { - str.push(''); - } - return str.join('\n'); - }, - - convertChangesToXML: function(changes){ - var ret = []; - for ( var i = 0; i < changes.length; i++) { - var change = changes[i]; - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - - ret.push(escapeHTML(change.value)); - - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - } - return ret.join(''); - }, - - // See: http://code.google.com/p/google-diff-match-patch/wiki/API - convertChangesToDMP: function(changes){ - var ret = [], change; - for ( var i = 0; i < changes.length; i++) { - change = changes[i]; - ret.push([(change.added ? 1 : change.removed ? -1 : 0), change.value]); - } - return ret; - } - }; -})(); - -if (typeof module !== 'undefined') { - module.exports = JsDiff; -} - -}); // module: browser/diff.js - -require.register("browser/escape-string-regexp.js", function(module, exports, require){ -'use strict'; - -var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; - -module.exports = function (str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - - return str.replace(matchOperatorsRe, '\\$&'); -}; - -}); // module: browser/escape-string-regexp.js - -require.register("browser/events.js", function(module, exports, require){ -/** - * Module exports. - */ - -exports.EventEmitter = EventEmitter; - -/** - * Check if `obj` is an array. - */ - -function isArray(obj) { - return '[object Array]' == {}.toString.call(obj); -} - -/** - * Event emitter constructor. - * - * @api public - */ - -function EventEmitter(){}; - -/** - * Adds a listener. - * - * @api public - */ - -EventEmitter.prototype.on = function (name, fn) { - if (!this.$events) { - this.$events = {}; - } - - if (!this.$events[name]) { - this.$events[name] = fn; - } else if (isArray(this.$events[name])) { - this.$events[name].push(fn); - } else { - this.$events[name] = [this.$events[name], fn]; - } - - return this; -}; - -EventEmitter.prototype.addListener = EventEmitter.prototype.on; - -/** - * Adds a volatile listener. - * - * @api public - */ - -EventEmitter.prototype.once = function (name, fn) { - var self = this; - - function on () { - self.removeListener(name, on); - fn.apply(this, arguments); - }; - - on.listener = fn; - this.on(name, on); - - return this; -}; - -/** - * Removes a listener. - * - * @api public - */ - -EventEmitter.prototype.removeListener = function (name, fn) { - if (this.$events && this.$events[name]) { - var list = this.$events[name]; - - if (isArray(list)) { - var pos = -1; - - for (var i = 0, l = list.length; i < l; i++) { - if (list[i] === fn || (list[i].listener && list[i].listener === fn)) { - pos = i; - break; - } - } - - if (pos < 0) { - return this; - } - - list.splice(pos, 1); - - if (!list.length) { - delete this.$events[name]; - } - } else if (list === fn || (list.listener && list.listener === fn)) { - delete this.$events[name]; - } - } - - return this; -}; - -/** - * Removes all listeners for an event. - * - * @api public - */ - -EventEmitter.prototype.removeAllListeners = function (name) { - if (name === undefined) { - this.$events = {}; - return this; - } - - if (this.$events && this.$events[name]) { - this.$events[name] = null; - } - - return this; -}; - -/** - * Gets all listeners for a certain event. - * - * @api public - */ - -EventEmitter.prototype.listeners = function (name) { - if (!this.$events) { - this.$events = {}; - } - - if (!this.$events[name]) { - this.$events[name] = []; - } - - if (!isArray(this.$events[name])) { - this.$events[name] = [this.$events[name]]; - } - - return this.$events[name]; -}; - -/** - * Emits an event. - * - * @api public - */ - -EventEmitter.prototype.emit = function (name) { - if (!this.$events) { - return false; - } - - var handler = this.$events[name]; - - if (!handler) { - return false; - } - - var args = [].slice.call(arguments, 1); - - if ('function' == typeof handler) { - handler.apply(this, args); - } else if (isArray(handler)) { - var listeners = handler.slice(); - - for (var i = 0, l = listeners.length; i < l; i++) { - listeners[i].apply(this, args); - } - } else { - return false; - } - - return true; -}; - -}); // module: browser/events.js - -require.register("browser/fs.js", function(module, exports, require){ - -}); // module: browser/fs.js - -require.register("browser/glob.js", function(module, exports, require){ - -}); // module: browser/glob.js - -require.register("browser/path.js", function(module, exports, require){ - -}); // module: browser/path.js - -require.register("browser/progress.js", function(module, exports, require){ -/** - * Expose `Progress`. - */ - -module.exports = Progress; - -/** - * Initialize a new `Progress` indicator. - */ - -function Progress() { - this.percent = 0; - this.size(0); - this.fontSize(11); - this.font('helvetica, arial, sans-serif'); -} - -/** - * Set progress size to `n`. - * - * @param {Number} n - * @return {Progress} for chaining - * @api public - */ - -Progress.prototype.size = function(n){ - this._size = n; - return this; -}; - -/** - * Set text to `str`. - * - * @param {String} str - * @return {Progress} for chaining - * @api public - */ - -Progress.prototype.text = function(str){ - this._text = str; - return this; -}; - -/** - * Set font size to `n`. - * - * @param {Number} n - * @return {Progress} for chaining - * @api public - */ - -Progress.prototype.fontSize = function(n){ - this._fontSize = n; - return this; -}; - -/** - * Set font `family`. - * - * @param {String} family - * @return {Progress} for chaining - */ - -Progress.prototype.font = function(family){ - this._font = family; - return this; -}; - -/** - * Update percentage to `n`. - * - * @param {Number} n - * @return {Progress} for chaining - */ - -Progress.prototype.update = function(n){ - this.percent = n; - return this; -}; - -/** - * Draw on `ctx`. - * - * @param {CanvasRenderingContext2d} ctx - * @return {Progress} for chaining - */ - -Progress.prototype.draw = function(ctx){ - try { - var percent = Math.min(this.percent, 100) - , size = this._size - , half = size / 2 - , x = half - , y = half - , rad = half - 1 - , fontSize = this._fontSize; - - ctx.font = fontSize + 'px ' + this._font; - - var angle = Math.PI * 2 * (percent / 100); - ctx.clearRect(0, 0, size, size); - - // outer circle - ctx.strokeStyle = '#9f9f9f'; - ctx.beginPath(); - ctx.arc(x, y, rad, 0, angle, false); - ctx.stroke(); - - // inner circle - ctx.strokeStyle = '#eee'; - ctx.beginPath(); - ctx.arc(x, y, rad - 1, 0, angle, true); - ctx.stroke(); - - // text - var text = this._text || (percent | 0) + '%' - , w = ctx.measureText(text).width; - - ctx.fillText( - text - , x - w / 2 + 1 - , y + fontSize / 2 - 1); - } catch (ex) {} //don't fail if we can't render progress - return this; -}; - -}); // module: browser/progress.js - -require.register("browser/tty.js", function(module, exports, require){ -exports.isatty = function(){ - return true; -}; - -exports.getWindowSize = function(){ - if ('innerHeight' in global) { - return [global.innerHeight, global.innerWidth]; - } else { - // In a Web Worker, the DOM Window is not available. - return [640, 480]; - } -}; - -}); // module: browser/tty.js - -require.register("context.js", function(module, exports, require){ -/** - * Expose `Context`. - */ - -module.exports = Context; - -/** - * Initialize a new `Context`. - * - * @api private - */ - -function Context(){} - -/** - * Set or get the context `Runnable` to `runnable`. - * - * @param {Runnable} runnable - * @return {Context} - * @api private - */ - -Context.prototype.runnable = function(runnable){ - if (0 == arguments.length) return this._runnable; - this.test = this._runnable = runnable; - return this; -}; - -/** - * Set test timeout `ms`. - * - * @param {Number} ms - * @return {Context} self - * @api private - */ - -Context.prototype.timeout = function(ms){ - if (arguments.length === 0) return this.runnable().timeout(); - this.runnable().timeout(ms); - return this; -}; - -/** - * Set test timeout `enabled`. - * - * @param {Boolean} enabled - * @return {Context} self - * @api private - */ - -Context.prototype.enableTimeouts = function (enabled) { - this.runnable().enableTimeouts(enabled); - return this; -}; - - -/** - * Set test slowness threshold `ms`. - * - * @param {Number} ms - * @return {Context} self - * @api private - */ - -Context.prototype.slow = function(ms){ - this.runnable().slow(ms); - return this; -}; - -/** - * Inspect the context void of `._runnable`. - * - * @return {String} - * @api private - */ - -Context.prototype.inspect = function(){ - return JSON.stringify(this, function(key, val){ - if ('_runnable' == key) return; - if ('test' == key) return; - return val; - }, 2); -}; - -}); // module: context.js - -require.register("hook.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Runnable = require('./runnable'); - -/** - * Expose `Hook`. - */ - -module.exports = Hook; - -/** - * Initialize a new `Hook` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Hook(title, fn) { - Runnable.call(this, title, fn); - this.type = 'hook'; -} - -/** - * Inherit from `Runnable.prototype`. - */ - -function F(){}; -F.prototype = Runnable.prototype; -Hook.prototype = new F; -Hook.prototype.constructor = Hook; - - -/** - * Get or set the test `err`. - * - * @param {Error} err - * @return {Error} - * @api public - */ - -Hook.prototype.error = function(err){ - if (0 == arguments.length) { - var err = this._error; - this._error = null; - return err; - } - - this._error = err; -}; - -}); // module: hook.js - -require.register("interfaces/bdd.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test') - , utils = require('../utils') - , escapeRe = require('browser/escape-string-regexp'); - -/** - * BDD-style interface: - * - * describe('Array', function(){ - * describe('#indexOf()', function(){ - * it('should return -1 when not present', function(){ - * - * }); - * - * it('should return the index when present', function(){ - * - * }); - * }); - * }); - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('pre-require', function(context, file, mocha){ - - /** - * Execute before running tests. - */ - - context.before = function(name, fn){ - suites[0].beforeAll(name, fn); - }; - - /** - * Execute after running tests. - */ - - context.after = function(name, fn){ - suites[0].afterAll(name, fn); - }; - - /** - * Execute before each test case. - */ - - context.beforeEach = function(name, fn){ - suites[0].beforeEach(name, fn); - }; - - /** - * Execute after each test case. - */ - - context.afterEach = function(name, fn){ - suites[0].afterEach(name, fn); - }; - - /** - * Describe a "suite" with the given `title` - * and callback `fn` containing nested suites - * and/or tests. - */ - - context.describe = context.context = function(title, fn){ - var suite = Suite.create(suites[0], title); - suite.file = file; - suites.unshift(suite); - fn.call(suite); - suites.shift(); - return suite; - }; - - /** - * Pending describe. - */ - - context.xdescribe = - context.xcontext = - context.describe.skip = function(title, fn){ - var suite = Suite.create(suites[0], title); - suite.pending = true; - suites.unshift(suite); - fn.call(suite); - suites.shift(); - }; - - /** - * Exclusive suite. - */ - - context.describe.only = function(title, fn){ - var suite = context.describe(title, fn); - mocha.grep(suite.fullTitle()); - return suite; - }; - - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ - - context.it = context.specify = function(title, fn){ - var suite = suites[0]; - if (suite.pending) fn = null; - var test = new Test(title, fn); - test.file = file; - suite.addTest(test); - return test; - }; - - /** - * Exclusive test-case. - */ - - context.it.only = function(title, fn){ - var test = context.it(title, fn); - var reString = '^' + escapeRe(test.fullTitle()) + '$'; - mocha.grep(new RegExp(reString)); - return test; - }; - - /** - * Pending test case. - */ - - context.xit = - context.xspecify = - context.it.skip = function(title){ - context.it(title); - }; - }); -}; - -}); // module: interfaces/bdd.js - -require.register("interfaces/exports.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test'); - -/** - * TDD-style interface: - * - * exports.Array = { - * '#indexOf()': { - * 'should return -1 when the value is not present': function(){ - * - * }, - * - * 'should return the correct index when the value is present': function(){ - * - * } - * } - * }; - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('require', visit); - - function visit(obj, file) { - var suite; - for (var key in obj) { - if ('function' == typeof obj[key]) { - var fn = obj[key]; - switch (key) { - case 'before': - suites[0].beforeAll(fn); - break; - case 'after': - suites[0].afterAll(fn); - break; - case 'beforeEach': - suites[0].beforeEach(fn); - break; - case 'afterEach': - suites[0].afterEach(fn); - break; - default: - var test = new Test(key, fn); - test.file = file; - suites[0].addTest(test); - } - } else { - suite = Suite.create(suites[0], key); - suites.unshift(suite); - visit(obj[key]); - suites.shift(); - } - } - } -}; - -}); // module: interfaces/exports.js - -require.register("interfaces/index.js", function(module, exports, require){ -exports.bdd = require('./bdd'); -exports.tdd = require('./tdd'); -exports.qunit = require('./qunit'); -exports.exports = require('./exports'); - -}); // module: interfaces/index.js - -require.register("interfaces/qunit.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test') - , escapeRe = require('browser/escape-string-regexp') - , utils = require('../utils'); - -/** - * QUnit-style interface: - * - * suite('Array'); - * - * test('#length', function(){ - * var arr = [1,2,3]; - * ok(arr.length == 3); - * }); - * - * test('#indexOf()', function(){ - * var arr = [1,2,3]; - * ok(arr.indexOf(1) == 0); - * ok(arr.indexOf(2) == 1); - * ok(arr.indexOf(3) == 2); - * }); - * - * suite('String'); - * - * test('#length', function(){ - * ok('foo'.length == 3); - * }); - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('pre-require', function(context, file, mocha){ - - /** - * Execute before running tests. - */ - - context.before = function(name, fn){ - suites[0].beforeAll(name, fn); - }; - - /** - * Execute after running tests. - */ - - context.after = function(name, fn){ - suites[0].afterAll(name, fn); - }; - - /** - * Execute before each test case. - */ - - context.beforeEach = function(name, fn){ - suites[0].beforeEach(name, fn); - }; - - /** - * Execute after each test case. - */ - - context.afterEach = function(name, fn){ - suites[0].afterEach(name, fn); - }; - - /** - * Describe a "suite" with the given `title`. - */ - - context.suite = function(title){ - if (suites.length > 1) suites.shift(); - var suite = Suite.create(suites[0], title); - suite.file = file; - suites.unshift(suite); - return suite; - }; - - /** - * Exclusive test-case. - */ - - context.suite.only = function(title, fn){ - var suite = context.suite(title, fn); - mocha.grep(suite.fullTitle()); - }; - - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ - - context.test = function(title, fn){ - var test = new Test(title, fn); - test.file = file; - suites[0].addTest(test); - return test; - }; - - /** - * Exclusive test-case. - */ - - context.test.only = function(title, fn){ - var test = context.test(title, fn); - var reString = '^' + escapeRe(test.fullTitle()) + '$'; - mocha.grep(new RegExp(reString)); - }; - - /** - * Pending test case. - */ - - context.test.skip = function(title){ - context.test(title); - }; - }); -}; - -}); // module: interfaces/qunit.js - -require.register("interfaces/tdd.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test') - , escapeRe = require('browser/escape-string-regexp') - , utils = require('../utils'); - -/** - * TDD-style interface: - * - * suite('Array', function(){ - * suite('#indexOf()', function(){ - * suiteSetup(function(){ - * - * }); - * - * test('should return -1 when not present', function(){ - * - * }); - * - * test('should return the index when present', function(){ - * - * }); - * - * suiteTeardown(function(){ - * - * }); - * }); - * }); - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('pre-require', function(context, file, mocha){ - - /** - * Execute before each test case. - */ - - context.setup = function(name, fn){ - suites[0].beforeEach(name, fn); - }; - - /** - * Execute after each test case. - */ - - context.teardown = function(name, fn){ - suites[0].afterEach(name, fn); - }; - - /** - * Execute before the suite. - */ - - context.suiteSetup = function(name, fn){ - suites[0].beforeAll(name, fn); - }; - - /** - * Execute after the suite. - */ - - context.suiteTeardown = function(name, fn){ - suites[0].afterAll(name, fn); - }; - - /** - * Describe a "suite" with the given `title` - * and callback `fn` containing nested suites - * and/or tests. - */ - - context.suite = function(title, fn){ - var suite = Suite.create(suites[0], title); - suite.file = file; - suites.unshift(suite); - fn.call(suite); - suites.shift(); - return suite; - }; - - /** - * Pending suite. - */ - context.suite.skip = function(title, fn) { - var suite = Suite.create(suites[0], title); - suite.pending = true; - suites.unshift(suite); - fn.call(suite); - suites.shift(); - }; - - /** - * Exclusive test-case. - */ - - context.suite.only = function(title, fn){ - var suite = context.suite(title, fn); - mocha.grep(suite.fullTitle()); - }; - - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ - - context.test = function(title, fn){ - var suite = suites[0]; - if (suite.pending) fn = null; - var test = new Test(title, fn); - test.file = file; - suite.addTest(test); - return test; - }; - - /** - * Exclusive test-case. - */ - - context.test.only = function(title, fn){ - var test = context.test(title, fn); - var reString = '^' + escapeRe(test.fullTitle()) + '$'; - mocha.grep(new RegExp(reString)); - }; - - /** - * Pending test case. - */ - - context.test.skip = function(title){ - context.test(title); - }; - }); -}; - -}); // module: interfaces/tdd.js - -require.register("mocha.js", function(module, exports, require){ -/*! - * mocha - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var path = require('browser/path') - , escapeRe = require('browser/escape-string-regexp') - , utils = require('./utils'); - -/** - * Expose `Mocha`. - */ - -exports = module.exports = Mocha; - -/** - * To require local UIs and reporters when running in node. - */ - -if (typeof process !== 'undefined' && typeof process.cwd === 'function') { - var join = path.join - , cwd = process.cwd(); - module.paths.push(cwd, join(cwd, 'node_modules')); -} - -/** - * Expose internals. - */ - -exports.utils = utils; -exports.interfaces = require('./interfaces'); -exports.reporters = require('./reporters'); -exports.Runnable = require('./runnable'); -exports.Context = require('./context'); -exports.Runner = require('./runner'); -exports.Suite = require('./suite'); -exports.Hook = require('./hook'); -exports.Test = require('./test'); - -/** - * Return image `name` path. - * - * @param {String} name - * @return {String} - * @api private - */ - -function image(name) { - return __dirname + '/../images/' + name + '.png'; -} - -/** - * Setup mocha with `options`. - * - * Options: - * - * - `ui` name "bdd", "tdd", "exports" etc - * - `reporter` reporter instance, defaults to `mocha.reporters.spec` - * - `globals` array of accepted globals - * - `timeout` timeout in milliseconds - * - `bail` bail on the first test failure - * - `slow` milliseconds to wait before considering a test slow - * - `ignoreLeaks` ignore global leaks - * - `grep` string or regexp to filter tests with - * - * @param {Object} options - * @api public - */ - -function Mocha(options) { - options = options || {}; - this.files = []; - this.options = options; - this.grep(options.grep); - this.suite = new exports.Suite('', new exports.Context); - this.ui(options.ui); - this.bail(options.bail); - this.reporter(options.reporter); - if (null != options.timeout) this.timeout(options.timeout); - this.useColors(options.useColors) - if (options.enableTimeouts !== null) this.enableTimeouts(options.enableTimeouts); - if (options.slow) this.slow(options.slow); - - this.suite.on('pre-require', function (context) { - exports.afterEach = context.afterEach || context.teardown; - exports.after = context.after || context.suiteTeardown; - exports.beforeEach = context.beforeEach || context.setup; - exports.before = context.before || context.suiteSetup; - exports.describe = context.describe || context.suite; - exports.it = context.it || context.test; - exports.setup = context.setup || context.beforeEach; - exports.suiteSetup = context.suiteSetup || context.before; - exports.suiteTeardown = context.suiteTeardown || context.after; - exports.suite = context.suite || context.describe; - exports.teardown = context.teardown || context.afterEach; - exports.test = context.test || context.it; - }); -} - -/** - * Enable or disable bailing on the first failure. - * - * @param {Boolean} [bail] - * @api public - */ - -Mocha.prototype.bail = function(bail){ - if (0 == arguments.length) bail = true; - this.suite.bail(bail); - return this; -}; - -/** - * Add test `file`. - * - * @param {String} file - * @api public - */ - -Mocha.prototype.addFile = function(file){ - this.files.push(file); - return this; -}; - -/** - * Set reporter to `reporter`, defaults to "spec". - * - * @param {String|Function} reporter name or constructor - * @api public - */ - -Mocha.prototype.reporter = function(reporter){ - if ('function' == typeof reporter) { - this._reporter = reporter; - } else { - reporter = reporter || 'spec'; - var _reporter; - try { _reporter = require('./reporters/' + reporter); } catch (err) {}; - if (!_reporter) try { _reporter = require(reporter); } catch (err) {}; - if (!_reporter && reporter === 'teamcity') - console.warn('The Teamcity reporter was moved to a package named ' + - 'mocha-teamcity-reporter ' + - '(https://npmjs.org/package/mocha-teamcity-reporter).'); - if (!_reporter) throw new Error('invalid reporter "' + reporter + '"'); - this._reporter = _reporter; - } - return this; -}; - -/** - * Set test UI `name`, defaults to "bdd". - * - * @param {String} bdd - * @api public - */ - -Mocha.prototype.ui = function(name){ - name = name || 'bdd'; - this._ui = exports.interfaces[name]; - if (!this._ui) try { this._ui = require(name); } catch (err) {}; - if (!this._ui) throw new Error('invalid interface "' + name + '"'); - this._ui = this._ui(this.suite); - return this; -}; - -/** - * Load registered files. - * - * @api private - */ - -Mocha.prototype.loadFiles = function(fn){ - var self = this; - var suite = this.suite; - var pending = this.files.length; - this.files.forEach(function(file){ - file = path.resolve(file); - suite.emit('pre-require', global, file, self); - suite.emit('require', require(file), file, self); - suite.emit('post-require', global, file, self); - --pending || (fn && fn()); - }); -}; - -/** - * Enable growl support. - * - * @api private - */ - -Mocha.prototype._growl = function(runner, reporter) { - var notify = require('growl'); - - runner.on('end', function(){ - var stats = reporter.stats; - if (stats.failures) { - var msg = stats.failures + ' of ' + runner.total + ' tests failed'; - notify(msg, { name: 'mocha', title: 'Failed', image: image('error') }); - } else { - notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', { - name: 'mocha' - , title: 'Passed' - , image: image('ok') - }); - } - }); -}; - -/** - * Add regexp to grep, if `re` is a string it is escaped. - * - * @param {RegExp|String} re - * @return {Mocha} - * @api public - */ - -Mocha.prototype.grep = function(re){ - this.options.grep = 'string' == typeof re - ? new RegExp(escapeRe(re)) - : re; - return this; -}; - -/** - * Invert `.grep()` matches. - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.invert = function(){ - this.options.invert = true; - return this; -}; - -/** - * Ignore global leaks. - * - * @param {Boolean} ignore - * @return {Mocha} - * @api public - */ - -Mocha.prototype.ignoreLeaks = function(ignore){ - this.options.ignoreLeaks = !!ignore; - return this; -}; - -/** - * Enable global leak checking. - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.checkLeaks = function(){ - this.options.ignoreLeaks = false; - return this; -}; - -/** - * Enable growl support. - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.growl = function(){ - this.options.growl = true; - return this; -}; - -/** - * Ignore `globals` array or string. - * - * @param {Array|String} globals - * @return {Mocha} - * @api public - */ - -Mocha.prototype.globals = function(globals){ - this.options.globals = (this.options.globals || []).concat(globals); - return this; -}; - -/** - * Emit color output. - * - * @param {Boolean} colors - * @return {Mocha} - * @api public - */ - -Mocha.prototype.useColors = function(colors){ - this.options.useColors = arguments.length && colors != undefined - ? colors - : true; - return this; -}; - -/** - * Use inline diffs rather than +/-. - * - * @param {Boolean} inlineDiffs - * @return {Mocha} - * @api public - */ - -Mocha.prototype.useInlineDiffs = function(inlineDiffs) { - this.options.useInlineDiffs = arguments.length && inlineDiffs != undefined - ? inlineDiffs - : false; - return this; -}; - -/** - * Set the timeout in milliseconds. - * - * @param {Number} timeout - * @return {Mocha} - * @api public - */ - -Mocha.prototype.timeout = function(timeout){ - this.suite.timeout(timeout); - return this; -}; - -/** - * Set slowness threshold in milliseconds. - * - * @param {Number} slow - * @return {Mocha} - * @api public - */ - -Mocha.prototype.slow = function(slow){ - this.suite.slow(slow); - return this; -}; - -/** - * Enable timeouts. - * - * @param {Boolean} enabled - * @return {Mocha} - * @api public - */ - -Mocha.prototype.enableTimeouts = function(enabled) { - this.suite.enableTimeouts(arguments.length && enabled !== undefined - ? enabled - : true); - return this -}; - -/** - * Makes all tests async (accepting a callback) - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.asyncOnly = function(){ - this.options.asyncOnly = true; - return this; -}; - -/** - * Disable syntax highlighting (in browser). - * @returns {Mocha} - * @api public - */ -Mocha.prototype.noHighlighting = function() { - this.options.noHighlighting = true; - return this; -}; - -/** - * Run tests and invoke `fn()` when complete. - * - * @param {Function} fn - * @return {Runner} - * @api public - */ - -Mocha.prototype.run = function(fn){ - if (this.files.length) this.loadFiles(); - var suite = this.suite; - var options = this.options; - options.files = this.files; - var runner = new exports.Runner(suite); - var reporter = new this._reporter(runner, options); - runner.ignoreLeaks = false !== options.ignoreLeaks; - runner.asyncOnly = options.asyncOnly; - if (options.grep) runner.grep(options.grep, options.invert); - if (options.globals) runner.globals(options.globals); - if (options.growl) this._growl(runner, reporter); - exports.reporters.Base.useColors = options.useColors; - exports.reporters.Base.inlineDiffs = options.useInlineDiffs; - return runner.run(fn); -}; - -}); // module: mocha.js - -require.register("ms.js", function(module, exports, require){ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} options - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options){ - options = options || {}; - if ('string' == typeof val) return parse(val); - return options['long'] ? longFormat(val) : shortFormat(val); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - var match = /^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(str); - if (!match) return; - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'y': - return n * y; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 's': - return n * s; - case 'ms': - return n; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function shortFormat(ms) { - if (ms >= d) return Math.round(ms / d) + 'd'; - if (ms >= h) return Math.round(ms / h) + 'h'; - if (ms >= m) return Math.round(ms / m) + 'm'; - if (ms >= s) return Math.round(ms / s) + 's'; - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function longFormat(ms) { - return plural(ms, d, 'day') - || plural(ms, h, 'hour') - || plural(ms, m, 'minute') - || plural(ms, s, 'second') - || ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, n, name) { - if (ms < n) return; - if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name; - return Math.ceil(ms / n) + ' ' + name + 's'; -} - -}); // module: ms.js - -require.register("reporters/base.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var tty = require('browser/tty') - , diff = require('browser/diff') - , ms = require('../ms') - , utils = require('../utils'); - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Check if both stdio streams are associated with a tty. - */ - -var isatty = tty.isatty(1) && tty.isatty(2); - -/** - * Expose `Base`. - */ - -exports = module.exports = Base; - -/** - * Enable coloring by default. - */ - -exports.useColors = isatty || (process.env.MOCHA_COLORS !== undefined); - -/** - * Inline diffs instead of +/- - */ - -exports.inlineDiffs = false; - -/** - * Default color map. - */ - -exports.colors = { - 'pass': 90 - , 'fail': 31 - , 'bright pass': 92 - , 'bright fail': 91 - , 'bright yellow': 93 - , 'pending': 36 - , 'suite': 0 - , 'error title': 0 - , 'error message': 31 - , 'error stack': 90 - , 'checkmark': 32 - , 'fast': 90 - , 'medium': 33 - , 'slow': 31 - , 'green': 32 - , 'light': 90 - , 'diff gutter': 90 - , 'diff added': 42 - , 'diff removed': 41 -}; - -/** - * Default symbol map. - */ - -exports.symbols = { - ok: '✓', - err: '✖', - dot: '․' -}; - -// With node.js on Windows: use symbols available in terminal default fonts -if ('win32' == process.platform) { - exports.symbols.ok = '\u221A'; - exports.symbols.err = '\u00D7'; - exports.symbols.dot = '.'; -} - -/** - * Color `str` with the given `type`, - * allowing colors to be disabled, - * as well as user-defined color - * schemes. - * - * @param {String} type - * @param {String} str - * @return {String} - * @api private - */ - -var color = exports.color = function(type, str) { - if (!exports.useColors) return str; - return '\u001b[' + exports.colors[type] + 'm' + str + '\u001b[0m'; -}; - -/** - * Expose term window size, with some - * defaults for when stderr is not a tty. - */ - -exports.window = { - width: isatty - ? process.stdout.getWindowSize - ? process.stdout.getWindowSize(1)[0] - : tty.getWindowSize()[1] - : 75 -}; - -/** - * Expose some basic cursor interactions - * that are common among reporters. - */ - -exports.cursor = { - hide: function(){ - isatty && process.stdout.write('\u001b[?25l'); - }, - - show: function(){ - isatty && process.stdout.write('\u001b[?25h'); - }, - - deleteLine: function(){ - isatty && process.stdout.write('\u001b[2K'); - }, - - beginningOfLine: function(){ - isatty && process.stdout.write('\u001b[0G'); - }, - - CR: function(){ - if (isatty) { - exports.cursor.deleteLine(); - exports.cursor.beginningOfLine(); - } else { - process.stdout.write('\r'); - } - } -}; - -/** - * Outut the given `failures` as a list. - * - * @param {Array} failures - * @api public - */ - -exports.list = function(failures){ - console.error(); - failures.forEach(function(test, i){ - // format - var fmt = color('error title', ' %s) %s:\n') - + color('error message', ' %s') - + color('error stack', '\n%s\n'); - - // msg - var err = test.err - , message = err.message || '' - , stack = err.stack || message - , index = stack.indexOf(message) + message.length - , msg = stack.slice(0, index) - , actual = err.actual - , expected = err.expected - , escape = true; - - // uncaught - if (err.uncaught) { - msg = 'Uncaught ' + msg; - } - - // explicitly show diff - if (err.showDiff && sameType(actual, expected)) { - escape = false; - err.actual = actual = utils.stringify(actual); - err.expected = expected = utils.stringify(expected); - } - - // actual / expected diff - if (err.showDiff && 'string' == typeof actual && 'string' == typeof expected) { - fmt = color('error title', ' %s) %s:\n%s') + color('error stack', '\n%s\n'); - var match = message.match(/^([^:]+): expected/); - msg = '\n ' + color('error message', match ? match[1] : msg); - - if (exports.inlineDiffs) { - msg += inlineDiff(err, escape); - } else { - msg += unifiedDiff(err, escape); - } - } - - // indent stack trace without msg - stack = stack.slice(index ? index + 1 : index) - .replace(/^/gm, ' '); - - console.error(fmt, (i + 1), test.fullTitle(), msg, stack); - }); -}; - -/** - * Initialize a new `Base` reporter. - * - * All other reporters generally - * inherit from this reporter, providing - * stats such as test duration, number - * of tests passed / failed etc. - * - * @param {Runner} runner - * @api public - */ - -function Base(runner) { - var self = this - , stats = this.stats = { suites: 0, tests: 0, passes: 0, pending: 0, failures: 0 } - , failures = this.failures = []; - - if (!runner) return; - this.runner = runner; - - runner.stats = stats; - - runner.on('start', function(){ - stats.start = new Date; - }); - - runner.on('suite', function(suite){ - stats.suites = stats.suites || 0; - suite.root || stats.suites++; - }); - - runner.on('test end', function(test){ - stats.tests = stats.tests || 0; - stats.tests++; - }); - - runner.on('pass', function(test){ - stats.passes = stats.passes || 0; - - var medium = test.slow() / 2; - test.speed = test.duration > test.slow() - ? 'slow' - : test.duration > medium - ? 'medium' - : 'fast'; - - stats.passes++; - }); - - runner.on('fail', function(test, err){ - stats.failures = stats.failures || 0; - stats.failures++; - test.err = err; - failures.push(test); - }); - - runner.on('end', function(){ - stats.end = new Date; - stats.duration = new Date - stats.start; - }); - - runner.on('pending', function(){ - stats.pending++; - }); -} - -/** - * Output common epilogue used by many of - * the bundled reporters. - * - * @api public - */ - -Base.prototype.epilogue = function(){ - var stats = this.stats; - var tests; - var fmt; - - console.log(); - - // passes - fmt = color('bright pass', ' ') - + color('green', ' %d passing') - + color('light', ' (%s)'); - - console.log(fmt, - stats.passes || 0, - ms(stats.duration)); - - // pending - if (stats.pending) { - fmt = color('pending', ' ') - + color('pending', ' %d pending'); - - console.log(fmt, stats.pending); - } - - // failures - if (stats.failures) { - fmt = color('fail', ' %d failing'); - - console.error(fmt, - stats.failures); - - Base.list(this.failures); - console.error(); - } - - console.log(); -}; - -/** - * Pad the given `str` to `len`. - * - * @param {String} str - * @param {String} len - * @return {String} - * @api private - */ - -function pad(str, len) { - str = String(str); - return Array(len - str.length + 1).join(' ') + str; -} - - -/** - * Returns an inline diff between 2 strings with coloured ANSI output - * - * @param {Error} Error with actual/expected - * @return {String} Diff - * @api private - */ - -function inlineDiff(err, escape) { - var msg = errorDiff(err, 'WordsWithSpace', escape); - - // linenos - var lines = msg.split('\n'); - if (lines.length > 4) { - var width = String(lines.length).length; - msg = lines.map(function(str, i){ - return pad(++i, width) + ' |' + ' ' + str; - }).join('\n'); - } - - // legend - msg = '\n' - + color('diff removed', 'actual') - + ' ' - + color('diff added', 'expected') - + '\n\n' - + msg - + '\n'; - - // indent - msg = msg.replace(/^/gm, ' '); - return msg; -} - -/** - * Returns a unified diff between 2 strings - * - * @param {Error} Error with actual/expected - * @return {String} Diff - * @api private - */ - -function unifiedDiff(err, escape) { - var indent = ' '; - function cleanUp(line) { - if (escape) { - line = escapeInvisibles(line); - } - if (line[0] === '+') return indent + colorLines('diff added', line); - if (line[0] === '-') return indent + colorLines('diff removed', line); - if (line.match(/\@\@/)) return null; - if (line.match(/\\ No newline/)) return null; - else return indent + line; - } - function notBlank(line) { - return line != null; - } - msg = diff.createPatch('string', err.actual, err.expected); - var lines = msg.split('\n').splice(4); - return '\n ' - + colorLines('diff added', '+ expected') + ' ' - + colorLines('diff removed', '- actual') - + '\n\n' - + lines.map(cleanUp).filter(notBlank).join('\n'); -} - -/** - * Return a character diff for `err`. - * - * @param {Error} err - * @return {String} - * @api private - */ - -function errorDiff(err, type, escape) { - var actual = escape ? escapeInvisibles(err.actual) : err.actual; - var expected = escape ? escapeInvisibles(err.expected) : err.expected; - return diff['diff' + type](actual, expected).map(function(str){ - if (str.added) return colorLines('diff added', str.value); - if (str.removed) return colorLines('diff removed', str.value); - return str.value; - }).join(''); -} - -/** - * Returns a string with all invisible characters in plain text - * - * @param {String} line - * @return {String} - * @api private - */ -function escapeInvisibles(line) { - return line.replace(/\t/g, '') - .replace(/\r/g, '') - .replace(/\n/g, '\n'); -} - -/** - * Color lines for `str`, using the color `name`. - * - * @param {String} name - * @param {String} str - * @return {String} - * @api private - */ - -function colorLines(name, str) { - return str.split('\n').map(function(str){ - return color(name, str); - }).join('\n'); -} - -/** - * Check that a / b have the same type. - * - * @param {Object} a - * @param {Object} b - * @return {Boolean} - * @api private - */ - -function sameType(a, b) { - a = Object.prototype.toString.call(a); - b = Object.prototype.toString.call(b); - return a == b; -} - -}); // module: reporters/base.js - -require.register("reporters/doc.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils'); - -/** - * Expose `Doc`. - */ - -exports = module.exports = Doc; - -/** - * Initialize a new `Doc` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Doc(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total - , indents = 2; - - function indent() { - return Array(indents).join(' '); - } - - runner.on('suite', function(suite){ - if (suite.root) return; - ++indents; - console.log('%s
    ', indent()); - ++indents; - console.log('%s

    %s

    ', indent(), utils.escape(suite.title)); - console.log('%s
    ', indent()); - }); - - runner.on('suite end', function(suite){ - if (suite.root) return; - console.log('%s
    ', indent()); - --indents; - console.log('%s
    ', indent()); - --indents; - }); - - runner.on('pass', function(test){ - console.log('%s
    %s
    ', indent(), utils.escape(test.title)); - var code = utils.escape(utils.clean(test.fn.toString())); - console.log('%s
    %s
    ', indent(), code); - }); - - runner.on('fail', function(test, err){ - console.log('%s
    %s
    ', indent(), utils.escape(test.title)); - var code = utils.escape(utils.clean(test.fn.toString())); - console.log('%s
    %s
    ', indent(), code); - console.log('%s
    %s
    ', indent(), utils.escape(err)); - }); -} - -}); // module: reporters/doc.js - -require.register("reporters/dot.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , color = Base.color; - -/** - * Expose `Dot`. - */ - -exports = module.exports = Dot; - -/** - * Initialize a new `Dot` matrix test reporter. - * - * @param {Runner} runner - * @api public - */ - -function Dot(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , width = Base.window.width * .75 | 0 - , n = -1; - - runner.on('start', function(){ - process.stdout.write('\n '); - }); - - runner.on('pending', function(test){ - if (++n % width == 0) process.stdout.write('\n '); - process.stdout.write(color('pending', Base.symbols.dot)); - }); - - runner.on('pass', function(test){ - if (++n % width == 0) process.stdout.write('\n '); - if ('slow' == test.speed) { - process.stdout.write(color('bright yellow', Base.symbols.dot)); - } else { - process.stdout.write(color(test.speed, Base.symbols.dot)); - } - }); - - runner.on('fail', function(test, err){ - if (++n % width == 0) process.stdout.write('\n '); - process.stdout.write(color('fail', Base.symbols.dot)); - }); - - runner.on('end', function(){ - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -Dot.prototype = new F; -Dot.prototype.constructor = Dot; - - -}); // module: reporters/dot.js - -require.register("reporters/html-cov.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var JSONCov = require('./json-cov') - , fs = require('browser/fs'); - -/** - * Expose `HTMLCov`. - */ - -exports = module.exports = HTMLCov; - -/** - * Initialize a new `JsCoverage` reporter. - * - * @param {Runner} runner - * @api public - */ - -function HTMLCov(runner) { - var jade = require('jade') - , file = __dirname + '/templates/coverage.jade' - , str = fs.readFileSync(file, 'utf8') - , fn = jade.compile(str, { filename: file }) - , self = this; - - JSONCov.call(this, runner, false); - - runner.on('end', function(){ - process.stdout.write(fn({ - cov: self.cov - , coverageClass: coverageClass - })); - }); -} - -/** - * Return coverage class for `n`. - * - * @return {String} - * @api private - */ - -function coverageClass(n) { - if (n >= 75) return 'high'; - if (n >= 50) return 'medium'; - if (n >= 25) return 'low'; - return 'terrible'; -} - -}); // module: reporters/html-cov.js - -require.register("reporters/html.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils') - , Progress = require('../browser/progress') - , escape = utils.escape; - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Expose `HTML`. - */ - -exports = module.exports = HTML; - -/** - * Stats template. - */ - -var statsTemplate = ''; - -/** - * Initialize a new `HTML` reporter. - * - * @param {Runner} runner - * @api public - */ - -function HTML(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total - , stat = fragment(statsTemplate) - , items = stat.getElementsByTagName('li') - , passes = items[1].getElementsByTagName('em')[0] - , passesLink = items[1].getElementsByTagName('a')[0] - , failures = items[2].getElementsByTagName('em')[0] - , failuresLink = items[2].getElementsByTagName('a')[0] - , duration = items[3].getElementsByTagName('em')[0] - , canvas = stat.getElementsByTagName('canvas')[0] - , report = fragment('
      ') - , stack = [report] - , progress - , ctx - , root = document.getElementById('mocha'); - - if (canvas.getContext) { - var ratio = window.devicePixelRatio || 1; - canvas.style.width = canvas.width; - canvas.style.height = canvas.height; - canvas.width *= ratio; - canvas.height *= ratio; - ctx = canvas.getContext('2d'); - ctx.scale(ratio, ratio); - progress = new Progress; - } - - if (!root) return error('#mocha div missing, add it to your document'); - - // pass toggle - on(passesLink, 'click', function(){ - unhide(); - var name = /pass/.test(report.className) ? '' : ' pass'; - report.className = report.className.replace(/fail|pass/g, '') + name; - if (report.className.trim()) hideSuitesWithout('test pass'); - }); - - // failure toggle - on(failuresLink, 'click', function(){ - unhide(); - var name = /fail/.test(report.className) ? '' : ' fail'; - report.className = report.className.replace(/fail|pass/g, '') + name; - if (report.className.trim()) hideSuitesWithout('test fail'); - }); - - root.appendChild(stat); - root.appendChild(report); - - if (progress) progress.size(40); - - runner.on('suite', function(suite){ - if (suite.root) return; - - // suite - var url = self.suiteURL(suite); - var el = fragment('
    • %s

    • ', url, escape(suite.title)); - - // container - stack[0].appendChild(el); - stack.unshift(document.createElement('ul')); - el.appendChild(stack[0]); - }); - - runner.on('suite end', function(suite){ - if (suite.root) return; - stack.shift(); - }); - - runner.on('fail', function(test, err){ - if ('hook' == test.type) runner.emit('test end', test); - }); - - runner.on('test end', function(test){ - // TODO: add to stats - var percent = stats.tests / this.total * 100 | 0; - if (progress) progress.update(percent).draw(ctx); - - // update stats - var ms = new Date - stats.start; - text(passes, stats.passes); - text(failures, stats.failures); - text(duration, (ms / 1000).toFixed(2)); - - // test - if ('passed' == test.state) { - var url = self.testURL(test); - var el = fragment('
    • %e%ems

    • ', test.speed, test.title, test.duration, url); - } else if (test.pending) { - var el = fragment('
    • %e

    • ', test.title); - } else { - var el = fragment('
    • %e

    • ', test.title, encodeURIComponent(test.fullTitle())); - var str = test.err.stack || test.err.toString(); - - // FF / Opera do not add the message - if (!~str.indexOf(test.err.message)) { - str = test.err.message + '\n' + str; - } - - // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we - // check for the result of the stringifying. - if ('[object Error]' == str) str = test.err.message; - - // Safari doesn't give you a stack. Let's at least provide a source line. - if (!test.err.stack && test.err.sourceURL && test.err.line !== undefined) { - str += "\n(" + test.err.sourceURL + ":" + test.err.line + ")"; - } - - el.appendChild(fragment('
      %e
      ', str)); - } - - // toggle code - // TODO: defer - if (!test.pending) { - var h2 = el.getElementsByTagName('h2')[0]; - - on(h2, 'click', function(){ - pre.style.display = 'none' == pre.style.display - ? 'block' - : 'none'; - }); - - var pre = fragment('
      %e
      ', utils.clean(test.fn.toString())); - el.appendChild(pre); - pre.style.display = 'none'; - } - - // Don't call .appendChild if #mocha-report was already .shift()'ed off the stack. - if (stack[0]) stack[0].appendChild(el); - }); -} - -/** - * Makes a URL, preserving querystring ("search") parameters. - * @param {string} s - * @returns {string} your new URL - */ -var makeUrl = function makeUrl(s) { - var search = window.location.search; - return (search ? search + '&' : '?' ) + 'grep=' + encodeURIComponent(s); -}; - -/** - * Provide suite URL - * - * @param {Object} [suite] - */ -HTML.prototype.suiteURL = function(suite){ - return makeUrl(suite.fullTitle()); -}; - -/** - * Provide test URL - * - * @param {Object} [test] - */ - -HTML.prototype.testURL = function(test){ - return makeUrl(test.fullTitle()); -}; - -/** - * Display error `msg`. - */ - -function error(msg) { - document.body.appendChild(fragment('
      %s
      ', msg)); -} - -/** - * Return a DOM fragment from `html`. - */ - -function fragment(html) { - var args = arguments - , div = document.createElement('div') - , i = 1; - - div.innerHTML = html.replace(/%([se])/g, function(_, type){ - switch (type) { - case 's': return String(args[i++]); - case 'e': return escape(args[i++]); - } - }); - - return div.firstChild; -} - -/** - * Check for suites that do not have elements - * with `classname`, and hide them. - */ - -function hideSuitesWithout(classname) { - var suites = document.getElementsByClassName('suite'); - for (var i = 0; i < suites.length; i++) { - var els = suites[i].getElementsByClassName(classname); - if (0 == els.length) suites[i].className += ' hidden'; - } -} - -/** - * Unhide .hidden suites. - */ - -function unhide() { - var els = document.getElementsByClassName('suite hidden'); - for (var i = 0; i < els.length; ++i) { - els[i].className = els[i].className.replace('suite hidden', 'suite'); - } -} - -/** - * Set `el` text to `str`. - */ - -function text(el, str) { - if (el.textContent) { - el.textContent = str; - } else { - el.innerText = str; - } -} - -/** - * Listen on `event` with callback `fn`. - */ - -function on(el, event, fn) { - if (el.addEventListener) { - el.addEventListener(event, fn, false); - } else { - el.attachEvent('on' + event, fn); - } -} - -}); // module: reporters/html.js - -require.register("reporters/index.js", function(module, exports, require){ -exports.Base = require('./base'); -exports.Dot = require('./dot'); -exports.Doc = require('./doc'); -exports.TAP = require('./tap'); -exports.JSON = require('./json'); -exports.HTML = require('./html'); -exports.List = require('./list'); -exports.Min = require('./min'); -exports.Spec = require('./spec'); -exports.Nyan = require('./nyan'); -exports.XUnit = require('./xunit'); -exports.Markdown = require('./markdown'); -exports.Progress = require('./progress'); -exports.Landing = require('./landing'); -exports.JSONCov = require('./json-cov'); -exports.HTMLCov = require('./html-cov'); -exports.JSONStream = require('./json-stream'); - -}); // module: reporters/index.js - -require.register("reporters/json-cov.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base'); - -/** - * Expose `JSONCov`. - */ - -exports = module.exports = JSONCov; - -/** - * Initialize a new `JsCoverage` reporter. - * - * @param {Runner} runner - * @param {Boolean} output - * @api public - */ - -function JSONCov(runner, output) { - var self = this - , output = 1 == arguments.length ? true : output; - - Base.call(this, runner); - - var tests = [] - , failures = [] - , passes = []; - - runner.on('test end', function(test){ - tests.push(test); - }); - - runner.on('pass', function(test){ - passes.push(test); - }); - - runner.on('fail', function(test){ - failures.push(test); - }); - - runner.on('end', function(){ - var cov = global._$jscoverage || {}; - var result = self.cov = map(cov); - result.stats = self.stats; - result.tests = tests.map(clean); - result.failures = failures.map(clean); - result.passes = passes.map(clean); - if (!output) return; - process.stdout.write(JSON.stringify(result, null, 2 )); - }); -} - -/** - * Map jscoverage data to a JSON structure - * suitable for reporting. - * - * @param {Object} cov - * @return {Object} - * @api private - */ - -function map(cov) { - var ret = { - instrumentation: 'node-jscoverage' - , sloc: 0 - , hits: 0 - , misses: 0 - , coverage: 0 - , files: [] - }; - - for (var filename in cov) { - var data = coverage(filename, cov[filename]); - ret.files.push(data); - ret.hits += data.hits; - ret.misses += data.misses; - ret.sloc += data.sloc; - } - - ret.files.sort(function(a, b) { - return a.filename.localeCompare(b.filename); - }); - - if (ret.sloc > 0) { - ret.coverage = (ret.hits / ret.sloc) * 100; - } - - return ret; -} - -/** - * Map jscoverage data for a single source file - * to a JSON structure suitable for reporting. - * - * @param {String} filename name of the source file - * @param {Object} data jscoverage coverage data - * @return {Object} - * @api private - */ - -function coverage(filename, data) { - var ret = { - filename: filename, - coverage: 0, - hits: 0, - misses: 0, - sloc: 0, - source: {} - }; - - data.source.forEach(function(line, num){ - num++; - - if (data[num] === 0) { - ret.misses++; - ret.sloc++; - } else if (data[num] !== undefined) { - ret.hits++; - ret.sloc++; - } - - ret.source[num] = { - source: line - , coverage: data[num] === undefined - ? '' - : data[num] - }; - }); - - ret.coverage = ret.hits / ret.sloc * 100; - - return ret; -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @param {Object} test - * @return {Object} - * @api private - */ - -function clean(test) { - return { - title: test.title - , fullTitle: test.fullTitle() - , duration: test.duration - } -} - -}); // module: reporters/json-cov.js - -require.register("reporters/json-stream.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , color = Base.color; - -/** - * Expose `List`. - */ - -exports = module.exports = List; - -/** - * Initialize a new `List` test reporter. - * - * @param {Runner} runner - * @api public - */ - -function List(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total; - - runner.on('start', function(){ - console.log(JSON.stringify(['start', { total: total }])); - }); - - runner.on('pass', function(test){ - console.log(JSON.stringify(['pass', clean(test)])); - }); - - runner.on('fail', function(test, err){ - test = clean(test); - test.err = err.message; - console.log(JSON.stringify(['fail', test])); - }); - - runner.on('end', function(){ - process.stdout.write(JSON.stringify(['end', self.stats])); - }); -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @param {Object} test - * @return {Object} - * @api private - */ - -function clean(test) { - return { - title: test.title - , fullTitle: test.fullTitle() - , duration: test.duration - } -} - -}); // module: reporters/json-stream.js - -require.register("reporters/json.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `JSON`. - */ - -exports = module.exports = JSONReporter; - -/** - * Initialize a new `JSON` reporter. - * - * @param {Runner} runner - * @api public - */ - -function JSONReporter(runner) { - var self = this; - Base.call(this, runner); - - var tests = [] - , pending = [] - , failures = [] - , passes = []; - - runner.on('test end', function(test){ - tests.push(test); - }); - - runner.on('pass', function(test){ - passes.push(test); - }); - - runner.on('fail', function(test){ - failures.push(test); - }); - - runner.on('pending', function(test){ - pending.push(test); - }); - - runner.on('end', function(){ - var obj = { - stats: self.stats, - tests: tests.map(clean), - pending: pending.map(clean), - failures: failures.map(clean), - passes: passes.map(clean) - }; - - runner.testResults = obj; - - process.stdout.write(JSON.stringify(obj, null, 2)); - }); -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @param {Object} test - * @return {Object} - * @api private - */ - -function clean(test) { - return { - title: test.title, - fullTitle: test.fullTitle(), - duration: test.duration, - err: errorJSON(test.err || {}) - } -} - -/** - * Transform `error` into a JSON object. - * @param {Error} err - * @return {Object} - */ - -function errorJSON(err) { - var res = {}; - Object.getOwnPropertyNames(err).forEach(function(key) { - res[key] = err[key]; - }, err); - return res; -} - -}); // module: reporters/json.js - -require.register("reporters/landing.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `Landing`. - */ - -exports = module.exports = Landing; - -/** - * Airplane color. - */ - -Base.colors.plane = 0; - -/** - * Airplane crash color. - */ - -Base.colors['plane crash'] = 31; - -/** - * Runway color. - */ - -Base.colors.runway = 90; - -/** - * Initialize a new `Landing` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Landing(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , width = Base.window.width * .75 | 0 - , total = runner.total - , stream = process.stdout - , plane = color('plane', '✈') - , crashed = -1 - , n = 0; - - function runway() { - var buf = Array(width).join('-'); - return ' ' + color('runway', buf); - } - - runner.on('start', function(){ - stream.write('\n\n\n '); - cursor.hide(); - }); - - runner.on('test end', function(test){ - // check if the plane crashed - var col = -1 == crashed - ? width * ++n / total | 0 - : crashed; - - // show the crash - if ('failed' == test.state) { - plane = color('plane crash', '✈'); - crashed = col; - } - - // render landing strip - stream.write('\u001b['+(width+1)+'D\u001b[2A'); - stream.write(runway()); - stream.write('\n '); - stream.write(color('runway', Array(col).join('⋅'))); - stream.write(plane) - stream.write(color('runway', Array(width - col).join('⋅') + '\n')); - stream.write(runway()); - stream.write('\u001b[0m'); - }); - - runner.on('end', function(){ - cursor.show(); - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -Landing.prototype = new F; -Landing.prototype.constructor = Landing; - - -}); // module: reporters/landing.js - -require.register("reporters/list.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `List`. - */ - -exports = module.exports = List; - -/** - * Initialize a new `List` test reporter. - * - * @param {Runner} runner - * @api public - */ - -function List(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , n = 0; - - runner.on('start', function(){ - console.log(); - }); - - runner.on('test', function(test){ - process.stdout.write(color('pass', ' ' + test.fullTitle() + ': ')); - }); - - runner.on('pending', function(test){ - var fmt = color('checkmark', ' -') - + color('pending', ' %s'); - console.log(fmt, test.fullTitle()); - }); - - runner.on('pass', function(test){ - var fmt = color('checkmark', ' '+Base.symbols.dot) - + color('pass', ' %s: ') - + color(test.speed, '%dms'); - cursor.CR(); - console.log(fmt, test.fullTitle(), test.duration); - }); - - runner.on('fail', function(test, err){ - cursor.CR(); - console.log(color('fail', ' %d) %s'), ++n, test.fullTitle()); - }); - - runner.on('end', self.epilogue.bind(self)); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -List.prototype = new F; -List.prototype.constructor = List; - - -}); // module: reporters/list.js - -require.register("reporters/markdown.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils'); - -/** - * Expose `Markdown`. - */ - -exports = module.exports = Markdown; - -/** - * Initialize a new `Markdown` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Markdown(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , level = 0 - , buf = ''; - - function title(str) { - return Array(level).join('#') + ' ' + str; - } - - function indent() { - return Array(level).join(' '); - } - - function mapTOC(suite, obj) { - var ret = obj; - obj = obj[suite.title] = obj[suite.title] || { suite: suite }; - suite.suites.forEach(function(suite){ - mapTOC(suite, obj); - }); - return ret; - } - - function stringifyTOC(obj, level) { - ++level; - var buf = ''; - var link; - for (var key in obj) { - if ('suite' == key) continue; - if (key) link = ' - [' + key + '](#' + utils.slug(obj[key].suite.fullTitle()) + ')\n'; - if (key) buf += Array(level).join(' ') + link; - buf += stringifyTOC(obj[key], level); - } - --level; - return buf; - } - - function generateTOC(suite) { - var obj = mapTOC(suite, {}); - return stringifyTOC(obj, 0); - } - - generateTOC(runner.suite); - - runner.on('suite', function(suite){ - ++level; - var slug = utils.slug(suite.fullTitle()); - buf += '' + '\n'; - buf += title(suite.title) + '\n'; - }); - - runner.on('suite end', function(suite){ - --level; - }); - - runner.on('pass', function(test){ - var code = utils.clean(test.fn.toString()); - buf += test.title + '.\n'; - buf += '\n```js\n'; - buf += code + '\n'; - buf += '```\n\n'; - }); - - runner.on('end', function(){ - process.stdout.write('# TOC\n'); - process.stdout.write(generateTOC(runner.suite)); - process.stdout.write(buf); - }); -} - -}); // module: reporters/markdown.js - -require.register("reporters/min.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base'); - -/** - * Expose `Min`. - */ - -exports = module.exports = Min; - -/** - * Initialize a new `Min` minimal test reporter (best used with --watch). - * - * @param {Runner} runner - * @api public - */ - -function Min(runner) { - Base.call(this, runner); - - runner.on('start', function(){ - // clear screen - process.stdout.write('\u001b[2J'); - // set cursor position - process.stdout.write('\u001b[1;3H'); - }); - - runner.on('end', this.epilogue.bind(this)); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -Min.prototype = new F; -Min.prototype.constructor = Min; - - -}); // module: reporters/min.js - -require.register("reporters/nyan.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , color = Base.color; - -/** - * Expose `Dot`. - */ - -exports = module.exports = NyanCat; - -/** - * Initialize a new `Dot` matrix test reporter. - * - * @param {Runner} runner - * @api public - */ - -function NyanCat(runner) { - Base.call(this, runner); - var self = this - , stats = this.stats - , width = Base.window.width * .75 | 0 - , rainbowColors = this.rainbowColors = self.generateColors() - , colorIndex = this.colorIndex = 0 - , numerOfLines = this.numberOfLines = 4 - , trajectories = this.trajectories = [[], [], [], []] - , nyanCatWidth = this.nyanCatWidth = 11 - , trajectoryWidthMax = this.trajectoryWidthMax = (width - nyanCatWidth) - , scoreboardWidth = this.scoreboardWidth = 5 - , tick = this.tick = 0 - , n = 0; - - runner.on('start', function(){ - Base.cursor.hide(); - self.draw(); - }); - - runner.on('pending', function(test){ - self.draw(); - }); - - runner.on('pass', function(test){ - self.draw(); - }); - - runner.on('fail', function(test, err){ - self.draw(); - }); - - runner.on('end', function(){ - Base.cursor.show(); - for (var i = 0; i < self.numberOfLines; i++) write('\n'); - self.epilogue(); - }); -} - -/** - * Draw the nyan cat - * - * @api private - */ - -NyanCat.prototype.draw = function(){ - this.appendRainbow(); - this.drawScoreboard(); - this.drawRainbow(); - this.drawNyanCat(); - this.tick = !this.tick; -}; - -/** - * Draw the "scoreboard" showing the number - * of passes, failures and pending tests. - * - * @api private - */ - -NyanCat.prototype.drawScoreboard = function(){ - var stats = this.stats; - var colors = Base.colors; - - function draw(color, n) { - write(' '); - write('\u001b[' + color + 'm' + n + '\u001b[0m'); - write('\n'); - } - - draw(colors.green, stats.passes); - draw(colors.fail, stats.failures); - draw(colors.pending, stats.pending); - write('\n'); - - this.cursorUp(this.numberOfLines); -}; - -/** - * Append the rainbow. - * - * @api private - */ - -NyanCat.prototype.appendRainbow = function(){ - var segment = this.tick ? '_' : '-'; - var rainbowified = this.rainbowify(segment); - - for (var index = 0; index < this.numberOfLines; index++) { - var trajectory = this.trajectories[index]; - if (trajectory.length >= this.trajectoryWidthMax) trajectory.shift(); - trajectory.push(rainbowified); - } -}; - -/** - * Draw the rainbow. - * - * @api private - */ - -NyanCat.prototype.drawRainbow = function(){ - var self = this; - - this.trajectories.forEach(function(line, index) { - write('\u001b[' + self.scoreboardWidth + 'C'); - write(line.join('')); - write('\n'); - }); - - this.cursorUp(this.numberOfLines); -}; - -/** - * Draw the nyan cat - * - * @api private - */ - -NyanCat.prototype.drawNyanCat = function() { - var self = this; - var startWidth = this.scoreboardWidth + this.trajectories[0].length; - var color = '\u001b[' + startWidth + 'C'; - var padding = ''; - - write(color); - write('_,------,'); - write('\n'); - - write(color); - padding = self.tick ? ' ' : ' '; - write('_|' + padding + '/\\_/\\ '); - write('\n'); - - write(color); - padding = self.tick ? '_' : '__'; - var tail = self.tick ? '~' : '^'; - var face; - write(tail + '|' + padding + this.face() + ' '); - write('\n'); - - write(color); - padding = self.tick ? ' ' : ' '; - write(padding + '"" "" '); - write('\n'); - - this.cursorUp(this.numberOfLines); -}; - -/** - * Draw nyan cat face. - * - * @return {String} - * @api private - */ - -NyanCat.prototype.face = function() { - var stats = this.stats; - if (stats.failures) { - return '( x .x)'; - } else if (stats.pending) { - return '( o .o)'; - } else if(stats.passes) { - return '( ^ .^)'; - } else { - return '( - .-)'; - } -}; - -/** - * Move cursor up `n`. - * - * @param {Number} n - * @api private - */ - -NyanCat.prototype.cursorUp = function(n) { - write('\u001b[' + n + 'A'); -}; - -/** - * Move cursor down `n`. - * - * @param {Number} n - * @api private - */ - -NyanCat.prototype.cursorDown = function(n) { - write('\u001b[' + n + 'B'); -}; - -/** - * Generate rainbow colors. - * - * @return {Array} - * @api private - */ - -NyanCat.prototype.generateColors = function(){ - var colors = []; - - for (var i = 0; i < (6 * 7); i++) { - var pi3 = Math.floor(Math.PI / 3); - var n = (i * (1.0 / 6)); - var r = Math.floor(3 * Math.sin(n) + 3); - var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3); - var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3); - colors.push(36 * r + 6 * g + b + 16); - } - - return colors; -}; - -/** - * Apply rainbow to the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -NyanCat.prototype.rainbowify = function(str){ - var color = this.rainbowColors[this.colorIndex % this.rainbowColors.length]; - this.colorIndex += 1; - return '\u001b[38;5;' + color + 'm' + str + '\u001b[0m'; -}; - -/** - * Stdout helper. - */ - -function write(string) { - process.stdout.write(string); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -NyanCat.prototype = new F; -NyanCat.prototype.constructor = NyanCat; - - -}); // module: reporters/nyan.js - -require.register("reporters/progress.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `Progress`. - */ - -exports = module.exports = Progress; - -/** - * General progress bar color. - */ - -Base.colors.progress = 90; - -/** - * Initialize a new `Progress` bar test reporter. - * - * @param {Runner} runner - * @param {Object} options - * @api public - */ - -function Progress(runner, options) { - Base.call(this, runner); - - var self = this - , options = options || {} - , stats = this.stats - , width = Base.window.width * .50 | 0 - , total = runner.total - , complete = 0 - , max = Math.max - , lastN = -1; - - // default chars - options.open = options.open || '['; - options.complete = options.complete || '▬'; - options.incomplete = options.incomplete || Base.symbols.dot; - options.close = options.close || ']'; - options.verbose = false; - - // tests started - runner.on('start', function(){ - console.log(); - cursor.hide(); - }); - - // tests complete - runner.on('test end', function(){ - complete++; - var incomplete = total - complete - , percent = complete / total - , n = width * percent | 0 - , i = width - n; - - if (lastN === n && !options.verbose) { - // Don't re-render the line if it hasn't changed - return; - } - lastN = n; - - cursor.CR(); - process.stdout.write('\u001b[J'); - process.stdout.write(color('progress', ' ' + options.open)); - process.stdout.write(Array(n).join(options.complete)); - process.stdout.write(Array(i).join(options.incomplete)); - process.stdout.write(color('progress', options.close)); - if (options.verbose) { - process.stdout.write(color('progress', ' ' + complete + ' of ' + total)); - } - }); - - // tests are complete, output some stats - // and the failures if any - runner.on('end', function(){ - cursor.show(); - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -Progress.prototype = new F; -Progress.prototype.constructor = Progress; - - -}); // module: reporters/progress.js - -require.register("reporters/spec.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `Spec`. - */ - -exports = module.exports = Spec; - -/** - * Initialize a new `Spec` test reporter. - * - * @param {Runner} runner - * @api public - */ - -function Spec(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , indents = 0 - , n = 0; - - function indent() { - return Array(indents).join(' ') - } - - runner.on('start', function(){ - console.log(); - }); - - runner.on('suite', function(suite){ - ++indents; - console.log(color('suite', '%s%s'), indent(), suite.title); - }); - - runner.on('suite end', function(suite){ - --indents; - if (1 == indents) console.log(); - }); - - runner.on('pending', function(test){ - var fmt = indent() + color('pending', ' - %s'); - console.log(fmt, test.title); - }); - - runner.on('pass', function(test){ - if ('fast' == test.speed) { - var fmt = indent() - + color('checkmark', ' ' + Base.symbols.ok) - + color('pass', ' %s '); - cursor.CR(); - console.log(fmt, test.title); - } else { - var fmt = indent() - + color('checkmark', ' ' + Base.symbols.ok) - + color('pass', ' %s ') - + color(test.speed, '(%dms)'); - cursor.CR(); - console.log(fmt, test.title, test.duration); - } - }); - - runner.on('fail', function(test, err){ - cursor.CR(); - console.log(indent() + color('fail', ' %d) %s'), ++n, test.title); - }); - - runner.on('end', self.epilogue.bind(self)); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -Spec.prototype = new F; -Spec.prototype.constructor = Spec; - - -}); // module: reporters/spec.js - -require.register("reporters/tap.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `TAP`. - */ - -exports = module.exports = TAP; - -/** - * Initialize a new `TAP` reporter. - * - * @param {Runner} runner - * @api public - */ - -function TAP(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , n = 1 - , passes = 0 - , failures = 0; - - runner.on('start', function(){ - var total = runner.grepTotal(runner.suite); - console.log('%d..%d', 1, total); - }); - - runner.on('test end', function(){ - ++n; - }); - - runner.on('pending', function(test){ - console.log('ok %d %s # SKIP -', n, title(test)); - }); - - runner.on('pass', function(test){ - passes++; - console.log('ok %d %s', n, title(test)); - }); - - runner.on('fail', function(test, err){ - failures++; - console.log('not ok %d %s', n, title(test)); - if (err.stack) console.log(err.stack.replace(/^/gm, ' ')); - }); - - runner.on('end', function(){ - console.log('# tests ' + (passes + failures)); - console.log('# pass ' + passes); - console.log('# fail ' + failures); - }); -} - -/** - * Return a TAP-safe title of `test` - * - * @param {Object} test - * @return {String} - * @api private - */ - -function title(test) { - return test.fullTitle().replace(/#/g, ''); -} - -}); // module: reporters/tap.js - -require.register("reporters/xunit.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils') - , escape = utils.escape; - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Expose `XUnit`. - */ - -exports = module.exports = XUnit; - -/** - * Initialize a new `XUnit` reporter. - * - * @param {Runner} runner - * @api public - */ - -function XUnit(runner) { - Base.call(this, runner); - var stats = this.stats - , tests = [] - , self = this; - - runner.on('pending', function(test){ - tests.push(test); - }); - - runner.on('pass', function(test){ - tests.push(test); - }); - - runner.on('fail', function(test){ - tests.push(test); - }); - - runner.on('end', function(){ - console.log(tag('testsuite', { - name: 'Mocha Tests' - , tests: stats.tests - , failures: stats.failures - , errors: stats.failures - , skipped: stats.tests - stats.failures - stats.passes - , timestamp: (new Date).toUTCString() - , time: (stats.duration / 1000) || 0 - }, false)); - - tests.forEach(test); - console.log(''); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -XUnit.prototype = new F; -XUnit.prototype.constructor = XUnit; - - -/** - * Output tag for the given `test.` - */ - -function test(test) { - var attrs = { - classname: test.parent.fullTitle() - , name: test.title - , time: (test.duration / 1000) || 0 - }; - - if ('failed' == test.state) { - var err = test.err; - console.log(tag('testcase', attrs, false, tag('failure', {}, false, cdata(escape(err.message) + "\n" + err.stack)))); - } else if (test.pending) { - console.log(tag('testcase', attrs, false, tag('skipped', {}, true))); - } else { - console.log(tag('testcase', attrs, true) ); - } -} - -/** - * HTML tag helper. - */ - -function tag(name, attrs, close, content) { - var end = close ? '/>' : '>' - , pairs = [] - , tag; - - for (var key in attrs) { - pairs.push(key + '="' + escape(attrs[key]) + '"'); - } - - tag = '<' + name + (pairs.length ? ' ' + pairs.join(' ') : '') + end; - if (content) tag += content + ''; -} - -}); // module: reporters/xunit.js - -require.register("runnable.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var EventEmitter = require('browser/events').EventEmitter - , debug = require('browser/debug')('mocha:runnable') - , milliseconds = require('./ms'); - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Object#toString(). - */ - -var toString = Object.prototype.toString; - -/** - * Expose `Runnable`. - */ - -module.exports = Runnable; - -/** - * Initialize a new `Runnable` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Runnable(title, fn) { - this.title = title; - this.fn = fn; - this.async = fn && fn.length; - this.sync = ! this.async; - this._timeout = 2000; - this._slow = 75; - this._enableTimeouts = true; - this.timedOut = false; - this._trace = new Error('done() called multiple times') -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -function F(){}; -F.prototype = EventEmitter.prototype; -Runnable.prototype = new F; -Runnable.prototype.constructor = Runnable; - - -/** - * Set & get timeout `ms`. - * - * @param {Number|String} ms - * @return {Runnable|Number} ms or self - * @api private - */ - -Runnable.prototype.timeout = function(ms){ - if (0 == arguments.length) return this._timeout; - if (ms === 0) this._enableTimeouts = false; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._timeout = ms; - if (this.timer) this.resetTimeout(); - return this; -}; - -/** - * Set & get slow `ms`. - * - * @param {Number|String} ms - * @return {Runnable|Number} ms or self - * @api private - */ - -Runnable.prototype.slow = function(ms){ - if (0 === arguments.length) return this._slow; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._slow = ms; - return this; -}; - -/** - * Set and & get timeout `enabled`. - * - * @param {Boolean} enabled - * @return {Runnable|Boolean} enabled or self - * @api private - */ - -Runnable.prototype.enableTimeouts = function(enabled){ - if (arguments.length === 0) return this._enableTimeouts; - debug('enableTimeouts %s', enabled); - this._enableTimeouts = enabled; - return this; -}; - -/** - * Return the full title generated by recursively - * concatenating the parent's full title. - * - * @return {String} - * @api public - */ - -Runnable.prototype.fullTitle = function(){ - return this.parent.fullTitle() + ' ' + this.title; -}; - -/** - * Clear the timeout. - * - * @api private - */ - -Runnable.prototype.clearTimeout = function(){ - clearTimeout(this.timer); -}; - -/** - * Inspect the runnable void of private properties. - * - * @return {String} - * @api private - */ - -Runnable.prototype.inspect = function(){ - return JSON.stringify(this, function(key, val){ - if ('_' == key[0]) return; - if ('parent' == key) return '#'; - if ('ctx' == key) return '#'; - return val; - }, 2); -}; - -/** - * Reset the timeout. - * - * @api private - */ - -Runnable.prototype.resetTimeout = function(){ - var self = this; - var ms = this.timeout() || 1e9; - - if (!this._enableTimeouts) return; - this.clearTimeout(); - this.timer = setTimeout(function(){ - if (!self._enableTimeouts) return; - self.callback(new Error('timeout of ' + ms + 'ms exceeded')); - self.timedOut = true; - }, ms); -}; - -/** - * Whitelist these globals for this test run - * - * @api private - */ -Runnable.prototype.globals = function(arr){ - var self = this; - this._allowedGlobals = arr; -}; - -/** - * Run the test and invoke `fn(err)`. - * - * @param {Function} fn - * @api private - */ - -Runnable.prototype.run = function(fn){ - var self = this - , start = new Date - , ctx = this.ctx - , finished - , emitted; - - // Some times the ctx exists but it is not runnable - if (ctx && ctx.runnable) ctx.runnable(this); - - // called multiple times - function multiple(err) { - if (emitted) return; - emitted = true; - self.emit('error', err || new Error('done() called multiple times; stacktrace may be inaccurate')); - } - - // finished - function done(err) { - var ms = self.timeout(); - if (self.timedOut) return; - if (finished) return multiple(err || self._trace); - self.clearTimeout(); - self.duration = new Date - start; - finished = true; - if (!err && self.duration > ms && self._enableTimeouts) err = new Error('timeout of ' + ms + 'ms exceeded'); - fn(err); - } - - // for .resetTimeout() - this.callback = done; - - // explicit async with `done` argument - if (this.async) { - this.resetTimeout(); - - try { - this.fn.call(ctx, function(err){ - if (err instanceof Error || toString.call(err) === "[object Error]") return done(err); - if (null != err) { - if (Object.prototype.toString.call(err) === '[object Object]') { - return done(new Error('done() invoked with non-Error: ' + JSON.stringify(err))); - } else { - return done(new Error('done() invoked with non-Error: ' + err)); - } - } - done(); - }); - } catch (err) { - done(err); - } - return; - } - - if (this.asyncOnly) { - return done(new Error('--async-only option in use without declaring `done()`')); - } - - // sync or promise-returning - try { - if (this.pending) { - done(); - } else { - callFn(this.fn); - } - } catch (err) { - done(err); - } - - function callFn(fn) { - var result = fn.call(ctx); - if (result && typeof result.then === 'function') { - self.resetTimeout(); - result - .then(function() { - done() - }, - function(reason) { - done(reason || new Error('Promise rejected with no or falsy reason')) - }); - } else { - done(); - } - } -}; - -}); // module: runnable.js - -require.register("runner.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var EventEmitter = require('browser/events').EventEmitter - , debug = require('browser/debug')('mocha:runner') - , Test = require('./test') - , utils = require('./utils') - , filter = utils.filter - , keys = utils.keys; - -/** - * Non-enumerable globals. - */ - -var globals = [ - 'setTimeout', - 'clearTimeout', - 'setInterval', - 'clearInterval', - 'XMLHttpRequest', - 'Date' -]; - -/** - * Expose `Runner`. - */ - -module.exports = Runner; - -/** - * Initialize a `Runner` for the given `suite`. - * - * Events: - * - * - `start` execution started - * - `end` execution complete - * - `suite` (suite) test suite execution started - * - `suite end` (suite) all tests (and sub-suites) have finished - * - `test` (test) test execution started - * - `test end` (test) test completed - * - `hook` (hook) hook execution started - * - `hook end` (hook) hook complete - * - `pass` (test) test passed - * - `fail` (test, err) test failed - * - `pending` (test) test pending - * - * @api public - */ - -function Runner(suite) { - var self = this; - this._globals = []; - this._abort = false; - this.suite = suite; - this.total = suite.total(); - this.failures = 0; - this.on('test end', function(test){ self.checkGlobals(test); }); - this.on('hook end', function(hook){ self.checkGlobals(hook); }); - this.grep(/.*/); - this.globals(this.globalProps().concat(extraGlobals())); -} - -/** - * Wrapper for setImmediate, process.nextTick, or browser polyfill. - * - * @param {Function} fn - * @api private - */ - -Runner.immediately = global.setImmediate || process.nextTick; - -/** - * Inherit from `EventEmitter.prototype`. - */ - -function F(){}; -F.prototype = EventEmitter.prototype; -Runner.prototype = new F; -Runner.prototype.constructor = Runner; - - -/** - * Run tests with full titles matching `re`. Updates runner.total - * with number of tests matched. - * - * @param {RegExp} re - * @param {Boolean} invert - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.grep = function(re, invert){ - debug('grep %s', re); - this._grep = re; - this._invert = invert; - this.total = this.grepTotal(this.suite); - return this; -}; - -/** - * Returns the number of tests matching the grep search for the - * given suite. - * - * @param {Suite} suite - * @return {Number} - * @api public - */ - -Runner.prototype.grepTotal = function(suite) { - var self = this; - var total = 0; - - suite.eachTest(function(test){ - var match = self._grep.test(test.fullTitle()); - if (self._invert) match = !match; - if (match) total++; - }); - - return total; -}; - -/** - * Return a list of global properties. - * - * @return {Array} - * @api private - */ - -Runner.prototype.globalProps = function() { - var props = utils.keys(global); - - // non-enumerables - for (var i = 0; i < globals.length; ++i) { - if (~utils.indexOf(props, globals[i])) continue; - props.push(globals[i]); - } - - return props; -}; - -/** - * Allow the given `arr` of globals. - * - * @param {Array} arr - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.globals = function(arr){ - if (0 == arguments.length) return this._globals; - debug('globals %j', arr); - this._globals = this._globals.concat(arr); - return this; -}; - -/** - * Check for global variable leaks. - * - * @api private - */ - -Runner.prototype.checkGlobals = function(test){ - if (this.ignoreLeaks) return; - var ok = this._globals; - - var globals = this.globalProps(); - var leaks; - - if (test) { - ok = ok.concat(test._allowedGlobals || []); - } - - if(this.prevGlobalsLength == globals.length) return; - this.prevGlobalsLength = globals.length; - - leaks = filterLeaks(ok, globals); - this._globals = this._globals.concat(leaks); - - if (leaks.length > 1) { - this.fail(test, new Error('global leaks detected: ' + leaks.join(', ') + '')); - } else if (leaks.length) { - this.fail(test, new Error('global leak detected: ' + leaks[0])); - } -}; - -/** - * Fail the given `test`. - * - * @param {Test} test - * @param {Error} err - * @api private - */ - -Runner.prototype.fail = function(test, err){ - ++this.failures; - test.state = 'failed'; - - if ('string' == typeof err) { - err = new Error('the string "' + err + '" was thrown, throw an Error :)'); - } - - this.emit('fail', test, err); -}; - -/** - * Fail the given `hook` with `err`. - * - * Hook failures work in the following pattern: - * - If bail, then exit - * - Failed `before` hook skips all tests in a suite and subsuites, - * but jumps to corresponding `after` hook - * - Failed `before each` hook skips remaining tests in a - * suite and jumps to corresponding `after each` hook, - * which is run only once - * - Failed `after` hook does not alter - * execution order - * - Failed `after each` hook skips remaining tests in a - * suite and subsuites, but executes other `after each` - * hooks - * - * @param {Hook} hook - * @param {Error} err - * @api private - */ - -Runner.prototype.failHook = function(hook, err){ - this.fail(hook, err); - if (this.suite.bail()) { - this.emit('end'); - } -}; - -/** - * Run hook `name` callbacks and then invoke `fn()`. - * - * @param {String} name - * @param {Function} function - * @api private - */ - -Runner.prototype.hook = function(name, fn){ - var suite = this.suite - , hooks = suite['_' + name] - , self = this - , timer; - - function next(i) { - var hook = hooks[i]; - if (!hook) return fn(); - if (self.failures && suite.bail()) return fn(); - self.currentRunnable = hook; - - hook.ctx.currentTest = self.test; - - self.emit('hook', hook); - - hook.on('error', function(err){ - self.failHook(hook, err); - }); - - hook.run(function(err){ - hook.removeAllListeners('error'); - var testError = hook.error(); - if (testError) self.fail(self.test, testError); - if (err) { - self.failHook(hook, err); - - // stop executing hooks, notify callee of hook err - return fn(err); - } - self.emit('hook end', hook); - delete hook.ctx.currentTest; - next(++i); - }); - } - - Runner.immediately(function(){ - next(0); - }); -}; - -/** - * Run hook `name` for the given array of `suites` - * in order, and callback `fn(err, errSuite)`. - * - * @param {String} name - * @param {Array} suites - * @param {Function} fn - * @api private - */ - -Runner.prototype.hooks = function(name, suites, fn){ - var self = this - , orig = this.suite; - - function next(suite) { - self.suite = suite; - - if (!suite) { - self.suite = orig; - return fn(); - } - - self.hook(name, function(err){ - if (err) { - var errSuite = self.suite; - self.suite = orig; - return fn(err, errSuite); - } - - next(suites.pop()); - }); - } - - next(suites.pop()); -}; - -/** - * Run hooks from the top level down. - * - * @param {String} name - * @param {Function} fn - * @api private - */ - -Runner.prototype.hookUp = function(name, fn){ - var suites = [this.suite].concat(this.parents()).reverse(); - this.hooks(name, suites, fn); -}; - -/** - * Run hooks from the bottom up. - * - * @param {String} name - * @param {Function} fn - * @api private - */ - -Runner.prototype.hookDown = function(name, fn){ - var suites = [this.suite].concat(this.parents()); - this.hooks(name, suites, fn); -}; - -/** - * Return an array of parent Suites from - * closest to furthest. - * - * @return {Array} - * @api private - */ - -Runner.prototype.parents = function(){ - var suite = this.suite - , suites = []; - while (suite = suite.parent) suites.push(suite); - return suites; -}; - -/** - * Run the current test and callback `fn(err)`. - * - * @param {Function} fn - * @api private - */ - -Runner.prototype.runTest = function(fn){ - var test = this.test - , self = this; - - if (this.asyncOnly) test.asyncOnly = true; - - try { - test.on('error', function(err){ - self.fail(test, err); - }); - test.run(fn); - } catch (err) { - fn(err); - } -}; - -/** - * Run tests in the given `suite` and invoke - * the callback `fn()` when complete. - * - * @param {Suite} suite - * @param {Function} fn - * @api private - */ - -Runner.prototype.runTests = function(suite, fn){ - var self = this - , tests = suite.tests.slice() - , test; - - - function hookErr(err, errSuite, after) { - // before/after Each hook for errSuite failed: - var orig = self.suite; - - // for failed 'after each' hook start from errSuite parent, - // otherwise start from errSuite itself - self.suite = after ? errSuite.parent : errSuite; - - if (self.suite) { - // call hookUp afterEach - self.hookUp('afterEach', function(err2, errSuite2) { - self.suite = orig; - // some hooks may fail even now - if (err2) return hookErr(err2, errSuite2, true); - // report error suite - fn(errSuite); - }); - } else { - // there is no need calling other 'after each' hooks - self.suite = orig; - fn(errSuite); - } - } - - function next(err, errSuite) { - // if we bail after first err - if (self.failures && suite._bail) return fn(); - - if (self._abort) return fn(); - - if (err) return hookErr(err, errSuite, true); - - // next test - test = tests.shift(); - - // all done - if (!test) return fn(); - - // grep - var match = self._grep.test(test.fullTitle()); - if (self._invert) match = !match; - if (!match) return next(); - - // pending - if (test.pending) { - self.emit('pending', test); - self.emit('test end', test); - return next(); - } - - // execute test and hook(s) - self.emit('test', self.test = test); - self.hookDown('beforeEach', function(err, errSuite){ - - if (err) return hookErr(err, errSuite, false); - - self.currentRunnable = self.test; - self.runTest(function(err){ - test = self.test; - - if (err) { - self.fail(test, err); - self.emit('test end', test); - return self.hookUp('afterEach', next); - } - - test.state = 'passed'; - self.emit('pass', test); - self.emit('test end', test); - self.hookUp('afterEach', next); - }); - }); - } - - this.next = next; - next(); -}; - -/** - * Run the given `suite` and invoke the - * callback `fn()` when complete. - * - * @param {Suite} suite - * @param {Function} fn - * @api private - */ - -Runner.prototype.runSuite = function(suite, fn){ - var total = this.grepTotal(suite) - , self = this - , i = 0; - - debug('run suite %s', suite.fullTitle()); - - if (!total) return fn(); - - this.emit('suite', this.suite = suite); - - function next(errSuite) { - if (errSuite) { - // current suite failed on a hook from errSuite - if (errSuite == suite) { - // if errSuite is current suite - // continue to the next sibling suite - return done(); - } else { - // errSuite is among the parents of current suite - // stop execution of errSuite and all sub-suites - return done(errSuite); - } - } - - if (self._abort) return done(); - - var curr = suite.suites[i++]; - if (!curr) return done(); - self.runSuite(curr, next); - } - - function done(errSuite) { - self.suite = suite; - self.hook('afterAll', function(){ - self.emit('suite end', suite); - fn(errSuite); - }); - } - - this.hook('beforeAll', function(err){ - if (err) return done(); - self.runTests(suite, next); - }); -}; - -/** - * Handle uncaught exceptions. - * - * @param {Error} err - * @api private - */ - -Runner.prototype.uncaught = function(err){ - if (err) { - debug('uncaught exception %s', err !== function () { - return this; - }.call(err) ? err : ( err.message || err )); - } else { - debug('uncaught undefined exception'); - err = new Error('Caught undefined error, did you throw without specifying what?'); - } - err.uncaught = true; - - var runnable = this.currentRunnable; - if (!runnable) return; - - var wasAlreadyDone = runnable.state; - this.fail(runnable, err); - - runnable.clearTimeout(); - - if (wasAlreadyDone) return; - - // recover from test - if ('test' == runnable.type) { - this.emit('test end', runnable); - this.hookUp('afterEach', this.next); - return; - } - - // bail on hooks - this.emit('end'); -}; - -/** - * Run the root suite and invoke `fn(failures)` - * on completion. - * - * @param {Function} fn - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.run = function(fn){ - var self = this - , fn = fn || function(){}; - - function uncaught(err){ - self.uncaught(err); - } - - debug('start'); - - // callback - this.on('end', function(){ - debug('end'); - process.removeListener('uncaughtException', uncaught); - fn(self.failures); - }); - - // run suites - this.emit('start'); - this.runSuite(this.suite, function(){ - debug('finished running'); - self.emit('end'); - }); - - // uncaught exception - process.on('uncaughtException', uncaught); - - return this; -}; - -/** - * Cleanly abort execution - * - * @return {Runner} for chaining - * @api public - */ -Runner.prototype.abort = function(){ - debug('aborting'); - this._abort = true; -}; - -/** - * Filter leaks with the given globals flagged as `ok`. - * - * @param {Array} ok - * @param {Array} globals - * @return {Array} - * @api private - */ - -function filterLeaks(ok, globals) { - return filter(globals, function(key){ - // Firefox and Chrome exposes iframes as index inside the window object - if (/^d+/.test(key)) return false; - - // in firefox - // if runner runs in an iframe, this iframe's window.getInterface method not init at first - // it is assigned in some seconds - if (global.navigator && /^getInterface/.test(key)) return false; - - // an iframe could be approached by window[iframeIndex] - // in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak - if (global.navigator && /^\d+/.test(key)) return false; - - // Opera and IE expose global variables for HTML element IDs (issue #243) - if (/^mocha-/.test(key)) return false; - - var matched = filter(ok, function(ok){ - if (~ok.indexOf('*')) return 0 == key.indexOf(ok.split('*')[0]); - return key == ok; - }); - return matched.length == 0 && (!global.navigator || 'onerror' !== key); - }); -} - -/** - * Array of globals dependent on the environment. - * - * @return {Array} - * @api private - */ - - function extraGlobals() { - if (typeof(process) === 'object' && - typeof(process.version) === 'string') { - - var nodeVersion = process.version.split('.').reduce(function(a, v) { - return a << 8 | v; - }); - - // 'errno' was renamed to process._errno in v0.9.11. - - if (nodeVersion < 0x00090B) { - return ['errno']; - } - } - - return []; - } - -}); // module: runner.js - -require.register("suite.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var EventEmitter = require('browser/events').EventEmitter - , debug = require('browser/debug')('mocha:suite') - , milliseconds = require('./ms') - , utils = require('./utils') - , Hook = require('./hook'); - -/** - * Expose `Suite`. - */ - -exports = module.exports = Suite; - -/** - * Create a new `Suite` with the given `title` - * and parent `Suite`. When a suite with the - * same title is already present, that suite - * is returned to provide nicer reporter - * and more flexible meta-testing. - * - * @param {Suite} parent - * @param {String} title - * @return {Suite} - * @api public - */ - -exports.create = function(parent, title){ - var suite = new Suite(title, parent.ctx); - suite.parent = parent; - if (parent.pending) suite.pending = true; - title = suite.fullTitle(); - parent.addSuite(suite); - return suite; -}; - -/** - * Initialize a new `Suite` with the given - * `title` and `ctx`. - * - * @param {String} title - * @param {Context} ctx - * @api private - */ - -function Suite(title, parentContext) { - this.title = title; - var context = function() {}; - context.prototype = parentContext; - this.ctx = new context(); - this.suites = []; - this.tests = []; - this.pending = false; - this._beforeEach = []; - this._beforeAll = []; - this._afterEach = []; - this._afterAll = []; - this.root = !title; - this._timeout = 2000; - this._enableTimeouts = true; - this._slow = 75; - this._bail = false; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -function F(){}; -F.prototype = EventEmitter.prototype; -Suite.prototype = new F; -Suite.prototype.constructor = Suite; - - -/** - * Return a clone of this `Suite`. - * - * @return {Suite} - * @api private - */ - -Suite.prototype.clone = function(){ - var suite = new Suite(this.title); - debug('clone'); - suite.ctx = this.ctx; - suite.timeout(this.timeout()); - suite.enableTimeouts(this.enableTimeouts()); - suite.slow(this.slow()); - suite.bail(this.bail()); - return suite; -}; - -/** - * Set timeout `ms` or short-hand such as "2s". - * - * @param {Number|String} ms - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.timeout = function(ms){ - if (0 == arguments.length) return this._timeout; - if (ms === 0) this._enableTimeouts = false; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._timeout = parseInt(ms, 10); - return this; -}; - -/** - * Set timeout `enabled`. - * - * @param {Boolean} enabled - * @return {Suite|Boolean} self or enabled - * @api private - */ - -Suite.prototype.enableTimeouts = function(enabled){ - if (arguments.length === 0) return this._enableTimeouts; - debug('enableTimeouts %s', enabled); - this._enableTimeouts = enabled; - return this; -}; - -/** - * Set slow `ms` or short-hand such as "2s". - * - * @param {Number|String} ms - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.slow = function(ms){ - if (0 === arguments.length) return this._slow; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('slow %d', ms); - this._slow = ms; - return this; -}; - -/** - * Sets whether to bail after first error. - * - * @parma {Boolean} bail - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.bail = function(bail){ - if (0 == arguments.length) return this._bail; - debug('bail %s', bail); - this._bail = bail; - return this; -}; - -/** - * Run `fn(test[, done])` before running tests. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.beforeAll = function(title, fn){ - if (this.pending) return this; - if ('function' === typeof title) { - fn = title; - title = fn.name; - } - title = '"before all" hook' + (title ? ': ' + title : ''); - - var hook = new Hook(title, fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.enableTimeouts(this.enableTimeouts()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._beforeAll.push(hook); - this.emit('beforeAll', hook); - return this; -}; - -/** - * Run `fn(test[, done])` after running tests. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.afterAll = function(title, fn){ - if (this.pending) return this; - if ('function' === typeof title) { - fn = title; - title = fn.name; - } - title = '"after all" hook' + (title ? ': ' + title : ''); - - var hook = new Hook(title, fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.enableTimeouts(this.enableTimeouts()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._afterAll.push(hook); - this.emit('afterAll', hook); - return this; -}; - -/** - * Run `fn(test[, done])` before each test case. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.beforeEach = function(title, fn){ - if (this.pending) return this; - if ('function' === typeof title) { - fn = title; - title = fn.name; - } - title = '"before each" hook' + (title ? ': ' + title : ''); - - var hook = new Hook(title, fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.enableTimeouts(this.enableTimeouts()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._beforeEach.push(hook); - this.emit('beforeEach', hook); - return this; -}; - -/** - * Run `fn(test[, done])` after each test case. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.afterEach = function(title, fn){ - if (this.pending) return this; - if ('function' === typeof title) { - fn = title; - title = fn.name; - } - title = '"after each" hook' + (title ? ': ' + title : ''); - - var hook = new Hook(title, fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.enableTimeouts(this.enableTimeouts()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._afterEach.push(hook); - this.emit('afterEach', hook); - return this; -}; - -/** - * Add a test `suite`. - * - * @param {Suite} suite - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.addSuite = function(suite){ - suite.parent = this; - suite.timeout(this.timeout()); - suite.enableTimeouts(this.enableTimeouts()); - suite.slow(this.slow()); - suite.bail(this.bail()); - this.suites.push(suite); - this.emit('suite', suite); - return this; -}; - -/** - * Add a `test` to this suite. - * - * @param {Test} test - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.addTest = function(test){ - test.parent = this; - test.timeout(this.timeout()); - test.enableTimeouts(this.enableTimeouts()); - test.slow(this.slow()); - test.ctx = this.ctx; - this.tests.push(test); - this.emit('test', test); - return this; -}; - -/** - * Return the full title generated by recursively - * concatenating the parent's full title. - * - * @return {String} - * @api public - */ - -Suite.prototype.fullTitle = function(){ - if (this.parent) { - var full = this.parent.fullTitle(); - if (full) return full + ' ' + this.title; - } - return this.title; -}; - -/** - * Return the total number of tests. - * - * @return {Number} - * @api public - */ - -Suite.prototype.total = function(){ - return utils.reduce(this.suites, function(sum, suite){ - return sum + suite.total(); - }, 0) + this.tests.length; -}; - -/** - * Iterates through each suite recursively to find - * all tests. Applies a function in the format - * `fn(test)`. - * - * @param {Function} fn - * @return {Suite} - * @api private - */ - -Suite.prototype.eachTest = function(fn){ - utils.forEach(this.tests, fn); - utils.forEach(this.suites, function(suite){ - suite.eachTest(fn); - }); - return this; -}; - -}); // module: suite.js - -require.register("test.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Runnable = require('./runnable'); - -/** - * Expose `Test`. - */ - -module.exports = Test; - -/** - * Initialize a new `Test` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Test(title, fn) { - Runnable.call(this, title, fn); - this.pending = !fn; - this.type = 'test'; -} - -/** - * Inherit from `Runnable.prototype`. - */ - -function F(){}; -F.prototype = Runnable.prototype; -Test.prototype = new F; -Test.prototype.constructor = Test; - - -}); // module: test.js - -require.register("utils.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var fs = require('browser/fs') - , path = require('browser/path') - , basename = path.basename - , exists = fs.existsSync || path.existsSync - , glob = require('browser/glob') - , join = path.join - , debug = require('browser/debug')('mocha:watch'); - -/** - * Ignored directories. - */ - -var ignore = ['node_modules', '.git']; - -/** - * Escape special characters in the given string of html. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function(html){ - return String(html) - .replace(/&/g, '&') - .replace(/"/g, '"') - .replace(//g, '>'); -}; - -/** - * Array#forEach (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} scope - * @api private - */ - -exports.forEach = function(arr, fn, scope){ - for (var i = 0, l = arr.length; i < l; i++) - fn.call(scope, arr[i], i); -}; - -/** - * Array#map (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} scope - * @api private - */ - -exports.map = function(arr, fn, scope){ - var result = []; - for (var i = 0, l = arr.length; i < l; i++) - result.push(fn.call(scope, arr[i], i)); - return result; -}; - -/** - * Array#indexOf (<=IE8) - * - * @parma {Array} arr - * @param {Object} obj to find index of - * @param {Number} start - * @api private - */ - -exports.indexOf = function(arr, obj, start){ - for (var i = start || 0, l = arr.length; i < l; i++) { - if (arr[i] === obj) - return i; - } - return -1; -}; - -/** - * Array#reduce (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} initial value - * @api private - */ - -exports.reduce = function(arr, fn, val){ - var rval = val; - - for (var i = 0, l = arr.length; i < l; i++) { - rval = fn(rval, arr[i], i, arr); - } - - return rval; -}; - -/** - * Array#filter (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @api private - */ - -exports.filter = function(arr, fn){ - var ret = []; - - for (var i = 0, l = arr.length; i < l; i++) { - var val = arr[i]; - if (fn(val, i, arr)) ret.push(val); - } - - return ret; -}; - -/** - * Object.keys (<=IE8) - * - * @param {Object} obj - * @return {Array} keys - * @api private - */ - -exports.keys = Object.keys || function(obj) { - var keys = [] - , has = Object.prototype.hasOwnProperty // for `window` on <=IE8 - - for (var key in obj) { - if (has.call(obj, key)) { - keys.push(key); - } - } - - return keys; -}; - -/** - * Watch the given `files` for changes - * and invoke `fn(file)` on modification. - * - * @param {Array} files - * @param {Function} fn - * @api private - */ - -exports.watch = function(files, fn){ - var options = { interval: 100 }; - files.forEach(function(file){ - debug('file %s', file); - fs.watchFile(file, options, function(curr, prev){ - if (prev.mtime < curr.mtime) fn(file); - }); - }); -}; - -/** - * Ignored files. - */ - -function ignored(path){ - return !~ignore.indexOf(path); -} - -/** - * Lookup files in the given `dir`. - * - * @return {Array} - * @api private - */ - -exports.files = function(dir, ext, ret){ - ret = ret || []; - ext = ext || ['js']; - - var re = new RegExp('\\.(' + ext.join('|') + ')$'); - - fs.readdirSync(dir) - .filter(ignored) - .forEach(function(path){ - path = join(dir, path); - if (fs.statSync(path).isDirectory()) { - exports.files(path, ext, ret); - } else if (path.match(re)) { - ret.push(path); - } - }); - - return ret; -}; - -/** - * Compute a slug from the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.slug = function(str){ - return str - .toLowerCase() - .replace(/ +/g, '-') - .replace(/[^-\w]/g, ''); -}; - -/** - * Strip the function definition from `str`, - * and re-indent for pre whitespace. - */ - -exports.clean = function(str) { - str = str - .replace(/\r\n?|[\n\u2028\u2029]/g, "\n").replace(/^\uFEFF/, '') - .replace(/^function *\(.*\) *{|\(.*\) *=> *{?/, '') - .replace(/\s+\}$/, ''); - - var spaces = str.match(/^\n?( *)/)[1].length - , tabs = str.match(/^\n?(\t*)/)[1].length - , re = new RegExp('^\n?' + (tabs ? '\t' : ' ') + '{' + (tabs ? tabs : spaces) + '}', 'gm'); - - str = str.replace(re, ''); - - return exports.trim(str); -}; - -/** - * Trim the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.trim = function(str){ - return str.replace(/^\s+|\s+$/g, ''); -}; - -/** - * Parse the given `qs`. - * - * @param {String} qs - * @return {Object} - * @api private - */ - -exports.parseQuery = function(qs){ - return exports.reduce(qs.replace('?', '').split('&'), function(obj, pair){ - var i = pair.indexOf('=') - , key = pair.slice(0, i) - , val = pair.slice(++i); - - obj[key] = decodeURIComponent(val); - return obj; - }, {}); -}; - -/** - * Highlight the given string of `js`. - * - * @param {String} js - * @return {String} - * @api private - */ - -function highlight(js) { - return js - .replace(//g, '>') - .replace(/\/\/(.*)/gm, '//$1') - .replace(/('.*?')/gm, '$1') - .replace(/(\d+\.\d+)/gm, '$1') - .replace(/(\d+)/gm, '$1') - .replace(/\bnew[ \t]+(\w+)/gm, 'new $1') - .replace(/\b(function|new|throw|return|var|if|else)\b/gm, '$1') -} - -/** - * Highlight the contents of tag `name`. - * - * @param {String} name - * @api private - */ - -exports.highlightTags = function(name) { - var code = document.getElementById('mocha').getElementsByTagName(name); - for (var i = 0, len = code.length; i < len; ++i) { - code[i].innerHTML = highlight(code[i].innerHTML); - } -}; - - -/** - * Stringify `obj`. - * - * @param {Object} obj - * @return {String} - * @api private - */ - -exports.stringify = function(obj) { - if (obj instanceof RegExp) return obj.toString(); - return JSON.stringify(exports.canonicalize(obj), null, 2).replace(/,(\n|$)/g, '$1'); -}; - -/** - * Return a new object that has the keys in sorted order. - * @param {Object} obj - * @param {Array} [stack] - * @return {Object} - * @api private - */ - -exports.canonicalize = function(obj, stack) { - stack = stack || []; - - if (exports.indexOf(stack, obj) !== -1) return '[Circular]'; - - var canonicalizedObj; - - if ({}.toString.call(obj) === '[object Array]') { - stack.push(obj); - canonicalizedObj = exports.map(obj, function (item) { - return exports.canonicalize(item, stack); - }); - stack.pop(); - } else if (typeof obj === 'object' && obj !== null) { - stack.push(obj); - canonicalizedObj = {}; - exports.forEach(exports.keys(obj).sort(), function (key) { - canonicalizedObj[key] = exports.canonicalize(obj[key], stack); - }); - stack.pop(); - } else { - canonicalizedObj = obj; - } - - return canonicalizedObj; - }; - -/** - * Lookup file names at the given `path`. - */ -exports.lookupFiles = function lookupFiles(path, extensions, recursive) { - var files = []; - var re = new RegExp('\\.(' + extensions.join('|') + ')$'); - - if (!exists(path)) { - if (exists(path + '.js')) { - path += '.js'; - } else { - files = glob.sync(path); - if (!files.length) throw new Error("cannot resolve path (or pattern) '" + path + "'"); - return files; - } - } - - try { - var stat = fs.statSync(path); - if (stat.isFile()) return path; - } - catch (ignored) { - return; - } - - fs.readdirSync(path).forEach(function(file){ - file = join(path, file); - try { - var stat = fs.statSync(file); - if (stat.isDirectory()) { - if (recursive) { - files = files.concat(lookupFiles(file, extensions, recursive)); - } - return; - } - } - catch (ignored) { - return; - } - if (!stat.isFile() || !re.test(file) || basename(file)[0] === '.') return; - files.push(file); - }); - - return files; -}; - -}); // module: utils.js -// The global object is "self" in Web Workers. -var global = (function() { return this; })(); - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date; -var setTimeout = global.setTimeout; -var setInterval = global.setInterval; -var clearTimeout = global.clearTimeout; -var clearInterval = global.clearInterval; - -/** - * Node shims. - * - * These are meant only to allow - * mocha.js to run untouched, not - * to allow running node code in - * the browser. - */ - -var process = {}; -process.exit = function(status){}; -process.stdout = {}; - -var uncaughtExceptionHandlers = []; - -var originalOnerrorHandler = global.onerror; - -/** - * Remove uncaughtException listener. - * Revert to original onerror handler if previously defined. - */ - -process.removeListener = function(e, fn){ - if ('uncaughtException' == e) { - if (originalOnerrorHandler) { - global.onerror = originalOnerrorHandler; - } else { - global.onerror = function() {}; - } - var i = Mocha.utils.indexOf(uncaughtExceptionHandlers, fn); - if (i != -1) { uncaughtExceptionHandlers.splice(i, 1); } - } -}; - -/** - * Implements uncaughtException listener. - */ - -process.on = function(e, fn){ - if ('uncaughtException' == e) { - global.onerror = function(err, url, line){ - fn(new Error(err + ' (' + url + ':' + line + ')')); - return true; - }; - uncaughtExceptionHandlers.push(fn); - } -}; - -/** - * Expose mocha. - */ - -var Mocha = global.Mocha = require('mocha'), - mocha = global.mocha = new Mocha({ reporter: 'html' }); - -// The BDD UI is registered by default, but no UI will be functional in the -// browser without an explicit call to the overridden `mocha.ui` (see below). -// Ensure that this default UI does not expose its methods to the global scope. -mocha.suite.removeAllListeners('pre-require'); - -var immediateQueue = [] - , immediateTimeout; - -function timeslice() { - var immediateStart = new Date().getTime(); - while (immediateQueue.length && (new Date().getTime() - immediateStart) < 100) { - immediateQueue.shift()(); - } - if (immediateQueue.length) { - immediateTimeout = setTimeout(timeslice, 0); - } else { - immediateTimeout = null; - } -} - -/** - * High-performance override of Runner.immediately. - */ - -Mocha.Runner.immediately = function(callback) { - immediateQueue.push(callback); - if (!immediateTimeout) { - immediateTimeout = setTimeout(timeslice, 0); - } -}; - -/** - * Function to allow assertion libraries to throw errors directly into mocha. - * This is useful when running tests in a browser because window.onerror will - * only receive the 'message' attribute of the Error. - */ -mocha.throwError = function(err) { - Mocha.utils.forEach(uncaughtExceptionHandlers, function (fn) { - fn(err); - }); - throw err; -}; - -/** - * Override ui to ensure that the ui functions are initialized. - * Normally this would happen in Mocha.prototype.loadFiles. - */ - -mocha.ui = function(ui){ - Mocha.prototype.ui.call(this, ui); - this.suite.emit('pre-require', global, null, this); - return this; -}; - -/** - * Setup mocha with the given setting options. - */ - -mocha.setup = function(opts){ - if ('string' == typeof opts) opts = { ui: opts }; - for (var opt in opts) this[opt](opts[opt]); - return this; -}; - -/** - * Run mocha, returning the Runner. - */ - -mocha.run = function(fn){ - var options = mocha.options; - mocha.globals('location'); - - var query = Mocha.utils.parseQuery(global.location.search || ''); - if (query.grep) mocha.grep(query.grep); - if (query.invert) mocha.invert(); - - return Mocha.prototype.run.call(mocha, function(err){ - // The DOM Document is not available in Web Workers. - var document = global.document; - if (document && document.getElementById('mocha') && options.noHighlighting !== true) { - Mocha.utils.highlightTags('code'); - } - if (fn) fn(err); - }); -}; - -/** - * Expose the process shim. - */ - -Mocha.process = process; -})(); diff --git a/cli/node_modules/should/node_modules/should-format/tests/browser/tests.js b/cli/node_modules/should/node_modules/should-format/tests/browser/tests.js deleted file mode 100644 index e3f4af90d..000000000 --- a/cli/node_modules/should/node_modules/should-format/tests/browser/tests.js +++ /dev/null @@ -1,3417 +0,0 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0 ? - '[Circular]' : - this.format(desc.value); - - return propName + ': ' + propValue; - } -}; - -Formatter.add = function add(type, cls, sub, f) { - var args = Array.prototype.slice.call(arguments); - f = args.pop(); - Formatter.prototype['_format_' + args.join('_')] = f; -}; - -Formatter.formatObjectWithPrefix = function formatObjectWithPrefix(f) { - return function(value) { - var prefix = f.call(this, value); - var props = this.keys(value); - if(props.length == 0) return prefix; - else return this.formatObject(value, prefix, props); - }; -}; - -var functionNameRE = /^\s*function\s*(\S*)\s*\(/; - -Formatter.functionName = function functionName(f) { - if(f.name) { - return f.name; - } - var name = f.toString().match(functionNameRE)[1]; - return name; -}; - -Formatter.generateFunctionForIndexedArray = function generateFunctionForIndexedArray(lengthProp, name, padding) { - return function(value) { - var str = ''; - var max = 50; - var len = value[lengthProp]; - if(len > 0) { - for(var i = 0; i < max && i < len; i++) { - var b = value[i] || 0; - str += ' ' + util.pad0(b.toString(16), padding); - } - if(len > max) - str += ' ... '; - } - return '[' + (value.constructor.name || name) + (str ? ':' + str : '') + ']'; - }; -}; - -['undefined', 'boolean', 'null', 'symbol'].forEach(function(name) { - Formatter.add(name, String); -}); - -['number', 'boolean'].forEach(function(name) { - var capName = name.substring(0, 1).toUpperCase() + name.substring(1); - - Formatter.add('object', name, Formatter.formatObjectWithPrefix(function(value) { - return '[' + capName + ': ' + this.format(value.valueOf()) + ']'; - })); -}); - -Formatter.add('object', 'string', function(value) { - var realValue = value.valueOf(); - var prefix = '[String: ' + this.format(realValue) + ']'; - var props = this.keys(value); - props = props.filter(function(p) { - return !(p.match(/\d+/) && parseInt(p, 10) < realValue.length); - }); - - if(props.length == 0) return prefix; - else return this.formatObject(value, prefix, props); -}); - -Formatter.add('object', 'regexp', Formatter.formatObjectWithPrefix(String)); - -Formatter.add('number', function(value) { - if(value === 0 && 1 / value < 0) return '-0'; - return String(value); -}); - -Formatter.add('string', function(value) { - return '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; -}); - -Formatter.add('object', function(value) { - return this.formatObject(value); -}); - -Formatter.add('object', 'array', function(value) { - var keys = this.keys(value); - var len = 0; - - this.seen.push(value); - - var props = keys.map(function(prop) { - var desc; - try { - desc = Object.getOwnPropertyDescriptor(value, prop) || {value: value[prop]}; - } catch(e) { - desc = {value: e}; - } - - var f; - if(prop.match(/\d+/)) { - f = this.format(desc.value); - } else { - f = this.formatProperty(desc.value, prop); - } - len += f.length; - return f; - }, this); - - this.seen.pop(); - - if(props.length === 0) return '[]'; - - if(len <= this.maxLineLength) { - return '[ ' + props.join(this.propSep + ' ') + ' ]'; - } else { - return '[' + '\n' + props.map(util.addSpaces).join(this.propSep + '\n') + '\n' + ']'; - } -}); - - -function formatDate(value) { - var to = value.getTimezoneOffset(); - var absTo = Math.abs(to); - var hours = Math.floor(absTo / 60); - var minutes = absTo - hours * 60; - var tzFormat = 'GMT' + (to < 0 ? '+' : '-') + util.pad0(hours, 2) + util.pad0(minutes, 2); - return value.toLocaleDateString() + ' ' - + value.toLocaleTimeString() + '.' - + util.pad0(value.getMilliseconds(), 3) + ' ' + tzFormat; -} - -Formatter.add('object', 'date', Formatter.formatObjectWithPrefix(formatDate)); - -Formatter.add('function', Formatter.formatObjectWithPrefix(function(value) { - var name = Formatter.functionName(value); - return '[Function' + (name ? ': ' + name : '') + ']'; -})); - -Formatter.add('object', 'error', Formatter.formatObjectWithPrefix(function(value) { - var name = value.name; - var message = value.message; - return '[' + name + (message ? ': ' + message : '') + ']'; -})); - -Formatter.add('object', 'buffer', Formatter.generateFunctionForIndexedArray('length', 'Buffer', 2)); - -Formatter.add('object', 'array-buffer', Formatter.generateFunctionForIndexedArray('byteLength', 'ArrayBuffer', 2)); - -Formatter.add('object', 'typed-array', 'int8', Formatter.generateFunctionForIndexedArray('length', 'Int8Array', 2)); -Formatter.add('object', 'typed-array', 'uint8', Formatter.generateFunctionForIndexedArray('length', 'Uint8Array', 2)); -Formatter.add('object', 'typed-array', 'uint8clamped', Formatter.generateFunctionForIndexedArray('length', 'Uint8ClampedArray', 2)); - -Formatter.add('object', 'typed-array', 'int16', Formatter.generateFunctionForIndexedArray('length', 'Int16Array', 4)); -Formatter.add('object', 'typed-array', 'uint16', Formatter.generateFunctionForIndexedArray('length', 'Uint16Array', 4)); - -Formatter.add('object', 'typed-array', 'int32', Formatter.generateFunctionForIndexedArray('length', 'Int32Array', 8)); -Formatter.add('object', 'typed-array', 'uint32', Formatter.generateFunctionForIndexedArray('length', 'Uint32Array', 8)); - -//TODO add float32 and float64 - -Formatter.add('object', 'promise', function() { - return '[Promise]';//TODO it could be nice to inspect its state and value -}); - -Formatter.add('object', 'xhr', function() { - return '[XMLHttpRequest]';//TODO it could be nice to inspect its state -}); - -Formatter.add('object', 'html-element', function(value) { - return value.outerHTML; -}); - -Formatter.add('object', 'html-element', '#text', function(value) { - return value.nodeValue; -}); - -Formatter.add('object', 'html-element', '#document', function(value) { - return value.documentElement.outerHTML; -}); - -Formatter.add('object', 'window', function() { - return '[Window]'; -}); - -Formatter.prototype.defaultFormat = Formatter.prototype._format_object; - -function defaultFormat(value, opts) { - return new Formatter(opts).format(value); -} - -defaultFormat.Formatter = Formatter; -module.exports = defaultFormat; - -},{"./util":13,"should-type":11}],2:[function(require,module,exports){ -// http://wiki.commonjs.org/wiki/Unit_Testing/1.0 -// -// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8! -// -// Originally from narwhal.js (http://narwhaljs.org) -// Copyright (c) 2009 Thomas Robinson <280north.com> -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the 'Software'), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -// when used in node, this will actually load the util module we depend on -// versus loading the builtin util module as happens otherwise -// this is a bug in node module loading as far as I am concerned -var util = require('util/'); - -var pSlice = Array.prototype.slice; -var hasOwn = Object.prototype.hasOwnProperty; - -// 1. The assert module provides functions that throw -// AssertionError's when particular conditions are not met. The -// assert module must conform to the following interface. - -var assert = module.exports = ok; - -// 2. The AssertionError is defined in assert. -// new assert.AssertionError({ message: message, -// actual: actual, -// expected: expected }) - -assert.AssertionError = function AssertionError(options) { - this.name = 'AssertionError'; - this.actual = options.actual; - this.expected = options.expected; - this.operator = options.operator; - if (options.message) { - this.message = options.message; - this.generatedMessage = false; - } else { - this.message = getMessage(this); - this.generatedMessage = true; - } - var stackStartFunction = options.stackStartFunction || fail; - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, stackStartFunction); - } - else { - // non v8 browsers so we can have a stacktrace - var err = new Error(); - if (err.stack) { - var out = err.stack; - - // try to strip useless frames - var fn_name = stackStartFunction.name; - var idx = out.indexOf('\n' + fn_name); - if (idx >= 0) { - // once we have located the function frame - // we need to strip out everything before it (and its line) - var next_line = out.indexOf('\n', idx + 1); - out = out.substring(next_line + 1); - } - - this.stack = out; - } - } -}; - -// assert.AssertionError instanceof Error -util.inherits(assert.AssertionError, Error); - -function replacer(key, value) { - if (util.isUndefined(value)) { - return '' + value; - } - if (util.isNumber(value) && !isFinite(value)) { - return value.toString(); - } - if (util.isFunction(value) || util.isRegExp(value)) { - return value.toString(); - } - return value; -} - -function truncate(s, n) { - if (util.isString(s)) { - return s.length < n ? s : s.slice(0, n); - } else { - return s; - } -} - -function getMessage(self) { - return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' + - self.operator + ' ' + - truncate(JSON.stringify(self.expected, replacer), 128); -} - -// At present only the three keys mentioned above are used and -// understood by the spec. Implementations or sub modules can pass -// other keys to the AssertionError's constructor - they will be -// ignored. - -// 3. All of the following functions must throw an AssertionError -// when a corresponding condition is not met, with a message that -// may be undefined if not provided. All assertion methods provide -// both the actual and expected values to the assertion error for -// display purposes. - -function fail(actual, expected, message, operator, stackStartFunction) { - throw new assert.AssertionError({ - message: message, - actual: actual, - expected: expected, - operator: operator, - stackStartFunction: stackStartFunction - }); -} - -// EXTENSION! allows for well behaved errors defined elsewhere. -assert.fail = fail; - -// 4. Pure assertion tests whether a value is truthy, as determined -// by !!guard. -// assert.ok(guard, message_opt); -// This statement is equivalent to assert.equal(true, !!guard, -// message_opt);. To test strictly for the value true, use -// assert.strictEqual(true, guard, message_opt);. - -function ok(value, message) { - if (!value) fail(value, true, message, '==', assert.ok); -} -assert.ok = ok; - -// 5. The equality assertion tests shallow, coercive equality with -// ==. -// assert.equal(actual, expected, message_opt); - -assert.equal = function equal(actual, expected, message) { - if (actual != expected) fail(actual, expected, message, '==', assert.equal); -}; - -// 6. The non-equality assertion tests for whether two objects are not equal -// with != assert.notEqual(actual, expected, message_opt); - -assert.notEqual = function notEqual(actual, expected, message) { - if (actual == expected) { - fail(actual, expected, message, '!=', assert.notEqual); - } -}; - -// 7. The equivalence assertion tests a deep equality relation. -// assert.deepEqual(actual, expected, message_opt); - -assert.deepEqual = function deepEqual(actual, expected, message) { - if (!_deepEqual(actual, expected)) { - fail(actual, expected, message, 'deepEqual', assert.deepEqual); - } -}; - -function _deepEqual(actual, expected) { - // 7.1. All identical values are equivalent, as determined by ===. - if (actual === expected) { - return true; - - } else if (util.isBuffer(actual) && util.isBuffer(expected)) { - if (actual.length != expected.length) return false; - - for (var i = 0; i < actual.length; i++) { - if (actual[i] !== expected[i]) return false; - } - - return true; - - // 7.2. If the expected value is a Date object, the actual value is - // equivalent if it is also a Date object that refers to the same time. - } else if (util.isDate(actual) && util.isDate(expected)) { - return actual.getTime() === expected.getTime(); - - // 7.3 If the expected value is a RegExp object, the actual value is - // equivalent if it is also a RegExp object with the same source and - // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). - } else if (util.isRegExp(actual) && util.isRegExp(expected)) { - return actual.source === expected.source && - actual.global === expected.global && - actual.multiline === expected.multiline && - actual.lastIndex === expected.lastIndex && - actual.ignoreCase === expected.ignoreCase; - - // 7.4. Other pairs that do not both pass typeof value == 'object', - // equivalence is determined by ==. - } else if (!util.isObject(actual) && !util.isObject(expected)) { - return actual == expected; - - // 7.5 For all other Object pairs, including Array objects, equivalence is - // determined by having the same number of owned properties (as verified - // with Object.prototype.hasOwnProperty.call), the same set of keys - // (although not necessarily the same order), equivalent values for every - // corresponding key, and an identical 'prototype' property. Note: this - // accounts for both named and indexed properties on Arrays. - } else { - return objEquiv(actual, expected); - } -} - -function isArguments(object) { - return Object.prototype.toString.call(object) == '[object Arguments]'; -} - -function objEquiv(a, b) { - if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b)) - return false; - // an identical 'prototype' property. - if (a.prototype !== b.prototype) return false; - // if one is a primitive, the other must be same - if (util.isPrimitive(a) || util.isPrimitive(b)) { - return a === b; - } - var aIsArgs = isArguments(a), - bIsArgs = isArguments(b); - if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs)) - return false; - if (aIsArgs) { - a = pSlice.call(a); - b = pSlice.call(b); - return _deepEqual(a, b); - } - var ka = objectKeys(a), - kb = objectKeys(b), - key, i; - // having the same number of owned properties (keys incorporates - // hasOwnProperty) - if (ka.length != kb.length) - return false; - //the same set of keys (although not necessarily the same order), - ka.sort(); - kb.sort(); - //~~~cheap key test - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] != kb[i]) - return false; - } - //equivalent values for every corresponding key, and - //~~~possibly expensive deep test - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!_deepEqual(a[key], b[key])) return false; - } - return true; -} - -// 8. The non-equivalence assertion tests for any deep inequality. -// assert.notDeepEqual(actual, expected, message_opt); - -assert.notDeepEqual = function notDeepEqual(actual, expected, message) { - if (_deepEqual(actual, expected)) { - fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); - } -}; - -// 9. The strict equality assertion tests strict equality, as determined by ===. -// assert.strictEqual(actual, expected, message_opt); - -assert.strictEqual = function strictEqual(actual, expected, message) { - if (actual !== expected) { - fail(actual, expected, message, '===', assert.strictEqual); - } -}; - -// 10. The strict non-equality assertion tests for strict inequality, as -// determined by !==. assert.notStrictEqual(actual, expected, message_opt); - -assert.notStrictEqual = function notStrictEqual(actual, expected, message) { - if (actual === expected) { - fail(actual, expected, message, '!==', assert.notStrictEqual); - } -}; - -function expectedException(actual, expected) { - if (!actual || !expected) { - return false; - } - - if (Object.prototype.toString.call(expected) == '[object RegExp]') { - return expected.test(actual); - } else if (actual instanceof expected) { - return true; - } else if (expected.call({}, actual) === true) { - return true; - } - - return false; -} - -function _throws(shouldThrow, block, expected, message) { - var actual; - - if (util.isString(expected)) { - message = expected; - expected = null; - } - - try { - block(); - } catch (e) { - actual = e; - } - - message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + - (message ? ' ' + message : '.'); - - if (shouldThrow && !actual) { - fail(actual, expected, 'Missing expected exception' + message); - } - - if (!shouldThrow && expectedException(actual, expected)) { - fail(actual, expected, 'Got unwanted exception' + message); - } - - if ((shouldThrow && actual && expected && - !expectedException(actual, expected)) || (!shouldThrow && actual)) { - throw actual; - } -} - -// 11. Expected to throw an error: -// assert.throws(block, Error_opt, message_opt); - -assert.throws = function(block, /*optional*/error, /*optional*/message) { - _throws.apply(this, [true].concat(pSlice.call(arguments))); -}; - -// EXTENSION! This is annoying to write outside this module. -assert.doesNotThrow = function(block, /*optional*/message) { - _throws.apply(this, [false].concat(pSlice.call(arguments))); -}; - -assert.ifError = function(err) { if (err) {throw err;}}; - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - if (hasOwn.call(obj, key)) keys.push(key); - } - return keys; -}; - -},{"util/":10}],3:[function(require,module,exports){ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ - -var base64 = require('base64-js') -var ieee754 = require('ieee754') -var isArray = require('is-array') - -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 -Buffer.poolSize = 8192 // not used by this implementation - -var kMaxLength = 0x3fffffff -var rootParent = {} - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Note: - * - * - Implementation must support adding new properties to `Uint8Array` instances. - * Firefox 4-29 lacked support, fixed in Firefox 30+. - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - * - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they will - * get the Object implementation, which is slower but will work correctly. - */ -Buffer.TYPED_ARRAY_SUPPORT = (function () { - try { - var buf = new ArrayBuffer(0) - var arr = new Uint8Array(buf) - arr.foo = function () { return 42 } - return arr.foo() === 42 && // typed array instances can be augmented - typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` - new Uint8Array(1).subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` - } catch (e) { - return false - } -})() - -/** - * Class: Buffer - * ============= - * - * The Buffer constructor returns instances of `Uint8Array` that are augmented - * with function properties for all the node `Buffer` API functions. We use - * `Uint8Array` so that square bracket notation works as expected -- it returns - * a single octet. - * - * By augmenting the instances, we can avoid modifying the `Uint8Array` - * prototype. - */ -function Buffer (arg) { - if (!(this instanceof Buffer)) { - // Avoid going through an ArgumentsAdaptorTrampoline in the common case. - if (arguments.length > 1) return new Buffer(arg, arguments[1]) - return new Buffer(arg) - } - - this.length = 0 - this.parent = undefined - - // Common case. - if (typeof arg === 'number') { - return fromNumber(this, arg) - } - - // Slightly less common case. - if (typeof arg === 'string') { - return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8') - } - - // Unusual. - return fromObject(this, arg) -} - -function fromNumber (that, length) { - that = allocate(that, length < 0 ? 0 : checked(length) | 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < length; i++) { - that[i] = 0 - } - } - return that -} - -function fromString (that, string, encoding) { - if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8' - - // Assumption: byteLength() return value is always < kMaxLength. - var length = byteLength(string, encoding) | 0 - that = allocate(that, length) - - that.write(string, encoding) - return that -} - -function fromObject (that, object) { - if (Buffer.isBuffer(object)) return fromBuffer(that, object) - - if (isArray(object)) return fromArray(that, object) - - if (object == null) { - throw new TypeError('must start with number, buffer, array or string') - } - - if (typeof ArrayBuffer !== 'undefined' && object.buffer instanceof ArrayBuffer) { - return fromTypedArray(that, object) - } - - if (object.length) return fromArrayLike(that, object) - - return fromJsonObject(that, object) -} - -function fromBuffer (that, buffer) { - var length = checked(buffer.length) | 0 - that = allocate(that, length) - buffer.copy(that, 0, 0, length) - return that -} - -function fromArray (that, array) { - var length = checked(array.length) | 0 - that = allocate(that, length) - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -// Duplicate of fromArray() to keep fromArray() monomorphic. -function fromTypedArray (that, array) { - var length = checked(array.length) | 0 - that = allocate(that, length) - // Truncating the elements is probably not what people expect from typed - // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior - // of the old Buffer constructor. - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -function fromArrayLike (that, array) { - var length = checked(array.length) | 0 - that = allocate(that, length) - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object. -// Returns a zero-length buffer for inputs that don't conform to the spec. -function fromJsonObject (that, object) { - var array - var length = 0 - - if (object.type === 'Buffer' && isArray(object.data)) { - array = object.data - length = checked(array.length) | 0 - } - that = allocate(that, length) - - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -function allocate (that, length) { - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = Buffer._augment(new Uint8Array(length)) - } else { - // Fallback: Return an object instance of the Buffer class - that.length = length - that._isBuffer = true - } - - var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1 - if (fromPool) that.parent = rootParent - - return that -} - -function checked (length) { - // Note: cannot use `length < kMaxLength` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= kMaxLength) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + kMaxLength.toString(16) + ' bytes') - } - return length | 0 -} - -function SlowBuffer (subject, encoding) { - if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding) - - var buf = new Buffer(subject, encoding) - delete buf.parent - return buf -} - -Buffer.isBuffer = function isBuffer (b) { - return !!(b != null && b._isBuffer) -} - -Buffer.compare = function compare (a, b) { - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError('Arguments must be Buffers') - } - - if (a === b) return 0 - - var x = a.length - var y = b.length - - var i = 0 - var len = Math.min(x, y) - while (i < len) { - if (a[i] !== b[i]) break - - ++i - } - - if (i !== len) { - x = a[i] - y = b[i] - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'binary': - case 'base64': - case 'raw': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} - -Buffer.concat = function concat (list, length) { - if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.') - - if (list.length === 0) { - return new Buffer(0) - } else if (list.length === 1) { - return list[0] - } - - var i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; i++) { - length += list[i].length - } - } - - var buf = new Buffer(length) - var pos = 0 - for (i = 0; i < list.length; i++) { - var item = list[i] - item.copy(buf, pos) - pos += item.length - } - return buf -} - -function byteLength (string, encoding) { - if (typeof string !== 'string') string = String(string) - - if (string.length === 0) return 0 - - switch (encoding || 'utf8') { - case 'ascii': - case 'binary': - case 'raw': - return string.length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return string.length * 2 - case 'hex': - return string.length >>> 1 - case 'utf8': - case 'utf-8': - return utf8ToBytes(string).length - case 'base64': - return base64ToBytes(string).length - default: - return string.length - } -} -Buffer.byteLength = byteLength - -// pre-set for values that may exist in the future -Buffer.prototype.length = undefined -Buffer.prototype.parent = undefined - -// toString(encoding, start=0, end=buffer.length) -Buffer.prototype.toString = function toString (encoding, start, end) { - var loweredCase = false - - start = start | 0 - end = end === undefined || end === Infinity ? this.length : end | 0 - - if (!encoding) encoding = 'utf8' - if (start < 0) start = 0 - if (end > this.length) end = this.length - if (end <= start) return '' - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'binary': - return binarySlice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -} - -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') - if (this.length > max) str += ' ... ' - } - return '' -} - -Buffer.prototype.compare = function compare (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return 0 - return Buffer.compare(this, b) -} - -Buffer.prototype.indexOf = function indexOf (val, byteOffset) { - if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff - else if (byteOffset < -0x80000000) byteOffset = -0x80000000 - byteOffset >>= 0 - - if (this.length === 0) return -1 - if (byteOffset >= this.length) return -1 - - // Negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0) - - if (typeof val === 'string') { - if (val.length === 0) return -1 // special case: looking for empty string always fails - return String.prototype.indexOf.call(this, val, byteOffset) - } - if (Buffer.isBuffer(val)) { - return arrayIndexOf(this, val, byteOffset) - } - if (typeof val === 'number') { - if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { - return Uint8Array.prototype.indexOf.call(this, val, byteOffset) - } - return arrayIndexOf(this, [ val ], byteOffset) - } - - function arrayIndexOf (arr, val, byteOffset) { - var foundIndex = -1 - for (var i = 0; byteOffset + i < arr.length; i++) { - if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex - } else { - foundIndex = -1 - } - } - return -1 - } - - throw new TypeError('val must be string, number or Buffer') -} - -// `get` will be removed in Node 0.13+ -Buffer.prototype.get = function get (offset) { - console.log('.get() is deprecated. Access using array indexes instead.') - return this.readUInt8(offset) -} - -// `set` will be removed in Node 0.13+ -Buffer.prototype.set = function set (v, offset) { - console.log('.set() is deprecated. Access using array indexes instead.') - return this.writeUInt8(v, offset) -} - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - - // must be an even number of digits - var strLen = string.length - if (strLen % 2 !== 0) throw new Error('Invalid hex string') - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; i++) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (isNaN(parsed)) throw new Error('Invalid hex string') - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function binaryWrite (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} - -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset | 0 - if (isFinite(length)) { - length = length | 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined - } - // legacy write(string, encoding, offset, length) - remove in v0.13 - } else { - var swap = encoding - encoding = offset - offset = length | 0 - length = swap - } - - var remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8' - - var loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - return asciiWrite(this, string, offset, length) - - case 'binary': - return binaryWrite(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - var res = '' - var tmp = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; i++) { - if (buf[i] <= 0x7F) { - res += decodeUtf8Char(tmp) + String.fromCharCode(buf[i]) - tmp = '' - } else { - tmp += '%' + buf[i].toString(16) - } - } - - return res + decodeUtf8Char(tmp) -} - -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; i++) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} - -function binarySlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; i++) { - ret += String.fromCharCode(buf[i]) - } - return ret -} - -function hexSlice (buf, start, end) { - var len = buf.length - - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len - - var out = '' - for (var i = start; i < end; i++) { - out += toHex(buf[i]) - } - return out -} - -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) - } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end - - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } - - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } - - if (end < start) end = start - - var newBuf - if (Buffer.TYPED_ARRAY_SUPPORT) { - newBuf = Buffer._augment(this.subarray(start, end)) - } else { - var sliceLen = end - start - newBuf = new Buffer(sliceLen, undefined) - for (var i = 0; i < sliceLen; i++) { - newBuf[i] = this[i + start] - } - } - - if (newBuf.length) newBuf.parent = this.parent || this - - return newBuf -} - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - - return val -} - -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } - - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } - - return val -} - -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} - -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} - -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} - -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance') - if (value > max || value < min) throw new RangeError('value is out of bounds') - if (offset + ext > buf.length) throw new RangeError('index out of range') -} - -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) - - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) - - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - this[offset] = value - return offset + 1 -} - -function objectWriteUInt16 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) { - buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> - (littleEndian ? i : 1 - i) * 8 - } -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = value - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -function objectWriteUInt32 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) { - buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff - } -} - -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = value - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = value - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = 0 - var mul = 1 - var sub = value < 0 ? 1 : 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = byteLength - 1 - var mul = 1 - var sub = value < 0 ? 1 : 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - if (value < 0) value = 0xff + value + 1 - this[offset] = value - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = value - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = value - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (value > max || value < min) throw new RangeError('value is out of bounds') - if (offset + ext > buf.length) throw new RangeError('index out of range') - if (offset < 0) throw new RangeError('index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - - var len = end - start - - if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < len; i++) { - target[i + targetStart] = this[i + start] - } - } else { - target._set(this.subarray(start, start + len), targetStart) - } - - return len -} - -// fill(value, start=0, end=buffer.length) -Buffer.prototype.fill = function fill (value, start, end) { - if (!value) value = 0 - if (!start) start = 0 - if (!end) end = this.length - - if (end < start) throw new RangeError('end < start') - - // Fill 0 bytes; we're done - if (end === start) return - if (this.length === 0) return - - if (start < 0 || start >= this.length) throw new RangeError('start out of bounds') - if (end < 0 || end > this.length) throw new RangeError('end out of bounds') - - var i - if (typeof value === 'number') { - for (i = start; i < end; i++) { - this[i] = value - } - } else { - var bytes = utf8ToBytes(value.toString()) - var len = bytes.length - for (i = start; i < end; i++) { - this[i] = bytes[i % len] - } - } - - return this -} - -/** - * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. - * Added in Node 0.12. Only available in browsers that support ArrayBuffer. - */ -Buffer.prototype.toArrayBuffer = function toArrayBuffer () { - if (typeof Uint8Array !== 'undefined') { - if (Buffer.TYPED_ARRAY_SUPPORT) { - return (new Buffer(this)).buffer - } else { - var buf = new Uint8Array(this.length) - for (var i = 0, len = buf.length; i < len; i += 1) { - buf[i] = this[i] - } - return buf.buffer - } - } else { - throw new TypeError('Buffer.toArrayBuffer not supported in this browser') - } -} - -// HELPER FUNCTIONS -// ================ - -var BP = Buffer.prototype - -/** - * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods - */ -Buffer._augment = function _augment (arr) { - arr.constructor = Buffer - arr._isBuffer = true - - // save reference to original Uint8Array set method before overwriting - arr._set = arr.set - - // deprecated, will be removed in node 0.13+ - arr.get = BP.get - arr.set = BP.set - - arr.write = BP.write - arr.toString = BP.toString - arr.toLocaleString = BP.toString - arr.toJSON = BP.toJSON - arr.equals = BP.equals - arr.compare = BP.compare - arr.indexOf = BP.indexOf - arr.copy = BP.copy - arr.slice = BP.slice - arr.readUIntLE = BP.readUIntLE - arr.readUIntBE = BP.readUIntBE - arr.readUInt8 = BP.readUInt8 - arr.readUInt16LE = BP.readUInt16LE - arr.readUInt16BE = BP.readUInt16BE - arr.readUInt32LE = BP.readUInt32LE - arr.readUInt32BE = BP.readUInt32BE - arr.readIntLE = BP.readIntLE - arr.readIntBE = BP.readIntBE - arr.readInt8 = BP.readInt8 - arr.readInt16LE = BP.readInt16LE - arr.readInt16BE = BP.readInt16BE - arr.readInt32LE = BP.readInt32LE - arr.readInt32BE = BP.readInt32BE - arr.readFloatLE = BP.readFloatLE - arr.readFloatBE = BP.readFloatBE - arr.readDoubleLE = BP.readDoubleLE - arr.readDoubleBE = BP.readDoubleBE - arr.writeUInt8 = BP.writeUInt8 - arr.writeUIntLE = BP.writeUIntLE - arr.writeUIntBE = BP.writeUIntBE - arr.writeUInt16LE = BP.writeUInt16LE - arr.writeUInt16BE = BP.writeUInt16BE - arr.writeUInt32LE = BP.writeUInt32LE - arr.writeUInt32BE = BP.writeUInt32BE - arr.writeIntLE = BP.writeIntLE - arr.writeIntBE = BP.writeIntBE - arr.writeInt8 = BP.writeInt8 - arr.writeInt16LE = BP.writeInt16LE - arr.writeInt16BE = BP.writeInt16BE - arr.writeInt32LE = BP.writeInt32LE - arr.writeInt32BE = BP.writeInt32BE - arr.writeFloatLE = BP.writeFloatLE - arr.writeFloatBE = BP.writeFloatBE - arr.writeDoubleLE = BP.writeDoubleLE - arr.writeDoubleBE = BP.writeDoubleBE - arr.fill = BP.fill - arr.inspect = BP.inspect - arr.toArrayBuffer = BP.toArrayBuffer - - return arr -} - -var INVALID_BASE64_RE = /[^+\/0-9A-z\-]/g - -function base64clean (str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') -} - -function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) -} - -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - var i = 0 - - for (; i < length; i++) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (leadSurrogate) { - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } else { - // valid surrogate pair - codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000 - leadSurrogate = null - } - } else { - // no lead yet - - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else { - // valid lead - leadSurrogate = codePoint - continue - } - } - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = null - } - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x200000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; i++) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; i++) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; i++) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} - -function decodeUtf8Char (str) { - try { - return decodeURIComponent(str) - } catch (err) { - return String.fromCharCode(0xFFFD) // UTF 8 invalid char - } -} - -},{"base64-js":4,"ieee754":5,"is-array":6}],4:[function(require,module,exports){ -var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - -;(function (exports) { - 'use strict'; - - var Arr = (typeof Uint8Array !== 'undefined') - ? Uint8Array - : Array - - var PLUS = '+'.charCodeAt(0) - var SLASH = '/'.charCodeAt(0) - var NUMBER = '0'.charCodeAt(0) - var LOWER = 'a'.charCodeAt(0) - var UPPER = 'A'.charCodeAt(0) - var PLUS_URL_SAFE = '-'.charCodeAt(0) - var SLASH_URL_SAFE = '_'.charCodeAt(0) - - function decode (elt) { - var code = elt.charCodeAt(0) - if (code === PLUS || - code === PLUS_URL_SAFE) - return 62 // '+' - if (code === SLASH || - code === SLASH_URL_SAFE) - return 63 // '/' - if (code < NUMBER) - return -1 //no match - if (code < NUMBER + 10) - return code - NUMBER + 26 + 26 - if (code < UPPER + 26) - return code - UPPER - if (code < LOWER + 26) - return code - LOWER + 26 - } - - function b64ToByteArray (b64) { - var i, j, l, tmp, placeHolders, arr - - if (b64.length % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // the number of equal signs (place holders) - // if there are two placeholders, than the two characters before it - // represent one byte - // if there is only one, then the three characters before it represent 2 bytes - // this is just a cheap hack to not do indexOf twice - var len = b64.length - placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 - - // base64 is 4/3 + up to two characters of the original data - arr = new Arr(b64.length * 3 / 4 - placeHolders) - - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? b64.length - 4 : b64.length - - var L = 0 - - function push (v) { - arr[L++] = v - } - - for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) - push((tmp & 0xFF0000) >> 16) - push((tmp & 0xFF00) >> 8) - push(tmp & 0xFF) - } - - if (placeHolders === 2) { - tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) - push(tmp & 0xFF) - } else if (placeHolders === 1) { - tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) - push((tmp >> 8) & 0xFF) - push(tmp & 0xFF) - } - - return arr - } - - function uint8ToBase64 (uint8) { - var i, - extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes - output = "", - temp, length - - function encode (num) { - return lookup.charAt(num) - } - - function tripletToBase64 (num) { - return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) - } - - // go through the array every three bytes, we'll deal with trailing stuff later - for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { - temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) - output += tripletToBase64(temp) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - switch (extraBytes) { - case 1: - temp = uint8[uint8.length - 1] - output += encode(temp >> 2) - output += encode((temp << 4) & 0x3F) - output += '==' - break - case 2: - temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) - output += encode(temp >> 10) - output += encode((temp >> 4) & 0x3F) - output += encode((temp << 2) & 0x3F) - output += '=' - break - } - - return output - } - - exports.toByteArray = b64ToByteArray - exports.fromByteArray = uint8ToBase64 -}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) - -},{}],5:[function(require,module,exports){ -exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m, - eLen = nBytes * 8 - mLen - 1, - eMax = (1 << eLen) - 1, - eBias = eMax >> 1, - nBits = -7, - i = isLE ? (nBytes - 1) : 0, - d = isLE ? -1 : 1, - s = buffer[offset + i] - - i += d - - e = s & ((1 << (-nBits)) - 1) - s >>= (-nBits) - nBits += eLen - for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & ((1 << (-nBits)) - 1) - e >>= (-nBits) - nBits += mLen - for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen) - e = e - eBias - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -} - -exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c, - eLen = nBytes * 8 - mLen - 1, - eMax = (1 << eLen) - 1, - eBias = eMax >> 1, - rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0), - i = isLE ? 0 : (nBytes - 1), - d = isLE ? 1 : -1, - s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 - - value = Math.abs(value) - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0 - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2) - if (value * (c = Math.pow(2, -e)) < 1) { - e-- - c *= 2 - } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) - } - if (value * c >= 2) { - e++ - c /= 2 - } - - if (e + eBias >= eMax) { - m = 0 - e = eMax - } else if (e + eBias >= 1) { - m = (value * c - 1) * Math.pow(2, mLen) - e = e + eBias - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) - e = 0 - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = (e << mLen) | m - eLen += mLen - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128 -} - -},{}],6:[function(require,module,exports){ - -/** - * isArray - */ - -var isArray = Array.isArray; - -/** - * toString - */ - -var str = Object.prototype.toString; - -/** - * Whether or not the given `val` - * is an array. - * - * example: - * - * isArray([]); - * // > true - * isArray(arguments); - * // > false - * isArray(''); - * // > false - * - * @param {mixed} val - * @return {bool} - */ - -module.exports = isArray || function (val) { - return !! val && '[object Array]' == str.call(val); -}; - -},{}],7:[function(require,module,exports){ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} - -},{}],8:[function(require,module,exports){ -// shim for using process in browser - -var process = module.exports = {}; -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = setTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - currentQueue[queueIndex].run(); - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - clearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - setTimeout(drainQueue, 0); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -// TODO(shtylman) -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - -},{}],9:[function(require,module,exports){ -module.exports = function isBuffer(arg) { - return arg && typeof arg === 'object' - && typeof arg.copy === 'function' - && typeof arg.fill === 'function' - && typeof arg.readUInt8 === 'function'; -} -},{}],10:[function(require,module,exports){ -(function (process,global){ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var formatRegExp = /%[sdj%]/g; -exports.format = function(f) { - if (!isString(f)) { - var objects = []; - for (var i = 0; i < arguments.length; i++) { - objects.push(inspect(arguments[i])); - } - return objects.join(' '); - } - - var i = 1; - var args = arguments; - var len = args.length; - var str = String(f).replace(formatRegExp, function(x) { - if (x === '%%') return '%'; - if (i >= len) return x; - switch (x) { - case '%s': return String(args[i++]); - case '%d': return Number(args[i++]); - case '%j': - try { - return JSON.stringify(args[i++]); - } catch (_) { - return '[Circular]'; - } - default: - return x; - } - }); - for (var x = args[i]; i < len; x = args[++i]) { - if (isNull(x) || !isObject(x)) { - str += ' ' + x; - } else { - str += ' ' + inspect(x); - } - } - return str; -}; - - -// Mark that a method should not be used. -// Returns a modified function which warns once by default. -// If --no-deprecation is set, then it is a no-op. -exports.deprecate = function(fn, msg) { - // Allow for deprecating things in the process of starting up. - if (isUndefined(global.process)) { - return function() { - return exports.deprecate(fn, msg).apply(this, arguments); - }; - } - - if (process.noDeprecation === true) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (process.throwDeprecation) { - throw new Error(msg); - } else if (process.traceDeprecation) { - console.trace(msg); - } else { - console.error(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -}; - - -var debugs = {}; -var debugEnviron; -exports.debuglog = function(set) { - if (isUndefined(debugEnviron)) - debugEnviron = process.env.NODE_DEBUG || ''; - set = set.toUpperCase(); - if (!debugs[set]) { - if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { - var pid = process.pid; - debugs[set] = function() { - var msg = exports.format.apply(exports, arguments); - console.error('%s %d: %s', set, pid, msg); - }; - } else { - debugs[set] = function() {}; - } - } - return debugs[set]; -}; - - -/** - * Echos the value of a value. Trys to print the value out - * in the best way possible given the different types. - * - * @param {Object} obj The object to print out. - * @param {Object} opts Optional options object that alters the output. - */ -/* legacy: obj, showHidden, depth, colors*/ -function inspect(obj, opts) { - // default options - var ctx = { - seen: [], - stylize: stylizeNoColor - }; - // legacy... - if (arguments.length >= 3) ctx.depth = arguments[2]; - if (arguments.length >= 4) ctx.colors = arguments[3]; - if (isBoolean(opts)) { - // legacy... - ctx.showHidden = opts; - } else if (opts) { - // got an "options" object - exports._extend(ctx, opts); - } - // set default options - if (isUndefined(ctx.showHidden)) ctx.showHidden = false; - if (isUndefined(ctx.depth)) ctx.depth = 2; - if (isUndefined(ctx.colors)) ctx.colors = false; - if (isUndefined(ctx.customInspect)) ctx.customInspect = true; - if (ctx.colors) ctx.stylize = stylizeWithColor; - return formatValue(ctx, obj, ctx.depth); -} -exports.inspect = inspect; - - -// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics -inspect.colors = { - 'bold' : [1, 22], - 'italic' : [3, 23], - 'underline' : [4, 24], - 'inverse' : [7, 27], - 'white' : [37, 39], - 'grey' : [90, 39], - 'black' : [30, 39], - 'blue' : [34, 39], - 'cyan' : [36, 39], - 'green' : [32, 39], - 'magenta' : [35, 39], - 'red' : [31, 39], - 'yellow' : [33, 39] -}; - -// Don't use 'blue' not visible on cmd.exe -inspect.styles = { - 'special': 'cyan', - 'number': 'yellow', - 'boolean': 'yellow', - 'undefined': 'grey', - 'null': 'bold', - 'string': 'green', - 'date': 'magenta', - // "name": intentionally not styling - 'regexp': 'red' -}; - - -function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - - if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; - } else { - return str; - } -} - - -function stylizeNoColor(str, styleType) { - return str; -} - - -function arrayToHash(array) { - var hash = {}; - - array.forEach(function(val, idx) { - hash[val] = true; - }); - - return hash; -} - - -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (ctx.customInspect && - value && - isFunction(value.inspect) && - // Filter out the util module, it's inspect function is special - value.inspect !== exports.inspect && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes, ctx); - if (!isString(ret)) { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // Look up the keys of the object. - var keys = Object.keys(value); - var visibleKeys = arrayToHash(keys); - - if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - } - - // IE doesn't make error fields non-enumerable - // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx - if (isError(value) - && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { - return formatError(value); - } - - // Some type of object without properties can be shortcutted. - if (keys.length === 0) { - if (isFunction(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (isFunction(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - base = ' ' + formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - if (isUndefined(value)) - return ctx.stylize('undefined', 'undefined'); - if (isString(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - } - if (isNumber(value)) - return ctx.stylize('' + value, 'number'); - if (isBoolean(value)) - return ctx.stylize('' + value, 'boolean'); - // For some reason typeof null is "object", so special case here. - if (isNull(value)) - return ctx.stylize('null', 'null'); -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (hasOwnProperty(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { - if (desc.set) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); - } - } - if (!hasOwnProperty(visibleKeys, key)) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(desc.value) < 0) { - if (isNull(recurseTimes)) { - str = formatValue(ctx, desc.value, null); - } else { - str = formatValue(ctx, desc.value, recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (isUndefined(name)) { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = require('./support/isBuffer'); - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - - -function pad(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); -} - - -var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', - 'Oct', 'Nov', 'Dec']; - -// 26 Feb 16:19:34 -function timestamp() { - var d = new Date(); - var time = [pad(d.getHours()), - pad(d.getMinutes()), - pad(d.getSeconds())].join(':'); - return [d.getDate(), months[d.getMonth()], time].join(' '); -} - - -// log is just a thin wrapper to console.log that prepends a timestamp -exports.log = function() { - console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); -}; - - -/** - * Inherit the prototype methods from one constructor into another. - * - * The Function.prototype.inherits from lang.js rewritten as a standalone - * function (not on Function.prototype). NOTE: If this file is to be loaded - * during bootstrapping this function needs to be rewritten using some native - * functions as prototype setup using normal JavaScript does not work as - * expected during bootstrapping (see mirror.js in r114903). - * - * @param {function} ctor Constructor function which needs to inherit the - * prototype. - * @param {function} superCtor Constructor function to inherit prototype from. - */ -exports.inherits = require('inherits'); - -exports._extend = function(origin, add) { - // Don't do anything if add isn't an object - if (!add || !isObject(add)) return origin; - - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; -}; - -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":9,"_process":8,"inherits":7}],11:[function(require,module,exports){ -(function (Buffer){ -var toString = Object.prototype.toString; - -var types = require('./types'); - -/** - * Simple data function to store type information - * @param {string} type Usually what is returned from typeof - * @param {string} cls Sanitized @Class via Object.prototype.toString - * @param {string} sub If type and cls the same, and need to specify somehow - * - * @example - * - * //for null - * new Type('null'); - * - * //for Date - * new Type('object', 'date'); - * - * //for Uint8Array - * - * new Type('object', 'typed-array', 'uint8'); - */ -function Type(type, cls, sub) { - this.type = type; - this.cls = cls; - this.sub = sub; -} - -/** - * Function to store type checks - */ -function TypeChecker() { - this.checks = []; -} - -TypeChecker.prototype = { - add: function(func) { - this.checks.push(func); - return this; - }, - - addTypeOf: function(type, res) { - return this.add(function(obj, tpeOf) { - if(tpeOf === type) { - return new Type(res); - } - }); - }, - - addClass: function(cls, res, sub) { - return this.add(function(obj, tpeOf, objCls) { - if(objCls === cls) { - return new Type(types.OBJECT, res, sub); - } - }); - }, - - getType: function(obj) { - var typeOf = typeof obj; - var cls = toString.call(obj); - - for(var i = 0, l = this.checks.length; i < l; i++) { - var res = this.checks[i].call(this, obj, typeOf, cls); - if(typeof res !== 'undefined') return res; - } - - } -}; - -var main = new TypeChecker(); - -//TODO add iterators - -main - .addTypeOf(types.NUMBER, types.NUMBER) - .addTypeOf(types.UNDEFINED, types.UNDEFINED) - .addTypeOf(types.STRING, types.STRING) - .addTypeOf(types.BOOLEAN, types.BOOLEAN) - .addTypeOf(types.FUNCTION, types.FUNCTION) - .addTypeOf(types.SYMBOL, types.SYMBOL) - .add(function(obj, tpeOf) { - if(obj === null) return new Type(types.NULL); - }) - .addClass('[object String]', types.STRING) - .addClass('[object Boolean]', types.BOOLEAN) - .addClass('[object Number]', types.NUMBER) - .addClass('[object Array]', types.ARRAY) - .addClass('[object RegExp]', types.REGEXP) - .addClass('[object Error]', types.ERROR) - .addClass('[object Date]', types.DATE) - .addClass('[object Arguments]', types.ARGUMENTS) - .addClass('[object Math]', types.OBJECT) - .addClass('[object JSON]', types.OBJECT) - .addClass('[object ArrayBuffer]', types.ARRAY_BUFFER) - .addClass('[object Int8Array]', types.TYPED_ARRAY, 'int8') - .addClass('[object Uint8Array]', types.TYPED_ARRAY, 'uint8') - .addClass('[object Uint8ClampedArray]', types.TYPED_ARRAY, 'uint8clamped') - .addClass('[object Int16Array]', types.TYPED_ARRAY, 'int16') - .addClass('[object Uint16Array]', types.TYPED_ARRAY, 'uint16') - .addClass('[object Int32Array]', types.TYPED_ARRAY, 'int32') - .addClass('[object Uint32Array]', types.TYPED_ARRAY, 'uint32') - .addClass('[object Float32Array]', types.TYPED_ARRAY, 'float32') - .addClass('[object Float64Array]', types.TYPED_ARRAY, 'float64') - .addClass('[object DataView]', types.DATA_VIEW) - .addClass('[object Map]', types.MAP) - .addClass('[object WeakMap]', types.WEAK_MAP) - .addClass('[object Set]', types.SET) - .addClass('[object WeakSet]', types.WEAK_SET) - .addClass('[object Promise]', types.PROMISE) - .addClass('[object Window]', types.WINDOW) - .add(function(obj) { - if(typeof window !== 'undefined' && typeof Node !== 'undefined' && obj instanceof Node) { - return new Type(types.OBJECT, types.HTML_ELEMENT, obj.nodeName.toLowerCase()); - } - }) - .addClass('[object Blob]', types.BLOB) - .addClass('[object File]', types.FILE) - .addClass('[object FileList]', types.FILE_LIST) - .addClass('[object XMLHttpRequest]', types.XHR) - .add(function(obj) { - if((typeof Promise === types.FUNCTION && obj instanceof Promise) || - (this.getType(obj.then) === types.FUNCTION)) { - return new Type(types.OBJECT, types.PROMISE); - } - }) - .add(function(obj) { - if(typeof Buffer !== 'undefined' && obj instanceof Buffer) { - return new Type(types.OBJECT, types.BUFFER); - } - }) - .add(function() { - return new Type(types.OBJECT); - }); - -/** - * Get type information of anything - * - * @param {any} obj Anything that could require type information - * @return {Type} type info - */ -function getGlobalType(obj) { - return main.getType(obj); -} - -getGlobalType.checker = main; -getGlobalType.TypeChecker = TypeChecker; -getGlobalType.Type = Type; - -Object.keys(types).forEach(function(typeName) { - getGlobalType[typeName] = types[typeName]; -}); - -module.exports = getGlobalType; - -}).call(this,require("buffer").Buffer) -},{"./types":12,"buffer":3}],12:[function(require,module,exports){ -var types = { - NUMBER: 'number', - UNDEFINED: 'undefined', - STRING: 'string', - BOOLEAN: 'boolean', - OBJECT: 'object', - FUNCTION: 'function', - NULL: 'null', - ARRAY: 'array', - REGEXP: 'regexp', - DATE: 'date', - ERROR: 'error', - ARGUMENTS: 'arguments', - SYMBOL: 'symbol', - ARRAY_BUFFER: 'array-buffer', - TYPED_ARRAY: 'typed-array', - DATA_VIEW: 'data-view', - MAP: 'map', - SET: 'set', - WEAK_SET: 'weak-set', - WEAK_MAP: 'weak-map', - PROMISE: 'promise', - -// node buffer - BUFFER: 'buffer', - -// dom html element - HTML_ELEMENT: 'html-element', - HTML_ELEMENT_TEXT: 'html-element-text', - DOCUMENT: 'document', - WINDOW: 'window', - FILE: 'file', - FILE_LIST: 'file-list', - BLOB: 'blob', - - XHR: 'xhr' -}; - -module.exports = types; - -},{}],13:[function(require,module,exports){ -function addSpaces(v) { - return v.split('\n').map(function(vv) { return ' ' + vv; }).join('\n'); -} - -function pad(str, value, filler) { - var isRight = false; - - if(value < 0) { - isRight = true; - value = -value; - } - - if(str.length < value) { - var padding = new Array(value - str.length + 1).join(filler); - return isRight ? str + padding : padding + str; - } else{ - return str; - } -} - - - -module.exports = { - addSpaces: addSpaces, - pad: pad, - pad0: function(str, value) { - return pad(str, value, '0'); - } -}; - -},{}],14:[function(require,module,exports){ -(function (Buffer){ -var assert = require('assert'); - -var format = require('../'); - -it('should format numbers', function() { - assert.equal(format(10), '10'); - assert.equal(format(0.1e-5), '0.000001'); - assert.equal(format(-0), '-0'); - assert.equal(format(Infinity), 'Infinity'); - assert.equal(format(-Infinity), '-Infinity'); - assert.equal(format(NaN), 'NaN'); -}); - -it('should format undefined', function() { - assert.equal(format(undefined), 'undefined'); - assert.equal(format(void 0), 'undefined'); -}); - -it('should format null', function() { - assert.equal(format(null), 'null'); -}); - -it('should format string', function() { - assert.equal(format('abc'), "'abc'"); - assert.equal(format('abc" \' '), "'abc\" \\' '"); -}); - -it('should format boolean', function() { - assert.equal(format(true), 'true'); - assert.equal(format(false), 'false'); -}); - -it('should format primitive wrappers', function() { - assert.equal(format(new Number(10)), '[Number: 10]'); - assert.equal(format(new Boolean(true)), '[Boolean: true]'); - assert.equal(format(new String('abc')), '[String: \'abc\']'); -}); - -it('should format primitive wrappers with keys', function() { - var b = new Boolean(true); - b.abc = 10; - assert.equal(format(b), '{ [Boolean: true] abc: 10 }'); - - var s = new String('abc'); - s.abc = 10; - assert.equal(format(s), "{ [String: 'abc'] abc: 10 }"); -}); - -it('should format regex', function() { - assert.equal(format(/abc/gi), '/abc/gi'); - assert.equal(format(new RegExp('abc', 'gi')), '/abc/gi'); -}); - -it('should format regex with keys', function() { - var r = /abc/gi; - r.abc = 10; - assert.equal(format(r), '{ /abc/gi abc: 10 }'); -}); - -function fff() { -} - -it('should format function', function() { - var f = function() { - }; - assert.equal(format(f), '[Function]'); - - assert.equal(format(fff), '[Function: fff]'); -}); - -var getter = Object.create(null, { - a: { - get: function() { - return 'aaa'; - } - } -}); -var setter = Object.create(null, { - b: { - set: function() { - } - } -}); -var getterAndSetter = Object.create(null, { - c: { - get: function() { - return 'ccc'; - }, - set: function() { - } - } -}); - -it('should format object', function() { - assert.equal(format({a: 10, b: '10', '123': 'asd'}), "{ '123': 'asd', a: 10, b: '10' }"); - - assert.equal(format(getter, {keys: false}), '{ a: [Getter] }'); - assert.equal(format(setter, {keys: false}), '{ b: [Setter] }'); - assert.equal(format(getterAndSetter, {keys: false}), '{ c: [Getter/Setter] }'); - - var obj = {a: 10}; - obj.b = obj; - assert.equal(format(obj), '{ a: 10, b: [Circular] }'); - - var w = { - '\\': 1, - '\\\\': 2, - '\\\\\\': 3, - '\\\\\\\\': 4 - }; - - var y = ['a', 'b', 'c']; - y['\\\\\\'] = 'd'; - - assert.ok(format(w), - '{ \'\\\': 1, \'\\\\\': 2, \'\\\\\\\': 3, \'\\\\\\\\\': 4 }'); - assert.ok(format(y), '[ \'a\', \'b\', \'c\', \'\\\\\\\': \'d\' ]'); -}); - -it('should format arguments', function() { - var f = function() { - return arguments - }; - assert.equal(format(f(1, 2, 3)), '{ \'0\': 1, \'1\': 2, \'2\': 3 }'); -}); - -it('should format node buffer', function() { - if(typeof Buffer !== 'undefined') { - var b = new Buffer('abc'); - assert.equal(format(b), '[Buffer: 61 62 63]'); - } -}); - -it('should format typed arrays', function() { - if(typeof ArrayBuffer != 'undefined') { - var buffer = new ArrayBuffer(8); - for(var i = 0; i < buffer.byteLength; i++) buffer[i] = 0x00; - buffer[1] = 0x20; - buffer[2] = 0x2; - assert.equal(format(buffer), '[ArrayBuffer: 00 20 02 00 00 00 00 00]'); - - var int8 = new Int8Array(3); - int8[0] = 0x20; - int8[1] = 0x2; - assert.equal(format(int8), '[Int8Array: 20 02 00]'); - - //var dataView = new DataView(buffer); - //assert.equal(format(dataView), '[DataView: 00 20 02 00 00 00 00 00]'); - } -}); - -it('should format html elements', function() { - if(typeof window != 'undefined' && typeof document != 'undefined') { - var btn = document.createElement("BUTTON"); - var t = document.createTextNode("CLICK ME"); - btn.appendChild(t); - - assert.equal(format(btn), ''); - - assert.equal(format(t), 'CLICK ME'); - } -}); - -it('should correctly indent', function() { - assert.equal(format({ a: { b: 'abc' }, d: 'abc'}, { maxLineLength: 0 }), '{\n a: {\n b: \'abc\'\n },\n d: \'abc\'\n}') -}); - -}).call(this,require("buffer").Buffer) -},{"../":1,"assert":2,"buffer":3}]},{},[14]); diff --git a/cli/node_modules/should/node_modules/should-format/tests/test.js b/cli/node_modules/should/node_modules/should-format/tests/test.js deleted file mode 100644 index e19fff283..000000000 --- a/cli/node_modules/should/node_modules/should-format/tests/test.js +++ /dev/null @@ -1,195 +0,0 @@ -/*eslint-env mocha*/ - -var assert = require('assert'); - -var format = require('../'); - -it('should format numbers', function() { - assert.equal(format(10), '10'); - assert.equal(format(0.1e-5), '0.000001'); - assert.equal(format(-0), '-0'); - assert.equal(format(Infinity), 'Infinity'); - assert.equal(format(-Infinity), '-Infinity'); - assert.equal(format(NaN), 'NaN'); -}); - -it('should format undefined', function() { - assert.equal(format(undefined), 'undefined'); - assert.equal(format(void 0), 'undefined'); -}); - -it('should format null', function() { - assert.equal(format(null), 'null'); -}); - -it('should format string', function() { - assert.equal(format('abc'), "'abc'"); - assert.equal(format('abc" \' '), "'abc\" \\' '"); -}); - -it('should format boolean', function() { - assert.equal(format(true), 'true'); - assert.equal(format(false), 'false'); -}); - -it('should format primitive wrappers', function() { - assert.equal(format(new Number(10)), 'Number { [[PrimitiveValue]]: 10 }'); - assert.equal(format(new Boolean(true)), 'Boolean { [[PrimitiveValue]]: true }'); - assert.equal(format(new String('abc')), 'String { [[PrimitiveValue]]: \'abc\' }'); -}); - -it('should format primitive wrappers with keys', function() { - var b = new Boolean(true); - b.abc = 10; - assert.equal(format(b), 'Boolean { abc: 10, [[PrimitiveValue]]: true }'); - - var s = new String('abc'); - s.abc = 10; - assert.equal(format(s), 'String { abc: 10, [[PrimitiveValue]]: \'abc\' }'); -}); - -it('should format regex', function() { - assert.equal(format(/abc/gi), '/abc/gi'); - assert.equal(format(new RegExp('abc', 'gi')), '/abc/gi'); -}); - -it('should format regex with keys', function() { - var r = /abc/gi; - r.abc = 10; - assert.equal(format(r), 'RegExp { /abc/gi abc: 10 }'); -}); - -function fff() { -} - -it('should format function', function() { - var f = function() { - }; - assert.equal(format(f), 'Function { name: \'\' }'); - - assert.equal(format(fff), 'Function { name: \'fff\' }'); -}); - -var getter = Object.create(null, { - a: { - get: function() { - return 'aaa'; - } - } -}); -var setter = Object.create(null, { - b: { - set: function() { - } - } -}); -var getterAndSetter = Object.create(null, { - c: { - get: function() { - return 'ccc'; - }, - set: function() { - } - } -}); - -it('should format object', function() { - assert.equal(format({a: 10, b: '10', '123': 'asd'}), "Object { '123': 'asd', a: 10, b: '10' }"); - - assert.equal(format(getter, {keys: false}), '{ a: [Getter] }'); - assert.equal(format(setter, {keys: false}), '{ b: [Setter] }'); - assert.equal(format(getterAndSetter, {keys: false}), '{ c: [Getter/Setter] }'); - - var obj = {a: 10}; - obj.b = obj; - assert.equal(format(obj), 'Object { a: 10, b: [Circular] }'); - - var w = { - '\\': 1, - '\\\\': 2, - '\\\\\\': 3, - '\\\\\\\\': 4 - }; - - var y = ['a', 'b', 'c']; - y['\\\\\\'] = 'd'; - - assert.ok(format(w), - 'Object { \'\\\': 1, \'\\\\\': 2, \'\\\\\\\': 3, \'\\\\\\\\\': 4 }'); - assert.ok(format(y), '[ \'a\', \'b\', \'c\', \'\\\\\\\': \'d\' ]'); -}); - -it('should format arguments', function() { - var f = function() { - return arguments; - }; - assert.equal(format(f(1, 2, 3)), 'Arguments [ 1, 2, 3 ]'); -}); - -it('should format arrays', function() { - assert.equal(format([1, 2, 'abc']), 'Array [ 1, 2, \'abc\' ]'); -}); - -it('should format node buffer', function() { - if(typeof Buffer !== 'undefined') { - var b = new Buffer('abc'); - assert.equal(format(b), 'Buffer [ 61, 62, 63 ]'); - } -}); - -it('should format typed arrays', function() { - if(typeof ArrayBuffer != 'undefined') { - var buffer = new ArrayBuffer(8); - for(var i = 0; i < buffer.byteLength; i++) buffer[i] = 0x00; - buffer[1] = 0x20; - buffer[2] = 0x2; - assert.equal(format(buffer), 'ArrayBuffer [ 00, 20, 02, 00, 00, 00, 00, 00 ]'); - - var int8 = new Int8Array(3); - int8[0] = 0x20; - int8[1] = 0x2; - assert.equal(format(int8), 'Int8Array [ 20, 02, 00 ]'); - - var int16 = new Int16Array(3); - int16[0] = 0x201; - int16[1] = 0x2; - assert.equal(format(int16), 'Int16Array [ 0201, 0002, 0000 ]'); - - //var dataView = new DataView(buffer); - //assert.equal(format(dataView), '[DataView: 00 20 02 00 00 00 00 00]'); - } -}); - -it('should format html elements', function() { - if(typeof window != 'undefined' && typeof document != 'undefined') { - var btn = document.createElement("BUTTON"); - var t = document.createTextNode("CLICK ME"); - btn.appendChild(t); - - assert.equal(format(btn), ''); - - assert.equal(format(t), 'CLICK ME'); - } -}); - -it('should correctly indent', function() { - assert.equal(format({ a: { b: 'abc' }, d: 'abc'}, { maxLineLength: 0 }), 'Object {\n a: Object {\n b: \'abc\'\n },\n d: \'abc\'\n}'); -}); - -it('should format set', function() { - if(typeof Set !== 'undefined') { - assert.equal(format(new Set([1, 2, { a: 10}, 'abc'])), - 'Set { 1, 2, Object { a: 10 }, \'abc\' }'); - assert.equal(format(new Set([1, 2, { a: 10}, 'abc']), { maxLineLength: 0 }), - 'Set {\n 1,\n 2,\n Object {\n a: 10\n },\n \'abc\'\n}'); - } -}); - -it('should format map', function() { - if(typeof Map !== 'undefined') { - assert.equal(format(new Map([[1, 2], [2, 'abc'], [{ a: 10}, new Set()], ['abc', null]])), - 'Map { 1 => 2, 2 => \'abc\', Object { a: 10 } => Set {}, \'abc\' => null }'); - assert.equal(format(new Map([[1, 2], [2, 'abc'], [{ a: 10}, new Set()], ['abc', null]]), { maxLineLength: 10 }), - 'Map {\n 1 => 2,\n 2 => \'abc\',\n Object { a: 10 } =>\n Set {},\n \'abc\' =>\n null\n}'); - } -}); diff --git a/cli/node_modules/should/node_modules/should-format/util.js b/cli/node_modules/should/node_modules/should-format/util.js deleted file mode 100644 index f72518faa..000000000 --- a/cli/node_modules/should/node_modules/should-format/util.js +++ /dev/null @@ -1,28 +0,0 @@ -function addSpaces(v) { - return v.split('\n').map(function(vv) { return ' ' + vv; }).join('\n'); -} - -function pad(str, value, filler) { - str = String(str) - var isRight = false; - - if(value < 0) { - isRight = true; - value = -value; - } - - if(str.length < value) { - var padding = new Array(value - str.length + 1).join(filler); - return isRight ? str + padding : padding + str; - } else{ - return str; - } -} - -module.exports = { - addSpaces: addSpaces, - pad: pad, - pad0: function(str, value) { - return pad(str, value, '0'); - } -}; diff --git a/cli/node_modules/should/node_modules/should-type/.npmignore b/cli/node_modules/should/node_modules/should-type/.npmignore deleted file mode 100644 index 5d46e4e8c..000000000 --- a/cli/node_modules/should/node_modules/should-type/.npmignore +++ /dev/null @@ -1,30 +0,0 @@ -# Logs -logs -*.log - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directory -# Commenting this out is preferred by some people, see -# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- -node_modules - -# Users Environment Variables -.lock-wscript - -.idea \ No newline at end of file diff --git a/cli/node_modules/should/node_modules/should-type/LICENSE b/cli/node_modules/should/node_modules/should-type/LICENSE deleted file mode 100644 index d7e0e57ac..000000000 --- a/cli/node_modules/should/node_modules/should-type/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/cli/node_modules/should/node_modules/should-type/README.md b/cli/node_modules/should/node_modules/should-type/README.md deleted file mode 100644 index 28b38d73d..000000000 --- a/cli/node_modules/should/node_modules/should-type/README.md +++ /dev/null @@ -1,4 +0,0 @@ -type -==== - -Simple module to resolve types diff --git a/cli/node_modules/should/node_modules/should-type/index.js b/cli/node_modules/should/node_modules/should-type/index.js deleted file mode 100644 index 3d950da38..000000000 --- a/cli/node_modules/should/node_modules/should-type/index.js +++ /dev/null @@ -1,159 +0,0 @@ -var toString = Object.prototype.toString; - -var types = require('./types'); - -/** - * Simple data function to store type information - * @param {string} type Usually what is returned from typeof - * @param {string} cls Sanitized @Class via Object.prototype.toString - * @param {string} sub If type and cls the same, and need to specify somehow - * @private - * @example - * - * //for null - * new Type('null'); - * - * //for Date - * new Type('object', 'date'); - * - * //for Uint8Array - * - * new Type('object', 'typed-array', 'uint8'); - */ -function Type(type, cls, sub) { - this.type = type; - this.cls = cls; - this.sub = sub; -} - -/** - * Function to store type checks - * @private - */ -function TypeChecker() { - this.checks = []; -} - -TypeChecker.prototype = { - add: function(func) { - this.checks.push(func); - return this; - }, - - addTypeOf: function(type, res) { - return this.add(function(obj, tpeOf) { - if(tpeOf === type) { - return new Type(res); - } - }); - }, - - addClass: function(cls, res, sub) { - return this.add(function(obj, tpeOf, objCls) { - if(objCls === cls) { - return new Type(types.OBJECT, res, sub); - } - }); - }, - - getType: function(obj) { - var typeOf = typeof obj; - var cls = toString.call(obj); - - for(var i = 0, l = this.checks.length; i < l; i++) { - var res = this.checks[i].call(this, obj, typeOf, cls); - if(typeof res !== 'undefined') return res; - } - - } -}; - -var main = new TypeChecker(); - -//TODO add iterators - -main - .addTypeOf(types.NUMBER, types.NUMBER) - .addTypeOf(types.UNDEFINED, types.UNDEFINED) - .addTypeOf(types.STRING, types.STRING) - .addTypeOf(types.BOOLEAN, types.BOOLEAN) - .addTypeOf(types.FUNCTION, types.FUNCTION) - .addTypeOf(types.SYMBOL, types.SYMBOL) - .add(function(obj, tpeOf) { - if(obj === null) return new Type(types.NULL); - }) - .addClass('[object String]', types.STRING) - .addClass('[object Boolean]', types.BOOLEAN) - .addClass('[object Number]', types.NUMBER) - .addClass('[object Array]', types.ARRAY) - .addClass('[object RegExp]', types.REGEXP) - .addClass('[object Error]', types.ERROR) - .addClass('[object Date]', types.DATE) - .addClass('[object Arguments]', types.ARGUMENTS) - .addClass('[object Math]') - .addClass('[object JSON]') - .addClass('[object ArrayBuffer]', types.ARRAY_BUFFER) - .addClass('[object Int8Array]', types.TYPED_ARRAY, 'int8') - .addClass('[object Uint8Array]', types.TYPED_ARRAY, 'uint8') - .addClass('[object Uint8ClampedArray]', types.TYPED_ARRAY, 'uint8clamped') - .addClass('[object Int16Array]', types.TYPED_ARRAY, 'int16') - .addClass('[object Uint16Array]', types.TYPED_ARRAY, 'uint16') - .addClass('[object Int32Array]', types.TYPED_ARRAY, 'int32') - .addClass('[object Uint32Array]', types.TYPED_ARRAY, 'uint32') - .addClass('[object Float32Array]', types.TYPED_ARRAY, 'float32') - .addClass('[object Float64Array]', types.TYPED_ARRAY, 'float64') - .addClass('[object DataView]', types.DATA_VIEW) - .addClass('[object Map]', types.MAP) - .addClass('[object WeakMap]', types.WEAK_MAP) - .addClass('[object Set]', types.SET) - .addClass('[object WeakSet]', types.WEAK_SET) - .addClass('[object Promise]', types.PROMISE) - .addClass('[object Blob]', types.BLOB) - .addClass('[object File]', types.FILE) - .addClass('[object FileList]', types.FILE_LIST) - .addClass('[object XMLHttpRequest]', types.XHR) - .add(function(obj) { - if((typeof Promise === types.FUNCTION && obj instanceof Promise) || - (typeof obj.then === types.FUNCTION)) { - return new Type(types.OBJECT, types.PROMISE); - } - }) - .add(function(obj) { - if(typeof Buffer !== 'undefined' && obj instanceof Buffer) { - return new Type(types.OBJECT, types.BUFFER); - } - }) - .add(function(obj) { - if(typeof Node !== 'undefined' && obj instanceof Node) { - return new Type(types.OBJECT, types.HTML_ELEMENT, obj.nodeName); - } - }) - .add(function(obj) { - // probably at the begginging should be enough these checks - if(obj.Boolean === Boolean && obj.Number === Number && obj.String === String && obj.Date === Date) { - return new Type(types.OBJECT, types.HOST); - } - }) - .add(function() { - return new Type(types.OBJECT); - }); - -/** - * Get type information of anything - * - * @param {any} obj Anything that could require type information - * @return {Type} type info - */ -function getGlobalType(obj) { - return main.getType(obj); -} - -getGlobalType.checker = main; -getGlobalType.TypeChecker = TypeChecker; -getGlobalType.Type = Type; - -Object.keys(types).forEach(function(typeName) { - getGlobalType[typeName] = types[typeName]; -}); - -module.exports = getGlobalType; diff --git a/cli/node_modules/should/node_modules/should-type/package.json b/cli/node_modules/should/node_modules/should-type/package.json deleted file mode 100644 index 3a0176936..000000000 --- a/cli/node_modules/should/node_modules/should-type/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "should-type", - "version": "0.2.0", - "description": "Simple module to get instance type. Like a bit more advanced version of typeof", - "main": "index.js", - "repository": { - "type": "git", - "url": "git+https://github.com/shouldjs/type.git" - }, - "keywords": [ - "should", - "type" - ], - "author": { - "name": "Denis Bardadym", - "email": "bardadymchik@gmail.com" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/shouldjs/type/issues" - }, - "homepage": "https://github.com/shouldjs/type", - "gitHead": "3ae89bfac659a5c5afbb176622f9773bcabd0a66", - "_id": "should-type@0.2.0", - "scripts": {}, - "_shasum": "6707ef95529d989dcc098fe0753ab1f9136bb7f6", - "_from": "should-type@0.2.0", - "_npmVersion": "2.11.1", - "_nodeVersion": "2.3.0", - "_npmUser": { - "name": "btd", - "email": "bardadymchik@gmail.com" - }, - "maintainers": [ - { - "name": "btd", - "email": "bardadymchik@gmail.com" - } - ], - "dist": { - "shasum": "6707ef95529d989dcc098fe0753ab1f9136bb7f6", - "tarball": "http://registry.npmjs.org/should-type/-/should-type-0.2.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/should-type/-/should-type-0.2.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/should/node_modules/should-type/types.js b/cli/node_modules/should/node_modules/should-type/types.js deleted file mode 100644 index 18b8c123d..000000000 --- a/cli/node_modules/should/node_modules/should-type/types.js +++ /dev/null @@ -1,41 +0,0 @@ -var types = { - NUMBER: 'number', - UNDEFINED: 'undefined', - STRING: 'string', - BOOLEAN: 'boolean', - OBJECT: 'object', - FUNCTION: 'function', - NULL: 'null', - ARRAY: 'array', - REGEXP: 'regexp', - DATE: 'date', - ERROR: 'error', - ARGUMENTS: 'arguments', - SYMBOL: 'symbol', - ARRAY_BUFFER: 'array-buffer', - TYPED_ARRAY: 'typed-array', - DATA_VIEW: 'data-view', - MAP: 'map', - SET: 'set', - WEAK_SET: 'weak-set', - WEAK_MAP: 'weak-map', - PROMISE: 'promise', - -// node buffer - BUFFER: 'buffer', - -// dom html element - HTML_ELEMENT: 'html-element', - HTML_ELEMENT_TEXT: 'html-element-text', - DOCUMENT: 'document', - WINDOW: 'window', - FILE: 'file', - FILE_LIST: 'file-list', - BLOB: 'blob', - - HOST: 'host', - - XHR: 'xhr' -}; - -module.exports = types; diff --git a/cli/node_modules/should/package.json b/cli/node_modules/should/package.json deleted file mode 100644 index 1447cf303..000000000 --- a/cli/node_modules/should/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "name": "should", - "description": "test framework agnostic BDD-style assertions", - "version": "7.0.2", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/shouldjs/should.js.git" - }, - "homepage": "https://github.com/shouldjs/should.js", - "scripts": { - "test": "mocha -R mocha-better-spec-reporter --check-leaks ./test/*.test.js ./test/**/*.test.js", - "zuul": "zuul -- ./test/**/*.test.js ./test/*.test.js", - "browser": "gulp script" - }, - "devDependencies": { - "browserify": "latest", - "gulp": "^3.8.10", - "gulp-header": "^1.2.2", - "gulp-load-plugins": "^0.5.1", - "gulp-rename": "^1.2.0", - "gulp-uglify": "^1.0.1", - "gulp-util": "^2.2.14", - "mocha": "latest", - "mocha-better-spec-reporter": "latest", - "vinyl-source-stream2": "^0.1.1", - "zuul": "latest" - }, - "keywords": [ - "test", - "bdd", - "assert", - "should" - ], - "main": "./index.js", - "license": "MIT", - "dependencies": { - "should-equal": "0.5.0", - "should-format": "0.3.0", - "should-type": "0.2.0" - }, - "gitHead": "1e458307a77ec8609ae345d8a20850c419317bad", - "bugs": { - "url": "https://github.com/shouldjs/should.js/issues" - }, - "_id": "should@7.0.2", - "_shasum": "1df24e02a971cf1d595aed267e2d83f24c370983", - "_from": "should@*", - "_npmVersion": "2.11.3", - "_nodeVersion": "2.3.3", - "_npmUser": { - "name": "btd", - "email": "bardadymchik@gmail.com" - }, - "dist": { - "shasum": "1df24e02a971cf1d595aed267e2d83f24c370983", - "tarball": "http://registry.npmjs.org/should/-/should-7.0.2.tgz" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "gjohnson", - "email": "gjj391@gmail.com" - }, - { - "name": "travisjeffery", - "email": "tj@travisjeffery.com" - }, - { - "name": "btd", - "email": "bardadymchik@gmail.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/should/-/should-7.0.2.tgz" -} diff --git a/cli/node_modules/should/should.js b/cli/node_modules/should/should.js deleted file mode 100644 index f0daf06cb..000000000 --- a/cli/node_modules/should/should.js +++ /dev/null @@ -1,3425 +0,0 @@ -/* - * should - test framework agnostic BDD-style assertions - * @version v7.0.2 - * @author TJ Holowaychuk and contributors - * @link https://github.com/shouldjs/should.js - * @license MIT - */ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Should = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0) { - // once we have located the function frame - // we need to strip out everything before it (and its line) - var next_line = out.indexOf('\n', idx + 1); - out = out.substring(next_line + 1); - } - } - - this.stack = out; - } - } -}; - - -var indent = ' '; -function prependIndent(line) { - return indent + line; -} - -function indentLines(text) { - return text.split('\n').map(prependIndent).join('\n'); -} - - -// assert.AssertionError instanceof Error -AssertionError.prototype = Object.create(Error.prototype, { - name: { - value: 'AssertionError' - }, - - generateMessage: { - value: function() { - if(!this.operator && this.previous) { - return this.previous.message; - } - var actual = util.format(this.actual); - var expected = 'expected' in this ? ' ' + util.format(this.expected) : ''; - var details = 'details' in this && this.details ? ' (' + this.details + ')' : ''; - - var previous = this.previous ? '\n' + indentLines(this.previous.message) : ''; - - return 'expected ' + actual + (this.negate ? ' not ' : ' ') + this.operator + expected + details + previous; - } - } -}); - -module.exports = AssertionError; - -},{"./util":18}],3:[function(require,module,exports){ -var AssertionError = require('./assertion-error'); -var util = require('./util'); - -/** - * should Assertion - * @param {*} obj Given object for assertion - * @constructor - * @memberOf should - * @static - */ -function Assertion(obj) { - this.obj = obj; - - this.anyOne = false; - this.negate = false; - - this.params = {actual: obj}; -} - -/** - * Way to extend Assertion function. It uses some logic - * to define only positive assertions and itself rule with negative assertion. - * - * All actions happen in subcontext and this method take care about negation. - * Potentially we can add some more modifiers that does not depends from state of assertion. - * @memberOf Assertion - * @category assertion - * @static - * @param {String} name Name of assertion. It will be used for defining method or getter on Assertion.prototype - * @param {Function} func Function that will be called on executing assertion - * @example - * - * Assertion.add('asset', function() { - * this.params = { operator: 'to be asset' }; - * - * this.obj.should.have.property('id').which.is.a.Number(); - * this.obj.should.have.property('path'); - * }); - */ -Assertion.add = function(name, func) { - var prop = {enumerable: true, configurable: true}; - - prop.value = function() { - var context = new Assertion(this.obj, this, name); - context.anyOne = this.anyOne; - - try { - func.apply(context, arguments); - } catch(e) { - //check for fail - if(e instanceof AssertionError) { - //negative fail - if(this.negate) { - this.obj = context.obj; - this.negate = false; - return this; - } - - if(context !== e.assertion) { - context.params.previous = e; - } - - //positive fail - context.negate = false; - context.fail(); - } - // throw if it is another exception - throw e; - } - - //negative pass - if(this.negate) { - context.negate = true;//because .fail will set negate - context.params.details = 'false negative fail'; - context.fail(); - } - - //positive pass - if(!this.params.operator) this.params = context.params;//shortcut - this.obj = context.obj; - this.negate = false; - return this; - }; - - Object.defineProperty(Assertion.prototype, name, prop); -}; - -Assertion.addChain = function(name, onCall) { - onCall = onCall || function() { - }; - Object.defineProperty(Assertion.prototype, name, { - get: function() { - onCall(); - return this; - }, - enumerable: true - }); -}; - -/** - * Create alias for some `Assertion` property - * - * @memberOf Assertion - * @category assertion - * @static - * @param {String} from Name of to map - * @param {String} to Name of alias - * @example - * - * Assertion.alias('true', 'True'); - */ -Assertion.alias = function(from, to) { - var desc = Object.getOwnPropertyDescriptor(Assertion.prototype, from); - if(!desc) throw new Error('Alias ' + from + ' -> ' + to + ' could not be created as ' + from + ' not defined'); - Object.defineProperty(Assertion.prototype, to, desc); -}; - -Assertion.prototype = { - constructor: Assertion, - - /** - * Base method for assertions. Before calling this method need to fill Assertion#params object. This method usually called from other assertion methods. - * `Assertion#params` can contain such properties: - * * `operator` - required string containing description of this assertion - * * `obj` - optional replacement for this.obj, it usefull if you prepare more clear object then given - * * `message` - if this property filled with string any others will be ignored and this one used as assertion message - * * `expected` - any object used when you need to assert relation between given object and expected. Like given == expected (== is a relation) - * * `details` - additional string with details to generated message - * - * @memberOf Assertion - * @category assertion - * @param {*} expr Any expression that will be used as a condition for asserting. - * @example - * - * var a = new should.Assertion(42); - * - * a.params = { - * operator: 'to be magic number', - * } - * - * a.assert(false); - * //throws AssertionError: expected 42 to be magic number - */ - assert: function(expr) { - if(expr) return this; - - var params = this.params; - - if('obj' in params && !('actual' in params)) { - params.actual = params.obj; - } else if(!('obj' in params) && !('actual' in params)) { - params.actual = this.obj; - } - - params.stackStartFunction = params.stackStartFunction || this.assert; - params.negate = this.negate; - - params.assertion = this; - - throw new AssertionError(params); - }, - - /** - * Shortcut for `Assertion#assert(false)`. - * - * @memberOf Assertion - * @category assertion - * @example - * - * var a = new should.Assertion(42); - * - * a.params = { - * operator: 'to be magic number', - * } - * - * a.fail(); - * //throws AssertionError: expected 42 to be magic number - */ - fail: function() { - return this.assert(false); - }, - - /** - * Negation modifier. Current assertion chain become negated. Each call invert negation on current assertion. - * - * @memberOf Assertion - * @category assertion - */ - get not() { - this.negate = !this.negate; - return this; - }, - - /** - * Any modifier - it affect on execution of sequenced assertion to do not `check all`, but `check any of`. - * - * @memberOf Assertion - * @category assertion - */ - get any() { - this.anyOne = true; - return this; - } -}; - -module.exports = Assertion; - -},{"./assertion-error":2,"./util":18}],4:[function(require,module,exports){ -var Formatter = require('should-format').Formatter; - -var config = { - checkProtoEql: false, - - getFormatter: function(opts) { - return new Formatter(opts || config); - } -}; - -module.exports = config; - -},{"should-format":21}],5:[function(require,module,exports){ -// implement assert interface using already written peaces of should.js - -// http://wiki.commonjs.org/wiki/Unit_Testing/1.0 -// -// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8! -// -// Originally from narwhal.js (http://narwhaljs.org) -// Copyright (c) 2009 Thomas Robinson <280north.com> -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the 'Software'), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -// when used in node, this will actually load the util module we depend on -// versus loading the builtin util module as happens otherwise -// this is a bug in node module loading as far as I am concerned -var Assertion = require('./../assertion'); - -var _deepEqual = require('should-equal'); - -var pSlice = Array.prototype.slice; - -// 1. The assert module provides functions that throw -// AssertionError's when particular conditions are not met. The -// assert module must conform to the following interface. - -var assert = module.exports = ok; - -// 3. All of the following functions must throw an AssertionError -// when a corresponding condition is not met, with a message that -// may be undefined if not provided. All assertion methods provide -// both the actual and expected values to the assertion error for -// display purposes. -/** - * Node.js standard [`assert.fail`](http://nodejs.org/api/assert.html#assert_assert_fail_actual_expected_message_operator). - * @static - * @memberOf should - * @category assertion assert - * @param {*} actual Actual object - * @param {*} expected Expected object - * @param {string} message Message for assertion - * @param {string} operator Operator text - */ -function fail(actual, expected, message, operator, stackStartFunction) { - var a = new Assertion(actual); - a.params = { - operator: operator, - expected: expected, - message: message, - stackStartFunction: stackStartFunction || fail - }; - - a.fail(); -} - -// EXTENSION! allows for well behaved errors defined elsewhere. -assert.fail = fail; - -// 4. Pure assertion tests whether a value is truthy, as determined -// by !!guard. -// assert.ok(guard, message_opt); -// This statement is equivalent to assert.equal(true, !!guard, -// message_opt);. To test strictly for the value true, use -// assert.strictEqual(true, guard, message_opt);. -/** - * Node.js standard [`assert.ok`](http://nodejs.org/api/assert.html#assert_assert_value_message_assert_ok_value_message). - * @static - * @memberOf should - * @category assertion assert - * @param {*} value - * @param {string} [message] - */ -function ok(value, message) { - if(!value) fail(value, true, message, '==', assert.ok); -} -assert.ok = ok; - -// 5. The equality assertion tests shallow, coercive equality with -// ==. -// assert.equal(actual, expected, message_opt); - -/** - * Node.js standard [`assert.equal`](http://nodejs.org/api/assert.html#assert_assert_equal_actual_expected_message). - * @static - * @memberOf should - * @category assertion assert - * @param {*} actual - * @param {*} expected - * @param {string} [message] - */ -assert.equal = function equal(actual, expected, message) { - if(actual != expected) fail(actual, expected, message, '==', assert.equal); -}; - -// 6. The non-equality assertion tests for whether two objects are not equal -// with != assert.notEqual(actual, expected, message_opt); -/** - * Node.js standard [`assert.notEqual`](http://nodejs.org/api/assert.html#assert_assert_notequal_actual_expected_message). - * @static - * @memberOf should - * @category assertion assert - * @param {*} actual - * @param {*} expected - * @param {string} [message] - */ -assert.notEqual = function notEqual(actual, expected, message) { - if(actual == expected) { - fail(actual, expected, message, '!=', assert.notEqual); - } -}; - -// 7. The equivalence assertion tests a deep equality relation. -// assert.deepEqual(actual, expected, message_opt); -/** - * Node.js standard [`assert.deepEqual`](http://nodejs.org/api/assert.html#assert_assert_deepequal_actual_expected_message). - * @static - * @memberOf should - * @category assertion assert - * @param {*} actual - * @param {*} expected - * @param {string} [message] - */ -assert.deepEqual = function deepEqual(actual, expected, message) { - if(!_deepEqual(actual, expected).result) { - fail(actual, expected, message, 'deepEqual', assert.deepEqual); - } -}; - - -// 8. The non-equivalence assertion tests for any deep inequality. -// assert.notDeepEqual(actual, expected, message_opt); -/** - * Node.js standard [`assert.notDeepEqual`](http://nodejs.org/api/assert.html#assert_assert_notdeepequal_actual_expected_message). - * @static - * @memberOf should - * @category assertion assert - * @param {*} actual - * @param {*} expected - * @param {string} [message] - */ -assert.notDeepEqual = function notDeepEqual(actual, expected, message) { - if(_deepEqual(actual, expected).result) { - fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); - } -}; - -// 9. The strict equality assertion tests strict equality, as determined by ===. -// assert.strictEqual(actual, expected, message_opt); -/** - * Node.js standard [`assert.strictEqual`](http://nodejs.org/api/assert.html#assert_assert_strictequal_actual_expected_message). - * @static - * @memberOf should - * @category assertion assert - * @param {*} actual - * @param {*} expected - * @param {string} [message] - */ -assert.strictEqual = function strictEqual(actual, expected, message) { - if(actual !== expected) { - fail(actual, expected, message, '===', assert.strictEqual); - } -}; - -// 10. The strict non-equality assertion tests for strict inequality, as -// determined by !==. assert.notStrictEqual(actual, expected, message_opt); -/** - * Node.js standard [`assert.notStrictEqual`](http://nodejs.org/api/assert.html#assert_assert_notstrictequal_actual_expected_message). - * @static - * @memberOf should - * @category assertion assert - * @param {*} actual - * @param {*} expected - * @param {string} [message] - */ -assert.notStrictEqual = function notStrictEqual(actual, expected, message) { - if(actual === expected) { - fail(actual, expected, message, '!==', assert.notStrictEqual); - } -}; - -function expectedException(actual, expected) { - if(!actual || !expected) { - return false; - } - - if(Object.prototype.toString.call(expected) == '[object RegExp]') { - return expected.test(actual); - } else if(actual instanceof expected) { - return true; - } else if(expected.call({}, actual) === true) { - return true; - } - - return false; -} - -function _throws(shouldThrow, block, expected, message) { - var actual; - - if(typeof expected == 'string') { - message = expected; - expected = null; - } - - try { - block(); - } catch(e) { - actual = e; - } - - message = (expected && expected.name ? ' (' + expected.name + ')' : '.') + - (message ? ' ' + message : '.'); - - if(shouldThrow && !actual) { - fail(actual, expected, 'Missing expected exception' + message); - } - - if(!shouldThrow && expectedException(actual, expected)) { - fail(actual, expected, 'Got unwanted exception' + message); - } - - if((shouldThrow && actual && expected && !expectedException(actual, expected)) || (!shouldThrow && actual)) { - throw actual; - } -} - -// 11. Expected to throw an error: -// assert.throws(block, Error_opt, message_opt); -/** - * Node.js standard [`assert.throws`](http://nodejs.org/api/assert.html#assert_assert_throws_block_error_message). - * @static - * @memberOf should - * @category assertion assert - * @param {Function} block - * @param {Function} [error] - * @param {String} [message] - */ -assert.throws = function(block, /*optional*/error, /*optional*/message) { - _throws.apply(this, [true].concat(pSlice.call(arguments))); -}; - -// EXTENSION! This is annoying to write outside this module. -/** - * Node.js standard [`assert.doesNotThrow`](http://nodejs.org/api/assert.html#assert_assert_doesnotthrow_block_message). - * @static - * @memberOf should - * @category assertion assert - * @param {Function} block - * @param {String} [message] - */ -assert.doesNotThrow = function(block, /*optional*/message) { - _throws.apply(this, [false].concat(pSlice.call(arguments))); -}; - -/** - * Node.js standard [`assert.ifError`](http://nodejs.org/api/assert.html#assert_assert_iferror_value). - * @static - * @memberOf should - * @category assertion assert - * @param {Error} err - */ -assert.ifError = function(err) { - if(err) { - throw err; - } -}; - -},{"./../assertion":3,"should-equal":20}],6:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util') - , assert = require('./_assert') - , AssertionError = require('../assertion-error'); - -module.exports = function(should) { - var i = should.format; - - /* - * Expose assert to should - * - * This allows you to do things like below - * without require()ing the assert module. - * - * should.equal(foo.bar, undefined); - * - */ - util.merge(should, assert); - - /** - * Assert _obj_ exists, with optional message. - * - * @static - * @memberOf should - * @category assertion assert - * @alias should.exists - * @param {*} obj - * @param {String} [msg] - * @example - * - * should.exist(1); - * should.exist(new Date()); - */ - should.exist = should.exists = function(obj, msg) { - if(null == obj) { - throw new AssertionError({ - message: msg || ('expected ' + i(obj) + ' to exist'), stackStartFunction: should.exist - }); - } - }; - - should.not = {}; - /** - * Asserts _obj_ does not exist, with optional message. - * - * @name not.exist - * @static - * @memberOf should - * @category assertion assert - * @alias should.not.exists - * @param {*} obj - * @param {String} [msg] - * @example - * - * should.not.exist(null); - * should.not.exist(void 0); - */ - should.not.exist = should.not.exists = function(obj, msg) { - if(null != obj) { - throw new AssertionError({ - message: msg || ('expected ' + i(obj) + ' to not exist'), stackStartFunction: should.not.exist - }); - } - }; -}; -},{"../assertion-error":2,"../util":18,"./_assert":5}],7:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - /** - * Assert given object is exactly `true`. - * - * @name true - * @memberOf Assertion - * @category assertion bool - * @alias Assertion#True - * @example - * - * (true).should.be.true(); - * false.should.not.be.true(); - * - * ({ a: 10}).should.not.be.true(); - */ - Assertion.add('true', function() { - this.is.exactly(true); - }); - - Assertion.alias('true', 'True'); - - /** - * Assert given object is exactly `false`. - * - * @name false - * @memberOf Assertion - * @category assertion bool - * @alias Assertion#False - * @example - * - * (true).should.not.be.false(); - * false.should.be.false(); - */ - Assertion.add('false', function() { - this.is.exactly(false); - }); - - Assertion.alias('false', 'False'); - - /** - * Assert given object is thuthy according javascript type conversions. - * - * @name ok - * @memberOf Assertion - * @category assertion bool - * @example - * - * (true).should.be.ok(); - * ''.should.not.be.ok(); - * should(null).not.be.ok(); - * should(void 0).not.be.ok(); - * - * (10).should.be.ok(); - * (0).should.not.be.ok(); - */ - Assertion.add('ok', function() { - this.params = { operator: 'to be truthy' }; - - this.assert(this.obj); - }); -}; - -},{}],8:[function(require,module,exports){ -module.exports = function(should, Assertion) { - /** - * Simple chaining. It actually do nothing. - * - * @memberOf Assertion - * @name be - * @property {should.Assertion} be - * @alias Assertion#an - * @alias Assertion#of - * @alias Assertion#a - * @alias Assertion#and - * @alias Assertion#have - * @alias Assertion#has - * @alias Assertion#with - * @alias Assertion#is - * @alias Assertion#which - * @alias Assertion#the - * @alias Assertion#it - * @category assertion chaining - */ - ['an', 'of', 'a', 'and', 'be', 'has', 'have', 'with', 'is', 'which', 'the', 'it'].forEach(function(name) { - Assertion.addChain(name); - }); -}; - -},{}],9:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util'); -var eql = require('should-equal'); - -module.exports = function(should, Assertion) { - var i = should.format; - - /** - * Assert that given object contain something that equal to `other`. It uses `should-equal` for equality checks. - * If given object is array it search that one of elements was equal to `other`. - * If given object is string it checks if `other` is a substring - expected that `other` is a string. - * If given object is Object it checks that `other` is a subobject - expected that `other` is a object. - * - * @name containEql - * @memberOf Assertion - * @category assertion contain - * @param {*} other Nested object - * @example - * - * [1, 2, 3].should.containEql(1); - * [{ a: 1 }, 'a', 10].should.containEql({ a: 1 }); - * - * 'abc'.should.containEql('b'); - * 'ab1c'.should.containEql(1); - * - * ({ a: 10, c: { d: 10 }}).should.containEql({ a: 10 }); - * ({ a: 10, c: { d: 10 }}).should.containEql({ c: { d: 10 }}); - * ({ a: 10, c: { d: 10 }}).should.containEql({ b: 10 }); - * // throws AssertionError: expected { a: 10, c: { d: 10 } } to contain { b: 10 } - * // expected { a: 10, c: { d: 10 } } to have property b - */ - Assertion.add('containEql', function(other) { - this.params = {operator: 'to contain ' + i(other)}; - - this.is.not.null().and.not.undefined(); - - var obj = this.obj; - - if(typeof obj == 'string') { - this.assert(obj.indexOf(String(other)) >= 0); - } else if(util.isIndexable(obj)) { - this.assert(util.some(obj, function(v) { - return eql(v, other).result; - })); - } else { - this.have.properties(other); - } - }); - - /** - * Assert that given object is contain equally structured object on the same depth level. - * If given object is an array and `other` is an array it checks that the eql elements is going in the same sequence in given array (recursive) - * If given object is an object it checks that the same keys contain deep equal values (recursive) - * On other cases it try to check with `.eql` - * - * @name containDeepOrdered - * @memberOf Assertion - * @category assertion contain - * @param {*} other Nested object - * @example - * - * [ 1, 2, 3].should.containDeepOrdered([1, 2]); - * [ 1, 2, [ 1, 2, 3 ]].should.containDeepOrdered([ 1, [ 2, 3 ]]); - * - * ({ a: 10, b: { c: 10, d: [1, 2, 3] }}).should.containDeepOrdered({a: 10}); - * ({ a: 10, b: { c: 10, d: [1, 2, 3] }}).should.containDeepOrdered({b: {c: 10}}); - * ({ a: 10, b: { c: 10, d: [1, 2, 3] }}).should.containDeepOrdered({b: {d: [1, 3]}}); - */ - Assertion.add('containDeepOrdered', function(other) { - this.params = {operator: 'to contain ' + i(other)}; - - var obj = this.obj; - if(typeof obj == 'string') {// expect other to be string - this.is.equal(String(other)); - } else if(util.isIndexable(obj) && util.isIndexable(other)) { - for(var objIdx = 0, otherIdx = 0, objLength = util.length(obj), otherLength = util.length(other); objIdx < objLength && otherIdx < otherLength; objIdx++) { - try { - should(obj[objIdx]).containDeepOrdered(other[otherIdx]); - otherIdx++; - } catch(e) { - if(e instanceof should.AssertionError) { - continue; - } - throw e; - } - } - - this.assert(otherIdx === otherLength); - } else if(obj != null && other != null && typeof obj == 'object' && typeof other == 'object') {// object contains object case - util.forEach(other, function(value, key) { - should(obj[key]).containDeepOrdered(value); - }); - - // if both objects is empty means we finish traversing - and we need to compare for hidden values - if(util.isEmptyObject(other)) { - this.eql(other); - } - } else { - this.eql(other); - } - }); - - /** - * The same like `Assertion#containDeepOrdered` but all checks on arrays without order. - * - * @name containDeep - * @memberOf Assertion - * @category assertion contain - * @param {*} other Nested object - * @example - * - * [ 1, 2, 3].should.containDeep([2, 1]); - * [ 1, 2, [ 1, 2, 3 ]].should.containDeep([ 1, [ 3, 1 ]]); - */ - Assertion.add('containDeep', function(other) { - this.params = {operator: 'to contain ' + i(other)}; - - var obj = this.obj; - if(typeof obj == 'string') {// expect other to be string - this.is.equal(String(other)); - } else if(util.isIndexable(obj) && util.isIndexable(other)) { - var usedKeys = {}; - util.forEach(other, function(otherItem) { - this.assert(util.some(obj, function(item, index) { - if(index in usedKeys) return false; - - try { - should(item).containDeep(otherItem); - usedKeys[index] = true; - return true; - } catch(e) { - if(e instanceof should.AssertionError) { - return false; - } - throw e; - } - })); - }, this); - } else if(obj != null && other != null && typeof obj == 'object' && typeof other == 'object') {// object contains object case - util.forEach(other, function(value, key) { - should(obj[key]).containDeep(value); - }); - - // if both objects is empty means we finish traversing - and we need to compare for hidden values - if(util.isEmptyObject(other)) { - this.eql(other); - } - } else { - this.eql(other); - } - }); - -}; - -},{"../util":18,"should-equal":20}],10:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var eql = require('should-equal'); -var type = require('should-type'); -var util = require('../util'); - -function formatEqlResult(r, a, b) { - return ((r.path.length > 0 ? 'at ' + r.path.map(util.formatProp).join(' -> ') : '') + - (r.a === a ? '' : ', A has ' + util.format(r.a)) + - (r.b === b ? '' : ' and B has ' + util.format(r.b)) + - (r.showReason ? ' because ' + r.reason : '')).trim(); -} - -module.exports = function(should, Assertion) { - - /** - * Deep object equality comparison. For full spec see [`should-equal tests`](https://github.com/shouldjs/equal/blob/master/test.js). - * - * @name eql - * @memberOf Assertion - * @category assertion equality - * @param {*} val Expected value - * @param {string} [description] Optional message - * @example - * - * (10).should.be.eql(10); - * ('10').should.not.be.eql(10); - * (-0).should.not.be.eql(+0); - * - * NaN.should.be.eql(NaN); - * - * ({ a: 10}).should.be.eql({ a: 10 }); - * [ 'a' ].should.not.be.eql({ '0': 'a' }); - */ - Assertion.add('eql', function(val, description) { - this.params = {operator: 'to equal', expected: val, message: description}; - - var result = eql(this.obj, val, should.config); - this.params.details = result.result ? '' : formatEqlResult(result, this.obj, val); - - this.params.showDiff = eql(type(this.obj), type(val)).result; - - this.assert(result.result); - }); - - /** - * Exact comparison using ===. - * - * @name equal - * @memberOf Assertion - * @category assertion equality - * @alias Assertion#exactly - * @param {*} val Expected value - * @param {string} [description] Optional message - * @example - * - * 10.should.be.equal(10); - * 'a'.should.be.exactly('a'); - * - * should(null).be.exactly(null); - */ - Assertion.add('equal', function(val, description) { - this.params = {operator: 'to be', expected: val, message: description}; - - this.params.showDiff = eql(type(this.obj), type(val)).result; - - this.assert(val === this.obj); - }); - - Assertion.alias('equal', 'exactly'); -}; - -},{"../util":18,"should-equal":20,"should-type":23}],11:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ -var util = require('../util'); - -module.exports = function(should, Assertion) { - var i = should.format; - - /** - * Assert given function throws error with such message. - * - * @name throw - * @memberOf Assertion - * @category assertion errors - * @alias Assertion#throwError - * @param {string|RegExp|Function|Object|GeneratorFunction|GeneratorObject} [message] Message to match or properties - * @param {Object} [properties] Optional properties that will be matched to thrown error - * @example - * - * (function(){ throw new Error('fail') }).should.throw(); - * (function(){ throw new Error('fail') }).should.throw('fail'); - * (function(){ throw new Error('fail') }).should.throw(/fail/); - * - * (function(){ throw new Error('fail') }).should.throw(Error); - * var error = new Error(); - * error.a = 10; - * (function(){ throw error; }).should.throw(Error, { a: 10 }); - * (function(){ throw error; }).should.throw({ a: 10 }); - * (function*() { - * yield throwError(); - * }).should.throw(); - */ - Assertion.add('throw', function(message, properties) { - var fn = this.obj - , err = {} - , errorInfo = '' - , thrown = false; - - if(util.isGeneratorFunction(fn)) { - return should(fn()).throw(message, properties); - } else if(util.isGeneratorObject(fn)) { - return should(fn.next.bind(fn)).throw(message, properties); - } - - this.is.a.Function(); - - var errorMatched = true; - - try { - fn(); - } catch(e) { - thrown = true; - err = e; - } - - if(thrown) { - if(message) { - if('string' == typeof message) { - errorMatched = message == err.message; - } else if(message instanceof RegExp) { - errorMatched = message.test(err.message); - } else if('function' == typeof message) { - errorMatched = err instanceof message; - } else if(null != message) { - try { - should(err).match(message); - } catch(e) { - if(e instanceof should.AssertionError) { - errorInfo = ": " + e.message; - errorMatched = false; - } else { - throw e; - } - } - } - - if(!errorMatched) { - if('string' == typeof message || message instanceof RegExp) { - errorInfo = " with a message matching " + i(message) + ", but got '" + err.message + "'"; - } else if('function' == typeof message) { - errorInfo = " of type " + util.functionName(message) + ", but got " + util.functionName(err.constructor); - } - } else if('function' == typeof message && properties) { - try { - should(err).match(properties); - } catch(e) { - if(e instanceof should.AssertionError) { - errorInfo = ": " + e.message; - errorMatched = false; - } else { - throw e; - } - } - } - } else { - errorInfo = " (got " + i(err) + ")"; - } - } - - this.params = { operator: 'to throw exception' + errorInfo }; - - this.assert(thrown); - this.assert(errorMatched); - }); - - Assertion.alias('throw', 'throwError'); -}; - -},{"../util":18}],12:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util'); -var eql = require('should-equal'); - -module.exports = function(should, Assertion) { - var i = should.format; - - /** - * Asserts if given object match `other` object, using some assumptions: - * First object matched if they are equal, - * If `other` is a regexp and given object is a string check on matching with regexp - * If `other` is a regexp and given object is an array check if all elements matched regexp - * If `other` is a regexp and given object is an object check values on matching regexp - * If `other` is a function check if this function throws AssertionError on given object or return false - it will be assumed as not matched - * If `other` is an object check if the same keys matched with above rules - * All other cases failed - * - * @name match - * @memberOf Assertion - * @category assertion matching - * @param {*} other Object to match - * @param {string} [description] Optional message - * @example - * 'foobar'.should.match(/^foo/); - * 'foobar'.should.not.match(/^bar/); - * - * ({ a: 'foo', c: 'barfoo' }).should.match(/foo$/); - * - * ['a', 'b', 'c'].should.match(/[a-z]/); - * - * (5).should.not.match(function(n) { - * return n < 0; - * }); - * (5).should.not.match(function(it) { - * it.should.be.an.Array(); - * }); - * ({ a: 10, b: 'abc', c: { d: 10 }, d: 0 }).should - * .match({ a: 10, b: /c$/, c: function(it) { - * return it.should.have.property('d', 10); - * }}); - * - * [10, 'abc', { d: 10 }, 0].should - * .match({ '0': 10, '1': /c$/, '2': function(it) { - * return it.should.have.property('d', 10); - * }}); - */ - Assertion.add('match', function(other, description) { - this.params = {operator: 'to match ' + i(other), message: description}; - - if(!eql(this.obj, other).result) { - if(other instanceof RegExp) { // something - regex - - if(typeof this.obj == 'string') { - - this.assert(other.exec(this.obj)); - } else if(util.isIndexable(this.obj)) { - util.forEach(this.obj, function(item) { - this.assert(other.exec(item));// should we try to convert to String and exec? - }, this); - } else if(null != this.obj && typeof this.obj == 'object') { - - var notMatchedProps = [], matchedProps = []; - util.forEach(this.obj, function(value, name) { - if(other.exec(value)) matchedProps.push(util.formatProp(name)); - else notMatchedProps.push(util.formatProp(name) + ' (' + i(value) + ')'); - }, this); - - if(notMatchedProps.length) - this.params.operator += '\n not matched properties: ' + notMatchedProps.join(', '); - if(matchedProps.length) - this.params.operator += '\n matched properties: ' + matchedProps.join(', '); - - this.assert(notMatchedProps.length == 0); - } // should we try to convert to String and exec? - } else if(typeof other == 'function') { - var res; - - res = other(this.obj); - - //if(res instanceof Assertion) { - // this.params.operator += '\n ' + res.getMessage(); - //} - - //if we throw exception ok - it is used .should inside - if(typeof res == 'boolean') { - this.assert(res); // if it is just boolean function assert on it - } - } else if(other != null && typeof other == 'object') { // try to match properties (for Object and Array) - notMatchedProps = []; - matchedProps = []; - - util.forEach(other, function(value, key) { - try { - should(this.obj[key]).match(value); - matchedProps.push(util.formatProp(key)); - } catch(e) { - if(e instanceof should.AssertionError) { - notMatchedProps.push(util.formatProp(key) + ' (' + i(this.obj[key]) + ')'); - } else { - throw e; - } - } - }, this); - - if(notMatchedProps.length) - this.params.operator += '\n not matched properties: ' + notMatchedProps.join(', '); - if(matchedProps.length) - this.params.operator += '\n matched properties: ' + matchedProps.join(', '); - - this.assert(notMatchedProps.length == 0); - } else { - this.assert(false); - } - } - }); - - /** - * Asserts if given object values or array elements all match `other` object, using some assumptions: - * First object matched if they are equal, - * If `other` is a regexp - matching with regexp - * If `other` is a function check if this function throws AssertionError on given object or return false - it will be assumed as not matched - * All other cases check if this `other` equal to each element - * - * @name matchEach - * @memberOf Assertion - * @category assertion matching - * @param {*} other Object to match - * @param {string} [description] Optional message - * @example - * [ 'a', 'b', 'c'].should.matchEach(/\w+/); - * [ 'a', 'a', 'a'].should.matchEach('a'); - * - * [ 'a', 'a', 'a'].should.matchEach(function(value) { value.should.be.eql('a') }); - * - * { a: 'a', b: 'a', c: 'a' }.should.matchEach(function(value) { value.should.be.eql('a') }); - */ - Assertion.add('matchEach', function(other, description) { - this.params = {operator: 'to match each ' + i(other), message: description}; - - util.forEach(this.obj, function(value) { - should(value).match(other); - }, this); - }); - - /** - * Asserts if any of given object values or array elements match `other` object, using some assumptions: - * First object matched if they are equal, - * If `other` is a regexp - matching with regexp - * If `other` is a function check if this function throws AssertionError on given object or return false - it will be assumed as not matched - * All other cases check if this `other` equal to each element - * - * @name matchAny - * @memberOf Assertion - * @category assertion matching - * @param {*} other Object to match - * @param {string} [description] Optional message - * @example - * [ 'a', 'b', 'c'].should.matchAny(/\w+/); - * [ 'a', 'b', 'c'].should.matchAny('a'); - * - * [ 'a', 'b', 'c'].should.matchAny(function(value) { value.should.be.eql('a') }); - * - * { a: 'a', b: 'b', c: 'c' }.should.matchAny(function(value) { value.should.be.eql('a') }); - */ - Assertion.add('matchAny', function(other, description) { - this.params = {operator: 'to match any ' + i(other), message: description}; - - this.assert(util.some(this.obj, function(value) { - try { - should(value).match(other); - return true; - } catch(e) { - if(e instanceof should.AssertionError) { - // Caught an AssertionError, return false to the iterator - return false; - } - throw e; - } - })); - }); - - Assertion.alias('matchAny', 'matchSome'); - Assertion.alias('matchEach', 'matchEvery'); -}; - -},{"../util":18,"should-equal":20}],13:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - - /** - * Assert given object is NaN - * @name NaN - * @memberOf Assertion - * @category assertion numbers - * @example - * - * (10).should.not.be.NaN(); - * NaN.should.be.NaN(); - */ - Assertion.add('NaN', function() { - this.params = { operator: 'to be NaN' }; - - this.assert(this.obj !== this.obj); - }); - - /** - * Assert given object is not finite (positive or negative) - * - * @name Infinity - * @memberOf Assertion - * @category assertion numbers - * @example - * - * (10).should.not.be.Infinity(); - * NaN.should.not.be.Infinity(); - */ - Assertion.add('Infinity', function() { - this.params = { operator: 'to be Infinity' }; - - this.is.a.Number() - .and.not.a.NaN() - .and.assert(!isFinite(this.obj)); - }); - - /** - * Assert given number between `start` and `finish` or equal one of them. - * - * @name within - * @memberOf Assertion - * @category assertion numbers - * @param {number} start Start number - * @param {number} finish Finish number - * @param {string} [description] Optional message - * @example - * - * (10).should.be.within(0, 20); - */ - Assertion.add('within', function(start, finish, description) { - this.params = { operator: 'to be within ' + start + '..' + finish, message: description }; - - this.assert(this.obj >= start && this.obj <= finish); - }); - - /** - * Assert given number near some other `value` within `delta` - * - * @name approximately - * @memberOf Assertion - * @category assertion numbers - * @param {number} value Center number - * @param {number} delta Radius - * @param {string} [description] Optional message - * @example - * - * (9.99).should.be.approximately(10, 0.1); - */ - Assertion.add('approximately', function(value, delta, description) { - this.params = { operator: 'to be approximately ' + value + " ±" + delta, message: description }; - - this.assert(Math.abs(this.obj - value) <= delta); - }); - - /** - * Assert given number above `n`. - * - * @name above - * @alias Assertion#greaterThan - * @memberOf Assertion - * @category assertion numbers - * @param {number} n Margin number - * @param {string} [description] Optional message - * @example - * - * (10).should.be.above(0); - */ - Assertion.add('above', function(n, description) { - this.params = { operator: 'to be above ' + n, message: description }; - - this.assert(this.obj > n); - }); - - /** - * Assert given number below `n`. - * - * @name below - * @alias Assertion#lessThan - * @memberOf Assertion - * @category assertion numbers - * @param {number} n Margin number - * @param {string} [description] Optional message - * @example - * - * (0).should.be.above(10); - */ - Assertion.add('below', function(n, description) { - this.params = { operator: 'to be below ' + n, message: description }; - - this.assert(this.obj < n); - }); - - Assertion.alias('above', 'greaterThan'); - Assertion.alias('below', 'lessThan'); - -}; - -},{}],14:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util'); -var eql = require('should-equal'); - -var aSlice = Array.prototype.slice; - -module.exports = function(should, Assertion) { - var i = should.format; - /** - * Asserts given object has some descriptor. **On success it change given object to be value of property**. - * - * @name propertyWithDescriptor - * @memberOf Assertion - * @category assertion property - * @param {string} name Name of property - * @param {Object} desc Descriptor like used in Object.defineProperty (not required to add all properties) - * @example - * - * ({ a: 10 }).should.have.propertyWithDescriptor('a', { enumerable: true }); - */ - Assertion.add('propertyWithDescriptor', function(name, desc) { - this.params = {actual: this.obj, operator: 'to have own property with descriptor ' + i(desc)}; - var obj = this.obj; - this.have.ownProperty(name); - should(Object.getOwnPropertyDescriptor(Object(obj), name)).have.properties(desc); - }); - - function processPropsArgs() { - var args = {}; - if(arguments.length > 1) { - args.names = aSlice.call(arguments); - } else { - var arg = arguments[0]; - if(typeof arg === 'string') { - args.names = [arg]; - } else if(util.isIndexable(arg)) { - args.names = arg; - } else { - args.names = Object.keys(arg); - args.values = arg; - } - } - return args; - } - - - /** - * Asserts given object has enumerable property with optionally value. **On success it change given object to be value of property**. - * - * @name enumerable - * @memberOf Assertion - * @category assertion property - * @param {string} name Name of property - * @param {*} [val] Optional property value to check - * @example - * - * ({ a: 10 }).should.have.enumerable('a'); - */ - Assertion.add('enumerable', function(name, val) { - name = util.convertPropertyName(name); - - this.params = { - operator: "to have enumerable property " + util.formatProp(name) + (arguments.length > 1 ? " equal to " + i(val): "") - }; - - var desc = { enumerable: true }; - if(arguments.length > 1) desc.value = val; - this.have.propertyWithDescriptor(name, desc); - }); - - /** - * Asserts given object has enumerable properties - * - * @name enumerables - * @memberOf Assertion - * @category assertion property - * @param {Array|...string|Object} names Names of property - * @example - * - * ({ a: 10, b: 10 }).should.have.enumerables('a'); - */ - Assertion.add('enumerables', function(names) { - var args = processPropsArgs.apply(null, arguments); - - this.params = { - operator: "to have enumerables " + args.names.map(util.formatProp) - }; - - var obj = this.obj; - args.names.forEach(function(name) { - should(obj).have.enumerable(name); - }); - }); - - /** - * Asserts given object has property with optionally value. **On success it change given object to be value of property**. - * - * @name property - * @memberOf Assertion - * @category assertion property - * @param {string} name Name of property - * @param {*} [val] Optional property value to check - * @example - * - * ({ a: 10 }).should.have.property('a'); - */ - Assertion.add('property', function(name, val) { - name = util.convertPropertyName(name); - if(arguments.length > 1) { - var p = {}; - p[name] = val; - this.have.properties(p); - } else { - this.have.properties(name); - } - this.obj = this.obj[name]; - }); - - /** - * Asserts given object has properties. On this method affect .any modifier, which allow to check not all properties. - * - * @name properties - * @memberOf Assertion - * @category assertion property - * @param {Array|...string|Object} names Names of property - * @example - * - * ({ a: 10 }).should.have.properties('a'); - * ({ a: 10, b: 20 }).should.have.properties([ 'a' ]); - * ({ a: 10, b: 20 }).should.have.properties({ b: 20 }); - */ - Assertion.add('properties', function(names) { - var values = {}; - if(arguments.length > 1) { - names = aSlice.call(arguments); - } else if(!Array.isArray(names)) { - if(typeof names == 'string' || typeof names == 'symbol') { - names = [names]; - } else { - values = names; - names = Object.keys(names); - } - } - - var obj = Object(this.obj), missingProperties = []; - - //just enumerate properties and check if they all present - names.forEach(function(name) { - if(!(name in obj)) missingProperties.push(util.formatProp(name)); - }); - - var props = missingProperties; - if(props.length === 0) { - props = names.map(util.formatProp); - } else if(this.anyOne) { - props = names.filter(function(name) { - return missingProperties.indexOf(util.formatProp(name)) < 0; - }).map(util.formatProp); - } - - var operator = (props.length === 1 ? - 'to have property ' : 'to have ' + (this.anyOne ? 'any of ' : '') + 'properties ') + props.join(', '); - - this.params = {obj: this.obj, operator: operator}; - - //check that all properties presented - //or if we request one of them that at least one them presented - this.assert(missingProperties.length === 0 || (this.anyOne && missingProperties.length != names.length)); - - // check if values in object matched expected - var valueCheckNames = Object.keys(values); - if(valueCheckNames.length) { - var wrongValues = []; - props = []; - - // now check values, as there we have all properties - valueCheckNames.forEach(function(name) { - var value = values[name]; - if(!eql(obj[name], value).result) { - wrongValues.push(util.formatProp(name) + ' of ' + i(value) + ' (got ' + i(obj[name]) + ')'); - } else { - props.push(util.formatProp(name) + ' of ' + i(value)); - } - }); - - if((wrongValues.length !== 0 && !this.anyOne) || (this.anyOne && props.length === 0)) { - props = wrongValues; - } - - operator = (props.length === 1 ? - 'to have property ' : 'to have ' + (this.anyOne ? 'any of ' : '') + 'properties ') + props.join(', '); - - this.params = {obj: this.obj, operator: operator}; - - //if there is no not matched values - //or there is at least one matched - this.assert(wrongValues.length === 0 || (this.anyOne && wrongValues.length != valueCheckNames.length)); - } - }); - - /** - * Asserts given object has property `length` with given value `n` - * - * @name length - * @alias Assertion#lengthOf - * @memberOf Assertion - * @category assertion property - * @param {number} n Expected length - * @param {string} [description] Optional message - * @example - * - * [1, 2].should.have.length(2); - */ - Assertion.add('length', function(n, description) { - this.have.property('length', n, description); - }); - - Assertion.alias('length', 'lengthOf'); - - var hasOwnProperty = Object.prototype.hasOwnProperty; - - /** - * Asserts given object has own property. **On success it change given object to be value of property**. - * - * @name ownProperty - * @alias Assertion#hasOwnProperty - * @memberOf Assertion - * @category assertion property - * @param {string} name Name of property - * @param {string} [description] Optional message - * @example - * - * ({ a: 10 }).should.have.ownProperty('a'); - */ - Assertion.add('ownProperty', function(name, description) { - name = util.convertPropertyName(name); - this.params = { - actual: this.obj, - operator: 'to have own property ' + util.formatProp(name), - message: description - }; - - this.assert(hasOwnProperty.call(this.obj, name)); - - this.obj = this.obj[name]; - }); - - Assertion.alias('ownProperty', 'hasOwnProperty'); - - /** - * Asserts given object is empty. For strings, arrays and arguments it checks .length property, for objects it checks keys. - * - * @name empty - * @memberOf Assertion - * @category assertion property - * @example - * - * ''.should.be.empty(); - * [].should.be.empty(); - * ({}).should.be.empty(); - */ - Assertion.add('empty', function() { - this.params = {operator: 'to be empty'}; - - if(util.length(this.obj) !== void 0) { - should(this.obj).have.property('length', 0); - } else { - var obj = Object(this.obj); // wrap to reference for booleans and numbers - for(var prop in obj) { - should(this.obj).not.have.ownProperty(prop); - } - } - }, true); - - /** - * Asserts given object has exact keys. Compared to `properties`, `keys` does not accept Object as a argument. - * - * @name keys - * @alias Assertion#key - * @memberOf Assertion - * @category assertion property - * @param {Array|...string} [keys] Keys to check - * @example - * - * ({ a: 10 }).should.have.keys('a'); - * ({ a: 10, b: 20 }).should.have.keys('a', 'b'); - * ({ a: 10, b: 20 }).should.have.keys([ 'a', 'b' ]); - * ({}).should.have.keys(); - */ - Assertion.add('keys', function(keys) { - if(arguments.length > 1) keys = aSlice.call(arguments); - else if(arguments.length === 1 && typeof keys === 'string') keys = [keys]; - else if(arguments.length === 0) keys = []; - - keys = keys.map(String); - - var obj = Object(this.obj); - - // first check if some keys are missing - var missingKeys = []; - keys.forEach(function(key) { - if(!hasOwnProperty.call(this.obj, key)) - missingKeys.push(util.formatProp(key)); - }, this); - - // second check for extra keys - var extraKeys = []; - Object.keys(obj).forEach(function(key) { - if(keys.indexOf(key) < 0) { - extraKeys.push(util.formatProp(key)); - } - }); - - var verb = keys.length === 0 ? 'to be empty' : - 'to have ' + (keys.length === 1 ? 'key ' : 'keys '); - - this.params = {operator: verb + keys.map(util.formatProp).join(', ')}; - - if(missingKeys.length > 0) - this.params.operator += '\n\tmissing keys: ' + missingKeys.join(', '); - - if(extraKeys.length > 0) - this.params.operator += '\n\textra keys: ' + extraKeys.join(', '); - - this.assert(missingKeys.length === 0 && extraKeys.length === 0); - }); - - Assertion.alias("keys", "key"); - - /** - * Asserts given object has nested property in depth by path. **On success it change given object to be value of final property**. - * - * @name propertyByPath - * @memberOf Assertion - * @category assertion property - * @param {Array|...string} properties Properties path to search - * @example - * - * ({ a: {b: 10}}).should.have.propertyByPath('a', 'b').eql(10); - */ - Assertion.add('propertyByPath', function(properties) { - if(arguments.length > 1) properties = aSlice.call(arguments); - else if(arguments.length === 1 && typeof properties == 'string') properties = [properties]; - else if(arguments.length === 0) properties = []; - - var allProps = properties.map(util.formatProp); - - properties = properties.map(String); - - var obj = should(Object(this.obj)); - - var foundProperties = []; - - var currentProperty; - while(currentProperty = properties.shift()) { - this.params = {operator: 'to have property by path ' + allProps.join(', ') + ' - failed on ' + util.formatProp(currentProperty)}; - obj = obj.have.property(currentProperty); - foundProperties.push(currentProperty); - } - - this.params = {obj: this.obj, operator: 'to have property by path ' + allProps.join(', ')}; - - this.obj = obj.obj; - }); -}; - -},{"../util":18,"should-equal":20}],15:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - /** - * Assert given string starts with prefix - * @name startWith - * @memberOf Assertion - * @category assertion strings - * @param {string} str Prefix - * @param {string} [description] Optional message - * @example - * - * 'abc'.should.startWith('a'); - */ - Assertion.add('startWith', function(str, description) { - this.params = { operator: 'to start with ' + should.format(str), message: description }; - - this.assert(0 === this.obj.indexOf(str)); - }); - - /** - * Assert given string starts with prefix - * @name endWith - * @memberOf Assertion - * @category assertion strings - * @param {string} str Prefix - * @param {string} [description] Optional message - * @example - * - * 'abca'.should.endWith('a'); - */ - Assertion.add('endWith', function(str, description) { - this.params = { operator: 'to end with ' + should.format(str), message: description }; - - this.assert(this.obj.indexOf(str, this.obj.length - str.length) >= 0); - }); -}; - -},{}],16:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util'); - -module.exports = function(should, Assertion) { - /** - * Assert given object is number - * @name Number - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('Number', function() { - this.params = {operator: 'to be a number'}; - - this.have.type('number'); - }); - - /** - * Assert given object is arguments - * @name arguments - * @alias Assertion#Arguments - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('arguments', function() { - this.params = {operator: 'to be arguments'}; - - this.have.class('Arguments'); - }); - - Assertion.alias('arguments', 'Arguments'); - - /** - * Assert given object has some type using `typeof` - * @name type - * @memberOf Assertion - * @param {string} type Type name - * @param {string} [description] Optional message - * @category assertion types - */ - Assertion.add('type', function(type, description) { - this.params = {operator: 'to have type ' + type, message: description}; - - should(typeof this.obj).be.exactly(type); - }); - - /** - * Assert given object is instance of `constructor` - * @name instanceof - * @alias Assertion#instanceOf - * @memberOf Assertion - * @param {Function} constructor Constructor function - * @param {string} [description] Optional message - * @category assertion types - */ - Assertion.add('instanceof', function(constructor, description) { - this.params = {operator: 'to be an instance of ' + util.functionName(constructor), message: description}; - - this.assert(Object(this.obj) instanceof constructor); - }); - - Assertion.alias('instanceof', 'instanceOf'); - - /** - * Assert given object is function - * @name Function - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('Function', function() { - this.params = {operator: 'to be a function'}; - - this.have.type('function'); - }); - - /** - * Assert given object is object - * @name Object - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('Object', function() { - this.params = {operator: 'to be an object'}; - - this.is.not.null().and.have.type('object'); - }); - - /** - * Assert given object is string - * @name String - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('String', function() { - this.params = {operator: 'to be a string'}; - - this.have.type('string'); - }); - - /** - * Assert given object is array - * @name Array - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('Array', function() { - this.params = {operator: 'to be an array'}; - - this.have.class('Array'); - }); - - /** - * Assert given object is boolean - * @name Boolean - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('Boolean', function() { - this.params = {operator: 'to be a boolean'}; - - this.have.type('boolean'); - }); - - /** - * Assert given object is error - * @name Error - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('Error', function() { - this.params = {operator: 'to be an error'}; - - this.have.instanceOf(Error); - }); - - /** - * Assert given object is null - * @name null - * @alias Assertion#Null - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('null', function() { - this.params = {operator: 'to be null'}; - - this.assert(this.obj === null); - }); - - Assertion.alias('null', 'Null'); - - /** - * Assert given object has some internal [[Class]], via Object.prototype.toString call - * @name class - * @alias Assertion#Class - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('class', function(cls) { - this.params = {operator: 'to have [[Class]] ' + cls}; - - this.assert(Object.prototype.toString.call(this.obj) === '[object ' + cls + ']'); - }); - - Assertion.alias('class', 'Class'); - - /** - * Assert given object is undefined - * @name undefined - * @alias Assertion#Undefined - * @memberOf Assertion - * @category assertion types - */ - Assertion.add('undefined', function() { - this.params = {operator: 'to be undefined'}; - - this.assert(this.obj === void 0); - }); - - Assertion.alias('undefined', 'Undefined'); - - /** - * Assert given object supports es6 iterable protocol (just check - * that object has property Symbol.iterator, which is a function) - * @name iterable - * @memberOf Assertion - * @category assertion es6 - */ - Assertion.add('iterable', function() { - this.params = {operator: 'to be iterable'}; - - should(this.obj).have.property(Symbol.iterator).which.is.a.Function(); - }); - - /** - * Assert given object supports es6 iterator protocol (just check - * that object has property next, which is a function) - * @name iterator - * @memberOf Assertion - * @category assertion es6 - */ - Assertion.add('iterator', function() { - this.params = {operator: 'to be iterator'}; - - should(this.obj).have.property('next').which.is.a.Function(); - }); - - /** - * Assert given object is a generator object - * @name generator - * @memberOf Assertion - * @category assertion es6 - */ - Assertion.add('generator', function() { - this.params = {operator: 'to be generator'}; - - should(this.obj).be.iterable - .and.iterator - .and.it.is.equal(this.obj[Symbol.iterator]()); - }); -}; - -},{"../util":18}],17:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - - -var util = require('./util'); - -/** - * Our function should - * - * @param {*} obj Object to assert - * @returns {should.Assertion} Returns new Assertion for beginning assertion chain - * @example - * - * var should = require('should'); - * should('abc').be.a.String(); - */ -var should = function should(obj) { - return (new should.Assertion(obj)); -}; - -should.AssertionError = require('./assertion-error'); -should.Assertion = require('./assertion'); - -should.format = util.format; -should.type = require('should-type'); -should.util = util; - -/** - * Object with configuration. - * It contains such properties: - * * `checkProtoEql` boolean - Affect if `.eql` will check objects prototypes - * Also it can contain options for should-format. - * - * @type {Object} - * @memberOf should - * @static - * @example - * - * var a = { a: 10 }, b = Object.create(null); - * b.a = 10; - * - * a.should.be.eql(b); - * //not throws - * - * should.config.checkProtoEql = true; - * a.should.be.eql(b); - * //throws AssertionError: expected { a: 10 } to equal { a: 10 } (because A and B have different prototypes) - */ -should.config = require('./config'); - -//Expose should to external world. -exports = module.exports = should; - -/** - * Allow to extend given prototype with should property using given name. This getter will **unwrap** all standard wrappers like `Number`, `Boolean`, `String`. - * Using `should(obj)` is the equivalent of using `obj.should` with known issues (like nulls and method calls etc). - * - * @param {string} [propertyName] Name of property to add. Default is `'should'`. - * @param {Object} [proto] Prototype to extend with. Default is `Object.prototype`. - * @memberOf should - * @returns {{ name: string, descriptor: Object, proto: Object }} Descriptor enough to return all back - * @static - * @example - * - * var prev = should.extend('must', Object.prototype); - * - * 'abc'.must.startWith('a'); - * - * var should = should.noConflict(prev); - * should.not.exist(Object.prototype.must); - */ -should.extend = function(propertyName, proto) { - propertyName = propertyName || 'should'; - proto = proto || Object.prototype; - - var prevDescriptor = Object.getOwnPropertyDescriptor(proto, propertyName); - - Object.defineProperty(proto, propertyName, { - set: function() { - }, - get: function() { - return should(util.isWrapperType(this) ? this.valueOf() : this); - }, - configurable: true - }); - - return { name: propertyName, descriptor: prevDescriptor, proto: proto }; -}; - -/** - * Delete previous extension. If `desc` missing it will remove default extension. - * - * @param {{ name: string, descriptor: Object, proto: Object }} [desc] Returned from `should.extend` object - * @memberOf should - * @returns {Function} Returns should function - * @static - * @example - * - * var should = require('should').noConflict(); - * - * should(Object.prototype).not.have.property('should'); - * - * var prev = should.extend('must', Object.prototype); - * 'abc'.must.startWith('a'); - * should.noConflict(prev); - * - * should(Object.prototype).not.have.property('must'); - */ -should.noConflict = function(desc) { - desc = desc || should._prevShould; - - if(desc) { - delete desc.proto[desc.name]; - - if(desc.descriptor) { - Object.defineProperty(desc.proto, desc.name, desc.descriptor); - } - } - return should; -}; - -/** - * Simple utility function for a bit more easier should assertion extension - * @param {Function} f So called plugin function. It should accept 2 arguments: `should` function and `Assertion` constructor - * @memberOf should - * @returns {Function} Returns `should` function - * @static - * @example - * - * should.use(function(should, Assertion) { - * Assertion.add('asset', function() { - * this.params = { operator: 'to be asset' }; - * - * this.obj.should.have.property('id').which.is.a.Number(); - * this.obj.should.have.property('path'); - * }) - * }) - */ -should.use = function(f) { - f(should, should.Assertion); - return this; -}; - -should - .use(require('./ext/assert')) - .use(require('./ext/chain')) - .use(require('./ext/bool')) - .use(require('./ext/number')) - .use(require('./ext/eql')) - .use(require('./ext/type')) - .use(require('./ext/string')) - .use(require('./ext/property')) - .use(require('./ext/error')) - .use(require('./ext/match')) - .use(require('./ext/contain')); - -},{"./assertion":3,"./assertion-error":2,"./config":4,"./ext/assert":6,"./ext/bool":7,"./ext/chain":8,"./ext/contain":9,"./ext/eql":10,"./ext/error":11,"./ext/match":12,"./ext/number":13,"./ext/property":14,"./ext/string":15,"./ext/type":16,"./util":18,"should-type":23}],18:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var type = require('should-type'); -var config = require('./config'); - -/** - * Check if given obj just a primitive type wrapper - * @param {Object} obj - * @returns {boolean} - * @private - */ -exports.isWrapperType = function(obj) { - return obj instanceof Number || obj instanceof String || obj instanceof Boolean; -}; - -exports.merge = function(a, b) { - if(a && b) { - for(var key in b) { - a[key] = b[key]; - } - } - return a; -}; - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -exports.forEach = function forEach(obj, f, context) { - if(exports.isGeneratorFunction(obj)) { - return forEach(obj(), f, context); - } else if (exports.isGeneratorObject(obj)) { - var value = obj.next(); - while(!value.done) { - if(f.call(context, value.value, 'value', obj) === false) - return; - value = obj.next(); - } - } else { - for(var prop in obj) { - if(hasOwnProperty.call(obj, prop)) { - if(f.call(context, obj[prop], prop, obj) === false) - return; - } - } - } -}; - -exports.some = function(obj, f, context) { - var res = false; - exports.forEach(obj, function(value, key) { - if(f.call(context, value, key, obj)) { - res = true; - return false; - } - }, context); - return res; -}; - -exports.isEmptyObject = function(obj) { - for(var prop in obj) { - if(hasOwnProperty.call(obj, prop)) { - return false; - } - } - return true; -}; - -exports.isIndexable = function(obj) { - var t = type(obj); - return (t.type === type.OBJECT && t.cls === type.ARRAY) || - (t.type === type.OBJECT && t.cls === type.BUFFER) || - (t.type === type.OBJECT && t.cls === type.ARGUMENTS) || - (t.type === type.OBJECT && t.cls === type.ARRAY_BUFFER) || - (t.type === type.OBJECT && t.cls === type.TYPED_ARRAY) || - (t.type === type.OBJECT && t.cls === type.DATA_VIEW) || - (t.type === type.OBJECT && t.cls === type.STRING) || - (t.type === type.STRING); -}; - -exports.length = function(obj) { - var t = type(obj); - switch(t.type) { - case type.STRING: - return obj.length; - case type.OBJECT: - switch(t.cls) { - case type.ARRAY_BUFFER: - case type.TYPED_ARRAY: - case type.DATA_VIEW: - return obj.byteLength; - - case type.ARRAY: - case type.BUFFER: - case type.ARGUMENTS: - case type.FUNCTION: - return obj.length; - } - } -}; - -exports.convertPropertyName = function(name) { - if(typeof name == 'symbol') { - return name; - } else { - return String(name); - } -}; - -exports.isGeneratorObject = function(obj) { - if(!obj) return false; - - return typeof obj.next == 'function' && - typeof obj[Symbol.iterator] == 'function' && - obj[Symbol.iterator]() === obj; -}; - -//TODO find better way -exports.isGeneratorFunction = function(f) { - if(typeof f != 'function') return false; - - return /^function\s*\*\s*/.test(f.toString()); -}; - -exports.format = function(value, opts) { - return config.getFormatter(opts).format(value); -}; - -exports.functionName = require('should-format').Formatter.functionName; - -exports.formatProp = function(value) { - return config.getFormatter().formatPropertyName(String(value)); -}; - -},{"./config":4,"should-format":21,"should-type":23}],19:[function(require,module,exports){ -module.exports = function format(msg) { - var args = arguments; - for(var i = 1, l = args.length; i < l; i++) { - msg = msg.replace(/%s/, args[i]); - } - return msg; -} - -},{}],20:[function(require,module,exports){ -var getType = require('should-type'); -var format = require('./format'); -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function makeResult(r, path, reason, a, b) { - var o = {result: r}; - if(!r) { - o.path = path; - o.reason = reason; - o.a = a; - o.b = b; - } - return o; -} - -var EQUALS = makeResult(true); - -function typeToString(t) { - return t.type + (t.cls ? '(' + t.cls + (t.sub ? ' ' + t.sub : '') + ')' : ''); -} - - - -var REASON = { - PLUS_0_AND_MINUS_0: '+0 is not equal to -0', - DIFFERENT_TYPES: 'A has type %s and B has type %s', - NAN_NUMBER: 'NaN is not equal to any number', - EQUALITY: 'A is not equal to B', - EQUALITY_PROTOTYPE: 'A and B have different prototypes', - WRAPPED_VALUE: 'A wrapped value is not equal to B wrapped value', - FUNCTION_SOURCES: 'function A is not equal to B by source code value (via .toString call)', - MISSING_KEY: '%s has no key %s', - CIRCULAR_VALUES: 'A has circular reference that was visited not in the same time as B', - SET_MAP_MISSING_KEY: 'Set/Map missing key', - MAP_VALUE_EQUALITY: 'Values of the same key in A and B is not equal' -}; - -function eqInternal(a, b, opts, stackA, stackB, path) { - var r = EQUALS; - - function result(comparison, reason) { - return makeResult(comparison, path, reason, a, b); - } - - function checkPropertyEquality(property) { - return eqInternal(a[property], b[property], opts, stackA, stackB, path.concat([property])); - } - - - // equal a and b exit early - if(a === b) { - // check for +0 !== -0; - return result(a !== 0 || (1 / a == 1 / b), REASON.PLUS_0_AND_MINUS_0); - } - - var l, p; - - var typeA = getType(a), - typeB = getType(b); - - // if objects has different types they are not equals - var typeDifferents = typeA.type !== typeB.type || typeA.cls !== typeB.cls; - - if(typeDifferents || ((opts.checkSubType && typeA.sub !== typeB.sub) || !opts.checkSubType)) { - return result(false, format(REASON.DIFFERENT_TYPES, typeToString(typeA), typeToString(typeB))); - } - - //early checks for types - switch(typeA.type) { - case 'number': - // NaN !== NaN - return (a !== a) ? result(b !== b, REASON.NAN_NUMBER) - // but treat `+0` vs. `-0` as not equal - : (a === 0 ? result(1 / a === 1 / b, REASON.PLUS_0_AND_MINUS_0) : result(a === b, REASON.EQUALITY)); - - case 'boolean': - case 'string': - return result(a === b, REASON.EQUALITY); - - case 'function': - var fA = a.toString(), fB = b.toString(); - r = eqInternal(fA, fB, opts, stackA, stackB, path); - if(!r.result) { - r.reason = REASON.FUNCTION_SOURCES; - return r; - } - - break;//check user properties - - case 'object': - // additional checks for object instances - switch(typeA.cls) { - // check regexp flags - // TODO add es6 flags - case 'regexp': - p = ['source', 'global', 'multiline', 'lastIndex', 'ignoreCase']; - while(p.length) { - r = checkPropertyEquality(p.shift()); - if(!r.result) return r; - } - break;//check user properties - - //check by timestamp only - case 'date': - if(+a !== +b) { - return result(false, REASON.EQUALITY); - } - break;//check user properties - - //primitive type wrappers - case 'number': - case 'boolean': - case 'string': - r = eqInternal(a.valueOf(), b.valueOf(), opts, stackA, stackB, path); - if(!r.result) { - r.reason = REASON.WRAPPED_VALUE; - return r; - } - break;//check user properties - - //node buffer - case 'buffer': - //if length different it is obviously different - r = checkPropertyEquality('length'); - if(!r.result) return r; - - l = a.length; - while(l--) { - r = checkPropertyEquality(l); - if(!r.result) return r; - } - - //we do not check for user properties because - //node Buffer have some strange hidden properties - return EQUALS; - - case 'error': - //check defined properties - p = ['name', 'message']; - while(p.length) { - r = checkPropertyEquality(p.shift()); - if(!r.result) return r; - } - - break;//check user properties - - case 'array': - case 'arguments': - case 'typed-array': - r = checkPropertyEquality('length'); - if(!r.result) return r; - - break;//check user properties - - case 'array-buffer': - r = checkPropertyEquality('byteLength'); - if(!r.result) return r; - - break;//check user properties - - case 'map': - case 'set': - r = checkPropertyEquality('size'); - if(!r.result) return r; - - stackA.push(a); - stackB.push(b); - - var itA = a.entries(); - var nextA = itA.next(); - - while(!nextA.done) { - var key = nextA.value[0]; - //first check for primitive key if we can do light check - //using .has and .get - if(getType(key).type != 'object') { - if(b.has(key)) { - if(typeA.cls == 'map') { - //for map we also check its value to be equal - var value = b.get(key); - r = eqInternal(nextA.value[1], value, opts, stackA, stackB, path); - if(!r.result) { - r.a = nextA.value; - r.b = value; - r.reason = REASON.MAP_VALUE_EQUALITY; - - break; - } - } - - } else { - r = result(false, REASON.SET_MAP_MISSING_KEY); - r.a = key; - r.b = key; - - break; - } - } else { - //heavy check - //we search by iterator for key equality using equal - var itB = b.entries(); - var nextB = itB.next(); - - while(!nextB.done) { - //first check for keys - r = eqInternal(nextA.value[0], nextB.value[0], opts, stackA, stackB, path); - - if(!r.result) { - r.reason = REASON.SET_MAP_MISSING_KEY; - r.a = key; - r.b = key; - } else { - if(typeA.cls == 'map') { - r = eqInternal(nextA.value[1], nextB.value[1], opts, stackA, stackB, path); - - if(!r.result) { - r.a = nextA.value; - r.b = nextB.value; - r.reason = REASON.MAP_VALUE_EQUALITY; - } - } - - break; - } - - nextB = itB.next(); - } - } - - if(!r.result) { - break; - } - - nextA = itA.next(); - } - - stackA.pop(); - stackB.pop(); - - if(!r.result) { - r.reason = REASON.SET_MAP_MISSING_ENTRY; - return r; - } - - break; //check user properties - } - } - - // compare deep objects and arrays - // stacks contain references only - // - - l = stackA.length; - while(l--) { - if(stackA[l] == a) { - return result(stackB[l] == b, REASON.CIRCULAR_VALUES); - } - } - - // add `a` and `b` to the stack of traversed objects - stackA.push(a); - stackB.push(b); - - var key; - - for(key in b) { - if(hasOwnProperty.call(b, key)) { - r = result(hasOwnProperty.call(a, key), format(REASON.MISSING_KEY, 'A', key)); - if(!r.result) { - break; - } - - if(r.result) { - r = checkPropertyEquality(key); - if(!r.result) { - break; - } - } - } - } - - if(r.result) { - // ensure both objects have the same number of properties - for(key in a) { - if(hasOwnProperty.call(a, key)) { - r = result(hasOwnProperty.call(b, key), format(REASON.MISSING_KEY, 'B', key)); - if(!r.result) { - return r; - } - } - } - } - - stackA.pop(); - stackB.pop(); - - if(!r.result) return r; - - var prototypesEquals = false, canComparePrototypes = false; - - if(opts.checkProtoEql) { - if(Object.getPrototypeOf) {//TODO should i check prototypes for === or use eq? - prototypesEquals = Object.getPrototypeOf(a) === Object.getPrototypeOf(b); - canComparePrototypes = true; - } else if(a.__proto__ && b.__proto__) { - prototypesEquals = a.__proto__ === b.__proto__; - canComparePrototypes = true; - } - - if(canComparePrototypes && !prototypesEquals) { - r = result(prototypesEquals, REASON.EQUALITY_PROTOTYPE); - r.showReason = true; - if(!r.result) { - return r; - } - } - } - - return EQUALS; -} - -var defaultOptions = { - checkProtoEql: true, - checkSubType: true -}; - -function eq(a, b, opts) { - opts = opts || {}; - if(typeof opts.checkProtoEql !== 'boolean') - opts.checkProtoEql = defaultOptions.checkProtoEql; - if(typeof opts.checkSubType !== 'boolean') - opts.checkSubType = defaultOptions.checkSubType; - - var r = eqInternal(a, b, opts, [], [], []); - return r; -} - -module.exports = eq; - -eq.r = REASON; - -},{"./format":19,"should-type":23}],21:[function(require,module,exports){ -var getType = require('should-type'); -var util = require('./util'); - -function genKeysFunc(f) { - return function(value) { - var k = f(value); - k.sort(); - return k; - }; -} - - -function Formatter(opts) { - opts = opts || {}; - - this.seen = []; - this.keys = genKeysFunc(opts.keys === false ? Object.getOwnPropertyNames : Object.keys); - - this.maxLineLength = typeof opts.maxLineLength === 'number' ? opts.maxLineLength : 60; - this.propSep = opts.propSep || ','; - - this.isUTCdate = !!opts.isUTCdate; -} - -Formatter.prototype = { - constructor: Formatter, - - format: function(value) { - var t = getType(value); - var name1 = t.type, name2 = t.type; - if(t.cls) { - name1 += '_' + t.cls; - name2 += '_' + t.cls; - } - if(t.sub) { - name2 += '_' + t.sub; - } - var f = this['_format_' + name2] || this['_format_' + name1] || this['_format_' + t.type] || this.defaultFormat; - return f.call(this, value).trim(); - }, - - _formatObject: function(value, opts) { - opts = opts || {}; - var mainKeys = opts.keys || this.keys(value); - - var len = 0; - - var formatPropertyValue = opts.formatPropertyValue || this.formatPropertyValue; - var formatPropertyName = opts.formatPropertyName || this.formatPropertyName; - var keyValueSep = opts.keyValueSep || ': '; - var keyFilter = opts.keyFilter || function() { return true; }; - - this.seen.push(value); - var keys = []; - - mainKeys.forEach(function(key) { - if(!keyFilter(key)) return; - - var fName = formatPropertyName.call(this, key); - - var f = (fName ? fName + keyValueSep : '') + formatPropertyValue.call(this, value, key); - len += f.length; - keys.push(f); - }, this); - this.seen.pop(); - - (opts.additionalProperties || []).forEach(function(keyValue) { - var f = keyValue[0] + keyValueSep + this.format(keyValue[1]); - len += f.length; - keys.push(f); - }, this); - - var prefix = opts.prefix || Formatter.constructorName(value) || ''; - if(prefix.length > 0) prefix += ' '; - - var lbracket, rbracket; - if(Array.isArray(opts.brackets)) { - lbracket = opts.brackets && opts.brackets[0]; - rbracket = opts.brackets && opts.brackets[1]; - } else { - lbracket = '{'; - rbracket = '}'; - } - - var rootValue = opts.value || ''; - - if(keys.length === 0) - return rootValue || (prefix + lbracket + rbracket); - - if(len <= this.maxLineLength) { - return prefix + lbracket + ' ' + (rootValue ? rootValue + ' ' : '') + keys.join(this.propSep + ' ') + ' ' + rbracket; - } else { - return prefix + lbracket + '\n' + (rootValue ? ' ' + rootValue + '\n' : '') + keys.map(util.addSpaces).join(this.propSep + '\n') + '\n' + rbracket; - } - }, - - formatObject: function(value, prefix, props) { - props = props || this.keys(value); - - var len = 0; - - this.seen.push(value); - props = props.map(function(prop) { - var f = this.formatProperty(value, prop); - len += f.length; - return f; - }, this); - this.seen.pop(); - - if(props.length === 0) return '{}'; - - if(len <= this.maxLineLength) { - return '{ ' + (prefix ? prefix + ' ' : '') + props.join(this.propSep + ' ') + ' }'; - } else { - return '{' + '\n' + (prefix ? ' ' + prefix + '\n' : '') + props.map(util.addSpaces).join(this.propSep + '\n') + '\n' + '}'; - } - }, - - formatPropertyName: function(name) { - return name.match(/^[a-zA-Z_$][a-zA-Z_$0-9]*$/) ? name : this.format(name); - }, - - formatProperty: function(value, prop) { - var desc = Formatter.getPropertyDescriptor(value, prop); - - var propName = this.formatPropertyName(prop); - - var propValue = desc.get && desc.set ? - '[Getter/Setter]' : desc.get ? - '[Getter]' : desc.set ? - '[Setter]' : this.seen.indexOf(desc.value) >= 0 ? - '[Circular]' : - this.format(desc.value); - - return propName + ': ' + propValue; - }, - - formatPropertyValue: function(value, prop) { - var desc = Formatter.getPropertyDescriptor(value, prop); - - var propValue = desc.get && desc.set ? - '[Getter/Setter]' : desc.get ? - '[Getter]' : desc.set ? - '[Setter]' : this.seen.indexOf(desc.value) >= 0 ? - '[Circular]' : - this.format(desc.value); - - return propValue; - } -}; - -Formatter.add = function add(type, cls, sub, f) { - var args = Array.prototype.slice.call(arguments); - f = args.pop(); - Formatter.prototype['_format_' + args.join('_')] = f; -}; - -Formatter.formatObjectWithPrefix = function formatObjectWithPrefix(f) { - return function(value) { - var prefix = f.call(this, value); - var props = this.keys(value); - if(props.length == 0) return prefix; - else return this.formatObject(value, prefix, props); - }; -}; - -var functionNameRE = /^\s*function\s*(\S*)\s*\(/; - -Formatter.functionName = function functionName(f) { - if(f.name) { - return f.name; - } - var name = f.toString().match(functionNameRE)[1]; - return name; -}; - -Formatter.constructorName = function(obj) { - while (obj) { - var descriptor = Object.getOwnPropertyDescriptor(obj, 'constructor'); - if (descriptor !== undefined && - typeof descriptor.value === 'function') { - - var name = Formatter.functionName(descriptor.value); - if(name !== '') { - return name; - } - } - - obj = Object.getPrototypeOf(obj); - } -}; - -Formatter.getPropertyDescriptor = function(obj, value) { - var desc; - try { - desc = Object.getOwnPropertyDescriptor(obj, value) || {value: obj[value]}; - } catch(e) { - desc = {value: e}; - } - return desc; -}; - -Formatter.generateFunctionForIndexedArray = function generateFunctionForIndexedArray(lengthProp, name, padding) { - return function(value) { - var max = this.byteArrayMaxLength || 50; - var length = value[lengthProp]; - var formattedValues = []; - var len = 0; - for(var i = 0; i < max && i < length; i++) { - var b = value[i] || 0; - var v = util.pad0(b.toString(16), padding); - len += v.length; - formattedValues.push(v); - } - var prefix = value.constructor.name || name || ''; - if(prefix) prefix += ' '; - - if(formattedValues.length === 0) - return prefix + '[]'; - - if(len <= this.maxLineLength) { - return prefix + '[ ' + formattedValues.join(this.propSep + ' ') + ' ' + ']'; - } else { - return prefix + '[\n' + formattedValues.map(util.addSpaces).join(this.propSep + '\n') + '\n' + ']'; - } - }; -}; - -['undefined', 'boolean', 'null', 'symbol'].forEach(function(name) { - Formatter.add(name, String); -}); - -['number', 'boolean'].forEach(function(name) { - Formatter.add('object', name, function(value) { - return this._formatObject(value, { - additionalProperties: [['[[PrimitiveValue]]', value.valueOf()]] - }); - }); -}); - -Formatter.add('object', 'string', function(value) { - var realValue = value.valueOf(); - - return this._formatObject(value, { - keyFilter: function(key) { - //skip useless indexed properties - return !(key.match(/\d+/) && parseInt(key, 10) < realValue.length); - }, - additionalProperties: [['[[PrimitiveValue]]', realValue]] - }); -}); - -Formatter.add('object', 'regexp', function(value) { - return this._formatObject(value, { - value: String(value) - }); -}); - -Formatter.add('number', function(value) { - if(value === 0 && 1 / value < 0) return '-0'; - return String(value); -}); - -Formatter.add('string', function(value) { - return '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; -}); - -Formatter.add('object', function(value) { - return this._formatObject(value); -}); - -Formatter.add('object', 'arguments', function(value) { - return this._formatObject(value, { - prefix: 'Arguments', - formatPropertyName: function(key) { - if(!key.match(/\d+/)) { - return this.formatPropertyName(key); - } - }, - brackets: ['[', ']'] - }); -}); - -Formatter.add('object', 'array', function(value) { - return this._formatObject(value, { - formatPropertyName: function(key) { - if(!key.match(/\d+/)) { - return this.formatPropertyName(key); - } - }, - brackets: ['[', ']'] - }); -}); - - -function formatDate(value, isUTC) { - var prefix = isUTC ? 'UTC' : ''; - - var date = value['get' + prefix + 'FullYear']() + - '-' + - util.pad0(value['get' + prefix + 'Month']() + 1, 2) + - '-' + - util.pad0(value['get' + prefix + 'Date'](), 2); - - var time = util.pad0(value['get' + prefix + 'Hours'](), 2) + - ':' + - util.pad0(value['get' + prefix + 'Minutes'](), 2) + - ':' + - util.pad0(value['get' + prefix + 'Seconds'](), 2) + - '.' + - util.pad0(value['get' + prefix + 'Milliseconds'](), 3); - - var to = value.getTimezoneOffset(); - var absTo = Math.abs(to); - var hours = Math.floor(absTo / 60); - var minutes = absTo - hours * 60; - var tzFormat = (to < 0 ? '+' : '-') + util.pad0(hours, 2) + util.pad0(minutes, 2); - - return date + ' ' + time + (isUTC ? '' : ' ' + tzFormat); -} - -Formatter.add('object', 'date', function(value) { - return this._formatObject(value, { value: formatDate(value, this.isUTCdate) }); -}); - -Formatter.add('function', function(value) { - return this._formatObject(value, { - additionalProperties: [['name', Formatter.functionName(value)]] - }); -}); - -Formatter.add('object', 'error', function(value) { - return this._formatObject(value, { - prefix: value.name, - additionalProperties: [['message', value.message]] - }); -}); - -Formatter.add('object', 'buffer', Formatter.generateFunctionForIndexedArray('length', 'Buffer', 2)); - -Formatter.add('object', 'array-buffer', Formatter.generateFunctionForIndexedArray('byteLength', 'ArrayBuffer', 2)); - -Formatter.add('object', 'typed-array', 'int8', Formatter.generateFunctionForIndexedArray('length', 'Int8Array', 2)); -Formatter.add('object', 'typed-array', 'uint8', Formatter.generateFunctionForIndexedArray('length', 'Uint8Array', 2)); -Formatter.add('object', 'typed-array', 'uint8clamped', Formatter.generateFunctionForIndexedArray('length', 'Uint8ClampedArray', 2)); - -Formatter.add('object', 'typed-array', 'int16', Formatter.generateFunctionForIndexedArray('length', 'Int16Array', 4)); -Formatter.add('object', 'typed-array', 'uint16', Formatter.generateFunctionForIndexedArray('length', 'Uint16Array', 4)); - -Formatter.add('object', 'typed-array', 'int32', Formatter.generateFunctionForIndexedArray('length', 'Int32Array', 8)); -Formatter.add('object', 'typed-array', 'uint32', Formatter.generateFunctionForIndexedArray('length', 'Uint32Array', 8)); - -//TODO add float32 and float64 - -Formatter.add('object', 'promise', function() { - return '[Promise]';//TODO it could be nice to inspect its state and value -}); - -Formatter.add('object', 'xhr', function() { - return '[XMLHttpRequest]';//TODO it could be nice to inspect its state -}); - -Formatter.add('object', 'html-element', function(value) { - return value.outerHTML; -}); - -Formatter.add('object', 'html-element', '#text', function(value) { - return value.nodeValue; -}); - -Formatter.add('object', 'html-element', '#document', function(value) { - return value.documentElement.outerHTML; -}); - -Formatter.add('object', 'host', function() { - return '[Host]'; -}); - -Formatter.add('object', 'set', function(value) { - var iter = value.values(); - var len = 0; - - this.seen.push(value); - - var props = []; - - var next = iter.next(); - while(!next.done) { - var val = next.value; - var f = this.format(val); - len += f.length; - props.push(f); - - next = iter.next(); - } - - this.seen.pop(); - - if(props.length === 0) return 'Set {}'; - - if(len <= this.maxLineLength) { - return 'Set { ' + props.join(this.propSep + ' ') + ' }'; - } else { - return 'Set {\n' + props.map(util.addSpaces).join(this.propSep + '\n') + '\n' + '}'; - } -}); - -Formatter.add('object', 'map', function(value) { - var iter = value.entries(); - var len = 0; - - this.seen.push(value); - - var props = []; - - var next = iter.next(); - while(!next.done) { - var val = next.value; - var fK = this.format(val[0]); - var fV = this.format(val[1]); - - var f; - if((fK.length + fV.length + 4) <= this.maxLineLength) { - f = fK + ' => ' + fV; - } else { - f = fK + ' =>\n' + fV; - } - - len += fK.length + fV.length + 4; - props.push(f); - - next = iter.next(); - } - - this.seen.pop(); - - if(props.length === 0) return 'Map {}'; - - if(len <= this.maxLineLength) { - return 'Map { ' + props.join(this.propSep + ' ') + ' }'; - } else { - return 'Map {\n' + props.map(util.addSpaces).join(this.propSep + '\n') + '\n' + '}'; - } -}); - -Formatter.prototype.defaultFormat = Formatter.prototype._format_object; - -function defaultFormat(value, opts) { - return new Formatter(opts).format(value); -} - -defaultFormat.Formatter = Formatter; -module.exports = defaultFormat; - -},{"./util":22,"should-type":23}],22:[function(require,module,exports){ -function addSpaces(v) { - return v.split('\n').map(function(vv) { return ' ' + vv; }).join('\n'); -} - -function pad(str, value, filler) { - str = String(str) - var isRight = false; - - if(value < 0) { - isRight = true; - value = -value; - } - - if(str.length < value) { - var padding = new Array(value - str.length + 1).join(filler); - return isRight ? str + padding : padding + str; - } else{ - return str; - } -} - -module.exports = { - addSpaces: addSpaces, - pad: pad, - pad0: function(str, value) { - return pad(str, value, '0'); - } -}; - -},{}],23:[function(require,module,exports){ -var toString = Object.prototype.toString; - -var types = require('./types'); - -/** - * Simple data function to store type information - * @param {string} type Usually what is returned from typeof - * @param {string} cls Sanitized @Class via Object.prototype.toString - * @param {string} sub If type and cls the same, and need to specify somehow - * @private - * @example - * - * //for null - * new Type('null'); - * - * //for Date - * new Type('object', 'date'); - * - * //for Uint8Array - * - * new Type('object', 'typed-array', 'uint8'); - */ -function Type(type, cls, sub) { - this.type = type; - this.cls = cls; - this.sub = sub; -} - -/** - * Function to store type checks - * @private - */ -function TypeChecker() { - this.checks = []; -} - -TypeChecker.prototype = { - add: function(func) { - this.checks.push(func); - return this; - }, - - addTypeOf: function(type, res) { - return this.add(function(obj, tpeOf) { - if(tpeOf === type) { - return new Type(res); - } - }); - }, - - addClass: function(cls, res, sub) { - return this.add(function(obj, tpeOf, objCls) { - if(objCls === cls) { - return new Type(types.OBJECT, res, sub); - } - }); - }, - - getType: function(obj) { - var typeOf = typeof obj; - var cls = toString.call(obj); - - for(var i = 0, l = this.checks.length; i < l; i++) { - var res = this.checks[i].call(this, obj, typeOf, cls); - if(typeof res !== 'undefined') return res; - } - - } -}; - -var main = new TypeChecker(); - -//TODO add iterators - -main - .addTypeOf(types.NUMBER, types.NUMBER) - .addTypeOf(types.UNDEFINED, types.UNDEFINED) - .addTypeOf(types.STRING, types.STRING) - .addTypeOf(types.BOOLEAN, types.BOOLEAN) - .addTypeOf(types.FUNCTION, types.FUNCTION) - .addTypeOf(types.SYMBOL, types.SYMBOL) - .add(function(obj, tpeOf) { - if(obj === null) return new Type(types.NULL); - }) - .addClass('[object String]', types.STRING) - .addClass('[object Boolean]', types.BOOLEAN) - .addClass('[object Number]', types.NUMBER) - .addClass('[object Array]', types.ARRAY) - .addClass('[object RegExp]', types.REGEXP) - .addClass('[object Error]', types.ERROR) - .addClass('[object Date]', types.DATE) - .addClass('[object Arguments]', types.ARGUMENTS) - .addClass('[object Math]') - .addClass('[object JSON]') - .addClass('[object ArrayBuffer]', types.ARRAY_BUFFER) - .addClass('[object Int8Array]', types.TYPED_ARRAY, 'int8') - .addClass('[object Uint8Array]', types.TYPED_ARRAY, 'uint8') - .addClass('[object Uint8ClampedArray]', types.TYPED_ARRAY, 'uint8clamped') - .addClass('[object Int16Array]', types.TYPED_ARRAY, 'int16') - .addClass('[object Uint16Array]', types.TYPED_ARRAY, 'uint16') - .addClass('[object Int32Array]', types.TYPED_ARRAY, 'int32') - .addClass('[object Uint32Array]', types.TYPED_ARRAY, 'uint32') - .addClass('[object Float32Array]', types.TYPED_ARRAY, 'float32') - .addClass('[object Float64Array]', types.TYPED_ARRAY, 'float64') - .addClass('[object DataView]', types.DATA_VIEW) - .addClass('[object Map]', types.MAP) - .addClass('[object WeakMap]', types.WEAK_MAP) - .addClass('[object Set]', types.SET) - .addClass('[object WeakSet]', types.WEAK_SET) - .addClass('[object Promise]', types.PROMISE) - .addClass('[object Blob]', types.BLOB) - .addClass('[object File]', types.FILE) - .addClass('[object FileList]', types.FILE_LIST) - .addClass('[object XMLHttpRequest]', types.XHR) - .add(function(obj) { - if((typeof Promise === types.FUNCTION && obj instanceof Promise) || - (typeof obj.then === types.FUNCTION)) { - return new Type(types.OBJECT, types.PROMISE); - } - }) - .add(function(obj) { - if(typeof Buffer !== 'undefined' && obj instanceof Buffer) { - return new Type(types.OBJECT, types.BUFFER); - } - }) - .add(function(obj) { - if(typeof Node !== 'undefined' && obj instanceof Node) { - return new Type(types.OBJECT, types.HTML_ELEMENT, obj.nodeName); - } - }) - .add(function(obj) { - // probably at the begginging should be enough these checks - if(obj.Boolean === Boolean && obj.Number === Number && obj.String === String && obj.Date === Date) { - return new Type(types.OBJECT, types.HOST); - } - }) - .add(function() { - return new Type(types.OBJECT); - }); - -/** - * Get type information of anything - * - * @param {any} obj Anything that could require type information - * @return {Type} type info - */ -function getGlobalType(obj) { - return main.getType(obj); -} - -getGlobalType.checker = main; -getGlobalType.TypeChecker = TypeChecker; -getGlobalType.Type = Type; - -Object.keys(types).forEach(function(typeName) { - getGlobalType[typeName] = types[typeName]; -}); - -module.exports = getGlobalType; - -},{"./types":24}],24:[function(require,module,exports){ -var types = { - NUMBER: 'number', - UNDEFINED: 'undefined', - STRING: 'string', - BOOLEAN: 'boolean', - OBJECT: 'object', - FUNCTION: 'function', - NULL: 'null', - ARRAY: 'array', - REGEXP: 'regexp', - DATE: 'date', - ERROR: 'error', - ARGUMENTS: 'arguments', - SYMBOL: 'symbol', - ARRAY_BUFFER: 'array-buffer', - TYPED_ARRAY: 'typed-array', - DATA_VIEW: 'data-view', - MAP: 'map', - SET: 'set', - WEAK_SET: 'weak-set', - WEAK_MAP: 'weak-map', - PROMISE: 'promise', - -// node buffer - BUFFER: 'buffer', - -// dom html element - HTML_ELEMENT: 'html-element', - HTML_ELEMENT_TEXT: 'html-element-text', - DOCUMENT: 'document', - WINDOW: 'window', - FILE: 'file', - FILE_LIST: 'file-list', - BLOB: 'blob', - - HOST: 'host', - - XHR: 'xhr' -}; - -module.exports = types; - -},{}]},{},[1])(1) -}); \ No newline at end of file diff --git a/cli/node_modules/should/should.min.js b/cli/node_modules/should/should.min.js deleted file mode 100644 index 149e35433..000000000 --- a/cli/node_modules/should/should.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/* - * should - test framework agnostic BDD-style assertions - * @version v7.0.2 - * @author TJ Holowaychuk and contributors - * @link https://github.com/shouldjs/should.js - * @license MIT - */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Should=t()}}(function(){return function t(e,r,a){function n(s,i){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!i&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var h=r[s]={exports:{}};e[s][0].call(h.exports,function(t){var r=e[s][1][t];return n(r?r:t)},h,h.exports,t,e,r,a)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s=0){var s=r.indexOf("\n",o+1);r=r.substring(s+1)}}this.stack=r}}},s=" ";o.prototype=Object.create(Error.prototype,{name:{value:"AssertionError"},generateMessage:{value:function(){if(!this.operator&&this.previous)return this.previous.message;var t=n.format(this.actual),e="expected"in this?" "+n.format(this.expected):"",r="details"in this&&this.details?" ("+this.details+")":"",o=this.previous?"\n"+a(this.previous.message):"";return"expected "+t+(this.negate?" not ":" ")+this.operator+e+r+o}}}),e.exports=o},{"./util":18}],3:[function(t,e){function r(t){this.obj=t,this.anyOne=!1,this.negate=!1,this.params={actual:t}}{var a=t("./assertion-error");t("./util")}r.add=function(t,e){var n={enumerable:!0,configurable:!0};n.value=function(){var n=new r(this.obj,this,t);n.anyOne=this.anyOne;try{e.apply(n,arguments)}catch(o){if(o instanceof a){if(this.negate)return this.obj=n.obj,this.negate=!1,this;n!==o.assertion&&(n.params.previous=o),n.negate=!1,n.fail()}throw o}return this.negate&&(n.negate=!0,n.params.details="false negative fail",n.fail()),this.params.operator||(this.params=n.params),this.obj=n.obj,this.negate=!1,this},Object.defineProperty(r.prototype,t,n)},r.addChain=function(t,e){e=e||function(){},Object.defineProperty(r.prototype,t,{get:function(){return e(),this},enumerable:!0})},r.alias=function(t,e){var a=Object.getOwnPropertyDescriptor(r.prototype,t);if(!a)throw new Error("Alias "+t+" -> "+e+" could not be created as "+t+" not defined");Object.defineProperty(r.prototype,e,a)},r.prototype={constructor:r,assert:function(t){if(t)return this;var e=this.params;throw"obj"in e&&!("actual"in e)?e.actual=e.obj:"obj"in e||"actual"in e||(e.actual=this.obj),e.stackStartFunction=e.stackStartFunction||this.assert,e.negate=this.negate,e.assertion=this,new a(e)},fail:function(){return this.assert(!1)},get not(){return this.negate=!this.negate,this},get any(){return this.anyOne=!0,this}},e.exports=r},{"./assertion-error":2,"./util":18}],4:[function(t,e){var r=t("should-format").Formatter,a={checkProtoEql:!1,getFormatter:function(t){return new r(t||a)}};e.exports=a},{"should-format":21}],5:[function(t,e){function r(t,e,a,n,o){var i=new s(t);i.params={operator:n,expected:e,message:a,stackStartFunction:o||r},i.fail()}function a(t,e){t||r(t,!0,e,"==",c.ok)}function n(t,e){return t&&e?"[object RegExp]"==Object.prototype.toString.call(e)?e.test(t):t instanceof e?!0:e.call({},t)===!0?!0:!1:!1}function o(t,e,a,o){var s;"string"==typeof a&&(o=a,a=null);try{e()}catch(i){s=i}if(o=(a&&a.name?" ("+a.name+")":".")+(o?" "+o:"."),t&&!s&&r(s,a,"Missing expected exception"+o),!t&&n(s,a)&&r(s,a,"Got unwanted exception"+o),t&&s&&a&&!n(s,a)||!t&&s)throw s}var s=t("./../assertion"),i=t("should-equal"),u=Array.prototype.slice,c=e.exports=a;c.fail=r,c.ok=a,c.equal=function(t,e,a){t!=e&&r(t,e,a,"==",c.equal)},c.notEqual=function(t,e,a){t==e&&r(t,e,a,"!=",c.notEqual)},c.deepEqual=function(t,e,a){i(t,e).result||r(t,e,a,"deepEqual",c.deepEqual)},c.notDeepEqual=function(t,e,a){i(t,e).result&&r(t,e,a,"notDeepEqual",c.notDeepEqual)},c.strictEqual=function(t,e,a){t!==e&&r(t,e,a,"===",c.strictEqual)},c.notStrictEqual=function(t,e,a){t===e&&r(t,e,a,"!==",c.notStrictEqual)},c["throws"]=function(){o.apply(this,[!0].concat(u.call(arguments)))},c.doesNotThrow=function(){o.apply(this,[!1].concat(u.call(arguments)))},c.ifError=function(t){if(t)throw t}},{"./../assertion":3,"should-equal":20}],6:[function(t,e){var r=t("../util"),a=t("./_assert"),n=t("../assertion-error");e.exports=function(t){var e=t.format;r.merge(t,a),t.exist=t.exists=function(r,a){if(null==r)throw new n({message:a||"expected "+e(r)+" to exist",stackStartFunction:t.exist})},t.not={},t.not.exist=t.not.exists=function(r,a){if(null!=r)throw new n({message:a||"expected "+e(r)+" to not exist",stackStartFunction:t.not.exist})}}},{"../assertion-error":2,"../util":18,"./_assert":5}],7:[function(t,e){e.exports=function(t,e){e.add("true",function(){this.is.exactly(!0)}),e.alias("true","True"),e.add("false",function(){this.is.exactly(!1)}),e.alias("false","False"),e.add("ok",function(){this.params={operator:"to be truthy"},this.assert(this.obj)})}},{}],8:[function(t,e){e.exports=function(t,e){["an","of","a","and","be","has","have","with","is","which","the","it"].forEach(function(t){e.addChain(t)})}},{}],9:[function(t,e){var r=t("../util"),a=t("should-equal");e.exports=function(t,e){var n=t.format;e.add("containEql",function(t){this.params={operator:"to contain "+n(t)},this.is.not["null"]().and.not.undefined();var e=this.obj;"string"==typeof e?this.assert(e.indexOf(String(t))>=0):r.isIndexable(e)?this.assert(r.some(e,function(e){return a(e,t).result})):this.have.properties(t)}),e.add("containDeepOrdered",function(e){this.params={operator:"to contain "+n(e)};var a=this.obj;if("string"==typeof a)this.is.equal(String(e));else if(r.isIndexable(a)&&r.isIndexable(e)){for(var o=0,s=0,i=r.length(a),u=r.length(e);i>o&&u>s;o++)try{t(a[o]).containDeepOrdered(e[s]),s++}catch(c){if(c instanceof t.AssertionError)continue;throw c}this.assert(s===u)}else null!=a&&null!=e&&"object"==typeof a&&"object"==typeof e?(r.forEach(e,function(e,r){t(a[r]).containDeepOrdered(e)}),r.isEmptyObject(e)&&this.eql(e)):this.eql(e)}),e.add("containDeep",function(e){this.params={operator:"to contain "+n(e)};var a=this.obj;if("string"==typeof a)this.is.equal(String(e));else if(r.isIndexable(a)&&r.isIndexable(e)){var o={};r.forEach(e,function(e){this.assert(r.some(a,function(r,a){if(a in o)return!1;try{return t(r).containDeep(e),o[a]=!0,!0}catch(n){if(n instanceof t.AssertionError)return!1;throw n}}))},this)}else null!=a&&null!=e&&"object"==typeof a&&"object"==typeof e?(r.forEach(e,function(e,r){t(a[r]).containDeep(e)}),r.isEmptyObject(e)&&this.eql(e)):this.eql(e)})}},{"../util":18,"should-equal":20}],10:[function(t,e){function r(t,e,r){return((t.path.length>0?"at "+t.path.map(o.formatProp).join(" -> "):"")+(t.a===e?"":", A has "+o.format(t.a))+(t.b===r?"":" and B has "+o.format(t.b))+(t.showReason?" because "+t.reason:"")).trim()}var a=t("should-equal"),n=t("should-type"),o=t("../util");e.exports=function(t,e){e.add("eql",function(e,o){this.params={operator:"to equal",expected:e,message:o};var s=a(this.obj,e,t.config);this.params.details=s.result?"":r(s,this.obj,e),this.params.showDiff=a(n(this.obj),n(e)).result,this.assert(s.result)}),e.add("equal",function(t,e){this.params={operator:"to be",expected:t,message:e},this.params.showDiff=a(n(this.obj),n(t)).result,this.assert(t===this.obj)}),e.alias("equal","exactly")}},{"../util":18,"should-equal":20,"should-type":23}],11:[function(t,e){var r=t("../util");e.exports=function(t,e){var a=t.format;e.add("throw",function(e,n){var o=this.obj,s={},i="",u=!1;if(r.isGeneratorFunction(o))return t(o())["throw"](e,n);if(r.isGeneratorObject(o))return t(o.next.bind(o))["throw"](e,n);this.is.a.Function();var c=!0;try{o()}catch(h){u=!0,s=h}if(u)if(e){if("string"==typeof e)c=e==s.message;else if(e instanceof RegExp)c=e.test(s.message);else if("function"==typeof e)c=s instanceof e;else if(null!=e)try{t(s).match(e)}catch(h){if(!(h instanceof t.AssertionError))throw h;i=": "+h.message,c=!1}if(c){if("function"==typeof e&&n)try{t(s).match(n)}catch(h){if(!(h instanceof t.AssertionError))throw h;i=": "+h.message,c=!1}}else"string"==typeof e||e instanceof RegExp?i=" with a message matching "+a(e)+", but got '"+s.message+"'":"function"==typeof e&&(i=" of type "+r.functionName(e)+", but got "+r.functionName(s.constructor))}else i=" (got "+a(s)+")";this.params={operator:"to throw exception"+i},this.assert(u),this.assert(c)}),e.alias("throw","throwError")}},{"../util":18}],12:[function(t,e){var r=t("../util"),a=t("should-equal");e.exports=function(t,e){var n=t.format;e.add("match",function(e,o){if(this.params={operator:"to match "+n(e),message:o},!a(this.obj,e).result)if(e instanceof RegExp){if("string"==typeof this.obj)this.assert(e.exec(this.obj));else if(r.isIndexable(this.obj))r.forEach(this.obj,function(t){this.assert(e.exec(t))},this);else if(null!=this.obj&&"object"==typeof this.obj){var s=[],i=[];r.forEach(this.obj,function(t,a){e.exec(t)?i.push(r.formatProp(a)):s.push(r.formatProp(a)+" ("+n(t)+")")},this),s.length&&(this.params.operator+="\n not matched properties: "+s.join(", ")),i.length&&(this.params.operator+="\n matched properties: "+i.join(", ")),this.assert(0==s.length)}}else if("function"==typeof e){var u;u=e(this.obj),"boolean"==typeof u&&this.assert(u)}else null!=e&&"object"==typeof e?(s=[],i=[],r.forEach(e,function(e,a){try{t(this.obj[a]).match(e),i.push(r.formatProp(a))}catch(o){if(!(o instanceof t.AssertionError))throw o;s.push(r.formatProp(a)+" ("+n(this.obj[a])+")")}},this),s.length&&(this.params.operator+="\n not matched properties: "+s.join(", ")),i.length&&(this.params.operator+="\n matched properties: "+i.join(", ")),this.assert(0==s.length)):this.assert(!1)}),e.add("matchEach",function(e,a){this.params={operator:"to match each "+n(e),message:a},r.forEach(this.obj,function(r){t(r).match(e)},this)}),e.add("matchAny",function(e,a){this.params={operator:"to match any "+n(e),message:a},this.assert(r.some(this.obj,function(r){try{return t(r).match(e),!0}catch(a){if(a instanceof t.AssertionError)return!1;throw a}}))}),e.alias("matchAny","matchSome"),e.alias("matchEach","matchEvery")}},{"../util":18,"should-equal":20}],13:[function(t,e){e.exports=function(t,e){e.add("NaN",function(){this.params={operator:"to be NaN"},this.assert(this.obj!==this.obj)}),e.add("Infinity",function(){this.params={operator:"to be Infinity"},this.is.a.Number().and.not.a.NaN().and.assert(!isFinite(this.obj))}),e.add("within",function(t,e,r){this.params={operator:"to be within "+t+".."+e,message:r},this.assert(this.obj>=t&&this.obj<=e)}),e.add("approximately",function(t,e,r){this.params={operator:"to be approximately "+t+" ±"+e,message:r},this.assert(Math.abs(this.obj-t)<=e)}),e.add("above",function(t,e){this.params={operator:"to be above "+t,message:e},this.assert(this.obj>t)}),e.add("below",function(t,e){this.params={operator:"to be below "+t,message:e},this.assert(this.obj1)t.names=n.call(arguments);else{var e=arguments[0];"string"==typeof e?t.names=[e]:r.isIndexable(e)?t.names=e:(t.names=Object.keys(e),t.values=e)}return t}var s=t.format;e.add("propertyWithDescriptor",function(e,r){this.params={actual:this.obj,operator:"to have own property with descriptor "+s(r)};var a=this.obj;this.have.ownProperty(e),t(Object.getOwnPropertyDescriptor(Object(a),e)).have.properties(r)}),e.add("enumerable",function(t,e){t=r.convertPropertyName(t),this.params={operator:"to have enumerable property "+r.formatProp(t)+(arguments.length>1?" equal to "+s(e):"")};var a={enumerable:!0};arguments.length>1&&(a.value=e),this.have.propertyWithDescriptor(t,a)}),e.add("enumerables",function(){var e=o.apply(null,arguments);this.params={operator:"to have enumerables "+e.names.map(r.formatProp)};var a=this.obj;e.names.forEach(function(e){t(a).have.enumerable(e)})}),e.add("property",function(t,e){if(t=r.convertPropertyName(t),arguments.length>1){var a={};a[t]=e,this.have.properties(a)}else this.have.properties(t);this.obj=this.obj[t]}),e.add("properties",function(t){var e={};arguments.length>1?t=n.call(arguments):Array.isArray(t)||("string"==typeof t||"symbol"==typeof t?t=[t]:(e=t,t=Object.keys(t)));var o=Object(this.obj),i=[];t.forEach(function(t){t in o||i.push(r.formatProp(t))});var u=i;0===u.length?u=t.map(r.formatProp):this.anyOne&&(u=t.filter(function(t){return i.indexOf(r.formatProp(t))<0}).map(r.formatProp));var c=(1===u.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+u.join(", ");this.params={obj:this.obj,operator:c},this.assert(0===i.length||this.anyOne&&i.length!=t.length);var h=Object.keys(e);if(h.length){var p=[];u=[],h.forEach(function(t){var n=e[t];a(o[t],n).result?u.push(r.formatProp(t)+" of "+s(n)):p.push(r.formatProp(t)+" of "+s(n)+" (got "+s(o[t])+")")}),(0!==p.length&&!this.anyOne||this.anyOne&&0===u.length)&&(u=p),c=(1===u.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+u.join(", "),this.params={obj:this.obj,operator:c},this.assert(0===p.length||this.anyOne&&p.length!=h.length)}}),e.add("length",function(t,e){this.have.property("length",t,e)}),e.alias("length","lengthOf");var i=Object.prototype.hasOwnProperty;e.add("ownProperty",function(t,e){t=r.convertPropertyName(t),this.params={actual:this.obj,operator:"to have own property "+r.formatProp(t),message:e},this.assert(i.call(this.obj,t)),this.obj=this.obj[t]}),e.alias("ownProperty","hasOwnProperty"),e.add("empty",function(){if(this.params={operator:"to be empty"},void 0!==r.length(this.obj))t(this.obj).have.property("length",0);else{var e=Object(this.obj);for(var a in e)t(this.obj).not.have.ownProperty(a)}},!0),e.add("keys",function(t){arguments.length>1?t=n.call(arguments):1===arguments.length&&"string"==typeof t?t=[t]:0===arguments.length&&(t=[]),t=t.map(String);var e=Object(this.obj),a=[];t.forEach(function(t){i.call(this.obj,t)||a.push(r.formatProp(t))},this);var o=[];Object.keys(e).forEach(function(e){t.indexOf(e)<0&&o.push(r.formatProp(e))});var s=0===t.length?"to be empty":"to have "+(1===t.length?"key ":"keys ");this.params={operator:s+t.map(r.formatProp).join(", ")},a.length>0&&(this.params.operator+="\n missing keys: "+a.join(", ")),o.length>0&&(this.params.operator+="\n extra keys: "+o.join(", ")),this.assert(0===a.length&&0===o.length)}),e.alias("keys","key"),e.add("propertyByPath",function(e){arguments.length>1?e=n.call(arguments):1===arguments.length&&"string"==typeof e?e=[e]:0===arguments.length&&(e=[]);var a=e.map(r.formatProp);e=e.map(String);for(var o,s=t(Object(this.obj)),i=[];o=e.shift();)this.params={operator:"to have property by path "+a.join(", ")+" - failed on "+r.formatProp(o)},s=s.have.property(o),i.push(o);this.params={obj:this.obj,operator:"to have property by path "+a.join(", ")},this.obj=s.obj})}},{"../util":18,"should-equal":20}],15:[function(t,e){e.exports=function(t,e){e.add("startWith",function(e,r){this.params={operator:"to start with "+t.format(e),message:r},this.assert(0===this.obj.indexOf(e))}),e.add("endWith",function(e,r){this.params={operator:"to end with "+t.format(e),message:r},this.assert(this.obj.indexOf(e,this.obj.length-e.length)>=0)})}},{}],16:[function(t,e){var r=t("../util");e.exports=function(t,e){e.add("Number",function(){this.params={operator:"to be a number"},this.have.type("number")}),e.add("arguments",function(){this.params={operator:"to be arguments"},this.have["class"]("Arguments")}),e.alias("arguments","Arguments"),e.add("type",function(e,r){this.params={operator:"to have type "+e,message:r},t(typeof this.obj).be.exactly(e)}),e.add("instanceof",function(t,e){this.params={operator:"to be an instance of "+r.functionName(t),message:e},this.assert(Object(this.obj)instanceof t)}),e.alias("instanceof","instanceOf"),e.add("Function",function(){this.params={operator:"to be a function"},this.have.type("function")}),e.add("Object",function(){this.params={operator:"to be an object"},this.is.not["null"]().and.have.type("object")}),e.add("String",function(){this.params={operator:"to be a string"},this.have.type("string")}),e.add("Array",function(){this.params={operator:"to be an array"},this.have["class"]("Array")}),e.add("Boolean",function(){this.params={operator:"to be a boolean"},this.have.type("boolean")}),e.add("Error",function(){this.params={operator:"to be an error"},this.have.instanceOf(Error)}),e.add("null",function(){this.params={operator:"to be null"},this.assert(null===this.obj)}),e.alias("null","Null"),e.add("class",function(t){this.params={operator:"to have [[Class]] "+t},this.assert(Object.prototype.toString.call(this.obj)==="[object "+t+"]")}),e.alias("class","Class"),e.add("undefined",function(){this.params={operator:"to be undefined"},this.assert(void 0===this.obj)}),e.alias("undefined","Undefined"),e.add("iterable",function(){this.params={operator:"to be iterable"},t(this.obj).have.property(Symbol.iterator).which.is.a.Function()}),e.add("iterator",function(){this.params={operator:"to be iterator"},t(this.obj).have.property("next").which.is.a.Function()}),e.add("generator",function(){this.params={operator:"to be generator"},t(this.obj).be.iterable.and.iterator.and.it.is.equal(this.obj[Symbol.iterator]())})}},{"../util":18}],17:[function(t,e,r){var a=t("./util"),n=function o(t){return new o.Assertion(t)};n.AssertionError=t("./assertion-error"),n.Assertion=t("./assertion"),n.format=a.format,n.type=t("should-type"),n.util=a,n.config=t("./config"),r=e.exports=n,n.extend=function(t,e){t=t||"should",e=e||Object.prototype;var r=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,{set:function(){},get:function(){return n(a.isWrapperType(this)?this.valueOf():this)},configurable:!0}),{name:t,descriptor:r,proto:e}},n.noConflict=function(t){return t=t||n._prevShould,t&&(delete t.proto[t.name],t.descriptor&&Object.defineProperty(t.proto,t.name,t.descriptor)),n},n.use=function(t){return t(n,n.Assertion),this},n.use(t("./ext/assert")).use(t("./ext/chain")).use(t("./ext/bool")).use(t("./ext/number")).use(t("./ext/eql")).use(t("./ext/type")).use(t("./ext/string")).use(t("./ext/property")).use(t("./ext/error")).use(t("./ext/match")).use(t("./ext/contain"))},{"./assertion":3,"./assertion-error":2,"./config":4,"./ext/assert":6,"./ext/bool":7,"./ext/chain":8,"./ext/contain":9,"./ext/eql":10,"./ext/error":11,"./ext/match":12,"./ext/number":13,"./ext/property":14,"./ext/string":15,"./ext/type":16,"./util":18,"should-type":23}],18:[function(t,e,r){var a=t("should-type"),n=t("./config");r.isWrapperType=function(t){return t instanceof Number||t instanceof String||t instanceof Boolean},r.merge=function(t,e){if(t&&e)for(var r in e)t[r]=e[r];return t};var o=Object.prototype.hasOwnProperty;r.forEach=function s(t,e,a){if(r.isGeneratorFunction(t))return s(t(),e,a);if(r.isGeneratorObject(t))for(var n=t.next();!n.done;){if(e.call(a,n.value,"value",t)===!1)return;n=t.next()}else for(var i in t)if(o.call(t,i)&&e.call(a,t[i],i,t)===!1)return},r.some=function(t,e,a){var n=!1;return r.forEach(t,function(r,o){return e.call(a,r,o,t)?(n=!0,!1):void 0},a),n},r.isEmptyObject=function(t){for(var e in t)if(o.call(t,e))return!1;return!0},r.isIndexable=function(t){var e=a(t);return e.type===a.OBJECT&&e.cls===a.ARRAY||e.type===a.OBJECT&&e.cls===a.BUFFER||e.type===a.OBJECT&&e.cls===a.ARGUMENTS||e.type===a.OBJECT&&e.cls===a.ARRAY_BUFFER||e.type===a.OBJECT&&e.cls===a.TYPED_ARRAY||e.type===a.OBJECT&&e.cls===a.DATA_VIEW||e.type===a.OBJECT&&e.cls===a.STRING||e.type===a.STRING},r.length=function(t){var e=a(t);switch(e.type){case a.STRING:return t.length;case a.OBJECT:switch(e.cls){case a.ARRAY_BUFFER:case a.TYPED_ARRAY:case a.DATA_VIEW:return t.byteLength;case a.ARRAY:case a.BUFFER:case a.ARGUMENTS:case a.FUNCTION:return t.length}}},r.convertPropertyName=function(t){return"symbol"==typeof t?t:String(t)},r.isGeneratorObject=function(t){return t?"function"==typeof t.next&&"function"==typeof t[Symbol.iterator]&&t[Symbol.iterator]()===t:!1},r.isGeneratorFunction=function(t){return"function"!=typeof t?!1:/^function\s*\*\s*/.test(t.toString())},r.format=function(t,e){return n.getFormatter(e).format(t)},r.functionName=t("should-format").Formatter.functionName,r.formatProp=function(t){return n.getFormatter().formatPropertyName(String(t))}},{"./config":4,"should-format":21,"should-type":23}],19:[function(t,e){e.exports=function(t){for(var e=arguments,r=1,a=e.length;a>r;r++)t=t.replace(/%s/,e[r]);return t}},{}],20:[function(t,e){function r(t,e,r,a,n){var o={result:t};return t||(o.path=e,o.reason=r,o.a=a,o.b=n),o}function a(t){return t.type+(t.cls?"("+t.cls+(t.sub?" "+t.sub:"")+")":"")}function n(t,e,o,p,f,l){function d(a,n){return r(a,l,n,t,e)}function m(r){return n(t[r],e[r],o,p,f,l.concat([r]))}var b=c;if(t===e)return d(0!==t||1/t==1/e,h.PLUS_0_AND_MINUS_0);var y,g,v=s(t),j=s(e),E=v.type!==j.type||v.cls!==j.cls;if(E||o.checkSubType&&v.sub!==j.sub||!o.checkSubType)return d(!1,i(h.DIFFERENT_TYPES,a(v),a(j)));switch(v.type){case"number":return t!==t?d(e!==e,h.NAN_NUMBER):0===t?d(1/t===1/e,h.PLUS_0_AND_MINUS_0):d(t===e,h.EQUALITY);case"boolean":case"string":return d(t===e,h.EQUALITY);case"function":var O=t.toString(),A=e.toString();if(b=n(O,A,o,p,f,l),!b.result)return b.reason=h.FUNCTION_SOURCES,b;break;case"object":switch(v.cls){case"regexp":for(g=["source","global","multiline","lastIndex","ignoreCase"];g.length;)if(b=m(g.shift()),!b.result)return b;break;case"date":if(+t!==+e)return d(!1,h.EQUALITY);break;case"number":case"boolean":case"string":if(b=n(t.valueOf(),e.valueOf(),o,p,f,l),!b.result)return b.reason=h.WRAPPED_VALUE,b;break;case"buffer":if(b=m("length"),!b.result)return b;for(y=t.length;y--;)if(b=m(y),!b.result)return b;return c;case"error":for(g=["name","message"];g.length;)if(b=m(g.shift()),!b.result)return b;break;case"array":case"arguments":case"typed-array":if(b=m("length"),!b.result)return b;break;case"array-buffer":if(b=m("byteLength"),!b.result)return b;break;case"map":case"set":if(b=m("size"),!b.result)return b;p.push(t),f.push(e);for(var x=t.entries(),S=x.next();!S.done;){var _=S.value[0];if("object"!=s(_).type){if(!e.has(_)){b=d(!1,h.SET_MAP_MISSING_KEY),b.a=_,b.b=_;break}if("map"==v.cls){var P=e.get(_);if(b=n(S.value[1],P,o,p,f,l),!b.result){b.a=S.value,b.b=P,b.reason=h.MAP_VALUE_EQUALITY;break}}}else for(var T=e.entries(),N=T.next();!N.done;){if(b=n(S.value[0],N.value[0],o,p,f,l),b.result){"map"==v.cls&&(b=n(S.value[1],N.value[1],o,p,f,l),b.result||(b.a=S.value,b.b=N.value,b.reason=h.MAP_VALUE_EQUALITY));break}b.reason=h.SET_MAP_MISSING_KEY,b.a=_,b.b=_,N=T.next()}if(!b.result)break;S=x.next()}if(p.pop(),f.pop(),!b.result)return b.reason=h.SET_MAP_MISSING_ENTRY,b}}for(y=p.length;y--;)if(p[y]==t)return d(f[y]==e,h.CIRCULAR_VALUES);p.push(t),f.push(e);var _;for(_ in e)if(u.call(e,_)){if(b=d(u.call(t,_),i(h.MISSING_KEY,"A",_)),!b.result)break;if(b.result&&(b=m(_),!b.result))break}if(b.result)for(_ in t)if(u.call(t,_)&&(b=d(u.call(e,_),i(h.MISSING_KEY,"B",_)),!b.result))return b;if(p.pop(),f.pop(),!b.result)return b;var R=!1,w=!1;return o.checkProtoEql&&(Object.getPrototypeOf?(R=Object.getPrototypeOf(t)===Object.getPrototypeOf(e),w=!0):t.__proto__&&e.__proto__&&(R=t.__proto__===e.__proto__,w=!0),w&&!R&&(b=d(R,h.EQUALITY_PROTOTYPE),b.showReason=!0,!b.result))?b:c}function o(t,e,r){r=r||{},"boolean"!=typeof r.checkProtoEql&&(r.checkProtoEql=p.checkProtoEql),"boolean"!=typeof r.checkSubType&&(r.checkSubType=p.checkSubType);var a=n(t,e,r,[],[],[]);return a}var s=t("should-type"),i=t("./format"),u=Object.prototype.hasOwnProperty,c=r(!0),h={PLUS_0_AND_MINUS_0:"+0 is not equal to -0",DIFFERENT_TYPES:"A has type %s and B has type %s",NAN_NUMBER:"NaN is not equal to any number",EQUALITY:"A is not equal to B",EQUALITY_PROTOTYPE:"A and B have different prototypes",WRAPPED_VALUE:"A wrapped value is not equal to B wrapped value",FUNCTION_SOURCES:"function A is not equal to B by source code value (via .toString call)",MISSING_KEY:"%s has no key %s",CIRCULAR_VALUES:"A has circular reference that was visited not in the same time as B",SET_MAP_MISSING_KEY:"Set/Map missing key",MAP_VALUE_EQUALITY:"Values of the same key in A and B is not equal"},p={checkProtoEql:!0,checkSubType:!0};e.exports=o,o.r=h},{"./format":19,"should-type":23}],21:[function(t,e){function r(t){return function(e){var r=t(e);return r.sort(),r}}function a(t){t=t||{},this.seen=[],this.keys=r(t.keys===!1?Object.getOwnPropertyNames:Object.keys),this.maxLineLength="number"==typeof t.maxLineLength?t.maxLineLength:60,this.propSep=t.propSep||",",this.isUTCdate=!!t.isUTCdate}function n(t,e){var r=e?"UTC":"",a=t["get"+r+"FullYear"]()+"-"+i.pad0(t["get"+r+"Month"]()+1,2)+"-"+i.pad0(t["get"+r+"Date"](),2),n=i.pad0(t["get"+r+"Hours"](),2)+":"+i.pad0(t["get"+r+"Minutes"](),2)+":"+i.pad0(t["get"+r+"Seconds"](),2)+"."+i.pad0(t["get"+r+"Milliseconds"](),3),o=t.getTimezoneOffset(),s=Math.abs(o),u=Math.floor(s/60),c=s-60*u,h=(0>o?"+":"-")+i.pad0(u,2)+i.pad0(c,2);return a+" "+n+(e?"":" "+h)}function o(t,e){return new a(e).format(t)}var s=t("should-type"),i=t("./util");a.prototype={constructor:a,format:function(t){var e=s(t),r=e.type,a=e.type;e.cls&&(r+="_"+e.cls,a+="_"+e.cls),e.sub&&(a+="_"+e.sub);var n=this["_format_"+a]||this["_format_"+r]||this["_format_"+e.type]||this.defaultFormat;return n.call(this,t).trim()},_formatObject:function(t,e){e=e||{};var r=e.keys||this.keys(t),n=0,o=e.formatPropertyValue||this.formatPropertyValue,s=e.formatPropertyName||this.formatPropertyName,u=e.keyValueSep||": ",c=e.keyFilter||function(){return!0};this.seen.push(t);var h=[];r.forEach(function(e){if(c(e)){var r=s.call(this,e),a=(r?r+u:"")+o.call(this,t,e);n+=a.length,h.push(a)}},this),this.seen.pop(),(e.additionalProperties||[]).forEach(function(t){var e=t[0]+u+this.format(t[1]);n+=e.length,h.push(e)},this);var p=e.prefix||a.constructorName(t)||"";p.length>0&&(p+=" ");var f,l;Array.isArray(e.brackets)?(f=e.brackets&&e.brackets[0],l=e.brackets&&e.brackets[1]):(f="{",l="}");var d=e.value||"";return 0===h.length?d||p+f+l:n<=this.maxLineLength?p+f+" "+(d?d+" ":"")+h.join(this.propSep+" ")+" "+l:p+f+"\n"+(d?" "+d+"\n":"")+h.map(i.addSpaces).join(this.propSep+"\n")+"\n"+l},formatObject:function(t,e,r){r=r||this.keys(t);var a=0;return this.seen.push(t),r=r.map(function(e){var r=this.formatProperty(t,e);return a+=r.length,r},this),this.seen.pop(),0===r.length?"{}":a<=this.maxLineLength?"{ "+(e?e+" ":"")+r.join(this.propSep+" ")+" }":"{\n"+(e?" "+e+"\n":"")+r.map(i.addSpaces).join(this.propSep+"\n")+"\n}"},formatPropertyName:function(t){return t.match(/^[a-zA-Z_$][a-zA-Z_$0-9]*$/)?t:this.format(t)},formatProperty:function(t,e){var r=a.getPropertyDescriptor(t,e),n=this.formatPropertyName(e),o=r.get&&r.set?"[Getter/Setter]":r.get?"[Getter]":r.set?"[Setter]":this.seen.indexOf(r.value)>=0?"[Circular]":this.format(r.value);return n+": "+o},formatPropertyValue:function(t,e){var r=a.getPropertyDescriptor(t,e),n=r.get&&r.set?"[Getter/Setter]":r.get?"[Getter]":r.set?"[Setter]":this.seen.indexOf(r.value)>=0?"[Circular]":this.format(r.value);return n}},a.add=function(t,e,r,n){var o=Array.prototype.slice.call(arguments);n=o.pop(),a.prototype["_format_"+o.join("_")]=n},a.formatObjectWithPrefix=function(t){return function(e){var r=t.call(this,e),a=this.keys(e);return 0==a.length?r:this.formatObject(e,r,a)}};var u=/^\s*function\s*(\S*)\s*\(/;a.functionName=function(t){if(t.name)return t.name;var e=t.toString().match(u)[1];return e},a.constructorName=function(t){for(;t;){var e=Object.getOwnPropertyDescriptor(t,"constructor");if(void 0!==e&&"function"==typeof e.value){var r=a.functionName(e.value);if(""!==r)return r}t=Object.getPrototypeOf(t)}},a.getPropertyDescriptor=function(t,e){var r;try{r=Object.getOwnPropertyDescriptor(t,e)||{value:t[e]}}catch(a){r={value:a}}return r},a.generateFunctionForIndexedArray=function(t,e,r){return function(a){for(var n=this.byteArrayMaxLength||50,o=a[t],s=[],u=0,c=0;n>c&&o>c;c++){var h=a[c]||0,p=i.pad0(h.toString(16),r);u+=p.length,s.push(p)}var f=a.constructor.name||e||"";return f&&(f+=" "),0===s.length?f+"[]":u<=this.maxLineLength?f+"[ "+s.join(this.propSep+" ")+" ]":f+"[\n"+s.map(i.addSpaces).join(this.propSep+"\n")+"\n]"}},["undefined","boolean","null","symbol"].forEach(function(t){a.add(t,String)}),["number","boolean"].forEach(function(t){a.add("object",t,function(t){return this._formatObject(t,{additionalProperties:[["[[PrimitiveValue]]",t.valueOf()]]})})}),a.add("object","string",function(t){var e=t.valueOf();return this._formatObject(t,{keyFilter:function(t){return!(t.match(/\d+/)&&parseInt(t,10)1/t?"-0":String(t)}),a.add("string",function(t){return"'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'"}),a.add("object",function(t){return this._formatObject(t)}),a.add("object","arguments",function(t){return this._formatObject(t,{prefix:"Arguments",formatPropertyName:function(t){return t.match(/\d+/)?void 0:this.formatPropertyName(t)},brackets:["[","]"]})}),a.add("object","array",function(t){return this._formatObject(t,{formatPropertyName:function(t){return t.match(/\d+/)?void 0:this.formatPropertyName(t)},brackets:["[","]"]})}),a.add("object","date",function(t){return this._formatObject(t,{value:n(t,this.isUTCdate)})}),a.add("function",function(t){return this._formatObject(t,{additionalProperties:[["name",a.functionName(t)]]})}),a.add("object","error",function(t){return this._formatObject(t,{prefix:t.name,additionalProperties:[["message",t.message]]})}),a.add("object","buffer",a.generateFunctionForIndexedArray("length","Buffer",2)),a.add("object","array-buffer",a.generateFunctionForIndexedArray("byteLength","ArrayBuffer",2)),a.add("object","typed-array","int8",a.generateFunctionForIndexedArray("length","Int8Array",2)),a.add("object","typed-array","uint8",a.generateFunctionForIndexedArray("length","Uint8Array",2)),a.add("object","typed-array","uint8clamped",a.generateFunctionForIndexedArray("length","Uint8ClampedArray",2)),a.add("object","typed-array","int16",a.generateFunctionForIndexedArray("length","Int16Array",4)),a.add("object","typed-array","uint16",a.generateFunctionForIndexedArray("length","Uint16Array",4)),a.add("object","typed-array","int32",a.generateFunctionForIndexedArray("length","Int32Array",8)),a.add("object","typed-array","uint32",a.generateFunctionForIndexedArray("length","Uint32Array",8)),a.add("object","promise",function(){return"[Promise]"}),a.add("object","xhr",function(){return"[XMLHttpRequest]"}),a.add("object","html-element",function(t){return t.outerHTML}),a.add("object","html-element","#text",function(t){return t.nodeValue}),a.add("object","html-element","#document",function(t){return t.documentElement.outerHTML}),a.add("object","host",function(){return"[Host]"}),a.add("object","set",function(t){var e=t.values(),r=0;this.seen.push(t);for(var a=[],n=e.next();!n.done;){var o=n.value,s=this.format(o);r+=s.length,a.push(s),n=e.next()}return this.seen.pop(),0===a.length?"Set {}":r<=this.maxLineLength?"Set { "+a.join(this.propSep+" ")+" }":"Set {\n"+a.map(i.addSpaces).join(this.propSep+"\n")+"\n}"}),a.add("object","map",function(t){var e=t.entries(),r=0; -this.seen.push(t);for(var a=[],n=e.next();!n.done;){var o,s=n.value,u=this.format(s[0]),c=this.format(s[1]);o=u.length+c.length+4<=this.maxLineLength?u+" => "+c:u+" =>\n"+c,r+=u.length+c.length+4,a.push(o),n=e.next()}return this.seen.pop(),0===a.length?"Map {}":r<=this.maxLineLength?"Map { "+a.join(this.propSep+" ")+" }":"Map {\n"+a.map(i.addSpaces).join(this.propSep+"\n")+"\n}"}),a.prototype.defaultFormat=a.prototype._format_object,o.Formatter=a,e.exports=o},{"./util":22,"should-type":23}],22:[function(t,e){function r(t){return t.split("\n").map(function(t){return" "+t}).join("\n")}function a(t,e,r){t=String(t);var a=!1;if(0>e&&(a=!0,e=-e),t.lengtha;a++){var s=this.checks[a].call(this,t,e,r);if("undefined"!=typeof s)return s}}};var i=new a;i.addTypeOf(s.NUMBER,s.NUMBER).addTypeOf(s.UNDEFINED,s.UNDEFINED).addTypeOf(s.STRING,s.STRING).addTypeOf(s.BOOLEAN,s.BOOLEAN).addTypeOf(s.FUNCTION,s.FUNCTION).addTypeOf(s.SYMBOL,s.SYMBOL).add(function(t){return null===t?new r(s.NULL):void 0}).addClass("[object String]",s.STRING).addClass("[object Boolean]",s.BOOLEAN).addClass("[object Number]",s.NUMBER).addClass("[object Array]",s.ARRAY).addClass("[object RegExp]",s.REGEXP).addClass("[object Error]",s.ERROR).addClass("[object Date]",s.DATE).addClass("[object Arguments]",s.ARGUMENTS).addClass("[object Math]").addClass("[object JSON]").addClass("[object ArrayBuffer]",s.ARRAY_BUFFER).addClass("[object Int8Array]",s.TYPED_ARRAY,"int8").addClass("[object Uint8Array]",s.TYPED_ARRAY,"uint8").addClass("[object Uint8ClampedArray]",s.TYPED_ARRAY,"uint8clamped").addClass("[object Int16Array]",s.TYPED_ARRAY,"int16").addClass("[object Uint16Array]",s.TYPED_ARRAY,"uint16").addClass("[object Int32Array]",s.TYPED_ARRAY,"int32").addClass("[object Uint32Array]",s.TYPED_ARRAY,"uint32").addClass("[object Float32Array]",s.TYPED_ARRAY,"float32").addClass("[object Float64Array]",s.TYPED_ARRAY,"float64").addClass("[object DataView]",s.DATA_VIEW).addClass("[object Map]",s.MAP).addClass("[object WeakMap]",s.WEAK_MAP).addClass("[object Set]",s.SET).addClass("[object WeakSet]",s.WEAK_SET).addClass("[object Promise]",s.PROMISE).addClass("[object Blob]",s.BLOB).addClass("[object File]",s.FILE).addClass("[object FileList]",s.FILE_LIST).addClass("[object XMLHttpRequest]",s.XHR).add(function(t){return typeof Promise===s.FUNCTION&&t instanceof Promise||typeof t.then===s.FUNCTION?new r(s.OBJECT,s.PROMISE):void 0}).add(function(t){return"undefined"!=typeof Buffer&&t instanceof Buffer?new r(s.OBJECT,s.BUFFER):void 0}).add(function(t){return"undefined"!=typeof Node&&t instanceof Node?new r(s.OBJECT,s.HTML_ELEMENT,t.nodeName):void 0}).add(function(t){return t.Boolean===Boolean&&t.Number===Number&&t.String===String&&t.Date===Date?new r(s.OBJECT,s.HOST):void 0}).add(function(){return new r(s.OBJECT)}),n.checker=i,n.TypeChecker=a,n.Type=r,Object.keys(s).forEach(function(t){n[t]=s[t]}),e.exports=n},{"./types":24}],24:[function(t,e){var r={NUMBER:"number",UNDEFINED:"undefined",STRING:"string",BOOLEAN:"boolean",OBJECT:"object",FUNCTION:"function",NULL:"null",ARRAY:"array",REGEXP:"regexp",DATE:"date",ERROR:"error",ARGUMENTS:"arguments",SYMBOL:"symbol",ARRAY_BUFFER:"array-buffer",TYPED_ARRAY:"typed-array",DATA_VIEW:"data-view",MAP:"map",SET:"set",WEAK_SET:"weak-set",WEAK_MAP:"weak-map",PROMISE:"promise",BUFFER:"buffer",HTML_ELEMENT:"html-element",HTML_ELEMENT_TEXT:"html-element-text",DOCUMENT:"document",WINDOW:"window",FILE:"file",FILE_LIST:"file-list",BLOB:"blob",HOST:"host",XHR:"xhr"};e.exports=r},{}]},{},[1])(1)}); \ No newline at end of file diff --git a/cli/node_modules/wrench/.npmignore b/cli/node_modules/wrench/.npmignore deleted file mode 100644 index 05ade97ff..000000000 --- a/cli/node_modules/wrench/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -npm-debug.log -.idea diff --git a/cli/node_modules/wrench/LICENSE b/cli/node_modules/wrench/LICENSE deleted file mode 100644 index a85a94a61..000000000 --- a/cli/node_modules/wrench/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2010 Ryan McGrath - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/cli/node_modules/wrench/lib/wrench.js b/cli/node_modules/wrench/lib/wrench.js deleted file mode 100644 index 01f5e957b..000000000 --- a/cli/node_modules/wrench/lib/wrench.js +++ /dev/null @@ -1,531 +0,0 @@ -/* wrench.js - * - * A collection of various utility functions I've found myself in need of - * for use with Node.js (http://nodejs.org/). This includes things like: - * - * - Recursively deleting directories in Node.js (Sync, not Async) - * - Recursively copying directories in Node.js (Sync, not Async) - * - Recursively chmoding a directory structure from Node.js (Sync, not Async) - * - Other things that I'll add here as time goes on. Shhhh... - * - * ~ Ryan McGrath (ryan [at] venodesigns.net) - */ - -var fs = require("fs"), - _path = require("path"), - isWindows = !!process.platform.match(/^win/); - -/* wrench.readdirSyncRecursive("directory_path"); - * - * Recursively dives through directories and read the contents of all the - * children directories. - */ -exports.readdirSyncRecursive = function(baseDir) { - baseDir = baseDir.replace(/\/$/, ''); - - var readdirSyncRecursive = function(baseDir) { - var files = [], - curFiles, - nextDirs, - isDir = function(fname){ - return fs.existsSync(_path.join(baseDir, fname)) ? fs.statSync( _path.join(baseDir, fname) ).isDirectory() : false; - }, - prependBaseDir = function(fname){ - return _path.join(baseDir, fname); - }; - - curFiles = fs.readdirSync(baseDir); - nextDirs = curFiles.filter(isDir); - curFiles = curFiles.map(prependBaseDir); - - files = files.concat( curFiles ); - - while (nextDirs.length) { - files = files.concat( readdirSyncRecursive( _path.join(baseDir, nextDirs.shift()) ) ); - } - - return files; - }; - - // convert absolute paths to relative - var fileList = readdirSyncRecursive(baseDir).map(function(val){ - return _path.relative(baseDir, val); - }); - - return fileList; -}; - -/* wrench.readdirRecursive("directory_path", function(error, files) {}); - * - * Recursively dives through directories and read the contents of all the - * children directories. - * - * Asynchronous, so returns results/error in callback. - * Callback receives the of files in currently recursed directory. - * When no more directories are left, callback is called with null for all arguments. - * - */ -exports.readdirRecursive = function(baseDir, fn) { - baseDir = baseDir.replace(/\/$/, ''); - - var waitCount = 0; - - function readdirRecursive(curDir) { - var prependcurDir = function(fname){ - return _path.join(curDir, fname); - }; - - waitCount++; - fs.readdir(curDir, function(e, curFiles) { - if (e) { - fn(e); - return; - } - waitCount--; - - curFiles = curFiles.map(prependcurDir); - - curFiles.forEach(function(it) { - waitCount++; - - fs.stat(it, function(e, stat) { - waitCount--; - - if (e) { - fn(e); - } else { - if (stat.isDirectory()) { - readdirRecursive(it); - } - } - - if (waitCount == 0) { - fn(null, null); - } - }); - }); - - fn(null, curFiles.map(function(val) { - // convert absolute paths to relative - return _path.relative(baseDir, val); - })); - - if (waitCount == 0) { - fn(null, null); - } - }); - }; - - readdirRecursive(baseDir); -}; - - - - - -/* wrench.rmdirSyncRecursive("directory_path", failSilent); - * - * Recursively dives through directories and obliterates everything about it. This is a - * Sync-function, which blocks things until it's done. No idea why anybody would want an - * Asynchronous version. :\ - */ -exports.rmdirSyncRecursive = function(path, failSilent) { - var files; - - try { - files = fs.readdirSync(path); - } catch (err) { - - if(failSilent) return; - throw new Error(err.message); - } - - /* Loop through and delete everything in the sub-tree after checking it */ - for(var i = 0; i < files.length; i++) { - var file = _path.join(path, files[i]); - var currFile = fs.lstatSync(file); - - if(currFile.isDirectory()) { - // Recursive function back to the beginning - exports.rmdirSyncRecursive(file); - } else if(currFile.isSymbolicLink()) { - // Unlink symlinks - if (isWindows) { - fs.chmodSync(file, 666) // Windows needs this unless joyent/node#3006 is resolved.. - } - - fs.unlinkSync(file); - } else { - // Assume it's a file - perhaps a try/catch belongs here? - if (isWindows) { - fs.chmodSync(file, 666) // Windows needs this unless joyent/node#3006 is resolved.. - } - - fs.unlinkSync(file); - } - } - - /* Now that we know everything in the sub-tree has been deleted, we can delete the main - directory. Huzzah for the shopkeep. */ - return fs.rmdirSync(path); -}; - - - -function isFileIncluded(opts, dir, filename) { - - function isMatch(filter) { - if (typeof filter === 'function') { - return filter(filename, dir) === true; - } - else { - // Maintain backwards compatibility and use just the filename - return filename.match(filter); - } - } - - if (opts.include || opts.exclude) { - if (opts.exclude) { - if (isMatch(opts.exclude)) { - return false; - } - } - - if (opts.include) { - if (isMatch(opts.include)) { - return true; - } - else { - return false; - } - } - - return true; - } - else if (opts.filter) { - var filter = opts.filter; - - if (!opts.whitelist) { - // if !opts.whitelist is false every file or directory - // which does match opts.filter will be ignored - return isMatch(filter) ? false : true; - } else { - // if opts.whitelist is true every file or directory - // which doesn't match opts.filter will be ignored - return !isMatch(filter) ? false : true; - } - } - - return true; -} - -/* wrench.copyDirSyncRecursive("directory_to_copy", "new_directory_location", opts); - * - * Recursively dives through a directory and moves all its files to a new location. This is a - * Synchronous function, which blocks things until it's done. If you need/want to do this in - * an Asynchronous manner, look at wrench.copyDirRecursively() below. Specify forceDelete to force directory overwrite. - * - * Note: Directories should be passed to this function without a trailing slash. - */ -exports.copyDirSyncRecursive = function(sourceDir, newDirLocation, opts) { - opts = opts || {}; - - try { - if(fs.statSync(newDirLocation).isDirectory()) { - if(opts.forceDelete) { - exports.rmdirSyncRecursive(newDirLocation); - } else { - return new Error('You are trying to delete a directory that already exists. Specify forceDelete in the opts argument to override this. Bailing~'); - } - } - } catch(e) { } - - /* Create the directory where all our junk is moving to; read the mode of the source directory and mirror it */ - var checkDir = fs.statSync(sourceDir); - try { - fs.mkdirSync(newDirLocation, checkDir.mode); - } catch (e) { - //if the directory already exists, that's okay - if (e.code !== 'EEXIST') throw e; - } - - var files = fs.readdirSync(sourceDir); - var hasFilter = opts.filter || opts.include || opts.exclude; - var preserveFiles = opts.preserveFiles === true; - var preserveTimestamps = opts.preserveTimestamps === true; - - for(var i = 0; i < files.length; i++) { - // ignores all files or directories which match the RegExp in opts.filter - if(typeof opts !== 'undefined') { - if (hasFilter) { - if (!isFileIncluded(opts, sourceDir, files[i])) { - continue; - } - } - - if (opts.excludeHiddenUnix && /^\./.test(files[i])) continue; - } - - var currFile = fs.lstatSync(_path.join(sourceDir, files[i])); - - var fCopyFile = function(srcFile, destFile) { - if(typeof opts !== 'undefined' && opts.preserveFiles && fs.existsSync(destFile)) return; - - var contents = fs.readFileSync(srcFile); - fs.writeFileSync(destFile, contents); - var stat = fs.lstatSync(srcFile); - fs.chmodSync(destFile, stat.mode); - if (preserveTimestamps) { - fs.utimesSync(destFile, stat.atime, stat.mtime) - } - }; - - if(currFile.isDirectory()) { - /* recursion this thing right on back. */ - exports.copyDirSyncRecursive(_path.join(sourceDir, files[i]), _path.join(newDirLocation, files[i]), opts); - } else if(currFile.isSymbolicLink()) { - var symlinkFull = fs.readlinkSync(_path.join(sourceDir, files[i])); - symlinkFull = _path.resolve(fs.realpathSync(sourceDir), symlinkFull); - - if (typeof opts !== 'undefined' && !opts.inflateSymlinks) { - fs.symlinkSync(symlinkFull, _path.join(newDirLocation, files[i])); - continue; - } - - var tmpCurrFile = fs.lstatSync(symlinkFull); - if (tmpCurrFile.isDirectory()) { - exports.copyDirSyncRecursive(symlinkFull, _path.join(newDirLocation, files[i]), opts); - } else { - /* At this point, we've hit a file actually worth copying... so copy it on over. */ - fCopyFile(symlinkFull, _path.join(newDirLocation, files[i])); - } - } else { - /* At this point, we've hit a file actually worth copying... so copy it on over. */ - fCopyFile(_path.join(sourceDir, files[i]), _path.join(newDirLocation, files[i])); - } - } -}; - -/* wrench.chmodSyncRecursive("directory", filemode); - * - * Recursively dives through a directory and chmods everything to the desired mode. This is a - * Synchronous function, which blocks things until it's done. - * - * Note: Directories should be passed to this function without a trailing slash. - */ -exports.chmodSyncRecursive = function(sourceDir, filemode) { - var files = fs.readdirSync(sourceDir); - - for(var i = 0; i < files.length; i++) { - var currFile = fs.lstatSync(_path.join(sourceDir, files[i])); - - if(currFile.isDirectory()) { - /* ...and recursion this thing right on back. */ - exports.chmodSyncRecursive(_path.join(sourceDir, files[i]), filemode); - } else { - /* At this point, we've hit a file actually worth copying... so copy it on over. */ - fs.chmod(_path.join(sourceDir, files[i]), filemode); - } - } - - /* Finally, chmod the parent directory */ - fs.chmod(sourceDir, filemode); -}; - - -/* wrench.chownSyncRecursive("directory", uid, gid); - * - * Recursively dives through a directory and chowns everything to the desired user and group. This is a - * Synchronous function, which blocks things until it's done. - * - * Note: Directories should be passed to this function without a trailing slash. - */ -exports.chownSyncRecursive = function(sourceDir, uid, gid) { - var files = fs.readdirSync(sourceDir); - - for(var i = 0; i < files.length; i++) { - var currFile = fs.lstatSync(_path.join(sourceDir, files[i])); - - if(currFile.isDirectory()) { - /* ...and recursion this thing right on back. */ - exports.chownSyncRecursive(_path.join(sourceDir, files[i]), uid, gid); - } else { - /* At this point, we've hit a file actually worth chowning... so own it. */ - fs.chownSync(_path.join(sourceDir, files[i]), uid, gid); - } - } - - /* Finally, chown the parent directory */ - fs.chownSync(sourceDir, uid, gid); -}; - - - -/* wrench.rmdirRecursive("directory_path", callback); - * - * Recursively dives through directories and obliterates everything about it. - */ -exports.rmdirRecursive = function rmdirRecursive(dir, failSilent, clbk){ - if(clbk === null || typeof clbk == 'undefined') - clbk = function(err) {}; - - fs.readdir(dir, function(err, files) { - if(err && typeof failSilent === 'boolean' && !failSilent) - return clbk(err); - - if(typeof failSilent === 'function') - clbk = failSilent; - - (function rmFile(err){ - if (err) return clbk(err); - - var filename = files.shift(); - if (filename === null || typeof filename == 'undefined') - return fs.rmdir(dir, clbk); - - var file = dir+'/'+filename; - fs.lstat(file, function(err, stat){ - if (err) return clbk(err); - if (stat.isDirectory()) - rmdirRecursive(file, rmFile); - else - fs.unlink(file, rmFile); - }); - })(); - }); -}; - -/* wrench.copyDirRecursive("directory_to_copy", "new_location", {forceDelete: bool}, callback); - * - * Recursively dives through a directory and moves all its files to a new - * location. Specify forceDelete to force directory overwrite. - * - * Note: Directories should be passed to this function without a trailing slash. - */ -exports.copyDirRecursive = function copyDirRecursive(srcDir, newDir, opts, clbk) { - var originalArguments = Array.prototype.slice.apply(arguments); - srcDir = _path.normalize(srcDir); - newDir = _path.normalize(newDir); - - fs.stat(newDir, function(err, newDirStat) { - if(!err) { - if(typeof opts !== 'undefined' && typeof opts !== 'function' && opts.forceDelete) - return exports.rmdirRecursive(newDir, function(err) { - copyDirRecursive.apply(this, originalArguments); - }); - else - return clbk(new Error('You are trying to delete a directory that already exists. Specify forceDelete in an options object to override this.')); - } - - if(typeof opts === 'function') - clbk = opts; - - fs.stat(srcDir, function(err, srcDirStat){ - if (err) return clbk(err); - fs.mkdir(newDir, srcDirStat.mode, function(err){ - if (err) return clbk(err); - fs.readdir(srcDir, function(err, files){ - if (err) return clbk(err); - (function copyFiles(err){ - if (err) return clbk(err); - - var filename = files.shift(); - if (filename === null || typeof filename == 'undefined') - return clbk(null); - - var file = srcDir+'/'+filename, - newFile = newDir+'/'+filename; - - fs.stat(file, function(err, fileStat){ - if (err) return clbk(err); - if (fileStat.isDirectory()) - copyDirRecursive(file, newFile, copyFiles, clbk); - else if (fileStat.isSymbolicLink()) - fs.readlink(file, function(err, link){ - if (err) return clbk(err); - fs.symlink(link, newFile, copyFiles); - }); - else - fs.readFile(file, function(err, data){ - if (err) return clbk(err); - fs.writeFile(newFile, data, copyFiles); - }); - }); - })(); - }); - }); - }); - }); -}; - -var mkdirSyncRecursive = function(path, mode) { - var self = this; - path = _path.normalize(path) - - try { - fs.mkdirSync(path, mode); - } catch(err) { - if(err.code == "ENOENT") { - var slashIdx = path.lastIndexOf(_path.sep); - - if(slashIdx > 0) { - var parentPath = path.substring(0, slashIdx); - mkdirSyncRecursive(parentPath, mode); - mkdirSyncRecursive(path, mode); - } else { - throw err; - } - } else if(err.code == "EEXIST") { - return; - } else { - throw err; - } - } -}; -exports.mkdirSyncRecursive = mkdirSyncRecursive; - -exports.LineReader = function(filename, bufferSize) { - this.bufferSize = bufferSize || 8192; - this.buffer = ""; - this.fd = fs.openSync(filename, "r"); - this.currentPosition = 0; -}; - -exports.LineReader.prototype = { - close: function() { - return fs.closeSync(this.fd); - }, - - getBufferAndSetCurrentPosition: function(position) { - var res = fs.readSync(this.fd, this.bufferSize, position, "ascii"); - - this.buffer += res[0]; - if(res[1] === 0) { - this.currentPosition = -1; - } else { - this.currentPosition = position + res[1]; - } - - return this.currentPosition; - }, - - hasNextLine: function() { - while(this.buffer.indexOf('\n') === -1) { - this.getBufferAndSetCurrentPosition(this.currentPosition); - if(this.currentPosition === -1) return false; - } - - if(this.buffer.indexOf("\n") > -1 || this.buffer.length !== 0) return true; - return false; - }, - - getNextLine: function() { - var lineEnd = this.buffer.indexOf("\n"), - result = this.buffer.substring(0, lineEnd != -1 ? lineEnd : this.buffer.length); - - this.buffer = this.buffer.substring(result.length + 1, this.buffer.length); - return result; - } -}; - -// vim: et ts=4 sw=4 diff --git a/cli/node_modules/wrench/package.json b/cli/node_modules/wrench/package.json deleted file mode 100644 index 6c7b77745..000000000 --- a/cli/node_modules/wrench/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "wrench", - "description": "Recursive filesystem (and other) operations that Node *should* have.", - "version": "1.5.8", - "author": { - "name": "Ryan McGrath", - "email": "ryan@venodesigns.net" - }, - "repository": { - "type": "git", - "url": "https://ryanmcgrath@github.com/ryanmcgrath/wrench-js.git" - }, - "bugs": { - "url": "http://github.com/ryanmcgrath/wrench-js/issues" - }, - "directories": { - "lib": "./lib/" - }, - "dependencies": {}, - "devDependencies": { - "nodeunit": ">= 0.6.4" - }, - "main": "./lib/wrench", - "engines": { - "node": ">=0.1.97" - }, - "scripts": { - "test": "nodeunit tests/runner.js" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/ryanmcgrath/wrench-js/raw/master/LICENSE" - } - ], - "homepage": "https://github.com/ryanmcgrath/wrench-js", - "_id": "wrench@1.5.8", - "dist": { - "shasum": "7a31c97f7869246d76c5cf2f5c977a1c4c8e5ab5", - "tarball": "http://registry.npmjs.org/wrench/-/wrench-1.5.8.tgz" - }, - "_from": "wrench@>=1.5.8 <2.0.0", - "_npmVersion": "1.3.21", - "_npmUser": { - "name": "ryanmcgrath", - "email": "ryan@venodesigns.net" - }, - "maintainers": [ - { - "name": "ryanmcgrath", - "email": "ryan@venodesigns.net" - } - ], - "_shasum": "7a31c97f7869246d76c5cf2f5c977a1c4c8e5ab5", - "_resolved": "https://registry.npmjs.org/wrench/-/wrench-1.5.8.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/cli/node_modules/wrench/readme.md b/cli/node_modules/wrench/readme.md deleted file mode 100644 index 2d646d089..000000000 --- a/cli/node_modules/wrench/readme.md +++ /dev/null @@ -1,103 +0,0 @@ -wrench.js - Recursive file operations in Node.js ----------------------------------------------------------------------------- -While I love Node.js, I've found myself missing some functions. Things like -recursively deleting/chmodding a directory (or even deep copying a directory), -or even a basic line reader, shouldn't need to be re-invented time and time again. - -That said, here's my attempt at a re-usable solution, at least until something -more formalized gets integrated into Node.js (*hint hint*). wrench.js is fairly simple -to use - check out the documentation/examples below: - -Possibly Breaking Change in v1.5.0 ------------------------------------------------------------------------------ -In previous versions of Wrench, we went against the OS-default behavior of not -deleting a directory unless the operation is forced. In 1.5.0, this has been -changed to be the behavior people expect there to be - if you try to copy over -a directory that already exists, you'll get an Error returned or thrown stating -that you need to force it. - -Something like this will do the trick: - -``` javascript -wrench.copyDirSyncRecursive('directory_to_copy', 'location_where_copy_should_end_up', { - forceDelete: true -}); -``` - -If you desire the older behavior of Wrench... hit up your package.json. If you -happen to find bugs in the 1.5.0 release please feel free to file them on the -GitHub issues tracker for this project, or send me a pull request and I'll get to -it as fast as I can. Thanks! - -**If this breaks enough projects I will consider rolling it back. Please hit me up if this seems to be the case.** - -Installation ------------------------------------------------------------------------------ - - npm install wrench - -Usage ------------------------------------------------------------------------------ -``` javascript -var wrench = require('wrench'), - util = require('util'); -``` - -### Synchronous operations -``` javascript -// Recursively create directories, sub-trees and all. -wrench.mkdirSyncRecursive(dir, 0777); - -// Recursively delete the entire sub-tree of a directory, then kill the directory -wrench.rmdirSyncRecursive('my_directory_name', failSilently); - -// Recursively read directories contents. -wrench.readdirSyncRecursive('my_directory_name'); - -// Recursively chmod the entire sub-tree of a directory -wrench.chmodSyncRecursive('my_directory_name', 0755); - -// Recursively chown the entire sub-tree of a directory -wrench.chownSyncRecursive("directory", uid, gid); - -// Deep-copy an existing directory -wrench.copyDirSyncRecursive('directory_to_copy', 'location_where_copy_should_end_up', { - forceDelete: bool, // Whether to overwrite existing directory or not - excludeHiddenUnix: bool, // Whether to copy hidden Unix files or not (preceding .) - preserveFiles: bool, // If we're overwriting something and the file already exists, keep the existing - preserveTimestamps: bool, // Preserve the mtime and atime when copying files - inflateSymlinks: bool, // Whether to follow symlinks or not when copying files - filter: regexpOrFunction, // A filter to match files against; if matches, do nothing (exclude). - whitelist: bool, // if true every file or directory which doesn't match filter will be ignored - include: regexpOrFunction, // An include filter (either a regexp or a function) - exclude: regexpOrFunction // An exclude filter (either a regexp or a function) -}); - -// Note: If a RegExp is provided then then it will be matched against the filename. If a function is -// provided then the signature should be the following: -// function(filename, dir) { return result; } - -// Read lines in from a file until you hit the end -var f = new wrench.LineReader('x.txt'); -while(f.hasNextLine()) { - util.puts(f.getNextLine()); -} - -// Note: You will need to close that above line reader at some point, otherwise -// you will run into a "too many open files" error. f.close() or fs.closeSync(f.fd) are -// your friends, as only you know when it is safe to close. -``` - -### Asynchronous operations -``` javascript -// Recursively read directories contents -var files = []; -wrench.readdirRecursive('my_directory_name', function(error, curFiles) { - // curFiles is what you want -}); - -// If you're feeling somewhat masochistic -wrench.copyDirRecursive(srcDir, newDir, {forceDelete: bool /* See sync version */}, callbackfn); -``` - -Questions, comments? Hit me up. (ryan [at] venodesigns.net | http://twitter.com/ryanmcgrath) diff --git a/cli/node_modules/wrench/tests/copydirsync_unix.js b/cli/node_modules/wrench/tests/copydirsync_unix.js deleted file mode 100644 index c48bb622e..000000000 --- a/cli/node_modules/wrench/tests/copydirsync_unix.js +++ /dev/null @@ -1,242 +0,0 @@ -var testCase = require('nodeunit').testCase; -var fs = require('fs'); -var wrench = require('../lib/wrench'); -var path = require('path'); - -function checkResultHidden(test, files) { - var check = [ - '.hidden', - '.hidden.txt', - 'bar.txt', - 'foo', - path.join('.hidden', 'dolor.md'), - path.join('foo', 'bar'), - path.join('foo', 'dolor.md'), - path.join('foo', 'lorem.txt'), - path.join('foo', 'bar', 'ipsum.js') - ]; - - test.deepEqual(files, check); -} - -function checkResultShown(test, files) { - var check = [ - 'bar.txt', - 'foo', - path.join('foo', 'bar'), - path.join('foo', 'dolor.md'), - path.join('foo', 'lorem.txt'), - path.join('foo', 'bar', 'ipsum.js') - ]; - - test.deepEqual(files, check); -} - -function checkResultInflate(test, files) { - var check = [ - '.hidden', - 'bar.txt', - 'test', - path.join('.hidden', 'dolor.md') - ]; - - test.deepEqual(files, check); - - test.deepEqual(fs.lstatSync(path.join(__dirname, 'testdir/.hidden')).isSymbolicLink(), false); - test.deepEqual(fs.lstatSync(path.join(__dirname, 'testdir/bar.txt')).isSymbolicLink(), false); -} - -function checkResultInflateAbsolute(test, files) { - var check = [ - '.hidden', - 'absolute-bar.txt', - 'bar.txt', - 'test', - path.join('.hidden', 'dolor.md') - ]; - - test.deepEqual(files, check); - - test.deepEqual(fs.lstatSync(path.join(__dirname, 'testdir/.hidden')).isSymbolicLink(), false); - test.deepEqual(fs.lstatSync(path.join(__dirname, 'testdir/bar.txt')).isSymbolicLink(), false); -} - -function checkResultDontInflate(test, files) { - var check = [ - '.hidden', - 'bar.txt', - 'test', - path.join('.hidden', 'dolor.md') - ]; - - test.deepEqual(files, check); - - test.deepEqual(fs.lstatSync(path.join(__dirname, 'testdir/.hidden')).isSymbolicLink(), true); - test.deepEqual(fs.lstatSync(path.join(__dirname, 'testdir/bar.txt')).isSymbolicLink(), true); -} - -function checkResultPreserveFiles(test, files) { - checkResultHidden(test, files); - var contents = fs.readFileSync(path.join(__dirname, path.join('testdir2', '.hidden.txt')), "utf8"); - test.deepEqual(contents, 'hidden file'); - contents = fs.readFileSync(path.join(__dirname, path.join('testdir2', 'bar.txt')), "utf8"); - test.deepEqual(contents, 'shown file'); -} - -function checkResultOverwriteFiles(test, files) { - checkResultHidden(test, files); - var contents = fs.readFileSync(path.join(__dirname, path.join('testdir2', '.hidden.txt')), "utf8"); - test.deepEqual(contents, 'just some text for .hidden.txt'); - contents = fs.readFileSync(path.join(__dirname, path.join('testdir2', 'bar.txt')), "utf8"); - test.deepEqual(contents, 'just some text for bar.txt'); -} - -module.exports = testCase({ - test_copyDirSyncRecursiveWithoutOptions: function(test) { - var dir = path.join(__dirname, 'shown'); - var testdir = path.join(__dirname, 'testdir'); - - wrench.copyDirSyncRecursive(dir, testdir); - - wrench.rmdirSyncRecursive(testdir); - test.done(); - }, - test_copyDirSyncRecursiveHidden: function(test) { - var dir = path.join(__dirname, 'shown'); - var testdir = path.join(__dirname, 'testdir'); - - test.ok(fs.existsSync(dir), 'Folders should exist'); - - wrench.copyDirSyncRecursive(dir, testdir, { excludeHiddenUnix: false }); - - var files = wrench.readdirSyncRecursive(testdir); - - checkResultHidden(test, files); - - wrench.rmdirSyncRecursive(testdir); - - test.done(); - }, - test_copyDirSyncRecursiveShown: function(test) { - var dir = path.join(__dirname, 'shown'); - var testdir = path.join(__dirname, 'testdir'); - - test.ok(fs.existsSync(dir), 'Folders should exist'); - - wrench.copyDirSyncRecursive(dir, testdir, { excludeHiddenUnix: true }); - - var files = wrench.readdirSyncRecursive(testdir); - - checkResultShown(test, files); - - wrench.rmdirSyncRecursive(testdir); - - test.done(); - }, - test_copyDirSyncRecursiveInflate: function(test) { - var dir = path.join(__dirname, 'withsymlinks'); - var testdir = path.join(__dirname, 'testdir'); - - test.ok(fs.existsSync(dir), 'Folders should exist'); - - wrench.copyDirSyncRecursive(dir, testdir, { excludeHiddenUnix: false, inflateSymlinks: true }); - - var files = wrench.readdirSyncRecursive(testdir); - - checkResultInflate(test, files); - - wrench.rmdirSyncRecursive(testdir); - - test.done(); - }, - test_copyDirSyncRecursiveInflateAbsoluteSymlinks: function(test) { - var dir = path.join(__dirname, 'withsymlinks'); - var testdir = path.join(__dirname, 'testdir'); - - fs.symlinkSync( - path.resolve(__dirname, 'shown/bar.txt'), - path.join(dir, 'absolute-bar.txt') - ); - - wrench.mkdirSyncRecursive(testdir, 0777); - wrench.copyDirSyncRecursive(dir, testdir, { forceDelete: true, excludeHiddenUnix: false, inflateSymlinks: true }); - - var files = wrench.readdirSyncRecursive(testdir); - - checkResultInflateAbsolute(test, files); - - wrench.rmdirSyncRecursive(testdir); - fs.unlinkSync(path.join(dir, 'absolute-bar.txt')); - - test.done(); - }, - test_copyDirSyncRecursiveDontInflate: function(test) { - var dir = path.join(__dirname, 'withsymlinks'); - var testdir = path.join(__dirname, 'testdir'); - - test.ok(fs.existsSync(dir), 'Folders should exist'); - - wrench.copyDirSyncRecursive(dir, testdir, { excludeHiddenUnix: false, inflateSymlinks: false }); - - var files = wrench.readdirSyncRecursive(testdir); - - checkResultDontInflate(test, files); - - wrench.rmdirSyncRecursive(testdir); - - test.done(); - }, - test_copyDirSyncRecursivePreserveFiles: function(test) { - var dir = path.join(__dirname, 'shown'), - testdir1 = path.join(__dirname, 'testdir1'), - testdir2 = path.join(__dirname, 'testdir2'); - - test.ok(fs.existsSync(dir), 'Folders should exist'); - - // wrench.mkdirSyncRecursive(testdir1, 0777); - wrench.copyDirSyncRecursive(dir, testdir1, { excludeHiddenUnix: false }); - wrench.copyDirSyncRecursive(dir, testdir2, { excludeHiddenUnix: false }); - - fs.writeFileSync(path.join(testdir1, ".hidden.txt"), 'just some text for .hidden.txt'); - fs.writeFileSync(path.join(testdir1, "bar.txt"), 'just some text for bar.txt'); - - wrench.copyDirSyncRecursive(testdir1, testdir2, { excludeHiddenUnix: false, preserveFiles: true }); - - var files = wrench.readdirSyncRecursive(testdir2); - - checkResultPreserveFiles(test, files); - - wrench.rmdirSyncRecursive(testdir1); - wrench.rmdirSyncRecursive(testdir2); - - test.done(); - }, - test_copyDirSyncRecursiveOverwriteFiles: function(test) { - var dir = path.join(__dirname, 'shown'), - testdir1 = path.join(__dirname, 'testdir1'), - testdir2 = path.join(__dirname, 'testdir2'); - - test.ok(fs.existsSync(dir), 'Folders should exist'); - - // wrench.mkdirSyncRecursive(testdir1, 0777); - wrench.copyDirSyncRecursive(dir, testdir1, { excludeHiddenUnix: false }); - wrench.copyDirSyncRecursive(dir, testdir2, { excludeHiddenUnix: false }); - - fs.writeFileSync(path.join(testdir1, ".hidden.txt"), 'just some text for .hidden.txt'); - fs.writeFileSync(path.join(testdir1, "bar.txt"), 'just some text for bar.txt'); - - wrench.copyDirSyncRecursive(testdir1, testdir2, { forceDelete: true, excludeHiddenUnix: false, preserveFiles: false }); - - var files = wrench.readdirSyncRecursive(testdir2); - - checkResultOverwriteFiles(test, files); - - wrench.rmdirSyncRecursive(testdir1); - wrench.rmdirSyncRecursive(testdir2); - - test.done(); - } - -}); - -// vim: et ts=4 sw=4 diff --git a/cli/node_modules/wrench/tests/mkdir.js b/cli/node_modules/wrench/tests/mkdir.js deleted file mode 100644 index 933887be9..000000000 --- a/cli/node_modules/wrench/tests/mkdir.js +++ /dev/null @@ -1,26 +0,0 @@ -var testCase = require('nodeunit').testCase; -var fs = require('fs'); -var wrench = require('../lib/wrench'); -var path = require('path'); - -module.exports = testCase({ - test_mkdirSyncRecursive: function(test) { - var dir = __dirname + '/_tmp/foo/bar'; - - test.equals(fs.existsSync(dir), false, 'Dir shouldn\'t exist - clean it up manually?'); - - wrench.mkdirSyncRecursive(dir, 0777); - - test.equals(fs.existsSync(dir), true, 'Dir should exist now'); - - // clean up - while (dir != __dirname) { - fs.rmdirSync(dir); - dir = path.dirname(dir); - } - - test.done(); - }, -}); - -// vim: et ts=4 sw=4 diff --git a/cli/node_modules/wrench/tests/readdir.js b/cli/node_modules/wrench/tests/readdir.js deleted file mode 100644 index 5e8abf016..000000000 --- a/cli/node_modules/wrench/tests/readdir.js +++ /dev/null @@ -1,61 +0,0 @@ -var testCase = require('nodeunit').testCase; -var fs = require('fs'); -var wrench = require('../lib/wrench'); -var path = require('path'); - - -function checkResult(test, files) { - var check = [ - 'bar.txt', - 'foo', - path.join('foo', 'bar'), - path.join('foo', 'dolor.md'), - path.join('foo', 'lorem.txt'), - path.join('foo', 'bar', 'ipsum.js') - ]; - - test.deepEqual(files, check); - - test.done(); -} - -module.exports = testCase({ - test_readdirSyncRecursive: function(test) { - var dir = path.join(__dirname, 'readdir'); - - test.ok(fs.existsSync(dir), 'Folders should exist'); - - var files = wrench.readdirSyncRecursive(dir); - - checkResult(test, files); - }, - - test_readdirRecursive: function(test) { - var dir = path.join(__dirname, 'readdir'); - - test.ok(fs.existsSync(dir), 'Folders should exist'); - - var allFiles = []; - - wrench.readdirRecursive(dir, function(e, files) { - if (e) throw e; - - if (files) { - allFiles = allFiles.concat(files); - } else { - checkResult(test, allFiles); - } - }); - }, - - test_readdirRecursiveWithNonExistentDirectory: function(test) { - wrench.readdirRecursive('', function (e, files) { - test.ok(e); - test.equal(e.code, 'ENOENT'); - test.equal(files, null); - test.done(); - }); - } -}); - -// vim: et ts=4 sw=4 diff --git a/cli/node_modules/wrench/tests/readdir/bar.txt b/cli/node_modules/wrench/tests/readdir/bar.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/cli/node_modules/wrench/tests/readdir/foo/bar/ipsum.js b/cli/node_modules/wrench/tests/readdir/foo/bar/ipsum.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/cli/node_modules/wrench/tests/readdir/foo/dolor.md b/cli/node_modules/wrench/tests/readdir/foo/dolor.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/cli/node_modules/wrench/tests/readdir/foo/lorem.txt b/cli/node_modules/wrench/tests/readdir/foo/lorem.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/cli/node_modules/wrench/tests/rmdirSyncRecursive.js b/cli/node_modules/wrench/tests/rmdirSyncRecursive.js deleted file mode 100644 index 5f85fe90d..000000000 --- a/cli/node_modules/wrench/tests/rmdirSyncRecursive.js +++ /dev/null @@ -1,74 +0,0 @@ -var testCase = require('nodeunit').testCase; -var fs = require('fs'); -var wrench = require('../lib/wrench'); -var path = require('path'); - -module.exports = testCase({ - test_rmdirSyncRecursive: function(test) { - var dir = __dirname + '/_tmp2/foo/bar'; - - wrench.mkdirSyncRecursive(dir, '777'); - - var f1Path = path.join(dir, 'test1.txt'); - var f2Path = path.join(path.dirname(dir), 'test2.txt'); - var f3Path = path.join(path.dirname(path.dirname(dir)), 'test3.txt'); - - fs.writeFileSync(f1Path, 'foo bar baz'); - fs.writeFileSync(f2Path, 'foo bar baz'); - fs.writeFileSync(f3Path, 'foo bar baz'); - - fs.chmodSync(f1Path, '444'); - fs.chmodSync(f2Path, '444'); - fs.chmodSync(f3Path, '444'); - - test.equals(fs.existsSync(dir), true, 'Dir should exist - mkdirSyncRecursive not working?'); - test.equals(fs.existsSync(f1Path), true, 'File should exist'); - test.equals(fs.existsSync(f2Path), true, 'File should exist'); - test.equals(fs.existsSync(f3Path), true, 'File should exist'); - - wrench.rmdirSyncRecursive(dir); - - test.equals(fs.existsSync(dir), false, 'Dir should not exist now...'); - test.equals(fs.existsSync(f1Path), false, 'File should not exist'); - test.equals(fs.existsSync(f2Path), true, 'File should exist'); - test.equals(fs.existsSync(f3Path), true, 'File should exist'); - - wrench.rmdirSyncRecursive(path.dirname(path.dirname(dir))); - - test.done(); - }, - - test_rmdirSyncRecursiveFromRoot: function(test) { - var dir = __dirname + '/_tmp3/foo/bar'; - - wrench.mkdirSyncRecursive(dir, '777'); - - var f1Path = path.join(dir, 'test1.txt'); - var f2Path = path.join(path.dirname(dir), 'test2.txt'); - var f3Path = path.join(path.dirname(path.dirname(dir)), 'test3.txt'); - - fs.writeFileSync(f1Path, 'foo bar baz'); - fs.writeFileSync(f2Path, 'foo bar baz'); - fs.writeFileSync(f3Path, 'foo bar baz'); - - fs.chmodSync(f1Path, '444'); - fs.chmodSync(f2Path, '444'); - fs.chmodSync(f3Path, '444'); - - test.equals(fs.existsSync(dir), true, 'Dir should exist - mkdirSyncRecursive not working?'); - test.equals(fs.existsSync(f1Path), true, 'File should exist'); - test.equals(fs.existsSync(f2Path), true, 'File should exist'); - test.equals(fs.existsSync(f3Path), true, 'File should exist'); - - wrench.rmdirSyncRecursive(path.dirname(path.dirname(dir))); - - test.equals(fs.existsSync(dir), false, 'Dir should not exist now...'); - test.equals(fs.existsSync(f1Path), false, 'File should not exist'); - test.equals(fs.existsSync(f2Path), false, 'File should not exist'); - test.equals(fs.existsSync(f3Path), false, 'File should not exist'); - - test.done(); - } -}); - -// vim: et ts=4 sw=4 diff --git a/cli/node_modules/wrench/tests/runner.js b/cli/node_modules/wrench/tests/runner.js deleted file mode 100644 index e321a1584..000000000 --- a/cli/node_modules/wrench/tests/runner.js +++ /dev/null @@ -1,9 +0,0 @@ -// `nodeunit tests/runner` -// will run all the tests - -module.exports = { - group_mkdir: require('./mkdir'), - group_readdir: require('./readdir'), - group_copydir: require('./copydirsync_unix'), - group_rmdir: require('./rmdirSyncRecursive') -}; diff --git a/cli/node_modules/wrench/tests/shown/.hidden.txt b/cli/node_modules/wrench/tests/shown/.hidden.txt deleted file mode 100644 index b96b7256c..000000000 --- a/cli/node_modules/wrench/tests/shown/.hidden.txt +++ /dev/null @@ -1 +0,0 @@ -hidden file \ No newline at end of file diff --git a/cli/node_modules/wrench/tests/shown/.hidden/dolor.md b/cli/node_modules/wrench/tests/shown/.hidden/dolor.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/cli/node_modules/wrench/tests/shown/bar.txt b/cli/node_modules/wrench/tests/shown/bar.txt deleted file mode 100644 index 3d36c5cfc..000000000 --- a/cli/node_modules/wrench/tests/shown/bar.txt +++ /dev/null @@ -1 +0,0 @@ -shown file \ No newline at end of file diff --git a/cli/node_modules/wrench/tests/shown/foo/bar/ipsum.js b/cli/node_modules/wrench/tests/shown/foo/bar/ipsum.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/cli/node_modules/wrench/tests/shown/foo/dolor.md b/cli/node_modules/wrench/tests/shown/foo/dolor.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/cli/node_modules/wrench/tests/shown/foo/lorem.txt b/cli/node_modules/wrench/tests/shown/foo/lorem.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/cli/node_modules/wrench/tests/withsymlinks/test b/cli/node_modules/wrench/tests/withsymlinks/test deleted file mode 100644 index dba688210..000000000 --- a/cli/node_modules/wrench/tests/withsymlinks/test +++ /dev/null @@ -1 +0,0 @@ -aaa bbb ccc ddd \ No newline at end of file