pinme 1.1.6-alpha.3 → 1.1.6-alpha.4
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/dist/index.js +12 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1523,7 +1523,7 @@ var import_chalk9 = __toESM(require("chalk"));
|
|
|
1523
1523
|
var import_figlet3 = __toESM(require("figlet"));
|
|
1524
1524
|
|
|
1525
1525
|
// package.json
|
|
1526
|
-
var version = "1.1.6-alpha.
|
|
1526
|
+
var version = "1.1.6-alpha.4";
|
|
1527
1527
|
|
|
1528
1528
|
// bin/upload.ts
|
|
1529
1529
|
var import_path6 = __toESM(require("path"));
|
|
@@ -5222,6 +5222,13 @@ function getDomainFromArgs() {
|
|
|
5222
5222
|
}
|
|
5223
5223
|
return null;
|
|
5224
5224
|
}
|
|
5225
|
+
function getUid() {
|
|
5226
|
+
const auth = getAuthConfig();
|
|
5227
|
+
if (auth == null ? void 0 : auth.address) {
|
|
5228
|
+
return auth.address;
|
|
5229
|
+
}
|
|
5230
|
+
return getDeviceId();
|
|
5231
|
+
}
|
|
5225
5232
|
var upload_default = async (options) => {
|
|
5226
5233
|
try {
|
|
5227
5234
|
console.log(
|
|
@@ -5253,7 +5260,8 @@ var upload_default = async (options) => {
|
|
|
5253
5260
|
try {
|
|
5254
5261
|
const result = await uploadToIpfsSplit_default(absolutePath);
|
|
5255
5262
|
if (result) {
|
|
5256
|
-
const
|
|
5263
|
+
const uid = getUid();
|
|
5264
|
+
const encryptedCID = encryptHash(result.contentHash, secretKey, uid);
|
|
5257
5265
|
console.log(
|
|
5258
5266
|
import_chalk4.default.cyan(
|
|
5259
5267
|
import_figlet.default.textSync("Successful", { horizontalLayout: "full" })
|
|
@@ -5303,7 +5311,8 @@ var upload_default = async (options) => {
|
|
|
5303
5311
|
try {
|
|
5304
5312
|
const result = await uploadToIpfsSplit_default(absolutePath);
|
|
5305
5313
|
if (result) {
|
|
5306
|
-
const
|
|
5314
|
+
const uid = getUid();
|
|
5315
|
+
const encryptedCID = encryptHash(result.contentHash, secretKey, uid);
|
|
5307
5316
|
console.log(
|
|
5308
5317
|
import_chalk4.default.cyan(
|
|
5309
5318
|
import_figlet.default.textSync("Successful", { horizontalLayout: "full" })
|