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,28 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
-
const _typescript = /*#__PURE__*/ _interop_require_wildcard._(require("typescript"));
|
|
13
|
-
const _typescripttolua = /*#__PURE__*/ _interop_require_wildcard._(require("typescript-to-lua"));
|
|
14
|
-
const _call = require("typescript-to-lua/dist/transformation/visitors/call");
|
|
15
|
-
const _isBuiltinNewExpression = require("./isBuiltinNewExpression");
|
|
16
|
-
const transformNewExpression = (node, context)=>{
|
|
17
|
-
if ((0, _isBuiltinNewExpression.isBuiltinNewExpression)(node, context.checker)) {
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transformNewExpression = void 0;
|
|
4
|
+
const ts = require("typescript");
|
|
5
|
+
const tstl = require("typescript-to-lua");
|
|
6
|
+
const call_1 = require("typescript-to-lua/dist/transformation/visitors/call");
|
|
7
|
+
const isBuiltinNewExpression_1 = require("./isBuiltinNewExpression");
|
|
8
|
+
exports.transformNewExpression = ((node, context) => {
|
|
9
|
+
var _a;
|
|
10
|
+
if ((0, isBuiltinNewExpression_1.isBuiltinNewExpression)(node, context.checker)) {
|
|
18
11
|
return context.superTransformExpression(node);
|
|
19
12
|
}
|
|
20
13
|
const signature = context.checker.getResolvedSignature(node);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
], signature);
|
|
25
|
-
return _typescripttolua.createCallExpression(name, params);
|
|
26
|
-
};
|
|
27
|
-
|
|
14
|
+
const [name, params] = (0, call_1.transformCallAndArguments)(context, node.expression, (_a = node.arguments) !== null && _a !== void 0 ? _a : [ts.factory.createTrue()], signature);
|
|
15
|
+
return tstl.createCallExpression(name, params);
|
|
16
|
+
});
|
|
28
17
|
//# sourceMappingURL=transformNewExpression.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"transformNewExpression.js","sourceRoot":"","sources":["../../../../libs/tstl-plugin/src/transformNewExpression/transformNewExpression.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AAEjC,0CAA0C;AAC1C,8EAAgG;AAChG,qEAAkE;AAErD,QAAA,sBAAsB,GAAG,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;;IACrD,IAAI,IAAA,+CAAsB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAChD,OAAO,OAAO,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAC7D,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,IAAA,gCAAyB,EAC5C,OAAO,EACP,IAAI,CAAC,UAAU,EACf,MAAA,IAAI,CAAC,SAAS,mCAAI,CAAC,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,EAC3C,SAAS,CACZ,CAAC;IACF,OAAO,IAAI,CAAC,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACnD,CAAC,CAA6C,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', {
|
|
3
|
+
value: true,
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, 'getTransformPropertyAccessExpression', {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function () {
|
|
8
|
+
return getTransformPropertyAccessExpression;
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require('@swc/helpers/_/_interop_require_wildcard');
|
|
12
|
+
const _typescript = /*#__PURE__*/ _interop_require_wildcard._(
|
|
13
|
+
require('typescript'),
|
|
14
|
+
);
|
|
15
|
+
const getTransformPropertyAccessExpression = importMap => {
|
|
16
|
+
return (node, context) => {
|
|
17
|
+
if (_typescript.isIdentifier(node.expression)) {
|
|
18
|
+
importMap.processName(node.name.text);
|
|
19
|
+
}
|
|
20
|
+
return context.superTransformExpression(node);
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=a.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../libs/tstl-plugin/src/transformPropertyAccessExpression/a.ts"],"sourcesContent":["import * as ts from 'typescript';\nimport { FunctionVisitor } from 'typescript-to-lua';\nimport { ImportMap } from '../ImportMap';\n\nexport const getTransformPropertyAccessExpression = (importMap: ImportMap) => {\n return ((node, context) => {\n if (ts.isIdentifier(node.expression)) {\n importMap.processName(node.name.text);\n }\n\n return context.superTransformExpression(node);\n }) satisfies FunctionVisitor<ts.PropertyAccessExpression>;\n};\n"],"names":["getTransformPropertyAccessExpression","importMap","node","context","ts","isIdentifier","expression","processName","name","text","superTransformExpression"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAIaA;;;eAAAA;;;;sEAJO;AAIb,MAAMA,uCAAuC,CAACC;IACjD,OAAQ,CAACC,MAAMC;QACX,IAAIC,YAAGC,YAAY,CAACH,KAAKI,UAAU,GAAG;YAClCL,UAAUM,WAAW,CAACL,KAAKM,IAAI,CAACC,IAAI;QACxC;QAEA,OAAON,QAAQO,wBAAwB,CAACR;IAC5C;AACJ"}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return getTransformPropertyAccessExpression;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const getTransformPropertyAccessExpression = (importMap)=>{
|
|
12
|
-
return (node, context)=>{
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTransformPropertyAccessExpression = void 0;
|
|
4
|
+
const getTransformPropertyAccessExpression = (importMap) => {
|
|
5
|
+
return ((node, context) => {
|
|
13
6
|
importMap.processName(node.name.text);
|
|
14
7
|
return context.superTransformExpression(node);
|
|
15
|
-
};
|
|
8
|
+
});
|
|
16
9
|
};
|
|
17
|
-
|
|
10
|
+
exports.getTransformPropertyAccessExpression = getTransformPropertyAccessExpression;
|
|
18
11
|
//# sourceMappingURL=getTransformPropertyAccessExpression.js.map
|
package/assets/transformPropertyAccessExpression/getTransformPropertyAccessExpression.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"file":"getTransformPropertyAccessExpression.js","sourceRoot":"","sources":["../../../../libs/tstl-plugin/src/transformPropertyAccessExpression/getTransformPropertyAccessExpression.ts"],"names":[],"mappings":";;;AAIO,MAAM,oCAAoC,GAAG,CAAC,SAAoB,EAAE,EAAE;IACzE,OAAO,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QACtB,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEtC,OAAO,OAAO,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC,CAAwD,CAAC;AAC9D,CAAC,CAAC;AANW,QAAA,oCAAoC,wCAM/C"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
-
_export_star._(require("./getTransformPropertyAccessExpression"), exports);
|
|
7
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./getTransformPropertyAccessExpression"), exports);
|
|
8
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/tstl-plugin/src/transformPropertyAccessExpression/index.ts"],"names":[],"mappings":";;;AAAA,iFAAuD"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
-
_export_star._(require("./transformSuperExpression"), exports);
|
|
7
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./transformSuperExpression"), exports);
|
|
8
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/tstl-plugin/src/transformSuperExpression/index.ts"],"names":[],"mappings":";;;AAAA,qEAA2C"}
|
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return transformSuperExpression;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
-
const _LuaAST = /*#__PURE__*/ _interop_require_wildcard._(require("typescript-to-lua/dist/LuaAST"));
|
|
13
|
-
const transformSuperExpression = (expression, context)=>{
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transformSuperExpression = void 0;
|
|
4
|
+
const lua = require("typescript-to-lua/dist/LuaAST");
|
|
5
|
+
exports.transformSuperExpression = ((expression, context) => {
|
|
14
6
|
const superInfos = context.classSuperInfos;
|
|
15
7
|
let superInfo = undefined;
|
|
16
8
|
if (superInfos) {
|
|
17
9
|
superInfo = superInfos[superInfos.length - 1];
|
|
18
10
|
}
|
|
19
|
-
if (!superInfo)
|
|
11
|
+
if (!superInfo)
|
|
12
|
+
return lua.createAnonymousIdentifier(expression);
|
|
20
13
|
const { className } = superInfo;
|
|
21
|
-
return
|
|
22
|
-
};
|
|
23
|
-
|
|
14
|
+
return lua.createTableIndexExpression(className, lua.createStringLiteral('super'));
|
|
15
|
+
});
|
|
24
16
|
//# sourceMappingURL=transformSuperExpression.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"file":"transformSuperExpression.js","sourceRoot":"","sources":["../../../../libs/tstl-plugin/src/transformSuperExpression/transformSuperExpression.ts"],"names":[],"mappings":";;;AAEA,qDAAqD;AAGxC,QAAA,wBAAwB,GAAG,CAAC,CACrC,UAAU,EACV,OAAuE,EACzE,EAAE;IACA,MAAM,UAAU,GAAG,OAAO,CAAC,eAAe,CAAC;IAC3C,IAAI,SAAS,GAA+B,SAAS,CAAC;IACtD,IAAI,UAAU,EAAE,CAAC;QACb,SAAS,GAAG,UAAU,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAClD,CAAC;IACD,IAAI,CAAC,SAAS;QAAE,OAAO,GAAG,CAAC,yBAAyB,CAAC,UAAU,CAAC,CAAC;IACjE,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC;IAEhC,OAAO,GAAG,CAAC,0BAA0B,CACjC,SAAS,EACT,GAAG,CAAC,mBAAmB,CAAC,OAAO,CAAC,CACnC,CAAC;AACN,CAAC,CAA+C,CAAC"}
|
package/assets/types.js
CHANGED
package/assets/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../libs/tstl-plugin/src/types.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "crankscript",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0-beta.1",
|
|
4
4
|
"bin": {
|
|
5
5
|
"crankscript": "./src/index.js"
|
|
6
6
|
},
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
"cheerio": "^1.0.0",
|
|
12
12
|
"chokidar": "^4.0.3",
|
|
13
13
|
"clipanion": "^4.0.0-rc.4",
|
|
14
|
+
"cors": "^2.8.5",
|
|
15
|
+
"express": "^5.1.0",
|
|
14
16
|
"ink": "^5.0.1",
|
|
15
17
|
"open": "^10.1.0",
|
|
16
18
|
"react": "^18.3.1",
|
|
@@ -19,15 +21,16 @@
|
|
|
19
21
|
"turndown": "^7.2.0",
|
|
20
22
|
"typanion": "^3.14.0",
|
|
21
23
|
"typescript": "5.7.3",
|
|
22
|
-
"typescript-to-lua": "^1.27.0"
|
|
24
|
+
"typescript-to-lua": "^1.27.0",
|
|
25
|
+
"zx": "^8.5.4"
|
|
23
26
|
},
|
|
24
27
|
"type": "module",
|
|
25
28
|
"main": "./src/index.js",
|
|
26
29
|
"typings": "./src/index.d.ts",
|
|
27
|
-
"types": "./src/index.d.ts",
|
|
28
|
-
"module": "./src/index.js",
|
|
29
30
|
"scripts": {
|
|
30
31
|
"dev": "tsx src/index.ts",
|
|
31
|
-
"
|
|
32
|
+
"build": "tsx scripts/build.mts",
|
|
33
|
+
"test": "NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" pnpm exec jest",
|
|
34
|
+
"lint": "eslint src --ext .ts,.tsx"
|
|
32
35
|
}
|
|
33
36
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EnvironmentAwareCommand } from '../../commands/EnvironmentAwareCommand/index.js';
|
|
3
|
-
import { Environment } from '../../environment/dto/Environment.js';
|
|
3
|
+
import type { Environment } from '../../environment/dto/Environment.js';
|
|
4
4
|
export declare class CompileCommand extends EnvironmentAwareCommand {
|
|
5
5
|
static paths: string[][];
|
|
6
6
|
static usage: import("clipanion").Usage;
|
|
@@ -4,18 +4,11 @@ import { Compile } from '../../commands/CompileCommand/components/Compile.js';
|
|
|
4
4
|
import { EnvironmentAwareCommand } from '../../commands/EnvironmentAwareCommand/index.js';
|
|
5
5
|
export class CompileCommand extends EnvironmentAwareCommand {
|
|
6
6
|
renderWithEnvironment(environment) {
|
|
7
|
-
return
|
|
8
|
-
environment: environment
|
|
9
|
-
});
|
|
7
|
+
return React.createElement(Compile, { environment: environment });
|
|
10
8
|
}
|
|
11
9
|
}
|
|
12
|
-
CompileCommand.paths = [
|
|
13
|
-
[
|
|
14
|
-
'compile'
|
|
15
|
-
]
|
|
16
|
-
];
|
|
10
|
+
CompileCommand.paths = [['compile']];
|
|
17
11
|
CompileCommand.usage = Command.Usage({
|
|
18
|
-
description: 'Compiles the code and runs the simulator'
|
|
12
|
+
description: 'Compiles the code and runs the simulator',
|
|
19
13
|
});
|
|
20
|
-
|
|
21
14
|
//# sourceMappingURL=CompileCommand.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"CompileCommand.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/commands/CompileCommand/CompileCommand.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,qDAAqD,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,iDAAiD,CAAC;AAG1F,MAAM,OAAO,cAAe,SAAQ,uBAAuB;IAO9C,qBAAqB,CAAC,WAAwB;QACnD,OAAO,oBAAC,OAAO,IAAC,WAAW,EAAE,WAAW,GAAI,CAAC;IACjD,CAAC;;AARe,oBAAK,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAEtB,oBAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAClC,WAAW,EAAE,0CAA0C;CAC1D,CAAC,CAAC"}
|
|
@@ -3,14 +3,10 @@ import React from 'react';
|
|
|
3
3
|
import { getPdcPathFromEnvironment } from '../../../commands/CompileCommand/fn/getPdcPathFromEnvironment.js';
|
|
4
4
|
import { useCompileTasks } from '../../../commands/CompileCommand/hooks/useCompileTasks.js';
|
|
5
5
|
import { CheckList } from '../../../components/CheckList/index.js';
|
|
6
|
-
export const Compile = ({ environment })=>{
|
|
6
|
+
export const Compile = ({ environment }) => {
|
|
7
7
|
const items = useCompileTasks({
|
|
8
|
-
pdcPath: getPdcPathFromEnvironment(environment)
|
|
9
|
-
});
|
|
10
|
-
return /*#__PURE__*/ React.createElement(CheckList, {
|
|
11
|
-
items: items,
|
|
12
|
-
onFinish: ()=>process.exit
|
|
8
|
+
pdcPath: getPdcPathFromEnvironment(environment),
|
|
13
9
|
});
|
|
10
|
+
return React.createElement(CheckList, { items: items, onFinish: () => process.exit });
|
|
14
11
|
};
|
|
15
|
-
|
|
16
12
|
//# sourceMappingURL=Compile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Compile.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/commands/CompileCommand/components/Compile.tsx"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAC1G,OAAO,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAOhE,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EAAE,WAAW,EAAS,EAAE,EAAE;IAC9C,MAAM,KAAK,GAAG,eAAe,CAAC;QAC1B,OAAO,EAAE,yBAAyB,CAAC,WAAW,CAAC;KAClD,CAAC,CAAC;IAEH,OAAO,oBAAC,SAAS,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,GAAI,CAAC;AACrE,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 getPdcPathFromEnvironment: (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 getPdcPathFromEnvironment = (environment)=>{
|
|
3
|
+
export const getPdcPathFromEnvironment = (environment) => {
|
|
4
4
|
return join(environment.sdkPath.path, 'bin', appendExeOnWindows('pdc'));
|
|
5
5
|
};
|
|
6
|
-
|
|
7
6
|
//# sourceMappingURL=getPdcPathFromEnvironment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../libs/cli/src/commands/CompileCommand/fn/getPdcPathFromEnvironment.ts"],"
|
|
1
|
+
{"version":3,"file":"getPdcPathFromEnvironment.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/commands/CompileCommand/fn/getPdcPathFromEnvironment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,WAAwB,EAAE,EAAE;IAClE,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC;AAC5E,CAAC,CAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
export declare const compile: ({ pdcPath, target, }: {
|
|
1
|
+
export declare const compile: ({ pdcPath, target, sourceName, targetName, path, }: {
|
|
2
2
|
pdcPath: string;
|
|
3
|
-
target
|
|
3
|
+
target?: string;
|
|
4
|
+
sourceName?: string;
|
|
5
|
+
targetName?: string;
|
|
6
|
+
path?: string;
|
|
4
7
|
}) => Promise<{
|
|
5
8
|
stdout: string;
|
|
6
9
|
stderr: string;
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import { exec } from 'node:child_process';
|
|
2
3
|
import { join } from 'node:path';
|
|
3
|
-
import { promisify } from 'util';
|
|
4
|
+
import { promisify } from 'node:util';
|
|
4
5
|
const execPromise = promisify(exec);
|
|
5
|
-
const hasStderr = (e)=>{
|
|
6
|
+
const hasStderr = (e) => {
|
|
6
7
|
return e !== null && typeof e === 'object' && 'stderr' in e;
|
|
7
8
|
};
|
|
8
|
-
export const compile =
|
|
9
|
+
export const compile = (_a) => __awaiter(void 0, [_a], void 0, function* ({ pdcPath, target = '', sourceName, targetName, path = process.cwd(), }) {
|
|
9
10
|
const args = [
|
|
10
|
-
join(target, 'Source'),
|
|
11
|
-
join(target, 'Game.pdx')
|
|
11
|
+
join(path, target, sourceName !== null && sourceName !== void 0 ? sourceName : 'Source'),
|
|
12
|
+
join(path, target, targetName !== null && targetName !== void 0 ? targetName : 'Game.pdx'),
|
|
12
13
|
];
|
|
13
14
|
try {
|
|
14
15
|
return execPromise(`${pdcPath} ${args.join(' ')}`);
|
|
15
|
-
}
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
16
18
|
if (hasStderr(error)) {
|
|
17
19
|
throw new Error(`Lua compilation failed: ${error.stderr}`);
|
|
18
20
|
}
|
|
19
21
|
throw error;
|
|
20
22
|
}
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
+
});
|
|
23
24
|
//# sourceMappingURL=compile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../libs/cli/src/commands/CompileCommand/hooks/task/compile.ts"],"
|
|
1
|
+
{"version":3,"file":"compile.js","sourceRoot":"","sources":["../../../../../../../../libs/cli/src/commands/CompileCommand/hooks/task/compile.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;AAEpC,MAAM,SAAS,GAAG,CAAC,CAAU,EAA2B,EAAE;IACtD,OAAO,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,QAAQ,IAAI,CAAC,CAAC;AAChE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAYpB,EAAE,4CAZyB,EAC1B,OAAO,EACP,MAAM,GAAG,EAAE,EACX,UAAU,EACV,UAAU,EACV,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,GAOvB;IACG,MAAM,IAAI,GAAG;QACT,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,QAAQ,CAAC;QAC1C,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,UAAU,CAAC;KAC/C,CAAC;IAEF,IAAI,CAAC;QACD,OAAO,WAAW,CAAC,GAAG,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACvD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,2BAA2B,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;QAC/D,CAAC;QAED,MAAM,KAAK,CAAC;IAChB,CAAC;AACL,CAAC,CAAA,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { CheckListItem } from '../../../types.js';
|
|
1
|
+
import type { CheckListItem } from '../../../types.js';
|
|
2
2
|
interface Props {
|
|
3
3
|
pdcPath: string;
|
|
4
4
|
outputPath?: string;
|
|
5
|
+
sourceName?: string;
|
|
6
|
+
targetName?: string;
|
|
7
|
+
path?: string;
|
|
5
8
|
}
|
|
6
|
-
export declare const useCompileTasks: ({ pdcPath, outputPath }: Props) => CheckListItem<unknown>[];
|
|
9
|
+
export declare const useCompileTasks: ({ pdcPath, outputPath, sourceName, targetName, path, }: Props) => CheckListItem<unknown>[];
|
|
7
10
|
export {};
|
|
@@ -1,35 +1,38 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
1
2
|
import { existsSync } from 'node:fs';
|
|
2
3
|
import { useMemo } from 'react';
|
|
3
4
|
import { compile } from '../../../commands/CompileCommand/hooks/task/compile.js';
|
|
4
|
-
export const useCompileTasks = ({ pdcPath, outputPath })=>{
|
|
5
|
-
return useMemo(()=>[
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
5
|
+
export const useCompileTasks = ({ pdcPath, outputPath, sourceName, targetName, path, }) => {
|
|
6
|
+
return useMemo(() => [
|
|
7
|
+
{
|
|
8
|
+
waitingDescription: 'Waiting to check for pdc binary...',
|
|
9
|
+
errorDescription: 'Could not find pdc binary',
|
|
10
|
+
runningDescription: 'Checking for pdc binary...',
|
|
11
|
+
finishedDescription: (result) => `Found pdc binary at "${result}"`,
|
|
12
|
+
runner: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
13
|
+
if (!existsSync(pdcPath)) {
|
|
14
|
+
throw new Error('Could not find pdc binary');
|
|
15
|
+
}
|
|
16
|
+
return pdcPath;
|
|
17
|
+
}),
|
|
18
|
+
ready: true,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
waitingDescription: 'Waiting for pdc binary path...',
|
|
22
|
+
errorDescription: 'Could not compile lua code',
|
|
23
|
+
runningDescription: 'Compiling lua code...',
|
|
24
|
+
finishedDescription: () => 'Lua code compiled',
|
|
25
|
+
runner: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
+
yield compile({
|
|
27
|
+
pdcPath,
|
|
28
|
+
target: outputPath,
|
|
29
|
+
sourceName,
|
|
30
|
+
targetName,
|
|
31
|
+
path,
|
|
32
|
+
});
|
|
33
|
+
}),
|
|
34
|
+
ready: true,
|
|
35
|
+
},
|
|
36
|
+
], [pdcPath, outputPath, sourceName, targetName, path]);
|
|
33
37
|
};
|
|
34
|
-
|
|
35
38
|
//# sourceMappingURL=useCompileTasks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../libs/cli/src/commands/CompileCommand/hooks/useCompileTasks.ts"],"
|
|
1
|
+
{"version":3,"file":"useCompileTasks.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/commands/CompileCommand/hooks/useCompileTasks.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,qDAAqD,CAAC;AAW9E,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC5B,OAAO,EACP,UAAU,EACV,UAAU,EACV,UAAU,EACV,IAAI,GACA,EAAE,EAAE;IACR,OAAO,OAAO,CACV,GAAG,EAAE,CAAC;QACF;YACI,kBAAkB,EAAE,oCAAoC;YACxD,gBAAgB,EAAE,2BAA2B;YAC7C,kBAAkB,EAAE,4BAA4B;YAChD,mBAAmB,EAAE,CAAC,MAAM,EAAE,EAAE,CAC5B,wBAAwB,MAAM,GAAG;YACrC,MAAM,EAAE,GAAS,EAAE;gBACf,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;oBACvB,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;gBACjD,CAAC;gBAED,OAAO,OAAO,CAAC;YACnB,CAAC,CAAA;YACD,KAAK,EAAE,IAAI;SACkB;QACjC;YACI,kBAAkB,EAAE,gCAAgC;YACpD,gBAAgB,EAAE,4BAA4B;YAC9C,kBAAkB,EAAE,uBAAuB;YAC3C,mBAAmB,EAAE,GAAG,EAAE,CAAC,mBAAmB;YAC9C,MAAM,EAAE,GAAS,EAAE;gBACf,MAAM,OAAO,CAAC;oBACV,OAAO;oBACP,MAAM,EAAE,UAAU;oBAClB,UAAU;oBACV,UAAU;oBACV,IAAI;iBACP,CAAC,CAAC;YACP,CAAC,CAAA;YACD,KAAK,EAAE,IAAI;SACd;KACJ,EACD,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,CAC1B,CAAC;AAClC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../libs/cli/src/commands/CompileCommand/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/commands/CompileCommand/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -7,20 +7,13 @@ import { RenderableCommand } from './RenderableCommand.js';
|
|
|
7
7
|
export class DoctorCommand extends RenderableCommand {
|
|
8
8
|
render() {
|
|
9
9
|
const environment = createEnvironment();
|
|
10
|
-
return
|
|
11
|
-
color: "gray"
|
|
12
|
-
|
|
13
|
-
environment: environment
|
|
14
|
-
}));
|
|
10
|
+
return (React.createElement(React.Fragment, null,
|
|
11
|
+
React.createElement(Text, { color: "gray" }, "Checking the environment..."),
|
|
12
|
+
React.createElement(HealthReport, { environment: environment })));
|
|
15
13
|
}
|
|
16
14
|
}
|
|
17
|
-
DoctorCommand.paths = [
|
|
18
|
-
[
|
|
19
|
-
'doctor'
|
|
20
|
-
]
|
|
21
|
-
];
|
|
15
|
+
DoctorCommand.paths = [['doctor']];
|
|
22
16
|
DoctorCommand.usage = Command.Usage({
|
|
23
|
-
description: 'Check the health of the environment'
|
|
17
|
+
description: 'Check the health of the environment',
|
|
24
18
|
});
|
|
25
|
-
|
|
26
19
|
//# sourceMappingURL=DoctorCommand.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"DoctorCommand.js","sourceRoot":"","sources":["../../../../../libs/cli/src/commands/DoctorCommand.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,sDAAsD,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,OAAO,aAAc,SAAQ,iBAAiB;IAOvC,MAAM;QACX,MAAM,WAAW,GAAG,iBAAiB,EAAE,CAAC;QAExC,OAAO,CACH;YACI,oBAAC,IAAI,IAAC,KAAK,EAAC,MAAM,kCAAmC;YACrD,oBAAC,YAAY,IAAC,WAAW,EAAE,WAAW,GAAI,CAC3C,CACN,CAAC;IACN,CAAC;;AAfe,mBAAK,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;AAErB,mBAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAClC,WAAW,EAAE,qCAAqC;CACrD,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { JSX } from 'react';
|
|
1
|
+
import { type JSX } from 'react';
|
|
2
2
|
import { RenderableCommand } from '../../commands/RenderableCommand.js';
|
|
3
|
-
import { Environment } from '../../environment/dto/Environment.js';
|
|
3
|
+
import type { Environment } from '../../environment/dto/Environment.js';
|
|
4
4
|
export declare abstract class EnvironmentAwareCommand extends RenderableCommand {
|
|
5
5
|
private environment;
|
|
6
6
|
protected abstract renderWithEnvironment(environment: Environment): JSX.Element;
|