@umijs/plugin-run 4.0.41 → 4.0.43

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/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { IApi } from 'umi';
2
1
  declare const _default: (api: IApi) => void;
3
2
  export default _default;
4
3
  export declare function getBinPath(): string;
package/dist/index.js CHANGED
@@ -16,7 +16,10 @@ var __copyProps = (to, from, except, desc) => {
16
16
  }
17
17
  return to;
18
18
  };
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));
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
+ mod
22
+ ));
20
23
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
24
 
22
25
  // src/index.ts
@@ -52,11 +55,25 @@ var src_default = (api) => {
52
55
  const absScriptFilePath = (0, import_path.join)(api.cwd, scriptFilePath);
53
56
  const fileName = getFileNameByPath(absScriptFilePath);
54
57
  (0, import_assert.default)(fileName, `${absScriptFilePath} is not a valid file`);
55
- (0, import_assert.default)(/\.([jt])s$/.test(fileName), `${fileName} is not a valid js or ts file`);
56
- const absTmpFilePath = (0, import_path.join)(api.paths.absNodeModulesPath, ".cache", "umi-plugin-run", fileName);
58
+ (0, import_assert.default)(
59
+ /\.([jt])s$/.test(fileName),
60
+ `${fileName} is not a valid js or ts file`
61
+ );
62
+ const absTmpFilePath = (0, import_path.join)(
63
+ api.paths.absNodeModulesPath,
64
+ ".cache",
65
+ "umi-plugin-run",
66
+ fileName
67
+ );
57
68
  import_plugin_utils.fsExtra.mkdirpSync((0, import_path.dirname)(absTmpFilePath));
58
- (0, import_fs.writeFileSync)(absTmpFilePath, `${globals.map((item) => `import '${item}'
59
- `)}import '${absScriptFilePath}';`, "utf-8");
69
+ (0, import_fs.writeFileSync)(
70
+ absTmpFilePath,
71
+ `${globals.map(
72
+ (item) => `import '${item}'
73
+ `
74
+ )}import '${absScriptFilePath}';`,
75
+ "utf-8"
76
+ );
60
77
  const tsxPath = getBinPath();
61
78
  (0, import_child_process.fork)(tsxPath, [absTmpFilePath, ...restArgs], { stdio: "inherit" });
62
79
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/plugin-run",
3
- "version": "4.0.41",
3
+ "version": "4.0.43",
4
4
  "description": "@umijs/plugin-run",
5
5
  "homepage": "https://github.com/umijs/umi/tree/master/packages/plugin-run#readme",
6
6
  "bugs": "https://github.com/umijs/umi/issues",
@@ -20,7 +20,7 @@
20
20
  "dev": "umi-scripts father dev"
21
21
  },
22
22
  "dependencies": {
23
- "tsx": "^3.12.1"
23
+ "tsx": "^3.12.2"
24
24
  },
25
25
  "publishConfig": {
26
26
  "access": "public"