@skmtc/core 0.0.338 → 0.0.340

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 (125) hide show
  1. package/esm/context/CoreContext.d.ts +2 -2
  2. package/esm/context/CoreContext.d.ts.map +1 -1
  3. package/esm/context/CoreContext.js +4 -4
  4. package/esm/context/GenerateContext.d.ts +5 -5
  5. package/esm/context/GenerateContext.d.ts.map +1 -1
  6. package/esm/context/GenerateContext.js +64 -32
  7. package/esm/context/ParseContext.d.ts +1 -1
  8. package/esm/context/ParseContext.d.ts.map +1 -1
  9. package/esm/context/ParseContext.js +11 -11
  10. package/esm/dsl/GeneratorBase.d.ts +6 -0
  11. package/esm/dsl/GeneratorBase.d.ts.map +1 -0
  12. package/esm/dsl/GeneratorBase.js +11 -0
  13. package/esm/dsl/model/ModelBase.d.ts +21 -0
  14. package/esm/dsl/model/ModelBase.d.ts.map +1 -0
  15. package/esm/dsl/model/ModelBase.js +34 -0
  16. package/esm/dsl/{ModelDriver.d.ts → model/ModelDriver.d.ts} +5 -5
  17. package/esm/dsl/model/ModelDriver.d.ts.map +1 -0
  18. package/esm/dsl/{ModelDriver.js → model/ModelDriver.js} +4 -4
  19. package/{script/dsl → esm/dsl/model}/ModelInsertable.d.ts +18 -12
  20. package/esm/dsl/model/ModelInsertable.d.ts.map +1 -0
  21. package/esm/dsl/model/toModelConfig.d.ts +47 -0
  22. package/esm/dsl/model/toModelConfig.d.ts.map +1 -0
  23. package/esm/dsl/model/toModelConfig.js +92 -0
  24. package/esm/dsl/operation/OperationBase.d.ts +34 -0
  25. package/esm/dsl/operation/OperationBase.d.ts.map +1 -0
  26. package/esm/dsl/{base.js → operation/OperationBase.js} +4 -35
  27. package/esm/dsl/{OperationDriver.d.ts → operation/OperationDriver.d.ts} +5 -5
  28. package/esm/dsl/operation/OperationDriver.d.ts.map +1 -0
  29. package/esm/dsl/{OperationDriver.js → operation/OperationDriver.js} +4 -4
  30. package/{script/dsl → esm/dsl/operation}/OperationInsertable.d.ts +12 -8
  31. package/esm/dsl/operation/OperationInsertable.d.ts.map +1 -0
  32. package/esm/dsl/operation/toOperationConfig.d.ts +61 -0
  33. package/esm/dsl/operation/toOperationConfig.d.ts.map +1 -0
  34. package/esm/dsl/operation/toOperationConfig.js +116 -0
  35. package/esm/mod.d.ts +13 -10
  36. package/esm/mod.d.ts.map +1 -1
  37. package/esm/mod.js +13 -10
  38. package/esm/oas/components/Components.d.ts +1 -0
  39. package/esm/oas/components/Components.d.ts.map +1 -1
  40. package/esm/oas/components/Components.js +3 -0
  41. package/esm/oas/document/toDocumentFieldsV3.d.ts +2 -2
  42. package/esm/oas/document/toDocumentFieldsV3.d.ts.map +1 -1
  43. package/esm/oas/document/toDocumentFieldsV3.js +2 -2
  44. package/esm/oas/ref/Ref.d.ts +2 -2
  45. package/esm/oas/ref/Ref.d.ts.map +1 -1
  46. package/esm/oas/ref/Ref.js +8 -8
  47. package/esm/oas/ref/toRefV31.js +1 -1
  48. package/esm/server/createServer.d.ts +2 -2
  49. package/esm/server/createServer.d.ts.map +1 -1
  50. package/esm/transform/transform.d.ts +2 -2
  51. package/esm/transform/transform.d.ts.map +1 -1
  52. package/package.json +1 -1
  53. package/script/context/CoreContext.d.ts +2 -2
  54. package/script/context/CoreContext.d.ts.map +1 -1
  55. package/script/context/CoreContext.js +4 -4
  56. package/script/context/GenerateContext.d.ts +5 -5
  57. package/script/context/GenerateContext.d.ts.map +1 -1
  58. package/script/context/GenerateContext.js +64 -32
  59. package/script/context/ParseContext.d.ts +1 -1
  60. package/script/context/ParseContext.d.ts.map +1 -1
  61. package/script/context/ParseContext.js +11 -11
  62. package/script/dsl/GeneratorBase.d.ts +6 -0
  63. package/script/dsl/GeneratorBase.d.ts.map +1 -0
  64. package/script/dsl/GeneratorBase.js +15 -0
  65. package/script/dsl/model/ModelBase.d.ts +21 -0
  66. package/script/dsl/model/ModelBase.d.ts.map +1 -0
  67. package/script/dsl/model/ModelBase.js +38 -0
  68. package/script/dsl/{ModelDriver.d.ts → model/ModelDriver.d.ts} +5 -5
  69. package/script/dsl/model/ModelDriver.d.ts.map +1 -0
  70. package/script/dsl/{ModelDriver.js → model/ModelDriver.js} +4 -4
  71. package/{esm/dsl → script/dsl/model}/ModelInsertable.d.ts +18 -12
  72. package/script/dsl/model/ModelInsertable.d.ts.map +1 -0
  73. package/script/dsl/model/toModelConfig.d.ts +47 -0
  74. package/script/dsl/model/toModelConfig.d.ts.map +1 -0
  75. package/script/dsl/model/toModelConfig.js +96 -0
  76. package/script/dsl/operation/OperationBase.d.ts +34 -0
  77. package/script/dsl/operation/OperationBase.d.ts.map +1 -0
  78. package/script/dsl/{base.js → operation/OperationBase.js} +5 -37
  79. package/script/dsl/{OperationDriver.d.ts → operation/OperationDriver.d.ts} +5 -5
  80. package/script/dsl/operation/OperationDriver.d.ts.map +1 -0
  81. package/script/dsl/{OperationDriver.js → operation/OperationDriver.js} +4 -4
  82. package/{esm/dsl → script/dsl/operation}/OperationInsertable.d.ts +12 -8
  83. package/script/dsl/operation/OperationInsertable.d.ts.map +1 -0
  84. package/script/dsl/operation/toOperationConfig.d.ts +61 -0
  85. package/script/dsl/operation/toOperationConfig.d.ts.map +1 -0
  86. package/script/dsl/operation/toOperationConfig.js +120 -0
  87. package/script/mod.d.ts +13 -10
  88. package/script/mod.d.ts.map +1 -1
  89. package/script/mod.js +13 -10
  90. package/script/oas/components/Components.d.ts +1 -0
  91. package/script/oas/components/Components.d.ts.map +1 -1
  92. package/script/oas/components/Components.js +3 -0
  93. package/script/oas/document/toDocumentFieldsV3.d.ts +2 -2
  94. package/script/oas/document/toDocumentFieldsV3.d.ts.map +1 -1
  95. package/script/oas/document/toDocumentFieldsV3.js +2 -2
  96. package/script/oas/ref/Ref.d.ts +2 -2
  97. package/script/oas/ref/Ref.d.ts.map +1 -1
  98. package/script/oas/ref/Ref.js +8 -8
  99. package/script/oas/ref/toRefV31.js +1 -1
  100. package/script/server/createServer.d.ts +2 -2
  101. package/script/server/createServer.d.ts.map +1 -1
  102. package/script/transform/transform.d.ts +2 -2
  103. package/script/transform/transform.d.ts.map +1 -1
  104. package/esm/dsl/ModelDriver.d.ts.map +0 -1
  105. package/esm/dsl/ModelInsertable.d.ts.map +0 -1
  106. package/esm/dsl/OperationDriver.d.ts.map +0 -1
  107. package/esm/dsl/OperationInsertable.d.ts.map +0 -1
  108. package/esm/dsl/base.d.ts +0 -56
  109. package/esm/dsl/base.d.ts.map +0 -1
  110. package/esm/dsl/withConfig.d.ts +0 -115
  111. package/esm/dsl/withConfig.d.ts.map +0 -1
  112. package/esm/dsl/withConfig.js +0 -138
  113. package/script/dsl/ModelDriver.d.ts.map +0 -1
  114. package/script/dsl/ModelInsertable.d.ts.map +0 -1
  115. package/script/dsl/OperationDriver.d.ts.map +0 -1
  116. package/script/dsl/OperationInsertable.d.ts.map +0 -1
  117. package/script/dsl/base.d.ts +0 -56
  118. package/script/dsl/base.d.ts.map +0 -1
  119. package/script/dsl/withConfig.d.ts +0 -115
  120. package/script/dsl/withConfig.d.ts.map +0 -1
  121. package/script/dsl/withConfig.js +0 -144
  122. /package/esm/dsl/{ModelInsertable.js → model/ModelInsertable.js} +0 -0
  123. /package/esm/dsl/{OperationInsertable.js → operation/OperationInsertable.js} +0 -0
  124. /package/script/dsl/{ModelInsertable.js → model/ModelInsertable.js} +0 -0
  125. /package/script/dsl/{OperationInsertable.js → operation/OperationInsertable.js} +0 -0
