Skip to content

Commit f869953

Browse files
author
wanyijun
committed
feat: change npm registry
1 parent 983536d commit f869953

8 files changed

Lines changed: 4686 additions & 3944 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: npm Login
2+
3+
description: Log in to a scoped private registry (e.g. Verdaccio) and optionally verify.
4+
inputs:
5+
username:
6+
description: Registry account username (e.g., ci).
7+
required: true
8+
password:
9+
description: Registry account password (will be masked in logs).
10+
required: true
11+
email:
12+
description: Email associated with the registry account (required by npm login).
13+
required: true
14+
default: "ci@kubesphere.com"
15+
registry:
16+
description: Base registry URL, e.g. http://<IP>:<PORT>.
17+
required: true
18+
scope:
19+
description: Scoped npm org, e.g. @ks-console.
20+
required: true
21+
default: "@ks-console"
22+
verify:
23+
description: Run npm whoami/ping after login.
24+
required: false
25+
default: "true"
26+
27+
runs:
28+
using: composite
29+
steps:
30+
- name: Clear .npmrc
31+
shell: bash
32+
run: rm -f "$HOME/.npmrc"
33+
34+
- name: Mask Password
35+
shell: bash
36+
run: echo "::add-mask::${{ inputs.password }}"
37+
38+
- name: Login (non-interactive)
39+
shell: bash
40+
run: |
41+
npx --yes npm-cli-login \
42+
-u "${{ inputs.username }}" \
43+
-p "${{ inputs.password }}" \
44+
-e "${{ inputs.email }}" \
45+
-r "${{ inputs.registry }}" \
46+
-s "${{ inputs.scope }}"
47+
- name: Verify Authentication
48+
if: ${{ fromJSON(inputs.verify) }}
49+
shell: bash
50+
run: |
51+
npm ping --registry "${{ inputs.registry }}"
52+
npm whoami --registry "${{ inputs.registry }}"

.github/workflows/build-extension.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- main
77
tags:
8-
- '*'
8+
- "*"
99
path:
1010
- modules/web/**
1111

@@ -29,14 +29,21 @@ jobs:
2929
- name: Install Yarn
3030
run: npm install -g yarn
3131

32+
- name: Login (Internal)
33+
uses: ./.github/actions/npm-login
34+
with:
35+
username: ${{ secrets.EXTERNAL_NPM_USERNAME }}
36+
password: ${{ secrets.EXTERNAL_NPM_PASSWORD }}
37+
registry: ${{ secrets.EXTERNAL_NPM_REGISTRY }}
38+
3239
- name: Install Dependencies
33-
run: cd modules/web && yarn install
40+
run: cd modules/web && yarn install --frozen-lockfile --prefer-offline
3441

3542
- name: Build Extension
36-
run: cd modules/web && yarn build:ext $EXT_NAME
43+
run: cd modules/web && yarn build:ext $EXT_NAME
3744

3845
- name: Upload Extension Build
3946
uses: actions/upload-artifact@v4
4047
with:
4148
name: extension
42-
path: modules/web/extensions/karmada-dashboard/dist
49+
path: modules/web/extensions/karmada-dashboard/dist

.gitignore

Lines changed: 45 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,46 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
*.a
8+
9+
# Test binary, build with `go test -c`
10+
*.test
11+
12+
# Output of the go coverage tool, specifically when used with LiteIDE
13+
*.out
14+
15+
# Files generated by JetBrains IDEs, e.g. IntelliJ IDEA
16+
.idea/
17+
*.iml
18+
bin/
19+
20+
# Vscode files
21+
.vscode/
22+
__debug_bin
23+
24+
# OSX trash
125
.DS_Store
2-
node_modules
3-
/dist
4-
*.zip
5-
/public
6-
7-
# local env files
8-
.env.local
9-
.env.*.local
10-
11-
# Log files
12-
npm-debug.log*
13-
yarn-debug.log*
14-
yarn-error.log*
15-
pnpm-debug.log*
16-
17-
# Editor directories and files
18-
.idea
19-
.vscode
20-
*.suo
21-
*.ntvs*
22-
*.njsproj
23-
*.sln
24-
*.sw?
25-
_output
26-
# sub chart tgz
27-
charts/*/charts
28-
cmd/ops
29-
.turbo
30-
.dockerconfigjson
31-
32-
#local db files
33-
*.db
34-
*.db-journal
26+
api.json
27+
*.coverprofile
28+
cover.out
29+
coverage.txt
30+
31+
tmp/
32+
33+
# Node.js dependencies
34+
**/node_modules/
35+
36+
# Config
37+
configs/local_config.yaml
38+
39+
# history
40+
.history/
41+
tmp/
42+
43+
# claude
44+
**/CLAUDE.local.md
45+
.claude/settings.local.json
46+
.claude/commands/

