ticbuild 1.0.22 → 1.0.23
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/README.md +1057 -199
- package/dist/backend/ImportedResourceTypes.d.ts +22 -10
- package/dist/backend/ImportedResourceTypes.d.ts.map +1 -1
- package/dist/backend/ImportedResourceTypes.js +42 -13
- package/dist/backend/ImportedResourceTypes.js.map +1 -1
- package/dist/backend/assembly.d.ts +11 -0
- package/dist/backend/assembly.d.ts.map +1 -0
- package/dist/backend/assembly.js +150 -0
- package/dist/backend/assembly.js.map +1 -0
- package/dist/backend/assetBanking.test.d.ts +2 -0
- package/dist/backend/assetBanking.test.d.ts.map +1 -0
- package/dist/backend/assetBanking.test.js +242 -0
- package/dist/backend/assetBanking.test.js.map +1 -0
- package/dist/backend/codeBanking.test.js +7 -5
- package/dist/backend/codeBanking.test.js.map +1 -1
- package/dist/backend/codeSnippetProcessor.d.ts +78 -0
- package/dist/backend/codeSnippetProcessor.d.ts.map +1 -0
- package/dist/backend/codeSnippetProcessor.js +241 -0
- package/dist/backend/codeSnippetProcessor.js.map +1 -0
- package/dist/backend/codeSnippetProcessor.test.d.ts +2 -0
- package/dist/backend/codeSnippetProcessor.test.d.ts.map +1 -0
- package/dist/backend/codeSnippetProcessor.test.js +221 -0
- package/dist/backend/codeSnippetProcessor.test.js.map +1 -0
- package/dist/backend/importReference.d.ts +4 -0
- package/dist/backend/importReference.d.ts.map +1 -0
- package/dist/backend/importReference.js +43 -0
- package/dist/backend/importReference.js.map +1 -0
- package/dist/backend/importResources.d.ts +3 -1
- package/dist/backend/importResources.d.ts.map +1 -1
- package/dist/backend/importResources.js +124 -36
- package/dist/backend/importResources.js.map +1 -1
- package/dist/backend/importResources.test.d.ts +2 -0
- package/dist/backend/importResources.test.d.ts.map +1 -0
- package/dist/backend/importResources.test.js +87 -0
- package/dist/backend/importResources.test.js.map +1 -0
- package/dist/backend/importSources.d.ts +51 -0
- package/dist/backend/importSources.d.ts.map +1 -0
- package/dist/backend/importSources.js +261 -0
- package/dist/backend/importSources.js.map +1 -0
- package/dist/backend/importSources.test.d.ts +2 -0
- package/dist/backend/importSources.test.d.ts.map +1 -0
- package/dist/backend/importSources.test.js +271 -0
- package/dist/backend/importSources.test.js.map +1 -0
- package/dist/backend/importUtils.d.ts +5 -10
- package/dist/backend/importUtils.d.ts.map +1 -1
- package/dist/backend/importUtils.js +13 -48
- package/dist/backend/importUtils.js.map +1 -1
- package/dist/backend/importers/CodeDeclarationAnalysis.d.ts +37 -0
- package/dist/backend/importers/CodeDeclarationAnalysis.d.ts.map +1 -0
- package/dist/backend/importers/CodeDeclarationAnalysis.js +288 -0
- package/dist/backend/importers/CodeDeclarationAnalysis.js.map +1 -0
- package/dist/backend/importers/CodeResource.d.ts +90 -0
- package/dist/backend/importers/CodeResource.d.ts.map +1 -0
- package/dist/backend/importers/CodeResource.js +480 -0
- package/dist/backend/importers/CodeResource.js.map +1 -0
- package/dist/backend/importers/CodeResource.test.d.ts +2 -0
- package/dist/backend/importers/CodeResource.test.d.ts.map +1 -0
- package/dist/backend/importers/CodeResource.test.js +106 -0
- package/dist/backend/importers/CodeResource.test.js.map +1 -0
- package/dist/backend/importers/LuaAssetTypeScriptModules.d.ts +38 -0
- package/dist/backend/importers/LuaAssetTypeScriptModules.d.ts.map +1 -0
- package/dist/backend/importers/LuaAssetTypeScriptModules.js +437 -0
- package/dist/backend/importers/LuaAssetTypeScriptModules.js.map +1 -0
- package/dist/backend/importers/LuaCodeImporter.d.ts +9 -49
- package/dist/backend/importers/LuaCodeImporter.d.ts.map +1 -1
- package/dist/backend/importers/LuaCodeImporter.js +28 -255
- package/dist/backend/importers/LuaCodeImporter.js.map +1 -1
- package/dist/backend/importers/LuaCodeImporter.test.js +89 -46
- package/dist/backend/importers/LuaCodeImporter.test.js.map +1 -1
- package/dist/backend/importers/LuaTypeCatalog.d.ts +26 -0
- package/dist/backend/importers/LuaTypeCatalog.d.ts.map +1 -0
- package/dist/backend/importers/LuaTypeCatalog.js +185 -0
- package/dist/backend/importers/LuaTypeCatalog.js.map +1 -0
- package/dist/backend/importers/ManifestCodeTypeScriptModules.d.ts +10 -0
- package/dist/backend/importers/ManifestCodeTypeScriptModules.d.ts.map +1 -0
- package/dist/backend/importers/ManifestCodeTypeScriptModules.js +31 -0
- package/dist/backend/importers/ManifestCodeTypeScriptModules.js.map +1 -0
- package/dist/backend/importers/TypeScriptBuildConstants.d.ts +6 -0
- package/dist/backend/importers/TypeScriptBuildConstants.d.ts.map +1 -0
- package/dist/backend/importers/TypeScriptBuildConstants.js +79 -0
- package/dist/backend/importers/TypeScriptBuildConstants.js.map +1 -0
- package/dist/backend/importers/TypeScriptCodeImporter.d.ts +26 -0
- package/dist/backend/importers/TypeScriptCodeImporter.d.ts.map +1 -0
- package/dist/backend/importers/TypeScriptCodeImporter.js +57 -0
- package/dist/backend/importers/TypeScriptCodeImporter.js.map +1 -0
- package/dist/backend/importers/TypeScriptCodeImporter.test.d.ts +2 -0
- package/dist/backend/importers/TypeScriptCodeImporter.test.d.ts.map +1 -0
- package/dist/backend/importers/TypeScriptCodeImporter.test.js +1795 -0
- package/dist/backend/importers/TypeScriptCodeImporter.test.js.map +1 -0
- package/dist/backend/importers/TypeScriptConstantPlugin.d.ts +8 -0
- package/dist/backend/importers/TypeScriptConstantPlugin.d.ts.map +1 -0
- package/dist/backend/importers/TypeScriptConstantPlugin.js +412 -0
- package/dist/backend/importers/TypeScriptConstantPlugin.js.map +1 -0
- package/dist/backend/importers/TypeScriptDeclarationSources.d.ts +19 -0
- package/dist/backend/importers/TypeScriptDeclarationSources.d.ts.map +1 -0
- package/dist/backend/importers/TypeScriptDeclarationSources.js +119 -0
- package/dist/backend/importers/TypeScriptDeclarationSources.js.map +1 -0
- package/dist/backend/importers/TypeScriptDeclarationSyntax.d.ts +8 -0
- package/dist/backend/importers/TypeScriptDeclarationSyntax.d.ts.map +1 -0
- package/dist/backend/importers/TypeScriptDeclarationSyntax.js +29 -0
- package/dist/backend/importers/TypeScriptDeclarationSyntax.js.map +1 -0
- package/dist/backend/importers/TypeScriptLuaDeclarations.d.ts +23 -0
- package/dist/backend/importers/TypeScriptLuaDeclarations.d.ts.map +1 -0
- package/dist/backend/importers/TypeScriptLuaDeclarations.js +553 -0
- package/dist/backend/importers/TypeScriptLuaDeclarations.js.map +1 -0
- package/dist/backend/importers/TypeScriptLuaDeclarations.test.d.ts +2 -0
- package/dist/backend/importers/TypeScriptLuaDeclarations.test.d.ts.map +1 -0
- package/dist/backend/importers/TypeScriptLuaDeclarations.test.js +29 -0
- package/dist/backend/importers/TypeScriptLuaDeclarations.test.js.map +1 -0
- package/dist/backend/importers/TypeScriptManifestModules.d.ts +36 -0
- package/dist/backend/importers/TypeScriptManifestModules.d.ts.map +1 -0
- package/dist/backend/importers/TypeScriptManifestModules.js +347 -0
- package/dist/backend/importers/TypeScriptManifestModules.js.map +1 -0
- package/dist/backend/importers/TypeScriptNamedTypes.d.ts +22 -0
- package/dist/backend/importers/TypeScriptNamedTypes.d.ts.map +1 -0
- package/dist/backend/importers/TypeScriptNamedTypes.js +193 -0
- package/dist/backend/importers/TypeScriptNamedTypes.js.map +1 -0
- package/dist/backend/importers/TypeScriptProgram.d.ts +24 -0
- package/dist/backend/importers/TypeScriptProgram.d.ts.map +1 -0
- package/dist/backend/importers/TypeScriptProgram.js +141 -0
- package/dist/backend/importers/TypeScriptProgram.js.map +1 -0
- package/dist/backend/importers/TypeScriptStaticLinker.d.ts +17 -0
- package/dist/backend/importers/TypeScriptStaticLinker.d.ts.map +1 -0
- package/dist/backend/importers/TypeScriptStaticLinker.js +702 -0
- package/dist/backend/importers/TypeScriptStaticLinker.js.map +1 -0
- package/dist/backend/importers/TypeScriptTranspilationOptions.d.ts +3 -0
- package/dist/backend/importers/TypeScriptTranspilationOptions.d.ts.map +1 -0
- package/dist/backend/importers/TypeScriptTranspilationOptions.js +82 -0
- package/dist/backend/importers/TypeScriptTranspilationOptions.js.map +1 -0
- package/dist/backend/importers/TypeScriptTranspiler.d.ts +13 -0
- package/dist/backend/importers/TypeScriptTranspiler.d.ts.map +1 -0
- package/dist/backend/importers/TypeScriptTranspiler.js +241 -0
- package/dist/backend/importers/TypeScriptTranspiler.js.map +1 -0
- package/dist/backend/importers/binaryResourceImporter.d.ts +5 -14
- package/dist/backend/importers/binaryResourceImporter.d.ts.map +1 -1
- package/dist/backend/importers/binaryResourceImporter.js +6 -34
- package/dist/backend/importers/binaryResourceImporter.js.map +1 -1
- package/dist/backend/importers/textResourceImporter.d.ts +5 -15
- package/dist/backend/importers/textResourceImporter.d.ts.map +1 -1
- package/dist/backend/importers/textResourceImporter.js +6 -36
- package/dist/backend/importers/textResourceImporter.js.map +1 -1
- package/dist/backend/importers/tic80CartImporter.d.ts +12 -15
- package/dist/backend/importers/tic80CartImporter.d.ts.map +1 -1
- package/dist/backend/importers/tic80CartImporter.js +49 -84
- package/dist/backend/importers/tic80CartImporter.js.map +1 -1
- package/dist/backend/importers/tsconfigUtils.d.ts +10 -0
- package/dist/backend/importers/tsconfigUtils.d.ts.map +1 -0
- package/dist/backend/importers/tsconfigUtils.js +152 -0
- package/dist/backend/importers/tsconfigUtils.js.map +1 -0
- package/dist/backend/luaEncode.d.ts +4 -4
- package/dist/backend/luaEncode.d.ts.map +1 -1
- package/dist/backend/luaEncode.js +39 -39
- package/dist/backend/luaEncode.js.map +1 -1
- package/dist/backend/luaEncode.test.js +68 -0
- package/dist/backend/luaEncode.test.js.map +1 -1
- package/dist/backend/luaPreprocessor.d.ts +18 -1
- package/dist/backend/luaPreprocessor.d.ts.map +1 -1
- package/dist/backend/luaPreprocessor.js +581 -232
- package/dist/backend/luaPreprocessor.js.map +1 -1
- package/dist/backend/luaPreprocessor.test.js +293 -12
- package/dist/backend/luaPreprocessor.test.js.map +1 -1
- package/dist/backend/luaPreprocessorSyntax.d.ts +25 -0
- package/dist/backend/luaPreprocessorSyntax.d.ts.map +1 -0
- package/dist/backend/luaPreprocessorSyntax.js +74 -0
- package/dist/backend/luaPreprocessorSyntax.js.map +1 -0
- package/dist/backend/luaPreprocessorSyntax.test.d.ts +2 -0
- package/dist/backend/luaPreprocessorSyntax.test.d.ts.map +1 -0
- package/dist/backend/luaPreprocessorSyntax.test.js +30 -0
- package/dist/backend/luaPreprocessorSyntax.test.js.map +1 -0
- package/dist/backend/manifestLoader.test.js +174 -1
- package/dist/backend/manifestLoader.test.js.map +1 -1
- package/dist/backend/manifestTypes.d.ts +127 -65
- package/dist/backend/manifestTypes.d.ts.map +1 -1
- package/dist/backend/manifestTypes.js +3 -0
- package/dist/backend/manifestTypes.js.map +1 -1
- package/dist/backend/preprocessorDefines.d.ts +4 -0
- package/dist/backend/preprocessorDefines.d.ts.map +1 -0
- package/dist/backend/preprocessorDefines.js +15 -0
- package/dist/backend/preprocessorDefines.js.map +1 -0
- package/dist/backend/project.d.ts +8 -2
- package/dist/backend/project.d.ts.map +1 -1
- package/dist/backend/project.js +159 -115
- package/dist/backend/project.js.map +1 -1
- package/dist/backend/project.test.d.ts +2 -0
- package/dist/backend/project.test.d.ts.map +1 -0
- package/dist/backend/project.test.js +196 -0
- package/dist/backend/project.test.js.map +1 -0
- package/dist/backend/projectCore.d.ts +6 -4
- package/dist/backend/projectCore.d.ts.map +1 -1
- package/dist/backend/projectCore.js +36 -44
- package/dist/backend/projectCore.js.map +1 -1
- package/dist/backend/projectCore.test.d.ts +2 -0
- package/dist/backend/projectCore.test.d.ts.map +1 -0
- package/dist/backend/projectCore.test.js +12 -0
- package/dist/backend/projectCore.test.js.map +1 -0
- package/dist/backend/projectEnvironment.d.ts +8 -0
- package/dist/backend/projectEnvironment.d.ts.map +1 -0
- package/dist/backend/projectEnvironment.js +70 -0
- package/dist/backend/projectEnvironment.js.map +1 -0
- package/dist/backend/projectEnvironment.test.d.ts +2 -0
- package/dist/backend/projectEnvironment.test.d.ts.map +1 -0
- package/dist/backend/projectEnvironment.test.js +90 -0
- package/dist/backend/projectEnvironment.test.js.map +1 -0
- package/dist/backend/projectFiles.d.ts +32 -0
- package/dist/backend/projectFiles.d.ts.map +1 -0
- package/dist/backend/projectFiles.js +148 -0
- package/dist/backend/projectFiles.js.map +1 -0
- package/dist/backend/projectFiles.test.d.ts +2 -0
- package/dist/backend/projectFiles.test.d.ts.map +1 -0
- package/dist/backend/projectFiles.test.js +136 -0
- package/dist/backend/projectFiles.test.js.map +1 -0
- package/dist/backend/sourceMap.d.ts +40 -3
- package/dist/backend/sourceMap.d.ts.map +1 -1
- package/dist/backend/sourceMap.js +333 -64
- package/dist/backend/sourceMap.js.map +1 -1
- package/dist/backend/sourceMap.test.js +81 -0
- package/dist/backend/sourceMap.test.js.map +1 -1
- package/dist/backend/sourceMapLookup.d.ts +36 -0
- package/dist/backend/sourceMapLookup.d.ts.map +1 -0
- package/dist/backend/sourceMapLookup.js +170 -0
- package/dist/backend/sourceMapLookup.js.map +1 -0
- package/dist/backend/sourceMapLookup.test.d.ts +2 -0
- package/dist/backend/sourceMapLookup.test.d.ts.map +1 -0
- package/dist/backend/sourceMapLookup.test.js +132 -0
- package/dist/backend/sourceMapLookup.test.js.map +1 -0
- package/dist/backend/sourceMapV3.d.ts +8 -0
- package/dist/backend/sourceMapV3.d.ts.map +1 -0
- package/dist/backend/sourceMapV3.js +212 -0
- package/dist/backend/sourceMapV3.js.map +1 -0
- package/dist/backend/sourceMapV3.test.d.ts +2 -0
- package/dist/backend/sourceMapV3.test.d.ts.map +1 -0
- package/dist/backend/sourceMapV3.test.js +109 -0
- package/dist/backend/sourceMapV3.test.js.map +1 -0
- package/dist/backend/symbolIndex.d.ts +2 -12
- package/dist/backend/symbolIndex.d.ts.map +1 -1
- package/dist/backend/symbolIndex.js +18 -107
- package/dist/backend/symbolIndex.js.map +1 -1
- package/dist/backend/symbolIndex.test.js +6 -1
- package/dist/backend/symbolIndex.test.js.map +1 -1
- package/dist/backend/tic80Controller/customController.d.ts +7 -1
- package/dist/backend/tic80Controller/customController.d.ts.map +1 -1
- package/dist/backend/tic80Controller/customController.js +25 -11
- package/dist/backend/tic80Controller/customController.js.map +1 -1
- package/dist/backend/tic80Controller/customController.test.js +17 -4
- package/dist/backend/tic80Controller/customController.test.js.map +1 -1
- package/dist/backend/tic80Controller/remotingClient.d.ts.map +1 -1
- package/dist/backend/tic80Controller/remotingClient.js +2 -1
- package/dist/backend/tic80Controller/remotingClient.js.map +1 -1
- package/dist/backend/tic80Controller/remotingProtocol.d.ts +2 -0
- package/dist/backend/tic80Controller/remotingProtocol.d.ts.map +1 -1
- package/dist/backend/tic80Controller/remotingProtocol.js +19 -0
- package/dist/backend/tic80Controller/remotingProtocol.js.map +1 -1
- package/dist/backend/tic80Controller/remotingProtocol.test.js +16 -0
- package/dist/backend/tic80Controller/remotingProtocol.test.js.map +1 -1
- package/dist/backend/tic80Controller/scriptErrorProtocol.d.ts +41 -0
- package/dist/backend/tic80Controller/scriptErrorProtocol.d.ts.map +1 -0
- package/dist/backend/tic80Controller/scriptErrorProtocol.js +98 -0
- package/dist/backend/tic80Controller/scriptErrorProtocol.js.map +1 -0
- package/dist/backend/tic80Controller/scriptErrorProtocol.test.d.ts +2 -0
- package/dist/backend/tic80Controller/scriptErrorProtocol.test.d.ts.map +1 -0
- package/dist/backend/tic80Controller/scriptErrorProtocol.test.js +78 -0
- package/dist/backend/tic80Controller/scriptErrorProtocol.test.js.map +1 -0
- package/dist/backend/tic80Controller/tic80Controller.d.ts +7 -0
- package/dist/backend/tic80Controller/tic80Controller.d.ts.map +1 -1
- package/dist/backend/tic80Controller/vanillaController.d.ts +3 -5
- package/dist/backend/tic80Controller/vanillaController.d.ts.map +1 -1
- package/dist/backend/tic80Controller/vanillaController.js +19 -18
- package/dist/backend/tic80Controller/vanillaController.js.map +1 -1
- package/dist/backend/tic80Controller/vanillaController.test.d.ts +2 -0
- package/dist/backend/tic80Controller/vanillaController.test.d.ts.map +1 -0
- package/dist/backend/tic80Controller/vanillaController.test.js +36 -0
- package/dist/backend/tic80Controller/vanillaController.test.js.map +1 -0
- package/dist/backend/tic80Resolver.d.ts +2 -0
- package/dist/backend/tic80Resolver.d.ts.map +1 -1
- package/dist/backend/tic80Resolver.js +15 -47
- package/dist/backend/tic80Resolver.js.map +1 -1
- package/dist/backend/tic80Resolver.test.d.ts +2 -0
- package/dist/backend/tic80Resolver.test.d.ts.map +1 -0
- package/dist/backend/tic80Resolver.test.js +34 -0
- package/dist/backend/tic80Resolver.test.js.map +1 -0
- package/dist/benchmarks/luaMinifiers.d.ts +50 -0
- package/dist/benchmarks/luaMinifiers.d.ts.map +1 -0
- package/dist/benchmarks/luaMinifiers.js +219 -0
- package/dist/benchmarks/luaMinifiers.js.map +1 -0
- package/dist/benchmarks/luaMinifiers.test.d.ts +2 -0
- package/dist/benchmarks/luaMinifiers.test.d.ts.map +1 -0
- package/dist/benchmarks/luaMinifiers.test.js +68 -0
- package/dist/benchmarks/luaMinifiers.test.js.map +1 -0
- package/dist/buildInfo.d.ts +7 -4
- package/dist/buildInfo.d.ts.map +1 -1
- package/dist/buildInfo.js +7 -4
- package/dist/buildInfo.js.map +1 -1
- package/dist/frontend/build.d.ts.map +1 -1
- package/dist/frontend/build.js +3 -5
- package/dist/frontend/build.js.map +1 -1
- package/dist/frontend/buildReporter.d.ts +10 -2
- package/dist/frontend/buildReporter.d.ts.map +1 -1
- package/dist/frontend/buildReporter.js +4 -1
- package/dist/frontend/buildReporter.js.map +1 -1
- package/dist/frontend/buildReporter.test.js +51 -2
- package/dist/frontend/buildReporter.test.js.map +1 -1
- package/dist/frontend/cartUsage.d.ts +20 -0
- package/dist/frontend/cartUsage.d.ts.map +1 -0
- package/dist/frontend/cartUsage.js +103 -0
- package/dist/frontend/cartUsage.js.map +1 -0
- package/dist/frontend/codeBankPlacement.test.d.ts +2 -0
- package/dist/frontend/codeBankPlacement.test.d.ts.map +1 -0
- package/dist/frontend/codeBankPlacement.test.js +89 -0
- package/dist/frontend/codeBankPlacement.test.js.map +1 -0
- package/dist/frontend/codeBankWarnings.test.js +1 -0
- package/dist/frontend/codeBankWarnings.test.js.map +1 -1
- package/dist/frontend/core.d.ts +7 -2
- package/dist/frontend/core.d.ts.map +1 -1
- package/dist/frontend/core.js +301 -300
- package/dist/frontend/core.js.map +1 -1
- package/dist/frontend/init.d.ts +1 -0
- package/dist/frontend/init.d.ts.map +1 -1
- package/dist/frontend/init.js +34 -11
- package/dist/frontend/init.js.map +1 -1
- package/dist/frontend/init.test.d.ts +2 -0
- package/dist/frontend/init.test.d.ts.map +1 -0
- package/dist/frontend/init.test.js +190 -0
- package/dist/frontend/init.test.js.map +1 -0
- package/dist/frontend/inspect.d.ts +2 -0
- package/dist/frontend/inspect.d.ts.map +1 -0
- package/dist/frontend/inspect.js +62 -0
- package/dist/frontend/inspect.js.map +1 -0
- package/dist/frontend/inspect.test.d.ts +2 -0
- package/dist/frontend/inspect.test.d.ts.map +1 -0
- package/dist/frontend/inspect.test.js +126 -0
- package/dist/frontend/inspect.test.js.map +1 -0
- package/dist/frontend/luaCodeArtifacts.test.js +39 -1
- package/dist/frontend/luaCodeArtifacts.test.js.map +1 -1
- package/dist/frontend/packageInstaller.d.ts +2 -0
- package/dist/frontend/packageInstaller.d.ts.map +1 -0
- package/dist/frontend/packageInstaller.js +59 -0
- package/dist/frontend/packageInstaller.js.map +1 -0
- package/dist/frontend/parseOptions.d.ts +4 -1
- package/dist/frontend/parseOptions.d.ts.map +1 -1
- package/dist/frontend/parseOptions.js +13 -8
- package/dist/frontend/parseOptions.js.map +1 -1
- package/dist/frontend/parseOptions.test.d.ts +2 -0
- package/dist/frontend/parseOptions.test.d.ts.map +1 -0
- package/dist/frontend/parseOptions.test.js +65 -0
- package/dist/frontend/parseOptions.test.js.map +1 -0
- package/dist/frontend/projectFiles.d.ts +4 -0
- package/dist/frontend/projectFiles.d.ts.map +1 -0
- package/dist/frontend/projectFiles.js +95 -0
- package/dist/frontend/projectFiles.js.map +1 -0
- package/dist/frontend/projectFiles.test.d.ts +2 -0
- package/dist/frontend/projectFiles.test.d.ts.map +1 -0
- package/dist/frontend/projectFiles.test.js +106 -0
- package/dist/frontend/projectFiles.test.js.map +1 -0
- package/dist/frontend/run.d.ts.map +1 -1
- package/dist/frontend/run.js +3 -1
- package/dist/frontend/run.js.map +1 -1
- package/dist/frontend/scriptErrorPresentation.d.ts +9 -0
- package/dist/frontend/scriptErrorPresentation.d.ts.map +1 -0
- package/dist/frontend/scriptErrorPresentation.js +76 -0
- package/dist/frontend/scriptErrorPresentation.js.map +1 -0
- package/dist/frontend/scriptErrorPresentation.test.d.ts +2 -0
- package/dist/frontend/scriptErrorPresentation.test.d.ts.map +1 -0
- package/dist/frontend/scriptErrorPresentation.test.js +137 -0
- package/dist/frontend/scriptErrorPresentation.test.js.map +1 -0
- package/dist/frontend/scriptErrorSourceMapper.d.ts +15 -0
- package/dist/frontend/scriptErrorSourceMapper.d.ts.map +1 -0
- package/dist/frontend/scriptErrorSourceMapper.js +177 -0
- package/dist/frontend/scriptErrorSourceMapper.js.map +1 -0
- package/dist/frontend/scriptErrorSourceMapper.test.d.ts +2 -0
- package/dist/frontend/scriptErrorSourceMapper.test.d.ts.map +1 -0
- package/dist/frontend/scriptErrorSourceMapper.test.js +189 -0
- package/dist/frontend/scriptErrorSourceMapper.test.js.map +1 -0
- package/dist/frontend/terminal.d.ts +28 -2
- package/dist/frontend/terminal.d.ts.map +1 -1
- package/dist/frontend/terminal.js +465 -25
- package/dist/frontend/terminal.js.map +1 -1
- package/dist/frontend/terminal.test.js +563 -0
- package/dist/frontend/terminal.test.js.map +1 -1
- package/dist/frontend/typescriptExample.test.d.ts +2 -0
- package/dist/frontend/typescriptExample.test.d.ts.map +1 -0
- package/dist/frontend/typescriptExample.test.js +92 -0
- package/dist/frontend/typescriptExample.test.js.map +1 -0
- package/dist/frontend/watch.d.ts.map +1 -1
- package/dist/frontend/watch.js +160 -39
- package/dist/frontend/watch.js.map +1 -1
- package/dist/frontend/watch.test.js +3 -1
- package/dist/frontend/watch.test.js.map +1 -1
- package/dist/index.js +61 -20
- package/dist/index.js.map +1 -1
- package/dist/obj/build.jsonl +5 -0
- package/dist/obj/build.log +11 -5
- package/dist/obj/build.trace.json +89 -0
- package/dist/obj/resolvedManifest.ticbuild.jsonc +4 -3
- package/dist/obj/variables.json +2 -2
- package/dist/projectFileInventory.d.ts +40 -0
- package/dist/projectFileInventory.d.ts.map +1 -0
- package/dist/projectFileInventory.js +36 -0
- package/dist/projectFileInventory.js.map +1 -0
- package/dist/utils/console.d.ts +1 -1
- package/dist/utils/console.d.ts.map +1 -1
- package/dist/utils/console.js +1 -1
- package/dist/utils/console.js.map +1 -1
- package/dist/utils/encoding/base64.d.ts +3 -0
- package/dist/utils/encoding/base64.d.ts.map +1 -0
- package/dist/utils/encoding/base64.js +51 -0
- package/dist/utils/encoding/base64.js.map +1 -0
- package/dist/utils/encoding/codecRegistry.d.ts +69 -12
- package/dist/utils/encoding/codecRegistry.d.ts.map +1 -1
- package/dist/utils/encoding/codecRegistry.js +6 -0
- package/dist/utils/encoding/codecRegistry.js.map +1 -1
- package/dist/utils/encoding/hex.d.ts.map +1 -1
- package/dist/utils/encoding/hex.js +3 -0
- package/dist/utils/encoding/hex.js.map +1 -1
- package/dist/utils/encoding/lz.d.ts +25 -5
- package/dist/utils/encoding/lz.d.ts.map +1 -1
- package/dist/utils/encoding/lz.js +160 -48
- package/dist/utils/encoding/lz.js.map +1 -1
- package/dist/utils/encoding/lz.test.d.ts +2 -0
- package/dist/utils/encoding/lz.test.d.ts.map +1 -0
- package/dist/utils/encoding/lz.test.js +95 -0
- package/dist/utils/encoding/lz.test.js.map +1 -0
- package/dist/utils/encoding/payloadOutput.d.ts +4 -0
- package/dist/utils/encoding/payloadOutput.d.ts.map +1 -0
- package/dist/utils/encoding/payloadOutput.js +12 -0
- package/dist/utils/encoding/payloadOutput.js.map +1 -0
- package/dist/utils/encoding/payloadOutput.test.d.ts +2 -0
- package/dist/utils/encoding/payloadOutput.test.d.ts.map +1 -0
- package/dist/utils/encoding/payloadOutput.test.js +21 -0
- package/dist/utils/encoding/payloadOutput.test.js.map +1 -0
- package/dist/utils/encoding/payloadTextEncoding.d.ts +6 -0
- package/dist/utils/encoding/payloadTextEncoding.d.ts.map +1 -0
- package/dist/utils/encoding/payloadTextEncoding.js +39 -0
- package/dist/utils/encoding/payloadTextEncoding.js.map +1 -0
- package/dist/utils/encoding/payloadTextEncoding.test.d.ts +2 -0
- package/dist/utils/encoding/payloadTextEncoding.test.d.ts.map +1 -0
- package/dist/utils/encoding/payloadTextEncoding.test.js +31 -0
- package/dist/utils/encoding/payloadTextEncoding.test.js.map +1 -0
- package/dist/utils/errorHandling.d.ts +1 -0
- package/dist/utils/errorHandling.d.ts.map +1 -1
- package/dist/utils/errorHandling.js +4 -0
- package/dist/utils/errorHandling.js.map +1 -1
- package/dist/utils/errorHandling.test.d.ts +2 -0
- package/dist/utils/errorHandling.test.d.ts.map +1 -0
- package/dist/utils/errorHandling.test.js +17 -0
- package/dist/utils/errorHandling.test.js.map +1 -0
- package/dist/utils/fileSystem.d.ts +3 -1
- package/dist/utils/fileSystem.d.ts.map +1 -1
- package/dist/utils/fileSystem.js +16 -16
- package/dist/utils/fileSystem.js.map +1 -1
- package/dist/utils/help.d.ts +2 -1
- package/dist/utils/help.d.ts.map +1 -1
- package/dist/utils/help.js +8 -3
- package/dist/utils/help.js.map +1 -1
- package/dist/utils/lua/LuaCATS.d.ts +31 -0
- package/dist/utils/lua/LuaCATS.d.ts.map +1 -0
- package/dist/utils/lua/LuaCATS.js +159 -0
- package/dist/utils/lua/LuaCATS.js.map +1 -0
- package/dist/utils/lua/LuaCATS_declarations.d.ts +22 -0
- package/dist/utils/lua/LuaCATS_declarations.d.ts.map +1 -0
- package/dist/utils/lua/LuaCATS_declarations.js +107 -0
- package/dist/utils/lua/LuaCATS_declarations.js.map +1 -0
- package/dist/utils/lua/LuaCATS_declarations.test.d.ts +2 -0
- package/dist/utils/lua/LuaCATS_declarations.test.d.ts.map +1 -0
- package/dist/utils/lua/LuaCATS_declarations.test.js +38 -0
- package/dist/utils/lua/LuaCATS_declarations.test.js.map +1 -0
- package/dist/utils/lua/LuaCATS_types.d.ts +52 -0
- package/dist/utils/lua/LuaCATS_types.d.ts.map +1 -0
- package/dist/utils/lua/LuaCATS_types.js +202 -0
- package/dist/utils/lua/LuaCATS_types.js.map +1 -0
- package/dist/utils/lua/LuaCATS_types.test.d.ts +2 -0
- package/dist/utils/lua/LuaCATS_types.test.d.ts.map +1 -0
- package/dist/utils/lua/LuaCATS_types.test.js +38 -0
- package/dist/utils/lua/LuaCATS_types.test.js.map +1 -0
- package/dist/utils/lua/lua_alias_expressions.d.ts +2 -0
- package/dist/utils/lua/lua_alias_expressions.d.ts.map +1 -1
- package/dist/utils/lua/lua_alias_expressions.js +12 -1
- package/dist/utils/lua/lua_alias_expressions.js.map +1 -1
- package/dist/utils/lua/lua_alias_literals.d.ts +2 -0
- package/dist/utils/lua/lua_alias_literals.d.ts.map +1 -1
- package/dist/utils/lua/lua_alias_literals.js +12 -1
- package/dist/utils/lua/lua_alias_literals.js.map +1 -1
- package/dist/utils/lua/lua_alias_shared.d.ts +0 -1
- package/dist/utils/lua/lua_alias_shared.d.ts.map +1 -1
- package/dist/utils/lua/lua_alias_shared.js +60 -56
- package/dist/utils/lua/lua_alias_shared.js.map +1 -1
- package/dist/utils/lua/lua_ast.d.ts +0 -1
- package/dist/utils/lua/lua_ast.d.ts.map +1 -1
- package/dist/utils/lua/lua_ast.js +0 -6
- package/dist/utils/lua/lua_ast.js.map +1 -1
- package/dist/utils/lua/lua_ast_printer.d.ts +55 -0
- package/dist/utils/lua/lua_ast_printer.d.ts.map +1 -0
- package/dist/utils/lua/lua_ast_printer.js +1043 -0
- package/dist/utils/lua/lua_ast_printer.js.map +1 -0
- package/dist/utils/lua/lua_ast_provenance.d.ts +13 -0
- package/dist/utils/lua/lua_ast_provenance.d.ts.map +1 -0
- package/dist/utils/lua/lua_ast_provenance.js +67 -0
- package/dist/utils/lua/lua_ast_provenance.js.map +1 -0
- package/dist/utils/lua/lua_ast_rewrite.d.ts +20 -0
- package/dist/utils/lua/lua_ast_rewrite.d.ts.map +1 -0
- package/dist/utils/lua/lua_ast_rewrite.js +198 -0
- package/dist/utils/lua/lua_ast_rewrite.js.map +1 -0
- package/dist/utils/lua/lua_binding_optimizations.test.d.ts +2 -0
- package/dist/utils/lua/lua_binding_optimizations.test.d.ts.map +1 -0
- package/dist/utils/lua/lua_binding_optimizations.test.js +247 -0
- package/dist/utils/lua/lua_binding_optimizations.test.js.map +1 -0
- package/dist/utils/lua/lua_canonicalization_rules.test.d.ts +2 -0
- package/dist/utils/lua/lua_canonicalization_rules.test.d.ts.map +1 -0
- package/dist/utils/lua/lua_canonicalization_rules.test.js +194 -0
- package/dist/utils/lua/lua_canonicalization_rules.test.js.map +1 -0
- package/dist/utils/lua/lua_constant_literals.d.ts +7 -0
- package/dist/utils/lua/lua_constant_literals.d.ts.map +1 -0
- package/dist/utils/lua/lua_constant_literals.js +39 -0
- package/dist/utils/lua/lua_constant_literals.js.map +1 -0
- package/dist/utils/lua/lua_control_flow_invert_negated_if.d.ts +3 -0
- package/dist/utils/lua/lua_control_flow_invert_negated_if.d.ts.map +1 -0
- package/dist/utils/lua/lua_control_flow_invert_negated_if.js +37 -0
- package/dist/utils/lua/lua_control_flow_invert_negated_if.js.map +1 -0
- package/dist/utils/lua/lua_control_flow_remove_false_while.d.ts +3 -0
- package/dist/utils/lua/lua_control_flow_remove_false_while.d.ts.map +1 -0
- package/dist/utils/lua/lua_control_flow_remove_false_while.js +26 -0
- package/dist/utils/lua/lua_control_flow_remove_false_while.js.map +1 -0
- package/dist/utils/lua/lua_control_flow_resolve_constant_if.d.ts +3 -0
- package/dist/utils/lua/lua_control_flow_resolve_constant_if.d.ts.map +1 -0
- package/dist/utils/lua/lua_control_flow_resolve_constant_if.js +83 -0
- package/dist/utils/lua/lua_control_flow_resolve_constant_if.js.map +1 -0
- package/dist/utils/lua/lua_debug.d.ts +16 -0
- package/dist/utils/lua/lua_debug.d.ts.map +1 -0
- package/dist/utils/lua/lua_debug.js +42 -0
- package/dist/utils/lua/lua_debug.js.map +1 -0
- package/dist/utils/lua/lua_debug.test.d.ts +2 -0
- package/dist/utils/lua/lua_debug.test.d.ts.map +1 -0
- package/dist/utils/lua/lua_debug.test.js +24 -0
- package/dist/utils/lua/lua_debug.test.js.map +1 -0
- package/dist/utils/lua/lua_doc.d.ts +15 -0
- package/dist/utils/lua/lua_doc.d.ts.map +1 -1
- package/dist/utils/lua/lua_doc.js +96 -0
- package/dist/utils/lua/lua_doc.js.map +1 -1
- package/dist/utils/lua/lua_doc_types.d.ts +36 -0
- package/dist/utils/lua/lua_doc_types.d.ts.map +1 -0
- package/dist/utils/lua/lua_doc_types.js +122 -0
- package/dist/utils/lua/lua_doc_types.js.map +1 -0
- package/dist/utils/lua/lua_doc_types.test.d.ts +2 -0
- package/dist/utils/lua/lua_doc_types.test.d.ts.map +1 -0
- package/dist/utils/lua/lua_doc_types.test.js +33 -0
- package/dist/utils/lua/lua_doc_types.test.js.map +1 -0
- package/dist/utils/lua/lua_expression_effects.d.ts +3 -0
- package/dist/utils/lua/lua_expression_effects.d.ts.map +1 -0
- package/dist/utils/lua/lua_expression_effects.js +33 -0
- package/dist/utils/lua/lua_expression_effects.js.map +1 -0
- package/dist/utils/lua/lua_fundamentals.d.ts +4 -0
- package/dist/utils/lua/lua_fundamentals.d.ts.map +1 -1
- package/dist/utils/lua/lua_fundamentals.js +35 -3
- package/dist/utils/lua/lua_fundamentals.js.map +1 -1
- package/dist/utils/lua/lua_inline_immutable_aliases.d.ts +3 -0
- package/dist/utils/lua/lua_inline_immutable_aliases.d.ts.map +1 -0
- package/dist/utils/lua/lua_inline_immutable_aliases.js +124 -0
- package/dist/utils/lua/lua_inline_immutable_aliases.js.map +1 -0
- package/dist/utils/lua/lua_inline_immutable_scalars.d.ts +3 -0
- package/dist/utils/lua/lua_inline_immutable_scalars.d.ts.map +1 -0
- package/dist/utils/lua/lua_inline_immutable_scalars.js +230 -0
- package/dist/utils/lua/lua_inline_immutable_scalars.js.map +1 -0
- package/dist/utils/lua/lua_inline_single_use_expressions.d.ts +3 -0
- package/dist/utils/lua/lua_inline_single_use_expressions.d.ts.map +1 -0
- package/dist/utils/lua/lua_inline_single_use_expressions.js +105 -0
- package/dist/utils/lua/lua_inline_single_use_expressions.js.map +1 -0
- package/dist/utils/lua/lua_lexical_bindings.d.ts +25 -0
- package/dist/utils/lua/lua_lexical_bindings.d.ts.map +1 -0
- package/dist/utils/lua/lua_lexical_bindings.js +233 -0
- package/dist/utils/lua/lua_lexical_bindings.js.map +1 -0
- package/dist/utils/lua/lua_local_budget.test.js +12 -1
- package/dist/utils/lua/lua_local_budget.test.js.map +1 -1
- package/dist/utils/lua/lua_optimizer.d.ts +10 -0
- package/dist/utils/lua/lua_optimizer.d.ts.map +1 -0
- package/dist/utils/lua/lua_optimizer.js +128 -0
- package/dist/utils/lua/lua_optimizer.js.map +1 -0
- package/dist/utils/lua/lua_optimizer.test.d.ts +2 -0
- package/dist/utils/lua/lua_optimizer.test.d.ts.map +1 -0
- package/dist/utils/lua/lua_optimizer.test.js +262 -0
- package/dist/utils/lua/lua_optimizer.test.js.map +1 -0
- package/dist/utils/lua/lua_optimizer_fingerprint.d.ts +3 -0
- package/dist/utils/lua/lua_optimizer_fingerprint.d.ts.map +1 -0
- package/dist/utils/lua/lua_optimizer_fingerprint.js +50 -0
- package/dist/utils/lua/lua_optimizer_fingerprint.js.map +1 -0
- package/dist/utils/lua/lua_optimizer_rules.d.ts +3 -0
- package/dist/utils/lua/lua_optimizer_rules.d.ts.map +1 -0
- package/dist/utils/lua/lua_optimizer_rules.js +57 -0
- package/dist/utils/lua/lua_optimizer_rules.js.map +1 -0
- package/dist/utils/lua/lua_optimizer_types.d.ts +55 -0
- package/dist/utils/lua/lua_optimizer_types.d.ts.map +1 -0
- package/dist/utils/lua/lua_optimizer_types.js +31 -0
- package/dist/utils/lua/lua_optimizer_types.js.map +1 -0
- package/dist/utils/lua/lua_pack_locals.d.ts +2 -0
- package/dist/utils/lua/lua_pack_locals.d.ts.map +1 -1
- package/dist/utils/lua/lua_pack_locals.js +58 -14
- package/dist/utils/lua/lua_pack_locals.js.map +1 -1
- package/dist/utils/lua/lua_print_trace.d.ts +4 -0
- package/dist/utils/lua/lua_print_trace.d.ts.map +1 -0
- package/dist/utils/lua/lua_print_trace.js +166 -0
- package/dist/utils/lua/lua_print_trace.js.map +1 -0
- package/dist/utils/lua/lua_printer.d.ts +11 -0
- package/dist/utils/lua/lua_printer.d.ts.map +1 -0
- package/dist/utils/lua/lua_printer.js +105 -0
- package/dist/utils/lua/lua_printer.js.map +1 -0
- package/dist/utils/lua/lua_printer_lexemes.d.ts +22 -0
- package/dist/utils/lua/lua_printer_lexemes.d.ts.map +1 -0
- package/dist/utils/lua/lua_printer_lexemes.js +111 -0
- package/dist/utils/lua/lua_printer_lexemes.js.map +1 -0
- package/dist/utils/lua/lua_printer_tight2.d.ts +2 -0
- package/dist/utils/lua/lua_printer_tight2.d.ts.map +1 -0
- package/dist/utils/lua/lua_printer_tight2.js +64 -0
- package/dist/utils/lua/lua_printer_tight2.js.map +1 -0
- package/dist/utils/lua/lua_printer_traceable.d.ts +2 -0
- package/dist/utils/lua/lua_printer_traceable.d.ts.map +1 -0
- package/dist/utils/lua/lua_printer_traceable.js +107 -0
- package/dist/utils/lua/lua_printer_traceable.js.map +1 -0
- package/dist/utils/lua/lua_printer_types.d.ts +7 -0
- package/dist/utils/lua/lua_printer_types.d.ts.map +1 -0
- package/dist/utils/lua/lua_printer_types.js +3 -0
- package/dist/utils/lua/lua_printer_types.js.map +1 -0
- package/dist/utils/lua/lua_processor.d.ts +15 -72
- package/dist/utils/lua/lua_processor.d.ts.map +1 -1
- package/dist/utils/lua/lua_processor.js +177 -1205
- package/dist/utils/lua/lua_processor.js.map +1 -1
- package/dist/utils/lua/lua_processor.test.js +450 -101
- package/dist/utils/lua/lua_processor.test.js.map +1 -1
- package/dist/utils/lua/lua_remove_dead_stores.d.ts +3 -0
- package/dist/utils/lua/lua_remove_dead_stores.d.ts.map +1 -0
- package/dist/utils/lua/lua_remove_dead_stores.js +108 -0
- package/dist/utils/lua/lua_remove_dead_stores.js.map +1 -0
- package/dist/utils/lua/lua_remove_self_assignments.d.ts +3 -0
- package/dist/utils/lua/lua_remove_self_assignments.d.ts.map +1 -0
- package/dist/utils/lua/lua_remove_self_assignments.js +40 -0
- package/dist/utils/lua/lua_remove_self_assignments.js.map +1 -0
- package/dist/utils/lua/lua_remove_unused_for_variables.d.ts +3 -0
- package/dist/utils/lua/lua_remove_unused_for_variables.d.ts.map +1 -0
- package/dist/utils/lua/lua_remove_unused_for_variables.js +40 -0
- package/dist/utils/lua/lua_remove_unused_for_variables.js.map +1 -0
- package/dist/utils/lua/lua_remove_unused_functions.d.ts +2 -0
- package/dist/utils/lua/lua_remove_unused_functions.d.ts.map +1 -1
- package/dist/utils/lua/lua_remove_unused_functions.js +29 -6
- package/dist/utils/lua/lua_remove_unused_functions.js.map +1 -1
- package/dist/utils/lua/lua_remove_unused_locals.d.ts +2 -0
- package/dist/utils/lua/lua_remove_unused_locals.d.ts.map +1 -1
- package/dist/utils/lua/lua_remove_unused_locals.js +72 -289
- package/dist/utils/lua/lua_remove_unused_locals.js.map +1 -1
- package/dist/utils/lua/lua_remove_unused_parameters.d.ts +3 -0
- package/dist/utils/lua/lua_remove_unused_parameters.d.ts.map +1 -0
- package/dist/utils/lua/lua_remove_unused_parameters.js +124 -0
- package/dist/utils/lua/lua_remove_unused_parameters.js.map +1 -0
- package/dist/utils/lua/lua_rename_allowed_globals.d.ts +3 -0
- package/dist/utils/lua/lua_rename_allowed_globals.d.ts.map +1 -1
- package/dist/utils/lua/lua_rename_allowed_globals.js +78 -41
- package/dist/utils/lua/lua_rename_allowed_globals.js.map +1 -1
- package/dist/utils/lua/lua_rename_allowed_table_keys.d.ts +2 -0
- package/dist/utils/lua/lua_rename_allowed_table_keys.d.ts.map +1 -1
- package/dist/utils/lua/lua_rename_allowed_table_keys.js +57 -20
- package/dist/utils/lua/lua_rename_allowed_table_keys.js.map +1 -1
- package/dist/utils/lua/lua_rename_table_fields.d.ts +2 -0
- package/dist/utils/lua/lua_rename_table_fields.d.ts.map +1 -1
- package/dist/utils/lua/lua_rename_table_fields.js +15 -2
- package/dist/utils/lua/lua_rename_table_fields.js.map +1 -1
- package/dist/utils/lua/lua_renamer.d.ts +2 -0
- package/dist/utils/lua/lua_renamer.d.ts.map +1 -1
- package/dist/utils/lua/lua_renamer.js +146 -157
- package/dist/utils/lua/lua_renamer.js.map +1 -1
- package/dist/utils/lua/lua_scalar_simplification.test.d.ts +2 -0
- package/dist/utils/lua/lua_scalar_simplification.test.d.ts.map +1 -0
- package/dist/utils/lua/lua_scalar_simplification.test.js +293 -0
- package/dist/utils/lua/lua_scalar_simplification.test.js.map +1 -0
- package/dist/utils/lua/lua_scope_name_reuse.test.d.ts +2 -0
- package/dist/utils/lua/lua_scope_name_reuse.test.d.ts.map +1 -0
- package/dist/utils/lua/lua_scope_name_reuse.test.js +159 -0
- package/dist/utils/lua/lua_scope_name_reuse.test.js.map +1 -0
- package/dist/utils/lua/lua_simplify.d.ts +2 -0
- package/dist/utils/lua/lua_simplify.d.ts.map +1 -1
- package/dist/utils/lua/lua_simplify.js +236 -500
- package/dist/utils/lua/lua_simplify.js.map +1 -1
- package/dist/utils/lua/lua_source_mapping.test.d.ts +2 -0
- package/dist/utils/lua/lua_source_mapping.test.d.ts.map +1 -0
- package/dist/utils/lua/lua_source_mapping.test.js +182 -0
- package/dist/utils/lua/lua_source_mapping.test.js.map +1 -0
- package/dist/utils/lua/lua_string_literal.test.d.ts +2 -0
- package/dist/utils/lua/lua_string_literal.test.d.ts.map +1 -0
- package/dist/utils/lua/lua_string_literal.test.js +70 -0
- package/dist/utils/lua/lua_string_literal.test.js.map +1 -0
- package/dist/utils/lua/lua_strip_comments.d.ts +3 -0
- package/dist/utils/lua/lua_strip_comments.d.ts.map +1 -0
- package/dist/utils/lua/lua_strip_comments.js +15 -0
- package/dist/utils/lua/lua_strip_comments.js.map +1 -0
- package/dist/utils/lua/lua_symbol_collision.test.d.ts +2 -0
- package/dist/utils/lua/lua_symbol_collision.test.d.ts.map +1 -0
- package/dist/utils/lua/lua_symbol_collision.test.js +55 -0
- package/dist/utils/lua/lua_symbol_collision.test.js.map +1 -0
- package/dist/utils/lua/lua_symbols.d.ts +19 -0
- package/dist/utils/lua/lua_symbols.d.ts.map +1 -0
- package/dist/utils/lua/lua_symbols.js +258 -0
- package/dist/utils/lua/lua_symbols.js.map +1 -0
- package/dist/utils/lua/lua_symbols.test.d.ts +2 -0
- package/dist/utils/lua/lua_symbols.test.d.ts.map +1 -0
- package/dist/utils/lua/lua_symbols.test.js +75 -0
- package/dist/utils/lua/lua_symbols.test.js.map +1 -0
- package/dist/utils/lua/lua_syntax_bare_table_key.d.ts +3 -0
- package/dist/utils/lua/lua_syntax_bare_table_key.d.ts.map +1 -0
- package/dist/utils/lua/lua_syntax_bare_table_key.js +55 -0
- package/dist/utils/lua/lua_syntax_bare_table_key.js.map +1 -0
- package/dist/utils/lua/lua_syntax_member_access.d.ts +3 -0
- package/dist/utils/lua/lua_syntax_member_access.d.ts.map +1 -0
- package/dist/utils/lua/lua_syntax_member_access.js +40 -0
- package/dist/utils/lua/lua_syntax_member_access.js.map +1 -0
- package/dist/utils/lua/lua_syntax_omit_local_nil.d.ts +3 -0
- package/dist/utils/lua/lua_syntax_omit_local_nil.d.ts.map +1 -0
- package/dist/utils/lua/lua_syntax_omit_local_nil.js +32 -0
- package/dist/utils/lua/lua_syntax_omit_local_nil.js.map +1 -0
- package/dist/utils/lua/lua_syntax_remove_redundant_do.d.ts +3 -0
- package/dist/utils/lua/lua_syntax_remove_redundant_do.d.ts.map +1 -0
- package/dist/utils/lua/lua_syntax_remove_redundant_do.js +50 -0
- package/dist/utils/lua/lua_syntax_remove_redundant_do.js.map +1 -0
- package/dist/utils/lua/lua_transform_map.d.ts +36 -0
- package/dist/utils/lua/lua_transform_map.d.ts.map +1 -0
- package/dist/utils/lua/lua_transform_map.js +205 -0
- package/dist/utils/lua/lua_transform_map.js.map +1 -0
- package/dist/utils/lua/lua_utils.d.ts +2 -4
- package/dist/utils/lua/lua_utils.d.ts.map +1 -1
- package/dist/utils/lua/lua_utils.js +100 -37
- package/dist/utils/lua/lua_utils.js.map +1 -1
- package/dist/utils/templates.d.ts +1 -0
- package/dist/utils/templates.d.ts.map +1 -1
- package/dist/utils/templates.js +4 -0
- package/dist/utils/templates.js.map +1 -1
- package/dist/utils/tic80/cartLoader.d.ts.map +1 -1
- package/dist/utils/tic80/cartLoader.js +7 -5
- package/dist/utils/tic80/cartLoader.js.map +1 -1
- package/dist/utils/tic80/cartLoader.test.d.ts +2 -0
- package/dist/utils/tic80/cartLoader.test.d.ts.map +1 -0
- package/dist/utils/tic80/cartLoader.test.js +100 -0
- package/dist/utils/tic80/cartLoader.test.js.map +1 -0
- package/dist/utils/tic80/cartWriter.d.ts +2 -2
- package/dist/utils/tic80/cartWriter.d.ts.map +1 -1
- package/dist/utils/tic80/cartWriter.js +22 -17
- package/dist/utils/tic80/cartWriter.js.map +1 -1
- package/dist/utils/tic80/launch.d.ts +1 -1
- package/dist/utils/tic80/launch.d.ts.map +1 -1
- package/dist/utils/tic80/launch.js +2 -1
- package/dist/utils/tic80/launch.js.map +1 -1
- package/dist/utils/tic80/tic80.d.ts +52 -50
- package/dist/utils/tic80/tic80.d.ts.map +1 -1
- package/dist/utils/tic80/tic80.js +11 -7
- package/dist/utils/tic80/tic80.js.map +1 -1
- package/dist/utils/traceProfiler.d.ts +86 -0
- package/dist/utils/traceProfiler.d.ts.map +1 -0
- package/dist/utils/traceProfiler.js +241 -0
- package/dist/utils/traceProfiler.js.map +1 -0
- package/dist/utils/traceProfiler.test.d.ts +2 -0
- package/dist/utils/traceProfiler.test.d.ts.map +1 -0
- package/dist/utils/traceProfiler.test.js +236 -0
- package/dist/utils/traceProfiler.test.js.map +1 -0
- package/dist/utils/utils.d.ts +5 -0
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +35 -0
- package/dist/utils/utils.js.map +1 -1
- package/dist/utils/windowPosition.d.ts.map +1 -1
- package/dist/utils/windowPosition.js +2 -1
- package/dist/utils/windowPosition.js.map +1 -1
- package/package.json +31 -4
- package/scripts/benchmark-lua-minifiers.js +221 -0
- package/scripts/benchmark-lz-configs.js +247 -0
- package/scripts/gen-build-info.js +6 -0
- package/templates/TIC-80-ticbuild/tic80.exe +0 -0
- package/templates/declarations/tic80.d.ts +233 -0
- package/templates/env.template +11 -0
- package/templates/gitignore.template +7 -3
- package/templates/help/build.txt +2 -0
- package/templates/help/init.txt +3 -1
- package/templates/help/inspect.txt +14 -0
- package/templates/help/main.txt +3 -1
- package/templates/help/project.txt +27 -0
- package/templates/help/run.txt +4 -3
- package/templates/help/terminal.txt +32 -18
- package/templates/help/watch.txt +19 -5
- package/templates/minimal/project.ticbuild.jsonc +2 -1
- package/templates/piggybossa/project.ticbuild.jsonc +2 -1
- package/templates/pointsphere/project.ticbuild.jsonc +9 -15
- package/templates/pointsphere/src/palette.lua +5 -3
- package/templates/typescript/.luarc.json +5 -0
- package/templates/typescript/.vscode/extensions.json +3 -0
- package/templates/typescript/eslint.config.mjs +28 -0
- package/templates/typescript/package.json +22 -0
- package/templates/typescript/project.ticbuild.jsonc +28 -0
- package/templates/typescript/src/main.ts +6 -0
- package/templates/typescript/tsconfig.json +10 -0
- package/templates/vscode_extensions.template.json +3 -0
- package/templates/vscode_settings.template.json +3 -0
- package/ticbuild.schema.json +274 -110
- package/dist/backend/ImportedResource.d.ts +0 -11
- package/dist/backend/ImportedResource.d.ts.map +0 -1
- package/dist/backend/ImportedResource.js +0 -53
- package/dist/backend/ImportedResource.js.map +0 -1
- package/dist/backend/importers/luaImporter.d.ts +0 -1
- package/dist/backend/importers/luaImporter.d.ts.map +0 -1
- package/dist/backend/importers/luaImporter.js +0 -3
- package/dist/backend/importers/luaImporter.js.map +0 -1
- package/dist/backend/loadAllImports.d.ts +0 -1
- package/dist/backend/loadAllImports.d.ts.map +0 -1
- package/dist/backend/loadAllImports.js +0 -3
- package/dist/backend/loadAllImports.js.map +0 -1
- package/dist/backend/tic80Controller/externalController.d.ts +0 -18
- package/dist/backend/tic80Controller/externalController.d.ts.map +0 -1
- package/dist/backend/tic80Controller/externalController.js +0 -68
- package/dist/backend/tic80Controller/externalController.js.map +0 -1
- package/dist/backend/tic80Controller/internalController.d.ts +0 -13
- package/dist/backend/tic80Controller/internalController.d.ts.map +0 -1
- package/dist/backend/tic80Controller/internalController.js +0 -44
- package/dist/backend/tic80Controller/internalController.js.map +0 -1
- package/dist/frontend/manifestSchemaSync.test.d.ts +0 -2
- package/dist/frontend/manifestSchemaSync.test.d.ts.map +0 -1
- package/dist/frontend/manifestSchemaSync.test.js +0 -127
- package/dist/frontend/manifestSchemaSync.test.js.map +0 -1
- package/dist/frontend/repl.d.ts +0 -7
- package/dist/frontend/repl.d.ts.map +0 -1
- package/dist/frontend/repl.js +0 -271
- package/dist/frontend/repl.js.map +0 -1
- package/dist/utils/lua/luaUtils.d.ts +0 -1
- package/dist/utils/lua/luaUtils.d.ts.map +0 -1
- package/dist/utils/lua/luaUtils.js +0 -3
- package/dist/utils/lua/luaUtils.js.map +0 -1
- package/templates/help/repl.txt +0 -46
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as ts from "typescript";
|
|
2
|
+
import { TypeScriptImportConfig } from "../manifestTypes";
|
|
3
|
+
import { TicbuildProjectCore } from "../projectCore";
|
|
4
|
+
import { ManifestCodeModuleDefinition } from "./ManifestCodeTypeScriptModules";
|
|
5
|
+
export type ManifestCodeDependency = ManifestCodeModuleDefinition & {
|
|
6
|
+
typeOnly: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const TYPESCRIPT_MANIFEST_DECLARATIONS_FILE = "typescript-assets.d.ts";
|
|
9
|
+
export type TypeScriptManifestModuleDeclaration = {
|
|
10
|
+
importName: string;
|
|
11
|
+
code: string;
|
|
12
|
+
};
|
|
13
|
+
type DeclarationEmitResult = {
|
|
14
|
+
declaration?: TypeScriptManifestModuleDeclaration;
|
|
15
|
+
diagnostics: readonly ts.Diagnostic[];
|
|
16
|
+
};
|
|
17
|
+
export declare function getTypeScriptManifestDeclarationsPath(projectDir: string): string;
|
|
18
|
+
export declare function renderTypeScriptManifestDeclarations(declarations: readonly TypeScriptManifestModuleDeclaration[]): string;
|
|
19
|
+
export declare function writeTypeScriptManifestDeclarations(projectDir: string, declarations: readonly TypeScriptManifestModuleDeclaration[]): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Finds manifest-backed TypeScript module edges without requiring their generated
|
|
22
|
+
* declarations to exist yet. Ordinary TypeScript modules are followed with the
|
|
23
|
+
* importing resource's compiler options so special imports in relative/path-mapped
|
|
24
|
+
* dependencies participate in resource ordering too.
|
|
25
|
+
*/
|
|
26
|
+
export declare function collectTypeScriptManifestDependencies(project: TicbuildProjectCore, entryFilePath: string, entrySource: string, typescriptConfig?: TypeScriptImportConfig): string[];
|
|
27
|
+
export declare function collectTypeScriptManifestCodeDependencies(project: TicbuildProjectCore, entryFilePath: string, entrySource: string, typescriptConfig?: TypeScriptImportConfig, onSource?: (fileName: string, sourceText: string, typeOnly: boolean) => void): ManifestCodeDependency[];
|
|
28
|
+
export declare function emitTypeScriptManifestModuleDeclaration(program: ts.Program, compilerHost: ts.CompilerHost, entryFilePath: string, importName: string, projectDir: string, sourceModuleNames?: ReadonlyMap<string, string>, ownedSources?: ReadonlySet<string>): DeclarationEmitResult;
|
|
29
|
+
/**
|
|
30
|
+
* ("ticbuild-assets/main", "<project>/src/math.ts") ->
|
|
31
|
+
* "ticbuild-assets/main/__types/src/math". Files outside the project use "__up"
|
|
32
|
+
* path segments; spaces and other URL-sensitive characters are percent-encoded.
|
|
33
|
+
*/
|
|
34
|
+
export declare function getTypeScriptPrivateModuleName(moduleSpecifier: string, projectDir: string, fileName: string): string;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=TypeScriptManifestModules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypeScriptManifestModules.d.ts","sourceRoot":"","sources":["../../../src/backend/importers/TypeScriptManifestModules.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAGjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAGL,4BAA4B,EAE7B,MAAM,iCAAiC,CAAC;AAIzC,MAAM,MAAM,sBAAsB,GAAG,4BAA4B,GAAG;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAC;AAE1F,eAAO,MAAM,qCAAqC,2BAA2B,CAAC;AAE9E,MAAM,MAAM,mCAAmC,GAAG;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC3B,WAAW,CAAC,EAAE,mCAAmC,CAAC;IAClD,WAAW,EAAE,SAAS,EAAE,CAAC,UAAU,EAAE,CAAC;CACvC,CAAC;AAOF,wBAAgB,qCAAqC,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEhF;AAwBD,wBAAgB,oCAAoC,CAClD,YAAY,EAAE,SAAS,mCAAmC,EAAE,GAC3D,MAAM,CAkBR;AAED,wBAAsB,mCAAmC,CACvD,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,SAAS,mCAAmC,EAAE,GAC3D,OAAO,CAAC,IAAI,CAAC,CAQf;AAED;;;;;GAKG;AACH,wBAAgB,qCAAqC,CACnD,OAAO,EAAE,mBAAmB,EAC5B,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,gBAAgB,CAAC,EAAE,sBAAsB,GACxC,MAAM,EAAE,CAIV;AAED,wBAAgB,yCAAyC,CACvD,OAAO,EAAE,mBAAmB,EAC5B,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,gBAAgB,CAAC,EAAE,sBAAsB,EACzC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,GAC3E,sBAAsB,EAAE,CAsD1B;AAwCD,wBAAgB,uCAAuC,CACrD,OAAO,EAAE,EAAE,CAAC,OAAO,EACnB,YAAY,EAAE,EAAE,CAAC,YAAY,EAC7B,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,iBAAiB,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/C,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GACjC,qBAAqB,CAwDvB;AAkCD;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKpH"}
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.TYPESCRIPT_MANIFEST_DECLARATIONS_FILE = void 0;
|
|
37
|
+
exports.getTypeScriptManifestDeclarationsPath = getTypeScriptManifestDeclarationsPath;
|
|
38
|
+
exports.renderTypeScriptManifestDeclarations = renderTypeScriptManifestDeclarations;
|
|
39
|
+
exports.writeTypeScriptManifestDeclarations = writeTypeScriptManifestDeclarations;
|
|
40
|
+
exports.collectTypeScriptManifestDependencies = collectTypeScriptManifestDependencies;
|
|
41
|
+
exports.collectTypeScriptManifestCodeDependencies = collectTypeScriptManifestCodeDependencies;
|
|
42
|
+
exports.emitTypeScriptManifestModuleDeclaration = emitTypeScriptManifestModuleDeclaration;
|
|
43
|
+
exports.getTypeScriptPrivateModuleName = getTypeScriptPrivateModuleName;
|
|
44
|
+
// stuff for generating .ticbuild/declarations/typescript-assets.d.ts
|
|
45
|
+
// from typescript modules in the manifest
|
|
46
|
+
const path = __importStar(require("node:path"));
|
|
47
|
+
const ts = __importStar(require("typescript"));
|
|
48
|
+
const fileSystem_1 = require("../../utils/fileSystem");
|
|
49
|
+
const ManifestCodeTypeScriptModules_1 = require("./ManifestCodeTypeScriptModules");
|
|
50
|
+
const TypeScriptTranspilationOptions_1 = require("./TypeScriptTranspilationOptions");
|
|
51
|
+
const tsconfigUtils_1 = require("./tsconfigUtils");
|
|
52
|
+
exports.TYPESCRIPT_MANIFEST_DECLARATIONS_FILE = "typescript-assets.d.ts";
|
|
53
|
+
function getTypeScriptManifestDeclarationsPath(projectDir) {
|
|
54
|
+
return path.join(projectDir, ".ticbuild", "declarations", exports.TYPESCRIPT_MANIFEST_DECLARATIONS_FILE);
|
|
55
|
+
}
|
|
56
|
+
function canonicalTypeScriptPath(fileName) {
|
|
57
|
+
const normalized = path.normalize(path.resolve(fileName));
|
|
58
|
+
return ts.sys.useCaseSensitiveFileNames ? normalized : normalized.toLowerCase();
|
|
59
|
+
}
|
|
60
|
+
// todo: unify all these. search for ".tsx" to see what i mean.
|
|
61
|
+
function isTypeScriptImplementationFile(fileName) {
|
|
62
|
+
const lower = fileName.toLowerCase();
|
|
63
|
+
return (lower.endsWith(".ts") || lower.endsWith(".tsx")) && !lower.endsWith(".d.ts");
|
|
64
|
+
}
|
|
65
|
+
// todo: unify all these. search for ".tsx" to see what i mean.
|
|
66
|
+
function isTypeScriptSourceFile(fileName) {
|
|
67
|
+
const lower = fileName.toLowerCase();
|
|
68
|
+
return lower.endsWith(".ts") || lower.endsWith(".tsx");
|
|
69
|
+
}
|
|
70
|
+
// todo: unify all these. search for ".tsx" to see what i mean.
|
|
71
|
+
function scriptKind(fileName) {
|
|
72
|
+
return fileName.toLowerCase().endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS;
|
|
73
|
+
}
|
|
74
|
+
function renderTypeScriptManifestDeclarations(declarations) {
|
|
75
|
+
const byImportName = new Map();
|
|
76
|
+
for (const declaration of declarations) {
|
|
77
|
+
const existing = byImportName.get(declaration.importName);
|
|
78
|
+
if (existing && existing.code !== declaration.code) {
|
|
79
|
+
throw new Error(`Conflicting TypeScript declarations for manifest import '${declaration.importName}'`);
|
|
80
|
+
}
|
|
81
|
+
byImportName.set(declaration.importName, declaration);
|
|
82
|
+
}
|
|
83
|
+
const blocks = Array.from(byImportName.values())
|
|
84
|
+
.sort((left, right) => left.importName.localeCompare(right.importName))
|
|
85
|
+
.map((declaration) => declaration.code.trimEnd());
|
|
86
|
+
return [
|
|
87
|
+
"// Generated by ticbuild. Changes will be overwritten.",
|
|
88
|
+
"/** @noSelfInFile */",
|
|
89
|
+
"",
|
|
90
|
+
...blocks.flatMap((block) => [block, ""]),
|
|
91
|
+
].join("\n");
|
|
92
|
+
}
|
|
93
|
+
async function writeTypeScriptManifestDeclarations(projectDir, declarations) {
|
|
94
|
+
const declarationPath = getTypeScriptManifestDeclarationsPath(projectDir);
|
|
95
|
+
const content = renderTypeScriptManifestDeclarations(declarations);
|
|
96
|
+
if ((0, fileSystem_1.fileExists)(declarationPath) && await (0, fileSystem_1.readTextFileAsync)(declarationPath, "utf-8") === content) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
(0, fileSystem_1.ensureDir)(path.dirname(declarationPath));
|
|
100
|
+
await (0, fileSystem_1.writeTextFile)(declarationPath, content, "utf-8");
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Finds manifest-backed TypeScript module edges without requiring their generated
|
|
104
|
+
* declarations to exist yet. Ordinary TypeScript modules are followed with the
|
|
105
|
+
* importing resource's compiler options so special imports in relative/path-mapped
|
|
106
|
+
* dependencies participate in resource ordering too.
|
|
107
|
+
*/
|
|
108
|
+
function collectTypeScriptManifestDependencies(project, entryFilePath, entrySource, typescriptConfig) {
|
|
109
|
+
return collectTypeScriptManifestCodeDependencies(project, entryFilePath, entrySource, typescriptConfig)
|
|
110
|
+
.filter((dependency) => dependency.kind === "TypeScriptCode")
|
|
111
|
+
.map((dependency) => dependency.importName);
|
|
112
|
+
}
|
|
113
|
+
function collectTypeScriptManifestCodeDependencies(project, entryFilePath, entrySource, typescriptConfig, onSource) {
|
|
114
|
+
const configuredProject = (0, tsconfigUtils_1.loadTypeScriptProjectConfig)(project, typescriptConfig);
|
|
115
|
+
const options = (0, TypeScriptTranspilationOptions_1.createTypeScriptTranspilationOptions)(configuredProject.options);
|
|
116
|
+
const catalog = (0, ManifestCodeTypeScriptModules_1.createManifestCodeModuleCatalog)(project);
|
|
117
|
+
const dependencies = new Map();
|
|
118
|
+
const visited = new Map();
|
|
119
|
+
const entryKey = canonicalTypeScriptPath(entryFilePath);
|
|
120
|
+
const visitFile = (fileName, typeOnly = false) => {
|
|
121
|
+
const key = canonicalTypeScriptPath(fileName);
|
|
122
|
+
if (visited.has(key) && (visited.get(key) === false || typeOnly)) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
visited.set(key, typeOnly);
|
|
126
|
+
const sourceText = key === entryKey ? entrySource : ts.sys.readFile(fileName);
|
|
127
|
+
if (sourceText === undefined) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
onSource?.(fileName, sourceText, typeOnly);
|
|
131
|
+
const sourceFile = ts.createSourceFile(fileName, sourceText, ts.ScriptTarget.Latest, true, scriptKind(fileName));
|
|
132
|
+
for (const reference of collectSourceModuleReferences(sourceFile)) {
|
|
133
|
+
const onlyTypes = typeOnly || reference.typeOnly;
|
|
134
|
+
if (reference.specifier.startsWith(ManifestCodeTypeScriptModules_1.MANIFEST_CODE_MODULE_PREFIX)) {
|
|
135
|
+
const importName = (0, ManifestCodeTypeScriptModules_1.parseManifestCodeModuleSpecifier)(reference.specifier);
|
|
136
|
+
const definition = importName ? catalog.get(importName) : undefined;
|
|
137
|
+
// The static linker reports source-located errors for invalid manifest imports.
|
|
138
|
+
if (!importName || !definition)
|
|
139
|
+
continue;
|
|
140
|
+
const previous = dependencies.get(importName);
|
|
141
|
+
dependencies.set(importName, { ...definition, typeOnly: onlyTypes && previous?.typeOnly !== false });
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
const resolved = ts.resolveModuleName(reference.specifier, fileName, options, ts.sys).resolvedModule;
|
|
145
|
+
if (resolved && isTypeScriptSourceFile(resolved.resolvedFileName)) {
|
|
146
|
+
visitFile(resolved.resolvedFileName, onlyTypes);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
visitFile(entryFilePath);
|
|
152
|
+
const generatedDeclarationsDir = path.join(project.projectDir, ".ticbuild", "declarations");
|
|
153
|
+
for (const declarationRootPath of configuredProject.declarationRootPaths) {
|
|
154
|
+
const relativeToGeneratedDeclarations = path.relative(generatedDeclarationsDir, declarationRootPath);
|
|
155
|
+
if (relativeToGeneratedDeclarations === "" ||
|
|
156
|
+
(!relativeToGeneratedDeclarations.startsWith("..") && !path.isAbsolute(relativeToGeneratedDeclarations))) {
|
|
157
|
+
// Generated aggregate declarations describe work from a previous or
|
|
158
|
+
// partially completed build; they are outputs, not graph-discovery roots.
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
visitFile(declarationRootPath, true);
|
|
162
|
+
}
|
|
163
|
+
return Array.from(dependencies.values()).sort((left, right) => left.importName.localeCompare(right.importName));
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* "import type { Vec2 } from './math'" and "import('./math').Vec2" are type edges.
|
|
167
|
+
* Ordinary imports/exports are runtime edges unless explicitly marked type-only.
|
|
168
|
+
* Following files and resolving manifest names are the graph collector's job.
|
|
169
|
+
*/
|
|
170
|
+
function collectSourceModuleReferences(source) {
|
|
171
|
+
const references = [];
|
|
172
|
+
const visit = (node) => {
|
|
173
|
+
if (ts.isImportDeclaration(node) || ts.isExportDeclaration(node)) {
|
|
174
|
+
if (node.moduleSpecifier && ts.isStringLiteralLike(node.moduleSpecifier)) {
|
|
175
|
+
references.push({ specifier: node.moduleSpecifier.text, typeOnly: isTypeOnlyModuleDeclaration(node) });
|
|
176
|
+
}
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
if (ts.isImportTypeNode(node) && ts.isLiteralTypeNode(node.argument) && ts.isStringLiteralLike(node.argument.literal)) {
|
|
180
|
+
references.push({ specifier: node.argument.literal.text, typeOnly: true });
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
ts.forEachChild(node, visit);
|
|
184
|
+
};
|
|
185
|
+
ts.forEachChild(source, visit);
|
|
186
|
+
return references;
|
|
187
|
+
}
|
|
188
|
+
function isTypeOnlyModuleDeclaration(node) {
|
|
189
|
+
if (ts.isExportDeclaration(node))
|
|
190
|
+
return node.isTypeOnly;
|
|
191
|
+
const clause = node.importClause;
|
|
192
|
+
if (!clause)
|
|
193
|
+
return false; // import "./side-effect"
|
|
194
|
+
if (clause.isTypeOnly)
|
|
195
|
+
return true; // import type { Vec2 } from "./math"
|
|
196
|
+
if (clause.name)
|
|
197
|
+
return false; // A default import is a runtime binding.
|
|
198
|
+
const bindings = clause.namedBindings;
|
|
199
|
+
if (!bindings || !ts.isNamedImports(bindings))
|
|
200
|
+
return false;
|
|
201
|
+
// import { type Vec2, type Point } from "./math"; an empty import stays runtime.
|
|
202
|
+
return bindings.elements.length > 0 && bindings.elements.every(element => element.isTypeOnly);
|
|
203
|
+
}
|
|
204
|
+
function emitTypeScriptManifestModuleDeclaration(program, compilerHost, entryFilePath, importName, projectDir, sourceModuleNames, ownedSources) {
|
|
205
|
+
const declarationOptions = {
|
|
206
|
+
...program.getCompilerOptions(),
|
|
207
|
+
declaration: true,
|
|
208
|
+
declarationMap: false,
|
|
209
|
+
emitDeclarationOnly: true,
|
|
210
|
+
inlineSourceMap: false,
|
|
211
|
+
inlineSources: false,
|
|
212
|
+
noEmit: false,
|
|
213
|
+
noEmitOnError: false,
|
|
214
|
+
outDir: undefined,
|
|
215
|
+
declarationDir: undefined,
|
|
216
|
+
sourceMap: false,
|
|
217
|
+
};
|
|
218
|
+
const declarationProgram = ts.createProgram({
|
|
219
|
+
rootNames: program.getRootFileNames(),
|
|
220
|
+
options: declarationOptions,
|
|
221
|
+
host: compilerHost,
|
|
222
|
+
oldProgram: program,
|
|
223
|
+
});
|
|
224
|
+
const emitted = [];
|
|
225
|
+
const result = declarationProgram.emit(undefined, (fileName, text, _writeByteOrderMark, _onError, sourceFiles) => {
|
|
226
|
+
if (!fileName.toLowerCase().endsWith(".d.ts")) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
const sourceFile = sourceFiles?.find((candidate) => isTypeScriptImplementationFile(candidate.fileName));
|
|
230
|
+
if (sourceFile) {
|
|
231
|
+
emitted.push({ text, sourceFile });
|
|
232
|
+
}
|
|
233
|
+
}, undefined, true);
|
|
234
|
+
if (result.emitSkipped || emitted.length === 0) {
|
|
235
|
+
return { diagnostics: result.diagnostics };
|
|
236
|
+
}
|
|
237
|
+
const moduleSpecifier = `${ManifestCodeTypeScriptModules_1.MANIFEST_CODE_MODULE_PREFIX}${importName}`;
|
|
238
|
+
const moduleNames = sourceModuleNames ?? makeVirtualModuleNames(emitted, entryFilePath, moduleSpecifier, projectDir);
|
|
239
|
+
const blocks = emitted
|
|
240
|
+
.filter(declaration => !ownedSources || ownedSources.has(canonicalTypeScriptPath(declaration.sourceFile.fileName)))
|
|
241
|
+
.sort((left, right) => {
|
|
242
|
+
const leftName = moduleNames.get(canonicalTypeScriptPath(left.sourceFile.fileName)) ?? "";
|
|
243
|
+
const rightName = moduleNames.get(canonicalTypeScriptPath(right.sourceFile.fileName)) ?? "";
|
|
244
|
+
return leftName.localeCompare(rightName);
|
|
245
|
+
})
|
|
246
|
+
.map((declaration) => renderAmbientModule(declaration, moduleNames, declarationOptions, compilerHost));
|
|
247
|
+
return {
|
|
248
|
+
declaration: {
|
|
249
|
+
importName,
|
|
250
|
+
code: blocks.join("\n\n"),
|
|
251
|
+
},
|
|
252
|
+
diagnostics: result.diagnostics,
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
function makeVirtualModuleNames(declarations, entryFilePath, moduleSpecifier, projectDir) {
|
|
256
|
+
const names = new Map();
|
|
257
|
+
const owners = new Map();
|
|
258
|
+
const entryKey = canonicalTypeScriptPath(entryFilePath);
|
|
259
|
+
for (const declaration of declarations) {
|
|
260
|
+
const key = canonicalTypeScriptPath(declaration.sourceFile.fileName);
|
|
261
|
+
let name;
|
|
262
|
+
if (key === entryKey) {
|
|
263
|
+
name = moduleSpecifier;
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
name = getTypeScriptPrivateModuleName(moduleSpecifier, projectDir, declaration.sourceFile.fileName);
|
|
267
|
+
}
|
|
268
|
+
const existingOwner = owners.get(name);
|
|
269
|
+
if (existingOwner && existingOwner !== key) {
|
|
270
|
+
throw new Error(`TypeScript declaration module '${name}' is emitted by both ${existingOwner} and ${declaration.sourceFile.fileName}`);
|
|
271
|
+
}
|
|
272
|
+
owners.set(name, key);
|
|
273
|
+
names.set(key, name);
|
|
274
|
+
}
|
|
275
|
+
return names;
|
|
276
|
+
}
|
|
277
|
+
// Remove .ts/.tsx, .mts/.cts, and their declaration spellings from module paths.
|
|
278
|
+
const typeScriptSourceExtensionPattern = /\.(?:d\.)?[cm]?tsx?$/i;
|
|
279
|
+
/**
|
|
280
|
+
* ("ticbuild-assets/main", "<project>/src/math.ts") ->
|
|
281
|
+
* "ticbuild-assets/main/__types/src/math". Files outside the project use "__up"
|
|
282
|
+
* path segments; spaces and other URL-sensitive characters are percent-encoded.
|
|
283
|
+
*/
|
|
284
|
+
function getTypeScriptPrivateModuleName(moduleSpecifier, projectDir, fileName) {
|
|
285
|
+
const relative = path.relative(projectDir, fileName).replace(/\\/g, "/");
|
|
286
|
+
const withoutExtension = relative.replace(typeScriptSourceExtensionPattern, "");
|
|
287
|
+
const encoded = withoutExtension.split("/").map(encodePrivateModulePathSegment).join("/");
|
|
288
|
+
return `${moduleSpecifier}/__types/${encoded}`;
|
|
289
|
+
}
|
|
290
|
+
function encodePrivateModulePathSegment(segment) {
|
|
291
|
+
if (!segment || segment === ".")
|
|
292
|
+
return "_";
|
|
293
|
+
if (segment === "..")
|
|
294
|
+
return "__up";
|
|
295
|
+
return encodeURIComponent(segment);
|
|
296
|
+
}
|
|
297
|
+
function renderAmbientModule(declaration, moduleNames, options, compilerHost) {
|
|
298
|
+
const sourceKey = canonicalTypeScriptPath(declaration.sourceFile.fileName);
|
|
299
|
+
const moduleName = moduleNames.get(sourceKey);
|
|
300
|
+
if (!moduleName) {
|
|
301
|
+
throw new Error(`Unable to name emitted TypeScript declaration for ${declaration.sourceFile.fileName}`);
|
|
302
|
+
}
|
|
303
|
+
const emittedSource = ts.createSourceFile(`${declaration.sourceFile.fileName}.d.ts`, declaration.text, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
|
|
304
|
+
const transformed = ts.transform(emittedSource, [rewriteDeclarationModuleSpecifiers(declaration.sourceFile, moduleNames, options, compilerHost)]);
|
|
305
|
+
try {
|
|
306
|
+
const printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed });
|
|
307
|
+
const body = printer.printFile(transformed.transformed[0])
|
|
308
|
+
.replace(/^(\s*(?:export\s+)?)declare\s+/gm, "$1")
|
|
309
|
+
.trimEnd();
|
|
310
|
+
return [
|
|
311
|
+
`declare module ${JSON.stringify(moduleName)} {`,
|
|
312
|
+
...body.split(/\r?\n/).map((line) => ` ${line}`),
|
|
313
|
+
"}",
|
|
314
|
+
].join("\n");
|
|
315
|
+
}
|
|
316
|
+
finally {
|
|
317
|
+
transformed.dispose();
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
function rewriteDeclarationModuleSpecifiers(originalSourceFile, moduleNames, options, compilerHost) {
|
|
321
|
+
return (context) => {
|
|
322
|
+
const rewrite = (literal) => {
|
|
323
|
+
const resolved = ts.resolveModuleName(literal.text, originalSourceFile.fileName, options, compilerHost).resolvedModule;
|
|
324
|
+
if (!resolved) {
|
|
325
|
+
return literal;
|
|
326
|
+
}
|
|
327
|
+
const virtualName = moduleNames.get(canonicalTypeScriptPath(resolved.resolvedFileName));
|
|
328
|
+
return virtualName ? ts.factory.createStringLiteral(virtualName) : literal;
|
|
329
|
+
};
|
|
330
|
+
const visit = (node) => {
|
|
331
|
+
if (ts.isImportDeclaration(node) && ts.isStringLiteralLike(node.moduleSpecifier)) {
|
|
332
|
+
return ts.factory.updateImportDeclaration(node, node.modifiers, node.importClause, rewrite(node.moduleSpecifier), node.attributes);
|
|
333
|
+
}
|
|
334
|
+
if (ts.isExportDeclaration(node) && node.moduleSpecifier && ts.isStringLiteralLike(node.moduleSpecifier)) {
|
|
335
|
+
return ts.factory.updateExportDeclaration(node, node.modifiers, node.isTypeOnly, node.exportClause, rewrite(node.moduleSpecifier), node.attributes);
|
|
336
|
+
}
|
|
337
|
+
if (ts.isImportTypeNode(node) &&
|
|
338
|
+
ts.isLiteralTypeNode(node.argument) &&
|
|
339
|
+
ts.isStringLiteralLike(node.argument.literal)) {
|
|
340
|
+
return ts.factory.updateImportTypeNode(node, ts.factory.updateLiteralTypeNode(node.argument, rewrite(node.argument.literal)), node.attributes, node.qualifier, node.typeArguments, node.isTypeOf);
|
|
341
|
+
}
|
|
342
|
+
return ts.visitEachChild(node, visit, context);
|
|
343
|
+
};
|
|
344
|
+
return (sourceFile) => ts.visitNode(sourceFile, visit);
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
//# sourceMappingURL=TypeScriptManifestModules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypeScriptManifestModules.js","sourceRoot":"","sources":["../../../src/backend/importers/TypeScriptManifestModules.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,sFAEC;AAwBD,oFAoBC;AAED,kFAWC;AAQD,sFASC;AAED,8FA4DC;AAwCD,0FAgEC;AAuCD,wEAKC;AAlUD,qEAAqE;AACrE,0CAA0C;AAC1C,gDAAkC;AAClC,+CAAiC;AAEjC,uDAAiG;AAGjG,mFAKyC;AACzC,qFAAwF;AACxF,mDAA8D;AAIjD,QAAA,qCAAqC,GAAG,w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BAAoB,CACpC,IAAI,EACJ,EAAE,CAAC,OAAO,CAAC,qBAAqB,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAC/E,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,QAAQ,CACd,CAAC;YACJ,CAAC;YACD,OAAO,EAAE,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QACjD,CAAC,CAAC;QACF,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,KAAK,CAAkB,CAAC;IAC1E,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as ts from "typescript";
|
|
2
|
+
export type TypeScriptNamedType = {
|
|
3
|
+
names: string[];
|
|
4
|
+
identity: {
|
|
5
|
+
kind: "typescript";
|
|
6
|
+
file: string;
|
|
7
|
+
position: number;
|
|
8
|
+
};
|
|
9
|
+
reference: string;
|
|
10
|
+
source: string;
|
|
11
|
+
ensureAvailable?: () => void;
|
|
12
|
+
};
|
|
13
|
+
/** Discover TS type references and retain any virtual exports needed to use them. */
|
|
14
|
+
export declare class TypeScriptNamedTypes {
|
|
15
|
+
private readonly projectDir;
|
|
16
|
+
private readonly additionalSources;
|
|
17
|
+
constructor(projectDir: string);
|
|
18
|
+
collect(program: ts.Program, moduleNames: ReadonlyMap<string, string>): TypeScriptNamedType[];
|
|
19
|
+
getAdditionalSources(): ReadonlyMap<string, string>;
|
|
20
|
+
private addTypeAlias;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=TypeScriptNamedTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypeScriptNamedTypes.d.ts","sourceRoot":"","sources":["../../../src/backend/importers/TypeScriptNamedTypes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAQjC,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE;QAAE,IAAI,EAAE,YAAY,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B,CAAC;AAIF,qFAAqF;AACrF,qBAAa,oBAAoB;IAGnB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAFvC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAwC;gBAE7C,UAAU,EAAE,MAAM;IAE/C,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,mBAAmB,EAAE;IAQ7F,oBAAoB,IAAI,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC;IAQnD,OAAO,CAAC,YAAY;CASrB"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.TypeScriptNamedTypes = void 0;
|
|
37
|
+
const path = __importStar(require("node:path"));
|
|
38
|
+
const ts = __importStar(require("typescript"));
|
|
39
|
+
const TypeScriptDeclarationSyntax_1 = require("./TypeScriptDeclarationSyntax");
|
|
40
|
+
const TypeScriptLuaDeclarations_1 = require("./TypeScriptLuaDeclarations");
|
|
41
|
+
const TypeScriptStaticLinker_1 = require("./TypeScriptStaticLinker");
|
|
42
|
+
/** Discover TS type references and retain any virtual exports needed to use them. */
|
|
43
|
+
class TypeScriptNamedTypes {
|
|
44
|
+
constructor(projectDir) {
|
|
45
|
+
this.projectDir = projectDir;
|
|
46
|
+
this.additionalSources = new Map();
|
|
47
|
+
}
|
|
48
|
+
collect(program, moduleNames) {
|
|
49
|
+
const collector = new TypeScriptNamedTypeCollector(this.projectDir, program, moduleNames, (source, declaration, alias) => this.addTypeAlias(source, declaration, alias));
|
|
50
|
+
return collector.collect();
|
|
51
|
+
}
|
|
52
|
+
getAdditionalSources() {
|
|
53
|
+
const sources = new Map();
|
|
54
|
+
for (const { source, aliases } of this.additionalSources.values()) {
|
|
55
|
+
sources.set(source.fileName, `${source.text}\n${Array.from(aliases.values()).join("\n")}\n`);
|
|
56
|
+
}
|
|
57
|
+
return sources;
|
|
58
|
+
}
|
|
59
|
+
addTypeAlias(source, declaration, alias) {
|
|
60
|
+
const key = (0, TypeScriptStaticLinker_1.getCanonicalTSPathKey)(source.fileName);
|
|
61
|
+
let additions = this.additionalSources.get(key);
|
|
62
|
+
if (!additions) {
|
|
63
|
+
additions = { source, aliases: new Map() };
|
|
64
|
+
this.additionalSources.set(key, additions);
|
|
65
|
+
}
|
|
66
|
+
additions.aliases.set(alias, renderPrivateTypeAlias(source, declaration, alias));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.TypeScriptNamedTypes = TypeScriptNamedTypes;
|
|
70
|
+
/** Walk one compiler program; all symbol inspection stays within its checker. */
|
|
71
|
+
class TypeScriptNamedTypeCollector {
|
|
72
|
+
constructor(projectDir, program, moduleNames, exportPrivateType) {
|
|
73
|
+
this.projectDir = projectDir;
|
|
74
|
+
this.program = program;
|
|
75
|
+
this.moduleNames = moduleNames;
|
|
76
|
+
this.exportPrivateType = exportPrivateType;
|
|
77
|
+
this.types = [];
|
|
78
|
+
this.exportStack = new Set();
|
|
79
|
+
this.checker = program.getTypeChecker();
|
|
80
|
+
}
|
|
81
|
+
collect() {
|
|
82
|
+
for (const source of this.program.getSourceFiles()) {
|
|
83
|
+
this.collectModuleTypes(source);
|
|
84
|
+
if (!this.program.isSourceFileDefaultLibrary(source)) {
|
|
85
|
+
ts.forEachChild(source, node => this.collectAmbientTypes(node, "", !ts.isExternalModule(source)));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return this.types;
|
|
89
|
+
}
|
|
90
|
+
collectModuleTypes(source) {
|
|
91
|
+
const moduleName = this.moduleNames.get((0, TypeScriptStaticLinker_1.getCanonicalTSPathKey)(source.fileName));
|
|
92
|
+
const moduleSymbol = this.checker.getSymbolAtLocation(source);
|
|
93
|
+
if (!moduleName || !moduleSymbol)
|
|
94
|
+
return;
|
|
95
|
+
this.collectExports(moduleSymbol, (0, TypeScriptDeclarationSyntax_1.renderTypeScriptImportType)(moduleName));
|
|
96
|
+
if (!source.isDeclarationFile)
|
|
97
|
+
this.collectPrivateTypes(source, moduleName);
|
|
98
|
+
}
|
|
99
|
+
// Exported namespaces extend both spellings: Math.Vec2 is reachable through
|
|
100
|
+
// import("ticbuild-assets/math").Math.Vec2. Guard namespace/re-export cycles.
|
|
101
|
+
collectExports(symbol, referencePrefix, namePrefix = "") {
|
|
102
|
+
if (this.exportStack.has(symbol))
|
|
103
|
+
return;
|
|
104
|
+
this.exportStack.add(symbol);
|
|
105
|
+
for (const exported of this.checker.getExportsOfModule(symbol)) {
|
|
106
|
+
if (exported.name === "default" || exported.name === "export=")
|
|
107
|
+
continue;
|
|
108
|
+
const reference = `${referencePrefix}.${exported.name}`;
|
|
109
|
+
const name = `${namePrefix}${exported.name}`;
|
|
110
|
+
this.addSymbol(exported, reference, name);
|
|
111
|
+
const target = this.resolveAlias(exported);
|
|
112
|
+
if (target.flags & ts.SymbolFlags.Module)
|
|
113
|
+
this.collectExports(target, reference, `${name}.`);
|
|
114
|
+
}
|
|
115
|
+
this.exportStack.delete(symbol);
|
|
116
|
+
}
|
|
117
|
+
collectPrivateTypes(source, moduleName) {
|
|
118
|
+
const bindings = new Set(this.checker.getSymbolsInScope(source, ts.SymbolFlags.Type | ts.SymbolFlags.Value).map(symbol => symbol.name));
|
|
119
|
+
for (const declaration of source.statements) {
|
|
120
|
+
if (!isNamedTypeDeclaration(declaration))
|
|
121
|
+
continue;
|
|
122
|
+
const symbol = this.checker.getSymbolAtLocation(declaration.name);
|
|
123
|
+
if (!symbol)
|
|
124
|
+
continue;
|
|
125
|
+
const alias = (0, TypeScriptDeclarationSyntax_1.findAvailableTypeScriptBinding)(`__ticbuild_type_${declaration.name.text}`, bindings);
|
|
126
|
+
// Private types are exposed only by their qualified LuaCATS name. The
|
|
127
|
+
// synthetic export is appended lazily if resolution actually chooses it.
|
|
128
|
+
this.addSymbol(symbol, (0, TypeScriptDeclarationSyntax_1.renderTypeScriptImportType)(moduleName, alias), undefined, () => this.exportPrivateType(source, declaration, alias));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
// Global declarations use "Vec2" or "Math.Vec2" directly. Entering
|
|
132
|
+
// "declare global" resets the namespace prefix, even inside an external module.
|
|
133
|
+
collectAmbientTypes(node, prefix, ambient) {
|
|
134
|
+
if (ts.isModuleDeclaration(node) && ts.isIdentifier(node.name)) {
|
|
135
|
+
const global = !!(node.flags & ts.NodeFlags.GlobalAugmentation);
|
|
136
|
+
if (!ambient && !global)
|
|
137
|
+
return;
|
|
138
|
+
const nextPrefix = global ? "" : `${prefix}${node.name.text}.`;
|
|
139
|
+
if (node.body && ts.isModuleBlock(node.body)) {
|
|
140
|
+
ts.forEachChild(node.body, child => this.collectAmbientTypes(child, nextPrefix, true));
|
|
141
|
+
}
|
|
142
|
+
else if (node.body) {
|
|
143
|
+
this.collectAmbientTypes(node.body, nextPrefix, true);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
else if (ambient && isNamedTypeDeclaration(node)) {
|
|
147
|
+
const symbol = this.checker.getSymbolAtLocation(node.name);
|
|
148
|
+
const name = `${prefix}${node.name.text}`;
|
|
149
|
+
if (symbol)
|
|
150
|
+
this.addSymbol(symbol, name, name);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
addSymbol(symbol, reference, exposedName, ensureAvailable) {
|
|
154
|
+
const target = this.resolveAlias(symbol);
|
|
155
|
+
if (!(target.flags & ts.SymbolFlags.Type))
|
|
156
|
+
return;
|
|
157
|
+
const declaration = target.declarations?.[0];
|
|
158
|
+
if (!declaration)
|
|
159
|
+
return;
|
|
160
|
+
const source = declaration.getSourceFile();
|
|
161
|
+
const names = exposedName ? [exposedName] : [];
|
|
162
|
+
if (isProjectSource(this.projectDir, source)) {
|
|
163
|
+
names.push((0, TypeScriptLuaDeclarations_1.makeLuaCatsTypeName)(this.projectDir, source, target.name));
|
|
164
|
+
}
|
|
165
|
+
this.types.push({
|
|
166
|
+
names, reference, ensureAvailable, source: source.fileName,
|
|
167
|
+
identity: { kind: "typescript", file: (0, TypeScriptStaticLinker_1.getCanonicalTSPathKey)(source.fileName), position: declaration.pos },
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
resolveAlias(symbol) {
|
|
171
|
+
return symbol.flags & ts.SymbolFlags.Alias ? this.checker.getAliasedSymbol(symbol) : symbol;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
function isNamedTypeDeclaration(node) {
|
|
175
|
+
return (ts.isInterfaceDeclaration(node) || ts.isTypeAliasDeclaration(node) ||
|
|
176
|
+
ts.isClassDeclaration(node) || ts.isEnumDeclaration(node)) && !!node.name;
|
|
177
|
+
}
|
|
178
|
+
function isProjectSource(projectDir, source) {
|
|
179
|
+
const relative = path.relative(projectDir, source.fileName);
|
|
180
|
+
return !relative.startsWith("..") && !path.isAbsolute(relative);
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* "class Box<T extends Point>" -> "export type __ticbuild_type_Box<T extends Point> = Box<T>;".
|
|
184
|
+
* Keep constraints/defaults on the declaration, but only parameter names on its
|
|
185
|
+
* right side. These aliases extend virtual source text; authored files stay intact.
|
|
186
|
+
*/
|
|
187
|
+
function renderPrivateTypeAlias(source, declaration, alias) {
|
|
188
|
+
const parameters = ts.isEnumDeclaration(declaration) ? [] : declaration.typeParameters ?? [];
|
|
189
|
+
const parameterText = (0, TypeScriptDeclarationSyntax_1.renderTypeScriptTypeParameters)(parameters.map(parameter => parameter.getText(source)));
|
|
190
|
+
const argumentText = (0, TypeScriptDeclarationSyntax_1.renderTypeScriptTypeParameters)(parameters.map(parameter => parameter.name.text));
|
|
191
|
+
return `export type ${alias}${parameterText} = ${declaration.name.text}${argumentText};`;
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=TypeScriptNamedTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypeScriptNamedTypes.js","sourceRoot":"","sources":["../../../src/backend/importers/TypeScriptNamedTypes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAkC;AAClC,+CAAiC;AACjC,+EAA2I;AAC3I,2EAAkE;AAClE,qEAAiE;AAejE,qFAAqF;AACrF,MAAa,oBAAoB;IAG/B,YAA6B,UAAkB;QAAlB,eAAU,GAAV,UAAU,CAAQ;QAF9B,sBAAiB,GAAG,IAAI,GAAG,EAA6B,CAAC;IAEvB,CAAC;IAEpD,OAAO,CAAC,OAAmB,EAAE,WAAwC;QACnE,MAAM,SAAS,GAAG,IAAI,4BAA4B,CAChD,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,WAAW,EACrC,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,CAC9E,CAAC;QACF,OAAO,SAAS,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED,oBAAoB;QAClB,MAAM,OAAO,GAAG,IAAI,GAAG,EAAkB,CAAC;QAC1C,KAAK,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,EAAE,CAAC;YAClE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/F,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAEO,YAAY,CAAC,MAAqB,EAAE,WA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