{
  "name": "@glacierjs/core",
  "version": "0.1.7",
  "main": "build/main/index.js",
  "typings": "build/main/index.d.ts",
  "module": "build/module/index.js",
  "author": "JerryC (huangjerryc@gmail.com)",
  "license": "MIT",
  "publishConfig": {
    "access": "public"
  },
  "files": [
    "dist",
    "build/main",
    "build/module",
    "!**/*.spec.*",
    "!**/*.json",
    "CHANGELOG.md",
    "LICENSE",
    "README.md"
  ],
  "gitHead": "83a3acb9dc824a3fa3a9808ccff3f04a5703114e",
  "scripts": {
    "build": "run-p build:*",
    "build:main": "tsc -p tsconfig.json",
    "build:module": "tsc -p tsconfig.module.json",
    "watch:build": "tsc -p tsconfig.json -w"
  },
  "readme": "# @glacierjs/core\n\n作为 GlacierJS 的核心模块，它提供：\n1. MiddlewareQueue：支撑函数的插件化。\n2. Logger：统一管理 GlacierJS 的日志。\n3. Const：统一管理静态变量\n\n## MiddlewareQueue\n\n一个基于洋葱模型的中间件队列。\n\n**Quick Usage:**\n```typescript\nconst queue = new MiddlewareQueue();\n\nqueue.push(async (context, next) => {\n  console.log('A');\n  await next();\n  console.log('B');\n  context.name = 'abc';\n});\n\nqueue.push(async (context, next) => {\n  console.log('C');\n  await next();\n  console.log('D');\n});\n\nconst context = {};\nawait queue.runAll(context);  // print: A C D B\nconsle.log(context); // { name: 'abc' }\n```\n\n## Logger\n\n**Quick Usage:**\n```typescript\nconst logger = new Logger({ prefix: 'glacierjs' });\nlogger.info('hello');  // print: glacierjs [info] hello\nlogger.debug('hello');  // print: glacierjs [debug] hello\nlogger.warn('hello');  // print: glacierjs [warn] hello\nlogger.error('hello');  // print: glacierjs [error] hello\n```\n\n**Nest Logger:**\n```typescript\nconst myPluginLogger = logger.extends({ prefix: 'my-plugin' }); \nconst myPluginModuleALogger = myPluginLogger.extends({ prefix: 'module-a' });\n\nmyPluginLogger.info('hello'); // print: glacierjs-my-plugin [info] hello\nmyPluginModuleALogger.info('hello'); // print: glacierjs-my-plugin-module-a [info] hello\n```\n\n**Level Controller:**\n```typescript\nLogger.level = Level.ERROR;\nlogger.info('hello');  // print nothing\nlogger.debug('hello');  // print nothing\nlogger.warn('hello');  // print nothing\nlogger.error('hello');  // print: glacierjs [error] hello\n```"
}