ember-inspector 正在参加 2021 年度 OSC 中国开源项目评选,请投票支持!
ember-inspector 在 2021 年度 OSC 中国开源项目评选 中已获得 {{ projectVoteCount }} 票,请投票支持!
2021 年度 OSC 中国开源项目评选 正在火热进行中,快来投票支持你喜欢的开源项目!
2021 年度 OSC 中国开源项目评选 >>> 中场回顾
ember-inspector 获得 2021 年度 OSC 中国开源项目评选「最佳人气项目」 !
授权协议 MIT License
开发语言 JavaScript
操作系统 跨平台
软件类型 开源软件
所属分类 程序开发
开源组织
地区 不详
投 递 者 首席测试
适用人群 未知
收录时间 2021-12-16

软件简介

Ember Inspector Build Status

Adds an Ember tab to the browser's Developer Tools that allows you to inspect Ember objects in your application.

Installation

Chrome

Install the extension from the Chrome Web Store.

OR:

  • Clone the repository
  • cd into the repo directory
  • run yarn install
  • run yarn global add ember-cli
  • run yarn build to build the dist directory
  • Visit chrome://extensions in Chrome
  • Make sure Developer mode is checked
  • Click on 'Load unpacked extension...'
  • Choose the dist/chrome folder in the cloned repo
  • Close and re-open developer tools if it's already open

Firefox

Install the Firefox addon.

OR:

  • Clone the repository
  • cd into the repo directory
  • run yarn install
  • run yarn global add ember-cli
  • run yarn build to build the dist directory
  • Visit about:debugging in Firefox
  • Click on 'Load Temporary Addon-on'
  • Choose the dist/firefox/manifest.json file in the cloned repo

Opera

  • Clone the repository
  • cd into the repo directory
  • run yarn install
  • run yarn global add ember-cli
  • run yarn build to build the dist directory
  • Visit chrome://extensions in Opera
  • Make sure Developer mode is checked
  • Click on 'Load unpacked extension...'
  • Choose the dist/chrome folder in the cloned repo
  • Close and re-open developer tools if it's already open

Bookmarklet (All Browsers)

javascript: (function() { var s = document.createElement('script'); s.src = '//ember-extension.s3.amazonaws.com/dist_bookmarklet/load_inspector.js'; document.body.appendChild(s); }());

Internet explorer will open an iframe instead of a popup due to the lack of support for cross-origin messaging.

For development:

  • run yarn serve:bookmarklet
  • create a bookmark (make sure you unblock the popup when you run the bookmarklet):
javascript: (function() { var s = document.createElement('script'); s.src = 'http://localhost:9191/bookmarklet/load_inspector.js'; document.body.appendChild(s); }());

Building and Testing:

