gina 0.1.1-alpha.8 → 0.1.1-alpha.82

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 (293) hide show
  1. package/AUTHORS +2 -1
  2. package/README.md +40 -0
  3. package/bin/cli +47 -38
  4. package/bin/cli-debug +4 -4
  5. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/AUTHORS +0 -0
  6. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/LICENSE +0 -0
  7. package/framework/v0.1.1-alpha.82/VERSION +1 -0
  8. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/asset/html/nolayout.html +0 -0
  9. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/asset/html/static.html +0 -0
  10. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/asset/img/android-chrome-192x192.png +0 -0
  11. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/asset/img/android-chrome-512x512.png +0 -0
  12. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/asset/img/apple-touch-icon.png +0 -0
  13. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/asset/img/favicon-16x16.png +0 -0
  14. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/asset/img/favicon-32x32.png +0 -0
  15. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/asset/img/favicon.ico +0 -0
  16. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/asset/js/plugin/dist/gina.js +0 -0
  17. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/asset/js/plugin/dist/gina.js.map +0 -0
  18. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/asset/js/plugin/dist/gina.min.css +0 -0
  19. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/asset/js/plugin/dist/gina.min.css.map +0 -0
  20. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/asset/js/plugin/dist/gina.min.js +0 -0
  21. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/asset/js/plugin/dist/gina.min.js.map +0 -0
  22. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/asset/js/plugin/dist/gina.onload.min.js +0 -0
  23. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/asset/js/plugin/dist/gina.onload.min.js.map +0 -0
  24. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/asset/js/plugin/readme.md +0 -0
  25. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/asset/js/plugin/uuid.json +0 -0
  26. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/config.js +0 -0
  27. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/connectors/couchbase/index.js +0 -0
  28. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/connectors/couchbase/lib/connector.js +0 -0
  29. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/connectors/couchbase/lib/connector.v2.js +0 -0
  30. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/connectors/couchbase/lib/connector.v3.js +0 -0
  31. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/connectors/couchbase/lib/n1ql.js +0 -0
  32. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/connectors/couchbase/lib/session-store.js +0 -0
  33. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/connectors/couchbase/lib/session-store.v2.js +0 -0
  34. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
  35. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/controller/controller.framework.js +0 -0
  36. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/controller/controller.js +0 -0
  37. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/controller/index.js +0 -0
  38. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/deps/busboy/.travis.yml +0 -0
  39. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/deps/busboy/LICENSE +0 -0
  40. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/deps/busboy/README.md +0 -0
  41. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/deps/busboy/deps/encoding/encoding-indexes.js +0 -0
  42. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/deps/busboy/deps/encoding/encoding.js +0 -0
  43. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/deps/busboy/lib/main.js +0 -0
  44. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/deps/busboy/lib/types/multipart.js +0 -0
  45. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/deps/busboy/lib/types/urlencoded.js +0 -0
  46. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/deps/busboy/lib/utils.js +0 -0
  47. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/deps/busboy/package.json +0 -0
  48. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/deps/swig-client/swig-2.0.0.min.js +0 -0
  49. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/dev/index.js +0 -0
  50. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/dev/lib/class.js +0 -0
  51. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/dev/lib/factory.js +0 -0
  52. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/dev/lib/tools.js +0 -0
  53. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/gna.js +0 -0
  54. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/locales/README.md +0 -0
  55. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/locales/currency.json +0 -0
  56. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/locales/dist/language/en.json +0 -0
  57. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/locales/dist/language/fr.json +0 -0
  58. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/locales/dist/region/en.json +0 -0
  59. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/locales/dist/region/fr.json +0 -0
  60. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/locales/index.js +0 -0
  61. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/locales/src/make.js +0 -0
  62. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/locales/src/resources/currency.csv +0 -0
  63. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/locales/src/resources/region.csv +0 -0
  64. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/locales/src/resources/region.mapping.json +0 -0
  65. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/mime.types +0 -0
  66. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/model/entity.js +0 -0
  67. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/model/index.js +0 -0
  68. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/model/template/entityFactory.js +0 -0
  69. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/model/template/index.js +0 -0
  70. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/plugins/README.md +0 -0
  71. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/plugins/index.js +0 -0
  72. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/plugins/lib/file/README.md +0 -0
  73. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/plugins/lib/file/build.json +0 -0
  74. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/plugins/lib/file/package.json +0 -0
  75. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/plugins/lib/intl/README.md +0 -0
  76. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/plugins/lib/intl/build.json +0 -0
  77. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/plugins/lib/intl/package.json +0 -0
  78. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/plugins/lib/intl/src/main.js +0 -0
  79. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/plugins/lib/storage/README.md +0 -0
  80. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/plugins/lib/storage/build.json +0 -0
  81. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/plugins/lib/storage/package.json +0 -0
  82. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/plugins/lib/storage/src/main.js +0 -0
  83. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/plugins/lib/validator/README.md +0 -0
  84. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/plugins/lib/validator/build.json +0 -0
  85. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/plugins/lib/validator/package.json +0 -0
  86. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/plugins/lib/validator/src/form-validator.js +0 -0
  87. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/plugins/lib/validator/src/main.js +0 -0
  88. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/router.js +0 -0
  89. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/server.express.js +0 -0
  90. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/server.isaac.js +0 -0
  91. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/server.js +0 -0
  92. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/status.codes +0 -0
  93. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/boilerplate/bundle/config/app.json +0 -0
  94. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/boilerplate/bundle/config/routing.json +0 -0
  95. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/boilerplate/bundle/config/settings.json +0 -0
  96. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
  97. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/boilerplate/bundle/config/templates.json +0 -0
  98. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
  99. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
  100. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/boilerplate/bundle/controllers/setup.js +0 -0
  101. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/boilerplate/bundle/index.js +0 -0
  102. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
  103. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/boilerplate/bundle_public/css/default.css +0 -0
  104. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
  105. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
  106. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
  107. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/boilerplate/bundle_public/readme.md +0 -0
  108. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
  109. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/boilerplate/bundle_templates/html/homepage.html +0 -0
  110. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/boilerplate/bundle_templates/html/layout/main.html +0 -0
  111. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/command/gina.bat.tpl +0 -0
  112. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/command/gina.tpl +0 -0
  113. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/conf/env.json +0 -0
  114. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/conf/manifest.json +0 -0
  115. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/conf/package.json +0 -0
  116. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/conf/settings.json +0 -0
  117. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/conf/statics.json +0 -0
  118. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/conf/templates.json +0 -0
  119. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/error/client/json/401.json +0 -0
  120. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/error/client/json/403.json +0 -0
  121. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/error/client/json/404.json +0 -0
  122. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/error/server/html/50x.html +0 -0
  123. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/error/server/json/500.json +0 -0
  124. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/error/server/json/503.json +0 -0
  125. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/core/template/extensions/logger/config.json +0 -0
  126. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/helpers/console.js +0 -0
  127. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/helpers/context.js +0 -0
  128. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/helpers/dateFormat.js +0 -0
  129. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/helpers/index.js +0 -0
  130. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/helpers/json/README.md +0 -0
  131. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/helpers/json/package.json +0 -0
  132. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/helpers/json/src/main.js +0 -0
  133. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/helpers/path.js +0 -0
  134. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/helpers/plugins/README.md +0 -0
  135. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/helpers/plugins/package.json +0 -0
  136. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/helpers/plugins/src/api-error.js +0 -0
  137. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/helpers/plugins/src/main.js +0 -0
  138. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/helpers/prototypes.js +0 -0
  139. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/helpers/task.js +21 -14
  140. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/helpers/text.js +0 -0
  141. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/archiver/README.md +0 -0
  142. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/archiver/build.json +0 -0
  143. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/archiver/package.json +0 -0
  144. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/archiver/src/dep/jszip.min.js +0 -0
  145. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/archiver/src/main.js +0 -0
  146. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/aliases.json +0 -0
  147. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/bundle/add.js +0 -0
  148. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/bundle/arguments.json +0 -0
  149. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/bundle/copy.js +0 -0
  150. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/bundle/cp.js +0 -0
  151. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/bundle/help.js +0 -0
  152. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/bundle/help.txt +0 -0
  153. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/bundle/list.js +0 -0
  154. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/bundle/remove.js +0 -0
  155. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/bundle/rename.js +0 -0
  156. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/bundle/restart.js +0 -0
  157. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/bundle/rm.js +0 -0
  158. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/bundle/start.js +0 -0
  159. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/bundle/status.js +0 -0
  160. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/bundle/stop.js +0 -0
  161. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/env/add.js +0 -0
  162. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/env/get.js +0 -0
  163. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/env/help.js +0 -0
  164. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/env/help.txt +0 -0
  165. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/env/link-dev.js +0 -0
  166. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/env/list.js +0 -0
  167. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/env/remove.js +0 -0
  168. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/env/rm.js +0 -0
  169. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/env/set.js +0 -0
  170. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/env/unset.js +0 -0
  171. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/env/use.js +0 -0
  172. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/framework/dot.js +0 -0
  173. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/framework/get.js +0 -0
  174. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/framework/help.js +0 -0
  175. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/framework/help.txt +0 -0
  176. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/framework/init.js +20 -5
  177. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/framework/msg.json +0 -0
  178. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/framework/open.js +0 -0
  179. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/framework/restart.js +0 -0
  180. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/framework/set.js +45 -22
  181. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/framework/start.js +0 -0
  182. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/framework/status.js +0 -0
  183. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/framework/stop.js +0 -0
  184. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/framework/tail.js +45 -44
  185. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/framework/update.js +0 -0
  186. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/framework/version.js +0 -0
  187. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/gina-dev.1.md +0 -0
  188. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/gina-framework.1.md +0 -0
  189. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/gina.1.md +0 -0
  190. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/helper.js +0 -0
  191. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/index.js +0 -0
  192. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/msg.json +0 -0
  193. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/port/help.js +0 -0
  194. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/port/help.txt +0 -0
  195. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/port/inc/scan.js +0 -0
  196. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/port/list.js +0 -0
  197. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/port/set.js +0 -0
  198. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/project/add.js +0 -0
  199. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/project/arguments.json +0 -0
  200. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/project/build.js +0 -0
  201. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/project/help.js +0 -0
  202. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/project/help.txt +0 -0
  203. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/project/import.js +0 -0
  204. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/project/list.js +0 -0
  205. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/project/move.js +0 -0
  206. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/project/remove.js +0 -0
  207. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/project/rename.js +0 -0
  208. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/project/restart.js +0 -0
  209. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/project/rm.js +0 -0
  210. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/project/start.js +0 -0
  211. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/project/status.js +0 -0
  212. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/project/stop.js +0 -0
  213. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/protocol/help.js +0 -0
  214. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/protocol/help.txt +0 -0
  215. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/protocol/list.js +0 -0
  216. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/protocol/set.js +0 -0
  217. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/scope/help.js +0 -0
  218. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/scope/help.txt +0 -0
  219. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/scope/link-local.js +0 -0
  220. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/scope/list.js +0 -0
  221. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/scope/remove.js +0 -0
  222. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/scope/rm.js +0 -0
  223. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/scope/set.js +0 -0
  224. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/scope/unset.js +0 -0
  225. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/scope/use.js +0 -0
  226. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cmd/view/add.js +0 -0
  227. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/collection/README.md +0 -0
  228. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/collection/build.json +0 -0
  229. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/collection/package.json +0 -0
  230. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/collection/src/main.js +0 -0
  231. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/config.js +0 -0
  232. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cron/README.md +0 -0
  233. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cron/package.json +0 -0
  234. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/cron/src/main.js +0 -0
  235. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/generator/index.js +0 -0
  236. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/index.js +0 -0
  237. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/inherits/LICENSE +0 -0
  238. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/inherits/README.md +0 -0
  239. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/inherits/example/inheriting_eventemitter.js +0 -0
  240. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/inherits/example/protected_inheritance.js +0 -0
  241. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/inherits/example/simple_inheritance.js +0 -0
  242. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/inherits/example/super_attribute_overridden_by_child_on_init.js +0 -0
  243. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/inherits/package.json +0 -0
  244. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/inherits/src/main.js +0 -0
  245. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/logger/README.md +0 -0
  246. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/logger/package.json +0 -0
  247. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/logger/src/containers/default/index.js +0 -0
  248. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/logger/src/containers/file/index.js +0 -0
  249. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/logger/src/containers/file/lib/logrotator/README.md +0 -0
  250. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/logger/src/containers/file/lib/logrotator/index.js +0 -0
  251. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/logger/src/containers/mq/index.js +0 -0
  252. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/logger/src/containers/mq/listener.js +0 -0
  253. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/logger/src/containers/mq/speaker.js +0 -0
  254. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/logger/src/helper.js +0 -0
  255. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/logger/src/main.js +0 -0
  256. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/math/index.js +0 -0
  257. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/merge/README.md +0 -0
  258. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/merge/example/merge.js +0 -0
  259. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/merge/example/merge_2_literal objects.js +0 -0
  260. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/merge/example/merge_and_preserve_first.js +0 -0
  261. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/merge/package.json +0 -0
  262. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/merge/src/main.js +0 -0
  263. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/model.js +0 -0
  264. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/proc.js +0 -0
  265. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/routing/README.md +0 -0
  266. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/routing/build.json +0 -0
  267. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/routing/package.json +0 -0
  268. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/routing/src/main.js +0 -0
  269. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/session-store.js +0 -0
  270. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/shell.js +0 -0
  271. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/swig-filters/README.md +0 -0
  272. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/swig-filters/package.json +0 -0
  273. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/swig-filters/src/main.js +0 -0
  274. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/url/README.md +0 -0
  275. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/url/index.js +0 -0
  276. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/url/mocks.json +0 -0
  277. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/url/routing.json +0 -0
  278. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/url/test.js +0 -0
  279. package/framework/{v0.1.1-alpha.8 → v0.1.1-alpha.82}/lib/validator.js +0 -0
  280. package/framework/v0.1.1-alpha.82/package.json +14 -0
  281. package/package.json +14 -16
  282. package/resources/home/main.json +16 -1
  283. package/resources/home/settings.json +1 -0
  284. package/resources/home/user/extensions/logger/default/config.json +1 -1
  285. package/resources/package.json.template +11 -4
  286. package/script/post_install.js +201 -27
  287. package/script/pre_install.js +317 -55
  288. package/script/prepare_version.js +93 -89
  289. package/utils/helper.js +191 -37
  290. package/doc/framework/cli/doc.json +0 -9
  291. package/doc/framework/index.md +0 -60
  292. package/framework/v0.1.1-alpha.8/VERSION +0 -1
  293. package/framework/v0.1.1-alpha.8/package.json +0 -14
