@glutinum/cli 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Glutinum.Converter/FsharpAST.js +6 -4
- package/dist/Glutinum.Converter/FsharpAST.js.map +1 -1
- package/dist/Glutinum.Converter/GlueAST.js +6 -4
- package/dist/Glutinum.Converter/GlueAST.js.map +1 -1
- package/dist/Glutinum.Converter/Printer.js +10 -4
- package/dist/Glutinum.Converter/Printer.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js +1 -1
- package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/TypeNode.js +6 -5
- package/dist/Glutinum.Converter/Reader/TypeNode.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/UnionTypeNode.js +2 -2
- package/dist/Glutinum.Converter/Reader/UnionTypeNode.js.map +1 -1
- package/dist/Glutinum.Converter/Transform.js +17 -13
- package/dist/Glutinum.Converter/Transform.js.map +1 -1
- package/dist/Program.js +4 -0
- package/dist/Program.js.map +1 -1
- package/package.json +3 -3
|
@@ -185,10 +185,11 @@ export function FSharpParameter_$reflection() {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
export class FSharpMemberInfo extends Record {
|
|
188
|
-
constructor(Attributes, Name, Parameters, Type, IsOptional, IsStatic, Accessor, Accessibility) {
|
|
188
|
+
constructor(Attributes, Name, TypeParameters, Parameters, Type, IsOptional, IsStatic, Accessor, Accessibility) {
|
|
189
189
|
super();
|
|
190
190
|
this.Attributes = Attributes;
|
|
191
191
|
this.Name = Name;
|
|
192
|
+
this.TypeParameters = TypeParameters;
|
|
192
193
|
this.Parameters = Parameters;
|
|
193
194
|
this.Type = Type;
|
|
194
195
|
this.IsOptional = IsOptional;
|
|
@@ -199,7 +200,7 @@ export class FSharpMemberInfo extends Record {
|
|
|
199
200
|
}
|
|
200
201
|
|
|
201
202
|
export function FSharpMemberInfo_$reflection() {
|
|
202
|
-
return record_type("Glutinum.Converter.FSharpAST.FSharpMemberInfo", [], FSharpMemberInfo, () => [["Attributes", list_type(FSharpAttribute_$reflection())], ["Name", string_type], ["Parameters", list_type(FSharpParameter_$reflection())], ["Type", FSharpType_$reflection()], ["IsOptional", bool_type], ["IsStatic", bool_type], ["Accessor", option_type(FSharpAccessor_$reflection())], ["Accessibility", FSharpAccessibility_$reflection()]]);
|
|
203
|
+
return record_type("Glutinum.Converter.FSharpAST.FSharpMemberInfo", [], FSharpMemberInfo, () => [["Attributes", list_type(FSharpAttribute_$reflection())], ["Name", string_type], ["TypeParameters", list_type(FSharpTypeParameter_$reflection())], ["Parameters", list_type(FSharpParameter_$reflection())], ["Type", FSharpType_$reflection()], ["IsOptional", bool_type], ["IsStatic", bool_type], ["Accessor", option_type(FSharpAccessor_$reflection())], ["Accessibility", FSharpAccessibility_$reflection()]]);
|
|
203
204
|
}
|
|
204
205
|
|
|
205
206
|
export class FSharpMember extends Union {
|
|
@@ -285,15 +286,16 @@ export function FSharpTypeAlias_$reflection() {
|
|
|
285
286
|
}
|
|
286
287
|
|
|
287
288
|
export class FSharpTypeReference extends Record {
|
|
288
|
-
constructor(Name, FullName) {
|
|
289
|
+
constructor(Name, FullName, TypeArguments) {
|
|
289
290
|
super();
|
|
290
291
|
this.Name = Name;
|
|
291
292
|
this.FullName = FullName;
|
|
293
|
+
this.TypeArguments = TypeArguments;
|
|
292
294
|
}
|
|
293
295
|
}
|
|
294
296
|
|
|
295
297
|
export function FSharpTypeReference_$reflection() {
|
|
296
|
-
return record_type("Glutinum.Converter.FSharpAST.FSharpTypeReference", [], FSharpTypeReference, () => [["Name", string_type], ["FullName", string_type]]);
|
|
298
|
+
return record_type("Glutinum.Converter.FSharpAST.FSharpTypeReference", [], FSharpTypeReference, () => [["Name", string_type], ["FullName", string_type], ["TypeArguments", list_type(FSharpType_$reflection())]]);
|
|
297
299
|
}
|
|
298
300
|
|
|
299
301
|
export class FSharpType extends Union {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Glutinum.Converter/FsharpAST.fs"],"names":["this","value","isString","matchValue","c"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/Glutinum.Converter/FsharpAST.fs"],"names":["this","value","isString","matchValue","c"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAYcA;;iCAES,AAAAA;;mBACSC,AAAP,AAAAD;;AACD,mBAAA,SAAA,AAAAA;;AAHE,mBAAA,AAAAA;;;;;AA6BdE,qBAEG;AACOC,2BAAA,AAAAC;gBAAAD;;;;uBAIoB;;uBAHE;;OAHhC,AAAAH;AAmBJ,QARO;AACOG,6BAAA,AAAAC;gBAAAD;;;uBAImB;;uBAFC;;OAJ9B,AAAAH;AAUA,eAAA;;SACJ,IAAKE;AACD,eAAA;;;AAEA,eAAA","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -204,17 +204,18 @@ export function GlueTypeAliasDeclaration_$reflection() {
|
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
export class GlueFunctionDeclaration extends Record {
|
|
207
|
-
constructor(IsDeclared, Name, Type, Parameters) {
|
|
207
|
+
constructor(IsDeclared, Name, Type, Parameters, TypeParameters) {
|
|
208
208
|
super();
|
|
209
209
|
this.IsDeclared = IsDeclared;
|
|
210
210
|
this.Name = Name;
|
|
211
211
|
this.Type = Type;
|
|
212
212
|
this.Parameters = Parameters;
|
|
213
|
+
this.TypeParameters = TypeParameters;
|
|
213
214
|
}
|
|
214
215
|
}
|
|
215
216
|
|
|
216
217
|
export function GlueFunctionDeclaration_$reflection() {
|
|
217
|
-
return record_type("Glutinum.Converter.GlueAST.GlueFunctionDeclaration", [], GlueFunctionDeclaration, () => [["IsDeclared", bool_type], ["Name", string_type], ["Type", GlueType_$reflection()], ["Parameters", list_type(GlueParameter_$reflection())]]);
|
|
218
|
+
return record_type("Glutinum.Converter.GlueAST.GlueFunctionDeclaration", [], GlueFunctionDeclaration, () => [["IsDeclared", bool_type], ["Name", string_type], ["Type", GlueType_$reflection()], ["Parameters", list_type(GlueParameter_$reflection())], ["TypeParameters", list_type(GlueTypeParameter_$reflection())]]);
|
|
218
219
|
}
|
|
219
220
|
|
|
220
221
|
export class GlueModuleDeclaration extends Record {
|
|
@@ -261,15 +262,16 @@ export function GlueClassDeclaration_$reflection() {
|
|
|
261
262
|
}
|
|
262
263
|
|
|
263
264
|
export class GlueTypeReference extends Record {
|
|
264
|
-
constructor(Name, FullName) {
|
|
265
|
+
constructor(Name, FullName, TypeArguments) {
|
|
265
266
|
super();
|
|
266
267
|
this.Name = Name;
|
|
267
268
|
this.FullName = FullName;
|
|
269
|
+
this.TypeArguments = TypeArguments;
|
|
268
270
|
}
|
|
269
271
|
}
|
|
270
272
|
|
|
271
273
|
export function GlueTypeReference_$reflection() {
|
|
272
|
-
return record_type("Glutinum.Converter.GlueAST.GlueTypeReference", [], GlueTypeReference, () => [["Name", string_type], ["FullName", string_type]]);
|
|
274
|
+
return record_type("Glutinum.Converter.GlueAST.GlueTypeReference", [], GlueTypeReference, () => [["Name", string_type], ["FullName", string_type], ["TypeArguments", list_type(GlueType_$reflection())]]);
|
|
273
275
|
}
|
|
274
276
|
|
|
275
277
|
export class GlueTypeUnion extends Union {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Glutinum.Converter/GlueAST.fs"],"names":["this","value","info","ToText","Name"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/Glutinum.Converter/GlueAST.fs"],"names":["this","value","info","ToText","Name"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAsGcA;;iCAES,AAAAA;;mBACSC,AAAP,AAAAD;;AACD,mBAAA,SAAA,AAAAA;;AAHE,mBAAA,AAAAA;;;;;YA4FZA;;AAEa,mBAAA,AAAAA;;AACPE,2BACF,AAAAF;oBAAAE;;2BAEiB;;2BACE;;2BACD;;2BACA;;2BACE;;2BACH;;2BACC;;2BACK;;2BARH;;;;AASf,mBAAA,AAAAF;;AACgB,mBAAA,AAAAA;;AACP,mBAAA,AAAAA;;AACN,mBAAA,AAAAG,oBAAA,AAAAH;;mBACL;;AACiB,mBAAA,AAAAA;;AACF,mBAAA,AAAAA;;AACD,mBAAA,AAAAA;;AACH,mBAAA,AAAAA;;mBACR,eAAe,AAAAI,mBAAf,AAAAJ;;;;;;mBAKH;;AA3BO,mBAAA,AAAAA","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -8,7 +8,6 @@ import { isDigit2 } from "../fable_modules/fable-library.4.5.0/Char.js";
|
|
|
8
8
|
import { replace, removeSingleQuote, removeDoubleQuote, capitalizeFirstLetter } from "./Utils/String.js";
|
|
9
9
|
import { iterate as iterate_1 } from "../fable_modules/fable-library.4.5.0/Seq.js";
|
|
10
10
|
import { map as map_1, toArray } from "../fable_modules/fable-library.4.5.0/Option.js";
|
|
11
|
-
import { success } from "./Log.js";
|
|
12
11
|
|
|
13
12
|
export class Printer {
|
|
14
13
|
constructor() {
|
|
@@ -176,8 +175,15 @@ function printType(fsharpType) {
|
|
|
176
175
|
return "string";
|
|
177
176
|
}
|
|
178
177
|
}
|
|
179
|
-
case 10:
|
|
180
|
-
|
|
178
|
+
case 10: {
|
|
179
|
+
const typeReference = fsharpType.fields[0];
|
|
180
|
+
if (length(typeReference.TypeArguments) > 0) {
|
|
181
|
+
return `${typeReference.Name}<${join(", ", map(printType, typeReference.TypeArguments))}>`;
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
return typeReference.Name;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
181
187
|
case 11:
|
|
182
188
|
return `'${fsharpType.fields[0]}`;
|
|
183
189
|
case 2:
|
|
@@ -289,6 +295,7 @@ function printInterface(printer, interfaceInfo) {
|
|
|
289
295
|
Printer__Write_Z721C83C5(printer, "abstract ");
|
|
290
296
|
}
|
|
291
297
|
Printer__WriteInline_Z721C83C5(printer, `member ${methodInfo.Name}`);
|
|
298
|
+
printTypeParameters(printer, methodInfo.TypeParameters);
|
|
292
299
|
if (methodInfo.IsStatic) {
|
|
293
300
|
Printer__WriteInline_Z721C83C5(printer, " ");
|
|
294
301
|
if (length(methodInfo.Parameters) === 0) {
|
|
@@ -382,7 +389,6 @@ export function print(printer_mut, fsharpTypes_mut) {
|
|
|
382
389
|
while (true) {
|
|
383
390
|
const printer = printer_mut, fsharpTypes = fsharpTypes_mut;
|
|
384
391
|
if (isEmpty(fsharpTypes)) {
|
|
385
|
-
success("Done");
|
|
386
392
|
}
|
|
387
393
|
else {
|
|
388
394
|
const fsharpType = head(fsharpTypes);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Glutinum.Converter/Printer.fs"],"names":["__","text","Write","printer","outFile","NewLine","o","digit","name","(|Digit|_|)","fsharpAttribute","caseRules","WriteInline","attributeToText","fsharpAttributes","fsharpType","info","c","printType","typeParameters","index","typeParameter","printAttributes","interfaceInfo","printTypeParameters","Indent","_arg1","propertyInfo","_arg2","option","p","_arg3","methodInfo","printCompactAttributesAndNewLine","Unindent","enumInfo","enumCaseName","sanitizeEnumCaseName","enumCaseInfo","matchValue","aliasInfo","fsharpTypes","printEnum","printInterface","moduleInfo","print","printTypeAlias","unionInfo","printInlineAttributes"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/Glutinum.Converter/Printer.fs"],"names":["__","text","Write","printer","outFile","NewLine","o","digit","name","(|Digit|_|)","fsharpAttribute","caseRules","WriteInline","attributeToText","fsharpAttributes","fsharpType","info","c","typeReference","printType","typeParameters","index","typeParameter","printAttributes","interfaceInfo","printTypeParameters","Indent","_arg1","propertyInfo","_arg2","option","p","_arg3","methodInfo","printCompactAttributesAndNewLine","Unindent","enumInfo","enumCaseName","sanitizeEnumCaseName","enumCaseInfo","matchValue","aliasInfo","fsharpTypes","printEnum","printInterface","moduleInfo","print","printTypeAlias","unionInfo","printInlineAttributes"],"mappings":";;;;;;;;;;;;;AAQI,sBAAa;AACb,gCAA\u002BB;AAC/B,\u002BBAAsB;;;AA0BbA,mBAAAA;AAAgB,eAAA,SAAA,AAAAA;;;;;;;;;;;;;AAxBN,AAAAA,4BAAoB,AAAAA,sBAAmB;;;;AAItD,AAAAA,2BAAoB,IAAgB,AAAAA,sBAAmB,GAAG;;;;;;;AAM1D,oCAAA,AAAAA,WAAc,UAAiB,AAAAA,qBAAiB,AAAAA,sBAAkBC;;;;;;;;;AAUhC,oCAAA,AAAAD,WAAcC;;;;AAEhC,8BAAA,AAAAD;;;;AAKpB,AAAAE,6BAAAC,SAAc,cAAc,AAAAC;AAC5B,AAAAC,yBAAAF;AACA,AAAAE,yBAAAF;AAGG;AACC,AAAAD,iCAAAC,SAAc,QAAQG;AACtB,AAAAD,6BAAAF;OAHJ,AAAAC;;;;AAQI,QAAG,mBAA0B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C,iCAAAF;oBAEMY;;AAqBwB,AAAA4B,8BAAUxC,SAAV,AAAAY;;;;AAG1B,AAAA6B,mCAAezC,SAAf,AAAAY;;;;AAGA,AAAAb,6CAAAC,SAAc,OAAA,YAAA,2CAAd,AAAAY;AACA,AAAAV,yCAAAF;;;;AAEgB0C,uCAChB,AAAA9B;AAAA,AAAAb,6CAAAC,SAAc;AAEd,wBAAG,AAAA0C;AACC,AAAA3C,iDAAAC,SAAc;;AAElB,AAAAD,6CAAAC,SAAc,GAAG,AAAA0C;AACjB,AAAAxC,yCAAAF;AAEA,AAAAuB,wCAAAvB;AACA,AAAA2C,0BAAM3C,SAAQ,AAAA0C;;;;AAQkB,AAAAE,mCAAe5C,SAAf,AAAAY;;;;;;;;;;;;;AA/CjBiC,sCACf,AAAAjC;AAAA,AAAAQ,oCAAgBpB,SAAQ,AAAA6C;AAExB,AAAA9C,6CAAAC,SAAc,QAAQ,AAAA6C;AACtB,AAAA3C,yCAAAF;AACA,AAAAuB,wCAAAvB;AAGG;AACC,AAAAD,iDAAAC,SAAc;AAEd,AAAA8C,8CAAsB9C,SAAQ,AAAAoC;AAE9B,AAAA3B,uDAAAT,SAAoB,AAAAoC;AAEpB,AAAAlC,6CAAAF;uBARJ,AAAA6C;AAWA,AAAAb,0CAAAhC;;;0BAuCEA;8BA5DN,OAAAuC;AA4DA","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -5,7 +5,7 @@ export function readFunctionDeclaration(reader, declaration) {
|
|
|
5
5
|
let matchValue, matchValue_1, name;
|
|
6
6
|
return new GlueFunctionDeclaration((matchValue = declaration.modifiers, (matchValue == null) ? false : exists((modifier) => (modifier.kind === 138), matchValue)), (matchValue_1 = declaration.name, (matchValue_1 == null) ? (() => {
|
|
7
7
|
throw new Error("readFunctionDeclaration: Missing name");
|
|
8
|
-
})() : ((name = matchValue_1, name.getText()))), reader["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadTypeNodeZ64B23DD2"](declaration.type), reader["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadParametersZ17143B5B"](declaration.parameters));
|
|
8
|
+
})() : ((name = matchValue_1, name.getText()))), reader["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadTypeNodeZ64B23DD2"](declaration.type), reader["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadParametersZ17143B5B"](declaration.parameters), reader["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadTypeParameters4088FB9E"](declaration.typeParameters));
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
//# sourceMappingURL=FunctionDeclaration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/FunctionDeclaration.fs"],"names":["matchValue","name","declaration","modifier","reader"],"mappings":";;;;QAccA,YASAA,cACCC;WAGX,6BAbUD,aAAA,AAAAE,uBAAA,CAAA,AAAAF,sBAMI,QAHH,sBACC,AAAAG,kBAAgB,MAFpBH,eAOEA,eAAA,AAAAE,kBAAA,CAAA,AAAAF;AAEI,wBAAS;aADZC,OAAQD,cAAA,AAAAC,mBAMR,AAAAG,iFAAoB,AAAAF,mBACd,AAAAE,mFAAsB,AAAAF","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
1
|
+
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/FunctionDeclaration.fs"],"names":["matchValue","name","declaration","modifier","reader"],"mappings":";;;;QAccA,YASAA,cACCC;WAGX,6BAbUD,aAAA,AAAAE,uBAAA,CAAA,AAAAF,sBAMI,QAHH,sBACC,AAAAG,kBAAgB,MAFpBH,eAOEA,eAAA,AAAAE,kBAAA,CAAA,AAAAF;AAEI,wBAAS;aADZC,OAAQD,cAAA,AAAAC,mBAMR,AAAAG,iFAAoB,AAAAF,mBACd,AAAAE,mFAAsB,AAAAF,yBAClB,AAAAE,sFAA0B,AAAAF","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -3,7 +3,6 @@ import { empty, map, choose } from "../../fable_modules/fable-library.4.5.0/List
|
|
|
3
3
|
import { $007CHasSymbolFlags$007C_$007C, $007CHasTypeFlags$007C_$007C } from "./Utils.js";
|
|
4
4
|
import { head, toList } from "../../fable_modules/fable-library.4.5.0/Seq.js";
|
|
5
5
|
import { value as value_2 } from "../../fable_modules/fable-library.4.5.0/Option.js";
|
|
6
|
-
import typescript from "typescript";
|
|
7
6
|
|
|
8
7
|
export function readTypeNode(reader, typeNode) {
|
|
9
8
|
const checker = reader["Glutinum.Converter.Reader.Types.TypeScriptReader.get_checker"]();
|
|
@@ -86,13 +85,15 @@ export function readTypeNode(reader, typeNode) {
|
|
|
86
85
|
}
|
|
87
86
|
}
|
|
88
87
|
default: {
|
|
89
|
-
const ts = typescript;
|
|
90
88
|
const matchValue_4 = value_2(symbolOpt).flags | 0;
|
|
91
89
|
if ($007CHasSymbolFlags$007C_$007C(262144, matchValue_4) != null) {
|
|
92
90
|
return new GlueType(17, [value_2(symbolOpt).name]);
|
|
93
91
|
}
|
|
94
92
|
else {
|
|
95
|
-
|
|
93
|
+
let typeArguments_1;
|
|
94
|
+
const matchValue_5 = typeReferenceNode.typeArguments;
|
|
95
|
+
typeArguments_1 = ((matchValue_5 != null) ? map((arg) => reader["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadTypeNodeZ64B23DD2"](arg), toList(matchValue_5)) : empty());
|
|
96
|
+
return new GlueType(13, [new GlueTypeReference(typeReferenceNode.typeName.getText(), fullName, typeArguments_1)]);
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
}
|
|
@@ -104,8 +105,8 @@ export function readTypeNode(reader, typeNode) {
|
|
|
104
105
|
case 186: {
|
|
105
106
|
const typeNodeQuery = typeNode;
|
|
106
107
|
const typ_3 = checker.getTypeAtLocation(typeNodeQuery);
|
|
107
|
-
const
|
|
108
|
-
if ($007CHasSymbolFlags$007C_$007C(32,
|
|
108
|
+
const matchValue_6 = typ_3.symbol.flags | 0;
|
|
109
|
+
if ($007CHasSymbolFlags$007C_$007C(32, matchValue_6) != null) {
|
|
109
110
|
return new GlueType(12, [new GlueClassDeclaration(typ_3.symbol.name, empty(), empty(), empty())]);
|
|
110
111
|
}
|
|
111
112
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeNode.fs"],"names":["checker","reader","matchValue","typeNode","typeReferenceNode","symbolOpt","fullName","symbol","typ","literalType","aliasTypeArguments","patternInput","originalType","interfaceDeclaration","members","declaration","
|
|
1
|
+
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeNode.fs"],"names":["checker","reader","matchValue","typeNode","typeReferenceNode","symbolOpt","fullName","symbol","typ","literalType","aliasTypeArguments","patternInput","originalType","interfaceDeclaration","members","declaration","typeArguments","functionTypeNode","typeNodeQuery","arrayTypeNode"],"mappings":";;;;;;;AAUQA,oBAAU,AAAAC;AAERC,uBAAA,AAAAC;YAAAD;aAAA;AAMyB,mBAAA,iBAAmB;aAN5C;AAGyB,mBAAA,iBAAmB;aAH5C;AAKwB,mBAAA,iBAAmB;aAL3C;AAI4B,mBAAA,iBAAmB;aAJ/C;AAC2B,mBAAA,iBAAmB;aAD9C;AAE2B,mBAAA,iBAAmB;aAF9C;AAQF,mBAAA,iBAAmB;aARjB;AAuI2B,mBAAA,iBAAmB;aAvI9C;AAaEE,sCAAoBD;AAEpBE,8BAAY,AAAAL,4BAA8B,AAAAI;AAE1CE;AACM,gBAAA,AAAAD;AAECE,\u002BBAAUF;AAAA,AAHjBC,2BAGiB,AAAAN,8BAA8BO;;;AADrC,gCAAS;;oBAKpBD;qBAAW;AACNE,gCACA,AAAAR,4BAA4BI;AAgCN,2BAAA,iBAAjB,kBA1BF;AACOF,6CAAA,AAAAM;AACJ,4BADI,AACJ,6BAAa,KADTN;AAEEO,gDAAcD;AAIU,mCAAA,iBAA5B,oBAF0B,AAAAC;;6BAG5B,IAPI,AAOJ,6BAAa,KAPTP;AAQEO,kDAAcD;AAaT,mCAAA,iBAVL,AACI,qBAC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AyBE;;AAwJtB,4BAAS,kCAAkC,AAAAA","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import typescript from "typescript";
|
|
2
|
-
import { map, singleton, choose, concat } from "../../fable_modules/fable-library.4.5.0/List.js";
|
|
2
|
+
import { map, empty, singleton, choose, concat } from "../../fable_modules/fable-library.4.5.0/List.js";
|
|
3
3
|
import { defaultArgWith } from "../../fable_modules/fable-library.4.5.0/Option.js";
|
|
4
4
|
import { $007CHasTypeFlags$007C_$007C, tryReadLiteral } from "./Utils.js";
|
|
5
5
|
import { GlueTypeUnion, GlueTypeReference, GluePrimitive, GlueType } from "../GlueAST.js";
|
|
@@ -65,7 +65,7 @@ function readUnionTypeCases(reader, unionTypeNode) {
|
|
|
65
65
|
}
|
|
66
66
|
else if (declarations.length > 1) {
|
|
67
67
|
const fullName = checker.getFullyQualifiedName(symbol);
|
|
68
|
-
return singleton(new GlueType(13, [new GlueTypeReference(typeReferenceNode.getText(), fullName)]));
|
|
68
|
+
return singleton(new GlueType(13, [new GlueTypeReference(typeReferenceNode.getText(), fullName, empty())]));
|
|
69
69
|
}
|
|
70
70
|
else {
|
|
71
71
|
const declaration = declarations[0];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/UnionTypeNode.fs"],"names":["checker","reader","removeParenthesizedType","node","parenthesizedTypeNode","literalTypeNode","literalExpression","matchValue","typeReferenceNode","symbol","typ","declarations","fullName","declaration","readUnionTypeCases","unionTypeNode"],"mappings":";;;;;;;;AAaQA,oBAAU,AAAAC;AAMNC;;;kBAAyBC;AAC7B,gBAAG,mCAA2BA;AACtBC,8CAAwBD;2BAGJ,AAAAC;AAAxB;;;uBAEAD;;;;;
|
|
1
|
+
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/UnionTypeNode.fs"],"names":["checker","reader","removeParenthesizedType","node","parenthesizedTypeNode","literalTypeNode","literalExpression","matchValue","typeReferenceNode","symbol","typ","declarations","fullName","declaration","readUnionTypeCases","unionTypeNode"],"mappings":";;;;;;;;AAaQA,oBAAU,AAAAC;AAMNC;;;kBAAyBC;AAC7B,gBAAG,mCAA2BA;AACtBC,8CAAwBD;2BAGJ,AAAAC;AAAxB;;;uBAEAD;;;;;AA2GL,WAAA,kBADA,OApGA;AACC,YAAG,6BAAqBA;AAChBE,oCAAkBF;AAElBG,sCAC4B,AAAAD;AAEhC,gBACI,2BAAmBC,qBAAnB,OACG,4BAAoBA;AAOR,uBAAA,UADZ,iBAHA,eADH,eAAeA;AAEX,oCAAS;;;;AAMPC,mCAAA,AAAAD;wBAAAC;yBAAA;yBAAA;AAIC,\u002BBAAA,UADH,iBAAmB;;AAGhB,\u002BBAAA;;;;aACV,IAAG,\u002BBAAuBJ;AACvBK,sCAAoBL;AAOpBM,2BACA,eAHA,AAAAT,4BAA8B,AAAAQ;AAKtB,gCACI;;AAMVD,iCAAA,AAAAE;AAAA,gBAAA,AAAAF;AAqBEG,4BAAM,AAAAV,wBAAwBS;AAE5BF,qCAAA,AAAAG;AACJ,oBADI,AACJ,6BAAa,GADTH;AAGC,2BAAA,UADH,iBAAmB;;;AAInB,oCAAS;;;;AA5BVI,qCACHJ;AAAA,oBAAG,AAAAI,wBAAqB;AACpB,2BAAA;;qBACC,IAAG,AAAAA,sBAAqB;AACrBC,qCAAW,AAAAZ,8BAA8BS;AAQ1C,2BAAA,UADA,kBALF,sBACU,AAAAD,6BACII,UACK;;;AAMhBC,wCAAc,AAAAF,aAAc;AAED,2BAAA,UAA/B,AAAAV,4EAAgBY;;;;aAwBlB,IAAA,AAAAV,gBAAA;AAIE,mBAAA,AACA,AAAAW,mBAAmBb,QAHHE;;;AASjB,mBAAA,UADH,AAAAF,gFAAoBE;;OAjG7B,IAASD,yBAFT,OADH,AAAAa;;;;WAgH2C,iBAA3C,AAAAD,mBAAmBb,QAAOc","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -74,13 +74,13 @@ function transformType(glueType) {
|
|
|
74
74
|
}
|
|
75
75
|
case 13: {
|
|
76
76
|
const typeReference = glueType.fields[0];
|
|
77
|
-
return new FSharpType(10, [new FSharpTypeReference(mapDateToDateTime(typeReference.Name), typeReference.FullName)]);
|
|
77
|
+
return new FSharpType(10, [new FSharpTypeReference(mapDateToDateTime(typeReference.Name), typeReference.FullName, map(transformType, typeReference.TypeArguments))]);
|
|
78
78
|
}
|
|
79
79
|
case 15:
|
|
80
80
|
return new FSharpType(12, [transformType(glueType.fields[0])]);
|
|
81
81
|
case 12: {
|
|
82
82
|
const classDeclaration = glueType.fields[0];
|
|
83
|
-
return new FSharpType(10, [new FSharpTypeReference(classDeclaration.Name, classDeclaration.Name)]);
|
|
83
|
+
return new FSharpType(10, [new FSharpTypeReference(classDeclaration.Name, classDeclaration.Name, empty())]);
|
|
84
84
|
}
|
|
85
85
|
case 17:
|
|
86
86
|
return new FSharpType(11, [glueType.fields[0]]);
|
|
@@ -106,24 +106,28 @@ function transformType(glueType) {
|
|
|
106
106
|
|
|
107
107
|
function transformExports(isTopLevel, exports) {
|
|
108
108
|
return new FSharpType(4, [new FSharpInterface(singleton(new FSharpAttribute(4, [])), "Exports", empty(), collect((_arg) => {
|
|
109
|
+
let Name_1, Parameters_1;
|
|
109
110
|
switch (_arg.tag) {
|
|
110
111
|
case 2: {
|
|
111
112
|
const info = _arg.fields[0];
|
|
112
|
-
return singleton(new FSharpMember(1, [new FSharpMemberInfo(singleton(new FSharpAttribute(2, [info.Name, "module"])), escapeName(info.Name), empty(), transformType(info.Type), false, true, void 0, new FSharpAccessibility(0, []))]));
|
|
113
|
+
return singleton(new FSharpMember(1, [new FSharpMemberInfo(singleton(new FSharpAttribute(2, [info.Name, "module"])), escapeName(info.Name), empty(), empty(), transformType(info.Type), false, true, void 0, new FSharpAccessibility(0, []))]));
|
|
113
114
|
}
|
|
114
115
|
case 6: {
|
|
115
116
|
const info_1 = _arg.fields[0];
|
|
116
|
-
return singleton(new FSharpMember(0, [new FSharpMemberInfo(singleton(new FSharpAttribute(2, [info_1.Name, "module"])),
|
|
117
|
+
return singleton(new FSharpMember(0, [(Name_1 = escapeName(info_1.Name), (Parameters_1 = map(transformParameter, info_1.Parameters), new FSharpMemberInfo(singleton(new FSharpAttribute(2, [info_1.Name, "module"])), Name_1, transformTypeParameters(info_1.TypeParameters), Parameters_1, transformType(info_1.Type), false, true, void 0, new FSharpAccessibility(0, []))))]));
|
|
117
118
|
}
|
|
118
119
|
case 12: {
|
|
119
120
|
const info_2 = _arg.fields[0];
|
|
120
|
-
return map((_arg_1) =>
|
|
121
|
+
return map((_arg_1) => {
|
|
122
|
+
let Attributes_2, Name_2, Parameters_2;
|
|
123
|
+
return new FSharpMember(0, [(Attributes_2 = toList(delay(() => (isTopLevel ? append(singleton_1(new FSharpAttribute(2, [info_2.Name, "module"])), delay(() => singleton_1(new FSharpAttribute(9, [])))) : singleton_1(new FSharpAttribute(10, [info_2.Name]))))), (Name_2 = escapeName(info_2.Name), (Parameters_2 = map(transformParameter, _arg_1.fields[0]), new FSharpMemberInfo(Attributes_2, Name_2, transformTypeParameters(info_2.TypeParameters), Parameters_2, new FSharpType(6, [new FSharpMapped(escapeName(info_2.Name), empty())]), false, true, void 0, new FSharpAccessibility(0, [])))))]);
|
|
124
|
+
}, info_2.Constructors);
|
|
121
125
|
}
|
|
122
126
|
case 11: {
|
|
123
127
|
const moduleDeclaration = _arg.fields[0];
|
|
124
128
|
return choose((typ) => {
|
|
125
129
|
if (typ.tag === 12) {
|
|
126
|
-
return new FSharpMember(1, [new FSharpMemberInfo(singleton(new FSharpAttribute(3, ["module"])), moduleDeclaration.Name + "_", empty(), new FSharpType(6, [new FSharpMapped(`${moduleDeclaration.Name}.Exports`, empty())]), false, true, new FSharpAccessor(0, []), new FSharpAccessibility(0, []))]);
|
|
130
|
+
return new FSharpMember(1, [new FSharpMemberInfo(singleton(new FSharpAttribute(3, ["module"])), moduleDeclaration.Name + "_", empty(), empty(), new FSharpType(6, [new FSharpMapped(`${moduleDeclaration.Name}.Exports`, empty())]), false, true, new FSharpAccessor(0, []), new FSharpAccessibility(0, []))]);
|
|
127
131
|
}
|
|
128
132
|
else {
|
|
129
133
|
return void 0;
|
|
@@ -156,19 +160,19 @@ function transformMembers(members) {
|
|
|
156
160
|
switch (_arg.tag) {
|
|
157
161
|
case 2: {
|
|
158
162
|
const callSignatureInfo = _arg.fields[0];
|
|
159
|
-
return new FSharpMember(0, [new FSharpMemberInfo(singleton(new FSharpAttribute(1, [])), "Invoke", map(transformParameter, callSignatureInfo.Parameters), transformType(callSignatureInfo.Type), false, false, void 0, new FSharpAccessibility(0, []))]);
|
|
163
|
+
return new FSharpMember(0, [new FSharpMemberInfo(singleton(new FSharpAttribute(1, [])), "Invoke", empty(), map(transformParameter, callSignatureInfo.Parameters), transformType(callSignatureInfo.Type), false, false, void 0, new FSharpAccessibility(0, []))]);
|
|
160
164
|
}
|
|
161
165
|
case 1: {
|
|
162
166
|
const propertyInfo = _arg.fields[0];
|
|
163
|
-
return new FSharpMember(1, [new FSharpMemberInfo(empty(), escapeName(propertyInfo.Name), empty(), transformType(propertyInfo.Type), false, propertyInfo.IsStatic, transformAccessor(propertyInfo.Accessor), new FSharpAccessibility(0, []))]);
|
|
167
|
+
return new FSharpMember(1, [new FSharpMemberInfo(empty(), escapeName(propertyInfo.Name), empty(), empty(), transformType(propertyInfo.Type), false, propertyInfo.IsStatic, transformAccessor(propertyInfo.Accessor), new FSharpAccessibility(0, []))]);
|
|
164
168
|
}
|
|
165
169
|
case 3: {
|
|
166
170
|
const indexSignature = _arg.fields[0];
|
|
167
|
-
return new FSharpMember(1, [new FSharpMemberInfo(singleton(new FSharpAttribute(11, [])), "Item", map(transformParameter, indexSignature.Parameters), transformType(indexSignature.Type), false, false, new FSharpAccessor(2, []), new FSharpAccessibility(0, []))]);
|
|
171
|
+
return new FSharpMember(1, [new FSharpMemberInfo(singleton(new FSharpAttribute(11, [])), "Item", empty(), map(transformParameter, indexSignature.Parameters), transformType(indexSignature.Type), false, false, new FSharpAccessor(2, []), new FSharpAccessibility(0, []))]);
|
|
168
172
|
}
|
|
169
173
|
default: {
|
|
170
174
|
const methodInfo = _arg.fields[0];
|
|
171
|
-
return new FSharpMember(0, [new FSharpMemberInfo(empty(), escapeName(methodInfo.Name), map(transformParameter, methodInfo.Parameters), transformType(methodInfo.Type), methodInfo.IsOptional, methodInfo.IsStatic, void 0, new FSharpAccessibility(0, []))]);
|
|
175
|
+
return new FSharpMember(0, [new FSharpMemberInfo(empty(), escapeName(methodInfo.Name), empty(), map(transformParameter, methodInfo.Parameters), transformType(methodInfo.Type), methodInfo.IsOptional, methodInfo.IsStatic, void 0, new FSharpAccessibility(0, []))]);
|
|
172
176
|
}
|
|
173
177
|
}
|
|
174
178
|
}, members);
|
|
@@ -447,17 +451,17 @@ function transformTypeAliasDeclaration(glueTypeAliasDeclaration) {
|
|
|
447
451
|
return new FSharpType(4, [new FSharpInterface(originalInterface.Attributes, escapeName(glueTypeAliasDeclaration.Name), originalInterface.TypeParameters, map((m_1) => {
|
|
448
452
|
if (m_1.tag === 1) {
|
|
449
453
|
const property = m_1.fields[0];
|
|
450
|
-
return new FSharpMember(1, [new FSharpMemberInfo(property.Attributes, property.Name, property.Parameters, property.Type, true, property.IsStatic, property.Accessor, property.Accessibility)]);
|
|
454
|
+
return new FSharpMember(1, [new FSharpMemberInfo(property.Attributes, property.Name, property.TypeParameters, property.Parameters, property.Type, true, property.IsStatic, property.Accessor, property.Accessibility)]);
|
|
451
455
|
}
|
|
452
456
|
else {
|
|
453
457
|
const method = m_1.fields[0];
|
|
454
|
-
return new FSharpMember(0, [new FSharpMemberInfo(method.Attributes, method.Name, method.Parameters, method.Type, true, method.IsStatic, method.Accessor, method.Accessibility)]);
|
|
458
|
+
return new FSharpMember(0, [new FSharpMemberInfo(method.Attributes, method.Name, method.TypeParameters, method.Parameters, method.Type, true, method.IsStatic, method.Accessor, method.Accessibility)]);
|
|
455
459
|
}
|
|
456
460
|
}, originalInterface.Members))]);
|
|
457
461
|
}
|
|
458
462
|
case 16: {
|
|
459
463
|
const functionType = matchValue.fields[0];
|
|
460
|
-
return new FSharpType(4, [new FSharpInterface(singleton(new FSharpAttribute(5, [])), escapeName(glueTypeAliasDeclaration.Name), transformTypeParameters(glueTypeAliasDeclaration.TypeParameters), singleton(new FSharpMember(0, [new FSharpMemberInfo(singleton(new FSharpAttribute(1, [])), "Invoke", map(transformParameter, functionType.Parameters), transformType(functionType.Type), false, false, void 0, new FSharpAccessibility(0, []))])))]);
|
|
464
|
+
return new FSharpType(4, [new FSharpInterface(singleton(new FSharpAttribute(5, [])), escapeName(glueTypeAliasDeclaration.Name), transformTypeParameters(glueTypeAliasDeclaration.TypeParameters), singleton(new FSharpMember(0, [new FSharpMemberInfo(singleton(new FSharpAttribute(1, [])), "Invoke", empty(), map(transformParameter, functionType.Parameters), transformType(functionType.Type), false, false, void 0, new FSharpAccessibility(0, []))])))]);
|
|
461
465
|
}
|
|
462
466
|
default:
|
|
463
467
|
return new FSharpType(9, []);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Glutinum.Converter/Transform.fs"],"names":["glueLiteral","gluePrimitive","glueType","patternInput","primitiveInfo","others","isOptional","transformType","caseType","typeReference","classDeclaration","transformPrimitive","_arg1","info","transformParameter","isTopLevel","moduleDeclaration","typ","exports","parameter","accessor","_arg2","callSignatureInfo","propertyInfo","transformAccessor","indexSignature","methodInfo","members","
|
|
1
|
+
{"version":3,"sources":["../../src/Glutinum.Converter/Transform.fs"],"names":["glueLiteral","gluePrimitive","glueType","patternInput","primitiveInfo","others","isOptional","transformType","caseType","typeReference","classDeclaration","transformPrimitive","Name","Parameters","_arg1","info","transformParameter","transformTypeParameters","Attributes","isTopLevel","moduleDeclaration","typ","exports","parameter","accessor","_arg2","callSignatureInfo","propertyInfo","transformAccessor","indexSignature","methodInfo","members","Members","transformMembers","m","matchValue","glueEnum","stringValues","integralValues","caseValue","glueMember","caseName","differentName","transformLiteral","cases","aliasName","typeParameter","typeParameters","glueTypeAliasDeclaration","flattenCases","_arg3","flattenedCases","isStringOnly","_arg4","isNumericOnly","_arg5","value","transformKeyOf","originalInterface","transformInterface","property","method","functionType","transform","_arg6","transformEnum","transformTypeAliasDeclaration","transformModuleDeclaration","transformClassDeclaration","glueTypes","glueAst","rest","transformExports","transformToFsharp"],"mappings":";;;;;;;;;;;;YAaUA;;AAEqB,mBAAA,sBAAA,AAAAA;;AACE,mBAAA,sBAAA,AAAAA;;AACD,mBAAA,sBAAA,AAAAA;;AAHE,mBAAA,sBAAA,AAAAA;;;;;YASxBC;;AAEiB,mBAAA;;AACE,mBAAA;;AACD,mBAAA;;AACA,mBAAA;;AACE,mBAAA;;AACH,mBAAA;;AACC,mBAAA;;AACK,mBAAA;;AARH,mBAAA;;;;;YAWpBC;;AAIEC,iCAEG;AACO,oBAAA,AAAAD;AACeE,4CACX,AAAAF;4BAAAE;;;mCAEuB;;mCACtB;;;;2BACJ;;eATX,AAAAF;AAAeG,2BAAf,AAAAF;AAYAG,\u002BBAAa,CAAI,QAZjB,AAAAH;AAcJ,gBAAG,AAAAG,eAAc,OAAAD,YAAgB;AAC7B,uBAAA,mBAAkB,AAAAE,cAAc,KAAAF;;;AAe7B,uBAAA,mBAbH,gBACiB,SACN,IAAI,OAAAA,WAGJ,mBACC,oBACiB,SACN,kBAAyB,mBAAAG,cAJxCH,SAOSC;;;;AAIAG,kCACrB,AAAAP;AAOG,mBAAA,oBAPF,wBACU,kBAAyB,AAAAO,qBACrB,AAAAA,wBAEwB,IAASF,eAAxC,AAAAE;;;AAMkB,mBAAA,oBAA1B,AAAAF,cAAA,AAAAL;;AAEwBQ,qCACxB,AAAAR;AAMG,mBAAA,oBANF,wBACU,AAAAQ,uBACI,AAAAA,uBACK;;;AAKS,mBAAA,oBAAA,AAAAR;;;;;;;;;;;;;AAa7B,sBAAQ,OAAA,iCAA\u002BBA;AACvC,mBAAA;;;AAtEoC,mBAAA,mBAAp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BAER,OACF,OACA,QACK;;;AAOzB,mBAAA;;;;;WAYJ,mBANF,iBACU,WAAkB,AAAA1C,yBACX,AAAAA,\u002BBACN,AAAA2C,UAAU,OAAM,AAAA3C;;;;QAWjBR,MACGoB;WAIX,oBALQpB,OAAA,WAAkB,AAAAF,yBACfsB,UAAA,AAAAC,iBAAiB,AAAAvB,2BAH9B,oBACgB,UAAE,6BACRE,MAEU,AAAAK,wBAAwB,AAAAP,kCAD/BsB;;;;WAQX;gBACCgC;;AAI4B,uBAAA,AAAAC,cAAA,AAAAD;;AAGxB,uBAAA,AAAAE,8BAAA,AAAAF;;AAGA,uBAAA,AAAAG,2BAAA,AAAAH;;AAGA,uBAAA,AAAAI,0BAAA,AAAAJ;;;;;;;;;;;;;;AAckB,uBAAA;;AAzBlB,uBAAA,mBAAqB,AAAAL,mBAArB,AAAAK;;OAJRK;;;;AAiCIlE,yBAEG;gBACOD;;;uBAE8B;;uBAC7B;;OALXoE;AADSC,iBAAT,AAAApE;AAgCAmB,sBAAU,SAhCV,AAAAnB,iBAWG;gBACOD;;uBAC2B;;AAG1B,uBAAA;AACO,wBAAA,AAAAA;\u002BBAC2B;;;\u002BBAC1B;;mBAJX,AAAAA;;uBAMG;;OAXXqE;AAwBJ,WAAA,OACI,YAAA,OAAA,AAAG,CAAK,QAAajD,aACjB,YAAA,AAAAkD,iBAAiBrD,YAAWG,cADhC,WAGA,YAAO,AAAAmD,kBAAkBF","file":null,"sourcesContent":null,"sourceRoot":null}
|
package/dist/Program.js
CHANGED
|
@@ -4,6 +4,7 @@ import { map } from "./fable_modules/fable-library.4.5.0/Array.js";
|
|
|
4
4
|
import { generateBindingFile } from "./Glutinum.Converter/Generate.js";
|
|
5
5
|
import * as path from "path";
|
|
6
6
|
import * as fs from "fs";
|
|
7
|
+
import { success, info } from "./Glutinum.Converter/Log.js";
|
|
7
8
|
|
|
8
9
|
export function printHelp() {
|
|
9
10
|
const helpText = "\nGenerate Fable bindings from TypeScript definitions - https://github.com/glutinum-org/cl\n\nUSAGE\n\n glutinum <input> [--out-file <output>]\n glue <input> [--out-file <output>]\n\nOPTIONS\n\n --out-file <output> Destination file to write in\n If not specified, the result will be printed to stdout\n -h, --help Print this help message\n\nEXAMPLES\n\n glutinum ./node_modules/my-lib/index.d.ts --out-file ./Glutinum.MyLib.fs\n glutinum ./node_modules/my-lib/index.d.ts\n ";
|
|
@@ -99,12 +100,15 @@ function getVersion() {
|
|
|
99
100
|
recursive: true,
|
|
100
101
|
});
|
|
101
102
|
fs.writeFileSync(outFile, res);
|
|
103
|
+
info(`Bindings written to: ${path.join(process.cwd(), outFile)}`);
|
|
104
|
+
success("Success!");
|
|
102
105
|
return 0;
|
|
103
106
|
}
|
|
104
107
|
case 3: {
|
|
105
108
|
toConsole(printf("Generating binding file for %s"))(input_1);
|
|
106
109
|
const res_1 = generateBindingFile(input_1);
|
|
107
110
|
toConsole(printf("Generation result:\n%s"))(res_1);
|
|
111
|
+
success("Success!");
|
|
108
112
|
return 0;
|
|
109
113
|
}
|
|
110
114
|
default: {
|
package/dist/Program.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Glutinum.Converter.CLI/Program.fs"],"names":["helpText","argv","x","input","outFile","printHelp","getVersion","res","outFileDir"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/Glutinum.Converter.CLI/Program.fs"],"names":["helpText","argv","x","input","outFile","printHelp","getVersion","res","outFileDir"],"mappings":";;;;;;;;;AAQQA,qBACA;AAoBJ,cAAQ,GAAKA;;;;AAGb;;;;AAUIC,mBAAmD,QAApC,WAAoB,AAAAC,uBAA5BD;qBAkBTE,OAAyBC,SAgBzBD;AA9BI,QAAA,CAAA,QAAAF;gBAAA,KAEJA;iBAFI;iBAAA;iBAAA;;;;iBAAA;AAAA,oBAAA,CAAA,QAAA,KAEJA;AAFI,wBAAA,KAcK,KAZTA,aAFI;AAAA,4BAAA,CAAA,QAAA,KAcK,KAZTA;AAFI,gCAAA,QAAA,KAcqB,KAAhB,KAZTA;;AAYAE,wCAdI,KAEJF;AAYyBG,0CAdrB,KAcqB,KAAhB,KAZTH;;;;;;;;;;;;;;;;;;;;AAFI,oBAAA,QAAA,KAEJA;;AA4BAE,8BA9BI,KAEJF;;qBAFI,IAAA,KAcK,KAZTA,aAFI;AAAA,wBAAA,CAAA,QAAA,KAcK,KAZTA;AAFI,4BAAA,QAAA,KAcqB,KAAhB,KAZTA;;AAYAE,oCAdI,KAEJF;AAYyBG,sCAdrB,KAcqB,KAAhB,KAZTH;;;;;;;;;;;;;;;;;;;;AAGE,AAAAI;mBACA;;;AAKA,sBAAQ,GAFM,AAAAC;mBAGd;;;AAIA,sBAAQ,OAAA,mCAAiCH;AACrCI,wBAAM,oBAAoBJ;AAE1BK,\u002BBAAa,aAAcJ;AAC/B,yBAAgBI;2BAA2B;;AAC3C,6BAAkBJ,SAASG;AAI3B,iBAAS,wBAFa,UAAW,eAAoBH;AAGrD,oBAAY;mBAEZ;;;AAGA,sBAAQ,OAAA,mCAAiCD;AACrCI,0BAAM,oBAAoBJ;AAE9B,sBAAQ,OAAA,2BAAyBI;AAEjC,oBAAY;mBAEZ;;;AAEA,sBAAQ,OAAA;AACR,AAAAF;mBACA","file":null,"sourcesContent":null,"sourceRoot":null}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glutinum/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "TypeScript definition to F# bindings converter",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/glutinum-org/cli#readme",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"
|
|
31
|
-
"
|
|
30
|
+
"ava": "^6.0.1",
|
|
31
|
+
"dirname-filename-esm": "^1.1.1"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"chalk": "^5.3.0",
|