Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ on:
default: false

permissions:
contents: write
issues: write
pull-requests: write
packages: write
id-token: write
contents: read

concurrency:
group: release-${{ github.ref }}
Expand Down Expand Up @@ -190,6 +186,8 @@ jobs:
name: Upload Release Assets
needs: [release-please, build-binaries]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Generate GitHub App Token
id: app-token
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/security-deep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ concurrency:

permissions:
contents: read
security-events: write

jobs:
gitleaks-history:
Expand Down
8 changes: 3 additions & 5 deletions apps/rook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ ARG TARGETARCH
RUN echo "Target architecture: ${TARGETARCH}"
COPY rook-${TARGETARCH} /usr/local/bin/rook

# Create config directory with proper permissions
# Create config directory with proper permissions and ensure binary is executable
RUN mkdir -p /app/config \
&& chown -R rook:rook /app

# Ensure binary is executable
RUN chmod +x /usr/local/bin/rook
&& chown -R rook:rook /app \
&& chmod +x /usr/local/bin/rook

USER rook

Expand Down
11 changes: 5 additions & 6 deletions apps/rook/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,15 @@ fn main() {
} else {
let profile = std::env::var("PROFILE").unwrap_or_default();
if profile == "release" {
eprintln!(
"error: dashboard/node_modules/.bin/vite not found in release mode"
);
eprintln!("hint: run `pnpm install` in the repo root before building release"
);
eprintln!("error: dashboard/node_modules/.bin/vite not found in release mode");
eprintln!("hint: run `pnpm install` in the repo root before building release");
std::process::exit(1);
}
println!(
"cargo:warning=dashboard/node_modules/.bin/vite not found, skipping dashboard build"
);
println!("cargo:warning=hint: run `pnpm install` in the repo root to enable dashboard embedding");
println!(
"cargo:warning=hint: run `pnpm install` in the repo root to enable dashboard embedding"
);
}
}
6 changes: 0 additions & 6 deletions apps/rook/dashboard/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import process from 'node:process'
import { defineConfig, devices } from '@playwright/test'

/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// require('dotenv').config();

/**
* See https://playwright.dev/docs/test-configuration.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ const props = defineProps<{
</script>

<template>
<span
<li
data-slot="breadcrumb-ellipsis"
role="presentation"
aria-hidden="true"
:class="cn('flex size-9 items-center justify-center', props.class)"
>
<slot>
<MoreHorizontal class="size-4" />
</slot>
<span class="sr-only">More</span>
</span>
</li>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const props = defineProps<{

<template>
<li
role="listitem"
data-slot="breadcrumb-item"
:class="cn('inline-flex items-center gap-1.5', props.class)"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ const props = defineProps<{
</script>

<template>
<span
<li
data-slot="breadcrumb-page"
role="link"
aria-disabled="true"
aria-current="page"
:class="cn('text-foreground font-normal', props.class)"
>
<slot />
</span>
</li>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const props = defineProps<{

<template>
<li
role="separator"
data-slot="breadcrumb-separator"
role="presentation"
aria-hidden="true"
:class="cn('[&>svg]:size-3.5', props.class)"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const props = defineProps<{

<template>
<li
role="listitem"
data-slot="sidebar-menu-item"
data-sidebar="menu-item"
:class="cn('group/menu-item relative', props.class)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const props = defineProps<{

<template>
<li
role="listitem"
data-slot="sidebar-menu-sub-item"
data-sidebar="menu-sub-item"
:class="cn('group/menu-sub-item relative', props.class)"
Expand Down
2 changes: 1 addition & 1 deletion apps/rook/dashboard/src/stores/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const useThemeStore = defineStore('theme', () => {
const stored = localStorage.getItem('theme') as Theme | null
if (stored) {
setTheme(stored)
} else if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
} else if (globalThis.matchMedia('(prefers-color-scheme: dark)').matches) {
setTheme('dark')
}
}
Expand Down
17 changes: 12 additions & 5 deletions apps/rook/npm/rook/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,22 @@
* Rook launcher - finds the platform-specific binary and executes it
*/

const { execSync } = require('child_process');
const path = require('path');
const os = require('os');
const { execSync } = require('node:child_process');
const path = require('node:path');
const os = require('node:os');

const PKG = '@dallay/rook';

function getPlatform() {
const arch = os.arch() === 'arm64' ? 'arm64' : 'x64';
const platform = os.platform() === 'win32' ? 'windows' : os.platform() === 'darwin' ? 'darwin' : 'linux';
let platform;
if (os.platform() === 'win32') {
platform = 'windows';
} else if (os.platform() === 'darwin') {
platform = 'darwin';
} else {
platform = 'linux';
}
return `${platform}-${arch}`;
}

Expand All @@ -28,7 +35,7 @@ function findBinary() {
try {
const globalPath = execSync(`npm root -g`, { encoding: 'utf8' }).trim();
const globalBinary = path.join(globalPath, platformPkg, 'bin', binaryName);
require('fs').accessSync(globalBinary);
require('node:fs').accessSync(globalBinary);
return globalBinary;
} catch {
// Last resort: look in PATH
Expand Down