@8btc/office-assistant-mcp 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.cjs +33 -34
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -15,8 +15,8 @@ const index_js = require("@modelcontextprotocol/sdk/server/index.js");
15
15
  const types_js = require("@modelcontextprotocol/sdk/types.js");
16
16
  const ReactDOMServer = require("react-dom/server");
17
17
  const qrcode_react = require("qrcode.react");
18
- const winston = require("winston");
19
18
  const zod = require("zod");
19
+ const winston = require("winston");
20
20
  const zodToJsonSchema$1 = require("zod-to-json-schema");
21
21
  const fs = require("fs");
22
22
  const fsPromises = require("fs/promises");
@@ -74959,7 +74959,7 @@ const replaceMarkdown = (mdContent) => {
74959
74959
  while ((match = imgRegex.exec(m)) !== null) {
74960
74960
  const [, alt, src] = match;
74961
74961
  if (windowsPattern.test(src)) {
74962
- result = `![${alt || ""}]("${encodeURIComponent(src)}")`;
74962
+ result = `![${alt || ""}](${encodeURIComponent(src)})`;
74963
74963
  }
74964
74964
  }
74965
74965
  return result || m;
@@ -76838,37 +76838,6 @@ const renderFullHtml = (segment) => {
76838
76838
  `;
76839
76839
  };
76840
76840
  const getQrcodeUrl = () => process$1.env.QRCODE_URL || "https://reactjs.org/";
76841
- const logger = winston.createLogger({
76842
- level: "info",
76843
- format: winston.format.json(),
76844
- defaultMeta: { service: "user-service" },
76845
- transports: [
76846
- //
76847
- // - Write all logs with importance level of `error` or higher to `error.log`
76848
- // (i.e., error, fatal, but not other levels)
76849
- //
76850
- new winston.transports.File({
76851
- dirname: "logs",
76852
- filename: "office.loggererror.log",
76853
- level: "error"
76854
- }),
76855
- //
76856
- // - Write all logs with importance level of `info` or higher to `combined.log`
76857
- // (i.e., fatal, error, warn, and info, but not trace)
76858
- //
76859
- new winston.transports.File({
76860
- dirname: "logs",
76861
- filename: "office.logercombined.log"
76862
- })
76863
- ]
76864
- });
76865
- if (process.env.NODE_ENV !== "production") {
76866
- logger.add(
76867
- new winston.transports.Console({
76868
- format: winston.format.simple()
76869
- })
76870
- );
76871
- }
76872
76841
  async function generateBasePdf(data) {
76873
76842
  return [
76874
76843
  {
@@ -76899,7 +76868,6 @@ const renderCover = (data) => {
76899
76868
  };
76900
76869
  const renderSegment = (data) => {
76901
76870
  const html2 = ReactDOMServer.renderToString(/* @__PURE__ */ jsxRuntime.jsx(Segment, { data }));
76902
- logger.error(html2);
76903
76871
  return renderFullHtml(html2);
76904
76872
  };
76905
76873
  const renderEnd = (data) => {
@@ -76930,6 +76898,37 @@ const basePdfSchema = {
76930
76898
  zod.z.object({
76931
76899
  ...basePdfSchema
76932
76900
  });
76901
+ const logger = winston.createLogger({
76902
+ level: "info",
76903
+ format: winston.format.json(),
76904
+ defaultMeta: { service: "user-service" },
76905
+ transports: [
76906
+ //
76907
+ // - Write all logs with importance level of `error` or higher to `error.log`
76908
+ // (i.e., error, fatal, but not other levels)
76909
+ //
76910
+ new winston.transports.File({
76911
+ dirname: "logs",
76912
+ filename: "office.loggererror.log",
76913
+ level: "error"
76914
+ }),
76915
+ //
76916
+ // - Write all logs with importance level of `info` or higher to `combined.log`
76917
+ // (i.e., fatal, error, warn, and info, but not trace)
76918
+ //
76919
+ new winston.transports.File({
76920
+ dirname: "logs",
76921
+ filename: "office.logercombined.log"
76922
+ })
76923
+ ]
76924
+ });
76925
+ if (process.env.NODE_ENV !== "production") {
76926
+ logger.add(
76927
+ new winston.transports.Console({
76928
+ format: winston.format.simple()
76929
+ })
76930
+ );
76931
+ }
76933
76932
  const zodToJsonSchema = (schema) => {
76934
76933
  return zodToJsonSchema$1.zodToJsonSchema(zod.z.object(schema), {
76935
76934
  rejectedAdditionalProperties: void 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@8btc/office-assistant-mcp",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "办公agent辅助mcp工具",
5
5
  "main": "dist/index.cjs",
6
6
  "type": "module",