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.
- package/CHANGELOG.md +16 -4
- package/assets/ImportMap/ImportMap.js +26 -65
- package/assets/ImportMap/ImportMap.js.map +1 -1
- package/assets/ImportMap/index.js +3 -6
- package/assets/ImportMap/index.js.map +1 -1
- package/assets/beforeEmit/getBeforeEmit.js +11 -16
- package/assets/beforeEmit/getBeforeEmit.js.map +1 -1
- package/assets/beforeEmit/index.js +3 -6
- package/assets/beforeEmit/index.js.map +1 -1
- package/assets/beforeEmit/withAutomaticImportWarning.js +4 -11
- package/assets/beforeEmit/withAutomaticImportWarning.js.map +1 -1
- package/assets/index.js +18 -28
- package/assets/index.js.map +1 -1
- package/assets/transformCallExpression/getTransformCallExpression.js +66 -18
- package/assets/transformCallExpression/getTransformCallExpression.js.map +1 -1
- package/assets/transformCallExpression/index.js +3 -6
- package/assets/transformCallExpression/index.js.map +1 -1
- package/assets/transformClassDeclaration/createClasCall.js +11 -24
- package/assets/transformClassDeclaration/createClasCall.js.map +1 -1
- package/assets/transformClassDeclaration/getExportedClassDeclarationStatements.js +14 -15
- package/assets/transformClassDeclaration/getExportedClassDeclarationStatements.js.map +1 -1
- package/assets/transformClassDeclaration/getTransformClassDeclaration.js +47 -43
- package/assets/transformClassDeclaration/getTransformClassDeclaration.js.map +1 -1
- package/assets/transformClassDeclaration/index.js +3 -6
- package/assets/transformClassDeclaration/index.js.map +1 -1
- package/assets/transformClassDeclaration/transformConstructor.js +44 -56
- package/assets/transformClassDeclaration/transformConstructor.js.map +1 -1
- package/assets/transformClassDeclaration/transformMethodDeclaration.js +12 -20
- package/assets/transformClassDeclaration/transformMethodDeclaration.js.map +1 -1
- package/assets/transformClassDeclaration/transformPropertyName.js +14 -19
- package/assets/transformClassDeclaration/transformPropertyName.js.map +1 -1
- package/assets/transformExportDeclaration/getTransformExportDeclaration.d.ts +6 -0
- package/assets/transformExportDeclaration/getTransformExportDeclaration.js +52 -0
- package/assets/transformExportDeclaration/getTransformExportDeclaration.js.map +1 -0
- package/assets/transformNewExpression/index.js +3 -6
- package/assets/transformNewExpression/index.js.map +1 -1
- package/assets/transformNewExpression/isBuiltinNewExpression.js +11 -15
- package/assets/transformNewExpression/isBuiltinNewExpression.js.map +1 -1
- package/assets/transformNewExpression/transformNewExpression.js +12 -23
- package/assets/transformNewExpression/transformNewExpression.js.map +1 -1
- package/assets/transformPropertyAccessExpression/a.js +24 -0
- package/assets/transformPropertyAccessExpression/a.js.map +1 -0
- package/assets/transformPropertyAccessExpression/getTransformPropertyAccessExpression.js +6 -13
- package/assets/transformPropertyAccessExpression/getTransformPropertyAccessExpression.js.map +1 -1
- package/assets/transformPropertyAccessExpression/index.js +3 -6
- package/assets/transformPropertyAccessExpression/index.js.map +1 -1
- package/assets/transformSuperExpression/index.js +3 -6
- package/assets/transformSuperExpression/index.js.map +1 -1
- package/assets/transformSuperExpression/transformSuperExpression.js +8 -16
- package/assets/transformSuperExpression/transformSuperExpression.js.map +1 -1
- package/assets/types.js +1 -4
- package/assets/types.js.map +1 -1
- package/package.json +8 -5
- package/src/commands/CompileCommand/CompileCommand.d.ts +1 -1
- package/src/commands/CompileCommand/CompileCommand.js +3 -10
- package/src/commands/CompileCommand/CompileCommand.js.map +1 -1
- package/src/commands/CompileCommand/components/Compile.d.ts +1 -1
- package/src/commands/CompileCommand/components/Compile.js +3 -7
- package/src/commands/CompileCommand/components/Compile.js.map +1 -1
- package/src/commands/CompileCommand/fn/getPdcPathFromEnvironment.d.ts +1 -1
- package/src/commands/CompileCommand/fn/getPdcPathFromEnvironment.js +1 -2
- package/src/commands/CompileCommand/fn/getPdcPathFromEnvironment.js.map +1 -1
- package/src/commands/CompileCommand/hooks/task/compile.d.ts +5 -2
- package/src/commands/CompileCommand/hooks/task/compile.js +10 -9
- package/src/commands/CompileCommand/hooks/task/compile.js.map +1 -1
- package/src/commands/CompileCommand/hooks/useCompileTasks.d.ts +5 -2
- package/src/commands/CompileCommand/hooks/useCompileTasks.js +33 -30
- package/src/commands/CompileCommand/hooks/useCompileTasks.js.map +1 -1
- package/src/commands/CompileCommand/index.js +0 -1
- package/src/commands/CompileCommand/index.js.map +1 -1
- package/src/commands/DoctorCommand.js +5 -12
- package/src/commands/DoctorCommand.js.map +1 -1
- package/src/commands/EnvironmentAwareCommand/EnvironmentAwareCommand.d.ts +2 -2
- package/src/commands/EnvironmentAwareCommand/EnvironmentAwareCommand.js +30 -30
- package/src/commands/EnvironmentAwareCommand/EnvironmentAwareCommand.js.map +1 -1
- package/src/commands/EnvironmentAwareCommand/components/HealthReport.d.ts +1 -1
- package/src/commands/EnvironmentAwareCommand/components/HealthReport.js +14 -15
- package/src/commands/EnvironmentAwareCommand/components/HealthReport.js.map +1 -1
- package/src/commands/EnvironmentAwareCommand/contexts/CrankScriptContext.js +5 -10
- package/src/commands/EnvironmentAwareCommand/contexts/CrankScriptContext.js.map +1 -1
- package/src/commands/EnvironmentAwareCommand/index.js +0 -1
- package/src/commands/EnvironmentAwareCommand/index.js.map +1 -1
- package/src/commands/GenerateTypes/GenerateTypesCommand.js +14 -21
- package/src/commands/GenerateTypes/GenerateTypesCommand.js.map +1 -1
- package/src/commands/GenerateTypes/components/GenerateTypes.d.ts +1 -1
- package/src/commands/GenerateTypes/components/GenerateTypes.js +11 -15
- package/src/commands/GenerateTypes/components/GenerateTypes.js.map +1 -1
- package/src/commands/GenerateTypes/constants.js +0 -1
- package/src/commands/GenerateTypes/constants.js.map +1 -1
- package/src/commands/GenerateTypes/fn/getApiDefinitions.d.ts +1 -1
- package/src/commands/GenerateTypes/fn/getApiDefinitions.js +12 -14
- package/src/commands/GenerateTypes/fn/getApiDefinitions.js.map +1 -1
- package/src/commands/GenerateTypes/fn/getDescriptionsFromHtml.d.ts +1 -1
- package/src/commands/GenerateTypes/fn/getDescriptionsFromHtml.js +38 -30
- package/src/commands/GenerateTypes/fn/getDescriptionsFromHtml.js.map +1 -1
- package/src/commands/GenerateTypes/fn/getFunctionTypeOverride.js +5 -4
- package/src/commands/GenerateTypes/fn/getFunctionTypeOverride.js.map +1 -1
- package/src/commands/GenerateTypes/fn/getHtmlForVersion.js +6 -9
- package/src/commands/GenerateTypes/fn/getHtmlForVersion.js.map +1 -1
- package/src/commands/GenerateTypes/fn/parseFunctionSignature.js +13 -10
- package/src/commands/GenerateTypes/fn/parseFunctionSignature.js.map +1 -1
- package/src/commands/GenerateTypes/hooks/useFetchHtml.js +10 -12
- package/src/commands/GenerateTypes/hooks/useFetchHtml.js.map +1 -1
- package/src/commands/GenerateTypes/hooks/useFormatTypeFile.js +23 -29
- package/src/commands/GenerateTypes/hooks/useFormatTypeFile.js.map +1 -1
- package/src/commands/GenerateTypes/hooks/useGenerateTypeFile.d.ts +2 -2
- package/src/commands/GenerateTypes/hooks/useGenerateTypeFile.js +44 -75
- package/src/commands/GenerateTypes/hooks/useGenerateTypeFile.js.map +1 -1
- package/src/commands/GenerateTypes/hooks/useGetVersion.d.ts +1 -1
- package/src/commands/GenerateTypes/hooks/useGetVersion.js +19 -19
- package/src/commands/GenerateTypes/hooks/useGetVersion.js.map +1 -1
- package/src/commands/GenerateTypes/hooks/useParseDocumentation.d.ts +1 -1
- package/src/commands/GenerateTypes/hooks/useParseDocumentation.js +10 -12
- package/src/commands/GenerateTypes/hooks/useParseDocumentation.js.map +1 -1
- package/src/commands/GenerateTypes/index.js +0 -1
- package/src/commands/GenerateTypes/index.js.map +1 -1
- package/src/commands/GenerateTypes/types.d.ts +1 -1
- package/src/commands/GenerateTypes/types.js +1 -2
- package/src/commands/GenerateTypes/types.js.map +1 -1
- package/src/commands/GenerateTypes/utils/createTypeProvider.d.ts +2 -2
- package/src/commands/GenerateTypes/utils/createTypeProvider.js +63 -85
- package/src/commands/GenerateTypes/utils/createTypeProvider.js.map +1 -1
- package/src/commands/GenerateTypes/utils/functionTypeOverrides.d.ts +1 -1
- package/src/commands/GenerateTypes/utils/functionTypeOverrides.js +6 -7
- package/src/commands/GenerateTypes/utils/functionTypeOverrides.js.map +1 -1
- package/src/commands/NewCommand/NewCommand.js +9 -17
- package/src/commands/NewCommand/NewCommand.js.map +1 -1
- package/src/commands/NewCommand/components/New.d.ts +1 -1
- package/src/commands/NewCommand/components/New.js +19 -25
- package/src/commands/NewCommand/components/New.js.map +1 -1
- package/src/commands/NewLibCommand/NewLibCommand.js +9 -17
- package/src/commands/NewLibCommand/NewLibCommand.js.map +1 -1
- package/src/commands/NewLibCommand/components/NewLib.d.ts +1 -1
- package/src/commands/NewLibCommand/components/NewLib.js +19 -25
- package/src/commands/NewLibCommand/components/NewLib.js.map +1 -1
- package/src/commands/NewLibCommand/index.js +0 -1
- package/src/commands/NewLibCommand/index.js.map +1 -1
- package/src/commands/RenderableCommand.d.ts +1 -1
- package/src/commands/RenderableCommand.js +5 -3
- package/src/commands/RenderableCommand.js.map +1 -1
- package/src/commands/SimulatorCommand/SimulatorCommand.d.ts +1 -1
- package/src/commands/SimulatorCommand/SimulatorCommand.js +23 -38
- package/src/commands/SimulatorCommand/SimulatorCommand.js.map +1 -1
- package/src/commands/SimulatorCommand/components/Simulator.d.ts +3 -2
- package/src/commands/SimulatorCommand/components/Simulator.js +19 -17
- package/src/commands/SimulatorCommand/components/Simulator.js.map +1 -1
- package/src/commands/SimulatorCommand/components/TemporaryFolderCreator.d.ts +1 -1
- package/src/commands/SimulatorCommand/components/TemporaryFolderCreator.js +15 -22
- package/src/commands/SimulatorCommand/components/TemporaryFolderCreator.js.map +1 -1
- package/src/commands/SimulatorCommand/fn/createTemporaryFolderPathFromEntryFile.js +8 -6
- package/src/commands/SimulatorCommand/fn/createTemporaryFolderPathFromEntryFile.js.map +1 -1
- package/src/commands/SimulatorCommand/fn/getSimulatorPathFromEnvironment.d.ts +1 -1
- package/src/commands/SimulatorCommand/fn/getSimulatorPathFromEnvironment.js +1 -2
- package/src/commands/SimulatorCommand/fn/getSimulatorPathFromEnvironment.js.map +1 -1
- package/src/commands/SimulatorCommand/hooks/useFileWatcher.js +10 -10
- package/src/commands/SimulatorCommand/hooks/useFileWatcher.js.map +1 -1
- package/src/commands/SimulatorCommand/hooks/useSimulatorTasks.d.ts +6 -2
- package/src/commands/SimulatorCommand/hooks/useSimulatorTasks.js +52 -50
- package/src/commands/SimulatorCommand/hooks/useSimulatorTasks.js.map +1 -1
- package/src/commands/SimulatorCommand/index.js +0 -1
- package/src/commands/SimulatorCommand/index.js.map +1 -1
- package/src/commands/TestCommand/TestCommand.d.ts +12 -0
- package/src/commands/TestCommand/TestCommand.js +32 -0
- package/src/commands/TestCommand/TestCommand.js.map +1 -0
- package/src/commands/TestCommand/components/Test.d.ts +9 -0
- package/src/commands/TestCommand/components/Test.js +73 -0
- package/src/commands/TestCommand/components/Test.js.map +1 -0
- package/src/commands/TestCommand/components/TestLine.d.ts +10 -0
- package/src/commands/TestCommand/components/TestLine.js +11 -0
- package/src/commands/TestCommand/components/TestLine.js.map +1 -0
- package/src/commands/TestCommand/components/TestResult.d.ts +8 -0
- package/src/commands/TestCommand/components/TestResult.js +21 -0
- package/src/commands/TestCommand/components/TestResult.js.map +1 -0
- package/src/commands/TestCommand/components/TestSuite.d.ts +8 -0
- package/src/commands/TestCommand/components/TestSuite.js +60 -0
- package/src/commands/TestCommand/components/TestSuite.js.map +1 -0
- package/src/commands/TestCommand/components/TestSummary.d.ts +7 -0
- package/src/commands/TestCommand/components/TestSummary.js +9 -0
- package/src/commands/TestCommand/components/TestSummary.js.map +1 -0
- package/src/commands/TestCommand/hooks/useTestFiles.d.ts +3 -0
- package/src/commands/TestCommand/hooks/useTestFiles.js +8 -0
- package/src/commands/TestCommand/hooks/useTestFiles.js.map +1 -0
- package/src/commands/TestCommand/hooks/useTestServer.d.ts +5 -0
- package/src/commands/TestCommand/hooks/useTestServer.js +26 -0
- package/src/commands/TestCommand/hooks/useTestServer.js.map +1 -0
- package/src/commands/TestCommand/hooks/useTestTasks.d.ts +14 -0
- package/src/commands/TestCommand/hooks/useTestTasks.js +61 -0
- package/src/commands/TestCommand/hooks/useTestTasks.js.map +1 -0
- package/src/commands/TestCommand/index.d.ts +1 -0
- package/src/commands/TestCommand/index.js +2 -0
- package/src/commands/TestCommand/index.js.map +1 -0
- package/src/commands/TestCommand/server/TestServer.d.ts +72 -0
- package/src/commands/TestCommand/server/TestServer.js +249 -0
- package/src/commands/TestCommand/server/TestServer.js.map +1 -0
- package/src/commands/TestCommand/types.d.ts +4 -0
- package/src/commands/TestCommand/types.js +6 -0
- package/src/commands/TestCommand/types.js.map +1 -0
- package/src/commands/TestCommand/utils/formatTestError.d.ts +1 -0
- package/src/commands/TestCommand/utils/formatTestError.js +7 -0
- package/src/commands/TestCommand/utils/formatTestError.js.map +1 -0
- package/src/commands/TranspileCommand/TranspileCommand.js +20 -28
- package/src/commands/TranspileCommand/TranspileCommand.js.map +1 -1
- package/src/commands/TranspileCommand/components/Transpile.d.ts +2 -2
- package/src/commands/TranspileCommand/components/Transpile.js +3 -7
- package/src/commands/TranspileCommand/components/Transpile.js.map +1 -1
- package/src/commands/TranspileCommand/fn/getErrorMessage.d.ts +1 -1
- package/src/commands/TranspileCommand/fn/getErrorMessage.js +5 -6
- package/src/commands/TranspileCommand/fn/getErrorMessage.js.map +1 -1
- package/src/commands/TranspileCommand/fn/transpile.d.ts +2 -2
- package/src/commands/TranspileCommand/fn/transpile.js +15 -17
- package/src/commands/TranspileCommand/fn/transpile.js.map +1 -1
- package/src/commands/TranspileCommand/fn/validateEntryPoint.d.ts +1 -1
- package/src/commands/TranspileCommand/fn/validateEntryPoint.js +2 -3
- package/src/commands/TranspileCommand/fn/validateEntryPoint.js.map +1 -1
- package/src/commands/TranspileCommand/fn/validateExitPoint.d.ts +1 -1
- package/src/commands/TranspileCommand/fn/validateExitPoint.js +6 -6
- package/src/commands/TranspileCommand/fn/validateExitPoint.js.map +1 -1
- package/src/commands/TranspileCommand/hooks/useTranspileTasks.d.ts +4 -4
- package/src/commands/TranspileCommand/hooks/useTranspileTasks.js +34 -33
- package/src/commands/TranspileCommand/hooks/useTranspileTasks.js.map +1 -1
- package/src/commands/TranspileCommand/index.js +0 -1
- package/src/commands/TranspileCommand/index.js.map +1 -1
- package/src/commands/TranspileCommand/model/ValidatedEntryPoint.js +1 -2
- package/src/commands/TranspileCommand/model/ValidatedEntryPoint.js.map +1 -1
- package/src/commands/TranspileCommand/model/ValidatedExitPoint.js +1 -2
- package/src/commands/TranspileCommand/model/ValidatedExitPoint.js.map +1 -1
- package/src/commands/TranspileCommand/types.js +1 -2
- package/src/commands/TranspileCommand/types.js.map +1 -1
- package/src/components/CheckList/CheckList.d.ts +3 -2
- package/src/components/CheckList/CheckList.js +14 -21
- package/src/components/CheckList/CheckList.js.map +1 -1
- package/src/components/CheckList/Item.d.ts +3 -2
- package/src/components/CheckList/Item.js +47 -44
- package/src/components/CheckList/Item.js.map +1 -1
- package/src/components/CheckList/index.js +0 -1
- package/src/components/CheckList/index.js.map +1 -1
- package/src/components/ErrorBoundary.d.ts +14 -0
- package/src/components/ErrorBoundary.js +7 -13
- package/src/components/ErrorBoundary.js.map +1 -1
- package/src/components/Spinner.d.ts +1 -1
- package/src/components/Spinner.js +13 -18
- package/src/components/Spinner.js.map +1 -1
- package/src/constants.js +1 -6
- package/src/constants.js.map +1 -1
- package/src/environment/createEnvironment.d.ts +1 -1
- package/src/environment/createEnvironment.js +13 -16
- package/src/environment/createEnvironment.js.map +1 -1
- package/src/environment/dto/Environment.d.ts +1 -1
- package/src/environment/dto/Environment.js +1 -2
- package/src/environment/dto/Environment.js.map +1 -1
- package/src/environment/error/EnvironmentError.js +0 -1
- package/src/environment/error/EnvironmentError.js.map +1 -1
- package/src/environment/path/dto/PlaydateSdkPath.js +3 -4
- package/src/environment/path/dto/PlaydateSdkPath.js.map +1 -1
- package/src/environment/path/error/PlaydateSdkPathVariableNotSetError.js +1 -2
- package/src/environment/path/error/PlaydateSdkPathVariableNotSetError.js.map +1 -1
- package/src/environment/path/getPlaydateSdkPath.js +5 -3
- package/src/environment/path/getPlaydateSdkPath.js.map +1 -1
- package/src/index.js +7 -5
- package/src/index.js.map +1 -1
- package/src/types.d.ts +3 -3
- package/src/types.js +4 -5
- package/src/types.js.map +1 -1
- package/src/utils/appendExeOnWindows.js +1 -2
- package/src/utils/appendExeOnWindows.js.map +1 -1
- package/src/utils/dirname.js +0 -1
- package/src/utils/dirname.js.map +1 -1
- package/src/utils/platform.js +0 -1
- package/src/utils/platform.js.map +1 -1
- package/src/commands/TranspileCommand/fn/_tests/test-abstract/src/index.js +0 -4
- package/src/commands/TranspileCommand/fn/_tests/test-abstract/src/index.js.map +0 -1
- package/src/commands/TranspileCommand/fn/_tests/test-automatic-imports/src/index.js +0 -3
- package/src/commands/TranspileCommand/fn/_tests/test-automatic-imports/src/index.js.map +0 -1
- package/src/commands/TranspileCommand/fn/_tests/test-builtins/src/index.js +0 -4
- package/src/commands/TranspileCommand/fn/_tests/test-builtins/src/index.js.map +0 -1
- package/src/commands/TranspileCommand/fn/_tests/test-default-parameters/src/index.js +0 -17
- package/src/commands/TranspileCommand/fn/_tests/test-default-parameters/src/index.js.map +0 -1
- package/src/commands/TranspileCommand/fn/_tests/test-implicit-constructor/src/index.js +0 -10
- package/src/commands/TranspileCommand/fn/_tests/test-implicit-constructor/src/index.js.map +0 -1
- package/src/commands/TranspileCommand/fn/_tests/test-static/src/index.js +0 -18
- package/src/commands/TranspileCommand/fn/_tests/test-static/src/index.js.map +0 -1
- package/src/commands/TranspileCommand/fn/_tests/test-super/src/index.js +0 -24
- 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"],"
|
|
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',
|
|
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
|
-
}
|
|
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,"
|
|
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"],"
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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"}
|
package/src/utils/dirname.js
CHANGED
package/src/utils/dirname.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../libs/cli/src/utils/dirname.ts"],"
|
|
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"}
|
package/src/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../libs/cli/src/utils/platform.ts"],"
|
|
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 +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 +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 +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 +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"}
|