create-near-app 5.3.0 → 5.3.1-beta.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-near-app",
3
- "version": "5.3.0",
3
+ "version": "5.3.1-beta.0",
4
4
  "description": "Quickly scaffold your dApp on NEAR Blockchain",
5
5
  "main": "index.js",
6
6
  "engines": {
@@ -25,36 +25,36 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "chalk": "^4.1.2",
28
- "commander": "^9.4.0",
28
+ "commander": "^11.0.0",
29
29
  "cross-spawn": "^7.0.3",
30
- "mixpanel": "^0.16.0",
30
+ "mixpanel": "^0.17.0",
31
31
  "ncp": "^2.0.0",
32
32
  "prompts": "^2.4.2",
33
- "semver": "^7.3.7"
33
+ "semver": "^7.5.3"
34
34
  },
35
35
  "devDependencies": {
36
- "@babel/eslint-parser": "^7.18.9",
37
- "@commitlint/cli": "^17.0.1",
38
- "@commitlint/config-conventional": "^17.0.0",
39
- "@release-it/conventional-changelog": "^5.0.0",
36
+ "@babel/eslint-parser": "^7.22.5",
37
+ "@commitlint/cli": "^17.6.6",
38
+ "@commitlint/config-conventional": "^17.6.6",
39
+ "@release-it/conventional-changelog": "^5.1.1",
40
40
  "@types/cross-spawn": "^6.0.2",
41
- "@types/jest": "^28.1.6",
41
+ "@types/jest": "^29.5.2",
42
42
  "@types/ncp": "^2.0.5",
43
- "@types/node": "^18.6.1",
44
- "@types/prompts": "^2.0.14",
45
- "@types/semver": "^7.3.10",
46
- "eslint": "^8.20.0",
43
+ "@types/node": "^20.3.2",
44
+ "@types/prompts": "^2.4.4",
45
+ "@types/semver": "^7.5.0",
46
+ "eslint": "^8.43.0",
47
47
  "eslint-config-react-app": "^7.0.1",
48
- "eslint-plugin-import": "^2.26.0",
49
- "eslint-plugin-jsx-a11y": "^6.6.1",
50
- "eslint-plugin-react": "^7.30.1",
48
+ "eslint-plugin-import": "^2.27.5",
49
+ "eslint-plugin-jsx-a11y": "^6.7.1",
50
+ "eslint-plugin-react": "^7.32.2",
51
51
  "eslint-plugin-react-hooks": "^4.6.0",
52
- "husky": "^8.0.1",
53
- "jest": "^28.1.3",
52
+ "husky": "^8.0.3",
53
+ "jest": "^29.5.0",
54
54
  "node-dir": "^0.1.17",
55
- "release-it": "^15.0.0",
56
- "ts-jest": "^28.0.7",
57
- "typescript": "^4.7.4"
55
+ "release-it": "^15.11.0",
56
+ "ts-jest": "^29.1.0",
57
+ "typescript": "^5.1.3"
58
58
  },
59
59
  "repository": "https://github.com/near/create-near-app.git",
60
60
  "author": "Pagoda.co",
@@ -0,0 +1,7 @@
1
+ {
2
+ "plugins": [
3
+ "near-sdk-js/lib/build-tools/near-bindgen-exporter",
4
+ ["@babel/plugin-proposal-decorators", {"version": "legacy"}]
5
+ ],
6
+ "presets": ["@babel/preset-typescript"]
7
+ }
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "near-cli": "^3.4.0",
13
- "near-sdk-js": "0.7.0"
13
+ "near-sdk-js": "0.6.0"
14
14
  },
