Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev to master diff #235

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
9a17fb0
chore: install local build of turbo-sdk
Sep 8, 2023
93f8af5
feat: use turbo-sdk for uploading signed data items
Sep 8, 2023
31d4217
chore: use node-modules as nodeLinker vs. pnp
Sep 12, 2023
a5e5aa9
fix: use newest turbo-sdk alpha build
Sep 18, 2023
f995939
chore: update to newest release in alpha
Sep 18, 2023
1a4097b
chore: remove node_modules from rimraf
Sep 18, 2023
72ea081
fix: properly instanitate turbo, update dependencies
Sep 18, 2023
5b628d7
fix: use cjs export in new build, update deps.
Sep 18, 2023
7ac1455
fix: bump to newest build
Sep 18, 2023
e9b6c48
chore: add skipLibCheck to avoid type errors in down stream dependencies
Sep 19, 2023
d4c19c7
fix: bump turbo-sdk to most recent alpha version
Sep 19, 2023
02576c8
chore: revert tests back to parallel
Sep 19, 2023
b2cae32
chore: bump to newest alpha build of turbo-sdk
Sep 19, 2023
2c5d5c5
fix: update URL paths
dtfiedler Sep 19, 2023
e2f54fe
fix: allow optional turbo settings and provide defaults when not prov…
Sep 19, 2023
c40a443
chore: replace alpha with beta build
Sep 20, 2023
f02f34e
fix: bump turbo-sdk and add size factory
Sep 22, 2023
9d7b10b
chore: bump to most recent version of turbo
Sep 22, 2023
b7230bd
chore: bump turbo-sdk
Sep 25, 2023
3be0bcd
Merge pull request #223 from ardriveapp/PE-4472-use-turbo-sdk
dtfiedler Sep 25, 2023
1b37820
fix: a dep change got pulled in on last PR that should not have
Sep 25, 2023
f4c4e78
Merge pull request #225 from ardriveapp/dep-fix
dtfiedler Sep 26, 2023
4ae1f66
feat(turbo): update turbo package
Sep 27, 2023
87697c9
Merge pull request #226 from ardriveapp/upgrade-turbo
dtfiedler Sep 27, 2023
8c06063
feat(cache): use @ardrive/promise-cache instaed of third party cache
Oct 2, 2023
c1c6307
Merge pull request #224 from ardriveapp/PE-4646-promise-cache
dtfiedler Oct 2, 2023
841ca00
chore: update dependencies
Oct 2, 2023
8353ca4
fix(common): change Uint8ArrayToStr to BufferToString and set the req…
Oct 2, 2023
9edc73a
chore(tests): update error types thrown by sinon
Oct 3, 2023
edfcfed
chore: fix other error test and AR check
Oct 4, 2023
f23100a
Merge pull request #227 from ardriveapp/update-deps
dtfiedler Oct 10, 2023
1593eb0
Merge branch 'master' into reintegrate_main
fedellen Oct 30, 2023
0f93dbb
Merge pull request #229 from ardriveapp/reintegrate_main
fedellen Oct 31, 2023
c86ff75
Merge branch 'master' into PE-5005_reintegrate_main_to_dev
fedellen Nov 13, 2023
c6d553f
Merge pull request #231 from ardriveapp/PE-5005_reintegrate_main_to_dev
fedellen Nov 13, 2023
7864eba
Merge branch 'master' into PE-6152-reintgrate-dev
fedellen May 20, 2024
2b0b115
Merge pull request #239 from ardriveapp/PE-6152-reintgrate-dev
fedellen May 21, 2024
a9729df
Merge pull request #241 from ardriveapp/master
fedellen Jul 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19,798 changes: 0 additions & 19,798 deletions .pnp.cjs

This file was deleted.

