@sunerpy/opencode-kiro-auth 0.14.2 → 0.15.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/core/auth/auth-handler.js +2 -1
- package/dist/version.d.ts +1 -0
- package/dist/version.js +14 -0
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { RegionSchema } from '../../plugin/config/schema.js';
|
|
2
2
|
import { isRefreshTokenDead } from '../../plugin/health.js';
|
|
3
3
|
import * as logger from '../../plugin/logger.js';
|
|
4
|
+
import { PLUGIN_VERSION } from '../../version.js';
|
|
4
5
|
import { IdcAuthMethod } from './idc-auth-method.js';
|
|
5
6
|
import { isInteractiveTty, ttyConfirm, ttySelect } from './tty-menu.js';
|
|
6
7
|
export class AuthHandler {
|
|
@@ -91,7 +92,7 @@ export class AuthHandler {
|
|
|
91
92
|
}
|
|
92
93
|
const currentAccounts = this.accountManager.getAccounts?.() ?? [];
|
|
93
94
|
const usageSummary = this.buildUsageSummary(currentAccounts);
|
|
94
|
-
const firstLabelBase =
|
|
95
|
+
const firstLabelBase = `Add account · AWS Builder ID / IAM Identity Center · plugin v${PLUGIN_VERSION}`;
|
|
95
96
|
const firstLabel = usageSummary ? `${firstLabelBase} ${usageSummary}` : firstLabelBase;
|
|
96
97
|
const idcMethod = new IdcAuthMethod(this.config, this.repository, this.accountManager);
|
|
97
98
|
const configStartUrl = this.config.idc_start_url;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PLUGIN_VERSION: string;
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
function readPluginVersion() {
|
|
3
|
+
try {
|
|
4
|
+
const packageJson = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
|
|
5
|
+
if (typeof packageJson.version === 'string' && packageJson.version.trim()) {
|
|
6
|
+
return packageJson.version;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
catch {
|
|
10
|
+
// Keep authentication available if package metadata cannot be read.
|
|
11
|
+
}
|
|
12
|
+
return 'unknown';
|
|
13
|
+
}
|
|
14
|
+
export const PLUGIN_VERSION = readPluginVersion();
|