gina 0.1.1-alpha.95 → 0.1.1-alpha.98
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.
- package/README.md +90 -26
- package/bin/cli +9 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/AUTHORS +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/LICENSE +0 -0
- package/framework/v0.1.1-alpha.98/VERSION +1 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/asset/html/nolayout.html +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/asset/html/static.html +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/asset/img/android-chrome-192x192.png +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/asset/img/android-chrome-512x512.png +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/asset/img/apple-touch-icon.png +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/asset/img/favicon-16x16.png +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/asset/img/favicon-32x32.png +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/asset/img/favicon.ico +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/asset/js/plugin/dist/gina.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/asset/js/plugin/dist/gina.js.map +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/asset/js/plugin/dist/gina.min.css +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/asset/js/plugin/dist/gina.min.css.map +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/asset/js/plugin/dist/gina.min.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/asset/js/plugin/dist/gina.min.js.map +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/asset/js/plugin/dist/gina.onload.min.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/asset/js/plugin/dist/gina.onload.min.js.map +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/asset/js/plugin/readme.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/asset/js/plugin/uuid.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/config.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/connectors/couchbase/index.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/connectors/couchbase/lib/connector.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/connectors/couchbase/lib/connector.v2.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/connectors/couchbase/lib/connector.v3.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/connectors/couchbase/lib/n1ql.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/connectors/couchbase/lib/session-store.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/connectors/couchbase/lib/session-store.v2.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/controller/controller.framework.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/controller/controller.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/controller/index.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/deps/busboy/.travis.yml +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/deps/busboy/LICENSE +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/deps/busboy/README.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/deps/busboy/deps/encoding/encoding-indexes.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/deps/busboy/deps/encoding/encoding.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/deps/busboy/lib/main.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/deps/busboy/lib/types/multipart.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/deps/busboy/lib/types/urlencoded.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/deps/busboy/lib/utils.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/deps/busboy/package.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/deps/swig-client/swig-2.0.0.min.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/dev/index.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/dev/lib/class.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/dev/lib/factory.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/dev/lib/tools.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/gna.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/locales/README.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/locales/currency.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/locales/dist/language/en.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/locales/dist/language/fr.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/locales/dist/region/en.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/locales/dist/region/fr.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/locales/index.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/locales/src/make.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/locales/src/resources/currency.csv +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/locales/src/resources/region.csv +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/locales/src/resources/region.mapping.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/mime.types +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/model/entity.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/model/index.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/model/template/entityFactory.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/model/template/index.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/plugins/README.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/plugins/index.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/plugins/lib/file/README.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/plugins/lib/file/build.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/plugins/lib/file/package.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/plugins/lib/intl/README.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/plugins/lib/intl/build.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/plugins/lib/intl/package.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/plugins/lib/intl/src/main.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/plugins/lib/storage/README.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/plugins/lib/storage/build.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/plugins/lib/storage/package.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/plugins/lib/storage/src/main.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/plugins/lib/validator/README.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/plugins/lib/validator/build.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/plugins/lib/validator/package.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/plugins/lib/validator/src/form-validator.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/plugins/lib/validator/src/main.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/router.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/server.express.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/server.isaac.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/server.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/status.codes +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/boilerplate/bundle/config/app.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/boilerplate/bundle/config/routing.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/boilerplate/bundle/config/settings.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/boilerplate/bundle/config/templates.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/boilerplate/bundle/controllers/setup.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/boilerplate/bundle/index.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/boilerplate/bundle_public/css/default.css +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/boilerplate/bundle_public/readme.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/boilerplate/bundle_templates/html/homepage.html +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/boilerplate/bundle_templates/html/layout/main.html +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/command/gina.bat.tpl +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/command/gina.tpl +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/conf/env.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/conf/manifest.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/conf/package.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/conf/settings.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/conf/statics.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/conf/templates.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/error/client/json/401.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/error/client/json/403.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/error/client/json/404.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/error/server/html/50x.html +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/error/server/json/500.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/error/server/json/503.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/core/template/extensions/logger/config.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/helpers/console.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/helpers/context.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/helpers/dateFormat.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/helpers/index.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/helpers/json/README.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/helpers/json/package.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/helpers/json/src/main.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/helpers/path.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/helpers/plugins/README.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/helpers/plugins/package.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/helpers/plugins/src/api-error.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/helpers/plugins/src/main.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/helpers/prototypes.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/helpers/task.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/helpers/text.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/archiver/README.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/archiver/build.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/archiver/package.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/archiver/src/dep/jszip.min.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/archiver/src/main.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/aliases.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/bundle/add.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/bundle/arguments.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/bundle/copy.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/bundle/cp.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/bundle/help.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/bundle/help.txt +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/bundle/list.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/bundle/remove.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/bundle/rename.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/bundle/restart.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/bundle/rm.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/bundle/start.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/bundle/status.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/bundle/stop.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/env/add.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/env/get.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/env/help.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/env/help.txt +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/env/link-dev.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/env/list.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/env/remove.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/env/rm.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/env/set.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/env/unset.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/env/use.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/framework/dot.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/framework/get.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/framework/help.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/framework/help.txt +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/framework/init.js +25 -13
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/framework/msg.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/framework/open.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/framework/restart.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/framework/set.js +34 -2
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/framework/start.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/framework/status.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/framework/stop.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/framework/tail.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/framework/update.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/framework/version.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/gina-dev.1.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/gina-framework.1.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/gina.1.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/helper.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/index.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/msg.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/port/help.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/port/help.txt +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/port/inc/scan.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/port/list.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/port/set.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/project/add.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/project/arguments.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/project/build.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/project/help.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/project/help.txt +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/project/import.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/project/list.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/project/move.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/project/remove.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/project/rename.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/project/restart.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/project/rm.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/project/start.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/project/status.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/project/stop.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/protocol/help.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/protocol/help.txt +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/protocol/list.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/protocol/set.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/scope/help.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/scope/help.txt +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/scope/link-local.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/scope/list.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/scope/remove.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/scope/rm.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/scope/set.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/scope/unset.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/scope/use.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cmd/view/add.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/collection/README.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/collection/build.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/collection/package.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/collection/src/main.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/config.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cron/README.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cron/package.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/cron/src/main.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/generator/index.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/index.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/inherits/LICENSE +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/inherits/README.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/inherits/example/inheriting_eventemitter.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/inherits/example/protected_inheritance.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/inherits/example/simple_inheritance.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/inherits/example/super_attribute_overridden_by_child_on_init.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/inherits/package.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/inherits/src/main.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/logger/README.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/logger/package.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/logger/src/containers/default/index.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/logger/src/containers/file/index.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/logger/src/containers/file/lib/logrotator/README.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/logger/src/containers/file/lib/logrotator/index.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/logger/src/containers/mq/index.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/logger/src/containers/mq/listener.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/logger/src/containers/mq/speaker.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/logger/src/helper.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/logger/src/main.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/math/index.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/merge/README.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/merge/example/merge.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/merge/example/merge_2_literal objects.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/merge/example/merge_and_preserve_first.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/merge/package.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/merge/src/main.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/model.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/proc.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/routing/README.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/routing/build.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/routing/package.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/routing/src/main.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/session-store.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/shell.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/swig-filters/README.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/swig-filters/package.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/swig-filters/src/main.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/url/README.md +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/url/index.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/url/mocks.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/url/routing.json +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/url/test.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/lib/validator.js +0 -0
- package/framework/{v0.1.1-alpha.95 → v0.1.1-alpha.98}/package.json +0 -0
- package/package.json +7 -3
- package/resources/home/main.json +3 -0
- package/resources/home/settings.json +1 -0
- package/resources/package.json.template +24 -20
- package/script/post_install.js +111 -200
- package/script/post_publish.js +185 -0
- package/script/pre_install.js +24 -16
- package/script/prepare_version.js +216 -93
- package/utils/helper.js +17 -6
- package/framework/v0.1.1-alpha.95/VERSION +0 -1
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file is part of the gina package.
|
|
3
|
+
* Copyright (c) 2009-2022 Rhinostone <contact@gina.io>
|
|
4
|
+
*
|
|
5
|
+
* For the full copyright and license information, please view the LICENSE
|
|
6
|
+
* file that was distributed with this source code.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
//Imports.
|
|
10
|
+
var fs = require('fs');
|
|
11
|
+
var util = require('util');
|
|
12
|
+
var promisify = util.promisify;
|
|
13
|
+
const { execSync } = require('child_process');
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
var scriptPath = __dirname;
|
|
17
|
+
var ginaPath = (scriptPath.replace(/\\/g, '/')).replace('/script', '');
|
|
18
|
+
var help = require(ginaPath + '/utils/helper.js');
|
|
19
|
+
var pack = ginaPath + '/package.json';
|
|
20
|
+
pack = (isWin32()) ? pack.replace(/\//g, '\\') : pack;
|
|
21
|
+
|
|
22
|
+
var helpers = null;
|
|
23
|
+
var lib = null;
|
|
24
|
+
/**
|
|
25
|
+
* PostPublish constructor
|
|
26
|
+
*
|
|
27
|
+
* NB.:
|
|
28
|
+
* This script can only be executed on Mac OS X or on Linux distributions
|
|
29
|
+
*
|
|
30
|
+
* @constructor
|
|
31
|
+
* */
|
|
32
|
+
function PostPublish() {
|
|
33
|
+
var self = {
|
|
34
|
+
isWin32: isWin32()
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var configure = function() {
|
|
38
|
+
// TODO - handle windows case
|
|
39
|
+
if ( /^true$/i.test(isWin32()) ) {
|
|
40
|
+
throw new Error('Windows in not yet fully supported. Thank you for your patience');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Overriding thru passed arguments
|
|
44
|
+
var args = process.argv, i = 0, len = args.length;
|
|
45
|
+
for (; i < len; ++i) {
|
|
46
|
+
if ( /^\-\-tag/.test(args[i]) ) {
|
|
47
|
+
var tag = args[i].split(/\=/)[1];
|
|
48
|
+
if ( tag != self.git.tag) {
|
|
49
|
+
self.git.tag = tag;
|
|
50
|
+
self.isGitPushNeeded = ( typeof(process.env.npm_config_dry_run) != 'undefined' ) ? false : true
|
|
51
|
+
}
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if ( /^(\-m|\-\-message)$/.test(args[i]) ) {
|
|
56
|
+
var m = args[i];
|
|
57
|
+
if (/^(.*)\=/.test(m)) {
|
|
58
|
+
m = m.split(/\=/)[1]
|
|
59
|
+
}
|
|
60
|
+
self.git.msg = m.replace(/^(\-m|\-\-message)/g, '').replace(/(\"|\')/g, '');
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
self.gina = __dirname +'/..';
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
var init = function() {
|
|
69
|
+
configure();
|
|
70
|
+
|
|
71
|
+
begin(0);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Bebin - Will run checking tasks in order of declaration
|
|
76
|
+
* */
|
|
77
|
+
var begin = async function(i) {
|
|
78
|
+
//console.debug('i is ', i);
|
|
79
|
+
var n = 0, funct = null, functName = null;
|
|
80
|
+
for (let t in self) {
|
|
81
|
+
if ( typeof(self[t]) == 'function') {
|
|
82
|
+
if (n == i){
|
|
83
|
+
//let func = 'self.' + t + '()';
|
|
84
|
+
let func = 'self.' + t;
|
|
85
|
+
console.debug('Running [ ' + func + '() ]');
|
|
86
|
+
funct = func;
|
|
87
|
+
functName = t;
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
n++;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// to handle sync vs async to allow execution in order of declaration
|
|
95
|
+
if (funct) {
|
|
96
|
+
eval('async function on'+functName+'(){ await promisify('+ funct + ')().catch(function(e){ console.error(e.toString()); process.exit(-1);}).then(function(){ begin('+(i+1)+')});}; on'+functName+'();'); // jshint ignore:line
|
|
97
|
+
} else {
|
|
98
|
+
process.exit(0);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
var restoreSymlinks = function(done) {
|
|
103
|
+
|
|
104
|
+
if ( typeof(process.env.npm_config_dry_run) == 'undefined' || !process.env.npm_config_dry_run ) {
|
|
105
|
+
// ignoring for --dry-run
|
|
106
|
+
return
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
var archivesPath = _(getUserHome() + '/.gina/archives/framework', true);
|
|
110
|
+
var frameworkPath = _(self.gina +'/framework', true);
|
|
111
|
+
|
|
112
|
+
if ( !new _(archivesPath).existsSync() ) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
// get current framework version
|
|
116
|
+
var package = require(pack);
|
|
117
|
+
var currentVersion = 'v'+ package.version.replace(/^v/, '');
|
|
118
|
+
|
|
119
|
+
// cleanup first
|
|
120
|
+
var versionsFolders = fs.readdirSync(frameworkPath);
|
|
121
|
+
for (let i = 0, len = versionsFolders.length; i < len; i++) {
|
|
122
|
+
let dir = versionsFolders[i];
|
|
123
|
+
// skip junk
|
|
124
|
+
if ( /^\./i.test(dir) || /(\s+copy|\.old)$/i.test(dir) ) {
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// intercept & remove existing symlinks or old versions dir
|
|
129
|
+
try {
|
|
130
|
+
if ( fs.lstatSync( _(frameworkPath +'/'+ dir, true) ).isSymbolicLink() ) {
|
|
131
|
+
console.debug('Removing Symlink: '+ _(frameworkPath +'/'+ dir, true) );
|
|
132
|
+
// new _(frameworkPath +'/'+ dir, true).rmSync();
|
|
133
|
+
fs.unlinkSync(_(frameworkPath +'/'+ dir, true));
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (
|
|
138
|
+
dir != currentVersion
|
|
139
|
+
&& fs.lstatSync( _(frameworkPath +'/'+ dir, true) ).isDirectory()
|
|
140
|
+
) {
|
|
141
|
+
console.debug('Removing old version: '+ _(frameworkPath +'/'+ dir, true));
|
|
142
|
+
new _(frameworkPath +'/'+ dir, true).rmSync()
|
|
143
|
+
}
|
|
144
|
+
} catch (e) {
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// restoring symlinks from archives
|
|
150
|
+
versionsFolders = fs.readdirSync(archivesPath);
|
|
151
|
+
for (let i = 0, len = versionsFolders.length; i < len; i++) {
|
|
152
|
+
let dir = versionsFolders[i];
|
|
153
|
+
// skip junk
|
|
154
|
+
if ( /^\./i.test(dir) || /(\s+copy|\.old)$/i.test(dir) ) {
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// skip selected - for dev team only
|
|
159
|
+
if ( new _(frameworkPath +'/'+ dir, true).existsSync() ) {
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// creating symlinks
|
|
164
|
+
try {
|
|
165
|
+
console.debug( 'Creating symlink: '+ _(archivesPath +'/'+ dir, true) +' -> '+ _(frameworkPath +'/'+ dir, true));
|
|
166
|
+
new _(archivesPath +'/'+ dir, true).symlinkSync(_(frameworkPath +'/'+ dir, true) );
|
|
167
|
+
} catch (e) {
|
|
168
|
+
return done(e)
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
self.end = function(done) {
|
|
174
|
+
|
|
175
|
+
restoreSymlinks(done);
|
|
176
|
+
|
|
177
|
+
done()
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
init()
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
new PostPublish()
|
package/script/pre_install.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file is part of the gina pkg.
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2009-2022 Rhinostone <contact@gina.io>
|
|
4
4
|
*
|
|
5
5
|
* For the full copyright and license information, please view the LICENSE
|
|
6
6
|
* file that was distributed with this source code.
|
|
@@ -42,14 +42,7 @@ function PreInstall() {
|
|
|
42
42
|
self.isGlobalInstall = process.env.npm_config_global || false;
|
|
43
43
|
self.isResetNeeded = process.env.npm_config_reset || false;
|
|
44
44
|
self.defaultPrefix = execSync('npm config get prefix').toString().replace(/\n$/g, '');
|
|
45
|
-
|
|
46
|
-
try {
|
|
47
|
-
pkg = execSync('npm list -g gina --long --json').toString().replace(/\n$/g, '');
|
|
48
|
-
} catch(err) {
|
|
49
|
-
throw err
|
|
50
|
-
}
|
|
51
|
-
self.optionalPrefix = JSON.parse(pkg).dependencies.gina.config.optionalPrefix.replace(/^\~/, getUserHome());
|
|
52
|
-
// self.optionalPrefix = getUserHome()+'/.npm-global';
|
|
45
|
+
|
|
53
46
|
|
|
54
47
|
// `process.env.npm_config_prefix` is only retrieved on `npm install gina`
|
|
55
48
|
// and it should always be equal to `self.defaultPrefix`
|
|
@@ -85,7 +78,7 @@ function PreInstall() {
|
|
|
85
78
|
console.warn('You are encouraged to use `npm install -g gina`\nor, if you are trying to link gina to your project, use `npm link gina` if Gina has already been installed globally\n');
|
|
86
79
|
// Just in case someone is trying to run pre_install from the `gina` module
|
|
87
80
|
if (!/node\_modules(\\\\|\/)gina$/.test(process.cwd())) {
|
|
88
|
-
self.prefix = process.cwd();
|
|
81
|
+
self.prefix = process.env.INIT_CWD;//process.cwd();
|
|
89
82
|
}
|
|
90
83
|
}
|
|
91
84
|
|
|
@@ -104,10 +97,25 @@ function PreInstall() {
|
|
|
104
97
|
console.warn('Path not accessible or missing: '+ self.prefix + ( isWin32() ? '\\' : '/' ) + 'var')
|
|
105
98
|
}
|
|
106
99
|
|
|
107
|
-
console.warn('You do not have sufficient permissions. Switching to `--prefix='+ self.optionalPrefix +'`');
|
|
108
|
-
process.env.npm_config_prefix = self.prefix = self.optionalPrefix;
|
|
100
|
+
// console.warn('You do not have sufficient permissions. Switching to `--prefix='+ self.optionalPrefix +'`');
|
|
101
|
+
// process.env.npm_config_prefix = self.prefix = self.optionalPrefix;
|
|
109
102
|
}
|
|
110
103
|
|
|
104
|
+
var pkg = null, pkgObj = null, cmd = null;
|
|
105
|
+
try {
|
|
106
|
+
cmd = 'npm list gina --long --json --prefix='+ self.prefix;
|
|
107
|
+
if (self.isGlobalInstall) {
|
|
108
|
+
cmd += ' -g';
|
|
109
|
+
}
|
|
110
|
+
pkg = execSync(cmd).toString().replace(/\n$/g, '');
|
|
111
|
+
self.optionalPrefix = JSON.parse(pkg).dependencies.gina.config.optionalPrefix.replace(/^\~/, getUserHome());
|
|
112
|
+
|
|
113
|
+
} catch(err) {
|
|
114
|
+
throw err
|
|
115
|
+
}
|
|
116
|
+
pkgObj = JSON.parse(pkg);
|
|
117
|
+
self.optionalPrefix = pkgObj.dependencies.gina.config.optionalPrefix.replace(/^\~/, getUserHome());
|
|
118
|
+
|
|
111
119
|
if ( self.prefix != self.defaultPrefix ) {
|
|
112
120
|
self.isCustomPrefix = true;
|
|
113
121
|
}
|
|
@@ -341,7 +349,7 @@ function PreInstall() {
|
|
|
341
349
|
lib = require('./lib');
|
|
342
350
|
console = lib.logger;
|
|
343
351
|
} catch (err) {
|
|
344
|
-
|
|
352
|
+
return done(err)
|
|
345
353
|
}
|
|
346
354
|
|
|
347
355
|
|
|
@@ -410,7 +418,7 @@ function PreInstall() {
|
|
|
410
418
|
});
|
|
411
419
|
|
|
412
420
|
if (err) {
|
|
413
|
-
|
|
421
|
+
return done(err);
|
|
414
422
|
}
|
|
415
423
|
}
|
|
416
424
|
// It is not required to update `~/.gina/main.json` && `~/.gina/{shortVersion}/settings.json`
|
|
@@ -516,7 +524,7 @@ function PreInstall() {
|
|
|
516
524
|
|
|
517
525
|
var getTmpDir = function(prefix) {
|
|
518
526
|
if ( !prefix || typeof(prefix) == 'undefined' || prefix == '' ) {
|
|
519
|
-
prefix =
|
|
527
|
+
prefix = self.defaultPrefix;
|
|
520
528
|
}
|
|
521
529
|
// support for node 0.10.x & 0.11.x
|
|
522
530
|
var tmp = (os.tmpdir) ? os.tmpdir : function() {
|
|
@@ -562,7 +570,7 @@ function PreInstall() {
|
|
|
562
570
|
* */
|
|
563
571
|
var getLogDir = function(prefix) {
|
|
564
572
|
if ( !prefix || typeof(prefix) == 'undefined' || prefix == '' ) {
|
|
565
|
-
prefix =
|
|
573
|
+
prefix = self.defaultPrefix;
|
|
566
574
|
}
|
|
567
575
|
// Trying to retrieve original value if already defined
|
|
568
576
|
var logDir = null;
|
|
@@ -39,11 +39,49 @@ var lib = null;
|
|
|
39
39
|
* @constructor
|
|
40
40
|
* */
|
|
41
41
|
function PrepareVersion() {
|
|
42
|
-
var self = {
|
|
42
|
+
var self = {
|
|
43
|
+
isWin32: isWin32(),
|
|
44
|
+
git : {
|
|
45
|
+
tag: 'latest',
|
|
46
|
+
msg: null
|
|
47
|
+
},
|
|
48
|
+
isGitPushNeeded : false
|
|
49
|
+
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
var configure = function() {
|
|
53
|
+
// TODO - handle windows case
|
|
54
|
+
if ( /^true$/i.test(isWin32()) ) {
|
|
55
|
+
throw new Error('Windows in not yet fully supported. Thank you for your patience');
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Overriding thru passed arguments
|
|
59
|
+
var args = process.argv, i = 0, len = args.length;
|
|
60
|
+
for (; i < len; ++i) {
|
|
61
|
+
if ( /^\-\-tag/.test(args[i]) ) {
|
|
62
|
+
var tag = args[i].split(/\=/)[1];
|
|
63
|
+
if ( tag != self.git.tag) {
|
|
64
|
+
self.git.tag = tag;
|
|
65
|
+
self.isGitPushNeeded = ( typeof(process.env.npm_config_dry_run) != 'undefined' ) ? false : true
|
|
66
|
+
}
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if ( /^(\-m|\-\-message)$/.test(args[i]) ) {
|
|
71
|
+
var m = args[i];
|
|
72
|
+
if (/^(.*)\=/.test(m)) {
|
|
73
|
+
m = m.split(/\=/)[1]
|
|
74
|
+
}
|
|
75
|
+
self.git.msg = m.replace(/^(\-m|\-\-message)/g, '').replace(/(\"|\')/g, '');
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
self.gina = __dirname +'/..';
|
|
81
|
+
}
|
|
43
82
|
|
|
44
83
|
var init = function() {
|
|
45
|
-
|
|
46
|
-
self.prefix = execSync('npm config get prefix');
|
|
84
|
+
configure();
|
|
47
85
|
|
|
48
86
|
begin(0);
|
|
49
87
|
};
|
|
@@ -267,7 +305,7 @@ function PrepareVersion() {
|
|
|
267
305
|
var versionsFolders = null, frameworkPath = null;
|
|
268
306
|
try {
|
|
269
307
|
frameworkPath = _(self.ginaPath +'/framework', true);
|
|
270
|
-
console.
|
|
308
|
+
console.debug('frameworkPath: ', frameworkPath);
|
|
271
309
|
if ( !new _(frameworkPath).existsSync() ) {
|
|
272
310
|
return done();
|
|
273
311
|
}
|
|
@@ -297,107 +335,114 @@ function PrepareVersion() {
|
|
|
297
335
|
}
|
|
298
336
|
|
|
299
337
|
|
|
300
|
-
|
|
338
|
+
self.pushChangesToGitIfNeeded = function(done) {
|
|
301
339
|
|
|
302
|
-
|
|
303
|
-
|
|
340
|
+
var cmd = null;
|
|
341
|
+
var version = self.selectedVersion.replace(/^[a-z]+/ig, '');
|
|
304
342
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
343
|
+
// getting current branch
|
|
344
|
+
// git rev-parse --abbrev-ref HEAD
|
|
345
|
+
// => 010
|
|
346
|
+
var currentBranch = null;
|
|
347
|
+
try {
|
|
348
|
+
currentBranch = execSync("git rev-parse --abbrev-ref HEAD")
|
|
349
|
+
.toString()
|
|
350
|
+
.replace(/(\n|\r|\t)/g, '');
|
|
351
|
+
} catch (err) {
|
|
352
|
+
// nothing to do
|
|
353
|
+
return done( new Error('[GIT] No branch selected') )
|
|
354
|
+
}
|
|
317
355
|
|
|
318
356
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
357
|
+
// create new branch if needed
|
|
358
|
+
// e.g: 0.1.0-alpha.1 -> 010-alpha1
|
|
359
|
+
var targetedBranch = version.replace(/\./g, '');
|
|
360
|
+
self.targetedBranch = targetedBranch;
|
|
323
361
|
|
|
324
|
-
|
|
325
|
-
|
|
362
|
+
console.debug('[GIT] Current branch: '+ currentBranch);
|
|
363
|
+
console.debug('[GIT] Targeted branch: '+ targetedBranch);
|
|
326
364
|
|
|
327
365
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
366
|
+
// check if targeted branch exists
|
|
367
|
+
// git rev-parse --verify 011
|
|
368
|
+
var branchExists = null;
|
|
369
|
+
try {
|
|
370
|
+
branchExists = execSync("git rev-parse --verify "+ targetedBranch)
|
|
371
|
+
.toString()
|
|
372
|
+
.replace(/(\n|\r|\t)/g, '');
|
|
373
|
+
} catch (err) {
|
|
374
|
+
// nothing to do
|
|
375
|
+
}
|
|
338
376
|
|
|
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
|
-
// }
|
|
367
377
|
|
|
378
|
+
if (!branchExists) {
|
|
379
|
+
console.debug('No existing branch found, creating a new one !');
|
|
380
|
+
try {
|
|
381
|
+
execSync("git checkout -b "+ targetedBranch);
|
|
382
|
+
if (self.isGitPushNeeded) {
|
|
383
|
+
// pushing to new branch
|
|
384
|
+
console.debug('setting up remote branch `'+ targetedBranch +'` to git ...');
|
|
385
|
+
execSync("git push --set-upstream origin "+ targetedBranch);
|
|
386
|
+
}
|
|
387
|
+
} catch (err) {
|
|
388
|
+
console.error(err.stack||err.message||err);
|
|
389
|
+
return done(err);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
// use existing to push updates
|
|
393
|
+
else {
|
|
394
|
+
|
|
395
|
+
if (currentBranch != targetedBranch) {
|
|
396
|
+
console.debug('Switching from branch `'+ currentBranch +'` to branch `'+ targetedBranch +'`');
|
|
397
|
+
// git checkout 010
|
|
398
|
+
try {
|
|
399
|
+
cmd = execSync("git checkout "+ targetedBranch);
|
|
400
|
+
} catch (err) {
|
|
401
|
+
console.error(err.stack||err.message||err);
|
|
402
|
+
return done(err);
|
|
403
|
+
}
|
|
404
|
+
} else {
|
|
405
|
+
console.debug('Reusing branch `'+ targetedBranch +'`');
|
|
406
|
+
}
|
|
407
|
+
}
|
|
368
408
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
409
|
+
// commit changes
|
|
410
|
+
try {
|
|
411
|
+
cmd = execSync("git add --all ");
|
|
412
|
+
} catch (err) {
|
|
413
|
+
//console.debug('`git add --all`failed ');
|
|
414
|
+
console.error(err.stack||err.message||err);
|
|
415
|
+
return done(err);
|
|
416
|
+
}
|
|
417
|
+
// git commit -m'Packaging version v'+ version
|
|
418
|
+
try {
|
|
419
|
+
var msg = (!branchExists) ? 'New version' : 'Prerelease update'; //+ new Date().format("isoDateTime");
|
|
420
|
+
if (self.git.msg) {
|
|
421
|
+
msg += ' - '+ self.git.msg
|
|
422
|
+
}
|
|
423
|
+
cmd = execSync("git commit -am'"+ msg +"'");
|
|
424
|
+
} catch (err) {
|
|
425
|
+
if (!/Your branch is up to date|nothing to commit, working tree clean/i.test( err.output.toString() )) {
|
|
426
|
+
console.error(err.stack||err.message||err);
|
|
427
|
+
return done(err);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
387
430
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
431
|
+
if (self.isGitPushNeeded) {
|
|
432
|
+
console.debug('Pushing changes made on branch `'+ targetedBranch +'` to git `origin/'+ targetedBranch +'`');
|
|
433
|
+
// git push origin 010
|
|
434
|
+
try {
|
|
435
|
+
cmd = execSync("git push origin "+ targetedBranch );
|
|
436
|
+
} catch (err) {
|
|
437
|
+
if (!/Everything up-to-date/i.test( err.output.toString() )) {
|
|
438
|
+
console.error(err.stack||err.message||err);
|
|
439
|
+
return done(err);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
398
443
|
|
|
399
|
-
|
|
400
|
-
|
|
444
|
+
done()
|
|
445
|
+
}
|
|
401
446
|
|
|
402
447
|
|
|
403
448
|
|
|
@@ -422,6 +467,84 @@ function PrepareVersion() {
|
|
|
422
467
|
// }
|
|
423
468
|
|
|
424
469
|
|
|
470
|
+
var restoreSymlinks = function(done) {
|
|
471
|
+
|
|
472
|
+
if ( typeof(process.env.npm_config_dry_run) == 'undefined' || !process.env.npm_config_dry_run ) {
|
|
473
|
+
// ignoring for now, after publishing completion
|
|
474
|
+
return
|
|
475
|
+
}
|
|
476
|
+
var archivesPath = _(getUserHome() + '/.gina/archives/framework', true);
|
|
477
|
+
var frameworkPath = _(self.gina +'/framework', true);
|
|
478
|
+
|
|
479
|
+
if ( !new _(archivesPath).existsSync() ) {
|
|
480
|
+
return;
|
|
481
|
+
}
|
|
482
|
+
// get current framework version
|
|
483
|
+
var package = require(pack);
|
|
484
|
+
var currentVersion = 'v'+ package.version.replace(/^v/, '');
|
|
485
|
+
|
|
486
|
+
// cleanup first
|
|
487
|
+
var versionsFolders = fs.readdirSync(frameworkPath);
|
|
488
|
+
for (let i = 0, len = versionsFolders.length; i < len; i++) {
|
|
489
|
+
let dir = versionsFolders[i];
|
|
490
|
+
// skip junk
|
|
491
|
+
if ( /^\./i.test(dir) || /(\s+copy|\.old)$/i.test(dir) ) {
|
|
492
|
+
continue;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
// intercept & remove existing symlinks or old versions dir
|
|
496
|
+
try {
|
|
497
|
+
if ( fs.lstatSync( _(frameworkPath +'/'+ dir, true) ).isSymbolicLink() ) {
|
|
498
|
+
console.debug('Removing Symlink: '+ _(frameworkPath +'/'+ dir, true) );
|
|
499
|
+
// new _(frameworkPath +'/'+ dir, true).rmSync();
|
|
500
|
+
fs.unlinkSync(_(frameworkPath +'/'+ dir, true));
|
|
501
|
+
continue;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
if (
|
|
505
|
+
dir != currentVersion
|
|
506
|
+
&& fs.lstatSync( _(frameworkPath +'/'+ dir, true) ).isDirectory()
|
|
507
|
+
) {
|
|
508
|
+
console.debug('Removing old version: '+ _(frameworkPath +'/'+ dir, true));
|
|
509
|
+
new _(frameworkPath +'/'+ dir, true).rmSync()
|
|
510
|
+
}
|
|
511
|
+
} catch (e) {
|
|
512
|
+
continue;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
// restoring symlinks from archives
|
|
517
|
+
versionsFolders = fs.readdirSync(archivesPath);
|
|
518
|
+
for (let i = 0, len = versionsFolders.length; i < len; i++) {
|
|
519
|
+
let dir = versionsFolders[i];
|
|
520
|
+
// skip junk
|
|
521
|
+
if ( /^\./i.test(dir) || /(\s+copy|\.old)$/i.test(dir) ) {
|
|
522
|
+
continue;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
// skip selected - for dev team only
|
|
526
|
+
if ( new _(frameworkPath +'/'+ dir, true).existsSync() ) {
|
|
527
|
+
continue;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
// creating symlinks
|
|
531
|
+
try {
|
|
532
|
+
console.debug( 'Creating symlink: '+ _(archivesPath +'/'+ dir, true) +' -> '+ _(frameworkPath +'/'+ dir, true));
|
|
533
|
+
new _(archivesPath +'/'+ dir, true).symlinkSync(_(frameworkPath +'/'+ dir, true) );
|
|
534
|
+
} catch (e) {
|
|
535
|
+
return done(e)
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
self.end = function(done) {
|
|
541
|
+
|
|
542
|
+
// restoreSymlinks(done);
|
|
543
|
+
|
|
544
|
+
done()
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
|
|
425
548
|
|
|
426
549
|
init()
|
|
427
550
|
}
|