ns-gm 1.0.3 → 1.0.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/README.md +12 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
# ns-gm
|
|
1
|
+
# ns-gm (NetSuite God Mode CLI)
|
|
2
2
|
|
|
3
|
-
NetSuite CLI for running SuiteScript snippets and fetching logs through a local proxy + RESTlet.
|
|
3
|
+
NetSuite CLI for running SuiteScript snippets, files and fetching logs through a local proxy + RESTlet.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm
|
|
9
|
-
npm link
|
|
8
|
+
npm i -g ns-gm
|
|
10
9
|
```
|
|
11
10
|
|
|
12
11
|
Then use:
|
|
@@ -15,6 +14,13 @@ Then use:
|
|
|
15
14
|
ns-gm --help
|
|
16
15
|
```
|
|
17
16
|
|
|
17
|
+
For local development from source:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install
|
|
21
|
+
npm link
|
|
22
|
+
```
|
|
23
|
+
|
|
18
24
|
## NetSuite Setup (OAuth 2.0 M2M)
|
|
19
25
|
|
|
20
26
|
### 1) Integration Record
|
|
@@ -44,7 +50,7 @@ After saving, copy:
|
|
|
44
50
|
Generate keypair (PowerShell example):
|
|
45
51
|
|
|
46
52
|
```powershell
|
|
47
|
-
$dir = "C:\Users\
|
|
53
|
+
$dir = "C:\Users\user\Documents\ns-gm-certs"
|
|
48
54
|
New-Item -ItemType Directory -Force -Path $dir | Out-Null
|
|
49
55
|
openssl req -new -x509 -nodes -days 365 -newkey rsa:4096 -keyout "$dir\private_key.pem" -out "$dir\public_key.pem" -subj "/CN=ns-gm-oauth"
|
|
50
56
|
```
|
|
@@ -74,7 +80,7 @@ Setup is alias-based. It lets you pick an existing alias or create `new`.
|
|
|
74
80
|
- `accountId`: `1234567_SB1`
|
|
75
81
|
- `clientId`: `6f8d...` (OAuth 2.0 Client ID from integration record)
|
|
76
82
|
- `certificateId`: `custcertificate_oauth2_prod` (kid from M2M mapping)
|
|
77
|
-
- `privateKeyPath`: `C:\Users\
|
|
83
|
+
- `privateKeyPath`: `C:\Users\user\Documents\ns-gm-certs\private_key.pem`
|
|
78
84
|
- `restletUrl`: `https://1234567-sb1.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=customscript_ns_gm_restlet&deploy=1`
|
|
79
85
|
- `scope`: `restlets`
|
|
80
86
|
|
package/package.json
CHANGED