@jujulego/jill 1.1.15 → 1.1.19
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/dist/commands/each.command.d.ts +16 -0
- package/dist/commands/each.command.d.ts.map +1 -0
- package/dist/commands/each.command.js +203 -0
- package/dist/commands/each.command.js.map +1 -0
- package/dist/commands/info.command.d.ts +8 -0
- package/dist/commands/info.command.d.ts.map +1 -0
- package/dist/commands/info.command.js +178 -0
- package/dist/commands/info.command.js.map +1 -0
- package/dist/commands/list.command.d.ts +21 -0
- package/dist/commands/list.command.d.ts.map +1 -0
- package/dist/commands/list.command.js +251 -0
- package/dist/commands/list.command.js.map +1 -0
- package/dist/commands/run.command.d.ts +12 -0
- package/dist/commands/run.command.d.ts.map +1 -0
- package/dist/commands/run.command.js +111 -0
- package/dist/commands/run.command.js.map +1 -0
- package/dist/index.d.ts +4 -9
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -26
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +53 -134
- package/dist/main.js.map +1 -0
- package/dist/myr/commands/kill.command.d.ts +10 -0
- package/dist/myr/commands/kill.command.d.ts.map +1 -0
- package/dist/myr/commands/kill.command.js +89 -0
- package/dist/myr/commands/kill.command.js.map +1 -0
- package/dist/myr/commands/list.command.d.ts +17 -0
- package/dist/myr/commands/list.command.d.ts.map +1 -0
- package/dist/myr/commands/list.command.js +167 -0
- package/dist/myr/commands/list.command.js.map +1 -0
- package/dist/myr/commands/logs.command.d.ts +10 -0
- package/dist/myr/commands/logs.command.d.ts.map +1 -0
- package/dist/myr/commands/logs.command.js +165 -0
- package/dist/myr/commands/logs.command.js.map +1 -0
- package/dist/myr/commands/spawn.command.d.ts +10 -0
- package/dist/myr/commands/spawn.command.d.ts.map +1 -0
- package/dist/myr/commands/spawn.command.js +84 -0
- package/dist/myr/commands/spawn.command.js.map +1 -0
- package/dist/myr/commands/stop.command.d.ts +6 -0
- package/dist/myr/commands/stop.command.d.ts.map +1 -0
- package/dist/myr/commands/stop.command.js +80 -0
- package/dist/myr/commands/stop.command.js.map +1 -0
- package/dist/myr/myr-client.d.ts +11 -5
- package/dist/myr/myr-client.d.ts.map +1 -0
- package/dist/myr/myr-client.js +291 -368
- package/dist/myr/myr-client.js.map +1 -0
- package/dist/myr/myr.command.d.ts +8 -0
- package/dist/myr/myr.command.d.ts.map +1 -0
- package/dist/myr/myr.command.js +42 -0
- package/dist/myr/myr.command.js.map +1 -0
- package/dist/myr/myr.process.d.ts.map +1 -0
- package/dist/myr/myr.process.js +41 -6
- package/dist/myr/myr.process.js.map +1 -0
- package/dist/myr/watch.command.d.ts +12 -0
- package/dist/myr/watch.command.d.ts.map +1 -0
- package/dist/myr/watch.command.js +169 -0
- package/dist/myr/watch.command.js.map +1 -0
- package/dist/task-logger.d.ts.map +1 -0
- package/dist/task-logger.js +28 -17
- package/dist/task-logger.js.map +1 -0
- package/package.json +29 -23
- package/dist/commands/each.d.ts +0 -12
- package/dist/commands/each.js +0 -74
- package/dist/commands/info.d.ts +0 -5
- package/dist/commands/info.js +0 -42
- package/dist/commands/list.d.ts +0 -15
- package/dist/commands/list.js +0 -119
- package/dist/commands/run.d.ts +0 -9
- package/dist/commands/run.js +0 -43
- package/dist/filters/affected.d.ts +0 -10
- package/dist/filters/affected.js +0 -81
- package/dist/filters/filter.d.ts +0 -8
- package/dist/filters/filter.js +0 -35
- package/dist/filters/index.d.ts +0 -2
- package/dist/filters/index.js +0 -21
- package/dist/logger.d.ts +0 -32
- package/dist/logger.js +0 -189
- package/dist/myr/command.d.ts +0 -2
- package/dist/myr/command.js +0 -52
- package/dist/myr/commands/kill.d.ts +0 -5
- package/dist/myr/commands/kill.js +0 -34
- package/dist/myr/commands/list.d.ts +0 -10
- package/dist/myr/commands/list.js +0 -91
- package/dist/myr/commands/spawn.d.ts +0 -7
- package/dist/myr/commands/spawn.js +0 -39
- package/dist/myr/commands/stop.d.ts +0 -2
- package/dist/myr/commands/stop.js +0 -31
- package/dist/myr/watch.d.ts +0 -8
- package/dist/myr/watch.js +0 -79
- package/dist/pipeline.d.ts +0 -9
- package/dist/pipeline.js +0 -52
- package/dist/utils/cli-list.d.ts +0 -15
- package/dist/utils/cli-list.js +0 -86
- package/dist/utils/deps-tree.d.ts +0 -2
- package/dist/utils/deps-tree.js +0 -51
- package/dist/wrapper.d.ts +0 -9
- package/dist/wrapper.js +0 -38
package/dist/utils/cli-list.js
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.CliList = void 0;
|
|
7
|
-
|
|
8
|
-
var _chalk = _interopRequireDefault(require("chalk"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
|
-
|
|
14
|
-
// Class
|
|
15
|
-
class CliList {
|
|
16
|
-
constructor() {
|
|
17
|
-
_defineProperty(this, "_headers", void 0);
|
|
18
|
-
|
|
19
|
-
_defineProperty(this, "_data", []);
|
|
20
|
-
|
|
21
|
-
_defineProperty(this, "_columns", []);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Methods
|
|
25
|
-
static _capitalize(txt) {
|
|
26
|
-
return txt.charAt(0).toUpperCase() + txt.substring(1).toLowerCase();
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
static _length(txt) {
|
|
30
|
-
return txt.replace(/\033\[[^m]*m/g, '').length;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
_updateColumns(data) {
|
|
34
|
-
// Add missing columns
|
|
35
|
-
while (data.length > this._columns.length) {
|
|
36
|
-
this._columns.push(0);
|
|
37
|
-
} // Update columns
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
for (let i = 0; i < data.length; ++i) {
|
|
41
|
-
this._columns[i] = Math.max(this._columns[i], CliList._length(data[i]));
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
_formatValue(value, idx) {
|
|
46
|
-
return value + ' '.repeat(this._columns[idx] - CliList._length(value));
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
setHeaders(headers) {
|
|
50
|
-
this._updateColumns(headers);
|
|
51
|
-
|
|
52
|
-
this._headers = headers.map(CliList._capitalize);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
add(data) {
|
|
56
|
-
this._updateColumns(data);
|
|
57
|
-
|
|
58
|
-
this._data.push(data);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
*lines() {
|
|
62
|
-
if (this._headers) {
|
|
63
|
-
yield this._headers.map((v, i) => _chalk.default.bold(this._formatValue(v, i))).join(' ');
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
for (const data of this._data) {
|
|
67
|
-
yield data.map((v, i) => this._formatValue(v, i)).join(' ');
|
|
68
|
-
}
|
|
69
|
-
} // Properties
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
get columns() {
|
|
73
|
-
return this._columns;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
get headers() {
|
|
77
|
-
return this._headers || [];
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
get data() {
|
|
81
|
-
return this._data;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
exports.CliList = CliList;
|
package/dist/utils/deps-tree.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.printDepsTree = printDepsTree;
|
|
7
|
-
|
|
8
|
-
var _chalk = _interopRequireDefault(require("chalk"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
// Functions
|
|
13
|
-
async function printTree(wks, level, dev, printed) {
|
|
14
|
-
const workspaces = [];
|
|
15
|
-
|
|
16
|
-
for await (const dep of wks.dependencies()) {
|
|
17
|
-
workspaces.push([dep, dev]);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
for await (const dep of wks.devDependencies()) {
|
|
21
|
-
workspaces.push([dep, true]);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
for (let i = 0; i < workspaces.length; ++i) {
|
|
25
|
-
const [dep, isDev] = workspaces[i];
|
|
26
|
-
const isPrinted = printed.has(dep.cwd);
|
|
27
|
-
const isLast = i === workspaces.length - 1; // Format
|
|
28
|
-
|
|
29
|
-
let name = dep.name;
|
|
30
|
-
if (dep.version) name = (0, _chalk.default)`${name}{grey @${dep.version}}`;
|
|
31
|
-
if (isDev) name = _chalk.default.blue(`${name} (dev)`);
|
|
32
|
-
if (isPrinted) name = _chalk.default.italic(name);
|
|
33
|
-
const branchFmt = dev ? _chalk.default.blue : s => s;
|
|
34
|
-
console.log(`${level}${branchFmt(`${isLast ? '└' : '├'}─ `)}${name}`); // Print deps of dep
|
|
35
|
-
|
|
36
|
-
if (!isPrinted) {
|
|
37
|
-
printed.add(dep.cwd);
|
|
38
|
-
await printTree(dep, level + (isLast ? ' ' : branchFmt('│ ')), isDev, printed);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
async function printDepsTree(wks) {
|
|
44
|
-
console.log((0, _chalk.default)`{bold Dependencies:}`);
|
|
45
|
-
const printed = new Set([wks.name]);
|
|
46
|
-
await printTree(wks, '', false, printed);
|
|
47
|
-
|
|
48
|
-
if (printed.size === 1) {
|
|
49
|
-
console.log(_chalk.default.grey(` No dependencies for ${wks.name}`));
|
|
50
|
-
}
|
|
51
|
-
}
|
package/dist/wrapper.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PackageManager, Project } from '@jujulego/jill-core';
|
|
2
|
-
import type { Arguments } from 'yargs';
|
|
3
|
-
export interface CommonArgs {
|
|
4
|
-
project?: string;
|
|
5
|
-
'package-manager'?: PackageManager;
|
|
6
|
-
verbose: number;
|
|
7
|
-
}
|
|
8
|
-
export declare type CommandHandler<A = Record<string, never>> = (project: Project, argv: A) => Promise<number | void>;
|
|
9
|
-
export declare function commandHandler<A = Record<string, never>>(handler: CommandHandler<A>): (argv: Arguments<A & CommonArgs>) => Promise<void>;
|
package/dist/wrapper.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.commandHandler = commandHandler;
|
|
7
|
-
|
|
8
|
-
var _jillCore = require("@jujulego/jill-core");
|
|
9
|
-
|
|
10
|
-
var _logger = require("./logger");
|
|
11
|
-
|
|
12
|
-
// Wrapper
|
|
13
|
-
function commandHandler(handler) {
|
|
14
|
-
return async function (argv) {
|
|
15
|
-
// Setup
|
|
16
|
-
if (argv.verbose === 1) {
|
|
17
|
-
_logger.logger.level = 'verbose';
|
|
18
|
-
} else if (argv.verbose >= 2) {
|
|
19
|
-
_logger.logger.level = 'debug';
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (!argv.project) {
|
|
23
|
-
argv.project = await _jillCore.Project.searchProjectRoot(process.cwd());
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const prj = new _jillCore.Project(argv.project, {
|
|
27
|
-
packageManager: argv['package-manager']
|
|
28
|
-
}); // Run command
|
|
29
|
-
|
|
30
|
-
try {
|
|
31
|
-
process.exit((await handler(prj, argv)) || 0);
|
|
32
|
-
} catch (error) {
|
|
33
|
-
_logger.logger.fail(error);
|
|
34
|
-
|
|
35
|
-
process.exit(1);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
}
|