@repokit/core 2.0.1 → 2.0.3

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/Cargo.lock CHANGED
@@ -169,7 +169,7 @@ checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c"
169
169
 
170
170
  [[package]]
171
171
  name = "repokit"
172
- version = "0.1.0"
172
+ version = "2.0.3"
173
173
  dependencies = [
174
174
  "alphanumeric-sort",
175
175
  "colored",
package/Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "repokit"
3
- version = "0.1.0"
3
+ version = "2.0.3"
4
4
  edition = "2024"
5
5
 
6
6
  [[bin]]
@@ -17,4 +17,3 @@ tokio = "1.49.0"
17
17
  ignore = "0.4.25"
18
18
  regex = { version = "1.12.3", features = ["std", "unicode"] }
19
19
 
20
-
@@ -1,5 +1,5 @@
1
- import { TSCompiler } from "./TSCompiler.mjs";
2
1
  import { RepoKitConfig } from "./RepoKitConfig.mjs";
2
+ import { TSCompiler } from "./TSCompiler.mjs";
3
3
  import { existsSync } from "node:fs";
4
4
  import { join } from "node:path";
5
5
  import { parseArgs } from "node:util";
@@ -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 };
@@ -1,3 +1,4 @@
1
+ CURRENT_VERSION="2.0.3"
1
2
  CWD=$(pwd)
2
3
 
3
4
  REPLACEMENT="/node_modules"
@@ -26,6 +27,19 @@ fi
26
27
 
27
28
  echo "Installing Repokit CLI"
28
29
 
30
+ cd
31
+
32
+ if [ -f .repokit ]; then
33
+ read -r first_line < ".repokit"
34
+ if [ "$first_line" = "$CURRENT_VERSION" ]; then
35
+ exit 0;
36
+ fi
37
+ fi
38
+
39
+ touch ".repokit"
40
+ printf "$CURRENT_VERSION" > ".repokit"
41
+
42
+
29
43
  cd $CWD
30
44
 
31
45
  echo "Compiling from $CWD"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repokit/core",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "A knowledgebase for your repository - wrapped in a CLI",
5
5
  "keywords": [
6
6
  "cli",
@@ -55,6 +55,7 @@
55
55
  "@types/node": "^25.3.0",
56
56
  "@typescript-eslint/eslint-plugin": "^8.57.1",
57
57
  "@typescript-eslint/parser": "^8.57.1",
58
+ "chalk": "^5.6.2",
58
59
  "eslint": "^10.0.3",
59
60
  "eslint-import-resolver-typescript": "^4.4.4",
60
61
  "eslint-plugin-import": "^2.32.0",
@@ -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 };
@@ -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 };
@@ -1,9 +0,0 @@
1
- import { TSCompiler } from "./TSCompiler.mjs";
2
-
3
- //#region externals/ConfigurationParser.d.ts
4
- declare class ConfigurationParser extends TSCompiler {
5
- static parse(): void;
6
- private static parseRoot;
7
- }
8
- //#endregion
9
- export { ConfigurationParser };
@@ -1,8 +0,0 @@
1
- //#region externals/TSCompiler.d.ts
2
- declare class TSCompiler {
3
- private static readonly compilerOptions;
4
- static compile<T extends Record<string, unknown>>(path: string): T;
5
- private static import;
6
- }
7
- //#endregion
8
- export { TSCompiler };
@@ -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 {};