@repokit/core 1.3.3 → 1.3.5

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.
@@ -14,7 +14,7 @@ export class ConfigurationParser {
14
14
  const config = await import(path);
15
15
  for (const key in config) {
16
16
  if (config[key] instanceof RepoKitConfig) {
17
- return console.log(JSON.stringify(config[key]));
17
+ return console.log(JSON.stringify(config[key].toScoped(path)));
18
18
  }
19
19
  }
20
20
  }
@@ -1,5 +1,6 @@
1
1
  import type { ICommand, IRepoKitConfig } from "./types";
2
2
  import { RepoKitCommand } from "./RepoKitCommand";
3
+ /* eslint-disable typescript-eslint(no-misused-spread */
3
4
 
4
5
  export class RepoKitConfig implements Required<IRepoKitConfig> {
5
6
  project: string;
@@ -10,4 +11,11 @@ export class RepoKitConfig implements Required<IRepoKitConfig> {
10
11
  this.commands = commands;
11
12
  this.thirdParty = thirdParty.map(command => new RepoKitCommand(command));
12
13
  }
14
+
15
+ public toScoped(location: string) {
16
+ return {
17
+ ...this,
18
+ thirdParty: this.thirdParty.map(command => ({ ...command, location })),
19
+ };
20
+ }
13
21
  }
@@ -1,11 +1,18 @@
1
1
 
2
2
  CWD=$(pwd)
3
+
4
+ MODULE_DIRECTORY="node_modules"
5
+
6
+ if [[ "$CWD" != *"$MODULE_DIRECTORY"* ]]; then
7
+ yarn symlink;
8
+ exit 0;
9
+ fi
10
+
3
11
  REPLACEMENT="/node_modules"
4
12
  FALLBACK_ROOT="${CWD%${REPLACEMENT}*}"
5
13
 
6
14
  SCRIPT_ORIGIN=$(pwd)
7
15
  GIT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
8
- NODE_MODULES_PARENT="$(pwd)/../"
9
16
  REPO_ROOT=${GIT_ROOT:-$FALLBACK_ROOT}
10
17
 
11
18
 
@@ -49,5 +56,5 @@ echo "Compiling from $SCRIPT_ORIGIN"
49
56
  RUSTFLAGS="-Awarnings" cargo build --release
50
57
  cargo install --path .
51
58
 
52
- cd "$REPO_ROOT"
59
+ cd $REPO_ROOT
53
60
  repokit
@@ -74,7 +74,7 @@ impl ExternalCommands {
74
74
  let reader: BufReader<File> = BufReader::new(file);
75
75
  for line_result in reader.lines() {
76
76
  let line: String = line_result.expect("line");
77
- if line.ends_with("\"@repokit/core\";") {
77
+ if line.ends_with("\"@repokit/core\";") || line.ends_with("'@repokit/core';") {
78
78
  return true;
79
79
  }
80
80
  }
@@ -35,15 +35,10 @@ pub struct RepoKitConfig {
35
35
  pub commands: HashMap<String, CommandDefinition>,
36
36
  }
37
37
 
38
- fn registered_as_plugin() -> String {
39
- "This command is registered in your devkit.ts file".to_string()
40
- }
41
-
42
38
  #[derive(Debug, Deserialize, Clone)]
43
39
  pub struct RepoKitCommand {
44
40
  pub name: String,
45
41
  pub owner: String,
46
- #[serde(default = "registered_as_plugin")]
47
42
  pub location: String,
48
43
  pub description: String,
49
44
  pub commands: HashMap<String, CommandDefinition>,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repokit/core",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "description": "A knowledgebase for your repository - wrapped in a CLI",
5
5
  "keywords": [
6
6
  "cli",
@@ -36,7 +36,7 @@
36
36
  "tsx": "^4.21.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@types/node": "^25.0.10",
39
+ "@types/node": "^25.2.1",
40
40
  "oxfmt": "^0.27.0",
41
41
  "oxlint": "^1.42.0",
42
42
  "oxlint-tsgolint": "^0.11.3",