@pronto-tools-and-more/pronto 7.3.0 → 7.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/pronto",
3
- "version": "7.3.0",
3
+ "version": "7.5.0",
4
4
  "description": "",
5
5
  "main": "src/main.js",
6
6
  "type": "module",
@@ -17,13 +17,14 @@
17
17
  "@lvce-editor/ipc": "^11.0.1",
18
18
  "@lvce-editor/json-rpc": "^4.2.0",
19
19
  "@lvce-editor/verror": "^1.4.0",
20
- "@pronto-tools-and-more/file-watcher": "7.3.0",
21
- "@pronto-tools-and-more/files": "7.3.0",
22
- "@pronto-tools-and-more/network-process": "7.3.0",
23
- "@pronto-tools-and-more/sass-compiler": "7.3.0",
24
- "@pronto-tools-and-more/components-renderer": "7.3.0",
25
- "@pronto-tools-and-more/components": "7.3.0",
26
- "@pronto-tools-and-more/schema-process": "7.3.0",
20
+ "@pronto-tools-and-more/file-watcher": "7.5.0",
21
+ "@pronto-tools-and-more/files": "7.5.0",
22
+ "@pronto-tools-and-more/network-process": "7.5.0",
23
+ "@pronto-tools-and-more/sass-compiler": "7.5.0",
24
+ "@pronto-tools-and-more/components-renderer": "7.5.0",
25
+ "@pronto-tools-and-more/components": "7.5.0",
26
+ "@pronto-tools-and-more/schema-process": "7.5.0",
27
+ "@pronto-tools-and-more/type-checker": "7.5.0",
27
28
  "execa": "^9.4.1",
28
29
  "express": "^4.21.1"
29
30
  },
@@ -3,11 +3,13 @@ import * as Help from "../Help/Help.js";
3
3
  import * as History from "../History/History.js";
4
4
  import * as ListExperienceVersionsAndPrint from "../ListExperienceVersionsAndPrint/ListExperienceVersionsAndPrint.js";
5
5
  import * as Login from "../Login/Login.js";
6
+ import * as PrintVersion from "../PrintVersion/PrintVersion.js";
6
7
  import * as PullCode from "../PullCode/PullCode.js";
7
8
  import * as PushCode from "../PushCode/PushCode.js";
8
9
  import * as Release from "../Release/Release.js";
9
10
  import * as Server from "../Server/Server.js";
10
11
  import * as Split from "../Split/Split.js";
12
+ import * as TypeCheck from "../TypeCheck/TypeCheck.js";
11
13
  import * as Upgrade from "../Upgrade/Upgrade.js";
12
14
  import * as UploadZip from "../UploadZip/UploadZip.js";
13
15
  import * as ValidateAllSchemas from "../ValidateAllSchemas/ValidateAllSchemas.js";
@@ -27,4 +29,6 @@ export const commandMap = {
27
29
  ListExperienceVersionsAndPrint.listExperienceVersionsAndPrint,
28
30
  "UploadZip.uploadZip": UploadZip.uploadZip,
29
31
  "ValidateAllSchema.validateAllSchemas": ValidateAllSchemas.validateAllSchemas,
32
+ "PrintVersion.printVersion": PrintVersion.printVersion,
33
+ "TypeCheck.typeCheck": TypeCheck.typeCheck,
30
34
  };
@@ -23,6 +23,9 @@ export const getCommandFromCliArgs = (argv) => {
23
23
  if (argv.includes("history")) {
24
24
  return "History.history";
25
25
  }
26
+ if (argv.includes("check")) {
27
+ return "TypeCheck.typeCheck";
28
+ }
26
29
  if (argv.includes("split")) {
27
30
  return "Split.split";
28
31
  }
@@ -32,5 +35,8 @@ export const getCommandFromCliArgs = (argv) => {
32
35
  if (argv.includes("release-minor")) {
33
36
  return "Release.releaseMinor";
34
37
  }
38
+ if (argv.includes("--version")) {
39
+ return "PrintVersion.printVersion";
40
+ }
35
41
  return "Help.help";
36
42
  };
@@ -0,0 +1,15 @@
1
+ import * as HandleIpc from "../HandleIpc/HandleIpc.js";
2
+ import * as IpcParent from "../IpcParent/IpcParent.js";
3
+ import * as IpcParentType from "../IpcParentType/IpcParentType.js";
4
+ import * as TypeCheckerProcessPath from "../TypeCheckerProcessPath/TypeCheckerProcessPath.js";
5
+
6
+ export const launchTypeCheckerProcess = async () => {
7
+ const ipc = await IpcParent.create({
8
+ method: IpcParentType.NodeForkedProcess,
9
+ path: TypeCheckerProcessPath.typeCheckerProcessPath,
10
+ });
11
+ HandleIpc.handleIpc(ipc);
12
+ // @ts-ignore
13
+ ipc._rawIpc.unref();
14
+ return ipc;
15
+ };
@@ -0,0 +1,5 @@
1
+ import * as Version from "../Version/Version.js";
2
+
3
+ export const printVersion = () => {
4
+ console.info(`[pronto] ${Version.version}`);
5
+ };
@@ -0,0 +1,7 @@
1
+ export const typeCheck = () => {
2
+ // TODO
3
+ // 1. find path to custom.server.js
4
+ // 2. read the file contents
5
+ // 3. validate the code with ts morph
6
+ // 4. print out errors
7
+ };
@@ -0,0 +1,26 @@
1
+ import * as JsonRpc from "../JsonRpc/JsonRpc.js";
2
+ import * as LaunchTypeCheckerProcess from "../LaunchTypeCheckerProcess/LaunchTypeCheckerProcess.js";
3
+
4
+ const state = {
5
+ /**
6
+ * @type {any}
7
+ */
8
+ ipc: undefined,
9
+ };
10
+
11
+ const getOrCreate = () => {
12
+ if (!state.ipc) {
13
+ state.ipc = LaunchTypeCheckerProcess.launchTypeCheckerProcess();
14
+ }
15
+ return state.ipc;
16
+ };
17
+
18
+ export const invoke = async (method, ...params) => {
19
+ const ipc = await getOrCreate();
20
+ return JsonRpc.invoke(ipc, method, ...params);
21
+ };
22
+
23
+ export const dispose = async () => {
24
+ const ipc = await getOrCreate();
25
+ ipc.dispose();
26
+ };
@@ -0,0 +1,13 @@
1
+ import * as Path from "node:path";
2
+ import * as ResolveBin from "../ResolveBin/ResolveBin.js";
3
+ import * as Root from "../Root/Root.js";
4
+
5
+ export const typeCheckerProcessPath =
6
+ ResolveBin.resolveBin("@pronto-tools-and-more/type-checker") ||
7
+ Path.join(
8
+ Root.root,
9
+ "packages",
10
+ "pronto-type-checker",
11
+ "src",
12
+ "typeCheckerMain.js"
13
+ );
@@ -0,0 +1 @@
1
+ export const version = '7.5.0'