@dxos/protobuf-compiler 0.7.5-main.e9bb01b → 0.7.5-staging.2ff1350
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/src/configure.d.ts.map +1 -1
- package/dist/src/configure.js +5 -10
- package/dist/src/configure.js.map +1 -1
- package/dist/src/generator/context.js +1 -2
- package/dist/src/generator/context.js.map +1 -1
- package/dist/src/generator/declaration-generator.d.ts +3 -3
- package/dist/src/generator/declaration-generator.d.ts.map +1 -1
- package/dist/src/generator/declaration-generator.js +20 -58
- package/dist/src/generator/declaration-generator.js.map +1 -1
- package/dist/src/generator/doc-comment.js +2 -9
- package/dist/src/generator/doc-comment.js.map +1 -1
- package/dist/src/generator/enum.js +6 -43
- package/dist/src/generator/enum.js.map +1 -1
- package/dist/src/generator/field.d.ts +3 -3
- package/dist/src/generator/field.d.ts.map +1 -1
- package/dist/src/generator/field.js +12 -51
- package/dist/src/generator/field.js.map +1 -1
- package/dist/src/generator/file-generator.js +20 -59
- package/dist/src/generator/file-generator.js.map +1 -1
- package/dist/src/generator/index.js +2 -18
- package/dist/src/generator/index.js.map +1 -1
- package/dist/src/generator/message.js +9 -46
- package/dist/src/generator/message.js.map +1 -1
- package/dist/src/generator/package-exports.js +12 -16
- package/dist/src/generator/package-exports.js.map +1 -1
- package/dist/src/generator/serializer-definition-generator.js +8 -45
- package/dist/src/generator/serializer-definition-generator.js.map +1 -1
- package/dist/src/generator/service.d.ts +3 -3
- package/dist/src/generator/service.d.ts.map +1 -1
- package/dist/src/generator/service.js +18 -57
- package/dist/src/generator/service.js.map +1 -1
- package/dist/src/generator/types.js +12 -50
- package/dist/src/generator/types.js.map +1 -1
- package/dist/src/index.js +5 -27
- package/dist/src/index.js.map +1 -1
- package/dist/src/logger.js +10 -18
- package/dist/src/logger.js.map +1 -1
- package/dist/src/main.js +16 -21
- package/dist/src/main.js.map +1 -1
- package/dist/src/module-specifier.d.ts.map +1 -1
- package/dist/src/module-specifier.js +11 -11
- package/dist/src/module-specifier.js.map +1 -1
- package/dist/src/namespaces.d.ts +1 -1
- package/dist/src/namespaces.d.ts.map +1 -1
- package/dist/src/namespaces.js +25 -72
- package/dist/src/namespaces.js.map +1 -1
- package/dist/src/namespaces.test.js +14 -52
- package/dist/src/namespaces.test.js.map +1 -1
- package/dist/src/parser/index.js +2 -18
- package/dist/src/parser/index.js.map +1 -1
- package/dist/src/parser/resolver.d.ts.map +1 -1
- package/dist/src/parser/resolver.js +15 -21
- package/dist/src/parser/resolver.js.map +1 -1
- package/dist/src/parser/substitutions-parser.d.ts.map +1 -1
- package/dist/src/parser/substitutions-parser.js +7 -41
- package/dist/src/parser/substitutions-parser.js.map +1 -1
- package/dist/src/protobuf-json.js +1 -5
- package/dist/src/protobuf-json.js.map +1 -1
- package/dist/src/type-generator.js +23 -65
- package/dist/src/type-generator.js.map +1 -1
- package/dist/src/util.js +1 -5
- package/dist/src/util.js.map +1 -1
- package/dist/test/any.js +1 -2
- package/dist/test/any.js.map +1 -1
- package/dist/test/my-interface.js +1 -2
- package/dist/test/my-interface.js.map +1 -1
- package/dist/test/my-key.js +2 -5
- package/dist/test/my-key.js.map +1 -1
- package/dist/test/proto/gen/example/testing/another.js +1 -2
- package/dist/test/proto/gen/example/testing/any.js +1 -2
- package/dist/test/proto/gen/example/testing/service.js +1 -2
- package/dist/test/proto/gen/example/testing/types.js +4 -7
- package/dist/test/proto/gen/example/testing/types.js.map +1 -1
- package/dist/test/proto/gen/example/testing/util.js +1 -2
- package/dist/test/proto/gen/google/protobuf.js +6 -9
- package/dist/test/proto/gen/google/protobuf.js.map +1 -1
- package/dist/test/proto/gen/index.js +4 -10
- package/dist/test/proto/gen/index.js.map +1 -1
- package/dist/test/proto/index.js +1 -5
- package/dist/test/proto/index.js.map +1 -1
- package/dist/test/proto/substitutions.js +6 -8
- package/dist/test/proto/substitutions.js.map +1 -1
- package/dist/test/service.test.js +13 -18
- package/dist/test/service.test.js.map +1 -1
- package/dist/test/types.test.js +67 -72
- package/dist/test/types.test.js.map +1 -1
- package/package.json +8 -7
- package/src/configure.ts +3 -0
- package/src/generator/declaration-generator.ts +11 -14
- package/src/generator/field.ts +4 -4
- package/src/generator/service.ts +8 -12
- package/src/module-specifier.ts +4 -1
- package/src/namespaces.test.ts +1 -1
- package/src/namespaces.ts +1 -1
- package/src/parser/resolver.ts +3 -0
- package/src/parser/substitutions-parser.ts +3 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../src/configure.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../src/configure.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,eAAO,MAAM,sBAAsB,YAMlC,CAAC"}
|
package/dist/src/configure.js
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2021 DXOS.org
|
|
4
3
|
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.preconfigureProtobufjs = void 0;
|
|
10
|
-
const protobufjs_1 = __importDefault(require("protobufjs"));
|
|
4
|
+
import { createRequire } from 'node:module';
|
|
5
|
+
import pb from 'protobufjs';
|
|
6
|
+
const require = createRequire(import.meta.url);
|
|
11
7
|
/**
|
|
12
8
|
* Manually adds descriptor proto to the list of common protobuf definitions.
|
|
13
9
|
*/
|
|
14
|
-
const preconfigureProtobufjs = () => {
|
|
15
|
-
|
|
10
|
+
export const preconfigureProtobufjs = () => {
|
|
11
|
+
pb.common('descriptor',
|
|
16
12
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
17
13
|
require('protobufjs/google/protobuf/descriptor.json').nested.google.nested.protobuf.nested);
|
|
18
14
|
};
|
|
19
|
-
exports.preconfigureProtobufjs = preconfigureProtobufjs;
|
|
20
15
|
//# sourceMappingURL=configure.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure.js","sourceRoot":"","sources":["../../src/configure.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"configure.js","sourceRoot":"","sources":["../../src/configure.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,EAAE;IACzC,EAAE,CAAC,MAAM,CACP,YAAY;IACZ,8DAA8D;IAC9D,OAAO,CAAC,4CAA4C,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAC3F,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/generator/context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/generator/context.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import pb from 'protobufjs';
|
|
2
2
|
import * as ts from 'typescript';
|
|
3
3
|
import { type GeneratorContext } from './context';
|
|
4
|
-
export declare function createDeclarations(types:
|
|
5
|
-
export declare const createTypeDictionary: (root:
|
|
4
|
+
export declare function createDeclarations(types: pb.ReflectionObject[], ctx: GeneratorContext): Generator<ts.Statement>;
|
|
5
|
+
export declare const createTypeDictionary: (root: pb.NamespaceBase) => ts.InterfaceDeclaration;
|
|
6
6
|
//# sourceMappingURL=declaration-generator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declaration-generator.d.ts","sourceRoot":"","sources":["../../../src/generator/declaration-generator.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"declaration-generator.d.ts","sourceRoot":"","sources":["../../../src/generator/declaration-generator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;AASlD,wBAAiB,kBAAkB,CAAC,KAAK,EAAE,EAAE,CAAC,gBAAgB,EAAE,EAAE,GAAG,EAAE,gBAAgB,GAAG,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,CAsBhH;AAeD,eAAO,MAAM,oBAAoB,SAAU,EAAE,CAAC,aAAa,4BAgBxD,CAAC"}
|
|
@@ -1,87 +1,49 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2020 DXOS.org
|
|
4
3
|
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.createTypeDictionary = void 0;
|
|
40
|
-
exports.createDeclarations = createDeclarations;
|
|
41
|
-
const protobufjs = __importStar(require("protobufjs"));
|
|
42
|
-
const ts = __importStar(require("typescript"));
|
|
43
|
-
const enum_1 = require("./enum");
|
|
44
|
-
const message_1 = require("./message");
|
|
45
|
-
const service_1 = require("./service");
|
|
46
|
-
const types_1 = require("./types");
|
|
47
|
-
const namespaces_1 = require("../namespaces");
|
|
4
|
+
import pb from 'protobufjs';
|
|
5
|
+
import * as ts from 'typescript';
|
|
6
|
+
import { createEnumDeclaration } from './enum';
|
|
7
|
+
import { createMessageDeclaration } from './message';
|
|
8
|
+
import { createServiceDeclaration } from './service';
|
|
9
|
+
import { getTypeReference } from './types';
|
|
10
|
+
import { normalizeFullyQualifiedName } from '../namespaces';
|
|
48
11
|
const f = ts.factory;
|
|
49
|
-
function* createDeclarations(types, ctx) {
|
|
12
|
+
export function* createDeclarations(types, ctx) {
|
|
50
13
|
for (const obj of types) {
|
|
51
|
-
if (obj instanceof
|
|
52
|
-
yield
|
|
14
|
+
if (obj instanceof pb.Enum) {
|
|
15
|
+
yield createEnumDeclaration(obj, ctx);
|
|
53
16
|
}
|
|
54
|
-
else if (obj instanceof
|
|
55
|
-
yield
|
|
17
|
+
else if (obj instanceof pb.Service) {
|
|
18
|
+
yield createServiceDeclaration(obj, ctx);
|
|
56
19
|
}
|
|
57
|
-
else if (obj instanceof
|
|
58
|
-
yield
|
|
20
|
+
else if (obj instanceof pb.Type) {
|
|
21
|
+
yield createMessageDeclaration(obj, ctx);
|
|
59
22
|
const nested = Array.from(createDeclarations(obj.nestedArray, ctx));
|
|
60
23
|
if (nested.length > 0) {
|
|
61
24
|
yield f.createModuleDeclaration([f.createToken(ts.SyntaxKind.ExportKeyword)], f.createIdentifier(obj.name), f.createModuleBlock(nested), ts.NodeFlags.Namespace);
|
|
62
25
|
}
|
|
63
26
|
}
|
|
64
|
-
else if (obj instanceof
|
|
27
|
+
else if (obj instanceof pb.Namespace) {
|
|
65
28
|
yield* createDeclarations(obj.nestedArray, ctx);
|
|
66
29
|
}
|
|
67
30
|
}
|
|
68
31
|
}
|
|
69
32
|
function* getRegisteredTypes(root) {
|
|
70
33
|
for (const obj of root.nestedArray) {
|
|
71
|
-
if (obj instanceof
|
|
34
|
+
if (obj instanceof pb.Enum) {
|
|
72
35
|
yield obj;
|
|
73
36
|
}
|
|
74
|
-
else if (obj instanceof
|
|
37
|
+
else if (obj instanceof pb.Type) {
|
|
75
38
|
yield obj;
|
|
76
39
|
yield* getRegisteredTypes(obj);
|
|
77
40
|
}
|
|
78
|
-
else if (obj instanceof
|
|
41
|
+
else if (obj instanceof pb.Namespace) {
|
|
79
42
|
yield* getRegisteredTypes(obj);
|
|
80
43
|
}
|
|
81
44
|
}
|
|
82
45
|
}
|
|
83
|
-
const createTypeDictionary = (root) => f.createInterfaceDeclaration([f.createToken(ts.SyntaxKind.ExportKeyword)], 'TYPES', undefined, undefined, Array.from(getRegisteredTypes(root))
|
|
46
|
+
export const createTypeDictionary = (root) => f.createInterfaceDeclaration([f.createToken(ts.SyntaxKind.ExportKeyword)], 'TYPES', undefined, undefined, Array.from(getRegisteredTypes(root))
|
|
84
47
|
.sort((b, a) => b.fullName.localeCompare(a.fullName))
|
|
85
|
-
.map((type) => f.createPropertySignature(undefined, f.createStringLiteral(
|
|
86
|
-
exports.createTypeDictionary = createTypeDictionary;
|
|
48
|
+
.map((type) => f.createPropertySignature(undefined, f.createStringLiteral(normalizeFullyQualifiedName(type.fullName)), undefined, getTypeReference(type))));
|
|
87
49
|
//# sourceMappingURL=declaration-generator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declaration-generator.js","sourceRoot":"","sources":["../../../src/generator/declaration-generator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"declaration-generator.js","sourceRoot":"","sources":["../../../src/generator/declaration-generator.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAGjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC;AAErB,MAAM,SAAS,CAAC,CAAC,kBAAkB,CAAC,KAA4B,EAAE,GAAqB;IACrF,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC;QACxB,IAAI,GAAG,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC;YAC3B,MAAM,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACxC,CAAC;aAAM,IAAI,GAAG,YAAY,EAAE,CAAC,OAAO,EAAE,CAAC;YACrC,MAAM,wBAAwB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAC3C,CAAC;aAAM,IAAI,GAAG,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC;YAClC,MAAM,wBAAwB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YAEzC,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,k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C5C,OAAO,EACP,SAAS,EACT,SAAS,EACT,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;KACjC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;KACpD,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACZ,CAAC,CAAC,uBAAuB,CACvB,SAAS,EACT,CAAC,CAAC,mBAAmB,CAAC,2BAA2B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EACjE,SAAS,EACT,gBAAgB,CAAC,IAAI,CAAC,CACvB,CACF,CACJ,CAAC"}
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2021 DXOS.org
|
|
4
3
|
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.attachDocComment = void 0;
|
|
10
|
-
const typescript_1 = __importDefault(require("typescript"));
|
|
11
|
-
const attachDocComment = (node, comment) => typescript_1.default.addSyntheticLeadingComment(node, typescript_1.default.SyntaxKind.MultiLineCommentTrivia, `*\n${comment
|
|
4
|
+
import ts from 'typescript';
|
|
5
|
+
export const attachDocComment = (node, comment) => ts.addSyntheticLeadingComment(node, ts.SyntaxKind.MultiLineCommentTrivia, `*\n${comment
|
|
12
6
|
.split('\n')
|
|
13
7
|
.map((line) => ` * ${line}`)
|
|
14
8
|
.join('\n')}\n `, true);
|
|
15
|
-
exports.attachDocComment = attachDocComment;
|
|
16
9
|
//# sourceMappingURL=doc-comment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doc-comment.js","sourceRoot":"","sources":["../../../src/generator/doc-comment.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"doc-comment.js","sourceRoot":"","sources":["../../../src/generator/doc-comment.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAoB,IAAO,EAAE,OAAe,EAAK,EAAE,CACjF,EAAE,CAAC,0BAA0B,CAC3B,IAAI,EACJ,EAAE,CAAC,UAAU,CAAC,sBAAsB,EACpC,MAAM,OAAO;KACV,KAAK,CAAC,IAAI,CAAC;KACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,IAAI,EAAE,CAAC;KAC3B,IAAI,CAAC,IAAI,CAAC,KAAK,EAClB,IAAI,CACL,CAAC"}
|
|
@@ -1,56 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2020 DXOS.org
|
|
4
3
|
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.createEnumDeclaration = void 0;
|
|
40
|
-
const path_1 = require("path");
|
|
41
|
-
const ts = __importStar(require("typescript"));
|
|
42
|
-
const doc_comment_1 = require("./doc-comment");
|
|
4
|
+
import { dirname, relative } from 'path';
|
|
5
|
+
import * as ts from 'typescript';
|
|
6
|
+
import { attachDocComment } from './doc-comment';
|
|
43
7
|
const f = ts.factory;
|
|
44
|
-
const createEnumDeclaration = (type, ctx) => {
|
|
8
|
+
export const createEnumDeclaration = (type, ctx) => {
|
|
45
9
|
const declaration = f.createEnumDeclaration([f.createToken(ts.SyntaxKind.ExportKeyword)], type.name, Object.entries(type.values).map(([name, id]) => f.createEnumMember(name, f.createNumericLiteral(id))));
|
|
46
10
|
const commentSections = type.comment ? [type.comment] : [];
|
|
47
11
|
if (type.filename) {
|
|
48
|
-
commentSections.push(`Defined in:\n {@link file://./${
|
|
12
|
+
commentSections.push(`Defined in:\n {@link file://./${relative(dirname(ctx.outputFilename), type.filename)}}`);
|
|
49
13
|
}
|
|
50
14
|
if (commentSections.length === 0) {
|
|
51
15
|
return declaration;
|
|
52
16
|
}
|
|
53
|
-
return
|
|
17
|
+
return attachDocComment(declaration, commentSections.join('\n\n'));
|
|
54
18
|
};
|
|
55
|
-
exports.createEnumDeclaration = createEnumDeclaration;
|
|
56
19
|
//# sourceMappingURL=enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../src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W,EAAE,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AACrE,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import pb from 'protobufjs';
|
|
2
2
|
import * as ts from 'typescript';
|
|
3
3
|
import { type SubstitutionsMap } from '../parser';
|
|
4
|
-
export declare const getFieldType: (field:
|
|
5
|
-
export declare const getScalarFieldType: (field:
|
|
4
|
+
export declare const getFieldType: (field: pb.Field, subs: SubstitutionsMap) => ts.TypeNode;
|
|
5
|
+
export declare const getScalarFieldType: (field: pb.Field, subs: SubstitutionsMap) => ts.TypeNode;
|
|
6
6
|
//# sourceMappingURL=field.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../src/generator/field.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../src/generator/field.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAKjC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAIlD,eAAO,MAAM,YAAY,UAAW,EAAE,CAAC,KAAK,QAAQ,gBAAgB,KAAG,EAAE,CAAC,QAazE,CAAC;AAEF,eAAO,MAAM,kBAAkB,UAAW,EAAE,CAAC,KAAK,QAAQ,gBAAgB,KAAG,EAAE,CAAC,QAI/E,CAAC"}
|
|
@@ -1,69 +1,30 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2020 DXOS.org
|
|
4
3
|
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.getScalarFieldType = exports.getFieldType = void 0;
|
|
40
|
-
const protobufjs = __importStar(require("protobufjs"));
|
|
41
|
-
const ts = __importStar(require("typescript"));
|
|
42
|
-
const invariant_1 = require("@dxos/invariant");
|
|
43
|
-
const types_1 = require("./types");
|
|
4
|
+
import pb from 'protobufjs';
|
|
5
|
+
import * as ts from 'typescript';
|
|
6
|
+
import { invariant } from '@dxos/invariant';
|
|
7
|
+
import { types } from './types';
|
|
44
8
|
const f = ts.factory;
|
|
45
|
-
const getFieldType = (field, subs) => {
|
|
9
|
+
export const getFieldType = (field, subs) => {
|
|
46
10
|
if (field.repeated) {
|
|
47
|
-
return f.createArrayTypeNode(
|
|
11
|
+
return f.createArrayTypeNode(getScalarFieldType(field, subs));
|
|
48
12
|
}
|
|
49
|
-
else if (field.map && field instanceof
|
|
13
|
+
else if (field.map && field instanceof pb.MapField) {
|
|
50
14
|
return f.createTypeReferenceNode('Partial', [
|
|
51
15
|
f.createTypeReferenceNode('Record', [
|
|
52
16
|
f.createKeywordTypeNode(ts.SyntaxKind.StringKeyword),
|
|
53
|
-
|
|
17
|
+
getScalarFieldType(field, subs),
|
|
54
18
|
]),
|
|
55
19
|
]);
|
|
56
20
|
}
|
|
57
21
|
else {
|
|
58
|
-
return
|
|
22
|
+
return getScalarFieldType(field, subs);
|
|
59
23
|
}
|
|
60
24
|
};
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
var _a;
|
|
64
|
-
(0, invariant_1.invariant)(field.message);
|
|
25
|
+
export const getScalarFieldType = (field, subs) => {
|
|
26
|
+
invariant(field.message);
|
|
65
27
|
field.resolve();
|
|
66
|
-
return
|
|
28
|
+
return types(field.resolvedType ?? field.type, field.message, subs);
|
|
67
29
|
};
|
|
68
|
-
exports.getScalarFieldType = getScalarFieldType;
|
|
69
30
|
//# sourceMappingURL=field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.js","sourceRoot":"","sources":["../../../src/generator/field.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"field.js","sourceRoot":"","sources":["../../../src/generator/field.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,MAAM,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC;AAErB,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAe,EAAE,IAAsB,EAAe,EAAE;IACnF,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;QACnB,OAAO,CAAC,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;IAChE,CAAC;SAAM,IAAI,KAAK,CAAC,GAAG,IAAI,KAAK,YAAY,EAAE,CAAC,QAAQ,EAAE,CAAC;QACrD,OAAO,CAAC,CAAC,uBAAuB,CAAC,SAAS,EAAE;YAC1C,CAAC,CAAC,uBAAuB,CAAC,QAAQ,EAAE;gBAClC,CAAC,CAAC,qBAAqB,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC;gBACpD,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC;aAChC,CAAC;SACH,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,OAAO,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACzC,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAe,EAAE,IAAsB,EAAe,EAAE;IACzF,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACzB,KAAK,CAAC,OAAO,EAAE,CAAC;IAChB,OAAO,KAAK,CAAC,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACtE,CAAC,CAAC"}
|
|
@@ -1,61 +1,25 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2021 DXOS.org
|
|
4
3
|
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.getFileNameForNamespace = exports.createIndexSourceFile = exports.createNamespaceSourceFile = void 0;
|
|
40
|
-
const path_1 = require("path");
|
|
41
|
-
const ts = __importStar(require("typescript"));
|
|
42
|
-
const declaration_generator_1 = require("./declaration-generator");
|
|
43
|
-
const serializer_definition_generator_1 = require("./serializer-definition-generator");
|
|
44
|
-
const service_1 = require("./service");
|
|
45
|
-
const module_specifier_1 = require("../module-specifier");
|
|
46
|
-
const namespaces_1 = require("../namespaces");
|
|
4
|
+
import { dirname, join } from 'path';
|
|
5
|
+
import * as ts from 'typescript';
|
|
6
|
+
import { createDeclarations, createTypeDictionary } from './declaration-generator';
|
|
7
|
+
import { createSerializerDefinition } from './serializer-definition-generator';
|
|
8
|
+
import { createServicesDictionary } from './service';
|
|
9
|
+
import { CODEC_MODULE, ModuleSpecifier } from '../module-specifier';
|
|
10
|
+
import { getSafeNamespaceIdentifier, parseFullyQualifiedName } from '../namespaces';
|
|
47
11
|
const f = ts.factory;
|
|
48
12
|
const createSubstitutionsImport = (substitutionsModule, context) => substitutionsModule &&
|
|
49
13
|
ts.factory.createImportDeclaration([], ts.factory.createImportClause(false, ts.factory.createIdentifier('substitutions'), undefined), ts.factory.createStringLiteral(substitutionsModule.importSpecifier(context)));
|
|
50
|
-
const createNamespaceSourceFile = (types, substitutions, outDir, namespace, substitutionsModule, otherNamespaces) => {
|
|
51
|
-
const outFile =
|
|
14
|
+
export const createNamespaceSourceFile = (types, substitutions, outDir, namespace, substitutionsModule, otherNamespaces) => {
|
|
15
|
+
const outFile = join(outDir, getFileNameForNamespace(namespace));
|
|
52
16
|
const ctx = {
|
|
53
17
|
outputFilename: outFile,
|
|
54
18
|
subs: substitutions,
|
|
55
19
|
};
|
|
56
|
-
const declarations = Array.from(
|
|
57
|
-
const substitutionsImport = substitutionsModule && createSubstitutionsImport(substitutionsModule,
|
|
58
|
-
const otherNamespaceImports = createNamespaceImports(otherNamespaces.filter((ns) => ns !== namespace), outDir,
|
|
20
|
+
const declarations = Array.from(createDeclarations(types, ctx));
|
|
21
|
+
const substitutionsImport = substitutionsModule && createSubstitutionsImport(substitutionsModule, dirname(outFile));
|
|
22
|
+
const otherNamespaceImports = createNamespaceImports(otherNamespaces.filter((ns) => ns !== namespace), outDir, dirname(outFile));
|
|
59
23
|
return ts.factory.createSourceFile([
|
|
60
24
|
createRuntimeImports(),
|
|
61
25
|
...(substitutionsImport ? [substitutionsImport] : []),
|
|
@@ -63,31 +27,28 @@ const createNamespaceSourceFile = (types, substitutions, outDir, namespace, subs
|
|
|
63
27
|
...declarations,
|
|
64
28
|
], ts.factory.createToken(ts.SyntaxKind.EndOfFileToken), ts.NodeFlags.None);
|
|
65
29
|
};
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
const { imports: schemaImports, exports: schemaExports } = (0, serializer_definition_generator_1.createSerializerDefinition)(substitutionsModule, root, outDirPath, compress);
|
|
30
|
+
export const createIndexSourceFile = (substitutionsModule, root, outDirPath, namespaces, compress) => {
|
|
31
|
+
const { imports: schemaImports, exports: schemaExports } = createSerializerDefinition(substitutionsModule, root, outDirPath, compress);
|
|
69
32
|
const substitutionsImport = substitutionsModule && createSubstitutionsImport(substitutionsModule, outDirPath);
|
|
70
33
|
const otherNamespaceImports = createNamespaceImports(namespaces, outDirPath, outDirPath);
|
|
71
34
|
return ts.factory.createSourceFile([
|
|
72
35
|
...schemaImports,
|
|
73
36
|
...otherNamespaceImports,
|
|
74
37
|
...(substitutionsImport ? [substitutionsImport] : []),
|
|
75
|
-
|
|
76
|
-
|
|
38
|
+
createTypeDictionary(root),
|
|
39
|
+
createServicesDictionary(root),
|
|
77
40
|
...schemaExports,
|
|
78
41
|
], ts.factory.createToken(ts.SyntaxKind.EndOfFileToken), ts.NodeFlags.None);
|
|
79
42
|
};
|
|
80
|
-
exports.createIndexSourceFile = createIndexSourceFile;
|
|
81
43
|
const createNamespaceImports = (namespaces, outDirPath, context) => namespaces
|
|
82
44
|
.sort((b, a) => b.localeCompare(a))
|
|
83
|
-
.map((ns) => f.createImportDeclaration([], f.createImportClause(false, undefined, f.createNamespaceImport(f.createIdentifier(
|
|
84
|
-
const getFileNameForNamespace = (namespace) => {
|
|
85
|
-
const name =
|
|
45
|
+
.map((ns) => f.createImportDeclaration([], f.createImportClause(false, undefined, f.createNamespaceImport(f.createIdentifier(getSafeNamespaceIdentifier(parseFullyQualifiedName(ns))))), f.createStringLiteral(ModuleSpecifier.resolveFromFilePath(getFileNameForNamespace(ns), outDirPath).importSpecifier(context))));
|
|
46
|
+
export const getFileNameForNamespace = (namespace) => {
|
|
47
|
+
const name = parseFullyQualifiedName(namespace);
|
|
86
48
|
return `${name.join('/')}.ts`;
|
|
87
49
|
};
|
|
88
|
-
exports.getFileNameForNamespace = getFileNameForNamespace;
|
|
89
50
|
const createRuntimeImports = () => f.createImportDeclaration([], f.createImportClause(true, undefined, f.createNamedImports([
|
|
90
51
|
f.createImportSpecifier(false, undefined, f.createIdentifier('Stream')),
|
|
91
52
|
f.createImportSpecifier(false, undefined, f.createIdentifier('RequestOptions')),
|
|
92
|
-
])), f.createStringLiteral(
|
|
53
|
+
])), f.createStringLiteral(CODEC_MODULE.importSpecifier('')));
|
|
93
54
|
//# sourceMappingURL=file-generator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-generator.js","sourceRoot":"","sources":["../../../src/generator/file-generator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-generator.js","sourceRoot":"","sources":["../../../src/generator/file-generator.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAErC,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAGjC,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAGpF,MAAM,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC;AAErB,MAAM,yBAAyB,GAAG,CAAC,mBAAoC,EAAE,OAAe,EAAE,EAAE,CAC1F,mBAAmB;IACnB,EAAE,CAAC,OAAO,CAAC,uBAAuB,CAChC,EAAE,EACF,EAAE,CAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,eAAe,CAAC,EAAE,SAAS,CAAC,EAC7F,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAC7E,CAAC;AAEJ,MAAM,CAA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AEN,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,SAAiB,EAAE,EAAE;IAC3D,MAAM,IAAI,GAAG,uBAAuB,CAAC,SAAS,CAAC,CAAC;IAChD,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;AAChC,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAChC,CAAC,CAAC,uBAAuB,CACvB,EAAE,EACF,CAAC,CAAC,kBAAkB,CAClB,IAAI,EACJ,SAAS,EACT,CAAC,CAAC,kBAAkB,CAAC;IACnB,CAAC,CAAC,qBAAqB,CAAC,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACvE,CAAC,CAAC,qBAAqB,CAAC,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;CAChF,CAAC,CACH,EACD,CAAC,CAAC,mBAAmB,CAAC,YAAY,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,CACxD,CAAC"}
|
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2021 DXOS.org
|
|
4
3
|
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
-
};
|
|
19
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
__exportStar(require("./file-generator"), exports);
|
|
21
|
-
__exportStar(require("./package-exports"), exports);
|
|
4
|
+
export * from './file-generator';
|
|
5
|
+
export * from './package-exports';
|
|
22
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generator/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generator/index.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
|