@intelligentgraphics/ig.gfx.packager 3.0.3 → 3.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/build/cli-2c3347fd.js +2487 -0
  2. package/build/cli-2c3347fd.js.map +1 -0
  3. package/build/{lib/dependencies.mjs → dependencies-300450ae.js} +62 -4
  4. package/build/dependencies-300450ae.js.map +1 -0
  5. package/build/generate-97bb8b12.js +231 -0
  6. package/build/generate-97bb8b12.js.map +1 -0
  7. package/build/{commands/build/index.mjs → index-01b0ddab.js} +151 -8
  8. package/build/index-01b0ddab.js.map +1 -0
  9. package/build/{commands/publish/index.mjs → index-f59e50ec.js} +181 -16
  10. package/build/index-f59e50ec.js.map +1 -0
  11. package/build/index.mjs +1 -1
  12. package/build/index.mjs.map +1 -1
  13. package/build/{commands/postinstall.mjs → postinstall-5bba19eb.js} +18 -8
  14. package/build/postinstall-5bba19eb.js.map +1 -0
  15. package/build/{commands/publishNpm.mjs → publishNpm-eb07f766.js} +21 -9
  16. package/build/publishNpm-eb07f766.js.map +1 -0
  17. package/build/versionFile-af5ed4bc.js +370 -0
  18. package/build/versionFile-af5ed4bc.js.map +1 -0
  19. package/package.json +8 -7
  20. package/readme.md +107 -32
  21. package/build/cli.mjs +0 -313
  22. package/build/cli.mjs.map +0 -1
  23. package/build/commands/build/docs.mjs +0 -34
  24. package/build/commands/build/docs.mjs.map +0 -1
  25. package/build/commands/build/index.mjs.map +0 -1
  26. package/build/commands/build/tsc.mjs +0 -84
  27. package/build/commands/build/tsc.mjs.map +0 -1
  28. package/build/commands/generate.mjs +0 -182
  29. package/build/commands/generate.mjs.map +0 -1
  30. package/build/commands/postinstall.mjs.map +0 -1
  31. package/build/commands/publish/index.mjs.map +0 -1
  32. package/build/commands/publish/zip.mjs +0 -168
  33. package/build/commands/publish/zip.mjs.map +0 -1
  34. package/build/commands/publishNpm.mjs.map +0 -1
  35. package/build/lib/assetService.mjs +0 -111
  36. package/build/lib/assetService.mjs.map +0 -1
  37. package/build/lib/banner.mjs +0 -20
  38. package/build/lib/banner.mjs.map +0 -1
  39. package/build/lib/dependencies.mjs.map +0 -1
  40. package/build/lib/error.mjs +0 -15
  41. package/build/lib/error.mjs.map +0 -1
  42. package/build/lib/fs.mjs +0 -19
  43. package/build/lib/fs.mjs.map +0 -1
  44. package/build/lib/git.mjs +0 -37
  45. package/build/lib/git.mjs.map +0 -1
  46. package/build/lib/log.mjs +0 -9
  47. package/build/lib/log.mjs.map +0 -1
  48. package/build/lib/npmPackage.mjs +0 -19
  49. package/build/lib/npmPackage.mjs.map +0 -1
  50. package/build/lib/package.mjs +0 -129
  51. package/build/lib/package.mjs.map +0 -1
  52. package/build/lib/packageVersion.mjs +0 -174
  53. package/build/lib/packageVersion.mjs.map +0 -1
  54. package/build/lib/parseVersion.mjs +0 -54
  55. package/build/lib/parseVersion.mjs.map +0 -1
  56. package/build/lib/prompter.mjs +0 -31
  57. package/build/lib/prompter.mjs.map +0 -1
  58. package/build/lib/publishedPackage.mjs +0 -66
  59. package/build/lib/publishedPackage.mjs.map +0 -1
  60. package/build/lib/scripts.mjs +0 -10
  61. package/build/lib/scripts.mjs.map +0 -1
  62. package/build/lib/stripUtf8Bom.mjs +0 -11
  63. package/build/lib/stripUtf8Bom.mjs.map +0 -1
  64. package/build/lib/toposort.mjs +0 -26
  65. package/build/lib/toposort.mjs.map +0 -1
  66. package/build/lib/versionFile.mjs +0 -78
  67. package/build/lib/versionFile.mjs.map +0 -1
  68. package/build/lib/workspace.mjs +0 -51
  69. package/build/lib/workspace.mjs.map +0 -1
