@repokit/core 2.0.1 → 2.0.2
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/ConfigurationParser.mjs +1 -1
- package/dist/RepoKitConfig.d.mts +1 -1
- package/dist/index.d.mts +1 -1
- package/package.json +1 -1
- package/dist/CommandParser.d.mts +0 -10
- package/dist/ConcurrencyPool.d.mts +0 -13
- package/dist/ConcurrencyPool.mjs +0 -22
- package/dist/ConfigurationParser.d.mts +0 -9
- package/dist/TSCompiler.d.mts +0 -8
- package/dist/templates/command_template.mjs +0 -4
- package/dist/templates/configuration_template.mjs +0 -4
- package/dist/types.mjs +0 -1
package/dist/RepoKitConfig.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RepoKitCommand } from "./RepoKitCommand.mjs";
|
|
2
1
|
import { ICommand, IRepoKitConfig } from "./types.mjs";
|
|
2
|
+
import { RepoKitCommand } from "./RepoKitCommand.mjs";
|
|
3
3
|
|
|
4
4
|
//#region externals/RepoKitConfig.d.ts
|
|
5
5
|
declare class RepoKitConfig implements Required<IRepoKitConfig> {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RepoKitCommand } from "./RepoKitCommand.mjs";
|
|
2
1
|
import { AsyncTask, ICommand, ILocatedCommand, IRepoKitCommand, IRepoKitConfig } from "./types.mjs";
|
|
2
|
+
import { RepoKitCommand } from "./RepoKitCommand.mjs";
|
|
3
3
|
import { RepoKitConfig } from "./RepoKitConfig.mjs";
|
|
4
4
|
export { AsyncTask, ICommand, ILocatedCommand, IRepoKitCommand, IRepoKitConfig, RepoKitCommand, RepoKitConfig };
|
package/package.json
CHANGED
package/dist/CommandParser.d.mts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { TSCompiler } from "./TSCompiler.mjs";
|
|
2
|
-
|
|
3
|
-
//#region externals/CommandParser.d.ts
|
|
4
|
-
declare class CommandParser extends TSCompiler {
|
|
5
|
-
static parse(): Promise<void>;
|
|
6
|
-
private static parseCommand;
|
|
7
|
-
private static parsePaths;
|
|
8
|
-
}
|
|
9
|
-
//#endregion
|
|
10
|
-
export { CommandParser };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AsyncTask } from "./types.mjs";
|
|
2
|
-
|
|
3
|
-
//#region externals/ConcurrencyPool.d.ts
|
|
4
|
-
declare class ConcurrencyPool<T> {
|
|
5
|
-
readonly maxConcurrency: number;
|
|
6
|
-
private readonly IDs;
|
|
7
|
-
private readonly activeTasks;
|
|
8
|
-
constructor(maxConcurrency?: number);
|
|
9
|
-
enqueue(task: AsyncTask<T>): Promise<T>;
|
|
10
|
-
private executeTask;
|
|
11
|
-
}
|
|
12
|
-
//#endregion
|
|
13
|
-
export { ConcurrencyPool };
|
package/dist/ConcurrencyPool.mjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { AutoIncrementingID } from "@figliolia/event-emitter";
|
|
2
|
-
//#region externals/ConcurrencyPool.ts
|
|
3
|
-
var ConcurrencyPool = class {
|
|
4
|
-
IDs = new AutoIncrementingID();
|
|
5
|
-
activeTasks = /* @__PURE__ */ new Map();
|
|
6
|
-
constructor(maxConcurrency = 10) {
|
|
7
|
-
this.maxConcurrency = maxConcurrency;
|
|
8
|
-
}
|
|
9
|
-
async enqueue(task) {
|
|
10
|
-
if (this.activeTasks.size === this.maxConcurrency) await Promise.race(Array.from(this.activeTasks.values()));
|
|
11
|
-
return this.executeTask(task);
|
|
12
|
-
}
|
|
13
|
-
executeTask(task) {
|
|
14
|
-
const ID = this.IDs.get();
|
|
15
|
-
const promise = task();
|
|
16
|
-
this.activeTasks.set(ID, promise);
|
|
17
|
-
promise.finally(() => this.activeTasks.delete(ID));
|
|
18
|
-
return promise;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
//#endregion
|
|
22
|
-
export { ConcurrencyPool };
|
package/dist/TSCompiler.d.mts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
//#region externals/templates/command_template.txt
|
|
2
|
-
var command_template_default = "import { RepoKitCommand } from \"@repokit/core\";\n\n/**\n * Please fill out this command file with your desired settings\n */\nexport const Commands = new RepoKitCommand({\n name: \"<Your Package Name>\",\n owner: \"<Optional Team or Individual>\",\n description: \"<Your Package Description>\",\n commands: {\n \"<your-first-command>\": {\n command: \"<insert shell command here>\",\n description: \"A description for your command\",\n },\n \"<your-second-command>\": {\n command: \"<insert shell command here>\",\n description: \"A description for your command\",\n },\n \"<your-third-command>\": {\n command: \"<insert shell command here>\",\n description: \"A description for your command\",\n },\n },\n});\n";
|
|
3
|
-
//#endregion
|
|
4
|
-
export { command_template_default as default };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
//#region externals/templates/configuration_template.txt
|
|
2
|
-
var configuration_template_default = "import { RepoKitConfig } from \"@repokit/core\";\n\n/**\n * Please fill out this config file with your desired\n * repokit settings\n */\nexport const RepoKit = new RepoKitConfig({\n project: \"Your Project Name\",\n commands: {\n \"<your-first-command>\": {\n command: \"<insert shell command here>\",\n description: \"A description for your command\",\n },\n \"<your-second-command>\": {\n command: \"<insert shell command here>\",\n description: \"A description for your command\",\n },\n \"<your-third-command>\": {\n command: \"<insert shell command here>\",\n description: \"A description for your command\",\n },\n },\n});\n";
|
|
3
|
-
//#endregion
|
|
4
|
-
export { configuration_template_default as default };
|
package/dist/types.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|