laradumps-js 0.1.9 → 0.2.0

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/index.js CHANGED
@@ -17,12 +17,18 @@ export function sleep(ms) {
17
17
  export function configure({
18
18
  port = 9191,
19
19
  host = '127.0.0.1',
20
- autoInvoke = false,
20
+ auto_invoke_app = false,
21
+ workdir = '',
22
+ wsl_config = '',
23
+ application_path = '',
21
24
  }) {
22
- let server = `http://${host}:${port}`;
23
-
24
- globalThis.CONFIG_LARADUMPS.host = server;
25
- globalThis.CONFIG_LARADUMPS.autoInvokeApp = autoInvoke;
25
+ globalThis.CONFIG_LARADUMPS = {
26
+ host: `http://${host}:${port}`,
27
+ auto_invoke_app: auto_invoke_app,
28
+ workdir,
29
+ wsl_config,
30
+ application_path,
31
+ }
26
32
  }
27
33
 
28
34
  globalThis.ds = ds;
@@ -31,10 +37,14 @@ globalThis._sleep = sleep;
31
37
 
32
38
  globalThis.CONFIG_LARADUMPS = {
33
39
  host: 'http://127.0.0.1:9191',
34
- autoInvokeApp: false
40
+ auto_invoke_app: false,
41
+ workdir: '/var/www/html',
42
+ wsl_config: 'wsl+Ubuntu/',
43
+ application_path: '',
35
44
  };
36
45
 
37
46
  import LaraDumps from "./src/LaraDumps";
47
+
38
48
  export default LaraDumps;
39
49
 
40
50
  globalThis.LaraDumps = LaraDumps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "laradumps-js",
3
- "version": "0.1.9",
3
+ "version": "0.2.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "repository": {
package/src/LaraDumps.ts CHANGED
@@ -88,16 +88,16 @@ const LaraDumps: _LaraDumps = {
88
88
  axios.post(this.server, {
89
89
  id: this.instanceId,
90
90
  request_id: this.requestId,
91
- meta:{
92
- laradumps_version: "2.0.2.0",
93
- auto_invoke_app: globalThis.CONFIG_LARADUMPS?.autoInvokeApp
94
- },
91
+ application_path: globalThis.CONFIG_LARADUMPS?.application_path ?? "",
92
+ auto_invoke_app: globalThis.CONFIG_LARADUMPS?.auto_invoke_app,
95
93
  ide_handle: {
96
94
  separator: "/",
97
95
  line: trace?.line,
98
- real_path: url?.pathname ?? "terminal",
99
- class_name: url?.pathname.split('/').pop() ?? "terminal",
100
- project_path: url?.pathname.split('/').slice(0, -1).join('/') ?? "terminal",
96
+ real_path: url?.pathname ?? "Browser",
97
+ class_name: url?.pathname.split('/').pop() ?? "Browser",
98
+ project_path: url?.pathname.split('/').slice(0, -1).join('/') ?? "Browser",
99
+ workdir: globalThis.CONFIG_LARADUMPS?.workdir,
100
+ wsl_config: globalThis.CONFIG_LARADUMPS?.wsl_config,
101
101
  },
102
102
  type: type,
103
103
  with_label: {
@@ -108,6 +108,8 @@ const LaraDumps: _LaraDumps = {
108
108
  raise_in: 0,
109
109
  new_window: false,
110
110
  },
111
+ extra: {},
112
+ code_snippet: '',
111
113
  ...data
112
114
  }).catch((error) => {
113
115
  console.error("Error:", error);