@exercode/problem-utils-llm 1.0.17 → 1.0.18
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.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +26 -29
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./_virtual/_rolldown/runtime.cjs");let t=require("node:fs");t=e.__toESM(t,1);let n=require("node:path");n=e.__toESM(n,1);let r=require("@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./_virtual/_rolldown/runtime.cjs");let t=require("node:fs");t=e.__toESM(t,1);let n=require("node:path");n=e.__toESM(n,1);let r=require("@ai-sdk/amazon-bedrock"),i=require("@ai-sdk/google"),a=require("@ai-sdk/openai"),o=require("@ai-sdk/xai"),s=require("@exercode/problem-utils"),c=require("@willbooster/shared-lib"),l=require("ai"),u=require("zod");const d={bedrock:r.bedrock,google:i.google,openai:a.openai,xai:o.xai},f=u.z.object({model:u.z.string().min(1)});async function p(e,r){let i=(0,s.parseArgs)(process.argv);if(!i.cwd)throw Error(`cwd argument required`);let a=f.parse(i.params),o=await(0,s.readTestCases)(n.default.join(e,`test_cases`)),u=await t.default.promises.readFile(n.default.join(i.cwd,`prompt.txt`),`utf8`);for(let e of o){let t=Date.now();try{let{text:n}=await(0,l.generateText)({model:h(a.model),...m(r.buildPrompt?.({prompt:u,testCase:e})??u.replaceAll(`{input}`,e.input??``))}),i=Date.now(),o={testCaseId:e.id,decisionCode:s.DecisionCode.ACCEPTED,stdin:e.input,stdout:n,timeSeconds:(i-t)/1e3,...await r.test({testCase:e,result:{output:n}})};if((0,s.printTestCaseResult)(o),o.decisionCode!==s.DecisionCode.ACCEPTED)break}catch(n){let r=Date.now();(0,s.printTestCaseResult)({testCaseId:e.id,decisionCode:s.DecisionCode.RUNTIME_ERROR,stdin:e.input,stderr:(0,c.getErrorMessage)(n),timeSeconds:(r-t)/1e3});break}}}function m(e){return typeof e==`string`?{prompt:e}:{messages:e,allowSystemInMessages:!0}}function h(e){let[t,n]=e.split(`/`);if(!t||!n)throw Error(`bad model: ${e}`);let r=d[t]?.(n);if(!r)throw Error(`model not found: ${e}`);return r}exports.llmJudgePreset=p;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["z","parseArgs","readTestCases","path","fs","generateText","DecisionCode","getErrorMessage","require_runtime","node_fs","node_path","
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["z","parseArgs","readTestCases","path","fs","generateText","DecisionCode","getErrorMessage","require_runtime","node_fs","node_path","_ai_sdk_amazon_bedrock","_ai_sdk_google","_ai_sdk_openai","_ai_sdk_xai","_exercode_problem_utils","_willbooster_shared_lib","ai","zod","providerByName","judgeParamsSchema","llmJudgePreset","args","params","testCases","problemDir","prompt","testCase","startTimeMilliseconds","toLanguageModel","toPromptOptions","options","stopTimeMilliseconds","testCaseResult","text","error","built","providerId","modelId","model","languageModel"],"sources":["../src/index.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { bedrock } from '@ai-sdk/amazon-bedrock';\nimport { google } from '@ai-sdk/google';\nimport { openai } from '@ai-sdk/openai';\nimport { xai } from '@ai-sdk/xai';\nimport {\n DecisionCode,\n parseArgs,\n printTestCaseResult,\n readTestCases,\n type TestCaseResult,\n} from '@exercode/problem-utils';\nimport { getErrorMessage } from '@willbooster/shared-lib';\nimport type { LanguageModel, ModelMessage } from 'ai';\nimport { generateText } from 'ai';\nimport { z } from 'zod';\n\nconst PROMPT_FILENAME = 'prompt.txt';\n\nconst providerByName: Record<string, typeof bedrock | typeof google | typeof openai | typeof xai> = {\n // requires `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION`\n bedrock,\n // requires `GOOGLE_GENERATIVE_AI_API_KEY`\n google,\n // requires `OPENAI_API_KEY`\n openai,\n // requires `XAI_API_KEY`\n xai,\n} as const;\n\nconst judgeParamsSchema = z.object({\n model: z.string().min(1),\n});\n\n/** A `test_cases/` entry; the preset uses `input` for the prompt and hands everything to `test`. */\ninterface LlmTestCase {\n id: string;\n input?: string;\n output?: string;\n /** Present when `<id>.fin/` exists; the preset does not copy it anywhere (there is no program run). */\n fileInputPath?: string;\n /** Present when `<id>.fout/` exists, for `test` to read. */\n fileOutputPath?: string;\n}\n\ninterface LlmJudgePresetOptions {\n buildPrompt?: (context: { prompt: string; testCase: LlmTestCase }) => string | ModelMessage[];\n test: (context: {\n testCase: LlmTestCase;\n result: { output: string };\n }) => Partial<TestCaseResult> | Promise<Partial<TestCaseResult>>;\n}\n\n/**\n * A preset judge function for running and testing a user prompt in LLM.\n *\n * @example\n * Create `judge.ts`:\n * ```ts\n * import { llmJudgePreset } from '@exercode/problem-utils-llm';\n * import { DecisionCode } from '@exercode/problem-utils';\n *\n * await llmJudgePreset(import.meta.dirname, {\n * test: (context) {\n * return { decisionCode: context.result.output ? DecisionCode.ACCEPTED : DecisionCode.WRONG_ANSWER };\n * }\n * });\n * ```\n *\n * Run with the required parameters:\n * ```bash\n * bun judge.ts model_answers/java '{ \"model\": \"gemini-2.5-flash-lite\" }'\n * ```\n */\nexport async function llmJudgePreset(problemDir: string, options: LlmJudgePresetOptions): Promise<void> {\n const args = parseArgs(process.argv);\n if (!args.cwd) throw new Error('cwd argument required');\n const params = judgeParamsSchema.parse(args.params);\n\n const testCases = await readTestCases(path.join(problemDir, 'test_cases'));\n\n const prompt = await fs.promises.readFile(path.join(args.cwd, PROMPT_FILENAME), 'utf8');\n\n for (const testCase of testCases) {\n const startTimeMilliseconds = Date.now();\n try {\n const { text } = await generateText({\n model: toLanguageModel(params.model),\n ...toPromptOptions(\n options.buildPrompt?.({ prompt, testCase }) ?? prompt.replaceAll('{input}', testCase.input ?? '')\n ),\n });\n\n const stopTimeMilliseconds = Date.now();\n\n const testCaseResult = {\n testCaseId: testCase.id,\n decisionCode: DecisionCode.ACCEPTED,\n stdin: testCase.input,\n stdout: text,\n timeSeconds: (stopTimeMilliseconds - startTimeMilliseconds) / 1000,\n ...(await options.test({ testCase, result: { output: text } })),\n };\n\n printTestCaseResult(testCaseResult);\n\n if (testCaseResult.decisionCode !== DecisionCode.ACCEPTED) break;\n } catch (error) {\n const stopTimeMilliseconds = Date.now();\n\n printTestCaseResult({\n testCaseId: testCase.id,\n decisionCode: DecisionCode.RUNTIME_ERROR,\n stdin: testCase.input,\n stderr: getErrorMessage(error),\n timeSeconds: (stopTimeMilliseconds - startTimeMilliseconds) / 1000,\n });\n\n break;\n }\n }\n}\n\n/** `ai` rejects system messages inside `messages` unless told that a `buildPrompt` may place them there. */\nfunction toPromptOptions(\n built: string | ModelMessage[]\n): { prompt: string } | { messages: ModelMessage[]; allowSystemInMessages: true } {\n return typeof built === 'string' ? { prompt: built } : { messages: built, allowSystemInMessages: true };\n}\n\nfunction toLanguageModel(model: string): LanguageModel {\n const [providerId, modelId] = model.split('/');\n if (!providerId || !modelId) throw new Error(`bad model: ${model}`);\n const languageModel = providerByName[providerId]?.(modelId);\n if (!languageModel) throw new Error(`model not found: ${model}`);\n return languageModel;\n}\n"],"mappings":"8bAmBA,MAEMmB,EAA8F,CAElG,QAAAR,EAAA,QAEA,OAAAC,EAAA,OAEA,OAAAC,EAAA,OAEA,IAAAC,EAAA,GACF,EAEMM,EAAoBpB,EAAAA,EAAE,OAAO,CACjC,MAAOA,EAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CACzB,CAAC,EA0CD,eAAsBqB,EAAe,EAAoB,EAA+C,CACtG,IAAMC,GAAA,EAAOrB,EAAAA,UAAAA,CAAU,QAAQ,IAAI,EACnC,GAAI,CAACqB,EAAK,IAA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AI,CAAE,SAAUA,EAAO,sBAAuB,EAAK,CACxG,CAEA,SAASP,EAAgB,EAA8B,CACrD,GAAM,CAACQ,EAAYC,GAAWC,EAAM,MAAM,GAAG,EAC7C,GAAI,CAACF,GAAc,CAACC,EAAS,MAAU,MAAM,cAAcC,GAAO,EAClE,IAAMC,EAAgBrB,EAAekB,EAAW,GAAGC,CAAO,EAC1D,GAAI,CAACE,EAAe,MAAU,MAAM,oBAAoBD,GAAO,EAC/D,OAAOC,CACT"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ModelMessage } from 'ai';
|
|
2
1
|
import { type TestCaseResult } from '@exercode/problem-utils';
|
|
2
|
+
import type { ModelMessage } from 'ai';
|
|
3
3
|
/** A `test_cases/` entry; the preset uses `input` for the prompt and hands everything to `test`. */
|
|
4
4
|
interface LlmTestCase {
|
|
5
5
|
id: string;
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"node:fs";import t from"node:path";import{
|
|
1
|
+
import e from"node:fs";import t from"node:path";import{bedrock as n}from"@ai-sdk/amazon-bedrock";import{google as r}from"@ai-sdk/google";import{openai as i}from"@ai-sdk/openai";import{xai as a}from"@ai-sdk/xai";import{DecisionCode as o,parseArgs as s,printTestCaseResult as c,readTestCases as l}from"@exercode/problem-utils";import{getErrorMessage as u}from"@willbooster/shared-lib";import{generateText as d}from"ai";import{z as f}from"zod";const p={bedrock:n,google:r,openai:i,xai:a},m=f.object({model:f.string().min(1)});async function h(n,r){let i=s(process.argv);if(!i.cwd)throw Error(`cwd argument required`);let a=m.parse(i.params),f=await l(t.join(n,`test_cases`)),p=await e.promises.readFile(t.join(i.cwd,`prompt.txt`),`utf8`);for(let e of f){let t=Date.now();try{let{text:n}=await d({model:_(a.model),...g(r.buildPrompt?.({prompt:p,testCase:e})??p.replaceAll(`{input}`,e.input??``))}),i=Date.now(),s={testCaseId:e.id,decisionCode:o.ACCEPTED,stdin:e.input,stdout:n,timeSeconds:(i-t)/1e3,...await r.test({testCase:e,result:{output:n}})};if(c(s),s.decisionCode!==o.ACCEPTED)break}catch(n){let r=Date.now();c({testCaseId:e.id,decisionCode:o.RUNTIME_ERROR,stdin:e.input,stderr:u(n),timeSeconds:(r-t)/1e3});break}}}function g(e){return typeof e==`string`?{prompt:e}:{messages:e,allowSystemInMessages:!0}}function _(e){let[t,n]=e.split(`/`);if(!t||!n)throw Error(`bad model: ${e}`);let r=p[t]?.(n);if(!r)throw Error(`model not found: ${e}`);return r}export{h as llmJudgePreset};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["fs","path","providerByName","judgeParamsSchema","z","llmJudgePreset","args","parseArgs","params","testCases","readTestCases","problemDir","prompt","testCase","startTimeMilliseconds","generateText","toLanguageModel","toPromptOptions","options","stopTimeMilliseconds","testCaseResult","DecisionCode","text","printTestCaseResult","error","getErrorMessage","built","providerId","modelId","model","languageModel"],"sources":["../src/index.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\
|
|
1
|
+
{"version":3,"file":"index.js","names":["fs","path","providerByName","judgeParamsSchema","z","llmJudgePreset","args","parseArgs","params","testCases","readTestCases","problemDir","prompt","testCase","startTimeMilliseconds","generateText","toLanguageModel","toPromptOptions","options","stopTimeMilliseconds","testCaseResult","DecisionCode","text","printTestCaseResult","error","getErrorMessage","built","providerId","modelId","model","languageModel"],"sources":["../src/index.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { bedrock } from '@ai-sdk/amazon-bedrock';\nimport { google } from '@ai-sdk/google';\nimport { openai } from '@ai-sdk/openai';\nimport { xai } from '@ai-sdk/xai';\nimport {\n DecisionCode,\n parseArgs,\n printTestCaseResult,\n readTestCases,\n type TestCaseResult,\n} from '@exercode/problem-utils';\nimport { getErrorMessage } from '@willbooster/shared-lib';\nimport type { LanguageModel, ModelMessage } from 'ai';\nimport { generateText } from 'ai';\nimport { z } from 'zod';\n\nconst PROMPT_FILENAME = 'prompt.txt';\n\nconst providerByName: Record<string, typeof bedrock | typeof google | typeof openai | typeof xai> = {\n // requires `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION`\n bedrock,\n // requires `GOOGLE_GENERATIVE_AI_API_KEY`\n google,\n // requires `OPENAI_API_KEY`\n openai,\n // requires `XAI_API_KEY`\n xai,\n} as const;\n\nconst judgeParamsSchema = z.object({\n model: z.string().min(1),\n});\n\n/** A `test_cases/` entry; the preset uses `input` for the prompt and hands everything to `test`. */\ninterface LlmTestCase {\n id: string;\n input?: string;\n output?: string;\n /** Present when `<id>.fin/` exists; the preset does not copy it anywhere (there is no program run). */\n fileInputPath?: string;\n /** Present when `<id>.fout/` exists, for `test` to read. */\n fileOutputPath?: string;\n}\n\ninterface LlmJudgePresetOptions {\n buildPrompt?: (context: { prompt: string; testCase: LlmTestCase }) => string | ModelMessage[];\n test: (context: {\n testCase: LlmTestCase;\n result: { output: string };\n }) => Partial<TestCaseResult> | Promise<Partial<TestCaseResult>>;\n}\n\n/**\n * A preset judge function for running and testing a user prompt in LLM.\n *\n * @example\n * Create `judge.ts`:\n * ```ts\n * import { llmJudgePreset } from '@exercode/problem-utils-llm';\n * import { DecisionCode } from '@exercode/problem-utils';\n *\n * await llmJudgePreset(import.meta.dirname, {\n * test: (context) {\n * return { decisionCode: context.result.output ? DecisionCode.ACCEPTED : DecisionCode.WRONG_ANSWER };\n * }\n * });\n * ```\n *\n * Run with the required parameters:\n * ```bash\n * bun judge.ts model_answers/java '{ \"model\": \"gemini-2.5-flash-lite\" }'\n * ```\n */\nexport async function llmJudgePreset(problemDir: string, options: LlmJudgePresetOptions): Promise<void> {\n const args = parseArgs(process.argv);\n if (!args.cwd) throw new Error('cwd argument required');\n const params = judgeParamsSchema.parse(args.params);\n\n const testCases = await readTestCases(path.join(problemDir, 'test_cases'));\n\n const prompt = await fs.promises.readFile(path.join(args.cwd, PROMPT_FILENAME), 'utf8');\n\n for (const testCase of testCases) {\n const startTimeMilliseconds = Date.now();\n try {\n const { text } = await generateText({\n model: toLanguageModel(params.model),\n ...toPromptOptions(\n options.buildPrompt?.({ prompt, testCase }) ?? prompt.replaceAll('{input}', testCase.input ?? '')\n ),\n });\n\n const stopTimeMilliseconds = Date.now();\n\n const testCaseResult = {\n testCaseId: testCase.id,\n decisionCode: DecisionCode.ACCEPTED,\n stdin: testCase.input,\n stdout: text,\n timeSeconds: (stopTimeMilliseconds - startTimeMilliseconds) / 1000,\n ...(await options.test({ testCase, result: { output: text } })),\n };\n\n printTestCaseResult(testCaseResult);\n\n if (testCaseResult.decisionCode !== DecisionCode.ACCEPTED) break;\n } catch (error) {\n const stopTimeMilliseconds = Date.now();\n\n printTestCaseResult({\n testCaseId: testCase.id,\n decisionCode: DecisionCode.RUNTIME_ERROR,\n stdin: testCase.input,\n stderr: getErrorMessage(error),\n timeSeconds: (stopTimeMilliseconds - startTimeMilliseconds) / 1000,\n });\n\n break;\n }\n }\n}\n\n/** `ai` rejects system messages inside `messages` unless told that a `buildPrompt` may place them there. */\nfunction toPromptOptions(\n built: string | ModelMessage[]\n): { prompt: string } | { messages: ModelMessage[]; allowSystemInMessages: true } {\n return typeof built === 'string' ? { prompt: built } : { messages: built, allowSystemInMessages: true };\n}\n\nfunction toLanguageModel(model: string): LanguageModel {\n const [providerId, modelId] = model.split('/');\n if (!providerId || !modelId) throw new Error(`bad model: ${model}`);\n const languageModel = providerByName[providerId]?.(modelId);\n if (!languageModel) throw new Error(`model not found: ${model}`);\n return languageModel;\n}\n"],"mappings":"ybAmBA,MAEME,EAA8F,CAElG,UAEA,SAEA,SAEA,KACF,EAEMC,EAAoBC,EAAE,OAAO,CACjC,MAAOA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CACzB,CAAC,EA0CD,eAAsBC,EAAe,EAAoB,EAA+C,CACtG,IAAMC,EAAOC,EAA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AC7C,GAAI,CAACF,GAAc,CAACC,EAAS,MAAU,MAAM,cAAcC,GAAO,EAClE,IAAMC,EAAgB5B,EAAeyB,EAAW,GAAGC,CAAO,EAC1D,GAAI,CAACE,EAAe,MAAU,MAAM,oBAAoBD,GAAO,EAC/D,OAAOC,CACT"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exercode/problem-utils-llm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"description": "Exercode llm judging utilities",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"author": "WillBooster Inc.",
|
|
5
7
|
"repository": {
|
|
6
8
|
"type": "git",
|
|
7
9
|
"url": "git+https://github.com/WillBooster/exercode-problem-utils.git",
|
|
8
10
|
"directory": "packages/problem-utils-llm"
|
|
9
11
|
},
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
"files": [
|
|
13
|
+
"dist/"
|
|
14
|
+
],
|
|
13
15
|
"type": "module",
|
|
16
|
+
"sideEffects": false,
|
|
17
|
+
"main": "dist/index.cjs",
|
|
18
|
+
"module": "dist/index.js",
|
|
19
|
+
"types": "dist/index.d.ts",
|
|
14
20
|
"exports": {
|
|
15
21
|
".": {
|
|
16
22
|
"types": "./dist/index.d.ts",
|
|
@@ -18,12 +24,10 @@
|
|
|
18
24
|
"require": "./dist/index.cjs"
|
|
19
25
|
}
|
|
20
26
|
},
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"dist/"
|
|
26
|
-
],
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public",
|
|
29
|
+
"registry": "https://registry.npmjs.org/"
|
|
30
|
+
},
|
|
27
31
|
"scripts": {
|
|
28
32
|
"build": "build-ts lib --input src/index.ts",
|
|
29
33
|
"cleanup": "bun wb lint --fix --format",
|
|
@@ -36,32 +40,25 @@
|
|
|
36
40
|
"verify-full": "bun wb verify --full"
|
|
37
41
|
},
|
|
38
42
|
"dependencies": {
|
|
39
|
-
"@ai-sdk/amazon-bedrock": "5.0.
|
|
40
|
-
"@ai-sdk/google": "4.0.
|
|
41
|
-
"@ai-sdk/openai": "4.0.
|
|
42
|
-
"@ai-sdk/xai": "5.0.
|
|
43
|
-
"@exercode/problem-utils": "4.3.
|
|
43
|
+
"@ai-sdk/amazon-bedrock": "5.0.118",
|
|
44
|
+
"@ai-sdk/google": "4.0.99",
|
|
45
|
+
"@ai-sdk/openai": "4.0.96",
|
|
46
|
+
"@ai-sdk/xai": "5.0.24",
|
|
47
|
+
"@exercode/problem-utils": "4.3.5",
|
|
44
48
|
"@willbooster/shared-lib": "10.20.0",
|
|
45
|
-
"ai": "7.0.
|
|
46
|
-
"zod": "4.6.
|
|
49
|
+
"ai": "7.0.143",
|
|
50
|
+
"zod": "4.6.7"
|
|
47
51
|
},
|
|
48
52
|
"devDependencies": {
|
|
49
53
|
"@tsconfig/bun": "1.0.11",
|
|
50
|
-
"@types/bun": "1.4.
|
|
51
|
-
"@willbooster/
|
|
52
|
-
"@willbooster/
|
|
53
|
-
"@willbooster/wb": "22.26.1",
|
|
54
|
+
"@types/bun": "1.4.3",
|
|
55
|
+
"@willbooster/oxlint-config": "1.4.9",
|
|
56
|
+
"@willbooster/wb": "22.29.1",
|
|
54
57
|
"build-ts": "21.0.27",
|
|
55
|
-
"
|
|
56
|
-
"oxlint": "
|
|
57
|
-
"oxlint-tsgolint": "7.0.2004",
|
|
58
|
-
"sort-package-json": "4.0.0"
|
|
58
|
+
"oxlint": "1.88.0",
|
|
59
|
+
"oxlint-tsgolint": "7.0.2004"
|
|
59
60
|
},
|
|
60
61
|
"engines": {
|
|
61
62
|
"node": ">=24"
|
|
62
|
-
},
|
|
63
|
-
"publishConfig": {
|
|
64
|
-
"access": "public",
|
|
65
|
-
"registry": "https://registry.npmjs.org/"
|
|
66
63
|
}
|
|
67
64
|
}
|