mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-22 04:27:59 +00:00
refactor(networks): restrict selectable networks to Pezkuwi ecosystem
This commit is contained in:
+13
-13
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Pezkuwi Common Rebrand Script
|
||||
# Converts @polkadot/* packages to @pezkuwi/*
|
||||
# Converts @pezkuwi/* packages to @pezkuwi/*
|
||||
|
||||
set -e
|
||||
|
||||
@@ -9,24 +9,24 @@ echo "🔄 Starting Pezkuwi Common rebrand..."
|
||||
|
||||
# 1. Update all package.json files
|
||||
echo "📦 Updating package.json files..."
|
||||
find . -type f -name "package.json" -not -path "*/node_modules/*" -exec sed -i 's/@polkadot/@pezkuwi/g' {} +
|
||||
find . -type f -name "package.json" -not -path "*/node_modules/*" -exec sed -i 's/@pezkuwi/@pezkuwi/g' {} +
|
||||
find . -type f -name "package.json" -not -path "*/node_modules/*" -exec sed -i 's/polkadot-js\/common/pezkuwichain\/pezkuwi-common/g' {} +
|
||||
find . -type f -name "package.json" -not -path "*/node_modules/*" -exec sed -i 's/polkadot-js/pezkuwi/g' {} +
|
||||
|
||||
# 2. Update TypeScript imports
|
||||
echo "📝 Updating TypeScript imports..."
|
||||
find . -type f \( -name "*.ts" -o -name "*.tsx" \) -not -path "*/node_modules/*" -not -path "*/build/*" -exec sed -i 's/from "@polkadot/from "@pezkuwi/g' {} +
|
||||
find . -type f \( -name "*.ts" -o -name "*.tsx" \) -not -path "*/node_modules/*" -not -path "*/build/*" -exec sed -i "s/from '@polkadot/from '@pezkuwi/g" {} +
|
||||
find . -type f \( -name "*.ts" -o -name "*.tsx" \) -not -path "*/node_modules/*" -not -path "*/build/*" -exec sed -i 's/import("@polkadot/import("@pezkuwi/g' {} +
|
||||
find . -type f \( -name "*.ts" -o -name "*.tsx" \) -not -path "*/node_modules/*" -not -path "*/build/*" -exec sed -i 's/from "@pezkuwi/from "@pezkuwi/g' {} +
|
||||
find . -type f \( -name "*.ts" -o -name "*.tsx" \) -not -path "*/node_modules/*" -not -path "*/build/*" -exec sed -i "s/from '@pezkuwi/from '@pezkuwi/g" {} +
|
||||
find . -type f \( -name "*.ts" -o -name "*.tsx" \) -not -path "*/node_modules/*" -not -path "*/build/*" -exec sed -i 's/import("@pezkuwi/import("@pezkuwi/g' {} +
|
||||
|
||||
# 3. Update JavaScript files
|
||||
echo "📜 Updating JavaScript files..."
|
||||
find . -type f \( -name "*.js" -o -name "*.cjs" -o -name "*.mjs" \) -not -path "*/node_modules/*" -not -path "*/build/*" -exec sed -i 's/from "@polkadot/from "@pezkuwi/g' {} +
|
||||
find . -type f \( -name "*.js" -o -name "*.cjs" -o -name "*.mjs" \) -not -path "*/node_modules/*" -not -path "*/build/*" -exec sed -i "s/from '@polkadot/from '@pezkuwi/g" {} +
|
||||
find . -type f \( -name "*.js" -o -name "*.cjs" -o -name "*.mjs" \) -not -path "*/node_modules/*" -not -path "*/build/*" -exec sed -i 's/from "@pezkuwi/from "@pezkuwi/g' {} +
|
||||
find . -type f \( -name "*.js" -o -name "*.cjs" -o -name "*.mjs" \) -not -path "*/node_modules/*" -not -path "*/build/*" -exec sed -i "s/from '@pezkuwi/from '@pezkuwi/g" {} +
|
||||
|
||||
# 4. Update README and docs
|
||||
echo "📚 Updating documentation..."
|
||||
find . -type f -name "*.md" -not -path "*/node_modules/*" -exec sed -i 's/@polkadot/@pezkuwi/g' {} +
|
||||
find . -type f -name "*.md" -not -path "*/node_modules/*" -exec sed -i 's/@pezkuwi/@pezkuwi/g' {} +
|
||||
find . -type f -name "*.md" -not -path "*/node_modules/*" -exec sed -i 's/polkadot-js\/common/pezkuwichain\/pezkuwi-common/g' {} +
|
||||
find . -type f -name "*.md" -not -path "*/node_modules/*" -exec sed -i 's/polkadot\.js/pezkuwi.js/g' {} +
|
||||
find . -type f -name "*.md" -not -path "*/node_modules/*" -exec sed -i 's/Polkadot\.js/Pezkuwi.js/g' {} +
|
||||
@@ -34,9 +34,9 @@ find . -type f -name "*.md" -not -path "*/node_modules/*" -exec sed -i 's/Polkad
|
||||
|
||||
# 5. Update config files
|
||||
echo "⚙️ Updating config files..."
|
||||
sed -i 's/@polkadot/@pezkuwi/g' tsconfig*.json 2>/dev/null || true
|
||||
sed -i 's/@polkadot/@pezkuwi/g' eslint.config.js 2>/dev/null || true
|
||||
sed -i 's/@polkadot/@pezkuwi/g' rollup.config.js 2>/dev/null || true
|
||||
sed -i 's/@pezkuwi/@pezkuwi/g' tsconfig*.json 2>/dev/null || true
|
||||
sed -i 's/@pezkuwi/@pezkuwi/g' eslint.config.js 2>/dev/null || true
|
||||
sed -i 's/@pezkuwi/@pezkuwi/g' rollup.config.js 2>/dev/null || true
|
||||
|
||||
# 6. Update GitHub workflows
|
||||
echo "🔧 Updating GitHub workflows..."
|
||||
@@ -44,13 +44,13 @@ find .github -type f -name "*.yml" -exec sed -i 's/polkadot-js\/common/pezkuwich
|
||||
|
||||
# 7. Update author info
|
||||
echo "👤 Updating author info..."
|
||||
sed -i 's/"author": "Jaco Greeff.*"/"author": "Pezkuwi Team <team@pezkuwichain.io>"/g' package.json
|
||||
sed -i 's/"author": "Jaco Greeff.*"/"author": "Pezkuwi Team <team@pezkuwichain.app>"/g' package.json
|
||||
sed -i 's/"homepage":.*/"homepage": "https:\/\/github.com\/pezkuwichain\/pezkuwi-common#readme",/g' package.json
|
||||
|
||||
echo "✅ Rebrand complete!"
|
||||
echo ""
|
||||
echo "📊 Summary:"
|
||||
echo " - Package namespace: @polkadot → @pezkuwi"
|
||||
echo " - Package namespace: @pezkuwi → @pezkuwi"
|
||||
echo " - Repository: polkadot-js/common → pezkuwichain/pezkuwi-common"
|
||||
echo " - Packages: 14 (util, util-crypto, keyring, networks, + 10 helpers)"
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user