@taruvi/navkit 0.0.30 → 0.0.31

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.
@@ -0,0 +1,65 @@
1
+ name: Publish to npm
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - beta
8
+
9
+ jobs:
10
+ publish:
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ contents: write
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ with:
17
+ token: ${{ secrets.GITHUB_TOKEN }}
18
+
19
+ - uses: actions/setup-node@v4
20
+ with:
21
+ node-version: '20'
22
+ registry-url: 'https://registry.npmjs.org'
23
+
24
+ - run: npm ci
25
+
26
+ - run: npm test
27
+
28
+ - run: npm run build
29
+
30
+ - name: Create and push git tag
31
+ if: github.ref == 'refs/heads/main'
32
+ run: |
33
+ VERSION=$(node -p "require('./package.json').version")
34
+ git config user.name "github-actions"
35
+ git config user.email "github-actions@github.com"
36
+ if git ls-remote --tags origin | grep -q "refs/tags/v$VERSION"; then
37
+ echo "Tag v$VERSION already exists, skipping."
38
+ else
39
+ git tag "v$VERSION"
40
+ git push origin "v$VERSION"
41
+ fi
42
+
43
+ - name: Publish (latest)
44
+ if: github.ref == 'refs/heads/main'
45
+ run: |
46
+ VERSION=$(node -p "require('./package.json').version")
47
+ if npm view "@taruvi/navkit@$VERSION" version 2>/dev/null | grep -q "$VERSION"; then
48
+ echo "Version $VERSION already published, skipping."
49
+ else
50
+ npm publish --access public
51
+ fi
52
+ env:
53
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
54
+
55
+ - name: Publish (beta)
56
+ if: github.ref == 'refs/heads/beta'
57
+ run: |
58
+ VERSION=$(node -p "require('./package.json').version")
59
+ if npm view "@taruvi/navkit@$VERSION" version 2>/dev/null | grep -q "$VERSION"; then
60
+ echo "Version $VERSION already published, skipping."
61
+ else
62
+ npm publish --access public --tag beta
63
+ fi
64
+ env:
65
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@taruvi/navkit",
3
- "version": "0.0.30",
3
+ "version": "0.0.31",
4
4
  "main": "src/App.tsx",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
8
8
  "build": "tsc -b && vite build",
9
+ "test": "vitest run",
9
10
  "lint": "eslint .",
10
11
  "preview": "vite preview"
11
12
  },
@@ -43,7 +44,8 @@
43
44
  "react-dom": "^19.2.3",
44
45
  "typescript": "~5.9.3",
45
46
  "typescript-eslint": "^8.45.0",
46
- "vite": "^7.1.7"
47
+ "vite": "^7.1.7",
48
+ "vitest": "^4.0.18"
47
49
  },
48
50
  "dependencies": {
49
51
  "@taruvi/sdk": "^1.3.4-beta.0"
package/src/App.tsx CHANGED
@@ -18,6 +18,7 @@ const NavkitContent = () => {
18
18
  const [showShortcutsMenu, setShowShortcutsMenu] = useState<boolean>(false)
19
19
  const [showChat, setShowChat] = useState<boolean>(false)
20
20
  const [isAppLauncherHovered, setIsAppLauncherHovered] = useState<boolean>(false);
21
+ console.log("testing cicd")
21
22
 
22
23
  return (
23
24
  <>
@@ -36,7 +37,7 @@ const NavkitContent = () => {
36
37
  <Box component={"a"} href="/" sx={styles.leftSection}>
37
38
  {appSettings?.icon ? <Box component="img" src={appSettings?.icon} sx={styles.logo} /> : <></>}
38
39
  {appSettings?.displayName &&
39
- <Typography sx={styles.appName}>
40
+ <Typography sx={styles.appName} onClick={() => (window.location.href = "/")}>
40
41
  {appSettings.displayName.length > 40 ? `${appSettings.displayName.substring(0, 40)}...` : appSettings.displayName}
41
42
  </Typography>
42
43
  }
@@ -0,0 +1,5 @@
1
+ import { test, expect } from 'vitest'
2
+
3
+ test('dummy', () => {
4
+ expect(true).toBe(true)
5
+ })
@@ -1,12 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(npm run dev:*)",
5
- "WebSearch",
6
- "Bash(npm run build:*)",
7
- "Bash(npm install:*)"
8
- ],
9
- "deny": [],
10
- "ask": []
11
- }
12
- }