Skip to content

Commit caf14a1

Browse files
committed
Revert "fix(node): publish under the @artiz.ru scope"
This reverts commit cd0b6bc.
1 parent cd0b6bc commit caf14a1

8 files changed

Lines changed: 25 additions & 25 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Publish the `@artiz.ru/fleischwolf` npm package (Node.js / Bun native bindings)
2-
# for a chosen release. The package is a native N-API addon, so it can't be a
3-
# one-line `npm publish`: it's built on a matrix of native runners (one per
4-
# OS/arch), each producing a platform `.node`, then a publish job assembles the
5-
# main package plus per-platform `optionalDependencies`
6-
# (@artiz.ru/fleischwolf-<triple>) via napi-rs and publishes them all.
1+
# Publish the `fleischwolf` npm package (Node.js / Bun native bindings) for a
2+
# chosen release. The package is a native N-API addon, so it can't be a one-line
3+
# `npm publish`: it's built on a matrix of native runners (one per OS/arch),
4+
# each producing a platform `.node`, then a publish job assembles the main
5+
# package plus per-platform `optionalDependencies` (fleischwolf-<triple>) via
6+
# napi-rs and publishes them all.
77
#
88
# Trigger: manual only (workflow_dispatch). By default it builds the latest
99
# master (the version in the workspace Cargo.toml); optionally pass a release
@@ -12,8 +12,8 @@
1212
# every master push. Run it from the Actions tab (or
1313
# `gh workflow run npm-publish.yml`, optionally `-f tag=v0.7.0`).
1414
#
15-
# Requires one repository secret: NPM_TOKEN — an npm token with publish rights to
16-
# the `@artiz.ru` scope (covers @artiz.ru/fleischwolf and the platform packages).
15+
# Requires one repository secret: NPM_TOKEN — an npm automation token with
16+
# publish rights to `fleischwolf` and the `fleischwolf-*` platform packages.
1717

1818
name: npm publish
1919

@@ -157,16 +157,16 @@ jobs:
157157
fi
158158
fi
159159
echo "version=$v" >> "$GITHUB_OUTPUT"
160-
echo "Publishing @artiz.ru/fleischwolf@$v (ref: ${{ inputs.tag || github.ref }})"
160+
echo "Publishing fleischwolf@$v (ref: ${{ inputs.tag || github.ref }})"
161161
162162
# Skip cleanly if this version is already on npm (idempotent re-runs).
163163
- name: Check if already published
164164
id: check
165165
run: |
166166
v="${{ steps.ver.outputs.version }}"
167-
if npm view "@artiz.ru/fleischwolf@$v" version >/dev/null 2>&1; then
167+
if npm view "fleischwolf@$v" version >/dev/null 2>&1; then
168168
echo "published=true" >> "$GITHUB_OUTPUT"
169-
echo "@artiz.ru/fleischwolf@$v is already on npm — skipping."
169+
echo "fleischwolf@$v is already on npm — skipping."
170170
else
171171
echo "published=false" >> "$GITHUB_OUTPUT"
172172
fi

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ cd crates/fleischwolf-node && npm install && npm run build
167167
```
168168

169169
```ts
170-
import { convertFile, convertFileAsync, streamFileMarkdown } from '@artiz.ru/fleischwolf'
170+
import { convertFile, convertFileAsync, streamFileMarkdown } from 'fleischwolf'
171171

172172
const { content } = convertFile('report.docx') // Markdown
173173
const json = await convertFileAsync('paper.pdf', { to: 'json' })

crates/fleischwolf-node/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ Released versions ship **prebuilt** native binaries, so no Rust toolchain is
1616
needed to use the package:
1717

1818
```bash
19-
npm install @artiz.ru/fleischwolf # or: bun add @artiz.ru/fleischwolf
19+
npm install fleischwolf # or: bun add fleischwolf
2020
```
2121

2222
Prebuilt platforms: Linux x64 / arm64 (glibc) and Windows x64. (macOS isn't
2323
prebuilt — build from source, see below.) The right binary is pulled in
24-
automatically as a platform-specific `optionalDependency` (`@artiz.ru/fleischwolf-<triple>`). Releases are published to npm by
24+
automatically as a platform-specific `optionalDependency` (`fleischwolf-<triple>`). Releases are published to npm by
2525
manually running the `npm publish` workflow
2626
(`.github/workflows/npm-publish.yml`) — by default it builds the latest master
2727
(the workspace version); optionally pass a release tag to build that instead.
@@ -48,7 +48,7 @@ npm run build # release build → fleischwolf.<platform>.node + native.js
4848
## Quick start
4949

