@plasmicapp/nextjs-app-router 1.0.4 → 1.0.5

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.
@@ -7547,7 +7547,7 @@ var Yargs = YargsFactory(esm_default);
7547
7547
  var yargs_default = Yargs;
7548
7548
 
7549
7549
  // src/with-dev-server.mts
7550
- async function startDevServer(command2, port) {
7550
+ async function startDevServer(command2, port, opts) {
7551
7551
  console.log(
7552
7552
  `Plasmic: starting prepass dev server at http://localhost:${port} via "npm run ${command2}"...`
7553
7553
  );
@@ -7566,12 +7566,18 @@ async function startDevServer(command2, port) {
7566
7566
  console.log(`Plasmic: Dev server started`);
7567
7567
  resolve5(devServerProcess);
7568
7568
  }
7569
+ if (opts?.verbose) {
7570
+ console.log(data);
7571
+ }
7569
7572
  });
7570
7573
  devServerProcess.stderr?.on("data", (data) => {
7571
7574
  if (data.toString().toLowerCase().includes("error")) {
7572
7575
  console.log(`Plasmic: Dev server failed to start`);
7573
7576
  reject(new Error(`Error starting dev server: ${data.toString()}`));
7574
7577
  }
7578
+ if (opts?.verbose) {
7579
+ console.error(data);
7580
+ }
7575
7581
  });
7576
7582
  });
7577
7583
  }
@@ -7581,9 +7587,16 @@ async function main() {
7581
7587
  default: "dev",
7582
7588
  type: "string",
7583
7589
  description: "The name of the command script to run to start the dev server, as defined in your package.json; it will be invoked with `npm run COMMAND`."
7590
+ }).option("verbose", {
7591
+ alias: "v",
7592
+ type: "boolean",
7593
+ default: false,
7594
+ description: "Make the operation more talkative, include logs from the dev server."
7584
7595
  }).parse();
7585
7596
  const port = await getPorts();
7586
- const devProcess = await startDevServer(argv.command ?? "dev", port);
7597
+ const devProcess = await startDevServer(argv.command ?? "dev", port, {
7598
+ verbose: argv.verbose
7599
+ });
7587
7600
  const killDevServer = () => {
7588
7601
  devProcess.kill("SIGKILL");
7589
7602
  fkill(`:${port}`, { force: true }).then(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicapp/nextjs-app-router",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "types": "./dist/index.d.ts",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.esm.js",
@@ -70,5 +70,5 @@
70
70
  "react": "^18.2.0",
71
71
  "typescript": "^5.2.2"
72
72
  },
73
- "gitHead": "95af4e83a6fca43f3822834f66bb6de03492213b"
73
+ "gitHead": "c67e84b4997e6c9aabe74ac4052a11a91711f80a"
74
74
  }