fix(core): update
This commit is contained in:
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@git.zone/tools',
|
||||
version: '2.0.23',
|
||||
description: 'setup your environment with the most important tools and update them easily.'
|
||||
}
|
||||
12
ts/index.ts
12
ts/index.ts
@@ -1,3 +1,9 @@
|
||||
import plugins = require('./tools.plugins');
|
||||
import * as cli from './tools.cli';
|
||||
cli.run();
|
||||
import * as plugins from './tools.plugins.js';
|
||||
import * as cli from './tools.cli.js';
|
||||
|
||||
export const runCli = async () => {
|
||||
await cli.run();
|
||||
};
|
||||
|
||||
// Auto-run when called directly
|
||||
runCli();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as plugins from './tools.plugins';
|
||||
import * as toolsInstall from './tools.install';
|
||||
import * as plugins from './tools.plugins.js';
|
||||
import * as toolsInstall from './tools.install.js';
|
||||
|
||||
export const run = async () => {
|
||||
const toolsCli = new plugins.smartcli.Smartcli();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import plugins = require('./tools.plugins');
|
||||
import paths = require('./tools.paths');
|
||||
import { logger } from './tools.logging';
|
||||
import * as plugins from './tools.plugins.js';
|
||||
import * as paths from './tools.paths.js';
|
||||
import { logger } from './tools.logging.js';
|
||||
|
||||
const installExec = async (packageNames: string[]) => {
|
||||
const smartshellInstance = new plugins.smartshell.Smartshell({
|
||||
@@ -22,8 +22,8 @@ const installExec = async (packageNames: string[]) => {
|
||||
logger.log('ok', `installed tools successfully!`);
|
||||
};
|
||||
|
||||
const packageLibrary = plugins.smartfile.fs.toObjectSync(
|
||||
plugins.path.join(paths.assetsDir, 'package_library.json')
|
||||
const packageLibrary = JSON.parse(
|
||||
plugins.fs.readFileSync(plugins.path.join(paths.assetsDir, 'package_library.json'), 'utf8')
|
||||
);
|
||||
|
||||
export const install = async (packageSetArg: string) => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as plugins from './tools.plugins';
|
||||
import * as plugins from './tools.plugins.js';
|
||||
|
||||
export const logger = new plugins.smartlog.Smartlog({
|
||||
logContext: {
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import plugins = require('./tools.plugins');
|
||||
import * as plugins from './tools.plugins.js';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = plugins.path.dirname(__filename);
|
||||
|
||||
export const packageBase = plugins.path.join(__dirname, '../');
|
||||
export const assetsDir = plugins.path.join(packageBase, './assets');
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// node native
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
|
||||
// pushrocks scope
|
||||
import * as smartlog from '@pushrocks/smartlog';
|
||||
import * as smartlogDestinationLocal from '@pushrocks/smartlog-destination-local';
|
||||
import * as smartcli from '@pushrocks/smartcli';
|
||||
import * as smartfile from '@pushrocks/smartfile';
|
||||
import * as smartshell from '@pushrocks/smartshell';
|
||||
// push.rocks scope
|
||||
import * as smartlog from '@push.rocks/smartlog';
|
||||
import * as smartlogDestinationLocal from '@push.rocks/smartlog-destination-local';
|
||||
import * as smartcli from '@push.rocks/smartcli';
|
||||
import * as smartshell from '@push.rocks/smartshell';
|
||||
|
||||
export { smartlog, smartlogDestinationLocal, path, smartcli, smartfile, smartshell };
|
||||
export { smartlog, smartlogDestinationLocal, path, fs, smartcli, smartshell };
|
||||
|
||||
Reference in New Issue
Block a user