@@ -0,0 +1,231 @@
1
+ import ts from 'typescript';
2
+ import 'path';
3
+ import 'fs';
4
+ import 'resolve';
5
+ import 'write-pkg';
6
+ import { h as getPackageTypescriptFiles, b as readPackageCreatorIndex, j as writePackageCreatorIndex } from './cli-2c3347fd.js';
7
+ import 'node:path';
8
+ import 'node:fs';
9
+ import 'axios';
10
+ import 'update-notifier';
11
+ import 'yargs/yargs';
12
+ import 'url';
13
+ import 'glob';
14
+ import 'assert';
15
+ import 'events';
16
+ import 'util';
17
+ import 'inquirer';
18
+
19
+ function capitalizeFirstLetter(string) {
20
+ return (string === null || string === void 0 ? void 0 : string.charAt(0).toUpperCase()) + (string === null || string === void 0 ? void 0 : string.slice(1));
21
+ }
22
+ function parseDefault(value, type) {
23
+ const uType = capitalizeFirstLetter(type);
24
+ if (value === "null") return null;
25
+ switch (uType) {
26
+ case "LengthM":
27
+ case "ArcDEG":
28
+ case "Float":
29
+ return parseFloat(value);
30
+ case "Integer":
31
+ case "Int":
32
+ return parseInt(value);
33
+ case "Boolean":
34
+ case "Bool":
35
+ return value === "true";
36
+ case "Material":
37
+ case "String":
38
+ case "Geometry":
39
+ default:
40
+ return value.replace(/^"/, "").replace(/"$/, "");
41
+ }
42
+ }
43
+ const findEvaluatorNodes = node => {
44
+ let body;
45
+ if (ts.isModuleDeclaration(node)) {
46
+ body = node.body;
47
+ }
48
+ if (body !== undefined && ts.isModuleDeclaration(body)) {
49
+ body = body.body;
50
+ }
51
+ const evaluators = [];
52
+ if (body !== undefined) {
53
+ ts.forEachChild(body, child => {
54
+ var _child$heritageClause;
55
+ if (!ts.isClassDeclaration(child)) {
56
+ return;
57
+ }
58
+ const isEvaluator = (_child$heritageClause = child.heritageClauses) === null || _child$heritageClause === void 0 ? void 0 : _child$heritageClause.some(clause => {
59
+ if (clause.token !== ts.SyntaxKind.ExtendsKeyword && clause.token !== ts.SyntaxKind.ImplementsKeyword) {
60
+ return false;
61
+ }
62
+ return clause.types.some(type => type.getText().includes("Evaluator"));
63
+ });
64
+ if (isEvaluator) {
65
+ evaluators.push(child);
66
+ }
67
+ });
68
+ }
69
+ return evaluators;
70
+ };
71
+ function getParameterDeclaration(evaluatorNode) {
72
+ var _evaluatorNode$member;
73
+ let memb = (_evaluatorNode$member = evaluatorNode.members) === null || _evaluatorNode$member === void 0 ? void 0 : _evaluatorNode$member.find(member => {
74
+ var _member$name;
75
+ return (member === null || member === void 0 ? void 0 : (_member$name = member.name) === null || _member$name === void 0 ? void 0 : _member$name.getText()) == "Create";
76
+ });
77
+ if (memb && ts.isMethodDeclaration(memb)) {
78
+ return memb.parameters[2];
79
+ }
80
+ }
81
+ function getModuleName(sourceFile) {
82
+ let fullName = "";
83
+ if (ts.isModuleDeclaration(sourceFile)) {
84
+ fullName += sourceFile.name.getText();
85
+ let packageB = sourceFile.body;
86
+ if (ts.isModuleDeclaration(packageB)) {
87
+ fullName += "." + packageB.name.getText();
88
+ }
89
+ }
90
+ return fullName;
91
+ }
92
+ function genParameters(properties) {
93
+ return properties.map((symbol, i) => {
94
+ var _symbol$getDeclaratio;
95
+ const parameter = {
96
+ Name: symbol.name,
97
+ Description: undefined,
98
+ Type: "String",
99
+ Default: undefined,
100
+ DisplayIndex: i + 1
101
+ };
102
+ if (parameter.Name.length > 45) {
103
+ throw new Error(`Parameter name length >45 '${parameter.Name}'`);
104
+ }
105
+ let declaration = (_symbol$getDeclaratio = symbol.getDeclarations()) === null || _symbol$getDeclaratio === void 0 ? void 0 : _symbol$getDeclaratio[0];
106
+ let documentationComment = symbol.getDocumentationComment(undefined);
107
+ let checkLinksSymbol = symbol;
108
+ while (checkLinksSymbol !== undefined && declaration === undefined) {
109
+ const links = checkLinksSymbol.links;
110
+ if (links !== null && links !== void 0 && links.syntheticOrigin) {
111
+ var _links$syntheticOrigi;
112
+ declaration = (_links$syntheticOrigi = links.syntheticOrigin.getDeclarations()) === null || _links$syntheticOrigi === void 0 ? void 0 : _links$syntheticOrigi[0];
113
+ if (documentationComment.length === 0) {
114
+ documentationComment = links.syntheticOrigin.getDocumentationComment(undefined);
115
+ }
116
+ checkLinksSymbol = links.syntheticOrigin;
117
+ }
118
+ }
119
+ if (declaration === undefined) {
120
+ const links = symbol.links;
121
+ if (links !== null && links !== void 0 && links.syntheticOrigin) {
122
+ var _links$syntheticOrigi2;
123
+ declaration = (_links$syntheticOrigi2 = links.syntheticOrigin.getDeclarations()) === null || _links$syntheticOrigi2 === void 0 ? void 0 : _links$syntheticOrigi2[0];
124
+ if (documentationComment.length === 0) {
125
+ documentationComment = links.syntheticOrigin.getDocumentationComment(undefined);
126
+ }
127
+ }
128
+ }
129
+ if (declaration !== undefined) {
130
+ const rawDocTags = ts.getJSDocTags(declaration);
131
+ const dict = getTagDict(rawDocTags);
132
+ if (dict.summary) {
133
+ parameter.Description = dict.summary;
134
+ } else {
135
+ const comment = documentationComment.map(comment => comment.text).join(" ");
136
+ if (comment) {
137
+ parameter.Description = comment;
138
+ }
139
+ }
140
+ if (dict.creatorType) {
141
+ parameter.Type = dict.creatorType;
142
+ }
143
+ if (dict.default && dict.creatorType) {
144
+ parameter.Default = parseDefault(dict.default, dict.creatorType);
145
+ }
146
+ }
147
+ return parameter;
148
+ });
149
+ }
150
+ function getTagDict(tags) {
151
+ const dict = {};
152
+ for (const tag of tags) {
153
+ dict[tag.tagName.text] = tag.comment;
154
+ }
155
+ return dict;
156
+ }
157
+
158
+ /**
159
+ * Extracts and returns script array for _Index.json from a src folder
160
+ *
161
+ * @param folderPath path to a src folder
162
+ */
163
+ function extract(location, ignore = []) {
164
+ const files = getPackageTypescriptFiles(location);
165
+ const filtered = files.filter(path => {
166
+ return !ignore.some(suffix => path.endsWith(suffix));
167
+ });
168
+ const arr = [];
169
+ const existingIndex = readPackageCreatorIndex(location) ?? [];
170
+ const program = ts.createProgram(filtered, {
171
+ allowJs: true
172
+ });
173
+ const typeChecker = program.getTypeChecker();
174
+ filtered.forEach(file => {
175
+ // Create a Program to represent the project, then pull out the
176
+ // source file to parse its AST.
177
+ const sourceFile = program.getSourceFile(file);
178
+
179
+ // Loop through the root AST nodes of the file
180
+ ts.forEachChild(sourceFile, node => {
181
+ for (const evalNode of findEvaluatorNodes(node)) {
182
+ const moduleName = getModuleName(node);
183
+ if (evalNode.name === undefined) {
184
+ throw new Error(`Expected evaluator class to have a name`);
185
+ }
186
+ const name = moduleName + "." + evalNode.name.getText();
187
+ if (name.length > 45) {
188
+ throw new Error(`Package name length >45 '${name}'`);
189
+ }
190
+ const parameterDeclaration = getParameterDeclaration(evalNode);
191
+ const parametersType = parameterDeclaration === undefined ? undefined : typeChecker.getTypeAtLocation(parameterDeclaration);
192
+ if (parametersType === undefined) {
193
+ console.log(`Failed to find parameters type declaration for evaluator ${evalNode.name.getText()}. Skipping parameter list generation`);
194
+ }
195
+ const existingIndexEntry = existingIndex.find(entry => entry.Name === name);
196
+ const obj = {
197
+ Name: name,
198
+ Description: existingIndexEntry === null || existingIndexEntry === void 0 ? void 0 : existingIndexEntry.Description,
199
+ Type: "Evaluator",
200
+ Parameters: []
201
+ };
202
+ const rawDocTags = ts.getJSDocTags(evalNode);
203
+ const dict = getTagDict(rawDocTags);
204
+ if (dict.summary) {
205
+ obj.Description = dict.summary;
206
+ } else {
207
+ const comment = typeChecker.getTypeAtLocation(evalNode).symbol.getDocumentationComment(typeChecker).map(comment => comment.text).join(" ");
208
+ if (comment) {
209
+ obj.Description = comment;
210
+ }
211
+ }
212
+ if (dict.creatorType) {
213
+ obj.Type = dict.creatorType;
214
+ }
215
+ if (parametersType !== undefined) {
216
+ obj.Parameters = genParameters(typeChecker.getPropertiesOfType(parametersType));
217
+ if (obj.Parameters.length === 0 && parametersType.getStringIndexType() !== undefined) {
218
+ obj.Parameters = (existingIndexEntry === null || existingIndexEntry === void 0 ? void 0 : existingIndexEntry.Parameters) ?? [];
219
+ }
220
+ } else if (existingIndexEntry !== undefined) {
221
+ obj.Parameters = existingIndexEntry.Parameters;
222
+ }
223
+ arr.push(obj);
224
+ }
225
+ });
226
+ });
227
+ writePackageCreatorIndex(location, arr);
228
+ }
229
+
230
+ export { extract };
231
+ //# sourceMappingURL=generate-97bb8b12.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-97bb8b12.js","sources":["../src/commands/generate.ts"],"sourcesContent":["import ts from \"typescript\";\n\nimport {\n\tPackageLocation,\n\twritePackageCreatorIndex,\n\treadPackageCreatorIndex,\n} from \"../lib/package\";\nimport { getPackageTypescriptFiles } from \"../lib/scripts\";\nimport {\n\tCreatorIndexEntry,\n\tCreatorIndexParameter,\n\tCreatorIndexParameterType,\n} from \"../lib/package\";\n\nfunction capitalizeFirstLetter(string: string) {\n\treturn string?.charAt(0).toUpperCase() + string?.slice(1);\n}\n\nfunction parseDefault(value: string, type: string) {\n\tconst uType: CreatorIndexParameterType = capitalizeFirstLetter(\n\t\ttype,\n\t) as CreatorIndexParameterType;\n\tif (value === \"null\") return null;\n\tswitch (uType) {\n\t\tcase \"LengthM\":\n\t\tcase \"ArcDEG\":\n\t\tcase \"Float\":\n\t\t\treturn parseFloat(value);\n\t\tcase \"Integer\":\n\t\tcase \"Int\":\n\t\t\treturn parseInt(value);\n\t\tcase \"Boolean\":\n\t\tcase \"Bool\":\n\t\t\treturn value === \"true\";\n\t\tcase \"Material\":\n\t\tcase \"String\":\n\t\tcase \"Geometry\":\n\t\tdefault:\n\t\t\treturn value.replace(/^\"/, \"\").replace(/\"$/, \"\");\n\t}\n}\n\nconst findEvaluatorNodes = (node: ts.Node) => {\n\tlet body: ts.NamespaceBody | ts.JSDocNamespaceBody | undefined;\n\n\tif (ts.isModuleDeclaration(node)) {\n\t\tbody = node.body;\n\t}\n\tif (body !== undefined && ts.isModuleDeclaration(body)) {\n\t\tbody = body.body;\n\t}\n\n\tconst evaluators: ts.ClassDeclaration[] = [];\n\n\tif (body !== undefined) {\n\t\tts.forEachChild(body, (child) => {\n\t\t\tif (!ts.isClassDeclaration(child)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst isEvaluator = child.heritageClauses?.some((clause) => {\n\t\t\t\tif (\n\t\t\t\t\tclause.token !== ts.SyntaxKind.ExtendsKeyword &&\n\t\t\t\t\tclause.token !== ts.SyntaxKind.ImplementsKeyword\n\t\t\t\t) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn clause.types.some((type) =>\n\t\t\t\t\ttype.getText().includes(\"Evaluator\"),\n\t\t\t\t);\n\t\t\t});\n\n\t\t\tif (isEvaluator) {\n\t\t\t\tevaluators.push(child);\n\t\t\t}\n\t\t});\n\t}\n\n\treturn evaluators;\n};\n\nfunction getParameterDeclaration(evaluatorNode: ts.ClassDeclaration) {\n\tlet memb = evaluatorNode.members?.find(\n\t\t(member) => member?.name?.getText() == \"Create\",\n\t);\n\tif (memb && ts.isMethodDeclaration(memb)) {\n\t\treturn memb.parameters[2];\n\t}\n}\n\nfunction getModuleName(sourceFile: ts.Node): string {\n\tlet fullName = \"\";\n\tif (ts.isModuleDeclaration(sourceFile)) {\n\t\tfullName += sourceFile.name.getText();\n\n\t\tlet packageB = sourceFile.body!;\n\t\tif (ts.isModuleDeclaration(packageB)) {\n\t\t\tfullName += \".\" + packageB.name.getText();\n\t\t}\n\t}\n\treturn fullName;\n}\n\nfunction genParameters(properties: ts.Symbol[]): CreatorIndexParameter[] {\n\treturn properties.map((symbol, i) => {\n\t\tconst parameter: CreatorIndexParameter = {\n\t\t\tName: symbol.name,\n\t\t\tDescription: undefined,\n\t\t\tType: \"String\",\n\t\t\tDefault: undefined,\n\t\t\tDisplayIndex: i + 1,\n\t\t};\n\n\t\tif (parameter.Name.length > 45) {\n\t\t\tthrow new Error(`Parameter name length >45 '${parameter.Name}'`);\n\t\t}\n\n\t\tlet declaration: ts.Declaration | undefined =\n\t\t\tsymbol.getDeclarations()?.[0];\n\t\tlet documentationComment = symbol.getDocumentationComment(undefined);\n\n\t\tlet checkLinksSymbol: ts.Symbol | undefined = symbol;\n\n\t\twhile (checkLinksSymbol !== undefined && declaration === undefined) {\n\t\t\tconst links = (\n\t\t\t\tcheckLinksSymbol as {\n\t\t\t\t\tlinks?: {\n\t\t\t\t\t\tmappedType?: ts.Type;\n\t\t\t\t\t\tsyntheticOrigin?: ts.Symbol;\n\t\t\t\t\t};\n\t\t\t\t} & ts.Symbol\n\t\t\t).links;\n\n\t\t\tif (links?.syntheticOrigin) {\n\t\t\t\tdeclaration = links.syntheticOrigin.getDeclarations()?.[0];\n\n\t\t\t\tif (documentationComment.length === 0) {\n\t\t\t\t\tdocumentationComment =\n\t\t\t\t\t\tlinks.syntheticOrigin.getDocumentationComment(\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tcheckLinksSymbol = links.syntheticOrigin;\n\t\t\t}\n\t\t}\n\n\t\tif (declaration === undefined) {\n\t\t\tconst links = (\n\t\t\t\tsymbol as {\n\t\t\t\t\tlinks?: {\n\t\t\t\t\t\tmappedType?: ts.Type;\n\t\t\t\t\t\tsyntheticOrigin?: ts.Symbol;\n\t\t\t\t\t};\n\t\t\t\t} & ts.Symbol\n\t\t\t).links;\n\n\t\t\tif (links?.syntheticOrigin) {\n\t\t\t\tdeclaration = links.syntheticOrigin.getDeclarations()?.[0];\n\n\t\t\t\tif (documentationComment.length === 0) {\n\t\t\t\t\tdocumentationComment =\n\t\t\t\t\t\tlinks.syntheticOrigin.getDocumentationComment(\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (declaration !== undefined) {\n\t\t\tconst rawDocTags = ts.getJSDocTags(declaration);\n\n\t\t\tconst dict = getTagDict(rawDocTags);\n\n\t\t\tif (dict.summary) {\n\t\t\t\tparameter.Description = dict.summary;\n\t\t\t} else {\n\t\t\t\tconst comment = documentationComment\n\t\t\t\t\t.map((comment) => comment.text)\n\t\t\t\t\t.join(\" \");\n\n\t\t\t\tif (comment) {\n\t\t\t\t\tparameter.Description = comment;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (dict.creatorType) {\n\t\t\t\tparameter.Type = dict.creatorType as CreatorIndexParameterType;\n\t\t\t}\n\t\t\tif (dict.default && dict.creatorType) {\n\t\t\t\tparameter.Default = parseDefault(\n\t\t\t\t\tdict.default,\n\t\t\t\t\tdict.creatorType,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn parameter;\n\t});\n}\n\ninterface IDocTags {\n\tdefault?: string;\n\tcreatorType?: string;\n\tsummary?: string;\n}\n\nfunction getTagDict(tags: readonly ts.JSDocTag[]): IDocTags {\n\tconst dict: IDocTags = {};\n\n\tfor (const tag of tags) {\n\t\tdict[tag.tagName.text] = tag.comment;\n\t}\n\n\treturn dict;\n}\n\n/**\n * Extracts and returns script array for _Index.json from a src folder\n *\n * @param folderPath path to a src folder\n */\nexport function extract(location: PackageLocation, ignore: string[] = []) {\n\tconst files = getPackageTypescriptFiles(location);\n\tconst filtered = files.filter((path) => {\n\t\treturn !ignore.some((suffix) => path.endsWith(suffix));\n\t});\n\tconst arr: CreatorIndexEntry[] = [];\n\n\tconst existingIndex = readPackageCreatorIndex(location) ?? [];\n\n\tconst program = ts.createProgram(filtered, { allowJs: true });\n\tconst typeChecker = program.getTypeChecker();\n\tfiltered.forEach((file) => {\n\t\t// Create a Program to represent the project, then pull out the\n\t\t// source file to parse its AST.\n\t\tconst sourceFile = program.getSourceFile(file);\n\n\t\t// Loop through the root AST nodes of the file\n\t\tts.forEachChild(sourceFile!, (node) => {\n\t\t\tfor (const evalNode of findEvaluatorNodes(node)) {\n\t\t\t\tconst moduleName = getModuleName(node);\n\n\t\t\t\tif (evalNode.name === undefined) {\n\t\t\t\t\tthrow new Error(`Expected evaluator class to have a name`);\n\t\t\t\t}\n\n\t\t\t\tconst name = moduleName + \".\" + evalNode.name.getText();\n\n\t\t\t\tif (name.length > 45) {\n\t\t\t\t\tthrow new Error(`Package name length >45 '${name}'`);\n\t\t\t\t}\n\n\t\t\t\tconst parameterDeclaration = getParameterDeclaration(evalNode);\n\n\t\t\t\tconst parametersType =\n\t\t\t\t\tparameterDeclaration === undefined\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: typeChecker.getTypeAtLocation(parameterDeclaration);\n\n\t\t\t\tif (parametersType === undefined) {\n\t\t\t\t\tconsole.log(\n\t\t\t\t\t\t`Failed to find parameters type declaration for evaluator ${evalNode.name.getText()}. Skipping parameter list generation`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst existingIndexEntry = existingIndex.find(\n\t\t\t\t\t(entry) => entry.Name === name,\n\t\t\t\t);\n\n\t\t\t\tconst obj: CreatorIndexEntry = {\n\t\t\t\t\tName: name,\n\t\t\t\t\tDescription: existingIndexEntry?.Description,\n\t\t\t\t\tType: \"Evaluator\",\n\t\t\t\t\tParameters: [],\n\t\t\t\t};\n\n\t\t\t\tconst rawDocTags = ts.getJSDocTags(evalNode);\n\n\t\t\t\tconst dict = getTagDict(rawDocTags);\n\t\t\t\tif (dict.summary) {\n\t\t\t\t\tobj.Description = dict.summary;\n\t\t\t\t} else {\n\t\t\t\t\tconst comment = typeChecker\n\t\t\t\t\t\t.getTypeAtLocation(evalNode)\n\t\t\t\t\t\t.symbol.getDocumentationComment(typeChecker)\n\t\t\t\t\t\t.map((comment) => comment.text)\n\t\t\t\t\t\t.join(\" \");\n\n\t\t\t\t\tif (comment) {\n\t\t\t\t\t\tobj.Description = comment;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (dict.creatorType) {\n\t\t\t\t\tobj.Type = dict.creatorType as \"Interactor\" | \"Evaluator\";\n\t\t\t\t}\n\n\t\t\t\tif (parametersType !== undefined) {\n\t\t\t\t\tobj.Parameters = genParameters(\n\t\t\t\t\t\ttypeChecker.getPropertiesOfType(parametersType),\n\t\t\t\t\t);\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tobj.Parameters.length === 0 &&\n\t\t\t\t\t\tparametersType.getStringIndexType() !== undefined\n\t\t\t\t\t) {\n\t\t\t\t\t\tobj.Parameters = existingIndexEntry?.Parameters ?? [];\n\t\t\t\t\t}\n\t\t\t\t} else if (existingIndexEntry !== undefined) {\n\t\t\t\t\tobj.Parameters = existingIndexEntry.Parameters;\n\t\t\t\t}\n\n\t\t\t\tarr.push(obj);\n\t\t\t}\n\t\t});\n\t});\n\n\twritePackageCreatorIndex(location, arr);\n}\n"],"names":["capitalizeFirstLetter","string","charAt","toUpperCase","slice","parseDefault","value","type","uType","parseFloat","parseInt","replace","findEvaluatorNodes","node","body","ts","isModuleDeclaration","undefined","evaluators","forEachChild","child","_child$heritageClause","isClassDeclaration","isEvaluator","heritageClauses","some","clause","token","SyntaxKind","ExtendsKeyword","ImplementsKeyword","types","getText","includes","push","getParameterDeclaration","evaluatorNode","_evaluatorNode$member","memb","members","find","member","_member$name","name","isMethodDeclaration","parameters","getModuleName","sourceFile","fullName","packageB","genParameters","properties","map","symbol","i","_symbol$getDeclaratio","parameter","Name","Description","Type","Default","DisplayIndex","length","Error","declaration","getDeclarations","documentationComment","getDocumentationComment","checkLinksSymbol","links","syntheticOrigin","_links$syntheticOrigi","_links$syntheticOrigi2","rawDocTags","getJSDocTags","dict","getTagDict","summary","comment","text","join","creatorType","default","tags","tag","tagName","extract","location","ignore","files","getPackageTypescriptFiles","filtered","filter","path","suffix","endsWith","arr","existingIndex","readPackageCreatorIndex","program","createProgram","allowJs","typeChecker","getTypeChecker","forEach","file","getSourceFile","evalNode","moduleName","parameterDeclaration","parametersType","getTypeAtLocation","console","log","existingIndexEntry","entry","obj","Parameters","getPropertiesOfType","getStringIndexType","writePackageCreatorIndex"],"mappings":";;;;;;;;;;;;;;;;;;AAcA,SAASA,qBAAqBA,CAACC,MAAc,EAAE;EAC9C,OAAO,CAAAA,MAAM,KAAA,IAAA,IAANA,MAAM,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAANA,MAAM,CAAEC,MAAM,CAAC,CAAC,CAAC,CAACC,WAAW,EAAE,KAAGF,MAAM,KAAA,IAAA,IAANA,MAAM,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAANA,MAAM,CAAEG,KAAK,CAAC,CAAC,CAAC,CAAA,CAAA;AAC1D,CAAA;AAEA,SAASC,YAAYA,CAACC,KAAa,EAAEC,IAAY,EAAE;AAClD,EAAA,MAAMC,KAAgC,GAAGR,qBAAqB,CAC7DO,IAAI,CACyB,CAAA;A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S,EAAE;AAC5CmG,UAAAA,GAAG,CAACC,UAAU,GAAGH,kBAAkB,CAACG,UAAU,CAAA;AAC/C,SAAA;AAEArB,QAAAA,GAAG,CAAC9D,IAAI,CAACkF,GAAG,CAAC,CAAA;AACd,OAAA;AACD,KAAC,CAAC,CAAA;AACH,GAAC,CAAC,CAAA;AAEFI,EAAAA,wBAAwB,CAACjC,QAAQ,EAAES,GAAG,CAAC,CAAA;AACxC;;;;"}
@@ -1,12 +1,150 @@
1
1
  import * as path from 'path';
