You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do a big cleanup of code that was no longer used. First, we need to find all code that is still used, for that I search org:internxt from '@internxt/inxt-js in github. After that I found the following repos using it:
drive-desktop
drive-desktop-linux
cli
drive-server-wip
pc-cloud-old
drive-desktop-test
photos-server
pc-cloud
drive-server-old
For the relevant ones I search what imports are using from inxt-js:
// repo:internxt/drive-desktop-linux from '@internxt/inxt-jsimport{Environment}from'@internxt/inxt-js';import{GenerateFileKey}from'@internxt/inxt-js/build/lib/utils/crypto';import{UploadStrategyFunction}from'@internxt/inxt-js/build/lib/core';import{ActionState}from'@internxt/inxt-js/build/api';import{DownloadOneShardStrategy}from'@internxt/inxt-js/build/lib/core';import{DownloadStrategyFunction}from'@internxt/inxt-js/build/lib/core/download/strategy';// repo:internxt/cli from '@internxt/inxt-jsimport{Environment}from'@internxt/inxt-js';// this is not used in `inxt-js` so it can be removed from the cli (however I haven't deleted it yet)import{EncryptProgressCallback}from'@internxt/inxt-js/build/lib/core';// repo:internxt/drive-desktop from '@internxt/inxt-jsimport{Environment}from'@internxt/inxt-js';import{ActionState}from'@internxt/inxt-js/build/api';// repo:internxt/drive-server-wip from '@internxt/inxt-jsimport{Environment}from'@internxt/inxt-js';
So, everything that is not used in one of those 4 repos will be removed.
@dajimenezriv-internxt The CLI is for using it locally, as this project does not have a HTTP server to try it, thus, it is not used outside this project
My question is if someone is still using the cli (I didn't even know it existed) so it's worth to mantain? Because for example, right now the upload and uploadMultipart are broken when I changed the upload from callbacks to promises. Not because I wanted to break it, but since it wasn't included in the tsconfig.json I didn't know it was broken until now. So, should we mantain it? In my case, when I have to test something from the environment I call it from windows. However, if we want to allow it from inxt-js, maybe it's easier to just declare a cli.ts file that has commented the code to creating an environment and you just call the function you want to test and it's simpler to mantain.
Another thing, we can keep the cli and the other commands in the environment and I can include them in the tsconfig.json and create another tsconfig.build.json, so at least we know if something it's broken, because I was checking other tests that are called *.unit.ts and some of them are also broken. With that we don't lose any feature that we already had and we start knowing if somethings gets broken.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Do a big cleanup of code that was no longer used. First, we need to find all code that is still used, for that I search
org:internxt from '@internxt/inxt-jsin github. After that I found the following repos using it:For the relevant ones I search what imports are using from
inxt-js:So, everything that is not used in one of those 4 repos will be removed.
The only thing that I assumed is no longer in use (since it's a command from 4 years ago) it's the cli command: https://github.com/internxt/inxt-js/pull/127/changes#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L18. So I deleted everything inside the
clifolder.The other part that is a bit tricky is the functions inside the
Environment, so for that I used:repo:internxt/drive-desktop-linux OR repo:internxt/cli OR repo:internxt/drive-desktop OR repo:internxt/drive-server-wip WHATEVERI've also added
knipto track better which functions, constants and so were used in the code and created a github pipeline to check that.