tidewave 0.5.4 → 0.5.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.5] - 2025-11-25
4
+
5
+ * Fix missing items element on `project_eval`
6
+ * Allow install to continue even if dependencies cannot be installed
7
+
3
8
  ## [0.5.4] - 2025-11-13
4
9
 
5
10
  * Fix async messages on `project_eval`
package/README.md CHANGED
@@ -283,6 +283,11 @@ bun run format:check # Check Prettier formatting
283
283
  bun run clean # Clean dist directory
284
284
  ```
285
285
 
286
+ ## Acknowledgements
287
+
288
+ A thank you to [Zoey](https://github.com/zoedsoupe/) for implementing both Next.js and
289
+ Vite integrations as well as the CLI interface.
290
+
286
291
  ## License
287
292
 
288
293
  Copyright (c) 2025 Dashbit
package/dist/cli/index.js CHANGED
@@ -5865,8 +5865,8 @@ Imports are allowed only as the form of dynamic imports with async/await, e.g.:
5865
5865
  const path = await import('node:path');
5866
5866
  `;
5867
5867
  projectEvalInputSchema = exports_external.object({
5868
- code: exports_external.string().describe("The JavaScript/TypeScript code to evaluate."),
5869
- arguments: exports_external.array(exports_external.any()).optional().default([]).describe("The arguments to pass to evaluation. They are available inside the evaluated code as `arguments`."),
5868
+ code: exports_external.string().describe("The JavaScript code to evaluate."),
5869
+ arguments: exports_external.array(exports_external.unknown()).optional().default([]).describe("The arguments to pass to evaluation. They are available inside the evaluated code as `arguments`."),
5870
5870
  timeout: exports_external.number().optional().default(30000).describe(`Optional. A timeout in milliseconds after which the execution stops if it did not finish yet.
5871
5871
  Defaults to 30000 (30 seconds).`),
5872
5872
  json: exports_external.boolean().optional().default(false).describe("Whether to return the result as JSON or not (string)")
@@ -6787,7 +6787,7 @@ var init_src = __esm(() => {
6787
6787
  });
6788
6788
 
6789
6789
  // package.json
6790
- var name = "tidewave", version = "0.5.4", package_default;
6790
+ var name = "tidewave", version = "0.5.5", package_default;
6791
6791
  var init_package = __esm(() => {
6792
6792
  package_default = {
6793
6793
  name,
@@ -17017,11 +17017,6 @@ The installer only works for Next.js projects
17017
17017
  process.exit(1);
17018
17018
  }
17019
17019
  console.log(source_default.green(`✅ Detected Next.js ${nextVersion.raw} (v${nextVersion.major})`));
17020
- if (!skipDeps) {
17021
- await installDependencies(targetDir, dryRun);
17022
- } else {
17023
- console.log(source_default.gray("⏭️ Skipping dependency installation"));
17024
- }
17025
17020
  const steps = [
17026
17021
  () => createApiHandler(targetDir, dryRun),
17027
17022
  () => createMiddleware(targetDir, nextVersion, dryRun),
@@ -17030,6 +17025,9 @@ The installer only works for Next.js projects
17030
17025
  for (const step of steps) {
17031
17026
  await step();
17032
17027
  }
17028
+ if (!skipDeps) {
17029
+ await installDependencies(targetDir, dryRun);
17030
+ }
17033
17031
  console.log(source_default.green(`
17034
17032
  ✅ Tidewave setup complete!
17035
17033
  `));
@@ -17132,9 +17130,7 @@ async function installDependencies(dir, dryRun) {
17132
17130
  console.log(source_default.gray(`
17133
17131
  Please install manually:
17134
17132
  ${pm} ${devCmds.join(" ")}
17135
- ${pm} ${depCmds.join(" ")}
17136
- `));
17137
- process.exit(1);
17133
+ ${pm} ${depCmds.join(" ")}`));
17138
17134
  }
17139
17135
  }
17140
17136
  async function createApiHandler(dir, dryRun) {
@@ -17168,9 +17164,9 @@ export const config = {
17168
17164
  return;
17169
17165
  }
17170
17166
  const shouldOverwrite = await promptUser(source_default.yellow(`
17171
- ⚠️ ${path5.relative(dir, handlerPath)} already exists. Overwrite? (Y/n): `));
17167
+ ⚠️ ${path5.relative(dir, handlerPath)} already exists. Overwrite? (Y/n): `));
17172
17168
  if (!shouldOverwrite) {
17173
- console.log(source_default.gray(`⏭️ Skipping: ${path5.relative(dir, handlerPath)}`));
17169
+ console.log(source_default.gray(`⏭️ Skipping: ${path5.relative(dir, handlerPath)}`));
17174
17170
  return;
17175
17171
  }
17176
17172
  }
@@ -17187,7 +17183,7 @@ async function createMiddleware(dir, nextVersion, dryRun) {
17187
17183
  const fileName = isNext16Plus ? "proxy.ts" : "middleware.ts";
17188
17184
  const filePath = path5.join(dir, fileName);
17189
17185
  if (fs2.existsSync(filePath)) {
17190
- console.log(source_default.yellow(`⏭️ ${fileName} already exists`));
17186
+ console.log(source_default.yellow(`⏭️ ${fileName} already exists`));
17191
17187
  const content = fs2.readFileSync(filePath, "utf-8");
17192
17188
  if (content.includes("/tidewave") && content.includes("/api/tidewave")) {
17193
17189
  console.log(source_default.green(`✅ ${fileName} already configured for Tidewave`));
@@ -17256,7 +17252,7 @@ async function createInstrumentation(dir, dryRun) {
17256
17252
  if (fs2.existsSync(rootPath) || fs2.existsSync(srcPath)) {
17257
17253
  const existingPath = fs2.existsSync(rootPath) ? rootPath : srcPath;
17258
17254
  const existingFile = fs2.existsSync(rootPath) ? "instrumentation.ts" : "src/instrumentation.ts";
17259
- console.log(source_default.yellow(`⏭️ ${existingFile} already exists`));
17255
+ console.log(source_default.yellow(`⏭️ ${existingFile} already exists`));
17260
17256
  const content = fs2.readFileSync(existingPath, "utf-8");
17261
17257
  if (content.includes("TidewaveSpanProcessor") && content.includes("TidewaveLogRecordProcessor")) {
17262
17258
  console.log(source_default.green(`✅ ${existingFile} already configured for Tidewave`));
@@ -20058,8 +20058,8 @@ Imports are allowed only as the form of dynamic imports with async/await, e.g.:
20058
20058
  const path = await import('node:path');
20059
20059
  `;
20060
20060
  projectEvalInputSchema = exports_external.object({
20061
- code: exports_external.string().describe("The JavaScript/TypeScript code to evaluate."),
20062
- arguments: exports_external.array(exports_external.any()).optional().default([]).describe("The arguments to pass to evaluation. They are available inside the evaluated code as `arguments`."),
20061
+ code: exports_external.string().describe("The JavaScript code to evaluate."),
20062
+ arguments: exports_external.array(exports_external.unknown()).optional().default([]).describe("The arguments to pass to evaluation. They are available inside the evaluated code as `arguments`."),
20063
20063
  timeout: exports_external.number().optional().default(30000).describe(`Optional. A timeout in milliseconds after which the execution stops if it did not finish yet.
20064
20064
  Defaults to 30000 (30 seconds).`),
20065
20065
  json: exports_external.boolean().optional().default(false).describe("Whether to return the result as JSON or not (string)")
@@ -20137,7 +20137,7 @@ Defaults to 30000 (30 seconds).`),
20137
20137
  });
20138
20138
 
20139
20139
  // package.json
20140
- var name = "tidewave", version = "0.5.4", package_default;
20140
+ var name = "tidewave", version = "0.5.5", package_default;
20141
20141
  var init_package = __esm(() => {
20142
20142
  package_default = {
20143
20143
  name,
package/dist/tools.d.ts CHANGED
@@ -28,18 +28,18 @@ export interface Tools {
28
28
  }
29
29
  export declare const projectEvalInputSchema: z.ZodObject<{
30
30
  code: z.ZodString;
31
- arguments: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodAny, "many">>>;
31
+ arguments: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>>;
32
32
  timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
33
33
  json: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
34
34
  }, "strip", z.ZodTypeAny, {
35
35
  code: string;
36
36
  timeout: number;
37
- arguments: any[];
37
+ arguments: unknown[];
38
38
  json: boolean;
39
39
  }, {
40
40
  code: string;
41
41
  timeout?: number | undefined;
42
- arguments?: any[] | undefined;
42
+ arguments?: unknown[] | undefined;
43
43
  json?: boolean | undefined;
44
44
  }>;
45
45
  export declare const docsInputSchema: z.ZodObject<{
@@ -20058,8 +20058,8 @@ Imports are allowed only as the form of dynamic imports with async/await, e.g.:
20058
20058
  const path = await import('node:path');
20059
20059
  `;
20060
20060
  projectEvalInputSchema = exports_external.object({
20061
- code: exports_external.string().describe("The JavaScript/TypeScript code to evaluate."),
20062
- arguments: exports_external.array(exports_external.any()).optional().default([]).describe("The arguments to pass to evaluation. They are available inside the evaluated code as `arguments`."),
20061
+ code: exports_external.string().describe("The JavaScript code to evaluate."),
20062
+ arguments: exports_external.array(exports_external.unknown()).optional().default([]).describe("The arguments to pass to evaluation. They are available inside the evaluated code as `arguments`."),
20063
20063
  timeout: exports_external.number().optional().default(30000).describe(`Optional. A timeout in milliseconds after which the execution stops if it did not finish yet.
20064
20064
  Defaults to 30000 (30 seconds).`),
20065
20065
  json: exports_external.boolean().optional().default(false).describe("Whether to return the result as JSON or not (string)")
@@ -20137,7 +20137,7 @@ Defaults to 30000 (30 seconds).`),
20137
20137
  });
20138
20138
 
20139
20139
  // package.json
20140
- var name = "tidewave", version = "0.5.4", package_default;
20140
+ var name = "tidewave", version = "0.5.5", package_default;
20141
20141
  var init_package = __esm(() => {
20142
20142
  package_default = {
20143
20143
  name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tidewave",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "Tidewave for JavaScript/Next.js",
5
5
  "keywords": [
6
6
  "typescript",