@odata2ts/odata2ts 0.23.1 → 0.24.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.
Files changed (77) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +74 -74
  3. package/lib/FactoryFunctionModel.d.ts +13 -13
  4. package/lib/FactoryFunctionModel.js +2 -2
  5. package/lib/FactoryFunctionModel.js.map +1 -1
  6. package/lib/NamingModel.d.ts +182 -182
  7. package/lib/NamingModel.js +11 -11
  8. package/lib/NamingModel.js.map +1 -1
  9. package/lib/OptionModel.d.ts +228 -223
  10. package/lib/OptionModel.js +23 -23
  11. package/lib/OptionModel.js.map +1 -1
  12. package/lib/app.d.ts +8 -8
  13. package/lib/app.js +63 -63
  14. package/lib/app.js.map +1 -1
  15. package/lib/cli.d.ts +3 -3
  16. package/lib/cli.js +153 -153
  17. package/lib/data-model/DataModel.d.ts +85 -85
  18. package/lib/data-model/DataModel.js +134 -134
  19. package/lib/data-model/DataModelDigestion.d.ts +44 -44
  20. package/lib/data-model/DataModelDigestion.js +274 -274
  21. package/lib/data-model/DataModelDigestion.js.map +1 -1
  22. package/lib/data-model/DataModelDigestionV2.d.ts +10 -10
  23. package/lib/data-model/DataModelDigestionV2.js +200 -200
  24. package/lib/data-model/DataModelDigestionV4.d.ts +3 -3
  25. package/lib/data-model/DataModelDigestionV4.js +195 -195
  26. package/lib/data-model/DataTypeModel.d.ts +102 -102
  27. package/lib/data-model/DataTypeModel.js +8 -8
  28. package/lib/data-model/DataTypeModel.js.map +1 -1
  29. package/lib/data-model/NamingHelper.d.ts +55 -55
  30. package/lib/data-model/NamingHelper.js +214 -214
  31. package/lib/data-model/ServiceConfigHelper.d.ts +21 -21
  32. package/lib/data-model/ServiceConfigHelper.js +113 -113
  33. package/lib/data-model/edmx/ODataEdmxModelBase.d.ts +80 -80
  34. package/lib/data-model/edmx/ODataEdmxModelBase.js +2 -2
  35. package/lib/data-model/edmx/ODataEdmxModelBase.js.map +1 -1
  36. package/lib/data-model/edmx/ODataEdmxModelV3.d.ts +63 -63
  37. package/lib/data-model/edmx/ODataEdmxModelV3.js +2 -2
  38. package/lib/data-model/edmx/ODataEdmxModelV4.d.ts +67 -67
  39. package/lib/data-model/edmx/ODataEdmxModelV4.js +2 -2
  40. package/lib/defaultConfig.d.ts +9 -9
  41. package/lib/defaultConfig.js +165 -164
  42. package/lib/defaultConfig.js.map +1 -1
  43. package/lib/evaluateConfig.d.ts +25 -25
  44. package/lib/evaluateConfig.js +82 -82
  45. package/lib/generator/ImportContainer.d.ts +16 -16
  46. package/lib/generator/ImportContainer.js +91 -91
  47. package/lib/generator/ImportContainer.js.map +1 -1
  48. package/lib/generator/ModelGenerator.d.ts +2 -2
  49. package/lib/generator/ModelGenerator.js +211 -183
  50. package/lib/generator/ModelGenerator.js.map +1 -1
  51. package/lib/generator/QueryObjectGenerator.d.ts +2 -2
  52. package/lib/generator/QueryObjectGenerator.js +239 -239
  53. package/lib/generator/ServiceGenerator.d.ts +8 -8
  54. package/lib/generator/ServiceGenerator.js +422 -422
  55. package/lib/generator/ServiceGenerator.js.map +1 -1
  56. package/lib/generator/index.d.ts +3 -3
  57. package/lib/generator/index.js +9 -9
  58. package/lib/index.d.ts +3 -3
  59. package/lib/index.js +6 -6
  60. package/lib/project/ProjectManager.d.ts +30 -30
  61. package/lib/project/ProjectManager.js +177 -175
  62. package/lib/project/ProjectManager.js.map +1 -1
  63. package/lib/project/formatter/BaseFormatter.d.ts +49 -49
  64. package/lib/project/formatter/BaseFormatter.js +30 -30
  65. package/lib/project/formatter/FileFormatter.d.ts +16 -16
  66. package/lib/project/formatter/FileFormatter.js +2 -2
  67. package/lib/project/formatter/NoopFormatter.d.ts +29 -29
  68. package/lib/project/formatter/NoopFormatter.js +42 -42
  69. package/lib/project/formatter/PrettierFormatter.d.ts +46 -46
  70. package/lib/project/formatter/PrettierFormatter.js +92 -92
  71. package/lib/project/formatter/index.d.ts +2 -2
  72. package/lib/project/formatter/index.js +14 -14
  73. package/lib/project/logger/logFilePath.d.ts +1 -1
  74. package/lib/project/logger/logFilePath.js +12 -12
  75. package/lib/run-cli.d.ts +2 -2
  76. package/lib/run-cli.js +6 -6
  77. package/package.json +27 -28
