@joystick.js/cli-canary 0.0.0-canary.134 → 0.0.0-canary.136

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,14 +1,10 @@
1
1
  import dev from "../../lib/dev/index.js";
2
2
  var test_default = async (args = {}, options = {}) => {
3
- console.log({
4
- args,
5
- options
6
- });
7
3
  await dev({
8
4
  environment: "test",
9
5
  process,
10
6
  port: 1977,
11
- watch: args?.watch
7
+ watch: options?.watch
12
8
  });
13
9
  };
14
10
  export {
@@ -253,7 +253,9 @@ const handleCopyDirectory = (context = {}, path2 = "", options = {}) => {
253
253
  const handleRestartApplicationProcess = async (options = {}) => {
254
254
  try {
255
255
  if (process.serverProcess && process.serverProcess.pid) {
256
- process.loader.text("Restarting app...");
256
+ if (!options?.watch) {
257
+ process.loader.text("Restarting app...");
258
+ }
257
259
  process.serverProcess.kill();
258
260
  await startApp({
259
261
  nodeMajorVersion: options?.nodeMajorVersion,
@@ -327,7 +329,9 @@ const startFileWatcher = (options = {}) => {
327
329
  );
328
330
  watcher.on("all", async (event, path2) => {
329
331
  checkForRequiredFiles();
330
- process.loader.text("Rebuilding app...");
332
+ if (!options?.watch) {
333
+ process.loader.text("Rebuilding app...");
334
+ }
331
335
  const watchChangeContext = getWatchChangeContext(event, path2);
332
336
  handleCopyDirectory(watchChangeContext, path2, options);
333
337
  handleCopyFile(watchChangeContext, path2, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joystick.js/cli-canary",
3
- "version": "0.0.0-canary.134",
3
+ "version": "0.0.0-canary.136",
4
4
  "type": "module",
5
5
  "description": "CLI for the Joystick JavaScript framework.",
6
6
  "main": "development.js",
@@ -1,15 +1,10 @@
1
1
  import dev from "../../lib/dev/index.js";
2
2
 
3
3
  export default async (args = {}, options = {}) => {
4
- console.log({
5
- args,
6
- options,
7
- });
8
-
9
4
  await dev({
10
5
  environment: 'test',
11
6
  process,
12
7
  port: 1977,
13
- watch: args?.watch,
8
+ watch: options?.watch,
14
9
  });
15
10
  };
@@ -307,7 +307,10 @@ const handleCopyDirectory = (context = {}, path = '', options = {}) => {
307
307
  const handleRestartApplicationProcess = async (options = {}) => {
308
308
  try {
309
309
  if (process.serverProcess && process.serverProcess.pid) {
310
- process.loader.text("Restarting app...");
310
+ if (!options?.watch) {
311
+ process.loader.text("Restarting app...");
312
+ }
313
+
311
314
  process.serverProcess.kill();
312
315
 
313
316
  await startApp({
@@ -393,7 +396,9 @@ const startFileWatcher = (options = {}) => {
393
396
  // NOTE: Do this here in case a required file/folder goes missing inbetween builds.
394
397
  checkForRequiredFiles();
395
398
 
396
- process.loader.text("Rebuilding app...");
399
+ if (!options?.watch) {
400
+ process.loader.text("Rebuilding app...");
401
+ }
397
402
 
398
403
  const watchChangeContext = getWatchChangeContext(event, path);
399
404
 
@@ -619,7 +624,7 @@ const dev = async (options, { resolve, reject }) => {
619
624
  if (options?.environment === 'test') {
620
625
  process.loader.stop();
621
626
  const databaseProcessIds = getDatabaseProcessIds();
622
-
627
+
623
628
  await runTests({
624
629
  watch: options?.watch,
625
630
  __dirname,