@jujulego/jill 1.1.16 → 1.2.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/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/core.plugin.d.ts +2 -0
- package/dist/core.plugin.d.ts.map +1 -0
- package/dist/core.plugin.js +22 -0
- package/dist/core.plugin.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 +45 -141
- package/dist/main.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 +38 -25
- 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/myr-client.d.ts +0 -16
- package/dist/myr/myr-client.js +0 -455
- package/dist/myr/myr.process.d.ts +0 -1
- package/dist/myr/myr.process.js +0 -42
- 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
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ListCommand = void 0;
|
|
7
|
+
|
|
8
|
+
var _jillCommon = require("@jujulego/jill-common");
|
|
9
|
+
|
|
10
|
+
var _chalk = _interopRequireDefault(require("chalk"));
|
|
11
|
+
|
|
12
|
+
var _slugify = _interopRequireDefault(require("slugify"));
|
|
13
|
+
|
|
14
|
+
var _path = _interopRequireDefault(require("path"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
19
|
+
function adopt(value) {
|
|
20
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
21
|
+
resolve(value);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
26
|
+
function fulfilled(value) {
|
|
27
|
+
try {
|
|
28
|
+
step(generator.next(value));
|
|
29
|
+
} catch (e) {
|
|
30
|
+
reject(e);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function rejected(value) {
|
|
35
|
+
try {
|
|
36
|
+
step(generator["throw"](value));
|
|
37
|
+
} catch (e) {
|
|
38
|
+
reject(e);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function step(result) {
|
|
43
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
var __asyncValues = void 0 && (void 0).__asyncValues || function (o) {
|
|
51
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
52
|
+
var m = o[Symbol.asyncIterator],
|
|
53
|
+
i;
|
|
54
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
|
|
55
|
+
return this;
|
|
56
|
+
}, i);
|
|
57
|
+
|
|
58
|
+
function verb(n) {
|
|
59
|
+
i[n] = o[n] && function (v) {
|
|
60
|
+
return new Promise(function (resolve, reject) {
|
|
61
|
+
v = o[n](v), settle(resolve, reject, v.done, v.value);
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function settle(resolve, reject, d, v) {
|
|
67
|
+
Promise.resolve(v).then(function (v) {
|
|
68
|
+
resolve({
|
|
69
|
+
value: v,
|
|
70
|
+
done: d
|
|
71
|
+
});
|
|
72
|
+
}, reject);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
// Constants
|
|
77
|
+
const LONG_ATTRIBUTES = ['name', 'version', 'root'];
|
|
78
|
+
const JSON_ATTRIBUTES = ['name', 'version', 'slug', 'root'];
|
|
79
|
+
const DEFAULT_ATTRIBUTES = ['name'];
|
|
80
|
+
const EXTRACTORS = {
|
|
81
|
+
name: wks => wks.name,
|
|
82
|
+
version: (wks, json) => wks.manifest.version || (json ? undefined : _chalk.default.grey('unset')),
|
|
83
|
+
root: wks => wks.cwd,
|
|
84
|
+
slug: wks => (0, _slugify.default)(wks.name)
|
|
85
|
+
}; // Command
|
|
86
|
+
|
|
87
|
+
class ListCommand extends _jillCommon.ProjectCommand {
|
|
88
|
+
constructor() {
|
|
89
|
+
super(...arguments); // Attributes
|
|
90
|
+
|
|
91
|
+
this.name = ['list', 'ls'];
|
|
92
|
+
this.description = 'List workspaces';
|
|
93
|
+
} // Methods
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
buildExtractor(attrs) {
|
|
97
|
+
return (wks, json) => {
|
|
98
|
+
const data = {};
|
|
99
|
+
|
|
100
|
+
for (const attr of attrs) {
|
|
101
|
+
data[attr] = EXTRACTORS[attr](wks, json);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return data;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
define(builder) {
|
|
109
|
+
return super.define(y => builder(y).option('private', {
|
|
110
|
+
type: 'boolean',
|
|
111
|
+
group: 'Filters:',
|
|
112
|
+
desc: 'Print only private workspaces'
|
|
113
|
+
}).option('with-script', {
|
|
114
|
+
type: 'array',
|
|
115
|
+
string: true,
|
|
116
|
+
group: 'Filters:',
|
|
117
|
+
desc: 'Print only workspaces having the given script'
|
|
118
|
+
}).option('affected', {
|
|
119
|
+
alias: 'a',
|
|
120
|
+
type: 'string',
|
|
121
|
+
coerce: rev => rev === '' ? 'master' : rev,
|
|
122
|
+
group: 'Affected:',
|
|
123
|
+
desc: 'Print only affected workspaces towards given git revision. If no revision is given, it will check towards master.\n' + 'Replaces %name by workspace name.'
|
|
124
|
+
}).option('affected-rev-sort', {
|
|
125
|
+
type: 'string',
|
|
126
|
+
group: 'Affected:',
|
|
127
|
+
desc: 'Sort applied to git tag / git branch command'
|
|
128
|
+
}).option('affected-rev-fallback', {
|
|
129
|
+
type: 'string',
|
|
130
|
+
default: 'master',
|
|
131
|
+
group: 'Affected:',
|
|
132
|
+
desc: 'Fallback revision, used if no revision matching the given format is found'
|
|
133
|
+
}).option('attrs', {
|
|
134
|
+
type: 'array',
|
|
135
|
+
choices: ['name', 'version', 'root', 'slug'],
|
|
136
|
+
default: [],
|
|
137
|
+
group: 'Format:',
|
|
138
|
+
desc: 'Select printed attributes'
|
|
139
|
+
}).option('headers', {
|
|
140
|
+
type: 'boolean',
|
|
141
|
+
group: 'Format:',
|
|
142
|
+
desc: 'Prints columns headers'
|
|
143
|
+
}).option('long', {
|
|
144
|
+
alias: 'l',
|
|
145
|
+
type: 'boolean',
|
|
146
|
+
group: 'Format:',
|
|
147
|
+
desc: 'Prints name, version and root of all workspaces'
|
|
148
|
+
}).option('json', {
|
|
149
|
+
type: 'boolean',
|
|
150
|
+
group: 'Format:',
|
|
151
|
+
desc: 'Prints data as a JSON array'
|
|
152
|
+
}));
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
run(args) {
|
|
156
|
+
const _super = Object.create(null, {
|
|
157
|
+
run: {
|
|
158
|
+
get: () => super.run
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
var e_1, _a;
|
|
163
|
+
|
|
164
|
+
var _b;
|
|
165
|
+
|
|
166
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
167
|
+
yield _super.run.call(this, args); // Setup pipeline
|
|
168
|
+
|
|
169
|
+
const pipeline = new _jillCommon.Pipeline();
|
|
170
|
+
|
|
171
|
+
if (args.private !== undefined) {
|
|
172
|
+
pipeline.add(_jillCommon.Filter.privateWorkspace(args.private));
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (args['with-script'] !== undefined) {
|
|
176
|
+
pipeline.add(_jillCommon.Filter.scripts(args['with-script']));
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
if (args.affected !== undefined) {
|
|
180
|
+
pipeline.add(new _jillCommon.AffectedFilter(args.affected, args['affected-rev-fallback'], args['affected-rev-sort']));
|
|
181
|
+
} // Filter
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
const workspaces = [];
|
|
185
|
+
|
|
186
|
+
try {
|
|
187
|
+
for (var _c = __asyncValues(pipeline.filter(this.project.workspaces())), _d; _d = yield _c.next(), !_d.done;) {
|
|
188
|
+
const wks = _d.value;
|
|
189
|
+
workspaces.push(wks);
|
|
190
|
+
}
|
|
191
|
+
} catch (e_1_1) {
|
|
192
|
+
e_1 = {
|
|
193
|
+
error: e_1_1
|
|
194
|
+
};
|
|
195
|
+
} finally {
|
|
196
|
+
try {
|
|
197
|
+
if (_d && !_d.done && (_a = _c.return)) yield _a.call(_c);
|
|
198
|
+
} finally {
|
|
199
|
+
if (e_1) throw e_1.error;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
this.spinner.stop(); // Build data
|
|
204
|
+
|
|
205
|
+
let attrs = args.attrs;
|
|
206
|
+
|
|
207
|
+
if (args.attrs.length === 0) {
|
|
208
|
+
if (args.long) {
|
|
209
|
+
attrs = LONG_ATTRIBUTES;
|
|
210
|
+
} else if (args.json) {
|
|
211
|
+
attrs = JSON_ATTRIBUTES;
|
|
212
|
+
} else {
|
|
213
|
+
attrs = DEFAULT_ATTRIBUTES;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const data = workspaces.map(wks => this.buildExtractor(attrs)(wks, args.json || false)); // Print data
|
|
218
|
+
|
|
219
|
+
if (args.json) {
|
|
220
|
+
if (process.stdout.isTTY) {
|
|
221
|
+
// Pretty print for ttys
|
|
222
|
+
this.log(JSON.stringify(data, null, 2));
|
|
223
|
+
} else {
|
|
224
|
+
this.log(JSON.stringify(data));
|
|
225
|
+
}
|
|
226
|
+
} else {
|
|
227
|
+
const list = new _jillCommon.CliList();
|
|
228
|
+
|
|
229
|
+
if ((_b = args.headers) !== null && _b !== void 0 ? _b : attrs.length > 1) {
|
|
230
|
+
list.setHeaders(attrs);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
for (const d of data) {
|
|
234
|
+
if (d.root) {
|
|
235
|
+
d.root = _path.default.relative(process.cwd(), d.root) || '.';
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
list.add(attrs.map(attr => d[attr] || ''));
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
for (const d of list.lines()) {
|
|
242
|
+
this.log(d);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
exports.ListCommand = ListCommand;
|
|
251
|
+
//# sourceMappingURL=list.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["commands/list.command.ts","commands/list.command.js"],"names":["__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","Promise","reject","fulfilled","step","next","e","rejected","result","done","then","apply","__asyncValues","o","Symbol","asyncIterator","TypeError","m","i","call","__values","iterator","verb","n","v","settle","d","LONG_ATTRIBUTES","JSON_ATTRIBUTES","DEFAULT_ATTRIBUTES","EXTRACTORS","name","wks","version","json","manifest","undefined","chalk","grey","root","cwd","slug","ListCommand","ProjectCommand","constructor","arguments","description","buildExtractor","attrs","data","attr","define","builder","y","option","type","group","desc","string","alias","coerce","rev","default","choices","run","args","_super","Object","create","get","e_1","_a","_b","pipeline","Pipeline","private","add","Filter","privateWorkspace","scripts","affected","AffectedFilter","workspaces","_c","filter","project","_d","push","e_1_1","error","return","spinner","stop","length","long","map","process","stdout","isTTY","log","JSON","stringify","list","CliList","headers","set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AK,MAAMtB,CAAX,IAAgBuB,IAAhB,EAAsB;AACpB,cAAIvB,CAAC,CAACa,IAAN,EAAY;AACVb,YAAAA,CAAC,CAACa,IAAF,GAASmE,cAAKC,QAAL,CAAcX,OAAO,CAACxD,GAAR,EAAd,EAA6Bd,CAAC,CAACa,IAA/B,KAAwC,GAAjD;AACD;;AAED+D,UAAAA,IAAI,CAAC1B,GAAL,CAAS5B,KAAK,CAAC+C,GAAN,CAAU7C,IAAI,IAAIxB,CAAC,CAACwB,IAAD,CAAD,IAAW,EAA7B,CAAT;AACD;;AAED,aAAK,MAAMxB,CAAX,IAAgB4E,IAAI,CAACM,KAAL,EAAhB,EAA8B;AAC5B,eAAKT,GAAL,CAASzE,CAAT;AACD;AACF;ACTI,KAnEe,CAAhB;AD6EL;;AApJsD","file":"list.command.js","sourcesContent":["import { AffectedFilter, Arguments, Builder, CliList, Filter, Pipeline, ProjectArgs, ProjectCommand } from '@jujulego/jill-common';\nimport { Workspace } from '@jujulego/jill-core';\nimport chalk from 'chalk';\nimport slugify from 'slugify';\nimport path from 'path';\n\n// Types\nexport type Attribute = 'name' | 'version' | 'root' | 'slug';\nexport type Data = Partial<Record<Attribute, string>>;\n\ntype Extractor<T> = (wks: Workspace, json: boolean) => T;\n\nexport interface ListArgs extends ProjectArgs {\n private: boolean | undefined;\n 'with-script': string[] | undefined;\n\n affected: string | undefined;\n 'affected-rev-sort': string | undefined;\n 'affected-rev-fallback': string;\n\n attrs: Attribute[];\n headers: boolean | undefined;\n long: boolean | undefined;\n json: boolean | undefined;\n}\n\n// Constants\nconst LONG_ATTRIBUTES: Attribute[] = ['name', 'version', 'root'];\nconst JSON_ATTRIBUTES: Attribute[] = ['name', 'version', 'slug', 'root'];\nconst DEFAULT_ATTRIBUTES: Attribute[] = ['name'];\n\nconst EXTRACTORS: Record<Attribute, Extractor<string | undefined>> = {\n name: wks => wks.name,\n version: (wks, json) => wks.manifest.version || (json ? undefined : chalk.grey('unset')),\n root: wks => wks.cwd,\n slug: wks => slugify(wks.name)\n};\n\n// Command\nexport class ListCommand extends ProjectCommand<ListArgs> {\n // Attributes\n readonly name = ['list', 'ls'];\n readonly description = 'List workspaces';\n\n // Methods\n private buildExtractor(attrs: Attribute[]): Extractor<Data> {\n return (wks, json: boolean) => {\n const data: Data = {};\n\n for (const attr of attrs) {\n data[attr] = EXTRACTORS[attr](wks, json);\n }\n\n return data;\n };\n }\n\n protected define<U>(builder: Builder<U>): Builder<U & ListArgs> {\n return super.define(y => builder(y)\n .option('private', {\n type: 'boolean',\n group: 'Filters:',\n desc: 'Print only private workspaces',\n })\n .option('with-script', {\n type: 'array',\n string: true,\n group: 'Filters:',\n desc: 'Print only workspaces having the given script',\n })\n .option('affected', {\n alias: 'a',\n type: 'string',\n coerce: (rev: string) => rev === '' ? 'master' : rev,\n group: 'Affected:',\n desc: 'Print only affected workspaces towards given git revision. If no revision is given, it will check towards master.\\n' +\n 'Replaces %name by workspace name.',\n })\n .option('affected-rev-sort', {\n type: 'string',\n group: 'Affected:',\n desc: 'Sort applied to git tag / git branch command',\n })\n .option('affected-rev-fallback', {\n type: 'string',\n default: 'master',\n group: 'Affected:',\n desc: 'Fallback revision, used if no revision matching the given format is found',\n })\n .option('attrs', {\n type: 'array',\n choices: ['name', 'version', 'root', 'slug'],\n default: [] as Attribute[],\n group: 'Format:',\n desc: 'Select printed attributes'\n })\n .option('headers', {\n type: 'boolean',\n group: 'Format:',\n desc: 'Prints columns headers'\n })\n .option('long', {\n alias: 'l',\n type: 'boolean',\n group: 'Format:',\n desc: 'Prints name, version and root of all workspaces',\n })\n .option('json', {\n type: 'boolean',\n group: 'Format:',\n desc: 'Prints data as a JSON array',\n })\n );\n }\n\n protected async run(args: Arguments<ListArgs>): Promise<number | void> {\n await super.run(args);\n\n // Setup pipeline\n const pipeline = new Pipeline();\n\n if (args.private !== undefined) {\n pipeline.add(Filter.privateWorkspace(args.private));\n }\n\n if (args['with-script'] !== undefined) {\n pipeline.add(Filter.scripts(args['with-script']));\n }\n\n if (args.affected !== undefined) {\n pipeline.add(new AffectedFilter(\n args.affected,\n args['affected-rev-fallback'],\n args['affected-rev-sort']\n ));\n }\n\n // Filter\n const workspaces: Workspace[] = [];\n\n for await (const wks of pipeline.filter(this.project.workspaces())) {\n workspaces.push(wks);\n }\n\n this.spinner.stop();\n\n // Build data\n let attrs = args.attrs;\n\n if (args.attrs.length === 0) {\n if (args.long) {\n attrs = LONG_ATTRIBUTES;\n } else if (args.json) {\n attrs = JSON_ATTRIBUTES;\n } else {\n attrs = DEFAULT_ATTRIBUTES;\n }\n }\n\n const data = workspaces.map(wks => this.buildExtractor(attrs)(wks, args.json || false));\n\n // Print data\n if (args.json) {\n if (process.stdout.isTTY) { // Pretty print for ttys\n this.log(JSON.stringify(data, null, 2));\n } else {\n this.log(JSON.stringify(data));\n }\n } else {\n const list = new CliList();\n\n if (args.headers ?? (attrs.length > 1)) {\n list.setHeaders(attrs);\n }\n\n for (const d of data) {\n if (d.root) {\n d.root = path.relative(process.cwd(), d.root) || '.';\n }\n\n list.add(attrs.map(attr => d[attr] || ''));\n }\n\n for (const d of list.lines()) {\n this.log(d);\n }\n }\n }\n}\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __asyncValues = (this && this.__asyncValues) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n};\nimport { AffectedFilter, CliList, Filter, Pipeline, ProjectCommand } from '@jujulego/jill-common';\nimport chalk from 'chalk';\nimport slugify from 'slugify';\nimport path from 'path';\n// Constants\nconst LONG_ATTRIBUTES = ['name', 'version', 'root'];\nconst JSON_ATTRIBUTES = ['name', 'version', 'slug', 'root'];\nconst DEFAULT_ATTRIBUTES = ['name'];\nconst EXTRACTORS = {\n name: wks => wks.name,\n version: (wks, json) => wks.manifest.version || (json ? undefined : chalk.grey('unset')),\n root: wks => wks.cwd,\n slug: wks => slugify(wks.name)\n};\n// Command\nexport class ListCommand extends ProjectCommand {\n constructor() {\n super(...arguments);\n // Attributes\n this.name = ['list', 'ls'];\n this.description = 'List workspaces';\n }\n // Methods\n buildExtractor(attrs) {\n return (wks, json) => {\n const data = {};\n for (const attr of attrs) {\n data[attr] = EXTRACTORS[attr](wks, json);\n }\n return data;\n };\n }\n define(builder) {\n return super.define(y => builder(y)\n .option('private', {\n type: 'boolean',\n group: 'Filters:',\n desc: 'Print only private workspaces',\n })\n .option('with-script', {\n type: 'array',\n string: true,\n group: 'Filters:',\n desc: 'Print only workspaces having the given script',\n })\n .option('affected', {\n alias: 'a',\n type: 'string',\n coerce: (rev) => rev === '' ? 'master' : rev,\n group: 'Affected:',\n desc: 'Print only affected workspaces towards given git revision. If no revision is given, it will check towards master.\\n' +\n 'Replaces %name by workspace name.',\n })\n .option('affected-rev-sort', {\n type: 'string',\n group: 'Affected:',\n desc: 'Sort applied to git tag / git branch command',\n })\n .option('affected-rev-fallback', {\n type: 'string',\n default: 'master',\n group: 'Affected:',\n desc: 'Fallback revision, used if no revision matching the given format is found',\n })\n .option('attrs', {\n type: 'array',\n choices: ['name', 'version', 'root', 'slug'],\n default: [],\n group: 'Format:',\n desc: 'Select printed attributes'\n })\n .option('headers', {\n type: 'boolean',\n group: 'Format:',\n desc: 'Prints columns headers'\n })\n .option('long', {\n alias: 'l',\n type: 'boolean',\n group: 'Format:',\n desc: 'Prints name, version and root of all workspaces',\n })\n .option('json', {\n type: 'boolean',\n group: 'Format:',\n desc: 'Prints data as a JSON array',\n }));\n }\n run(args) {\n const _super = Object.create(null, {\n run: { get: () => super.run }\n });\n var e_1, _a;\n var _b;\n return __awaiter(this, void 0, void 0, function* () {\n yield _super.run.call(this, args);\n // Setup pipeline\n const pipeline = new Pipeline();\n if (args.private !== undefined) {\n pipeline.add(Filter.privateWorkspace(args.private));\n }\n if (args['with-script'] !== undefined) {\n pipeline.add(Filter.scripts(args['with-script']));\n }\n if (args.affected !== undefined) {\n pipeline.add(new AffectedFilter(args.affected, args['affected-rev-fallback'], args['affected-rev-sort']));\n }\n // Filter\n const workspaces = [];\n try {\n for (var _c = __asyncValues(pipeline.filter(this.project.workspaces())), _d; _d = yield _c.next(), !_d.done;) {\n const wks = _d.value;\n workspaces.push(wks);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) yield _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n this.spinner.stop();\n // Build data\n let attrs = args.attrs;\n if (args.attrs.length === 0) {\n if (args.long) {\n attrs = LONG_ATTRIBUTES;\n }\n else if (args.json) {\n attrs = JSON_ATTRIBUTES;\n }\n else {\n attrs = DEFAULT_ATTRIBUTES;\n }\n }\n const data = workspaces.map(wks => this.buildExtractor(attrs)(wks, args.json || false));\n // Print data\n if (args.json) {\n if (process.stdout.isTTY) { // Pretty print for ttys\n this.log(JSON.stringify(data, null, 2));\n }\n else {\n this.log(JSON.stringify(data));\n }\n }\n else {\n const list = new CliList();\n if ((_b = args.headers) !== null && _b !== void 0 ? _b : (attrs.length > 1)) {\n list.setHeaders(attrs);\n }\n for (const d of data) {\n if (d.root) {\n d.root = path.relative(process.cwd(), d.root) || '.';\n }\n list.add(attrs.map(attr => d[attr] || ''));\n }\n for (const d of list.lines()) {\n this.log(d);\n }\n }\n });\n }\n}"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Arguments, Builder, WorkspaceArgs, WorkspaceCommand } from '@jujulego/jill-common';
|
|
2
|
+
import { WorkspaceDepsMode } from '@jujulego/jill-core';
|
|
3
|
+
export interface RunArgs extends WorkspaceArgs {
|
|
4
|
+
script: string;
|
|
5
|
+
'deps-mode': WorkspaceDepsMode;
|
|
6
|
+
}
|
|
7
|
+
export declare class RunCommand extends WorkspaceCommand<RunArgs> {
|
|
8
|
+
readonly name = "run <script>";
|
|
9
|
+
readonly description = "Run script inside workspace";
|
|
10
|
+
protected define<U>(builder: Builder<U>): Builder<U & RunArgs>;
|
|
11
|
+
protected run(args: Arguments<RunArgs>): Promise<number>;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["commands/run.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC5F,OAAO,EAAW,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAKjE,MAAM,WAAW,OAAQ,SAAQ,aAAa;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,iBAAiB,CAAC;CAChC;AAGD,qBAAa,UAAW,SAAQ,gBAAgB,CAAC,OAAO,CAAC;IAEvD,QAAQ,CAAC,IAAI,kBAAkB;IAC/B,QAAQ,CAAC,WAAW,iCAAiC;IAGrD,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC;cAc9C,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;CAqB/D","file":"run.command.d.ts","sourcesContent":["import { Arguments, Builder, WorkspaceArgs, WorkspaceCommand } from '@jujulego/jill-common';\nimport { TaskSet, WorkspaceDepsMode } from '@jujulego/jill-core';\n\nimport { TaskLogger } from '../task-logger';\n\n// Types\nexport interface RunArgs extends WorkspaceArgs {\n script: string;\n 'deps-mode': WorkspaceDepsMode;\n}\n\n// Command\nexport class RunCommand extends WorkspaceCommand<RunArgs> {\n // Attributes\n readonly name = 'run <script>';\n readonly description = 'Run script inside workspace';\n\n // Methods\n protected define<U>(builder: Builder<U>): Builder<U & RunArgs> {\n return super.define(y => builder(y)\n .positional('script', { type: 'string', demandOption: true })\n .option('deps-mode', {\n choice: ['all', 'prod', 'none'],\n default: 'all' as WorkspaceDepsMode,\n desc: 'Dependency selection mode:\\n' +\n ' - all = dependencies AND devDependencies\\n' +\n ' - prod = dependencies\\n' +\n ' - none = nothing'\n })\n );\n }\n\n protected async run(args: Arguments<RunArgs>): Promise<number> {\n await super.run(args);\n this.spinner.stop();\n\n // Run build task\n const set = new TaskSet();\n const task = await this.workspace.run(args.script, args['--']?.map(arg => arg.toString()), {\n buildDeps: args['deps-mode']\n });\n set.add(task);\n\n const tlogger = new TaskLogger();\n tlogger.on('spin-simple', (tsk) => tsk === task ? `Running ${args.script} in ${this.workspace.name} ...` : `Building ${tsk.context.workspace?.name} ...`);\n tlogger.on('fail', (tsk) => tsk === task ? `${args.script} failed` : `Failed to build ${tsk.context.workspace?.name}`);\n tlogger.on('succeed', (tsk) => tsk === task ? `${this.workspace.name} ${args.script} done` : `${tsk.context.workspace?.name} built`);\n tlogger.connect(set);\n\n set.start();\n const [result] = await set.waitFor('finished');\n return result.failed === 0 ? 0 : 1;\n }\n}\n"]}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.RunCommand = void 0;
|
|
7
|
+
|
|
8
|
+
var _jillCommon = require("@jujulego/jill-common");
|
|
9
|
+
|
|
10
|
+
var _jillCore = require("@jujulego/jill-core");
|
|
11
|
+
|
|
12
|
+
var _taskLogger = require("../task-logger");
|
|
13
|
+
|
|
14
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) {
|
|
16
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
17
|
+
resolve(value);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
22
|
+
function fulfilled(value) {
|
|
23
|
+
try {
|
|
24
|
+
step(generator.next(value));
|
|
25
|
+
} catch (e) {
|
|
26
|
+
reject(e);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function rejected(value) {
|
|
31
|
+
try {
|
|
32
|
+
step(generator["throw"](value));
|
|
33
|
+
} catch (e) {
|
|
34
|
+
reject(e);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function step(result) {
|
|
39
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// Command
|
|
47
|
+
class RunCommand extends _jillCommon.WorkspaceCommand {
|
|
48
|
+
constructor() {
|
|
49
|
+
super(...arguments); // Attributes
|
|
50
|
+
|
|
51
|
+
this.name = 'run <script>';
|
|
52
|
+
this.description = 'Run script inside workspace';
|
|
53
|
+
} // Methods
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
define(builder) {
|
|
57
|
+
return super.define(y => builder(y).positional('script', {
|
|
58
|
+
type: 'string',
|
|
59
|
+
demandOption: true
|
|
60
|
+
}).option('deps-mode', {
|
|
61
|
+
choice: ['all', 'prod', 'none'],
|
|
62
|
+
default: 'all',
|
|
63
|
+
desc: 'Dependency selection mode:\n' + ' - all = dependencies AND devDependencies\n' + ' - prod = dependencies\n' + ' - none = nothing'
|
|
64
|
+
}));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
run(args) {
|
|
68
|
+
const _super = Object.create(null, {
|
|
69
|
+
run: {
|
|
70
|
+
get: () => super.run
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
var _a;
|
|
75
|
+
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
yield _super.run.call(this, args);
|
|
78
|
+
this.spinner.stop(); // Run build task
|
|
79
|
+
|
|
80
|
+
const set = new _jillCore.TaskSet();
|
|
81
|
+
const task = yield this.workspace.run(args.script, (_a = args['--']) === null || _a === void 0 ? void 0 : _a.map(arg => arg.toString()), {
|
|
82
|
+
buildDeps: args['deps-mode']
|
|
83
|
+
});
|
|
84
|
+
set.add(task);
|
|
85
|
+
const tlogger = new _taskLogger.TaskLogger();
|
|
86
|
+
tlogger.on('spin-simple', tsk => {
|
|
87
|
+
var _a;
|
|
88
|
+
|
|
89
|
+
return tsk === task ? `Running ${args.script} in ${this.workspace.name} ...` : `Building ${(_a = tsk.context.workspace) === null || _a === void 0 ? void 0 : _a.name} ...`;
|
|
90
|
+
});
|
|
91
|
+
tlogger.on('fail', tsk => {
|
|
92
|
+
var _a;
|
|
93
|
+
|
|
94
|
+
return tsk === task ? `${args.script} failed` : `Failed to build ${(_a = tsk.context.workspace) === null || _a === void 0 ? void 0 : _a.name}`;
|
|
95
|
+
});
|
|
96
|
+
tlogger.on('succeed', tsk => {
|
|
97
|
+
var _a;
|
|
98
|
+
|
|
99
|
+
return tsk === task ? `${this.workspace.name} ${args.script} done` : `${(_a = tsk.context.workspace) === null || _a === void 0 ? void 0 : _a.name} built`;
|
|
100
|
+
});
|
|
101
|
+
tlogger.connect(set);
|
|
102
|
+
set.start();
|
|
103
|
+
const [result] = yield set.waitFor('finished');
|
|
104
|
+
return result.failed === 0 ? 0 : 1;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
exports.RunCommand = RunCommand;
|
|
111
|
+
//# sourceMappingURL=run.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["commands/run.command.ts","commands/run.command.js"],"names":["__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","Promise","reject","fulfilled","step","next","e","rejected","result","done","then","apply","RunCommand","WorkspaceCommand","constructor","arguments","name","description","define","builder","y","positional","type","demandOption","option","choice","default","desc","run","args","_super","Object","create","get","_a","call","spinner","stop","set","TaskSet","task","workspace","script","map","arg","toString","buildDeps","add","tlogger","TaskLogger","on","tsk","context","connect","start","waitFor","failed"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;ACHA,IAAIA,SAAS,GAAI,UAAQ,SAAKA,SAAd,IAA4B,UAAUC,OAAV,EAAmBC,UAAnB,EAA+BC,CAA/B,EAAkCC,SAAlC,EAA6C;AACrF,WAASC,KAAT,CAAeC,KAAf,EAAsB;AAAE,WAAOA,KAAK,YAAYH,CAAjB,GAAqBG,KAArB,GAA6B,IAAIH,CAAJ,CAAM,UAAUI,OAAV,EAAmB;AAAEA,MAAAA,OAAO,CAACD,KAAD,CAAP;AAAiB,KAA5C,CAApC;AAAoF;;AAC5G,SAAO,KAAKH,CAAC,KAAKA,CAAC,GAAGK,OAAT,CAAN,EAAyB,UAAUD,OAAV,EAAmBE,MAAnB,EAA2B;AACvD,aAASC,SAAT,CAAmBJ,KAAnB,EAA0B;AAAE,UAAI;AAAEK,QAAAA,IAAI,CAACP,SAAS,CAACQ,IAAV,CAAeN,KAAf,CAAD,CAAJ;AAA8B,OAApC,CAAqC,OAAOO,CAAP,EAAU;AAAEJ,QAAAA,MAAM,CAACI,CAAD,CAAN;AAAY;AAAE;;AAC3F,aAASC,QAA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A,KAAA,CAArB,GAAqB,KAAA,CAArB,GAAqBA,EAAA,CAAElB,IAAI,MAA/G;AAAqH,OAAxJ;AACAgC,MAAAA,OAAO,CAACE,EAAR,CAAW,MAAX,EAAoBC,GAAD,IAAQ;AAAA,YAAAjB,EAAA;;AAAC,eAAAiB,GAAG,KAAKX,IAAR,GAAe,GAAGX,IAAI,CAACa,MAAM,SAA7B,GAAyC,mBAAmB,CAAAR,EAAA,GAAAiB,GAAG,CAACC,OAAJ,CAAYX,SAAZ,MAAqB,IAArB,IAAqBP,EAAA,KAAA,KAAA,CAArB,GAAqB,KAAA,CAArB,GAAqBA,EAAA,CAAElB,IAAI,EAAvF;AAAyF,OAArH;AACAgC,MAAAA,OAAO,CAACE,EAAR,CAAW,SAAX,EAAuBC,GAAD,IAAQ;AAAA,YAAAjB,EAAA;;AAAC,eAAAiB,GAAG,KAAKX,IAAR,GAAe,GAAG,KAAKC,SAAL,CAAezB,IAAI,IAAIa,IAAI,CAACa,MAAM,OAApD,GAA8D,GAAG,CAAAR,EAAA,GAAAiB,GAAG,CAACC,OAAJ,CAAYX,SAAZ,MAAqB,IAArB,IAAqBP,EAAA,KAAA,KAAA,CAArB,GAAqB,KAAA,CAArB,GAAqBA,EAAA,CAAElB,IAAI,QAA5F;AAAoG,OAAnI;AACAgC,MAAAA,OAAO,CAACK,OAAR,CAAgBf,GAAhB;AAEAA,MAAAA,GAAG,CAACgB,KAAJ;AACA,YAAM,CAAC9C,MAAD,IAAW,MAAM8B,GAAG,CAACiB,OAAJ,CAAY,UAAZ,CAAvB;AACA,aAAO/C,MAAM,CAACgD,MAAP,KAAkB,CAAlB,GAAsB,CAAtB,GAA0B,CAAjC;ACIK,KAjBe,CAAhB;ADcL;;AAxCsD","file":"run.command.js","sourcesContent":["import { Arguments, Builder, WorkspaceArgs, WorkspaceCommand } from '@jujulego/jill-common';\nimport { TaskSet, WorkspaceDepsMode } from '@jujulego/jill-core';\n\nimport { TaskLogger } from '../task-logger';\n\n// Types\nexport interface RunArgs extends WorkspaceArgs {\n script: string;\n 'deps-mode': WorkspaceDepsMode;\n}\n\n// Command\nexport class RunCommand extends WorkspaceCommand<RunArgs> {\n // Attributes\n readonly name = 'run <script>';\n readonly description = 'Run script inside workspace';\n\n // Methods\n protected define<U>(builder: Builder<U>): Builder<U & RunArgs> {\n return super.define(y => builder(y)\n .positional('script', { type: 'string', demandOption: true })\n .option('deps-mode', {\n choice: ['all', 'prod', 'none'],\n default: 'all' as WorkspaceDepsMode,\n desc: 'Dependency selection mode:\\n' +\n ' - all = dependencies AND devDependencies\\n' +\n ' - prod = dependencies\\n' +\n ' - none = nothing'\n })\n );\n }\n\n protected async run(args: Arguments<RunArgs>): Promise<number> {\n await super.run(args);\n this.spinner.stop();\n\n // Run build task\n const set = new TaskSet();\n const task = await this.workspace.run(args.script, args['--']?.map(arg => arg.toString()), {\n buildDeps: args['deps-mode']\n });\n set.add(task);\n\n const tlogger = new TaskLogger();\n tlogger.on('spin-simple', (tsk) => tsk === task ? `Running ${args.script} in ${this.workspace.name} ...` : `Building ${tsk.context.workspace?.name} ...`);\n tlogger.on('fail', (tsk) => tsk === task ? `${args.script} failed` : `Failed to build ${tsk.context.workspace?.name}`);\n tlogger.on('succeed', (tsk) => tsk === task ? `${this.workspace.name} ${args.script} done` : `${tsk.context.workspace?.name} built`);\n tlogger.connect(set);\n\n set.start();\n const [result] = await set.waitFor('finished');\n return result.failed === 0 ? 0 : 1;\n }\n}\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { WorkspaceCommand } from '@jujulego/jill-common';\nimport { TaskSet } from '@jujulego/jill-core';\nimport { TaskLogger } from '../task-logger';\n// Command\nexport class RunCommand extends WorkspaceCommand {\n constructor() {\n super(...arguments);\n // Attributes\n this.name = 'run <script>';\n this.description = 'Run script inside workspace';\n }\n // Methods\n define(builder) {\n return super.define(y => builder(y)\n .positional('script', { type: 'string', demandOption: true })\n .option('deps-mode', {\n choice: ['all', 'prod', 'none'],\n default: 'all',\n desc: 'Dependency selection mode:\\n' +\n ' - all = dependencies AND devDependencies\\n' +\n ' - prod = dependencies\\n' +\n ' - none = nothing'\n }));\n }\n run(args) {\n const _super = Object.create(null, {\n run: { get: () => super.run }\n });\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n yield _super.run.call(this, args);\n this.spinner.stop();\n // Run build task\n const set = new TaskSet();\n const task = yield this.workspace.run(args.script, (_a = args['--']) === null || _a === void 0 ? void 0 : _a.map(arg => arg.toString()), {\n buildDeps: args['deps-mode']\n });\n set.add(task);\n const tlogger = new TaskLogger();\n tlogger.on('spin-simple', (tsk) => { var _a; return tsk === task ? `Running ${args.script} in ${this.workspace.name} ...` : `Building ${(_a = tsk.context.workspace) === null || _a === void 0 ? void 0 : _a.name} ...`; });\n tlogger.on('fail', (tsk) => { var _a; return tsk === task ? `${args.script} failed` : `Failed to build ${(_a = tsk.context.workspace) === null || _a === void 0 ? void 0 : _a.name}`; });\n tlogger.on('succeed', (tsk) => { var _a; return tsk === task ? `${this.workspace.name} ${args.script} done` : `${(_a = tsk.context.workspace) === null || _a === void 0 ? void 0 : _a.name} built`; });\n tlogger.connect(set);\n set.start();\n const [result] = yield set.waitFor('finished');\n return result.failed === 0 ? 0 : 1;\n });\n }\n}"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["core.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAQ/C,eAAO,MAAM,UAAU,QAKrB,CAAC","file":"core.plugin.d.ts","sourcesContent":["import { Plugin } from '@jujulego/jill-common';\n\nimport { EachCommand } from './commands/each.command';\nimport { InfoCommand } from './commands/info.command';\nimport { ListCommand } from './commands/list.command';\nimport { RunCommand } from './commands/run.command';\n\n// Plugin\nexport const corePlugin = Plugin.createPlugin('core', [\n InfoCommand,\n ListCommand,\n RunCommand,\n EachCommand,\n]);\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.corePlugin = void 0;
|
|
7
|
+
|
|
8
|
+
var _jillCommon = require("@jujulego/jill-common");
|
|
9
|
+
|
|
10
|
+
var _each = require("./commands/each.command");
|
|
11
|
+
|
|
12
|
+
var _info = require("./commands/info.command");
|
|
13
|
+
|
|
14
|
+
var _list = require("./commands/list.command");
|
|
15
|
+
|
|
16
|
+
var _run = require("./commands/run.command");
|
|
17
|
+
|
|
18
|
+
// Plugin
|
|
19
|
+
const corePlugin = _jillCommon.Plugin.createPlugin('core', [_info.InfoCommand, _list.ListCommand, _run.RunCommand, _each.EachCommand]);
|
|
20
|
+
|
|
21
|
+
exports.corePlugin = corePlugin;
|
|
22
|
+
//# sourceMappingURL=core.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["core.plugin.ts"],"names":["corePlugin","Plugin","createPlugin","InfoCommand","ListCommand","RunCommand","EachCommand"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AAEA;AACO,MAAMA,UAAU,GAAGC,mBAAOC,YAAP,CAAoB,MAApB,EAA4B,CACpDC,iBADoD,EAEpDC,iBAFoD,EAGpDC,eAHoD,EAIpDC,iBAJoD,CAA5B,CAAnB","file":"core.plugin.js","sourcesContent":["import { Plugin } from '@jujulego/jill-common';\n\nimport { EachCommand } from './commands/each.command';\nimport { InfoCommand } from './commands/info.command';\nimport { ListCommand } from './commands/list.command';\nimport { RunCommand } from './commands/run.command';\n\n// Plugin\nexport const corePlugin = Plugin.createPlugin('core', [\n InfoCommand,\n ListCommand,\n RunCommand,\n EachCommand,\n]);\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export { logger, OraLogger } from './logger';
|
|
6
|
-
export type { EachArgs } from './commands/each';
|
|
7
|
-
export type { InfoArgs } from './commands/info';
|
|
8
|
-
export type { RunArgs } from './commands/run';
|
|
9
|
-
export type { Attribute, ListArgs } from './commands/list';
|
|
1
|
+
export { EachCommand } from './commands/each.command';
|
|
2
|
+
export { InfoCommand } from './commands/info.command';
|
|
3
|
+
export { ListCommand } from './commands/list.command';
|
|
4
|
+
export { RunCommand } from './commands/run.command';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC","file":"index.d.ts","sourcesContent":["export { EachCommand } from './commands/each.command';\nexport { InfoCommand } from './commands/info.command';\nexport { ListCommand } from './commands/list.command';\nexport { RunCommand } from './commands/run.command';\n"]}
|
package/dist/index.js
CHANGED
|
@@ -3,49 +3,36 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "
|
|
6
|
+
Object.defineProperty(exports, "EachCommand", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _each.EachCommand;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
Object.defineProperty(exports, "
|
|
12
|
+
Object.defineProperty(exports, "InfoCommand", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function () {
|
|
15
|
-
return
|
|
15
|
+
return _info.InfoCommand;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
Object.defineProperty(exports, "
|
|
18
|
+
Object.defineProperty(exports, "ListCommand", {
|
|
19
19
|
enumerable: true,
|
|
20
20
|
get: function () {
|
|
21
|
-
return
|
|
21
|
+
return _list.ListCommand;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
Object.defineProperty(exports, "
|
|
24
|
+
Object.defineProperty(exports, "RunCommand", {
|
|
25
25
|
enumerable: true,
|
|
26
26
|
get: function () {
|
|
27
|
-
return
|
|
27
|
+
return _run.RunCommand;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
Object.defineProperty(exports, "logger", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _logger.logger;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "runCommand", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _run.runCommand;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
var _each = require("./commands/each");
|
|
44
30
|
|
|
45
|
-
var
|
|
31
|
+
var _each = require("./commands/each.command");
|
|
46
32
|
|
|
47
|
-
var
|
|
33
|
+
var _info = require("./commands/info.command");
|
|
48
34
|
|
|
49
|
-
var
|
|
35
|
+
var _list = require("./commands/list.command");
|
|
50
36
|
|
|
51
|
-
var
|
|
37
|
+
var _run = require("./commands/run.command");
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA","file":"index.js","sourcesContent":["export { EachCommand } from './commands/each.command';\nexport { InfoCommand } from './commands/info.command';\nexport { ListCommand } from './commands/list.command';\nexport { RunCommand } from './commands/run.command';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["main.ts"],"names":[],"mappings":"","file":"main.d.ts","sourcesContent":["import { Application } from '@jujulego/jill-common';\n\nimport { corePlugin } from './core.plugin';\n\n// Class\nclass JillApp extends Application {\n // Attributes\n readonly name = 'jill';\n readonly corePlugin = corePlugin;\n}\n\n// Bootstrap\n(async () => {\n const app = new JillApp();\n await app.parse();\n})();\n"]}
|