[GH-ISSUE #797] Script export includes all imported datafiles, not just the ones required by the scripts being exported. #792

Open
opened 2026-03-03 19:21:56 +03:00 by kerem · 2 comments
Owner

Originally created by @mprice-banno on GitHub (Feb 20, 2021).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/797

Originally assigned to: @NghiaTranUIT on GitHub.

Proxyman version? (Ex. Proxyman 1.4.3)

2.17

macOS Version? (Ex. mac 10.14)

10.15.6

Notes

If you have imported files into various scripts, and then are exporting a script to share, the exported config file includes all the data files you have ever imported. Although this does match the "Export Scripts and All Imported Files" This leads to two issues, potentially very large exported config files, and sharing files that you didn't intend or want to.

I would expect that only the data files that are references via a require() would be exported. So for example, if I am exporting two scripts, and each script references a unique data file, only those two data files would be included in the export.

Another option is to have the user decide which data files they want to include in the export, although doing it automatically based on the require() would be ideal.

This is probably more of a feature request than a bug, although I think people wouldn't expect all the data files to be exported.

Steps to reproduce

  • Add several scripts and require (import) a different data file into each script.
  • Select one, or two, scripts for export and select "Export Scripts and All Imported Files"

Unzip and look at the exported config file, and you'll see that all the imported files have been included,

Expected behavior

Only the ones referenced by the exported scripts should be in the config file.

Screenshots (optional)

Screen Shot 2021-02-19 at 5 45 15 PM

Originally created by @mprice-banno on GitHub (Feb 20, 2021). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/797 Originally assigned to: @NghiaTranUIT on GitHub. ### Proxyman version? (Ex. Proxyman 1.4.3) 2.17 ### macOS Version? (Ex. mac 10.14) 10.15.6 ### Notes If you have imported files into various scripts, and then are exporting a script to share, the exported config file includes **all** the data files you have ever imported. Although this does match the "Export Scripts and All Imported Files" This leads to two issues, potentially very large exported config files, and sharing files that you didn't intend or want to. I would expect that only the data files that are references via a `require()` would be exported. So for example, if I am exporting two scripts, and each script references a unique data file, only those two data files would be included in the export. Another option is to have the user decide which data files they want to include in the export, although doing it automatically based on the `require()` would be ideal. This is probably more of a feature request than a bug, although I think people wouldn't expect all the data files to be exported. ### Steps to reproduce * Add several scripts and require (import) a different data file into each script. * Select one, or two, scripts for export and select "Export Scripts and All Imported Files" Unzip and look at the exported config file, and you'll see that all the imported files have been included, ### Expected behavior Only the ones referenced by the exported scripts should be in the config file. ### Screenshots (optional) ![Screen Shot 2021-02-19 at 5 45 15 PM](https://user-images.githubusercontent.com/58708906/108579144-723d7780-72da-11eb-8351-939919db6dab.png)
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 20, 2021):

Thanks for opening the ticket @mprice-banno 👍

It's the first limitation of the Export/Import Script Rules that we're facing.

I would like to share the road map of the Export/Import Scripting Rules:

  • v1: Able to export/import all rules and includes all imported files (We've done)
  • v2: Proxyman should only export the file, which is used by require() of each scripting file. It's what we expect 😄

I will allocate resource to implement the v2 soon 🌮

<!-- gh-comment-id:782570835 --> @NghiaTranUIT commented on GitHub (Feb 20, 2021): Thanks for opening the ticket @mprice-banno 👍 It's the first limitation of the Export/Import Script Rules that we're facing. I would like to share the road map of the Export/Import Scripting Rules: - v1: Able to export/import all rules and includes all imported files (We've done) - v2: Proxyman should only export the file, which is used by `require()` of each scripting file. It's what we expect 😄 I will allocate resource to implement the v2 soon 🌮
Author
Owner

@mprice-banno commented on GitHub (Feb 22, 2021):

👍 Thanks @NghiaTranUIT you are doing a fantastic job with this tool!

<!-- gh-comment-id:783508875 --> @mprice-banno commented on GitHub (Feb 22, 2021): 👍 Thanks @NghiaTranUIT you are doing a fantastic job with this tool!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#792
No description provided.