crankscript 0.16.1 → 0.18.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/CHANGELOG.md +16 -4
  2. package/assets/ImportMap/ImportMap.js +26 -65
  3. package/assets/ImportMap/ImportMap.js.map +1 -1
  4. package/assets/ImportMap/index.js +3 -6
  5. package/assets/ImportMap/index.js.map +1 -1
  6. package/assets/beforeEmit/getBeforeEmit.js +11 -16
  7. package/assets/beforeEmit/getBeforeEmit.js.map +1 -1
  8. package/assets/beforeEmit/index.js +3 -6
  9. package/assets/beforeEmit/index.js.map +1 -1
  10. package/assets/beforeEmit/withAutomaticImportWarning.js +4 -11
  11. package/assets/beforeEmit/withAutomaticImportWarning.js.map +1 -1
  12. package/assets/index.js +18 -28
  13. package/assets/index.js.map +1 -1
  14. package/assets/transformCallExpression/getTransformCallExpression.js +66 -18
  15. package/assets/transformCallExpression/getTransformCallExpression.js.map +1 -1
  16. package/assets/transformCallExpression/index.js +3 -6
  17. package/assets/transformCallExpression/index.js.map +1 -1
  18. package/assets/transformClassDeclaration/createClasCall.js +11 -24
  19. package/assets/transformClassDeclaration/createClasCall.js.map +1 -1
  20. package/assets/transformClassDeclaration/getExportedClassDeclarationStatements.js +14 -15
  21. package/assets/transformClassDeclaration/getExportedClassDeclarationStatements.js.map +1 -1
  22. package/assets/transformClassDeclaration/getTransformClassDeclaration.js +47 -43
  23. package/assets/transformClassDeclaration/getTransformClassDeclaration.js.map +1 -1
  24. package/assets/transformClassDeclaration/index.js +3 -6
  25. package/assets/transformClassDeclaration/index.js.map +1 -1
  26. package/assets/transformClassDeclaration/transformConstructor.js +44 -56
  27. package/assets/transformClassDeclaration/transformConstructor.js.map +1 -1
  28. package/assets/transformClassDeclaration/transformMethodDeclaration.js +12 -20
  29. package/assets/transformClassDeclaration/transformMethodDeclaration.js.map +1 -1
  30. package/assets/transformClassDeclaration/transformPropertyName.js +14 -19
  31. package/assets/transformClassDeclaration/transformPropertyName.js.map +1 -1
  32. package/assets/transformExportDeclaration/getTransformExportDeclaration.d.ts +6 -0
  33. package/assets/transformExportDeclaration/getTransformExportDeclaration.js +52 -0
  34. package/assets/transformExportDeclaration/getTransformExportDeclaration.js.map +1 -0
  35. package/assets/transformNewExpression/index.js +3 -6
  36. package/assets/transformNewExpression/index.js.map +1 -1
  37. package/assets/transformNewExpression/isBuiltinNewExpression.js +11 -15
  38. package/assets/transformNewExpression/isBuiltinNewExpression.js.map +1 -1
  39. package/assets/transformNewExpression/transformNewExpression.js +12 -23
  40. package/assets/transformNewExpression/transformNewExpression.js.map +1 -1
  41. package/assets/transformPropertyAccessExpression/a.js +24 -0
  42. package/assets/transformPropertyAccessExpression/a.js.map +1 -0
  43. package/assets/transformPropertyAccessExpression/getTransformPropertyAccessExpression.js +6 -13
  44. package/assets/transformPropertyAccessExpression/getTransformPropertyAccessExpression.js.map +1 -1
  45. package/assets/transformPropertyAccessExpression/index.js +3 -6
  46. package/assets/transformPropertyAccessExpression/index.js.map +1 -1
  47. package/assets/transformSuperExpression/index.js +3 -6
  48. package/assets/transformSuperExpression/index.js.map +1 -1
  49. package/assets/transformSuperExpression/transformSuperExpression.js +8 -16
  50. package/assets/transformSuperExpression/transformSuperExpression.js.map +1 -1
  51. package/assets/types.js +1 -4
  52. package/assets/types.js.map +1 -1
  53. package/package.json +8 -5
  54. package/src/commands/CompileCommand/CompileCommand.d.ts +1 -1
  55. package/src/commands/CompileCommand/CompileCommand.js +3 -10
  56. package/src/commands/CompileCommand/CompileCommand.js.map +1 -1
  57. package/src/commands/CompileCommand/components/Compile.d.ts +1 -1
  58. package/src/commands/CompileCommand/components/Compile.js +3 -7
  59. package/src/commands/CompileCommand/components/Compile.js.map +1 -1
  60. package/src/commands/CompileCommand/fn/getPdcPathFromEnvironment.d.ts +1 -1
  61. package/src/commands/CompileCommand/fn/getPdcPathFromEnvironment.js +1 -2
  62. package/src/commands/CompileCommand/fn/getPdcPathFromEnvironment.js.map +1 -1
  63. package/src/commands/CompileCommand/hooks/task/compile.d.ts +5 -2
  64. package/src/commands/CompileCommand/hooks/task/compile.js +10 -9
  65. package/src/commands/CompileCommand/hooks/task/compile.js.map +1 -1
  66. package/src/commands/CompileCommand/hooks/useCompileTasks.d.ts +5 -2
  67. package/src/commands/CompileCommand/hooks/useCompileTasks.js +33 -30
  68. package/src/commands/CompileCommand/hooks/useCompileTasks.js.map +1 -1
  69. package/src/commands/CompileCommand/index.js +0 -1
  70. package/src/commands/CompileCommand/index.js.map +1 -1
  71. package/src/commands/DoctorCommand.js +5 -12
  72. package/src/commands/DoctorCommand.js.map +1 -1
  73. package/src/commands/EnvironmentAwareCommand/EnvironmentAwareCommand.d.ts +2 -2
  74. package/src/commands/EnvironmentAwareCommand/EnvironmentAwareCommand.js +30 -30
  75. package/src/commands/EnvironmentAwareCommand/EnvironmentAwareCommand.js.map +1 -1
  76. package/src/commands/EnvironmentAwareCommand/components/HealthReport.d.ts +1 -1
  77. package/src/commands/EnvironmentAwareCommand/components/HealthReport.js +14 -15
  78. package/src/commands/EnvironmentAwareCommand/components/HealthReport.js.map +1 -1
  79. package/src/commands/EnvironmentAwareCommand/contexts/CrankScriptContext.js +5 -10
  80. package/src/commands/EnvironmentAwareCommand/contexts/CrankScriptContext.js.map +1 -1
  81. package/src/commands/EnvironmentAwareCommand/index.js +0 -1
  82. package/src/commands/EnvironmentAwareCommand/index.js.map +1 -1
  83. package/src/commands/GenerateTypes/GenerateTypesCommand.js +14 -21
  84. package/src/commands/GenerateTypes/GenerateTypesCommand.js.map +1 -1
  85. package/src/commands/GenerateTypes/components/GenerateTypes.d.ts +1 -1
  86. package/src/commands/GenerateTypes/components/GenerateTypes.js +11 -15
  87. package/src/commands/GenerateTypes/components/GenerateTypes.js.map +1 -1
  88. package/src/commands/GenerateTypes/constants.js +0 -1
  89. package/src/commands/GenerateTypes/constants.js.map +1 -1
  90. package/src/commands/GenerateTypes/fn/getApiDefinitions.d.ts +1 -1
  91. package/src/commands/GenerateTypes/fn/getApiDefinitions.js +12 -14
  92. package/src/commands/GenerateTypes/fn/getApiDefinitions.js.map +1 -1
  93. package/src/commands/GenerateTypes/fn/getDescriptionsFromHtml.d.ts +1 -1
  94. package/src/commands/GenerateTypes/fn/getDescriptionsFromHtml.js +38 -30
  95. package/src/commands/GenerateTypes/fn/getDescriptionsFromHtml.js.map +1 -1
  96. package/src/commands/GenerateTypes/fn/getFunctionTypeOverride.js +5 -4
  97. package/src/commands/GenerateTypes/fn/getFunctionTypeOverride.js.map +1 -1
  98. package/src/commands/GenerateTypes/fn/getHtmlForVersion.js +6 -9
  99. package/src/commands/GenerateTypes/fn/getHtmlForVersion.js.map +1 -1
  100. package/src/commands/GenerateTypes/fn/parseFunctionSignature.js +13 -10
  101. package/src/commands/GenerateTypes/fn/parseFunctionSignature.js.map +1 -1
  102. package/src/commands/GenerateTypes/hooks/useFetchHtml.js +10 -12
  103. package/src/commands/GenerateTypes/hooks/useFetchHtml.js.map +1 -1
  104. package/src/commands/GenerateTypes/hooks/useFormatTypeFile.js +23 -29
  105. package/src/commands/GenerateTypes/hooks/useFormatTypeFile.js.map +1 -1
  106. package/src/commands/GenerateTypes/hooks/useGenerateTypeFile.d.ts +2 -2
  107. package/src/commands/GenerateTypes/hooks/useGenerateTypeFile.js +44 -75
  108. package/src/commands/GenerateTypes/hooks/useGenerateTypeFile.js.map +1 -1
  109. package/src/commands/GenerateTypes/hooks/useGetVersion.d.ts +1 -1
  110. package/src/commands/GenerateTypes/hooks/useGetVersion.js +19 -19
  111. package/src/commands/GenerateTypes/hooks/useGetVersion.js.map +1 -1
  112. package/src/commands/GenerateTypes/hooks/useParseDocumentation.d.ts +1 -1
  113. package/src/commands/GenerateTypes/hooks/useParseDocumentation.js +10 -12
  114. package/src/commands/GenerateTypes/hooks/useParseDocumentation.js.map +1 -1
  115. package/src/commands/GenerateTypes/index.js +0 -1
  116. package/src/commands/GenerateTypes/index.js.map +1 -1
  117. package/src/commands/GenerateTypes/types.d.ts +1 -1
  118. package/src/commands/GenerateTypes/types.js +1 -2
  119. package/src/commands/GenerateTypes/types.js.map +1 -1
  120. package/src/commands/GenerateTypes/utils/createTypeProvider.d.ts +2 -2
  121. package/src/commands/GenerateTypes/utils/createTypeProvider.js +63 -85
  122. package/src/commands/GenerateTypes/utils/createTypeProvider.js.map +1 -1
  123. package/src/commands/GenerateTypes/utils/functionTypeOverrides.d.ts +1 -1
  124. package/src/commands/GenerateTypes/utils/functionTypeOverrides.js +6 -7
  125. package/src/commands/GenerateTypes/utils/functionTypeOverrides.js.map +1 -1
  126. package/src/commands/NewCommand/NewCommand.js +9 -17
  127. package/src/commands/NewCommand/NewCommand.js.map +1 -1
  128. package/src/commands/NewCommand/components/New.d.ts +1 -1
  129. package/src/commands/NewCommand/components/New.js +19 -25
  130. package/src/commands/NewCommand/components/New.js.map +1 -1
  131. package/src/commands/NewLibCommand/NewLibCommand.js +9 -17
  132. package/src/commands/NewLibCommand/NewLibCommand.js.map +1 -1
  133. package/src/commands/NewLibCommand/components/NewLib.d.ts +1 -1
  134. package/src/commands/NewLibCommand/components/NewLib.js +19 -25
  135. package/src/commands/NewLibCommand/components/NewLib.js.map +1 -1
  136. package/src/commands/NewLibCommand/index.js +0 -1
  137. package/src/commands/NewLibCommand/index.js.map +1 -1
  138. package/src/commands/RenderableCommand.d.ts +1 -1
  139. package/src/commands/RenderableCommand.js +5 -3
  140. package/src/commands/RenderableCommand.js.map +1 -1
  141. package/src/commands/SimulatorCommand/SimulatorCommand.d.ts +1 -1
  142. package/src/commands/SimulatorCommand/SimulatorCommand.js +23 -38
  143. package/src/commands/SimulatorCommand/SimulatorCommand.js.map +1 -1
  144. package/src/commands/SimulatorCommand/components/Simulator.d.ts +3 -2
  145. package/src/commands/SimulatorCommand/components/Simulator.js +19 -17
  146. package/src/commands/SimulatorCommand/components/Simulator.js.map +1 -1
  147. package/src/commands/SimulatorCommand/components/TemporaryFolderCreator.d.ts +1 -1
  148. package/src/commands/SimulatorCommand/components/TemporaryFolderCreator.js +15 -22
  149. package/src/commands/SimulatorCommand/components/TemporaryFolderCreator.js.map +1 -1
  150. package/src/commands/SimulatorCommand/fn/createTemporaryFolderPathFromEntryFile.js +8 -6
  151. package/src/commands/SimulatorCommand/fn/createTemporaryFolderPathFromEntryFile.js.map +1 -1
  152. package/src/commands/SimulatorCommand/fn/getSimulatorPathFromEnvironment.d.ts +1 -1
  153. package/src/commands/SimulatorCommand/fn/getSimulatorPathFromEnvironment.js +1 -2
  154. package/src/commands/SimulatorCommand/fn/getSimulatorPathFromEnvironment.js.map +1 -1
  155. package/src/commands/SimulatorCommand/hooks/useFileWatcher.js +10 -10
  156. package/src/commands/SimulatorCommand/hooks/useFileWatcher.js.map +1 -1
  157. package/src/commands/SimulatorCommand/hooks/useSimulatorTasks.d.ts +6 -2
  158. package/src/commands/SimulatorCommand/hooks/useSimulatorTasks.js +52 -50
  159. package/src/commands/SimulatorCommand/hooks/useSimulatorTasks.js.map +1 -1
  160. package/src/commands/SimulatorCommand/index.js +0 -1
  161. package/src/commands/SimulatorCommand/index.js.map +1 -1
  162. package/src/commands/TestCommand/TestCommand.d.ts +12 -0
  163. package/src/commands/TestCommand/TestCommand.js +32 -0
  164. package/src/commands/TestCommand/TestCommand.js.map +1 -0
  165. package/src/commands/TestCommand/components/Test.d.ts +9 -0
  166. package/src/commands/TestCommand/components/Test.js +73 -0
  167. package/src/commands/TestCommand/components/Test.js.map +1 -0
  168. package/src/commands/TestCommand/components/TestLine.d.ts +10 -0
  169. package/src/commands/TestCommand/components/TestLine.js +11 -0
  170. package/src/commands/TestCommand/components/TestLine.js.map +1 -0
  171. package/src/commands/TestCommand/components/TestResult.d.ts +8 -0
  172. package/src/commands/TestCommand/components/TestResult.js +21 -0
  173. package/src/commands/TestCommand/components/TestResult.js.map +1 -0
  174. package/src/commands/TestCommand/components/TestSuite.d.ts +8 -0
  175. package/src/commands/TestCommand/components/TestSuite.js +60 -0
  176. package/src/commands/TestCommand/components/TestSuite.js.map +1 -0
  177. package/src/commands/TestCommand/components/TestSummary.d.ts +7 -0
  178. package/src/commands/TestCommand/components/TestSummary.js +9 -0
  179. package/src/commands/TestCommand/components/TestSummary.js.map +1 -0
  180. package/src/commands/TestCommand/hooks/useTestFiles.d.ts +3 -0
  181. package/src/commands/TestCommand/hooks/useTestFiles.js +8 -0
  182. package/src/commands/TestCommand/hooks/useTestFiles.js.map +1 -0
  183. package/src/commands/TestCommand/hooks/useTestServer.d.ts +5 -0
  184. package/src/commands/TestCommand/hooks/useTestServer.js +26 -0
  185. package/src/commands/TestCommand/hooks/useTestServer.js.map +1 -0
  186. package/src/commands/TestCommand/hooks/useTestTasks.d.ts +14 -0
  187. package/src/commands/TestCommand/hooks/useTestTasks.js +61 -0
  188. package/src/commands/TestCommand/hooks/useTestTasks.js.map +1 -0
  189. package/src/commands/TestCommand/index.d.ts +1 -0
  190. package/src/commands/TestCommand/index.js +2 -0
  191. package/src/commands/TestCommand/index.js.map +1 -0
  192. package/src/commands/TestCommand/server/TestServer.d.ts +72 -0
  193. package/src/commands/TestCommand/server/TestServer.js +249 -0
  194. package/src/commands/TestCommand/server/TestServer.js.map +1 -0
  195. package/src/commands/TestCommand/types.d.ts +4 -0
  196. package/src/commands/TestCommand/types.js +6 -0
  197. package/src/commands/TestCommand/types.js.map +1 -0
  198. package/src/commands/TestCommand/utils/formatTestError.d.ts +1 -0
  199. package/src/commands/TestCommand/utils/formatTestError.js +7 -0
  200. package/src/commands/TestCommand/utils/formatTestError.js.map +1 -0
  201. package/src/commands/TranspileCommand/TranspileCommand.js +20 -28
  202. package/src/commands/TranspileCommand/TranspileCommand.js.map +1 -1
  203. package/src/commands/TranspileCommand/components/Transpile.d.ts +2 -2
  204. package/src/commands/TranspileCommand/components/Transpile.js +3 -7
  205. package/src/commands/TranspileCommand/components/Transpile.js.map +1 -1
  206. package/src/commands/TranspileCommand/fn/getErrorMessage.d.ts +1 -1
  207. package/src/commands/TranspileCommand/fn/getErrorMessage.js +5 -6
  208. package/src/commands/TranspileCommand/fn/getErrorMessage.js.map +1 -1
  209. package/src/commands/TranspileCommand/fn/transpile.d.ts +2 -2
  210. package/src/commands/TranspileCommand/fn/transpile.js +15 -17
  211. package/src/commands/TranspileCommand/fn/transpile.js.map +1 -1
  212. package/src/commands/TranspileCommand/fn/validateEntryPoint.d.ts +1 -1
  213. package/src/commands/TranspileCommand/fn/validateEntryPoint.js +2 -3
  214. package/src/commands/TranspileCommand/fn/validateEntryPoint.js.map +1 -1
  215. package/src/commands/TranspileCommand/fn/validateExitPoint.d.ts +1 -1
  216. package/src/commands/TranspileCommand/fn/validateExitPoint.js +6 -6
  217. package/src/commands/TranspileCommand/fn/validateExitPoint.js.map +1 -1
  218. package/src/commands/TranspileCommand/hooks/useTranspileTasks.d.ts +4 -4
  219. package/src/commands/TranspileCommand/hooks/useTranspileTasks.js +34 -33
  220. package/src/commands/TranspileCommand/hooks/useTranspileTasks.js.map +1 -1
  221. package/src/commands/TranspileCommand/index.js +0 -1
  222. package/src/commands/TranspileCommand/index.js.map +1 -1
  223. package/src/commands/TranspileCommand/model/ValidatedEntryPoint.js +1 -2
  224. package/src/commands/TranspileCommand/model/ValidatedEntryPoint.js.map +1 -1
  225. package/src/commands/TranspileCommand/model/ValidatedExitPoint.js +1 -2
  226. package/src/commands/TranspileCommand/model/ValidatedExitPoint.js.map +1 -1
  227. package/src/commands/TranspileCommand/types.js +1 -2
  228. package/src/commands/TranspileCommand/types.js.map +1 -1
  229. package/src/components/CheckList/CheckList.d.ts +3 -2
  230. package/src/components/CheckList/CheckList.js +14 -21
  231. package/src/components/CheckList/CheckList.js.map +1 -1
  232. package/src/components/CheckList/Item.d.ts +3 -2
  233. package/src/components/CheckList/Item.js +47 -44
  234. package/src/components/CheckList/Item.js.map +1 -1
  235. package/src/components/CheckList/index.js +0 -1
  236. package/src/components/CheckList/index.js.map +1 -1
  237. package/src/components/ErrorBoundary.d.ts +14 -0
  238. package/src/components/ErrorBoundary.js +7 -13
  239. package/src/components/ErrorBoundary.js.map +1 -1
  240. package/src/components/Spinner.d.ts +1 -1
  241. package/src/components/Spinner.js +13 -18
  242. package/src/components/Spinner.js.map +1 -1
  243. package/src/constants.js +1 -6
  244. package/src/constants.js.map +1 -1
  245. package/src/environment/createEnvironment.d.ts +1 -1
  246. package/src/environment/createEnvironment.js +13 -16
  247. package/src/environment/createEnvironment.js.map +1 -1
  248. package/src/environment/dto/Environment.d.ts +1 -1
  249. package/src/environment/dto/Environment.js +1 -2
  250. package/src/environment/dto/Environment.js.map +1 -1
  251. package/src/environment/error/EnvironmentError.js +0 -1
  252. package/src/environment/error/EnvironmentError.js.map +1 -1
  253. package/src/environment/path/dto/PlaydateSdkPath.js +3 -4
  254. package/src/environment/path/dto/PlaydateSdkPath.js.map +1 -1
  255. package/src/environment/path/error/PlaydateSdkPathVariableNotSetError.js +1 -2
  256. package/src/environment/path/error/PlaydateSdkPathVariableNotSetError.js.map +1 -1
  257. package/src/environment/path/getPlaydateSdkPath.js +5 -3
  258. package/src/environment/path/getPlaydateSdkPath.js.map +1 -1
  259. package/src/index.js +7 -5
  260. package/src/index.js.map +1 -1
  261. package/src/types.d.ts +3 -3
  262. package/src/types.js +4 -5
  263. package/src/types.js.map +1 -1
  264. package/src/utils/appendExeOnWindows.js +1 -2
  265. package/src/utils/appendExeOnWindows.js.map +1 -1
  266. package/src/utils/dirname.js +0 -1
  267. package/src/utils/dirname.js.map +1 -1
  268. package/src/utils/platform.js +0 -1
  269. package/src/utils/platform.js.map +1 -1
  270. package/src/commands/TranspileCommand/fn/_tests/test-abstract/src/index.js +0 -4
  271. package/src/commands/TranspileCommand/fn/_tests/test-abstract/src/index.js.map +0 -1
  272. package/src/commands/TranspileCommand/fn/_tests/test-automatic-imports/src/index.js +0 -3
  273. package/src/commands/TranspileCommand/fn/_tests/test-automatic-imports/src/index.js.map +0 -1
  274. package/src/commands/TranspileCommand/fn/_tests/test-builtins/src/index.js +0 -4
  275. package/src/commands/TranspileCommand/fn/_tests/test-builtins/src/index.js.map +0 -1
  276. package/src/commands/TranspileCommand/fn/_tests/test-default-parameters/src/index.js +0 -17
  277. package/src/commands/TranspileCommand/fn/_tests/test-default-parameters/src/index.js.map +0 -1
  278. package/src/commands/TranspileCommand/fn/_tests/test-implicit-constructor/src/index.js +0 -10
  279. package/src/commands/TranspileCommand/fn/_tests/test-implicit-constructor/src/index.js.map +0 -1
  280. package/src/commands/TranspileCommand/fn/_tests/test-static/src/index.js +0 -18
  281. package/src/commands/TranspileCommand/fn/_tests/test-static/src/index.js.map +0 -1
  282. package/src/commands/TranspileCommand/fn/_tests/test-super/src/index.js +0 -24
  283. package/src/commands/TranspileCommand/fn/_tests/test-super/src/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../libs/cli/src/environment/path/getPlaydateSdkPath.ts"],"sourcesContent":["import * as process from 'node:process';\nimport { PlaydateSdkPath } from './dto/PlaydateSdkPath.js';\nimport { PlaydateSdkPathVariableNotSetError } from './error/PlaydateSdkPathVariableNotSetError.js';\n\n/**\n * Get the path to the Playdate SDK from the environment.\n *\n * @throws {PlaydateSdkPathVariableNotSetError} Thrown if the PLAYDATE_SDK_PATH environment variable is not set.\n */\nexport const getPlaydateSdkPath = (input: {\n /**\n * The environment to get the Playdate SDK path from.\n *\n * Defaults to `process.env`.\n */\n environment: Record<string, unknown>;\n}) => {\n const { environment = process.env } = input;\n\n if (!('PLAYDATE_SDK_PATH' in environment)) {\n throw new PlaydateSdkPathVariableNotSetError();\n }\n\n return PlaydateSdkPath.fromString(\n environment['PLAYDATE_SDK_PATH'] as string,\n );\n};\n"],"names":["process","PlaydateSdkPath","PlaydateSdkPathVariableNotSetError","getPlaydateSdkPath","input","environment","env","fromString"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,aAAa,eAAe;AACxC,SAASC,eAAe,QAAQ,2BAA2B;AAC3D,SAASC,kCAAkC,QAAQ,gDAAgD;AAEnG;;;;CAIC,GACD,OAAO,MAAMC,qBAAqB,CAACC;IAQ/B,MAAM,EAAEC,cAAcL,QAAQM,GAAG,EAAE,GAAGF;IAEtC,IAAI,CAAE,CAAA,uBAAuBC,WAAU,GAAI;QACvC,MAAM,IAAIH;IACd;IAEA,OAAOD,gBAAgBM,UAAU,CAC7BF,WAAW,CAAC,oBAAoB;AAExC,EAAE"}
