Skip to content

Commit fe083ed

Browse files
Merge pull request #3 from CASParser/release-please--branches--main--changes--next--components--cas-parser-node
release: 1.1.0
2 parents cc26078 + 10fd266 commit fe083ed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+7866
-83
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,13 @@ jobs:
7979
- name: Set up Node
8080
uses: actions/setup-node@v4
8181
with:
82-
node-version: '20'
82+
node-version: '22'
8383

8484
- name: Bootstrap
8585
run: ./scripts/bootstrap
8686

87+
- name: Build
88+
run: ./scripts/build
89+
8790
- name: Run tests
8891
run: ./scripts/test

.github/workflows/publish-npm.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
name: Publish NPM
55
on:
66
workflow_dispatch:
7+
inputs:
8+
path:
9+
description: The path to run the release in, e.g. '.' or 'packages/mcp-server'
10+
required: true
711

812
release:
913
types: [published]
@@ -27,6 +31,11 @@ jobs:
2731
2832
- name: Publish to NPM
2933
run: |
30-
bash ./bin/publish-npm
34+
if [ -n "${{ github.event.inputs.path }}" ]; then
35+
PATHS_RELEASED='[\"${{ github.event.inputs.path }}\"]'
36+
else
37+
PATHS_RELEASED='[\".\", \"packages/mcp-server\"]'
38+
fi
39+
yarn tsn scripts/publish-packages.ts "{ \"paths_released\": \"$PATHS_RELEASED\" }"
3140
env:
3241
NPM_TOKEN: ${{ secrets.CAS_PARSER_NPM_TOKEN || secrets.NPM_TOKEN }}

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ CHANGELOG.md
44
/deno
55

