tailwind-styled-v4 5.0.38 → 5.0.40

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.
Files changed (101) hide show
  1. package/dist/analyzer.js +18 -20
  2. package/dist/analyzer.js.map +1 -1
  3. package/dist/analyzer.mjs +3 -1
  4. package/dist/analyzer.mjs.map +1 -1
  5. package/dist/animate.js +8 -8
  6. package/dist/animate.js.map +1 -1
  7. package/dist/animate.mjs +3 -1
  8. package/dist/animate.mjs.map +1 -1
  9. package/dist/atomic.js +15 -12
  10. package/dist/atomic.js.map +1 -1
  11. package/dist/atomic.mjs +9 -3
  12. package/dist/atomic.mjs.map +1 -1
  13. package/dist/cli.js +45 -95
  14. package/dist/cli.js.map +1 -1
  15. package/dist/cli.mjs +42 -13
  16. package/dist/cli.mjs.map +1 -1
  17. package/dist/compiler.js +23 -18
  18. package/dist/compiler.js.map +1 -1
  19. package/dist/compiler.mjs +15 -5
  20. package/dist/compiler.mjs.map +1 -1
  21. package/dist/dashboard.js +1 -0
  22. package/dist/dashboard.js.map +1 -1
  23. package/dist/devtools.js +5 -3
  24. package/dist/devtools.js.map +1 -1
  25. package/dist/devtools.mjs +3 -1
  26. package/dist/devtools.mjs.map +1 -1
  27. package/dist/engine.js +83 -53
  28. package/dist/engine.js.map +1 -1
  29. package/dist/engine.mjs +58 -16
  30. package/dist/engine.mjs.map +1 -1
  31. package/dist/index.js +15 -9
  32. package/dist/index.js.map +1 -1
  33. package/dist/index.mjs +12 -4
  34. package/dist/index.mjs.map +1 -1
  35. package/dist/next.js +35 -30
  36. package/dist/next.js.map +1 -1
  37. package/dist/next.mjs +21 -8
  38. package/dist/next.mjs.map +1 -1
  39. package/dist/plugin-api.js +1 -0
  40. package/dist/plugin-api.js.map +1 -1
  41. package/dist/plugin-registry.js +2 -2
  42. package/dist/plugin-registry.js.map +1 -1
  43. package/dist/plugin.js +1 -0
  44. package/dist/plugin.js.map +1 -1
  45. package/dist/preset.js +1 -0
  46. package/dist/preset.js.map +1 -1
  47. package/dist/rspack.js +9 -55
  48. package/dist/rspack.js.map +1 -1
  49. package/dist/rspack.mjs +31 -7
  50. package/dist/rspack.mjs.map +1 -1
  51. package/dist/runtime-css.js +1 -0
  52. package/dist/runtime-css.js.map +1 -1
  53. package/dist/runtime.js +1 -0
  54. package/dist/runtime.js.map +1 -1
  55. package/dist/scanner.js +14 -15
  56. package/dist/scanner.js.map +1 -1
  57. package/dist/scanner.mjs +3 -1
  58. package/dist/scanner.mjs.map +1 -1
  59. package/dist/shared.d.mts +0 -12
  60. package/dist/shared.d.ts +0 -12
  61. package/dist/shared.js +64 -30
  62. package/dist/shared.js.map +1 -1
  63. package/dist/shared.mjs +55 -15
  64. package/dist/shared.mjs.map +1 -1
  65. package/dist/storybook-addon.js +1 -0
  66. package/dist/storybook-addon.js.map +1 -1
  67. package/dist/svelte.js +15 -9
  68. package/dist/svelte.js.map +1 -1
  69. package/dist/svelte.mjs +12 -4
  70. package/dist/svelte.mjs.map +1 -1
  71. package/dist/syntax.js +3 -3
  72. package/dist/syntax.js.map +1 -1
  73. package/dist/testing.js +1 -0
  74. package/dist/testing.js.map +1 -1
  75. package/dist/theme.js +8 -7
  76. package/dist/theme.js.map +1 -1
  77. package/dist/theme.mjs +3 -1
  78. package/dist/theme.mjs.map +1 -1
  79. package/dist/turbopackLoader.js +23 -18
  80. package/dist/turbopackLoader.js.map +1 -1
  81. package/dist/turbopackLoader.mjs +15 -5
  82. package/dist/turbopackLoader.mjs.map +1 -1
  83. package/dist/tw.js +45 -95
  84. package/dist/tw.js.map +1 -1
  85. package/dist/tw.mjs +42 -13
  86. package/dist/tw.mjs.map +1 -1
  87. package/dist/vite.js +80 -51
  88. package/dist/vite.js.map +1 -1
  89. package/dist/vite.mjs +55 -15
  90. package/dist/vite.mjs.map +1 -1
  91. package/dist/vue.js +15 -9
  92. package/dist/vue.js.map +1 -1
  93. package/dist/vue.mjs +12 -4
  94. package/dist/vue.mjs.map +1 -1
  95. package/dist/webpackLoader.js +15 -12
  96. package/dist/webpackLoader.js.map +1 -1
  97. package/dist/webpackLoader.mjs +9 -3
  98. package/dist/webpackLoader.mjs.map +1 -1
  99. package/native/tailwind-styled-native.linux-x64-gnu.node +0 -0
  100. package/native/tailwind-styled-native.node +0 -0
  101. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1,3 +1,4 @@
