New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

shokax-cli

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shokax-cli - npm Package Compare versions

Comparing version 0.0.10 to 0.1.0

12

index.js
#!/usr/bin/env node
import { Command } from 'commander';
import { versionUtil, installTheme, repairTheme } from './lib/util.js';
const versionCLI = '0.1.1';
const versionCLI = '0.2.0';
const program = new Command();
program
.version(`
shokaX-CLI (shokaX 0.3+ ver.)
shokaX-CLI (shokaX 0.4+ ver.)
CLI: ${versionCLI} Util: ${versionUtil}

@@ -17,4 +17,4 @@ `)

.description('Install shoka or shokaX theme')
.action(function (theme, options) {
installTheme(theme, options.repo, options.packageManager, options.extraPackages, options.collocation);
.action(async function (theme, options) {
await installTheme(theme, options.repo, options.packageManager, options.extraPackages, options.collocation);
});

@@ -26,5 +26,5 @@ program

.description('Repair the theme to solve problems')
.action(function (options) {
repairTheme(options.packageManager, options.part);
.action(async function (options) {
await repairTheme(options.packageManager, options.part);
});
program.parse();

@@ -6,3 +6,3 @@ import shell from 'shelljs';

import path from 'path';
const versionUtil = '0.2.2';
const versionUtil = '0.3.0';
const hexoLog = logger();

@@ -31,3 +31,3 @@ const collocSet = {

};
const installNeedPakcages = (preList) => {
const installNeedPakcages = async (preList) => {
let removePm;

@@ -53,7 +53,7 @@ if (preList[1] === 'npm') {

}
['hexo-lightning-minify', 'hexo-autoprefixer', 'hexo-algoliasearch', 'hexo-feed', 'hexo-renderer-pug',
'esbuild', 'theme-shokax-pjax', 'theme-shokax-anime', 'unlazy', 'mouse-firework']
.forEach((item) => {
addPackage(preList[1], item);
});
const res = await (await fetch('https://registry.npmmirror.com/hexo-theme-shokax')).json();
const latestV = res['dist-tags'].latest;
for (const key in res.versions[latestV].dependencies) {
addPackage(preList[1], `${key}@${res.versions[latestV].dependencies[key]}`);
}
};

@@ -105,8 +105,8 @@ const prepareTheme = (pm) => {

};
const installTheme = (theme, repo, pm, extra, collocation) => {
const installTheme = async (theme, repo, pm, extra, collocation) => {
const origin = '';
const preList = prepareTheme(pm);
if (repo === 'github') {
getGithubProgarm().then(() => {
installNeedPakcages(preList);
getGithubProgarm().then(async () => {
await installNeedPakcages(preList);
hexoLog.info('Please change the config to enable shokaX.');

@@ -133,3 +133,3 @@ hexoLog.info(`

hexoLog.info('Waiting for package manager...');
installNeedPakcages(preList);
await installNeedPakcages(preList);
if (typeof extra !== 'undefined') {

@@ -152,3 +152,3 @@ hexoLog.info('Installing extra packages...');

};
const repairTheme = (packageManager, part) => {
const repairTheme = async (packageManager, part) => {
const preList = prepareTheme(packageManager);

@@ -161,5 +161,5 @@ if (!preList[0]) {

hexoLog.info('Checking packages...');
installNeedPakcages(preList);
await installNeedPakcages(preList);
}
};
export { versionUtil, installTheme, repairTheme };
{
"name": "shokax-cli",
"version": "0.0.10",
"version": "0.1.0",
"description": "ShokaX's offical tools",

@@ -11,2 +11,6 @@ "main": "index.js",

},
"scripts": {
"build": "tsc",
"test": "npm install . -g"
},
"repository": "https://github.com/zkz098/shokaX-CLI",

@@ -31,7 +35,3 @@ "author": "zkz098",

"typescript": "^5.3.3"
},
"scripts": {
"build": "tsc",
"test": "npm install . -g"
}
}
}
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