66
# don't format tsc output, will break source maps
7-
/dist
7+
dist

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.0.0"
2+
".": "1.1.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 5
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser%2Fcas-parser-33841d833a48438cd79a13b2e70eeb61551b67e954ed788209ece1b0f5886e15.yml
3-
openapi_spec_hash: 6a784691ea7c8cf7c2987c93f6a2ab25
4-
config_hash: c35d87a285c3e03721211e5585e57e54
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser%2Fcas-parser-b7fdba3d3f97c7debc22c7ca30b828bce81bcd64648df8c94029b27a3321ebb9.yml
3+
openapi_spec_hash: 03f1315f1d32ada42445ca920f047dff
4+
config_hash: 1de8a243a3962065e289ca915dfc6127

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## 1.1.0 (2025-08-18)
4+
5+
Full Changelog: [v1.0.0...v1.1.0](https://github.com/CASParser/cas-parser-node/compare/v1.0.0...v1.1.0)
6+
7+
### Features
8+
9+
* **api:** api update ([6108aea](https://github.com/CASParser/cas-parser-node/commit/6108aea7cb4622bb475866a49784a9f519bb487e))
10+
11+
12+
### Chores
13+
14+
* configure new SDK language ([8c5268d](https://github.com/CASParser/cas-parser-node/commit/8c5268d5a259411365d9f567f0c14e31e3b3c100))
15+
* update SDK settings ([e57c92b](https://github.com/CASParser/cas-parser-node/commit/e57c92bdc3a0be8def3e0110adf637141d861fe8))
16+
317
## 1.0.0 (2025-08-18)
418

519
Full Changelog: [v0.0.1-alpha.0...v1.0.0](https://github.com/CASParser/cas-parser-node/compare/v0.0.1-alpha.0...v1.0.0)

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ $ cd cas-parser-node
5555
# With yarn
5656
$ yarn link
5757
$ cd ../my-package
58-
$ yarn link cas-parser
58+
$ yarn link cas-parser-node
5959

6060
# With pnpm
6161
$ pnpm link --global
6262
$ cd ../my-package
63-
$ pnpm link -—global cas-parser
63+
$ pnpm link -—global cas-parser-node
6464
```
6565

6666
## Running tests

README.md

Lines changed: 11 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Cas Parser TypeScript API Library
22

3-
[![NPM version](<https://img.shields.io/npm/v/cas-parser.svg?label=npm%20(stable)>)](https://npmjs.org/package/cas-parser) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/cas-parser)
3+
[![NPM version](<https://img.shields.io/npm/v/cas-parser-node.svg?label=npm%20(stable)>)](https://npmjs.org/package/cas-parser-node) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/cas-parser-node)
44

55
This library provides convenient access to the Cas Parser REST API from server-side TypeScript or JavaScript.
66

@@ -11,7 +11,7 @@ It is generated with [Stainless](https://www.stainless.com/).
1111
## Installation
1212

1313
```sh
14-
npm install cas-parser
14+
npm install cas-parser-node
1515
```
1616

1717
## Usage
@@ -20,7 +20,7 @@ The full API of this library can be found in [api.md](api.md).
2020

2121
<!-- prettier-ignore -->
2222
```js
23-
import CasParser from 'cas-parser';
23+
import CasParser from 'cas-parser-node';
2424

2525
const client = new CasParser({
2626
apiKey: process.env['CAS_PARSER_API_KEY'], // This is the default and can be omitted
@@ -38,7 +38,7 @@ This library includes TypeScript definitions for all request params and response
3838

3939
<!-- prettier-ignore -->
4040
```ts
41-
import CasParser from 'cas-parser';
41+
import CasParser from 'cas-parser-node';
4242

4343
const client = new CasParser({
4444
apiKey: process.env['CAS_PARSER_API_KEY'], // This is the default and can be omitted
@@ -50,35 +50,6 @@ const unifiedResponse: CasParser.UnifiedResponse = await client.casParser.camsKf
5050

5151
Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
5252

53-
## File uploads
54-
55-
Request parameters that correspond to file uploads can be passed in many different forms:
56-
57-
- `File` (or an object with the same structure)
58-
- a `fetch` `Response` (or an object with the same structure)
59-
- an `fs.ReadStream`
60-
- the return value of our `toFile` helper
61-
62-
```ts
63-
import fs from 'fs';
64-
import CasParser, { toFile } from 'cas-parser';
65-
66-
const client = new CasParser();
67-
68-
// If you have access to Node `fs` we recommend using `fs.createReadStream()`:
69-
await client.casParser.camsKfintech({ pdf_file: fs.createReadStream('/path/to/file') });
70-
71-
// Or if you have the web `File` API you can pass a `File` instance:
72-
await client.casParser.camsKfintech({ pdf_file: new File(['my bytes'], 'file') });
73-
74-
// You can also pass a `fetch` `Response`:
75-
await client.casParser.camsKfintech({ pdf_file: await fetch('https://somesite/file') });
76-
77-
// Finally, if none of the above are convenient, you can use our `toFile` helper:
78-
await client.casParser.camsKfintech({ pdf_file: await toFile(Buffer.from('my bytes'), 'file') });
79-
await client.casParser.camsKfintech({ pdf_file: await toFile(new Uint8Array([0, 1, 2]), 'file') });
80-
```
81-
8253
## Handling errors
8354

8455
When the library is unable to connect to the API,
@@ -190,7 +161,7 @@ The log level can be configured in two ways:
190161
2. Using the `logLevel` client option (overrides the environment variable if set)
191162

192163
```ts
193-
import CasParser from 'cas-parser';
164+
import CasParser from 'cas-parser-node';
194165

195166
const client = new CasParser({
196167
logLevel: 'debug', // Show all log messages
@@ -218,7 +189,7 @@ When providing a custom logger, the `logLevel` option still controls which messa
218189
below the configured level will not be sent to your logger.
219190

220191
```ts
221-
import CasParser from 'cas-parser';
192+
import CasParser from 'cas-parser-node';
222193
import pino from 'pino';
223194

224195
const logger = pino();
@@ -287,7 +258,7 @@ globalThis.fetch = fetch;
287258
Or pass it to the client:
288259

289260
```ts
290-
import CasParser from 'cas-parser';
261+
import CasParser from 'cas-parser-node';
291262
import fetch from 'my-fetch';
292263

293264
const client = new CasParser({ fetch });
@@ -298,7 +269,7 @@ const client = new CasParser({ fetch });
298269
If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)
299270

300271
```ts
301-
import CasParser from 'cas-parser';
272+
import CasParser from 'cas-parser-node';
302273

303274
const client = new CasParser({
304275
fetchOptions: {
@@ -315,7 +286,7 @@ options to requests:
315286
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg" align="top" width="18" height="21"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>
316287

317288
```ts
318-
import CasParser from 'cas-parser';
289+
import CasParser from 'cas-parser-node';
319290
import * as undici from 'undici';
320291

321292
const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
@@ -329,7 +300,7 @@ const client = new CasParser({
329300
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg" align="top" width="18" height="21"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>
330301

331302
```ts
332-
import CasParser from 'cas-parser';
303+
import CasParser from 'cas-parser-node';
333304

334305
const client = new CasParser({
335306
fetchOptions: {
@@ -341,7 +312,7 @@ const client = new CasParser({
341312
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg" align="top" width="18" height="21"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>
342313

343314
```ts
344-
import CasParser from 'npm:cas-parser';
315+
import CasParser from 'npm:cas-parser-node';
345316

346317
const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
347318
const client = new CasParser({

eslint.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default tseslint.config(
2525
{
2626
patterns: [
2727
{
28-
regex: '^cas-parser(/.*)?',
28+
regex: '^cas-parser-node(/.*)?',
2929
message: 'Use a relative import, not a package import.',
3030
},
3131
],
@@ -34,7 +34,7 @@ export default tseslint.config(
3434
},
3535
},
3636
{
37-
files: ['tests/**', 'examples/**'],
37+
files: ['tests/**', 'examples/**', 'packages/**'],
3838
rules: {
3939
'no-restricted-imports': 'off',
4040
},

jest.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ const config: JestConfigWithTsJest = {
77
'^.+\\.(t|j)sx?$': ['@swc/jest', { sourceMaps: 'inline' }],
88
},
99
moduleNameMapper: {
10-
'^cas-parser$': '<rootDir>/src/index.ts',
11-
'^cas-parser/(.*)$': '<rootDir>/src/$1',
10+
'^cas-parser-node$': '<rootDir>/src/index.ts',
11+
'^cas-parser-node/(.*)$': '<rootDir>/src/$1',
1212
},
1313
modulePathIgnorePatterns: [
1414
'<rootDir>/ecosystem-tests/',

0 commit comments

Comments
 (0)