How to use vlocity - 4 common examples

To help you get started, we’ve selected a few vlocity examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vlocityinc / vlocity_build / grunt / dataPacksJobTask.js View on Github external
function runTaskForAllJobFiles(taskName, callback) {
        var dataPacksJobsData = {};
        var properties = grunt.config.get('properties');

		if (properties['vlocity.dataPacksJobFolder']) {
      		dataPacksJobFolder = properties['vlocity.dataPacksJobFolder'];
      	}

      	try {

	        fs.readdirSync(dataPacksJobFolder).filter(function(file) {
	            try {
	                var fileName = file.substr(0,file.indexOf('.'));
	                if (!/QueryDefinitions/.test(fileName)) {
	     				dataPacksJobsData[fileName] = yaml.safeLoad(fs.readFileSync(dataPacksJobFolder + '/' + file, 'utf8'));;
	                }
	            } catch (e) {
	                //console.log(e);
	            }
	        });
github vlocityinc / vlocity_build / grunt / dataPacksJobTask.js View on Github external
var properties = grunt.config.get('properties');
		var jobStartTime = Date.now();

	  	var vlocity = new node_vlocity({
          username: properties['sf.username'], 
          password: properties['sf.password'], 
          vlocityNamespace: properties['vlocity.namespace'],
          verbose: grunt.option('verbose'),
          loginUrl: properties['sf.loginUrl']
      	});

      	grunt.log.writeln('DataPacks Job Started - ' + jobName + ' Org: ' + properties['sf.username']);

      	if (properties['vlocity.dataPacksJobFolder']) {
      		dataPacksJobFolder = properties['vlocity.dataPacksJobFolder'];
      	}
      	
      	var dataPacksJobsData = {};
      	var queryDefinitions;

		try {
		    queryDefinitions = yaml.safeLoad(fs.readFileSync(dataPacksJobFolder + '/QueryDefinitions.yaml', 'utf8'));
		} catch (e) {
		    //console.log(e);
		}

		var dataPackFolderExists;

		try {
	      	fs.readdirSync(dataPacksJobFolder).filter(function(file) {
	      		try {
github vlocityinc / vlocity_build / grunt / dataPacksJobTask.js View on Github external
function dataPacksJob(action, jobName, callback) {

	  	var properties = grunt.config.get('properties');
		var jobStartTime = Date.now();

	  	var vlocity = new node_vlocity({
          username: properties['sf.username'], 
          password: properties['sf.password'], 
          vlocityNamespace: properties['vlocity.namespace'],
          verbose: grunt.option('verbose'),
          loginUrl: properties['sf.loginUrl']
      	});

      	grunt.log.writeln('DataPacks Job Started - ' + jobName + ' Org: ' + properties['sf.username']);

      	if (properties['vlocity.dataPacksJobFolder']) {
      		dataPacksJobFolder = properties['vlocity.dataPacksJobFolder'];
      	}
      	
      	var dataPacksJobsData = {};
      	var queryDefinitions;

		try {
		    queryDefinitions = yaml.safeLoad(fs.readFileSync(dataPacksJobFolder + '/QueryDefinitions.yaml', 'utf8'));
		} catch (e) {
		    //console.log(e);
		}

		var dataPackFolderExists;

		try {
	      	fs.readdirSync(dataPacksJobFolder).filter(function(file) {
github vlocityinc / vlocity_build / grunt / dataPacksJobTask.js View on Github external
grunt.registerTask('runApex', 'Run Anonymous Apex specified by option -apex', function() {
        var self = this;

        var done = this.async();

        var properties = grunt.config.get('properties');
        
        var vlocity = new node_vlocity({
          username: properties['sf.username'], 
          password: properties['sf.password'], 
          vlocityNamespace: properties['vlocity.namespace'],
          verbose: grunt.option('verbose'),
          loginUrl: properties['sf.loginUrl']
        });

        vlocity.checkLogin(function(res) {
            vlocity.jsForceConnection.tooling.sobject('DebugLevel').find({ DeveloperName: "SFDC_DevConsole" }).execute(function(err, debugLevel) {

                var thirtyMinutesLater = new Date();
                thirtyMinutesLater.setMinutes(thirtyMinutesLater.getMinutes() + 30);
                var thirtyMinutesLaterString = thirtyMinutesLater.toISOString();

                vlocity.jsForceConnection.tooling.sobject('TraceFlag').create({
                    TracedEntityId: vlocity.jsForceConnection.userInfo.id,
                    DebugLevelId: debugLevel[0].Id,
                    ExpirationDate: thirtyMinutesLaterString,
                    LogType: 'DEVELOPER_LOG'

vlocity

Enable Continuous Integration for Vlocity

MIT
Latest version published 3 months ago

Package Health Score

75 / 100
Full package analysis

Similar packages