modules/web/.gitignore

Lines changed: 37 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,43 @@
1-
# macOS
2-
.DS_Store
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
*.a
8+
9+
# Test binary, build with `go test -c`
10+
*.test
11+
12+
# Output of the go coverage tool, specifically when used with LiteIDE
13+
*.out
314

4-
# JetBrains
15+
# Files generated by JetBrains IDEs, e.g. IntelliJ IDEA
516
.idea/
17+
*.iml
18+
bin/
19+
20+
# Vscode files
21+
.vscode/
22+
__debug_bin
23+
24+
# OSX trash
25+
.DS_Store
26+
api.json
27+
*.coverprofile
28+
cover.out
29+
coverage.txt
630

7-
# Visual Studio Code
8-
.vscode/*
9-
## Local History for Visual Studio Code
10-
.history/
31+
tmp/
1132

1233
# Node.js
1334
**/node_modules/
14-
.yalc/
15-
yalc.lock
16-
17-
# Yarn
18-
.yarn/*
19-
!.yarn/releases
20-
!.yarn/patches
21-
!.yarn/plugins
22-
!.yarn/sdks
23-
!.yarn/versions
24-
25-
# Logs
26-
logs
27-
*.log
28-
npm-debug.log*
29-
yarn-debug.log*
30-
yarn-error.log*
31-
lerna-debug.log*
32-
.pnpm-debug.log*
33-
34-
# Config
35-
configs/local_config.yaml
36-
37-
# TypeScript
38-
*.tsbuildinfo
39-
40-
# Testing
41-
coverage/
42-
43-
# Production
44-
**/dist/
45-
**/cjs/
46-
**/esm/
47-
48-
# Cache
49-
*.rdb
50-
.cache-loader
35+
36+
37+
/configs/local_config.yaml
38+
39+
40+
# claude
41+
**/CLAUDE.local.md
42+
.claude/settings.local.json
43+
.claude/commands/

modules/web/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@ks-console:registry=http://139.198.121.174:4873

modules/web/.nvmrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
16
1+
22
2+

modules/web/package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@
2727
"not ie <= 8"
2828
],
2929
"dependencies": {
30-
"@ks-console/appstore": "^0.0.0-canary.20241217072707",
31-
"@ks-console/bootstrap": "^0.0.0-canary.20241217072707",
32-
"@ks-console/console": "^0.0.0-canary.20241217072707",
33-
"@ks-console/core": "^0.0.0-canary.20241217072707",
34-
"@ks-console/locales": "^0.0.0-canary.20241217072707",
35-
"@ks-console/server": "^0.0.0-canary.20241217072707",
36-
"@ks-console/shared": "^0.0.0-canary.20241217072707",
37-
"@kubed/charts": "^0.2.24",
38-
"@kubed/code-editor": "^0.2.24",
39-
"@kubed/components": "^0.2.24",
40-
"@kubed/diff-viewer": "^0.2.24",
41-
"@kubed/hooks": "^0.2.24",
42-
"@kubed/icons": "^0.2.24",
43-
"@kubed/log-viewer": "^0.2.24"
30+
"@ks-console/appstore": "4.2.0-community",
31+
"@ks-console/bootstrap": "4.2.0-community",
32+
"@ks-console/console": "4.2.0-community",
33+
"@ks-console/core": "4.2.0-community",
34+
"@ks-console/locales": "4.2.0-community",
35+
"@ks-console/server": "4.2.0-community",
36+
"@ks-console/shared": "4.2.0-community",
37+
"@kubed/charts": "^0.2.33",
38+
"@kubed/code-editor": "^0.2.33",
39+
"@kubed/components": "^0.2.33",
40+
"@kubed/diff-viewer": "^0.2.33",
41+
"@kubed/hooks": "^0.2.33",
42+
"@kubed/icons": "^0.2.33",
43+
"@kubed/log-viewer": "^0.2.33"
4444
},
4545
"devDependencies": {
4646
"@babel/cli": "^7.15.7",

0 commit comments

Comments
 (0)