@pragmatic-divops/cli 1.11.17 → 1.11.18

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 CHANGED
@@ -6,6 +6,7 @@ cli for various organization tools
6
6
 
7
7
  [![Codecov][coverage-badge]][coverage-link]
8
8
  [![Node CI Workflow Status][github-actions-ci-badge]][github-actions-ci-link]
9
+ ![SLSA Level 2][slsa-badge]
9
10
 
10
11
  <!--status-badges end -->
11
12
 
@@ -71,24 +72,26 @@ $ npm test
71
72
 
72
73
  [semantic-release-link]: https://github.com/semantic-release/semantic-release
73
74
 
74
- [semantic-release-badge]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
75
+ [semantic-release-badge]: https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release
75
76
 
76
77
  [renovate-link]: https://renovatebot.com
77
78
 
78
- [renovate-badge]: https://img.shields.io/badge/renovate-enabled-brightgreen.svg?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNjkgMzY5Ij48Y2lyY2xlIGN4PSIxODkuOSIgY3k9IjE5MC4yIiByPSIxODQuNSIgZmlsbD0iI2ZmZTQyZSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTUgLTYpIi8+PHBhdGggZmlsbD0iIzhiYjViNSIgZD0iTTI1MSAyNTZsLTM4LTM4YTE3IDE3IDAgMDEwLTI0bDU2LTU2YzItMiAyLTYgMC03bC0yMC0yMWE1IDUgMCAwMC03IDBsLTEzIDEyLTktOCAxMy0xM2ExNyAxNyAwIDAxMjQgMGwyMSAyMWM3IDcgNyAxNyAwIDI0bC01NiA1N2E1IDUgMCAwMDAgN2wzOCAzOHoiLz48cGF0aCBmaWxsPSIjZDk1NjEyIiBkPSJNMzAwIDI4OGwtOCA4Yy00IDQtMTEgNC0xNiAwbC00Ni00Nm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hdGggZmlsbD0iIzEzYWNiZCIgZD0iTTEzNCAyNDhjLTQgMC04LTItMTEtNWwtMjMtMjNhMTYgMTYgMCAwMTAtMjNMMjAxIDk2YTE2IDE2IDAgMDEyMiAwbDI0IDI0YzYgNiA2IDE2IDAgMjJMMTQ2IDI0M2MtMyAzLTcgNS0xMiA1em03OC0xNDdsLTQgMi0xMDEgMTAxYTYgNiAwIDAwMCA5bDIzIDIzYTYgNiAwIDAwOSAwbDEwMS0xMDFhNiA2IDAgMDAwLTlsLTI0LTIzLTQtMnoiLz48cGF0aCBmaWxsPSIjYmY0NDA0IiBkPSJNMjg0IDMwNGMtNCAwLTgtMS0xMS00bC00Ny00N2MtNi02LTYtMTYgMC0yMmw4LThjNi02IDE2LTYgMjIgMGw0NyA0NmM2IDcgNiAxNyAwIDIzbC04IDhjLTMgMy03IDQtMTEgNHptLTM5LTc2Yy0xIDAtMyAwLTQgMmwtOCA3Yy0yIDMtMiA3IDAgOWw0NyA0N2E2IDYgMCAwMDkgMGw3LThjMy0yIDMtNiAwLTlsLTQ2LTQ2Yy0yLTItMy0yLTUtMnoiLz48L3N2Zz4=
79
+ [renovate-badge]: https://img.shields.io/badge/renovate-enabled-brightgreen.svg?logo=renovatebot
79
80
 
80
81
  [github-actions-ci-link]: https://github.com/pragmatic-divops/cli/actions?query=workflow%3A%22Node.js+CI%22+branch%3Amaster
81
82
 
82
- [github-actions-ci-badge]: https://github.com/pragmatic-divops/cli/workflows/Node.js%20CI/badge.svg
83
+ [github-actions-ci-badge]: https://img.shields.io/github/actions/workflow/status/pragmatic-divops/cli/node-ci.yml.svg?branch=master&logo=github
83
84
 
84
85
  [coverage-link]: https://codecov.io/github/pragmatic-divops/cli
