Comparing version 0.3.3 to 0.4.0
{ | ||
"name": "neonctl", | ||
"version": "0.3.3", | ||
"version": "0.4.0", | ||
"description": "CLI tool for NeonDB Cloud management", | ||
@@ -37,4 +37,4 @@ "main": "index.js", | ||
"start": "node index.js", | ||
"publizh": "npm run build && cd dist && npm publish" | ||
"publizh": "npm run build && cd dist && npm publish && git push" | ||
} | ||
} |
@@ -14,5 +14,8 @@ "use strict"; | ||
const node_path_1 = require("node:path"); | ||
const node_os_1 = require("node:os"); | ||
const node_fs_1 = require("node:fs"); | ||
const DIR_NAME = '.neonctl'; | ||
exports.defaultDir = (0, node_path_1.join)(process.cwd(), DIR_NAME); | ||
const cwdDir = (0, node_path_1.join)(process.cwd(), DIR_NAME); | ||
const homeConfigDir = (0, node_path_1.join)((0, node_os_1.homedir)(), process.env.XDG_CONFIG_HOME || '.config', DIR_NAME); | ||
exports.defaultDir = (0, node_fs_1.existsSync)(cwdDir) ? cwdDir : homeConfigDir; | ||
const ensureConfigDir = ({ 'config-dir': configDir, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
@@ -19,0 +22,0 @@ if (!(0, node_fs_1.existsSync)(configDir)) { |
@@ -47,2 +47,3 @@ "use strict"; | ||
yargs.showHelp(); | ||
process.exit(0); | ||
} | ||
@@ -88,4 +89,3 @@ }; | ||
}) | ||
.middleware(auth_1.ensureAuth) | ||
.command('me', 'Get user info', (yargs) => yargs, (args) => __awaiter(void 0, void 0, void 0, function* () { | ||
.command('me', 'Get user info', (yargs) => yargs.middleware(auth_1.ensureAuth), (args) => __awaiter(void 0, void 0, void 0, function* () { | ||
yield (yield Promise.resolve().then(() => __importStar(require('./commands/users')))).me(args); | ||
@@ -107,3 +107,4 @@ })) | ||
})) | ||
.middleware(showHelpMiddleware); | ||
.middleware(showHelpMiddleware) | ||
.middleware(auth_1.ensureAuth); | ||
})) | ||
@@ -124,3 +125,4 @@ .strict() | ||
yargs.showHelp(); | ||
process.exit(0); | ||
} | ||
}))(); |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
28930
457
3