@rness/cli 0.3.0 → 0.5.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/dist/index.js CHANGED
@@ -2,104 +2,128 @@ import {
2
2
  BEGIN,
3
3
  BLOCK_SIZE_WARNING,
4
4
  COLLECTIONS,
5
+ DEFAULT_HOST,
5
6
  END,
7
+ GITHUB_HOSTS,
8
+ GitHubOAuthProvider,
6
9
  NAME,
10
+ NAME_RULE,
11
+ ORG_NAME,
12
+ PACKAGE_MANAGERS,
13
+ SCAFFOLD_FILES,
14
+ SSH_HOST,
7
15
  STATUSES,
8
16
  VERSION,
17
+ addCommand,
18
+ addRepository,
9
19
  assembleContext,
10
20
  blockHash,
11
21
  bodyOf,
12
22
  checkBlocks,
13
23
  checkContract,
24
+ classifyProbe,
14
25
  collectMarkdown,
15
26
  contextCommand,
27
+ copyScaffold,
28
+ createCommand,
29
+ defaultTerminal,
30
+ defaultTransport,
31
+ detectGithubSsh,
32
+ detectPackageManager,
16
33
  ensureClaudeMd,
17
34
  exists,
18
35
  extractTitle,
19
36
  findBlock,
20
37
  findWorkspace,
38
+ githubProvider,
39
+ installDependencies,
40
+ isPackageManager,
21
41
  loadManifest,
42
+ loginCommand,
43
+ logoutCommand,
22
44
  mergeBlock,
45
+ packageManagerVersion,
23
46
  parseFrontMatter,
24
47
  parseHeader,
48
+ parseRepoSpec,
49
+ probeRemote,
25
50
  readOrNull,
26
51
  renderBlock,
27
52
  renderMarkdown,
53
+ repoUrl,
28
54
  resolveScope,
29
55
  run,
56
+ scaffoldDir,
30
57
  scopeChain,
31
58
  syncCommand,
59
+ upgradeCommand,
32
60
  validateCommand,
33
- writeFileAtomic
34
- } from "./chunk-4KNZT4G4.js";
35
-
36
- // src/core/scaffold.ts
37
- import { statSync } from "fs";
38
- import { fileURLToPath } from "url";
39
- import { dirname, join } from "path";
40
- var SCAFFOLD_FILES = [
41
- "AGENTS.md",
42
- "CONVENTIONS.md",
43
- "README.md",
44
- "WORKSPACE.md",
45
- "rness.json",
46
- "package.json",
47
- "_gitignore",
48
- ".githooks/pre-commit",
49
- ".github/workflows/validate.yml",
50
- "adr/0000-template.md",
51
- "standards/.gitkeep",
52
- "specs/.gitkeep",
53
- "plans/.gitkeep",
54
- "skills/.gitkeep",
55
- "docs/.gitkeep"
56
- ];
57
- function scaffoldDir() {
58
- let dir = dirname(fileURLToPath(import.meta.url));
59
- for (let i = 0; i < 4; i += 1) {
60
- const candidate = join(dir, "scaffold");
61
- try {
62
- if (statSync(join(candidate, "rness.json")).isFile()) return candidate;
63
- } catch {
64
- }
65
- dir = dirname(dir);
66
- }
67
- throw new Error("scaffold directory not found next to the @rness/cli package");
68
- }
61
+ workspaceDirs,
62
+ writeFileAtomic,
63
+ writeManifest
64
+ } from "./chunk-WSGPDTPQ.js";
69
65
  export {
70
66
  BEGIN,
71
67
  BLOCK_SIZE_WARNING,
72
68
  COLLECTIONS,
69
+ DEFAULT_HOST,
73
70
  END,
71
+ GITHUB_HOSTS,
72
+ GitHubOAuthProvider,
74
73
  NAME,
74
+ NAME_RULE,
75
+ ORG_NAME,
76
+ PACKAGE_MANAGERS,
75
77
  SCAFFOLD_FILES,
78
+ SSH_HOST,
76
79
  STATUSES,
77
80
  VERSION,
81
+ addCommand,
82
+ addRepository,
78
83
  assembleContext,
79
84
  blockHash,
80
85
  bodyOf,
81
86
  checkBlocks,
82
87
  checkContract,
88
+ classifyProbe,
83
89
  collectMarkdown,
84
90
  contextCommand,
91
+ copyScaffold,
92
+ createCommand,
93
+ defaultTerminal,
94
+ defaultTransport,
95
+ detectGithubSsh,
96
+ detectPackageManager,
85
97
  ensureClaudeMd,
86
98
  exists,
87
99
  extractTitle,
88
100
  findBlock,
89
101
  findWorkspace,
102
+ githubProvider,
103
+ installDependencies,
104
+ isPackageManager,
90
105
  loadManifest,
106
+ loginCommand,
107
+ logoutCommand,
91
108
  mergeBlock,
109
+ packageManagerVersion,
92
110
  parseFrontMatter,
93
111
  parseHeader,
112
+ parseRepoSpec,
113
+ probeRemote,
94
114
  readOrNull,
95
115
  renderBlock,
96
116
  renderMarkdown,
117
+ repoUrl,
97
118
  resolveScope,
98
119
  run,
99
120
  scaffoldDir,
100
121
  scopeChain,
101
122
  syncCommand,
123
+ upgradeCommand,
102
124
  validateCommand,
103
- writeFileAtomic
125
+ workspaceDirs,
126
+ writeFileAtomic,
127
+ writeManifest
104
128
  };