@@ -18,6 +18,219 @@ var lib = null;
18
18
  var isWin32 = function() {
19
19
  return (process.platform === 'win32') ? true : false;
20
20
  };
21
+ var existsSync = function(path) {
22
+ if ( typeof(fs.accessSync) != 'undefined' ) {
23
+ try {
24
+ fs.accessSync(path, fs.constants.F_OK);
25
+ return true;
26
+ } catch (err) {
27
+ return false;
28
+ }
29
+ } else { // support for old version of nodejs
30
+ return fs.existsSync(path);
31
+ }
32
+ }
33
+
34
+ var isWritableSync = function(path) {
35
+ var canWrite = false;
36
+ if ( typeof(fs.accessSync) != 'undefined' ) {
37
+ try {
38
+ fs.accessSync(path, fs.constants.W_OK);
39
+ canWrite = true;
40
+ } catch (err) {
41
+ canWrite = false;
42
+ }
43
+ } else { // support for old version of nodejs
44
+
45
+ try {
46
+ canWrite = (fs.statSync(path).mode & (fs.constants.S_IRUSR | fs.constants.S_IRGRP | fs.constants.S_IROTH));
47
+ } catch (err) {
48
+ canWrite = false
49
+ }
50
+ }
51
+
52
+ return canWrite
53
+ };
54
+
55
+ /**
56
+ * Get run\lock path
57
+ * @returns {string} rundir
58
+ * */
59
+ var getRunDir = function(prefix) {
60
+ if ( !prefix || typeof(prefix) == 'undefined' || prefix == '' ) {
61
+ prefix = '/usr/local'
62
+ }
63
+ // Trying to retrieve original value if already defined
64
+ // Means `/usr/local/var/lock` or `/usr/local/var/run` by default.
65
+ var runDir = (isWin32()) ? getUserHome() + '\\.gina\\run' : prefix+'/var/lock';
66
+
67
+ if ( !isWin32() && new RegExp('^'+ prefix).test(runDir) && !isWritableSync(prefix) ) {
68
+ runDir = getUserHome() +'/.gina/run';
69
+ if ( !existsSync(runDir) ) {
70
+ fs.mkdirSync(runDir)
71
+ }
72
+
73
+ return runDir
74
+ }
75
+
76
+ if ( existsSync(runDir) ) {
77
+ if ( !isWritableSync(runDir) ) {
78
+ throw new Error('location `'+ runDir +'` found but not writable !' )
79
+ }
80
+
81
+ runDir += ( isWin32() ) ? '' : '/gina'
82
+ if ( !existsSync(runDir) ) {
83
+ fs.mkdirSync(runDir)
84
+ }
85
+
86
+ return runDir;
87
+ }
88
+
89
+ try {
90
+ //by default.
91
+ runDir = prefix+'/var';
92
+ if ( !existsSync(runDir) ) {
93
+ fs.mkdirSync(runDir)
94
+ }
95
+ runDir += '/run';
96
+ if ( !existsSync(runDir) ) {
97
+ fs.mkdirSync(runDir)
98
+ }
99
+ } catch (err) {
100
+ throw new Error('location error: `'+ runDir+'`\n'+ err.stack);
101
+ }
102
+
103
+ runDir += ( isWin32() ) ? '\\gina' : '/gina'
104
+ if ( !existsSync(runDir) ) {
105
+ fs.mkdirSync(runDir)
106
+ }
107
+
108
+ return runDir;
109
+ };
110
+
111
+ var getTmpDir = function(prefix) {
112
+ if ( !prefix || typeof(prefix) == 'undefined' || prefix == '' ) {
113
+ prefix = '/usr/local'
114
+ }
115
+ // support for node 0.10.x & 0.11.x
116
+ var tmp = (os.tmpdir) ? os.tmpdir : function() {
117
+ var tmpDir = null;
118
+ if ( isWin32() ) {
119
+ tmpDir = process.env.TEMP ||
120
+ process.env.TMP ||
121
+ (process.env.SystemRoot || process.env.windir) + '\\Temp'
122
+ ;
123
+ } else {
124
+ tmpDir = process.env.TMPDIR ||
125
+ process.env.TMP ||
126
+ process.env.TEMP ||
127
+ prefix+'/var/tmp'
128
+ ;
129
+
130
+ if ( new RegExp('^'+ prefix).test(tmpDir) && !isWritableSync(prefix) ) {
131
+ tmpDir = getUserHome() +'/.gina/tmp';
132
+ if ( !existsSync(tmpDir) ) {
133
+ fs.mkdirSync(tmpDir)
134
+ }
135
+ }
136
+
137
+ if ( new RegExp('^'+ prefix +'/var').test(tmpDir) && !existsSync(prefix+'/var') ) {
138
+ fs.mkdirSync(prefix+'/var');
139
+ }
140
+ }
141
+
142
+ if ( !existsSync(tmpDir) ) {
143
+ fs.mkdirSync(tmpDir);
144
+ }
145
+
146
+ return tmpDir
147
+ };
148
+
149
+ return tmp()
150
+ };
151
+
152
+ /**
153
+ * Get log path - %SystemRoot%\system32\winevt\logs or /
154
+ *
155
+ * @returns {string} logPath
156
+ * */
157
+ var getLogDir = function(prefix) {
158
+ if ( !prefix || typeof(prefix) == 'undefined' || prefix == '' ) {
159
+ prefix = '/usr/local'
160
+ }
161
+ // Trying to retrieve original value if already defined
162
+ var logDir = null;
163
+
164
+ if ( isWin32() ) {
165
+ logDir = process.env.LOG ||
166
+ process.env.LOGS ||
167
+ (process.env.SystemRoot || process.env.windir) + '\\System32\\Winevt\\Logs'
168
+ ;
169
+
170
+ if ( !logDir || logDir == '' ) {
171
+ throw new Error('Log directory not defined or not found !');
172
+ }
173
+
174
+ if ( !isWritableSync(logDir) ) {
175
+ throw new Error('Log directory found but not writable: need permissions for `'+ logDir +'`');
176
+ }
177
+
178
+ if ( !/gina$/.test(logDir) ) {
179
+ logDir += '\\gina'
180
+ }
181
+ } else {
182
+ logDir = process.env.LOGDIR ||
183
+ process.env.LOG ||
184
+ process.env.LOGS ||
185
+ prefix+'/var/log'
186
+ ;
187
+
188
+ if ( new RegExp('^'+ prefix).test(logDir) && !isWritableSync(prefix) ) {
189
+ logDir = getUserHome() +'/.gina/log';
190
+ if ( !existsSync(logDir) ) {
191
+ fs.mkdirSync(logDir)
192
+ }
193
+
194
+ return logDir
195
+ }
196
+
197
+ if ( new RegExp('^'+ prefix +'/var').test(logDir) && !existsSync(prefix+'/var') ) {
198
+ fs.mkdirSync(prefix+'/var');
199
+ }
200
+
201
+ if ( !existsSync(logDir) ) {
202
+ fs.mkdirSync(logDir);
203
+ }
204
+
205
+ if ( !/gina$/.test(logDir) ) {
206
+ logDir += '/gina'
207
+ }
208
+ }
209
+
210
+ if ( !existsSync(logDir) ) {
211
+ fs.mkdirSync(logDir)
212
+ }
213
+
214
+ return logDir;
215
+ };
216
+
217
+ var getUserHome = function() {
218
+ var home = os.homedir ? os.homedir : function() {
219
+ var homeDir = process.env[(isWin32()) ? 'USERPROFILE' : 'HOME'];
220
+
221
+ if ( !homeDir || homeDir == '' ) {
222
+ throw new Error('Home directory not defined or not found !');
223
+ }
224
+
225
+ if ( !isWritableSync(homeDir) ) {
226
+ throw new Error('Home directory found but not writable: need permissions for `'+ homeDir +'`');
227
+ }
228
+
229
+ return homeDir;
230
+ };
231
+
232
+ return home()
233
+ };
21
234
 