85
86
 
86
- [coverage-badge]: https://img.shields.io/codecov/c/github/pragmatic-divops/cli.svg
87
+ [coverage-badge]: https://img.shields.io/codecov/c/github/pragmatic-divops/cli?logo=codecov
87
88
 
88
89
  [license-link]: LICENSE
89
90
 
90
- [license-badge]: https://img.shields.io/github/license/pragmatic-divops/cli.svg
91
+ [license-badge]: https://img.shields.io/github/license/pragmatic-divops/cli.svg?logo=opensourceinitiative
91
92
 
92
93
  [npm-link]: https://www.npmjs.com/package/@pragmatic-divops/cli
93
94
 
94
- [npm-badge]: https://img.shields.io/npm/v/@pragmatic-divops/cli.svg
95
+ [npm-badge]: https://img.shields.io/npm/v/@pragmatic-divops/cli?logo=npm
96
+
97
+ [slsa-badge]: https://slsa.dev/images/gh-badge-level2.svg
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import yargs from 'yargs';
3
- import { format, inspect } from 'util';
4
- import { resolve, normalize, dirname, relative, extname, basename } from 'path';
5
- import { readFileSync, statSync, readdirSync, writeFile } from 'fs';
6
- import { strictEqual, notStrictEqual } from 'assert';
3
+ import { format } from 'util';
4
+ import { resolve, normalize } from 'path';
5
+ import { readFileSync, writeFile, statSync } from 'fs';
6
+ import 'assert';
7
7
  import { fileURLToPath } from 'url';
8
8
  import updateNotifier from 'update-notifier';
9
9
  import { questionNames as questionNames$1, scaffold as scaffold$1 } from '@form8ion/project';
@@ -23,16 +23,6 @@ import { lift } from '@form8ion/lift';
23
23
  import { scaffold as scaffold$3 } from '@form8ion/cucumber-scaffolder';
24
24
  import { scaffold as scaffold$2 } from '@form8ion/codecov';
25
25
 
