-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #173 from ardriveapp/dev
PE-742: Release ArDrive CLI v1.1.5
- Loading branch information
Showing
8 changed files
with
175 additions
and
13 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file renamed
BIN
+137 KB
...re-js-npm-1.0.4-8e5129121f-22109e31bc.zip → ...re-js-npm-1.0.5-6e82770d54-02490de5ea.zip
Binary file not shown.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { EID } from 'ardrive-core-js'; | ||
import { cliArDriveFactory, cliWalletDao } from '..'; | ||
import { CLICommand, ParametersHelper } from '../CLICommand'; | ||
import { CLIAction } from '../CLICommand/action'; | ||
import { SUCCESS_EXIT_CODE } from '../CLICommand/error_codes'; | ||
import { | ||
BoostParameter, | ||
FolderIdParameter, | ||
DryRunParameter, | ||
SeedPhraseParameter, | ||
TreeDepthParams, | ||
WalletFileParameter, | ||
DestinationManifestNameParameter, | ||
ConflictResolutionParams | ||
} from '../parameter_declarations'; | ||
|
||
new CLICommand({ | ||
name: 'create-manifest', | ||
parameters: [ | ||
FolderIdParameter, | ||
DestinationManifestNameParameter, | ||
BoostParameter, | ||
DryRunParameter, | ||
WalletFileParameter, | ||
SeedPhraseParameter, | ||
...ConflictResolutionParams, | ||
...TreeDepthParams | ||
], | ||
action: new CLIAction(async function action(options) { | ||
const parameters = new ParametersHelper(options, cliWalletDao); | ||
|
||
const wallet = await parameters.getRequiredWallet(); | ||
|
||
const arDrive = cliArDriveFactory({ | ||
wallet: wallet, | ||
feeMultiple: parameters.getOptionalBoostSetting(), | ||
dryRun: !!options.dryRun | ||
}); | ||
|
||
const folderId = parameters.getRequiredParameterValue(FolderIdParameter, EID); | ||
|
||
const maxDepth = await parameters.getMaxDepth(Number.MAX_SAFE_INTEGER); | ||
const destManifestName = parameters.getParameterValue(DestinationManifestNameParameter); | ||
const conflictResolution = parameters.getFileNameConflictResolution(); | ||
|
||
const result = await arDrive.uploadPublicManifest({ | ||
folderId: folderId, | ||
maxDepth, | ||
destManifestName, | ||
conflictResolution | ||
}); | ||
|
||
console.log(JSON.stringify(result, null, 4)); | ||
|
||
return SUCCESS_EXIT_CODE; | ||
}) | ||
}); |
This file contains 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
This file contains 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
This file contains 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