1
+ {"version":3,"file":"getPlaydateSdkPath.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/environment/path/getPlaydateSdkPath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,kCAAkC,EAAE,MAAM,+CAA+C,CAAC;AAEnG;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAOlC,EAAE,EAAE;IACD,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC;IAE5C,IAAI,CAAC,CAAC,mBAAmB,IAAI,WAAW,CAAC,EAAE,CAAC;QACxC,MAAM,IAAI,kCAAkC,EAAE,CAAC;IACnD,CAAC;IAED,OAAO,eAAe,CAAC,UAAU;IAC7B,kFAAkF;IAClF,WAAW,CAAC,mBAAmB,CAAW,CAC7C,CAAC;AACN,CAAC,CAAC"}
package/src/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { readFileSync } from 'fs';
2
+ import { readFileSync } from 'node:fs';
3
3
  import { join } from 'node:path';
4
4
  import { Builtins, Cli } from 'clipanion';
5
5
  import { CompileCommand } from './commands/CompileCommand/index.js';
@@ -8,6 +8,7 @@ import { GenerateTypesCommand } from './commands/GenerateTypes/index.js';
8
8
  import { NewCommand } from './commands/NewCommand/NewCommand.js';
9
9
  import { NewLibCommand } from './commands/NewLibCommand/index.js';
