File tree Expand file tree Collapse file tree 7 files changed +43
-30
lines changed
Expand file tree Collapse file tree 7 files changed +43
-30
lines changed Original file line number Diff line number Diff line change 1212 {
1313 "label" : " generate-readme" ,
1414 "type" : " shell" ,
15- "command" : " node ${workspaceFolder}/eng/update-readme.js " ,
15+ "command" : " npm run build " ,
1616 "problemMatcher" : [],
1717 "group" : {
1818 "kind" : " build" ,
1919 "isDefault" : true
2020 },
21- "detail" : " Generates the README.md file using update-readme.js script." ,
21+ "detail" : " Generates the README.md file using npm build run- script." ,
2222 "dependsOn" : " npm install"
2323 },
2424 {
2525 "label" : " validate-collections" ,
2626 "type" : " shell" ,
27- "command" : " node ${workspaceFolder}/eng/ validate-collections.js " ,
27+ "command" : " npm run collection: validate" ,
2828 "problemMatcher" : [],
2929 "group" : " build" ,
3030 "detail" : " Validates all collection manifest files." ,
3333 {
3434 "label" : " create-collection" ,
3535 "type" : " shell" ,
36- "command" : " node " ,
36+ "command" : " npm run collection:create " ,
3737 "args" : [
38- " ${workspaceFolder}/eng/create-collection.js" ,
3938 " --id" ,
4039 " ${input:collectionId}" ,
4140 " --tags" ,
Original file line number Diff line number Diff line change 1- const path = require ( "path" ) ;
1+ import path from "path" ;
2+ import { fileURLToPath } from "url" ;
3+ import { dirname } from "path" ;
4+
5+ const __filename = fileURLToPath ( import . meta. url ) ;
6+ const __dirname = dirname ( __filename ) ;
27
38// Template sections for the README
49const TEMPLATES = {
@@ -115,7 +120,7 @@ const MAX_COLLECTION_ITEMS = 50;
115120
116121const DOCS_DIR = path . join ( ROOT_FOLDER , "docs" ) ;
117122
118- module . exports = {
123+ export {
119124 TEMPLATES ,
120125 vscodeInstallImage ,
121126 vscodeInsidersInstallImage ,
@@ -130,3 +135,4 @@ module.exports = {
130135 MAX_COLLECTION_ITEMS ,
131136 DOCS_DIR ,
132137} ;
138+
Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22
3- const fs = require ( "fs" ) ;
4- const path = require ( "path" ) ;
5- const readline = require ( "readline" ) ;
6- const { COLLECTIONS_DIR } = require ( "./constants" ) ;
3+ import fs from "fs" ;
4+ import path from "path" ;
5+ import readline from "readline" ;
6+ import { COLLECTIONS_DIR } from "./constants.mjs" ;
77
88const rl = readline . createInterface ( {
99 input : process . stdin ,
@@ -166,7 +166,7 @@ display:
166166 console . log ( "\n📝 Next steps:" ) ;
167167 console . log ( "1. Edit the collection manifest to add your items" ) ;
168168 console . log ( "2. Update the name, description, and tags as needed" ) ;
169- console . log ( "3. Run 'npm run validate:collections ' to validate" ) ;
169+ console . log ( "3. Run 'npm run collection:validate ' to validate" ) ;
170170 console . log ( "4. Run 'npm start' to generate documentation" ) ;
171171 console . log ( "\n📄 Collection template contents:" ) ;
172172 console . log ( template ) ;
Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22
3- const fs = require ( "fs" ) ;
4- const path = require ( "path" ) ;
5- const {
3+ import fs from "fs" ;
4+ import path from "path" ;
5+ import { fileURLToPath } from "url" ;
6+ import { dirname } from "path" ;
7+ import {
68 parseCollectionYaml ,
79 extractMcpServers ,
810 extractMcpServerConfigs ,
911 parseFrontmatter ,
10- } = require ( "./yaml-parser" ) ;
11- const {
12+ } from "./yaml-parser.mjs" ;
13+ import {
1214 TEMPLATES ,
1315 AKA_INSTALL_URLS ,
1416 repoBaseUrl ,
@@ -21,7 +23,10 @@ const {
2123 COLLECTIONS_DIR ,
2224 INSTRUCTIONS_DIR ,
2325 DOCS_DIR ,
24- } = require ( "./constants" ) ;
26+ } from "./constants.mjs" ;
27+
28+ const __filename = fileURLToPath ( import . meta. url ) ;
29+ const __dirname = dirname ( __filename ) ;
2530
2631// Cache of MCP registry server names (lower-cased) loaded from github-mcp-registry.json
2732let MCP_REGISTRY_SET = null ;
@@ -968,3 +973,4 @@ try {
968973 console . error ( `Error generating category README files: ${ error . message } ` ) ;
969974 process . exit ( 1 ) ;
970975}
976+
Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22
3- const fs = require ( "fs" ) ;
4- const path = require ( "path" ) ;
5- const { parseCollectionYaml, parseFrontmatter } = require ( "./yaml-parser" ) ;
6- const {
3+ import fs from "fs" ;
4+ import path from "path" ;
5+ import { parseCollectionYaml , parseFrontmatter } from "./yaml-parser.mjs" ;
6+ import {
77 ROOT_FOLDER ,
88 COLLECTIONS_DIR ,
99 MAX_COLLECTION_ITEMS ,
10- } = require ( "./constants" ) ;
10+ } from "./constants.mjs" ;
1111
1212// Validation functions
1313function validateCollectionId ( id ) {
@@ -370,3 +370,4 @@ try {
370370 console . error ( `Error during validation: ${ error . message } ` ) ;
371371 process . exit ( 1 ) ;
372372}
373+
Original file line number Diff line number Diff line change 11// YAML parser for collection files and frontmatter parsing using vfile-matter
2- const fs = require ( "fs" ) ;
3- const yaml = require ( "js-yaml" ) ;
4- const { VFile } = require ( "vfile" ) ;
5- const { matter } = require ( "vfile-matter" ) ;
2+ import fs from "fs" ;
3+ import yaml from "js-yaml" ;
4+ import { VFile } from "vfile" ;
5+ import { matter } from "vfile-matter" ;
66
77function safeFileOperation ( operation , filePath , defaultValue = null ) {
88 try {
@@ -137,7 +137,7 @@ function extractMcpServerConfigs(filePath) {
137137 } ) ;
138138}
139139
140- module . exports = {
140+ export {
141141 parseCollectionYaml ,
142142 parseFrontmatter ,
143143 extractAgentMetadata ,
Original file line number Diff line number Diff line change 66 "private" : true ,
77 "scripts" : {
88 "start" : " npm run build" ,
9- "build" : " node ./eng/update-readme.js " ,
9+ "build" : " node ./eng/update-readme.mjs " ,
1010 "contributors:add" : " all-contributors add" ,
1111 "contributors:generate" : " all-contributors generate" ,
1212 "contributors:check" : " all-contributors check" ,
13- "validate:collections" : " node ./eng/validate-collections.js"
13+ "collection:validate" : " node ./eng/validate-collections.mjs" ,
14+ "collection:create" : " node ./eng/create-collection.mjs"
1415 },
1516 "repository" : {
1617 "type" : " git" ,
You can’t perform that action at this time.
0 commit comments