26
- class YError extends Error {
27
- constructor(msg) {
28
- super(msg || 'yargs error');
29
- this.name = 'YError';
30
- if (Error.captureStackTrace) {
31
- Error.captureStackTrace(this, YError);
32
- }
33
- }
34
- }
35
-
36
26
  function getProcessArgvBinIndex() {
37
27
  if (isBundledElectronApp())
38
28
  return 0;
@@ -47,9 +37,6 @@ function isElectronApp() {
47
37
  function hideBin(argv) {
48
38
  return argv.slice(getProcessArgvBinIndex() + 1);
49
39
  }
50
- function getProcessArgvBin() {
51
- return process.argv[getProcessArgvBinIndex()];
52
- }
53
40
 
54
41
  /**
55
42
  * @license
@@ -176,10 +163,10 @@ var DefaultValuesForTypeKey;
176
163
  * Copyright (c) 2016, Contributors
177
164
  * SPDX-License-Identifier: ISC
178
165
  */
179
- let mixin$1;
166
+ let mixin;
180
167
  class YargsParser {
181
168
  constructor(_mixin) {
182
- mixin$1 = _mixin;
169
+ mixin = _mixin;
183
170
  }
184
171
  parse(argsInput, options) {
185
172
  const opts = Object.assign({
@@ -236,7 +223,7 @@ class YargsParser {
236
223
  const newAliases = Object.create(null);
237
224
  const defaulted = Object.create(null);
238
225
  // allow a i18n handler to be passed in, default to a fake one (util.format).
239
- const __ = opts.__ || mixin$1.format;
226
+ const __ = opts.__ || mixin.format;
240
227
  const flags = {
241
228
  aliases: Object.create(null),
242
229
  arrays: Object.create(null),
@@ -710,7 +697,7 @@ class YargsParser {
710
697
  return val;
711
698
  },
712
699
  set(value) {
713
- val = typeof value === 'string' ? mixin$1.normalize(value) : value;
700
+ val = typeof value === 'string' ? mixin.normalize(value) : value;
714
701
  }
715
702
  });
716
703
  });
@@ -745,9 +732,9 @@ class YargsParser {
745
732
  // Set normalized value when key is in 'normalize' and in 'arrays'
746
733
  if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) {
747
734
  if (Array.isArray(val))
748
- value = val.map((val) => { return mixin$1.normalize(val); });
735
+ value = val.map((val) => { return mixin.normalize(val); });
749
736
  else
750
- value = mixin$1.normalize(val);
737
+ value = mixin.normalize(val);
751
738
  }
752
739
  return value;
753
740
  }
@@ -774,7 +761,7 @@ class YargsParser {
774
761
  if (configPath) {
775
762
  try {
776
763
  let config = null;
777
- const resolvedConfigPath = mixin$1.resolve(mixin$1.cwd(), configPath);
764
+ const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath);
778
765
  const resolveConfig = flags.configs[configKey];
779
766
  if (typeof resolveConfig === 'function') {
780
767
  try {
@@ -789,7 +776,7 @@ class YargsParser {
789
776
  }
790
777
  }
791
778
  else {
792
- config = mixin$1.require(resolvedConfigPath);
779
+ config = mixin.require(resolvedConfigPath);
793
780
  }
794
781
  setConfigObject(config);
795
782
  }
@@ -838,7 +825,7 @@ class YargsParser {
838
825
  if (typeof envPrefix === 'undefined')
839
826
  return;
840
827
  const prefix = typeof envPrefix === 'string' ? envPrefix : '';
841
- const env = mixin$1.env();
828
+ const env = mixin.env();
842
829
  Object.keys(env).forEach(function (envVar) {
843
830
  if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) {
844
831
  // get array of nested keys and convert them to camel case
@@ -1234,7 +1221,7 @@ if (nodeVersion) {
1234
1221
  }
1235
1222
  // Creates a yargs-parser instance using Node.js standard libraries:
1236
1223
  const env = process ? process.env : {};
1237
- const parser = new YargsParser({
1224
+ new YargsParser({
1238
1225
  cwd: process.cwd,
1239
1226
  env: () => {
1240
1227
  return env;
@@ -1257,359 +1244,6 @@ const parser = new YargsParser({
1257
1244
  }
1258
1245
  }
1259
1246
  });
1260
- const yargsParser = function Parser(args, opts) {
1261
- const result = parser.parse(args.slice(), opts);
1262
- return result.argv;
1263
- };
1264
- yargsParser.detailed = function (args, opts) {
1265
- return parser.parse(args.slice(), opts);
1266
- };
1267
- yargsParser.camelCase = camelCase;
1268
- yargsParser.decamelize = decamelize;
1269
- yargsParser.looksLikeNumber = looksLikeNumber;
1270
-
1271
- const align = {
1272
- right: alignRight,
1273
- center: alignCenter
1274
- };
1275
- const top = 0;
1276
- const right = 1;
1277
- const bottom = 2;
1278
- const left = 3;
1279
- class UI {
1280
- constructor(opts) {
1281
- var _a;
1282
- this.width = opts.width;
1283
- this.wrap = (_a = opts.wrap) !== null && _a !== void 0 ? _a : true;
1284
- this.rows = [];
1285
- }
1286
- span(...args) {
1287
- const cols = this.div(...args);
1288
- cols.span = true;
1289
- }
1290
- resetOutput() {
1291
- this.rows = [];
1292
- }
1293
- div(...args) {
1294
- if (args.length === 0) {
1295
- this.div('');
1296
- }
1297
- if (this.wrap && this.shouldApplyLayoutDSL(...args) && typeof args[0] === 'string') {
1298
- return this.applyLayoutDSL(args[0]);
1299
- }
1300
- const cols = args.map(arg => {
1301
- if (typeof arg === 'string') {
1302
- return this.colFromString(arg);
1303
- }
1304
- return arg;
1305
- });
1306
- this.rows.push(cols);
1307
- return cols;
1308
- }
1309
- shouldApplyLayoutDSL(...args) {
1310
- return args.length === 1 && typeof args[0] === 'string' &&
1311
- /[\t\n]/.test(args[0]);
1312
- }
1313
- applyLayoutDSL(str) {
1314
- const rows = str.split('\n').map(row => row.split('\t'));
1315
- let leftColumnWidth = 0;
1316
- // simple heuristic for layout, make sure the
1317
- // second column lines up along the left-hand.
1318
- // don't allow the first column to take up more
1319
- // than 50% of the screen.
1320
- rows.forEach(columns => {
1321
- if (columns.length > 1 && mixin.stringWidth(columns[0]) > leftColumnWidth) {
1322
- leftColumnWidth = Math.min(Math.floor(this.width * 0.5), mixin.stringWidth(columns[0]));
1323
- }
1324
- });
1325
- // generate a table:
1326
- // replacing ' ' with padding calculations.
1327
- // using the algorithmically generated width.
1328
- rows.forEach(columns => {
1329
- this.div(...columns.map((r, i) => {
1330
- return {
1331
- text: r.trim(),
1332
- padding: this.measurePadding(r),
1333
- width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined
1334
- };
1335
- }));
1336
- });
1337
- return this.rows[this.rows.length - 1];
1338
- }
1339
- colFromString(text) {
1340
- return {
1341
- text,
1342
- padding: this.measurePadding(text)
1343
- };
1344
- }
1345
- measurePadding(str) {
1346
- // measure padding without ansi escape codes
1347
- const noAnsi = mixin.stripAnsi(str);
1348
- return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length];
1349
- }
1350
- toString() {
1351
- const lines = [];
1352
- this.rows.forEach(row => {
1353
- this.rowToString(row, lines);
1354
- });
1355
- // don't display any lines with the
1356
- // hidden flag set.
1357
- return lines
1358
- .filter(line => !line.hidden)
1359
- .map(line => line.text)
1360
- .join('\n');
1361
- }
1362
- rowToString(row, lines) {
1363
- this.rasterize(row).forEach((rrow, r) => {
1364
- let str = '';
1365
- rrow.forEach((col, c) => {
1366
- const { width } = row[c]; // the width with padding.
1367
- const wrapWidth = this.negatePadding(row[c]); // the width without padding.
1368
- let ts = col; // temporary string used during alignment/padding.
1369
- if (wrapWidth > mixin.stringWidth(col)) {
1370
- ts += ' '.repeat(wrapWidth - mixin.stringWidth(col));
1371
- }
1372
- // align the string within its column.
1373
- if (row[c].align && row[c].align !== 'left' && this.wrap) {
1374
- const fn = align[row[c].align];
1375
- ts = fn(ts, wrapWidth);
1376
- if (mixin.stringWidth(ts) < wrapWidth) {
1377
- ts += ' '.repeat((width || 0) - mixin.stringWidth(ts) - 1);
1378
- }
1379
- }
1380
- // apply border and padding to string.
1381
- const padding = row[c].padding || [0, 0, 0, 0];
1382
- if (padding[left]) {
1383
- str += ' '.repeat(padding[left]);
1384
- }
1385
- str += addBorder(row[c], ts, '| ');
1386
- str += ts;
1387
- str += addBorder(row[c], ts, ' |');
1388
- if (padding[right]) {
1389
- str += ' '.repeat(padding[right]);
1390
- }
1391
- // if prior row is span, try to render the
1392
- // current row on the prior line.
1393
- if (r === 0 && lines.length > 0) {
1394
- str = this.renderInline(str, lines[lines.length - 1]);
1395
- }
1396
- });
1397
- // remove trailing whitespace.
1398
- lines.push({
1399
- text: str.replace(/ +$/, ''),
1400
- span: row.span
1401
- });
1402
- });
1403
- return lines;
1404
- }
1405
- // if the full 'source' can render in
1406
- // the target line, do so.
1407
- renderInline(source, previousLine) {
1408
- const match = source.match(/^ */);
1409
- const leadingWhitespace = match ? match[0].length : 0;
1410
- const target = previousLine.text;
1411
- const targetTextWidth = mixin.stringWidth(target.trimRight());
1412
- if (!previousLine.span) {
1413
- return source;
1414
- }
1415
- // if we're not applying wrapping logic,
1416
- // just always append to the span.
1417
- if (!this.wrap) {
1418
- previousLine.hidden = true;
1419
- return target + source;
1420
- }
1421
- if (leadingWhitespace < targetTextWidth) {
1422
- return source;
1423
- }
1424
- previousLine.hidden = true;
1425
- return target.trimRight() + ' '.repeat(leadingWhitespace - targetTextWidth) + source.trimLeft();
1426
- }
1427
- rasterize(row) {
1428
- const rrows = [];
1429
- const widths = this.columnWidths(row);
1430
- let wrapped;
1431
- // word wrap all columns, and create
1432
- // a data-structure that is easy to rasterize.
1433
- row.forEach((col, c) => {
1434
- // leave room for left and right padding.
1435
- col.width = widths[c];
1436
- if (this.wrap) {
1437
- wrapped = mixin.wrap(col.text, this.negatePadding(col), { hard: true }).split('\n');
1438
- }
1439
- else {
1440
- wrapped = col.text.split('\n');
1441
- }
1442
- if (col.border) {
1443
- wrapped.unshift('.' + '-'.repeat(this.negatePadding(col) + 2) + '.');
1444
- wrapped.push("'" + '-'.repeat(this.negatePadding(col) + 2) + "'");
1445
- }
1446
- // add top and bottom padding.
1447
- if (col.padding) {
1448
- wrapped.unshift(...new Array(col.padding[top] || 0).fill(''));
1449
- wrapped.push(...new Array(col.padding[bottom] || 0).fill(''));
1450
- }
1451
- wrapped.forEach((str, r) => {
1452
- if (!rrows[r]) {
1453
- rrows.push([]);
1454
- }
1455
- const rrow = rrows[r];
1456
- for (let i = 0; i < c; i++) {
1457
- if (rrow[i] === undefined) {
1458
- rrow.push('');
1459
- }
1460
- }
1461
- rrow.push(str);
1462
- });
1463
- });
1464
- return rrows;
1465
- }
1466
- negatePadding(col) {
1467
- let wrapWidth = col.width || 0;
1468
- if (col.padding) {
1469
- wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0);
1470
- }
1471
- if (col.border) {
1472
- wrapWidth -= 4;
1473
- }
1474
- return wrapWidth;
1475
- }
1476
- columnWidths(row) {
1477
- if (!this.wrap) {
1478
- return row.map(col => {
1479
- return col.width || mixin.stringWidth(col.text);
1480
- });
1481
- }
1482
- let unset = row.length;
1483
- let remainingWidth = this.width;
1484
- // column widths can be set in config.
1485
- const widths = row.map(col => {
1486
- if (col.width) {
1487
- unset--;
1488
- remainingWidth -= col.width;
1489
- return col.width;
1490
- }
1491
- return undefined;
1492
- });
1493
- // any unset widths should be calculated.
1494
- const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0;
1495
- return widths.map((w, i) => {
1496
- if (w === undefined) {
1497
- return Math.max(unsetWidth, _minWidth(row[i]));
1498
- }
1499
- return w;
1500
- });
1501
- }
1502
- }
1503
- function addBorder(col, ts, style) {
1504
- if (col.border) {
1505
- if (/[.']-+[.']/.test(ts)) {
1506
- return '';
1507
- }
1508
- if (ts.trim().length !== 0) {
1509
- return style;
1510
- }
1511
- return ' ';
1512
- }
1513
- return '';
1514
- }
1515
- // calculates the minimum width of
1516
- // a column, based on padding preferences.
1517
- function _minWidth(col) {
1518
- const padding = col.padding || [];
1519
- const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0);
1520
- if (col.border) {
1521
- return minWidth + 4;
1522
- }
1523
- return minWidth;
1524
- }
1525
- function getWindowWidth() {
1526
- /* istanbul ignore next: depends on terminal */
1527
- if (typeof process === 'object' && process.stdout && process.stdout.columns) {
1528
- return process.stdout.columns;
1529
- }
1530
- return 80;
1531
- }
1532
- function alignRight(str, width) {
1533
- str = str.trim();
1534
- const strWidth = mixin.stringWidth(str);
1535
- if (strWidth < width) {
1536
- return ' '.repeat(width - strWidth) + str;
1537
- }
1538
- return str;
1539
- }
1540
- function alignCenter(str, width) {
1541
- str = str.trim();
1542
- const strWidth = mixin.stringWidth(str);
1543
- /* istanbul ignore next */
1544
- if (strWidth >= width) {
1545
- return str;
1546
- }
1547
- return ' '.repeat((width - strWidth) >> 1) + str;
1548
- }
1549
- let mixin;
1550
- function cliui(opts, _mixin) {
1551
- mixin = _mixin;
1552
- return new UI({
1553
- width: (opts === null || opts === void 0 ? void 0 : opts.width) || getWindowWidth(),
1554
- wrap: opts === null || opts === void 0 ? void 0 : opts.wrap
1555
- });
1556
- }
1557
-
1558
- // Minimal replacement for ansi string helpers "wrap-ansi" and "strip-ansi".
1559
- // to facilitate ESM and Deno modules.
1560
- // TODO: look at porting https://www.npmjs.com/package/wrap-ansi to ESM.
1561
- // The npm application
1562
- // Copyright (c) npm, Inc. and Contributors
1563
- // Licensed on the terms of The Artistic License 2.0
1564
- // See: https://github.com/npm/cli/blob/4c65cd952bc8627811735bea76b9b110cc4fc80e/lib/utils/ansi-trim.js
1565
- const ansi = new RegExp('\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|' +
1566
- '\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)', 'g');
1567
- function stripAnsi(str) {
1568
- return str.replace(ansi, '');
1569
- }
1570
- function wrap(str, width) {
1571
- const [start, end] = str.match(ansi) || ['', ''];
1572
- str = stripAnsi(str);
1573
- let wrapped = '';
1574
- for (let i = 0; i < str.length; i++) {
1575
- if (i !== 0 && (i % width) === 0) {
1576
- wrapped += '\n';
1577
- }
1578
- wrapped += str.charAt(i);
1579
- }
1580
- if (start && end) {
1581
- wrapped = `${start}${wrapped}${end}`;
1582
- }
1583
- return wrapped;
1584
- }
1585
-
1586
- // Bootstrap cliui with CommonJS dependencies:
1587
-
1588
- function ui (opts) {
1589
- return cliui(opts, {
1590
- stringWidth: (str) => {
1591
- return [...str].length
1592
- },
1593
- stripAnsi,
1594
- wrap
1595
- })
1596
- }
1597
-
1598
- function escalade (start, callback) {
1599
- let dir = resolve('.', start);
1600
- let tmp, stats = statSync(dir);
1601
-
1602
- if (!stats.isDirectory()) {
1603
- dir = dirname(dir);
1604
- }
1605
-
1606
- while (true) {
1607
- tmp = callback(dir, readdirSync(dir));
1608
- if (tmp) return resolve(dir, tmp);
1609
- dir = dirname(tmp = dir);
1610
- if (tmp === dir) break;
1611
- }
1612
- }
1613
1247
 
1614
1248
  var shim$1 = {
1615
1249
  fs: {
@@ -1807,9 +1441,6 @@ const y18n = (opts) => {
1807
1441
  return y18n$1(opts, shim$1)
1808
1442
  };
1809
1443
 
1810
- const REQUIRE_ERROR = 'require is not supported by ESM';
1811
- const REQUIRE_DIRECTORY_ERROR = 'loading a directory of commands is not supported yet for ESM';
1812
-
1813
1444
  let __dirname;
1814
1445
  try {
1815
1446
  __dirname = fileURLToPath(import.meta.url);
@@ -1819,48 +1450,13 @@ try {
1819
1450
  const mainFilename = __dirname.substring(0, __dirname.lastIndexOf('node_modules'));
1820
1451
 
1821
1452
  ({
1822
- assert: {
1823
- notStrictEqual,
1824
- strictEqual
1825
- },
1826
- cliui: ui,
1827
- findUp: escalade,
1828
- getEnv: (key) => {
1829
- return process.env[key]
1830
- },
1831
- inspect,
1832
- getCallerFile: () => {
1833
- throw new YError(REQUIRE_DIRECTORY_ERROR)
1834
- },
1835
- getProcessArgvBin,
1836
1453
  mainFilename: mainFilename || process.cwd(),
1837
- Parser: yargsParser,
1838
- path: {
1839
- basename,
1840
- dirname,
1841
- extname,
1842
- relative,
1843
- resolve
1844
- },
1845
1454
  process: {
1846
- argv: () => process.argv,
1847
1455
  cwd: process.cwd,
1848
- emitWarning: (warning, type) => process.emitWarning(warning, type),
1849
- execPath: () => process.execPath,
1850
1456
  exit: process.exit,
1851
1457
  nextTick: process.nextTick,
1852
1458
  stdColumns: typeof process.stdout.columns !== 'undefined' ? process.stdout.columns : null
1853
1459
  },
1854
- readFileSync,
1855
- require: () => {
1856
- throw new YError(REQUIRE_ERROR)
1857
- },
1858
- requireDirectory: () => {
1859
- throw new YError(REQUIRE_DIRECTORY_ERROR)
1860
- },
1861
- stringWidth: (str) => {
1862
- return [...str].length
1863
- },
1864
1460
  y18n: y18n({
1865
1461
  directory: resolve(__dirname, '../../../locales'),
1866
1462
  updateFiles: false
@@ -1870,7 +1466,7 @@ const mainFilename = __dirname.substring(0, __dirname.lastIndexOf('node_modules'
1870
1466
  var name = "@pragmatic-divops/cli";
1871
1467
  var description = "cli for various organization tools";
1872
1468
  var license = "MIT";
1873
- var version = "1.11.17";
1469
+ var version = "1.11.18";
1874
1470
  var type = "module";
1875
1471
  var author = "Matt Travi <npm@travi.org> (https://matt.travi.org/)";
1876
1472
  var repository = "pragmatic-divops/cli";
@@ -1881,7 +1477,7 @@ var bin = {
1881
1477
  };
1882
1478
  var scripts = {
1883
1479
  test: "npm-run-all --print-label --parallel lint:* --parallel test:*",
1884
- "lint:lockfile": "lockfile-lint --path package-lock.json --type npm --validate-https --allowed-hosts npm",
1480
+ "lint:lockfile": "lockfile-lint",
1885
1481
  "lint:js": "eslint . --cache",
1886
1482
  "lint:md": "remark . --frail",
1887
1483
  "generate:md": "remark . --output",
@@ -1904,14 +1500,18 @@ var scripts = {
1904
1500
  "test:integration:focus": "run-s 'test:integration:base -- --profile focus'",
1905
1501
  "pretest:e2e": "run-s build",
1906
1502
  "test:e2e": "node ./test/e2e/smoke-test.mjs",
1907
- prepare: "husky install"
1503
+ prepare: "husky install",
1504
+ "lint:js:fix": "run-s 'lint:js -- --fix'",
1505
+ "lint:publish": "publint --strict"
1908
1506
  };
1909
1507
  var files = [
1910
1508
  "bin/"
1911
1509
  ];
1912
1510
  var publishConfig = {
1913
- access: "public"
1511
+ access: "public",
1512
+ provenance: true
1914
1513
  };
1514
+ var packageManager = "npm@11.1.0+sha512.acf301ad9b9ddba948fcb72341e2f0fcae477f56a95cc2a092934d133a7461062633cefbf93d5934a3dc0768674e2edee9f04dcfcc4bb4c327ff0e3a7d552a1b";
1915
1515
  var dependencies = {
1916
1516
  "@form8ion/codecov": "6.2.0",
1917
1517
  "@form8ion/cucumber-scaffolder": "4.0.0",
@@ -1921,7 +1521,7 @@ var dependencies = {
1921
1521
  "@form8ion/github-actions-node-ci": "5.0.1",
1922
1522
  "@form8ion/javascript": "13.0.2",
1923
1523
  "@form8ion/javascript-core": "12.3.0",
1924
- "@form8ion/lift": "10.0.0",
1524
+ "@form8ion/lift": "10.0.1",
1925
1525
  "@form8ion/mocha-scaffolder": "5.0.1",
1926
1526
  "@form8ion/project": "20.0.0",
1927
1527
  "@form8ion/renovate-scaffolder": "3.0.0",
@@ -1930,41 +1530,41 @@ var dependencies = {
1930
1530
  yargs: "17.7.2"
1931
1531
  };
1932
1532
  var devDependencies = {
1933
- "@cucumber/cucumber": "11.1.0",
1533
+ "@cucumber/cucumber": "11.2.0",
1934
1534
  "@form8ion/config-file": "1.3.0",
1935
1535
  "@form8ion/core": "4.8.0",
1936
- "@pragmatic-divops/commitlint-config": "1.0.62",
1536
+ "@pragmatic-divops/commitlint-config": "1.0.65",
1937
1537
  "@pragmatic-divops/eslint-config": "1.0.96",
1938
1538
  "@pragmatic-divops/eslint-config-cucumber": "1.0.1",
1939
- "@pragmatic-divops/remark-preset": "4.0.6",
1940
- "@rollup/plugin-node-resolve": "15.3.0",
1539
+ "@pragmatic-divops/remark-preset": "4.0.7",
1540
+ "@rollup/plugin-node-resolve": "16.0.0",
1941
1541
  "@travi/any": "3.1.2",
1942
- "ban-sensitive-files": "1.10.6",
1943
- c8: "10.1.2",
1542
+ "ban-sensitive-files": "1.10.7",
1543
+ c8: "10.1.3",
1944
1544
  chai: "5.1.2",
1945
1545
  "cross-env": "7.0.3",
1946
1546
  "cz-conventional-changelog": "3.3.0",
1947
1547
  "deep-equal": "2.2.3",
1948
- execa: "9.5.1",
1548
+ execa: "9.5.2",
1949
1549
  "gherkin-lint": "4.2.4",
1950
1550
  "http-status-codes": "2.3.0",
1951
- husky: "9.1.6",
1952
- "jest-when": "3.6.0",
1551
+ husky: "9.1.7",
1552
+ "jest-when": "3.7.0",
1953
1553
  "lockfile-lint": "4.14.0",
1954
- "mock-fs": "5.4.1",
1955
- msw: "2.6.5",
1956
- "npm-run-all2": "7.0.1",
1554
+ "mock-fs": "5.5.0",
1555
+ msw: "2.7.0",
1556
+ "npm-run-all2": "7.0.2",
1557
+ publint: "0.3.4",
1957
1558
  "remark-cli": "12.0.1",
1958
1559
  "remark-toc": "9.0.0",
1959
1560
  rimraf: "6.0.1",
1960
- rollup: "4.27.2",
1561
+ rollup: "4.34.6",
1961
1562
  "rollup-plugin-auto-external": "2.0.0",
1962
1563
  "rollup-plugin-executable": "1.6.3",
1963
1564
  "rollup-plugin-json": "4.0.0",
1964
1565
  testdouble: "3.20.2",
1965
- vitest: "2.1.5"
1566
+ vitest: "3.0.5"
1966
1567
  };
1967
- var packageManager = "npm@10.9.0+sha512.65a9c38a8172948f617a53619762cd77e12b9950fe1f9239debcb8d62c652f2081824b986fee7c0af6c0a7df615becebe4bf56e17ec27214a87aa29d9e038b4b";
1968
1568
  var pkg = {
1969
1569
  name: name,
1970
1570
  description: description,
@@ -1979,9 +1579,9 @@ var pkg = {
1979
1579
  scripts: scripts,
1980
1580
  files: files,
1981
1581
  publishConfig: publishConfig,
1582
+ packageManager: packageManager,
1982
1583
  dependencies: dependencies,
1983
- devDependencies: devDependencies,
1984
- packageManager: packageManager
1584
+ devDependencies: devDependencies
1985
1585
  };
1986
1586
 
1987
1587
  function javascriptScaffolderFactory(decisions) {