forked from cap-js/cds-typer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
149 lines (149 loc) · 5.11 KB
/
package.json
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
{
"name": "@cap-js/cds-typer",
"version": "0.31.0",
"description": "Generates .ts files for a CDS model to receive code completion in VS Code",
"main": "index.js",
"repository": "github:cap-js/cds-typer",
"homepage": "https://cap.cloud.sap/",
"keywords": [
"CAP",
"CDS",
"CLI"
],
"author": "SAP SE (https://www.sap.com)",
"license": "SEE LICENSE IN LICENSE",
"scripts": {
"test:unit": "jest --projects test/unit.jest.config.js",
"test:integration": "jest --projects test/int.jest.config.js",
"test:smoke": "jest --projects test/smoke.jest.config.js",
"test:all": "jest",
"test": "npm run test:smoke && npm run test:unit",
"lint": "npx eslint .",
"lint:fix": "npx eslint . --fix",
"cli": "node lib/cli.js",
"doc:clean": "rm -rf ./doc",
"doc:prepare": "npm run doc:clean && mkdir -p doc/types",
"doc:typegen": "./node_modules/.bin/tsc ./lib/*.js --skipLibCheck --declaration --allowJs --emitDeclarationOnly --outDir doc/types && cd doc/types && tsc --init",
"doc:cli": "npm run cli -- --help > ./doc/cli.txt",
"jsdoc:check": "tsc --noEmit --project jsconfig.json",
"write:cds-typer-shema": "node scripts/write-cds-typer-schema.js"
},
"files": [
"lib/",
"library",
"CHANGELOG.md",
"index.js",
"LICENSE",
"README.md",
"cds-plugin.js"
],
"types": "index.d.ts",
"bin": {
"cds-typer": "./lib/cli.js"
},
"peerDependencies": {
"@cap-js/cds-types": ">=0.6.4",
"@sap/cds": ">=8"
},
"devDependencies": {
"@cap-js/cds-types": "^0",
"@sap/cds": "^8",
"@stylistic/eslint-plugin-js": "^2.7.2",
"acorn": "^8.10.0",
"eslint": "^9",
"eslint-plugin-jsdoc": "^50.2.2",
"globals": "^15.0.0",
"jest": "^29",
"typescript": ">=4.6.4"
},
"jest": {
"projects": [
"test/smoke.jest.config.js",
"test/unit.jest.config.js"
]
},
"cds": {
"typer": {
"output_directory": "@cds-models",
"inline_declarations": "flat",
"target_module_type": "auto",
"properties_optional": true,
"use_entities_proxy": false
},
"schema": {
"buildTaskType": {
"name": "typescript",
"description": "TypeScript build plugin. For use after the nodejs build task."
},
"cds": {
"typer": {
"type": "object",
"description": "Configuration for CDS Typer",
"properties": {
"output_directory": {
"type": "string",
"description": "Root directory to write the generated files to.",
"default": "@cds-models"
},
"log_level": {
"type": "string",
"description": "Minimum log level that is printed.\nThe default is only used if no explicit value is passed\nand there is no configuration passed via cds.env either.",
"enum": [
"SILENT",
"ERROR",
"WARN",
"INFO",
"DEBUG",
"TRACE",
"SILLY",
"VERBOSE",
"WARNING",
"CRITICAL",
"NONE"
],
"default": "ERROR"
},
"js_config_path": {
"type": "string",
"description": "Path to where the jsconfig.json should be written.\nIf specified, cds-typer will create a jsconfig.json file and\nset it up to restrict property usage in types entities to\nexisting properties only."
},
"use_entities_proxy": {
"type": "boolean",
"description": "If set to true the 'cds.entities' exports in the generated 'index.js'\nfiles will be wrapped in 'Proxy' objects\nso static import/require calls can be used everywhere.\n\nWARNING: entity properties can still only be accessed after\n'cds.entities' has been loaded",
"default": false
},
"inline_declarations": {
"type": "string",
"description": "Whether to resolve inline type declarations\nflat: (x_a, x_b, ...)\nor structured: (x: {a, b}).",
"enum": [
"flat",
"structured"
],
"default": "structured"
},
"properties_optional": {
"type": "boolean",
"description": "If set to true, properties in entities are\nalways generated as optional (a?: T).",
"default": true
},
"ieee754compatible": {
"type": "boolean",
"description": "If set to true, floating point properties are generated\nas IEEE754 compatible '(number | string)' instead of 'number'.",
"default": false
},
"target_module_type": {
"type": "string",
"description": "Output format for generated .js files.\nSetting it to auto tries to derive the module type from\nthe package.json and falls back to CJS.",
"enum": [
"esm",
"cjs",
"auto"
],
"default": "auto"
}
}
}
}
}
}
}