Run `yarn install && yarn global add ember-cli to install the required modules.

  • yarn build to build the files in the dist directory
  • yarn watch To watch the files and re-build in dist when anything changes (useful during development).
  • yarn test To run the tests in the terminal
  • yarn start To start the test server at localhost:4200/testing/tests

Deploy new version:

Patch versions

Patch versions are only committed to the stable branch. So we need to cherry-pick the commits we need from master and bump stable to the new patch version.

  • git checkout stable
  • Cherry-pick the needed commits from master to stable.
  • Add the change log entry and commit. We use github-changelog-generator for this. You will want to follow the installation instructions on their README, and take note that you will need to provide a GitHub token. Once installed, and you add a token, you can run yarn changelog in your terminal.
  • yarn version --patch
  • git push --tags
  • git push
  • PR the change log entry to the master branch.

Minor and major versions

When releasing a major/minor version, master would already have this version set, so what we need to do is to merge master into stable and release.

  • git checkout stable
  • git merge -X theirs master
  • Add the change log entry and commit. We use github-changelog-generator for this. You will want to follow the installation instructions on their README, and take note that you will need to provide a GitHub token. Once installed, and you add a token, you can run yarn changelog in your terminal.
  • yarn version (keep the same version number)
  • git push --tags
  • git push
  • PR the change log entry to the master branch, as well as increment package.json to the next major/minor version.

Locking a version

We can take a snapshot of the current inspector version to support a specific Ember version range. This allows us to stop supporting old Ember versions in master without breaking the published inspector for old Ember apps. It works by serving a different inspector version based on the current app's Ember version.

The Ember versions supported by the current inspector are indicated in the emberVersionsSupported array in package.json.

Here are the steps to lock an inspector version:

  • Release a new version (See "Minor and major versions") if there are unreleased commits in master. Skip this step if there are not new commits after the last release.
  • Makes sure you have a config/secrets.json file with the correct AWS credentials to push to S3. You can use config/secrets.json.sample as a starting point.
  • Create a new branch (from stable) named after the Ember version range that will be supported by this branch. The min version in the range is the first element in the emberVersionsSupported array in package.json. The max version in the range is the first version that will not be supported. For example, a branch named ember-0.0.0-2.7.0 means it supports Ember 0.0.0 -> 2.6.0, and a branch named ember-2.7.0-3.4.0 means it supports Ember 2.7.0 -> Ember 3.3.2.
  • Update package.json's emberVersionsSupported: add a second element that indicates the minimum Ember version the master branch will not support.
  • Commit the branch.
  • Run yarn lock-version. This will build, compress, and upload this version to S3.
  • Checkout the master branch.
  • Update package.json's previousEmberVersionsSupported: add the first Ember version supported by the recently locked snapshot (the first element in the emberVersionsSupported array).
  • Update package.json's emberVersionsSupported: Take the last element from previousEmberVersionsSupported and set it as the first element in this array. Set an empty string as the second element to indicate there's currently no maximum Ember version supported yet. emberVersionsSupported array length should always be 2 indicating a [min, max] range.
  • Commit.
Example scenario

Below is an example scenario that assumes the current master branch supports Ember version 2.7.0+ and we want to lock the version such that master will support 3.4.0+. It also assumes the last Ember Inspector version released was 3.9.0.

  • Release a new inspector version 3.10.0 if there are unreleased commits in master.
  • Create a new branch from stable called ember-2.7.0-3.4.0.
  • Update package.json's emberVersionsSupported from ["2.7.0", ""] to ["2.7.0", "3.4.0"].
  • Commit with message "Lock Ember version at 2.7.0-3.4.0" and push the branch.
  • Run yarn lock-version.
  • Checkout the master branch.
  • Create a new branch from master called lock-3.4.0 (branch name here is not important).
  • Update package.json's previousEmberVersionsSupported from ["0.0.0"] to ["0.0.0", "2.7.0"].
  • Update package.json's emberVersionsSupported from ["2.7.0", ""] to ["3.4.0", ""].
  • Commit and open a PR against master.

Window Messages

The Ember Inspector uses window messages, so if you are using window messages in your application code, make sure you verify the sender and add checks to your event listener so as not to conflict with the inspector's messages.

展开阅读全文

代码

评论

点击引领话题📣
暂无内容
发表了博客
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
发表了问答
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
clean-css 存在拒绝服务漏洞
clean-css 是适用于 Node.js 平台和任何现代浏览器的快速高效的 CSS 优化器。此软件包的受影响版本容易受到正则表达式拒绝服务 (ReDoS) 的攻击。
MPS-2022-12865
2022-08-08 18:36
istanbul-reports 存在通过 window.opener 访问使用指向不受信任目标的 Web 链接漏洞
通过 window.opener 访问使用指向不受信任目标的 Web 链接
由于指向 https://istanbul 的链接中没有 rel 属性,因此该软件包的受影响版本容易受到反向 Tabnabbing 的攻击。
MPS-2022-13797
2022-08-08 18:36
markdown-it 存在拒绝服务漏洞
拒绝服务
markdown-it 是一个现代的可插拔 Markdown 解析器。此软件包的受影响版本容易受到正则表达式拒绝服务 (ReDoS) 的攻击。
MPS-2022-13854
2022-08-08 18:36
parse-path 安全漏洞
通过用户控制密钥绕过授权机制
parse-path是Ionică Bizău个人开发者的一个库。用于解析路径。 parse-path 5.0.0之前版本存在安全漏洞,该漏洞源于应用中存在用户控制的密钥缺少有效的限制。攻击者利用该漏洞可以绕过授权。
CVE-2022-0624 MPS-2022-4278
2022-08-08 18:36
Async 安全漏洞
原型污染
Async是英国Caolan McMahon个人开发者的一个实用模块。用于使用异步 JavaScript。 Async 3.2.1 及之前版本存在安全漏洞,该漏洞源于 mapValues() 方法。攻击者可通过 mapValues() 方法获取权限。
CVE-2021-43138 MPS-2021-34434
2022-08-08 18:36
Markdown-It 安全漏洞
拒绝服务
Markdown-It是一个 Markdown 解析器。 Markdown-It存在安全漏洞,该漏洞源于Markdown—它是一个Markdown解析器。在1.3.2版本之前,长度大于5万个字符的特殊模式会显著降低解析器的速度。用户应该升级到12.3.2版本以接收补丁。除了升级之外,没有已知的变通办法。
CVE-2022-21670 MPS-2021-37028
2022-08-08 18:36
css-what存在未明漏洞
css-what是一个CSS选择器解析器。 css-what 5.0.1之前版本存在安全漏洞,该漏洞源于css-what包并不能确保属性解析具有相对于输入大小的线性时间复杂度。目前没有详细漏洞细节提供。
CVE-2021-33587 MPS-2021-7397
2022-08-08 18:36
nodejs 资源管理错误漏洞
拒绝服务
nodejs是是一个基于ChromeV8引擎的JavaScript运行环境通过对Chromev8引擎进行了封装以及使用事件驱动和非阻塞IO的应用让Javascript开发高性能的后台应用成为了可能。 nodejs-glob-parent 存在安全漏洞,该漏洞源于正则表达式拒绝服务。
CVE-2020-28469 MPS-2021-7827
2022-08-08 18:36
stylelint 存在ReDoS漏洞
ReDoS
stylelint 是一种 linter,可帮助您避免错误并在样式中强制执行约定。此软件包的受影响版本容易受到正则表达式拒绝服务 (ReDoS) 的攻击。
MPS-2022-14060
2022-08-08 18:36
没有更多内容
加载失败,请刷新页面
点击加载更多
加载中
下一页
0 评论
0 收藏
分享
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部