vite-plugin-debugger 0.0.4 → 0.0.5

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 (2) hide show
  1. package/dist/index.js +11 -5
  2. package/package.json +6 -4
package/dist/index.js CHANGED
@@ -1,8 +1,6 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
5
  var __export = (target, all) => {
8
6
  for (var name in all)
@@ -16,7 +14,6 @@ var __copyProps = (to, from, except, desc) => {
16
14
  }
17
15
  return to;
18
16
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
18
 
22
19
  // src/index.ts
@@ -25,7 +22,16 @@ __export(src_exports, {
25
22
  default: () => src_default
26
23
  });
27
24
  module.exports = __toCommonJS(src_exports);
28
- var import_slash = __toESM(require("slash"));
25
+
26
+ // node_modules/.pnpm/slash@4.0.0/node_modules/slash/index.js
27
+ function slash(path) {
28
+ const isExtendedLengthPath = /^\\\\\?\\/.test(path);
29
+ const hasNonAscii = /[^\u0000-\u0080]+/.test(path);
30
+ if (isExtendedLengthPath || hasNonAscii) {
31
+ return path;
32
+ }
33
+ return path.replace(/\\/g, "/");
34
+ }
29
35
 
30
36
  // src/helpers/index.ts
31
37
  var capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
@@ -173,7 +179,7 @@ var transformVConsoleImport = (code, opts) => {
173
179
  // src/index.ts
174
180
  var src_default = (options) => {
175
181
  const { eruda, vConsole, local, entry } = options;
176
- const entryPath = entry ? (Array.isArray(entry) ? entry : [entry]).map((path) => (0, import_slash.default)(path)) : [];
182
+ const entryPath = entry ? (Array.isArray(entry) ? entry : [entry]).map((path) => slash(path)) : [];
177
183
  if (eruda && vConsole) {
178
184
  throw new Error("[vite-plugin-debugger]: You'd better use only one debugger tool at a time.");
179
185
  }
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "vite-plugin-debugger",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "A vite plugin provide the debugger tools for mobile devices.",
5
5
  "author": "jade-gjz",
6
6
  "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/jaderd-jh/vite-plugin-debugger.git"
10
+ },
7
11
  "keywords": [
8
12
  "vite",
9
13
  "debugger",
@@ -30,15 +34,13 @@
30
34
  "optional": true
31
35
  }
32
36
  },
33
- "dependencies": {
34
- "slash": "^4.0.0"
35
- },
36
37
  "devDependencies": {
37
38
  "@jhqn/eslint-config-ts": "^0.0.30",
38
39
  "bumpp": "^8.2.1",
39
40
  "conventional-changelog-cli": "^2.2.2",
40
41
  "eruda": "https://github.com/liriliri/eruda.git",
41
42
  "eslint": "^8.19.0",
43
+ "slash": "^4.0.0",
42
44
  "tsup": "^6.1.3",
43
45
  "typescript": "^4.7.4",
44
46
  "vconsole": "^3.14.6",