Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// FIXME later if needed, can do more commands, like per file transforming
program
.version("0.0.1")
.option("-d, --glsl-dir <dir>", "a folder containing *.glsl files")
.option(
"-o, --json-out ",
"a JSON file to save with all transitions",
"-"
)
.parse(process.argv);
const { glslDir, jsonOut } = program;
if (!glslDir || !jsonOut) {
program.outputHelp();
process.exit(1);
}
const ms = (n: number) => (n < 1 ? n.toFixed(2) : Math.round(n)) + "ms";
const files = fs.readdirSync(glslDir).filter(n => n.match(/^.*\.glsl$/));
const transitions = [];
console.error(files.length + " transitions to transform...");
console.error("");
files.forEach(filename => {
const fullPath = path.join(glslDir, filename);
const glsl = fs.readFileSync(fullPath, "utf-8");
const result = transform(filename, glsl, fullPath);
if (result.errors.length > 0) {
console.error(` ✕ ${result.data.transition.name}`);
console.error("");</dir>
.option("-n, --number ", "Set the version number")
.option("-d, --description ", "Set the description")
.option("-s, --start-date ", "Set the start date")
.option("-r, --release-date ", "Set the release date")
// Get project versions
.action((c, o) => {
jira.cmdVersion(c, o);
});
/**
* Show help if executes with no arguments
*/
if (!process.argv.slice(2).length) {
cl.outputHelp();
}
cl.parse(process.argv);
/**
* Execute default method if no registered command or no command is given
*/
if ( process.argv.slice(2).length ) {
// Check if an argument is passed in position 1
if ( typeof cl.args[1] !== 'undefined' ) {
if( !cl.args[1].constructor.name == "Command" ) {
jira.cmdDefault( cl );
}
return runE2ETests({ local, browsers });
});
program
.command('regressions')
.description('Run the visual regression tests')
.option('-l, --local', 'Use nightwatch.local.conf.js')
.option('-e, --environment', 'Comma separated string of browser test environment names')
.option('-c, --create-baseline', 'Create the baseline images instead of running a test')
.action((command) => {
const { local, browsers, createBaseline } = command;
return runRegressionsTests({ local, browsers, createBaseline });
});
if (!process.argv.slice(2).length) {
program.outputHelp();
} else {
program.parse(process.argv);
}
function showErrorHelp() {
program.outputHelp((str) => {
console.error(str);
return '';
});
process.exit(1);
}
//# sourceMappingURL=msbot-connect-cosmosdb.js.map
function exitDueToUsageError(message: string): never {
console.error(`${program._name}: ${message}`);
console.error();
program.outputHelp();
return process.exit(SysExits.EX_USAGE);
}
width,
height,
images,
genericTexture,
} = program;
if (
!width ||
!height ||
!images ||
images.length === 0 ||
!transition ||
transition.length === 0 ||
!out
) {
program.outputHelp();
process.exit(1);
}
const gl = createGL(width, height, { preserveDrawingBuffer: true });
if (!gl) throw new Error("GL validation context could not be created");
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
const data = new Uint8Array(width * height * 4);
const pixels = ndarray(data, [height, width, 4])
.transpose(1, 0, 2)
.step(1, -1, 1);
const extraImagesSrc = genericTexture ? [genericTexture] : [];
function readTransition(str) {
function initialize (cmd) {
if (typeof cmd !== 'object') {
program.outputHelp()
process.exit(1)
}
return new Clocker({
dir: dir(cmd)
})
}
'The input format to be validated.\n' +
' AMP by default.',
'AMP')
.option(
'--format ',
'How to format the output.\n' +
' "color" displays errors/warnings/success in\n' +
' red/orange/green.\n' +
' "text" avoids color (e.g., useful in terminals not\n' +
' supporting color).\n' +
' "json" emits json corresponding to the ValidationResult\n' +
' message in validator.proto.',
'color')
.parse(process.argv);
if (program.args.length === 0) {
program.outputHelp();
process.exit(1);
}
if (program.html_format !== 'AMP' && program.html_format !== 'AMP4ADS' &&
program.html_format !== 'AMP4EMAIL' &&
program.html_format !== 'ACTIONS') {
process.stderr.write(
'--html_format must be set to "AMP", "AMP4ADS", "AMP4EMAIL", or ' +
'"ACTIONS.\n',
function() {
process.exit(1);
});
}
if (program.format !== 'color' && program.format !== 'text' &&
program.format !== 'json') {
process.stderr.write(
'--format must be set to "color", "text", or "json".\n', function() {
async function main(args) {
program
.version('0.1.0')
.description('The following command is in charge of Initializing the activiti cloud env with the default apps' +
'adf-cli init-aae-env --host "gateway_env" --oauth "identity_env" --identityHost "identity_env" --username "username" --password "password"')
.option('-h, --host [type]', 'Host gateway')
.option('-o, --oauth [type]', 'Host sso server')
.option('--clientId[type]', 'sso client')
.option('--username [type]', 'username')
.option('--password [type]', 'password')
.parse(process.argv);
if (process.argv.includes('-h') || process.argv.includes('--help')) {
program.outputHelp();
}
const alfrescoJsApi = getAlfrescoJsApiInstance(args);
await login(args, alfrescoJsApi);
const result = { isValid: true };
AAE_MICROSERVICES.map(async (serviceName) => {
await healthCheck(args, alfrescoJsApi, serviceName, result);
});
if (result.isValid) {
logger.error('The envirorment is up and running');
await deployMissingApps(args, alfrescoJsApi);
} else {
logger.error('The envirorment is not up');
function constructWebsocketUrl (props) {
const {host, port, channel, notSecure} = props
const scheme = notSecure ? 'ws' : 'wss'
if (!host || !channel) {
program.outputHelp()
return false
}
const path = (channel || '').replace(/^\/?/, '/')
return `${scheme}://${host}${port ? `:${port}` : ''}${path}`
}