@intelligentgraphics/ig.gfx.packager 3.1.0-alpha.3 → 3.1.0-alpha.4
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/build/bin.mjs +1 -1
- package/build/{cli-DANmLXRa.mjs → cli-DLGFANVF.mjs} +7 -7
- package/build/{cli-DANmLXRa.mjs.map → cli-DLGFANVF.mjs.map} +1 -1
- package/build/{dependencies-DusLuN7Y.mjs → dependencies-M5HDPf46.mjs} +2 -2
- package/build/{dependencies-DusLuN7Y.mjs.map → dependencies-M5HDPf46.mjs.map} +1 -1
- package/build/{generateIndex-DWjOe92Q.mjs → generateIndex-DRNwzIyR.mjs} +3 -3
- package/build/{generateIndex-DWjOe92Q.mjs.map → generateIndex-DRNwzIyR.mjs.map} +1 -1
- package/build/{generateParameterType-BQ1F7eAV.mjs → generateParameterType-9-1z1US9.mjs} +2 -2
- package/build/{generateParameterType-BQ1F7eAV.mjs.map → generateParameterType-9-1z1US9.mjs.map} +1 -1
- package/build/{index-CqUHGUfc.mjs → index-8OmlN_-6.mjs} +5 -5
- package/build/{index-CqUHGUfc.mjs.map → index-8OmlN_-6.mjs.map} +1 -1
- package/build/{index-BEREgVJP.mjs → index-DV88vk2r.mjs} +6 -6
- package/build/{index-BEREgVJP.mjs.map → index-DV88vk2r.mjs.map} +1 -1
- package/build/{postinstall-Da3ZBnje.mjs → postinstall-DleNm8LR.mjs} +3 -3
- package/build/{postinstall-Da3ZBnje.mjs.map → postinstall-DleNm8LR.mjs.map} +1 -1
- package/build/{publishNpm-B6bEiSNV.mjs → publishNpm-BecgvGe3.mjs} +5 -5
- package/build/{publishNpm-B6bEiSNV.mjs.map → publishNpm-BecgvGe3.mjs.map} +1 -1
- package/build/{rollup-BEli071h.mjs → rollup-DXNQ8zID.mjs} +9 -4
- package/build/rollup-DXNQ8zID.mjs.map +1 -0
- package/build/{scripts-DI0Xj5Yb.mjs → scripts-DOxdNSgU.mjs} +2 -2
- package/build/{scripts-DI0Xj5Yb.mjs.map → scripts-DOxdNSgU.mjs.map} +1 -1
- package/build/{versionFile-tyKtTvcM.mjs → versionFile-LnFvSbd9.mjs} +3 -3
- package/build/{versionFile-tyKtTvcM.mjs.map → versionFile-LnFvSbd9.mjs.map} +1 -1
- package/lib/lib.mjs +2 -2
- package/package.json +2 -2
- package/readme.md +4 -0
- package/build/rollup-BEli071h.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependencies-
|
|
1
|
+
{"version":3,"file":"dependencies-M5HDPf46.mjs","sources":["../../tools.core/build/publishedPackage.mjs","../../tools.core/build/dependencies.mjs"],"sourcesContent":["import * as path from 'path';\nimport * as fs from 'fs';\nimport resolve from 'resolve';\nimport { readNpmManifest } from './npmPackage.mjs';\nimport { PACKAGE_FILE, INDEX_FILE } from './package.mjs';\nimport { isErrorENOENT } from './error.mjs';\nimport { stripUtf8Bom } from './stripUtf8Bom.mjs';\n\n/**\n * Detects a published package from a path.\n *\n * Can return undefined if the package is not installed.\n *\n * @param {string} resolveBasePath\n * @param {string} name\n * @return {*} {(PublishedPackageLocation | undefined)}\n */ const detectPublishedPackageFromPath = (resolveBasePath, name)=>{\n try {\n const manifestPath = resolve.sync(name + \"/package.json\", {\n basedir: resolveBasePath\n });\n const dir = path.dirname(manifestPath);\n return {\n _kind: \"PublishedPackageLocation\",\n path: dir\n };\n } catch (err) {\n return undefined;\n }\n};\nconst readPublishedPackageNpmManifest = (location)=>{\n return readNpmManifest(location.path);\n};\nconst readPublishedPackageCreatorManifest = (location)=>{\n try {\n const packageJsonPath = path.join(location.path, PACKAGE_FILE);\n const packageJson = stripUtf8Bom(fs.readFileSync(packageJsonPath, {\n encoding: \"utf8\"\n }));\n return JSON.parse(packageJson);\n } catch (err) {\n if (isErrorENOENT(err)) {\n return undefined;\n }\n throw err;\n }\n};\nconst getPublishedPackageCreatorIndexPath = (location)=>path.join(location.path, INDEX_FILE);\nconst readPublishedPackageCreatorIndex = (location)=>{\n try {\n const packageJsonPath = path.join(location.path, INDEX_FILE);\n const packageJson = stripUtf8Bom(fs.readFileSync(packageJsonPath, {\n encoding: \"utf8\"\n }));\n const result = JSON.parse(packageJson);\n return result;\n } catch (err) {\n if (isErrorENOENT(err)) {\n return undefined;\n }\n throw err;\n }\n};\n\nexport { detectPublishedPackageFromPath, getPublishedPackageCreatorIndexPath, readPublishedPackageCreatorIndex, readPublishedPackageCreatorManifest, readPublishedPackageNpmManifest };\n//# sourceMappingURL=publishedPackage.mjs.map\n","import { readPublishedPackageNpmManifest, detectPublishedPackageFromPath } from './publishedPackage.mjs';\nimport { readWorkspaceNpmManifest } from './workspace.mjs';\n\n// /**\n// * Determines the implicit dependencies of a an actual data workspace package.\n// *\n// * An implicit dependency is a dependency that is installed for the workspace and has the same runtime environment (evaluator, interactor) as the package.\n// *\n// * @param {WorkspaceLocation} workspace\n// * @param {CreatorPackage} creatorPackage\n// * @returns {PublishedPackageLocation[]}\n// */\n// export const determinePackageImplicitDependencies = (\n// \tworkspace: WorkspaceLocation,\n// \tcreatorPackage: CreatorPackage,\n// ): PublishedPackageLocation[] => {\n// \tconst libraries = determineWorkspaceIGLibraries(workspace);\n// \tconst results: PublishedPackageLocation[] = [];\n// \tfor (const librarylocation of libraries) {\n// \t\tconst libraryManifest =\n// \t\t\treadPublishedPackageCreatorManifest(librarylocation);\n// \t\tif (\n// \t\t\tlibraryManifest !== undefined &&\n// \t\t\t(libraryManifest.Type === \"Mixed\" ||\n// \t\t\t\tlibraryManifest.RunTime === creatorPackage.RunTime)\n// \t\t) {\n// \t\t\tresults.push(librarylocation);\n// \t\t}\n// \t}\n// \treturn results;\n// };\n/**\n * Recursively determines all installed ig libraries for a workspace.\n *\n * @param {WorkspaceLocation} workspace\n * @returns {PublishedPackageLocation[]}\n */ const determineWorkspaceIGLibraries = (workspace)=>{\n const manifest = readWorkspaceNpmManifest(workspace);\n const libraries = collectIGLibraries(workspace, manifest);\n const results = new Map();\n for (const location of libraries){\n const manifest = readPublishedPackageNpmManifest(location);\n if (!results.has(manifest.name)) {\n results.set(manifest.name, location);\n }\n }\n return Array.from(results.values());\n};\nconst collectIGLibraries = (workspace, manifest)=>{\n if (!manifest.dependencies) {\n return [];\n }\n const runtimeDependencies = Object.getOwnPropertyNames(manifest.dependencies);\n const result = [];\n for (const runtimeDependency of runtimeDependencies){\n var _runtimeManifest_ig;\n const location = detectPublishedPackageFromPath(workspace.path, runtimeDependency);\n if (location === undefined) {\n continue;\n }\n const runtimeManifest = readPublishedPackageNpmManifest(location);\n // packages need to explicitly be marked as ig scriptingLibraries\n if ((_runtimeManifest_ig = runtimeManifest.ig) == null ? void 0 : _runtimeManifest_ig.scriptingLibrary) {\n result.push(location);\n result.push(...collectIGLibraries(workspace, runtimeManifest));\n }\n }\n return result;\n};\n\nexport { determineWorkspaceIGLibraries };\n//# sourceMappingURL=dependencies.mjs.map\n"],"names":["detectPublishedPackageFromPath","resolveBasePath","name","manifestPath","resolve","sync","basedir","dir","path","dirname","_kind","err","undefined","readPublishedPackageNpmManifest","location","readNpmManifest","readPublishedPackageCreatorManifest","packageJsonPath","join","PACKAGE_FILE","packageJson","stripUtf8Bom","fs","readFileSync","encoding","JSON","parse","isErrorENOENT","readPublishedPackageCreatorIndex","INDEX_FILE","result","determineWorkspaceIGLibraries","workspace","manifest","readWorkspaceNpmManifest","libraries","collectIGLibraries","results","Map","has","set","Array","from","values","dependencies","runtimeDependencies","Object","getOwnPropertyNames","runtimeDependency","_runtimeManifest_ig","runtimeManifest","ig","scriptingLibrary","push"],"mappings":";;;;;AAQA;;;;;;;;IAQI,MAAMA,8BAAAA,GAAiC,CAACC,eAAAA,EAAiBC,IAAAA,GAAAA;IACzD,IAAI;AACA,QAAA,MAAMC,YAAAA,GAAeC,OAAAA,CAAQC,IAAI,CAACH,OAAO,eAAA,EAAiB;YACtDI,OAAAA,EAASL;AACb,SAAA,CAAA;QACA,MAAMM,GAAAA,GAAMC,IAAAA,CAAKC,OAAO,C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AA;AAChE,QAAA,IAAIlC,aAAaF,SAAAA,EAAW;AACxB,YAAA;AACJ,QAAA;AACA,QAAA,MAAMsC,kBAAkBrC,+BAAAA,CAAgCC,QAAAA,CAAAA;;AAExD,QAAA,IAAI,CAACmC,mBAAAA,GAAsBC,eAAAA,CAAgBC,EAAC,KAAM,IAAA,GAAO,MAAK,GAAIF,mBAAAA,CAAoBG,gBAAgB,EAAE;AACpGtB,YAAAA,MAAAA,CAAOuB,IAAI,CAACvC,QAAAA,CAAAA;YACZgB,MAAAA,CAAOuB,IAAI,CAAA,GAAIjB,kBAAAA,CAAmBJ,SAAAA,EAAWkB,eAAAA,CAAAA,CAAAA;AACjD,QAAA;AACJ,IAAA;IACA,OAAOpB,MAAAA;AACX,CAAA;;;;"}
|
|
@@ -4,8 +4,8 @@ import 'path';
|
|
|
4
4
|
import 'fs';
|
|
5
5
|
import 'resolve';
|
|
6
6
|
import 'write-pkg';
|
|
7
|
-
import { a as readPackageCreatorIndex, r as readPackageCreatorManifest, k as writePackageCreatorIndex } from './cli-
|
|
8
|
-
import { r as readScriptPackageTSConfig, g as getPackageTypescriptFiles, a as resolveScriptPackageEntryModule } from './scripts-
|
|
7
|
+
import { a as readPackageCreatorIndex, r as readPackageCreatorManifest, k as writePackageCreatorIndex } from './cli-DLGFANVF.mjs';
|
|
8
|
+
import { r as readScriptPackageTSConfig, g as getPackageTypescriptFiles, a as resolveScriptPackageEntryModule } from './scripts-DOxdNSgU.mjs';
|
|
9
9
|
import 'node:path';
|
|
10
10
|
import 'node:fs';
|
|
11
11
|
import 'axios';
|
|
@@ -306,4 +306,4 @@ const detectScriptingClass = (node)=>{
|
|
|
306
306
|
};
|
|
307
307
|
|
|
308
308
|
export { generateIndex };
|
|
309
|
-
//# sourceMappingURL=generateIndex-
|
|
309
|
+
//# sourceMappingURL=generateIndex-DRNwzIyR.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateIndex-DWjOe92Q.mjs","sources":["../src/commands/generateIndex.ts"],"sourcesContent":["import ts from \"typescript\";\nimport * as fs from \"fs\";\nimport * as path from \"path\";\n\nimport {\n\tresolveNamespaceFullName,\n\tresolveNamespaces,\n\tNamespace,\n} from \"@intelligentgraphics/declarationbundler\";\n\nimport {\n\tPackageLocation,\n\twritePackageCreatorIndex,\n\treadPackageCreatorIndex,\n\treadPackageCreatorManifest,\n} from \"../lib/package\";\nimport {\n\tgetPackageTypescriptFiles,\n\treadScriptPackageTSConfig,\n\tresolveScriptPackageEntryModule,\n} from \"../lib/scripts\";\nimport {\n\tCreatorIndexEntry,\n\tCreatorIndexParameter,\n\tCreatorIndexParameterType,\n} from \"../lib/package\";\n\nexport interface GenerateIndexOptions {\n\tignore?: string[];\n\tlocation: PackageLocation;\n\n\t/**\n\t * Marks non optional parameter object properties as required in the generated index\n\t *\n\t * @type {boolean}\n\t */\n\tstrictOptional?: boolean;\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 generateIndex({\n\tlocation,\n\tignore = [],\n\tstrictOptional = false,\n}: GenerateIndexOptions) {\n\tconst arr: CreatorIndexEntry[] = [];\n\n\tconst existingIndex = readPackageCreatorIndex(location) ?? [];\n\tconst manifest = readPackageCreatorManifest(location);\n\n\tconst compilerOptions = readScriptPackageTSConfig(location).options;\n\n\tconst isModule =\n\t\tcompilerOptions.module === ts.ModuleKind.ES2015 ||\n\t\tcompilerOptions.module === ts.ModuleKind.ESNext;\n\n\tconst files = getPackageTypescriptFiles(location).filter(\n\t\t(path) => !ignore.some((suffix) => path.endsWith(suffix)),\n\t);\n\n\tlet program: ts.Program;\n\tlet namespaces: Namespace[];\n\n\tif (isModule) {\n\t\tconst entryFilePath = resolveScriptPackageEntryModule(\n\t\t\tlocation,\n\t\t\tmanifest,\n\t\t);\n\n\t\tif (entryFilePath === undefined) {\n\t\t\tthrow new Error(`Could not resolve entry module`);\n\t\t}\n\n\t\tconst host = ts.createCompilerHost({}, true);\n\t\tprogram = ts.createProgram(\n\t\t\t[entryFilePath],\n\t\t\t{ allowJs: true, ...compilerOptions },\n\t\t\thost,\n\t\t);\n\n\t\tconst entryFile = program.getSourceFile(entryFilePath);\n\n\t\tif (entryFile === undefined) {\n\t\t\tthrow new Error(`Failed to find entry module`);\n\t\t}\n\n\t\tnamespaces = resolveNamespaces(\n\t\t\tentryFile,\n\t\t\tprogram,\n\t\t\thost,\n\t\t\tmanifest.Scope ?? manifest.Package,\n\t\t);\n\t} else {\n\t\tprogram = ts.createProgram(files, { allowJs: true });\n\t\tnamespaces = [];\n\t}\n\n\tconst typeChecker = program.getTypeChecker();\n\n\tfiles.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\t\tconst namespace = namespaces.find((namespace) =>\n\t\t\tnamespace.files.includes(sourceFile),\n\t\t);\n\n\t\t// Loop through the root AST nodes of the file\n\n\t\tfor (const scriptingClass of findScriptingClasses(sourceFile)) {\n\t\t\tif (scriptingClass.node.name === undefined) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Expected ${scriptingClass.type} class to have a name`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tlet name: string;\n\n\t\t\tif (isModule && namespace !== undefined) {\n\t\t\t\tconst moduleNamespace = resolveNamespaceFullName(namespace);\n\t\t\t\tname = `${moduleNamespace}.${scriptingClass.node.name.text}`;\n\t\t\t} else {\n\t\t\t\tname = typeChecker.getFullyQualifiedName(\n\t\t\t\t\ttypeChecker.getSymbolAtLocation(scriptingClass.node.name)!,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (name.length > 45) {\n\t\t\t\tthrow new Error(`Package name length >45 '${name}'`);\n\t\t\t}\n\n\t\t\tconst parameterDeclaration =\n\t\t\t\tgetScriptingClassParameterdeclaration(scriptingClass);\n\n\t\t\tconst parametersType =\n\t\t\t\tparameterDeclaration === undefined\n\t\t\t\t\t? undefined\n\t\t\t\t\t: typeChecker.getTypeAtLocation(parameterDeclaration);\n\n\t\t\tif (parametersType === undefined) {\n\t\t\t\tconsole.log(\n\t\t\t\t\t`Failed to find parameters type declaration for ${scriptingClass.type} ${name}. Skipping parameter list generation`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst existingIndexEntry = existingIndex.find(\n\t\t\t\t(entry) => entry.Name === name,\n\t\t\t);\n\n\t\t\tconst obj: CreatorIndexEntry = {\n\t\t\t\tName: name,\n\t\t\t\tDescription: existingIndexEntry?.Description ?? name,\n\t\t\t\tType:\n\t\t\t\t\tscriptingClass.type === \"evaluator\"\n\t\t\t\t\t\t? \"Evaluator\"\n\t\t\t\t\t\t: \"Interactor\",\n\t\t\t\tParameters: [],\n\t\t\t};\n\n\t\t\tconst rawDocTags = ts.getJSDocTags(scriptingClass.node);\n\n\t\t\tconst dict = getTagDict(rawDocTags);\n\t\t\tif (dict.summary) {\n\t\t\t\tobj.Description = dict.summary;\n\t\t\t} else {\n\t\t\t\tconst comment = typeChecker\n\t\t\t\t\t.getTypeAtLocation(scriptingClass.node)\n\t\t\t\t\t.symbol.getDocumentationComment(typeChecker)\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\tobj.Description = comment;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (parametersType !== undefined) {\n\t\t\t\tobj.Parameters = parseParametersList(\n\t\t\t\t\ttypeChecker.getPropertiesOfType(parametersType),\n\t\t\t\t\tstrictOptional,\n\t\t\t\t);\n\n\t\t\t\tif (\n\t\t\t\t\tobj.Parameters.length === 0 &&\n\t\t\t\t\tparametersType.getStringIndexType() !== undefined\n\t\t\t\t) {\n\t\t\t\t\tobj.Parameters = existingIndexEntry?.Parameters ?? [];\n\t\t\t\t}\n\t\t\t} else if (existingIndexEntry !== undefined) {\n\t\t\t\tobj.Parameters = existingIndexEntry.Parameters;\n\t\t\t}\n\n\t\t\tarr.push(obj);\n\t\t}\n\t});\n\n\tarr.sort((a, b) => a.Name.localeCompare(b.Name));\n\n\twritePackageCreatorIndex(location, arr);\n}\n\nfunction capitalizeFirstLetter(string: string) {\n\treturn string?.charAt(0).toUpperCase() + string?.slice(1);\n}\n\nconst 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 parseTypeFromName = (\n\tname: string,\n): CreatorIndexParameterType | undefined => {\n\tconst parts = name.split(\".\");\n\tconst identifier = parts[parts.length - 1];\n\n\tswitch (identifier) {\n\t\tcase \"LengthM\":\n\t\tcase \"ArcDEG\":\n\t\tcase \"Float\":\n\t\tcase \"Integer\":\n\t\t\treturn identifier;\n\t\tcase \"GeometryReference\":\n\t\t\treturn \"Geometry\";\n\t\tcase \"MaterialReference\":\n\t\t\treturn \"Material\";\n\t\tcase \"AnimationReference\":\n\t\t\treturn \"Animation\";\n\t\tcase \"InteractorReference\":\n\t\t\treturn \"Interactor\";\n\t\tcase \"EvaluatorReference\":\n\t\t\treturn \"Evaluator\";\n\t\tcase \"String\":\n\t\tcase \"string\":\n\t\t\treturn \"String\";\n\t\tcase \"number\":\n\t\tcase \"Number\":\n\t\t\treturn \"Float\";\n\t\tcase \"boolean\":\n\t\tcase \"Boolean\":\n\t\t\treturn \"Boolean\";\n\t}\n};\n\nconst parseParametersList = (\n\tproperties: ts.Symbol[],\n\tstrictOptional: boolean,\n): 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 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} else {\n\t\t\t\tconst propertySignature = declaration as ts.PropertySignature;\n\t\t\t\tif (propertySignature.type !== undefined) {\n\t\t\t\t\tconst parsedType = parseTypeFromName(\n\t\t\t\t\t\tpropertySignature.type.getText(),\n\t\t\t\t\t);\n\n\t\t\t\t\tif (parsedType !== undefined) {\n\t\t\t\t\t\tparameter.Type = parsedType;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (dict.default) {\n\t\t\t\tparameter.Default = parseDefault(dict.default, parameter.Type);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tstrictOptional &&\n\t\t\t\tdeclaration.kind === ts.SyntaxKind.PropertySignature\n\t\t\t) {\n\t\t\t\tconst propertySignature = declaration as ts.PropertySignature;\n\t\t\t\tif (propertySignature.questionToken === undefined) {\n\t\t\t\t\tparameter.Required = true;\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\nconst getScriptingClassParameterdeclaration = (\n\tscriptingClass: ScriptingClass,\n) => {\n\tfor (const member of scriptingClass.node.members) {\n\t\tif (ts.isMethodDeclaration(member)) {\n\t\t\tfor (let index = 0; index < member.parameters.length; index++) {\n\t\t\t\tconst parameter = member.parameters[index];\n\t\t\t\tif (\n\t\t\t\t\tisScriptingClassParameterDeclaration(\n\t\t\t\t\t\tscriptingClass,\n\t\t\t\t\t\tmember,\n\t\t\t\t\t\tindex,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\treturn parameter;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (ts.isConstructorDeclaration(member)) {\n\t\t\tfor (let index = 0; index < member.parameters.length; index++) {\n\t\t\t\tconst parameter = member.parameters[index];\n\t\t\t\tif (\n\t\t\t\t\tisScriptingClassParameterDeclaration(\n\t\t\t\t\t\tscriptingClass,\n\t\t\t\t\t\tmember,\n\t\t\t\t\t\tindex,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\treturn parameter;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst isScriptingClassParameterDeclaration = (\n\tscriptingClass: ScriptingClass,\n\tmemberNode: ts.ClassElement,\n\tparameterIndex: number,\n) => {\n\tif (scriptingClass.type === \"evaluator\") {\n\t\treturn memberNode?.name?.getText() == \"Create\" && parameterIndex === 2;\n\t}\n\tif (scriptingClass.type === \"interactor\") {\n\t\treturn (\n\t\t\tmemberNode.kind === ts.SyntaxKind.Constructor &&\n\t\t\tparameterIndex === 0\n\t\t);\n\t}\n\treturn false;\n};\n\ninterface ScriptingClass {\n\tnode: ts.ClassDeclaration;\n\ttype: \"interactor\" | \"evaluator\";\n}\n\n/**\n * Finds interactors and evaluators within a script file\n *\n * @param {ts.Node} node\n * @return {*}\n */\nfunction* findScriptingClasses(\n\tnode: ts.Node,\n): Generator<ScriptingClass, void, void> {\n\tfor (const child of node.getChildren()) {\n\t\tif (!ts.isClassDeclaration(child)) {\n\t\t\tyield* findScriptingClasses(child);\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst scriptingClass = detectScriptingClass(child);\n\n\t\tif (scriptingClass !== undefined) {\n\t\t\tyield scriptingClass;\n\t\t}\n\t}\n}\n\nconst detectScriptingClass = (\n\tnode: ts.ClassDeclaration,\n): ScriptingClass | undefined => {\n\tconst isEvaluator = node.heritageClauses?.some((clause) => {\n\t\tif (\n\t\t\tclause.token !== ts.SyntaxKind.ExtendsKeyword &&\n\t\t\tclause.token !== ts.SyntaxKind.ImplementsKeyword\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn clause.types.some((type) =>\n\t\t\ttype.getText().includes(\"Evaluator\"),\n\t\t);\n\t});\n\n\tif (isEvaluator) {\n\t\treturn {\n\t\t\tnode,\n\t\t\ttype: \"evaluator\",\n\t\t};\n\t}\n\n\tconst isInteractor = node.heritageClauses?.some((clause) => {\n\t\tif (clause.token !== ts.SyntaxKind.ExtendsKeyword) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn clause.types.some((type) =>\n\t\t\ttype.getText().includes(\"Interactor\"),\n\t\t);\n\t});\n\n\tif (isInteractor) {\n\t\treturn {\n\t\t\tnode,\n\t\t\ttype: \"interactor\",\n\t\t};\n\t}\n};\n"],"names":["generateIndex","location","ignore","strictOptional","arr","existingIndex","readPackageCreatorIndex","manifest","readPackageCreatorManifest","compilerOptions","readScriptPackageTSConfig","options","isModule","module","ts","ModuleKind","ES2015","ESNext","files","getPackageTypescriptFiles","filter","path","some","suffix","endsWith","program","namespaces","entryFilePath","resolveScriptPackageEntryModule","undefined","Error","host","createCompilerHost","createProgram","allowJs","entryFile","getSourceFile","resolveNamespaces","Scope","Package","typeChecker","getTypeChecker","forEach","file","sourceFile","namespace","find","includes","scriptingClass","findScriptingClasses","node","name","type","moduleNamespace","resolveNamespaceFullName","text","getFullyQualifiedName","getSymbolAtLocation","length","parameterDeclaration","getScriptingClassParameterdeclaration","parametersType","getTypeAtLocation","console","log","existingIndexEntry","entry","Name","obj","Description","Type","Parameters","rawDocTags","getJSDocTags","dict","getTagDict","summary","comment","symbol","getDocumentationComment","map","join","parseParametersList","getPropertiesOfType","getStringIndexType","push","sort","a","b","localeCompare","writePackageCreatorIndex","capitalizeFirstLetter","string","charAt","toUpperCase","slice","parseDefault","value","uType","parseFloat","parseInt","replace","parseTypeFromName","parts","split","identifier","properties","i","parameter","Default","DisplayIndex","declaration","getDeclarations","documentationComment","checkLinksSymbol","links","syntheticOrigin","creatorType","propertySignature","parsedType","getText","default","kind","SyntaxKind","PropertySignature","questionToken","Required","tags","tag","tagName","member","members","isMethodDeclaration","index","parameters","isScriptingClassParameterDeclaration","isConstructorDeclaration","memberNode","parameterIndex","Constructor","child","getChildren","isClassDeclaration","detectScriptingClass","isEvaluator","heritageClauses","clause","token","ExtendsKeyword","ImplementsKeyword","types","isInteractor"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuCA;;;;IAKO,SAASA,aAAAA,CAAc,EAC7BC,QAAQ,EACRC,MAAAA,GAAS,EAAE,EACXC,cAAAA,GAAiB,KAAK,EACA,EAAA;AACtB,IAAA,MAAMC,MAA2B,EAAE;IAEnC,MAAMC,aAAAA,GAAgBC,uBAAAA,CAAwBL,QAAAA,CAAAA,IAAa,EAAE;AAC7D,IAAA,MAAMM,WAAWC,0BAAAA,CAA2BP,QAAAA,CAAAA;IAE5C,MAAMQ,eAAAA,GAAkBC,yBAAAA,CAA0BT,QAAAA,CAAAA,CAAUU,OAAO;AAEnE,IAAA,MAAMC,QAAAA,GACLH,eAAAA,CAAgBI,MAAM,KAAKC,GAAGC,UAAU,CAACC,MAAM,IAC/CP,gBAAgBI,MAAM,KAAKC,EAAAA,CAAGC,UAAU,CAACE,MAAM;AAEhD,IAAA,MAAMC,KAAAA,GAAQC,yBAAAA,CAA0BlB,QAAAA,CAAAA,CAAUmB,MAAM,CACvD,CAACC,IAAAA,GAAS,CAACnB,MAAAA,CAAOoB,IAAI,CAAC,CAACC,MAAAA,GAAWF,IAAAA,CAAKG,QAAQ,CAACD,MAAAA,CAAAA,CAAAA,CAAAA;IAGlD,IAAIE,OAAAA;IACJ,IAAIC,UAAAA;AAEJ,IAAA,IAAId,QAAAA,EAAU;QACb,MAAMe,aAAAA,GAAgBC,gCACrB3B,QAAAA,EACAM,QAAAA,CAAAA;AAGD,QAAA,IAAIoB,kBAAkBE,SAAAA,EAAW;AAChC,YAAA,MAAM,IAAIC,KAAAA,CAAM,CAAC,8BAA8B,CAAC,CAAA;AACjD,QAAA;AAEA,QAAA,MAAMC,IAAAA,GAAOjB,E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AAA,CAAA;AAE1B,IAAA,CAAA,CAAA;AAEA,IAAA,IAAIwG,YAAAA,EAAc;QACjB,OAAO;AACNrG,YAAAA,IAAAA;YACAE,IAAAA,EAAM;AACP,SAAA;AACD,IAAA;AACD,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"generateIndex-DRNwzIyR.mjs","sources":["../src/commands/generateIndex.ts"],"sourcesContent":["import ts from \"typescript\";\nimport * as fs from \"fs\";\nimport * as path from \"path\";\n\nimport {\n\tresolveNamespaceFullName,\n\tresolveNamespaces,\n\tNamespace,\n} from \"@intelligentgraphics/declarationbundler\";\n\nimport {\n\tPackageLocation,\n\twritePackageCreatorIndex,\n\treadPackageCreatorIndex,\n\treadPackageCreatorManifest,\n} from \"../lib/package\";\nimport {\n\tgetPackageTypescriptFiles,\n\treadScriptPackageTSConfig,\n\tresolveScriptPackageEntryModule,\n} from \"../lib/scripts\";\nimport {\n\tCreatorIndexEntry,\n\tCreatorIndexParameter,\n\tCreatorIndexParameterType,\n} from \"../lib/package\";\n\nexport interface GenerateIndexOptions {\n\tignore?: string[];\n\tlocation: PackageLocation;\n\n\t/**\n\t * Marks non optional parameter object properties as required in the generated index\n\t *\n\t * @type {boolean}\n\t */\n\tstrictOptional?: boolean;\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 generateIndex({\n\tlocation,\n\tignore = [],\n\tstrictOptional = false,\n}: GenerateIndexOptions) {\n\tconst arr: CreatorIndexEntry[] = [];\n\n\tconst existingIndex = readPackageCreatorIndex(location) ?? [];\n\tconst manifest = readPackageCreatorManifest(location);\n\n\tconst compilerOptions = readScriptPackageTSConfig(location).options;\n\n\tconst isModule =\n\t\tcompilerOptions.module === ts.ModuleKind.ES2015 ||\n\t\tcompilerOptions.module === ts.ModuleKind.ESNext;\n\n\tconst files = getPackageTypescriptFiles(location).filter(\n\t\t(path) => !ignore.some((suffix) => path.endsWith(suffix)),\n\t);\n\n\tlet program: ts.Program;\n\tlet namespaces: Namespace[];\n\n\tif (isModule) {\n\t\tconst entryFilePath = resolveScriptPackageEntryModule(\n\t\t\tlocation,\n\t\t\tmanifest,\n\t\t);\n\n\t\tif (entryFilePath === undefined) {\n\t\t\tthrow new Error(`Could not resolve entry module`);\n\t\t}\n\n\t\tconst host = ts.createCompilerHost({}, true);\n\t\tprogram = ts.createProgram(\n\t\t\t[entryFilePath],\n\t\t\t{ allowJs: true, ...compilerOptions },\n\t\t\thost,\n\t\t);\n\n\t\tconst entryFile = program.getSourceFile(entryFilePath);\n\n\t\tif (entryFile === undefined) {\n\t\t\tthrow new Error(`Failed to find entry module`);\n\t\t}\n\n\t\tnamespaces = resolveNamespaces(\n\t\t\tentryFile,\n\t\t\tprogram,\n\t\t\thost,\n\t\t\tmanifest.Scope ?? manifest.Package,\n\t\t);\n\t} else {\n\t\tprogram = ts.createProgram(files, { allowJs: true });\n\t\tnamespaces = [];\n\t}\n\n\tconst typeChecker = program.getTypeChecker();\n\n\tfiles.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\t\tconst namespace = namespaces.find((namespace) =>\n\t\t\tnamespace.files.includes(sourceFile),\n\t\t);\n\n\t\t// Loop through the root AST nodes of the file\n\n\t\tfor (const scriptingClass of findScriptingClasses(sourceFile)) {\n\t\t\tif (scriptingClass.node.name === undefined) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Expected ${scriptingClass.type} class to have a name`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tlet name: string;\n\n\t\t\tif (isModule && namespace !== undefined) {\n\t\t\t\tconst moduleNamespace = resolveNamespaceFullName(namespace);\n\t\t\t\tname = `${moduleNamespace}.${scriptingClass.node.name.text}`;\n\t\t\t} else {\n\t\t\t\tname = typeChecker.getFullyQualifiedName(\n\t\t\t\t\ttypeChecker.getSymbolAtLocation(scriptingClass.node.name)!,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (name.length > 45) {\n\t\t\t\tthrow new Error(`Package name length >45 '${name}'`);\n\t\t\t}\n\n\t\t\tconst parameterDeclaration =\n\t\t\t\tgetScriptingClassParameterdeclaration(scriptingClass);\n\n\t\t\tconst parametersType =\n\t\t\t\tparameterDeclaration === undefined\n\t\t\t\t\t? undefined\n\t\t\t\t\t: typeChecker.getTypeAtLocation(parameterDeclaration);\n\n\t\t\tif (parametersType === undefined) {\n\t\t\t\tconsole.log(\n\t\t\t\t\t`Failed to find parameters type declaration for ${scriptingClass.type} ${name}. Skipping parameter list generation`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst existingIndexEntry = existingIndex.find(\n\t\t\t\t(entry) => entry.Name === name,\n\t\t\t);\n\n\t\t\tconst obj: CreatorIndexEntry = {\n\t\t\t\tName: name,\n\t\t\t\tDescription: existingIndexEntry?.Description ?? name,\n\t\t\t\tType:\n\t\t\t\t\tscriptingClass.type === \"evaluator\"\n\t\t\t\t\t\t? \"Evaluator\"\n\t\t\t\t\t\t: \"Interactor\",\n\t\t\t\tParameters: [],\n\t\t\t};\n\n\t\t\tconst rawDocTags = ts.getJSDocTags(scriptingClass.node);\n\n\t\t\tconst dict = getTagDict(rawDocTags);\n\t\t\tif (dict.summary) {\n\t\t\t\tobj.Description = dict.summary;\n\t\t\t} else {\n\t\t\t\tconst comment = typeChecker\n\t\t\t\t\t.getTypeAtLocation(scriptingClass.node)\n\t\t\t\t\t.symbol.getDocumentationComment(typeChecker)\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\tobj.Description = comment;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (parametersType !== undefined) {\n\t\t\t\tobj.Parameters = parseParametersList(\n\t\t\t\t\ttypeChecker.getPropertiesOfType(parametersType),\n\t\t\t\t\tstrictOptional,\n\t\t\t\t);\n\n\t\t\t\tif (\n\t\t\t\t\tobj.Parameters.length === 0 &&\n\t\t\t\t\tparametersType.getStringIndexType() !== undefined\n\t\t\t\t) {\n\t\t\t\t\tobj.Parameters = existingIndexEntry?.Parameters ?? [];\n\t\t\t\t}\n\t\t\t} else if (existingIndexEntry !== undefined) {\n\t\t\t\tobj.Parameters = existingIndexEntry.Parameters;\n\t\t\t}\n\n\t\t\tarr.push(obj);\n\t\t}\n\t});\n\n\tarr.sort((a, b) => a.Name.localeCompare(b.Name));\n\n\twritePackageCreatorIndex(location, arr);\n}\n\nfunction capitalizeFirstLetter(string: string) {\n\treturn string?.charAt(0).toUpperCase() + string?.slice(1);\n}\n\nconst 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 parseTypeFromName = (\n\tname: string,\n): CreatorIndexParameterType | undefined => {\n\tconst parts = name.split(\".\");\n\tconst identifier = parts[parts.length - 1];\n\n\tswitch (identifier) {\n\t\tcase \"LengthM\":\n\t\tcase \"ArcDEG\":\n\t\tcase \"Float\":\n\t\tcase \"Integer\":\n\t\t\treturn identifier;\n\t\tcase \"GeometryReference\":\n\t\t\treturn \"Geometry\";\n\t\tcase \"MaterialReference\":\n\t\t\treturn \"Material\";\n\t\tcase \"AnimationReference\":\n\t\t\treturn \"Animation\";\n\t\tcase \"InteractorReference\":\n\t\t\treturn \"Interactor\";\n\t\tcase \"EvaluatorReference\":\n\t\t\treturn \"Evaluator\";\n\t\tcase \"String\":\n\t\tcase \"string\":\n\t\t\treturn \"String\";\n\t\tcase \"number\":\n\t\tcase \"Number\":\n\t\t\treturn \"Float\";\n\t\tcase \"boolean\":\n\t\tcase \"Boolean\":\n\t\t\treturn \"Boolean\";\n\t}\n};\n\nconst parseParametersList = (\n\tproperties: ts.Symbol[],\n\tstrictOptional: boolean,\n): 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 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} else {\n\t\t\t\tconst propertySignature = declaration as ts.PropertySignature;\n\t\t\t\tif (propertySignature.type !== undefined) {\n\t\t\t\t\tconst parsedType = parseTypeFromName(\n\t\t\t\t\t\tpropertySignature.type.getText(),\n\t\t\t\t\t);\n\n\t\t\t\t\tif (parsedType !== undefined) {\n\t\t\t\t\t\tparameter.Type = parsedType;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (dict.default) {\n\t\t\t\tparameter.Default = parseDefault(dict.default, parameter.Type);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tstrictOptional &&\n\t\t\t\tdeclaration.kind === ts.SyntaxKind.PropertySignature\n\t\t\t) {\n\t\t\t\tconst propertySignature = declaration as ts.PropertySignature;\n\t\t\t\tif (propertySignature.questionToken === undefined) {\n\t\t\t\t\tparameter.Required = true;\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\nconst getScriptingClassParameterdeclaration = (\n\tscriptingClass: ScriptingClass,\n) => {\n\tfor (const member of scriptingClass.node.members) {\n\t\tif (ts.isMethodDeclaration(member)) {\n\t\t\tfor (let index = 0; index < member.parameters.length; index++) {\n\t\t\t\tconst parameter = member.parameters[index];\n\t\t\t\tif (\n\t\t\t\t\tisScriptingClassParameterDeclaration(\n\t\t\t\t\t\tscriptingClass,\n\t\t\t\t\t\tmember,\n\t\t\t\t\t\tindex,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\treturn parameter;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (ts.isConstructorDeclaration(member)) {\n\t\t\tfor (let index = 0; index < member.parameters.length; index++) {\n\t\t\t\tconst parameter = member.parameters[index];\n\t\t\t\tif (\n\t\t\t\t\tisScriptingClassParameterDeclaration(\n\t\t\t\t\t\tscriptingClass,\n\t\t\t\t\t\tmember,\n\t\t\t\t\t\tindex,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\treturn parameter;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst isScriptingClassParameterDeclaration = (\n\tscriptingClass: ScriptingClass,\n\tmemberNode: ts.ClassElement,\n\tparameterIndex: number,\n) => {\n\tif (scriptingClass.type === \"evaluator\") {\n\t\treturn memberNode?.name?.getText() == \"Create\" && parameterIndex === 2;\n\t}\n\tif (scriptingClass.type === \"interactor\") {\n\t\treturn (\n\t\t\tmemberNode.kind === ts.SyntaxKind.Constructor &&\n\t\t\tparameterIndex === 0\n\t\t);\n\t}\n\treturn false;\n};\n\ninterface ScriptingClass {\n\tnode: ts.ClassDeclaration;\n\ttype: \"interactor\" | \"evaluator\";\n}\n\n/**\n * Finds interactors and evaluators within a script file\n *\n * @param {ts.Node} node\n * @return {*}\n */\nfunction* findScriptingClasses(\n\tnode: ts.Node,\n): Generator<ScriptingClass, void, void> {\n\tfor (const child of node.getChildren()) {\n\t\tif (!ts.isClassDeclaration(child)) {\n\t\t\tyield* findScriptingClasses(child);\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst scriptingClass = detectScriptingClass(child);\n\n\t\tif (scriptingClass !== undefined) {\n\t\t\tyield scriptingClass;\n\t\t}\n\t}\n}\n\nconst detectScriptingClass = (\n\tnode: ts.ClassDeclaration,\n): ScriptingClass | undefined => {\n\tconst isEvaluator = node.heritageClauses?.some((clause) => {\n\t\tif (\n\t\t\tclause.token !== ts.SyntaxKind.ExtendsKeyword &&\n\t\t\tclause.token !== ts.SyntaxKind.ImplementsKeyword\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn clause.types.some((type) =>\n\t\t\ttype.getText().includes(\"Evaluator\"),\n\t\t);\n\t});\n\n\tif (isEvaluator) {\n\t\treturn {\n\t\t\tnode,\n\t\t\ttype: \"evaluator\",\n\t\t};\n\t}\n\n\tconst isInteractor = node.heritageClauses?.some((clause) => {\n\t\tif (clause.token !== ts.SyntaxKind.ExtendsKeyword) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn clause.types.some((type) =>\n\t\t\ttype.getText().includes(\"Interactor\"),\n\t\t);\n\t});\n\n\tif (isInteractor) {\n\t\treturn {\n\t\t\tnode,\n\t\t\ttype: \"interactor\",\n\t\t};\n\t}\n};\n"],"names":["generateIndex","location","ignore","strictOptional","arr","existingIndex","readPackageCreatorIndex","manifest","readPackageCreatorManifest","compilerOptions","readScriptPackageTSConfig","options","isModule","module","ts","ModuleKind","ES2015","ESNext","files","getPackageTypescriptFiles","filter","path","some","suffix","endsWith","program","namespaces","entryFilePath","resolveScriptPackageEntryModule","undefined","Error","host","createCompilerHost","createProgram","allowJs","entryFile","getSourceFile","resolveNamespaces","Scope","Package","typeChecker","getTypeChecker","forEach","file","sourceFile","namespace","find","includes","scriptingClass","findScriptingClasses","node","name","type","moduleNamespace","resolveNamespaceFullName","text","getFullyQualifiedName","getSymbolAtLocation","length","parameterDeclaration","getScriptingClassParameterdeclaration","parametersType","getTypeAtLocation","console","log","existingIndexEntry","entry","Name","obj","Description","Type","Parameters","rawDocTags","getJSDocTags","dict","getTagDict","summary","comment","symbol","getDocumentationComment","map","join","parseParametersList","getPropertiesOfType","getStringIndexType","push","sort","a","b","localeCompare","writePackageCreatorIndex","capitalizeFirstLetter","string","charAt","toUpperCase","slice","parseDefault","value","uType","parseFloat","parseInt","replace","parseTypeFromName","parts","split","identifier","properties","i","parameter","Default","DisplayIndex","declaration","getDeclarations","documentationComment","checkLinksSymbol","links","syntheticOrigin","creatorType","propertySignature","parsedType","getText","default","kind","SyntaxKind","PropertySignature","questionToken","Required","tags","tag","tagName","member","members","isMethodDeclaration","index","parameters","isScriptingClassParameterDeclaration","isConstructorDeclaration","memberNode","parameterIndex","Constructor","child","getChildren","isClassDeclaration","detectScriptingClass","isEvaluator","heritageClauses","clause","token","ExtendsKeyword","ImplementsKeyword","types","isInteractor"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuCA;;;;IAKO,SAASA,aAAAA,CAAc,EAC7BC,QAAQ,EACRC,MAAAA,GAAS,EAAE,EACXC,cAAAA,GAAiB,KAAK,EACA,EAAA;AACtB,IAAA,MAAMC,MAA2B,EAAE;IAEnC,MAAMC,aAAAA,GAAgBC,uBAAAA,CAAwBL,QAAAA,CAAAA,IAAa,EAAE;AAC7D,IAAA,MAAMM,WAAWC,0BAAAA,CAA2BP,QAAAA,CAAAA;IAE5C,MAAMQ,eAAAA,GAAkBC,yBAAAA,CAA0BT,QAAAA,CAAAA,CAAUU,OAAO;AAEnE,IAAA,MAAMC,QAAAA,GACLH,eAAAA,CAAgBI,MAAM,KAAKC,GAAGC,UAAU,CAACC,MAAM,IAC/CP,gBAAgBI,MAAM,KAAKC,EAAAA,CAAGC,UAAU,CAACE,MAAM;AAEhD,IAAA,MAAMC,KAAAA,GAAQC,yBAAAA,CAA0BlB,QAAAA,CAAAA,CAAUmB,MAAM,CACvD,CAACC,IAAAA,GAAS,CAACnB,MAAAA,CAAOoB,IAAI,CAAC,CAACC,MAAAA,GAAWF,IAAAA,CAAKG,QAAQ,CAACD,MAAAA,CAAAA,CAAAA,CAAAA;IAGlD,IAAIE,OAAAA;IACJ,IAAIC,UAAAA;AAEJ,IAAA,IAAId,QAAAA,EAAU;QACb,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OAAOC,KAAK,KAAKrI,GAAG6G,UAAU,CAACyB,cAAc,EAAE;YAClD,OAAO,KAAA;AACR,QAAA;QAEA,OAAOF,MAAAA,CAAOI,KAAK,CAAChI,IAAI,CAAC,CAAC8B,IAAAA,GACzBA,IAAAA,CAAKoE,OAAO,EAAA,CAAGzE,QAAQ,CAAC,YAAA,CAAA,CAAA;AAE1B,IAAA,CAAA,CAAA;AAEA,IAAA,IAAIwG,YAAAA,EAAc;QACjB,OAAO;AACNrG,YAAAA,IAAAA;YACAE,IAAAA,EAAM;AACP,SAAA;AACD,IAAA;AACD,CAAA;;;;"}
|
|
@@ -4,7 +4,7 @@ import * as path from 'path';
|
|
|
4
4
|
import * as os from 'os';
|
|
5
5
|
import 'resolve';
|
|
6
6
|
import 'write-pkg';
|
|
7
|
-
import { a as readPackageCreatorIndex, r as readPackageCreatorManifest, l as getCreatorIndexParameterPrimaryJSType } from './cli-
|
|
7
|
+
import { a as readPackageCreatorIndex, r as readPackageCreatorManifest, l as getCreatorIndexParameterPrimaryJSType } from './cli-DLGFANVF.mjs';
|
|
8
8
|
import 'glob';
|
|
9
9
|
import 'node:path';
|
|
10
10
|
import 'node:fs';
|
|
@@ -71,4 +71,4 @@ const generateParameterType = ({ location, name })=>{
|
|
|
71
71
|
};
|
|
72
72
|
|
|
73
73
|
export { generateParameterType };
|
|
74
|
-
//# sourceMappingURL=generateParameterType-
|
|
74
|
+
//# sourceMappingURL=generateParameterType-9-1z1US9.mjs.map
|
package/build/{generateParameterType-BQ1F7eAV.mjs.map → generateParameterType-9-1z1US9.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateParameterType-
|
|
1
|
+
{"version":3,"file":"generateParameterType-9-1z1US9.mjs","sources":["../src/commands/generateParameterType.ts"],"sourcesContent":["import ts from \"typescript\";\nimport * as fs from \"fs\";\nimport * as path from \"path\";\nimport * as os from \"os\";\n\nimport {\n\tPackageLocation,\n\tgetCreatorIndexParameterPrimaryJSType,\n\treadPackageCreatorIndex,\n\treadPackageCreatorManifest,\n} from \"@intelligentgraphics/ig.gfx.tools.core\";\n\nexport interface GenerateParameterTypeOptions {\n\tlocation: PackageLocation;\n\tname: string;\n}\n\nexport const generateParameterType = ({\n\tlocation,\n\tname,\n}: GenerateParameterTypeOptions) => {\n\tconst index = readPackageCreatorIndex(location);\n\tconst manifest = readPackageCreatorManifest(location);\n\n\tif (index === undefined) {\n\t\tthrow new Error(`Could not find the _Index.json file`);\n\t}\n\n\tlet qualifiedName = name;\n\tlet className = name;\n\n\tconst scope = manifest.Scope ?? manifest.Package;\n\n\tif (name.startsWith(scope)) {\n\t\tclassName = name.slice(scope.length + 1);\n\t} else {\n\t\tqualifiedName = `${scope}.${name}`;\n\t}\n\n\tconst informations = index.find((item) => item.Name === qualifiedName);\n\n\tif (informations === undefined) {\n\t\tthrow new Error(`Could not find an index entry for ${name}`);\n\t}\n\n\tconst members: ts.TypeElement[] = [];\n\n\tif (informations.Parameters !== undefined) {\n\t\tconst sortedList = informations.Parameters.slice();\n\t\tsortedList.sort((a, b) => a.DisplayIndex - b.DisplayIndex);\n\n\t\tfor (const parameter of sortedList) {\n\t\t\tconst jsType = getCreatorIndexParameterPrimaryJSType(\n\t\t\t\tparameter.Type,\n\t\t\t);\n\n\t\t\tconst type =\n\t\t\t\tjsType === \"string\"\n\t\t\t\t\t? ts.factory.createTypeReferenceNode(\"string\")\n\t\t\t\t\t: ts.factory.createUnionTypeNode([\n\t\t\t\t\t\t\tts.factory.createTypeReferenceNode(jsType),\n\t\t\t\t\t\t\tts.factory.createTypeReferenceNode(\"string\"),\n\t\t\t\t\t ]);\n\n\t\t\tlet propertySignature = ts.factory.createPropertySignature(\n\t\t\t\tundefined,\n\t\t\t\tparameter.Name,\n\t\t\t\tparameter.Required\n\t\t\t\t\t? undefined\n\t\t\t\t\t: ts.factory.createToken(ts.SyntaxKind.QuestionToken),\n\t\t\t\ttype,\n\t\t\t);\n\n\t\t\tconst jsdocParts: string[] = [];\n\n\t\t\tif (parameter.Description !== undefined) {\n\t\t\t\tjsdocParts.push(parameter.Description, \"\");\n\t\t\t}\n\n\t\t\tjsdocParts.push(`@creatorType ${parameter.Type}`);\n\n\t\t\tif (jsType === \"string\") {\n\t\t\t\tjsdocParts.push(`@default \"${parameter.Default}\"`);\n\t\t\t} else {\n\t\t\t\tjsdocParts.push(`@default ${parameter.Default}`);\n\t\t\t}\n\n\t\t\tconst jsdocContent = jsdocParts\n\t\t\t\t.map((part) => `* ${part}`)\n\t\t\t\t.join(\"\\n \");\n\t\t\tpropertySignature = ts.addSyntheticLeadingComment(\n\t\t\t\tpropertySignature,\n\t\t\t\tts.SyntaxKind.MultiLineCommentTrivia,\n\t\t\t\t`*\\n ${jsdocContent}\\n `,\n\t\t\t\ttrue,\n\t\t\t);\n\n\t\t\tmembers.push(propertySignature);\n\t\t}\n\t}\n\n\tconst interfaceName = `${className}Params`;\n\n\tlet interfaceDeclaration = ts.factory.createInterfaceDeclaration(\n\t\tundefined,\n\t\tinterfaceName,\n\t\tundefined,\n\t\tundefined,\n\t\tmembers,\n\t);\n\n\tinterfaceDeclaration = ts.addSyntheticLeadingComment(\n\t\tinterfaceDeclaration,\n\t\tts.SyntaxKind.MultiLineCommentTrivia,\n\t\t`*\\n * Parameters for the ${className} class\\n `,\n\t\ttrue,\n\t);\n\n\tconst printer = ts.createPrinter();\n\tconst content = printer\n\t\t.printNode(\n\t\t\tts.EmitHint.Unspecified,\n\t\t\tinterfaceDeclaration,\n\t\t\tts.createSourceFile(\"index.ts\", \"\", ts.ScriptTarget.Latest),\n\t\t)\n\t\t.replace(/ /g, \"\\t\");\n\n\tconst outFile = path.join(location.scriptsDir, `${interfaceName}.txt`);\n\n\tfs.writeFileSync(\n\t\toutFile,\n\t\t`Generated parameters interface for ${className}. Insert the interface declaration next to the class and use it as the type for the parameters. Afterwards you can delete this file.` +\n\t\t\tos.EOL +\n\t\t\tos.EOL +\n\t\t\tcontent,\n\t);\n};\n"],"names":["generateParameterType","location","name","index","readPackageCreatorIndex","manifest","readPackageCreatorManifest","undefined","Error","qualifiedName","className","scope","Scope","Package","startsWith","slice","length","informations","find","item","Name","members","Parameters","sortedList","sort","a","b","DisplayIndex","parameter","jsType","getCreatorIndexParameterPrimaryJSType","Type","type","ts","factory","createTypeReferenceNode","createUnionTypeNode","propertySignature","createPropertySignature","Required","createToken","SyntaxKind","QuestionToken","jsdocParts","Description","push","Default","jsdocContent","map","part","join","addSyntheticLeadingComment","MultiLineCommentTrivia","interfaceName","interfaceDeclaration","createInterfaceDeclaration","printer","createPrinter","content","printNode","EmitHint","Unspecified","createSourceFile","ScriptTarget","Latest","replace","outFile","path","scriptsDir","fs","writeFileSync","os","EOL"],"mappings":";;;;;;;;;;;;;;;;;;;MAiBaA,qBAAAA,GAAwB,CAAC,EACrCC,QAAQ,EACRC,IAAI,EAC0B,GAAA;AAC9B,IAAA,MAAMC,QAAQC,uBAAAA,CAAwBH,QAAAA,CAAAA;AACtC,IAAA,MAAMI,WAAWC,0BAAAA,CAA2BL,QAAAA,CAAAA;AAE5C,IAAA,IAAIE,UAAUI,SAAAA,EAAW;AACxB,QAAA,MAAM,IAAIC,KAAAA,CAAM,CAAC,mCAAmC,CAAC,CAAA;AACtD,IAAA;AAEA,IAAA,IAAIC,aAAAA,GAAgBP,IAAAA;AACpB,IAAA,IAAIQ,SAAAA,GAAYR,IAAAA;AAEhB,IAAA,MAAMS,KAAAA,GAAQN,QAAAA,CAASO,KAAK,IAAIP,SAASQ,OAAO;IAEhD,IAAIX,IAAAA,CAAKY,UAAU,CAACH,KAAAA,CAAAA,EAAQ;AAC3BD,QAAAA,SAAAA,GAAYR,IAAAA,CAAKa,KAAK,CAACJ,KAAAA,CAAMK,MAAM,GAAG,CAAA,CAAA;IACvC,CAAA,MAAO;AACNP,QAAAA,aAAAA,GAAgB,CAAA,EAAGE,KAAAA,CAAM,CAAC,EAAET,IAAAA,CAAAA,CAAM;AACnC,IAAA;IAEA,MAAMe,YAAA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AsB,EACpC,CAAC,yBAAyB,EAAE1C,SAAAA,CAAU,SAAS,CAAC,EAChD,IAAA,CAAA;IAGD,MAAM8C,OAAAA,GAAUvB,GAAGwB,aAAa,EAAA;IAChC,MAAMC,OAAAA,GAAUF,QACdG,SAAS,CACT1B,GAAG2B,QAAQ,CAACC,WAAW,EACvBP,oBAAAA,EACArB,EAAAA,CAAG6B,gBAAgB,CAAC,UAAA,EAAY,IAAI7B,EAAAA,CAAG8B,YAAY,CAACC,MAAM,CAAA,CAAA,CAE1DC,OAAO,CAAC,OAAA,EAAS,IAAA,CAAA;IAEnB,MAAMC,OAAAA,GAAUC,IAAAA,CAAKjB,IAAI,CAACjD,QAAAA,CAASmE,UAAU,EAAE,CAAA,EAAGf,aAAAA,CAAc,IAAI,CAAC,CAAA;AAErEgB,IAAAA,EAAAA,CAAGC,aAAa,CACfJ,OAAAA,EACA,CAAC,mCAAmC,EAAExD,SAAAA,CAAU,oIAAoI,CAAC,GACpL6D,EAAAA,CAAGC,GAAG,GACND,EAAAA,CAAGC,GAAG,GACNd,OAAAA,CAAAA;AAEH;;;;"}
|
|
@@ -6,8 +6,8 @@ import ts from 'typescript';
|
|
|
6
6
|
import * as fs from 'fs';
|
|
7
7
|
import 'resolve';
|
|
8
8
|
import 'write-pkg';
|
|
9
|
-
import { e as readPackageAnimationList, r as readPackageCreatorManifest, q as readPackageNpmManifest, i as isErrorENOENT } from './cli-
|
|
10
|
-
import { g as getPackageTypescriptFiles, i as isScriptPackageModules } from './scripts-
|
|
9
|
+
import { e as readPackageAnimationList, r as readPackageCreatorManifest, q as readPackageNpmManifest, i as isErrorENOENT } from './cli-DLGFANVF.mjs';
|
|
10
|
+
import { g as getPackageTypescriptFiles, i as isScriptPackageModules } from './scripts-DOxdNSgU.mjs';
|
|
11
11
|
import 'node:path';
|
|
12
12
|
import 'node:fs';
|
|
13
13
|
import 'axios';
|
|
@@ -1052,7 +1052,7 @@ async function buildFolders(options) {
|
|
|
1052
1052
|
}
|
|
1053
1053
|
if (typescriptFiles.length > 0) {
|
|
1054
1054
|
if (isScriptPackageModules(tsConfig.options)) {
|
|
1055
|
-
const { createRollupBuildParticipant } = await import('./rollup-
|
|
1055
|
+
const { createRollupBuildParticipant } = await import('./rollup-DXNQ8zID.mjs');
|
|
1056
1056
|
manager.addParticipant("rollup", createRollupBuildParticipant(location, data, outputDirectory, options.skipDeclarations ?? false));
|
|
1057
1057
|
} else {
|
|
1058
1058
|
manager.addParticipant("tsc", createTSCBuildParticipant(location, outputDirectory, options.skipDeclarations ?? false));
|
|
@@ -1113,7 +1113,7 @@ async function buildFoldersWatch(options) {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
if (typescriptFiles.length > 0) {
|
|
1115
1115
|
if (isScriptPackageModules(tsConfig.options)) {
|
|
1116
|
-
const { createRollupWatchBuildParticipant } = await import('./rollup-
|
|
1116
|
+
const { createRollupWatchBuildParticipant } = await import('./rollup-DXNQ8zID.mjs');
|
|
1117
1117
|
manager.addParticipant("rollup", createRollupWatchBuildParticipant(location, data, outputDirectory, options.skipDeclarations ?? false));
|
|
1118
1118
|
} else {
|
|
1119
1119
|
manager.addParticipant("tsc", createTSCWatchBuildParticipant(location, outputDirectory, options.skipDeclarations ?? false));
|
|
@@ -1346,4 +1346,4 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
1346
1346
|
});
|
|
1347
1347
|
|
|
1348
1348
|
export { PackageVersion as P, consoleReporter as a, buildFolders as b, createPackageScopedReporter as c, index as i };
|
|
1349
|
-
//# sourceMappingURL=index-
|
|
1349
|
+
//# sourceMappingURL=index-8OmlN_-6.mjs.map
|