planmode 0.1.0 → 0.1.1

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/index.js CHANGED
@@ -57,7 +57,7 @@ function setGitHubToken(token) {
57
57
  function getRegistries() {
58
58
  const config = readConfig();
59
59
  return {
60
- default: "github.com/planmode/registry",
60
+ default: "github.com/kaihannonen/planmode.org/registry",
61
61
  ...config.registries
62
62
  };
63
63
  }
@@ -76,11 +76,12 @@ function getHeaders() {
76
76
  return headers;
77
77
  }
78
78
  function registryRawUrl(registryUrl, filePath) {
79
- const match = registryUrl.match(/^github\.com\/([^/]+)\/([^/]+)$/);
79
+ const match = registryUrl.match(/^github\.com\/([^/]+)\/([^/]+)(?:\/(.+))?$/);
80
80
  if (!match) {
81
81
  throw new Error(`Invalid registry URL: ${registryUrl}`);
82
82
  }
83
- return `https://raw.githubusercontent.com/${match[1]}/${match[2]}/main/${filePath}`;
83
+ const subpath = match[3] ? `${match[3]}/` : "";
84
+ return `https://raw.githubusercontent.com/${match[1]}/${match[2]}/main/${subpath}${filePath}`;
84
85
  }
85
86
  function resolveRegistry(packageName) {
86
87
  const registries = getRegistries();
@@ -1279,7 +1280,7 @@ var loginCommand = new Command10("login").description("Configure GitHub authenti
1279
1280
 
1280
1281
  // src/index.ts
1281
1282
  var program = new Command11();
1282
- program.name("planmode").description("The open source package manager for AI plans, rules, and prompts.").version("0.1.0");
1283
+ program.name("planmode").description("The open source package manager for AI plans, rules, and prompts.").version("0.1.1");
1283
1284
  program.addCommand(installCommand);
1284
1285
  program.addCommand(uninstallCommand);
1285
1286
  program.addCommand(searchCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "planmode",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "The open source package manager for AI plans, rules, and prompts.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -15,7 +15,7 @@ const program = new Command();
15
15
  program
16
16
  .name("planmode")
17
17
  .description("The open source package manager for AI plans, rules, and prompts.")
18
- .version("0.1.0");
18
+ .version("0.1.1");
19
19
 
20
20
  program.addCommand(installCommand);
21
21
  program.addCommand(uninstallCommand);
package/src/lib/config.ts CHANGED
@@ -52,7 +52,7 @@ export function setGitHubToken(token: string): void {
52
52
  export function getRegistries(): Record<string, string> {
53
53
  const config = readConfig();
54
54
  return {
55
- default: "github.com/planmode/registry",
55
+ default: "github.com/kaihannonen/planmode.org/registry",
56
56
  ...config.registries,
57
57
  };
58
58
  }
@@ -18,12 +18,13 @@ function getHeaders(): Record<string, string> {
18
18
  }
19
19
 
20
20
  function registryRawUrl(registryUrl: string, filePath: string): string {
21
- // Convert github.com/org/repo to raw.githubusercontent.com URL
22
- const match = registryUrl.match(/^github\.com\/([^/]+)\/([^/]+)$/);
21
+ // Convert github.com/org/repo[/subpath] to raw.githubusercontent.com URL
22
+ const match = registryUrl.match(/^github\.com\/([^/]+)\/([^/]+)(?:\/(.+))?$/);
23
23
  if (!match) {
24
24
  throw new Error(`Invalid registry URL: ${registryUrl}`);
25
25
  }
26
- return `https://raw.githubusercontent.com/${match[1]}/${match[2]}/main/${filePath}`;
26
+ const subpath = match[3] ? `${match[3]}/` : "";
27
+ return `https://raw.githubusercontent.com/${match[1]}/${match[2]}/main/${subpath}${filePath}`;
27
28
  }
28
29
 
29
30
  function resolveRegistry(packageName: string): string {