@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
|
|
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,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(
|
|
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
|
},
|