codex-to-im 1.0.63 → 1.0.65

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/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import { createRequire as __ctiCreateRequire } from 'module'; const require = __ctiCreateRequire(import.meta.url);
3
3
 
4
4
  // src/cli.ts
5
5
  import { stdin as input, stdout as output } from "node:process";
package/dist/daemon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
1
+ import { createRequire as __ctiCreateRequire } from 'module'; const require = __ctiCreateRequire(import.meta.url);
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -11867,7 +11867,7 @@ function parseDesktopSession(filePath, threadIndexEntries, archivedThreadIds, vi
11867
11867
  }
11868
11868
  const lastEventAt = visibleThread?.updatedAtMs ? new Date(visibleThread.updatedAtMs).toISOString() : stat.mtime.toISOString();
11869
11869
  const firstSeenAt = parsed.payload.timestamp || parsed.timestamp || stat.birthtime.toISOString();
11870
- const title = visibleThread?.title || threadIndexEntries.get(threadId)?.title || buildFallbackTitle(threadId, filePath, cwd);
11870
+ const title = threadIndexEntries.get(threadId)?.title || visibleThread?.title || buildFallbackTitle(threadId, filePath, cwd);
11871
11871
  return {
11872
11872
  threadId,
11873
11873
  filePath,
@@ -1,4 +1,4 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
1
+ import { createRequire as __ctiCreateRequire } from 'module'; const require = __ctiCreateRequire(import.meta.url);
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -5548,7 +5548,7 @@ function parseDesktopSession(filePath, threadIndexEntries, archivedThreadIds, vi
5548
5548
  }
5549
5549
  const lastEventAt = visibleThread?.updatedAtMs ? new Date(visibleThread.updatedAtMs).toISOString() : stat.mtime.toISOString();
5550
5550
  const firstSeenAt = parsed.payload.timestamp || parsed.timestamp || stat.birthtime.toISOString();
5551
- const title = visibleThread?.title || threadIndexEntries.get(threadId)?.title || buildFallbackTitle(threadId, filePath, cwd);
5551
+ const title = threadIndexEntries.get(threadId)?.title || visibleThread?.title || buildFallbackTitle(threadId, filePath, cwd);
5552
5552
  return {
5553
5553
  threadId,
5554
5554
  filePath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-to-im",
3
- "version": "1.0.63",
3
+ "version": "1.0.65",
4
4
  "description": "Installable Codex-to-IM bridge with local setup UI and background service",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/zhangle1987/codex-to-im#readme",
package/scripts/build.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as esbuild from 'esbuild';
2
+ import { spawnSync } from 'node:child_process';
2
3
 
3
4
  const common = {
4
5
  bundle: true,
@@ -17,7 +18,9 @@ const common = {
17
18
  'stream', 'events', 'url', 'util', 'child_process', 'worker_threads',
18
19
  'node:*',
19
20
  ],
20
- banner: { js: "import { createRequire } from 'module'; const require = createRequire(import.meta.url);" },
21
+ banner: {
22
+ js: "import { createRequire as __ctiCreateRequire } from 'module'; const require = __ctiCreateRequire(import.meta.url);",
23
+ },
21
24
  };
22
25
 
23
26
  async function build(entryPoint, outfile) {
@@ -26,6 +29,15 @@ async function build(entryPoint, outfile) {
26
29
  entryPoints: [entryPoint],
27
30
  outfile,
28
31
  });
32
+
33
+ const syntaxCheck = spawnSync(process.execPath, ['--check', outfile], {
34
+ encoding: 'utf8',
35
+ });
36
+ if (syntaxCheck.status !== 0) {
37
+ throw new Error(
38
+ `Generated bundle failed syntax validation: ${outfile}\n${syntaxCheck.stderr || syntaxCheck.stdout}`,
39
+ );
40
+ }
29
41
  }
30
42
 
31
43
  await build('src/main.ts', 'dist/daemon.mjs');