feat: migrate cli to monorepo - #166
Open
GeekyEggo wants to merge 7 commits into
Open
Conversation
🦋 Changeset detectedLatest commit: d667b9f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates @elgato/cli into the Stream Deck monorepo, including its commands, validation API, scaffolding templates, and pnpm-based build configuration.
Changes:
- Adds the CLI commands, public validation API, and supporting utilities.
- Adds plugin validation rules and creation templates.
- Integrates CLI packaging, builds, documentation, and release changesets.
Reviewed changes
Copilot reviewed 70 out of 81 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
packages/cli/tsup.config.ts |
Configures API bundling. |
packages/cli/tsconfig.json |
Configures TypeScript. |
packages/cli/template/tsconfig.json.ejs |
Adds generated-project TypeScript settings. |
packages/cli/template/src/plugin.ts |
Adds template plugin entry point. |
packages/cli/template/src/actions/increment-counter.ts.ejs |
Adds sample counter action. |
packages/cli/template/rollup.config.mjs.ejs |
Configures generated plugin builds. |
packages/cli/template/package.json.ejs |
Defines generated project dependencies. |
packages/cli/template/com.elgato.template.sdPlugin/ui/increment-counter.html |
Adds sample property inspector. |
packages/cli/template/com.elgato.template.sdPlugin/manifest.json.ejs |
Adds plugin manifest template. |
packages/cli/template/.vscode/settings.json |
Configures JSON schemas. |
packages/cli/template/.vscode/launch.json |
Configures plugin debugging. |
packages/cli/template/_.gitignore |
Defines generated ignore rules. |
packages/cli/src/validation/validator.ts |
Implements validation execution. |
packages/cli/src/validation/rule.ts |
Defines validation rules. |
packages/cli/src/validation/result.ts |
Aggregates validation results. |
packages/cli/src/validation/plugin/schemas.ts |
Loads plugin schemas. |
packages/cli/src/validation/plugin/rules/path-input.ts |
Validates plugin paths. |
packages/cli/src/validation/plugin/rules/manifest-uuids.ts |
Validates manifest identifiers. |
packages/cli/src/validation/plugin/rules/manifest-urls-exist.ts |
Validates manifest URLs. |
packages/cli/src/validation/plugin/rules/manifest-schema.ts |
Validates manifest schema. |
packages/cli/src/validation/plugin/rules/manifest-files-exist.ts |
Validates referenced files. |
packages/cli/src/validation/plugin/rules/manifest-category.ts |
Validates plugin category. |
packages/cli/src/validation/plugin/rules/layout-schema.ts |
Validates layout schemas. |
packages/cli/src/validation/plugin/rules/layout-item-keys.ts |
Validates layout keys. |
packages/cli/src/validation/plugin/rules/layout-item-bounds.ts |
Validates layout geometry. |
packages/cli/src/validation/plugin/plugin.ts |
Builds plugin validation context. |
packages/cli/src/validation/plugin/options.ts |
Defines validation options. |
packages/cli/src/validation/plugin/index.ts |
Composes plugin validation rules. |
packages/cli/src/validation/index.ts |
Exports validation APIs. |
packages/cli/src/validation/file-result.ts |
Formats per-file results. |
packages/cli/src/validation/entry.ts |
Defines validation entries. |
packages/cli/src/types/rage-edit.d.ts |
Adds registry typings. |
packages/cli/src/system/path.ts |
Adds path utilities. |
packages/cli/src/system/fs.ts |
Adds filesystem utilities. |
packages/cli/src/stream-deck.ts |
Adds Stream Deck integration helpers. |
packages/cli/src/package-manager.ts |
Exposes CLI version information. |
packages/cli/src/json/store.ts |
Caches JSON schemas. |
packages/cli/src/json/schema.ts |
Implements schema validation. |
packages/cli/src/json/map.ts |
Maps JSON AST values and locations. |
packages/cli/src/json/index.ts |
Exports JSON utilities. |
packages/cli/src/json/file-context.ts |
Loads validated JSON files. |
packages/cli/src/index.ts |
Defines the public API. |
packages/cli/src/config.ts |
Manages CLI configuration. |
packages/cli/src/common/utils.ts |
Adds formatting utilities. |
packages/cli/src/common/storage.ts |
Adds temporary persisted storage. |
packages/cli/src/common/stdout.ts |
Implements console output and spinners. |
packages/cli/src/common/runner.ts |
Runs child processes and URLs. |
packages/cli/src/common/ordered-array.ts |
Adds sorted array storage. |
packages/cli/src/common/location.ts |
Defines source locations. |
packages/cli/src/common/file-copier.ts |
Copies and renders templates. |
packages/cli/src/common/command.ts |
Wraps command execution. |
packages/cli/src/commands/validate.ts |
Implements validation command. |
packages/cli/src/commands/unlink.ts |
Implements unlink/uninstall command. |
packages/cli/src/commands/stop.ts |
Implements stop command. |
packages/cli/src/commands/restart.ts |
Implements restart command. |
packages/cli/src/commands/pack.ts |
Implements plugin packaging. |
packages/cli/src/commands/list.ts |
Lists installed plugins. |
packages/cli/src/commands/link.ts |
Implements plugin linking. |
packages/cli/src/commands/index.ts |
Exports commands. |
packages/cli/src/commands/dev.ts |
Manages developer mode. |
packages/cli/src/commands/create.ts |
Implements creation wizard. |
packages/cli/src/commands/config.ts |
Implements configuration commands. |
packages/cli/src/cli.ts |
Defines the command-line interface. |
packages/cli/rolldown.config.ts |
Configures executable bundling. |
packages/cli/README.md |
Documents installation and usage. |
packages/cli/package.json |
Defines package and build metadata. |
packages/cli/eslint.config.js |
Configures linting. |
packages/cli/CHANGELOG.md |
Imports CLI release history. |
packages/cli/.prettierignore |
Excludes generated outputs. |
.gitignore |
Adds CLI build and cache exclusions. |
.changeset/long-rules-cross.md |
Records the monorepo migration. |
.changeset/cute-ravens-serve.md |
Records the Momoa compatibility fix. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (1)
packages/cli/package.json:115
- The issue tracker and homepage also still target the retired standalone repository, so npm consumers will be routed away from the monorepo after this migration. Update both URLs to the current repository/package location.
"bugs": {
"url": "https://github.com/elgatosf/cli/issues"
},
"homepage": "https://github.com/elgatosf/cli#readme",
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+81
to
+83
| if (errors?.find((e) => e.instancePath === pointer && e.keyword === "type")) { | ||
| nodeRef.node = new JsonValueNode(undefined, nodeRef.location); | ||
| return nodeRef.node; |
Comment on lines
+80
to
+84
| if (extname(source) === ".ejs") { | ||
| ejs.renderFile(source, this.options.data, (_, contents: string) => { | ||
| const target = extname(dest) === ".ejs" ? dest.substring(0, dest.length - 4) : dest; | ||
| fs.writeFileSync(target, contents); | ||
| }); |
Comment on lines
+197
to
+202
| if (existsSync(manifestPath)) { | ||
| const manifest = await readJsonFile<Manifest>(manifestPath); | ||
|
|
||
| // Ensure the version in the manifest has the correct number of segments, [{major}.{minor}.{patch}.{build}] | ||
| version ??= manifest.value.Version?.toString() || ""; | ||
| manifest.value.Version = `${version}${".0".repeat(Math.max(0, 4 - version.split(".").length))}`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pnpm.@humanwhocodes/momoa.