fix: build issues

This commit is contained in:
yanlong.wang
2025-02-11 16:52:16 +08:00
parent 473f0e55df
commit 81f968f8aa
5 changed files with 12 additions and 10 deletions

View File

@@ -19,10 +19,10 @@ WORKDIR /app
COPY ./src ./src
COPY ./config.json ./
COPY ./tsconfig.json ./tsconfig.json
RUN npm run build
COPY ./jina-ai/src ./jina-ai/src
COPY ./jina-ai/tsconfig.json ./jina-ai/tsconfig.json
RUN npm run build
WORKDIR /app/jina-ai
RUN npm run build

View File

@@ -10,7 +10,7 @@
"license": "Apache-2.0",
"dependencies": {
"@google-cloud/firestore": "^7.11.0",
"civkit": "^0.8.3-3e69606",
"civkit": "^0.8.3-15926cb",
"dayjs": "^1.11.13",
"lodash": "^4.17.21",
"reflect-metadata": "^0.2.2",
@@ -851,9 +851,9 @@
}
},
"node_modules/civkit": {
"version": "0.8.3-ba2d60a",
"resolved": "https://registry.npmjs.org/civkit/-/civkit-0.8.3-ba2d60a.tgz",
"integrity": "sha512-WnL5yIH8KhbtfvNoUmC69LLjDUhLAcr2ftlZCbuhqYJUlAU4ICaop/ulGAkyYtq0x6mQNG9RPa+NU4g1gyL28Q==",
"version": "0.8.3-15926cb",
"resolved": "https://registry.npmjs.org/civkit/-/civkit-0.8.3-15926cb.tgz",
"integrity": "sha512-RPPYF0MUcxs4TC7j1IreKDpfFPCYpyg5DG5akDPcSqesbY7mp7zgr5poorD8P6rIWD3Wvu4805RswZi/npnWeQ==",
"license": "AGPL",
"dependencies": {
"lodash": "^4.17.21",

View File

@@ -25,7 +25,7 @@
"description": "",
"dependencies": {
"@google-cloud/firestore": "^7.11.0",
"civkit": "^0.8.3-3e69606",
"civkit": "^0.8.3-15926cb",
"dayjs": "^1.11.13",
"lodash": "^4.17.21",
"reflect-metadata": "^0.2.2",
@@ -35,4 +35,4 @@
"@types/lodash": "^4.17.15",
"pino-pretty": "^13.0.0"
}
}
}

View File

@@ -13,7 +13,7 @@ export class TokenTracker extends EventEmitter {
if ('asyncLocalContext' in process) {
const asyncLocalContext = process.asyncLocalContext as any;
this.on('usage', () => {
if (asyncLocalContext.hasContext()) {
if (asyncLocalContext.available()) {
asyncLocalContext.ctx.chargeAmount = this.getTotalUsage();
}
});

View File

@@ -12,5 +12,7 @@
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"resolveJsonModule": true
}
},
"include": ["src/**/*"],
"exclude": ["jina-ai/**/*", "**/__tests__/**/*"],
}