2
2
  import * as fs from 'fs';
3
3
  import * as terser from 'terser';
4
- import { logPackageMessage } from '../../lib/log.mjs';
5
- import { build } from './tsc.mjs';
6
- import { generateDocs } from './docs.mjs';
7
- import { readPackageCreatorManifest, readPackageNpmManifest } from '../../lib/package.mjs';
8
- import { getPackageTypescriptFiles } from '../../lib/scripts.mjs';
9
- import { toposort } from '../../lib/toposort.mjs';
4
+ import 'resolve';
5
+ import 'write-pkg';
6
+ import { h as getPackageTypescriptFiles, r as readPackageCreatorManifest, n as readPackageNpmManifest } from './cli-2c3347fd.js';
7
+ import 'node:path';
8
+ import 'node:fs';
9
+ import 'axios';
10
+ import ts from 'typescript';
11
+ import typedoc from 'typedoc';
12
+ import glob from 'glob';
13
+
14
+ const logPackageMessage = (name, step, index, total) => {
15
+ const numLength = total === undefined ? undefined : total.toString().length;
16
+ const indexString = total === undefined || total < 2 ? "" : `${index.toString().padStart(numLength, "0")}/${total} `;
17
+ const identifierString = `${indexString}${name.padEnd(15)}`;
18
+ console.log(`${identifierString} >> ${step}`);
19
+ };
20
+
21
+ const tryReadTsConfig = location => {
22
+ const {
23
+ config
24
+ } = ts.readConfigFile(path.join(location.scriptsDir, "tsconfig.json"), path => {
25
+ try {
26
+ return fs.readFileSync(path, "utf8");
27
+ } catch {
28
+ return undefined;
29
+ }
30
+ });
31
+ return config;
32
+ };
33
+ const build = async (location, outputDir) => {
34
+ const config = tryReadTsConfig(location);
35
+ config.compilerOptions.lib = ["es5", "dom"];
36
+ const result = ts.convertCompilerOptionsFromJson(config.compilerOptions, location.scriptsDir);
37
+ const compilerOptions = {
38
+ ...result.options,
39
+ removeComments: false,
40
+ declaration: true,
41
+ sourceMap: false,
42
+ // We don't use tsc to actually emit the files, but we still need to set the correct
43
+ // output directory so the compiler can rewrite the `reference path` directives.
44
+ outFile: path.join(outputDir, "out.js"),
45
+ target: ts.ScriptTarget.ES5,
46
+ noEmitOnError: true
47
+ };
48
+ const host = ts.createCompilerHost(compilerOptions);
49
+ host.getCurrentDirectory = () => location.scriptsDir;
50
+ let js;
51
+ let definitions;
52
+ host.writeFile = (fileName, data, writeByteOrderMark) => {
53
+ if (fileName.endsWith(".js")) {
54
+ js = data;
55
+ } else if (fileName.endsWith(".d.ts")) {
56
+ definitions = data;
57
+ }
58
+ };
59
+ const files = getPackageTypescriptFiles(location);
60
+ if (files.length === 0) {
61
+ throw new Error(`Expected typescript files to exist when building a package. Packages only consisting of animation jsons do not need to be built.`);
62
+ }
63
+ const programOptions = {
64
+ rootNames: files,
65
+ options: compilerOptions,
66
+ host
67
+ };
68
+ const program = ts.createProgram(programOptions);
69
+ const emitResult = program.emit();
70
+ const allDiagnostics = ts.getPreEmitDiagnostics(program);
71
+ if (!emitResult.emitSkipped) {
72
+ if (allDiagnostics.length > 0) {
73
+ console.log(allDiagnostics.map(createErrorMessage).join("\n"));
74
+ }
75
+ if (js === undefined || definitions === undefined) {
76
+ throw new Error(`Unexpected: no js or definitions were created`);
77
+ }
78
+ return {
79
+ js,
80
+ definitions
81
+ };
82
+ }
83
+ const error = allDiagnostics.map(createErrorMessage).join("\n");
84
+ throw new Error(error);
85
+ };
86
+ const createErrorMessage = diagnostic => {
87
+ if (!diagnostic.file) {
88
+ return `${ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n")}`;
89
+ }
90
+ const {
91
+ line,
92
+ character
93
+ } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
94
+ const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
95
+ return `${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`;
96
+ };
97
+
98
+ const generateDocs = async (location, declarationFile, outFolder, name) => {
99
+ const app = new typedoc.Application();
100
+ const mediaDir = path.join(location.manifestDir, "Media");
101
+ app.bootstrap({
102
+ entryPoints: [declarationFile],
103
+ media: mediaDir,
104
+ out: outFolder,
105
+ tsconfig: path.join(location.scriptsDir, "tsconfig.json"),
106
+ skipErrorChecking: true
107
+ });
108
+ app.options.setCompilerOptions([declarationFile], {
109
+ target: ts.ScriptTarget.ES5
110
+ }, undefined);
111
+ app.options.setValue("name", name);
112
+ const [readmePath] = glob.sync("**/readme.md", {
113
+ absolute: true,
114
+ cwd: location.manifestDir
115
+ });
116
+ if (readmePath) {
117
+ app.options.setValue("readme", readmePath);
118
+ }
119
+ const project = app.convert();
120
+ if (project) {
121
+ await app.generateDocs(project, outFolder);
122
+ }
123
+ };
124
+
125
+ // Stolen from ig.tools.core
126
+
127
+ const toposort = packages => {
128
+ const queue = Object.getOwnPropertyNames(packages);
129
+ const result = [];
130
+ let index = 0;
131
+ while (queue.length > 0) {
132
+ if (index >= queue.length) {
133
+ throw new Error("Packages can not have cyclic dependencies");
134
+ }
135
+ const queueEntry = queue[index];
136
+ const dependencies = packages[queueEntry];
137
+ const dependencyQueued = dependencies.some(dependency => queue.includes(dependency));
138
+ if (dependencyQueued) {
139
+ index++;
140
+ continue;
141
+ }
142
+ queue.splice(index, 1);
143
+ index = 0;
144
+ result.push(queueEntry);
145
+ }
146
+ return result;
147
+ };
10
148
 
