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

sks-maximo-utils

v1.0.6

Published

Maximo helper tools for updating table structures and data

Downloads

1,087

Readme

SKS Maximo Utils

Maximo 表结构和数据更新工具集。

安装

全局安装(CLI 使用)

npm install -g shoukaiseki-maximo-utils

项目中安装(引用使用)

npm install sks-maximo-utils

使用方式

CLI 命令

不带参数运行,打开配置目录:

sks-maximo

带参数运行,加载指定环境配置:

sks-maximo local    # 使用 local 环境配置
sks-maximo dev      # 使用 dev 环境配置
sks-maximo hd       # 使用 hd 环境配置

在脚本中引用

import { 
  importMaxObject, 
  importMaxPresentation, 
  importMaxDomain,
  importMaxAutoKey,
  importMaxScript,
  importMaxAppInfo,
  loadConfig,
  logger
} from 'shoukaiseki-maximo-utils';

// 加载配置(可选,默认 local)
loadConfig('local');

// 导入 Maximo 对象配置
importMaxObject({ fileName: "DBCONFIGJSON/test.json", logname: "测试" });

// 导入应用 XML 配置
importMaxPresentation({ fileName: "SCREENSXML/test.xml", logname: "应用" });

// 导入域配置
importMaxDomain({ fileName: "DBDOMAINJSON/domain.json", logname: "域" });

// 导入 AutoKey 配置
importMaxAutoKey({ fileName: "AUTOKEYJSON/autokey.json", logname: "自动编码" });

// 导入自动化脚本(自动保存历史记录)
// fileName为JSON配置文件,同目录下需有同名.js文件
// 例如:scripts/TEST.json 和 scripts/TEST.js
importMaxScript({ fileName: "scripts/TEST.json" });

// 导入应用信息配置
importMaxAppInfo({ fileName: "MAXAPPINFO/appinfo.json", logname: "应用信息" });

配置文件

首次运行时,会自动在 ~/.sks/nodeutils/ 目录创建 config.json 配置文件。

配置结构:

{
  "logLevel": "INFO",
  "langcode": "zh",
  "envs": {
    "local": {
      "baseUrl": "http://127.0.0.1:9080/maximo",
      "apiKey": "your-api-key",
      "maxauth": "",
      "authType": "apiKey",
      "langcode": "zh"
    },
    "dev": {
      "baseUrl": "https://mdev/maximo",
      "apiKey": "your-api-key",
      "maxauth": "",
      "authType": "apiKey",
      "langcode": "zh"
    }
  }
}

配置说明

| 字段 | 说明 | |------|------| | logLevel | 全局日志级别:TRACE, DEBUG, INFO, WARN, ERROR, FATAL | | langcode | 全局语言代码,默认 zh | | baseUrl | Maximo 服务地址 | | apiKey | API 认证密钥 | | maxauth | Maxauth 认证值 | | authType | 认证类型:apiKey 或 maxauth |

环境配置中可单独设置 logLevellangcode,优先级高于全局配置。

API

导入方法

| 方法 | 说明 | |------|------| | importMaxObject | 导入 Maximo 对象配置(JSON) | | importMaxPresentation | 导入应用 XML 配置 | | importMaxDomain | 导入域配置 | | importMaxAutoKey | 导入 AutoKey 配置 | | importMaxScript | 导入自动化脚本(自动保存历史记录) | | importMaxAppInfo | 导入应用信息配置 |

其他方法

| 方法 | 说明 | |------|------| | loadConfig(env) | 加载指定环境配置 | | saveScriptHistory(options) | 保存脚本历史记录 | | readFileContent(fileName) | 读取文件内容 | | readJsonFile(fileName) | 读取并解析 JSON 文件 | | fileExists(fileName) | 检查文件是否存在 |

日志文件

请求和响应日志会自动保存到 ~/.sks/nodeutils/logs/ 目录:

  • request-*.http - 请求日志(IntelliJ IDEA HTTP Client 格式)
  • response-*.json - 响应日志

开发

# 安装依赖
npm install

# 本地链接(测试)
npm link

# 在其他项目中链接测试
npm link sks-maximo-utils

License

ISC