@@ -1,67 +1,67 @@
1
- import { ComplexType, EntityContainer, EntitySet, EntityType, ODataEdmxModelBase, Property, ReturnType, Schema } from "./ODataEdmxModelBase";
2
- export interface ODataEdmxModelV4 extends ODataEdmxModelBase<SchemaV4> {
3
- }
4
- export interface SchemaV4 extends Schema<EntityTypeV4, ComplexTypeV4> {
5
- EntityContainer?: Array<EntityContainerV4>;
6
- Function?: Array<Operation>;
7
- Action?: Array<Operation>;
8
- }
9
- export interface EntityTypeV4 extends EntityType {
10
- NavigationProperty?: Array<NavigationProperty>;
11
- }
12
- export interface ComplexTypeV4 extends ComplexType {
13
- NavigationProperty?: Array<NavigationProperty>;
14
- }
15
- export interface NavigationProperty {
16
- $: {
17
- Name: string;
18
- Type: string;
19
- Nullable?: "true" | "false";
20
- Partner?: string;
21
- };
22
- }
23
- export interface EntityContainerV4 extends EntityContainer<EntitySetV4> {
24
- Singleton?: Array<Singleton>;
25
- FunctionImport?: Array<FunctionImport>;
26
- ActionImport?: Array<ActionImport>;
27
- }
28
- export interface EntitySetV4 extends EntitySet {
29
- NavigationPropertyBinding?: Array<NavigationPropertyBinding>;
30
- }
31
- export interface Singleton {
32
- $: {
33
- Name: string;
34
- Type: string;
35
- };
36
- NavigationPropertyBinding?: Array<NavigationPropertyBinding>;
37
- }
38
- export interface FunctionImport {
39
- $: {
40
- Name: string;
41
- Function: string;
42
- EntitySet: string;
43
- };
44
- }
45
- export interface ActionImport {
46
- $: {
47
- Name: string;
48
- Action: string;
49
- };
50
- }
51
- export interface NavigationPropertyBinding {
52
- $: {
53
- Path: string;
54
- Target: string;
55
- };
56
- }
57
- export interface Operation {
58
- $: {
59
- Name: string;
60
- IsBound?: "true" | "false";
61
- };
62
- Parameter?: Array<Parameter>;
63
- ReturnType?: Array<ReturnType>;
64
- }
65
- export interface Parameter extends Property {
66
- Unicode?: boolean;
67
- }
1
+ import { ComplexType, EntityContainer, EntitySet, EntityType, ODataEdmxModelBase, Property, ReturnType, Schema } from "./ODataEdmxModelBase";
2
+ export interface ODataEdmxModelV4 extends ODataEdmxModelBase<SchemaV4> {
3
+ }
4
+ export interface SchemaV4 extends Schema<EntityTypeV4, ComplexTypeV4> {
5
+ EntityContainer?: Array<EntityContainerV4>;
6
+ Function?: Array<Operation>;
7
+ Action?: Array<Operation>;
8
+ }
9
+ export interface EntityTypeV4 extends EntityType {
10
+ NavigationProperty?: Array<NavigationProperty>;
11
+ }
12
+ export interface ComplexTypeV4 extends ComplexType {
13
+ NavigationProperty?: Array<NavigationProperty>;
14
+ }
15
+ export interface NavigationProperty {
16
+ $: {
17
+ Name: string;
18
+ Type: string;
19
+ Nullable?: "true" | "false";
20
+ Partner?: string;
21
+ };
22
+ }
23
+ export interface EntityContainerV4 extends EntityContainer<EntitySetV4> {
24
+ Singleton?: Array<Singleton>;
25
+ FunctionImport?: Array<FunctionImport>;
26
+ ActionImport?: Array<ActionImport>;
27
+ }
28
+ export interface EntitySetV4 extends EntitySet {
29
+ NavigationPropertyBinding?: Array<NavigationPropertyBinding>;
30
+ }
31
+ export interface Singleton {
32
+ $: {
33
+ Name: string;
34
+ Type: string;
35
+ };
36
+ NavigationPropertyBinding?: Array<NavigationPropertyBinding>;
37
+ }
38
+ export interface FunctionImport {
39
+ $: {
40
+ Name: string;
41
+ Function: string;
42
+ EntitySet: string;
43
+ };
44
+ }
45
+ export interface ActionImport {
46
+ $: {
47
+ Name: string;
48
+ Action: string;
49
+ };
50
+ }
51
+ export interface NavigationPropertyBinding {
52
+ $: {
53
+ Path: string;
54
+ Target: string;
55
+ };
56
+ }
57
+ export interface Operation {
58
+ $: {
59
+ Name: string;
60
+ IsBound?: "true" | "false";
61
+ };
62
+ Parameter?: Array<Parameter>;
63
+ ReturnType?: Array<ReturnType>;
64
+ }
65
+ export interface Parameter extends Property {
66
+ Unicode?: boolean;
67
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=ODataEdmxModelV4.js.map
@@ -1,9 +1,9 @@
1
- import { RunOptions } from "./OptionModel";
2
- /**
3
- * Creates a defensive copy of the default config.
4
- */
5
- export declare function getDefaultConfig(): Omit<RunOptions, "source" | "output">;
6
- /**
7
- * Creates a defensive copy of the minimal config: minimal in respect to naming.
8
- */
9
- export declare function getMinimalConfig(): Omit<RunOptions, "source" | "output">;
1
+ import { RunOptions } from "./OptionModel";
2
+ /**
3
+ * Creates a defensive copy of the default config.
4
+ */
5
+ export declare function getDefaultConfig(): Omit<RunOptions, "source" | "output">;
6
+ /**
7
+ * Creates a defensive copy of the minimal config: minimal in respect to naming.
8
+ */
9
+ export declare function getMinimalConfig(): Omit<RunOptions, "source" | "output">;
@@ -1,165 +1,166 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getMinimalConfig = exports.getDefaultConfig = void 0;
4
- const tslib_1 = require("tslib");
5
- const deepmerge_1 = tslib_1.__importDefault(require("deepmerge"));
6
- const NamingModel_1 = require("./NamingModel");
7
- const OptionModel_1 = require("./OptionModel");
8
- /**
9
- * The default configuration.
10
- */
11
- const defaultConfig = {
12
- mode: OptionModel_1.Modes.all,
13
- emitMode: OptionModel_1.EmitModes.js_dts,
14
- debug: false,
15
- prettier: false,
16
- tsconfig: "tsconfig.json",
17
- converters: [],
18
- skipEditableModels: false,
19
- skipIdModels: false,
20
- skipOperations: false,
21
- disableAutoManagedKey: false,
22
- allowRenaming: false,
23
- v2ModelsWithExtraResultsWrapping: false,
24
- naming: {
25
- models: {
26
- namingStrategy: NamingModel_1.NamingStrategies.PASCAL_CASE,
27
- propNamingStrategy: NamingModel_1.NamingStrategies.CAMEL_CASE,
28
- editableModels: {
29
- prefix: "Editable",
30
- suffix: "",
31
- applyModelNaming: true,
32
- },
33
- idModels: {
34
- prefix: "",
35
- suffix: "Id",
36
- applyModelNaming: true,
37
- },
38
- operationParamModels: {
39
- prefix: "",
40
- suffix: "Params",
41
- applyModelNaming: true,
42
- },
43
- fileName: {
44
- namingStrategy: NamingModel_1.NamingStrategies.PASCAL_CASE,
45
- prefix: "",
46
- suffix: "Model",
47
- },
48
- },
49
- queryObjects: {
50
- namingStrategy: NamingModel_1.NamingStrategies.PASCAL_CASE,
51
- propNamingStrategy: NamingModel_1.NamingStrategies.CAMEL_CASE,
52
- prefix: "Q",
53
- suffix: "",
54
- idFunctions: {
55
- prefix: "",
56
- suffix: "Id",
57
- },
58
- fileName: {
59
- namingStrategy: NamingModel_1.NamingStrategies.PASCAL_CASE,
60
- prefix: "Q",
61
- suffix: "",
62
- },
63
- },
64
- services: {
65
- prefix: "",
66
- suffix: "Service",
67
- namingStrategy: NamingModel_1.NamingStrategies.PASCAL_CASE,
68
- main: {
69
- applyServiceNaming: true,
70
- },
71
- collection: {
72
- prefix: "",
73
- suffix: "Collection",
74
- applyServiceNaming: true,
75
- },
76
- operations: {
77
- namingStrategy: NamingModel_1.NamingStrategies.CAMEL_CASE,
78
- },
79
- relatedServiceGetter: {
80
- namingStrategy: NamingModel_1.NamingStrategies.CAMEL_CASE,
81
- prefix: "",
82
- suffix: "",
83
- },
84
- privateProps: {
85
- namingStrategy: NamingModel_1.NamingStrategies.CAMEL_CASE,
86
- prefix: "_",
87
- suffix: "",
88
- },
89
- },
90
- },
91
- propertiesByName: [],
92
- entitiesByName: [],
93
- };
94
- const { models, queryObjects, services } = defaultConfig.naming;
95
- const minimalNamingConfig = {
96
- models: {
97
- fileName: {
98
- prefix: models.fileName.prefix,
99
- suffix: models.fileName.suffix,
100
- },
101
- idModels: {
102
- applyModelNaming: true,
103
- prefix: models.idModels.prefix,
104
- suffix: models.idModels.suffix,
105
- },
106
- editableModels: {
107
- applyModelNaming: true,
108
- prefix: models.editableModels.prefix,
109
- suffix: models.editableModels.suffix,
110
- },
111
- operationParamModels: {
112
- applyModelNaming: true,
113
- prefix: models.operationParamModels.prefix,
114
- suffix: models.operationParamModels.suffix,
115
- },
116
- },
117
- queryObjects: {
118
- prefix: queryObjects.prefix,
119
- suffix: queryObjects.suffix,
120
- fileName: {
121
- prefix: queryObjects.fileName.prefix,
122
- suffix: queryObjects.fileName.suffix,
123
- },
124
- idFunctions: {
125
- prefix: queryObjects.idFunctions.prefix,
126
- suffix: queryObjects.idFunctions.suffix,
127
- },
128
- },
129
- services: {
130
- prefix: services.prefix,
131
- suffix: services.suffix,
132
- main: {
133
- applyServiceNaming: true,
134
- },
135
- collection: {
136
- applyServiceNaming: true,
137
- prefix: services.collection.prefix,
138
- suffix: services.collection.suffix,
139
- },
140
- privateProps: {
141
- prefix: services.privateProps.prefix,
142
- suffix: services.privateProps.suffix,
143
- },
144
- relatedServiceGetter: {
145
- prefix: services.relatedServiceGetter.prefix,
146
- suffix: services.relatedServiceGetter.suffix,
147
- },
148
- },
149
- };
150
- /**
151
- * Creates a defensive copy of the default config.
152
- */
153
- function getDefaultConfig() {
154
- return (0, deepmerge_1.default)(defaultConfig, {});
155
- }
156
- exports.getDefaultConfig = getDefaultConfig;
157
- /**
158
- * Creates a defensive copy of the minimal config: minimal in respect to naming.
159
- */
160
- function getMinimalConfig() {
161
- const { naming } = defaultConfig, passThrough = tslib_1.__rest(defaultConfig, ["naming"]);
162
- return (0, deepmerge_1.default)(passThrough, { naming: minimalNamingConfig });
163
- }
164
- exports.getMinimalConfig = getMinimalConfig;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getMinimalConfig = exports.getDefaultConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const deepmerge_1 = tslib_1.__importDefault(require("deepmerge"));
6
+ const NamingModel_1 = require("./NamingModel");
7
+ const OptionModel_1 = require("./OptionModel");
8
+ /**
9
+ * The default configuration.
10
+ */
11
+ const defaultConfig = {
12
+ mode: OptionModel_1.Modes.all,
13
+ emitMode: OptionModel_1.EmitModes.js_dts,
14
+ debug: false,
15
+ prettier: false,
16
+ tsconfig: "tsconfig.json",
17
+ converters: [],
18
+ skipEditableModels: false,
19
+ skipIdModels: false,
20
+ skipOperations: false,
21
+ skipComments: false,
22
+ disableAutoManagedKey: false,
23
+ allowRenaming: false,
24
+ v2ModelsWithExtraResultsWrapping: false,
25
+ naming: {
26
+ models: {
27
+ namingStrategy: NamingModel_1.NamingStrategies.PASCAL_CASE,
28
+ propNamingStrategy: NamingModel_1.NamingStrategies.CAMEL_CASE,
29
+ editableModels: {
30
+ prefix: "Editable",
31
+ suffix: "",
32
+ applyModelNaming: true,
33
+ },
34
+ idModels: {
35
+ prefix: "",
36
+ suffix: "Id",
37
+ applyModelNaming: true,
38
+ },
39
+ operationParamModels: {
40
+ prefix: "",
41
+ suffix: "Params",
42
+ applyModelNaming: true,
43
+ },
44
+ fileName: {
45
+ namingStrategy: NamingModel_1.NamingStrategies.PASCAL_CASE,
46
+ prefix: "",
47
+ suffix: "Model",
48
+ },
49
+ },
50
+ queryObjects: {
51
+ namingStrategy: NamingModel_1.NamingStrategies.PASCAL_CASE,
52
+ propNamingStrategy: NamingModel_1.NamingStrategies.CAMEL_CASE,
53
+ prefix: "Q",
54
+ suffix: "",
55
+ idFunctions: {
56
+ prefix: "",
57
+ suffix: "Id",
58
+ },
59
+ fileName: {
60
+ namingStrategy: NamingModel_1.NamingStrategies.PASCAL_CASE,
61
+ prefix: "Q",
62
+ suffix: "",
63
+ },
64
+ },
65
+ services: {
66
+ prefix: "",
67
+ suffix: "Service",
68
+ namingStrategy: NamingModel_1.NamingStrategies.PASCAL_CASE,
69
+ main: {
70
+ applyServiceNaming: true,
71
+ },
72
+ collection: {
73
+ prefix: "",
74
+ suffix: "Collection",
75
+ applyServiceNaming: true,
76
+ },
77
+ operations: {
78
+ namingStrategy: NamingModel_1.NamingStrategies.CAMEL_CASE,
79
+ },
80
+ relatedServiceGetter: {
81
+ namingStrategy: NamingModel_1.NamingStrategies.CAMEL_CASE,
82
+ prefix: "",
83
+ suffix: "",
84
+ },
85
+ privateProps: {
86
+ namingStrategy: NamingModel_1.NamingStrategies.CAMEL_CASE,
87
+ prefix: "_",
88
+ suffix: "",
89
+ },
90
+ },
91
+ },
92
+ propertiesByName: [],
93
+ entitiesByName: [],
94
+ };
95
+ const { models, queryObjects, services } = defaultConfig.naming;
96
+ const minimalNamingConfig = {
97
+ models: {
98
+ fileName: {
99
+ prefix: models.fileName.prefix,
100
+ suffix: models.fileName.suffix,
101
+ },
102
+ idModels: {
103
+ applyModelNaming: true,
104
+ prefix: models.idModels.prefix,
105
+ suffix: models.idModels.suffix,
106
+ },
107
+ editableModels: {
108
+ applyModelNaming: true,
109
+ prefix: models.editableModels.prefix,
110
+ suffix: models.editableModels.suffix,
111
+ },
112
+ operationParamModels: {
113
+ applyModelNaming: true,
114
+ prefix: models.operationParamModels.prefix,
115
+ suffix: models.operationParamModels.suffix,
116
+ },
117
+ },
118
+ queryObjects: {
119
+ prefix: queryObjects.prefix,
120
+ suffix: queryObjects.suffix,
121
+ fileName: {
122
+ prefix: queryObjects.fileName.prefix,
123
+ suffix: queryObjects.fileName.suffix,
124
+ },
125
+ idFunctions: {
126
+ prefix: queryObjects.idFunctions.prefix,
127
+ suffix: queryObjects.idFunctions.suffix,
128
+ },
129
+ },
130
+ services: {
131
+ prefix: services.prefix,
132
+ suffix: services.suffix,
133
+ main: {
134
+ applyServiceNaming: true,
135
+ },
136
+ collection: {
137
+ applyServiceNaming: true,
138
+ prefix: services.collection.prefix,
139
+ suffix: services.collection.suffix,
140
+ },
141
+ privateProps: {
142
+ prefix: services.privateProps.prefix,
143
+ suffix: services.privateProps.suffix,
144
+ },
145
+ relatedServiceGetter: {
146
+ prefix: services.relatedServiceGetter.prefix,
147
+ suffix: services.relatedServiceGetter.suffix,
148
+ },
149
+ },
150
+ };
151
+ /**
152
+ * Creates a defensive copy of the default config.
153
+ */
154
+ function getDefaultConfig() {
155
+ return (0, deepmerge_1.default)(defaultConfig, {});
156
+ }
157
+ exports.getDefaultConfig = getDefaultConfig;
158
+ /**
159
+ * Creates a defensive copy of the minimal config: minimal in respect to naming.
160
+ */
161
+ function getMinimalConfig() {
162
+ const { naming } = defaultConfig, passThrough = tslib_1.__rest(defaultConfig, ["naming"]);
163
+ return (0, deepmerge_1.default)(passThrough, { naming: minimalNamingConfig });
164
+ }
165
+ exports.getMinimalConfig = getMinimalConfig;
165
166
  //# sourceMappingURL=defaultConfig.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaultConfig.js","sourceRoot":"","sources":["../src/defaultConfig.ts"],"names":[],"mappings":";;;;AAAA,kEAAkC;AAElC,+CAA+D;AAC/D,+CAA6D;AAE7D;;GAEG;AACH,MAAM,aAAa,GAA0C;IAC3D,IAAI,EAAE,mBAAK,CAAC,GAAG;IACf,QAAQ,EAAE,uBAAS,CAAC,MAAM;IAC1B,KAAK,EAAE,KAAK;IACZ,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,eAAe;IACzB,UAAU,EAAE,EAAE;IACd,kBAAkB,EAAE,KAAK;IACzB,YAAY,EAAE,KAAK;IACnB,cAAc,EAAE,KAAK;IACrB,qBAAqB,EAAE,KAAK;IAC5B,aAAa,EAAE,KAAK;IACpB,gCAAgC,EAAE,KAAK;IACvC,MAAM,EAAE;QACN,MAAM,EAAE;YACN,cAAc,EAAE,8BAAgB,CAAC,WAAW;YAC5C,kBAAkB,EAAE,8BAAgB,CAAC,UAAU;YAC/C,cAAc,EAAE;gBACd,MAAM,EAAE,UAAU;gBAClB,MAAM,EAAE,EAAE;gBACV,gBAAgB,EAAE,IAAI;aACvB;YACD,QAAQ,EAAE;gBACR,MAAM,EAAE,EAAE;gBACV,MAAM,EAAE,IAAI;gBACZ,gBAAgB,EAAE,IAAI;aACvB;YACD,oBAAoB,EAAE;gBACpB,MAAM,EAAE,EAAE;gBACV,MAAM,EAAE,QAAQ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AAE,QAAQ,CAAC,YAAY,CAAC,MAAM;YACpC,MAAM,EAAE,QAAQ,CAAC,YAAY,CAAC,MAAM;SACrC;QACD,oBAAoB,EAAE;YACpB,MAAM,EAAE,QAAQ,CAAC,oBAAoB,CAAC,MAAM;YAC5C,MAAM,EAAE,QAAQ,CAAC,oBAAoB,CAAC,MAAM;SAC7C;KACF;CACF,CAAC;AAEF;;GAEG;AACH,SAAgB,gBAAgB;IAC9B,OAAO,IAAA,mBAAS,EAAC,aAAa,EAAE,EAAE,CAAC,CAAC;AACtC,CAAC;AAFD,4CAEC;AAED;;GAEG;AACH,SAAgB,gBAAgB;IAC9B,MAAM,EAAE,MAAM,KAAqB,aAAa,EAA7B,WAAW,kBAAK,aAAa,EAA1C,UAA0B,CAAgB,CAAC;IACjD,OAAO,IAAA,mBAAS,EAAC,WAAW,EAAE,EAAE,MAAM,EAAE,mBAAmB,EAAE,CAAC,CAAC;AACjE,CAAC;AAHD,4CAGC","sourcesContent":["import deepmerge from \"deepmerge\";\r\n\r\nimport { NameSettings, NamingStrategies } from \"./NamingModel\";\r\nimport { EmitModes, Modes, RunOptions } from \"./OptionModel\";\r\n\r\n/**\r\n * The default configuration.\r\n */\r\nconst defaultConfig: Omit<RunOptions, \"source\" | \"output\"> = {\r\n mode: Modes.all,\r\n emitMode: EmitModes.js_dts,\r\n debug: false,\r\n prettier: false,\r\n tsconfig: \"tsconfig.json\",\r\n converters: [],\r\n skipEditableModels: false,\r\n skipIdModels: false,\r\n skipOperations: false,\r\n disableAutoManagedKey: false,\r\n allowRenaming: false,\r\n v2ModelsWithExtraResultsWrapping: false,\r\n naming: {\r\n models: {\r\n namingStrategy: NamingStrategies.PASCAL_CASE,\r\n propNamingStrategy: NamingStrategies.CAMEL_CASE,\r\n editableModels: {\r\n prefix: \"Editable\",\r\n suffix: \"\",\r\n applyModelNaming: true,\r\n },\r\n idModels: {\r\n prefix: \"\",\r\n suffix: \"Id\",\r\n applyModelNaming: true,\r\n },\r\n operationParamModels: {\r\n prefix: \"\",\r\n suffix: \"Params\",\r\n applyModelNaming: true,\r\n },\r\n fileName: {\r\n namingStrategy: NamingStrategies.PASCAL_CASE,\r\n prefix: \"\",\r\n suffix: \"Model\",\r\n },\r\n },\r\n queryObjects: {\r\n namingStrategy: NamingStrategies.PASCAL_CASE,\r\n propNamingStrategy: NamingStrategies.CAMEL_CASE,\r\n prefix: \"Q\",\r\n suffix: \"\",\r\n idFunctions: {\r\n prefix: \"\",\r\n suffix: \"Id\",\r\n },\r\n fileName: {\r\n namingStrategy: NamingStrategies.PASCAL_CASE,\r\n prefix: \"Q\",\r\n suffix: \"\",\r\n },\r\n },\r\n services: {\r\n prefix: \"\",\r\n suffix: \"Service\",\r\n namingStrategy: NamingStrategies.PASCAL_CASE,\r\n main: {\r\n applyServiceNaming: true,\r\n },\r\n collection: {\r\n prefix: \"\",\r\n suffix: \"Collection\",\r\n applyServiceNaming: true,\r\n },\r\n operations: {\r\n namingStrategy: NamingStrategies.CAMEL_CASE,\r\n },\r\n relatedServiceGetter: {\r\n namingStrategy: NamingStrategies.CAMEL_CASE,\r\n prefix: \"\",\r\n suffix: \"\",\r\n },\r\n privateProps: {\r\n namingStrategy: NamingStrategies.CAMEL_CASE,\r\n prefix: \"_\",\r\n suffix: \"\",\r\n },\r\n },\r\n },\r\n propertiesByName: [],\r\n entitiesByName: [],\r\n};\r\n\r\nconst { models, queryObjects, services } = defaultConfig.naming;\r\nconst minimalNamingConfig: NameSettings = {\r\n models: {\r\n fileName: {\r\n prefix: models.fileName.prefix,\r\n suffix: models.fileName.suffix,\r\n },\r\n idModels: {\r\n applyModelNaming: true,\r\n prefix: models.idModels.prefix,\r\n suffix: models.idModels.suffix,\r\n },\r\n editableModels: {\r\n applyModelNaming: true,\r\n prefix: models.editableModels.prefix,\r\n suffix: models.editableModels.suffix,\r\n },\r\n operationParamModels: {\r\n applyModelNaming: true,\r\n prefix: models.operationParamModels.prefix,\r\n suffix: models.operationParamModels.suffix,\r\n },\r\n },\r\n queryObjects: {\r\n prefix: queryObjects.prefix,\r\n suffix: queryObjects.suffix,\r\n fileName: {\r\n prefix: queryObjects.fileName.prefix,\r\n suffix: queryObjects.fileName.suffix,\r\n },\r\n idFunctions: {\r\n prefix: queryObjects.idFunctions.prefix,\r\n suffix: queryObjects.idFunctions.suffix,\r\n },\r\n },\r\n services: {\r\n prefix: services.prefix,\r\n suffix: services.suffix,\r\n main: {\r\n applyServiceNaming: true,\r\n },\r\n collection: {\r\n applyServiceNaming: true,\r\n prefix: services.collection.prefix,\r\n suffix: services.collection.suffix,\r\n },\r\n privateProps: {\r\n prefix: services.privateProps.prefix,\r\n suffix: services.privateProps.suffix,\r\n },\r\n relatedServiceGetter: {\r\n prefix: services.relatedServiceGetter.prefix,\r\n suffix: services.relatedServiceGetter.suffix,\r\n },\r\n },\r\n};\r\n\r\n/**\r\n * Creates a defensive copy of the default config.\r\n */\r\nexport function getDefaultConfig(): Omit<RunOptions, \"source\" | \"output\"> {\r\n return deepmerge(defaultConfig, {});\r\n}\r\n\r\n/**\r\n * Creates a defensive copy of the minimal config: minimal in respect to naming.\r\n */\r\nexport function getMinimalConfig(): Omit<RunOptions, \"source\" | \"output\"> {\r\n const { naming, ...passThrough } = defaultConfig;\r\n return deepmerge(passThrough, { naming: minimalNamingConfig });\r\n}\r\n"]}
1
+ {"version":3,"file":"defaultConfig.js","sourceRoot":"","sources":["../src/defaultConfig.ts"],"names":[],"mappings":";;;;AAAA,kEAAkC;AAElC,+CAA+D;AAC/D,+CAA6D;AAE7D;;GAEG;AACH,MAAM,aAAa,GAA0C;IAC3D,IAAI,EAAE,mBAAK,CAAC,GAAG;IACf,QAAQ,EAAE,uBAAS,CAAC,MAAM;IAC1B,KAAK,EAAE,KAAK;IACZ,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,eAAe;IACzB,UAAU,EAAE,EAAE;IACd,kBAAkB,EAAE,KAAK;IACzB,YAAY,EAAE,KAAK;IACnB,cAAc,EAAE,KAAK;IACr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AE,YAAY,CAAC,QAAQ,CAAC,MAAM;SACrC;QACD,WAAW,EAAE;YACX,MAAM,EAAE,YAAY,CAAC,WAAW,CAAC,MAAM;YACvC,MAAM,EAAE,YAAY,CAAC,WAAW,CAAC,MAAM;SACxC;KACF;IACD,QAAQ,EAAE;QACR,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,IAAI,EAAE;YACJ,kBAAkB,EAAE,IAAI;SACzB;QACD,UAAU,EAAE;YACV,kBAAkB,EAAE,IAAI;YACxB,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,MAAM;YAClC,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,MAAM;SACnC;QACD,YAAY,EAAE;YACZ,MAAM,EAAE,QAAQ,CAAC,YAAY,CAAC,MAAM;YACpC,MAAM,EAAE,QAAQ,CAAC,YAAY,CAAC,MAAM;SACrC;QACD,oBAAoB,EAAE;YACpB,MAAM,EAAE,QAAQ,CAAC,oBAAoB,CAAC,MAAM;YAC5C,MAAM,EAAE,QAAQ,CAAC,oBAAoB,CAAC,MAAM;SAC7C;KACF;CACF,CAAC;AAEF;;GAEG;AACH,SAAgB,gBAAgB;IAC9B,OAAO,IAAA,mBAAS,EAAC,aAAa,EAAE,EAAE,CAAC,CAAC;AACtC,CAAC;AAFD,4CAEC;AAED;;GAEG;AACH,SAAgB,gBAAgB;IAC9B,MAAM,EAAE,MAAM,KAAqB,aAAa,EAA7B,WAAW,kBAAK,aAAa,EAA1C,UAA0B,CAAgB,CAAC;IACjD,OAAO,IAAA,mBAAS,EAAC,WAAW,EAAE,EAAE,MAAM,EAAE,mBAAmB,EAAE,CAAC,CAAC;AACjE,CAAC;AAHD,4CAGC","sourcesContent":["import deepmerge from \"deepmerge\";\r\n\r\nimport { NameSettings, NamingStrategies } from \"./NamingModel\";\r\nimport { EmitModes, Modes, RunOptions } from \"./OptionModel\";\r\n\r\n/**\r\n * The default configuration.\r\n */\r\nconst defaultConfig: Omit<RunOptions, \"source\" | \"output\"> = {\r\n mode: Modes.all,\r\n emitMode: EmitModes.js_dts,\r\n debug: false,\r\n prettier: false,\r\n tsconfig: \"tsconfig.json\",\r\n converters: [],\r\n skipEditableModels: false,\r\n skipIdModels: false,\r\n skipOperations: false,\r\n skipComments: false,\r\n disableAutoManagedKey: false,\r\n allowRenaming: false,\r\n v2ModelsWithExtraResultsWrapping: false,\r\n naming: {\r\n models: {\r\n namingStrategy: NamingStrategies.PASCAL_CASE,\r\n propNamingStrategy: NamingStrategies.CAMEL_CASE,\r\n editableModels: {\r\n prefix: \"Editable\",\r\n suffix: \"\",\r\n applyModelNaming: true,\r\n },\r\n idModels: {\r\n prefix: \"\",\r\n suffix: \"Id\",\r\n applyModelNaming: true,\r\n },\r\n operationParamModels: {\r\n prefix: \"\",\r\n suffix: \"Params\",\r\n applyModelNaming: true,\r\n },\r\n fileName: {\r\n namingStrategy: NamingStrategies.PASCAL_CASE,\r\n prefix: \"\",\r\n suffix: \"Model\",\r\n },\r\n },\r\n queryObjects: {\r\n namingStrategy: NamingStrategies.PASCAL_CASE,\r\n propNamingStrategy: NamingStrategies.CAMEL_CASE,\r\n prefix: \"Q\",\r\n suffix: \"\",\r\n idFunctions: {\r\n prefix: \"\",\r\n suffix: \"Id\",\r\n },\r\n fileName: {\r\n namingStrategy: NamingStrategies.PASCAL_CASE,\r\n prefix: \"Q\",\r\n suffix: \"\",\r\n },\r\n },\r\n services: {\r\n prefix: \"\",\r\n suffix: \"Service\",\r\n namingStrategy: NamingStrategies.PASCAL_CASE,\r\n main: {\r\n applyServiceNaming: true,\r\n },\r\n collection: {\r\n prefix: \"\",\r\n suffix: \"Collection\",\r\n applyServiceNaming: true,\r\n },\r\n operations: {\r\n namingStrategy: NamingStrategies.CAMEL_CASE,\r\n },\r\n relatedServiceGetter: {\r\n namingStrategy: NamingStrategies.CAMEL_CASE,\r\n prefix: \"\",\r\n suffix: \"\",\r\n },\r\n privateProps: {\r\n namingStrategy: NamingStrategies.CAMEL_CASE,\r\n prefix: \"_\",\r\n suffix: \"\",\r\n },\r\n },\r\n },\r\n propertiesByName: [],\r\n entitiesByName: [],\r\n};\r\n\r\nconst { models, queryObjects, services } = defaultConfig.naming;\r\nconst minimalNamingConfig: NameSettings = {\r\n models: {\r\n fileName: {\r\n prefix: models.fileName.prefix,\r\n suffix: models.fileName.suffix,\r\n },\r\n idModels: {\r\n applyModelNaming: true,\r\n prefix: models.idModels.prefix,\r\n suffix: models.idModels.suffix,\r\n },\r\n editableModels: {\r\n applyModelNaming: true,\r\n prefix: models.editableModels.prefix,\r\n suffix: models.editableModels.suffix,\r\n },\r\n operationParamModels: {\r\n applyModelNaming: true,\r\n prefix: models.operationParamModels.prefix,\r\n suffix: models.operationParamModels.suffix,\r\n },\r\n },\r\n queryObjects: {\r\n prefix: queryObjects.prefix,\r\n suffix: queryObjects.suffix,\r\n fileName: {\r\n prefix: queryObjects.fileName.prefix,\r\n suffix: queryObjects.fileName.suffix,\r\n },\r\n idFunctions: {\r\n prefix: queryObjects.idFunctions.prefix,\r\n suffix: queryObjects.idFunctions.suffix,\r\n },\r\n },\r\n services: {\r\n prefix: services.prefix,\r\n suffix: services.suffix,\r\n main: {\r\n applyServiceNaming: true,\r\n },\r\n collection: {\r\n applyServiceNaming: true,\r\n prefix: services.collection.prefix,\r\n suffix: services.collection.suffix,\r\n },\r\n privateProps: {\r\n prefix: services.privateProps.prefix,\r\n suffix: services.privateProps.suffix,\r\n },\r\n relatedServiceGetter: {\r\n prefix: services.relatedServiceGetter.prefix,\r\n suffix: services.relatedServiceGetter.suffix,\r\n },\r\n },\r\n};\r\n\r\n/**\r\n * Creates a defensive copy of the default config.\r\n */\r\nexport function getDefaultConfig(): Omit<RunOptions, \"source\" | \"output\"> {\r\n return deepmerge(defaultConfig, {});\r\n}\r\n\r\n/**\r\n * Creates a defensive copy of the minimal config: minimal in respect to naming.\r\n */\r\nexport function getMinimalConfig(): Omit<RunOptions, \"source\" | \"output\"> {\r\n const { naming, ...passThrough } = defaultConfig;\r\n return deepmerge(passThrough, { naming: minimalNamingConfig });\r\n}\r\n"]}
@@ -1,25 +1,25 @@
1
- import { CliOptions, ConfigFileOptions, RunOptions } from "./OptionModel";
2
- /**
3
- * Provides default values and evaluates the various config file and CLI options.
4
- * This function always returns a list of RunOptions,
5
- * whereby each item represents one generation run / one service.
6
- *
7
- * Configurations are merged in the following order (last one wins):
8
- * - default values
9
- * - config file: base settings
10
- * - config file: service specific settings
11
- * - CLI options
12
- *
13
- * If the CLI options specify source and output, then the service config is completely ignored and only the
14
- * base settings are applied from the config file.
15
- *
16
- * If the CLI options do not specify source and output, but do specify services, then these services must
17
- * exist in the config file and each service must supply values for source and output as a minimum.
18
- *
19
- * If the CLI options neither entail source nor services, then at least one service must be configured in the
20
- * config file. All configured services are returned.
21
- *
22
- * @param cliOpts CLI passed options
23
- * @param configOpts config file options
24
- */
25
- export declare function evaluateConfigOptions(cliOpts: CliOptions, configOpts: ConfigFileOptions | undefined): Array<RunOptions>;
1
+ import { CliOptions, ConfigFileOptions, RunOptions } from "./OptionModel";
2
+ /**
3
+ * Provides default values and evaluates the various config file and CLI options.
4
+ * This function always returns a list of RunOptions,
5
+ * whereby each item represents one generation run / one service.
6
+ *
7
+ * Configurations are merged in the following order (last one wins):
8
+ * - default values
9
+ * - config file: base settings
10
+ * - config file: service specific settings
11
+ * - CLI options
12
+ *
13
+ * If the CLI options specify source and output, then the service config is completely ignored and only the
14
+ * base settings are applied from the config file.
15
+ *
16
+ * If the CLI options do not specify source and output, but do specify services, then these services must
17
+ * exist in the config file and each service must supply values for source and output as a minimum.
18
+ *
19
+ * If the CLI options neither entail source nor services, then at least one service must be configured in the
20
+ * config file. All configured services are returned.
21
+ *
22
+ * @param cliOpts CLI passed options
23
+ * @param configOpts config file options
24
+ */
25
+ export declare function evaluateConfigOptions(cliOpts: CliOptions, configOpts: ConfigFileOptions | undefined): Array<RunOptions>;