Beispiel #1
0
    .then(function() {
      if (_.has(options, "config.notes.databaseRules")) {
        track("Rules Deploy", options.config.notes.databaseRules);
      }

      logger.info();
      utils.logSuccess(clc.underline.bold("Deploy complete!"));
      logger.info();
      var deployedHosting = _.includes(targetNames, "hosting");
      var deployedFunctions = _.includes(targetNames, "functions");
      if (deployedFunctions) {
        logger.info(
          "Please note that it can take up to 30 seconds for your updated functions to propagate."
        );
      }
      logger.info(clc.bold("Project Console:"), utils.consoleUrl(options.project, "/overview"));
      if (deployedHosting) {
        _.each(context.hosting.deploys, function(deploy) {
          logger.info(clc.bold("Hosting URL:"), utils.addSubdomain(api.hostingOrigin, deploy.site));
        });
        const versionNames = context.hosting.deploys.map((deploy) => deploy.version);
        return { hosting: versionNames.length === 1 ? versionNames[0] : versionNames };
      }
    });
Beispiel #2
0
	note: function(log) {
		this._printMessage(log, color.underline.xterm(33));
		return this;
	},
Beispiel #3
0
	light: function(log) {
		this._printMessage(log, color.underline.xterm(245));
		return this;
	},
 this.highlightURLs = function () {
     finalStr = finalStr.replace(/((http|ftp)(s)?:\/\/([^\s\"]|[\~\?\&\@\=])+)/gi , cliColor.underline.bold('$1'));
     return that;
 };
Beispiel #5
0
    localtld(config, function (err, config) {
        if (err) {
            return callback(err);
        }

        // configuration for the main www server
        var www_link = (config.local_tld ?
            config.www_local_url:
            'http://' + config.host + ':' + config.www_port
        );

        var hoodieBlue = clc.underline.xterm(25);
        var www_link_colored = hoodieBlue(www_link);

        var www = server({
            name: 'www',
            host: config.host,
            port: config.www_port,
            root: path.resolve(config.project_dir, 'www'),
            listen: !(config.run_nodejitsu_server),
            message: (config.boring ?
                'WWW:   ' + www_link:
                'WWW:   ' + www_link_colored
            )
        });

        // configuration for the admin server
        var admin_link = (config.local_tld ?
            config.admin_local_url:
            'http://' + config.host + ':' + config.admin_port
        );

        var admin_link_colored = hoodieBlue(admin_link);
        var admin = server({
            name: 'admin',
            host: config.host,
            port: config.admin_port,
            root: path.resolve(__dirname, '../node_modules/hoodie-pocket/www'),
            listen: !(config.run_nodejitsu_server),
            message: (config.boring ?
                'Admin: ' + admin_link:
                'Admin: ' + admin_link_colored
            )
        });

        // start the app
        console.log('Initializing...');
        async.applyEachSeries([
            exports.ensurePaths,
            exports.exitIfSudo,
            couch.start,
            installer.install,
            hconsole.linebreak,
            www,
            admin,
            nodejitsu_server,
            hconsole.linebreak,
            workers.startAll,
            utils.openBrowser
        ],
        config, callback);
    });