pinme 1.0.2 → 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 +16 -0
- package/dist/index.js +3 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -151,6 +151,22 @@ Logs and configuration files are stored in:
|
|
|
151
151
|
|
|
152
152
|
MIT License - See the [LICENSE](LICENSE) file for details
|
|
153
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
|
+
|
|
154
170
|
## Contact Us
|
|
155
171
|
|
|
156
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
|
}
|