-
Notifications
You must be signed in to change notification settings - Fork 0
Upgrade to Oclif v4 #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2048a35
Initial plan
Copilot 2a73af4
Update to modern Oclif v4 - core dependencies and breaking changes fixed
Copilot 8765691
Remove unnecessary eslint-disable comment
Copilot 9219b30
Add comprehensive integration tests for CLI commands
Copilot 61af114
Refactor tests to verify command structure and configuration
Copilot 078b316
fix build error
KetanReddy b0fb256
remove unneeded fixtures
KetanReddy e7e9b21
Fix build resource limits and workspaces
KetanReddy 30ea8fb
Fix lint
KetanReddy 01f07c5
actually fix resource limits
KetanReddy f107475
Fix flag parsing and exit issue
KetanReddy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| import { describe, test, expect } from "vitest"; | ||
| import DSLCompile from "../../commands/dsl/compile"; | ||
| import DSLValidate from "../../commands/dsl/validate"; | ||
| import JSONValidate from "../../commands/json/validate"; | ||
| import XLRCompile from "../../commands/xlr/compile"; | ||
| import XLRConvert from "../../commands/xlr/convert"; | ||
|
|
||
| describe("command structure and basic functionality", () => { | ||
| test("DSL compile command should be defined with correct structure", () => { | ||
| expect(DSLCompile).toBeDefined(); | ||
| expect(DSLCompile.description).toBe("Compile Player DSL files into JSON"); | ||
| expect(DSLCompile.flags).toBeDefined(); | ||
| expect(DSLCompile.flags.input).toBeDefined(); | ||
| expect(DSLCompile.flags.output).toBeDefined(); | ||
| expect(DSLCompile.strict).toBe(false); | ||
| }); | ||
|
|
||
| test("DSL validate command should be defined with correct structure", () => { | ||
| expect(DSLValidate).toBeDefined(); | ||
| expect(DSLValidate.description).toBe( | ||
| "Validate TSX files before they get compiled", | ||
| ); | ||
| expect(DSLValidate.flags).toBeDefined(); | ||
| expect(DSLValidate.flags.files).toBeDefined(); | ||
| expect(DSLValidate.flags.severity).toBeDefined(); | ||
| }); | ||
|
|
||
| test("JSON validate command should be defined with correct structure", () => { | ||
| expect(JSONValidate).toBeDefined(); | ||
| expect(JSONValidate.description).toBe("Validate Player JSON content"); | ||
| expect(JSONValidate.flags).toBeDefined(); | ||
| expect(JSONValidate.flags.files).toBeDefined(); | ||
| expect(JSONValidate.flags.severity).toBeDefined(); | ||
| }); | ||
|
|
||
| test("XLR compile command should be defined with correct structure", () => { | ||
| expect(XLRCompile).toBeDefined(); | ||
| expect(XLRCompile.description).toBe( | ||
| "Compiles typescript files to XLRs format", | ||
| ); | ||
| expect(XLRCompile.flags).toBeDefined(); | ||
| expect(XLRCompile.flags.input).toBeDefined(); | ||
| expect(XLRCompile.flags.output).toBeDefined(); | ||
| expect(XLRCompile.flags.mode).toBeDefined(); | ||
| }); | ||
|
|
||
| test("XLR convert command should be defined with correct structure", () => { | ||
| expect(XLRConvert).toBeDefined(); | ||
| expect(XLRConvert.description).toBe( | ||
| "Exports XLRs files to a specific language", | ||
| ); | ||
| expect(XLRConvert.flags).toBeDefined(); | ||
| expect(XLRConvert.flags.input).toBeDefined(); | ||
| expect(XLRConvert.flags.output).toBeDefined(); | ||
| expect(XLRConvert.flags.lang).toBeDefined(); | ||
| }); | ||
|
|
||
| test("all commands extend BaseCommand and have required config support", () => { | ||
| expect(DSLCompile.flags.config).toBeDefined(); | ||
| expect(DSLValidate.flags.config).toBeDefined(); | ||
| expect(JSONValidate.flags.config).toBeDefined(); | ||
| expect(XLRCompile.flags.config).toBeDefined(); | ||
| expect(XLRConvert.flags.config).toBeDefined(); | ||
| }); | ||
| }); |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,7 +29,7 @@ export default class XLRCompile extends BaseCommand { | |
| description: "Output directory to write results to.", | ||
| default: "./dist", | ||
| }), | ||
| mode: Flags.enum({ | ||
| mode: Flags.string({ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's this change for? |
||
| char: "m", | ||
| description: | ||
| "Search strategy for types to export: plugin (default, looks for exported EnchancedPlayerPlugin classes) or type (all exported types)", | ||
|
|
||
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we decide which
resource_classis appropriate?