ic-mops 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ic-mops",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mops": "cli.js"
@@ -1,55 +0,0 @@
1
- import {checkConfigFile, readConfig} from '../mops.js';
2
- import fs from 'fs';
3
- import del from 'del';
4
- import chalk from 'chalk';
5
- import {formatDir, formatGithubDir} from '../mops.js';
6
-
7
- export async function uninstall(pkg, version) {
8
- if (!checkConfigFile()) {
9
- return;
10
- }
11
-
12
- // TODO: check if deps relate on this package
13
- const config = readConfig();
14
-
15
- const pkgDetails = config.dependencies[pkg];
16
-
17
- if (!pkgDetails) {
18
- console.log(`No dependency to remove ${pkg} = "${version}"`);
19
- return;
20
- }
21
-
22
- const {repo} = pkgDetails;
23
- let pkgDir;
24
-
25
- if (repo) {
26
- pkgDir = formatGithubDir(pkg, repo);
27
- }
28
- else {
29
- pkgDir = formatDir(pkg, version);
30
- }
31
-
32
- if (!fs.existsSync(pkgDir)) {
33
- console.log(`No cache to remove ${pkg} = "${version}"`);
34
- return;
35
- }
36
-
37
- // don't remove if there are dependents
38
- // let dependents = getDependents(pkg, version);
39
- // if (dependents.length) {
40
- // console.log(`Cache left ${pkg} = "${version}" (dependents: ${dependents})`)
41
- // return;
42
- // }
43
-
44
- del.sync([`${pkgDir}/**`]);
45
-
46
- console.log(chalk.green('Package removed ') + `${pkg} = "${version}"`);
47
-
48
- // remove dependencies
49
- // let text = fs.readFileSync(path.join(pkgDir, 'mops.toml')).toString();
50
- // let config = TOML.parse(text);
51
-
52
- // for (let [name, version] of Object.entries(config.dependencies)) {
53
- // remove(name, version);
54
- // }
55
- }