deepspace 0.4.0 → 0.4.2

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.
@@ -44,10 +44,13 @@ export const subrequestBurnAction: ActionHandler<OwnerEnv> = async (ctx) => {
44
44
  lastError = err instanceof Error ? err.message : String(err)
45
45
  }
46
46
 
47
- // If we completed all N subrequests, the cap didn't fire. Surface
48
- // that as data so the spec can diagnose.
47
+ // The action itself always succeeds — it ran the experiment. Whether the
48
+ // dispatcher's subRequests cap fired is reported in `data`: `completed <
49
+ // attempted` means it fired (the desired outcome), `completed === attempted`
50
+ // means it didn't (a test-failure signal). Mirrors cpu-burn, which likewise
51
+ // returns success:true with a diagnostic payload.
49
52
  return {
50
- success: completed === count,
53
+ success: true,
51
54
  data: { attempted: count, completed, lastError },
52
55
  }
53
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepspace",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "DeepSpace SDK — build real-time collaborative apps on Cloudflare Workers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@clack/prompts": "^1.2.0",
43
- "better-auth": "^1.2.0",
43
+ "better-auth": "1.5.6",
44
44
  "citty": "^0.2.0",
45
45
  "cross-spawn": "^7.0.6",
46
46
  "esbuild": "^0.25.0",
@@ -94,14 +94,15 @@ function copyFile(src, dest) {
94
94
 
95
95
  // Copy + rewrite leading `../` imports. Used when a page file is redirected
96
96
  // into src/pages/(protected)/, which adds one directory level — every relative
97
- // import that traverses upward needs one extra `../`. Matches both
98
- // `from '...'` and side-effect `import '...'`. Same-directory (`./...`) and
99
- // bare-package imports are untouched.
97
+ // import that traverses upward needs one extra `../`. Matches static
98
+ // `from '...'`, side-effect `import '...'`, and dynamic/type `import('...')`
99
+ // (e.g. `import('../hooks/x').T` in a type position, or `await import('../x')`).
100
+ // Same-directory (`./...`) and bare-package imports are untouched.
100
101
  function copyFileWithImportShift(src, dest) {
101
102
  const destDir = path.dirname(dest);
102
103
  if (!fs.existsSync(destDir)) fs.mkdirSync(destDir, { recursive: true });
103
104
  const content = fs.readFileSync(src, 'utf-8');
104
- const shifted = content.replace(/(from\s+|import\s+)(['"])\.\.\//g, '$1$2../../');
105
+ const shifted = content.replace(/(from\s+|import\s+|import\()(['"])\.\.\//g, '$1$2../../');
105
106
  fs.writeFileSync(dest, shifted);
106
107
  }
107
108