@distributionos/cli 0.1.6 → 0.1.7

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": "@distributionos/cli",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "DistributionOS repo setup CLI for agent onboarding and first-party analytics.",
5
5
  "homepage": "https://distributionos.dev",
6
6
  "repository": {
@@ -129,16 +129,31 @@ async function readProjectDocs(cwd) {
129
129
  return {};
130
130
  }
131
131
 
132
- function extractOverviewExcerpt(text) {
133
- const normalized = text.replace(/\r\n/g, '\n');
134
- const overviewIndex = normalized.search(/(^|\n)#{1,3}\s+(Project Overview|Overview|Solution|What it does)\s*\n/i);
135
- const source = overviewIndex >= 0 ? normalized.slice(overviewIndex) : normalized;
136
- return source
137
- .split(/\n{2,}/)
138
- .map(block => block.replace(/^#{1,6}\s+[^\n]+\n?/, '').trim())
139
- .find(block => block.length >= 80 && !/secret|api key|environment variables/i.test(block))
140
- ?.slice(0, 700) ?? null;
141
- }
132
+ function extractOverviewExcerpt(text) {
133
+ const normalized = text.replace(/\r\n/g, '\n');
134
+ if (isScaffoldReadme(normalized)) {
135
+ return null;
136
+ }
137
+ const overviewIndex = normalized.search(/(^|\n)#{1,3}\s+(Project Overview|Overview|Solution|What it does)\s*\n/i);
138
+ const source = overviewIndex >= 0 ? normalized.slice(overviewIndex) : normalized;
139
+ return source
140
+ .split(/\n{2,}/)
141
+ .map(block => block.replace(/^#{1,6}\s+[^\n]+\n?/, '').trim())
142
+ .find(block => block.length >= 80 && !/secret|api key|environment variables/i.test(block) && !isScaffoldReadme(block))
143
+ ?.slice(0, 700) ?? null;
144
+ }
145
+
146
+ function isScaffoldReadme(value) {
147
+ const text = value.toLowerCase();
148
+ return [
149
+ 'this is a [next.js]',
150
+ 'bootstrapped with [`create-next-app`]',
151
+ 'next.js documentation',
152
+ 'learn next.js',
153
+ 'deploy on vercel',
154
+ 'you can start editing the page by modifying',
155
+ ].filter(needle => text.includes(needle)).length >= 2;
156
+ }
142
157
 
143
158
  function routeReference(route, files) {
144
159
  if (route === '/blog' && files.includes('src/app/blog/page.tsx')) return 'src/app/blog/page.tsx';