gramatr 0.3.59 → 0.3.60

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.
Files changed (2) hide show
  1. package/bin/gramatr.js +12 -2
  2. package/package.json +1 -1
package/bin/gramatr.js CHANGED
@@ -2,9 +2,19 @@
2
2
  /**
3
3
  * gramatr CLI entry point — thin JS wrapper that bootstraps TypeScript.
4
4
  * tsx is a production dependency, resolved directly from node_modules.
5
+ *
6
+ * ESM module: packages/client/package.json has "type": "module" (added in
7
+ * PR #487 to support top-level await in bin/gmtr-login.ts). This file must
8
+ * use ESM imports — bare `require()` will throw ReferenceError at load time.
9
+ * v0.3.60 hotfix: #487 converted the .ts bin files but missed this .js twin.
5
10
  */
6
- const { spawnSync } = require('child_process');
7
- const { join, dirname } = require('path');
11
+ import { spawnSync } from 'node:child_process';
12
+ import { dirname, join } from 'node:path';
13
+ import { fileURLToPath } from 'node:url';
14
+ import { createRequire } from 'node:module';
15
+
16
+ const require = createRequire(import.meta.url);
17
+ const __dirname = dirname(fileURLToPath(import.meta.url));
8
18
 
9
19
  const script = join(__dirname, 'gramatr.ts');
10
20
  const args = process.argv.slice(2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gramatr",
3
- "version": "0.3.59",
3
+ "version": "0.3.60",
4
4
  "description": "grāmatr — context engineering layer for AI coding agents. Every prompt gets a pre-computed intelligence packet: decision routing, capability audit, behavioral directives, memory pre-load, and ISC scaffolds. Continuity across sessions for Claude Code, Codex, and Gemini CLI.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",