usage of javascript/node to allow cross-platform building
At the current state the build fails when following the simple instructions in the README on Windows. This fixes it.
Summary by CodeRabbit
-
新功能
- 添加了用于清理开发工作区的脚本。
- 添加了用于复制注入文件的脚本。
- 添加了用于执行后安装步骤的脚本。
-
依赖更新
- 新增依赖:
"cross-env-shell": "^7.0.3"。
- 新增依赖:
-
脚本更新
- 更新了
postinstall和copy:inject脚本为Node.js脚本。 - 新增
clean脚本用于清理工作区。
- 更新了
PR总结
-
更新了
README.md- 添加了Python安装的要求
-
引入了
clean_workspace.py脚本- 用于清理工作区, 替换先前使用的Shell脚本
-
删除了旧的Shell脚本
clean_workspace.sh -
删除了旧的Shell脚本
copy-injected.sh并引入copy_injected.py- 用来复制注入的文件
-
添加了
postinstall.py脚本- 用于处理安装后步骤, 替换先前的
postinstall.sh
- 用于处理安装后步骤, 替换先前的
-
更新了
package.json- 使用Python脚本替代Shell脚本进行清理和复制任务, 确保跨平台兼容性
-
添加了
cross-env-shell依赖- 以跨平台方式管理环境变量
Thanks for your contribution @Osiris-Team
But we're not planning to introduce Python scripts into the project, you can consider converting the Python scripts to Node scripts.
Oh yeah that makes sense, didn't think about that! -> Fixed
Thanks for your contribution @Osiris-Team.
but development/scripts/copy_injected.js is still a python file.
Maybe you can make modifications based on this draft PR https://github.com/OneKeyHQ/app-monorepo/pull/5830
my bad forgot to copy over, fixed
and apps/desktop/dist/build_keytar.sh need to be fixed.
After all the files have been modified, I will help you package and test it.
Walkthrough
此次更改引入了多个新的脚本文件,分别用于清理开发工作区、复制注入文件和执行安装后步骤。package.json文件也进行了更新,主要涉及脚本的转换和新依赖的添加。所有新脚本均采用Node.js实现,替代了之前的bash脚本,提升了跨平台兼容性。
Changes
| 文件 | 更改摘要 |
|---|---|
development/scripts/*.js |
新增了 clean_workspace.js、copy_injected.js 和 postinstall.js,分别用于清理工作区、复制文件和执行安装后步骤。每个脚本都定义了相应的主要功能和操作。 |
package.json |
更新了 setup:env、postinstall 和 copy:inject 脚本,均转为Node.js实现。新增了 clean 脚本,并添加了 cross-env-shell 作为依赖,版本为 ^7.0.3。旧的bash脚本被移除。 |
Sequence Diagram(s)
sequenceDiagram
participant User
participant NodeJS
participant FileSystem
User->>NodeJS: 执行 postinstall()
NodeJS->>FileSystem: 执行 yarn setup:env
NodeJS->>FileSystem: 执行 patch-package
NodeJS->>FileSystem: 执行 yarn copy:inject
NodeJS->>FileSystem: 检查并删除 node_modules/realm-flipper-plugin-device/src
Note over NodeJS: 所有步骤完成
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?
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>, please review it.--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
@coderabbitaiin 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
@coderabbitaiin 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.--@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 using PR comments)
-
@coderabbitai pauseto pause the reviews on a PR. -
@coderabbitai resumeto resume the paused reviews. -
@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository. -
@coderabbitai full reviewto do a full review from scratch and review all the files again. -
@coderabbitai summaryto regenerate the summary of the PR. -
@coderabbitai resolveresolve all the CodeRabbit review comments. -
@coderabbitai configurationto show the current CodeRabbit configuration for the repository. -
@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryorSummaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile 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.
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
| Package | New capabilities | Transitives | Size | Publisher |
|---|---|---|---|---|
| npm/[email protected] | None | 0 |
510 B | alxndrsn |
🚮 Removed packages: npm/@onekeyfe/[email protected], npm/@onekeyfe/[email protected], npm/@onekeyfe/[email protected], npm/@onekeyfe/[email protected], npm/@onekeyfe/[email protected], npm/@onekeyfe/[email protected], npm/@onekeyfe/[email protected], npm/@onekeyfe/[email protected], npm/@onekeyfe/[email protected], npm/@onekeyfe/[email protected], npm/@onekeyfe/[email protected], npm/@protobufjs/[email protected], npm/@protobufjs/[email protected], npm/@protobufjs/[email protected], npm/@protobufjs/[email protected], npm/@protobufjs/[email protected], npm/@protobufjs/[email protected], npm/@protobufjs/[email protected], npm/@protobufjs/[email protected], npm/@protobufjs/[email protected], npm/@protobufjs/[email protected], npm/@substrate/[email protected], npm/@substrate/[email protected], npm/@substrate/[email protected], npm/@tamagui/[email protected], npm/@tamagui/[email protected], npm/@tamagui/[email protected], npm/@tamagui/[email protected], npm/@tamagui/[email protected], npm/@tamagui/[email protected], npm/@tamagui/[email protected], npm/@tamagui/[email protected], npm/@tamagui/[email protected], npm/@types/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]
Is there something left to do? Not sure because of all the bots commenting.
Thank you very much for your help. We have updated the script to JavaScript. Since the current content conflicts with the existing code, we have temporarily closed the PR. You are welcome to continue submitting relevant PRs.