22
235
  var helpers = null;
23
236
 
@@ -27,33 +240,62 @@ var helpers = null;
27
240
  * if you need to test, go to gina main folder
28
241
  * $ node --inspect-brk=5858 ./script/pre_install.js -g
29
242
  *
243
+ * NB.: At this stage, Gina is not yet installed and no lib or helper cannot be used here
244
+ * excepted if Gina has been previously installed
245
+ *
30
246
  * @constructor
31
247
  * */
32
248
  function PreInstall() {
33
- var self = {}, _this = this;
249
+ var self = {};
34
250
 
35
251
  var init = function() {
36
252
 
37
253
  self.isGlobalInstall = false;
38
- self.prefix = execSync('npm config get prefix');
254
+ self.isResetNeeded = process.env.npm_config_reset || false;
39
255
  self.isGinaInstall = false;
256
+ self.prefix = process.env.npm_config_prefix || execSync('npm config get prefix').toString().replace(/\n/g, '');
257
+ self.isCustomPrefix = false;
40
258
 
41
259
  var args = process.argv, i = 0, len = args.length;
42
260
  for (; i < len; ++i) {
43
- if (args[i] == '-g' ) {
261
+ if ( /^(\-g|\-\-global)$/.test(args[i]) ) {
44
262
  self.isGlobalInstall = true;
45
- break;
263
+ continue;
264
+ }
265
+
266
+ if ( /^\-\-reset$/.test(args[i]) ) {
267
+ self.isResetNeeded = true;
268
+ continue;
269
+ }
270
+
271
+ if ( /^\-\-prefix\=/.test(args[i] ) ) {
272
+ self.isCustomPrefix = true;
273
+ self.prefix = args[i].split(/\=/)[1];
274
+ continue;
46
275
  }
47
276
  }
48
277
 
49
- if ( !self.isGlobalInstall ) { //global install
50
- self.root = process.cwd(); // project path
51
- self.tmpDir = os.tmpdir(); // default tmp path
52
- console.error('local installation is not supported for this version at the moment.');
53
- console.info('please use `npm install -g gina`');
54
- process.exit(1);
278
+ process.env.npm_config_prefix = self.prefix;
279
+ console.debug('process.env.npm_config_prefix => '+ process.env.npm_config_prefix);
280
+ if (
281
+ // process.env.npm_config_prefix
282
+ // &&
283
+ self.prefix != process.env.npm_config_prefix
284
+ ) {
285
+ // self.prefix = process.env.npm_config_prefix.toString();
286
+ self.isCustomPrefix = true;
55
287
  }
56
288
 
289
+ if ( !self.isGlobalInstall ) { // none global install
290
+ self.prefix = process.env.npm_config_prefix = process.cwd();
291
+ // self.root = process.cwd(); // project path
292
+ // self.tmpDir = os.tmpdir(); // default tmp path
293
+ // console.error('local installation is not supported for this version at the moment.');
294
+ // console.info('please use `npm install -g gina`\n or\nif you are trying to link gina to your project, use `npm link gina` if Gina has already been installed');
295
+ // process.exit(1);
296
+ }
297
+ console.debug('self.prefix => '+ self.prefix);
298
+
57
299
 
58
300
  begin(0);
59
301
  // TODO check old framework version to be archived
@@ -87,45 +329,86 @@ function PreInstall() {
87
329
  }
88
330
  }
89
331
 
332
+
333
+
90
334
  self.checkRequirements = async function(done) {
91
335
  // TODO - handle windows case
92
- if ( /true/i.test(self.isWin32) ) {
336
+ if ( /^true$/i.test(isWin32()) ) {
93
337
  return done( new Error('Windows in not yet fully supported. Thank you for your patience'));
94
338
  }
95
339
 
340
+ var ginaHome = getUserHome() + ( isWin32() ? '\\.gina' : '/.gina' );
341
+ if ( self.isResetNeeded && existsSync(ginaHome) ) {
342
+ console.debug('`.gina` reset requested ...');
343
+ fs.rmSync(ginaHome, { recursive: true, force: true });
344
+ }
345
+
96
346
  // Let's temporarily install `colors` into `GINA_DIR` it will be removed by the `post_install.js` script
97
347
  var initialDir = process.cwd();
98
348
  var frameworkPath = __dirname +'/..';
99
349
  if ( !fs.existsSync(frameworkPath +'/node_modules/colors') ) {
100
350
  process.chdir(frameworkPath);
351
+ var oldConfigGlobal = process.env.npm_config_global;
352
+ process.env.npm_config_global=false;
101
353
  var cmd = ( isWin32() ) ? 'npm.cmd install colors@1.4.0' : 'npm install colors@1.4.0';
102
354
  execSync(cmd);
103
355
  process.chdir(initialDir);
356
+ process.env.npm_config_global=oldConfigGlobal;
104
357
  }
105
358
 
359
+
106
360
  if ( !fs.existsSync(frameworkPath +'/node_modules/gina') ) {
107
361
  return done();
108
362
  }
109
- self.isGinaInstall = true;
110
363
 
111
- helpers = require(frameworkPath+ '/utils/helpers');
364
+ self.isWin32 = isWin32();
112
365
 
113
- lib = require('./lib');
114
- console = lib.logger;
115
-
116
- self.isWin32 = isWin32();//getEnvVar('GINA_IS_WIN32');
117
- self.path = getEnvVar('GINA_FRAMEWORK');
118
- self.gina = getEnvVar('GINA_DIR');
119
- self.root = self.gina; // by default
120
366
 
121
367
  console.debug('framework path: ' + self.gina);
122
368
  console.debug('framework version path: ' + self.path);
123
369
  console.debug('cwd path: ' + self.root );
124
- console.debug('this is a global install ...');
370
+ console.debug('Is this a global install: '+ self.isGlobalInstall);
125
371
 
126
372
  done();
127
373
  }
128
374
 
375
+ self.checkRequiredFolders = function(done) {
376
+
377
+ var ginaHomeDir = getUserHome() + ((isWin32()) ? '\\.gina': '/.gina');
378
+ if (!existsSync(ginaHomeDir) ) {
379
+ fs.mkdirSync(ginaHomeDir)
380
+ }
381
+
382
+ // check for `/usr/local/tmp` or `/tmp`
383
+ var tmpDir = getTmpDir(self.prefix);
384
+ console.info('`tmp` dir -> '+ tmpDir);
385
+ if ( !existsSync(tmpDir) ) {
386
+ fs.mkdirSync(tmpDir)
387
+ }
388
+
389
+
390
+ // check for `/usr/local/run`
391
+ var runDir = getRunDir(self.prefix);
392
+ console.info('`run` dir -> '+ runDir);
393
+
394
+ // check for `/usr/local/log`
395
+ var logDir = getLogDir(self.prefix);
396
+ console.info('`log` dir -> '+ logDir);
397
+
398
+ // var settingsBackupPath = tmpDir + ((isWin32()) ? '\\': '/') + 'gina-install-settings.json';
399
+ // console.info('tmp folder backup -> '+ settingsBackupPath);
400
+ // var data = JSON.stringify({
401
+ // prefix: self.prefix,
402
+ // rundir: runDir,
403
+ // logdir: logDir,
404
+ // tmpdir: tmpDir
405
+ // }, null, 4);
406
+ // fs.writeFileSync(settingsBackupPath, data);
407
+ // fs.chmodSync(settingsBackupPath, 0755);
408
+
409
+ done()
410
+ }
411
+
129
412
 
130
413
  /**
131
414
  * Setup global installation path
@@ -199,20 +482,30 @@ function PreInstall() {
199
482
 
200
483
  self.checkIfGinaIsAlreadyInstalled = async function(done) {
201
484
 
202
- console.debug('Checking if Gina is already installed');
485
+ console.debug('Checking if Gina is already installed: '+ self.isGinaInstall);
203
486
  if (!self.isGinaInstall) {
204
487
  return done();
205
488
  }
206
489
 
490
+
207
491
  // Backup current version
208
492
 
209
493
  // check for ~/.gina
210
- var ginaHomeDir = _(getUserHome() + '/.gina', true);
494
+ var ginaHomeDir = getUserHome() + ((isWin32()) ? '\\.gina': '/.gina');
211
495
  // if not found -> skip because it means that gina might not be installed or configured yet
212
- if ( !new _(ginaHomeDir).existsSync() ) {
496
+ if (!existsSync(ginaHomeDir) ) {
213
497
  return done();
214
498
  }
215
499
 
500
+ var frameworkPath = __dirname +'/..';
501
+ helpers = require(frameworkPath+ '/utils/helpers');
502
+ lib = require('./lib');
503
+
504
+ console = lib.logger;
505
+ self.path = getEnvVar('GINA_FRAMEWORK');
506
+ self.gina = getEnvVar('GINA_DIR');
507
+ self.root = self.gina; // by default
508
+
216
509
  // check if framework version folder is found
217
510
  var versionsFolders = null, frameworkPath = null;
218
511
  try {
@@ -277,37 +570,6 @@ function PreInstall() {
277
570
  }
278
571
  }
279
572
  // It is not required to update `~/.gina/main.json` && `~/.gina/{shortVersion}/settings.json`
280
-
281
- self.checkRequiredFolders = function(done) {
282
-
283
- // check for `/usr/local/tmp`
284
- var tmpDir = getTmpDir()
285
- console.info('`tmp` dir -> '+ tmpDir);
286
- var tmpDirObj = new _(tmpDir, true);
287
- if ( !tmpDirObj.existsSync() ) {
288
- tmpDirObj.mkdirSync()
289
- }
290
-
291
- // check for `/usr/local/run`
292
- var runDir = getRunDir();
293
- console.info('`run` dir -> '+ runDir);
294
- var runDirObj = new _(runDir, true);
295
- if ( !runDirObj.existsSync() ) {
296
- runDirObj.mkdirSync()
297
- }
298
-
299
- // check for `/usr/local/log`
300
- var logDir = getLogDir();
301
- console.info('`log` dir -> '+ logDir);
302
- var logDirObj = new _(logDir, true);
303
- if ( !logDirObj.existsSync() ) {
304
- logDirObj.mkdirSync()
305
- }
306
-
307
- done()
308
- }
309
-
310
-
311
573
  done()
312
574
  }
313
575
 
@@ -296,107 +296,111 @@ function PrepareVersion() {
296
296
  done();
297
297
  }
298
298
 
299
- self.pushChangesToGit = function(done) {
300
299
 
301
- var cmd = null;
302
- var version = self.selectedVersion.replace(/^[a-z]+/ig, '');
300
+ // self.pushChangesToGit = function(done) {
301
+
302
+ // var cmd = null;
303
+ // var version = self.selectedVersion.replace(/^[a-z]+/ig, '');
304
+
305
+ // // getting current branch
306
+ // // git rev-parse --abbrev-ref HEAD
307
+ // // => 010
308
+ // var currentBranch = null;
309
+ // try {
310
+ // currentBranch = execSync("git rev-parse --abbrev-ref HEAD")
311
+ // .toString()
312
+ // .replace(/(\n|\r|\t)/g, '');
313
+ // } catch (err) {
314
+ // // nothing to do
315
+ // return done( new Error('[GIT] No branch selected') )
316
+ // }
303
317
 
304
- // getting current branch
305
- // git rev-parse --abbrev-ref HEAD
306
- // => 010
307
- var currentBranch = null;
308
- try {
309
- currentBranch = execSync("git rev-parse --abbrev-ref HEAD")
310
- .toString()
311
- .replace(/(\n|\r|\t)/g, '');
312
- } catch (err) {
313
- // nothing to do
314
- return done( new Error('[GIT] No branch selected') )
315
- }
316
318
 
319
+ // // create new branch if needed
320
+ // // e.g: 0.1.0-alpha.1 -> 010-alpha1
321
+ // var targetedBranch = version.replace(/\./g, '');
322
+ // self.targetedBranch = targetedBranch;
317
323
 
318
- // create new branch if needed
319
- // e.g: 0.1.0-alpha.1 -> 010-alpha1
320
- var targetedBranch = version.replace(/\./g, '');
321
- self.targetedBranch = targetedBranch;
324
+ // console.debug('[GIT] Current branch: '+ currentBranch);
325
+ // console.debug('[GIT] Targeted branch: '+ targetedBranch);
322
326
 
323
- console.debug('[GIT] Current branch: '+ currentBranch);
324
- console.debug('[GIT] Targeted branch: '+ targetedBranch);
325
327
 
328
+ // // check if targeted branch exists
329
+ // // git rev-parse --verify 011
330
+ // var branchExists = null;
331
+ // try {
332
+ // branchExists = execSync("git rev-parse --verify "+ targetedBranch)
333
+ // .toString()
334
+ // .replace(/(\n|\r|\t)/g, '');
335
+ // } catch (err) {
336
+ // // nothing to do
337
+ // }
326
338
 
327
- // check if targeted branch exists
328
- // git rev-parse --verify 011
329
- var branchExists = null;
330
- try {
331
- branchExists = execSync("git rev-parse --verify "+ targetedBranch)
332
- .toString()
333
- .replace(/(\n|\r|\t)/g, '');
334
- } catch (err) {
335
- // nothing to do
336
- }
339
+ // if (!branchExists) {
340
+ // console.debug('No existing branch found, creating a new one !');
341
+ // try {
342
+ // execSync("git checkout -b "+ targetedBranch);
343
+ // // pushing to new branch
344
+ // console.debug('setting up remote branch `'+ targetedBranch +'` to git ...');
345
+ // execSync("git push --set-upstream origin "+ targetedBranch);
346
+ // } catch (err) {
347
+ // console.error(err.stack||err.message||err);
348
+ // return done(err);
349
+ // }
350
+ // }
351
+ // // use existing to push updates
352
+ // else {
353
+
354
+ // if (currentBranch != targetedBranch) {
355
+ // console.debug('Switching from branch `'+ currentBranch +'` to branch `'+ targetedBranch +'`');
356
+ // // git checkout 010
357
+ // try {
358
+ // cmd = execSync("git checkout "+ targetedBranch);
359
+ // } catch (err) {
360
+ // console.error(err.stack||err.message||err);
361
+ // return done(err);
362
+ // }
363
+ // } else {
364
+ // console.debug('Reusing branch `'+ targetedBranch +'`');
365
+ // }
366
+ // }
337
367
 
338
- if (!branchExists) {
339
- console.debug('No existing branch found, creating a new one !');
340
- try {
341
- execSync("git checkout -b "+ targetedBranch);
342
- // pushing to new branch
343
- console.debug('setting up remote branch `'+ targetedBranch +'` to git ...');
344
- execSync("git push --set-upstream origin "+ targetedBranch);
345
- } catch (err) {
346
- console.error(err.stack||err.message||err);
347
- return done(err);
348
- }
349
- }
350
- // use existing to push updates
351
- else {
352
-
353
- if (currentBranch != targetedBranch) {
354
- console.debug('Switching from branch `'+ currentBranch +'` to branch `'+ targetedBranch +'`');
355
- // git checkout 010
356
- try {
357
- cmd = execSync("git checkout "+ targetedBranch);
358
- } catch (err) {
359
- console.error(err.stack||err.message||err);
360
- return done(err);
361
- }
362
- } else {
363
- console.debug('Reusing branch `'+ targetedBranch +'`');
364
- }
365
- }
366
368
 
369
+ // // git add --all
370
+ // try {
371
+ // cmd = execSync("git add --all ");
372
+ // } catch (err) {
373
+ // //console.debug('`git add --all`failed ');
374
+ // console.error(err.stack||err.message||err);
375
+ // return done(err);
376
+ // }
377
+ // // git commit -m'Packaging version v'+ version
378
+ // try {
379
+ // var msg = (!branchExists) ? 'New version' : 'Prerelease update - '+ new Date().format("isoDateTime");
380
+ // cmd = execSync("git commit -am'"+ msg +"'");
381
+ // } catch (err) {
382
+ // if (!/Your branch is up to date/i.test( err.output.toString() )) {
383
+ // console.error(err.stack||err.message||err);
384
+ // return done(err);
385
+ // }
386
+ // }
387
+
388
+ // console.debug('Pushing changes made on branch `'+ targetedBranch +'` to git `origin/'+ targetedBranch +'`');
389
+ // // git push origin 010
390
+ // try {
391
+ // cmd = execSync("git push origin "+ targetedBranch );
392
+ // } catch (err) {
393
+ // if (!/Everything up-to-date/i.test( err.output.toString() )) {
394
+ // console.error(err.stack||err.message||err);
395
+ // return done(err);
396
+ // }
397
+ // }
398
+
399
+ // done()
400
+ // }
367
401
 
368
- // git add --all
369
- try {
370
- cmd = execSync("git add --all ");
371
- } catch (err) {
372
- //console.debug('`git add --all`failed ');
373
- console.error(err.stack||err.message||err);
374
- return done(err);
375
- }
376
- // git commit -m'Packaging version v'+ version
377
- try {
378
- var msg = (!branchExists) ? 'New version' : 'Prerelease update - '+ new Date().format("isoDateTime");
379
- cmd = execSync("git commit -am'"+ msg +"'");
380
- } catch (err) {
381
- if (!/Your branch is up to date/i.test( err.output.toString() )) {
382
- console.error(err.stack||err.message||err);
383
- return done(err);
384
- }
385
- }
386
402
 
387
- console.debug('Pushing changes made on branch `'+ targetedBranch +'` to git `origin/'+ targetedBranch +'`');
388
- // git push origin 010
389
- try {
390
- cmd = execSync("git push origin "+ targetedBranch );
391
- } catch (err) {
392
- if (!/Everything up-to-date/i.test( err.output.toString() )) {
393
- console.error(err.stack||err.message||err);
394
- return done(err);
395
- }
396
- }
397
403
 
398
- done()
399
- }
400
404
 
401
405
  // self.tagVersionIfNeeded = function(done) {
402
406
  // // check if script is on Dry Run !!!