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: 8 additions & 0 deletions .changeset/social-pianos-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@bluecadet/launchpad-content": minor
"@bluecadet/launchpad-monitor": minor
"@bluecadet/launchpad-utils": minor
"@bluecadet/launchpad-cli": minor
---

Support absolute or relative paths in launchpad config.
8 changes: 8 additions & 0 deletions .changeset/solid-webs-slide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@bluecadet/launchpad-content": minor
"@bluecadet/launchpad-monitor": minor
"@bluecadet/launchpad-utils": minor
"@bluecadet/launchpad-cli": minor
---

Resolve all paths relative to the launchpad config directory when run from the CLI
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Declare files that will always have LF line endings on checkout.
*.sh text eol=lf
* text=auto
* text eol=lf
106 changes: 56 additions & 50 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,57 @@
name: Main

on:
pull_request:
push:
branches:
- main
- develop
paths:
- "packages/**"
- "docs/**"
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)

env:
FORCE_COLOR: 3

jobs:

ci:
name: CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: 'package.json'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: lint
run: npm run lint

- name: lint dependency versions
# ignore internal launchpad dependency mismatches. These versions
# are handled by changesets.
run: npx sherif -i @bluecadet/launchpad*

- name: Validate types
run: npm run build

- name: Run tests
name: Main

on:
pull_request:
push:
branches:
- main
- develop
paths:
- "packages/**"
- "docs/**"
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)

env:
FORCE_COLOR: 3

jobs:

ci:
name: CI
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node: [18, 24]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: lint
run: npm run lint

- name: lint dependency versions
# ignore internal launchpad dependency mismatches. These versions
# are handled by changesets.
run: npx sherif -i @bluecadet/launchpad*

- name: Validate types
run: npm run build

