pinme 1.0.1 → 1.0.3
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 +18 -0
- package/dist/index.js +3 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[PinMe](https://pinme.eth.limo/) is a simple and easy-to-use command-line tool for uploading files and directories to the [IPFS](https://ipfs.tech/) network.
|
|
4
4
|
|
|
5
|
+
Website:[https://pinme.eth.limo/](https://pinme.eth.limo/)
|
|
6
|
+
|
|
5
7
|
## Features
|
|
6
8
|
|
|
7
9
|
- 🚀 Quickly upload files and directories to IPFS
|
|
@@ -149,6 +151,22 @@ Logs and configuration files are stored in:
|
|
|
149
151
|
|
|
150
152
|
MIT License - See the [LICENSE](LICENSE) file for details
|
|
151
153
|
|
|
154
|
+
## Usage Tips
|
|
155
|
+
|
|
156
|
+
### Uploading Vite Projects
|
|
157
|
+
|
|
158
|
+
When uploading projects built with Vite, please note:
|
|
159
|
+
|
|
160
|
+
1. **Vite Configuration**: Add `base: "./"` to your Vite configuration file to ensure proper asset path resolution:
|
|
161
|
+
|
|
162
|
+
```js
|
|
163
|
+
// vite.config.js
|
|
164
|
+
export default {
|
|
165
|
+
base: "./",
|
|
166
|
+
// other configurations...
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
152
170
|
## Contact Us
|
|
153
171
|
|
|
154
172
|
If you have questions or suggestions, please contact us through:
|
package/dist/index.js
CHANGED
|
@@ -367,7 +367,7 @@ var import_chalk4 = __toESM(require("chalk"));
|
|
|
367
367
|
var import_figlet2 = __toESM(require("figlet"));
|
|
368
368
|
|
|
369
369
|
// package.json
|
|
370
|
-
var version = "1.0.
|
|
370
|
+
var version = "1.0.3";
|
|
371
371
|
|
|
372
372
|
// bin/upload.ts
|
|
373
373
|
var import_path5 = __toESM(require("path"));
|
|
@@ -597,9 +597,8 @@ async function uploadDirectory(directoryPath, deviceId) {
|
|
|
597
597
|
filename: file.name
|
|
598
598
|
});
|
|
599
599
|
});
|
|
600
|
-
formData.append("uid", deviceId);
|
|
601
600
|
const spinner = (0, import_ora.default)(`Uploading ${directoryPath} to glitter ipfs...`).start();
|
|
602
|
-
const response = await import_axios.default.post(`${ipfsApiUrl}/add`, formData, {
|
|
601
|
+
const response = await import_axios.default.post(`${ipfsApiUrl}/add?uid=${deviceId}&cidV=1`, formData, {
|
|
603
602
|
headers: {
|
|
604
603
|
...formData.getHeaders()
|
|
605
604
|
}
|
|
@@ -640,9 +639,8 @@ async function uploadFile(filePath, deviceId) {
|
|
|
640
639
|
formData.append("file", import_fs_extra3.default.createReadStream(filePath), {
|
|
641
640
|
filename: filePath.split(import_path4.default.sep).pop() || ""
|
|
642
641
|
});
|
|
643
|
-
formData.append("uid", deviceId);
|
|
644
642
|
const spinner = (0, import_ora.default)(`Uploading ${filePath} to glitter ipfs...`).start();
|
|
645
|
-
const response = await import_axios.default.post(`${ipfsApiUrl}/add`, formData, {
|
|
643
|
+
const response = await import_axios.default.post(`${ipfsApiUrl}/add?uid=${deviceId}&cidV=1`, formData, {
|
|
646
644
|
headers: {
|
|
647
645
|
...formData.getHeaders()
|
|
648
646
|
}
|
|
@@ -752,7 +750,6 @@ var upload_default = async (options) => {
|
|
|
752
750
|
}
|
|
753
751
|
} catch (error) {
|
|
754
752
|
console.error(import_chalk3.default.red(`error uploading: ${error.message}`));
|
|
755
|
-
console.error(error.stack);
|
|
756
753
|
}
|
|
757
754
|
return;
|
|
758
755
|
}
|
|
@@ -783,7 +780,6 @@ var upload_default = async (options) => {
|
|
|
783
780
|
}
|
|
784
781
|
} catch (error) {
|
|
785
782
|
console.error(import_chalk3.default.red(`error uploading: ${error.message}`));
|
|
786
|
-
console.error(error.stack);
|
|
787
783
|
}
|
|
788
784
|
}
|
|
789
785
|
} catch (error) {
|