11
149
  const buildFolders = async options => {
12
150
  if (options.outDir !== undefined && options.clean) {
@@ -161,5 +299,10 @@ ${bannerText}
161
299
  return undefined;
162
300
  };
163
301
 
164
- export { buildFolders };
165
- //# sourceMappingURL=index.mjs.map
302
+ var index = /*#__PURE__*/Object.freeze({
303
+ __proto__: null,
304
+ buildFolders: buildFolders
305
+ });
306
+
307
+ export { buildFolders as b, index as i, logPackageMessage as l };
308
+ //# sourceMappingURL=index-01b0ddab.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-01b0ddab.js","sources":["../../tools.core/build/log.mjs","../src/commands/build/tsc.ts","../src/commands/build/docs.ts","../src/lib/toposort.ts","../src/commands/build/index.ts"],"sourcesContent":["const logPackageMessage = (name, step, index, total) => {\n const numLength = total === undefined ? undefined : total.toString().length;\n const indexString = total === undefined || total < 2 ? \"\" : `${index.toString().padStart(numLength, \"0\")}/${total} `;\n const identifierString = `${indexString}${name.padEnd(15)}`;\n console.log(`${identifierString} >> ${step}`);\n};\n\nexport { logPackageMessage };\n//# sourceMappingURL=log.mjs.map\n","import ts from \"typescript\";\nimport * as path from \"path\";\nimport * as fs from \"fs\";\n\nimport { PackageLocation } from \"../../lib/package\";\n\nimport { FolderBuilder } from \".\";\nimport { getPackageTypescriptFiles } from \"../../lib/scripts\";\n\nexport const tryReadTsConfig = (location: PackageLocation) => {\n\tconst { config } = ts.readConfigFile(\n\t\tpath.join(location.scriptsDir, \"tsconfig.json\"),\n\t\t(path) => {\n\t\t\ttry {\n\t\t\t\treturn fs.readFileSync(path, \"utf8\");\n\t\t\t} catch {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t},\n\t);\n\n\treturn config as {\n\t\tcompilerOptions: ts.CompilerOptions;\n\t};\n};\n\nexport const build: FolderBuilder = async (\n\tlocation: PackageLocation,\n\toutputDir: string,\n) => {\n\tconst config = tryReadTsConfig(location);\n\n\tconfig.compilerOptions.lib = [\"es5\", \"dom\"];\n\n\tconst result = ts.convertCompilerOptionsFromJson(\n\t\tconfig.compilerOptions,\n\t\tlocation.scriptsDir,\n\t);\n\n\tconst compilerOptions: ts.CompilerOptions = {\n\t\t...result.options,\n\t\tremoveComments: false,\n\t\tdeclaration: true,\n\t\tsourceMap: false,\n\t\t// We don't use tsc to actually emit the files, but we still need to set the correct\n\t\t// output directory so the compiler can rewrite the `reference path` directives.\n\t\toutFile: path.join(outputDir, \"out.js\"),\n\t\ttarget: ts.ScriptTarget.ES5,\n\t\tnoEmitOnError: true,\n\t};\n\n\tconst host = ts.createCompilerHost(compilerOptions);\n\thost.getCurrentDirectory = () => location.scriptsDir;\n\n\tlet js: string | undefined;\n\tlet definitions: string | undefined;\n\n\thost.writeFile = (fileName, data, writeByteOrderMark) => {\n\t\tif (fileName.endsWith(\".js\")) {\n\t\t\tjs = data;\n\t\t} else if (fileName.endsWith(\".d.ts\")) {\n\t\t\tdefinitions = data;\n\t\t}\n\t};\n\n\tconst files = getPackageTypescriptFiles(location);\n\n\tif (files.length === 0) {\n\t\tthrow new Error(\n\t\t\t`Expected typescript files to exist when building a package. Packages only consisting of animation jsons do not need to be built.`,\n\t\t);\n\t}\n\n\tconst programOptions: ts.CreateProgramOptions = {\n\t\trootNames: files,\n\t\toptions: compilerOptions,\n\t\thost,\n\t};\n\n\tconst program = ts.createProgram(programOptions);\n\tconst emitResult = program.emit();\n\tconst allDiagnostics = ts.getPreEmitDiagnostics(program);\n\n\tif (!emitResult.emitSkipped) {\n\t\tif (allDiagnostics.length > 0) {\n\t\t\tconsole.log(allDiagnostics.map(createErrorMessage).join(\"\\n\"));\n\t\t}\n\n\t\tif (js === undefined || definitions === undefined) {\n\t\t\tthrow new Error(`Unexpected: no js or definitions were created`);\n\t\t}\n\n\t\treturn { js, definitions };\n\t}\n\n\tconst error = allDiagnostics.map(createErrorMessage).join(\"\\n\");\n\n\tthrow new Error(error);\n};\n\nconst createErrorMessage = (diagnostic: ts.Diagnostic) => {\n\tif (!diagnostic.file) {\n\t\treturn `${ts.flattenDiagnosticMessageText(\n\t\t\tdiagnostic.messageText,\n\t\t\t\"\\n\",\n\t\t)}`;\n\t}\n\n\tconst { line, character } = diagnostic.file.getLineAndCharacterOfPosition(\n\t\tdiagnostic.start!,\n\t);\n\n\tconst message = ts.flattenDiagnosticMessageText(\n\t\tdiagnostic.messageText,\n\t\t\"\\n\",\n\t);\n\n\treturn `${diagnostic.file.fileName} (${line + 1},${\n\t\tcharacter + 1\n\t}): ${message}`;\n};\n","import typedoc from \"typedoc\";\nimport glob from \"glob\";\nimport ts from \"typescript\";\nimport * as path from \"path\";\nimport { PackageLocation } from \"../../lib/package\";\n\nexport const generateDocs = async (\n\tlocation: PackageLocation,\n\tdeclarationFile: string,\n\toutFolder: string,\n\tname: string,\n) => {\n\tconst app = new typedoc.Application();\n\n\tconst mediaDir = path.join(location.manifestDir, \"Media\");\n\n\tapp.bootstrap({\n\t\tentryPoints: [declarationFile],\n\t\tmedia: mediaDir,\n\t\tout: outFolder,\n\t\ttsconfig: path.join(location.scriptsDir, \"tsconfig.json\"),\n\t\tskipErrorChecking: true,\n\t});\n\n\tapp.options.setCompilerOptions(\n\t\t[declarationFile],\n\t\t{\n\t\t\ttarget: ts.ScriptTarget.ES5,\n\t\t},\n\t\tundefined,\n\t);\n\n\tapp.options.setValue(\"name\", name);\n\n\tconst [readmePath] = glob.sync(\"**/readme.md\", {\n\t\tabsolute: true,\n\t\tcwd: location.manifestDir,\n\t});\n\n\tif (readmePath) {\n\t\tapp.options.setValue(\"readme\", readmePath);\n\t}\n\n\tconst project = app.convert();\n\n\tif (project) {\n\t\tawait app.generateDocs(project, outFolder);\n\t}\n};\n","// Stolen from ig.tools.core\n\nexport const toposort = (packages: Record<string, string[]>) => {\n\tconst queue = Object.getOwnPropertyNames(packages);\n\tconst result: string[] = [];\n\n\tlet index = 0;\n\n\twhile (queue.length > 0) {\n\t\tif (index >= queue.length) {\n\t\t\tthrow new Error(\"Packages can not have cyclic dependencies\");\n\t\t}\n\n\t\tconst queueEntry = queue[index];\n\n\t\tconst dependencies = packages[queueEntry];\n\t\tconst dependencyQueued = dependencies.some((dependency) =>\n\t\t\tqueue.includes(dependency),\n\t\t);\n\n\t\tif (dependencyQueued) {\n\t\t\tindex++;\n\t\t\tcontinue;\n\t\t}\n\n\t\tqueue.splice(index, 1);\n\t\tindex = 0;\n\t\tresult.push(queueEntry);\n\t}\n\n\treturn result;\n};\n","import * as path from \"path\";\nimport * as fs from \"fs\";\nimport * as terser from \"terser\";\n\nimport { logPackageMessage } from \"../../lib/log\";\nimport { build as tscBuild } from \"./tsc\";\nimport { generateDocs } from \"./docs\";\nimport {\n\tPackageLocation,\n\treadPackageCreatorManifest,\n\treadPackageNpmManifest,\n} from \"../../lib/package\";\nimport { WorkspaceLocation } from \"../../lib/workspace\";\nimport { getPackageTypescriptFiles } from \"../../lib/scripts\";\nimport { toposort } from \"../../lib/toposort\";\nimport { PackageJSON } from \"../../lib/packageJSON\";\n\nexport interface BannerOptions {\n\ttext: string | undefined;\n\tversion: string | undefined;\n\tcommit: string | undefined;\n\tcommitDirty: boolean | undefined;\n\tdate: Date | undefined;\n}\n\nexport interface BuildFoldersOptions {\n\tworkspace: WorkspaceLocation;\n\tpackages: PackageLocation[];\n\toutDir?: string;\n\tminimize: boolean;\n\tbanner?: BannerOptions;\n\tclean?: boolean;\n\tdocs?: boolean;\n\tskipPackagesWithoutTsFiles?: boolean;\n}\n\nexport interface BuildFolderOptions extends BuildFoldersOptions {\n\toutFile: string;\n}\n\nexport interface FolderBuilderResult {\n\tjs: string;\n\tdefinitions: string;\n}\n\nexport type FolderBuilder = (\n\tlocation: PackageLocation,\n\toutputDir: string,\n) => Promise<FolderBuilderResult>;\n\ntype FolderData = {\n\tlocation: PackageLocation;\n\tdata?: PackageJSON;\n};\n\nexport const buildFolders = async (options: BuildFoldersOptions) => {\n\tif (options.outDir !== undefined && options.clean) {\n\t\tfs.rmSync(options.outDir, { recursive: true });\n\t}\n\n\tconst workspace = options.workspace;\n\tconst folders = options.packages;\n\n\tconst sortedPackages = sortPackagesByBuildOrder(folders);\n\n\tlet index = 1;\n\n\tfor (const location of sortedPackages) {\n\t\tif (\n\t\t\toptions.skipPackagesWithoutTsFiles &&\n\t\t\tgetPackageTypescriptFiles(location).length === 0\n\t\t) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tensureTsConfig(location);\n\n\t\tconst data = readPackageCreatorManifest(location);\n\n\t\tconst logStep = (step: string) =>\n\t\t\tlogPackageMessage(data.Package, step, index, folders.length);\n\n\t\tlogStep(\"Compiling typescript to javascript\");\n\n\t\tconst outputDirectory = options.outDir || location.scriptsDir;\n\t\tfs.mkdirSync(outputDirectory, { recursive: true });\n\n\t\tconst buildResult = await tscBuild(location, outputDirectory);\n\t\tconst banner = options.banner\n\t\t\t? createBannerComment(options.banner)\n\t\t\t: undefined;\n\n\t\tif (banner) {\n\t\t\tbuildResult.js = banner + \"\\n\" + buildResult.js;\n\t\t\tbuildResult.definitions = banner + \"\\n\" + buildResult.definitions;\n\t\t}\n\n\t\tfs.writeFileSync(\n\t\t\tpath.join(outputDirectory, `${data.Package}.js`),\n\t\t\tbuildResult.js,\n\t\t\t{ encoding: \"utf8\" },\n\t\t);\n\t\tfs.writeFileSync(\n\t\t\tpath.join(outputDirectory, `${data.Package}.d.ts`),\n\t\t\tbuildResult.definitions,\n\t\t\t{ encoding: \"utf8\" },\n\t\t);\n\n\t\tif (options.minimize) {\n\t\t\tconst minifyResult = await terser.minify(buildResult.js, {\n\t\t\t\tecma: 5,\n\t\t\t});\n\n\t\t\tconst minifiedPath = path.join(\n\t\t\t\toutputDirectory,\n\t\t\t\t`${data.Package}.min.js`,\n\t\t\t);\n\t\t\tfs.writeFileSync(minifiedPath, minifyResult.code!, {\n\t\t\t\tencoding: \"utf8\",\n\t\t\t});\n\t\t}\n\n\t\tif (location.path.includes(\"Basics\")) {\n\t\t\tfs.mkdirSync(path.join(workspace.path, \"lib\"), {\n\t\t\t\trecursive: true,\n\t\t\t});\n\n\t\t\tlogStep(\"Copying basics definition file to the lib folder\");\n\t\t\tfs.writeFileSync(\n\t\t\t\tpath.join(workspace.path, \"lib\", `${data.Package}.d.ts`),\n\t\t\t\tbuildResult.definitions,\n\t\t\t\t{ encoding: \"utf8\" },\n\t\t\t);\n\t\t}\n\n\t\tif (options.docs) {\n\t\t\tlogStep(\"Generating typedoc documentation\");\n\t\t\tawait generateDocs(\n\t\t\t\tlocation,\n\t\t\t\tpath.join(outputDirectory, `${data.Package}.d.ts`),\n\t\t\t\tpath.join(workspace.path, \"docs\", data.Package),\n\t\t\t\tdata.Package,\n\t\t\t);\n\t\t}\n\n\t\tindex++;\n\t}\n};\n\nconst ensureTsConfig = (location: PackageLocation) => {\n\tconst tsconfigPath = path.join(location.scriptsDir, \"tsconfig.json\");\n\n\tif (!fs.existsSync(tsconfigPath)) {\n\t\tconst content = {};\n\t\tapplyTsConfigOption(content);\n\n\t\tfs.writeFileSync(\n\t\t\ttsconfigPath,\n\t\t\tJSON.stringify(content, undefined, \"\\t\"),\n\t\t\t\"utf8\",\n\t\t);\n\t} else {\n\t\tconst content = JSON.parse(fs.readFileSync(tsconfigPath, \"utf8\"));\n\t\tapplyTsConfigOption(content);\n\t\tfs.writeFileSync(\n\t\t\ttsconfigPath,\n\t\t\tJSON.stringify(content, undefined, \"\\t\"),\n\t\t\t\"utf8\",\n\t\t);\n\t}\n};\n\nconst applyTsConfigOption = (data: {\n\tcompilerOptions?: { target?: string; lib?: string[] };\n}) => {\n\tdata.compilerOptions = data.compilerOptions ?? {};\n\tdata.compilerOptions.target = \"es5\";\n\tdata.compilerOptions.lib = [\"es5\", \"dom\"];\n};\n\nconst sortPackagesByBuildOrder = (\n\tfolders: PackageLocation[],\n): PackageLocation[] => {\n\tconst packages = Array.from(folders).reduce(\n\t\t(\n\t\t\tacc: Record<string, FolderData>,\n\t\t\tlocation,\n\t\t): Record<string, FolderData> => {\n\t\t\tconst data = readPackageNpmManifest(location);\n\n\t\t\tif (data !== undefined) {\n\t\t\t\tacc[data.name] = {\n\t\t\t\t\tdata,\n\t\t\t\t\tlocation,\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tacc[location.path] = {\n\t\t\t\t\tdata: undefined,\n\t\t\t\t\tlocation,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn acc;\n\t\t},\n\t\t{},\n\t);\n\n\tconst packageDependencies = Object.getOwnPropertyNames(packages).reduce(\n\t\t(acc, packageName) => {\n\t\t\tconst packageData = packages[packageName];\n\n\t\t\tif (packageData.data === undefined) {\n\t\t\t\tacc[packageName] = [];\n\t\t\t} else {\n\t\t\t\tacc[packageName] = Object.getOwnPropertyNames({\n\t\t\t\t\t...packageData.data.devDependencies,\n\t\t\t\t\t...packageData.data.dependencies,\n\t\t\t\t\t...packageData.data.peerDependencies,\n\t\t\t\t}).filter((packageName) => packages[packageName] !== undefined);\n\t\t\t}\n\n\t\t\treturn acc;\n\t\t},\n\t\t{},\n\t);\n\n\tconst sortedPackages = toposort(packageDependencies);\n\tconst result: PackageLocation[] = [];\n\n\tfor (const packageName of sortedPackages) {\n\t\tconst location = packages[packageName].location;\n\n\t\tif (readPackageCreatorManifest(location).Package.endsWith(\".Basics\")) {\n\t\t\tresult.unshift(location);\n\t\t} else {\n\t\t\tresult.push(location);\n\t\t}\n\t}\n\n\treturn result;\n};\n\nconst createBannerComment = (banner: BannerOptions) => {\n\tconst bannerParts: string[] = [];\n\n\tif (banner.text) {\n\t\tbannerParts.push(\" * \" + banner.text);\n\t}\n\n\t{\n\t\tconst details: string[] = [];\n\n\t\tif (banner.version) {\n\t\t\tdetails.push(`Version: ${banner.version}`);\n\t\t}\n\t\tif (banner.commit) {\n\t\t\tif (banner.commitDirty) {\n\t\t\t\tdetails.push(`Commit: ${banner.commit} (dirty)`);\n\t\t\t} else {\n\t\t\t\tdetails.push(`Commit: ${banner.commit}`);\n\t\t\t}\n\t\t}\n\t\tif (banner.date) {\n\t\t\tdetails.push(`Date: ${banner.date.toISOString()}`);\n\t\t}\n\n\t\tconst detailsText = details.map((line) => ` * ${line}`).join(\"\\n\");\n\t\tif (detailsText) {\n\t\t\tbannerParts.push(detailsText);\n\t\t}\n\t}\n\n\tconst bannerText = bannerParts.join(\"\\n\\n\");\n\n\tif (bannerText) {\n\t\treturn `/*\n${bannerText}\n*\n* @preserve\t\t\t\n*/`;\n\t}\n\n\treturn undefined;\n};\n"],"names":["logPackageMessage","name","step","index","total","numLength","undefined","toString","length","indexString","padStart","identifierString","padEnd","console","log","tryReadTsConfig","location","config","ts","readConfigFile","path","join","scriptsDir","fs","readFileSync","build","outputDir","compilerOptions","lib","result","convertCompilerOptionsFromJson","options","removeComments","declaration","sourceMap","outFile","target","ScriptTarget","ES5","noEmitOnError","host","createCompilerHost","getCurrentDirectory","js","definitions","writeFile","fileName","data","writeByteOrderMark","endsWith","files","getPackageTypescriptFiles","Error","programOptions","rootNames","program","createProgram","emitResult","emit","allDiagnostics","getPreEmitDiagnostics","emitSkipped","map","createErrorMessage","error","diagnostic","file","flattenDiagnosticMessageText","messageText","line","character","getLineAndCharacterOfPosition","start","message","generateDocs","declarationFile","outFolder","app","typedoc","Application","mediaDir","manifestDir","bootstrap","entryPoints","media","out","tsconfig","skipErrorChecking","setCompilerOptions","setValue","readmePath","glob","sync","absolute","cwd","project","convert","toposort","packages","queue","Object","getOwnPropertyNames","queueEntry","dependencies","dependencyQueued","some","dependency","includes","splice","push","buildFolders","outDir","clean","rmSync","recursive","workspace","folders","sortedPackages","sortPackagesByBuildOrder","skipPackagesWithoutTsFiles","ensureTsConfig","readPackageCreatorManifest","logStep","Package","outputDirectory","mkdirSync","buildResult","tscBuild","banner","createBannerComment","writeFileSync","encoding","minimize","minifyResult","terser","minify","ecma","minifiedPath","code","docs","tsconfigPath","existsSync","content","applyTsConfigOption","JSON","stringify","parse","Array","from","reduce","acc","readPackageNpmManifest","packageDependencies","packageName","packageData","devDependencies","peerDependencies","filter","unshift","bannerParts","text","details","version","commit","commitDirty","date","toISOString","detailsText","bannerText"],"mappings":";;;;;;;;;;;;;AAAaA,MAAAA,iBAAiB,GAAGA,CAChCC,IAAY,EACZC,IAAY,EACZC,KAAc,EACdC,KAAc,KACV;AACJ,EAAA,MAAMC,SAAS,GAAGD,KAAK,KAAKE,SAAS,GAAGA,SAAS,GAAGF,KAAK,CAACG,QAAQ,EAAE,CAACC,MAAM,CAAA;EAE3E,MAAMC,WAAW,GAChBL,KAAK,KAAKE,SAAS,IAAIF,KAA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