2,047 changes: 0 additions & 2,047 deletions .pnp.loader.mjs

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .yarn/cache/fsevents-patch-21ad2b1333-8.zip
Binary file not shown.
Binary file removed .yarn/cache/fsevents-patch-2882183fbf-8.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/glob-npm-7.1.6-1ce3a5189a-351d549dd9.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/rxjs-npm-6.6.7-055046ea3c-bc334edef1.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
nodeLinker: pnp
nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
Expand Down
86 changes: 44 additions & 42 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,62 +9,64 @@
},
"dependencies": {
"@alexsasharegan/simple-cache": "^3.3.3",
"arbundles": "^0.6.19",
"arweave": "^1.11.4",
"axios": "^0.21.1",
"axios-retry": "^3.6.0",
"@ardrive/ardrive-promise-cache": "^1.1.4",
"@ardrive/turbo-sdk": "^1.0.1",
"arbundles": "^0.6.22",
"arweave": "^1.14.4",
"axios": "^1.5.1",
"axios-retry": "^3.8.0",
"base64-js": "^1.5.1",
"bignumber.js": "^9.0.1",
"bignumber.js": "^9.1.2",
"bn.js": "^5.2.1",
"futoin-hkdf": "^1.3.3",
"futoin-hkdf": "^1.5.3",
"human-crypto-keys": "git+https://github.com/ardriveapp/js-human-crypto-keys.git#expose_lib",
"jwk-to-pem": "^2.0.4",
"jwk-to-pem": "^2.0.5",
"lodash": "^4.17.21",
"mime-types": "^2.1.29",
"mime-types": "^2.1.35",
"regression": "^2.0.1",
"smartweave": "^0.4.49",
"utf8": "^3.0.0",
"uuid": "^8.3.2"
"uuid": "^9.0.1"
},
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@types/bn.js": "^5",
"@types/chai": "^4.2.15",
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@types/bn.js": "^5.1.2",
"@types/chai": "^4.3.6",
"@types/human-crypto-keys": "^0.1.2",
"@types/jwk-to-pem": "^2.0.0",
"@types/lodash": "^4",
"@types/mime-types": "^2.1.0",
"@types/mocha": "^8.2.1",
"@types/node": "^18.17.2",
"@types/node-fetch": "^2.6.1",
"@types/power-assert": "^1",
"@types/regression": "^2",
"@types/sinon": "^10.0.2",
"@types/source-map-support": "^0.5.3",
"@types/utf8": "^2.1.6",
"@types/uuid": "^8.3.0",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"chai": "^4.3.3",
"eslint": "^8.46.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-prettier": "latest",
"espower-typescript": "^10.0.0",
"husky": "^=6",
"lint-staged": "^11.0.0",
"mocha": "^8.3.1",
"@types/jwk-to-pem": "^2.0.1",
"@types/lodash": "^4.14.199",
"@types/mime-types": "^2.1.2",
"@types/mocha": "^10.0.2",
"@types/node": "^18.18.3",
"@types/node-fetch": "^2.6.6",
"@types/power-assert": "^1.5.9",
"@types/regression": "^2.0.3",
"@types/sinon": "^10.0.18",
"@types/source-map-support": "^0.5.8",
"@types/utf8": "^3.0.1",
"@types/uuid": "^9.0.4",
"@typescript-eslint/eslint-plugin": "^6.7.4",
"@typescript-eslint/parser": "^6.7.4",
"chai": "^4.3.10",
"eslint": "^8.50.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"espower-typescript": "^10.0.1",
"husky": "^8.0.3",
"lint-staged": "^14.0.1",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"power-assert": "^1.6.1",
"prettier": "^2.2.1",
"rimraf": "^3.0.2",
"sinon": "^11.1.1",
"source-map-support": "^0.5.19",
"ts-node": "^10.1.0",
"ts-sinon": "^2.0.1",
"typescript": "^5.1.6"
"prettier": "^3.0.3",
"rimraf": "^5.0.5",
"sinon": "^16.0.0",
"source-map-support": "^0.5.21",
"ts-node": "^10.9.1",
"ts-sinon": "^2.0.2",
"typescript": "^5.2.2"
},
"scripts": {
"clean": "rimraf [ lib .nyc_output node_modules coverage ]",
"clean": "rimraf [ lib .nyc_output coverage ]",
"format": "prettier --write \"src/**/*.ts\"",
"lint": "eslint . --ext .ts",
"lintfix": "eslint . --ext .ts --fix",
Expand Down
181 changes: 64 additions & 117 deletions src/ardrive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,18 +218,13 @@ export class ArDrive extends ArDriveAnonymous {
};

// Move file will create a new meta data tx with identical meta data except for a new parentFolderId
const {
dataTxId,
metaDataTxId,
dataCaches,
fastFinalityIndexes,
metaDataTxReward
} = await this.arFsDao.movePublicFile({
originalMetaData: originalFileMetaData,
transactionData: fileTransactionData,
newParentFolderId,
metaDataBaseReward: fileMetaDataBaseReward
});
const { dataTxId, metaDataTxId, dataCaches, fastFinalityIndexes, metaDataTxReward } =
await this.arFsDao.movePublicFile({
originalMetaData: originalFileMetaData,
transactionData: fileTransactionData,
newParentFolderId,
metaDataBaseReward: fileMetaDataBaseReward
});

const result: ArFSResult = {
created: [
Expand Down Expand Up @@ -300,19 +295,13 @@ export class ArDrive extends ArDriveAnonymous {
};

// Move file will create a new meta data tx with identical meta data except for a new parentFolderId
const {
dataTxId,
fileKey,
metaDataTxId,
dataCaches,
fastFinalityIndexes,
metaDataTxReward
} = await this.arFsDao.movePrivateFile({
originalMetaData: originalFileMetaData,
transactionData: fileTransactionData,
newParentFolderId,
metaDataBaseReward: fileMetaDataBaseReward
});
const { dataTxId, fileKey, metaDataTxId, dataCaches, fastFinalityIndexes, metaDataTxReward } =
await this.arFsDao.movePrivateFile({
originalMetaData: originalFileMetaData,
transactionData: fileTransactionData,
newParentFolderId,
metaDataBaseReward: fileMetaDataBaseReward
});

const result: ArFSResult = {
created: [
Expand Down Expand Up @@ -480,17 +469,13 @@ export class ArDrive extends ArDriveAnonymous {
};

// Move folder will create a new meta data tx with identical meta data except for a new parentFolderId
const {
metaDataTxId,
dataCaches,
fastFinalityIndexes,
metaDataTxReward
} = await this.arFsDao.movePrivateFolder({
originalMetaData: originalFolderMetaData,
transactionData: folderTransactionData,
newParentFolderId,
metaDataBaseReward: folderMetaDataBaseReward
});
const { metaDataTxId, dataCaches, fastFinalityIndexes, metaDataTxReward } =
await this.arFsDao.movePrivateFolder({
originalMetaData: originalFolderMetaData,
transactionData: folderTransactionData,
newParentFolderId,
metaDataBaseReward: folderMetaDataBaseReward
});

const arFSResult: ArFSResult = {
created: [
Expand Down Expand Up @@ -1167,23 +1152,16 @@ export class ArDrive extends ArDriveAnonymous {
? undefined
: await (async () => {
const uploadPlan = this.uploadPlanner.planCreateDrive(arFSPrototypes);
const { rewardSettings, totalWinstonPrice } = await this.costCalculator.calculateCostForCreateDrive(
uploadPlan
);
const { rewardSettings, totalWinstonPrice } =
await this.costCalculator.calculateCostForCreateDrive(uploadPlan);
await this.assertWalletBalance(totalWinstonPrice);
return rewardSettings;
})();

const createDriveResult = await arFSCreateDrive(rewardSettings);

const {
driveId,
metaDataTxId,
rootFolderId,
rootFolderTxId,
dataCaches,
fastFinalityIndexes
} = createDriveResult;
const { driveId, metaDataTxId, rootFolderId, rootFolderTxId, dataCaches, fastFinalityIndexes } =
createDriveResult;

const arFSResults: ArFSResult = {
created: [
Expand Down Expand Up @@ -1520,17 +1498,12 @@ export class ArDrive extends ArDriveAnonymous {
feeMultiple: this.feeMultiple
};

const {
entityId,
metaDataTxId,
dataCaches,
fastFinalityIndexes,
metaDataTxReward
} = await this.arFsDao.renamePublicFile({
file,
newName,
metadataRewardSettings
});
const { entityId, metaDataTxId, dataCaches, fastFinalityIndexes, metaDataTxReward } =
await this.arFsDao.renamePublicFile({
file,
newName,
metadataRewardSettings
});

const arFSResult: ArFSResult = {
created: [
Expand Down Expand Up @@ -1581,19 +1554,13 @@ export class ArDrive extends ArDriveAnonymous {
feeMultiple: this.feeMultiple
};

const {
entityId,
fileKey,
metaDataTxId,
dataCaches,
fastFinalityIndexes,
metaDataTxReward
} = await this.arFsDao.renamePrivateFile({
file,
newName,
metadataRewardSettings,
driveKey
});
const { entityId, fileKey, metaDataTxId, dataCaches, fastFinalityIndexes, metaDataTxReward } =
await this.arFsDao.renamePrivateFile({
file,
newName,
metadataRewardSettings,
driveKey
});

const arFSResult: ArFSResult = {
created: [
Expand Down Expand Up @@ -1642,17 +1609,12 @@ export class ArDrive extends ArDriveAnonymous {
feeMultiple: this.feeMultiple
};

const {
entityId,
metaDataTxId,
dataCaches,
fastFinalityIndexes,
metaDataTxReward
} = await this.arFsDao.renamePublicFolder({
folder,
newName,
metadataRewardSettings
});
const { entityId, metaDataTxId, dataCaches, fastFinalityIndexes, metaDataTxReward } =
await this.arFsDao.renamePublicFolder({
folder,
newName,
metadataRewardSettings
});

const arFSResult: ArFSResult = {
created: [
Expand Down Expand Up @@ -1704,18 +1666,13 @@ export class ArDrive extends ArDriveAnonymous {
feeMultiple: this.feeMultiple
};

const {
entityId,
metaDataTxId,
dataCaches,
fastFinalityIndexes,
metaDataTxReward
} = await this.arFsDao.renamePrivateFolder({
folder,
newName,
metadataRewardSettings,
driveKey
});
const { entityId, metaDataTxId, dataCaches, fastFinalityIndexes, metaDataTxReward } =
await this.arFsDao.renamePrivateFolder({
folder,
newName,
metadataRewardSettings,
driveKey
});

const arFSResult: ArFSResult = {
created: [
Expand Down Expand Up @@ -1761,17 +1718,12 @@ export class ArDrive extends ArDriveAnonymous {
feeMultiple: this.feeMultiple
};

const {
entityId,
metaDataTxId,
dataCaches,
fastFinalityIndexes,
metaDataTxReward
} = await this.arFsDao.renamePublicDrive({
drive,
newName,
metadataRewardSettings
});
const { entityId, metaDataTxId, dataCaches, fastFinalityIndexes, metaDataTxReward } =
await this.arFsDao.renamePublicDrive({
drive,
newName,
metadataRewardSettings
});

const arFSResult: ArFSResult = {
created: [
Expand Down Expand Up @@ -1817,18 +1769,13 @@ export class ArDrive extends ArDriveAnonymous {
feeMultiple: this.feeMultiple
};

const {
entityId,
metaDataTxId,
dataCaches,
fastFinalityIndexes,
metaDataTxReward
} = await this.arFsDao.renamePrivateDrive({
drive,
newName,
metadataRewardSettings,
driveKey
});
const { entityId, metaDataTxId, dataCaches, fastFinalityIndexes, metaDataTxReward } =
await this.arFsDao.renamePrivateDrive({
drive,
newName,
metadataRewardSettings,
driveKey
});

const arFSResult: ArFSResult = {
created: [
Expand Down
Loading
Loading