1
+ const __importMetaUrl = typeof __filename !== "undefined" ? require("node:url").pathToFileURL(__filename).href : "file://unknown";
1
2
  /* tailwind-styled-v4 v5.0.4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
2
3
  "use strict";
3
4
  var __create = Object.create;
@@ -3104,60 +3105,15 @@ var init_errors = __esm({
3104
3105
  }
3105
3106
  });
3106
3107
 
3107
- // packages/domain/shared/src/esmHelpers.ts
3108
- function getNodeModuleRef() {
3109
- if (isBrowser) return null;
3110
- if (nodeModuleRef !== null) return nodeModuleRef;
3111
- try {
3112
- const test = typeof require === "function" ? require("module") : null;
3113
- nodeModuleRef = test;
3114
- return test;
3115
- } catch {
3116
- nodeModuleRef = null;
3117
- return null;
3118
- }
3119
- }
3120
- function getNodePath() {
3121
- if (isBrowser) throw new Error("node:path not available in browser");
3122
- const nodeRequire = getNodeModuleRef();
3123
- if (!nodeRequire) throw new Error("require not available");
3124
- if (!_nodePath) _nodePath = nodeRequire.createRequire(import_meta.url)("node:path");
3125
- return _nodePath;
3126
- }
3127
- function getNodeUrl() {
3128
- if (isBrowser) throw new Error("node:url not available in browser");
3129
- const nodeRequire = getNodeModuleRef();
3130
- if (!nodeRequire) throw new Error("require not available");
3131
- if (!_nodeUrl) _nodeUrl = nodeRequire.createRequire(import_meta.url)("node:url");
3132
- return _nodeUrl;
3133
- }
3134
- function getDirname(importMetaUrl) {
3135
- if (isBrowser) return "";
3136
- const nodePath = getNodePath();
3137
- const nodeUrl = getNodeUrl();
3138
- return nodePath.dirname(nodeUrl.fileURLToPath(importMetaUrl));
3139
- }
3140
- var import_meta, isBrowser, nodeModuleRef, _nodePath, _nodeUrl;
3141
- var init_esmHelpers = __esm({
3142
- "packages/domain/shared/src/esmHelpers.ts"() {
3143
- "use strict";
3144
- import_meta = {};
3145
- isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
3146
- nodeModuleRef = null;
3147
- _nodePath = null;
3148
- _nodeUrl = null;
3149
- }
3150
- });
3151
-
3152
3108
  // packages/domain/shared/src/native-resolution.ts
3153
3109
  function platformKey() {
3154
- if (isBrowser2) return "browser";
3110
+ if (isBrowser) return "browser";
3155
3111
  return `${process.platform}-${process.arch}`;
3156
3112
  }
3157
3113
  function resolveNativeBinary(runtimeDir) {
3158
3114
  const platform = platformKey();
3159
3115
  const tried = [];
3160
- if (isBrowser2) {
3116
+ if (isBrowser) {
3161
3117
  return { path: null, source: "not-found", platform, tried: ["not available in browser"] };
3162
3118
  }
3163
3119
  if (process.env.TWS_NO_NATIVE === "1" || process.env.TWS_DISABLE_NATIVE === "1") {
@@ -3231,16 +3187,17 @@ function resolveNativeBinary(runtimeDir) {
3231
3187
  }
3232
3188
  return { path: null, source: "not-found", platform, tried };
3233
3189
  }
3234
- var import_node_module, fs, path, import_meta2, isBrowser2, _require, PLATFORM_MAP;
3190
+ var import_node_module, fs, path, isBrowser, _require, PLATFORM_MAP;
3235
3191
  var init_native_resolution = __esm({
3236
3192
  "packages/domain/shared/src/native-resolution.ts"() {
3237
3193
  "use strict";
3238
3194
  import_node_module = require("module");
3239
3195
  fs = __toESM(require("fs"));
3240
3196
  path = __toESM(require("path"));
3241
- import_meta2 = {};
3242
- isBrowser2 = typeof window !== "undefined" || typeof document !== "undefined";
3243
- _require = typeof require !== "undefined" ? require : (0, import_node_module.createRequire)(import_meta2.url);
3197
+ isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
3198
+ _require = (0, import_node_module.createRequire)(
3199
+ typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : __importMetaUrl
3200
+ );
3244
3201
  PLATFORM_MAP = {
3245
3202
  "linux-x64": ["@tailwind-styled/native-linux-x64-gnu", "@tailwind-styled/native-linux-x64"],
3246
3203
  "linux-arm64": ["@tailwind-styled/native-linux-arm64-gnu", "@tailwind-styled/native-linux-arm64"],
@@ -3360,7 +3317,7 @@ function resolveRuntimeDir(dir, importMetaUrl) {
3360
3317
  return process.cwd();
3361
3318
  }
3362
3319
  }
3363
- var import_node_crypto, import_node_fs, import_node_path, import_node_url, import_node_module2, import_meta3, TwError, _require2;
3320
+ var import_node_crypto, import_node_fs, import_node_path, import_node_url, import_node_module2, TwError, _require2;
3364
3321
  var init_src = __esm({
3365
3322
  "packages/domain/shared/src/index.ts"() {
3366
3323
  "use strict";
@@ -3369,9 +3326,7 @@ var init_src = __esm({
3369
3326
  import_node_path = __toESM(require("path"));
3370
3327
  import_node_url = require("url");
3371
3328
  import_node_module2 = require("module");
3372
- init_esmHelpers();
3373
3329
  init_native_resolution();
3374
- import_meta3 = {};
3375
3330
  TwError = class _TwError extends Error {
3376
3331
  /** @deprecated Gunakan source */
