@bbsnly/sdlc 0.4.0 → 0.6.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/README.md CHANGED
@@ -18,6 +18,11 @@ Then, in Claude Code:
18
18
  /plugin install sdlc@sdlc
19
19
  ```
20
20
 
21
+ In the Code tab of Claude Desktop, `/plugin` does not add it: open the plugin
22
+ browser, add the marketplace `bbsnly/sdlc` and install `sdlc` from there, as
23
+ [Claude Desktop](https://github.com/bbsnly/sdlc/blob/main/docs/claude-desktop.md#install-the-plugin-from-the-plugin-browser)
24
+ says.
25
+
21
26
  ## What this package is, and is not
22
27
 
23
28
  It is an installer. What ends up on your PATH is the native `sdlc` binary, not
@@ -32,7 +37,7 @@ something else — and `--ignore-scripts` changes nothing here.
32
37
  ## Options
33
38
 
34
39
  ```sh
35
- npx @bbsnly/sdlc install --version 0.1.0 # a version other than this package's
40
+ npx @bbsnly/sdlc install --version 0.4.0 # an earlier release than this package's
36
41
  npx @bbsnly/sdlc install --dir /usr/local/bin
37
42
  ```
38
43
 
@@ -41,7 +46,7 @@ npx @bbsnly/sdlc install --dir /usr/local/bin
41
46
  ## Other ways to install
42
47
 
43
48
  ```sh
44
- curl -fsSL https://raw.githubusercontent.com/bbsnly/sdlc/main/install.sh | sh
49
+ curl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/bbsnly/sdlc/main/install.sh | sh
45
50
  go install github.com/bbsnly/sdlc/cmd/sdlc@latest
46
51
  ```
47
52
 
@@ -4,13 +4,13 @@
4
4
  const { install, Failure } = require('../lib/install.js')
5
5
  const pkg = require('../package.json')
6
6
 
7
- const USAGE = `Install sdlc, the story-driven delivery loop for Claude Code.
7
+ const USAGE = String.raw`Install sdlc, the story-driven delivery loop for Claude Code.
8
8
 
9
9
  npx @bbsnly/sdlc install [--version X.Y.Z] [--dir PATH]
10
10
 
11
11
  --version X.Y.Z install that version instead of this package's own
12
12
  --dir PATH install somewhere other than the default
13
- (~/.local/bin, or %LOCALAPPDATA%\\Programs\\sdlc\\bin)
13
+ (~/.local/bin, or %LOCALAPPDATA%\Programs\sdlc\bin)
14
14
  -h, --help this
15
15
 
16
16
  The same settings can come from the environment: SDLC_VERSION and
@@ -19,6 +19,13 @@ SDLC_INSTALL_DIR.
19
19
  This package installs a native binary and then gets out of the way: what ends
20
20
  up on your PATH is sdlc itself, not a Node wrapper around it.`
21
21
 
