diff --git a/scripts/config-local.js b/scripts/config-local.js index debc7d0c73110a13efb133120b360bf9910f2011..4aff29a21a3dcef2f1a02d590b6a5682ae8fff55 100644 --- a/scripts/config-local.js +++ b/scripts/config-local.js @@ -3,11 +3,8 @@ * Add local build overrides to compose.override.yml * Automatically discovers services with Dockerfiles in the workspace * Preserves any existing user customizations - * Also adds Verdaccio for local npm package development */ -const fs = require('fs'); -const path = require('path'); const { OVERRIDE_FILE, readYamlFile, @@ -16,38 +13,6 @@ const { discoverLocalBuilds } = require('./compose-utils'); -/** - * Get Verdaccio service configuration for local development - */ -function getVerdaccioConfig() { - const configPath = path.join(__dirname, '..', 'verdaccio', 'config.yaml'); - if (!fs.existsSync(configPath)) { - return null; - } - - return { - services: { - verdaccio: { - image: 'verdaccio/verdaccio:5', - volumes: [ - './verdaccio/config.yaml:/verdaccio/conf/config.yaml:ro', - 'verdaccio-storage:/verdaccio/storage' - ], - ports: ['4873:4873'], - healthcheck: { - test: ['CMD', 'wget', '-q', '--spider', 'http://localhost:4873/-/ping'], - interval: '10s', - timeout: '5s', - retries: 3 - } - } - }, - volumes: { - 'verdaccio-storage': {} - } - }; -} - function main() { console.log('Discovering local build configurations...\n'); @@ -61,14 +26,7 @@ function main() { deepMerge(config, overrides); } - // Add Verdaccio if config exists - const verdaccioConfig = getVerdaccioConfig(); - if (verdaccioConfig) { - deepMerge(config, verdaccioConfig); - console.log('Verdaccio local npm registry added.\n'); - } - - if (discovered.length === 0 && !verdaccioConfig) { + if (discovered.length === 0) { console.log('No local Dockerfiles found for any services.'); if (notFound.length > 0) { console.log('\nServices without local Dockerfiles:'); @@ -94,12 +52,6 @@ function main() { } } - if (verdaccioConfig) { - console.log('\nVerdaccio local npm registry:'); - console.log(' - Web UI: http://localhost:4873'); - console.log(' - First time: npm adduser --registry http://localhost:4873'); - } - if (notFound.length > 0) { console.log('\nServices without local Dockerfiles (skipped):'); for (const service of notFound) { diff --git a/scripts/config-upstream.js b/scripts/config-upstream.js index b79d86cd3861b1efe54020be0b85344c3c293fe9..9db3a83c05b66ebd3b7734080c5e630e70828401 100644 --- a/scripts/config-upstream.js +++ b/scripts/config-upstream.js @@ -3,7 +3,6 @@ * Remove local build overrides from compose.override.yml * Automatically discovers which services to clean up * Preserves any user customizations that are not part of local overrides - * Also removes Verdaccio local npm registry */ const fs = require('fs'); @@ -42,34 +41,6 @@ function removeLocalOverrides(config, managedServices) { return config; } -/** - * Remove Verdaccio service from config - */ -function removeVerdaccio(config) { - let removed = false; - - if (config.services && config.services.verdaccio) { - delete config.services.verdaccio; - removed = true; - - // If services object is now empty, remove it - if (Object.keys(config.services).length === 0) { - delete config.services; - } - } - - if (config.volumes && config.volumes['verdaccio-storage']) { - delete config.volumes['verdaccio-storage']; - - // If volumes object is now empty, remove it - if (Object.keys(config.volumes).length === 0) { - delete config.volumes; - } - } - - return removed; -} - function main() { console.log('Removing local build overrides...\n'); @@ -88,10 +59,7 @@ function main() { // Remove local overrides config = removeLocalOverrides(config, managedServices); - // Remove Verdaccio - const verdaccioRemoved = removeVerdaccio(config); - - if (managedServices.length === 0 && !verdaccioRemoved) { + if (managedServices.length === 0) { console.log('No manageable services discovered.'); return; } @@ -115,10 +83,6 @@ function main() { } } - if (verdaccioRemoved) { - console.log('\nVerdaccio local npm registry removed.'); - } - console.log('\nRun "docker compose pull" to fetch upstream images.'); } diff --git a/verdaccio/config.yaml b/verdaccio/config.yaml deleted file mode 100644 index ed563d4c2c1ffa9b477b8cdc539bcf1f95357f98..0000000000000000000000000000000000000000 --- a/verdaccio/config.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# Verdaccio configuration for local npm package development -storage: /verdaccio/storage/data -plugins: /verdaccio/plugins - -web: - title: PeerVerity Local Registry - -# Disable authentication requirement for local dev -auth: - htpasswd: - file: /verdaccio/storage/htpasswd - max_users: -1 - -uplinks: - npmjs: - url: https://registry.npmjs.org/ - -packages: - # PeerVerity packages - allow anonymous publish for local dev - '@peerverity/*': - access: $anonymous - publish: $anonymous - unpublish: $anonymous - proxy: npmjs - - # All other packages - proxy to npmjs - '**': - access: $all - publish: $authenticated - proxy: npmjs - -log: { type: stdout, format: pretty, level: info }