File tree Expand file tree Collapse file tree 12 files changed +76
-63
lines changed Expand file tree Collapse file tree 12 files changed +76
-63
lines changed Original file line number Diff line number Diff line change 99 },
1010 "main" : " dist/index.js" ,
1111 "types" : " dist/index.d.ts" ,
12- "type" : " commonjs" ,
12+ "type" : " module" ,
13+ "exports" : {
14+ "." : {
15+ "types" : " ./dist/index.d.ts" ,
16+ "import" : " ./dist/index.js" ,
17+ "default" : " ./dist/index.js"
18+ }
19+ },
1320 "scripts" : {
1421 "build" : " npx tsc" ,
1522 "lint" : " npx eslint . --ext .ts" ,
2734 "author" : " LaunchDarkly" ,
2835 "license" : " Apache-2.0" ,
2936 "devDependencies" : {
37+ "@langchain/community" : " ^0.3.0" ,
3038 "@langchain/core" : " ^0.3.0" ,
3139 "@launchdarkly/server-sdk-ai" : " ^0.14.1" ,
3240 "@trivago/prettier-plugin-sort-imports" : " ^4.1.1" ,
4755 "typescript" : " 5.1.6"
4856 },
4957 "peerDependencies" : {
58+ "@langchain/community" : " ^0.2.0 || ^0.3.0" ,
5059 "@langchain/core" : " ^0.2.0 || ^0.3.0" ,
5160 "@launchdarkly/server-sdk-ai" : " ^0.14.0" ,
5261 "langchain" : " ^0.2.0 || ^0.3.0"
Original file line number Diff line number Diff line change 11{
22 "compilerOptions" : {
33 "target" : " ES2020" ,
4- "module" : " CommonJS " ,
4+ "module" : " ES2020 " ,
55 "lib" : [" ES2020" ],
66 "moduleResolution" : " node" ,
77 "esModuleInterop" : true ,
Original file line number Diff line number Diff line change 99 },
1010 "main" : " dist/index.js" ,
1111 "types" : " dist/index.d.ts" ,
12- "type" : " commonjs" ,
12+ "type" : " module" ,
13+ "exports" : {
14+ "." : {
15+ "types" : " ./dist/index.d.ts" ,
16+ "import" : " ./dist/index.js" ,
17+ "default" : " ./dist/index.js"
18+ }
19+ },
1320 "scripts" : {
1421 "build" : " npx tsc" ,
1522 "lint" : " npx eslint . --ext .ts" ,
Original file line number Diff line number Diff line change 11{
22 "compilerOptions" : {
33 "target" : " ES2020" ,
4- "module" : " CommonJS " ,
4+ "module" : " ES2020 " ,
55 "lib" : [" ES2020" ],
66 "moduleResolution" : " node" ,
77 "esModuleInterop" : true ,
Original file line number Diff line number Diff line change 99 },
1010 "main" : " dist/index.js" ,
1111 "types" : " dist/index.d.ts" ,
12- "type" : " commonjs" ,
12+ "type" : " module" ,
13+ "exports" : {
14+ "." : {
15+ "types" : " ./dist/index.d.ts" ,
16+ "import" : " ./dist/index.js" ,
17+ "default" : " ./dist/index.js"
18+ }
19+ },
1320 "scripts" : {
1421 "build" : " npx tsc" ,
1522 "lint" : " npx eslint . --ext .ts" ,
Original file line number Diff line number Diff line change 11{
22 "compilerOptions" : {
33 "target" : " ES2020" ,
4- "module" : " CommonJS " ,
4+ "module" : " ES2020 " ,
55 "lib" : [" ES2020" ],
66 "moduleResolution" : " node" ,
77 "esModuleInterop" : true ,
Original file line number Diff line number Diff line change 99 },
1010 "main" : " dist/src/index.js" ,
1111 "types" : " dist/src/index.d.ts" ,
12- "type" : " commonjs" ,
12+ "type" : " module" ,
13+ "exports" : {
14+ "." : {
15+ "types" : " ./dist/src/index.d.ts" ,
16+ "import" : " ./dist/src/index.js" ,
17+ "default" : " ./dist/src/index.js"
18+ }
19+ },
1320 "scripts" : {
14- "build" : " npx tsc" ,
21+ "build" : " npx tsc && ../../../scripts/replace-version.sh . " ,
1522 "lint" : " npx eslint . --ext .ts" ,
1623 "prettier" : " prettier --write '**/*.@(js|ts|tsx|json|css)' --ignore-path ../../../.prettierignore" ,
1724 "lint:fix" : " yarn run lint --fix" ,
Original file line number Diff line number Diff line change 1- import * as Mustache from 'mustache' ;
1+ import Mustache from 'mustache' ;
22
33import { LDContext , LDLogger } from '@launchdarkly/js-server-sdk-common' ;
44
Original file line number Diff line number Diff line change 11import { LDContext } from '@launchdarkly/js-server-sdk-common' ;
22
3- import { name as aiSdkName , version as aiSdkVersion } from '../package.json' ;
43import { LDAIConfigTracker } from './api/config' ;
54import { LDAIMetricSummary } from './api/config/LDAIConfigTracker' ;
65import { EvalScore , JudgeResponse } from './api/judge/types' ;
@@ -14,6 +13,9 @@ import {
1413} from './api/metrics' ;
1514import { LDClientMin } from './LDClientMin' ;
1615
16+ const aiSdkName = '@launchdarkly/server-sdk-ai' ;
17+ const aiSdkVersion = '__LD_VERSION__' ;
18+
1719export class LDAIConfigTrackerImpl implements LDAIConfigTracker {
1820 private _trackedMetrics : LDAIMetricSummary = { } ;
1921
Original file line number Diff line number Diff line change 1- import * as Mustache from 'mustache' ;
1+ import Mustache from 'mustache' ;
22
33import { LDLogger } from '@launchdarkly/js-server-sdk-common' ;
44
You can’t perform that action at this time.
0 commit comments