@toolproof-npm/schema 0.1.15 → 0.1.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/README.md +59 -59
- package/package.json +44 -49
package/README.md
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
# @toolproof-npm/schema
|
|
2
|
-
|
|
3
|
-
JSON schemas and TypeScript types for ToolProof
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
pnpm add @toolproof-npm/schema
|
|
9
|
-
# or
|
|
10
|
-
npm install @toolproof-npm/schema
|
|
11
|
-
# or
|
|
12
|
-
yarn add @toolproof-npm/schema
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Usage
|
|
16
|
-
|
|
17
|
-
### Import Schemas and Types
|
|
18
|
-
|
|
19
|
-
```typescript
|
|
20
|
-
import { /* schemas and types */ } from '@toolproof-npm/schema';
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Features
|
|
24
|
-
|
|
25
|
-
- JSON Schema definitions with $defs subschemas
|
|
26
|
-
- Generated TypeScript types from JSON schemas
|
|
27
|
-
- Runtime schema validation support
|
|
28
|
-
- Extractors for non-JSON resource types
|
|
29
|
-
- Schema bundling utilities
|
|
30
|
-
|
|
31
|
-
## Development
|
|
32
|
-
|
|
33
|
-
### Generate Types
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
pnpm run generateTypes
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### Build
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
pnpm run build
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Update (Clean build + generate types)
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
pnpm run update
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Requirements
|
|
52
|
-
|
|
53
|
-
- Node.js 16+
|
|
54
|
-
- TypeScript 4.5+ (for TypeScript projects)
|
|
55
|
-
|
|
56
|
-
## License
|
|
57
|
-
|
|
58
|
-
MIT
|
|
59
|
-
|
|
1
|
+
# @toolproof-npm/schema
|
|
2
|
+
|
|
3
|
+
JSON schemas and TypeScript types for ToolProof...
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @toolproof-npm/schema
|
|
9
|
+
# or
|
|
10
|
+
npm install @toolproof-npm/schema
|
|
11
|
+
# or
|
|
12
|
+
yarn add @toolproof-npm/schema
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
### Import Schemas and Types
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { /* schemas and types */ } from '@toolproof-npm/schema';
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Features
|
|
24
|
+
|
|
25
|
+
- JSON Schema definitions with $defs subschemas
|
|
26
|
+
- Generated TypeScript types from JSON schemas
|
|
27
|
+
- Runtime schema validation support
|
|
28
|
+
- Extractors for non-JSON resource types
|
|
29
|
+
- Schema bundling utilities
|
|
30
|
+
|
|
31
|
+
## Development
|
|
32
|
+
|
|
33
|
+
### Generate Types
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pnpm run generateTypes
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Build
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pnpm run build
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Update (Clean build + generate types)
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pnpm run update
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Requirements
|
|
52
|
+
|
|
53
|
+
- Node.js 16+
|
|
54
|
+
- TypeScript 4.5+ (for TypeScript projects)
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
MIT
|
|
59
|
+
|
package/package.json
CHANGED
|
@@ -1,52 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
2
|
+
"name": "@toolproof-npm/schema",
|
|
3
|
+
"version": "0.1.18",
|
|
4
|
+
"description": "JSON schemas and TypeScript types for ToolProof",
|
|
5
|
+
"keywords": ["toolproof", "schemas", "json-schema", "typescript"],
|
|
6
|
+
"author": "ToolProof Team",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/ToolProof/core.git",
|
|
11
|
+
"directory": "packages/_schemas"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/ToolProof/core#readme",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/ToolProof/core/issues"
|
|
16
|
+
},
|
|
17
|
+
"type": "module",
|
|
18
|
+
"main": "dist/index.js",
|
|
19
|
+
"types": "dist/index.d.ts",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"import": "./dist/index.js",
|
|
23
|
+
"types": "./dist/index.d.ts"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "tsc -b",
|
|
28
|
+
"build:scripts": "tsc -p tsconfig.scripts.json",
|
|
29
|
+
"extractSchemas": "node ./dist/scripts/extractSchemas.js",
|
|
30
|
+
"extractSubschema": "node ./dist/scripts/extractSubschemaWithDefs.js",
|
|
31
|
+
"generateTypes": "node ./dist/scripts/generateTypes.js",
|
|
32
|
+
"generateResourceData": "node ./dist/scripts/generateResourceData.js",
|
|
33
|
+
"update": "rimraf /s /q dist && pnpm run build:scripts && pnpm run extractSchemas -- --in src/genesis/Genesis.json --out src/schemas/Genesis.json --id 'https://schemas.toolproof.com/v0/Genesis.json' && pnpm run extractSubschema -- --name Job && pnpm run generateTypes && pnpm run generateResourceData -- --name Job && pnpm run build"
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist",
|
|
37
|
+
"README.md"
|
|
38
|
+
],
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@apidevtools/json-schema-ref-parser": "^14.2.1",
|
|
41
|
+
"@types/node": "^20.8.1",
|
|
42
|
+
"ajv-cli": "^5.0.0",
|
|
43
|
+
"ajv-formats": "^3.0.1",
|
|
44
|
+
"json-schema-to-typescript": "^15.0.4",
|
|
45
|
+
"typescript": "^5.0.0"
|
|
29
46
|
}
|
|
30
|
-
},
|
|
31
|
-
"files": [
|
|
32
|
-
"dist",
|
|
33
|
-
"README.md"
|
|
34
|
-
],
|
|
35
|
-
"devDependencies": {
|
|
36
|
-
"@apidevtools/json-schema-ref-parser": "^14.2.1",
|
|
37
|
-
"@types/node": "^20.8.1",
|
|
38
|
-
"ajv-cli": "^5.0.0",
|
|
39
|
-
"ajv-formats": "^3.0.1",
|
|
40
|
-
"json-schema-to-typescript": "^15.0.4",
|
|
41
|
-
"typescript": "^5.0.0"
|
|
42
|
-
},
|
|
43
|
-
"scripts": {
|
|
44
|
-
"build": "tsc -b",
|
|
45
|
-
"build:scripts": "tsc -p tsconfig.scripts.json",
|
|
46
|
-
"extractSchemas": "node ./dist/scripts/extractSchemas.js",
|
|
47
|
-
"extractSubschema": "node ./dist/scripts/extractSubschemaWithDefs.js",
|
|
48
|
-
"generateTypes": "node ./dist/scripts/generateTypes.js",
|
|
49
|
-
"generateResourceData": "node ./dist/scripts/generateResourceData.js",
|
|
50
|
-
"update": "rimraf /s /q dist && pnpm run build:scripts && pnpm run extractSchemas -- --in src/genesis/Genesis.json --out src/schemas/Genesis.json --id 'https://schemas.toolproof.com/v0/Genesis.json' && pnpm run extractSubschema -- --name Job && pnpm run generateTypes && pnpm run generateResourceData -- --name Job && pnpm run build"
|
|
51
|
-
}
|
|
52
47
|
}
|