Skip to content

Commit f5ddd78

Browse files
committed
Network Command removed and Bugfixed on v1.0.1
1 parent 329829a commit f5ddd78

File tree

9 files changed

+47
-67
lines changed

9 files changed

+47
-67
lines changed

.DS_Store

6 KB
Binary file not shown.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/Sniper-Code/SniperCode.FileSystem.Cli)
44
![GitHub last commit](https://img.shields.io/github/last-commit/Sniper-Code/SniperCode.FileSystem.Cli)
55
![GitHub](https://img.shields.io/github/license/Sniper-Code/SniperCode.FileSystem.Cli)![GitHub top language](https://img.shields.io/github/languages/top/Sniper-Code/SniperCode.FileSystem.Cli)
6+
![npm](https://img.shields.io/npm/v/snipercode.filesystem.cli)
67

78
## **Table of Contents**
89

commands/command.json.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ export function get_all_Commands(cmd) {
4949
description: 'execute a command',
5050
action: cmd.Commands.Shell,
5151
},
52-
// Ip Address
53-
{
54-
command: 'ip',
55-
description: 'get the ip address',
56-
action: cmd.Commands.Network.IpAddress
57-
},
5852
// Is Directory
5953
{
6054
command: 'isdir',

commands/commands.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -995,18 +995,6 @@ export default class Commands extends FsCliPackage {
995995
})
996996
},
997997
},
998-
Network: {
999-
IpAddress: () => {
1000-
const ipAddr = new this.Network().network;
1001-
console.log('\n')
1002-
for (const device_type in ipAddr) {
1003-
if (Object.hasOwnProperty.call(ipAddr, device_type)) {
1004-
const address = ipAddr[device_type];
1005-
console.log(this.Color.bold(`\t${this.Color.yellow(device_type)}: ${this.Color.green(address)}`));
1006-
}
1007-
}
1008-
},
1009-
},
1010998
Operating_System: {
1011999
Name: () => {
10121000
const System_Platform = this.File_System.platform;

config/details.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,30 @@ import FsCliPackage from '../lib/package.js';
77
* @extends {FsCliPackage}
88
*/
99
export default class Details extends FsCliPackage {
10-
#Package_Json = {}
11-
#Details = {
10+
Package_Json = {}
11+
Details = {
1212
Name: "SniperCode.FileSystem.Cli"
1313
}
14-
#GetPackageJson() {
15-
this.#Package_Json = this.Store.get('package_json');
16-
if (!this.#Package_Json) {
17-
this.#Package_Json = {}
14+
GetPackageJson() {
15+
this.Package_Json = this.Store.get('package_json');
16+
if (this.Package_Json == null) {
17+
this.Package_Json = {}
1818
this.Store.delete('package_json');
1919
const package_json = this.File_System.read_file('./package.json');
2020
if (package_json) {
21-
this.#Package_Json = JSON.parse(package_json);
22-
this.Store.set('package_json', this.#Package_Json);
23-
} else this.#GetPackageJson();
24-
} else return this.#Package_Json;
21+
this.Package_Json = JSON.parse(package_json);
22+
this.Store.set('package_json', this.Package_Json);
23+
} else this.GetPackageJson();
24+
} else return this.Package_Json;
2525
}
2626
constructor() { super(); }
2727

2828
getDetails() {
29-
const details = this.#GetPackageJson();
30-
this.#Details.Version = `v${details.version}`;
31-
this.#Details.Description = details.description;
32-
this.#Details.Author = details.author;
33-
this.#Details.Homepage = details.homepage;
34-
return this.#Details;
29+
const details = this.GetPackageJson();
30+
this.Details.Version = `v${details.version}`;
31+
this.Details.Description = details.description;
32+
this.Details.Author = details.author;
33+
this.Details.Homepage = details.homepage;
34+
return this.Details;
3535
}
3636
}

lib/file_system.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import _File_System from "snipercode.filesystem";
44
// Package Extraction and function definition
55
const
66
{
7-
Network,
87
File_System
98
} = _File_System,
109

@@ -22,7 +21,6 @@ const
2221

2322
export {
2423
File_System,
25-
Network,
2624
fs,
2725
path,
2826
UcFirst

lib/package.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Inquirer from "inquirer";
33
import Config from "conf";
44
import Color from "colors";
55
import { program, Option } from 'commander'
6-
import { File_System, Network, fs, path, UcFirst } from "./file_system.js";
6+
import { File_System, fs, path, UcFirst } from "./file_system.js";
77
import { shell_command, scan_dir_recursive_depth } from './shell_command.js'
88

99
/**
@@ -17,7 +17,6 @@ export default class SniperCode_FsCliPackage {
1717
program = program;
1818
Option = Option;
1919
File_System = File_System;
20-
Network = Network;
2120
fs = fs;
2221
path = path;
2322
UcFirst = UcFirst;

package-lock.json

Lines changed: 27 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "snipercode.filesystem.cli",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "A command line interface for file handling using SniperCode.FileSystem",
55
"main": "index.js",
66
"type": "module",
@@ -30,6 +30,6 @@
3030
"commander": "^8.3.0",
3131
"conf": "^10.1.1",
3232
"inquirer": "^8.2.0",
33-
"snipercode.filesystem": "^1.0.0"
33+
"snipercode.filesystem": "^1.0.1"
3434
}
3535
}

0 commit comments

Comments
 (0)