dsmt 0.2.1 → 0.3.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/README.md CHANGED
@@ -1,25 +1,62 @@
1
- # 🐳 Docker Storage Migration Tool 📦
1
+ # DSMT
2
2
 
3
- `dsmt` is a command-line utility for seamlessly exporting and importing Docker volumes and bind mounts.
3
+ [![NPM Version](https://img.shields.io/npm/v/dsmt.svg?label=version&logo=semver)](https://www.npmjs.com/package/dsmt)
4
+ [![NPM Downloads](https://img.shields.io/npm/dm/dsmt.svg?logo=npm)](https://www.npmjs.com/package/dsmt)
5
+ [![License](https://img.shields.io/github/license/itskdhere/dsmt.svg?logo=github)](https://github.com/itskdhere/dsmt/blob/main/LICENSE)
6
+ [![Build Status](https://github.com/itskdhere/dsmt/actions/workflows/ci.yml/badge.svg)](https://github.com/itskdhere/dsmt/actions/workflows/ci.yml)
4
7
 
5
- ## 🔍 Overview
8
+ **Docker Storage Migration Tool (DSMT)** is a command-line utility for seamlessly exporting and importing Docker volumes and bind mounts.
6
9
 
7
- DSMT (Docker Storage Migration Tool) provides a simple way to:
10
+ ## Overview
8
11
 
9
- - 📤 Export Docker volumes or bind mounts to compressed tarballs.
10
- - 📥 Import compressed tarballs into Docker volumes or bind mounts.
12
+ DSMT provides a simple way to:
11
13
 
12
- 🔄 This tool makes it easy to backup, restore, or migrate Docker storage across systems.
14
+ - Export Docker volumes or bind mounts to compressed tarballs.
15
+ - Import compressed tarballs into Docker volumes or bind mounts.
13
16
 
14
- ## 💻 Installation
17
+ This tool makes it easy to backup, restore, or migrate Docker storage across systems.
18
+
19
+ ## Installation
20
+
21
+ ### Global Installation
22
+
23
+ Choose your preferred package manager to install the CLI globally:
15
24
 
16
25
  ```bash
26
+ # npm
17
27
  npm install -g dsmt
28
+
29
+ # yarn
30
+ yarn global add dsmt
31
+
32
+ # pnpm
33
+ pnpm add -g dsmt
34
+
35
+ # bun
36
+ bun add -g dsmt
18
37
  ```
19
38
 
20
- ## 🚀 Usage
39
+ ### Run Directly
21
40
 
22
- ### 📤 Exporting Docker Storage
41
+ Or run directly without manual installation using:
42
+
43
+ ```bash
44
+ # npx (npm)
45
+ npx dsmt <command> [args]
46
+
47
+ # bunx (bun)
48
+ bunx dsmt <command> [args]
49
+
50
+ # pnpm dlx
51
+ pnpm dlx dsmt <command> [args]
52
+
53
+ # yarn dlx
54
+ yarn dlx dsmt <command> [args]
55
+ ```
56
+
57
+ ## Usage
58
+
59
+ ### Exporting Docker Storage
23
60
 
24
61
  Export a Docker volume:
25
62
 
@@ -33,7 +70,7 @@ Export a bind mount:
33
70
  dsmt export /path/to/bind/mount /path/to/export/directory
34
71
  ```
35
72
 
36
- ### 📥 Importing Docker Storage
73
+ ### Importing Docker Storage
37
74
 
38
75
  Import to a Docker volume:
39
76
 
@@ -47,7 +84,7 @@ Import to a bind mount:
47
84
  dsmt import /path/to/tarball.tar.gz /path/to/bind/mount
48
85
  ```
49
86
 
50
- ## ⚙️ Options
87
+ ## Options
51
88
 
52
89
  Both commands support the following options:
53
90
 
@@ -56,7 +93,7 @@ Both commands support the following options:
56
93
 
57
94
  The tool will automatically detect the source/destination type in most cases, but you can use these flags to be explicit.
58
95
 
59
- ## 📋 Examples
96
+ ## Examples
60
97
 
61
98
  ```bash
62
99
  # Export a volume named 'mongodb_data' to the current directory
@@ -72,14 +109,19 @@ dsmt export /var/www/html /backups
72
109
  dsmt import ./html.tar.gz /var/www/html
73
110
  ```
74
111
 
75
- ## 🛠️ Contribution
112
+ ## Contribution
76
113
 
77
114
  Please refer to the [CONTRIBUTING.md](CONTRIBUTING.md) file for guidelines on contributing to this project.
78
115
 
79
- ## 🔒 Security
116
+ ## Security
80
117
 
81
118
  Please refer to the [SECURITY.md](SECURITY.md) file for security-related issues and reporting.
82
119
 
83
- ## 📄 License
120
+ ## License
84
121
 
85
122
  MIT © [itskdhere](https://github.com/itskdhere)
123
+
124
+ <br>
125
+ <p align="center">
126
+ <a href="https://youtu.be/dQw4w9WgXcQ">🐳</a>
127
+ </p>
package/dist/cli.js CHANGED
@@ -6,7 +6,7 @@ const program = new Command();
6
6
  program
7
7
  .name("dsmt")
8
8
  .description("Docker Storage Migration Tool")
9
- .version("0.2.1");
9
+ .version("0.3.1");
10
10
  program
11
11
  .command("export")
12
12
  .argument("<src>", "volume name or bind mount path")
package/package.json CHANGED
@@ -1,25 +1,33 @@
1
1
  {
2
2
  "name": "dsmt",
3
- "version": "0.2.1",
3
+ "version": "0.3.1",
4
4
  "description": "Docker Storage Migration Tool",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "dsmt": "dist/cli.js"
8
8
  },
9
9
  "scripts": {
10
- "dev": "tsc -w",
10
+ "dev": "tsc --watch --preserveWatchOutput",
11
11
  "build": "tsc"
12
12
  },
13
13
  "repository": {
14
14
  "type": "git",
15
15
  "url": "git+https://github.com/itskdhere/dsmt.git"
16
16
  },
17
- "author": "itskdhere",
18
- "license": "MIT",
19
17
  "bugs": {
20
18
  "url": "https://github.com/itskdhere/dsmt/issues"
21
19
  },
22
20
  "homepage": "https://github.com/itskdhere/dsmt#readme",
21
+ "author": "itskdhere",
22
+ "license": "MIT",
23
+ "keywords": [
24
+ "dsmt",
25
+ "cli",
26
+ "docker",
27
+ "storage",
28
+ "migration",
29
+ "tool"
30
+ ],
23
31
  "dependencies": {
24
32
  "axios": "^1.8.4",
25
33
  "chalk": "^5.4.1",
@@ -27,6 +35,7 @@
27
35
  "ora": "^8.2.0"
28
36
  },
29
37
  "devDependencies": {
38
+ "@dsmt/tsconfig": "workspace:*",
30
39
  "@types/node": "^22.14.1",
31
40
  "typescript": "^5.8.3"
32
41
  }
package/CONTRIBUTING.md DELETED
@@ -1,99 +0,0 @@
1
- # Contributing to Docker Storage Migration Tool (DSMT)
2
-
3
- Thank you for considering contributing to DSMT! This document provides guidelines and instructions to help you contribute effectively.
4
-
5
- ## Code of Conduct
6
-
7
- This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.
8
-
9
- ## How Can I Contribute?
10
-
11
- ### Reporting Bugs
12
-
13
- Before submitting a bug report:
14
-
15
- - Check the [issue tracker](https://github.com/itskdhere/dsmt/issues) to see if the issue has already been reported
16
- - If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/itskdhere/dsmt/issues/new?template=bug_report.md)
17
-
18
- When filing a bug report, please include:
19
-
20
- - A clear and descriptive title
21
- - Steps to reproduce the issue
22
- - Expected and actual behavior
23
- - System information (OS, Docker version, Node.js version)
24
- - Any relevant logs or error messages
25
-
26
- ### Suggesting Features
27
-
28
- We welcome feature suggestions! [Open an issue](https://github.com/itskdhere/dsmt/issues/new?template=feature_request.md) with your idea, providing as much context and detail as possible.
29
-
30
- ### Pull Requests
31
-
32
- 1. Fork the repository
33
- 2. Create a new branch for your feature or bugfix
34
- 3. Make your changes
35
- 4. Ensure your code follows the project style and passes all tests
36
- 5. Submit a pull request
37
-
38
- ## Development Setup
39
-
40
- ```bash
41
- # Clone your fork of the repo
42
- git clone https://github.com/YOUR-USERNAME/dsmt.git
43
- cd dsmt
44
-
45
- # Install dependencies
46
- npm install
47
-
48
- # Start development mode (watches for changes)
49
- npm run dev
50
-
51
- # Link the package globally for testing
52
- npm link
53
- ```
54
-
55
- ## Project Structure
56
-
57
- - cli.ts - CLI entry point
58
- - cmd - Command implementations
59
- - docker - Docker API wrapper
60
- - types - TypeScript type definitions
61
-
62
- ## Coding Guidelines
63
-
64
- - Use TypeScript for all new code
65
- - Follow existing code style (2 spaces for indentation)
66
- - Add appropriate error handling and logging
67
- - Document new functions and methods
68
-
69
- ## Commit Messages
70
-
71
- - Use the present tense ("Add feature" not "Added feature")
72
- - Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
73
- - Limit the first line to 72 characters
74
- - Reference issues and pull requests liberally after the first line
75
-
76
- ## Testing Your Changes
77
-
78
- Please ensure your changes work properly with:
79
-
80
- - Different types of Docker volumes
81
- - Bind mounts with various path structures
82
- - Different operating systems (if possible)
83
-
84
- ## Submitting Changes
85
-
86
- 1. Push your changes to your fork
87
- 2. Submit a pull request to the main repository
88
- 3. The title of your PR should clearly describe the change
89
- 4. Link any relevant issues in the PR description
90
-
91
- ## License
92
-
93
- By contributing to DSMT, you agree that your contributions will be licensed under the project's MIT License.
94
-
95
- ## Questions?
96
-
97
- Feel free to open an issue if you have any questions about contributing.
98
-
99
- Thank you for contributing to DSMT!
package/SECURITY.md DELETED
@@ -1,12 +0,0 @@
1
- # Security Policy
2
-
3
- ## Supported Versions
4
-
5
- | Version | Supported |
6
- | ------- | ------------------ |
7
- | > 0.2.0 | :white_check_mark: |
8
-
9
- ## Reporting a Vulnerability
10
-
11
- :octocat: https://github.com/itskdhere/dsmt/security/advisories/new
12
- 📧 [support@itskdhere.eu.org](mailto:support@itskdhere.eu.org)