15
15
  "devDependencies": {
16
16
  "typescript": "^4.7.4",
@@ -1,5 +1,6 @@
1
1
  // React
2
- import { createRoot } from 'react-dom/client';
2
+ import React from 'react';
3
+ import ReactDOM from 'react-dom';
3
4
  import App from './App';
4
5
 
5
6
  // NEAR
@@ -10,14 +11,13 @@ const CONTRACT_ADDRESS = process.env.CONTRACT_NAME
10
11
  // When creating the wallet you can optionally ask to create an access key
11
12
  // Having the key enables to call non-payable methods without interrupting the user to sign
12
13
  const wallet = new Wallet({ createAccessKeyFor: CONTRACT_ADDRESS })
13
- const container = document.getElementById('root');
14
- const root = createRoot(container); // createRoot(container!) if you use TypeScript
15
14
 
16
15
  // Setup on page load
17
16
  window.onload = async () => {
18
17
  const isSignedIn = await wallet.startUp()
19
-
20
- root.render(
21
- <App isSignedIn={isSignedIn} contractId={CONTRACT_ADDRESS} wallet={wallet} />
18
+
19
+ ReactDOM.render(
20
+ <App isSignedIn={isSignedIn} contractId={CONTRACT_ADDRESS} wallet={wallet} />,
21
+ document.getElementById('root')
22
22
  );
23
23
  }
@@ -7,34 +7,31 @@
7
7
  "build": "parcel build index.html --public-url ./"
8
8
  },
9
9
  "devDependencies": {
10
- "@babel/core": "^7.20.12",
11
- "@babel/preset-env": "^7.20.2",
12
- "@babel/preset-react": "^7.18.6",
13
- "@types/node": "^18.13.0",
10
+ "@babel/core": "^7.22.5",
11
+ "@babel/preset-env": "^7.22.5",
12
+ "@babel/preset-react": "^7.22.5",
13
+ "@types/node": "^20.3.2",
14
+ "buffer": "^5.5.0||^6.0.0",
15
+ "env-cmd": "^10.1.0",
16
+ "events": "^3.1.0",
17
+ "https-browserify": "^1.0.0",
18
+ "nodemon": "^2.0.22",
19
+ "parcel": "^2.9.3",
20
+ "process": "^0.11.10",
14
21
  "react-test-renderer": "^18.2.0",
22
+ "stream-http": "^3.1.0",
15
23
  "ts-node": "^10.9.1",
16
- "typescript": "^4.9.5",
17
- "nodemon": "^2.0.20",
18
- "parcel": "^2.8.3",
19
- "process": "^0.11.10",
20
- "env-cmd": "^10.1.0"
24
+ "typescript": "^5.1.3",
25
+ "url": "^0.11.0"
21
26
  },
22
27
  "dependencies": {
23
- "near-api-js": "^1.1.0",
28
+ "@near-wallet-selector/core": "^8.1.4",
29
+ "@near-wallet-selector/modal-ui": "^8.1.4",
30
+ "@near-wallet-selector/my-near-wallet": "^8.1.4",
31
+ "near-api-js": "^2.1.4",
24
32
  "react": "^18.2.0",
25
33
  "react-dom": "^18.2.0",
26
- "regenerator-runtime": "^0.13.11",
27
- "@near-wallet-selector/core": "^7.8.0",
28
- "@near-wallet-selector/ledger": "^7.8.0",
29
- "@near-wallet-selector/math-wallet": "^7.8.0",
30
- "@near-wallet-selector/meteor-wallet": "^7.8.0",
31
- "@near-wallet-selector/modal-ui": "^7.8.0",
32
- "@near-wallet-selector/my-near-wallet": "^7.8.0",
33
- "@near-wallet-selector/near-wallet": "^7.8.0",
34
- "@near-wallet-selector/nightly": "^7.8.0",
35
- "@near-wallet-selector/nightly-connect": "^7.8.0",
36
- "@near-wallet-selector/sender": "^7.8.0",
37
- "@near-wallet-selector/wallet-connect": "^7.8.0"
34
+ "regenerator-runtime": "^0.13.11"
38
35
  },
39
36
  "resolutions": {
40
37
  "@babel/preset-env": "7.13.8"
@@ -51,4 +48,4 @@
51
48
  "last 1 safari version"
52
49
  ]
53
50
  }
54
- }
51
+ }
@@ -3,15 +3,10 @@
3
3
  // near api js
4
4
  import { providers } from 'near-api-js';
5
5
 
6
- // wallet selector UI
6
+ // wallet selector
7
7
  import '@near-wallet-selector/modal-ui/styles.css';
8
8
  import { setupModal } from '@near-wallet-selector/modal-ui';
9
- import LedgerIconUrl from '@near-wallet-selector/ledger/assets/ledger-icon.png';
10
- import MyNearIconUrl from '@near-wallet-selector/my-near-wallet/assets/my-near-wallet-icon.png';
11
-
12
- // wallet selector options
13
9
  import { setupWalletSelector } from '@near-wallet-selector/core';
