@riboseinc/anafero-cli 0.0.31 → 0.0.32

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.
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { resolve, isAbsolute, join } from 'node:path';
10
- import { readFile, writeFile } from 'node:fs/promises';
10
+ import { readFile } from 'node:fs/promises';
11
11
 
12
12
  import { Logger, Effect } from 'effect';
13
13
  import { NodeContext, NodeRuntime } from '@effect/platform-node';
@@ -66,8 +66,7 @@ Effect.
66
66
 
67
67
  async function buildBootstrapScript(opts: ReportingOptions) {
68
68
  const { logLevel } = opts;
69
- const outfile = join(PACKAGE_ROOT, 'bootstrap.js');
70
- const result = await esbuild({
69
+ return await esbuild({
71
70
  entryPoints: [
72
71
  './bootstrap.tsx',
73
72
  //join(PACKAGE_ROOT, 'site', 'index.tsx'),
@@ -75,14 +74,14 @@ async function buildBootstrapScript(opts: ReportingOptions) {
75
74
  absWorkingDir: join(PACKAGE_ROOT, '..', 'firelight-gui'),
76
75
  entryNames: '[dir]/[name]',
77
76
  assetNames: '[dir]/[name]',
78
- format: 'esm',
77
+ format: 'iife',
79
78
  target: ['esnext'],
80
79
  bundle: true,
81
80
  minify: false,
82
81
  treeShaking: true,
83
82
  sourcemap: true,
84
83
  platform: 'browser',
85
- outfile,
84
+ outfile: join(PACKAGE_ROOT, 'bootstrap.js'),
86
85
  //outdir: 'layout',
87
86
  write: true,
88
87
  loader: {
@@ -93,23 +92,6 @@ async function buildBootstrapScript(opts: ReportingOptions) {
93
92
  },
94
93
  logLevel,
95
94
  });
96
-
97
-
98
- // This unbreaks react-aria’s virtualizer ScrollView
99
- // interfering with ProseMirror
100
- //
101
- // Ideally, this could be an esbuild plugin.
102
- // Even more ideally, a proper package manager patch
103
- // (yarn patch didn’t work for me).
104
- console.debug("Patching ProseMirror");
105
- let contents = await readFile(outfile, 'utf8');
106
- contents = contents.replace(
107
- 'if (!runCustomHandler(view, event)',
108
- 'if (event && !runCustomHandler(view, event)',
109
- );
110
- await writeFile(outfile, contents);
111
-
112
- return result;
113
95
  }
114
96
 
115
97
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@riboseinc/anafero-cli",
3
3
  "type": "module",
4
- "version": "0.0.31",
4
+ "version": "0.0.32",
5
5
  "packageManager": "yarn@4.5.0",
6
6
  "bin": {
7
7
  "build-site": "build-site.mjs"
Binary file
Binary file