marc-ts 0.1.0

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.
@@ -0,0 +1,23 @@
1
+ import { MarcWarning, MarcWarningType, ParseOptions, ParseResult } from './types';
2
+ export type { MarcWarning, MarcWarningType, ParseOptions, ParseResult };
3
+ /**
4
+ * Create a warning object.
5
+ *
6
+ * @param type - The warning type
7
+ * @param message - The warning message
8
+ * @param position - Optional byte position in the record
9
+ * @param tag - Optional field tag associated with the warning
10
+ * @returns A MarcWarning object
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * const warning = createWarning(
15
+ * 'invalid_leader',
16
+ * 'Leader length is invalid',
17
+ * 0,
18
+ * undefined
19
+ * );
20
+ * ```
21
+ */
22
+ export declare function createWarning(type: MarcWarningType, message: string, position?: number, tag?: string): MarcWarning;
23
+ //# sourceMappingURL=warnings.d.ts.map
package/package.json ADDED
@@ -0,0 +1,91 @@
1
+ {
2
+ "name": "marc-ts",
3
+ "version": "0.1.0",
4
+ "description": "TypeScript MARC21 library for Node.js and browsers",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/index.cjs",
13
+ "types": "./dist/index.d.ts"
14
+ },
15
+ "./xml": {
16
+ "import": "./dist/marcxml.js",
17
+ "require": "./dist/marcxml.cjs",
18
+ "types": "./dist/marcxml.d.ts"
19
+ },
20
+ "./json": {
21
+ "import": "./dist/marcjson.js",
22
+ "require": "./dist/marcjson.cjs",
23
+ "types": "./dist/marcjson.d.ts"
24
+ },
25
+ "./txt": {
26
+ "import": "./dist/marctxt.js",
27
+ "require": "./dist/marctxt.cjs",
28
+ "types": "./dist/marctxt.d.ts"
29
+ }
30
+ },
31
+ "files": [
32
+ "dist",
33
+ "!dist/**/*.d.ts.map",
34
+ "README.md",
35
+ "LICENSE"
36
+ ],
37
+ "scripts": {
38
+ "build": "vite build",
39
+ "test": "vitest",
40
+ "test:coverage": "vitest --coverage",
41
+ "test:ui": "vitest --ui",
42
+ "type-check": "tsc --noEmit",
43
+ "lint": "eslint src",
44
+ "lint:fix": "eslint src --fix",
45
+ "format": "prettier --write \"src/**/*.ts\"",
46
+ "format:check": "prettier --check \"src/**/*.ts\"",
47
+ "prepublishOnly": "npm run type-check && npm run lint && npm test && npm run build"
48
+ },
49
+ "keywords": [
50
+ "marc",
51
+ "marc21",
52
+ "marc-record",
53
+ "bibliographic",
54
+ "library",
55
+ "metadata",
56
+ "iso2709",
57
+ "typescript",
58
+ "browser",
59
+ "nodejs"
60
+ ],
61
+ "author": "James Fournie <james.fournie@gmail.com>",
62
+ "license": "MIT",
63
+ "repository": {
64
+ "type": "git",
65
+ "url": "https://github.com/jamesrf/marc-ts"
66
+ },
67
+ "bugs": {
68
+ "url": "https://github.com/jamesrf/marc-ts/issues"
69
+ },
70
+ "homepage": "https://github.com/jamesrf/marc-ts#readme",
71
+ "engines": {
72
+ "node": ">=20.19.0"
73
+ },
74
+ "browser": {
75
+ "buffer": false
76
+ },
77
+ "devDependencies": {
78
+ "@types/node": "^25.8.0",
79
+ "@typescript-eslint/eslint-plugin": "^8.59.3",
80
+ "@typescript-eslint/parser": "^8.59.3",
81
+ "@vitest/coverage-v8": "^4.1.6",
82
+ "@vitest/ui": "^4.1.6",
83
+ "esbuild": "^0.28.0",
84
+ "eslint": "^10.4.0",
85
+ "prettier": "^3.0.0",
86
+ "typescript": "^5.3.0",
87
+ "vite": "^8.0.13",
88
+ "vite-plugin-dts": "^5.0.0",
89
+ "vitest": "^4.1.6"
90
+ }
91
+ }