10
10
  import { SimulatorCommand } from './commands/SimulatorCommand/index.js';
11
+ import { TestCommand } from './commands/TestCommand/index.js';
11
12
  import { TranspileCommand } from './commands/TranspileCommand/index.js';
12
13
  import { RootFolder } from './constants.js';
13
14
  const packageJsonContents = readFileSync(join(RootFolder, 'package.json'), 'utf-8');
@@ -16,9 +17,9 @@ const args = process.argv.slice(2);
16
17
  const cli = new Cli({
17
18
  binaryLabel: 'crankscript',
18
19
  binaryName: 'crankscript',
19
- binaryVersion: packageJson.version
20
+ binaryVersion: packageJson.version,
20
21
  });
21
- process.on('SIGINT', function() {
22
+ process.on('SIGINT', () => {
22
23
  process.exit();
23
24
  });
24
25
  cli.register(Builtins.HelpCommand);
@@ -30,10 +31,11 @@ cli.register(TranspileCommand);
30
31
  cli.register(CompileCommand);
31
32
  cli.register(GenerateTypesCommand);
32
33
  cli.register(SimulatorCommand);
34
+ cli.register(TestCommand);
33
35
  try {
34
36
  cli.runExit(args);
35
- } catch (error) {
37
+ }
38
+ catch (_error) {
36
39
  process.exit(1);
37
40
  }
38
-
39
41
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../libs/cli/src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { readFileSync } from 'fs';\nimport { join } from 'node:path';\nimport { Builtins, Cli } from 'clipanion';\nimport { CompileCommand } from '@/cli/commands/CompileCommand/index.js';\nimport { DoctorCommand } from '@/cli/commands/DoctorCommand.js';\nimport { GenerateTypesCommand } from '@/cli/commands/GenerateTypes/index.js';\nimport { NewCommand } from '@/cli/commands/NewCommand/NewCommand.js';\nimport { NewLibCommand } from '@/cli/commands/NewLibCommand/index.js';\nimport { SimulatorCommand } from '@/cli/commands/SimulatorCommand/index.js';\nimport { TranspileCommand } from '@/cli/commands/TranspileCommand/index.js';\nimport { RootFolder } from '@/cli/constants.js';\n\nconst packageJsonContents = readFileSync(\n join(RootFolder, 'package.json'),\n 'utf-8',\n);\nconst packageJson = JSON.parse(packageJsonContents);\n\nconst args = process.argv.slice(2);\n\nconst cli = new Cli({\n binaryLabel: 'crankscript',\n binaryName: 'crankscript',\n binaryVersion: packageJson.version,\n});\n\nprocess.on('SIGINT', function () {\n process.exit();\n});\n\ncli.register(Builtins.HelpCommand);\ncli.register(Builtins.VersionCommand);\ncli.register(DoctorCommand);\ncli.register(NewCommand);\ncli.register(NewLibCommand);\ncli.register(TranspileCommand);\ncli.register(CompileCommand);\ncli.register(GenerateTypesCommand);\ncli.register(SimulatorCommand);\n\ntry {\n cli.runExit(args);\n} catch (error) {\n process.exit(1);\n}\n"],"names":["readFileSync","join","Builtins","Cli","CompileCommand","DoctorCommand","GenerateTypesCommand","NewCommand","NewLibCommand","SimulatorCommand","TranspileCommand","RootFolder","packageJsonContents","packageJson","JSON","parse","args","process","argv","slice","cli","binaryLabel","binaryName","binaryVersion","version","on","exit","register","HelpCommand","VersionCommand","runExit","error"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAEA,SAASA,YAAY,QAAQ,KAAK;AAClC,SAASC,IAAI,QAAQ,YAAY;AACjC,SAASC,QAAQ,EAAEC,GAAG,QAAQ,YAAY;AAC1C,SAASC,cAAc,QAAQ,yCAAyC;AACxE,SAASC,aAAa,QAAQ,kCAAkC;AAChE,SAASC,oBAAoB,QAAQ,wCAAwC;AAC7E,SAASC,UAAU,QAAQ,0CAA0C;AACrE,SAASC,aAAa,QAAQ,wCAAwC;AACtE,SAASC,gBAAgB,QAAQ,2CAA2C;AAC5E,SAASC,gBAAgB,QAAQ,2CAA2C;AAC5E,SAASC,UAAU,QAAQ,qBAAqB;AAEhD,MAAMC,sBAAsBZ,aACxBC,KAAKU,YAAY,iBACjB;AAEJ,MAAME,cAAcC,KAAKC,KAAK,CAACH;AAE/B,MAAMI,OAAOC,QAAQC,IAAI,CAACC,KAAK,CAAC;AAEhC,MAAMC,MAAM,IAAIjB,IAAI;IAChBkB,aAAa;IACbC,YAAY;IACZC,eAAeV,YAAYW,OAAO;AACtC;AAEAP,QAAQQ,EAAE,CAAC,UAAU;IACjBR,QAAQS,IAAI;AAChB;AAEAN,IAAIO,QAAQ,CAACzB,SAAS0B,WAAW;AACjCR,IAAIO,QAAQ,CAACzB,SAAS2B,cAAc;AACpCT,IAAIO,QAAQ,CAACtB;AACbe,IAAIO,QAAQ,CAACpB;AACba,IAAIO,QAAQ,CAACnB;AACbY,IAAIO,QAAQ,CAACjB;AACbU,IAAIO,QAAQ,CAACvB;AACbgB,IAAIO,QAAQ,CAACrB;AACbc,IAAIO,QAAQ,CAAClB;AAEb,IAAI;IACAW,IAAIU,OAAO,CAACd;AAChB,EAAE,OAAOe,OAAO;IACZd,QAAQS,IAAI,CAAC;AACjB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/cli/src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,mBAAmB,GAAG,YAAY,CACpC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,EAChC,OAAO,CACV,CAAC;AACF,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;AAEpD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEnC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC;IAChB,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,aAAa;IACzB,aAAa,EAAE,WAAW,CAAC,OAAO;CACrC,CAAC,CAAC;AAEH,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;IACtB,OAAO,CAAC,IAAI,EAAE,CAAC;AACnB,CAAC,CAAC,CAAC;AAEH,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACnC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;AACtC,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;AAC5B,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AACzB,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;AAC5B,GAAG,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAC/B,GAAG,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;AAC7B,GAAG,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;AACnC,GAAG,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAC/B,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AAE1B,IAAI,CAAC;IACD,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC;AAAC,OAAO,MAAM,EAAE,CAAC;IACd,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC"}
package/src/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { ClassDeclarationStructure, FunctionDeclarationStructure, MethodDeclarationStructure, ParameterDeclarationStructure, PropertyDeclarationStructure, VariableDeclarationStructure } from 'ts-morph';
2
- import { Environment } from './environment/dto/Environment.js';
3
- import { PlaydateSdkPath } from './environment/path/dto/PlaydateSdkPath.js';
1
+ import type { ClassDeclarationStructure, FunctionDeclarationStructure, MethodDeclarationStructure, ParameterDeclarationStructure, PropertyDeclarationStructure, VariableDeclarationStructure } from 'ts-morph';
2
+ import type { Environment } from './environment/dto/Environment.js';
3
+ import type { PlaydateSdkPath } from './environment/path/dto/PlaydateSdkPath.js';
4
4
  export declare enum PlaydateSdkVersionIdentifier {
5
5
  Latest = "latest"
6
6
  }
package/src/types.js CHANGED
@@ -1,20 +1,19 @@
1
1
  export var PlaydateSdkVersionIdentifier;
2
- (function(PlaydateSdkVersionIdentifier) {
2
+ (function (PlaydateSdkVersionIdentifier) {
3
3
  PlaydateSdkVersionIdentifier["Latest"] = "latest";
4
4
  })(PlaydateSdkVersionIdentifier || (PlaydateSdkVersionIdentifier = {}));
5
5
  export var HealthCheckStatusType;
6
- (function(HealthCheckStatusType) {
6
+ (function (HealthCheckStatusType) {
7
7
  HealthCheckStatusType["Healthy"] = "Healthy";
8
8
  HealthCheckStatusType["Unhealthy"] = "Unhealthy";
9
9
  HealthCheckStatusType["Unknown"] = "Unknown";
10
10
  })(HealthCheckStatusType || (HealthCheckStatusType = {}));
11
11
  export var TemplateName;
12
- (function(TemplateName) {
12
+ (function (TemplateName) {
13
13
  TemplateName["Blank"] = "blank";
14
14
  })(TemplateName || (TemplateName = {}));
15
15
  export var LibraryTemplateName;
16
- (function(LibraryTemplateName) {
16
+ (function (LibraryTemplateName) {
17
17
  LibraryTemplateName["Blank"] = "blank";
18
18
  })(LibraryTemplateName || (LibraryTemplateName = {}));
19
-
20
19
  //# sourceMappingURL=types.js.map
package/src/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../libs/cli/src/types.ts"],"sourcesContent":["import {\n ClassDeclarationStructure,\n FunctionDeclarationStructure,\n MethodDeclarationStructure,\n ParameterDeclarationStructure,\n PropertyDeclarationStructure,\n VariableDeclarationStructure,\n} from 'ts-morph';\nimport { Environment } from '@/cli/environment/dto/Environment.js';\nimport { PlaydateSdkPath } from '@/cli/environment/path/dto/PlaydateSdkPath.js';\n\nexport enum PlaydateSdkVersionIdentifier {\n Latest = 'latest',\n}\n\nexport type PlaydateSdkVersion = PlaydateSdkVersionIdentifier.Latest | string;\n\nexport type EnvironmentHealthResult =\n | {\n isHealthy: true;\n environment: Environment;\n health: EnvironmentHealth;\n }\n | {\n isHealthy: false;\n health: EnvironmentHealth;\n };\n\nexport enum HealthCheckStatusType {\n Healthy = 'Healthy',\n Unhealthy = 'Unhealthy',\n Unknown = 'Unknown',\n}\n\nexport type HealthCheckStatus<TArgument> =\n | {\n healthStatus:\n | HealthCheckStatusType.Unknown\n | HealthCheckStatusType.Unhealthy;\n }\n | {\n healthStatus: HealthCheckStatusType.Healthy;\n argument: TArgument;\n };\n\nexport interface EnvironmentHealth {\n sdkPathKnown: HealthCheckStatus<PlaydateSdkPath>;\n}\n\nexport type CheckListItem<TResult> = {\n runningDescription: string;\n waitingDescription: string;\n errorDescription: string;\n finishedDescription: (result: TResult | false) => string;\n skipDescription?: string;\n runner: () => Promise<TResult> | Promise<false>;\n onFinish?: (result: TResult | false) => void;\n ready?: boolean;\n quitOnError?: boolean;\n skip?: boolean | (() => boolean);\n};\n\nexport interface ParameterDescription {\n name: string;\n required: boolean;\n}\n\nexport interface PropertyDescription {\n signature: string;\n name: string;\n namespaces: string[];\n docs: string;\n}\n\nexport interface FunctionDescription {\n signature: string;\n name: string;\n namespaces: string[];\n parameters: ParameterDescription[];\n hasSelf: boolean;\n docs: string;\n}\n\nexport interface ApiObject {\n functions: FunctionDescription[];\n methods: FunctionDescription[];\n properties: PropertyDescription[];\n namespaces: Record<string, ApiObject>;\n}\n\nexport interface ApiDefinitions {\n global: ApiObject;\n}\n\nexport interface PropertyDetails extends Partial<PropertyDeclarationStructure> {\n signature: string;\n}\n\nexport type FunctionDetails = {\n signature: string;\n parameters: ParameterDetails[];\n overrideParameters?: boolean;\n} & (\n | Partial<FunctionDeclarationStructure>\n | Partial<MethodDeclarationStructure>\n);\n\nexport type ParameterDetails = ParameterDeclarationStructure;\n\nexport interface ConstantDefinition\n extends Partial<VariableDeclarationStructure> {\n name: string;\n}\n\nexport type TypeProviderData = {\n globalStatements: string[];\n statements: string[];\n constants: Record<string, (ConstantDefinition | string)[]>;\n classes: Record<string, Partial<ClassDeclarationStructure>>;\n properties: Record<string, PropertyDetails>;\n /**\n * Properties that are described in prose rather than in formal API documentation.\n * While 'properties' contains actual property definitions with their full path as the key,\n * 'dynamicProperties' contains additional properties that belong to a parent namespace.\n *\n * For example, if the docs mention \"You can access rect.x, rect.y\" in prose,\n * the key would be \"playdate.geometry.rect\" and the value would be the properties\n * that should be added to that namespace.\n */\n dynamicProperties: Record<\n string,\n Pick<PropertyDescription, 'name' | 'docs'>[]\n >;\n functions: Record<string, FunctionDetails>;\n};\n\nexport type FunctionTypeOverrideMap = Record<string, { isMethod: boolean }>;\n\nexport enum TemplateName {\n Blank = 'blank',\n}\n\nexport enum LibraryTemplateName {\n Blank = 'blank',\n}\n"],"names":["PlaydateSdkVersionIdentifier","HealthCheckStatusType","TemplateName","LibraryTemplateName"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":";UAWYA;;GAAAA,iCAAAA;;UAiBAC;;;;GAAAA,0BAAAA;;UA8GAC;;GAAAA,iBAAAA;;UAIAC;;GAAAA,wBAAAA"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../libs/cli/src/types.ts"],"names":[],"mappings":"AAWA,MAAM,CAAN,IAAY,4BAEX;AAFD,WAAY,4BAA4B;IACpC,iDAAiB,CAAA;AACrB,CAAC,EAFW,4BAA4B,KAA5B,4BAA4B,QAEvC;AAeD,MAAM,CAAN,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC7B,4CAAmB,CAAA;IACnB,gDAAuB,CAAA;IACvB,4CAAmB,CAAA;AACvB,CAAC,EAJW,qBAAqB,KAArB,qBAAqB,QAIhC;AA0GD,MAAM,CAAN,IAAY,YAEX;AAFD,WAAY,YAAY;IACpB,+BAAe,CAAA;AACnB,CAAC,EAFW,YAAY,KAAZ,YAAY,QAEvB;AAED,MAAM,CAAN,IAAY,mBAEX;AAFD,WAAY,mBAAmB;IAC3B,sCAAe,CAAA;AACnB,CAAC,EAFW,mBAAmB,KAAnB,mBAAmB,QAE9B"}
@@ -1,6 +1,5 @@
1
1
  import { isWindows } from '../utils/platform.js';
2
- export const appendExeOnWindows = (binary)=>{
2
+ export const appendExeOnWindows = (binary) => {
3
3
  return isWindows ? `${binary}.exe` : binary;
4
4
  };
5
-
6
5
  //# sourceMappingURL=appendExeOnWindows.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../libs/cli/src/utils/appendExeOnWindows.ts"],"sourcesContent":["import { isWindows } from '@/cli/utils/platform.js';\n\nexport const appendExeOnWindows = (binary: string) => {\n return isWindows ? `${binary}.exe` : binary;\n};\n"],"names":["isWindows","appendExeOnWindows","binary"],"rangeMappings":";;;","mappings":"AAAA,SAASA,SAAS,QAAQ,0BAA0B;AAEpD,OAAO,MAAMC,qBAAqB,CAACC;IAC/B,OAAOF,YAAY,CAAC,EAAEE,OAAO,IAAI,CAAC,GAAGA;AACzC,EAAE"}
1
+ {"version":3,"file":"appendExeOnWindows.js","sourceRoot":"","sources":["../../../../../libs/cli/src/utils/appendExeOnWindows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAc,EAAE,EAAE;IACjD,OAAO,SAAS,CAAC,CAAC,CAAC,GAAG,MAAM,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;AAChD,CAAC,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { dirname } from 'node:path';
2
2
  import { fileURLToPath } from 'node:url';
3
3
  export const __dirname = dirname(fileURLToPath(import.meta.url));
4
-
5
4
  //# sourceMappingURL=dirname.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../libs/cli/src/utils/dirname.ts"],"sourcesContent":["import { dirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nexport const __dirname = dirname(fileURLToPath(import.meta.url));\n"],"names":["dirname","fileURLToPath","__dirname","url"],"rangeMappings":";;","mappings":"AAAA,SAASA,OAAO,QAAQ,YAAY;AACpC,SAASC,aAAa,QAAQ,WAAW;AAEzC,OAAO,MAAMC,YAAYF,QAAQC,cAAc,YAAYE,GAAG,GAAG"}
1
+ {"version":3,"file":"dirname.js","sourceRoot":"","sources":["../../../../../libs/cli/src/utils/dirname.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC"}
@@ -2,5 +2,4 @@ import { platform } from 'node:os';
2
2
  export const platformName = platform();
3
3
  export const isWindows = platformName === 'win32';
4
4
  export const isMac = platformName === 'darwin';
5
-
6
5
  //# sourceMappingURL=platform.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../libs/cli/src/utils/platform.ts"],"sourcesContent":["import { platform } from 'node:os';\n\nexport const platformName = platform();\nexport const isWindows = platformName === 'win32';\nexport const isMac = platformName === 'darwin';\n"],"names":["platform","platformName","isWindows","isMac"],"rangeMappings":";;;","mappings":"AAAA,SAASA,QAAQ,QAAQ,UAAU;AAEnC,OAAO,MAAMC,eAAeD,WAAW;AACvC,OAAO,MAAME,YAAYD,iBAAiB,QAAQ;AAClD,OAAO,MAAME,QAAQF,iBAAiB,SAAS"}
1
+ {"version":3,"file":"platform.js","sourceRoot":"","sources":["../../../../../libs/cli/src/utils/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,EAAE,CAAC;AACvC,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,KAAK,OAAO,CAAC;AAClD,MAAM,CAAC,MAAM,KAAK,GAAG,YAAY,KAAK,QAAQ,CAAC"}
@@ -1,4 +0,0 @@
1
- let A = class A {
2
- };
3
-
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../../../../libs/cli/src/commands/TranspileCommand/fn/_tests/test-abstract/src/index.ts"],"sourcesContent":["abstract class A {\n abstract a(): void;\n}\n"],"names":["A"],"rangeMappings":";","mappings":"AAAA,IAAA,AAAeA,IAAf,MAAeA;AAEf"}
@@ -1,3 +0,0 @@
1
- printTable(playdate.graphics);
2
-
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../../../../libs/cli/src/commands/TranspileCommand/fn/_tests/test-automatic-imports/src/index.ts"],"sourcesContent":["printTable(playdate.graphics);\n"],"names":["printTable","playdate","graphics"],"rangeMappings":"","mappings":"AAAAA,WAAWC,SAASC,QAAQ"}
@@ -1,4 +0,0 @@
1
- const test = new Map();
2
- console.log(test);
3
-
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../../../../libs/cli/src/commands/TranspileCommand/fn/_tests/test-builtins/src/index.ts"],"sourcesContent":["const test = new Map();\nconsole.log(test);\n"],"names":["test","Map","console","log"],"rangeMappings":";","mappings":"AAAA,MAAMA,OAAO,IAAIC;AACjBC,QAAQC,GAAG,CAACH"}
@@ -1,17 +0,0 @@
1
- let A = class A {
2
- method(c, d = 5) {
3
- console.log(c, d);
4
- }
5
- constructor(a, b = 5){
6
- console.log(a, b);
7
- }
8
- };
9
- function test(x, y = 5) {
10
- console.log(x, y);
11
- }
12
- playdate.update = ()=>{
13
- printTable(new A(1));
14
- test(1);
15
- };
16
-
17
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../../../../libs/cli/src/commands/TranspileCommand/fn/_tests/test-default-parameters/src/index.ts"],"sourcesContent":["class A {\n constructor(a: number, b = 5) {\n console.log(a, b);\n }\n\n method(c: number, d = 5) {\n console.log(c, d);\n }\n}\n\nfunction test(x: number, y = 5) {\n console.log(x, y);\n}\n\nplaydate.update = () => {\n printTable(new A(1));\n test(1);\n};\n"],"names":["A","method","c","d","console","log","constructor","a","b","test","x","y","playdate","update","printTable"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAAA,IAAA,AAAMA,IAAN,MAAMA;IAKFC,OAAOC,CAAS,EAAEC,IAAI,CAAC,EAAE;QACrBC,QAAQC,GAAG,CAACH,GAAGC;IACnB;IANAG,YAAYC,CAAS,EAAEC,IAAI,CAAC,CAAE;QAC1BJ,QAAQC,GAAG,CAACE,GAAGC;IACnB;AAKJ;AAEA,SAASC,KAAKC,CAAS,EAAEC,IAAI,CAAC;IAC1BP,QAAQC,GAAG,CAACK,GAAGC;AACnB;AAEAC,SAASC,MAAM,GAAG;IACdC,WAAW,IAAId,EAAE;IACjBS,KAAK;AACT"}
@@ -1,10 +0,0 @@
1
- let A = class A {
2
- method() {
3
- return 'test';
4
- }
5
- };
6
- playdate.update = ()=>{
7
- printTable(new A());
8
- };
9
-
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../../../../libs/cli/src/commands/TranspileCommand/fn/_tests/test-implicit-constructor/src/index.ts"],"sourcesContent":["class A {\n method() {\n return 'test';\n }\n}\n\nplaydate.update = () => {\n printTable(new A());\n};\n"],"names":["A","method","playdate","update","printTable"],"rangeMappings":";;;;;;;","mappings":"AAAA,IAAA,AAAMA,IAAN,MAAMA;IACFC,SAAS;QACL,OAAO;IACX;AACJ;AAEAC,SAASC,MAAM,GAAG;IACdC,WAAW,IAAIJ;AACnB"}
@@ -1,18 +0,0 @@
1
- let A = class A {
2
- constructor(){
3
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
4
- const someVar = 1;
5
- }
6
- };
7
- A.staticField = 'staticField';
8
- let B = class B extends A {
9
- constructor(){
10
- super();
11
- }
12
- };
13
- playdate.update = ()=>{
14
- printTable(new A());
15
- printTable(new B());
16
- };
17
-
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../../../../libs/cli/src/commands/TranspileCommand/fn/_tests/test-static/src/index.ts"],"sourcesContent":["class A {\n static staticField = 'staticField';\n\n constructor() {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const someVar = 1;\n }\n}\n\nclass B extends A {\n constructor() {\n super();\n }\n}\n\nplaydate.update = () => {\n printTable(new A());\n printTable(new B());\n};\n"],"names":["A","constructor","someVar","staticField","B","playdate","update","printTable"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":"AAAA,IAAA,AAAMA,IAAN,MAAMA;IAGFC,aAAc;QACV,6DAA6D;QAC7D,MAAMC,UAAU;IACpB;AACJ;AAPMF,EACKG,cAAc;AAQzB,IAAA,AAAMC,IAAN,MAAMA,UAAUJ;IACZC,aAAc;QACV,KAAK;IACT;AACJ;AAEAI,SAASC,MAAM,GAAG;IACdC,WAAW,IAAIP;IACfO,WAAW,IAAIH;AACnB"}
@@ -1,24 +0,0 @@
1
- const getString = ()=>{
2
- return 'some-string';
3
- };
4
- let A = class A {
5
- constructor(firstArgument, otherArgument){
6
- print(firstArgument);
7
- print(otherArgument);
8
- }
9
- };
10
- let B = class B extends A {
11
- constructor(firstArgument, secondArgument, thirdArgument){
12
- print(firstArgument);
13
- print(secondArgument);
14
- print(thirdArgument);
15
- var _getString;
16
- super(firstArgument, (_getString = getString()) != null ? _getString : 'hello');
17
- this.firstArgument = firstArgument;
18
- }
19
- };
20
- playdate.update = ()=>{
21
- printTable(new B(0, 1, 2));
22
- };
23
-
24
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../../../../libs/cli/src/commands/TranspileCommand/fn/_tests/test-super/src/index.ts"],"sourcesContent":["const getString = () => {\n return 'some-string';\n};\n\nclass A {\n constructor(firstArgument: number, otherArgument: string) {\n print(firstArgument);\n print(otherArgument);\n }\n}\n\nclass B extends A {\n constructor(\n private readonly firstArgument: number,\n secondArgument: number,\n thirdArgument: number,\n ) {\n print(firstArgument);\n print(secondArgument);\n print(thirdArgument);\n\n super(firstArgument, getString() ?? 'hello');\n }\n}\n\nplaydate.update = () => {\n printTable(new B(0, 1, 2));\n};\n"],"names":["getString","A","constructor","firstArgument","otherArgument","print","B","secondArgument","thirdArgument","playdate","update","printTable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,MAAMA,YAAY;IACd,OAAO;AACX;AAEA,IAAA,AAAMC,IAAN,MAAMA;IACFC,YAAYC,aAAqB,EAAEC,aAAqB,CAAE;QACtDC,MAAMF;QACNE,MAAMD;IACV;AACJ;AAEA,IAAA,AAAME,IAAN,MAAMA,UAAUL;IACZC,YACI,AAAiBC,aAAqB,EACtCI,cAAsB,EACtBC,aAAqB,CACvB;QACEH,MAAMF;QACNE,MAAME;QACNF,MAAMG;YAEeR;QAArB,KAAK,CAACG,eAAeH,CAAAA,aAAAA,uBAAAA,aAAe;aARnBG,gBAAAA;IASrB;AACJ;AAEAM,SAASC,MAAM,GAAG;IACdC,WAAW,IAAIL,EAAE,GAAG,GAAG;AAC3B"}