Skip to content

Commit b510c7d

Browse files
committed
chore: use devcodex npm scope
1 parent 24d0bdb commit b510c7d

6 files changed

Lines changed: 17 additions & 15 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Provide a consumer-only README with an executable JavaScript quickstart.
77
- Ship `@types/node` as a package dependency so clean TypeScript consumers can resolve the public legacy declarations.
88
- Preserve empty, multiline, spaced, and escaped quoted fields when parsing legacy CSV input.
9+
- Publish the initial package under the `@devcodex/extraction-runtime` npm scope.
910

1011
- Reject schema array serialization hooks, validate UTF-8 before response decoding, and isolate input property-read errors without stopping later inputs.
1112

‎README.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**English** | [简体中文](README.zh-CN.md)
44

5-
`@devcodex-labs/extraction-runtime` extracts structured JSON from document and image URLs using Mistral OCR. It also provides local text parsers for TXT, Markdown, JSON, CSV, and HTML.
5+
`@devcodex/extraction-runtime` extracts structured JSON from document and image URLs using Mistral OCR. It also provides local text parsers for TXT, Markdown, JSON, CSV, and HTML.
66

77
## Contents
88

@@ -16,7 +16,7 @@
1616
## Install
1717

1818
```sh
19-
npm install @devcodex-labs/extraction-runtime
19+
npm install @devcodex/extraction-runtime
2020
```
2121

2222
Requires Node.js 20+. The package is ESM-only and ships TypeScript declarations together with the Node.js type definitions they reference. It has no runtime JavaScript dependencies.
@@ -26,7 +26,7 @@ Requires Node.js 20+. The package is ESM-only and ships TypeScript declarations
2626
The model catalog is static, needs no credentials, and makes no network requests:
2727

2828
```js
29-
import { listExtractionModels } from "@devcodex-labs/extraction-runtime";
29+
import { listExtractionModels } from "@devcodex/extraction-runtime";
3030

3131
const models = listExtractionModels();
3232
// [{ provider: "mistral", model: "mistral-ocr-4-1", name: "Mistral OCR 4.1",
@@ -43,7 +43,7 @@ Use the following as your application's `extract.mjs` entry point:
4343
import {
4444
extractStructured,
4545
ExtractionRuntimeError,
46-
} from "@devcodex-labs/extraction-runtime";
46+
} from "@devcodex/extraction-runtime";
4747

4848
const apiKey = process.env.MISTRAL_API_KEY;
4949
const documentUrl = process.env.INVOICE_URL;
@@ -182,7 +182,7 @@ The following deprecated APIs remain compatible. They are separate from structur
182182
### Usage
183183

184184
```ts
185-
import { extract } from "@devcodex-labs/extraction-runtime";
185+
import { extract } from "@devcodex/extraction-runtime";
186186

187187
const result = await extract("./README.md");
188188

@@ -227,7 +227,7 @@ Detects the likely file type from filename, MIME type, and lightweight content s
227227
Registers a parser at runtime.
228228

229229
```ts
230-
import { registerParser } from "@devcodex-labs/extraction-runtime";
230+
import { registerParser } from "@devcodex/extraction-runtime";
231231

232232
registerParser({
233233
id: "custom",

‎README.zh-CN.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[English](README.md) | **简体中文**
44

5-
`@devcodex-labs/extraction-runtime` 使用 Mistral OCR 从文档和图片 URL 中提取结构化 JSON,也提供 TXT、Markdown、JSON、CSV 和 HTML 的本地文本解析能力。
5+
`@devcodex/extraction-runtime` 使用 Mistral OCR 从文档和图片 URL 中提取结构化 JSON,也提供 TXT、Markdown、JSON、CSV 和 HTML 的本地文本解析能力。
66

77
## 目录
88

@@ -16,7 +16,7 @@
1616
## 安装
1717

1818
```sh
19-
npm install @devcodex-labs/extraction-runtime
19+
npm install @devcodex/extraction-runtime
2020
```
2121

2222
要求 Node.js 20+。本包仅支持 ESM,并随包安装其 TypeScript 声明引用的 Node.js 类型定义;没有运行时 JavaScript 依赖。
@@ -26,7 +26,7 @@ npm install @devcodex-labs/extraction-runtime
2626
模型清单是静态的,无需凭据,不发起网络请求:
2727

2828
```js
29-
import { listExtractionModels } from "@devcodex-labs/extraction-runtime";
29+
import { listExtractionModels } from "@devcodex/extraction-runtime";
3030

3131
const models = listExtractionModels();
3232
// [{ provider: "mistral", model: "mistral-ocr-4-1", name: "Mistral OCR 4.1",
@@ -43,7 +43,7 @@ const models = listExtractionModels();
4343
import {
4444
extractStructured,
4545
ExtractionRuntimeError,
46-
} from "@devcodex-labs/extraction-runtime";
46+
} from "@devcodex/extraction-runtime";
4747

4848
const apiKey = process.env.MISTRAL_API_KEY;
4949
const documentUrl = process.env.INVOICE_URL;
@@ -182,7 +182,7 @@ Schema 必须是普通 JSON 数据。自定义序列化钩子、访问器、稀
182182
### 使用示例
183183

184184
```ts
185-
import { extract } from "@devcodex-labs/extraction-runtime";
185+
import { extract } from "@devcodex/extraction-runtime";
186186

187187
const result = await extract("./README.md");
188188

@@ -227,7 +227,7 @@ const result = await extract(buffer, {
227227
在运行时注册解析器。
228228

229229
```ts
230-
import { registerParser } from "@devcodex-labs/extraction-runtime";
230+
import { registerParser } from "@devcodex/extraction-runtime";
231231

232232
registerParser({
233233
id: "custom",

‎package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@devcodex-labs/extraction-runtime",
2+
"name": "@devcodex/extraction-runtime",
33
"version": "1.0.0",
44
"description": "URL-based structured OCR provider runtime with a Mistral adapter and compatible legacy parsers.",
55
"type": "module",

‎test/catalog.test.mjs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ test("call-level errors preserve standard Error behavior without extra context",
7979

8080
test("package declares Node types and root declarations enforce public contracts", () => {
8181
const packageJson = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
82+
assert.equal(packageJson.name, "@devcodex/extraction-runtime");
8283
assert.equal(packageJson.dependencies?.["@types/node"], "^20.19.0");
8384
assert.equal(packageJson.devDependencies?.["@types/node"], undefined);
8485

0 commit comments

Comments
 (0)