@jacebenson/jsn 5.5.10-dev.231.1 → 5.5.10-dev.233.1

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": "@jacebenson/jsn",
3
- "version": "5.5.10-dev.231.1",
3
+ "version": "5.5.10-dev.233.1",
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": {
@@ -232,11 +232,14 @@ export function buildDevCmd(name, table, aliases, defaultColumns, wrap, opts = {
232
232
  .command({
233
233
  command: 'create',
234
234
  describe: `Create a new ${singular}`,
235
- builder: (y) => recordOptions(y, false)
236
- .option('data', { type: 'string', describe: 'JSON fields' })
237
- .option('data-file', { type: 'string', describe: 'Read JSON payload from file' })
238
- .option('data-stdin', { type: 'boolean', describe: 'Read JSON payload from stdin' })
239
- .option('field', { alias: 'f', type: 'string', array: true, describe: 'Set a field as name=value; repeatable' }),
235
+ builder: (y) => {
236
+ const command = recordOptions(y, false)
237
+ .option('data', { type: 'string', describe: 'JSON fields' })
238
+ .option('data-file', { type: 'string', describe: 'Read JSON payload from file' })
239
+ .option('data-stdin', { type: 'boolean', describe: 'Read JSON payload from stdin' })
240
+ .option('field', { alias: 'f', type: 'string', array: true, describe: 'Set a field as name=value; repeatable' });
241
+ return opts.createHelp ? command.epilogue(opts.createHelp) : command;
242
+ },
240
243
  handler: wrap(async (argv, app) => {
241
244
  const recordData = buildRecordPayload(argv);
242
245
  const record = await createRecord(app.sdk, { table, data: recordData });
@@ -244,6 +247,7 @@ export function buildDevCmd(name, table, aliases, defaultColumns, wrap, opts = {
244
247
  summary: `Created ${singular}`,
245
248
  breadcrumbs: [
246
249
  { action: 'show', cmd: `jsn ${name} show ${getStringField(record, 'name') || getStringField(record, 'sys_id')}`, description: `View the new ${singular}` },
250
+ ...(opts.createBreadcrumbs || []),
247
251
  ],
248
252
  });
249
253
  }),
@@ -48,7 +48,20 @@ async function fetchExtensionChain(sdk, record) {
48
48
 
49
49
  export { actionsCmd } from './actions.js';
50
50
 
51
- export const includesCmd = (wrap) => buildProfileCommand('includes', wrap);
51
+ export const includesCmd = (wrap) => buildProfileCommand('includes', wrap, {
52
+ createBreadcrumbs: [
53
+ { action: 'check-help', cmd: 'jsn scan checks create --help', description: 'Behavior is untested until the intended check runs. Review a suitable check.' },
54
+ { action: 'scan-help', cmd: 'jsn scan run --help', description: 'Choose an explicit target; verify intended-check execution and its assertion.' },
55
+ ],
56
+ createHelp: [
57
+ 'Behavior verification is a separate, explicitly approved operation, not performed by includes create.',
58
+ 'Review jsn scan checks create --help and jsn scan run --help. A suitable scripted Instance Scan check can execute intended behavior server-side without jsn eval, but still executes code; it is not a safety bypass.',
59
+ 'Supply the intended target and check identity. Method, inputs and expected value must come from the task, never inferred from submitted source.',
60
+ 'Confirm positive evidence that the intended check executed and its assertion passed. A completed scan or zero findings alone is not behavioral correctness. Skipped or unreadable execution remains unverified.',
61
+ 'Live end-to-end validation is unverified and blocked by #551. Do not assume script-only checks participate in record or update-set point scans. On an approved disposable target, a future verified example must demonstrate a deliberate assertion failure producing a finding, then a restored pass.',
62
+ 'Creation adds no check or scan, performs no storage readback, and does not verify capture.',
63
+ ].join('\n\n'),
64
+ });
52
65
 
53
66
  export const rulesCmd = (wrap) => buildProfileCommand('rules', wrap);
54
67