npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

inscode-editor-sdk

v0.1.112

Published

```js 1. npm run build 2. 修改package.json的版本号 3. git add . && git commit -m "xxx" && git push origin main 4. git tag v0.1.0(v + package.json的版本号) 5. git push origin v0.1.0(v + package.json的版本号) ``` ## 组件使用方法一 > 直接复制包内所有内容,自己来适配vite配置 > 可以减少依赖包, 自定义比较好 ## 组

Readme

打包流程

1. npm run build
2. 修改package.json的版本号
3. git add . && git commit -m "xxx" && git push origin main
4. git tag v0.1.0(v + package.json的版本号)
5. git push origin v0.1.0(v + package.json的版本号)

组件使用方法一

直接复制包内所有内容,自己来适配vite配置 可以减少依赖包, 自定义比较好

组件使用方法二

使用依赖包来管理

// package.json
"inscode-editor": "git+ssh://[email protected]:InsCode/inscode-editor-sdk.git#v0.0.11"

npm install
// 遇到失败检查是否有权限
// 执行 ssh -T [email protected] 的作用是测试你的 SSH 连接是否成功,并验证你的 SSH 公钥是否被 gitcode.com 认可

代码结构

<template>
  <InsCodeEditor
    :message="message"
    domain="gitcode.com"
    :project="{ gitUrl: '', workspacePath: '', branch: 'main' }"
    :message-id="messageId"
    @init="handleInit"
    @change-file="handleChangeFile"
  >
    <template #toolbarLeft>
      <div >
        toggle
      </div>
    </template>
    <template #toolbarRight>
      版本管理
    </template>
  </InsCodeEditor>
</template>
<scrip lang="ts" setup>
import { ref, type Ref } from 'vue';
import InsCodeEditor from 'inscode-editor';
import 'inscode-editor/dist/inscode-editor-sdk.css'
import { Action, StatusEnum, TypeEnum, type Message } from 'inscode-editor/src/package/types';
// @params String messageId
// 1.能通过当前页面路由参数获取唯一ID信息
// 2.方便以后支持代码丢失
const messageId = ref('demo')
// @params Object message
// 单次会话内容
const message:Ref<Message> = ref({
  // 当前文件内容 code | image
  type: TypeEnum.code,
  // 会话动作
  action: Action.write,
  // 生成内容
  content: '',
  // 注意这个是根据每个action不能不一样,如果action中没有这个参数,请清空
  mode: 'command',
  // 注意这个是根据每个action不能不一样,如果action中没有这个参数,请清空
  script: 'npm i && npm run dev',
  // 文件路径
  fsPath: '',
  // 文件状态, writing completed
  status: StatusEnum.writing
})

// 项目初始化成功
function handleInit () {

}
</script>
// 获取项目内容方法
1. search_files ---action
参数:
{ fsPath: '/repo0124', action: 'search_files', query: { regex: '', filePattern: '*.md', skipFiles: [] } }
2. list_files ---action
参数:
{ fsPath: '/repo0124', action: 'list_files'}
3. read_file ---action
参数:
{ fsPath: 'app/index.vue,src/aa.js' }
4. getSystemInfo --- 获取系统参数
4.1 容器未启动,就不请求这个参数
4.2 容器启动, 请求这个参数
参数
{ fsPath: '', action: 'getSystemInfo'}
5. execute_command
参数:
{ fsPath: '', action: 'execute_command', content: 'node index.js' }

6. download_resource_to_file =>图片是否成功
参数
{ fsPath: '', action: 'download_resource_to_file', content: 'path' }

// 自定义生成版本, 手动编辑文件内容,等容器关闭自动commit
7. generate_version_history
参数
{ fsPath: '', action: 'generate_version_history', content: '自定义commit信息' }
8. git_reset
参数
{ action: 'git_reset' }

//调用方法
editor.value?.getProjectInfo(参数).then((res:any) => {
  console.log('getSystemInfo', res)
})