@mtndev/cli 0.0.0-dev-20260618142325

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.
Files changed (73) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/cjs/__chunks/4SFWHCB3.cjs +133 -0
  3. package/cjs/__chunks/B2KFW7T7.cjs +1 -0
  4. package/cjs/__chunks/EMMC33QA.cjs +401 -0
  5. package/cjs/__chunks/FFFTVBUR.cjs +22 -0
  6. package/cjs/__chunks/HFSXD6YE.cjs +100 -0
  7. package/cjs/__chunks/INFOPAHN.cjs +117 -0
  8. package/cjs/__chunks/J36P6UNE.cjs +75 -0
  9. package/cjs/__chunks/NIMXXHJQ.cjs +92 -0
  10. package/cjs/__chunks/QBNNK2WX.cjs +52 -0
  11. package/cjs/__chunks/WNJ3ZYLI.cjs +1 -0
  12. package/cjs/commands/doppler/handler.cjs +9 -0
  13. package/cjs/commands/doppler/handler.d.ts +5 -0
  14. package/cjs/commands/doppler/index.cjs +41 -0
  15. package/cjs/commands/doppler/index.d.ts +3 -0
  16. package/cjs/commands/doppler/schema.cjs +8 -0
  17. package/cjs/commands/doppler/schema.d.ts +50 -0
  18. package/cjs/commands/doppler/utils/exec.cjs +12 -0
  19. package/cjs/commands/doppler/utils/exec.d.ts +52 -0
  20. package/cjs/commands/doppler/utils.cjs +30 -0
  21. package/cjs/commands/doppler/utils.d.ts +69 -0
  22. package/cjs/commands/icons/handler.cjs +8 -0
  23. package/cjs/commands/icons/handler.d.ts +5 -0
  24. package/cjs/commands/icons/index.cjs +31 -0
  25. package/cjs/commands/icons/index.d.ts +3 -0
  26. package/cjs/commands/icons/schema.cjs +16 -0
  27. package/cjs/commands/icons/schema.d.ts +86 -0
  28. package/cjs/commands/icons/utils.cjs +13 -0
  29. package/cjs/commands/icons/utils.d.ts +52 -0
  30. package/cjs/commands/index.cjs +84 -0
  31. package/cjs/commands/index.d.ts +2 -0
  32. package/cjs/commands/schema.cjs +8 -0
  33. package/cjs/commands/schema.d.ts +26 -0
  34. package/cjs/index.cjs +5 -0
  35. package/cjs/index.d.ts +2 -0
  36. package/esm/__chunks/46HGXFME.js +0 -0
  37. package/esm/__chunks/6G4PXXKF.js +75 -0
  38. package/esm/__chunks/EC6MPHID.js +22 -0
  39. package/esm/__chunks/FL7AILGH.js +133 -0
  40. package/esm/__chunks/G6WUCFLD.js +100 -0
  41. package/esm/__chunks/HJSXC6HP.js +117 -0
  42. package/esm/__chunks/LHVSSZI7.js +52 -0
  43. package/esm/__chunks/O262GK4B.js +401 -0
  44. package/esm/__chunks/SJXQJ7RS.js +92 -0
  45. package/esm/__chunks/SNCKIAOR.js +0 -0
  46. package/esm/commands/doppler/handler.d.ts +5 -0
  47. package/esm/commands/doppler/handler.js +9 -0
  48. package/esm/commands/doppler/index.d.ts +3 -0
  49. package/esm/commands/doppler/index.js +41 -0
  50. package/esm/commands/doppler/schema.d.ts +50 -0
  51. package/esm/commands/doppler/schema.js +8 -0
  52. package/esm/commands/doppler/utils/exec.d.ts +52 -0
  53. package/esm/commands/doppler/utils/exec.js +12 -0
  54. package/esm/commands/doppler/utils.d.ts +69 -0
  55. package/esm/commands/doppler/utils.js +30 -0
  56. package/esm/commands/icons/handler.d.ts +5 -0
  57. package/esm/commands/icons/handler.js +8 -0
  58. package/esm/commands/icons/index.d.ts +3 -0
  59. package/esm/commands/icons/index.js +31 -0
  60. package/esm/commands/icons/schema.d.ts +86 -0
  61. package/esm/commands/icons/schema.js +16 -0
  62. package/esm/commands/icons/utils.d.ts +52 -0
  63. package/esm/commands/icons/utils.js +13 -0
  64. package/esm/commands/index.d.ts +2 -0
  65. package/esm/commands/index.js +84 -0
  66. package/esm/commands/schema.d.ts +26 -0
  67. package/esm/commands/schema.js +8 -0
  68. package/esm/index.d.ts +2 -0
  69. package/esm/index.js +5 -0
  70. package/package.json +62 -0
  71. package/utils/input/package.json +8 -0
  72. package/utils/package/package.json +8 -0
  73. package/utils/validation/package.json +8 -0
