testeranto 0.79.60 → 0.79.62

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.
@@ -1,5 +1,6 @@
1
1
  import readline from "readline";
2
2
  import fs from "fs";
3
+ import watch from "recursive-watch";
3
4
  import { PM_Main } from "./PM/main.js";
4
5
  import { destinationOfRuntime } from "./utils.js";
5
6
  var mode = process.argv[2] === "-dev" ? "DEV" : "PROD";
@@ -9,6 +10,7 @@ const childProcesses = {};
9
10
  readline.emitKeypressEvents(process.stdin);
10
11
  if (process.stdin.isTTY)
11
12
  process.stdin.setRawMode(true);
13
+ console.log("hello Puppeteer", process.env);
12
14
  console.log("\n Puppeteer is running. Press 'q' to quit\n");
13
15
  process.stdin.on("keypress", (str, key) => {
14
16
  if (key.name === "q") {
@@ -21,7 +23,7 @@ export default async (partialConfig) => {
21
23
  const pm = new PM_Main(config);
22
24
  await pm.startPuppeteer({
23
25
  waitForInitialPage: false,
24
- executablePath: "/opt/homebrew/bin/chromium",
26
+ executablePath: process.env.CHROMIUM_PATH || "/opt/homebrew/bin/chromium",
25
27
  headless: true,
26
28
  // dumpio: true,
27
29
  args: [
@@ -67,9 +69,7 @@ export default async (partialConfig) => {
67
69
  }
68
70
  });
69
71
  console.log("ready and watching for changes...", config.buildDir);
70
- fs.watch(config.buildDir, {
71
- recursive: true,
72
- }, (eventType, changedFile) => {
72
+ watch(config.buildDir, (eventType, changedFile) => {
73
73
  if (changedFile) {
74
74
  config.tests.forEach(([test, runtime, tr, sidecars]) => {
75
75
  if (eventType === "change" || eventType === "rename") {
@@ -95,4 +95,45 @@ export default async (partialConfig) => {
95
95
  });
96
96
  }
97
97
  });
98
+ // does not work on linux
99
+ // fs.watch(
100
+ // config.buildDir,
101
+ // {
102
+ // recursive: true,
103
+ // },
104
+ // (eventType, changedFile) => {
105
+ // if (changedFile) {
106
+ // config.tests.forEach(([test, runtime, tr, sidecars]) => {
107
+ // if (eventType === "change" || eventType === "rename") {
108
+ // if (
109
+ // changedFile ===
110
+ // test
111
+ // .replace("./", "node/")
112
+ // .split(".")
113
+ // .slice(0, -1)
114
+ // .concat("mjs")
115
+ // .join(".")
116
+ // ) {
117
+ // pm.launchNode(test, destinationOfRuntime(test, "node", config));
118
+ // }
119
+ // if (
120
+ // changedFile ===
121
+ // test
122
+ // .replace("./", "web/")
123
+ // .split(".")
124
+ // .slice(0, -1)
125
+ // .concat("mjs")
126
+ // .join(".")
127
+ // ) {
128
+ // pm.launchWeb(
129
+ // test,
130
+ // destinationOfRuntime(test, "web", config),
131
+ // sidecars
132
+ // );
133
+ // }
134
+ // }
135
+ // });
136
+ // }
137
+ // }
138
+ // );
98
139
  };
@@ -4,16 +4,7 @@ import mongoose from "mongoose";
4
4
  import path from "path";
5
5
  import fs from "fs";
6
6
  import { ganttSchema, kanbanSchema, userSchema, featuresSchema, RoomSchema, HuddleSchema, channelsFeature, chatCatMessageSchema, } from "./mongooseSchemas";
7
- // export const chatChannel = new mongoose.Schema<IChatChannel>({
8
- // // name: { type: String, required: true },
9
- // users: [
10
- // {
11
- // type: mongoose.Schema.Types.ObjectId,
12
- // ref: "User",
13
- // required: true,
14
- // },
15
- // ],
16
- // });
7
+ console.log("hello TaskMan Backend", process.env);
17
8
  const port = 3000;
18
9
  function findTextFiles(dir, fileList = []) {
19
10
  const files = fs.readdirSync(dir);