Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@sitecore-jss/sitecore-jss-cli

Package Overview
Dependencies
Maintainers
8
Versions
1342
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sitecore-jss/sitecore-jss-cli - npm Package Compare versions

Comparing version 16.0.0-canary.8 to 16.0.0-canary.11

4

dist/cli-shared.js

@@ -13,2 +13,5 @@ "use strict";

});
/**
* @param {any} commands
*/
function cli(commands) {

@@ -18,2 +21,3 @@ var appCommands = yargs_1.default.usage('$0 <command>');

// when the command is just 'jss' as a global bin
// eslint-disable-next-line @typescript-eslint/no-explicit-any
appCommands.$0 = 'jss';

@@ -20,0 +24,0 @@ var _loop_1 = function (cmd) {

5

dist/cli.global.js

@@ -27,6 +27,9 @@ "use strict";

var commands = __importStar(require("./scripts/index.global"));
// implements CLI commands when executed from a globally installed node_modules folder
/**
* implements CLI commands when executed from a globally installed node_modules folder
*/
function default_1() {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
cli_shared_1.default(commands);
}
exports.default = default_1;

@@ -65,2 +65,5 @@ "use strict";

var commands = __importStar(require("./scripts"));
/**
* Get package script commands
*/
function getPackageScriptCommands() {

@@ -88,2 +91,3 @@ return __awaiter(this, void 0, void 0, function () {

handler: function (argv) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
if (argv._[0]) {

@@ -101,3 +105,5 @@ run_package_script_1.default(process.argv.slice(2));

}
// implements CLI commands when executed from a local node_modules folder
/**
* implements CLI commands when executed from a local node_modules folder
*/
function default_1() {

@@ -104,0 +110,0 @@ return __awaiter(this, void 0, void 0, function () {

@@ -47,2 +47,3 @@ "use strict";

var FolderSource = /** @class */ (function () {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function FolderSource(argv, destinationPath) {

@@ -49,0 +50,0 @@ this.templatePath = '';

@@ -50,2 +50,3 @@ "use strict";

var GitHubSource = /** @class */ (function () {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function GitHubSource(argv, destinationPath) {

@@ -103,3 +104,2 @@ var repository = argv.repository || 'Sitecore/jss';

return [2 /*return*/, new Promise(function (resolve) {
// tslint:disable-next-line:max-line-length
request_1.default.get(_this.githubListApi, { proxy: _this.argv.proxy, json: true, headers: { 'User-Agent': 'SitecoreJSSCLI' } }, function (error, response, body) {

@@ -145,3 +145,6 @@ if (error) {

return [4 /*yield*/, new Promise(function (resolve, reject) {
var res = request_1.default.get(_this.githubDownloadUrl, { proxy: _this.argv.proxy, headers: { 'User-Agent': 'SitecoreJSSCLI' } });
var res = request_1.default.get(_this.githubDownloadUrl, {
proxy: _this.argv.proxy,
headers: { 'User-Agent': 'SitecoreJSSCLI' },
});
var fileStream = fs_1.default.createWriteStream(fileName, { autoClose: true });

@@ -179,3 +182,6 @@ res.pipe(fileStream);

case 0:
zip.filter(function (innerPath) { return filter.test(innerPath); }).forEach(function (file) {
zip
.filter(function (innerPath) { return filter.test(innerPath); })
.forEach(function (file) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var relativePath = filter.exec(file.name)[1];

@@ -182,0 +188,0 @@ var outputPath = path_1.default.join(_this.destinationPath, relativePath);

@@ -11,2 +11,7 @@ "use strict";

var path_1 = __importDefault(require("path"));
/**
* @param {string} projectFolder
* @param {string} name
* @param {string} hostName
*/
function applyNameToProject(projectFolder, name, hostName) {

@@ -13,0 +18,0 @@ console.log(chalk_1.default.cyan("Setting package name " + name + "..."));

@@ -60,3 +60,9 @@ "use strict";

var package_1 = require("./scripts/package");
function microManifest(argv, manifestContents) {
/**
* @param {any} argv
* @param {string} manifestContents
*/
function microManifest(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
argv, manifestContents) {
return __awaiter(this, void 0, void 0, function () {

@@ -83,5 +89,3 @@ var packageJson, jssConfig, legacyConfig;

legacyConfig = jssConfig.sitecore;
argv.deployUrl = legacyConfig.shipUrl
? legacyConfig.shipUrl
: jssConfig.sitecore.deployUrl;
argv.deployUrl = legacyConfig.shipUrl ? legacyConfig.shipUrl : jssConfig.sitecore.deployUrl;
}

@@ -92,5 +96,3 @@ if (!argv.deployUrl) {

if (/\/ship\/services\/package/.test(argv.deployUrl)) {
throw new Error(
// tslint:disable-next-line:max-line-length
'deployUrl appears to be a Sitecore.Ship endpoint. JSS no longer uses Ship. You will need to reconfigure your endpoint to the JSS deploy service and provide an app shared secret to deploy.');
throw new Error('deployUrl appears to be a Sitecore.Ship endpoint. JSS no longer uses Ship. You will need to reconfigure your endpoint to the JSS deploy service and provide an app shared secret to deploy.');
}

@@ -97,0 +99,0 @@ if (!argv.deploySecret) {

@@ -7,2 +7,3 @@ "use strict";

var resolve_1 = __importDefault(require("resolve"));
// eslint-disable-next-line @typescript-eslint/no-explicit-any
exports.default = (function () {

@@ -16,2 +17,3 @@ return new Promise(function (resolvePromise, rejectPromise) {

else {
// eslint-disable-next-line @typescript-eslint/no-var-requires
resolvePromise(require(packageJson));

@@ -18,0 +20,0 @@ }

@@ -17,2 +17,6 @@ "use strict";

// uses yarn semantics for args (i.e. pass ['scriptname', '--myarg=value'], no -- needed)
/**
* @param {string[]} args
* @param {SpawnSyncOptionsWithStringEncoding} [options]
*/
function runPackageScript(args, options) {

@@ -26,2 +30,6 @@ // npm needs a -- delimiter before any extra args

// uses yarn semantics for args (i.e. pass ['scriptname', '--myarg=value'], no -- needed)
/**
* @param {string[]} npmArgs
* @param {SpawnSyncOptionsWithStringEncoding} options
*/
function runPackageManagerCommand(npmArgs, options) {

@@ -28,0 +36,0 @@ console.log("> npm " + npmArgs.join(' '));

@@ -43,2 +43,3 @@ "use strict";

exports.handler = exports.builder = exports.describe = exports.command = void 0;
/* eslint-disable prettier/prettier */
var sitecore_jss_dev_tools_1 = require("@sitecore-jss/sitecore-jss-dev-tools");

@@ -55,2 +56,6 @@ var resolve_package_1 = __importDefault(require("../resolve-package"));

};
/**
* @param {any} argv
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function handler(argv) {

@@ -57,0 +62,0 @@ return __awaiter(this, void 0, void 0, function () {

@@ -43,2 +43,3 @@ "use strict";

exports.builder = void 0;
/* eslint-disable prettier/prettier */
var chalk_1 = __importDefault(require("chalk"));

@@ -51,2 +52,5 @@ var fs_1 = __importDefault(require("fs"));

var spawn_1 = __importDefault(require("../spawn"));
/**
* @param {any} yargs
*/
function builder(yargs) {

@@ -96,2 +100,6 @@ return yargs.command('create <name> <template>', 'Creates a new JSS application based on one of the sample apps.', function (innerBuilder) {

exports.builder = builder;
/**
* @param {any} argv
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function handler(argv) {

@@ -119,3 +127,3 @@ return __awaiter(this, void 0, void 0, function () {

nextStepsList.push("* Connect to Sitecore with " + chalk_1.default.green('jss setup') + " (optional)");
nextStepsList.push("* Check out the JSS documentation at https://jss.sitecore.net");
nextStepsList.push('* Check out the JSS documentation at https://jss.sitecore.net');
if (!fs_1.default.existsSync(createScriptPath)) {

@@ -135,2 +143,6 @@ console.warn(chalk_1.default.yellow("Template " + argv.template + " did not have a jss-create.js in its root to invoke. No template configuration will be performed."));

}
/**
* @param {string} name
* @param {string} proposedPath
*/
function checkName(name, proposedPath) {

@@ -146,2 +158,5 @@ if (!/^[a-z\-_.]+$/.test(name)) {

}
/**
* @param {string} projectFolder
*/
function installPackages(projectFolder) {

@@ -171,2 +186,6 @@ console.log(chalk_1.default.cyan('Installing packages...'));

}
/**
* @param {string} name
* @param {string[]} nextStepsArray
*/
function nextSteps(name, nextStepsArray) {

@@ -173,0 +192,0 @@ console.log(chalk_1.default.red(' -/oyhdmNNNNmdhyo/- '));

@@ -56,2 +56,6 @@ "use strict";

exports.builder = __assign(__assign({}, deploy_items_1.builder), deploy_files_1.builder);
/**
* @param {any} argv
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function handler(argv) {

@@ -58,0 +62,0 @@ return __awaiter(this, void 0, void 0, function () {

@@ -46,8 +46,12 @@ "use strict";

var deploy_template_1 = require("./deploy.template");
/**
* @param {Argv} yargs
*/
function builder(yargs) {
return yargs.command('component <name>',
// tslint:disable-next-line:max-line-length
'Deploys a new component (or updates an existing component) to the Sitecore server when using Sitecore-first development. `jss deploy component --help` for options.', args, handler);
return yargs.command('component <name>', 'Deploys a new component (or updates an existing component) to the Sitecore server when using Sitecore-first development. `jss deploy component --help` for options.', args, handler);
}
exports.default = builder;
/**
* @param {Argv} yargs
*/
function args(yargs) {

@@ -58,5 +62,3 @@ return deploy_template_1.args(yargs)

type: 'array',
describe:
// tslint:disable-next-line:max-line-length
'The placeholder name(s) to allow the rendering to be placed in. For example --allowedPlaceholders Foo or --allowedPlaceholders Foo Bar',
describe: 'The placeholder name(s) to allow the rendering to be placed in. For example --allowedPlaceholders Foo or --allowedPlaceholders Foo Bar',
})

@@ -66,8 +68,10 @@ .option('exposesPlaceholders', {

type: 'array',
describe:
// tslint:disable-next-line:max-line-length
'The names of any placeholders that are exposed on this component (to place other components in). This will cause placeholder settings items to be generated for them.',
describe: 'The names of any placeholders that are exposed on this component (to place other components in). This will cause placeholder settings items to be generated for them.',
});
}
exports.args = args;
/**
* @param {any} argv
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function handler(argv) {

@@ -74,0 +78,0 @@ return __awaiter(this, void 0, void 0, function () {

@@ -43,2 +43,3 @@ "use strict";

exports.handler = exports.builder = exports.describe = exports.command = void 0;
/* eslint-disable prettier/prettier */
var sitecore_jss_dev_tools_1 = require("@sitecore-jss/sitecore-jss-dev-tools");

@@ -59,5 +60,3 @@ var path_1 = __importDefault(require("path"));

type: 'string',
describe:
// tslint:disable-next-line:max-line-length
'Destination path to deploy to. Defaults to the \'instancePath\' set in scjssconfig.json, combined with the \'sitecoreConfigPath\' setting from package.json.',
describe: 'Destination path to deploy to. Defaults to the \'instancePath\' set in scjssconfig.json, combined with the \'sitecoreConfigPath\' setting from package.json.',
},

@@ -68,5 +67,9 @@ config: {

describe: 'Path to scjssconfig file.',
default: './scjssconfig.json'
}
default: './scjssconfig.json',
},
};
/**
* @param {any} argv
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function handler(argv) {

@@ -73,0 +76,0 @@ return __awaiter(this, void 0, void 0, function () {

@@ -43,2 +43,3 @@ "use strict";

exports.handler = exports.builder = exports.describe = exports.command = void 0;
/* eslint-disable prettier/prettier */
var sitecore_jss_dev_tools_1 = require("@sitecore-jss/sitecore-jss-dev-tools");

@@ -50,5 +51,3 @@ var fs_1 = __importDefault(require("fs"));

exports.command = 'files';
exports.describe =
// tslint:disable-next-line:max-line-length
'Deploys the app\'s build artifact files to the Sitecore server using a direct file copy (no Sitecore items will be deployed). `jss deploy files --help` for options.';
exports.describe = 'Deploys the app\'s build artifact files to the Sitecore server using a direct file copy (no Sitecore items will be deployed). `jss deploy files --help` for options.';
exports.builder = {

@@ -63,5 +62,3 @@ source: {

type: 'string',
describe:
// tslint:disable-next-line:max-line-length
'Destination path to deploy to. Defaults to the \'instancePath\' set in scjssconfig.json, combined with the \'sitecoreDistPath\' setting from package.json.',
describe: 'Destination path to deploy to. Defaults to the \'instancePath\' set in scjssconfig.json, combined with the \'sitecoreDistPath\' setting from package.json.',
},

@@ -72,3 +69,3 @@ config: {

describe: 'Path to scjssconfig file.',
default: './scjssconfig.json'
default: './scjssconfig.json',
},

@@ -90,5 +87,3 @@ exclude: {

type: 'string',
describe:
// tslint:disable-next-line:max-line-length
'Name of the npm script to run to perform a build before deploying. To skip running any script, use --skipBuild or pass the argument with a blank value.',
describe: 'Name of the npm script to run to perform a build before deploying. To skip running any script, use --skipBuild or pass the argument with a blank value.',
default: 'build',

@@ -103,2 +98,6 @@ },

};
/**
* @param {any} argv
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function handler(argv) {

@@ -105,0 +104,0 @@ return __awaiter(this, void 0, void 0, function () {

@@ -54,2 +54,3 @@ "use strict";

exports.handler = exports.builder = exports.describe = exports.command = void 0;
/* eslint-disable prettier/prettier */
var sitecore_jss_dev_tools_1 = require("@sitecore-jss/sitecore-jss-dev-tools");

@@ -77,5 +78,3 @@ var resolve_package_1 = __importDefault(require("../resolve-package"));

type: 'boolean',
describe:
// tslint:disable-next-line:max-line-length
'If true, skips build, manifest, and packaging steps. This can be used to consume existing output from jss package (via the packageOutputPath parameter) without rebuilding it.',
describe: 'If true, skips build, manifest, and packaging steps. This can be used to consume existing output from jss package (via the packageOutputPath parameter) without rebuilding it.',
default: false,

@@ -86,3 +85,3 @@ }, config: {

describe: 'Path to scjssconfig file.',
default: './scjssconfig.json'
default: './scjssconfig.json',
}, proxy: {

@@ -97,2 +96,6 @@ requiresArgs: false,

} }, package_1.builder);
/**
* @param {any} argv
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function handler(argv) {

@@ -119,5 +122,3 @@ return __awaiter(this, void 0, void 0, function () {

legacyConfig = jssConfig.sitecore;
argv.deployUrl = legacyConfig.shipUrl
? legacyConfig.shipUrl
: jssConfig.sitecore.deployUrl;
argv.deployUrl = legacyConfig.shipUrl ? legacyConfig.shipUrl : jssConfig.sitecore.deployUrl;
}

@@ -128,5 +129,3 @@ if (!argv.deployUrl) {

if (/\/ship\/services\/package/.test(argv.deployUrl)) {
throw new Error(
// tslint:disable-next-line:max-line-length
'deployUrl appears to be a Sitecore.Ship endpoint. JSS no longer uses Ship. You will need to reconfigure your endpoint to the JSS deploy service and provide an app shared secret to deploy.');
throw new Error('deployUrl appears to be a Sitecore.Ship endpoint. JSS no longer uses Ship. You will need to reconfigure your endpoint to the JSS deploy service and provide an app shared secret to deploy.');
}

@@ -133,0 +132,0 @@ if (!argv.deploySecret) {

"use strict";
/* eslint-disable @typescript-eslint/no-explicit-any */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {

@@ -33,2 +34,5 @@ if (k2 === undefined) k2 = k;

var deploy_template_1 = __importDefault(require("./deploy.template"));
/**
* @param {Argv} yargs
*/
function builder(yargs) {

@@ -51,2 +55,3 @@ return yargs

},
// eslint-disable-next-line @typescript-eslint/no-empty-function
handler: function () { },

@@ -53,0 +58,0 @@ })

@@ -62,2 +62,5 @@ "use strict";

} }, package_1.builder);
/**
* Deploy package handler
*/
function handler() {

@@ -64,0 +67,0 @@ return __awaiter(this, void 0, void 0, function () {

@@ -43,10 +43,15 @@ "use strict";

exports.args = void 0;
/* eslint-disable prettier/prettier */
var chalk_1 = __importDefault(require("chalk"));
var micro_manifest_1 = __importDefault(require("../micro-manifest"));
/**
* @param {Argv} yargs
*/
function builder(yargs) {
return yargs.command('template <name>',
// tslint:disable-next-line:max-line-length
'Deploys a new template (or updates an existing template) to the Sitecore server when using Sitecore-first development. `jss deploy template --help` for options.', args, handler);
return yargs.command('template <name>', 'Deploys a new template (or updates an existing template) to the Sitecore server when using Sitecore-first development. `jss deploy template --help` for options.', args, handler);
}
exports.default = builder;
/**
* @param {Argv} yargs
*/
function args(yargs) {

@@ -66,5 +71,3 @@ return yargs

type: 'array',
describe:
// tslint:disable-next-line:max-line-length
'Creates template fields. Fields can be either a plain name, or name:fieldType. For example, --fields Foo Bar or --fields Foo "Bar Bas:Rich Text"',
describe: 'Creates template fields. Fields can be either a plain name, or name:fieldType. For example, --fields Foo Bar or --fields Foo "Bar Bas:Rich Text"',
})

@@ -85,3 +88,3 @@ .option('icon', {

describe: 'Path to scjssconfig file.',
default: './scjssconfig.json'
default: './scjssconfig.json',
})

@@ -102,6 +105,10 @@ .option('deployUrl', {

type: 'string',
describe: 'Whitelists a specific SSL certificate thumbprint, regardless of normal SSL validation. Useful for self-signed certificates.'
describe: 'Whitelists a specific SSL certificate thumbprint, regardless of normal SSL validation. Useful for self-signed certificates.',
});
}
exports.args = args;
/**
* @param {Argv} argv
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function handler(argv) {

@@ -108,0 +115,0 @@ return __awaiter(this, void 0, void 0, function () {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.handler = exports.builder = exports.describe = exports.command = void 0;
/* eslint-disable prettier/prettier */
exports.command = 'whats-the-password';
exports.describe = false;
exports.builder = {};
/**
* Easter egg handler
*/
function handler() {

@@ -8,0 +12,0 @@ console.log('Why it\'s b, of course.');

@@ -7,2 +7,5 @@ "use strict";

exports.builder = {};
/**
* Elephant handler
*/
function handler() {

@@ -9,0 +12,0 @@ console.log(" _.-- ,.--.\n .' .' /\n | @ |'..--------._\n / \\._/ '.\n / .-.- \\\n ( / \\ \\\n \\\\ '. | #\n \\\\ \\ -. /\n :\\ | )._____.' \\\n \" | / \\ | \\ )\n | |./' :__ \\.-'\n '--'\n\n Won't someone please address me?\n");

@@ -51,5 +51,3 @@ "use strict";

exports.command = 'manifest';
exports.describe =
// tslint:disable-next-line:max-line-length
'Generates a JSS manifest file which defines app assets to import into Sitecore. Nothing is deployed or added to a deployment package; this just collects assets. See `jss package`, which takes the manifest and turns it into a deployable package. `jss manifest --help` for options.';
exports.describe = 'Generates a JSS manifest file which defines app assets to import into Sitecore. Nothing is deployed or added to a deployment package; this just collects assets. See `jss package`, which takes the manifest and turns it into a deployable package. `jss manifest --help` for options.';
exports.builder = {

@@ -70,5 +68,3 @@ appName: {

type: 'string',
describe:
// tslint:disable-next-line:max-line-length
'A JS module to require before processing the manifest. This may initialize a custom compiler (Babel, TypeScript), perform init tasks, etc.',
describe: 'A JS module to require before processing the manifest. This may initialize a custom compiler (Babel, TypeScript), perform init tasks, etc.',
default: './sitecore/definitions/config.js',

@@ -105,5 +101,3 @@ },

type: 'array',
describe:
// tslint:disable-next-line:max-line-length
'Sets the root placeholder name(s) for the app. If set, overrides root placeholders set in the package.json',
describe: 'Sets the root placeholder name(s) for the app. If set, overrides root placeholders set in the package.json',
alias: 'p',

@@ -114,5 +108,3 @@ },

type: 'boolean',
describe:
// tslint:disable-next-line:max-line-length
'Causes the JSS import to run as a wipe + recreate of any existing app items. Pass --unattendedWipe in addition to bypass interactive confirmation for CI scenarios.',
describe: 'Causes the JSS import to run as a wipe + recreate of any existing app items. Pass --unattendedWipe in addition to bypass interactive confirmation for CI scenarios.',
alias: 'w',

@@ -146,2 +138,6 @@ default: false,

};
/**
* @param {any} argv
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function handler(argv) {

@@ -160,3 +156,2 @@ return __awaiter(this, void 0, void 0, function () {

if (!language) {
// tslint:disable-next-line:no-string-throw
throw 'Language was not defined as a parameter or in the package.json { config: { language: "en" } }';

@@ -169,3 +164,2 @@ }

if (!appName) {
// tslint:disable-next-line:no-string-throw
throw '--appName was not defined as a parameter or in the package.json { config: { appName: "myJssAppName" } }';

@@ -181,3 +175,2 @@ }

if (!rootPlaceholders) {
// tslint:disable-next-line:no-string-throw
throw '--rootPlaceholders was not defined as a parameter or in the package.json { config: { rootPlaceholders: ["ph-name"] } }';

@@ -184,0 +177,0 @@ }

@@ -58,5 +58,3 @@ "use strict";

exports.command = 'package';
exports.describe =
// tslint:disable-next-line:max-line-length
'Generates a JSS manifest package file that can be deployed to Sitecore. Nothing is deployed. See also jss deploy package, which takes the package and deploys it to Sitecore. `jss package --help` for options.';
exports.describe = 'Generates a JSS manifest package file that can be deployed to Sitecore. Nothing is deployed. See also jss deploy package, which takes the package and deploys it to Sitecore. `jss package --help` for options.';
exports.builder = __assign({ packageOutputPath: {

@@ -70,7 +68,9 @@ requiresArgs: false,

type: 'boolean',
describe:
// tslint:disable-next-line:max-line-length
'If true, skips manifest generation. This can be used to consume existing output from jss manifest (via the manifestOutputPath parameter) without rebuilding it.',
describe: 'If true, skips manifest generation. This can be used to consume existing output from jss manifest (via the manifestOutputPath parameter) without rebuilding it.',
default: false,
} }, manifest_1.builder);
/**
* @param {any} argv
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function handler(argv) {

@@ -77,0 +77,0 @@ return __awaiter(this, void 0, void 0, function () {

@@ -40,2 +40,3 @@ "use strict";

exports.handler = exports.builder = exports.describe = exports.command = void 0;
/* eslint-disable prettier/prettier */
var sitecore_jss_dev_tools_1 = require("@sitecore-jss/sitecore-jss-dev-tools");

@@ -86,2 +87,6 @@ exports.command = 'setup';

};
/**
* @param {any} argv
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function handler(argv) {

@@ -88,0 +93,0 @@ return __awaiter(this, void 0, void 0, function () {

@@ -7,2 +7,7 @@ "use strict";

var cross_spawn_1 = __importDefault(require("cross-spawn"));
/**
* @param {string} command
* @param {string[]} args
* @param {SpawnSyncOptionsWithStringEncoding} options
*/
function default_1(command, args, options) {

@@ -9,0 +14,0 @@ var result = cross_spawn_1.default.sync(command, args, Object.assign({ stdio: 'inherit' }, options));

{
"name": "@sitecore-jss/sitecore-jss-cli",
"version": "16.0.0-canary.8",
"version": "16.0.0-canary.11",
"description": "Sitecore JSS command-line",

@@ -9,3 +9,3 @@ "scripts": {

"clean": "del-cli dist types",
"lint": "tslint -p . -c ../../tslint.json \"src/**/*.ts\"",
"lint": "eslint --fix ./src/**/*.ts",
"prepublishOnly": "npm run build",

@@ -34,4 +34,4 @@ "jss": "node ./dist/bin/jss.js",

"dependencies": {
"@sitecore-jss/sitecore-jss-dev-tools": "^16.0.0-canary.8",
"@sitecore-jss/sitecore-jss-manifest": "^16.0.0-canary.8",
"@sitecore-jss/sitecore-jss-dev-tools": "^16.0.0-canary.11",
"@sitecore-jss/sitecore-jss-manifest": "^16.0.0-canary.11",
"chalk": "^2.4.2",

@@ -65,2 +65,3 @@ "cross-spawn": "^7.0.0",

"del-cli": "^3.0.1",
"eslint": "^7.15.0",
"mocha": "^8.1.3",

@@ -71,3 +72,3 @@ "sinon": "^7.5.0",

},
"gitHead": "be22a453049c318e28e73343974f371cc0300c7d"
"gitHead": "efc18cfe8c16303e8f585bbbc3135b92d5fef162"
}
import { CommandModule } from 'yargs';
/**
* @param {any} commands
*/
export default function cli(commands: {

@@ -3,0 +6,0 @@ [key: string]: CommandModule & {

@@ -0,1 +1,4 @@

/**
* implements CLI commands when executed from a local node_modules folder
*/
export default function (): Promise<void>;

@@ -0,1 +1,4 @@

/**
* implements CLI commands when executed from a globally installed node_modules folder
*/
export default function (): void;

@@ -8,6 +8,6 @@ export declare class GitHubSource {

constructor(argv: any, destinationPath: string);
getFromSource(): Promise<unknown>;
getFromSource(): Promise<void>;
verifyTemplate(): Promise<unknown>;
downloadRepo(fileName: string): Promise<void>;
extractTemplateFiles(zipFile: string): Promise<unknown>;
extractTemplateFiles(zipFile: string): Promise<void>;
}

@@ -0,1 +1,6 @@

/**
* @param {string} projectFolder
* @param {string} name
* @param {string} hostName
*/
export declare function applyNameToProject(projectFolder: string, name: string, hostName: string): void;

@@ -0,3 +1,7 @@

/**
* @param {any} argv
* @param {string} manifestContents
*/
export default function microManifest(argv: {
[key: string]: any;
}, manifestContents: string): Promise<unknown>;
}, manifestContents: string): Promise<void>;
/// <reference types="node" />
import { SpawnSyncOptionsWithStringEncoding } from 'child_process';
/**
* @param {string[]} args
* @param {SpawnSyncOptionsWithStringEncoding} [options]
*/
export default function runPackageScript(args: string[], options?: SpawnSyncOptionsWithStringEncoding): void;
/**
* @param {string[]} npmArgs
* @param {SpawnSyncOptionsWithStringEncoding} options
*/
export declare function runPackageManagerCommand(npmArgs: string[], options?: SpawnSyncOptionsWithStringEncoding): void;

@@ -10,2 +10,5 @@ export declare const command = "clean";

};
/**
* @param {any} argv
*/
export declare function handler(argv: any): Promise<void>;
/// <reference types="yargs" />
import { Argv } from '../../node_modules/@types/yargs';
/**
* @param {any} yargs
*/
export declare function builder(yargs: Argv): Argv<{}>;

@@ -170,2 +170,5 @@ export declare const command = "app";

};
/**
* @param {any} argv
*/
export declare function handler(argv: any): Promise<void>;
/// <reference types="yargs" />
import { Argv } from '../../node_modules/@types/yargs';
/**
* @param {Argv} yargs
*/
export default function builder(yargs: Argv): Argv<{}>;
/**
* @param {Argv} yargs
*/
export declare function args(yargs: Argv): Argv<{

@@ -5,0 +11,0 @@ name: string | undefined;

@@ -22,2 +22,5 @@ export declare const command = "config";

};
/**
* @param {any} argv
*/
export declare function handler(argv: any): Promise<void>;
/// <reference types="yargs" />
import { Argv } from '../../node_modules/@types/yargs';
/**
* @param {Argv} yargs
*/
export declare function builder(yargs: Argv): Argv<{}>;

@@ -45,2 +45,5 @@ export declare const command = "files";

};
/**
* @param {any} argv
*/
export declare function handler(argv: any): Promise<void>;

@@ -136,2 +136,5 @@ export declare const command = "items";

};
/**
* @param {any} argv
*/
export declare function handler(argv: any): Promise<unknown>;

@@ -106,2 +106,5 @@ export declare const command = "package";

};
/**
* Deploy package handler
*/
export declare function handler(): Promise<void>;
/// <reference types="yargs" />
import { Argv } from '../../node_modules/@types/yargs';
/**
* @param {Argv} yargs
*/
export default function builder(yargs: Argv): Argv<{}>;
/**
* @param {Argv} yargs
*/
export declare function args(yargs: Argv): Argv<{

@@ -5,0 +11,0 @@ name: string | undefined;

export declare const command = "whats-the-password";
export declare const describe = false;
export declare const builder: {};
/**
* Easter egg handler
*/
export declare function handler(): void;
export declare const command = "elephant-in-the-room";
export declare const describe = false;
export declare const builder: {};
/**
* Elephant handler
*/
export declare function handler(): void;

@@ -85,2 +85,5 @@ export declare const command = "manifest";

};
/**
* @param {any} argv
*/
export declare function handler(argv: any): Promise<import("@sitecore-jss/sitecore-jss-manifest").ManifestInstance>;

@@ -97,2 +97,5 @@ export declare const command = "package";

};
/**
* @param {any} argv
*/
export declare function handler(argv: any): Promise<unknown>;

@@ -45,2 +45,5 @@ export declare const command = "setup";

};
/**
* @param {any} argv
*/
export declare function handler(argv: any): Promise<void>;
/// <reference types="node" />
import { SpawnSyncOptionsWithStringEncoding } from 'child_process';
/**
* @param {string} command
* @param {string[]} args
* @param {SpawnSyncOptionsWithStringEncoding} options
*/
export default function (command: string, args: string[], options?: SpawnSyncOptionsWithStringEncoding): void;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc