@pragmatic-divops/cli 1.8.0-alpha.9 → 1.9.0

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
@@ -9,8 +9,6 @@ cli for various organization tools
9
9
 
10
10
  <!--status-badges end -->
11
11
 
12
- ## Usage
13
-
14
12
  <!--consumer-badges start -->
15
13
 
16
14
  [![MIT license][license-badge]][license-link]
@@ -18,12 +16,6 @@ cli for various organization tools
18
16
 
19
17
  <!--consumer-badges end -->
20
18
 
21
- ### Installation
22
-
23
- ```sh
24
- $ npm install @pragmatic-divops/cli --global
25
- ```
26
-
27
19
  ## Table of Contents
28
20
 
29
21
  * [Contributing](#contributing)
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import yargs from 'yargs';
3
- import updateNotifier from 'update-notifier';
4
3
  import { format, inspect } from 'util';
5
4
  import { normalize, resolve, dirname, basename, extname, relative } from 'path';
6
5
  import { readFileSync, statSync, readdirSync, writeFile } from 'fs';
7
6
  import { notStrictEqual, strictEqual } from 'assert';
8
7
  import { fileURLToPath } from 'url';
8
+ import updateNotifier from 'update-notifier';
9
9
  import { questionNames, scaffold as scaffold$8 } from '@form8ion/project';
10
10
  import { scaffold as scaffold$7, predicate, lift as lift$2 } from '@form8ion/renovate-scaffolder';
11
11
  import { scaffold, questionNames as questionNames$1, lift, test } from '@form8ion/javascript';
@@ -20,117 +20,6 @@ import { lift as lift$1 } from '@form8ion/lift';
20
20
  import { scaffold as scaffold$a } from '@form8ion/cucumber-scaffolder';
21
21
  import { scaffold as scaffold$9 } from '@form8ion/codecov';
22
22
 
23
- var name = "@pragmatic-divops/cli";
24
- var description = "cli for various organization tools";
25
- var license = "MIT";
26
- var version = "1.8.0-alpha.9";
27
- var type = "module";
28
- var bin = {
29
- "pragmatic-divops": "bin/pragmatic-divops.mjs"
30
- };
31
- var files = [
32
- "bin/"
33
- ];
34
- var publishConfig = {
35
- access: "public"
36
- };
37
- var repository = "pragmatic-divops/cli";
38
- var bugs = "https://github.com/pragmatic-divops/cli/issues";
39
- var homepage = "https://github.com/pragmatic-divops/cli#readme";
40
- var author = "Matt Travi <npm@travi.org> (https://matt.travi.org/)";
41
- var scripts = {
42
- test: "npm-run-all --print-label --parallel lint:* --parallel test:*",
43
- "lint:lockfile": "lockfile-lint --path package-lock.json --type npm --validate-https --allowed-hosts npm",
44
- "lint:js": "eslint . --cache",
45
- "lint:md": "remark . --frail",
46
- "generate:md": "remark . --output",
47
- "lint:sensitive": "ban",
48
- clean: "rimraf ./bin",
49
- prebuild: "run-s clean",
50
- build: "npm-run-all --print-label --parallel build:*",
51
- "build:js": "rollup --config",
52
- watch: "run-s 'build:js -- --watch'",
53
- prepack: "run-s build",
54
- "test:unit": "cross-env NODE_ENV=test c8 run-s test:unit:base",
55
- "test:unit:base": "DEBUG=any mocha --loader=testdouble 'src/**/*-test.js'",
56
- "lint:peer": "npm ls >/dev/null",
57
- "lint:gherkin": "gherkin-lint",
58
- "test:integration": "run-s 'test:integration:base -- --profile noWip'",
59
- "test:integration:base": "NODE_OPTIONS=\"--loader=testdouble\" DEBUG=any cucumber-js test/integration",
60
- "test:integration:debug": "DEBUG=test run-s test:integration",
61
- "test:integration:wip": "run-s 'test:integration:base -- --profile wip'",
62
- "test:integration:wip:debug": "DEBUG=test run-s 'test:integration:wip'",
63
- "test:integration:focus": "run-s 'test:integration:base -- --profile focus'",
64
- prepare: "husky install"
65
- };
66
- var dependencies = {
67
- "@form8ion/codecov": "3.0.1",
68
- "@form8ion/cucumber-scaffolder": "2.0.0",
69
- "@form8ion/eslint-config-extender": "4.0.0",
70
- "@form8ion/gatsby": "1.0.1",
71
- "@form8ion/github-actions-node-ci": "3.8.0",
72
- "@form8ion/javascript": "7.2.0",
73
- "@form8ion/javascript-core": "6.0.1",
74
- "@form8ion/lift": "4.1.0",
75
- "@form8ion/mocha-scaffolder": "2.0.2",
76
- "@form8ion/project": "13.2.1",
77
- "@form8ion/renovate-scaffolder": "1.7.0",
78
- "@travi/github-scaffolder": "8.0.2",
79
- "@travi/netlify-scaffolder": "1.6.0",
80
- "update-notifier": "6.0.2",
81
- yargs: "17.5.1"
82
- };
83
- var devDependencies = {
84
- "@cucumber/cucumber": "8.5.0",
85
- "@form8ion/core": "1.8.0",
86
- "@pragmatic-divops/commitlint-config": "1.0.22",
87
- "@pragmatic-divops/eslint-config": "1.0.46",
88
- "@pragmatic-divops/eslint-config-cucumber": "1.0.1",
89
- "@pragmatic-divops/eslint-config-mocha": "1.0.8",
90
- "@pragmatic-divops/remark-preset": "3.0.0",
91
- "@rollup/plugin-node-resolve": "13.3.0",
92
- "@travi/any": "2.1.5",
93
- "ban-sensitive-files": "1.9.18",
94
- c8: "7.12.0",
95
- chai: "4.3.6",
96
- "cross-env": "7.0.3",
97
- "cz-conventional-changelog": "3.3.0",
98
- "gherkin-lint": "4.2.2",
99
- "http-status-codes": "2.2.0",
100
- husky: "8.0.1",
101
- "lockfile-lint": "4.7.6",
102
- mocha: "10.0.0",
103
- "mock-fs": "5.1.2",
104
- nock: "13.2.9",
105
- "npm-run-all": "4.1.5",
106
- "remark-cli": "11.0.0",
107
- "remark-toc": "8.0.1",
108
- rimraf: "3.0.2",
109
- rollup: "2.77.0",
110
- "rollup-plugin-auto-external": "2.0.0",
111
- "rollup-plugin-executable": "1.6.3",
112
- "rollup-plugin-json": "4.0.0",
113
- sinon: "14.0.0",
114
- testdouble: "3.16.6"
115
- };
116
- var pkg = {
117
- name: name,
118
- description: description,
119
- license: license,
120
- version: version,
121
- type: type,
122
- bin: bin,
123
- files: files,
124
- publishConfig: publishConfig,
125
- repository: repository,
126
- bugs: bugs,
127
- homepage: homepage,
128
- author: author,
129
- scripts: scripts,
130
- dependencies: dependencies,
131
- devDependencies: devDependencies
132
- };
133
-
134
23
  class YError extends Error {
135
24
  constructor(msg) {
136
25
  super(msg || 'yargs error');
@@ -455,11 +344,11 @@ class YargsParser {
455
344
  let next;
456
345
  let value;
457
346
  // any unknown option (except for end-of-options, "--")
458
- if (arg !== '--' && isUnknownOptionAsArg(arg)) {
347
+ if (arg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg)) {
459
348
  pushPositional(arg);
460
349
  // ---, ---=, ----, etc,
461
350
  }
462
- else if (truncatedArg.match(/---+(=|$)/)) {
351
+ else if (truncatedArg.match(/^---+(=|$)/)) {
463
352
  // options without key name are invalid.
464
353
  pushPositional(arg);
465
354
  continue;
@@ -1327,13 +1216,15 @@ function stripQuotes(val) {
1327
1216
  * Copyright (c) 2016, Contributors
1328
1217
  * SPDX-License-Identifier: ISC
1329
1218
  */
1219
+ var _a, _b, _c;
1330
1220
  // See https://github.com/yargs/yargs-parser#supported-nodejs-versions for our
1331
1221
  // version support policy. The YARGS_MIN_NODE_VERSION is used for testing only.
1332
1222
  const minNodeVersion = (process && process.env && process.env.YARGS_MIN_NODE_VERSION)
1333
1223
  ? Number(process.env.YARGS_MIN_NODE_VERSION)
1334
1224
  : 12;
1335
- if (process && process.version) {
1336
- const major = Number(process.version.match(/v([^.]+)/)[1]);
1225
+ const nodeVersion = (_b = (_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1);
1226
+ if (nodeVersion) {
1227
+ const major = Number(nodeVersion.match(/^([^.]+)/)[1]);
1337
1228
  if (major < minNodeVersion) {
1338
1229
  throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
1339
1230
  }
@@ -1973,6 +1864,121 @@ const mainFilename = __dirname.substring(0, __dirname.lastIndexOf('node_modules'
1973
1864
  })
1974
1865
  });
1975
1866
 
1867
+ var name = "@pragmatic-divops/cli";
1868
+ var description = "cli for various organization tools";
1869
+ var license = "MIT";
1870
+ var version = "1.9.0";
1871
+ var type = "module";
1872
+ var author = "Matt Travi <npm@travi.org> (https://matt.travi.org/)";
1873
+ var repository = "pragmatic-divops/cli";
1874
+ var bugs = "https://github.com/pragmatic-divops/cli/issues";
1875
+ var homepage = "https://github.com/pragmatic-divops/cli#readme";
1876
+ var bin = {
1877
+ "pragmatic-divops": "./bin/pragmatic-divops.js"
1878
+ };
1879
+ var scripts = {
1880
+ test: "npm-run-all --print-label --parallel lint:* --parallel test:*",
1881
+ "lint:lockfile": "lockfile-lint --path package-lock.json --type npm --validate-https --allowed-hosts npm",
1882
+ "lint:js": "eslint . --cache",
1883
+ "lint:md": "remark . --frail",
1884
+ "generate:md": "remark . --output",
1885
+ "lint:sensitive": "ban",
1886
+ clean: "rimraf ./bin",
1887
+ prebuild: "run-s clean",
1888
+ build: "npm-run-all --print-label --parallel build:*",
1889
+ "build:js": "rollup --config",
1890
+ watch: "run-s 'build:js -- --watch'",
1891
+ prepack: "run-s build",
1892
+ "test:unit": "cross-env NODE_ENV=test c8 run-s test:unit:base",
1893
+ "test:unit:base": "DEBUG=any vitest run",
1894
+ "lint:peer": "npm ls >/dev/null",
1895
+ "lint:gherkin": "gherkin-lint",
1896
+ "test:integration": "run-s 'test:integration:base -- --profile noWip'",
1897
+ "test:integration:base": "NODE_OPTIONS=\"--loader=testdouble --enable-source-maps $NODE_OPTIONS\" DEBUG=any cucumber-js test/integration",
1898
+ "test:integration:debug": "DEBUG=test run-s test:integration",
1899
+ "test:integration:wip": "run-s 'test:integration:base -- --profile wip'",
1900
+ "test:integration:wip:debug": "DEBUG=test run-s 'test:integration:wip'",
1901
+ "test:integration:focus": "run-s 'test:integration:base -- --profile focus'",
1902
+ "pretest:e2e": "run-s build",
1903
+ "test:e2e": "node ./test/e2e/smoke-test.mjs",
1904
+ prepare: "husky install"
1905
+ };
1906
+ var files = [
1907
+ "bin/"
1908
+ ];
1909
+ var publishConfig = {
1910
+ access: "public"
1911
+ };
1912
+ var dependencies = {
1913
+ "@form8ion/codecov": "4.0.1",
1914
+ "@form8ion/cucumber-scaffolder": "2.1.0",
1915
+ "@form8ion/eslint-config-extender": "6.1.0",
1916
+ "@form8ion/gatsby": "1.0.2",
1917
+ "@form8ion/github-actions-node-ci": "3.13.0",
1918
+ "@form8ion/javascript": "10.6.0",
1919
+ "@form8ion/javascript-core": "8.3.2",
1920
+ "@form8ion/lift": "6.2.0",
1921
+ "@form8ion/mocha-scaffolder": "3.0.1",
1922
+ "@form8ion/project": "15.2.0",
1923
+ "@form8ion/renovate-scaffolder": "1.8.0",
1924
+ "@travi/github-scaffolder": "8.0.4",
1925
+ "@travi/netlify-scaffolder": "1.6.0",
1926
+ "update-notifier": "5.1.0",
1927
+ yargs: "17.7.1"
1928
+ };
1929
+ var devDependencies = {
1930
+ "@babel/register": "7.21.0",
1931
+ "@cucumber/cucumber": "9.0.1",
1932
+ "@form8ion/core": "2.0.0",
1933
+ "@pragmatic-divops/commitlint-config": "1.0.31",
1934
+ "@pragmatic-divops/eslint-config": "1.0.66",
1935
+ "@pragmatic-divops/eslint-config-cucumber": "1.0.1",
1936
+ "@pragmatic-divops/remark-preset": "3.0.2",
1937
+ "@rollup/plugin-node-resolve": "15.0.1",
1938
+ "@travi/any": "2.1.8",
1939
+ "@travi/babel-preset": "3.0.96",
1940
+ "ban-sensitive-files": "1.9.18",
1941
+ c8: "7.13.0",
1942
+ chai: "4.3.7",
1943
+ "cross-env": "7.0.3",
1944
+ "cz-conventional-changelog": "3.3.0",
1945
+ execa: "7.1.1",
1946
+ "gherkin-lint": "4.2.2",
1947
+ "http-status-codes": "2.2.0",
1948
+ husky: "8.0.3",
1949
+ "jest-when": "3.5.2",
1950
+ "lockfile-lint": "4.10.1",
1951
+ "mock-fs": "5.2.0",
1952
+ nock: "13.3.0",
1953
+ "npm-run-all": "4.1.5",
1954
+ "remark-cli": "11.0.0",
1955
+ "remark-toc": "8.0.1",
1956
+ rimraf: "4.4.0",
1957
+ rollup: "3.19.1",
1958
+ "rollup-plugin-auto-external": "2.0.0",
1959
+ "rollup-plugin-executable": "1.6.3",
1960
+ "rollup-plugin-json": "4.0.0",
1961
+ testdouble: "3.17.0",
1962
+ vitest: "0.29.3"
1963
+ };
1964
+ var pkg = {
1965
+ name: name,
1966
+ description: description,
1967
+ license: license,
1968
+ version: version,
1969
+ type: type,
1970
+ author: author,
1971
+ repository: repository,
1972
+ bugs: bugs,
1973
+ homepage: homepage,
1974
+ bin: bin,
1975
+ scripts: scripts,
1976
+ files: files,
1977
+ publishConfig: publishConfig,
1978
+ dependencies: dependencies,
1979
+ devDependencies: devDependencies
1980
+ };
1981
+
1976
1982
  function javascriptScaffolderFactory(decisions) {
1977
1983
  const scope = '@pragmatic-divops';
1978
1984
 
@@ -2036,10 +2042,10 @@ const command$2 = 'scaffold';
2036
2042
  const describe$2 = 'Scaffold a new project';
2037
2043
 
2038
2044
  var scaffoldCommand = /*#__PURE__*/Object.freeze({
2039
- __proto__: null,
2040
- handler: handler$2,
2041
- command: command$2,
2042
- describe: describe$2
2045
+ __proto__: null,
2046
+ command: command$2,
2047
+ describe: describe$2,
2048
+ handler: handler$2
2043
2049
  });
2044
2050
 
2045
2051
  const packageScope = '@pragmatic-divops';
@@ -2085,15 +2091,13 @@ const command$1 = 'lift';
2085
2091
  const describe$1 = 'Lift an existing project with additional functionality';
2086
2092
 
2087
2093
  var liftCommand = /*#__PURE__*/Object.freeze({
2088
- __proto__: null,
2089
- handler: handler$1,
2090
- command: command$1,
2091
- describe: describe$1
2094
+ __proto__: null,
2095
+ command: command$1,
2096
+ describe: describe$1,
2097
+ handler: handler$1
2092
2098
  });
2093
2099
 
2094
2100
  function handler(providedDecisions) {
2095
- // return extendEslintConfig(defineScaffoldOptions(defineDecisions(providedDecisions)), javascriptScaffolderFactory);
2096
-
2097
2101
  return extendEslintConfig(defineScaffoldOptions(defineDecisions(providedDecisions)), javascriptScaffolderFactory);
2098
2102
  }
2099
2103
 
@@ -2101,14 +2105,14 @@ const command = 'extend-eslint-config';
2101
2105
  const describe = 'Extend a @form8ion shareable ESLint config';
2102
2106
 
2103
2107
  var extendEslintConfigCommand = /*#__PURE__*/Object.freeze({
2104
- __proto__: null,
2105
- handler: handler,
2106
- command: command,
2107
- describe: describe
2108
+ __proto__: null,
2109
+ command: command,
2110
+ describe: describe,
2111
+ handler: handler
2108
2112
  });
2109
2113
 
2110
2114
  function cli (yargs) {
2111
- return yargs(hideBin(process.argv))
2115
+ return yargs
2112
2116
  .scriptName('pragmatic-divops')
2113
2117
  .usage('Usage: $0 <cmd> [args]')
2114
2118
  .command(scaffoldCommand)
@@ -2120,7 +2124,7 @@ function cli (yargs) {
2120
2124
  .argv;
2121
2125
  }
2122
2126
 
2123
- cli(yargs);
2127
+ cli(yargs(hideBin(process.argv)));
2124
2128
 
2125
2129
  updateNotifier({pkg}).notify();
2126
- //# sourceMappingURL=pragmatic-divops.mjs.map
2130
+ //# sourceMappingURL=pragmatic-divops.js.map