@superglue/cli 1.1.174 → 1.1.176

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.
@@ -40,17 +40,35 @@ The step logs in with the system's NetSuite OAuth token, the same one the REST s
40
40
 
41
41
  ## Operations
42
42
 
43
- | Operation | Inputs | Result |
44
- | --------------- | ----------------------------------------------------------- | -------------------------------------------------------------------------- |
45
- | `listObjects` | optional `objectTypes` (array), `scriptIdContains` | Custom objects in the account: type and script ID |
46
- | `importObjects` | `objectType`, `scriptIds` (array) | `files`: map of `Objects/<scriptid>.xml` to XML, plus `data.failedImports` |
47
- | `validate` | `files` | NetSuite's validation of the project. Changes nothing. |
48
- | `preview` | `files` | The changes a deploy would make. Changes nothing. |
49
- | `deploy` | `files`, step `modify: true` | Applies the project to the account |
50
- | `callRestlet` | `scriptId`, `deployId`, optional `method`, `params`, `body` | The JSON response of the RESTlet |
43
+ | Operation | Inputs | Result |
44
+ | --------------- | ----------------------------------------------------------- | ---------------------------------------------------------------------------------- |
45
+ | `listObjects` | optional `objectTypes` (array), `scriptIdContains` | Custom objects in the account: type and script ID |
46
+ | `importObjects` | `objectType`, `scriptIds` (array) | `files`: object XML and referenced SuiteScript source; `data` holds import results |
47
+ | `listFiles` | optional `folderPath` (default `/SuiteScripts`) | `data`: array of File Cabinet paths |
48
+ | `importFiles` | `filePaths` (array of File Cabinet paths) | `files`: project paths to UTF-8 text; `data.results`: per-file status |
49
+ | `validate` | `files` | NetSuite's validation of the project. Changes nothing. |
50
+ | `preview` | `files` | The changes a deploy would make. Changes nothing. |
51
+ | `deploy` | `files`, step `modify: true` | Applies the project to the account |
52
+ | `callRestlet` | `scriptId`, `deployId`, optional `method`, `params`, `body` | The JSON response of the RESTlet |
51
53
 
52
54
  A failed operation fails the step with NetSuite's error messages. `importObjects` succeeds as long as NetSuite answers: each object that could not be exported is listed in `data.failedImports` with NetSuite's message, and `files` holds only the exported ones. Objects locked by an installed bundle or SuiteApp fail with "You cannot download the XML file for this object because it is locked", and some workflows fail with "Inconsistent workflow data". `listObjects` does not show which objects are locked; `appId` is `null` for them too. When an import returns no files, pick another object of the same type.
53
55
 
56
+ `importObjects` also imports each object's `<scriptfile>` reference under `FileCabinet/SuiteScripts/`. Check `data.successfulImports[].referencedFileImportResult.failedImports` for missing source files. Module dependencies inside JavaScript are not imported automatically; retrieve them with `importFiles`.
57
+
58
+ ### Reading existing scripts
59
+
60
+ Use `listFiles` and `importFiles` to inspect existing source without deploying a RESTlet. Paths are case-sensitive File Cabinet paths, not project paths:
61
+
62
+ ```json
63
+ { "operation": "listFiles", "folderPath": "/SuiteScripts" }
64
+ ```
65
+
66
+ ```json
67
+ { "operation": "importFiles", "filePaths": ["/SuiteScripts/example.js"] }
68
+ ```
69
+
70
+ The imported source is at `files["FileCabinet/SuiteScripts/example.js"]`. Imports return UTF-8 text; invalid UTF-8 fails the step. Supported roots are `/SuiteScripts`, `/Templates/E-mail Templates`, `/Templates/Marketing Templates`, and `/Web Site Hosting Files`. SuiteApp files cannot be imported. Check every `data.results[]` entry: `loaded: false` includes the failure in `message`, even when the operation succeeds.
71
+
54
72
  ## Project Files
55
73
 
56
74
  `files` maps a project path to the file content. Paths are relative and must stay inside the project.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superglue/cli",
