raindrop-cli 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +422 -0
- package/dist/client.d.ts +7 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/commands/auth.d.ts +3 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/bookmarks.d.ts +3 -0
- package/dist/commands/bookmarks.d.ts.map +1 -0
- package/dist/commands/collections.d.ts +3 -0
- package/dist/commands/collections.d.ts.map +1 -0
- package/dist/commands/favorites.d.ts +3 -0
- package/dist/commands/favorites.d.ts.map +1 -0
- package/dist/commands/filters.d.ts +3 -0
- package/dist/commands/filters.d.ts.map +1 -0
- package/dist/commands/highlights.d.ts +3 -0
- package/dist/commands/highlights.d.ts.map +1 -0
- package/dist/commands/index.d.ts +9 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/tags.d.ts +3 -0
- package/dist/commands/tags.d.ts.map +1 -0
- package/dist/commands/trash.d.ts +3 -0
- package/dist/commands/trash.d.ts.map +1 -0
- package/dist/config.d.ts +44 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28827 -0
- package/dist/output/index.d.ts +23 -0
- package/dist/output/index.d.ts.map +1 -0
- package/dist/output/json.d.ts +6 -0
- package/dist/output/json.d.ts.map +1 -0
- package/dist/output/plain.d.ts +16 -0
- package/dist/output/plain.d.ts.map +1 -0
- package/dist/output/table.d.ts +3 -0
- package/dist/output/table.d.ts.map +1 -0
- package/dist/output/tree.d.ts +23 -0
- package/dist/output/tree.d.ts.map +1 -0
- package/dist/output/tsv.d.ts +3 -0
- package/dist/output/tsv.d.ts.map +1 -0
- package/dist/output/utils.d.ts +3 -0
- package/dist/output/utils.d.ts.map +1 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/axios-interceptors.d.ts +44 -0
- package/dist/utils/axios-interceptors.d.ts.map +1 -0
- package/dist/utils/collections.d.ts +18 -0
- package/dist/utils/collections.d.ts.map +1 -0
- package/dist/utils/colors.d.ts +61 -0
- package/dist/utils/colors.d.ts.map +1 -0
- package/dist/utils/command-options.d.ts +15 -0
- package/dist/utils/command-options.d.ts.map +1 -0
- package/dist/utils/debug.d.ts +45 -0
- package/dist/utils/debug.d.ts.map +1 -0
- package/dist/utils/errors.d.ts +38 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/help-formatter.d.ts +80 -0
- package/dist/utils/help-formatter.d.ts.map +1 -0
- package/dist/utils/output-streams.d.ts +35 -0
- package/dist/utils/output-streams.d.ts.map +1 -0
- package/dist/utils/pagination.d.ts +13 -0
- package/dist/utils/pagination.d.ts.map +1 -0
- package/dist/utils/progress.d.ts +29 -0
- package/dist/utils/progress.d.ts.map +1 -0
- package/dist/utils/prompt.d.ts +32 -0
- package/dist/utils/prompt.d.ts.map +1 -0
- package/dist/utils/spinner.d.ts +69 -0
- package/dist/utils/spinner.d.ts.map +1 -0
- package/dist/utils/stdin.d.ts +31 -0
- package/dist/utils/stdin.d.ts.map +1 -0
- package/dist/utils/timeout.d.ts +35 -0
- package/dist/utils/timeout.d.ts.map +1 -0
- package/dist/utils/tree.d.ts +51 -0
- package/dist/utils/tree.d.ts.map +1 -0
- package/dist/utils/tty.d.ts +32 -0
- package/dist/utils/tty.d.ts.map +1 -0
- package/dist/utils/validation.d.ts +28 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/package.json +87 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Progress indicator utilities using ora spinner.
|
|
3
|
+
*
|
|
4
|
+
* Per clig.dev guidelines:
|
|
5
|
+
* - "Responsive is more important than fast - print something in <100ms"
|
|
6
|
+
* - "Show progress if something takes a long time"
|
|
7
|
+
* - "If your program displays no output for a while, it will look broken"
|
|
8
|
+
*
|
|
9
|
+
* Spinner behavior:
|
|
10
|
+
* - Only shows after 100ms delay (avoid flicker for fast operations)
|
|
11
|
+
* - Disabled when stderr is not a TTY (piped/redirected)
|
|
12
|
+
* - Disabled in verbose mode (verbose output serves same purpose)
|
|
13
|
+
* - Writes to stderr to keep stdout clean for pipeable data
|
|
14
|
+
*/
|
|
15
|
+
import { type Ora } from "ora";
|
|
16
|
+
/**
|
|
17
|
+
* Options for the spinner.
|
|
18
|
+
*/
|
|
19
|
+
export interface SpinnerOptions {
|
|
20
|
+
/** Message to display while operation is in progress */
|
|
21
|
+
text: string;
|
|
22
|
+
/** Message to display on success (optional) */
|
|
23
|
+
successText?: string;
|
|
24
|
+
/** Message to display on failure (optional) */
|
|
25
|
+
failText?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Check if spinner should be shown.
|
|
29
|
+
* Disabled when:
|
|
30
|
+
* - stderr is not a TTY (output is piped/redirected)
|
|
31
|
+
* - verbose mode is enabled (verbose output replaces spinner)
|
|
32
|
+
*/
|
|
33
|
+
export declare function shouldShowSpinner(): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Execute an async operation with a spinner.
|
|
36
|
+
*
|
|
37
|
+
* The spinner only appears after 100ms delay to avoid flicker for fast operations.
|
|
38
|
+
* If the operation completes before 100ms, no spinner is shown.
|
|
39
|
+
*
|
|
40
|
+
* @param options - Spinner options (text, successText, failText)
|
|
41
|
+
* @param operation - Async operation to execute
|
|
42
|
+
* @returns The result of the operation
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* const result = await withSpinner(
|
|
46
|
+
* { text: "Fetching bookmarks...", successText: "Done!" },
|
|
47
|
+
* () => client.getRaindrops(collectionId)
|
|
48
|
+
* );
|
|
49
|
+
*/
|
|
50
|
+
export declare function withSpinner<T>(options: SpinnerOptions | string, operation: () => Promise<T>): Promise<T>;
|
|
51
|
+
/**
|
|
52
|
+
* Create a manual spinner for operations that need progress updates.
|
|
53
|
+
* Useful for batch operations where you want to update the message.
|
|
54
|
+
*
|
|
55
|
+
* Returns null if spinner shouldn't be shown (non-TTY, verbose mode).
|
|
56
|
+
*
|
|
57
|
+
* @param text - Initial spinner text
|
|
58
|
+
* @returns Ora spinner instance or null
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* const spinner = createSpinner("Processing bookmarks...");
|
|
62
|
+
* for (let i = 0; i < items.length; i++) {
|
|
63
|
+
* spinner?.text = `Processing ${i + 1}/${items.length}...`;
|
|
64
|
+
* await processItem(items[i]);
|
|
65
|
+
* }
|
|
66
|
+
* spinner?.succeed("Processed all bookmarks");
|
|
67
|
+
*/
|
|
68
|
+
export declare function createSpinner(text: string): Ora | null;
|
|
69
|
+
//# sourceMappingURL=spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../src/utils/spinner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAY,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAOpC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAY3C;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,WAAW,CAAC,CAAC,EACjC,OAAO,EAAE,cAAc,GAAG,MAAM,EAChC,SAAS,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAC1B,OAAO,CAAC,CAAC,CAAC,CAuDZ;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,GAAG,IAAI,CAStD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utilities for reading input from stdin.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Check if stdin has data available (is being piped to).
|
|
6
|
+
* Returns true if stdin is not a TTY (i.e., data is being piped).
|
|
7
|
+
*/
|
|
8
|
+
export declare function hasStdinData(): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Read all data from stdin and return as a string.
|
|
11
|
+
* Returns empty string if stdin is a TTY (no piped data).
|
|
12
|
+
*/
|
|
13
|
+
export declare function readStdin(): Promise<string>;
|
|
14
|
+
/**
|
|
15
|
+
* Parse IDs from a string input.
|
|
16
|
+
* Accepts IDs separated by newlines, commas, or whitespace.
|
|
17
|
+
* Returns an array of valid positive integers.
|
|
18
|
+
*
|
|
19
|
+
* @param input - Raw string input containing IDs
|
|
20
|
+
* @returns Array of parsed integer IDs
|
|
21
|
+
* @throws Error if any ID is invalid (not a positive integer)
|
|
22
|
+
*/
|
|
23
|
+
export declare function parseIds(input: string): number[];
|
|
24
|
+
/**
|
|
25
|
+
* Read and parse IDs from stdin.
|
|
26
|
+
* Combines readStdin() and parseIds().
|
|
27
|
+
*
|
|
28
|
+
* @returns Array of parsed integer IDs, or empty array if no stdin data
|
|
29
|
+
*/
|
|
30
|
+
export declare function readIdsFromStdin(): Promise<number[]>;
|
|
31
|
+
//# sourceMappingURL=stdin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdin.d.ts","sourceRoot":"","sources":["../../src/utils/stdin.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AAED;;;GAGG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAkBjD;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAuBhD;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAM1D"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Timeout configuration for network operations.
|
|
3
|
+
*
|
|
4
|
+
* Per clig.dev guidelines:
|
|
5
|
+
* - Allow network timeouts to be configured
|
|
6
|
+
* - Have a reasonable default so it doesn't hang forever
|
|
7
|
+
*
|
|
8
|
+
* Precedence: --timeout flag > RDCLI_TIMEOUT env var > default (30s)
|
|
9
|
+
*/
|
|
10
|
+
export declare const DEFAULT_TIMEOUT_SECONDS = 30;
|
|
11
|
+
export declare const MIN_TIMEOUT_SECONDS = 1;
|
|
12
|
+
export declare const MAX_TIMEOUT_SECONDS = 300;
|
|
13
|
+
/**
|
|
14
|
+
* Set the timeout from CLI flag (in seconds)
|
|
15
|
+
*/
|
|
16
|
+
export declare function setTimeoutSeconds(seconds: number): void;
|
|
17
|
+
/**
|
|
18
|
+
* Get the configured timeout in seconds.
|
|
19
|
+
* Precedence: CLI flag > env var > default
|
|
20
|
+
*/
|
|
21
|
+
export declare function getTimeoutSeconds(): number;
|
|
22
|
+
/**
|
|
23
|
+
* Get the configured timeout in milliseconds (for axios).
|
|
24
|
+
*/
|
|
25
|
+
export declare function getTimeoutMs(): number;
|
|
26
|
+
/**
|
|
27
|
+
* Validate timeout value and return error message if invalid.
|
|
28
|
+
* Returns null if valid.
|
|
29
|
+
*/
|
|
30
|
+
export declare function validateTimeout(value: string): string | null;
|
|
31
|
+
/**
|
|
32
|
+
* Reset timeout state (useful for testing)
|
|
33
|
+
*/
|
|
34
|
+
export declare function resetTimeoutState(): void;
|
|
35
|
+
//# sourceMappingURL=timeout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeout.d.ts","sourceRoot":"","sources":["../../src/utils/timeout.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAG1C,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAGrC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAKvC;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEvD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAgB1C;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAeD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAgB5D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAExC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utilities for building and rendering tree structures.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Represents an item that can be placed in a tree structure.
|
|
6
|
+
*/
|
|
7
|
+
export interface TreeItem {
|
|
8
|
+
_id: number;
|
|
9
|
+
title: string;
|
|
10
|
+
count: number;
|
|
11
|
+
parent?: {
|
|
12
|
+
$id: number;
|
|
13
|
+
} | null;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Tree node for hierarchical display.
|
|
17
|
+
*/
|
|
18
|
+
export interface TreeNode<T extends TreeItem = TreeItem> {
|
|
19
|
+
item: T;
|
|
20
|
+
children: TreeNode<T>[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Rendered tree row with display string and item data.
|
|
24
|
+
*/
|
|
25
|
+
export interface TreeRow {
|
|
26
|
+
/** Display string with tree characters and icon (no ANSI styling) */
|
|
27
|
+
tree: string;
|
|
28
|
+
/** Original item ID */
|
|
29
|
+
_id: number;
|
|
30
|
+
/** Item count */
|
|
31
|
+
count: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Build a tree structure from flat item lists.
|
|
35
|
+
* Handles deduplication if items appear in both lists.
|
|
36
|
+
*
|
|
37
|
+
* @param rootItems - Items at root level (no parent)
|
|
38
|
+
* @param childItems - Items with parents
|
|
39
|
+
* @returns Array of root TreeNodes with children populated
|
|
40
|
+
*/
|
|
41
|
+
export declare function buildTree<T extends TreeItem>(rootItems: T[], childItems: T[]): TreeNode<T>[];
|
|
42
|
+
/**
|
|
43
|
+
* Render tree nodes as formatted rows with tree characters.
|
|
44
|
+
* Returns plain text without ANSI styling - styling is applied by formatters.
|
|
45
|
+
*
|
|
46
|
+
* @param nodes - Tree nodes to render
|
|
47
|
+
* @param icon - Icon to display before each title (default: 📂)
|
|
48
|
+
* @returns Array of TreeRow objects
|
|
49
|
+
*/
|
|
50
|
+
export declare function renderTree<T extends TreeItem>(nodes: TreeNode<T>[], icon?: string): TreeRow[];
|
|
51
|
+
//# sourceMappingURL=tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../src/utils/tree.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ;IACrD,IAAI,EAAE,CAAC,CAAC;IACR,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,CAwC5F;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,QAAQ,EAC3C,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,EACpB,IAAI,GAAE,MAAa,GAClB,OAAO,EAAE,CAgCX"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { OutputFormat } from "../types/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Check if stdout is a TTY (interactive terminal).
|
|
4
|
+
* Returns false when output is piped or redirected.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isStdoutTTY(): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Check if stderr is a TTY (interactive terminal).
|
|
9
|
+
* Returns false when stderr is piped or redirected.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isStderrTTY(): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Get the default output format based on TTY detection.
|
|
14
|
+
* - TTY (human): plain format for full content with labeled fields
|
|
15
|
+
* - Non-TTY (piped/scripted): JSON for machine parsing
|
|
16
|
+
*/
|
|
17
|
+
export declare function getDefaultFormat(): OutputFormat;
|
|
18
|
+
/**
|
|
19
|
+
* Set the --no-color flag state (called from CLI parser).
|
|
20
|
+
*/
|
|
21
|
+
export declare function setNoColorFlag(value: boolean): void;
|
|
22
|
+
/**
|
|
23
|
+
* Determine if colored output should be used.
|
|
24
|
+
*
|
|
25
|
+
* Per https://no-color.org/ and clig.dev, colors are disabled when:
|
|
26
|
+
* - --no-color flag is passed
|
|
27
|
+
* - NO_COLOR env var is set (any non-empty value)
|
|
28
|
+
* - TERM=dumb
|
|
29
|
+
* - stdout is not a TTY (piped/redirected)
|
|
30
|
+
*/
|
|
31
|
+
export declare function shouldUseColor(): boolean;
|
|
32
|
+
//# sourceMappingURL=tty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tty.d.ts","sourceRoot":"","sources":["../../src/utils/tty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;GAGG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,YAAY,CAE/C;AAKD;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAEnD;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAsBxC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared validation utilities for CLI arguments and options.
|
|
3
|
+
* These are extracted to enable fast unit testing without subprocess spawning.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Parse and validate a limit parameter.
|
|
7
|
+
* @param value - String value from CLI
|
|
8
|
+
* @param min - Minimum allowed value (inclusive)
|
|
9
|
+
* @param max - Maximum allowed value (inclusive)
|
|
10
|
+
* @returns Parsed number
|
|
11
|
+
* @throws UsageError if invalid
|
|
12
|
+
*/
|
|
13
|
+
export declare function parseLimit(value: string, min?: number, max?: number): number;
|
|
14
|
+
/**
|
|
15
|
+
* Parse and validate a page parameter.
|
|
16
|
+
* @param value - String value from CLI
|
|
17
|
+
* @returns Parsed number (0-indexed)
|
|
18
|
+
* @throws UsageError if invalid
|
|
19
|
+
*/
|
|
20
|
+
export declare function parsePage(value: string): number;
|
|
21
|
+
/**
|
|
22
|
+
* Parse and validate a bookmark ID.
|
|
23
|
+
* @param value - String value from CLI
|
|
24
|
+
* @returns Parsed positive integer
|
|
25
|
+
* @throws UsageError if invalid
|
|
26
|
+
*/
|
|
27
|
+
export declare function parseBookmarkId(value: string): number;
|
|
28
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/utils/validation.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,GAAE,MAAU,EAAE,GAAG,GAAE,MAAW,GAAG,MAAM,CAMnF;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAM/C;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMrD"}
|
package/package.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "raindrop-cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A TypeScript CLI for Raindrop.io built for AI agent integration and personal productivity workflows",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"bin": {
|
|
10
|
+
"rd": "dist/index.js",
|
|
11
|
+
"rdcli": "dist/index.js",
|
|
12
|
+
"raindrop-cli": "dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist/**/*.js",
|
|
16
|
+
"dist/**/*.d.ts",
|
|
17
|
+
"dist/**/*.d.ts.map",
|
|
18
|
+
"!dist/**/*.test.d.ts",
|
|
19
|
+
"!dist/**/*.test.d.ts.map",
|
|
20
|
+
"!dist/test-utils",
|
|
21
|
+
"README.md",
|
|
22
|
+
"LICENSE"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "bun build src/index.ts --outdir dist --target node --format esm && echo '#!/usr/bin/env node' | cat - dist/index.js > dist/temp && mv dist/temp dist/index.js && bun run build:dts",
|
|
26
|
+
"build:dts": "tsc --emitDeclarationOnly --declaration --outDir dist",
|
|
27
|
+
"dev": "bun src/index.ts",
|
|
28
|
+
"test": "bash scripts/check.sh test",
|
|
29
|
+
"test:verbose": "bash scripts/test-unit.sh",
|
|
30
|
+
"test:live": "RDCLI_API_DELAY_MS=250 bash scripts/check.sh test:live",
|
|
31
|
+
"test:live:verbose": "RDCLI_API_DELAY_MS=250 bun test --no-parallel src/**/*.live.test.ts",
|
|
32
|
+
"test:all": "RDCLI_API_DELAY_MS=250 bash scripts/check.sh test:all",
|
|
33
|
+
"test:all:verbose": "RDCLI_API_DELAY_MS=250 bun test src",
|
|
34
|
+
"lint": "bash scripts/check.sh lint",
|
|
35
|
+
"lint:fix": "oxlint --type-aware --fix src/",
|
|
36
|
+
"lint:verbose": "oxlint --type-aware src/",
|
|
37
|
+
"format": "bash scripts/check.sh format-fix",
|
|
38
|
+
"format:verbose": "prettier --write \"src/**/*.ts\"",
|
|
39
|
+
"format:check": "bash scripts/check.sh format",
|
|
40
|
+
"format:check:verbose": "prettier --check \"src/**/*.ts\"",
|
|
41
|
+
"typecheck": "bash scripts/check.sh typecheck",
|
|
42
|
+
"typecheck:verbose": "tsc --noEmit",
|
|
43
|
+
"verify": "bun scripts/verify.ts",
|
|
44
|
+
"verify:verbose": "VERBOSE=1 bun scripts/verify.ts",
|
|
45
|
+
"prepare": "lefthook install || true",
|
|
46
|
+
"prepublishOnly": "bun run verify && bun run build && ggshield secret scan path . -r --use-gitignore -y && ggshield secret scan path dist -r -y"
|
|
47
|
+
},
|
|
48
|
+
"keywords": [
|
|
49
|
+
"raindrop",
|
|
50
|
+
"raindrop.io",
|
|
51
|
+
"cli",
|
|
52
|
+
"bookmarks",
|
|
53
|
+
"ai-agent"
|
|
54
|
+
],
|
|
55
|
+
"author": "Christian Catalan <crcatala@gmail.com>",
|
|
56
|
+
"license": "MIT",
|
|
57
|
+
"repository": {
|
|
58
|
+
"type": "git",
|
|
59
|
+
"url": "git+https://github.com/crcatala/raindrop-cli.git"
|
|
60
|
+
},
|
|
61
|
+
"bugs": {
|
|
62
|
+
"url": "https://github.com/crcatala/raindrop-cli/issues"
|
|
63
|
+
},
|
|
64
|
+
"homepage": "https://github.com/crcatala/raindrop-cli#readme",
|
|
65
|
+
"engines": {
|
|
66
|
+
"node": ">=20.0.0"
|
|
67
|
+
},
|
|
68
|
+
"dependencies": {
|
|
69
|
+
"@lasuillard/raindrop-client": "^0.7.3",
|
|
70
|
+
"cli-table3": "^0.6.5",
|
|
71
|
+
"commander": "^14.0.2",
|
|
72
|
+
"ora": "^9.0.0",
|
|
73
|
+
"picocolors": "^1.1.1"
|
|
74
|
+
},
|
|
75
|
+
"devDependencies": {
|
|
76
|
+
"@types/bun": "latest",
|
|
77
|
+
"@types/nock": "^11.1.0",
|
|
78
|
+
"@types/node": "^22",
|
|
79
|
+
"lefthook": "^2.0.13",
|
|
80
|
+
"nock": "^14.0.10",
|
|
81
|
+
"oxlint": "^1.36.0",
|
|
82
|
+
"oxlint-tsgolint": "^0.10.1",
|
|
83
|
+
"prettier": "^3.7.4",
|
|
84
|
+
"tasuku": "^2.0.5",
|
|
85
|
+
"typescript": "^5.9.3"
|
|
86
|
+
}
|
|
87
|
+
}
|