3377
3332
  domain;
@@ -3424,7 +3379,9 @@ var init_src = __esm({
3424
3379
  return `[${this.source.toUpperCase()}:${this.code}] ${this.message}`;
3425
3380
  }
3426
3381
  };
3427
- _require2 = (0, import_node_module2.createRequire)(import_meta3.url);
3382
+ _require2 = (0, import_node_module2.createRequire)(
3383
+ typeof __filename !== "undefined" ? `file://${__filename}` : __importMetaUrl ?? "file://unknown"
3384
+ );
3428
3385
  }
3429
3386
  });
3430
3387
 
@@ -3457,12 +3414,12 @@ __export(native_bridge_exports, {
3457
3414
  startWatchNative: () => startWatchNative,
3458
3415
  stopWatchNative: () => stopWatchNative
3459
3416
  });
3460
- function getDirname2() {
3417
+ function getDirname() {
3461
3418
  if (typeof __dirname !== "undefined") {
3462
3419
  return __dirname;
3463
3420
  }
3464
- if (typeof import_meta4 !== "undefined" && import_meta4.url) {
3465
- return import_node_path2.default.dirname((0, import_node_url2.fileURLToPath)(import_meta4.url));
3421
+ if (false) {
3422
+ return path3.dirname(fileURLToPath2(__importMetaUrl));
3466
3423
  }
3467
3424
  return process.cwd();
3468
3425
  }
@@ -3667,14 +3624,13 @@ function hasNativeWatchBinding() {
3667
3624
  return false;
3668
3625
  }
3669
3626
  }
3670
- var import_node_path2, import_node_url2, import_meta4, log, isValidScannerBinding, createScannerBridgeLoader, scannerBridgeLoader, scannerGetBinding, resetScannerBridgeCache;
3627
+ var import_node_path2, import_node_url2, log, isValidScannerBinding, createScannerBridgeLoader, scannerBridgeLoader, scannerGetBinding, resetScannerBridgeCache;
3671
3628
  var init_native_bridge = __esm({
3672
3629
  "packages/domain/scanner/src/native-bridge.ts"() {
3673
3630
  "use strict";
3674
- import_node_path2 = __toESM(require("path"), 1);
3631
+ import_node_path2 = require("path");
3675
3632
  import_node_url2 = require("url");
3676
3633
  init_src();
3677
- import_meta4 = {};
3678
3634
  log = createDebugLogger("scanner:native");
3679
3635
  isValidScannerBinding = (module2) => {
3680
3636
  const candidate = module2;
@@ -3716,7 +3672,7 @@ var init_native_bridge = __esm({
3716
3672
  }
3717
3673
  return throwNativeBindingError();
3718
3674
  }
3719
- const runtimeDir = getDirname2();
3675
+ const runtimeDir = getDirname();
3720
3676
  const candidates = resolveNativeBindingCandidates({
3721
3677
  runtimeDir,
3722
3678
  includeDefaultCandidates: true
@@ -3864,7 +3820,7 @@ async function scanWorkspaceParallel(rootDir, options = {}) {
3864
3820
  }
3865
3821
  return mergeResults(allResults);
3866
3822
  }
3867
- var import_node_worker_threads, import_node_path4, import_node_os, import_node_url3, import_meta5, PARALLEL_THRESHOLD, DEFAULT_CHUNK_SIZE, _workerFilename;
3823
+ var import_node_worker_threads, import_node_path4, import_node_os, import_node_url3, PARALLEL_THRESHOLD, DEFAULT_CHUNK_SIZE, _workerFilename;
3868
3824
  var init_parallel_scanner = __esm({
3869
3825
  "packages/domain/scanner/src/parallel-scanner.ts"() {
3870
3826
  "use strict";
@@ -3874,7 +3830,6 @@ var init_parallel_scanner = __esm({
3874
3830
  import_node_url3 = require("url");
3875
3831
  init_src2();
3876
3832
  init_native_bridge();
3877
- import_meta5 = {};
3878
3833
  PARALLEL_THRESHOLD = 50;
3879
3834
  DEFAULT_CHUNK_SIZE = 150;
3880
3835
  if (!import_node_worker_threads.isMainThread && import_node_worker_threads.parentPort) {
@@ -3891,7 +3846,7 @@ var init_parallel_scanner = __esm({
3891
3846
  import_node_worker_threads.parentPort.postMessage(msg);
3892
3847
  }
3893
3848
  }
3894
- _workerFilename = typeof __filename !== "undefined" ? __filename : (0, import_node_url3.fileURLToPath)(import_meta5.url);
3849
+ _workerFilename = typeof __filename !== "undefined" ? __filename : (0, import_node_url3.fileURLToPath)(__importMetaUrl);
3895
3850
  }
3896
3851
  });
3897
3852
 
@@ -3983,8 +3938,8 @@ function getRuntimeDir() {
3983
3938
  if (typeof __dirname !== "undefined" && __dirname.length > 0) {
3984
3939
  return __dirname;
3985
3940
  }
3986
- if (typeof import_meta6 !== "undefined" && import_meta6.url) {
3987
- return import_node_path5.default.dirname((0, import_node_url4.fileURLToPath)(import_meta6.url));
3941
+ if (false) {
3942
+ return import_node_path5.default.dirname(fileURLToPath4(__importMetaUrl));
3988
3943
  }
3989
3944
  return process.cwd();
3990
3945
  }
@@ -3993,8 +3948,8 @@ function resolveScannerWorkerModulePath() {
3993
3948
  if (typeof __dirname !== "undefined" && __dirname.length > 0) {
3994
3949
  return __dirname;
3995
3950
  }
3996
- if (typeof import_meta6 !== "undefined" && import_meta6.url) {
3997
- return import_node_path5.default.dirname((0, import_node_url4.fileURLToPath)(import_meta6.url));
3951
+ if (false) {
3952
+ return import_node_path5.default.dirname(fileURLToPath4(__importMetaUrl));
3998
3953
  }
3999
3954
  return process.cwd();
4000
3955
  })();
@@ -4267,7 +4222,7 @@ async function scanWorkspaceAsync(rootDir, options = {}) {
4267
4222
  return scanWorkspace(rootDir, normalizedOptions);
4268
4223
  }
4269
4224
  }
4270
- var import_node_fs3, import_node_module3, import_node_path5, import_node_url4, import_node_worker_threads2, import_meta6, log2, SCAN_WORKER_TIMEOUT_MS, createNativeParserLoader, nativeParserLoader, DEFAULT_EXTENSIONS, DEFAULT_IGNORES;
4225
+ var import_node_fs3, import_node_module3, import_node_path5, import_node_url4, import_node_worker_threads2, log2, SCAN_WORKER_TIMEOUT_MS, createNativeParserLoader, nativeParserLoader, DEFAULT_EXTENSIONS, DEFAULT_IGNORES;
4271
4226
  var init_src2 = __esm({
4272
4227
  "packages/domain/scanner/src/index.ts"() {
4273
4228
  "use strict";
@@ -4283,7 +4238,6 @@ var init_src2 = __esm({
4283
4238
  init_schemas();
4284
4239
  init_schemas();
4285
4240
  init_native_bridge();
4286
- import_meta6 = {};
4287
4241
  log2 = createLogger("scanner");
4288
4242
  SCAN_WORKER_TIMEOUT_MS = 12e4;
4289
4243
  createNativeParserLoader = () => {
@@ -4417,7 +4371,7 @@ async function requireNativeBinding() {
4417
4371
  if (binding?.analyzeClasses) return binding;
4418
4372
  const runtimeDir = resolveRuntimeDir(
4419
4373
  typeof __dirname === "string" ? __dirname : void 0,
4420
- import_meta7.url
4374
+ __importMetaUrl
4421
4375
  );
4422
4376
  const candidates = resolveNativeBindingCandidates({
4423
4377
  runtimeDir,
@@ -4447,13 +4401,12 @@ async function requireNativeCssCompiler() {
4447
4401
  if (typeof binding.compileCss === "function") return binding;
4448
4402
  throw new Error(`Native analyzer compileCss binding is missing.`);
4449
4403
  }
4450
- var import_meta7, isAnalyzerModule, createAnalyzerBindingLoader, analyzerBindingLoader;
4404
+ var isAnalyzerModule, createAnalyzerBindingLoader, analyzerBindingLoader;
4451
4405
  var init_binding = __esm({
4452
4406
  "packages/domain/analyzer/src/binding.ts"() {
4453
4407
  "use strict";
4454
4408
  init_src();
4455
4409
  init_utils();
4456
- import_meta7 = {};
4457
4410
  isAnalyzerModule = (module2) => {
4458
4411
  const candidate = module2;
4459
4412
  return typeof candidate?.analyzeClasses === "function" || typeof candidate?.analyzeClassesWorkspace === "function";
@@ -4465,7 +4418,7 @@ var init_binding = __esm({
4465
4418
  _state.bindingPromise = (async () => {
4466
4419
  const runtimeDir = resolveRuntimeDir(
4467
4420
  typeof __dirname === "string" ? __dirname : void 0,
4468
- import_meta7.url
4421
+ __importMetaUrl
4469
4422
  );
4470
4423
  const candidates = resolveNativeBindingCandidates({
4471
4424
  runtimeDir,
@@ -6094,12 +6047,12 @@ function buildCreateProgram(context) {
6094
6047
  async function main(rawArgs = process.argv.slice(2)) {
6095
6048
  await runCliMain({
6096
6049
  argv: [process.execPath, "create-tailwind-styled", ...rawArgs],
6097
- importMetaUrl: import_meta8.url,
6050
+ importMetaUrl: false ? __importMetaUrl : `file://${process.argv[1] ?? "unknown"}`,
6098
6051
  commandHint: "create",
6099
6052
  buildProgram: buildCreateProgram
6100
6053
  });
6101
6054
  }
6102
- var import_node_path19, import_prompts4, import_meta8, TEMPLATE_NAMES, TEMPLATES;
6055
+ var import_node_path19, import_prompts4, TEMPLATE_NAMES, TEMPLATES;
6103
6056
  var init_createApp = __esm({
6104
6057
  "packages/infrastructure/cli/src/createApp.ts"() {
6105
6058
  "use strict";
@@ -6109,7 +6062,6 @@ var init_createApp = __esm({
6109
6062
  init_errors();
6110
6063
  init_fs();
6111
6064
  init_runtime();
6112
- import_meta8 = {};
6113
6065
  TEMPLATE_NAMES = ["next-app", "vite-react", "vite-vue", "vite-svelte", "simple"];
6114
6066
  TEMPLATES = {
6115
6067
  "next-app": createNextApp,
@@ -6122,12 +6074,11 @@ var init_createApp = __esm({
6122
6074
  });
6123
6075
 
6124
6076
  // packages/domain/compiler/src/nativeBridge.ts
6125
- var import_meta9, _loadNative, log3, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttempted, bridgeLoadError, isValidNativeBridge, getNativeBridge;
6077
+ var _loadNative, log3, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttempted, bridgeLoadError, isValidNativeBridge, getNativeBridge;
6126
6078
  var init_nativeBridge = __esm({
6127
6079
  "packages/domain/compiler/src/nativeBridge.ts"() {
6128
6080
  "use strict";
6129
6081
  init_src();
6130
- import_meta9 = {};
6131
6082
  _loadNative = (path30) => require(path30);
6132
6083
  log3 = (...args) => {
6133
6084
  if (process.env.DEBUG?.includes("compiler:native")) {
@@ -6154,7 +6105,7 @@ var init_nativeBridge = __esm({
6154
6105
  }
6155
6106
  bridgeLoadAttempted = true;
6156
6107
  try {
6157
- const runtimeDir = resolveRuntimeDir(void 0, import_meta9.url);
6108
+ const runtimeDir = resolveRuntimeDir(void 0, __importMetaUrl);
6158
6109
  const result = resolveNativeBinary(runtimeDir);
6159
6110
  if (result.path && result.path.endsWith(".node")) {
6160
6111
  try {
@@ -6265,7 +6216,7 @@ var init_watch = __esm({
6265
6216
  });
6266
6217
 
6267
6218
  // packages/domain/compiler/src/index.ts
6268
- var import_node_fs9, import_node_path24, import_node_module4, import_meta10, _require3, compileCssFromClasses;
6219
+ var import_node_fs9, import_node_path24, import_node_module4, _require3, compileCssFromClasses;
6269
6220
  var init_src4 = __esm({
6270
6221
  "packages/domain/compiler/src/index.ts"() {
6271
6222
  "use strict";
@@ -6279,8 +6230,9 @@ var init_src4 = __esm({
6279
6230
  init_cache();
6280
6231
  init_redis();
6281
6232
  init_watch();
6282
- import_meta10 = {};
6283
- _require3 = (0, import_node_module4.createRequire)(import_meta10.url);
6233
+ _require3 = (0, import_node_module4.createRequire)(
6234
+ typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : __importMetaUrl
6235
+ );
6284
6236
  compileCssFromClasses = (classes, prefix) => {
6285
6237
  const native = getNativeBridge();
6286
6238
  if (!native?.transformSource) {
@@ -8939,7 +8891,6 @@ init_errors();
8939
8891
  init_fs();
8940
8892
  init_json();
8941
8893
  init_src4();
8942
- var import_meta11 = {};
8943
8894
  var DEFAULT_TAILWIND_CSS2 = '@import "tailwindcss";\n';
8944
8895
  var DEFAULT_TW_CONFIG = `${JSON.stringify(
8945
8896
  {
@@ -9250,7 +9201,8 @@ async function runPreflightCli(rawArgs) {
9250
9201
  function isDirectExecution() {
9251
9202
  const scriptPath = process.argv[1];
9252
9203
  if (!scriptPath) return false;
9253
- return import_meta11.url === (0, import_node_url7.pathToFileURL)(scriptPath).href;
9204
+ const currentUrl = false ? __importMetaUrl : `file://${scriptPath}`;
9205
+ return currentUrl === (0, import_node_url7.pathToFileURL)(scriptPath).href;
9254
9206
  }
9255
9207
  if (isDirectExecution()) {
9256
9208
  runPreflightCli(process.argv.slice(2)).catch((error) => {
@@ -9671,12 +9623,11 @@ init_internal();
9671
9623
 
9672
9624
  // packages/domain/engine/src/native-bridge.ts
9673
9625
  init_src();
9674
- var import_meta12 = {};
9675
9626
  var log4 = createDebugLogger("engine:native");
9676
- function getDirname3() {
9627
+ function getDirname2() {
9677
9628
  if (typeof __dirname !== "undefined") return __dirname;
9678
- if (typeof import_meta12 !== "undefined" && import_meta12.url) {
9679
- return getDirname(import_meta12.url);
9629
+ if (false) {
9630
+ return getEsmDirname(__importMetaUrl);
9680
9631
  }
9681
9632
  return process.cwd();
9682
9633
  }
@@ -9720,7 +9671,7 @@ var createEngineBindingLoader = () => {
9720
9671
  }
9721
9672
  return cached;
9722
9673
  }
9723
- const runtimeDir = getDirname3();
9674
+ const runtimeDir = getDirname2();
9724
9675
  const candidates = resolveNativeBindingCandidates({
9725
9676
  runtimeDir,
9726
9677
  includeDefaultCandidates: true
@@ -11644,15 +11595,14 @@ init_runtime();
11644
11595
  init_args();
11645
11596
  init_args();
11646
11597
  init_output();
11647
- var import_meta13 = {};
11648
11598
  async function main2() {
11649
11599
  await runCliMain({
11650
- importMetaUrl: import_meta13.url,
11600
+ importMetaUrl: __importMetaUrl,
11651
11601
  buildProgram: buildMainProgram
11652
11602
  });
11653
11603
  }
11654
- var __filename2 = (0, import_node_url8.fileURLToPath)(import_meta13.url);
11655
- if (process.argv[1] === __filename2) {
11604
+ var __currentFile = (0, import_node_url8.fileURLToPath)(__importMetaUrl);
11605
+ if (process.argv[1] === __currentFile) {
11656
11606
  main2();
11657
11607
  }
11658
11608
  // Annotate the CommonJS export names for ESM import in node: