Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@pergel/cli

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pergel/cli - npm Package Compare versions

Package was removed
Sorry, it seems this package was removed from the registry
Comparing version
0.6.6
to
0.7.0
+89
dist/select-23J2FHOD.js
import {
definePergelLoadConfig
} from "./chunk-ZFO3AWCZ.js";
// src/commands/select.ts
import { readFileSync } from "node:fs";
import { join, resolve } from "node:path";
import { execSync } from "node:child_process";
import { intro, select } from "@clack/prompts";
import { defineCommand } from "citty";
import consola from "consola";
var select_default = defineCommand({
meta: {
name: "Pergel Upgrade",
description: "Upgrade Pergel CLI",
version: "0.0.1"
},
async run() {
try {
const file = await definePergelLoadConfig();
if (!file.config) {
consola.error("No config file found");
return;
}
intro("Oku Pergel Select CLI");
const readmeString = readFileSync(resolve(join(file.config.dir?.pergel, "README.json")), "utf-8");
const jsonData = JSON.parse(readmeString);
const projectNames = Object.keys(jsonData).filter((i) => {
const project = jsonData[i];
if (!project)
return false;
for (const key in project) {
if (project[key].cli)
return true;
}
return false;
});
if (!projectNames.length) {
consola.error("No projects found");
return;
}
const selectedProject = await select({
message: "Select a project",
options: projectNames.map((i) => ({
label: i,
value: i
}))
});
const selectedProjectData = jsonData[selectedProject];
const cliModules = Object.keys(selectedProjectData).filter((i) => {
const cli = selectedProjectData[i].cli;
if (cli)
return true;
return false;
});
const selectedModule = await select({
message: "Select a module",
options: cliModules.map((i) => ({
label: i,
value: i
}))
});
if (selectedModule) {
const selectedCli = await select({
message: "Select a cli command",
options: Object.keys(selectedProjectData[selectedModule].cli).map((i) => ({
label: i,
value: i
}))
});
const cliData = selectedProjectData[selectedModule].cli[selectedCli];
if (cliData) {
consola.info(`Running ${cliData}`);
execSync(
cliData,
{
stdio: "inherit"
}
);
}
}
} catch (error) {
consola.error(error);
}
}
});
export {
select_default as default
};
+3
-2

@@ -13,3 +13,3 @@ import {

type: "module",
version: "0.6.6",
version: "0.7.0",
packageManager: "pnpm@8.10.0",

@@ -138,3 +138,4 @@ description: "Full Stack Nuxt Application. It contains the necessary toolkits for a software developer and a fast, clean, tested toolkit.",

module: () => import("./module-5VMCAOPO.js").then((m) => m.default),
download: () => import("./download-4FGI6T2M.js").then((m) => m.default)
download: () => import("./download-4FGI6T2M.js").then((m) => m.default),
select: () => import("./select-23J2FHOD.js").then((m) => m.default)
},

@@ -141,0 +142,0 @@ run({ args }) {

+5
-2

@@ -60,4 +60,4 @@ interface Pergel {

interface PergelReadme {
[moduleName: string]: {
[projectName: string]: {
[projectName: string]: {
[moduleName: string]: {
packageJson?: {

@@ -73,2 +73,5 @@ dependencies?: string;

};
cli?: {
[cliName: string]: string;
};
};

@@ -75,0 +78,0 @@ };

{
"name": "@pergel/cli",
"type": "module",
"version": "0.6.6",
"version": "0.7.0",
"packageManager": "pnpm@8.10.0",

@@ -6,0 +6,0 @@ "description": "Full Stack Nuxt Application. It contains the necessary toolkits for a software developer and a fast, clean, tested toolkit.",