22
+ // splitFlag reads `--flag=value` as well as `--flag`; inline is null when there
23
+ // is no `=`, so that an empty `--flag=` is still a value.
24
+ function splitFlag(arg) {
25
+ const eq = arg.indexOf('=')
26
+ return eq === -1 ? [arg, null] : [arg.slice(0, eq), arg.slice(eq + 1)]
27
+ }
28
+
22
29
  function parse(argv) {
23
30
  const options = {}
24
31
  for (let i = 0; i < argv.length; i++) {
@@ -26,7 +33,7 @@ function parse(argv) {
26
33
  if (arg === 'install') continue // `npx @bbsnly/sdlc install` reads better than the bare form
27
34
  if (arg === '-h' || arg === '--help') return { help: true }
28
35
  if (arg === '-v' || arg === '--print-version') return { printVersion: true }
29
- const [flag, inline] = arg.includes('=') ? [arg.slice(0, arg.indexOf('=')), arg.slice(arg.indexOf('=') + 1)] : [arg, null]
36
+ const [flag, inline] = splitFlag(arg)
30
37
  const value = inline !== null ? inline : argv[++i]
31
38
  if (flag === '--version') options.version = value
32
39
  else if (flag === '--dir') options.dir = value
@@ -66,7 +73,7 @@ main().catch((err) => {
66
73
  console.error(`sdlc: ${err.message}`)
67
74
  for (const line of err.advice) console.error(` ${line}`)
68
75
  } else {
69
- console.error(`sdlc: ${err && err.message ? err.message : err}`)
76
+ console.error(`sdlc: ${err?.message ? err.message : err}`)
70
77
  }
71
78
  process.exitCode = 1
72
79
  })
package/checksums.txt CHANGED
@@ -1,14 +1,12 @@
1
1
  6a99b4dfdd71f28d00652a02c9d1b9d4fed62b2abbdc9a2fe92ce1a78f07b23f install.ps1
2
- 247e19b0eec40312fe71d6a74cccd23e5d788868550100ac5a2add8bbbb0b5fb install.sh
3
- 1deaec2316e722e34fe770a8ad34f12ed4ba0178193465bcd120a64625346238 sdlc_0.4.0_darwin_amd64.tar.gz
4
- 7d6e9aa6cd6c1cd600232d766c807d3365dd9fc215835057aa1f5aee76e66eed sdlc_0.4.0_darwin_amd64.tar.gz.sbom.json
5
- 27e02dce55ca33f1a191a5d29c63cb19bf39feab42b88d9dd33b52328eeacbbb sdlc_0.4.0_darwin_arm64.tar.gz
6
- 206f2c94179ced03fbc305df21ccd336a9c8a2d12e4d8501de043d9cd6ca4d1a sdlc_0.4.0_darwin_arm64.tar.gz.sbom.json
7
- 07bc78229dc401d424b19812c5c49260c38261c81511213d5267e0e6317a391a sdlc_0.4.0_linux_amd64.tar.gz
8
- fe91fd1cb2adbb33435b1134622b3d404804ef1c27c38bd634e5e12aeb26476b sdlc_0.4.0_linux_amd64.tar.gz.sbom.json
9
- bcae2007cc2f6f43603d66cbe1a605e1614a3b7ce34718cb2efdf2bc1264f114 sdlc_0.4.0_linux_arm64.tar.gz
10
- 14863dd30ad555fe899797432a06de673012df6c64d8f2a19d73ffffb0883c5a sdlc_0.4.0_linux_arm64.tar.gz.sbom.json
11
- bf30848141d54456509345d57daef8303c38ba3059a34e2ddab80c5e2e7aba45 sdlc_0.4.0_windows_amd64.zip
12
- 36d779eb1bf595827e3340a5151f1f45891a00cc03696b4369550c21a146d93a sdlc_0.4.0_windows_amd64.zip.sbom.json
13
- e2395593c91fe97dc0befa717fbfed91b12ab1e573c7e59ce58482960795980b sdlc_0.4.0_windows_arm64.zip
14
- 2c5d9b70c242205adf46a9adfb73589c3e193d919001727a0ac392461ef4225a sdlc_0.4.0_windows_arm64.zip.sbom.json
2
+ 99a1f36960b6c98d34a6089ff01ffeb1dcf0f564b758e720234cea7b78214c63 install.sh
3
+ 07c0cee65c9a159f23d4d637314bff4cc86df00d455c2d9e7cf0ef67e1b72b0d sdlc_0.6.1_darwin_arm64.tar.gz
4
+ 3d010a1fe5127ad84f2c6513a71c9a7f4c51ef3f18efed5f7bec131351b2aef6 sdlc_0.6.1_darwin_arm64.tar.gz.sbom.json
5
+ 8897dba07118efdecbc33ef1424bca10bcc74f9c97c6f86f39dad033f497810f sdlc_0.6.1_linux_amd64.tar.gz
6
+ 66850631f2434f025477eef6c151492bd375359ce7c838e97939c7c1b98e937a sdlc_0.6.1_linux_amd64.tar.gz.sbom.json
7
+ 16e6fdaad432e94efd65c389589f0bdc9ca588f6dcfba54bc7b86274d5c750af sdlc_0.6.1_linux_arm64.tar.gz
8
+ e204f27321de44b331461a40d1b17e9b9fb3b4e339f399cdb79b3d2cf2dc4aad sdlc_0.6.1_linux_arm64.tar.gz.sbom.json
9
+ 9d8af06a2730d7e362915674e69a93c986c27c61c10c959138b10d697b301ec9 sdlc_0.6.1_windows_amd64.zip
10
+ 721994f9af5cbfbf9e4da2ecebcceb34db98b8615ea170717b66ebd1ba634d72 sdlc_0.6.1_windows_amd64.zip.sbom.json
11
+ 89eb091ee82ff6399013f8714068b1c4546dc0b515d8c95df482eae458ab4e4c sdlc_0.6.1_windows_arm64.zip
12
+ 516ab976048301fdaec1fadf403d68512190aa376264e1053de6f15c48a37e51 sdlc_0.6.1_windows_arm64.zip.sbom.json
package/lib/install.js CHANGED
@@ -42,7 +42,7 @@ class Failure extends Error {
42
42
  function assetFor(platform, arch, version) {
43
43
  const goos = { darwin: 'darwin', linux: 'linux', win32: 'windows' }[platform]
44
44
  const goarch = { x64: 'amd64', arm64: 'arm64' }[arch]
45
- if (!goos || !goarch) {
45
+ if (!goos || !goarch || (goos === 'darwin' && goarch === 'amd64')) {
46
46
  throw new Failure(`there is no prebuilt sdlc for ${platform}/${arch}.`, [
47
47
  'Build from source instead:',
48
48
  ` go install github.com/${REPO}/cmd/sdlc@latest`,
@@ -71,8 +71,11 @@ function defaultDir(platform = process.platform, env = process.env) {
71
71
  function parseChecksums(text) {
72
72
  const out = new Map()
73
73
  for (const line of text.split('\n')) {
74
- const match = line.trim().match(/^([0-9a-f]{64})\s+\*?(.+)$/i)
75
- if (match) out.set(match[2].trim(), match[1].toLowerCase())
74
+ // The name starts at a non-space so that the space before it has one way
75
+ // to match; with `\*?(.+)` there, a long run of spaces backtracked
76
+ // quadratically. The marker comes off afterwards for the same reason.
77
+ const match = /^([0-9a-f]{64})\s+(\S.*)$/i.exec(line.trim())
78
+ if (match) out.set(match[2].replace(/^\*(?=.)/, '').trim(), match[1].toLowerCase())
76
79
  }
77
80
  return out
78
81
  }
@@ -89,8 +92,8 @@ function onPath(dir, env = process.env) {
89
92
  // not read HTTPS_PROXY by default: behind a proxy npm itself goes through, the
90
93
  // download went direct and failed with nothing more to say than that.
91
94
  function unreachable(url, what, err) {
92
- const cause = err && err.cause
93
- const reason = (cause && (cause.code || cause.message)) || (err && err.message) || String(err)
95
+ const cause = err?.cause
96
+ const reason = cause?.code || cause?.message || err?.message || String(err)
94
97
  return new Failure(what, [
95
98
  `why ${url} could not be reached (${reason})`,
96
99
  'fix check that this machine can reach github.com. Behind a proxy, use install.sh',
@@ -176,7 +179,7 @@ async function latestVersion() {
176
179
  throw unreachable(url, 'could not work out the latest version of sdlc.', err)
177
180
  }
178
181
  const location = response.headers.get('location') || ''
179
- const match = location.match(/\/tag\/v([0-9][^/]*)$/)
182
+ const match = /\/tag\/v(\d[^/]*)$/.exec(location)
180
183
  if (!match) {
181
184
  throw new Failure('could not work out the latest version of sdlc.', [
182
185
  `why ${url} did not redirect to a tag;`,
@@ -215,7 +218,7 @@ async function checksumsFor(version, archive, tmp, log) {
215
218
  // apostrophe in it -- O'Brien -- would otherwise end the string early and turn
216
219
  // a verified download into a parse error.
217
220
  function psQuote(value) {
218
- return value.replace(/'/g, "''")
221
+ return value.replaceAll("'", "''")
219
222
  }
220
223
 
221
224
  function unpack(archive, into, binary) {
@@ -265,7 +268,9 @@ async function install(options = {}) {
265
268
 
266
269
  const unpacked = unpack(downloaded, tmp, binary)
267
270
  fs.mkdirSync(dir, { recursive: true })
268
- fs.chmodSync(unpacked, 0o755)
271
+ // The unpacked copy lives in a private temporary directory; only the
272
+ // installed file needs to be executable by others.
273
+ fs.chmodSync(unpacked, 0o700)
269
274
  // Through a temporary name in the target's own directory and then rename:
270
275
  // a half written binary on PATH is worse than no binary on PATH, and
271
276
  // rename is the only step that is atomic.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbsnly/sdlc",
3
- "version": "0.4.0",
3
+ "version": "0.6.1",
4
4
  "description": "Install sdlc: a story-driven delivery loop for Claude Code, with gates a model cannot talk its way past.",
5
5
  "license": "MIT",
6
6
  "author": "Anatoliy Babushka <anatoliybabushka@gmail.com>",