First upload version 0.0.1
This commit is contained in:
2
node_modules/ipull/dist/cli/commands/set.d.ts
generated
vendored
Normal file
2
node_modules/ipull/dist/cli/commands/set.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { Command } from "commander";
|
||||
export declare const setCommand: Command;
|
||||
30
node_modules/ipull/dist/cli/commands/set.js
generated
vendored
Normal file
30
node_modules/ipull/dist/cli/commands/set.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import { Command } from "commander";
|
||||
import { AppDB } from "../../settings/settings.js";
|
||||
const HELP_TEXT = `
|
||||
You can set that file extensions will be download to specific path.
|
||||
For example all zip files will be download to ~/Downloads/zip/:
|
||||
pull set .zip ~/Downloads/zip/
|
||||
|
||||
You can set default download path:
|
||||
pull set default ~/Downloads/
|
||||
`;
|
||||
export const setCommand = new Command("set");
|
||||
setCommand.description("Set download locations")
|
||||
.argument("[path]", "Path to the settings")
|
||||
.argument("<value>", "Value to set")
|
||||
.option("-d delete", "Delete the setting")
|
||||
.addHelpText("afterAll", HELP_TEXT)
|
||||
.action(async (path, value, { delete: deleteSetting }) => {
|
||||
if (deleteSetting) {
|
||||
await AppDB.update(data => {
|
||||
delete data[path];
|
||||
});
|
||||
console.log(`Deleted ${path}`);
|
||||
return;
|
||||
}
|
||||
await AppDB.update(data => {
|
||||
data[path] = value;
|
||||
});
|
||||
console.log(`${value} set to ${path}`);
|
||||
});
|
||||
//# sourceMappingURL=set.js.map
|
||||
1
node_modules/ipull/dist/cli/commands/set.js.map
generated
vendored
Normal file
1
node_modules/ipull/dist/cli/commands/set.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"set.js","sourceRoot":"","sources":["../../../src/cli/commands/set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,KAAK,EAAC,MAAM,4BAA4B,CAAC;AAEjD,MAAM,SAAS,GACX;;;;;;;EAOF,CAAC;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;AAE7C,UAAU,CAAC,WAAW,CAAC,wBAAwB,CAAC;KAC3C,QAAQ,CAAC,QAAQ,EAAE,sBAAsB,CAAC;KAC1C,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;KACnC,MAAM,CAAC,WAAW,EAAE,oBAAoB,CAAC;KACzC,WAAW,CAAC,UAAU,EAAE,SAAS,CAAC;KAClC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAC,MAAM,EAAE,aAAa,EAAC,EAAE,EAAE;IACnD,IAAI,aAAa,EAAE,CAAC;QAChB,MAAM,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;YACtB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC;QAC/B,OAAO;IACX,CAAC;IAED,MAAM,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;QACtB,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;IACvB,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,WAAW,IAAI,EAAE,CAAC,CAAC;AAC3C,CAAC,CAAC,CAAC"}
|
||||
Reference in New Issue
Block a user