@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.
- package/dist/cli.bundle.cjs +51 -42
- package/dist/cli.js +19 -1
- package/dist/core/github.d.ts +5 -0
- package/dist/core/github.js +27 -22
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/core/repo-score-manager.d.ts +76 -0
- package/dist/core/repo-score-manager.js +204 -0
- package/dist/core/state-persistence.d.ts +53 -0
- package/dist/core/state-persistence.js +510 -0
- package/dist/core/state.d.ts +14 -311
- package/dist/core/state.js +48 -901
- package/dist/core/utils.d.ts +6 -0
- package/dist/core/utils.js +9 -0
- package/package.json +4 -2
- package/dist/cli.bundle.cjs.map +0 -7
- package/dist/core/test-utils.d.ts +0 -12
- package/dist/core/test-utils.js +0 -74
package/dist/core/utils.d.ts
CHANGED
|
@@ -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
|
*
|
package/dist/core/utils.js
CHANGED
|
@@ -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.
|
|
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",
|