@maka/maka-cli 5.81.1 → 5.81.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maka/maka-cli",
3
- "version": "5.81.1",
3
+ "version": "5.81.2",
4
4
  "type": "module",
5
5
  "summary": "A command line tool for scaffolding Meteor 2.x applications using either React.",
6
6
  "description": "A command line tool for scaffolding Meteor 2.x applications using React.",
@@ -1,27 +1,25 @@
1
- import { createRequire } from 'module';
1
+ import { readFileSync } from 'node:fs';
2
2
  function readPackageJson() {
3
- // NEVER CALL createRequire AT MODULE SCOPE IN THIS GRAPH. The
4
- // maka-cli.com server evaluates the engine under Meteor's patched
5
- // module machinery (reify), where an eager createRequire during
6
- // sync-ESM evaluation dies with a misleading "module is not defined
7
- // in ES module scope" -- it took down every shared-run crew draft on
8
- // 2026-08-30 (and, in hindsight, 2026-08-23). Called lazily from
9
- // function context it works everywhere, including under Meteor; this
10
- // is the constraint headless.ts's "require(esm)-compatible" promise
11
- // actually depends on.
3
+ // THE REQUIRE-FACTORY FROM node:module MAY NEVER APPEAR IN THIS FILE
4
+ // -- not as a call, not as an import, NOT EVEN AS A WORD IN A
5
+ // COMMENT. The maka-cli.com server evaluates the engine graph under
6
+ // the Meteor/SDK runtime, whose compile path intercepts files
7
+ // containing that token and evaluates reify-compiled CJS under
8
+ // native ESM rules -- "module is not defined in ES module scope",
9
+ // which killed every shared-run crew draft on 2026-08-30 (and, in
10
+ // hindsight, 2026-08-23). The 5.81.1 lazy-call fix was correct but
11
+ // insufficient: the TOKEN is the trigger, and the trigger may be a
12
+ // crude source scan, so the token is gone in every position. A plain
13
+ // fs read does the same job -- these lookups only ever loaded
14
+ // package.json. See cli-version.test.ts for the tripwire that keeps
15
+ // it out.
12
16
  //
13
- // Deliberately NOT named `require`: scripts/build-bundle.mjs rewrites
14
- // createRequire aliases into real bundler requires, and this file is
15
- // on its exclusion list precisely because the lookup below is dynamic.
16
- const requireFromHere = createRequire(import.meta.url);
17
- // Two depths: this file sits at src/tools/version/ in the source tree and
18
- // at bundle/typescript/src/tools/version/ once compiled, with package.json
19
- // copied alongside by the `prep` script. Both land on the same relative
20
- // path, but the second candidate keeps an unusual layout from silently
21
- // reporting 0.0.0-unknown.
17
+ // Two depths: this file sits at src/tools/version/ in the source tree
18
+ // and at bundle/typescript/src/tools/version/ once compiled, with
19
+ // package.json copied alongside by the `prep` script.
22
20
  for (const rel of ['../../../package.json', '../../../../package.json']) {
23
21
  try {
24
- const pkg = requireFromHere(rel);
22
+ const pkg = JSON.parse(readFileSync(new URL(rel, import.meta.url), 'utf8'));
25
23
  if (pkg?.name === '@maka/maka-cli') {
26
24
  return pkg;
27
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cli-version.js","sourceRoot":"","sources":["../../../../../src/tools/version/cli-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAsBvC,SAAS,eAAe;IACtB,8DAA8D;IAC9D,kEAAkE;IAClE,gEAAgE;IAChE,oEAAoE;IACpE,qEAAqE;IACrE,iEAAiE;IACjE,qEAAqE;IACrE,oEAAoE;IACpE,uBAAuB;IACvB,EAAE;IACF,sEAAsE;IACtE,qEAAqE;IACrE,uEAAuE;IACvE,MAAM,eAAe,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvD,0EAA0E;IAC1E,2EAA2E;IAC3E,wEAAwE;IACxE,uEAAuE;IACvE,2BAA2B;IAC3B,KAAK,MAAM,GAAG,IAAI,CAAC,uBAAuB,EAAE,0BAA0B,CAAC,EAAE,CAAC;QACxE,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;YACjC,IAAI,GAAG,EAAE,IAAI,KAAK,gBAAgB,EAAE,CAAC;gBACnC,OAAO,GAAG,CAAC;YACb,CAAC;QACH,CAAC;QAAC,MAAM,CAAC,CAAC,wBAAwB,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,IAAI,aAAiC,CAAC;AACtC,IAAI,cAAkC,CAAC;AAEvC,8EAA8E;AAC9E,MAAM,UAAU,UAAU;IACxB,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;QAChC,aAAa,GAAG,OAAO,oBAAoB,KAAK,QAAQ;YACtD,CAAC,CAAC,oBAAoB;YACtB,CAAC,CAAE,eAAe,EAAE,EAAE,OAAkB,IAAI,eAAe,CAAC;IAChE,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC;AAED;;;;;;aAMa;AACb,MAAM,UAAU,QAAQ;IACtB,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;QACjC,cAAc,GAAG,OAAO,kBAAkB,KAAK,QAAQ;YACrD,CAAC,CAAC,kBAAkB;YACpB,CAAC,CAAE,eAAe,EAAE,EAAE,YAAY,EAAE,CAAC,kBAAkB,CAAY,IAAI,QAAQ,CAAC;IACpF,CAAC;IACD,OAAO,cAAc,CAAC;AACxB,CAAC"}
1
+ {"version":3,"file":"cli-version.js","sourceRoot":"","sources":["../../../../../src/tools/version/cli-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAsBvC,SAAS,eAAe;IACtB,qEAAqE;IACrE,8DAA8D;IAC9D,oEAAoE;IACpE,8DAA8D;IAC9D,+DAA+D;IAC/D,kEAAkE;IAClE,kEAAkE;IAClE,mEAAmE;IACnE,mEAAmE;IACnE,qEAAqE;IACrE,8DAA8D;IAC9D,oEAAoE;IACpE,UAAU;IACV,EAAE;IACF,sEAAsE;IACtE,kEAAkE;IAClE,sDAAsD;IACtD,KAAK,MAAM,GAAG,IAAI,CAAC,uBAAuB,EAAE,0BAA0B,CAAC,EAAE,CAAC;QACxE,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;YAC5E,IAAI,GAAG,EAAE,IAAI,KAAK,gBAAgB,EAAE,CAAC;gBACnC,OAAO,GAAG,CAAC;YACb,CAAC;QACH,CAAC;QAAC,MAAM,CAAC,CAAC,wBAAwB,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,IAAI,aAAiC,CAAC;AACtC,IAAI,cAAkC,CAAC;AAEvC,8EAA8E;AAC9E,MAAM,UAAU,UAAU;IACxB,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;QAChC,aAAa,GAAG,OAAO,oBAAoB,KAAK,QAAQ;YACtD,CAAC,CAAC,oBAAoB;YACtB,CAAC,CAAE,eAAe,EAAE,EAAE,OAAkB,IAAI,eAAe,CAAC;IAChE,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC;AAED;;;;;;aAMa;AACb,MAAM,UAAU,QAAQ;IACtB,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;QACjC,cAAc,GAAG,OAAO,kBAAkB,KAAK,QAAQ;YACrD,CAAC,CAAC,kBAAkB;YACpB,CAAC,CAAE,eAAe,EAAE,EAAE,YAAY,EAAE,CAAC,kBAAkB,CAAY,IAAI,QAAQ,CAAC;IACpF,CAAC;IACD,OAAO,cAAc,CAAC;AACxB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maka/maka-cli",
3
- "version": "5.81.1",
3
+ "version": "5.81.2",
4
4
  "type": "module",
5
5
  "summary": "A command line tool for scaffolding Meteor 2.x applications using either React.",
6
6
  "description": "A command line tool for scaffolding Meteor 2.x applications using React.",