14
- import { setupLedger } from '@near-wallet-selector/ledger';
15
10
  import { setupMyNearWallet } from '@near-wallet-selector/my-near-wallet';
16
11
 
17
12
  const THIRTY_TGAS = '30000000000000';
@@ -37,8 +32,7 @@ export class Wallet {
37
32
  async startUp() {
38
33
  this.walletSelector = await setupWalletSelector({
39
34
  network: this.network,
40
- modules: [setupMyNearWallet({ iconUrl: MyNearIconUrl }),
41
- setupLedger({ iconUrl: LedgerIconUrl })],
35
+ modules: [setupMyNearWallet()],
42
36
  });
43
37
 
44
38
  const isSignedIn = this.walletSelector.isSignedIn();
@@ -60,20 +60,17 @@
60
60
  </p>
61
61
  <ol>
62
62
  <li>
63
- Look in <code>index.js</code> and <code>near-api.js</code> you'll see <code>get_greeting</code>
64
- and <code>set_greeting</code> being called on <code>contract</code>.
65
- What's this?
63
+ Look in <code>index.js</code> - you will see a <code>Wallet</code> object being created and used
64
+ to interact with the methods <code>set_greeting</code> and <code>get_greeting</code>.
66
65
  </li>
67
66
  <li>
68
- Ultimately, this <code>contract</code> code is defined in
69
- <code>assembly/index.ts</code> this is the source code for your
70
- <a target="_blank" href="https://docs.near.org/docs/develop/contracts/overview">smart contract</a>.
67
+ These method live in the <a target="_blank" href="https://docs.near.org/docs/develop/contracts/overview">smart contract</a>,
68
+ who's code is defined in the <code>contract/</code> folder.
71
69
  </li>
72
70
  <li>
73
- When you run <code>npm run dev</code>, the code in
74
- <code>assembly/index.ts</code> gets deployed to the NEAR testnet. You
75
- can see how this happens by looking in <code>package.json</code> at the
76
- <code>scripts</code> section to find the <code>dev</code> command.
71
+ When you run <code>npm run start</code>, the code in <code>contract/</code> gets deployed to the NEAR testnet.
72
+ You can see how this happens by looking in <code>package.json</code> at the <code>scripts</code> section to
73
+ find the <code>dev</code> command.
77
74
  </li>
78
75
  </ol>
79
76
  <hr>
@@ -9,22 +9,19 @@
9
9
  "devDependencies": {
10
10
  "env-cmd": "^10.1.0",
11
11
  "events": "^3.3.0",
12
+ "https-browserify": "^1.0.0",
12
13
  "nodemon": "^2.0.16",
13
14
  "parcel": "^2.7.0",
14
- "process": "^0.11.10"
15
+ "process": "^0.11.10",
16
+ "stream-http": "^3.1.0",
17
+ "url": "^0.11.0"
15
18
  },
16
19
  "dependencies": {
17
- "@near-wallet-selector/core": "^7.0.0",
18
- "@near-wallet-selector/ledger": "^7.0.0",
19
- "@near-wallet-selector/math-wallet": "^7.0.0",
20
- "@near-wallet-selector/meteor-wallet": "^7.0.0",
21
- "@near-wallet-selector/modal-ui": "^7.0.0",
22
- "@near-wallet-selector/my-near-wallet": "^7.0.0",
23
- "@near-wallet-selector/near-wallet": "^7.0.0",
24
- "@near-wallet-selector/nightly": "^7.0.0",
25
- "@near-wallet-selector/nightly-connect": "^7.0.0",
26
- "@near-wallet-selector/sender": "^7.0.0",
27
- "@near-wallet-selector/wallet-connect": "^7.0.0",
28
- "near-api-js": "^0.44.2"
20
+ "@near-wallet-selector/core": "^8.1.4",
21
+ "@near-wallet-selector/ledger": "^8.1.4",
22
+ "@near-wallet-selector/modal-ui": "^8.1.4",
23
+ "@near-wallet-selector/my-near-wallet": "^8.1.4",
24
+ "@near-wallet-selector/near-wallet": "^8.1.4",
25
+ "near-api-js": "^2.1.4"
29
26
  }
30
27
  }
@@ -0,0 +1,2 @@
1
+ [toolchain]
2
+ channel = "1.69"