crankscript 0.17.0 → 0.18.0-beta.1
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 +11 -5
- 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.d.ts +1 -0
- package/src/commands/TranspileCommand/TranspileCommand.js +23 -28
- package/src/commands/TranspileCommand/TranspileCommand.js.map +1 -1
- package/src/commands/TranspileCommand/components/Transpile.d.ts +4 -3
- package/src/commands/TranspileCommand/components/Transpile.js +4 -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 +4 -3
- package/src/commands/TranspileCommand/fn/transpile.js +21 -24
- 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 +6 -5
- package/src/commands/TranspileCommand/hooks/useTranspileTasks.js +35 -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,9 +1,11 @@
|
|
|
1
|
-
import { createHash } from 'crypto';
|
|
2
|
-
import { tmpdir } from 'os';
|
|
3
|
-
import { join } from 'path';
|
|
4
|
-
export const createTemporaryFolderPathFromEntryFile = (entryFilePath)=>{
|
|
5
|
-
const hash = createHash('sha256')
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { tmpdir } from 'node:os';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
export const createTemporaryFolderPathFromEntryFile = (entryFilePath) => {
|
|
5
|
+
const hash = createHash('sha256')
|
|
6
|
+
.update(entryFilePath)
|
|
7
|
+
.digest('hex')
|
|
8
|
+
.slice(0, 8);
|
|
6
9
|
return join(tmpdir(), 'crankscript', `run-${hash}`);
|
|
7
10
|
};
|
|
8
|
-
|
|
9
11
|
//# sourceMappingURL=createTemporaryFolderPathFromEntryFile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../libs/cli/src/commands/SimulatorCommand/fn/createTemporaryFolderPathFromEntryFile.ts"],"
|
|
1
|
+
{"version":3,"file":"createTemporaryFolderPathFromEntryFile.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/commands/SimulatorCommand/fn/createTemporaryFolderPathFromEntryFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAClD,aAAqB,EACvB,EAAE;IACA,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC;SAC5B,MAAM,CAAC,aAAa,CAAC;SACrB,MAAM,CAAC,KAAK,CAAC;SACb,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAEjB,OAAO,IAAI,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC;AACxD,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Environment } from '../../../environment/dto/Environment.js';
|
|
1
|
+
import type { Environment } from '../../../environment/dto/Environment.js';
|
|
2
2
|
export declare const getSimulatorPathFromEnvironment: (environment: Environment) => string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { join } from 'node:path';
|
|
2
2
|
import { appendExeOnWindows } from '../../../utils/appendExeOnWindows.js';
|
|
3
|
-
export const getSimulatorPathFromEnvironment = (environment)=>{
|
|
3
|
+
export const getSimulatorPathFromEnvironment = (environment) => {
|
|
4
4
|
return join(environment.sdkPath.path, 'bin', appendExeOnWindows('PlaydateSimulator'));
|
|
5
5
|
};
|
|
6
|
-
|
|
7
6
|
//# sourceMappingURL=getSimulatorPathFromEnvironment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../libs/cli/src/commands/SimulatorCommand/fn/getSimulatorPathFromEnvironment.ts"],"
|
|
1
|
+
{"version":3,"file":"getSimulatorPathFromEnvironment.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/commands/SimulatorCommand/fn/getSimulatorPathFromEnvironment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,WAAwB,EAAE,EAAE;IACxE,OAAO,IAAI,CACP,WAAW,CAAC,OAAO,CAAC,IAAI,EACxB,KAAK,EACL,kBAAkB,CAAC,mBAAmB,CAAC,CAC1C,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { watch } from 'chokidar';
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
|
-
export const useFileWatcher = (options)=>{
|
|
3
|
+
export const useFileWatcher = (options) => {
|
|
4
4
|
const watcher = useRef(null);
|
|
5
5
|
const started = useRef(false);
|
|
6
|
-
useEffect(()=>{
|
|
6
|
+
useEffect(() => {
|
|
7
7
|
if (!options.enabled || started.current) {
|
|
8
8
|
return;
|
|
9
9
|
}
|
|
@@ -11,27 +11,27 @@ export const useFileWatcher = (options)=>{
|
|
|
11
11
|
ignoreInitial: true,
|
|
12
12
|
awaitWriteFinish: {
|
|
13
13
|
stabilityThreshold: 200,
|
|
14
|
-
pollInterval: 100
|
|
15
|
-
}
|
|
14
|
+
pollInterval: 100,
|
|
15
|
+
},
|
|
16
16
|
});
|
|
17
17
|
if (options.additionalGlobs) {
|
|
18
18
|
watcher.current.add(options.additionalGlobs);
|
|
19
19
|
}
|
|
20
|
-
watcher.current.on('change', ()=>{
|
|
20
|
+
watcher.current.on('change', () => {
|
|
21
21
|
options.onChange();
|
|
22
22
|
});
|
|
23
23
|
started.current = true;
|
|
24
|
-
return ()=>{
|
|
25
|
-
var
|
|
26
|
-
(
|
|
24
|
+
return () => {
|
|
25
|
+
var _a;
|
|
26
|
+
(_a = watcher.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
27
27
|
watcher.current = null;
|
|
28
28
|
started.current = false;
|
|
29
29
|
};
|
|
30
30
|
}, [
|
|
31
31
|
options.enabled,
|
|
32
32
|
options.watchPath,
|
|
33
|
-
options.onChange
|
|
33
|
+
options.onChange,
|
|
34
|
+
options.additionalGlobs,
|
|
34
35
|
]);
|
|
35
36
|
};
|
|
36
|
-
|
|
37
37
|
//# sourceMappingURL=useFileWatcher.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../libs/cli/src/commands/SimulatorCommand/hooks/useFileWatcher.ts"],"
|
|
1
|
+
{"version":3,"file":"useFileWatcher.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/commands/SimulatorCommand/hooks/useFileWatcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAK9B,EAAE,EAAE;IACD,MAAM,OAAO,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IAC/C,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAE9B,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACtC,OAAO;QACX,CAAC;QAED,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE;YACvC,aAAa,EAAE,IAAI;YACnB,gBAAgB,EAAE;gBACd,kBAAkB,EAAE,GAAG;gBACvB,YAAY,EAAE,GAAG;aACpB;SACJ,CAAC,CAAC;QAEH,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;YAC1B,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QACjD,CAAC;QAED,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;YAC9B,OAAO,CAAC,QAAQ,EAAE,CAAC;QACvB,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;QAEvB,OAAO,GAAG,EAAE;;YACR,MAAA,OAAO,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;YACzB,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;YACvB,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC;QAC5B,CAAC,CAAC;IACN,CAAC,EAAE;QACC,OAAO,CAAC,OAAO;QACf,OAAO,CAAC,SAAS;QACjB,OAAO,CAAC,QAAQ;QAChB,OAAO,CAAC,eAAe;KAC1B,CAAC,CAAC;AACP,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Environment } from '../../../environment/dto/Environment.js';
|
|
1
|
+
import type { Environment } from '../../../environment/dto/Environment.js';
|
|
2
2
|
interface Props {
|
|
3
3
|
path: string;
|
|
4
4
|
environment: Environment;
|
|
@@ -10,8 +10,12 @@ interface Props {
|
|
|
10
10
|
gameOutputPath?: string;
|
|
11
11
|
requireWithinProjectPath?: boolean;
|
|
12
12
|
additionalGlobs?: string[];
|
|
13
|
+
targetName?: string;
|
|
14
|
+
sourceName?: string;
|
|
15
|
+
watchEntryFileOnly?: boolean;
|
|
16
|
+
preventAutoQuit?: boolean;
|
|
13
17
|
}
|
|
14
|
-
export declare const useSimulatorTasks: ({ path, environment, watchForChanges, recompileOnly, background, entryFile, luaOutputPath, gameOutputPath, requireWithinProjectPath, additionalGlobs, }: Props) => {
|
|
18
|
+
export declare const useSimulatorTasks: ({ path, environment, watchForChanges, recompileOnly, background, entryFile, luaOutputPath, gameOutputPath, requireWithinProjectPath, additionalGlobs, sourceName, targetName, watchEntryFileOnly, preventAutoQuit, }: Props) => {
|
|
15
19
|
tasks: import("../../../types.js").CheckListItem<unknown>[];
|
|
16
20
|
handleFinish: (hasFailure: boolean) => void;
|
|
17
21
|
hasChanged: boolean;
|
|
@@ -1,109 +1,111 @@
|
|
|
1
1
|
import { join } from 'node:path';
|
|
2
2
|
import open from 'open';
|
|
3
|
-
import { useCallback, useEffect, useMemo } from 'react';
|
|
4
|
-
import {
|
|
5
|
-
import { useRef } from 'react';
|
|
6
|
-
import { isWindows } from '../../../utils/platform.js';
|
|
7
|
-
import { isMac } from '../../../utils/platform.js';
|
|
8
|
-
import { useFileWatcher } from './useFileWatcher.js';
|
|
3
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import { isMac, isWindows } from '../../../utils/platform.js';
|
|
9
5
|
import { getPdcPathFromEnvironment } from '../../CompileCommand/fn/getPdcPathFromEnvironment.js';
|
|
10
6
|
import { useCompileTasks } from '../../CompileCommand/hooks/useCompileTasks.js';
|
|
11
7
|
import { validateEntryPoint } from '../../TranspileCommand/fn/validateEntryPoint.js';
|
|
12
8
|
import { validateExitPoint } from '../../TranspileCommand/fn/validateExitPoint.js';
|
|
13
9
|
import { useTranspileTasks } from '../../TranspileCommand/hooks/useTranspileTasks.js';
|
|
14
|
-
import { TranspileMode } from '../../TranspileCommand/types.js';
|
|
15
10
|
import { getSimulatorPathFromEnvironment } from '../fn/getSimulatorPathFromEnvironment.js';
|
|
16
|
-
|
|
11
|
+
import { useFileWatcher } from './useFileWatcher.js';
|
|
12
|
+
export const useSimulatorTasks = ({ path, environment, watchForChanges, recompileOnly, background, entryFile, luaOutputPath, gameOutputPath, requireWithinProjectPath = true, additionalGlobs = [], sourceName, targetName, watchEntryFileOnly = false, preventAutoQuit = false, }) => {
|
|
17
13
|
const [isWatching, setIsWatching] = useState(false);
|
|
18
14
|
const [hasChanged, setHasChanged] = useState(false);
|
|
19
15
|
const [hasChangedMessage, setHasChangedMessage] = useState(false);
|
|
20
16
|
const [hasFailure, setHasFailure] = useState(false);
|
|
21
17
|
const didRun = useRef(false);
|
|
22
|
-
useEffect(()=>{
|
|
18
|
+
useEffect(() => {
|
|
23
19
|
if (hasChanged) {
|
|
24
20
|
setHasChanged(false);
|
|
25
21
|
}
|
|
26
|
-
}, [
|
|
27
|
-
hasChanged,
|
|
28
|
-
setHasChanged
|
|
29
|
-
]);
|
|
22
|
+
}, [hasChanged]);
|
|
30
23
|
const transpileTasks = useTranspileTasks({
|
|
31
24
|
entryPoint: validateEntryPoint({
|
|
32
25
|
projectPath: path,
|
|
33
|
-
entryFile: entryFile
|
|
34
|
-
requireWithinProjectPath
|
|
26
|
+
entryFile: entryFile !== null && entryFile !== void 0 ? entryFile : join(path, 'src', 'index.ts'),
|
|
27
|
+
requireWithinProjectPath,
|
|
35
28
|
}),
|
|
36
29
|
exitPoint: validateExitPoint({
|
|
37
30
|
projectPath: path,
|
|
38
|
-
exitFile: join(...luaOutputPath
|
|
39
|
-
luaOutputPath
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
'Source'
|
|
43
|
-
], 'main.lua'),
|
|
44
|
-
requireWithinProjectPath
|
|
31
|
+
exitFile: join(...(luaOutputPath
|
|
32
|
+
? [luaOutputPath, sourceName !== null && sourceName !== void 0 ? sourceName : 'Source']
|
|
33
|
+
: [path, sourceName !== null && sourceName !== void 0 ? sourceName : 'Source']), 'main.lua'),
|
|
34
|
+
requireWithinProjectPath,
|
|
45
35
|
}),
|
|
46
|
-
transpileMode: entryFile ? TranspileMode.File : TranspileMode.Project
|
|
47
36
|
});
|
|
48
37
|
const compileTasks = useCompileTasks({
|
|
49
38
|
pdcPath: getPdcPathFromEnvironment(environment),
|
|
50
|
-
outputPath: gameOutputPath
|
|
39
|
+
outputPath: gameOutputPath,
|
|
40
|
+
sourceName,
|
|
41
|
+
targetName,
|
|
42
|
+
path,
|
|
51
43
|
});
|
|
52
|
-
const handleFinish = useCallback((hasFailure)=>{
|
|
44
|
+
const handleFinish = useCallback((hasFailure) => {
|
|
53
45
|
setHasFailure(hasFailure);
|
|
54
46
|
if (didRun.current && recompileOnly) {
|
|
47
|
+
if (watchForChanges) {
|
|
48
|
+
setHasChangedMessage(false);
|
|
49
|
+
setIsWatching(true);
|
|
50
|
+
}
|
|
55
51
|
return;
|
|
56
52
|
}
|
|
57
53
|
didRun.current = true;
|
|
58
|
-
open(join(gameOutputPath
|
|
54
|
+
open(join(path, gameOutputPath !== null && gameOutputPath !== void 0 ? gameOutputPath : '', targetName !== null && targetName !== void 0 ? targetName : 'Game.pdx'), {
|
|
59
55
|
background,
|
|
60
|
-
app: isMac
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
56
|
+
app: isMac
|
|
57
|
+
? undefined
|
|
58
|
+
: {
|
|
59
|
+
name: getSimulatorPathFromEnvironment(environment),
|
|
60
|
+
},
|
|
61
|
+
})
|
|
62
|
+
.then(() => {
|
|
63
|
+
if (!watchForChanges && !preventAutoQuit) {
|
|
65
64
|
if (!isWindows) {
|
|
66
65
|
process.exit();
|
|
67
66
|
}
|
|
68
67
|
setTimeout(process.exit, 1000);
|
|
69
|
-
}
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
setHasChangedMessage(false);
|
|
71
|
+
setIsWatching(true);
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
.catch(() => {
|
|
75
|
+
if (watchForChanges) {
|
|
70
76
|
setHasChangedMessage(false);
|
|
71
77
|
setIsWatching(true);
|
|
72
78
|
}
|
|
73
79
|
});
|
|
74
80
|
}, [
|
|
75
|
-
|
|
76
|
-
recompileOnly,
|
|
77
|
-
gameOutputPath,
|
|
81
|
+
background,
|
|
78
82
|
environment,
|
|
79
|
-
|
|
83
|
+
gameOutputPath,
|
|
84
|
+
path,
|
|
85
|
+
preventAutoQuit,
|
|
86
|
+
recompileOnly,
|
|
87
|
+
targetName,
|
|
88
|
+
watchForChanges,
|
|
80
89
|
]);
|
|
81
90
|
useFileWatcher({
|
|
82
|
-
watchPath: entryFile ? entryFile : join(path, 'src'),
|
|
91
|
+
watchPath: entryFile && watchEntryFileOnly ? entryFile : join(path, 'src'),
|
|
83
92
|
enabled: isWatching,
|
|
84
|
-
onChange: ()=>{
|
|
93
|
+
onChange: () => {
|
|
85
94
|
setHasChanged(true);
|
|
86
95
|
setHasChangedMessage(true);
|
|
87
96
|
},
|
|
88
|
-
additionalGlobs
|
|
97
|
+
additionalGlobs,
|
|
89
98
|
});
|
|
90
|
-
const tasks = useMemo(()=>{
|
|
91
|
-
return [
|
|
92
|
-
|
|
93
|
-
...compileTasks
|
|
94
|
-
];
|
|
95
|
-
}, [
|
|
96
|
-
transpileTasks,
|
|
97
|
-
compileTasks
|
|
98
|
-
]);
|
|
99
|
+
const tasks = useMemo(() => {
|
|
100
|
+
return [...transpileTasks, ...compileTasks];
|
|
101
|
+
}, [transpileTasks, compileTasks]);
|
|
99
102
|
return {
|
|
100
103
|
tasks,
|
|
101
104
|
handleFinish,
|
|
102
105
|
hasChanged,
|
|
103
106
|
isWatching,
|
|
104
107
|
hasChangedMessage,
|
|
105
|
-
hasFailure
|
|
108
|
+
hasFailure,
|
|
106
109
|
};
|
|
107
110
|
};
|
|
108
|
-
|
|
109
111
|
//# sourceMappingURL=useSimulatorTasks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../libs/cli/src/commands/SimulatorCommand/hooks/useSimulatorTasks.ts"],"
|
|
1
|
+
{"version":3,"file":"useSimulatorTasks.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/commands/SimulatorCommand/hooks/useSimulatorTasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,sDAAsD,CAAC;AACjG,OAAO,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAC;AACtF,OAAO,EAAE,+BAA+B,EAAE,MAAM,0CAA0C,CAAC;AAC3F,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAmBrD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAC9B,IAAI,EACJ,WAAW,EACX,eAAe,EACf,aAAa,EACb,UAAU,EACV,SAAS,EACT,aAAa,EACb,cAAc,EACd,wBAAwB,GAAG,IAAI,EAC/B,eAAe,GAAG,EAAE,EACpB,UAAU,EACV,UAAU,EACV,kBAAkB,GAAG,KAAK,EAC1B,eAAe,GAAG,KAAK,GACnB,EAAE,EAAE;IACR,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC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AAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;QACnE,OAAO,EAAE,UAAU;QACnB,QAAQ,EAAE,GAAG,EAAE;YACX,aAAa,CAAC,IAAI,CAAC,CAAC;YACpB,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;QACD,eAAe;KAClB,CAAC,CAAC;IAEH,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE;QACvB,OAAO,CAAC,GAAG,cAAc,EAAE,GAAG,YAAY,CAAC,CAAC;IAChD,CAAC,EAAE,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC,CAAC;IAEnC,OAAO;QACH,KAAK;QACL,YAAY;QACZ,UAAU;QACV,UAAU;QACV,iBAAiB;QACjB,UAAU;KACb,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../libs/cli/src/commands/SimulatorCommand/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/commands/SimulatorCommand/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Environment } from '../../environment/dto/Environment.js';
|
|
3
|
+
import { EnvironmentAwareCommand } from '../EnvironmentAwareCommand/index.js';
|
|
4
|
+
import { OutputFormat } from './types.js';
|
|
5
|
+
export declare class TestCommand extends EnvironmentAwareCommand {
|
|
6
|
+
static paths: string[][];
|
|
7
|
+
static usage: import("clipanion").Usage;
|
|
8
|
+
projectPath: string;
|
|
9
|
+
watch: boolean;
|
|
10
|
+
format: OutputFormat;
|
|
11
|
+
renderWithEnvironment(environment: Environment): React.JSX.Element;
|
|
12
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Command, Option } from 'clipanion';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import * as t from 'typanion';
|
|
4
|
+
import { EnvironmentAwareCommand } from '../EnvironmentAwareCommand/index.js';
|
|
5
|
+
import { Test } from './components/Test.js';
|
|
6
|
+
import { OutputFormat } from './types.js';
|
|
7
|
+
export class TestCommand extends EnvironmentAwareCommand {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.projectPath = Option.String('-p,--path', process.cwd(), {
|
|
11
|
+
description: 'The path to the project',
|
|
12
|
+
});
|
|
13
|
+
this.watch = Option.Boolean('-w,--watch', false, {
|
|
14
|
+
description: 'Watch for changes and rerun tests',
|
|
15
|
+
});
|
|
16
|
+
this.format = Option.String('--format', OutputFormat.Pretty, {
|
|
17
|
+
description: 'Output format for test results',
|
|
18
|
+
validator: t.isEnum(OutputFormat),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
renderWithEnvironment(environment) {
|
|
22
|
+
if (this.format === OutputFormat.Json && this.watch) {
|
|
23
|
+
throw new Error('JSON format is not supported in watch mode');
|
|
24
|
+
}
|
|
25
|
+
return (React.createElement(Test, { environment: environment, path: this.projectPath, watch: this.watch, format: this.format }));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
TestCommand.paths = [['test']];
|
|
29
|
+
TestCommand.usage = Command.Usage({
|
|
30
|
+
description: 'Transpile TypeScript files to Lua',
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=TestCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestCommand.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/commands/TestCommand/TestCommand.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,OAAO,WAAY,SAAQ,uBAAuB;IAAxD;;QAOI,gBAAW,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE;YACpD,WAAW,EAAE,yBAAyB;SACzC,CAAC,CAAC;QAEH,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,EAAE,KAAK,EAAE;YACxC,WAAW,EAAE,mCAAmC;SACnD,CAAC,CAAC;QAEH,WAAM,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,MAAM,EAAE;YACpD,WAAW,EAAE,gCAAgC;YAC7C,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;SACpC,CAAC,CAAC;IAgBP,CAAC;IAdY,qBAAqB,CAAC,WAAwB;QACnD,IAAI,IAAI,CAAC,MAAM,KAAK,YAAY,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAClD,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;QAClE,CAAC;QAED,OAAO,CACH,oBAAC,IAAI,IACD,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,IAAI,CAAC,WAAW,EACtB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,MAAM,EAAE,IAAI,CAAC,MAAM,GACrB,CACL,CAAC;IACN,CAAC;;AAhCe,iBAAK,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,AAAb,CAAc;AAEnB,iBAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAClC,WAAW,EAAE,mCAAmC;CACnD,CAAC,AAFmB,CAElB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Environment } from '../../../environment/dto/Environment.js';
|
|
3
|
+
import { OutputFormat } from '../types.js';
|
|
4
|
+
export declare const Test: ({ environment, path, watch, format, }: {
|
|
5
|
+
environment: Environment;
|
|
6
|
+
path: string;
|
|
7
|
+
watch: boolean;
|
|
8
|
+
format?: OutputFormat;
|
|
9
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { resolve } from 'node:path';
|
|
2
|
+
import { StatusMessage } from '@inkjs/ui';
|
|
3
|
+
import { Box } from 'ink';
|
|
4
|
+
import React, { useEffect, useRef } from 'react';
|
|
5
|
+
import { CheckList } from '../../../components/CheckList/index.js';
|
|
6
|
+
import { useTestServer } from '../hooks/useTestServer.js';
|
|
7
|
+
import { useTestTasks } from '../hooks/useTestTasks.js';
|
|
8
|
+
import { OutputFormat } from '../types.js';
|
|
9
|
+
import { TestSuite } from './TestSuite.js';
|
|
10
|
+
import { TestSummary } from './TestSummary.js';
|
|
11
|
+
const removeCircularReferences = (suite) => {
|
|
12
|
+
return {
|
|
13
|
+
name: suite.name,
|
|
14
|
+
testCount: suite.testCount,
|
|
15
|
+
status: suite.status,
|
|
16
|
+
tests: suite.tests,
|
|
17
|
+
children: suite.children.map((child) => removeCircularReferences(child)),
|
|
18
|
+
depth: suite.depth,
|
|
19
|
+
startTime: suite.startTime,
|
|
20
|
+
endTime: suite.endTime,
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export const Test = ({ environment, path, watch, format = OutputFormat.Pretty, }) => {
|
|
24
|
+
const { testState, resetTestState } = useTestServer();
|
|
25
|
+
const { tasks, handleFinish, isWatching, hasChangedMessage, hasFailure, hasChanged, } = useTestTasks({
|
|
26
|
+
environment,
|
|
27
|
+
path: resolve(process.cwd(), path),
|
|
28
|
+
watch,
|
|
29
|
+
});
|
|
30
|
+
const compilationFinishedRef = useRef(false);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
if (format === OutputFormat.Pretty) {
|
|
33
|
+
process.stdout.write('\x1Bc');
|
|
34
|
+
}
|
|
35
|
+
}, [format]);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (hasChanged) {
|
|
38
|
+
if (format === OutputFormat.Pretty) {
|
|
39
|
+
process.stdout.write('\x1Bc');
|
|
40
|
+
}
|
|
41
|
+
resetTestState();
|
|
42
|
+
}
|
|
43
|
+
}, [hasChanged, format, resetTestState]);
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
if (!watch && compilationFinishedRef.current && testState) {
|
|
46
|
+
const isTestingComplete = testState.status === 'completed' ||
|
|
47
|
+
testState.status === 'failed';
|
|
48
|
+
if (isTestingComplete) {
|
|
49
|
+
if (format === OutputFormat.Json) {
|
|
50
|
+
const jsonSafeTestState = Object.assign(Object.assign({}, testState), { suites: testState.suites.map((suite) => removeCircularReferences(suite)) });
|
|
51
|
+
console.log(JSON.stringify(jsonSafeTestState, null, 2));
|
|
52
|
+
}
|
|
53
|
+
process.exit(testState.status === 'failed' || testState.failedTests > 0
|
|
54
|
+
? 1
|
|
55
|
+
: 0);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}, [watch, testState, format]);
|
|
59
|
+
const handleFinishWithTracking = (hasFailure) => {
|
|
60
|
+
compilationFinishedRef.current = true;
|
|
61
|
+
return handleFinish(hasFailure);
|
|
62
|
+
};
|
|
63
|
+
return (React.createElement(React.Fragment, null,
|
|
64
|
+
!hasChanged && (React.createElement(CheckList, { items: tasks, onFinish: handleFinishWithTracking, display: "silent" })),
|
|
65
|
+
format === OutputFormat.Pretty && (React.createElement(React.Fragment, null,
|
|
66
|
+
isWatching && !hasChangedMessage && (React.createElement(React.Fragment, null,
|
|
67
|
+
hasFailure && (React.createElement(StatusMessage, { variant: "warning" }, "Some steps failed:")),
|
|
68
|
+
React.createElement(StatusMessage, { variant: "info" }, "Watching for changes..."))),
|
|
69
|
+
testState && (React.createElement(Box, { flexDirection: "column" },
|
|
70
|
+
React.createElement(TestSummary, { testState: testState }),
|
|
71
|
+
testState.suites.map((suite) => (React.createElement(TestSuite, { key: suite.name, suite: suite })))))))));
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=Test.js.map
|
|
@@ -0,0 +1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C,CAAC,CACA,CACT,CACF,CACN,CACF,CACN,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TestLine as TestLineType } from '../server/TestServer.js';
|
|
3
|
+
interface TestLineProps {
|
|
4
|
+
line: TestLineType;
|
|
5
|
+
lineIndex: number;
|
|
6
|
+
testName: string;
|
|
7
|
+
suiteName: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const TestLine: React.FC<TestLineProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Box, Text } from 'ink';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export const TestLine = ({ line, lineIndex, testName, suiteName, }) => (React.createElement(Box, { key: `${suiteName}-${testName}-line-${lineIndex}`, paddingLeft: 4 },
|
|
4
|
+
React.createElement(Text, { color: line.type === 'error' ? 'red' : 'white', dimColor: true },
|
|
5
|
+
"[",
|
|
6
|
+
line.timestamp,
|
|
7
|
+
"]"),
|
|
8
|
+
React.createElement(Text, { color: line.type === 'error' ? 'red' : 'white', dimColor: true },
|
|
9
|
+
' ',
|
|
10
|
+
line.content)));
|
|
11
|
+
//# sourceMappingURL=TestLine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestLine.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/commands/TestCommand/components/TestLine.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EAC9C,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,SAAS,GACZ,EAAE,EAAE,CAAC,CACF,oBAAC,GAAG,IAAC,GAAG,EAAE,GAAG,SAAS,IAAI,QAAQ,SAAS,SAAS,EAAE,EAAE,WAAW,EAAE,CAAC;IAClE,oBAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,QAAQ;;QACxD,IAAI,CAAC,SAAS;YACb;IACP,oBAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,QAAQ;QACzD,GAAG;QACH,IAAI,CAAC,OAAO,CACV,CACL,CACT,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Box, Text } from 'ink';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { formatTestError } from '../utils/formatTestError.js';
|
|
4
|
+
import { TestLine } from './TestLine.js';
|
|
5
|
+
export const TestResult = ({ test, suiteName }) => {
|
|
6
|
+
const errorLine = test.result === 'failed'
|
|
7
|
+
? test.lines.find((line) => line.type === 'error')
|
|
8
|
+
: null;
|
|
9
|
+
return (React.createElement(Box, { key: `${suiteName}-${test.test}`, flexDirection: "column" },
|
|
10
|
+
React.createElement(Box, { gap: 1, paddingLeft: 2 },
|
|
11
|
+
React.createElement(Box, { gap: 1 },
|
|
12
|
+
React.createElement(Text, { color: test.result === 'passed' ? 'green' : 'red', bold: true }, test.result === 'passed' ? '✓' : '✗'),
|
|
13
|
+
React.createElement(Text, { dimColor: true }, test.test))),
|
|
14
|
+
test.result === 'failed' && errorLine && (React.createElement(Box, { paddingLeft: 4 },
|
|
15
|
+
React.createElement(Text, { color: "red" }, formatTestError(errorLine.content, errorLine.file, errorLine.line)))),
|
|
16
|
+
test.lines.length > 0 && test.result === 'failed' && (React.createElement(Box, { paddingLeft: 4, paddingTop: 1, paddingBottom: 1 },
|
|
17
|
+
React.createElement(Text, { color: "white", dimColor: true }, "Captured output"))),
|
|
18
|
+
test.lines.length > 0 && test.result === 'failed' && (React.createElement(Box, { paddingBottom: 1, flexDirection: "column" }, test.lines.map((line, lineIndex) => (React.createElement(Box, { key: `${suiteName}-${test.test}-line-${lineIndex}` },
|
|
19
|
+
React.createElement(TestLine, { line: line, lineIndex: lineIndex, testName: test.test, suiteName: suiteName }))))))));
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=TestResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestResult.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/commands/TestCommand/components/TestResult.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAOzC,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE;IACzE,MAAM,SAAS,GACX,IAAI,CAAC,MAAM,KAAK,QAAQ;QACpB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC;QAClD,CAAC,CAAC,IAAI,CAAC;IAEf,OAAO,CACH,oBAAC,GAAG,IAAC,GAAG,EAAE,GAAG,SAAS,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,aAAa,EAAC,QAAQ;QACzD,oBAAC,GAAG,IAAC,GAAG,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC;YACvB,oBAAC,GAAG,IAAC,GAAG,EAAE,CAAC;gBACP,oBAAC,IAAI,IACD,KAAK,EAAE,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,EACjD,IAAI,UAEH,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAClC;gBACP,oB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