@luvio/compiler 0.78.0 → 0.82.1
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/dist/codegen/adapter/adapter-network-cache-policy.js +5 -1
- package/dist/codegen/adapter/adapter-network-cache-policy.js.map +1 -1
- package/dist/codegen/adapter/adapter-param-type-check.js +2 -1
- package/dist/codegen/adapter/adapter-param-type-check.js.map +1 -1
- package/dist/codegen/adapter/index.d.ts +4 -0
- package/dist/codegen/adapter/index.js +5 -1
- package/dist/codegen/adapter/index.js.map +1 -1
- package/dist/codegen/adapter-tests/index.js +1 -1
- package/dist/codegen/adapter-tests/index.js.map +1 -1
- package/dist/codegen/graphql/enum/index.d.ts +2 -2
- package/dist/codegen/graphql/enum/index.js +6 -5
- package/dist/codegen/graphql/enum/index.js.map +1 -1
- package/dist/codegen/graphql/enum/interface.d.ts +4 -0
- package/dist/codegen/graphql/enum/interface.js +32 -0
- package/dist/codegen/graphql/enum/interface.js.map +1 -0
- package/dist/codegen/graphql/source-printer/graphql-adapter-source-printer.d.ts +7 -0
- package/dist/codegen/graphql/source-printer/graphql-adapter-source-printer.js +11 -0
- package/dist/codegen/graphql/source-printer/graphql-adapter-source-printer.js.map +1 -0
- package/dist/codegen/graphql/source-printer/graphql-resource-source-printer.d.ts +7 -0
- package/dist/codegen/graphql/source-printer/graphql-resource-source-printer.js +11 -0
- package/dist/codegen/graphql/source-printer/graphql-resource-source-printer.js.map +1 -0
- package/dist/codegen/graphql/source-printer/graphql-source-printer.d.ts +27 -0
- package/dist/codegen/graphql/source-printer/graphql-source-printer.js +50 -0
- package/dist/codegen/graphql/source-printer/graphql-source-printer.js.map +1 -0
- package/dist/codegen/graphql/source-printer/graphql-type-source-printer.d.ts +13 -0
- package/dist/codegen/graphql/source-printer/graphql-type-source-printer.js +65 -0
- package/dist/codegen/graphql/source-printer/graphql-type-source-printer.js.map +1 -0
- package/dist/codegen/graphql/source-printer/index.d.ts +5 -0
- package/dist/codegen/graphql/source-printer/index.js +12 -0
- package/dist/codegen/graphql/source-printer/index.js.map +1 -0
- package/dist/codegen/graphql/type/constants.d.ts +7 -0
- package/dist/codegen/graphql/type/constants.js +11 -0
- package/dist/codegen/graphql/type/constants.js.map +1 -0
- package/dist/codegen/graphql/type/index.d.ts +3 -2
- package/dist/codegen/graphql/type/index.js +30 -5
- package/dist/codegen/graphql/type/index.js.map +1 -1
- package/dist/codegen/graphql/type/ingest.d.ts +9 -0
- package/dist/codegen/graphql/type/ingest.js +131 -0
- package/dist/codegen/graphql/type/ingest.js.map +1 -0
- package/dist/codegen/graphql/type/interface.d.ts +3 -3
- package/dist/codegen/graphql/type/interface.js +2 -48
- package/dist/codegen/graphql/type/interface.js.map +1 -1
- package/dist/codegen/graphql/union/index.d.ts +2 -2
- package/dist/codegen/graphql/union/index.js +6 -5
- package/dist/codegen/graphql/union/index.js.map +1 -1
- package/dist/codegen/graphql/union/interface.d.ts +4 -0
- package/dist/codegen/graphql/union/interface.js +30 -0
- package/dist/codegen/graphql/union/interface.js.map +1 -0
- package/dist/codegen/graphql/utils/index.d.ts +1 -0
- package/dist/codegen/graphql/utils/index.js +8 -0
- package/dist/codegen/graphql/utils/index.js.map +1 -0
- package/dist/codegen/graphql/utils/types.d.ts +10 -0
- package/dist/codegen/graphql/utils/types.js +45 -0
- package/dist/codegen/graphql/utils/types.js.map +1 -0
- package/dist/codegen/resource/create-resource-request.js +2 -2
- package/dist/codegen/resource/create-resource-request.js.map +1 -1
- package/dist/codegen/rest/source-printer/rest-adapter-source-printer.d.ts +12 -0
- package/dist/codegen/rest/source-printer/rest-adapter-source-printer.js +60 -0
- package/dist/codegen/rest/source-printer/rest-adapter-source-printer.js.map +1 -0
- package/dist/codegen/rest/source-printer/rest-source-printer.d.ts +12 -0
- package/dist/codegen/rest/source-printer/rest-source-printer.js +78 -0
- package/dist/codegen/rest/source-printer/rest-source-printer.js.map +1 -0
- package/dist/codegen/source-writer/file-system-source-writer.d.ts +14 -0
- package/dist/codegen/source-writer/file-system-source-writer.js +31 -0
- package/dist/codegen/source-writer/file-system-source-writer.js.map +1 -0
- package/dist/compiler/raml-compiler.d.ts +15 -0
- package/dist/compiler/raml-compiler.js +34 -0
- package/dist/compiler/raml-compiler.js.map +1 -0
- package/dist/generate.d.ts +3 -5
- package/dist/generate.js +0 -134
- package/dist/generate.js.map +1 -1
- package/dist/interfaces/compiler.d.ts +4 -0
- package/dist/interfaces/compiler.js +3 -0
- package/dist/interfaces/compiler.js.map +1 -0
- package/dist/interfaces/index.d.ts +5 -0
- package/dist/interfaces/index.js +3 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/interfaces/source-printers/graphql/graphql-adapter-printer.d.ts +6 -0
- package/dist/interfaces/source-printers/graphql/graphql-adapter-printer.js +3 -0
- package/dist/interfaces/source-printers/graphql/graphql-adapter-printer.js.map +1 -0
- package/dist/interfaces/source-printers/graphql/graphql-resource-printer.d.ts +6 -0
- package/dist/interfaces/source-printers/graphql/graphql-resource-printer.js +3 -0
- package/dist/interfaces/source-printers/graphql/graphql-resource-printer.js.map +1 -0
- package/dist/interfaces/source-printers/graphql/graphql-type-printer.d.ts +6 -0
- package/dist/interfaces/source-printers/graphql/graphql-type-printer.js +3 -0
- package/dist/interfaces/source-printers/graphql/graphql-type-printer.js.map +1 -0
- package/dist/interfaces/source-printers/index.d.ts +5 -0
- package/dist/interfaces/source-printers/index.js +3 -0
- package/dist/interfaces/source-printers/index.js.map +1 -0
- package/dist/interfaces/source-printers/rest/rest-adapter-printer.d.ts +5 -0
- package/dist/interfaces/source-printers/rest/rest-adapter-printer.js +3 -0
- package/dist/interfaces/source-printers/rest/rest-adapter-printer.js.map +1 -0
- package/dist/interfaces/source-printers/source-printer.d.ts +6 -0
- package/dist/interfaces/source-printers/source-printer.js +3 -0
- package/dist/interfaces/source-printers/source-printer.js.map +1 -0
- package/dist/interfaces/source-writer.d.ts +6 -0
- package/dist/interfaces/source-writer.js +3 -0
- package/dist/interfaces/source-writer.js.map +1 -0
- package/dist/main.d.ts +8 -3
- package/dist/main.js +16 -5
- package/dist/main.js.map +1 -1
- package/dist/parser/main.d.ts +8 -1
- package/dist/parser/main.js +186 -180
- package/dist/parser/main.js.map +1 -1
- package/dist/utils/files.d.ts +0 -8
- package/dist/utils/files.js +1 -16
- package/dist/utils/files.js.map +1 -1
- package/dist/utils/generation.js +5 -5
- package/dist/utils/generation.js.map +1 -1
- package/dist/utils/imports.js +4 -3
- package/dist/utils/imports.js.map +1 -1
- package/package.json +4 -4
- package/dist/codegen/graphql/index.d.ts +0 -13
- package/dist/codegen/graphql/index.js +0 -87
- package/dist/codegen/graphql/index.js.map +0 -1
- package/dist/parse.d.ts +0 -2
- package/dist/parse.js +0 -14
- package/dist/parse.js.map +0 -1
package/dist/parser/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.LuvioRamlFileParser = void 0;
|
|
4
4
|
const amf_client_js_1 = require("amf-client-js");
|
|
5
5
|
const aml_1 = require("../utils/aml");
|
|
6
6
|
const annotation_coerceFunction_1 = require("./annotation-coerceFunction");
|
|
@@ -74,202 +74,208 @@ function buildConfigShape(keys) {
|
|
|
74
74
|
const configProperties = Object.entries(keys).map(([identifier, { valueShape }]) => new amf_client_js_1.model.domain.PropertyShape().withName(identifier).withRange(valueShape).withMinCount(1));
|
|
75
75
|
return (0, aml_1.convertNodeShapeToNodeShapeDefinition)(new amf_client_js_1.model.domain.NodeShape().withProperties(configProperties), Object.create(null));
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
if (document === undefined) {
|
|
82
|
-
return {
|
|
83
|
-
modelInfo: undefined,
|
|
84
|
-
errors: (0, logger_1.getLogErrors)(),
|
|
85
|
-
};
|
|
77
|
+
// W-10920294 TODO: align naming with design documents
|
|
78
|
+
class LuvioRamlFileParser {
|
|
79
|
+
constructor(ramlPath) {
|
|
80
|
+
this.ramlPath = ramlPath;
|
|
86
81
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
82
|
+
async parse() {
|
|
83
|
+
(0, logger_1.resetLogger)();
|
|
84
|
+
const model = await (0, parse_1.parseAndValidate)(this.ramlPath);
|
|
85
|
+
const document = resolveDocument(model);
|
|
86
|
+
if (document === undefined) {
|
|
87
|
+
return {
|
|
88
|
+
modelInfo: undefined,
|
|
89
|
+
errors: (0, logger_1.getLogErrors)(),
|
|
90
|
+
};
|
|
95
91
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
92
|
+
const api = document.encodes;
|
|
93
|
+
const keyPrefix = (0, annotation_keyPrefix_1.getKeyPrefix)(api);
|
|
94
|
+
const rootTtl = (0, annotation_ttl_1.collectTTLAnnotation)(api);
|
|
95
|
+
const shapeCoerceFunction = {};
|
|
96
|
+
const shapes = {};
|
|
97
|
+
for (const decl of document.declares) {
|
|
98
|
+
if ((0, aml_1.isNodeShape)(decl)) {
|
|
99
|
+
shapes[decl.id] = decl;
|
|
100
|
+
}
|
|
101
|
+
// The coerceFunction annotation in particular might be on a Node shape
|
|
102
|
+
// or might be on a scalar shape so populating it here
|
|
103
|
+
if ((0, aml_1.isAnyShape)(decl)) {
|
|
104
|
+
const coerceFunction = (0, annotation_coerceFunction_1.collectCoerceFunctionAnnotation)(decl, document);
|
|
105
|
+
if (coerceFunction !== undefined) {
|
|
106
|
+
shapeCoerceFunction[decl.name.value()] = coerceFunction;
|
|
107
|
+
}
|
|
102
108
|
}
|
|
103
109
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
110
|
+
const declaredShapes = {};
|
|
111
|
+
const shapeKeys = {};
|
|
112
|
+
const shapeTtls = {};
|
|
113
|
+
const shapeIntegrity = {};
|
|
114
|
+
const shapeOpaque = {};
|
|
115
|
+
const shapePaginated = {};
|
|
116
|
+
const shapePrivate = {};
|
|
117
|
+
const shapeInheritance = {};
|
|
118
|
+
const shapeDiscriminatorTypes = {};
|
|
119
|
+
const methodOperations = {};
|
|
120
|
+
const compositeResources = {};
|
|
121
|
+
for (const shape of Object.values(shapes)) {
|
|
122
|
+
const shapeId = shape.id;
|
|
123
|
+
const nodeShape = (0, shape_resolution_1.resolveShape)(shape);
|
|
124
|
+
declaredShapes[shapeId] = nodeShape;
|
|
125
|
+
const keys = (0, annotation_key_1.collectKeyAnnotation)(shape);
|
|
126
|
+
if (keys !== undefined) {
|
|
127
|
+
if (keyPrefix === '') {
|
|
128
|
+
(0, logger_1.logError)(`Missing "keyPrefix" annotation. "keyPrefix" must be defined when (key) annotation is present`);
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
shapeKeys[shapeId] = keys;
|
|
132
|
+
}
|
|
124
133
|
}
|
|
125
|
-
|
|
126
|
-
|
|
134
|
+
const ttl = (0, annotation_ttl_1.collectTTLAnnotation)(shape);
|
|
135
|
+
if (ttl !== undefined) {
|
|
136
|
+
shapeTtls[shapeId] = ttl;
|
|
127
137
|
}
|
|
138
|
+
const integrity = (0, annotation_integrity_1.collectIntegrityAnnotation)(shape);
|
|
139
|
+
if (integrity !== undefined) {
|
|
140
|
+
shapeIntegrity[shapeId] = integrity;
|
|
141
|
+
}
|
|
142
|
+
const opaque = (0, annotation_opaque_1.collectOpaqueAnnotation)(shape);
|
|
143
|
+
if (opaque === true) {
|
|
144
|
+
shapeOpaque[shapeId] = true;
|
|
145
|
+
}
|
|
146
|
+
const paginated = (0, annotation_paginated_1.collectPaginatedAnnotation)(shape, keys);
|
|
147
|
+
if (paginated) {
|
|
148
|
+
shapePaginated[shapeId] = paginated;
|
|
149
|
+
}
|
|
150
|
+
const privates = (0, annotation_private_1.collectPrivateAnnotation)(shape);
|
|
151
|
+
if (privates !== undefined) {
|
|
152
|
+
shapePrivate[shapeId] = privates;
|
|
153
|
+
}
|
|
154
|
+
(0, shape_inheritance_1.resolveInheritance)(shape, shapeKeys, shapeTtls, shapeInheritance, shapeDiscriminatorTypes);
|
|
128
155
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
const opaque = (0, annotation_opaque_1.collectOpaqueAnnotation)(shape);
|
|
138
|
-
if (opaque === true) {
|
|
139
|
-
shapeOpaque[shapeId] = true;
|
|
140
|
-
}
|
|
141
|
-
const paginated = (0, annotation_paginated_1.collectPaginatedAnnotation)(shape, keys);
|
|
142
|
-
if (paginated) {
|
|
143
|
-
shapePaginated[shapeId] = paginated;
|
|
144
|
-
}
|
|
145
|
-
const privates = (0, annotation_private_1.collectPrivateAnnotation)(shape);
|
|
146
|
-
if (privates !== undefined) {
|
|
147
|
-
shapePrivate[shapeId] = privates;
|
|
156
|
+
let normalizableShapes = {};
|
|
157
|
+
for (const shape of Object.values(declaredShapes)) {
|
|
158
|
+
normalizableShapes = {
|
|
159
|
+
...normalizableShapes,
|
|
160
|
+
...(0, shape_normalization_1.collectNormalizableShapes)(shape, shapeKeys, shapeOpaque, shapeDiscriminatorTypes),
|
|
161
|
+
};
|
|
162
|
+
validateShape(shape, normalizableShapes);
|
|
148
163
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
const shape = normalizableShapes[key];
|
|
167
|
-
normalizableShapeDefinitions[key] = (0, aml_1.convertShapeToShapeDefinition)(shape, Object.create(null));
|
|
168
|
-
});
|
|
169
|
-
// Collect all method annotations - Composite resource mapping needs to know about all of them.
|
|
170
|
-
for (const endpoint of api.endPoints) {
|
|
171
|
-
for (const operation of endpoint.operations) {
|
|
172
|
-
const annotation = (0, annotation_method_1.collectMethodAnnotation)(operation);
|
|
173
|
-
if (annotation !== undefined) {
|
|
174
|
-
methodOperations[operation.id] = annotation;
|
|
164
|
+
const declaredShapeDefinitions = {};
|
|
165
|
+
Object.keys(declaredShapes).forEach((key) => {
|
|
166
|
+
const shape = declaredShapes[key];
|
|
167
|
+
declaredShapeDefinitions[key] = (0, aml_1.convertNodeShapeToNodeShapeDefinition)(shape, Object.create(null));
|
|
168
|
+
});
|
|
169
|
+
const normalizableShapeDefinitions = {};
|
|
170
|
+
Object.keys(normalizableShapes).forEach((key) => {
|
|
171
|
+
const shape = normalizableShapes[key];
|
|
172
|
+
normalizableShapeDefinitions[key] = (0, aml_1.convertShapeToShapeDefinition)(shape, Object.create(null));
|
|
173
|
+
});
|
|
174
|
+
// Collect all method annotations - Composite resource mapping needs to know about all of them.
|
|
175
|
+
for (const endpoint of api.endPoints) {
|
|
176
|
+
for (const operation of endpoint.operations) {
|
|
177
|
+
const annotation = (0, annotation_method_1.collectMethodAnnotation)(operation);
|
|
178
|
+
if (annotation !== undefined) {
|
|
179
|
+
methodOperations[operation.id] = annotation;
|
|
180
|
+
}
|
|
175
181
|
}
|
|
176
182
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
// Collect all composite annotations.
|
|
184
|
+
for (const endpoint of api.endPoints) {
|
|
185
|
+
for (const operation of endpoint.operations) {
|
|
186
|
+
const semanticMethod = methodOperations[operation.id] || operation.method.value();
|
|
187
|
+
const composite = (0, annotation_composite_1.collectCompositeAnnotation)(document, endpoint, operation, api.endPoints, semanticMethod, methodOperations);
|
|
188
|
+
if (composite !== undefined) {
|
|
189
|
+
compositeResources[endpoint.id] = composite;
|
|
190
|
+
}
|
|
185
191
|
}
|
|
186
192
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
// collect paginated container types
|
|
197
|
-
const shapePaginatedContainer = {};
|
|
198
|
-
resources.forEach((resource) => {
|
|
199
|
-
const { paginationParams, returnShape } = resource;
|
|
200
|
-
if (paginationParams === undefined ||
|
|
201
|
-
returnShape === undefined ||
|
|
202
|
-
shapePaginatedContainer[returnShape.id] !== undefined) {
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
const paginatedTypeInfo = shapePaginated[returnShape.id];
|
|
206
|
-
if (paginatedTypeInfo !== undefined) {
|
|
207
|
-
resource.paginationPath = [
|
|
208
|
-
{
|
|
209
|
-
propertyName: paginatedTypeInfo.items,
|
|
210
|
-
shape: returnShape,
|
|
211
|
-
},
|
|
212
|
-
];
|
|
213
|
-
return;
|
|
214
|
-
}
|
|
215
|
-
// find the path to paginated type from resource root type
|
|
216
|
-
const { strategy } = paginationParams;
|
|
217
|
-
const paginatedContainerPath = (0, shape_paginated_container_1.collectPaginatedContainerPath)(strategy, returnShape, shapePaginated, shapeOpaque);
|
|
218
|
-
if (paginatedContainerPath === undefined) {
|
|
219
|
-
(0, logger_1.logError)(`Paginated resource '${resource.name}' must contain a paginated type`);
|
|
220
|
-
return;
|
|
193
|
+
const resources = (0, resource_1.collectResources)(api, document, rootTtl, shapeKeys, shapeTtls, shapeCoerceFunction, methodOperations);
|
|
194
|
+
if (resources.length > 0 && keyPrefix === '') {
|
|
195
|
+
(0, logger_1.logError)(`Missing "keyPrefix" annotation. "keyPrefix" must be defined when resources are present`);
|
|
196
|
+
return {
|
|
197
|
+
modelInfo: undefined,
|
|
198
|
+
errors: (0, logger_1.getLogErrors)(),
|
|
199
|
+
};
|
|
221
200
|
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
201
|
+
// collect paginated container types
|
|
202
|
+
const shapePaginatedContainer = {};
|
|
203
|
+
resources.forEach((resource) => {
|
|
204
|
+
const { paginationParams, returnShape } = resource;
|
|
205
|
+
if (paginationParams === undefined ||
|
|
206
|
+
returnShape === undefined ||
|
|
207
|
+
shapePaginatedContainer[returnShape.id] !== undefined) {
|
|
225
208
|
return;
|
|
226
209
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
210
|
+
const paginatedTypeInfo = shapePaginated[returnShape.id];
|
|
211
|
+
if (paginatedTypeInfo !== undefined) {
|
|
212
|
+
resource.paginationPath = [
|
|
213
|
+
{
|
|
214
|
+
propertyName: paginatedTypeInfo.items,
|
|
215
|
+
shape: returnShape,
|
|
216
|
+
},
|
|
217
|
+
];
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
// find the path to paginated type from resource root type
|
|
221
|
+
const { strategy } = paginationParams;
|
|
222
|
+
const paginatedContainerPath = (0, shape_paginated_container_1.collectPaginatedContainerPath)(strategy, returnShape, shapePaginated, shapeOpaque);
|
|
223
|
+
if (paginatedContainerPath === undefined) {
|
|
224
|
+
(0, logger_1.logError)(`Paginated resource '${resource.name}' must contain a paginated type`);
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
paginatedContainerPath.forEach((pathNode, index) => {
|
|
228
|
+
if (index === paginatedContainerPath.length - 1) {
|
|
229
|
+
// the last element is the paginated type
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
shapePaginatedContainer[pathNode.shape.id] = {
|
|
233
|
+
strategy,
|
|
234
|
+
propertyName: pathNode.propertyName,
|
|
235
|
+
shape: pathNode.shape,
|
|
236
|
+
};
|
|
237
|
+
});
|
|
238
|
+
resource.paginationPath = paginatedContainerPath;
|
|
232
239
|
});
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
240
|
+
const shapeKeyConfigs = {};
|
|
241
|
+
const shapeKeysDefinition = {};
|
|
242
|
+
Object.keys(shapeKeys).forEach((key) => {
|
|
243
|
+
const shapeKey = shapeKeys[key];
|
|
244
|
+
shapeKeyConfigs[key] = buildConfigShape(shapeKey);
|
|
245
|
+
const shapeKeyFieldsDefinition = {};
|
|
246
|
+
Object.entries(shapeKey).forEach(([k, { valuePath, valueShape }]) => {
|
|
247
|
+
shapeKeyFieldsDefinition[k] = {
|
|
248
|
+
valuePath,
|
|
249
|
+
valueShapeDefinition: (0, aml_1.convertShapeToShapeDefinition)(valueShape, Object.create(null)),
|
|
250
|
+
};
|
|
251
|
+
});
|
|
252
|
+
shapeKeysDefinition[key] = shapeKeyFieldsDefinition;
|
|
246
253
|
});
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
return { modelInfo: undefined
|
|
254
|
+
const modelInfo = {
|
|
255
|
+
keyPrefix,
|
|
256
|
+
rootTtl,
|
|
257
|
+
declaredShapeDefinitions,
|
|
258
|
+
normalizableShapeDefinitions,
|
|
259
|
+
shapeOpaque,
|
|
260
|
+
shapeKeysDefinition,
|
|
261
|
+
shapeKeyConfigs,
|
|
262
|
+
shapeTtls,
|
|
263
|
+
shapeIntegrity,
|
|
264
|
+
shapePaginated,
|
|
265
|
+
shapePaginatedContainer,
|
|
266
|
+
shapePrivate,
|
|
267
|
+
shapeCoerceFunction,
|
|
268
|
+
resources,
|
|
269
|
+
compositeResources,
|
|
270
|
+
shapeDiscriminatorTypes: (0, shape_inheritance_1.convertShapeDiscriminatorTypes)(shapeDiscriminatorTypes),
|
|
271
|
+
shapeInheritance,
|
|
272
|
+
};
|
|
273
|
+
const errors = (0, logger_1.getLogErrors)();
|
|
274
|
+
if (errors.length > 0) {
|
|
275
|
+
return { modelInfo: undefined, errors };
|
|
276
|
+
}
|
|
277
|
+
return { modelInfo, errors: undefined };
|
|
271
278
|
}
|
|
272
|
-
return { modelInfo, errors: undefined };
|
|
273
279
|
}
|
|
274
|
-
exports.
|
|
280
|
+
exports.LuvioRamlFileParser = LuvioRamlFileParser;
|
|
275
281
|
//# sourceMappingURL=main.js.map
|
package/dist/parser/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/parser/main.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAgB7C,sCAUsB;AACtB,2EAA8E;AAC9E,iEAAoE;AACpE,qDAAwD;AACxD,iEAAsD;AACtD,2DAA8D;AAC9D,iEAAoE;AACpE,6DAAgE;AAChE,qDAAwD;AACxD,6DAAsD;AACtD,mCAA2C;AAC3C,yCAA8C;AAC9C,2EAA4E;AAE5E,2DAAyF;AACzF,+DAAkE;AAClE,yDAAkD;AAElD,qCAA+D;AAE/D,iEAAoE;AACpE,2DAA8D;
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/parser/main.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAgB7C,sCAUsB;AACtB,2EAA8E;AAC9E,iEAAoE;AACpE,qDAAwD;AACxD,iEAAsD;AACtD,2DAA8D;AAC9D,iEAAoE;AACpE,6DAAgE;AAChE,qDAAwD;AACxD,6DAAsD;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AAC;YACH,mBAAmB,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC;QACxD,CAAC,CAAC,CAAC;QAEH,MAAM,SAAS,GAAG;YACd,SAAS;YACT,OAAO;YACP,wBAAwB;YACxB,4BAA4B;YAC5B,WAAW;YACX,mBAAmB;YACnB,eAAe;YACf,SAAS;YACT,cAAc;YACd,cAAc;YACd,uBAAuB;YACvB,YAAY;YACZ,mBAAmB;YACnB,SAAS;YACT,kBAAkB;YAClB,uBAAuB,EAAE,IAAA,kDAA8B,EAAC,uBAAuB,CAAC;YAChF,gBAAgB;SACnB,CAAC;QAEF,MAAM,MAAM,GAAG,IAAA,qBAAY,GAAE,CAAC;QAC9B,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;YACnB,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;SAC3C;QACD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IAC5C,CAAC;CACJ;AAvRD,kDAuRC"}
|
package/dist/utils/files.d.ts
CHANGED
|
@@ -32,11 +32,3 @@ export declare function isValidFileName(name: string): boolean;
|
|
|
32
32
|
* @returns Filename without the extension
|
|
33
33
|
*/
|
|
34
34
|
export declare function getFileName(filePath: string, extension: string): string;
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
37
|
-
* @param outputDir : Output directory path
|
|
38
|
-
* @param modules : Codegen modules, <relative path>: <string content>
|
|
39
|
-
*/
|
|
40
|
-
export declare function writeModulesSync(outputDir: string, modules: {
|
|
41
|
-
[name: string]: string;
|
|
42
|
-
}): void;
|
package/dist/utils/files.js
CHANGED
|
@@ -3,9 +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.
|
|
6
|
+
exports.getFileName = exports.isValidFileName = exports.relativePathJoin = exports.resolveFileLocation = exports.ramlResourceToPath = exports.pathToRamlResource = exports.AMF_RESOURCE_PREFIX = void 0;
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const fs_1 = __importDefault(require("fs"));
|
|
9
8
|
exports.AMF_RESOURCE_PREFIX = 'file://';
|
|
10
9
|
function pathToRamlResource(filePath) {
|
|
11
10
|
const absPath = filePath.startsWith('/') ? filePath : path_1.default.resolve(filePath);
|
|
@@ -77,18 +76,4 @@ function getFileName(filePath, extension) {
|
|
|
77
76
|
return filePath.substring(startIndex + 1, endIndex);
|
|
78
77
|
}
|
|
79
78
|
exports.getFileName = getFileName;
|
|
80
|
-
/**
|
|
81
|
-
*
|
|
82
|
-
* @param outputDir : Output directory path
|
|
83
|
-
* @param modules : Codegen modules, <relative path>: <string content>
|
|
84
|
-
*/
|
|
85
|
-
function writeModulesSync(outputDir, modules) {
|
|
86
|
-
for (const [relPath, code] of Object.entries(modules)) {
|
|
87
|
-
const fullPath = path_1.default.join(outputDir, relPath);
|
|
88
|
-
const moduleDir = path_1.default.dirname(fullPath);
|
|
89
|
-
fs_1.default.mkdirSync(moduleDir, { recursive: true });
|
|
90
|
-
fs_1.default.writeFileSync(fullPath, code);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
exports.writeModulesSync = writeModulesSync;
|
|
94
79
|
//# sourceMappingURL=files.js.map
|
package/dist/utils/files.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/utils/files.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/utils/files.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAGX,QAAA,mBAAmB,GAAG,SAAS,CAAC;AAE7C,SAAgB,kBAAkB,CAAC,QAAgB;IAC/C,MAAM,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,C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G,qBAAqB,CAAC;IAC9C,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC;AAHD,0CAGC;AAED;;;;;GAKG;AACH,SAAgB,WAAW,CAAC,QAAgB,EAAE,SAAiB;IAC3D,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAC7C,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAC7C,OAAO,QAAQ,CAAC,SAAS,CAAC,UAAU,GAAG,CAAC,EAAE,QAAQ,CAAC,CAAC;AACxD,CAAC;AAJD,kCAIC"}
|
package/dist/utils/generation.js
CHANGED
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.createCodeGenerationContext = void 0;
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const fs_1 = __importDefault(require("fs"));
|
|
9
8
|
const deindent_1 = __importDefault(require("./deindent"));
|
|
10
9
|
const imports_1 = require("./imports");
|
|
11
10
|
function createCodeGenerationContext(plugin, compilerConfig) {
|
|
@@ -31,10 +30,11 @@ function createCodeGenerationContext(plugin, compilerConfig) {
|
|
|
31
30
|
* @param {string} code - The code to be written to the filesystem.
|
|
32
31
|
*/
|
|
33
32
|
write(code) {
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
const resolvedCode = (0, imports_1.resolveImports)(code);
|
|
34
|
+
const relativeModuleDir = path_1.default.relative(compilerConfig.sourceWriter.outputDirectory, outputPath);
|
|
35
|
+
compilerConfig.sourceWriter.writeModules({
|
|
36
|
+
[relativeModuleDir]: resolvedCode,
|
|
37
|
+
});
|
|
38
38
|
},
|
|
39
39
|
};
|
|
40
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generation.js","sourceRoot":"","sources":["../../src/utils/generation.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;
|
|
1
|
+
{"version":3,"file":"generation.js","sourceRoot":"","sources":["../../src/utils/generation.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAGxB,0DAAkC;AAElC,uCAAgE;AAUhE,SAAgB,2BAA2B,CACvC,MAAsB,EACtB,cAA8B;IAE9B,OAAO,CAAC,UAAkB,EAAyB,EAAE;QACjD,MAAM,aAAa,GAAG,IAAA,6BAAmB,EAAC;YACtC,QAAQ,EAAE;gBACN,MAAM,EAAE,MAAM;gBACd,MAAM,EAAE,cAAc;aACzB;YACD,MAAM,EAAE,cAAI,CAAC,KAAK,CAAC,UAAU,CAAC;SACjC,CAAC,CAAC;QAEH,OAAO;YACH;;eAEG;YACH,QAAQ,EAAR,kBAAQ;YAER;;eAEG;YACH,aAAa;YAEb;;;eAGG;YACH,KAAK,CAAC,IAAY;gBACd,MAAM,YAAY,GAAG,IAAA,wBAAc,EAAC,IAAI,CAAC,CAAC;gBAC1C,MAAM,iBAAiB,GAAG,cAAI,CAAC,QAAQ,CACnC,cAAc,CAAC,YAAY,CAAC,eAAe,EAC3C,UAAU,CACb,CAAC;gBACF,cAAc,CAAC,YAAY,CAAC,YAAY,CAAC;oBACrC,CAAC,iBAAiB,CAAC,EAAE,YAAY;iBACpC,CAAC,CAAC;YACP,CAAC;SACJ,CAAC;IACN,CAAC,CAAC;AACN,CAAC;AAxCD,kEAwCC"}
|
package/dist/utils/imports.js
CHANGED
|
@@ -55,7 +55,7 @@ function resolveImports(code) {
|
|
|
55
55
|
exports.resolveImports = resolveImports;
|
|
56
56
|
function getRamlArtifactAbsolutePath(codeGenerationEnvironment, id, extName = '.ts') {
|
|
57
57
|
const { config } = codeGenerationEnvironment.compiler;
|
|
58
|
-
const {
|
|
58
|
+
const { outputDirectory } = config.sourceWriter;
|
|
59
59
|
const formattedId = id.replace('file:/', '');
|
|
60
60
|
const localPath = formattedId.split('#')[1];
|
|
61
61
|
if (localPath === undefined) {
|
|
@@ -68,7 +68,7 @@ function getRamlArtifactAbsolutePath(codeGenerationEnvironment, id, extName = '.
|
|
|
68
68
|
if (artifactName === undefined) {
|
|
69
69
|
throw new Error(`Invalid RAML id: "${id}"`);
|
|
70
70
|
}
|
|
71
|
-
return path_1.default.parse(`${
|
|
71
|
+
return path_1.default.parse(`${outputDirectory}/${type}/${artifactName}${extName}`);
|
|
72
72
|
}
|
|
73
73
|
function getPluginResult(originalId, originalIdentifier, codeGenerationEnvironment) {
|
|
74
74
|
var _a, _b;
|
|
@@ -95,7 +95,8 @@ function dotSlash(relative, parsedAbsolutePath, output, identifier) {
|
|
|
95
95
|
return namedImport(relative, identifier);
|
|
96
96
|
}
|
|
97
97
|
function createImportContext(codeGenerationEnvironment) {
|
|
98
|
-
const { compiler: { config: {
|
|
98
|
+
const { compiler: { config: { sourceWriter }, }, output, } = codeGenerationEnvironment;
|
|
99
|
+
const outputDir = sourceWriter.outputDirectory;
|
|
99
100
|
const adapterUtilsAbsolutePath = path_1.default.join(outputDir, 'adapters', 'adapter-utils');
|
|
100
101
|
const typeUtilsAbsPath = path_1.default.join(outputDir, 'types', 'type-utils');
|
|
101
102
|
const paginationUtilsAbsBasePath = path_1.default.join(outputDir, 'pagination');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imports.js","sourceRoot":"","sources":["../../src/utils/imports.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,0DAAkC;AAClC,qCAAqC;AAGrC,MAAM,gBAAgB,GAAG,gCAAgC,CAAC;AAE1D,SAAS,cAAc,CAAC,GAAW;IAC/B,OAAO,GAAG,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE;QAC1C,OAAO,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC;IACrC,CAAC,CAAC,CAAC;AACP,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAc;IACtC,OAAO,MAAM;SACR,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CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luvio/compiler",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.82.1",
|
|
4
4
|
"description": "Luvio Compiler",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"types": "dist/main.d.ts",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"resources/"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@luvio/graphql-parser": "0.
|
|
34
|
+
"@luvio/graphql-parser": "0.82.1",
|
|
35
35
|
"amf-client-js": "4.2.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@luvio/adapter-test-library": "0.
|
|
39
|
-
"@luvio/engine": "0.
|
|
38
|
+
"@luvio/adapter-test-library": "0.82.1",
|
|
39
|
+
"@luvio/engine": "0.82.1"
|
|
40
40
|
}
|
|
41
41
|
}
|