105
129
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/core/scaffold.ts"],"sourcesContent":["import { statSync } from 'node:fs'\nimport { fileURLToPath } from 'node:url'\nimport { dirname, join } from 'node:path'\n\n/**\n * Files shipped in `scaffold/`, POSIX-relative. `_gitignore` is renamed to\n * `.gitignore` when copied (npm would rename a packed `.gitignore`).\n */\nexport const SCAFFOLD_FILES: readonly string[] = [\n 'AGENTS.md',\n 'CONVENTIONS.md',\n 'README.md',\n 'WORKSPACE.md',\n 'rness.json',\n 'package.json',\n '_gitignore',\n '.githooks/pre-commit',\n '.github/workflows/validate.yml',\n 'adr/0000-template.md',\n 'standards/.gitkeep',\n 'specs/.gitkeep',\n 'plans/.gitkeep',\n 'skills/.gitkeep',\n 'docs/.gitkeep',\n]\n\n/**\n * Absolute path of the shipped scaffold. Works from the sources\n * (`src/core/scaffold.ts` → `../../scaffold`) and from the bundle\n * (`dist/<chunk>.js` or `dist/index.js` → `../scaffold`): walk up from this\n * file until a directory containing `scaffold/rness.json` is the package root.\n */\nexport function scaffoldDir(): string {\n let dir = dirname(fileURLToPath(import.meta.url))\n for (let i = 0; i < 4; i += 1) {\n const candidate = join(dir, 'scaffold')\n try {\n if (statSync(join(candidate, 'rness.json')).isFile()) return candidate\n } catch {\n // keep walking\n }\n dir = dirname(dir)\n }\n throw new Error('scaffold directory not found next to the @rness/cli package')\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,gBAAgB;AACzB,SAAS,qBAAqB;AAC9B,SAAS,SAAS,YAAY;AAMvB,IAAM,iBAAoC;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAQO,SAAS,cAAsB;AACpC,MAAI,MAAM,QAAQ,cAAc,YAAY,GAAG,CAAC;AAChD,WAAS,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG;AAC7B,UAAM,YAAY,KAAK,KAAK,UAAU;AACtC,QAAI;AACF,UAAI,SAAS,KAAK,WAAW,YAAY,CAAC,EAAE,OAAO,EAAG,QAAO;AAAA,IAC/D,QAAQ;AAAA,IAER;AACA,UAAM,QAAQ,GAAG;AAAA,EACnB;AACA,QAAM,IAAI,MAAM,6DAA6D;AAC/E;","names":[]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json CHANGED
@@ -1,32 +1,41 @@
1
1
  {
2
2
  "name": "@rness/cli",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Configuration-plane CLI for rness workspaces: resolve, validate and sync org-level context for AI coding agents",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
- "engines": { "node": ">=24" },
7
+ "engines": {
8
+ "node": ">=24"
9
+ },
8
10
  "repository": {
9
11
  "type": "git",
10
12
  "url": "git+https://github.com/rness-dev/rness.git",
11
13
  "directory": "packages/cli"
12
14
  },
13
15
  "homepage": "https://github.com/rness-dev/rness",
14
- "bin": { "rness": "dist/bin/rness.js" },
16
+ "bin": {
17
+ "rness": "dist/bin/rness.js"
18
+ },
15
19
  "exports": {
16
20
  ".": "./dist/index.js",
17
21
  "./package.json": "./package.json"
18
22
  },
19
- "files": ["dist", "scaffold", "README.md"],
23
+ "files": [
24
+ "dist",
25
+ "scaffold",
26
+ "README.md",
27
+ "LICENSE"
28
+ ],
20
29
  "scripts": {
21
- "test": "node --test 'test/**/*.test.ts'",
30
+ "test": "node --import ./test/setup.ts --test 'test/**/*.test.ts'",
22
31
  "typecheck": "tsc --noEmit",
23
32
  "build": "tsup",
24
33
  "prepublishOnly": "pnpm typecheck && pnpm test && pnpm build"
25
34
  },
26
35
  "dependencies": {
27
- "@clack/prompts": "1.8.0",
36
+ "@clack/prompts": "1.8.1",
28
37
  "commander": "15.0.0",
29
- "yaml": "2.9.0"
38
+ "yaml": "2.9.1"
30
39
  },
31
40
  "devDependencies": {
32
41
  "@types/node": "24.13.4",
@@ -18,4 +18,5 @@ jobs:
18
18
  - uses: actions/setup-node@v4
19
19
  with:
20
20
  node-version: 24
21
- - run: npx --yes @rness/cli@__RNESS_VERSION__ validate
21
+ # The version is written once, in package.json.
22
+ - run: npx --yes "@rness/cli@$(node -p "require('./package.json').devDependencies['@rness/cli']")" validate
@@ -13,7 +13,7 @@ specifications, plans, standards and skills, resolved per repository by the
13
13
 
14
14
  npm run validate # rness validate — check this tree against the contract
15
15
  npm run context # rness context — print the resolved context for a scope
16
- npm run sync # rness sync — clone repositories, regenerate blocks
16
+ npm run sync # rness sync — regenerate blocks (--all clones missing repositories)
17
17
 
18
18
  The CLI is pinned in `package.json`; any `rness` you run inside the workspace
19
19
  delegates to that copy.
@@ -6,13 +6,15 @@ A rness workspace mirrors one GitHub organisation:
6
6
  <org>/
7
7
  ├── AGENTS.md generated global block, not committed
8
8
  ├── .rness/ this repository — the organisation's context
9
- └── org/<repo>/ one clone per repository; a monorepo is a repository
10
- like any other, its parts are declared as scopes
9
+ └── org/<repo>/ the repositories you work on, cloned; a monorepo is a
10
+ repository like any other, its parts are declared as scopes
11
11
  ```
12
12
 
13
- The workspace root is never a git repository. `rness.json` declares `repos`
14
- (what `rness sync` clones under `org/`) and `scopes` (where context resolves:
15
- a repository, or a directory inside one, with an optional `extends`).
13
+ The workspace root is never a git repository. `rness.json` is the
14
+ organisation's catalogue: `repos` (every repository rness knows about — each
15
+ teammate clones the ones they need under `org/`, `rness sync --all` clones
16
+ them all) and `scopes` (where context resolves: a repository, or a directory
17
+ inside one, with an optional `extends`).
16
18
 
17
19
  A scope's context is the global files of each collection plus
18
20
  `<collection>/<scope>/**` plus everything it `extends`. `rness context
@@ -0,0 +1,4 @@
1
+ # pnpm 12 refuses versions published less than 24 h ago (minimumReleaseAge).
2
+ # The pinned CLI is our own package, released the day it is pinned.
3
+ minimumReleaseAgeExclude:
4
+ - '@rness/cli'