@joystick.js/cli-canary 0.0.0-canary.637 → 0.0.0-canary.639

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 +1 @@
1
- import{dirname as r}from"path";import{fileURLToPath as e}from"url";const _=e(import.meta.url),i=r(_),o={__package:i?.replace("/dist/lib","/dist"),__filename:(t="")=>e(t),__dirname:(t="")=>{const a=e(t);return r(a)}};var p=o;export{p as default};
1
+ import{dirname as i}from"path";import{fileURLToPath as r}from"url";import a from"os";const _=r(import.meta.url),l=i(_),e=a.platform()==="win32",n={__package:l?.replace(e?"\\dist\\lib":"/dist/lib",e?"\\dist":"/dist"),__filename:(t="")=>r(t),__dirname:(t="")=>{const o=r(t);return i(o)}};var c=n;export{c as default};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@joystick.js/cli-canary",
3
3
  "type": "module",
4
- "version": "0.0.0-canary.637",
4
+ "version": "0.0.0-canary.639",
5
5
  "description": "The CLI for Joystick.",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
@@ -1,11 +1,16 @@
1
1
  import { dirname } from "path";
2
2
  import { fileURLToPath as file_url_to_path } from "url";
3
+ import os from 'os';
3
4
 
4
5
  const current_file_path = file_url_to_path(import.meta.url);
5
6
  const __package = dirname(current_file_path);
7
+ const is_windows = os.platform() === 'win32';
6
8
 
7
9
  const node_path_polyfills = {
8
- __package: __package?.replace('/dist/lib', '/dist'),
10
+ __package: __package?.replace(
11
+ is_windows ? '\\dist\\lib' : '/dist/lib',
12
+ is_windows ? '\\dist' : '/dist'
13
+ ),
9
14
  __filename: (url = '') => {
10
15
  return file_url_to_path(url);
11
16
  },