🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@tabularis/create-plugin

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tabularis/create-plugin - npm Package Compare versions

Comparing version
0.1.0
to
0.1.1
+1
-1
package.json
{
"name": "@tabularis/create-plugin",
"version": "0.1.0",
"version": "0.1.1",
"description": "Scaffold a new Tabularis database driver plugin in seconds.",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

@@ -31,3 +31,3 @@ name: Release

- platform-label: darwin-x64
runner: macos-13
runner: macos-latest
target: x86_64-apple-darwin

@@ -55,2 +55,26 @@ archive: zip

- name: Check for UI extension
id: ui
shell: bash
run: |
if [ -f ui/package.json ]; then
echo "present=true" >> "$GITHUB_OUTPUT"
else
echo "present=false" >> "$GITHUB_OUTPUT"
fi
- name: Setup Node
if: steps.ui.outputs.present == 'true'
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Build UI
if: steps.ui.outputs.present == 'true'
shell: bash
working-directory: ui
run: |
npm install --no-audit --no-fund
npm run build
- name: Install cross (linux-arm64 only)

@@ -71,3 +95,3 @@ if: matrix.cross

run: |
STAGE=staging/${ID}
STAGE=staging
mkdir -p "$STAGE"

@@ -80,3 +104,3 @@ cp target/${{ matrix.target }}/release/${BIN_NAME}${{ matrix.binary-suffix }} "$STAGE/"

fi
(cd staging && zip -r ../${BIN_NAME}-${{ matrix.platform-label }}.zip ${ID})
(cd "$STAGE" && zip -r ../${BIN_NAME}-${{ matrix.platform-label }}.zip .)

@@ -87,3 +111,3 @@ - name: Package (windows)

run: |
$stage = "staging\${ID}"
$stage = "staging"
New-Item -ItemType Directory -Force -Path $stage | Out-Null

@@ -96,3 +120,3 @@ Copy-Item "target\${{ matrix.target }}\release\${BIN_NAME}${{ matrix.binary-suffix }}" $stage

}
Compress-Archive -Path $stage -DestinationPath "${BIN_NAME}-${{ matrix.platform-label }}.zip"
Compress-Archive -Path "$stage\*" -DestinationPath "${BIN_NAME}-${{ matrix.platform-label }}.zip"

@@ -99,0 +123,0 @@ - name: Upload release asset

set shell := ["bash", "-cu"]
set windows-shell := ["powershell.exe", "-NoLogo", "-NoProfile", "-Command"]
# Build the plugin binary in debug mode.
build:
# ---------------------------------------------------------------------------
# Cross-platform recipes (only shell-agnostic tooling — cargo, npm).
# ---------------------------------------------------------------------------
# Build the plugin binary in debug mode (plus UI if present).
build: build-ui
cargo build
# Build for release (what the GitHub Actions workflow ships).
release:
release: build-ui
cargo build --release

@@ -19,5 +24,39 @@

# Build + copy the binary and manifest into Tabularis's plugin folder (Linux).
# On macOS: ~/Library/Application Support/com.debba.tabularis/plugins/${ID}/
# On Windows: %APPDATA%\com.debba.tabularis\plugins\${ID}\
# Run clippy on the workspace.
lint:
cargo clippy --all-targets -- -D warnings
# Format the codebase.
fmt:
cargo fmt --all
# ---------------------------------------------------------------------------
# Platform-specific recipes (file operations + plugin-dir conventions).
# ---------------------------------------------------------------------------
# Build the UI extension if present (no-op otherwise).
[unix]
build-ui:
@if [ -f ui/package.json ]; then \
echo "Building UI extension..."; \
(cd ui && npm install --no-audit --no-fund && npm run build); \
fi
[windows]
build-ui:
if (Test-Path ui/package.json) {
Write-Host "Building UI extension..."
Push-Location ui
try {
npm install --no-audit --no-fund
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
npm run build
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
} finally {
Pop-Location
}
}
# Build + copy binary, manifest and (if present) UI bundle into Tabularis's plugin folder.
[linux]
dev-install: build

@@ -27,15 +66,46 @@ mkdir -p ~/.local/share/tabularis/plugins/${ID}

cp manifest.json ~/.local/share/tabularis/plugins/${ID}/
@if [ -f ui/dist/index.js ]; then \
mkdir -p ~/.local/share/tabularis/plugins/${ID}/ui/dist; \
cp ui/dist/index.js ~/.local/share/tabularis/plugins/${ID}/ui/dist/; \
fi
@echo "Installed to ~/.local/share/tabularis/plugins/${ID}"
@echo "Restart Tabularis (or toggle the plugin in Settings) to pick up changes."
[macos]
dev-install: build
mkdir -p "$HOME/Library/Application Support/com.debba.tabularis/plugins/${ID}"
cp target/debug/${BIN_NAME} "$HOME/Library/Application Support/com.debba.tabularis/plugins/${ID}/"
cp manifest.json "$HOME/Library/Application Support/com.debba.tabularis/plugins/${ID}/"
@if [ -f ui/dist/index.js ]; then \
mkdir -p "$HOME/Library/Application Support/com.debba.tabularis/plugins/${ID}/ui/dist"; \
cp ui/dist/index.js "$HOME/Library/Application Support/com.debba.tabularis/plugins/${ID}/ui/dist/"; \
fi
@echo "Installed to ~/Library/Application Support/com.debba.tabularis/plugins/${ID}"
@echo "Restart Tabularis (or toggle the plugin in Settings) to pick up changes."
[windows]
dev-install: build
$dest = Join-Path $env:APPDATA "com.debba.tabularis\plugins\${ID}"
New-Item -ItemType Directory -Force -Path $dest | Out-Null
Copy-Item "target\debug\${BIN_NAME}.exe" $dest
Copy-Item "manifest.json" $dest
if (Test-Path "ui\dist\index.js") {
New-Item -ItemType Directory -Force -Path (Join-Path $dest "ui\dist") | Out-Null
Copy-Item "ui\dist\index.js" (Join-Path $dest "ui\dist")
}
Write-Host "Installed to $dest"
Write-Host "Restart Tabularis (or toggle the plugin in Settings) to pick up changes."
# Remove the installed plugin.
[linux]
uninstall:
rm -rf ~/.local/share/tabularis/plugins/${ID}
# Run clippy on the workspace.
lint:
cargo clippy --all-targets -- -D warnings
[macos]
uninstall:
rm -rf "$HOME/Library/Application Support/com.debba.tabularis/plugins/${ID}"
# Format the codebase.
fmt:
cargo fmt --all
[windows]
uninstall:
$dest = Join-Path $env:APPDATA "com.debba.tabularis\plugins\${ID}"
if (Test-Path $dest) { Remove-Item -Recurse -Force $dest }