@@ -0,0 +1,41 @@
1
+ import "../../__chunks/46HGXFME.js";
2
+ import {
3
+ dopplerCommand
4
+ } from "../../__chunks/G6WUCFLD.js";
5
+ import {
6
+ checkDependencies,
7
+ createDiff,
8
+ downloadConfigs,
9
+ execDoppler,
10
+ getConfigs,
11
+ normalizeEscapeSequences,
12
+ promptConfirmation,
13
+ uploadConfigs
14
+ } from "../../__chunks/O262GK4B.js";
15
+ import {
16
+ exec,
17
+ execJson,
18
+ execNumber,
19
+ execString
20
+ } from "../../__chunks/SJXQJ7RS.js";
21
+ import {
22
+ dopplerCommandMetadata,
23
+ dopplerCommandOptionsSchema
24
+ } from "../../__chunks/LHVSSZI7.js";
25
+ export {
26
+ checkDependencies,
27
+ createDiff,
28
+ dopplerCommand,
29
+ dopplerCommandMetadata,
30
+ dopplerCommandOptionsSchema,
31
+ downloadConfigs,
32
+ exec,
33
+ execDoppler,
34
+ execJson,
35
+ execNumber,
36
+ execString,
37
+ getConfigs,
38
+ normalizeEscapeSequences,
39
+ promptConfirmation,
40
+ uploadConfigs
41
+ };
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Zod schema for doppler command-specific options
3
+ * Global options (verbose, help) are inherited from globalOptionsSchema
4
+ */
5
+ export const dopplerCommandOptionsSchema: z.ZodObject<{
6
+ action: z.ZodEnum<["download", "upload"]>;
7
+ environment: z.ZodDefault<z.ZodOptional<z.ZodString>>;
8
+ verbose: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
9
+ help: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ action: "download" | "upload";
12
+ environment: string;
13
+ verbose: boolean;
14
+ help: boolean;
15
+ }, {
16
+ action: "download" | "upload";
17
+ environment?: string | undefined;
18
+ verbose?: boolean | undefined;
19
+ help?: boolean | undefined;
20
+ }>;
21
+ export namespace dopplerCommandMetadata {
22
+ let name: string;
23
+ let description: string;
24
+ namespace options {
25
+ namespace environment {
26
+ let description_1: string | undefined;
27
+ export { description_1 as description };
28
+ let _default: string;
29
+ export { _default as default };
30
+ export let alias: string;
31
+ }
32
+ namespace verbose {
33
+ let description_2: string | undefined;
34
+ export { description_2 as description };
35
+ let _default_1: boolean;
36
+ export { _default_1 as default };
37
+ let alias_1: string;
38
+ export { alias_1 as alias };
39
+ }
40
+ namespace help {
41
+ let description_3: string | undefined;
42
+ export { description_3 as description };
43
+ let _default_2: boolean;
44
+ export { _default_2 as default };
45
+ let alias_2: string;
46
+ export { alias_2 as alias };
47
+ }
48
+ }
49
+ }
50
+ import { z } from "zod";
@@ -0,0 +1,8 @@
1
+ import {
2
+ dopplerCommandMetadata,
3
+ dopplerCommandOptionsSchema
4
+ } from "../../__chunks/LHVSSZI7.js";
5
+ export {
6
+ dopplerCommandMetadata,
7
+ dopplerCommandOptionsSchema
8
+ };
@@ -0,0 +1,52 @@
1
+ /**
2
+ * @typedef {'silent' | 'verbose' | 'default'} VerbosityLevel
3
+ */
4
+ /**
5
+ * @typedef {Object} ExecOptions
6
+ * @property {'string' | 'number' | 'json'} [stdoutParser='string'] - How to parse stdout
7
+ * @property {boolean} [throwOnError=true] - Whether to throw on error
8
+ * @property {VerbosityLevel} [verbosity='default'] - Output verbosity level
9
+ */
10
+ /**
11
+ * Execute a command and parse the output
12
+ * @param {string} command - Command to execute
13
+ * @param {import('child_process').ExecSyncOptions & ExecOptions} [options={}] - Execution options (inherits all execSync options + custom options)
14
+ * @returns {string | number | any} - Parsed output based on stdoutParser
15
+ */
16
+ export function exec(command: string, options?: import("child_process").ExecSyncOptions & ExecOptions): string | number | any;
17
+ /**
18
+ * Execute a command with string output
19
+ * @param {string} command - Command to execute
20
+ * @param {import('child_process').ExecSyncOptions & ExecOptions} [options] - Execution options
21
+ * @returns {string}
22
+ */
23
+ export function execString(command: string, options?: import("child_process").ExecSyncOptions & ExecOptions): string;
24
+ /**
25
+ * Execute a command with JSON output
26
+ * @param {string} command - Command to execute
27
+ * @param {import('child_process').ExecSyncOptions & ExecOptions} [options] - Execution options
28
+ * @returns {any}
29
+ */
30
+ export function execJson(command: string, options?: import("child_process").ExecSyncOptions & ExecOptions): any;
31
+ /**
32
+ * Execute a command with number output
33
+ * @param {string} command - Command to execute
34
+ * @param {import('child_process').ExecSyncOptions & ExecOptions} [options] - Execution options
35
+ * @returns {number}
36
+ */
37
+ export function execNumber(command: string, options?: import("child_process").ExecSyncOptions & ExecOptions): number;
38
+ export type VerbosityLevel = "silent" | "verbose" | "default";
39
+ export type ExecOptions = {
40
+ /**
41
+ * - How to parse stdout
42
+ */
43
+ stdoutParser?: "string" | "number" | "json" | undefined;
44
+ /**
45
+ * - Whether to throw on error
46
+ */
47
+ throwOnError?: boolean | undefined;
48
+ /**
49
+ * - Output verbosity level
50
+ */
51
+ verbosity?: VerbosityLevel | undefined;
52
+ };
@@ -0,0 +1,12 @@
1
+ import {
2
+ exec,
3
+ execJson,
4
+ execNumber,
5
+ execString
6
+ } from "../../../__chunks/SJXQJ7RS.js";
7
+ export {
8
+ exec,
9
+ execJson,
10
+ execNumber,
11
+ execString
12
+ };
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Execute a doppler command and return the result
3
+ * @param {string[]} args - Command arguments
4
+ * @param {'string' | 'json'} parser - How to parse the output
5
+ * @param {boolean} silent - Suppress output
6
+ * @param {boolean} verbose - Show verbose output
7
+ * @returns {string | any}
8
+ */
9
+ export function execDoppler(args: string[], parser?: "string" | "json", silent?: boolean, verbose?: boolean): string | any;
10
+ /**
11
+ * Check if doppler CLI is installed and configured
12
+ * @param {boolean} verbose - Show verbose output
13
+ */
14
+ export function checkDependencies(verbose?: boolean): void;
15
+ /**
16
+ * Get list of configurations based on environment parameter
17
+ * @param {string} environment - Environment name ('all', 'dev', 'stg', 'prd', etc.)
18
+ * @param {boolean} verbose - Show verbose output
19
+ * @returns {string[]}
20
+ */
21
+ export function getConfigs(environment: string, verbose?: boolean): string[];
22
+ /**
23
+ * Normalize escape sequences in file content
24
+ * @param {string} content - File content
25
+ * @returns {string}
26
+ */
27
+ export function normalizeEscapeSequences(content: string): string;
28
+ /**
29
+ * Create a unified diff between two strings
30
+ * @param {string} oldContent - Original content
31
+ * @param {string} newContent - New content
32
+ * @returns {string[]}
33
+ */
34
+ export function createDiff(oldContent: string, newContent: string): string[];
35
+ /**
36
+ * Prompt user for confirmation
37
+ * @param {string} message - Prompt message
38
+ * @returns {Promise<boolean>}
39
+ */
40
+ export function promptConfirmation(message: string): Promise<boolean>;
41
+ /**
42
+ * Download configurations from Doppler
43
+ * @param {{
44
+ * verbose: boolean;
45
+ * environment: string;
46
+ * }} options - Options for downloading configurations
47
+ */
48
+ export function downloadConfigs(options: {
49
+ verbose: boolean;
50
+ environment: string;
51
+ }): Promise<void>;
52
+ /**
53
+ * Upload configurations to Doppler
54
+ * @param {{
55
+ * environment: string;
56
+ * verbose: boolean;
57
+ * }} options - Options for uploading configurations
58
+ */
59
+ export function uploadConfigs(options: {
60
+ environment: string;
61
+ verbose: boolean;
62
+ }): Promise<void>;
63
+ export type VerbosityLevel = import("./utils/exec.js").VerbosityLevel;
64
+ export type ExecOptions = import("./utils/exec.js").ExecOptions;
65
+ import { exec } from "./utils/exec.js";
66
+ import { execString } from "./utils/exec.js";
67
+ import { execJson } from "./utils/exec.js";
68
+ import { execNumber } from "./utils/exec.js";
69
+ export { exec, execString, execJson, execNumber };
@@ -0,0 +1,30 @@
1
+ import {
2
+ checkDependencies,
3
+ createDiff,
4
+ downloadConfigs,
5
+ execDoppler,
6
+ getConfigs,
7
+ normalizeEscapeSequences,
8
+ promptConfirmation,
9
+ uploadConfigs
10
+ } from "../../__chunks/O262GK4B.js";
11
+ import {
12
+ exec,
13
+ execJson,
14
+ execNumber,
15
+ execString
16
+ } from "../../__chunks/SJXQJ7RS.js";
17
+ export {
18
+ checkDependencies,
19
+ createDiff,
20
+ downloadConfigs,
21
+ exec,
22
+ execDoppler,
23
+ execJson,
24
+ execNumber,
25
+ execString,
26
+ getConfigs,
27
+ normalizeEscapeSequences,
28
+ promptConfirmation,
29
+ uploadConfigs
30
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Main icons command handler
3
+ * @param {unknown} options - Command options (will be validated)
4
+ */
5
+ export function iconsCommand(options: unknown): Promise<void>;
@@ -0,0 +1,8 @@
1
+ import {
2
+ iconsCommand
3
+ } from "../../__chunks/HJSXC6HP.js";
4
+ import "../../__chunks/FL7AILGH.js";
5
+ import "../../__chunks/6G4PXXKF.js";
6
+ export {
7
+ iconsCommand
8
+ };
@@ -0,0 +1,3 @@
1
+ export * from "./handler.js";
2
+ export * from "./schema.js";
3
+ export * from "./utils.js";
@@ -0,0 +1,31 @@
1
+ import "../../__chunks/SNCKIAOR.js";
2
+ import {
3
+ iconsCommand
4
+ } from "../../__chunks/HJSXC6HP.js";
5
+ import {
6
+ checkDependencies,
7
+ generateAllIcons,
8
+ generateIcon,
9
+ validateBaseIcons
10
+ } from "../../__chunks/FL7AILGH.js";
11
+ import {
12
+ CHANNELS,
13
+ CHANNEL_TEXT_MAP,
14
+ ICON_SIZE_MAP,
15
+ ICON_TYPES,
16
+ iconsCommandMetadata,
17
+ iconsCommandOptionsSchema
18
+ } from "../../__chunks/6G4PXXKF.js";
19
+ export {
20
+ CHANNELS,
21
+ CHANNEL_TEXT_MAP,
22
+ ICON_SIZE_MAP,
23
+ ICON_TYPES,
24
+ checkDependencies,
25
+ generateAllIcons,
26
+ generateIcon,
27
+ iconsCommand,
28
+ iconsCommandMetadata,
29
+ iconsCommandOptionsSchema,
30
+ validateBaseIcons
31
+ };
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Available channels for icon generation
3
+ */
4
+ export const CHANNELS: string[];
5
+ /**
6
+ * Available icon types
7
+ */
8
+ export const ICON_TYPES: string[];
9
+ export namespace CHANNEL_TEXT_MAP {
10
+ let dev: string;
11
+ let local: string;
12
+ let staging: string;
13
+ let test: string;
14
+ }
15
+ /**
16
+ * Icon type to point size mapping
17
+ */
18
+ export const ICON_SIZE_MAP: {
19
+ "adaptive-icon": number;
20
+ icon: number;
21
+ };
22
+ /**
23
+ * Zod schema for icons command options
24
+ */
25
+ export const iconsCommandOptionsSchema: z.ZodObject<{
26
+ input: z.ZodString;
27
+ channels: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<["dev", "local", "staging", "test"]>, "many">>>;
28
+ iconTypes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<["icon", "adaptive-icon"]>, "many">>>;
29
+ verbose: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
30
+ help: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ verbose: boolean;
33
+ help: boolean;
34
+ input: string;
35
+ channels: ("dev" | "staging" | "test" | "local")[];
36
+ iconTypes: ("icon" | "adaptive-icon")[];
37
+ }, {
38
+ input: string;
39
+ verbose?: boolean | undefined;
40
+ help?: boolean | undefined;
41
+ channels?: ("dev" | "staging" | "test" | "local")[] | undefined;
42
+ iconTypes?: ("icon" | "adaptive-icon")[] | undefined;
43
+ }>;
44
+ export namespace iconsCommandMetadata {
45
+ let name: string;
46
+ let description: string;
47
+ namespace options {
48
+ namespace input {
49
+ let description_1: string | undefined;
50
+ export { description_1 as description };
51
+ export let required: boolean;
52
+ }
53
+ namespace channels {
54
+ let description_2: string | undefined;
55
+ export { description_2 as description };
56
+ let _default: string;
57
+ export { _default as default };
58
+ export let alias: string;
59
+ }
60
+ namespace iconTypes {
61
+ let description_3: string | undefined;
62
+ export { description_3 as description };
63
+ let _default_1: string;
64
+ export { _default_1 as default };
65
+ let alias_1: string;
66
+ export { alias_1 as alias };
67
+ }
68
+ namespace verbose {
69
+ let description_4: string | undefined;
70
+ export { description_4 as description };
71
+ let _default_2: boolean;
72
+ export { _default_2 as default };
73
+ let alias_2: string;
74
+ export { alias_2 as alias };
75
+ }
76
+ namespace help {
77
+ let description_5: string | undefined;
78
+ export { description_5 as description };
79
+ let _default_3: boolean;
80
+ export { _default_3 as default };
81
+ let alias_3: string;
82
+ export { alias_3 as alias };
83
+ }
84
+ }
85
+ }
86
+ import { z } from "zod";
@@ -0,0 +1,16 @@
1
+ import {
2
+ CHANNELS,
3
+ CHANNEL_TEXT_MAP,
4
+ ICON_SIZE_MAP,
5
+ ICON_TYPES,
6
+ iconsCommandMetadata,
7
+ iconsCommandOptionsSchema
8
+ } from "../../__chunks/6G4PXXKF.js";
9
+ export {
10
+ CHANNELS,
11
+ CHANNEL_TEXT_MAP,
12
+ ICON_SIZE_MAP,
13
+ ICON_TYPES,
14
+ iconsCommandMetadata,
15
+ iconsCommandOptionsSchema
16
+ };
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Check if ImageMagick is installed
3
+ * @param {boolean} verbose - Show verbose output
4
+ * @throws {Error} If ImageMagick is not installed
5
+ */
6
+ export function checkDependencies(verbose?: boolean): void;
7
+ /**
8
+ * Validate that required base icons exist
9
+ * @param {string} baseDir - Base directory containing icons
10
+ * @param {string[]} iconTypes - Icon types to validate
11
+ * @param {boolean} verbose - Show verbose output
12
+ * @throws {Error} If required icons are missing
13
+ */
14
+ export function validateBaseIcons(baseDir: string, iconTypes: string[], verbose?: boolean): void;
15
+ /**
16
+ * Generate a single icon with channel overlay
17
+ * @param {{
18
+ * baseDir: string;
19
+ * channel: string;
20
+ * iconType: string;
21
+ * verbose: boolean;
22
+ * }} options - Generation options
23
+ * @returns {string} Path to generated icon
24
+ */
25
+ export function generateIcon(options: {
26
+ baseDir: string;
27
+ channel: string;
28
+ iconType: string;
29
+ verbose: boolean;
30
+ }): string;
31
+ /**
32
+ * Generate all icons for specified channels and types
33
+ * @param {{
34
+ * baseDir: string;
35
+ * channels: string[];
36
+ * iconTypes: string[];
37
+ * verbose: boolean;
38
+ * }} options - Generation options
39
+ * @returns {{ success: string[]; failed: { icon: string; error: string }[] }}
40
+ */
41
+ export function generateAllIcons(options: {
42
+ baseDir: string;
43
+ channels: string[];
44
+ iconTypes: string[];
45
+ verbose: boolean;
46
+ }): {
47
+ success: string[];
48
+ failed: {
49
+ icon: string;
50
+ error: string;
51
+ }[];
52
+ };
@@ -0,0 +1,13 @@
1
+ import {
2
+ checkDependencies,
3
+ generateAllIcons,
4
+ generateIcon,
5
+ validateBaseIcons
6
+ } from "../../__chunks/FL7AILGH.js";
7
+ import "../../__chunks/6G4PXXKF.js";
8
+ export {
9
+ checkDependencies,
10
+ generateAllIcons,
11
+ generateIcon,
12
+ validateBaseIcons
13
+ };
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,84 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ globalCommandsMetadata
4
+ } from "../__chunks/EC6MPHID.js";
5
+ import "../__chunks/SNCKIAOR.js";
6
+ import {
7
+ iconsCommand
8
+ } from "../__chunks/HJSXC6HP.js";
9
+ import "../__chunks/FL7AILGH.js";
10
+ import {
11
+ iconsCommandMetadata
12
+ } from "../__chunks/6G4PXXKF.js";
13
+ import "../__chunks/46HGXFME.js";
14
+ import {
15
+ dopplerCommand
16
+ } from "../__chunks/G6WUCFLD.js";
17
+ import "../__chunks/O262GK4B.js";
18
+ import "../__chunks/SJXQJ7RS.js";
19
+ import {
20
+ dopplerCommandMetadata
21
+ } from "../__chunks/LHVSSZI7.js";
22
+
23
+ // src/commands/index.js
24
+ import chalk from "chalk";
25
+ import { program } from "commander";
26
+ function displayWelcomeMessage() {
27
+ console.log(chalk.bold.blue("\n\u{1F680} @mtndev/cli"));
28
+ console.log(chalk.gray(` ${globalCommandsMetadata.description}
29
+ `));
30
+ }
31
+ displayWelcomeMessage();
32
+ program.name(globalCommandsMetadata.name).description(globalCommandsMetadata.description).version(globalCommandsMetadata.version).option(
33
+ `-${globalCommandsMetadata.options.verbose.alias}, --verbose`,
34
+ globalCommandsMetadata.options.verbose.description,
35
+ globalCommandsMetadata.options.verbose.default
36
+ );
37
+ program.command("doppler <action>").description(dopplerCommandMetadata.description).option(
38
+ `-${dopplerCommandMetadata.options.environment.alias}, --environment <env>`,
39
+ dopplerCommandMetadata.options.environment.description,
40
+ dopplerCommandMetadata.options.environment.default
41
+ ).option(
42
+ `-${dopplerCommandMetadata.options.help.alias}, --help`,
43
+ dopplerCommandMetadata.options.help.description,
44
+ dopplerCommandMetadata.options.help.default
45
+ ).action(async (action, options, cmd) => {
46
+ const globalOptions = cmd.parent?.opts() || {};
47
+ await dopplerCommand({
48
+ action,
49
+ environment: options.environment,
50
+ verbose: globalOptions.verbose,
51
+ help: options.help
52
+ });
53
+ });
54
+ program.command("icons <input>").description(iconsCommandMetadata.description).option(
55
+ `-${iconsCommandMetadata.options.channels.alias}, --channels <channels>`,
56
+ iconsCommandMetadata.options.channels.description,
57
+ iconsCommandMetadata.options.channels.default
58
+ ).option(
59
+ `-${iconsCommandMetadata.options.iconTypes.alias}, --icon-types <types>`,
60
+ iconsCommandMetadata.options.iconTypes.description,
61
+ iconsCommandMetadata.options.iconTypes.default
62
+ ).option(
63
+ `-${iconsCommandMetadata.options.help.alias}, --help`,
64
+ iconsCommandMetadata.options.help.description,
65
+ iconsCommandMetadata.options.help.default
66
+ ).action(async (input, options, cmd) => {
67
+ const globalOptions = cmd.parent?.opts() || {};
68
+ const channels = typeof options.channels === "string" ? options.channels.split(",").map((c) => c.trim()) : options.channels;
69
+ const iconTypes = typeof options.iconTypes === "string" ? options.iconTypes.split(",").map((t) => t.trim()) : options.iconTypes;
70
+ await iconsCommand({
71
+ input,
72
+ channels,
73
+ iconTypes,
74
+ verbose: globalOptions.verbose,
75
+ help: options.help
76
+ });
77
+ });
78
+ program.on("command:*", () => {
79
+ program.help();
80
+ });
81
+ if (process.argv.length <= 2) {
82
+ program.help();
83
+ }
84
+ program.parse();
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Zod schema for global command options
3
+ * These options are available across all commands
4
+ */
5
+ export const globalOptionsSchema: z.ZodObject<{
6
+ verbose: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ verbose?: boolean | undefined;
9
+ }, {
10
+ verbose?: boolean | undefined;
11
+ }>;
12
+ export namespace globalCommandsMetadata {
13
+ let name: string;
14
+ let version: string;
15
+ let description: string;
16
+ namespace options {
17
+ namespace verbose {
18
+ let description_1: string | undefined;
19
+ export { description_1 as description };
20
+ let _default: boolean;
21
+ export { _default as default };
22
+ export let alias: string;
23
+ }
24
+ }
25
+ }
26
+ import { z } from "zod";
@@ -0,0 +1,8 @@
1
+ import {
2
+ globalCommandsMetadata,
3
+ globalOptionsSchema
4
+ } from "../__chunks/EC6MPHID.js";
5
+ export {
6
+ globalCommandsMetadata,
7
+ globalOptionsSchema
8
+ };
package/esm/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare const undefined: undefined;
2
+ export default undefined;
package/esm/index.js ADDED
@@ -0,0 +1,5 @@
1
+ // src/index.js
2
+ var src_default = void 0;
3
+ export {
4
+ src_default as default
5
+ };