@clary-so/measure 0.4.8 → 0.4.9

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,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ var __bundled_dirname = __dirname; __dirname = require("path").join(__dirname, "server");
2
3
  "use strict";
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
5
  var __commonJS = (cb, mod) => function __require() {
package/esbuild-bin.mjs CHANGED
@@ -29,6 +29,13 @@ const result = await esbuild.build({
29
29
  // Force all react requires to resolve from this package's node_modules
30
30
  react: join(__dirname, "node_modules/react"),
31
31
  },
32
+ // The original code in dist/server/bin.js uses __dirname (= dist/server/)
33
+ // and does path.join(__dirname, "../../dist") to find the webapp.
34
+ // In the bundle at dist/bin-bundled.js, __dirname = dist/, so we override
35
+ // it to dist/server/ so the existing path logic still works.
36
+ banner: {
37
+ js: `var __bundled_dirname = __dirname; __dirname = require("path").join(__dirname, "server");`,
38
+ },
32
39
  define: {
33
40
  "process.env.NODE_ENV": '"production"',
34
41
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clary-so/measure",
3
- "version": "0.4.8",
3
+ "version": "0.4.9",
4
4
  "author": {
5
5
  "name": "Almouro",
6
6
  "email": "alexandrem@bam.tech"