3
- "version": "1.1.174",
3
+ "version": "1.1.176",
4
4
  "bin": {
5
5
  "sg": "./dist/cli.js"
6
6
  },
@@ -40,17 +40,35 @@ The step logs in with the system's NetSuite OAuth token, the same one the REST s
40
40
 
41
41
  ## Operations
42
42
 
43
- | Operation | Inputs | Result |
44
- | --------------- | ----------------------------------------------------------- | -------------------------------------------------------------------------- |
45
- | `listObjects` | optional `objectTypes` (array), `scriptIdContains` | Custom objects in the account: type and script ID |
46
- | `importObjects` | `objectType`, `scriptIds` (array) | `files`: map of `Objects/<scriptid>.xml` to XML, plus `data.failedImports` |
47
- | `validate` | `files` | NetSuite's validation of the project. Changes nothing. |
48
- | `preview` | `files` | The changes a deploy would make. Changes nothing. |
49
- | `deploy` | `files`, step `modify: true` | Applies the project to the account |
50
- | `callRestlet` | `scriptId`, `deployId`, optional `method`, `params`, `body` | The JSON response of the RESTlet |
43
+ | Operation | Inputs | Result |
44
+ | --------------- | ----------------------------------------------------------- | ---------------------------------------------------------------------------------- |
45
+ | `listObjects` | optional `objectTypes` (array), `scriptIdContains` | Custom objects in the account: type and script ID |
46
+ | `importObjects` | `objectType`, `scriptIds` (array) | `files`: object XML and referenced SuiteScript source; `data` holds import results |
47
+ | `listFiles` | optional `folderPath` (default `/SuiteScripts`) | `data`: array of File Cabinet paths |
48
+ | `importFiles` | `filePaths` (array of File Cabinet paths) | `files`: project paths to UTF-8 text; `data.results`: per-file status |
49
+ | `validate` | `files` | NetSuite's validation of the project. Changes nothing. |
50
+ | `preview` | `files` | The changes a deploy would make. Changes nothing. |
51
+ | `deploy` | `files`, step `modify: true` | Applies the project to the account |
52
+ | `callRestlet` | `scriptId`, `deployId`, optional `method`, `params`, `body` | The JSON response of the RESTlet |
51
53
 
52
54
  A failed operation fails the step with NetSuite's error messages. `importObjects` succeeds as long as NetSuite answers: each object that could not be exported is listed in `data.failedImports` with NetSuite's message, and `files` holds only the exported ones. Objects locked by an installed bundle or SuiteApp fail with "You cannot download the XML file for this object because it is locked", and some workflows fail with "Inconsistent workflow data". `listObjects` does not show which objects are locked; `appId` is `null` for them too. When an import returns no files, pick another object of the same type.
53
55
 
56
+ `importObjects` also imports each object's `<scriptfile>` reference under `FileCabinet/SuiteScripts/`. Check `data.successfulImports[].referencedFileImportResult.failedImports` for missing source files. Module dependencies inside JavaScript are not imported automatically; retrieve them with `importFiles`.
57
+
58
+ ### Reading existing scripts
59
+
60
+ Use `listFiles` and `importFiles` to inspect existing source without deploying a RESTlet. Paths are case-sensitive File Cabinet paths, not project paths:
61
+
62
+ ```json
63
+ { "operation": "listFiles", "folderPath": "/SuiteScripts" }
64
+ ```
65
+
66
+ ```json
67
+ { "operation": "importFiles", "filePaths": ["/SuiteScripts/example.js"] }
68
+ ```
69
+
70
+ The imported source is at `files["FileCabinet/SuiteScripts/example.js"]`. Imports return UTF-8 text; invalid UTF-8 fails the step. Supported roots are `/SuiteScripts`, `/Templates/E-mail Templates`, `/Templates/Marketing Templates`, and `/Web Site Hosting Files`. SuiteApp files cannot be imported. Check every `data.results[]` entry: `loaded: false` includes the failure in `message`, even when the operation succeeds.
71
+
54
72
  ## Project Files
55
73
 
56
74
  `files` maps a project path to the file content. Paths are relative and must stay inside the project.