sol-classer 1.0.0 → 1.0.7

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/generator.js CHANGED
@@ -198,8 +198,8 @@ function generateClass({ abi, className, contractAddress, rpcEnvVar = "NEXT_PUBL
198
198
  `;
199
199
  methodsCode = `
200
200
  async init()${isTs ? ": Promise<void>" : ""} {
201
- if (typeof window !== "undefined" && (window as any).ethereum) {
202
- this.provider = new ethers.BrowserProvider((window as any).ethereum);
201
+ if (typeof window !== "undefined" && ${isTs ? "(window as any).ethereum" : "window.ethereum"}) {
202
+ this.provider = new ethers.BrowserProvider(${isTs ? "(window as any).ethereum" : "window.ethereum"});
203
203
  } else {
204
204
  throw new Error("window.ethereum is not available");
205
205
  }
package/dist/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,18 +1,23 @@
1
1
  {
2
2
  "name": "sol-classer",
3
- "version": "1.0.0",
3
+ "version": "1.0.7",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
7
7
  "sol-classer": "./dist/index.js"
8
8
  },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/Itshbhere/Classer.git"
12
+ },
9
13
  "files": [
10
14
  "dist"
11
15
  ],
12
16
  "scripts": {
13
17
  "build": "tsc",
14
18
  "prepublishOnly": "npm run build",
15
- "test": "echo \"Error: no test specified\" && exit 1"
19
+ "test": "echo \"Error: no test specified\" && exit 1",
20
+ "release": "npm publish --access public --userconfig .npmrc.publish && npm publish --registry https://npm.pkg.github.com"
16
21
  },
17
22
  "keywords": [],
18
23
  "author": "larsalaxsanderson@gmail.com",
@@ -20,6 +25,7 @@
20
25
  "type": "commonjs",
21
26
  "dependencies": {
22
27
  "commander": "^14.0.3",
28
+ "dotenv": "^17.3.1",
23
29
  "ethers": "^6.16.0",
24
30
  "fs-extra": "^11.3.3",
25
31
  "jiti": "^2.6.1"