gina 0.1.6-alpha.50 → 0.1.6-alpha.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/framework/v0.1.6-alpha.52/VERSION +1 -0
  2. package/framework/v0.1.6-alpha.52/core/asset/plugin/dist/vendor/gina/css/gina.min.css.map +1 -0
  3. package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/asset/plugin/dist/vendor/gina/js/gina.min.js.map +2 -2
  4. package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.map +2 -2
  5. package/framework/v0.1.6-alpha.52/core/deps/busboy-0.2.14/.travis.yml +17 -0
  6. package/framework/v0.1.6-alpha.52/core/deps/busboy-0.2.14/LICENSE +19 -0
  7. package/framework/v0.1.6-alpha.52/core/deps/busboy-0.2.14/README.md +225 -0
  8. package/framework/v0.1.6-alpha.52/core/deps/busboy-0.2.14/deps/encoding/encoding-indexes.js +73 -0
  9. package/framework/v0.1.6-alpha.52/core/deps/busboy-0.2.14/deps/encoding/encoding.js +2391 -0
  10. package/framework/v0.1.6-alpha.52/core/deps/busboy-0.2.14/lib/main.js +89 -0
  11. package/framework/v0.1.6-alpha.52/core/deps/busboy-0.2.14/lib/types/multipart.js +328 -0
  12. package/framework/v0.1.6-alpha.52/core/deps/busboy-0.2.14/lib/types/urlencoded.js +214 -0
  13. package/framework/v0.1.6-alpha.52/core/deps/busboy-0.2.14/lib/utils.js +191 -0
  14. package/framework/v0.1.6-alpha.52/core/deps/busboy-0.2.14/package.json +69 -0
  15. package/framework/v0.1.6-alpha.52/core/deps/busboy-1.6.0/.github/workflows/ci.yml +24 -0
  16. package/framework/v0.1.6-alpha.52/core/deps/busboy-1.6.0/.github/workflows/lint.yml +23 -0
  17. package/framework/v0.1.6-alpha.52/core/deps/busboy-1.6.0/LICENSE +19 -0
  18. package/framework/v0.1.6-alpha.52/core/deps/busboy-1.6.0/README.md +191 -0
  19. package/framework/v0.1.6-alpha.52/core/deps/busboy-1.6.0/bench/bench-multipart-fields-100mb-big.js +149 -0
  20. package/framework/v0.1.6-alpha.52/core/deps/busboy-1.6.0/bench/bench-multipart-fields-100mb-small.js +143 -0
  21. package/framework/v0.1.6-alpha.52/core/deps/busboy-1.6.0/bench/bench-multipart-files-100mb-big.js +154 -0
  22. package/framework/v0.1.6-alpha.52/core/deps/busboy-1.6.0/bench/bench-multipart-files-100mb-small.js +148 -0
  23. package/framework/v0.1.6-alpha.52/core/deps/busboy-1.6.0/bench/bench-urlencoded-fields-100pairs-small.js +101 -0
  24. package/framework/v0.1.6-alpha.52/core/deps/busboy-1.6.0/bench/bench-urlencoded-fields-900pairs-small-alt.js +84 -0
  25. package/framework/v0.1.6-alpha.52/core/deps/busboy-1.6.0/lib/index.js +57 -0
  26. package/framework/v0.1.6-alpha.52/core/deps/busboy-1.6.0/lib/types/multipart.js +680 -0
  27. package/framework/v0.1.6-alpha.52/core/deps/busboy-1.6.0/lib/types/urlencoded.js +350 -0
  28. package/framework/v0.1.6-alpha.52/core/deps/busboy-1.6.0/lib/utils.js +596 -0
  29. package/framework/v0.1.6-alpha.52/core/deps/busboy-1.6.0/package.json +22 -0
  30. package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/server.js +5 -2
  31. package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/package.json +2 -1
  32. package/package.json +2 -2
  33. package/framework/v0.1.6-alpha.50/VERSION +0 -1
  34. package/framework/v0.1.6-alpha.50/core/asset/plugin/dist/vendor/gina/css/gina.min.css.map +0 -1
  35. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/AUTHORS +0 -0
  36. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/LICENSE +0 -0
  37. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/asset/html/nolayout.html +0 -0
  38. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/asset/html/static.html +0 -0
  39. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/asset/img/android-chrome-192x192.png +0 -0
  40. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/asset/img/android-chrome-512x512.png +0 -0
  41. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/asset/img/apple-touch-icon.png +0 -0
  42. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/asset/img/favicon-16x16.png +0 -0
  43. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/asset/img/favicon-32x32.png +0 -0
  44. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/asset/img/favicon.ico +0 -0
  45. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/asset/plugin/README.md +0 -0
  46. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
  47. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/asset/plugin/dist/vendor/gina/html/toolbar.html +0 -0
  48. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/asset/plugin/dist/vendor/gina/js/gina.js +0 -0
  49. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/asset/plugin/dist/vendor/gina/js/gina.min.js +0 -0
  50. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +0 -0
  51. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/asset/plugin/uuid.json +0 -0
  52. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/config.js +0 -0
  53. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/connectors/couchbase/index.js +0 -0
  54. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/connectors/couchbase/lib/connector.js +0 -0
  55. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/connectors/couchbase/lib/connector.v2.js +0 -0
  56. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/connectors/couchbase/lib/connector.v3.js +0 -0
  57. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/connectors/couchbase/lib/connector.v4.js +0 -0
  58. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/connectors/couchbase/lib/n1ql.js +0 -0
  59. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/connectors/couchbase/lib/session-store.js +0 -0
  60. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/connectors/couchbase/lib/session-store.v2.js +0 -0
  61. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
  62. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/connectors/couchbase/lib/session-store.v4.js +0 -0
  63. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/controller/controller.framework.js +0 -0
  64. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/controller/controller.js +0 -0
  65. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/controller/index.js +0 -0
  66. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/deps/swig-client/swig-2.0.0.min.js +0 -0
  67. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/dev/index.js +0 -0
  68. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/dev/lib/class.js +0 -0
  69. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/dev/lib/factory.js +0 -0
  70. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/dev/lib/tools.js +0 -0
  71. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/gna.js +0 -0
  72. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/locales/README.md +0 -0
  73. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/locales/currency.json +0 -0
  74. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/locales/dist/language/en.json +0 -0
  75. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/locales/dist/language/fr.json +0 -0
  76. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/locales/dist/region/en.json +0 -0
  77. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/locales/dist/region/fr.json +0 -0
  78. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/locales/index.js +0 -0
  79. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/locales/src/make.js +0 -0
  80. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/locales/src/resources/currency.csv +0 -0
  81. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/locales/src/resources/region.csv +0 -0
  82. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/locales/src/resources/region.mapping.json +0 -0
  83. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/mime.types +0 -0
  84. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/model/entity.js +0 -0
  85. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/model/index.js +0 -0
  86. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/model/template/entityFactory.js +0 -0
  87. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/model/template/index.js +0 -0
  88. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/plugins/README.md +0 -0
  89. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/plugins/index.js +0 -0
  90. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/plugins/lib/file/README.md +0 -0
  91. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/plugins/lib/file/build.json +0 -0
  92. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/plugins/lib/file/package.json +0 -0
  93. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/plugins/lib/intl/README.md +0 -0
  94. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/plugins/lib/intl/build.json +0 -0
  95. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/plugins/lib/intl/package.json +0 -0
  96. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/plugins/lib/intl/src/main.js +0 -0
  97. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/plugins/lib/storage/README.md +0 -0
  98. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/plugins/lib/storage/build.json +0 -0
  99. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/plugins/lib/storage/package.json +0 -0
  100. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/plugins/lib/storage/src/main.js +0 -0
  101. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/plugins/lib/validator/README.md +0 -0
  102. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/plugins/lib/validator/build.json +0 -0
  103. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/plugins/lib/validator/package.json +0 -0
  104. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/plugins/lib/validator/src/form-validator.js +0 -0
  105. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/plugins/lib/validator/src/main.js +0 -0
  106. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/router.js +0 -0
  107. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/server.express.js +0 -0
  108. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/server.isaac.js +0 -0
  109. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/status.codes +0 -0
  110. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/_gitignore +0 -0
  111. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/boilerplate/bundle/config/app.json +0 -0
  112. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/boilerplate/bundle/config/routing.json +0 -0
  113. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/boilerplate/bundle/config/settings.json +0 -0
  114. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
  115. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/boilerplate/bundle/config/templates.json +0 -0
  116. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
  117. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
  118. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/boilerplate/bundle/controllers/setup.js +0 -0
  119. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/boilerplate/bundle/index.js +0 -0
  120. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
  121. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/boilerplate/bundle_public/css/default.css +0 -0
  122. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
  123. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
  124. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
  125. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/boilerplate/bundle_public/readme.md +0 -0
  126. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
  127. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
  128. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -0
  129. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -0
  130. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
  131. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/command/gina.bat.tpl +0 -0
  132. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/command/gina.tpl +0 -0
  133. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/conf/env.json +0 -0
  134. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/conf/manifest.json +0 -0
  135. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/conf/package.json +0 -0
  136. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/conf/settings.json +0 -0
  137. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/conf/statics.json +0 -0
  138. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/conf/templates.json +0 -0
  139. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/error/client/json/401.json +0 -0
  140. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/error/client/json/403.json +0 -0
  141. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/error/client/json/404.json +0 -0
  142. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/error/server/html/50x.html +0 -0
  143. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/error/server/json/500.json +0 -0
  144. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/error/server/json/503.json +0 -0
  145. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/core/template/extensions/logger/config.json +0 -0
  146. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/helpers/console.js +0 -0
  147. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/helpers/context.js +0 -0
  148. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/helpers/data/LICENSE +0 -0
  149. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/helpers/data/README.md +0 -0
  150. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/helpers/data/package.json +0 -0
  151. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/helpers/data/src/main.js +0 -0
  152. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/helpers/dateFormat.js +0 -0
  153. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/helpers/index.js +0 -0
  154. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/helpers/json/LICENSE +0 -0
  155. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/helpers/json/README.md +0 -0
  156. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/helpers/json/package.json +0 -0
  157. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/helpers/json/src/main.js +0 -0
  158. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/helpers/path.js +0 -0
  159. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/helpers/plugins/README.md +0 -0
  160. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/helpers/plugins/package.json +0 -0
  161. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/helpers/plugins/src/api-error.js +0 -0
  162. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/helpers/plugins/src/main.js +0 -0
  163. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/helpers/prototypes.js +0 -0
  164. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/helpers/task.js +0 -0
  165. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/helpers/text.js +0 -0
  166. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/archiver/README.md +0 -0
  167. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/archiver/build.json +0 -0
  168. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/archiver/package.json +0 -0
  169. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/archiver/src/dep/jszip.min.js +0 -0
  170. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/archiver/src/main.js +0 -0
  171. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/aliases.json +0 -0
  172. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/bundle/add.js +0 -0
  173. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/bundle/arguments.json +0 -0
  174. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/bundle/copy.js +0 -0
  175. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/bundle/cp.js +0 -0
  176. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/bundle/help.js +0 -0
  177. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/bundle/help.txt +0 -0
  178. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/bundle/list.js +0 -0
  179. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/bundle/remove.js +0 -0
  180. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/bundle/rename.js +0 -0
  181. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/bundle/restart.js +0 -0
  182. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/bundle/rm.js +0 -0
  183. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/bundle/start.js +0 -0
  184. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/bundle/status.js +0 -0
  185. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/bundle/stop.js +0 -0
  186. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/env/add.js +0 -0
  187. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/env/get.js +0 -0
  188. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/env/help.js +0 -0
  189. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/env/help.txt +0 -0
  190. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/env/link-dev.js +0 -0
  191. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/env/list.js +0 -0
  192. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/env/remove.js +0 -0
  193. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/env/rm.js +0 -0
  194. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/env/set.js +0 -0
  195. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/env/unset.js +0 -0
  196. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/env/use.js +0 -0
  197. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/framework/build.js +0 -0
  198. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/framework/dot.js +0 -0
  199. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/framework/get.js +0 -0
  200. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/framework/help.js +0 -0
  201. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/framework/help.txt +0 -0
  202. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/framework/init.js +0 -0
  203. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/framework/link-node-modules.js +0 -0
  204. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/framework/link.js +0 -0
  205. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/framework/msg.json +0 -0
  206. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/framework/open.js +0 -0
  207. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/framework/restart.js +0 -0
  208. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/framework/set.js +0 -0
  209. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/framework/start.js +0 -0
  210. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/framework/status.js +0 -0
  211. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/framework/stop.js +0 -0
  212. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/framework/tail.js +0 -0
  213. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/framework/update.js +0 -0
  214. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/framework/version.js +0 -0
  215. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/gina-dev.1.md +0 -0
  216. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/gina-framework.1.md +0 -0
  217. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/gina.1.md +0 -0
  218. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/helper.js +0 -0
  219. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/index.js +0 -0
  220. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/msg.json +0 -0
  221. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/port/help.js +0 -0
  222. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/port/help.txt +0 -0
  223. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/port/inc/scan.js +0 -0
  224. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/port/list.js +0 -0
  225. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/port/reset.js +0 -0
  226. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/port/set.js +0 -0
  227. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/project/add.js +0 -0
  228. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/project/arguments.json +0 -0
  229. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/project/build.js +0 -0
  230. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/project/help.js +0 -0
  231. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/project/help.txt +0 -0
  232. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/project/import.js +0 -0
  233. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/project/list.js +0 -0
  234. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/project/move.js +0 -0
  235. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/project/remove.js +0 -0
  236. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/project/rename.js +0 -0
  237. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/project/restart.js +0 -0
  238. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/project/rm.js +0 -0
  239. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/project/start.js +0 -0
  240. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/project/status.js +0 -0
  241. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/project/stop.js +0 -0
  242. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/protocol/help.js +0 -0
  243. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/protocol/help.txt +0 -0
  244. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/protocol/list.js +0 -0
  245. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/protocol/set.js +0 -0
  246. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/scope/add.js +0 -0
  247. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/scope/help.js +0 -0
  248. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/scope/help.txt +0 -0
  249. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/scope/link-local.js +0 -0
  250. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/scope/link-production.js +0 -0
  251. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/scope/list.js +0 -0
  252. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/scope/remove.js +0 -0
  253. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/scope/rm.js +0 -0
  254. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/scope/use.js +0 -0
  255. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cmd/view/add.js +0 -0
  256. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/collection/README.md +0 -0
  257. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/collection/build.json +0 -0
  258. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/collection/package.json +0 -0
  259. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/collection/src/main.js +0 -0
  260. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/config.js +0 -0
  261. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cron/README.md +0 -0
  262. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cron/package.json +0 -0
  263. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/cron/src/main.js +0 -0
  264. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/domain/LICENSE +0 -0
  265. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/domain/README.md +0 -0
  266. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/domain/dist/public_suffix_list.dat +0 -0
  267. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/domain/exemples/backend.js +0 -0
  268. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/domain/exemples/frontend.html +0 -0
  269. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/domain/package.json +0 -0
  270. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/domain/src/main.js +0 -0
  271. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/generator/index.js +0 -0
  272. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/index.js +0 -0
  273. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/inherits/LICENSE +0 -0
  274. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/inherits/README.md +0 -0
  275. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/inherits/example/inheriting_eventemitter.js +0 -0
  276. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/inherits/example/protected_inheritance.js +0 -0
  277. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/inherits/example/simple_inheritance.js +0 -0
  278. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/inherits/example/super_attribute_overridden_by_child_on_init.js +0 -0
  279. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/inherits/package.json +0 -0
  280. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/inherits/src/main.js +0 -0
  281. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/logger/README.md +0 -0
  282. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/logger/package.json +0 -0
  283. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/logger/src/containers/default/index.js +0 -0
  284. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/logger/src/containers/file/index.js +0 -0
  285. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/logger/src/containers/file/lib/logrotator/README.md +0 -0
  286. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/logger/src/containers/file/lib/logrotator/index.js +0 -0
  287. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/logger/src/containers/mq/index.js +0 -0
  288. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/logger/src/containers/mq/listener.js +0 -0
  289. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/logger/src/containers/mq/speaker.js +0 -0
  290. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/logger/src/helper.js +0 -0
  291. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/logger/src/main.js +0 -0
  292. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/math/index.js +0 -0
  293. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/merge/README.md +0 -0
  294. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/merge/example/merge.js +0 -0
  295. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/merge/example/merge_2_literal objects.js +0 -0
  296. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/merge/example/merge_and_preserve_first.js +0 -0
  297. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/merge/package.json +0 -0
  298. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/merge/src/main.js +0 -0
  299. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/model.js +0 -0
  300. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/proc.js +0 -0
  301. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/routing/README.md +0 -0
  302. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/routing/build.json +0 -0
  303. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/routing/package.json +0 -0
  304. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/routing/src/main.js +0 -0
  305. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/session-store.js +0 -0
  306. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/shell.js +0 -0
  307. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/swig-filters/README.md +0 -0
  308. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/swig-filters/package.json +0 -0
  309. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/swig-filters/src/main.js +0 -0
  310. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/url/README.md +0 -0
  311. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/url/index.js +0 -0
  312. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/url/mocks.json +0 -0
  313. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/url/routing.json +0 -0
  314. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/url/test.js +0 -0
  315. /package/framework/{v0.1.6-alpha.50 → v0.1.6-alpha.52}/lib/validator.js +0 -0
