@looop-games/cli 0.1.14 → 0.1.15

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
@@ -14,6 +14,15 @@ Versions: [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
14
14
 
15
15
  ## [Unreleased]
16
16
 
17
+ ## [0.1.15] - 2026-07-13
18
+
19
+ ### Changed
20
+ - When a non-primitive file lands in your primitives folder, the error now sends
21
+ you to a `lib/` subfolder for the helper, instead of saying it can live
22
+ "anywhere in your game". It can't: a primitive runs in the browser too (to
23
+ predict with), so a helper outside the `/shared/` tree resolves on the room
24
+ server but 404s in the browser. `lib/` is reachable from both sides.
25
+
17
26
  ## [0.1.14] - 2026-07-13
18
27
 
19
28
  > How to write a room primitive — the folder, the filename-is-type rule, and
@@ -106,8 +106,12 @@ export function scanPrimitives(projectDir) {
106
106
  throw new Error(
107
107
  `${PRIMITIVES_DIR}/${name} has no default export, so it cannot be a primitive.\n` +
108
108
  'A primitive is `export default class { ... }`, and its filename is its type name.\n' +
109
- `If ${name} is a HELPER your primitive imports, move it out of this folder anywhere else in\n` +
110
- `your game works, or a subfolder here (e.g. ${PRIMITIVES_DIR}/lib/${name}), which is not scanned.`,
109
+ `If ${name} is a HELPER your primitive imports, put it in a lib/ subfolder here —\n` +
110
+ ` ${PRIMITIVES_DIR}/lib/${name}\n` +
111
+ `and import it as './lib/${name}'. The scanner skips lib/, and a primitive runs on BOTH\n` +
112
+ 'sides — bundled into the room AND served to the browser to predict with — so its helper\n' +
113
+ 'has to sit under this /shared/ tree to be reachable from both. Anywhere else in your game\n' +
114
+ 'resolves for the room but 404s in the browser.',
111
115
  );
112
116
  }
113
117
  found.push({ type: name.slice(0, -3), module: `${PRIMITIVES_DIR}/${name}` });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@looop-games/cli",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "Looop game development CLI — dev server, login, and publishing for standalone Looop games.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",