Conversation
There was a problem hiding this comment.
Pull request overview
This PR delivers a major v2 modernization of the Rocket.Chat Apps CLI, replacing the legacy oclif-based implementation with a lightweight Node.js-native command runner and a new core module layout (deploy/package/watch/create/generate), plus a new Node test-runner-based test suite.
Changes:
- Replaces the CLI entrypoint/command system (drops oclif) with a custom command index, help rendering, and per-command
util.parseArgsparsing. - Introduces new v2 core modules for project loading/config merging, compilation/packaging, deployment, and source-only packaging.
- Migrates/rewrites tests to
node:test+--experimental-strip-types, removing mocha/ts-node setup.
Reviewed changes
Copilot reviewed 82 out of 90 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Updates TS build settings (ES2022 target, strict mode, node types, DOM libs). |
| test/tsconfig.json | Aligns test TS config for no-emit typechecking and stricter module detection. |
| test/strings.test.ts | Adds unit tests for new string utilities. |
| test/source-packager.test.ts | Adds tests for source-only packager zip creation and ignored-file handling. |
| test/prompt.test.ts | Adds tests for readline-based prompt utility. |
| test/project.test.ts | Adds tests for project loading + .rcappsconfig parsing behavior. |
| test/output.test.ts | Adds tests for output formatting and chalk fallback behavior. |
| test/mocha.opts | Removes mocha configuration (migration away from mocha). |
| test/logger-errors-templates.test.ts | Adds tests for Logger, CliError, and template helpers. |
| test/helpers/init.js | Removes ts-node/mocha init hook. |
| test/helpers.ts | Adds shared test helpers (temp dirs, patching, console capture). |
| test/help-command-index.test.ts | Adds tests for help rendering + command index mapping. |
| test/glob.test.ts | Adds tests for glob matcher behavior (including Windows path normalization). |
| test/files.test.ts | Adds tests for filesystem utilities (json read/write, recursive walk). |
| test/env.test.ts | Adds tests for environment variable deploy config parsing. |
| test/deploy-core.test.ts | Adds tests for deploy core (URL validation, auth flows, upload error surfacing, ignore patterns). |
| test/config.test.ts | Adds tests for deploy config merge semantics. |
| test/compiler.test.ts | Adds tests for compiler integration wrapper and diagnostics handling. |
| test/commands/watch.test.ts | Removes legacy oclif watch command tests. |
| test/commands/package.test.ts | Removes legacy oclif package command tests. |
| test/commands/deploy.test.ts | Removes legacy oclif deploy command tests. |
| test/command-watch.test.ts | Adds tests for new v2 watch command behavior (debounce, queuing, SIGINT, error handling). |
| test/command-package.test.ts | Adds tests for new v2 package command modes and zip path validation. |
| test/command-generate.test.ts | Adds tests for generate command file creation and auto-registration/marker handling. |
| test/command-env.test.ts | Adds tests for env command output. |
| test/command-deploy.test.ts | Adds tests for deploy command pipeline behavior and warnings. |
| test/command-create.test.ts | Adds tests for create scaffolding (slug rules, install behavior, detected engine version). |
| src/utils/strings.ts | Adds new slug/case/path normalization utilities. |
| src/utils/prompt.ts | Adds readline-based prompt helper with trimming/default support. |
| src/utils/output.ts | Adds output helpers with optional chalk colorization. |
| src/utils/glob.ts | Adds simple glob-to-regex conversion and matcher builder. |
| src/utils/files.ts | Adds filesystem helpers (ensure dir, json read/write, recursive file walk). |
| src/typings/fetch-with-proxy/index.d.ts | Removes legacy fetch-with-proxy type shim. |
| src/templates/boilerplate/slashCommand.ts | Removes legacy boilerplate template implementation. |
| src/templates/boilerplate/setting.ts | Removes legacy settings boilerplate template implementation. |
| src/templates/boilerplate/index.ts | Removes legacy boilerplate exports. |
| src/templates/boilerplate/apiEndpoint.ts | Removes legacy API endpoint boilerplate template implementation. |
| src/templates/app/vsCodeExtsTemplate.ts | Removes legacy app template. |
| src/templates/app/tsLintConfigTemplate.ts | Removes legacy app template. |
| src/templates/app/tsConfigTemplate.ts | Removes legacy app template. |
| src/templates/app/readmeTemplate.ts | Removes legacy app template. |
| src/templates/app/packageJsonTemplate.ts | Removes legacy app template. |
| src/templates/app/mainTemplate.ts | Removes legacy app template. |
| src/templates/app/index.ts | Removes legacy app template exports. |
| src/templates/app/gitIgnoreTemplate.ts | Removes legacy app template. |
| src/templates/app/editorConfigTemplate.ts | Removes legacy app template. |
| src/misc/variousUtils.ts | Removes legacy misc utilities (slugify, marketplace category fetch, etc.). |
| src/misc/unicodeSymbols.ts | Removes legacy unicode symbols map. |
| src/misc/interfaces.ts | Removes legacy interfaces used by old implementation. |
| src/misc/index.ts | Removes legacy misc barrel exports. |
| src/misc/folderDetails.ts | Removes legacy folder/project handling logic. |
| src/misc/diagnosticReport.ts | Removes legacy diagnostic report container. |
| src/misc/deployHelpers.ts | Removes legacy deploy helpers and fetch-with-proxy usage. |
| src/misc/compilerOptions.ts | Removes legacy compiler options definition. |
| src/misc/cloudAuth.ts | Removes legacy cloud auth flow (marketplace/publisher portal). |
| src/misc/appPackager.ts | Removes legacy glob-based app packager. |
| src/misc/appJsonSchema.ts | Removes legacy tv4 schema validation. |
| src/misc/appCreator.ts | Removes legacy create/scaffold implementation. |
| src/misc/appCompiler.ts | Removes legacy compiler wrapper. |
| src/index.ts | Replaces oclif entrypoint with a custom CLI runner and command dispatch. |
| src/core/types.ts | Adds v2 shared types for commands, manifests, and deploy config. |
| src/core/templates.ts | Adds v2 scaffolding + generation templates (app class/readme/tsconfig, endpoints, slash commands, settings). |
| src/core/source-packager.ts | Adds v2 source-only packaging to zip with ignore patterns. |
| src/core/project.ts | Adds v2 project loader + safe .rcappsconfig parsing + config merge helper. |
| src/core/meta.ts | Adds CLI tool/version metadata constants. |
| src/core/logger.ts | Adds a simple Logger abstraction with verbose gating. |
| src/core/errors.ts | Adds CliError with exit code support. |
| src/core/env.ts | Adds env var parsing for deploy/watch config. |
| src/core/deploy.ts | Adds v2 deploy core (URL validation, auth, upload via fetch/FormData, ignore patterns). |
| src/core/compiler.ts | Adds v2 compiler wrapper around @rocket.chat/apps-compiler with diagnostics handling. |
| src/core/command-index.ts | Adds helper to map command names and aliases. |
| src/compat.d.ts | Adds Node core type shims (reviewed; currently problematic/redundant). |
| src/commands/watch.ts | Rewrites watch as a v2 command using fs.watch + debounce + deploy pipeline. |
| src/commands/submit.ts | Removes legacy marketplace submit command. |
| src/commands/package.ts | Rewrites package command (compile+bundle vs source-only zip, legacy compiler switch, path validation). |
| src/commands/logout.ts | Removes legacy cloud logout command. |
| src/commands/login.ts | Removes legacy cloud login command. |
| src/commands/help.ts | Adds v2 help rendering for command list and per-command help. |
| src/commands/generate.ts | Rewrites generate command (endpoint/slash-command/setting) with optional auto-registration via markers. |
| src/commands/env.ts | Adds v2 env command that prints supported RC_APPS_* variables and precedence. |
| src/commands/deploy.ts | Rewrites deploy command using v2 core pipeline. |
| src/commands/create.ts | Rewrites create command with v2 templates, slug rules, engine version detection, optional npm install. |
| scripts/clean.mjs | Adds clean script to remove build output directory. |
| package.json | Updates package metadata, dependencies, scripts, Node engine requirement, and switches bin entry. |
| bin/run.cmd | Removes legacy oclif Windows runner. |
| bin/run | Removes legacy oclif runner. |
| bin/rc-apps.js | Adds new runtime entrypoint that loads the compiled CLI. |
| README.md | Updates documentation for v2 commands, config/env precedence, and testing checklist. |
| .gitignore | Ignores legacy/*. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 82 out of 90 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.