@jacebenson/jsn 4.3.7-dev.16 → 4.3.7-dev.17

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/README.md +19 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -125,6 +125,25 @@ Run `jsn` for the full grouped list. Commands are organized by ServiceNow domain
125
125
 
126
126
  Every command supports `--json`, `--query`, and `--help`.
127
127
 
128
+ For multiline script fields, `--data-file` parses the file as UTF-8 JSON and
129
+ passes the resulting values through unchanged. On Windows PowerShell, generate
130
+ the payload as JSON text and inspect it before invoking JSN, for example:
131
+
132
+ ```powershell
133
+ $script = [string](Get-Content -Path .\Example.script.js -Raw)
134
+ $payload = @{ script = $script; description = 'Example' } |
135
+ ConvertTo-Json -Depth 5 -Compress
136
+ Set-Content -Path .\Example.update.json -Value $payload -Encoding UTF8
137
+ Get-Content .\Example.update.json -Raw | ConvertFrom-Json | Select-Object -ExpandProperty script
138
+ jsn includes update Example --data-file .\Example.update.json --json
139
+ ```
140
+
141
+ `JSON.parse` preserves a JSON string as a JavaScript string, and the SDK
142
+ serializes update payloads with `JSON.stringify`. If the file already contains
143
+ a `{value=...}` or FileSystem-provider representation, that text is external
144
+ to JSN and must be corrected before the update. Use a read-back command or
145
+ `records update --strict` where applicable to verify persisted fields.
146
+
128
147
  ## Instances
129
148
 
130
149
  Switch between instances without re-authenticating.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jacebenson/jsn",
3
- "version": "4.3.7-dev.16",
3
+ "version": "4.3.7-dev.17",
4
4
  "description": "A command-line interface for ServiceNow that follows the Unix philosophy: simple, composable, and scriptable.",
5
5
  "type": "module",
6
6
  "bin": {