@oss-autopilot/core 0.51.1 → 0.53.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.
@@ -246,6 +246,12 @@ export declare function resetGitHubTokenCache(): void;
246
246
  * }
247
247
  */
248
248
  export declare function getGitHubTokenAsync(): Promise<string | null>;
249
+ /**
250
+ * Check whether the state file exists without creating the data directory.
251
+ * Used for first-run detection in the CLI — we don't want to create
252
+ * `~/.oss-autopilot/` just to check if the user has ever run the tool.
253
+ */
254
+ export declare function stateFileExists(): boolean;
249
255
  /**
250
256
  * Detect the authenticated GitHub username via the `gh` CLI.
251
257
  *
@@ -439,6 +439,15 @@ export async function getGitHubTokenAsync() {
439
439
  * (but not consecutive ones and not at the end), and be 1-39 characters.
440
440
  */
441
441
  const GITHUB_USERNAME_RE = /^[a-zA-Z0-9](?:[a-zA-Z0-9]|-(?=[a-zA-Z0-9])){0,38}$/;
442
+ /**
443
+ * Check whether the state file exists without creating the data directory.
444
+ * Used for first-run detection in the CLI — we don't want to create
445
+ * `~/.oss-autopilot/` just to check if the user has ever run the tool.
446
+ */
447
+ export function stateFileExists() {
448
+ const stateFile = path.join(os.homedir(), '.oss-autopilot', 'state.json');
449
+ return fs.existsSync(stateFile);
450
+ }
442
451
  /**
443
452
  * Detect the authenticated GitHub username via the `gh` CLI.
444
453
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oss-autopilot/core",
3
- "version": "0.51.1",
3
+ "version": "0.53.0",
4
4
  "description": "CLI and core library for managing open source contributions",
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,7 +21,9 @@
21
21
  }
22
22
  },
23
23
  "files": [
24
- "dist/"
24
+ "dist/",
25
+ "!dist/**/*.map",
26
+ "!dist/core/test-utils.*"
25
27
  ],
26
28
  "keywords": [
27
29
  "open-source",