pinata 1.8.0 → 1.8.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.
Files changed (2) hide show
  1. package/package.json +3 -4
  2. package/postinstall.js +0 -84
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "pinata",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "The official Pinata SDK",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
8
- "files": ["dist", "postinstall.js"],
8
+ "files": ["dist"],
9
9
  "exports": {
10
10
  ".": {
11
11
  "require": "./dist/index.js",
@@ -16,8 +16,7 @@
16
16
  "scripts": {
17
17
  "build": "tsup src/index.ts --format cjs,esm --dts --external none",
18
18
  "format": "npx @biomejs/biome format --write src tests",
19
- "test": "jest --watchAll --verbose --coverage",
20
- "postinstall": "node ./postinstall.js --loglevel=verbose"
19
+ "test": "jest --watchAll --verbose --coverage"
21
20
  },
22
21
  "repository": {
23
22
  "type": "git",
package/postinstall.js DELETED
@@ -1,84 +0,0 @@
1
- (function () {
2
- const colors = {
3
- reset: "\x1b[0m",
4
- bright: "\x1b[1m",
5
- fg: {
6
- yellow: "\x1b[33m",
7
- cyan: "\x1b[36m",
8
- green: "\x1b[32m",
9
- },
10
- dim: "\x1b[2m",
11
- };
12
-
13
- const boxWidth = 70;
14
- const horizontalBorder = "+" + "=".repeat(boxWidth - 2) + "+";
15
- const emptyLine = "|" + " ".repeat(boxWidth - 2) + "|";
16
-
17
- function stripAnsi(str) {
18
- return str.replace(/\x1b\[[0-9;]*m/g, "");
19
- }
20
-
21
- function centeredText(text, width) {
22
- const visibleLength = stripAnsi(text).length;
23
- const padding = Math.max(0, width - visibleLength);
24
- const leftPad = Math.floor(padding / 2);
25
- const rightPad = padding - leftPad;
26
- return "|" + " ".repeat(leftPad) + text + " ".repeat(rightPad) + "|";
27
- }
28
-
29
- console.log("\n" + colors.fg.yellow + horizontalBorder + colors.reset);
30
- console.log(colors.fg.yellow + emptyLine + colors.reset);
31
- console.log(
32
- colors.fg.yellow +
33
- centeredText(
34
- colors.bright +
35
- colors.fg.yellow +
36
- "🚨 ATTENTION IPFS USERS! 🚨" +
37
- colors.reset,
38
- boxWidth - 2,
39
- ) +
40
- colors.reset,
41
- );
42
- console.log(colors.fg.yellow + emptyLine + colors.reset);
43
- console.log(
44
- colors.fg.yellow +
45
- centeredText(
46
- colors.fg.cyan +
47
- "If you're looking to use IPFS please install pinata-web3 instead." +
48
- colors.reset,
49
- boxWidth - 2,
50
- ) +
51
- colors.reset,
52
- );
53
- console.log(colors.fg.yellow + emptyLine + colors.reset);
54
- console.log(
55
- colors.fg.yellow +
56
- centeredText(
57
- colors.fg.green + "npm install pinata-web3" + colors.reset,
58
- boxWidth - 2,
59
- ) +
60
- colors.reset,
61
- );
62
- console.log(colors.fg.yellow + emptyLine + colors.reset);
63
- console.log(
64
- colors.fg.yellow +
65
- centeredText(
66
- colors.dim +
67
- "For more information please see our documentation at" +
68
- colors.reset,
69
- boxWidth - 2,
70
- ) +
71
- colors.reset,
72
- );
73
- console.log(
74
- colors.fg.yellow +
75
- centeredText(
76
- colors.dim + "https://docs.pinata.cloud/web3/sdk" + colors.reset,
77
- boxWidth - 2,
78
- ) +
79
- colors.reset,
80
- );
81
- console.log(colors.fg.yellow + emptyLine + colors.reset);
82
- console.log(colors.fg.yellow + horizontalBorder + colors.reset);
83
- console.log("\n");
84
- })();