@@ -1,8 +1,14 @@
1
- import type { GenerateContext } from '../context/GenerateContext.js';
2
- import type { EntityType } from './EntityType.js';
3
- import type { ContentSettings } from './ContentSettings.js';
4
- import type { BaseSettings } from '../types/Settings.js';
5
- import type { RefName } from '../types/RefName.js';
1
+ import type { GenerateContext } from '../../context/GenerateContext.js';
2
+ import type { EntityType } from '../EntityType.js';
3
+ import type { ContentSettings } from '../ContentSettings.js';
4
+ import type { BaseSettings } from '../../types/Settings.js';
5
+ import type { RefName } from '../../types/RefName.js';
6
+ type ModelInsertableConstructorArgs = {
7
+ context: GenerateContext;
8
+ refName: RefName;
9
+ settings: ContentSettings;
10
+ destinationPath: string;
11
+ };
6
12
  export type ToModelNameArgs = {
7
13
  refName: RefName;
8
14
  baseSettings: BaseSettings;
@@ -22,21 +28,21 @@ export type ModelGenerator = {
22
28
  new (context: GenerateContext): WithTransformModel;
23
29
  id: string;
24
30
  type: 'model';
25
- pinnable?: boolean;
31
+ _class: 'ModelGenerator';
32
+ pinnable: false;
26
33
  };
27
34
  export type ModelInsertable<V> = {
28
35
  prototype: V;
29
36
  } & {
30
- new (args: {
31
- context: GenerateContext;
32
- refName: RefName;
33
- settings: ContentSettings;
34
- destinationPath: string;
35
- }): V;
37
+ new ({ context, refName, settings, destinationPath }: ModelInsertableConstructorArgs): V;
36
38
  id: string;
39
+ type: 'model';
40
+ _class: 'ModelInsertable';
37
41
  entityType: EntityType;
38
42
  toName: ({ refName, baseSettings }: ToModelNameArgs) => string;
39
43
  toExportPath: ({ refName, baseSettings }: ToModelExportPathArgs) => string;
40
44
  isSelected: ({ refName, baseSettings }: IsModelSelectedArgs) => boolean;
45
+ pinnable: false;
41
46
  } & Function;
47
+ export {};
42
48
  //# sourceMappingURL=ModelInsertable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModelInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/ModelInsertable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAErD,KAAK,8BAA8B,GAAG;IACpC,OAAO,EAAE,eAAe,CAAA;IACxB,OAAO,EAAE,OAAO,CA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AE,EAAE,mBAAmB,KAAK,OAAO,CAAA;IACvE,QAAQ,EAAE,KAAK,CAAA;CAEhB,GAAG,QAAQ,CAAA"}
@@ -0,0 +1,47 @@
1
+ import type { GenerateContext } from '../../context/GenerateContext.js';
2
+ import type { RefName } from '../../types/RefName.js';
3
+ import type { ContentSettings } from '../ContentSettings.js';
4
+ import { EntityType } from '../EntityType.js';
5
+ import type { IsOperationSelectedArgs, ToOperationExportPathArgs, ToOperationNameArgs } from '../operation/OperationInsertable.js';
6
+ export type ModelInsertableArgs = {
7
+ context: GenerateContext;
8
+ settings: ContentSettings;
9
+ refName: RefName;
10
+ };
11
+ type ToModelConfigArgs = {
12
+ id: string;
13
+ entityType?: EntityType;
14
+ toName: ({ operation, baseSettings }: ToOperationNameArgs) => string;
15
+ toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
16
+ isSelected?: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
17
+ };
18
+ export declare const toModelConfig: ({ id, entityType, toName, toExportPath, isSelected }: ToModelConfigArgs) => {
19
+ ModelInsertable: {
20
+ new (args: ModelInsertableArgs): {
21
+ settings: ContentSettings;
22
+ refName: RefName;
23
+ transform<V extends import("../../mod.js").GeneratedValue>(insertable: import("./ModelInsertable.js").ModelInsertable<V>, refName: RefName): void;
24
+ register(args: Partial<import("../../context/GenerateContext.js").RegisterArgs>): void;
25
+ context: GenerateContext;
26
+ skipped: boolean;
27
+ generatorKey: import("../../types/GeneratorKeys.js").GeneratorKey | undefined;
28
+ };
29
+ id: string;
30
+ type: string;
31
+ entityType: EntityType;
32
+ toName: ({ operation, baseSettings }: ToOperationNameArgs) => string;
33
+ toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
34
+ isSelected: (({ operation, baseSettings }: IsOperationSelectedArgs) => boolean) | undefined;
35
+ pinnable: boolean;
36
+ };
37
+ ModelGenerator: {
38
+ new (context: GenerateContext): {
39
+ context: GenerateContext;
40
+ };
41
+ id: string;
42
+ type: string;
43
+ pinnable: boolean;
44
+ };
45
+ };
46
+ export {};
47
+ //# sourceMappingURL=toModelConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toModelConfig.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/toModelConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAEvE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,OAAO,KAAK,EACV,uBAAuB,EACvB,yBAAyB,EACzB,mBAAmB,EACpB,MAAM,qCAAqC,CAAA;AAG5C,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,KAAK,iBAAiB,GAAG;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,mBAAmB,KAAK,MAAM,CAAA;IACpE,YAAY,EAAE,CAAC,EACb,SAAS,EACT,YAAY,EACb,EAAE,yBAAyB,KAAK,MAAM,CAAA;IACvC,UAAU,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,uBAAuB,KAAK,OAAO,CAAA;CAC/E,CAAA;AAED,eAAO,MAAM,aAAa,yDAMvB,iBAAiB;;mBAUE,mBAAmB;;;;;;;;;;;;8CAxBD,mBAAmB,KAAK,MAAM;oDAIjE,yBAAyB,KAAK,MAAM;mDACI,uBAAuB,KAAK,OAAO;;;;sBAmCvD,eAAe;;;;;;;CAMvC,CAAA"}
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
3
+ if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
4
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.toModelConfig = void 0;
8
+ const GeneratorKeys_js_1 = require("../../types/GeneratorKeys.js");
9
+ const EntityType_js_1 = require("../EntityType.js");
10
+ const GeneratorBase_js_1 = require("../GeneratorBase.js");
11
+ const ModelBase_js_1 = require("./ModelBase.js");
12
+ const toModelConfig = ({ id, entityType, toName, toExportPath, isSelected }) => {
13
+ var _a, _b;
14
+ const ModelInsertable = (_a = class extends ModelBase_js_1.ModelBase {
15
+ constructor(args) {
16
+ super({
17
+ ...args,
18
+ generatorKey: (0, GeneratorKeys_js_1.toModelGeneratorKey)({
19
+ generatorId: id,
20
+ refName: args.refName
21
+ })
22
+ });
23
+ }
24
+ },
25
+ __setFunctionName(_a, "ModelInsertable"),
26
+ Object.defineProperty(_a, "id", {
27
+ enumerable: true,
28
+ configurable: true,
29
+ writable: true,
30
+ value: id
31
+ }),
32
+ Object.defineProperty(_a, "type", {
33
+ enumerable: true,
34
+ configurable: true,
35
+ writable: true,
36
+ value: 'model'
37
+ }),
38
+ Object.defineProperty(_a, "entityType", {
39
+ enumerable: true,
40
+ configurable: true,
41
+ writable: true,
42
+ value: entityType ?? new EntityType_js_1.EntityType('variable')
43
+ }),
44
+ Object.defineProperty(_a, "toName", {
45
+ enumerable: true,
46
+ configurable: true,
47
+ writable: true,
48
+ value: toName
49
+ }),
50
+ Object.defineProperty(_a, "toExportPath", {
51
+ enumerable: true,
52
+ configurable: true,
53
+ writable: true,
54
+ value: toExportPath
55
+ }),
56
+ Object.defineProperty(_a, "isSelected", {
57
+ enumerable: true,
58
+ configurable: true,
59
+ writable: true,
60
+ value: isSelected
61
+ }),
62
+ Object.defineProperty(_a, "pinnable", {
63
+ enumerable: true,
64
+ configurable: true,
65
+ writable: true,
66
+ value: false
67
+ }),
68
+ _a);
69
+ const ModelGenerator = (_b = class extends GeneratorBase_js_1.GeneratorBase {
70
+ constructor(context) {
71
+ super(context);
72
+ }
73
+ },
74
+ __setFunctionName(_b, "ModelGenerator"),
75
+ Object.defineProperty(_b, "id", {
76
+ enumerable: true,
77
+ configurable: true,
78
+ writable: true,
79
+ value: id
80
+ }),
81
+ Object.defineProperty(_b, "type", {
82
+ enumerable: true,
83
+ configurable: true,
84
+ writable: true,
85
+ value: 'model'
86
+ }),
87
+ Object.defineProperty(_b, "pinnable", {
88
+ enumerable: true,
89
+ configurable: true,
90
+ writable: true,
91
+ value: false
92
+ }),
93
+ _b);
94
+ return { ModelInsertable, ModelGenerator };
95
+ };
96
+ exports.toModelConfig = toModelConfig;
@@ -0,0 +1,34 @@
1
+ import type { OperationInsertable } from './OperationInsertable.js';
2
+ import type { OasOperation } from '../../oas/operation/Operation.js';
3
+ import type { ContentSettings } from '../ContentSettings.js';
4
+ import type { GenerateContext, RegisterArgs } from '../../context/GenerateContext.js';
5
+ import type { GeneratedValue } from '../../types/GeneratedValue.js';
6
+ import type { GeneratorKey } from '../../types/GeneratorKeys.js';
7
+ import { ValueBase } from '../ValueBase.js';
8
+ import type { Definition } from '../Definition.js';
9
+ import type { Identifier } from '../Identifier.js';
10
+ import type { SchemaToValueFn, SchemaType, TypeSystemOutput } from '../../types/TypeSystem.js';
11
+ export type OperationBaseArgs = {
12
+ context: GenerateContext;
13
+ settings: ContentSettings;
14
+ generatorKey: GeneratorKey;
15
+ operation: OasOperation;
16
+ };
17
+ type CreateAndRegisterDefinition<Schema extends SchemaType> = {
18
+ schema: Schema;
19
+ identifier: Identifier;
20
+ schemaToValueFn: SchemaToValueFn;
21
+ };
22
+ export declare class OperationBase extends ValueBase {
23
+ settings: ContentSettings;
24
+ operation: OasOperation;
25
+ constructor({ context, generatorKey, settings, operation }: OperationBaseArgs);
26
+ insert<V extends GeneratedValue>(insertable: OperationInsertable<V>, operation: OasOperation): {
27
+ settings: ContentSettings;
28
+ definition: Definition<V>;
29
+ };
30
+ createAndRegisterDefinition<Schema extends SchemaType>({ schema, identifier, schemaToValueFn }: CreateAndRegisterDefinition<Schema>): Definition<TypeSystemOutput<Schema['type']>>;
31
+ register(args: Partial<RegisterArgs>): void;
32
+ }
33
+ export {};
34
+ //# sourceMappingURL=OperationBase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OperationBase.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/OperationBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EACV,eAAe,EACf,UAAU,EACV,gBAAgB,EACjB,MAAM,2BAA2B,CAAA;AAElC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,YAAY,EAAE,YAAY,CAAA;IAC1B,SAAS,EAAE,YAAY,CAAA;CACxB,CAAA;AAED,KAAK,2BAA2B,CAAC,MAAM,SAAS,UAAU,IAAI;IAC5D,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,UAAU,CAAA;IACtB,eAAe,EAAE,eAAe,CAAA;CACjC,CAAA;AAED,qBAAa,aAAc,SAAQ,SAAS;IAC1C,QAAQ,EAAE,eAAe,CAAA;IACzB,SAAS,EAAE,YAAY,CAAA;gBAEX,EACV,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,SAAS,EACV,EAAE,iBAAiB;IAOpB,MAAM,CAAC,CAAC,SAAS,cAAc,EAC7B,UAAU,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAClC,SAAS,EAAE,YAAY,GACtB;QAAE,QAAQ,EAAE,eAAe,CAAC;QAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,CAAA;KAAE;IAa3D,2BAA2B,CAAC,MAAM,SAAS,UAAU,EAAE,EACrD,MAAM,EACN,UAAU,EACV,eAAe,EAChB,EAAE,2BAA2B,CAAC,MAAM,CAAC,GAAG,UAAU,CACjD,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CACjC;IASD,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC;CAMrC"}
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ModelBase = exports.OperationBase = void 0;
7
- const ValueBase_js_1 = require("./ValueBase.js");
6
+ exports.OperationBase = void 0;
7
+ const ValueBase_js_1 = require("../ValueBase.js");
8
8
  const tiny_invariant_1 = __importDefault(require("tiny-invariant"));
9
9
  class OperationBase extends ValueBase_js_1.ValueBase {
10
10
  constructor({ context, generatorKey, settings, operation }) {
@@ -24,9 +24,10 @@ class OperationBase extends ValueBase_js_1.ValueBase {
24
24
  this.operation = operation;
25
25
  this.settings = settings;
26
26
  }
27
- insert(args) {
27
+ insert(insertable, operation) {
28
28
  const { settings, definition } = this.context.insert({
29
- ...args,
29
+ insertable,
30
+ operation,
30
31
  generation: 'force',
31
32
  destinationPath: this.settings.exportPath
32
33
  });
@@ -49,36 +50,3 @@ class OperationBase extends ValueBase_js_1.ValueBase {
49
50
  }
50
51
  }
51
52
  exports.OperationBase = OperationBase;
52
- class ModelBase extends ValueBase_js_1.ValueBase {
53
- constructor({ context, settings, generatorKey, refName }) {
54
- super({ context, generatorKey });
55
- Object.defineProperty(this, "settings", {
56
- enumerable: true,
57
- configurable: true,
58
- writable: true,
59
- value: void 0
60
- });
61
- Object.defineProperty(this, "refName", {
62
- enumerable: true,
63
- configurable: true,
64
- writable: true,
65
- value: void 0
66
- });
67
- this.refName = refName;
68
- this.settings = settings;
69
- }
70
- transform(args) {
71
- this.context.insert({
72
- ...args,
73
- generation: 'force',
74
- destinationPath: this.settings.exportPath
75
- });
76
- }
77
- register(args) {
78
- this.context.register({
79
- ...args,
80
- destinationPath: args.destinationPath ?? this.settings.exportPath
81
- });
82
- }
83
- }
84
- exports.ModelBase = ModelBase;
@@ -1,9 +1,9 @@
1
1
  import type { OperationInsertable } from './OperationInsertable.js';
2
- import type { OasOperation } from '../oas/operation/Operation.js';
3
- import type { ContentSettings } from './ContentSettings.js';
4
- import type { GeneratedDefintion, GenerationType } from '../types/GeneratedValue.js';
5
- import type { GeneratedValue } from '../types/GeneratedValue.js';
6
- import type { GenerateContext } from '../context/GenerateContext.js';
2
+ import type { OasOperation } from '../../oas/operation/Operation.js';
3
+ import type { ContentSettings } from '../ContentSettings.js';
4
+ import type { GeneratedDefintion, GenerationType } from '../../types/GeneratedValue.js';
5
+ import type { GeneratedValue } from '../../types/GeneratedValue.js';
6
+ import type { GenerateContext } from '../../context/GenerateContext.js';
7
7
  type CreateOperationArgs<V extends GeneratedValue, T extends GenerationType> = {
8
8
  context: GenerateContext;
9
9
  insertable: OperationInsertable<V>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OperationDriver.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/OperationDriver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B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Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OperationDriver = void 0;
4
- const mod_js_1 = require("../deps/jsr.io/@std/path/1.0.0/mod.js");
5
- const Definition_js_1 = require("./Definition.js");
6
- const Identifier_js_1 = require("./Identifier.js");
4
+ const mod_js_1 = require("../../deps/jsr.io/@std/path/1.0.0/mod.js");
5
+ const Definition_js_1 = require("../Definition.js");
6
+ const Identifier_js_1 = require("../Identifier.js");
7
7
  const ts_pattern_1 = require("ts-pattern");
8
- const GeneratorKeys_js_1 = require("../types/GeneratorKeys.js");
8
+ const GeneratorKeys_js_1 = require("../../types/GeneratorKeys.js");
9
9
  class OperationDriver {
10
10
  constructor({ context, insertable, operation, generation, destinationPath }) {
11
11
  Object.defineProperty(this, "context", {
@@ -1,9 +1,9 @@
1
- import type { OasOperation } from '../oas/operation/Operation.js';
2
- import type { ContentSettings } from './ContentSettings.js';
3
- import type { BaseSettings } from '../types/Settings.js';
4
- import type { EntityType } from './EntityType.js';
5
- import type { GenerateContext } from '../context/GenerateContext.js';
6
- type CreateOperationFnArgs = {
1
+ import type { OasOperation } from '../../oas/operation/Operation.js';
2
+ import type { ContentSettings } from '../ContentSettings.js';
3
+ import type { BaseSettings } from '../../types/Settings.js';
4
+ import type { EntityType } from '../EntityType.js';
5
+ import type { GenerateContext } from '../../context/GenerateContext.js';
6
+ type OperationInsertableConstructorArgs = {
7
7
  context: GenerateContext;
8
8
  settings: ContentSettings;
9
9
  operation: OasOperation;
@@ -27,18 +27,22 @@ export type OperationGenerator = {
27
27
  new (context: GenerateContext): WithTransformOperation;
28
28
  id: string;
29
29
  type: 'operation';
30
- pinnable?: boolean;
30
+ _class: 'OperationGenerator';
31
+ pinnable: boolean;
31
32
  isSupported: (operation: OasOperation) => boolean;
32
33
  };
33
34
  export type OperationInsertable<V> = {
34
35
  prototype: V;
35
36
  } & {
37
+ new ({ context, settings, operation }: OperationInsertableConstructorArgs): V;
36
38
  id: string;
37
- new (args: CreateOperationFnArgs): V;
39
+ type: 'operation';
40
+ _class: 'OperationInsertable';
38
41
  entityType: EntityType;
39
42
  toName: ({ operation, baseSettings }: ToOperationNameArgs) => string;
40
43
  toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
41
44
  isSelected: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
45
+ isSupported: (operation: OasOperation) => boolean;
42
46
  } & Function;
43
47
  export {};
44
48
  //# sourceMappingURL=OperationInsertable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OperationInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/OperationInsertable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAEvE,KAAK,kCAAkC,GAAG;IACxC,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,SAAS,EAAE,YAAY,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,YAAY,CAAA;IACvB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,YAAY,CAAA;IACvB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,SAAS,EAAE,YAAY,CAAA;IACvB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,kBAAkB,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,IAAI,CAAA;CACtD,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,OAAO,EAAE,eAAe,GAAG,sBAAsB,CAAA;IACtD,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,WAAW,CAAA;IACjB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;CAClD,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI;IAAE,SAAS,EAAE,CAAC,CAAA;CAAE,GAAG;IACtD,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,kCAAkC,GAAG,CAAC,CAAA;IAC7E,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,WAAW,CAAA;IACjB,MAAM,EAAE,qBAAqB,CAAA;IAC7B,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,mBAAmB,KAAK,MAAM,CAAA;IACpE,YAAY,EAAE,CAAC,EACb,SAAS,EACT,YAAY,EACb,EAAE,yBAAyB,KAAK,MAAM,CAAA;IACvC,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,uBAAuB,KAAK,OAAO,CAAA;IAC7E,WAAW,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;CAElD,GAAG,QAAQ,CAAA"}
@@ -0,0 +1,61 @@
1
+ import { EntityType } from '../EntityType.js';
2
+ import type { GenerateContext } from '../../context/GenerateContext.js';
3
+ import type { OasOperation } from '../../oas/operation/Operation.js';
4
+ import type { ContentSettings } from '../ContentSettings.js';
5
+ import type { ToOperationNameArgs, ToOperationExportPathArgs, IsOperationSelectedArgs } from './OperationInsertable.js';
6
+ export type OperationInsertableArgs = {
7
+ context: GenerateContext;
8
+ settings: ContentSettings;
9
+ operation: OasOperation;
10
+ };
11
+ type ToOperationConfigArgs = {
12
+ id: string;
13
+ entityType?: EntityType;
14
+ toName: ({ operation, baseSettings }: ToOperationNameArgs) => string;
15
+ toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
16
+ isSelected?: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
17
+ isSupported?: (operation: OasOperation) => boolean;
18
+ pinnable?: boolean;
19
+ };
20
+ export declare const toOperationConfig: ({ id, entityType, toName, toExportPath, isSelected, isSupported, pinnable }: ToOperationConfigArgs) => {
21
+ OperationInsertable: {
22
+ new (args: OperationInsertableArgs): {
23
+ settings: ContentSettings;
24
+ operation: OasOperation;
25
+ insert<V extends import("../../mod.js").GeneratedValue>(insertable: import("./OperationInsertable.js").OperationInsertable<V>, operation: OasOperation): {
26
+ settings: ContentSettings;
27
+ definition: import("../Definition.js").Definition<V>;
28
+ };
29
+ createAndRegisterDefinition<Schema extends import("../../mod.js").SchemaType>({ schema, identifier, schemaToValueFn }: {
30
+ schema: Schema;
31
+ identifier: import("../Identifier.js").Identifier;
32
+ schemaToValueFn: import("../../mod.js").SchemaToValueFn;
33
+ }): import("../Definition.js").Definition<import("../../mod.js").TypeSystemOutput<Schema["type"]>>;
34
+ register(args: Partial<import("../../context/GenerateContext.js").RegisterArgs>): void;
35
+ context: GenerateContext;
36
+ skipped: boolean;
37
+ generatorKey: import("../../types/GeneratorKeys.js").GeneratorKey | undefined;
38
+ };
39
+ id: string;
40
+ type: string;
41
+ _class: string;
42
+ entityType: EntityType;
43
+ toName: ({ operation, baseSettings }: ToOperationNameArgs) => string;
44
+ toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
45
+ isSelected: (({ operation, baseSettings }: IsOperationSelectedArgs) => boolean) | undefined;
46
+ isSupported: (operation: OasOperation) => boolean;
47
+ pinnable: boolean;
48
+ };
49
+ OperationGenerator: {
50
+ new (context: GenerateContext): {
51
+ context: GenerateContext;
52
+ };
53
+ id: string;
54
+ type: string;
55
+ _class: string;
56
+ isSupported: (operation: OasOperation) => boolean;
57
+ pinnable: boolean;
58
+ };
59
+ };
60
+ export {};
61
+ //# sourceMappingURL=toOperationConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toOperationConfig.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/toOperationConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,0BAA0B,CAAA;AAIjC,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,SAAS,EAAE,YAAY,CAAA;CACxB,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,mBAAmB,KAAK,MAAM,CAAA;IACpE,YAAY,EAAE,CAAC,EACb,SAAS,EACT,YAAY,EACb,EAAE,yBAAyB,KAAK,MAAM,CAAA;IACvC,UAAU,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,uBAAuB,KAAK,OAAO,CAAA;IAC9E,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,iBAAiB,gFAQ3B,qBAAqB;;mBAYF,uBAAuB;;;;;;;;;;;;;;;;;;;;;8CA9BL,mBAAmB,KAAK,MAAM;oDAIjE,yBAAyB,KAAK,MAAM;mDACI,uBAAuB,KAAK,OAAO;iCACpD,YAAY,KAAK,OAAO;;;;sBA0C3B,eAAe;;;;;;iCA1CZ,YAAY,KAAK,OAAO;;;CAgDnD,CAAA"}
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
3
+ if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
4
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.toOperationConfig = void 0;
8
+ const EntityType_js_1 = require("../EntityType.js");
9
+ const GeneratorKeys_js_1 = require("../../types/GeneratorKeys.js");
10
+ const OperationBase_js_1 = require("./OperationBase.js");
11
+ const GeneratorBase_js_1 = require("../GeneratorBase.js");
12
+ const toOperationConfig = ({ id, entityType, toName, toExportPath, isSelected, isSupported, pinnable }) => {
13
+ var _a, _b;
14
+ const OperationInsertable = (_a = class extends OperationBase_js_1.OperationBase {
15
+ constructor(args) {
16
+ super({
17
+ ...args,
18
+ generatorKey: (0, GeneratorKeys_js_1.toOperationGeneratorKey)({
19
+ generatorId: id,
20
+ operation: args.operation
21
+ })
22
+ });
23
+ }
24
+ },
25
+ __setFunctionName(_a, "OperationInsertable"),
26
+ Object.defineProperty(_a, "id", {
27
+ enumerable: true,
28
+ configurable: true,
29
+ writable: true,
30
+ value: id
31
+ }),
32
+ Object.defineProperty(_a, "type", {
33
+ enumerable: true,
34
+ configurable: true,
35
+ writable: true,
36
+ value: 'operation'
37
+ }),
38
+ Object.defineProperty(_a, "_class", {
39
+ enumerable: true,
40
+ configurable: true,
41
+ writable: true,
42
+ value: 'OperationInsertable'
43
+ }),
44
+ Object.defineProperty(_a, "entityType", {
45
+ enumerable: true,
46
+ configurable: true,
47
+ writable: true,
48
+ value: entityType ?? new EntityType_js_1.EntityType('variable')
49
+ }),
50
+ Object.defineProperty(_a, "toName", {
51
+ enumerable: true,
52
+ configurable: true,
53
+ writable: true,
54
+ value: toName
55
+ }),
56
+ Object.defineProperty(_a, "toExportPath", {
57
+ enumerable: true,
58
+ configurable: true,
59
+ writable: true,
60
+ value: toExportPath
61
+ }),
62
+ Object.defineProperty(_a, "isSelected", {
63
+ enumerable: true,
64
+ configurable: true,
65
+ writable: true,
66
+ value: isSelected
67
+ }),
68
+ Object.defineProperty(_a, "isSupported", {
69
+ enumerable: true,
70
+ configurable: true,
71
+ writable: true,
72
+ value: isSupported ?? (() => true)
73
+ }),
74
+ Object.defineProperty(_a, "pinnable", {
75
+ enumerable: true,
76
+ configurable: true,
77
+ writable: true,
78
+ value: pinnable ?? false
79
+ }),
80
+ _a);
81
+ const OperationGenerator = (_b = class extends GeneratorBase_js_1.GeneratorBase {
82
+ constructor(context) {
83
+ super(context);
84
+ }
85
+ },
86
+ __setFunctionName(_b, "OperationGenerator"),
87
+ Object.defineProperty(_b, "id", {
88
+ enumerable: true,
89
+ configurable: true,
90
+ writable: true,
91
+ value: id
92
+ }),
93
+ Object.defineProperty(_b, "type", {
94
+ enumerable: true,
95
+ configurable: true,
96
+ writable: true,
97
+ value: 'operation'
98
+ }),
99
+ Object.defineProperty(_b, "_class", {
100
+ enumerable: true,
101
+ configurable: true,
102
+ writable: true,
103
+ value: 'OperationGenerator'
104
+ }),
105
+ Object.defineProperty(_b, "isSupported", {
106
+ enumerable: true,
107
+ configurable: true,
108
+ writable: true,
109
+ value: isSupported ?? (() => true)
110
+ }),
111
+ Object.defineProperty(_b, "pinnable", {
112
+ enumerable: true,
113
+ configurable: true,
114
+ writable: true,
115
+ value: pinnable ?? false
116
+ }),
117
+ _b);
118
+ return { OperationInsertable, OperationGenerator };
119
+ };
120
+ exports.toOperationConfig = toOperationConfig;
package/script/mod.d.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  import "./_dnt.polyfills.js";
2
2
  export * from './context/CoreContext.js';
3
- export * from './context/ParseContext.js';
4
3
  export * from './context/GenerateContext.js';
5
- export * from './dsl/base.js';
4
+ export * from './context/ParseContext.js';
6
5
  export * from './dsl/constants.js';
7
6
  export * from './dsl/ContentSettings.js';
8
7
  export * from './dsl/ContentSettings.js';
@@ -11,19 +10,22 @@ export * from './dsl/EntityType.js';
11
10
  export * from './dsl/GeneratedValueList.js';
12
11
  export * from './dsl/Identifier.js';
13
12
  export * from './dsl/Import.js';
14
- export * from './dsl/ModelInsertable.js';
15
- export * from './dsl/ModelDriver.js';
16
- export * from './dsl/OperationInsertable.js';
17
- export * from './dsl/OperationDriver.js';
13
+ export * from './dsl/model/ModelBase.js';
14
+ export * from './dsl/model/ModelDriver.js';
15
+ export * from './dsl/model/ModelInsertable.js';
16
+ export * from './dsl/model/toModelConfig.js';
17
+ export * from './dsl/operation/OperationBase.js';
18
+ export * from './dsl/operation/OperationBase.js';
19
+ export * from './dsl/operation/OperationDriver.js';
20
+ export * from './dsl/operation/OperationInsertable.js';
21
+ export * from './dsl/operation/toOperationConfig.js';
18
22
  export * from './dsl/Stringable.js';
19
23
  export * from './dsl/ValueBase.js';
20
- export * from './dsl/withConfig.js';
21
- export * from './transform/transform.js';
22
24
  export * from './helpers/isImported.js';
23
25
  export * from './helpers/naming.js';
24
26
  export * from './helpers/refFns.js';
25
- export * from './helpers/toResolvedArtifactPath.js';
26
27
  export * from './helpers/strings.js';
28
+ export * from './helpers/toResolvedArtifactPath.js';
27
29
  export * from './oas/discriminator/Discriminator.js';
28
30
  export * from './oas/document/Document.js';
29
31
  export * from './oas/integer/Integer.js';
@@ -37,6 +39,7 @@ export * from './oas/string/String.js';
37
39
  export * from './oas/tag/Tag.js';
38
40
  export * from './oas/void/Void.js';
39
41
  export * from './server/createServer.js';
42
+ export * from './transform/transform.js';
40
43
  export * from './types/CustomValue.js';
41
44
  export * from './types/GeneratedValue.js';
42
45
  export * from './types/GeneratorKeys.js';
@@ -47,10 +50,10 @@ export * from './types/RefName.js';
47
50
  export * from './types/Settings.js';
48
51
  export * from './types/Settings.js';
49
52
  export * from './types/TypeSystem.js';
50
- export * from './typescript/List.js';
51
53
  export * from './typescript/FunctionParameter.js';
52
54
  export * from './typescript/identifiers.js';
53
55
  export * from './typescript/keyValues.js';
56
+ export * from './typescript/List.js';
54
57
  export * from './typescript/PathParams.js';
55
58
  export * from './typescript/ReactRouterPathParams.js';
56
59
  export * from './typescript/toPathTemplate.js';
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qCAAqC,CAAA;AACnD,cAAc,sBAAsB,CAAA;AACpC,cAAc,sCAAsC,CAAA;AACpD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kBAAkB,CAAA;AAChC,cAAc,kCAAkC,CAAA;AA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