@siyavuyachagi/typesharp 0.1.5 → 0.2.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.
- package/README.md +50 -33
- package/bin/typesharp.js +4 -1
- package/dist/cli/index.js +14 -18
- package/dist/cli/index.js.map +1 -1
- package/dist/core/create-sample-config.d.ts.map +1 -1
- package/dist/core/create-sample-config.js +7 -47
- package/dist/core/create-sample-config.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +67 -184
- package/dist/core/index.js.map +1 -1
- package/dist/generator/index.d.ts +7 -3
- package/dist/generator/index.d.ts.map +1 -1
- package/dist/generator/index.js +61 -65
- package/dist/generator/index.js.map +1 -1
- package/dist/helpers/change-tracker.d.ts.map +1 -1
- package/dist/helpers/change-tracker.js +7 -46
- package/dist/helpers/change-tracker.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -10
- package/dist/index.js.map +1 -1
- package/dist/parser/index.d.ts +2 -2
- package/dist/parser/index.d.ts.map +1 -1
- package/dist/parser/index.js +11 -46
- package/dist/parser/index.js.map +1 -1
- package/dist/parser/parse-classes-from-file.d.ts +1 -1
- package/dist/parser/parse-classes-from-file.d.ts.map +1 -1
- package/dist/parser/parse-classes-from-file.js +7 -10
- package/dist/parser/parse-classes-from-file.js.map +1 -1
- package/dist/parser/parse-properties.d.ts +1 -1
- package/dist/parser/parse-properties.d.ts.map +1 -1
- package/dist/parser/parse-properties.js +3 -7
- package/dist/parser/parse-properties.js.map +1 -1
- package/dist/parser/resolve-project-files-from-source.d.ts.map +1 -1
- package/dist/parser/resolve-project-files-from-source.js +7 -40
- package/dist/parser/resolve-project-files-from-source.js.map +1 -1
- package/dist/scripts/pre-unistall.d.ts +2 -0
- package/dist/scripts/pre-unistall.d.ts.map +1 -0
- package/dist/scripts/pre-unistall.js +10 -0
- package/dist/scripts/pre-unistall.js.map +1 -0
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -2
- package/dist/types/naming-convention-config.d.ts +1 -1
- package/dist/types/naming-convention-config.d.ts.map +1 -1
- package/dist/types/naming-convention-config.js +1 -2
- package/dist/types/naming-convention.js +1 -2
- package/dist/types/typesharp-config.d.ts +2 -6
- package/dist/types/typesharp-config.d.ts.map +1 -1
- package/dist/types/typesharp-config.js +1 -2
- package/package.json +16 -5
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NamingConvention } from "./naming-convention";
|
|
2
|
-
import { NamingConventionConfig } from "./naming-convention-config";
|
|
3
|
-
import { TypeSharpConfig } from "./typesharp-config";
|
|
1
|
+
import { NamingConvention } from "./naming-convention.js";
|
|
2
|
+
import { NamingConventionConfig } from "./naming-convention-config.js";
|
|
3
|
+
import { TypeSharpConfig } from "./typesharp-config.js";
|
|
4
4
|
/**
|
|
5
5
|
* Parsed C# property
|
|
6
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,4DAA4D;IAC5D,YAAY,EAAE,OAAO,CAAC;IACtB,8CAA8C;IAC9C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,iGAAiG;IACjG,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAGD,YAAY,EAAE,eAAe,EAAE,CAAA;AAC/B,YAAY,EAAE,sBAAsB,EAAE,CAAA;AACtC,YAAY,EAAE,gBAAgB,EAAE,CAAA"}
|
package/dist/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"naming-convention-config.d.ts","sourceRoot":"","sources":["../../src/types/naming-convention-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"naming-convention-config.d.ts","sourceRoot":"","sources":["../../src/types/naming-convention-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACjC,IAAI,EAAE,gBAAgB,CAAC;IACvB,GAAG,EAAE,gBAAgB,CAAC;CACzB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NamingConvention } from "./naming-convention";
|
|
2
|
-
import { NamingConventionConfig } from "./naming-convention-config";
|
|
1
|
+
import { NamingConvention } from "./naming-convention.js";
|
|
2
|
+
import { NamingConventionConfig } from "./naming-convention-config.js";
|
|
3
3
|
/**
|
|
4
4
|
* TypeSharp configuration file
|
|
5
5
|
* @see https://github.com/siyavuyachagi/typesharp
|
|
@@ -25,10 +25,6 @@ export interface TypeSharpConfig {
|
|
|
25
25
|
* Path where TypeScript files will be generated
|
|
26
26
|
*/
|
|
27
27
|
outputPath: string;
|
|
28
|
-
/**
|
|
29
|
-
* The C# attribute name to look for (default: "TypeSharp")
|
|
30
|
-
*/
|
|
31
|
-
targetAnnotation?: string;
|
|
32
28
|
/**
|
|
33
29
|
* Controls whether generated types are written to one file or multiple files. (default: `false`)
|
|
34
30
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typesharp-config.d.ts","sourceRoot":"","sources":["../../src/types/typesharp-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"typesharp-config.d.ts","sourceRoot":"","sources":["../../src/types/typesharp-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE;;;GAGG;AACH,MAAM,WAAW,eAAe;IAE5B;;;;;;;;;OASG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE1B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEjC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAO3B;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,sBAAsB,CAAC;IAE7D;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siyavuyachagi/typesharp",
|
|
3
3
|
"description": "Generate TypeScript types from C# models with TypeSharp attribute",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Siyavuya Chagi <syavuya08@gmail.com>",
|
|
7
7
|
"repository": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"bin": {
|
|
15
15
|
"typesharp": "./bin/typesharp.js"
|
|
16
16
|
},
|
|
17
|
-
"type": "
|
|
17
|
+
"type": "module",
|
|
18
18
|
"files": [
|
|
19
19
|
"bin",
|
|
20
20
|
"dist",
|
|
@@ -35,18 +35,29 @@
|
|
|
35
35
|
"prepublishOnly": "npm run build",
|
|
36
36
|
"test": "vitest",
|
|
37
37
|
"test:run": "vitest run",
|
|
38
|
-
"test:ui": "npx vitest --ui"
|
|
38
|
+
"test:ui": "npx vitest --ui",
|
|
39
|
+
"test:coverage": "vitest --coverage",
|
|
40
|
+
"lint": "eslint . --ext .ts",
|
|
41
|
+
"lint:fix": "eslint . --ext .ts --fix",
|
|
42
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
43
|
+
"preuninstall": "node dist/scripts/pre-uninstall.js"
|
|
39
44
|
},
|
|
40
45
|
"devDependencies": {
|
|
46
|
+
"@eslint/js": "^8.56.0",
|
|
41
47
|
"@types/node": "^25.0.0",
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
49
|
+
"@typescript-eslint/parser": "^7.0.0",
|
|
50
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
42
51
|
"@vitest/ui": "^4.0.18",
|
|
52
|
+
"eslint": "^8.56.0",
|
|
53
|
+
"prettier": "^3.1.0",
|
|
43
54
|
"typescript": "^5.9.3",
|
|
44
55
|
"vitest": "^4.0.18"
|
|
45
56
|
},
|
|
46
57
|
"dependencies": {
|
|
47
|
-
"tsx": "^4.21.0",
|
|
48
58
|
"chalk": "^5.6.2",
|
|
49
59
|
"commander": "^14.0.2",
|
|
50
|
-
"glob": "^13.0.0"
|
|
60
|
+
"glob": "^13.0.0",
|
|
61
|
+
"tsx": "^4.21.0"
|
|
51
62
|
}
|
|
52
63
|
}
|