5050
```js
51-
import { convertFile, convert, DocumentConverter } from '@artiz.ru/fleischwolf'
51+
import { convertFile, convert, DocumentConverter } from 'fleischwolf'
5252

5353
// Convert a file — format detected from the extension.
5454
const { content } = convertFile('report.docx')
@@ -65,15 +65,15 @@ const converter = new DocumentConverter({ strict: true })
6565
const a = converter.convert({ name: 'a.md', data: Buffer.from('# A\n') })
6666
```
6767

68-
CommonJS works too: `const { convertFile } = require('@artiz.ru/fleischwolf')`.
68+
CommonJS works too: `const { convertFile } = require('fleischwolf')`.
6969

7070
### Async (off the event loop)
7171

7272
Conversion is CPU-bound; the `*Async` variants run it on the libuv thread pool
7373
so the event loop stays free. Prefer these for PDF/image and for servers.
7474

7575
```js
76-
import { convertFileAsync } from '@artiz.ru/fleischwolf'
76+
import { convertFileAsync } from 'fleischwolf'
7777

7878
const res = await convertFileAsync('paper.pdf', { to: 'json' })
7979
```
@@ -86,7 +86,7 @@ before the whole document is done; concatenating the chunks reproduces the
8686
buffered `content` byte-for-byte.
8787

8888
```js
89-
import { streamFileMarkdown } from '@artiz.ru/fleischwolf'
89+
import { streamFileMarkdown } from 'fleischwolf'
9090

9191
for await (const chunk of streamFileMarkdown('paper.pdf')) {
9292
process.stdout.write(chunk)
@@ -102,7 +102,7 @@ Python docling downloads its models on first use. Converting a PDF/image/METS
102102
input **throws** until they're installed:
103103

104104
```js
105-
import { installDependencies, checkDependencies, convertFileAsync } from '@artiz.ru/fleischwolf'
105+
import { installDependencies, checkDependencies, convertFileAsync } from 'fleischwolf'
106106

107107
await convertFileAsync('paper.pdf') // ❌ throws: "requires the PDF/ML dependencies … call installDependencies()"
108108

@@ -147,7 +147,7 @@ every ONNX model — on each call. To convert many PDFs/images, reuse a `Pipelin
147147
so the models load **once**:
148148

149149
```js
150-
import { Pipeline } from '@artiz.ru/fleischwolf'
150+
import { Pipeline } from 'fleischwolf'
151151

152152
const pipeline = new Pipeline({ strict: true })
153153
for (const path of pdfPaths) {

crates/fleischwolf-node/examples/bun-basic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
streamFileMarkdown,
1515
DocumentConverter,
1616
type ConvertResult,
17-
} from '@artiz.ru/fleischwolf'
17+
} from 'fleischwolf'
1818

1919
const here = dirname(fileURLToPath(import.meta.url))
2020
const html = join(here, 'inputs', 'sample.html')

crates/fleischwolf-node/examples/node-basic.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
convert,
1515
DocumentConverter,
1616
supportedFormats,
17-
} from '@artiz.ru/fleischwolf'
17+
} from 'fleischwolf'
1818

1919
const here = dirname(fileURLToPath(import.meta.url))
2020

crates/fleischwolf-node/examples/pdf-pipeline.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// (pdfium + the layout/OCR/TableFormer ONNX models). `installDependencies()`
88
// provisions them; without it, converting a PDF throws a clear error.
99

10-
import { installDependencies, checkDependencies, convertFileAsync, Pipeline } from '@artiz.ru/fleischwolf'
10+
import { installDependencies, checkDependencies, convertFileAsync, Pipeline } from 'fleischwolf'
1111

1212
const file = process.argv[2] ?? 'document.pdf'
1313

crates/fleischwolf-node/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export interface InstallOptions {
9191
* ready (e.g. no models URL and no local layout model).
9292
*
9393
* @example
94-
* import { installDependencies, convertFileAsync } from '@artiz.ru/fleischwolf'
94+
* import { installDependencies, convertFileAsync } from 'fleischwolf'
9595
* await installDependencies({ modelsUrl: 'https://example.com/fleischwolf-models' })
9696
* const res = await convertFileAsync('paper.pdf', { to: 'markdown' })
9797
*/

crates/fleischwolf-node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@artiz.ru/fleischwolf",
2+
"name": "fleischwolf",
33
"version": "0.6.1",
44
"description": "Node.js / Bun bindings for Fleischwolf — a Rust port of docling. Convert Markdown, HTML, DOCX, PPTX, XLSX, PDF, images and more into a unified DoclingDocument (Markdown or docling-core JSON).",
55
"keywords": [

0 commit comments

Comments
 (0)