@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.
- package/CHANGELOG.md +7 -0
- package/cjs/__chunks/4SFWHCB3.cjs +133 -0
- package/cjs/__chunks/B2KFW7T7.cjs +1 -0
- package/cjs/__chunks/EMMC33QA.cjs +401 -0
- package/cjs/__chunks/FFFTVBUR.cjs +22 -0
- package/cjs/__chunks/HFSXD6YE.cjs +100 -0
- package/cjs/__chunks/INFOPAHN.cjs +117 -0
- package/cjs/__chunks/J36P6UNE.cjs +75 -0
- package/cjs/__chunks/NIMXXHJQ.cjs +92 -0
- package/cjs/__chunks/QBNNK2WX.cjs +52 -0
- package/cjs/__chunks/WNJ3ZYLI.cjs +1 -0
- package/cjs/commands/doppler/handler.cjs +9 -0
- package/cjs/commands/doppler/handler.d.ts +5 -0
- package/cjs/commands/doppler/index.cjs +41 -0
- package/cjs/commands/doppler/index.d.ts +3 -0
- package/cjs/commands/doppler/schema.cjs +8 -0
- package/cjs/commands/doppler/schema.d.ts +50 -0
- package/cjs/commands/doppler/utils/exec.cjs +12 -0
- package/cjs/commands/doppler/utils/exec.d.ts +52 -0
- package/cjs/commands/doppler/utils.cjs +30 -0
- package/cjs/commands/doppler/utils.d.ts +69 -0
- package/cjs/commands/icons/handler.cjs +8 -0
- package/cjs/commands/icons/handler.d.ts +5 -0
- package/cjs/commands/icons/index.cjs +31 -0
- package/cjs/commands/icons/index.d.ts +3 -0
- package/cjs/commands/icons/schema.cjs +16 -0
- package/cjs/commands/icons/schema.d.ts +86 -0
- package/cjs/commands/icons/utils.cjs +13 -0
- package/cjs/commands/icons/utils.d.ts +52 -0
- package/cjs/commands/index.cjs +84 -0
- package/cjs/commands/index.d.ts +2 -0
- package/cjs/commands/schema.cjs +8 -0
- package/cjs/commands/schema.d.ts +26 -0
- package/cjs/index.cjs +5 -0
- package/cjs/index.d.ts +2 -0
- package/esm/__chunks/46HGXFME.js +0 -0
- package/esm/__chunks/6G4PXXKF.js +75 -0
- package/esm/__chunks/EC6MPHID.js +22 -0
- package/esm/__chunks/FL7AILGH.js +133 -0
- package/esm/__chunks/G6WUCFLD.js +100 -0
- package/esm/__chunks/HJSXC6HP.js +117 -0
- package/esm/__chunks/LHVSSZI7.js +52 -0
- package/esm/__chunks/O262GK4B.js +401 -0
- package/esm/__chunks/SJXQJ7RS.js +92 -0
- package/esm/__chunks/SNCKIAOR.js +0 -0
- package/esm/commands/doppler/handler.d.ts +5 -0
- package/esm/commands/doppler/handler.js +9 -0
- package/esm/commands/doppler/index.d.ts +3 -0
- package/esm/commands/doppler/index.js +41 -0
- package/esm/commands/doppler/schema.d.ts +50 -0
- package/esm/commands/doppler/schema.js +8 -0
- package/esm/commands/doppler/utils/exec.d.ts +52 -0
- package/esm/commands/doppler/utils/exec.js +12 -0
- package/esm/commands/doppler/utils.d.ts +69 -0
- package/esm/commands/doppler/utils.js +30 -0
- package/esm/commands/icons/handler.d.ts +5 -0
- package/esm/commands/icons/handler.js +8 -0
- package/esm/commands/icons/index.d.ts +3 -0
- package/esm/commands/icons/index.js +31 -0
- package/esm/commands/icons/schema.d.ts +86 -0
- package/esm/commands/icons/schema.js +16 -0
- package/esm/commands/icons/utils.d.ts +52 -0
- package/esm/commands/icons/utils.js +13 -0
- package/esm/commands/index.d.ts +2 -0
- package/esm/commands/index.js +84 -0
- package/esm/commands/schema.d.ts +26 -0
- package/esm/commands/schema.js +8 -0
- package/esm/index.d.ts +2 -0
- package/esm/index.js +5 -0
- package/package.json +62 -0
- package/utils/input/package.json +8 -0
- package/utils/package/package.json +8 -0
- package/utils/validation/package.json +8 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _4SFWHCB3cjs = require('./4SFWHCB3.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _J36P6UNEcjs = require('./J36P6UNE.cjs');
|
|
10
|
+
|
|
11
|
+
// src/commands/icons/handler.js
|
|
12
|
+
var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
|
|
13
|
+
var _zod = require('zod');
|
|
14
|
+
async function iconsCommand(options) {
|
|
15
|
+
try {
|
|
16
|
+
const validatedOptions = _J36P6UNEcjs.iconsCommandOptionsSchema.parse(options);
|
|
17
|
+
if (validatedOptions.help) {
|
|
18
|
+
console.log(_chalk2.default.bold(`
|
|
19
|
+
Usage: mtn icons <input> [options]`));
|
|
20
|
+
console.log(_chalk2.default.gray(_J36P6UNEcjs.iconsCommandMetadata.description));
|
|
21
|
+
console.log(_chalk2.default.bold("\nOptions:"));
|
|
22
|
+
Object.entries(_J36P6UNEcjs.iconsCommandOptionsSchema.shape).forEach(
|
|
23
|
+
([key, fieldSchema]) => {
|
|
24
|
+
if (key === "input") return;
|
|
25
|
+
const description = fieldSchema.description || "No description available";
|
|
26
|
+
const optionMeta = (
|
|
27
|
+
/** @type {any} */
|
|
28
|
+
_J36P6UNEcjs.iconsCommandMetadata.options[key]
|
|
29
|
+
);
|
|
30
|
+
const defaultValue = _nullishCoalesce(_optionalChain([optionMeta, 'optionalAccess', _ => _.default]), () => ( false));
|
|
31
|
+
const alias = _optionalChain([optionMeta, 'optionalAccess', _2 => _2.alias]) ? _chalk2.default.cyan(`, -${optionMeta.alias}`) : "";
|
|
32
|
+
console.log(
|
|
33
|
+
_chalk2.default.cyan(` --${key}`) + alias + ` ${description} (default: ${defaultValue})`
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
console.log("");
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const { input, channels, iconTypes, verbose } = validatedOptions;
|
|
41
|
+
if (verbose) {
|
|
42
|
+
console.log(_chalk2.default.blue("\n\u{1F4F1} Icon Generation"));
|
|
43
|
+
console.log(_chalk2.default.gray(` Input directory: ${input}`));
|
|
44
|
+
console.log(_chalk2.default.gray(` Channels: ${channels.join(", ")}`));
|
|
45
|
+
console.log(_chalk2.default.gray(` Icon types: ${iconTypes.join(", ")}`));
|
|
46
|
+
}
|
|
47
|
+
_4SFWHCB3cjs.checkDependencies.call(void 0, verbose);
|
|
48
|
+
_4SFWHCB3cjs.validateBaseIcons.call(void 0, input, iconTypes, verbose);
|
|
49
|
+
const result = _4SFWHCB3cjs.generateAllIcons.call(void 0, {
|
|
50
|
+
baseDir: input,
|
|
51
|
+
channels,
|
|
52
|
+
iconTypes,
|
|
53
|
+
verbose
|
|
54
|
+
});
|
|
55
|
+
console.log(_chalk2.default.bold("\n\u{1F4CA} Summary:"));
|
|
56
|
+
console.log(
|
|
57
|
+
_chalk2.default.green(
|
|
58
|
+
` \u2713 Successfully generated: ${result.success.length} icon(s)`
|
|
59
|
+
)
|
|
60
|
+
);
|
|
61
|
+
if (result.failed.length > 0) {
|
|
62
|
+
console.log(_chalk2.default.red(` \u2717 Failed: ${result.failed.length} icon(s)`));
|
|
63
|
+
result.failed.forEach(({ icon, error }) => {
|
|
64
|
+
console.log(_chalk2.default.red(` - ${icon}: ${error}`));
|
|
65
|
+
});
|
|
66
|
+
process.exit(1);
|
|
67
|
+
}
|
|
68
|
+
console.log(_chalk2.default.green(`
|
|
69
|
+
\u2705 All icons generated successfully!`));
|
|
70
|
+
} catch (error) {
|
|
71
|
+
if (error instanceof _zod.ZodError) {
|
|
72
|
+
console.error(_chalk2.default.red(`
|
|
73
|
+
\u274C Invalid command options:`));
|
|
74
|
+
error.errors.forEach((err) => {
|
|
75
|
+
console.error(_chalk2.default.red(` ${err.path.join(".")}: ${err.message}`));
|
|
76
|
+
});
|
|
77
|
+
process.exit(1);
|
|
78
|
+
}
|
|
79
|
+
const verbose = (
|
|
80
|
+
/** @type {any} */
|
|
81
|
+
_optionalChain([options, 'optionalAccess', _3 => _3.verbose]) || false
|
|
82
|
+
);
|
|
83
|
+
console.error(_chalk2.default.red(`
|
|
84
|
+
\u274C Icon generation failed:`));
|
|
85
|
+
if (error instanceof Error) {
|
|
86
|
+
console.error(_chalk2.default.red(` ${error.message}`));
|
|
87
|
+
if (verbose && error.stack) {
|
|
88
|
+
console.error(_chalk2.default.gray("\nStack trace:"));
|
|
89
|
+
console.error(_chalk2.default.gray(error.stack));
|
|
90
|
+
}
|
|
91
|
+
} else {
|
|
92
|
+
console.error(_chalk2.default.red(` ${String(error)}`));
|
|
93
|
+
}
|
|
94
|
+
console.error(_chalk2.default.yellow("\n\u{1F4A1} Troubleshooting tips:"));
|
|
95
|
+
console.error(
|
|
96
|
+
_chalk2.default.yellow(
|
|
97
|
+
" \u2022 Ensure ImageMagick is installed (brew install imagemagick)"
|
|
98
|
+
)
|
|
99
|
+
);
|
|
100
|
+
console.error(
|
|
101
|
+
_chalk2.default.yellow(
|
|
102
|
+
" \u2022 Make sure icon.png and adaptive-icon.png exist in the input directory"
|
|
103
|
+
)
|
|
104
|
+
);
|
|
105
|
+
console.error(
|
|
106
|
+
_chalk2.default.yellow(" \u2022 Verify the input directory path is correct")
|
|
107
|
+
);
|
|
108
|
+
console.error(
|
|
109
|
+
_chalk2.default.yellow(" \u2022 Use --verbose for detailed error information\n")
|
|
110
|
+
);
|
|
111
|
+
process.exit(1);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
exports.iconsCommand = iconsCommand;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/commands/icons/schema.js
|
|
2
|
+
var _zod = require('zod');
|
|
3
|
+
var CHANNELS = ["dev", "staging", "test"];
|
|
4
|
+
var ICON_TYPES = ["icon", "adaptive-icon"];
|
|
5
|
+
var CHANNEL_TEXT_MAP = {
|
|
6
|
+
dev: "DEV",
|
|
7
|
+
local: "LOC",
|
|
8
|
+
staging: "STG",
|
|
9
|
+
test: "TST"
|
|
10
|
+
};
|
|
11
|
+
var ICON_SIZE_MAP = {
|
|
12
|
+
"adaptive-icon": 250,
|
|
13
|
+
icon: 378
|
|
14
|
+
};
|
|
15
|
+
var iconsCommandOptionsSchema = _zod.z.object({
|
|
16
|
+
input: _zod.z.string().describe(
|
|
17
|
+
"Path to the input image directory containing icon.png and adaptive-icon.png"
|
|
18
|
+
),
|
|
19
|
+
channels: _zod.z.array(_zod.z.enum(["dev", "local", "staging", "test"])).optional().default(["dev", "local", "staging", "test"]).describe("Channels to generate icons for"),
|
|
20
|
+
iconTypes: _zod.z.array(_zod.z.enum(["icon", "adaptive-icon"])).optional().default(["icon", "adaptive-icon"]).describe("Icon types to generate"),
|
|
21
|
+
verbose: _zod.z.boolean().optional().default(false).describe("Enable verbose logging for detailed error information"),
|
|
22
|
+
help: _zod.z.boolean().optional().default(false).describe("Display help for command")
|
|
23
|
+
});
|
|
24
|
+
var iconsCommandMetadata = {
|
|
25
|
+
name: "icons",
|
|
26
|
+
description: `Generate app channel version icons with overlay text
|
|
27
|
+
|
|
28
|
+
This command generates icon variants for different app channels (dev, local, staging, test)
|
|
29
|
+
by overlaying text on base icon images using ImageMagick.
|
|
30
|
+
|
|
31
|
+
Requirements:
|
|
32
|
+
\u2022 ImageMagick must be installed (brew install imagemagick)
|
|
33
|
+
\u2022 Base icons (icon.png, adaptive-icon.png) must exist in the input directory
|
|
34
|
+
|
|
35
|
+
Examples:
|
|
36
|
+
$ mtn icons ./apps/my-app/assets # Generate all channel icons
|
|
37
|
+
$ mtn icons ./assets -c dev,staging # Generate only dev and staging icons
|
|
38
|
+
$ mtn icons ./assets -t icon # Generate only standard icons
|
|
39
|
+
$ mtn icons ./assets -v # Verbose output`,
|
|
40
|
+
options: {
|
|
41
|
+
input: {
|
|
42
|
+
description: iconsCommandOptionsSchema.shape.input.description,
|
|
43
|
+
required: true
|
|
44
|
+
},
|
|
45
|
+
channels: {
|
|
46
|
+
description: iconsCommandOptionsSchema.shape.channels.description,
|
|
47
|
+
default: "dev,local,staging,test",
|
|
48
|
+
alias: "c"
|
|
49
|
+
},
|
|
50
|
+
iconTypes: {
|
|
51
|
+
description: iconsCommandOptionsSchema.shape.iconTypes.description,
|
|
52
|
+
default: "icon,adaptive-icon",
|
|
53
|
+
alias: "t"
|
|
54
|
+
},
|
|
55
|
+
verbose: {
|
|
56
|
+
description: iconsCommandOptionsSchema.shape.verbose.description,
|
|
57
|
+
default: false,
|
|
58
|
+
alias: "v"
|
|
59
|
+
},
|
|
60
|
+
help: {
|
|
61
|
+
description: iconsCommandOptionsSchema.shape.help.description,
|
|
62
|
+
default: false,
|
|
63
|
+
alias: "h"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
exports.CHANNELS = CHANNELS; exports.ICON_TYPES = ICON_TYPES; exports.CHANNEL_TEXT_MAP = CHANNEL_TEXT_MAP; exports.ICON_SIZE_MAP = ICON_SIZE_MAP; exports.iconsCommandOptionsSchema = iconsCommandOptionsSchema; exports.iconsCommandMetadata = iconsCommandMetadata;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }// src/commands/doppler/utils/exec.js
|
|
2
|
+
var _child_process = require('child_process');
|
|
3
|
+
var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
|
|
4
|
+
function exec(command, options = {}) {
|
|
5
|
+
const {
|
|
6
|
+
stdoutParser = "string",
|
|
7
|
+
throwOnError = true,
|
|
8
|
+
verbosity = "default",
|
|
9
|
+
stdio: userStdio,
|
|
10
|
+
...execSyncOptions
|
|
11
|
+
} = options;
|
|
12
|
+
try {
|
|
13
|
+
if (verbosity === "verbose") {
|
|
14
|
+
console.log(_chalk2.default.gray(` Executing: ${command}`));
|
|
15
|
+
}
|
|
16
|
+
let stdio;
|
|
17
|
+
if (userStdio) {
|
|
18
|
+
stdio = userStdio;
|
|
19
|
+
} else if (verbosity === "verbose") {
|
|
20
|
+
stdio = "inherit";
|
|
21
|
+
} else if (verbosity === "silent") {
|
|
22
|
+
stdio = "pipe";
|
|
23
|
+
} else {
|
|
24
|
+
stdio = ["pipe", "pipe", "pipe"];
|
|
25
|
+
}
|
|
26
|
+
const result = (
|
|
27
|
+
/** @type {string} */
|
|
28
|
+
_child_process.execSync.call(void 0, command, {
|
|
29
|
+
encoding: "utf-8",
|
|
30
|
+
stdio,
|
|
31
|
+
...execSyncOptions
|
|
32
|
+
})
|
|
33
|
+
);
|
|
34
|
+
if (stdio === "inherit") {
|
|
35
|
+
return stdoutParser === "string" ? "" : void 0;
|
|
36
|
+
}
|
|
37
|
+
if (!result || typeof result === "string" && !result.trim()) {
|
|
38
|
+
return stdoutParser === "string" ? "" : void 0;
|
|
39
|
+
}
|
|
40
|
+
switch (stdoutParser) {
|
|
41
|
+
case "json": {
|
|
42
|
+
try {
|
|
43
|
+
return JSON.parse(result);
|
|
44
|
+
} catch (parseError) {
|
|
45
|
+
if (throwOnError) {
|
|
46
|
+
throw new Error(
|
|
47
|
+
`Failed to parse JSON output: ${parseError.message}`
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
return void 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
case "number": {
|
|
54
|
+
const num = parseFloat(result.trim());
|
|
55
|
+
if (isNaN(num)) {
|
|
56
|
+
if (throwOnError) {
|
|
57
|
+
throw new Error(`Failed to parse number from output: ${result}`);
|
|
58
|
+
}
|
|
59
|
+
return void 0;
|
|
60
|
+
}
|
|
61
|
+
return num;
|
|
62
|
+
}
|
|
63
|
+
case "string":
|
|
64
|
+
default:
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
} catch (error) {
|
|
68
|
+
if (!throwOnError) {
|
|
69
|
+
return void 0;
|
|
70
|
+
}
|
|
71
|
+
if (error.stderr) {
|
|
72
|
+
throw new Error(error.stderr.toString());
|
|
73
|
+
}
|
|
74
|
+
throw error;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function execString(command, options = {}) {
|
|
78
|
+
return exec(command, { ...options, stdoutParser: "string" });
|
|
79
|
+
}
|
|
80
|
+
function execJson(command, options = {}) {
|
|
81
|
+
return exec(command, { ...options, stdoutParser: "json" });
|
|
82
|
+
}
|
|
83
|
+
function execNumber(command, options = {}) {
|
|
84
|
+
return exec(command, { ...options, stdoutParser: "number" });
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
exports.exec = exec; exports.execString = execString; exports.execJson = execJson; exports.execNumber = execNumber;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/commands/doppler/schema.js
|
|
2
|
+
var _zod = require('zod');
|
|
3
|
+
var dopplerCommandOptionsSchema = _zod.z.object({
|
|
4
|
+
action: _zod.z.enum(["download", "upload"], {
|
|
5
|
+
errorMap: () => ({
|
|
6
|
+
message: "Action must be either 'download' or 'upload'"
|
|
7
|
+
})
|
|
8
|
+
}).describe("Action to perform: download or upload configurations"),
|
|
9
|
+
environment: _zod.z.string().optional().default("dev").describe(
|
|
10
|
+
'Environment configuration to process (e.g., dev, stg, prd, or "all" for all configs)'
|
|
11
|
+
),
|
|
12
|
+
verbose: _zod.z.boolean().optional().default(false).describe("Enable verbose logging for detailed error information"),
|
|
13
|
+
help: _zod.z.boolean().optional().default(false).describe("Display help for command")
|
|
14
|
+
});
|
|
15
|
+
var dopplerCommandMetadata = {
|
|
16
|
+
name: "doppler",
|
|
17
|
+
description: `Manage Doppler configurations
|
|
18
|
+
|
|
19
|
+
Subcommands:
|
|
20
|
+
download Download configurations from Doppler to local .env files
|
|
21
|
+
upload Upload local .env files to Doppler (with confirmation prompt)
|
|
22
|
+
|
|
23
|
+
Examples:
|
|
24
|
+
$ @mtndev/cli doppler download # Download dev config to .env.dev
|
|
25
|
+
$ @mtndev/cli doppler download -e all # Download all configs
|
|
26
|
+
$ @mtndev/cli doppler download -e stg # Download staging config
|
|
27
|
+
$ @mtndev/cli doppler upload # Upload .env.dev to Doppler
|
|
28
|
+
$ @mtndev/cli doppler upload -e prd # Upload production config`,
|
|
29
|
+
options: {
|
|
30
|
+
environment: {
|
|
31
|
+
description: dopplerCommandOptionsSchema.shape.environment.description,
|
|
32
|
+
default: "dev",
|
|
33
|
+
alias: "t"
|
|
34
|
+
},
|
|
35
|
+
// Global options are included here for help display
|
|
36
|
+
verbose: {
|
|
37
|
+
description: dopplerCommandOptionsSchema.shape.verbose.description,
|
|
38
|
+
default: false,
|
|
39
|
+
alias: "v"
|
|
40
|
+
},
|
|
41
|
+
help: {
|
|
42
|
+
description: dopplerCommandOptionsSchema.shape.help.description,
|
|
43
|
+
default: false,
|
|
44
|
+
alias: "h"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
exports.dopplerCommandOptionsSchema = dopplerCommandOptionsSchema; exports.dopplerCommandMetadata = dopplerCommandMetadata;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _HFSXD6YEcjs = require('../../__chunks/HFSXD6YE.cjs');
|
|
4
|
+
require('../../__chunks/EMMC33QA.cjs');
|
|
5
|
+
require('../../__chunks/NIMXXHJQ.cjs');
|
|
6
|
+
require('../../__chunks/QBNNK2WX.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.dopplerCommand = _HFSXD6YEcjs.dopplerCommand;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../__chunks/WNJ3ZYLI.cjs');
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _HFSXD6YEcjs = require('../../__chunks/HFSXD6YE.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
var _EMMC33QAcjs = require('../../__chunks/EMMC33QA.cjs');
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
var _NIMXXHJQcjs = require('../../__chunks/NIMXXHJQ.cjs');
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
var _QBNNK2WXcjs = require('../../__chunks/QBNNK2WX.cjs');
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
exports.checkDependencies = _EMMC33QAcjs.checkDependencies; exports.createDiff = _EMMC33QAcjs.createDiff; exports.dopplerCommand = _HFSXD6YEcjs.dopplerCommand; exports.dopplerCommandMetadata = _QBNNK2WXcjs.dopplerCommandMetadata; exports.dopplerCommandOptionsSchema = _QBNNK2WXcjs.dopplerCommandOptionsSchema; exports.downloadConfigs = _EMMC33QAcjs.downloadConfigs; exports.exec = _NIMXXHJQcjs.exec; exports.execDoppler = _EMMC33QAcjs.execDoppler; exports.execJson = _NIMXXHJQcjs.execJson; exports.execNumber = _NIMXXHJQcjs.execNumber; exports.execString = _NIMXXHJQcjs.execString; exports.getConfigs = _EMMC33QAcjs.getConfigs; exports.normalizeEscapeSequences = _EMMC33QAcjs.normalizeEscapeSequences; exports.promptConfirmation = _EMMC33QAcjs.promptConfirmation; exports.uploadConfigs = _EMMC33QAcjs.uploadConfigs;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _QBNNK2WXcjs = require('../../__chunks/QBNNK2WX.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
exports.dopplerCommandMetadata = _QBNNK2WXcjs.dopplerCommandMetadata; exports.dopplerCommandOptionsSchema = _QBNNK2WXcjs.dopplerCommandOptionsSchema;
|
|
@@ -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,12 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _NIMXXHJQcjs = require('../../../__chunks/NIMXXHJQ.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.exec = _NIMXXHJQcjs.exec; exports.execJson = _NIMXXHJQcjs.execJson; exports.execNumber = _NIMXXHJQcjs.execNumber; exports.execString = _NIMXXHJQcjs.execString;
|
|
@@ -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,30 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _EMMC33QAcjs = require('../../__chunks/EMMC33QA.cjs');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
var _NIMXXHJQcjs = require('../../__chunks/NIMXXHJQ.cjs');
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
exports.checkDependencies = _EMMC33QAcjs.checkDependencies; exports.createDiff = _EMMC33QAcjs.createDiff; exports.downloadConfigs = _EMMC33QAcjs.downloadConfigs; exports.exec = _NIMXXHJQcjs.exec; exports.execDoppler = _EMMC33QAcjs.execDoppler; exports.execJson = _NIMXXHJQcjs.execJson; exports.execNumber = _NIMXXHJQcjs.execNumber; exports.execString = _NIMXXHJQcjs.execString; exports.getConfigs = _EMMC33QAcjs.getConfigs; exports.normalizeEscapeSequences = _EMMC33QAcjs.normalizeEscapeSequences; exports.promptConfirmation = _EMMC33QAcjs.promptConfirmation; exports.uploadConfigs = _EMMC33QAcjs.uploadConfigs;
|
|
@@ -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,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _INFOPAHNcjs = require('../../__chunks/INFOPAHN.cjs');
|
|
4
|
+
require('../../__chunks/4SFWHCB3.cjs');
|
|
5
|
+
require('../../__chunks/J36P6UNE.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
exports.iconsCommand = _INFOPAHNcjs.iconsCommand;
|