@shareai-lab/kode 1.1.8 → 1.1.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shareai-lab/kode",
3
- "version": "1.1.08",
3
+ "version": "1.1.10",
4
4
  "bin": {
5
5
  "kode": "cli.js",
6
6
  "kwa": "cli.js",
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env -S node --no-warnings=ExperimentalWarning --enable-source-maps
2
+ import { fileURLToPath } from 'node:url'
3
+ import { dirname, join } from 'node:path'
2
4
  import { initSentry } from '../services/sentry'
3
5
  import { PRODUCT_COMMAND, PRODUCT_NAME } from '../constants/product'
4
6
  initSentry() // Initialize Sentry as early as possible
@@ -7,14 +9,12 @@ initSentry() // Initialize Sentry as early as possible
7
9
  // Resolve yoga.wasm relative to this file when missing using ESM-friendly APIs
8
10
  try {
9
11
  if (!process.env.YOGA_WASM_PATH) {
10
- const { fileURLToPath } = await import('node:url')
11
- const { dirname, join } = await import('node:path')
12
- const { existsSync } = await import('node:fs')
12
+ const { existsSync: fsExistsSync } = require('fs')
13
13
  const __filename = fileURLToPath(import.meta.url)
14
14
  const __dirname = dirname(__filename)
15
15
  const devCandidate = join(__dirname, '../../yoga.wasm')
16
16
  // Prefer dev path; wrapper already sets env for normal runs
17
- process.env.YOGA_WASM_PATH = existsSync(devCandidate)
17
+ process.env.YOGA_WASM_PATH = fsExistsSync(devCandidate)
18
18
  ? devCandidate
19
19
  : process.env.YOGA_WASM_PATH
20
20
  }