Skip to content

Conversation

@chilingling
Copy link
Member

@chilingling chilingling commented Jun 30, 2024

English | 简体中文

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Built its own designer, fully self-validated

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Background and solution

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • New Features

    • Introduced concurrent running of mock server and frontend scripts for a more streamlined development process.
  • Chores

    • Added @opentiny/tiny-engine-mock and ncp as new dependencies to support mock server functionality.
    • Simplified development scripts and updated import paths to improve code organization and maintainability.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 30, 2024

Walkthrough

The overall change encompasses script updates, dependency additions, and path modifications across multiple package.json files and source files. Key highlights include concurrent script execution for development in designer-demo, new dependencies for mock data handling, and update of JSON file paths in mockServer services.

Changes

File Change Summary
designer-demo/package.json Updated dev script to run serve:mock and serve:frontend concurrently; added serve:frontend and serve:mock
mockServer/package.json Added ncp dependency
mockServer/src/services/app.js Updated the appinfo.json import path
mockServer/src/services/block... Updated the appinfo.json import path
mockServer/src/services/blockG... Updated the appinfo.json import path
mockServer/src/services/schema... Updated the appinfo.json import path
mockServer/src/services/source... Updated the sources.json import path
package.json Modified dev:demo script; removed dev:demo:frontend script
packages/engine-cli/template/... Updated dev script to run concurrently; added serve:mock script; added dependency

Poem

> In the land of code, paths rearranged,
> Scripts now dappled, neatly exchanged,
> Mock data flows, dependencies grow,
> A dev’s new dance, an improved show.
> With JSON aligned, and engines refined,
> Hoppy code, in sync, redefined. 🌟🐇

Tip

Early access features: enabled

We are currently testing the following features in early access:

  • OpenAI gpt-4o model for code reviews and chat: OpenAI claims that this model is better at understanding and generating code than the previous models. We seek your feedback over the next few weeks before making it generally available.

Note:

  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.
  • Please join our Discord Community to provide feedback and report issues.
  • OSS projects are always opted into early access features.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 5ad227b and 8339098.

Files selected for processing (9)
  • designer-demo/package.json (2 hunks)
  • mockServer/package.json (1 hunks)
  • mockServer/src/services/app.js (1 hunks)
  • mockServer/src/services/blockCategory.js (1 hunks)
  • mockServer/src/services/blockGroup.js (1 hunks)
  • mockServer/src/services/schema2code.js (1 hunks)
  • mockServer/src/services/source.js (1 hunks)
  • package.json (1 hunks)
  • packages/engine-cli/template/designer/package.json (2 hunks)
Files skipped from review due to trivial changes (2)
  • mockServer/src/services/blockGroup.js
  • mockServer/src/services/schema2code.js
Additional comments not posted (8)
packages/engine-cli/template/designer/package.json (2)

7-9: LGTM!

The changes to the scripts section are clear and correctly formatted.


27-28: LGTM!

The new dependencies are correctly added.

designer-demo/package.json (2)

7-9: LGTM!

The changes to the scripts section are clear and correctly formatted.


27-28: LGTM!

The new dependencies are correctly added.

mockServer/src/services/app.js (1)

28-28: LGTM!

The import path for appinfo.json has been correctly updated.

mockServer/package.json (1)

70-70: Dependency Addition: ncp

The ncp dependency has been added. Ensure that it is necessary and used appropriately within the codebase.

Verification successful

Dependency Addition: ncp

The ncp dependency has been added and is used in the build:static script within the mockServer/package.json file for copying files and directories.

  • File: mockServer/package.json
    • Line 70: "ncp": "^2.0.0"
    • Script: "build:static": "ncp src/assets dist/assets && ncp src/mock dist/mock && ncp src/database dist/database"
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the usage of the `ncp` package in the codebase.

# Test: Search for the usage of `ncp`. Expect: Occurrences of `ncp` usage.
rg --type js --type ts --type json 'ncp'

Length of output: 218

mockServer/src/services/blockCategory.js (1)

15-15: Import Path Update: appinfo.json

The import path for appinfo.json has been updated to ../assets/json/appinfo.json. This change improves the organization of assets.

package.json (1)

8-8: Script Update: dev:demo

The dev:demo script has been updated to use pnpm --filter designer-demo dev. This change consolidates the functionality and simplifies the script.

@hexqi hexqi changed the title fix: moServer build and add startup script on template fix: mockServer build and add startup script on template Jun 30, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8339098 and b1b30c2.

Files selected for processing (1)
  • designer-demo/package.json (1 hunks)
Files skipped from review due to trivial changes (1)
  • designer-demo/package.json

@hexqi hexqi merged commit 5bc3872 into opentiny:refactor/develop Jul 1, 2024
@coderabbitai coderabbitai bot mentioned this pull request Sep 9, 2024
14 tasks
yy-wow pushed a commit to yy-wow/tiny-engine that referenced this pull request Oct 10, 2024
* fix: moServer build and add startup script on template

* fix: preserve only frontend script on demo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants