Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"types": "./lib/index.d.ts",
"dependencies": {
"ardrive-core-js": "2.0.0",
"ardrive-core-js": "../ardrive-core-js",
"arweave": "1.11.4",
"axios": "^0.21.1",
"bn.js": "^5.2.1",
Expand Down
3 changes: 1 addition & 2 deletions src/CLICommand/parameters_helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ import {
} from 'ardrive-core-js';
import { JWKInterface } from 'arweave/node/lib/wallet';
import { deriveIpfsCid } from '../utils/ipfs_utils';
import { turboProdUrl } from 'ardrive-core-js/lib/utils/constants';

// eslint-disable-next-line @typescript-eslint/no-explicit-any
type ParameterOptions = any;
Expand Down Expand Up @@ -466,7 +465,7 @@ export class ParametersHelper {

if (!userProvidedURL) {
// Return default CLI turbo if no turbo url can be derived from the user
return new URL(turboProdUrl);
return new URL('https://upload.ardrive.dev');
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: should default to prod. but sending to dev temporarily

Suggested change
return new URL('https://upload.ardrive.dev');
return new URL('https://upload.ardrive.io');

}

if (userProvidedURL.hostname === '') {
Expand Down
8 changes: 7 additions & 1 deletion src/commands/create_drive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ new CLICommand({
dryRun,
shouldBundle,
arweave,
turboSettings: useTurbo ? { turboUrl } : undefined
turboSettings: useTurbo
? {
turboUploadUrl: turboUrl,
turboPaymentUrl: new URL(turboUrl.toString().replace('upload', 'payment')),
isDryRun: dryRun
}
: undefined
});

const createDriveResult = await (async function () {
Expand Down
8 changes: 7 additions & 1 deletion src/commands/create_folder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ new CLICommand({
feeMultiple: parameters.getOptionalBoostSetting(),
dryRun,
arweave,
turboSettings: useTurbo ? { turboUrl } : undefined
turboSettings: useTurbo
? {
turboUploadUrl: turboUrl,
turboPaymentUrl: new URL(turboUrl.toString().replace('upload', 'payment')),
isDryRun: parameters.isDryRun()
}
: undefined
});

const parentFolderId = parameters.getRequiredParameterValue(ParentFolderIdParameter, EID);
Expand Down
8 changes: 7 additions & 1 deletion src/commands/create_manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ new CLICommand({
feeMultiple: parameters.getOptionalBoostSetting(),
dryRun: parameters.isDryRun(),
arweave,
turboSettings: useTurbo ? { turboUrl } : undefined
turboSettings: useTurbo
? {
turboUploadUrl: turboUrl,
turboPaymentUrl: new URL(turboUrl.toString().replace('upload', 'payment')),
isDryRun: parameters.isDryRun()
}
: undefined
});

const folderId = parameters.getRequiredParameterValue(FolderIdParameter, EID);
Expand Down
8 changes: 7 additions & 1 deletion src/commands/move_file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ new CLICommand({
wallet: wallet,
feeMultiple: parameters.getOptionalBoostSetting(),
dryRun,
turboSettings: shouldUseTurbo ? { turboUrl } : undefined,
turboSettings: shouldUseTurbo
? {
turboUploadUrl: turboUrl,
turboPaymentUrl: new URL(turboUrl.toString().replace('upload', 'payment')),
isDryRun: parameters.isDryRun()
}
: undefined,
arweave
});

Expand Down
8 changes: 7 additions & 1 deletion src/commands/move_folder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ new CLICommand({
const ardrive = cliArDriveFactory({
wallet: wallet,
feeMultiple: parameters.getOptionalBoostSetting(),
turboSettings: shouldUseTurbo ? { turboUrl } : undefined,
turboSettings: shouldUseTurbo
? {
turboUploadUrl: turboUrl,
turboPaymentUrl: new URL(turboUrl.toString().replace('upload', 'payment')),
isDryRun: parameters.isDryRun()
}
: undefined,
dryRun,
arweave
});
Expand Down
4 changes: 3 additions & 1 deletion src/commands/rename_drive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ new CLICommand({
wallet,
feeMultiple: parameters.getOptionalBoostSetting(),
dryRun,
turboSettings: shouldUseTurbo ? { turboUrl } : undefined,
turboSettings: shouldUseTurbo
? { turboUploadUrl: turboUrl, turboPaymentUrl: turboUrl, isDryRun: parameters.isDryRun() }
: undefined,
arweave
});

Expand Down
4 changes: 3 additions & 1 deletion src/commands/rename_file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ new CLICommand({
wallet: wallet,
feeMultiple: parameters.getOptionalBoostSetting(),
dryRun,
turboSettings: shouldUseTurbo ? { turboUrl } : undefined,
turboSettings: shouldUseTurbo
? { turboUploadUrl: turboUrl, turboPaymentUrl: turboUrl, isDryRun: parameters.isDryRun() }
: undefined,
arweave
});

Expand Down
4 changes: 3 additions & 1 deletion src/commands/rename_folder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ new CLICommand({
const ardrive = cliArDriveFactory({
wallet: wallet,
feeMultiple: parameters.getOptionalBoostSetting(),
turboSettings: shouldUseTurbo ? { turboUrl } : undefined,
turboSettings: shouldUseTurbo
? { turboUploadUrl: turboUrl, turboPaymentUrl: turboUrl, isDryRun: dryRun }
: undefined,
dryRun,
arweave
});
Expand Down
4 changes: 3 additions & 1 deletion src/commands/upload_file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@ new CLICommand({
feeMultiple: parameters.getOptionalBoostSetting(),
dryRun: parameters.isDryRun(),
shouldBundle,
turboSettings: shouldUseTurbo ? { turboUrl } : undefined,
turboSettings: shouldUseTurbo
? { turboUploadUrl: turboUrl, turboPaymentUrl: turboUrl, isDryRun: parameters.isDryRun() }
: undefined,
arweave
});

Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
"skipLibCheck": true
},
"include": ["src", "tests"]
}