Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

feat: get Filecoin.ClientRetrieve to actually save a file and update IPFS #791

Merged
merged 22 commits into from Mar 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a74c4d0
get Filecoin.ClientRetrieve to actually save a file
mikeseese Jan 13, 2021
c1d3fe6
save to disk in chunks rather than loading the whole file into heap
mikeseese Jan 16, 2021
2c8b097
update ipfs server to have a more generic options setup
mikeseese Jan 15, 2021
21bf9e7
only run filecoin tests on node v12+
mikeseese Jan 23, 2021
8ff7a56
get tests to work
mikeseese Jan 23, 2021
bf113eb
update ClientRetrieve test to check downloaded content
mikeseese Jan 25, 2021
a33aea0
add api docs link for FileRef
mikeseese Jan 25, 2021
a2cb6b9
get tests to run after rebase
mikeseese Jan 29, 2021
53702e1
support strictNullCheck and noImplicitAny
mikeseese Jan 29, 2021
597b17e
make sure we run test.filecoin (issue with rebase)
mikeseese Feb 4, 2021
339f2ee
update type declarations
mikeseese Feb 4, 2021
32808cf
remove type C from filecoin things
mikeseese Feb 5, 2021
c502fd3
update type declarations
mikeseese Feb 5, 2021
771d476
check for not node versions 10/11 vs for 12+
mikeseese Feb 22, 2021
cdb1df1
only fetch object size if it wasn't provided in proposal
mikeseese Feb 22, 2021
d08baa5
address code review concerns for during client retrieve for large files
mikeseese Feb 22, 2021
95fee05
change filecoin scripts to not run if node12 req not met
mikeseese Feb 24, 2021
701fb84
add a `finally` block to ensure we close the file writestream
mikeseese Feb 24, 2021
728d701
set engine-strict=false to allow installing filecoin in dev env
mikeseese Feb 24, 2021
bdb2e13
remove test.filecoin from github workflows
mikeseese Feb 24, 2021
9ac3a61
rename skip script
mikeseese Feb 24, 2021
3e3ce66
update usage comment with new filename
mikeseese Feb 24, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .npmrc
@@ -1,4 +1,4 @@
engine-strict=true
engine-strict=false
save-exact=true
sign-git-commit=true
sign-git-tag=true
Expand Down
23 changes: 23 additions & 0 deletions scripts/skip-if-less-than-node-12.ts
@@ -0,0 +1,23 @@
// To use this script, run `ts-node path/to/skip-if-less-than-node-12.ts || <command>`
// This script will "succeed" if less than node@12, causing <command> to not execute
// but also make look like the overall command was successful

const majorVersionStringMatch = /^v([0-9]+)\./.exec(process.version);

if (!majorVersionStringMatch || majorVersionStringMatch.length < 2) {
console.error(
"ERROR: Could not parse process.version for some reason. This shouldn't happen."
);
process.exit(0); // we exit with code 0 to prevent further scripts from running
}

const majorVersion = parseInt(majorVersionStringMatch[1], 10);

if (majorVersion < 12) {
console.log(
`Skipping following command as the NodeJS version is ${majorVersion}, and it needs to be at least 12 to continue.`
);
process.exit(0);
} else {
process.exit(1);
}