- name: Run tests
run: npm run test
90 changes: 45 additions & 45 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
# Contributing to Launchpad
## Generating Changelogs
If you are contributing a user-facing or noteworthy change to Launchpad that should be added to the changelog, you should include a changeset with your PR.
To add a changeset, run this script locally:
```
npm run changeset
```
Follow the prompts to select which package(s) are affected by your change, and whether the change is a major, minor or patch change. This will create a file in the `.changesets` directory of the repo. This change should be committed and included with your PR.
Considerations:
- A changeset is required to trigger the versioning/publishing workflow.
- Non-packages, like examples and tests, do not need changesets.
- You can use markdown in your changeset to include code examples, headings, and more. However, please use plain text for the first line of your changeset. The formatting of the GitHub release notes does not support headings as the first line of the changeset.
## Releases
The [Changesets GitHub action](https://github.com/changesets/action#with-publishing) will create and update a PR that applies changesets and publishes new versions of changed packages to npm.
To release a new version of Launchpad, find the `Version Packages` PR, read it over, and merge it.
The `main` branch is kept up to date with the latest releases.
## Testing Launchpad
If you want to test Launchpad as a local dependency and frequently make changes, then the best way to do that is to clone launchpad and link `npm @bluecadet/launchpad` in your local project.
For example:
```bat
git clone git@github.com:bluecadet/launchpad.git
cd launchpad
npm i
cd packages/launchpad
npm link
cd ../../my-test-project
@REM If needed: npm init
npm link @bluecadet/launchpad --save
```
# Contributing to Launchpad

## Generating Changelogs

If you are contributing a user-facing or noteworthy change to Launchpad that should be added to the changelog, you should include a changeset with your PR.

To add a changeset, run this script locally:

```
npm run changeset
```

Follow the prompts to select which package(s) are affected by your change, and whether the change is a major, minor or patch change. This will create a file in the `.changesets` directory of the repo. This change should be committed and included with your PR.

Considerations:

- A changeset is required to trigger the versioning/publishing workflow.
- Non-packages, like examples and tests, do not need changesets.
- You can use markdown in your changeset to include code examples, headings, and more. However, please use plain text for the first line of your changeset. The formatting of the GitHub release notes does not support headings as the first line of the changeset.

## Releases

The [Changesets GitHub action](https://github.com/changesets/action#with-publishing) will create and update a PR that applies changesets and publishes new versions of changed packages to npm.

To release a new version of Launchpad, find the `Version Packages` PR, read it over, and merge it.

The `main` branch is kept up to date with the latest releases.

## Testing Launchpad

If you want to test Launchpad as a local dependency and frequently make changes, then the best way to do that is to clone launchpad and link `npm @bluecadet/launchpad` in your local project.

For example:

```bat
git clone git@github.com:bluecadet/launchpad.git
cd launchpad
npm i
cd packages/launchpad
npm link

cd ../../my-test-project
@REM If needed: npm init
npm link @bluecadet/launchpad --save
```
28 changes: 19 additions & 9 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false,
"ignore": [],
"include": ["**/src/**/*.ts", "docs/**/*.ts", "docs/**/*.mts", "docs/**/*.vue"]
"includes": ["**/src/**/*.ts", "**/docs/**/*.ts", "**/docs/**/*.mts", "**/docs/**/*.vue"]
},
"formatter": {
"enabled": true,
"indentStyle": "tab",
"lineWidth": 100
},
"organizeImports": {
"enabled": true
"lineWidth": 100,
"lineEnding": "lf"
},
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"linter": {
"enabled": true,
"rules": {
"recommended": true
"recommended": true,
"style": {
"noParameterAssign": "error",
"useAsConstAssertion": "error",
"useDefaultParameterLast": "error",
"useEnumInitializers": "error",
"useSelfClosingElements": "error",
"useSingleVarDeclarator": "error",
"noUnusedTemplateLiteral": "error",
"useNumberNamespace": "error",
"noInferrableTypes": "error",
"noUselessElse": "error"
}
}
},
"javascript": {
Expand All @@ -31,7 +41,7 @@
},
"overrides": [
{
"include": ["**/*.test.ts"],
"includes": ["**/*.test.ts"],
"linter": {
"rules": {
"style": {
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default defineConfig({
},

// add canonical link to head
transformPageData(pageData, ctx) {
transformPageData(pageData, _ctx) {
const canonicalUrl = `https://bluecadet.github.io/launchpad/${pageData.relativePath}`
.replace(/index\.md$/, "")
.replace(/\.md$/, ".html");
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export default {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
});
},
enhanceApp({ app, router, siteData }) {},
enhanceApp() {},
} satisfies Theme;
4 changes: 1 addition & 3 deletions docs/src/components/PackageCard.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<script setup lang="ts">
import { data as packageVersions } from "./package-versions.data.js";

const props = defineProps<{
const _props = defineProps<{
package: "string";
href: "string";
description: "string";
Expand Down
6 changes: 1 addition & 5 deletions docs/src/components/PackageHeader.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<script setup lang="ts">
import { GitCommitVertical, Github, Hexagon, Logs } from "lucide-vue-next";

import { data as packageVersions } from "./package-versions.data.js";

const props = defineProps<{
const _props = defineProps<{
package: "string";
}>();
</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/package-versions.data.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import launchpadPackage from "@bluecadet/launchpad/package.json" with { type: "json" };
import cliPackage from "@bluecadet/launchpad-cli/package.json" with { type: "json" };
import contentPackage from "@bluecadet/launchpad-content/package.json" with { type: "json" };
import monitorPackage from "@bluecadet/launchpad-monitor/package.json" with { type: "json" };
import scaffoldPackage from "@bluecadet/launchpad-scaffold/package.json" with { type: "json" };
import launchpadPackage from "@bluecadet/launchpad/package.json" with { type: "json" };
import { defineLoader } from "vitepress";

export interface Data {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/guides/running-applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ npx launchpad monitor start

- `name`: Unique identifier for your application
- `script`: Path to your executable or script
- `cwd`: Working directory for your application
- `cwd`: Working directory for your application. Relative paths are resolved against the current working directory of the launchpad configuration.

### Advanced Settings

Expand Down
1 change: 1 addition & 0 deletions docs/src/recipes/custom-content-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const myPlugin = {
logger, // Plugin-specific logging
paths, // Helper functions for paths
abortSignal // Check if process is stopping
cwd, // The launchpad configuration directory
} = ctx;

// Example: Log number of documents
Expand Down
2 changes: 1 addition & 1 deletion docs/src/recipes/static-web-monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default defineConfig({
pm2: {
name: "webapp-browser",
// Path to Chromium (adjust for your environment)
cwd: path.join(homedir(), "AppData/Local/Chromium/Application"),
cwd: path.resolve(homedir(), "AppData/Local/Chromium/Application"),
script: "chrome.exe",
args: "--kiosk --incognito --disable-pinch --overscroll-history-navgation=0 --enable-auto-reload --autoplay-policy=no-user-gesture-required http://localhost:8080"
},
Expand Down
6 changes: 6 additions & 0 deletions docs/src/reference/content/content-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,26 @@ See [Content Plugin Reference](./plugins/index.md) for available plugins and usa

Base directory path where downloaded files are stored. Can be absolute or relative path.

Relative paths are resolved against the directory of the launchpad configuration.

### `tempPath`

- **Type:** `string`
- **Default:** `.tmp/%TIMESTAMP%/`

Temporary directory path used during content processing. The `%TIMESTAMP%` token is replaced with current timestamp.

Relative paths are resolved against the directory of the launchpad configuration.

### `backupPath`

- **Type:** `string`
- **Default:** `.backup/%TIMESTAMP%/`

Directory path where existing content is backed up before processing new downloads. Critical for recovery if downloads fail.

Relative paths are resolved against the directory of the launchpad configuration.

### `keep`

- **Type:** `string[]`
Expand Down
5 changes: 5 additions & 0 deletions docs/src/reference/content/plugins/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ type CombinedContentHookContext = {
contentOptions: ResolvedContentConfig;
logger: Logger;
abortSignal: AbortSignal;
cwd: string;
paths: {
getDownloadPath: (source?: string) => string;
getTempPath: (source?: string) => string;
Expand Down Expand Up @@ -97,3 +98,7 @@ A plugin-specific logger.
### `abortSignal`

Signals the launchpad process is aborting. Triggered on exception or manual quit.

### `cwd`

The current working directory of the launchpad configuration. This is useful for resolving paths relative to the configuration files.
Loading