depflow 3.0.0-dev.11 → 3.0.0-dev.12
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/README.md +493 -162
- package/dist/cli/Actions.d.ts +187 -0
- package/dist/cli/Actions.js +793 -0
- package/dist/cli/Actions.js.map +1 -0
- package/dist/cli/CLI.d.ts +15 -2
- package/dist/cli/CLI.js +19 -2
- package/dist/cli/CLI.js.map +1 -1
- package/dist/cli/DepflowCLI.d.ts +62 -0
- package/dist/cli/DepflowCLI.js +229 -0
- package/dist/cli/DepflowCLI.js.map +1 -0
- package/dist/cli/bin.js +27 -32
- package/dist/cli/bin.js.map +1 -1
- package/dist/config/Config.d.ts +1 -1
- package/dist/dependency/DepUtils.d.ts +35 -7
- package/dist/dependency/DepUtils.js +64 -13
- package/dist/dependency/DepUtils.js.map +1 -1
- package/dist/schema/Config/Config.d.ts +1 -1
- package/dist/schema/Config/Dependency.d.ts +3 -3
- package/dist/schema/Config/Dependency.js +3 -3
- package/dist/schema/Config/Dependency.js.map +1 -1
- package/package.json +3 -2
- package/dist/cli/DepFLowCLI.d.ts +0 -93
- package/dist/cli/DepFLowCLI.js +0 -413
- package/dist/cli/DepFLowCLI.js.map +0 -1
package/dist/cli/DepFLowCLI.js
DELETED
|
@@ -1,413 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author NetFeez <netfeez.dev@gmail.com>.
|
|
3
|
-
* @description Main CLI surface: dependency management commands, builds and config conversions.
|
|
4
|
-
* @license Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { Logger } from "@netfeez/vterm";
|
|
7
|
-
import { Path } from "@netfeez/common-node";
|
|
8
|
-
import CLI from "./CLI.js";
|
|
9
|
-
import Group from "../task/Group.js";
|
|
10
|
-
import OutputPolicy from "../task/OutputPolicy.js";
|
|
11
|
-
import DepUtils from "../dependency/DepUtils.js";
|
|
12
|
-
import GitDependency from "../dependency/GitDependency.js";
|
|
13
|
-
import PathResolver from "../resolve/PathResolver.js";
|
|
14
|
-
import Config from "../config/Config.js";
|
|
15
|
-
import schema from "../schema/schema.js";
|
|
16
|
-
import TSConfig from "../config/TSConfig.js";
|
|
17
|
-
import ImportMap from "../config/ImportMap.js";
|
|
18
|
-
import NpmDependency from "../dependency/NpmDependency.js";
|
|
19
|
-
import Builder from "../builder/Builder.js";
|
|
20
|
-
import Flags from "./Flags.js";
|
|
21
|
-
/** The flags accepted by every command of the CLI. **/
|
|
22
|
-
export const options = new Flags({
|
|
23
|
-
flow: {
|
|
24
|
-
type: 'string',
|
|
25
|
-
default: 'depflow.yml',
|
|
26
|
-
aliases: ['p', 'f'],
|
|
27
|
-
description: 'Path to the configuration file the command operates on.'
|
|
28
|
-
},
|
|
29
|
-
watch: {
|
|
30
|
-
type: 'boolean',
|
|
31
|
-
default: false,
|
|
32
|
-
aliases: ['w'],
|
|
33
|
-
description: 'Keeps watching the built files and rewrites their paths on every change.'
|
|
34
|
-
},
|
|
35
|
-
cdn: {
|
|
36
|
-
type: 'boolean',
|
|
37
|
-
default: false,
|
|
38
|
-
description: 'Resolves the dependency paths to their CDN target instead of their local one.'
|
|
39
|
-
},
|
|
40
|
-
verbose: {
|
|
41
|
-
type: 'boolean',
|
|
42
|
-
default: false,
|
|
43
|
-
aliases: ['v'],
|
|
44
|
-
description: 'Streams the output of every command as it runs, attributed to the command that wrote it, instead of only reporting how each of them ended. The indentation of that output is lost, and the complete buffer of every command reaches the evidence file whether this flag is given or not.'
|
|
45
|
-
},
|
|
46
|
-
silent: {
|
|
47
|
-
type: 'boolean',
|
|
48
|
-
default: false,
|
|
49
|
-
description: 'Says only what failed, one line per failed command. It silences the progress of DepFlow itself, such as "Installing dependencies...", and not the help, which belongs to the console interface. The exit status and the evidence file are the same as in any other mode.'
|
|
50
|
-
},
|
|
51
|
-
decorate: {
|
|
52
|
-
type: 'boolean',
|
|
53
|
-
default: true,
|
|
54
|
-
description: 'Draws boxes, indentation, timestamps, levels and names around what is reported. --decorate=false leaves the content alone and keeps the color of the markers and the diagnostics, which carry information and are not decoration.'
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
export class DepFlowCLI extends CLI {
|
|
58
|
-
configPath;
|
|
59
|
-
projectRoot;
|
|
60
|
-
constructor(configPath = 'depFlow.yml') {
|
|
61
|
-
super(options.declaration, {
|
|
62
|
-
name: 'C-UI',
|
|
63
|
-
title: '&C1DepFlow &C5CLI &C6by NetFeez',
|
|
64
|
-
prompt: '&C5[DepFlow] << &C6&S'
|
|
65
|
-
});
|
|
66
|
-
this.configPath = configPath;
|
|
67
|
-
const absoluteConfigPath = Path.resolve(process.cwd(), this.configPath);
|
|
68
|
-
this.projectRoot = Path.dirname(absoluteConfigPath);
|
|
69
|
-
this.addCommand('add', this.commandAdd, {
|
|
70
|
-
usage: 'dep add <repo_url> [name]',
|
|
71
|
-
description: 'Add a dependency to the configuration file.',
|
|
72
|
-
args: {
|
|
73
|
-
repo_url: { description: 'URL of the git repository to add.' },
|
|
74
|
-
name: { description: 'Name to register the dependency under; derived from the repository URL when it is omitted.', required: false }
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
this.addCommand('remove', this.commandRemove, {
|
|
78
|
-
usage: 'dep remove <name> | <repo_url>',
|
|
79
|
-
description: 'Remove a dependency from the configuration file and uninstall its files.',
|
|
80
|
-
args: {
|
|
81
|
-
identifier: { description: 'Name or repository URL of the dependency to remove.' }
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
this.addCommand('install', this.commandInstall, {
|
|
85
|
-
usage: 'dep install [name1 name2 ...]',
|
|
86
|
-
description: 'Install dependencies. If names are provided, only those dependencies will be installed.',
|
|
87
|
-
args: {
|
|
88
|
-
names: { description: 'Names of the dependencies to install; every dependency when none is given.', required: false, variadic: true }
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
this.addCommand('run', this.commandRun, {
|
|
92
|
-
usage: 'dep run <script>',
|
|
93
|
-
description: 'Run a custom action defined in the configuration file.',
|
|
94
|
-
args: {
|
|
95
|
-
script: { description: 'Name of the action declared in the configuration file.' }
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
this.addCommand('list', this.list, { usage: 'dep list', description: 'List all dependencies in the configuration file.' });
|
|
99
|
-
this.addCommand('rewrite-paths', this.rewritePaths, { usage: 'dep rewrite-paths [--watch] [--cdn]', description: 'Rewrite the paths of the built files of outDir according to the resolver entries of the configuration.' });
|
|
100
|
-
this.addCommand('sync', this.commandSync, { usage: 'dep sync', description: 'Write the resolver entries into the paths of the declared tsconfig and into the declared importmap.' });
|
|
101
|
-
this.addCommand('json-to-yaml', this.convert, {
|
|
102
|
-
usage: 'dep json-to-yaml [output.yaml]',
|
|
103
|
-
description: 'Convert the depflow config file from JSON to YAML.',
|
|
104
|
-
args: {
|
|
105
|
-
output: { description: 'Path of the YAML file to write; derived from the config file name when it is omitted.', required: false }
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
this.addCommand('yaml-to-json', this.convert, {
|
|
109
|
-
usage: 'dep yaml-to-json [output.json]',
|
|
110
|
-
description: 'Convert the depflow config file from YAML to JSON.',
|
|
111
|
-
args: {
|
|
112
|
-
output: { description: 'Path of the JSON file to write; derived from the config file name when it is omitted.', required: false }
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
/** Absolute path of the flow directory (`.depflow`) under the project root. **/
|
|
117
|
-
get flowDirectory() { return Path.join(this.projectRoot, '.depflow'); }
|
|
118
|
-
/**
|
|
119
|
-
* The policy the run is presented through, built for the mode the flags asked for.
|
|
120
|
-
* @param flags - The flags of the command being run.
|
|
121
|
-
* @returns The policy of the run, never `null`: the evidence is written whether it is asked for or not.
|
|
122
|
-
*
|
|
123
|
-
* @remarks The policy is also what settles the channel the lifecycle of the CLI is reported through, so
|
|
124
|
-
* every command asks for it first and reports through `policy.report`: a `silent` run that said
|
|
125
|
-
* "Installing dependencies..." would not be silent, and an undecorated run would still draw boxes
|
|
126
|
-
* around lines that carry nothing but what they say.
|
|
127
|
-
*
|
|
128
|
-
* @remarks A command reports through the policy and not through `this.out`, which belongs to the
|
|
129
|
-
* console interface DepFlow was built on: the help, the prompt and the verdict of an invocation are
|
|
130
|
-
* drawn by surfaces DepFlow does not own, and they stay visible in every mode.
|
|
131
|
-
*
|
|
132
|
-
* @example
|
|
133
|
-
* ```ts
|
|
134
|
-
* const policy = this.policy(flags);
|
|
135
|
-
* const out = policy.report;
|
|
136
|
-
* if (policy.decoration === 'on') out.group(Group.create('#FFB4DC'));
|
|
137
|
-
* ```
|
|
138
|
-
*/
|
|
139
|
-
policy(flags) {
|
|
140
|
-
return new OutputPolicy({
|
|
141
|
-
logger: new Logger({ name: 'depflow', save: true }),
|
|
142
|
-
name: 'depflow',
|
|
143
|
-
verbose: flags.verbose,
|
|
144
|
-
silent: flags.silent,
|
|
145
|
-
decorate: flags.decorate
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
async commandAdd(command, args, flags = options.defaults) {
|
|
149
|
-
const policy = this.policy(flags);
|
|
150
|
-
const out = policy.report;
|
|
151
|
-
const boxed = policy.decoration === 'on';
|
|
152
|
-
try {
|
|
153
|
-
if (boxed)
|
|
154
|
-
out.group(Group.create('#FFB4DC'));
|
|
155
|
-
let [repo, name] = args;
|
|
156
|
-
out.info(`Adding dependency...`);
|
|
157
|
-
DepUtils.repo(repo);
|
|
158
|
-
if (!name)
|
|
159
|
-
name = DepUtils.getRepoName(repo);
|
|
160
|
-
const dep = schema.Dependency.GitDependency.process({ name, repo });
|
|
161
|
-
const config = await Config.load(this.configPath);
|
|
162
|
-
const taken = config.data.dependencies.some(existing => existing.name === dep.name);
|
|
163
|
-
if (taken)
|
|
164
|
-
throw new Error(`A dependency named "${dep.name}" already exists, remove it first or add this one with another name.`);
|
|
165
|
-
config.data.dependencies.push(dep);
|
|
166
|
-
await config.save();
|
|
167
|
-
out.info(`Added dependency "${dep.name}".`);
|
|
168
|
-
}
|
|
169
|
-
finally {
|
|
170
|
-
if (boxed)
|
|
171
|
-
out.end();
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
async commandRemove(command, args, flags = options.defaults) {
|
|
175
|
-
const policy = this.policy(flags);
|
|
176
|
-
const out = policy.report;
|
|
177
|
-
const boxed = policy.decoration === 'on';
|
|
178
|
-
try {
|
|
179
|
-
if (boxed)
|
|
180
|
-
out.group(Group.create('#FFB4DC'));
|
|
181
|
-
const [identifier] = args;
|
|
182
|
-
if (!identifier)
|
|
183
|
-
throw new Error('Usage: dep remove <name> | <repo_url>');
|
|
184
|
-
const config = await Config.load(this.configPath);
|
|
185
|
-
const gitMatches = config.data.dependencies.filter(dep => dep.name === identifier || dep.repo === identifier);
|
|
186
|
-
const npmMatches = config.data.npmDependencies.filter(dep => dep.name === identifier);
|
|
187
|
-
if (gitMatches.length + npmMatches.length === 0)
|
|
188
|
-
throw new Error(`Dependency "${identifier}" not found.`);
|
|
189
|
-
for (const dep of gitMatches)
|
|
190
|
-
await new GitDependency(this.flowDirectory, this.projectRoot, dep, out).uninstall();
|
|
191
|
-
for (const dep of npmMatches)
|
|
192
|
-
await new NpmDependency(this.flowDirectory, this.projectRoot, dep, out).uninstall();
|
|
193
|
-
config.data.dependencies = config.data.dependencies.filter(dep => dep.name !== identifier && dep.repo !== identifier);
|
|
194
|
-
config.data.npmDependencies = config.data.npmDependencies.filter(dep => dep.name !== identifier);
|
|
195
|
-
await config.save();
|
|
196
|
-
out.info(`Removed dependency "${identifier}".`);
|
|
197
|
-
}
|
|
198
|
-
finally {
|
|
199
|
-
if (boxed)
|
|
200
|
-
out.end();
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
async commandInstall(command, args, flags = options.defaults) {
|
|
204
|
-
const policy = this.policy(flags);
|
|
205
|
-
const out = policy.report;
|
|
206
|
-
const boxed = policy.decoration === 'on';
|
|
207
|
-
try {
|
|
208
|
-
if (boxed)
|
|
209
|
-
out.group(Group.create('#FFB4DC'));
|
|
210
|
-
const config = await Config.load(this.configPath);
|
|
211
|
-
const gitDependencies = config.data.dependencies;
|
|
212
|
-
const npmDependencies = config.data.npmDependencies;
|
|
213
|
-
if (gitDependencies.length + npmDependencies.length === 0)
|
|
214
|
-
throw new Error(args.length > 0 ? 'Specified dependencies not found.' : 'No dependencies to install.');
|
|
215
|
-
const names = new Set(args);
|
|
216
|
-
const gitTargets = args.length > 0 ? gitDependencies.filter(dep => names.has(dep.name)) : gitDependencies;
|
|
217
|
-
const npmTargets = args.length > 0 ? npmDependencies.filter(dep => names.has(dep.name)) : npmDependencies;
|
|
218
|
-
if (args.length > 0 && gitTargets.length + npmTargets.length === 0)
|
|
219
|
-
throw new Error('Specified dependencies not found.');
|
|
220
|
-
out.info(`&C5Installing dependencies...`);
|
|
221
|
-
for (const dep of gitTargets) {
|
|
222
|
-
try {
|
|
223
|
-
if (boxed)
|
|
224
|
-
out.group(Group.create('#FFB4DC'));
|
|
225
|
-
out.info(`&C5Installing &C6"${dep.name}" &C5from &C6${dep.repo}&C5...`);
|
|
226
|
-
out.line();
|
|
227
|
-
const dependency = new GitDependency(this.flowDirectory, this.projectRoot, dep, out, policy);
|
|
228
|
-
await dependency.install();
|
|
229
|
-
out.line();
|
|
230
|
-
out.info(`&C2Installed &C6${dep.name}.`);
|
|
231
|
-
}
|
|
232
|
-
finally {
|
|
233
|
-
if (boxed)
|
|
234
|
-
out.end();
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
for (const dep of npmTargets) {
|
|
238
|
-
try {
|
|
239
|
-
if (boxed)
|
|
240
|
-
out.group(Group.create('#FFB4DC'));
|
|
241
|
-
out.info(`&C5Installing npm dependency &C6"${dep.name}" &C5version &C6${dep.version}&C5...`);
|
|
242
|
-
out.line();
|
|
243
|
-
const dependency = new NpmDependency(this.flowDirectory, this.projectRoot, dep, out, policy);
|
|
244
|
-
await dependency.install();
|
|
245
|
-
out.line();
|
|
246
|
-
out.info(`&C2Installed npm dependency &C6${dep.name}.`);
|
|
247
|
-
}
|
|
248
|
-
finally {
|
|
249
|
-
if (boxed)
|
|
250
|
-
out.end();
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
await this.commandSync('sync', [], flags, policy);
|
|
254
|
-
}
|
|
255
|
-
finally {
|
|
256
|
-
if (boxed)
|
|
257
|
-
out.end();
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
async commandRun(command, args, flags = options.defaults) {
|
|
261
|
-
const policy = this.policy(flags);
|
|
262
|
-
const out = policy.report;
|
|
263
|
-
const boxed = policy.decoration === 'on';
|
|
264
|
-
try {
|
|
265
|
-
const [actionName] = args;
|
|
266
|
-
if (!actionName)
|
|
267
|
-
throw new Error('Usage: dep run <action>');
|
|
268
|
-
if (boxed)
|
|
269
|
-
out.group(Group.create('#FFB4DC'));
|
|
270
|
-
out.info(`&C5Running action &C6${actionName}&C5...`);
|
|
271
|
-
const config = await Config.load(this.configPath);
|
|
272
|
-
const action = config.data.actions[actionName];
|
|
273
|
-
if (!action)
|
|
274
|
-
throw new Error(`action "${actionName}" not found in configuration.`);
|
|
275
|
-
const pipeline = Array.isArray(action) ? action : [action];
|
|
276
|
-
const builder = new Builder({
|
|
277
|
-
cwd: this.projectRoot,
|
|
278
|
-
projectRoot: this.projectRoot,
|
|
279
|
-
pipeline,
|
|
280
|
-
logger: out,
|
|
281
|
-
policy
|
|
282
|
-
});
|
|
283
|
-
await builder.run();
|
|
284
|
-
}
|
|
285
|
-
finally {
|
|
286
|
-
if (boxed)
|
|
287
|
-
out.end();
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
async list(command, args, flags = options.defaults) {
|
|
291
|
-
const policy = this.policy(flags);
|
|
292
|
-
const out = policy.report;
|
|
293
|
-
const boxed = policy.decoration === 'on';
|
|
294
|
-
if (boxed)
|
|
295
|
-
out.group(Group.create('#FFB4DC'));
|
|
296
|
-
try {
|
|
297
|
-
const config = await Config.load(this.configPath);
|
|
298
|
-
if (config.data.dependencies.length + config.data.npmDependencies.length === 0) {
|
|
299
|
-
out.info(`No dependencies found.`);
|
|
300
|
-
}
|
|
301
|
-
for (const dep of config.data.dependencies) {
|
|
302
|
-
const state = await new GitDependency(this.flowDirectory, this.projectRoot, dep).isInstalled()
|
|
303
|
-
? `&C2installed&R` : `&C3missing&R`;
|
|
304
|
-
out.info(`&C6${dep.name} &C7from &C2${dep.repo} &C7(${state}&C7)`);
|
|
305
|
-
}
|
|
306
|
-
for (const dep of config.data.npmDependencies) {
|
|
307
|
-
const state = await new NpmDependency(this.flowDirectory, this.projectRoot, dep).isInstalled()
|
|
308
|
-
? `&C2installed&R` : `&C3missing&R`;
|
|
309
|
-
out.info(`&C6${dep.name} &C7v&C2${dep.version} &C7(${state}&C7)`);
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
finally {
|
|
313
|
-
if (boxed)
|
|
314
|
-
out.end();
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
async rewritePaths(command, args, flags = options.defaults) {
|
|
318
|
-
const policy = this.policy(flags);
|
|
319
|
-
const out = policy.report;
|
|
320
|
-
const boxed = policy.decoration === 'on';
|
|
321
|
-
if (boxed)
|
|
322
|
-
out.group(Group.create('#FFB4DC'));
|
|
323
|
-
try {
|
|
324
|
-
const { watch, cdn } = flags;
|
|
325
|
-
const config = await Config.load(this.configPath);
|
|
326
|
-
const mode = cdn ? 'cdn' : 'local';
|
|
327
|
-
out.info(`Mode: &C3${cdn ? 'CDN' : 'Local'}`);
|
|
328
|
-
if (watch)
|
|
329
|
-
out.info(`Watcher: &C2Enabled`);
|
|
330
|
-
const resolver = new PathResolver(config.data, this.projectRoot, { logger: out });
|
|
331
|
-
if (watch)
|
|
332
|
-
await resolver.watch(mode);
|
|
333
|
-
else
|
|
334
|
-
await resolver.rewritePaths(mode);
|
|
335
|
-
}
|
|
336
|
-
finally {
|
|
337
|
-
if (boxed)
|
|
338
|
-
out.end();
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
async commandSync(command, args, flags = options.defaults, caller = this.policy(flags)) {
|
|
342
|
-
const policy = caller;
|
|
343
|
-
const out = policy.report;
|
|
344
|
-
const boxed = policy.decoration === 'on';
|
|
345
|
-
try {
|
|
346
|
-
if (boxed)
|
|
347
|
-
out.group(Group.create('#FFB4DC'));
|
|
348
|
-
out.info(`Synchronizing configurations...`);
|
|
349
|
-
const { cdn } = flags;
|
|
350
|
-
const mode = cdn ? 'cdn' : 'local';
|
|
351
|
-
const config = await Config.load(this.configPath);
|
|
352
|
-
const resolver = new PathResolver(config.data, this.projectRoot, { logger: out });
|
|
353
|
-
const tsconfigFile = config.data.tsconfig;
|
|
354
|
-
const importMapFile = config.data.importmap;
|
|
355
|
-
const tsconfigPath = Path.join(this.projectRoot, tsconfigFile || 'tsconfig.json');
|
|
356
|
-
const importMapPath = Path.join(this.projectRoot, importMapFile || 'importmap.json');
|
|
357
|
-
if (tsconfigFile) {
|
|
358
|
-
const tsconfig = await TSConfig.load(tsconfigPath, { logger: out });
|
|
359
|
-
tsconfig.updatePaths(resolver.aliases);
|
|
360
|
-
await tsconfig.save();
|
|
361
|
-
}
|
|
362
|
-
else
|
|
363
|
-
out.warn(`No tsconfig file specified in configuration. Skipping tsconfig synchronization.`);
|
|
364
|
-
if (importMapFile) {
|
|
365
|
-
const importmap = await ImportMap.load(importMapPath, { logger: out });
|
|
366
|
-
importmap.updateImports(resolver.aliases, mode);
|
|
367
|
-
await importmap.save();
|
|
368
|
-
}
|
|
369
|
-
else
|
|
370
|
-
out.warn(`No import map file specified in configuration. Skipping import map synchronization.`);
|
|
371
|
-
out.info(`&C2Successfully synced all configurations.`);
|
|
372
|
-
}
|
|
373
|
-
finally {
|
|
374
|
-
if (boxed)
|
|
375
|
-
out.end();
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
/**
|
|
379
|
-
* Converts the depflow config file between JSON and YAML.
|
|
380
|
-
* @param command - The invoked command name ('json-to-yaml' or 'yaml-to-json').
|
|
381
|
-
* @param args - Optional output file path.
|
|
382
|
-
* @param flags - The flags of the command being run, which settle how the conversion is reported.
|
|
383
|
-
*/
|
|
384
|
-
async convert(command, args, flags = options.defaults) {
|
|
385
|
-
const policy = this.policy(flags);
|
|
386
|
-
const out = policy.report;
|
|
387
|
-
const boxed = policy.decoration === 'on';
|
|
388
|
-
try {
|
|
389
|
-
if (boxed)
|
|
390
|
-
out.group(Group.create('#FFB4DC'));
|
|
391
|
-
const to = command === 'json-to-yaml' ? 'yaml' : 'json';
|
|
392
|
-
const input = this.configPath;
|
|
393
|
-
const inputExt = Path.extName(input).toLowerCase();
|
|
394
|
-
const isJsonInput = inputExt === '.json';
|
|
395
|
-
const isYamlInput = inputExt === '.yaml' || inputExt === '.yml';
|
|
396
|
-
if (!isJsonInput && !isYamlInput)
|
|
397
|
-
throw new Error(`Unsupported config file extension: ${inputExt}`);
|
|
398
|
-
if (isYamlInput === (to === 'yaml'))
|
|
399
|
-
throw new Error(`Config file is already ${to}: ${input}`);
|
|
400
|
-
const config = await Config.load(input);
|
|
401
|
-
const [output] = args;
|
|
402
|
-
const outPath = output || Path.join(this.projectRoot, `${Path.fileName(input, false)}.${to}`);
|
|
403
|
-
await config.save(outPath);
|
|
404
|
-
out.info(`&C2Converted &C4${Path.fileName(input)} &C7→&R &C4${Path.fileName(outPath)} &C2(&C3${to.toUpperCase()}&C2).`);
|
|
405
|
-
}
|
|
406
|
-
finally {
|
|
407
|
-
if (boxed)
|
|
408
|
-
out.end();
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
export default DepFlowCLI;
|
|
413
|
-
//# sourceMappingURL=DepFLowCLI.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DepFLowCLI.js","sourceRoot":"","sources":["../../src/cli/DepFLowCLI.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAE5C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