@@ -0,0 +1,89 @@
1
+ var fs = require('fs'),
2
+ WritableStream = require('stream').Writable
3
+ || require('readable-stream').Writable,
4
+ inherits = require('util').inherits;
5
+
6
+ var parseParams = require('./utils').parseParams;
7
+
8
+ function Busboy(opts) {
9
+ if (!(this instanceof Busboy))
10
+ return new Busboy(opts);
11
+ if (opts.highWaterMark !== undefined)
12
+ WritableStream.call(this, { highWaterMark: opts.highWaterMark });
13
+ else
14
+ WritableStream.call(this);
15
+
16
+ this._done = false;
17
+ this._parser = undefined;
18
+ this._finished = false;
19
+
20
+ this.opts = opts;
21
+ if (opts.headers && typeof opts.headers['content-type'] === 'string')
22
+ this.parseHeaders(opts.headers);
23
+ else
24
+ throw new Error('Missing Content-Type');
25
+ }
26
+ inherits(Busboy, WritableStream);
27
+
28
+ Busboy.prototype.emit = function(ev) {
29
+ if (ev === 'finish') {
30
+ if (!this._done) {
31
+ this._parser && this._parser.end();
32
+ return;
33
+ } else if (this._finished) {
34
+ return;
35
+ }
36
+ this._finished = true;
37
+ }
38
+ WritableStream.prototype.emit.apply(this, arguments);
39
+ };
40
+
41
+ Busboy.prototype.parseHeaders = function(headers) {
42
+ this._parser = undefined;
43
+ if (headers['content-type']) {
44
+ var parsed = parseParams(headers['content-type']),
45
+ matched, type;
46
+ for (var i = 0; i < TYPES.length; ++i) {
47
+ type = TYPES[i];
48
+ if (typeof type.detect === 'function')
49
+ matched = type.detect(parsed);
50
+ else
51
+ matched = type.detect.test(parsed[0]);
52
+ if (matched)
53
+ break;
54
+ }
55
+ if (matched) {
56
+ var cfg = {
57
+ limits: this.opts.limits,
58
+ headers: headers,
59
+ parsedConType: parsed,
60
+ highWaterMark: undefined,
61
+ fileHwm: undefined,
62
+ defCharset: undefined,
63
+ preservePath: false
64
+ };
65
+ if (this.opts.highWaterMark)
66
+ cfg.highWaterMark = this.opts.highWaterMark;
67
+ if (this.opts.fileHwm)
68
+ cfg.fileHwm = this.opts.fileHwm;
69
+ cfg.defCharset = this.opts.defCharset;
70
+ cfg.preservePath = this.opts.preservePath;
71
+ this._parser = type(this, cfg);
72
+ return;
73
+ }
74
+ }
75
+ throw new Error('Unsupported content type: ' + headers['content-type']);
76
+ };
77
+
78
+ Busboy.prototype._write = function(chunk, encoding, cb) {
79
+ if (!this._parser)
80
+ return cb(new Error('Not ready to parse. Missing Content-Type?'));
81
+ this._parser.write(chunk, cb);
82
+ };
83
+
84
+ var TYPES = [
85
+ require('./types/multipart'),
86
+ require('./types/urlencoded'),
87
+ ];
88
+
89
+ module.exports = Busboy;
@@ -0,0 +1,328 @@
1
+ // TODO:
2
+ // * support 1 nested multipart level
3
+ // (see second multipart example here:
4
+ // http://www.w3.org/TR/html401/interact/forms.html#didx-multipartform-data)
5
+ // * support limits.fieldNameSize
6
+ // -- this will require modifications to utils.parseParams
7
+
8
+ var ReadableStream = require('stream').Readable || require('readable-stream'),
9
+ inherits = require('util').inherits;
10
+
11
+ var Dicer = require('dicer');
12
+
13
+ var parseParams = require('../utils').parseParams,
14
+ decodeText = require('../utils').decodeText,
15
+ basename = require('../utils').basename;
16
+
17
+ var RE_BOUNDARY = /^boundary$/i,
18
+ RE_FIELD = /^form-data$/i,
19
+ RE_CHARSET = /^charset$/i,
20
+ RE_FILENAME = /^filename$/i,
21
+ RE_NAME = /^name$/i,
22
+ RE_GROUP = /^group$/i;
23
+
24
+ Multipart.detect = /^multipart\/form-data/i;
25
+ function Multipart(boy, cfg) {
26
+ if (!(this instanceof Multipart))
27
+ return new Multipart(boy, cfg);
28
+ var i,
29
+ len,
30
+ self = this,
31
+ boundary,
32
+ limits = cfg.limits,
33
+ parsedConType = cfg.parsedConType || [],
34
+ defCharset = cfg.defCharset || 'utf8',
35
+ preservePath = cfg.preservePath,
36
+ fileopts = (typeof cfg.fileHwm === 'number'
37
+ ? { highWaterMark: cfg.fileHwm }
38
+ : {});
39
+
40
+ for (i = 0, len = parsedConType.length; i < len; ++i) {
41
+ if (Array.isArray(parsedConType[i])
42
+ && RE_BOUNDARY.test(parsedConType[i][0])) {
43
+ boundary = parsedConType[i][1];
44
+ break;
45
+ }
46
+ }
47
+
48
+ function checkFinished() {
49
+ if (nends === 0 && finished && !boy._done) {
50
+ finished = false;
51
+ process.nextTick(function() {
52
+ boy._done = true;
53
+ boy.emit('finish');
54
+ });
55
+ }
56
+ }
57
+
58
+ if (typeof boundary !== 'string')
59
+ throw new Error('Multipart: Boundary not found');
60
+
61
+ var fieldSizeLimit = (limits && typeof limits.fieldSize === 'number'
62
+ ? limits.fieldSize
63
+ : 1 * 1024 * 1024),
64
+ fileSizeLimit = (limits && typeof limits.fileSize === 'number'
65
+ ? limits.fileSize
66
+ : Infinity),
67
+ filesLimit = (limits && typeof limits.files === 'number'
68
+ ? limits.files
69
+ : Infinity),
70
+ fieldsLimit = (limits && typeof limits.fields === 'number'
71
+ ? limits.fields
72
+ : Infinity),
73
+ partsLimit = (limits && typeof limits.parts === 'number'
74
+ ? limits.parts
75
+ : Infinity);
76
+
77
+ var nfiles = 0,
78
+ nfields = 0,
79
+ nends = 0,
80
+ curFile,
81
+ curField,
82
+ finished = false;
83
+
84
+ this._needDrain = false;
85
+ this._pause = false;
86
+ this._cb = undefined;
87
+ this._nparts = 0;
88
+ this._boy = boy;
89
+
90
+ var parserCfg = {
91
+ boundary: boundary,
92
+ maxHeaderPairs: (limits && limits.headerPairs)
93
+ };
94
+ if (fileopts.highWaterMark)
95
+ parserCfg.partHwm = fileopts.highWaterMark;
96
+ if (cfg.highWaterMark)
97
+ parserCfg.highWaterMark = cfg.highWaterMark;
98
+
99
+ this.parser = new Dicer(parserCfg);
100
+ this.parser.on('drain', function() {
101
+ self._needDrain = false;
102
+ if (self._cb && !self._pause) {
103
+ var cb = self._cb;
104
+ self._cb = undefined;
105
+ cb();
106
+ }
107
+ }).on('part', function onPart(part) {
108
+ if (++self._nparts > partsLimit) {
109
+ self.parser.removeListener('part', onPart);
110
+ self.parser.on('part', skipPart);
111
+ boy.hitPartsLimit = true;
112
+ boy.emit('partsLimit');
113
+ return skipPart(part);
114
+ }
115
+
116
+ // hack because streams2 _always_ doesn't emit 'end' until nextTick, so let
117
+ // us emit 'end' early since we know the part has ended if we are already
118
+ // seeing the next part
119
+ if (curField) {
120
+ var field = curField;
121
+ field.emit('end');
122
+ field.removeAllListeners('end');
123
+ }
124
+
125
+ part.on('header', function(header) {
126
+ var contype,
127
+ fieldname,
128
+ parsed,
129
+ charset,
130
+ encoding,
131
+ filename,
132
+ group,
133
+ nsize = 0;
134
+
135
+ if (header['content-type']) {
136
+ parsed = parseParams(header['content-type'][0]);
137
+ if (parsed[0]) {
138
+ contype = parsed[0].toLowerCase();
139
+ for (i = 0, len = parsed.length; i < len; ++i) {
140
+ if (RE_CHARSET.test(parsed[i][0])) {
141
+ charset = parsed[i][1].toLowerCase();
142
+ break;
143
+ }
144
+ }
145
+ }
146
+ }
147
+
148
+ if (contype === undefined)
149
+ contype = 'text/plain';
150
+ if (charset === undefined)
151
+ charset = defCharset;
152
+
153
+ if (header['content-disposition']) {
154
+ parsed = parseParams(header['content-disposition'][0]);
155
+ if (!RE_FIELD.test(parsed[0]))
156
+ return skipPart(part);
157
+ for (i = 0, len = parsed.length; i < len; ++i) {
158
+ if (RE_NAME.test(parsed[i][0])) {
159
+ fieldname = decodeText(parsed[i][1], 'binary', 'utf8');
160
+ } else if (RE_GROUP.test(parsed[i][0])) {
161
+ group = decodeText(parsed[i][1], 'binary', 'utf8');
162
+ } else if (RE_FILENAME.test(parsed[i][0])) {
163
+ filename = decodeText(parsed[i][1], 'binary', 'utf8');
164
+ if (!preservePath)
165
+ filename = basename(filename);
166
+ }
167
+ }
168
+ } else
169
+ return skipPart(part);
170
+
171
+ if (header['content-transfer-encoding'])
172
+ encoding = header['content-transfer-encoding'][0].toLowerCase();
173
+ else
174
+ encoding = '7bit';
175
+
176
+ var onData,
177
+ onEnd;
178
+ if (contype === 'application/octet-stream' || filename !== undefined) {
179
+ // file/binary field
180
+ if (nfiles === filesLimit) {
181
+ if (!boy.hitFilesLimit) {
182
+ boy.hitFilesLimit = true;
183
+ boy.emit('filesLimit');
184
+ }
185
+ return skipPart(part);
186
+ }
187
+
188
+ ++nfiles;
189
+
190
+ if (!boy._events.file) {
191
+ self.parser._ignore();
192
+ return;
193
+ }
194
+
195
+ ++nends;
196
+ var file = new FileStream(fileopts);
197
+ curFile = file;
198
+ file.on('end', function() {
199
+ --nends;
200
+ checkFinished();
201
+ if (self._cb && !self._needDrain) {
202
+ var cb = self._cb;
203
+ self._cb = undefined;
204
+ cb();
205
+ }
206
+ });
207
+ file._read = function(n) {
208
+ if (!self._pause)
209
+ return;
210
+ self._pause = false;
211
+ if (self._cb && !self._needDrain) {
212
+ var cb = self._cb;
213
+ self._cb = undefined;
214
+ cb();
215
+ }
216
+ };
217
+ boy.emit('file', fieldname, file, filename, encoding, contype, group);
218
+
219
+ onData = function(data) {
220
+ if ((nsize += data.length) > fileSizeLimit) {
221
+ var extralen = (fileSizeLimit - (nsize - data.length));
222
+ if (extralen > 0)
223
+ file.push(data.slice(0, extralen));
224
+ file.emit('limit');
225
+ file.truncated = true;
226
+ part.removeAllListeners('data');
227
+ } else if (!file.push(data))
228
+ self._pause = true;
229
+ };
230
+
231
+ onEnd = function() {
232
+ curFile = undefined;
233
+ file.push(null);
234
+ };
235
+ } else {
236
+ // non-file field
237
+ if (nfields === fieldsLimit) {
238
+ if (!boy.hitFieldsLimit) {
239
+ boy.hitFieldsLimit = true;
240
+ boy.emit('fieldsLimit');
241
+ }
242
+ return skipPart(part);
243
+ }
244
+
245
+ ++nfields;
246
+ ++nends;
247
+ var buffer = '',
248
+ truncated = false;
249
+ curField = part;
250
+
251
+ onData = function(data) {
252
+ if ((nsize += data.length) > fieldSizeLimit) {
253
+ var extralen = (fieldSizeLimit - (nsize - data.length));
254
+ buffer += data.toString('binary', 0, extralen);
255
+ truncated = true;
256
+ part.removeAllListeners('data');
257
+ } else
258
+ buffer += data.toString('binary');
259
+ };
260
+
261
+ onEnd = function() {
262
+ curField = undefined;
263
+ if (buffer.length)
264
+ buffer = decodeText(buffer, 'binary', charset);
265
+ boy.emit('field', fieldname, buffer, false, truncated, encoding, contype);
266
+ --nends;
267
+ checkFinished();
268
+ };
269
+ }
270
+
271
+ /* As of node@2efe4ab761666 (v0.10.29+/v0.11.14+), busboy had become
272
+ broken. Streams2/streams3 is a huge black box of confusion, but
273
+ somehow overriding the sync state seems to fix things again (and still
274
+ seems to work for previous node versions).
275
+ */
276
+ part._readableState.sync = false;
277
+
278
+ part.on('data', onData);
279
+ part.on('end', onEnd);
280
+ }).on('error', function(err) {
281
+ if (curFile)
282
+ curFile.emit('error', err);
283
+ });
284
+ }).on('error', function(err) {
285
+ boy.emit('error', err);
286
+ }).on('finish', function() {
287
+ finished = true;
288
+ checkFinished();
289
+ });
290
+ }
291
+
292
+ Multipart.prototype.write = function(chunk, cb) {
293
+ var r;
294
+ if ((r = this.parser.write(chunk)) && !this._pause)
295
+ cb();
296
+ else {
297
+ this._needDrain = !r;
298
+ this._cb = cb;
299
+ }
300
+ };
301
+
302
+ Multipart.prototype.end = function() {
303
+ var self = this;
304
+ if (this._nparts === 0 && !self._boy._done) {
305
+ process.nextTick(function() {
306
+ self._boy._done = true;
307
+ self._boy.emit('finish');
308
+ });
309
+ } else if (this.parser.writable)
310
+ this.parser.end();
311
+ };
312
+
313
+ function skipPart(part) {
314
+ part.resume();
315
+ }
316
+
317
+ function FileStream(opts) {
318
+ if (!(this instanceof FileStream))
319
+ return new FileStream(opts);
320
+ ReadableStream.call(this, opts);
321
+
322
+ this.truncated = false;
323
+ }
324
+ inherits(FileStream, ReadableStream);
325
+
326
+ FileStream.prototype._read = function(n) {};
327
+
328
+ module.exports = Multipart;
@@ -0,0 +1,214 @@
1
+ var Decoder = require('../utils').Decoder,
2
+ decodeText = require('../utils').decodeText;
3
+
4
+ var RE_CHARSET = /^charset$/i;
5
+
6
+ UrlEncoded.detect = /^application\/x-www-form-urlencoded/i;
7
+ function UrlEncoded(boy, cfg) {
8
+ if (!(this instanceof UrlEncoded))
9
+ return new UrlEncoded(boy, cfg);
10
+ var limits = cfg.limits,
11
+ headers = cfg.headers,
12
+ parsedConType = cfg.parsedConType;
13
+ this.boy = boy;
14
+
15
+ this.fieldSizeLimit = (limits && typeof limits.fieldSize === 'number'
16
+ ? limits.fieldSize
17
+ : 1 * 1024 * 1024);
18
+ this.fieldNameSizeLimit = (limits && typeof limits.fieldNameSize === 'number'
19
+ ? limits.fieldNameSize
20
+ : 100);
21
+ this.fieldsLimit = (limits && typeof limits.fields === 'number'
22
+ ? limits.fields
23
+ : Infinity);
24
+
25
+ var charset;
26
+ for (var i = 0, len = parsedConType.length; i < len; ++i) {
27
+ if (Array.isArray(parsedConType[i])
28
+ && RE_CHARSET.test(parsedConType[i][0])) {
29
+ charset = parsedConType[i][1].toLowerCase();
30
+ break;
31
+ }
32
+ }
33
+
34
+ if (charset === undefined)
35
+ charset = cfg.defCharset || 'utf8';
36
+
37
+ this.decoder = new Decoder();
38
+ this.charset = charset;
39
+ this._fields = 0;
40
+ this._state = 'key';
41
+ this._checkingBytes = true;
42
+ this._bytesKey = 0;
43
+ this._bytesVal = 0;
44
+ this._key = '';
45
+ this._val = '';
46
+ this._keyTrunc = false;
47
+ this._valTrunc = false;
48
+ this._hitlimit = false;
49
+ }
50
+
51
+ UrlEncoded.prototype.write = function(data, cb) {
52
+ if (this._fields === this.fieldsLimit) {
53
+ if (!this.boy.hitFieldsLimit) {
54
+ this.boy.hitFieldsLimit = true;
55
+ this.boy.emit('fieldsLimit');
56
+ }
57
+ return cb();
58
+ }
59
+
60
+ var idxeq, idxamp, i, p = 0, len = data.length;
61
+
62
+ while (p < len) {
63
+ if (this._state === 'key') {
64
+ idxeq = idxamp = undefined;
65
+ for (i = p; i < len; ++i) {
66
+ if (!this._checkingBytes)
67
+ ++p;
68
+ if (data[i] === 0x3D/*=*/) {
69
+ idxeq = i;
70
+ break;
71
+ } else if (data[i] === 0x26/*&*/) {
72
+ idxamp = i;
73
+ break;
74
+ }
75
+ if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) {
76
+ this._hitLimit = true;
77
+ break;
78
+ } else if (this._checkingBytes)
79
+ ++this._bytesKey;
80
+ }
81
+
82
+ if (idxeq !== undefined) {
83
+ // key with assignment
84
+ if (idxeq > p)
85
+ this._key += this.decoder.write(data.toString('binary', p, idxeq));
86
+ this._state = 'val';
87
+
88
+ this._hitLimit = false;
89
+ this._checkingBytes = true;
90
+ this._val = '';
91
+ this._bytesVal = 0;
92
+ this._valTrunc = false;
93
+ this.decoder.reset();
94
+
95
+ p = idxeq + 1;
96
+ } else if (idxamp !== undefined) {
97
+ // key with no assignment
98
+ ++this._fields;
99
+ var key, keyTrunc = this._keyTrunc;
100
+ if (idxamp > p)
101
+ key = (this._key += this.decoder.write(data.toString('binary', p, idxamp)));
102
+ else
103
+ key = this._key;
104
+
105
+ this._hitLimit = false;
106
+ this._checkingBytes = true;
107
+ this._key = '';
108
+ this._bytesKey = 0;
109
+ this._keyTrunc = false;
110
+ this.decoder.reset();
111
+
112
+ if (key.length) {
113
+ this.boy.emit('field', decodeText(key, 'binary', this.charset),
114
+ '',
115
+ keyTrunc,
116
+ false);
117
+ }
118
+
119
+ p = idxamp + 1;
120
+ if (this._fields === this.fieldsLimit)
121
+ return cb();
122
+ } else if (this._hitLimit) {
123
+ // we may not have hit the actual limit if there are encoded bytes...
124
+ if (i > p)
125
+ this._key += this.decoder.write(data.toString('binary', p, i));
126
+ p = i;
127
+ if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) {
128
+ // yep, we actually did hit the limit
129
+ this._checkingBytes = false;
130
+ this._keyTrunc = true;
131
+ }
132
+ } else {
133
+ if (p < len)
134
+ this._key += this.decoder.write(data.toString('binary', p));
135
+ p = len;
136
+ }
137
+ } else {
138
+ idxamp = undefined;
139
+ for (i = p; i < len; ++i) {
140
+ if (!this._checkingBytes)
141
+ ++p;
142
+ if (data[i] === 0x26/*&*/) {
143
+ idxamp = i;
144
+ break;
145
+ }
146
+ if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) {
147
+ this._hitLimit = true;
148
+ break;
149
+ }
150
+ else if (this._checkingBytes)
151
+ ++this._bytesVal;
152
+ }
153
+
154
+ if (idxamp !== undefined) {
155
+ ++this._fields;
156
+ if (idxamp > p)
157
+ this._val += this.decoder.write(data.toString('binary', p, idxamp));
158
+ this.boy.emit('field', decodeText(this._key, 'binary', this.charset),
159
+ decodeText(this._val, 'binary', this.charset),
160
+ this._keyTrunc,
161
+ this._valTrunc);
162
+ this._state = 'key';
163
+
164
+ this._hitLimit = false;
165
+ this._checkingBytes = true;
166
+ this._key = '';
167
+ this._bytesKey = 0;
168
+ this._keyTrunc = false;
169
+ this.decoder.reset();
170
+
171
+ p = idxamp + 1;
172
+ if (this._fields === this.fieldsLimit)
173
+ return cb();
174
+ } else if (this._hitLimit) {
175
+ // we may not have hit the actual limit if there are encoded bytes...
176
+ if (i > p)
177
+ this._val += this.decoder.write(data.toString('binary', p, i));
178
+ p = i;
179
+ if ((this._val === '' && this.fieldSizeLimit === 0)
180
+ || (this._bytesVal = this._val.length) === this.fieldSizeLimit) {
181
+ // yep, we actually did hit the limit
182
+ this._checkingBytes = false;
183
+ this._valTrunc = true;
184
+ }
185
+ } else {
186
+ if (p < len)
187
+ this._val += this.decoder.write(data.toString('binary', p));
188
+ p = len;
189
+ }
190
+ }
191
+ }
192
+ cb();
193
+ };
194
+
195
+ UrlEncoded.prototype.end = function() {
196
+ if (this.boy._done)
197
+ return;
198
+
199
+ if (this._state === 'key' && this._key.length > 0) {
200
+ this.boy.emit('field', decodeText(this._key, 'binary', this.charset),
201
+ '',
202
+ this._keyTrunc,
203
+ false);
204
+ } else if (this._state === 'val') {
205
+ this.boy.emit('field', decodeText(this._key, 'binary', this.charset),
206
+ decodeText(this._val, 'binary', this.charset),
207
+ this._keyTrunc,
208
+ this._valTrunc);
209
+ }
210
+ this.boy._done = true;
211
+ this.boy.emit('finish');
212
+ };
213
+
214
+ module.exports = UrlEncoded;