@ducking-mind/proxy-app-cli 0.1.1 → 0.2.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/README.md +53 -15
- package/agent-contract.mjs +15 -11
- package/agent-runtime/package-guide.mjs +4 -53
- package/agent-runtime/protocol.mjs +4 -124
- package/backend-container.mjs +199 -0
- package/local-dev-credentials.mjs +5 -5
- package/local-dev-relay.mjs +129 -522
- package/package.json +7 -5
- package/platform-settings.mjs +20 -0
- package/prepare-agent-runtime.mjs +7 -40
- package/proxy-app.mjs +383 -304
- package/runtime-sources.mjs +83 -0
- package/agent-runtime/runtime-status.mjs +0 -70
- package/release-runtime/release-config.mjs +0 -154
- package/release-runtime/release-target.mjs +0 -48
|
@@ -31,9 +31,9 @@ function credentialAccount({ baseURL, portalURL, appID, projectPath, purpose })
|
|
|
31
31
|
const identity = [
|
|
32
32
|
normalizeURL(baseURL), normalizeURL(portalURL || baseURL), appID.trim(), project,
|
|
33
33
|
]
|
|
34
|
-
//
|
|
35
|
-
//
|
|
36
|
-
|
|
34
|
+
// Deliberately isolate developer authorization from any older runtime
|
|
35
|
+
// credential entries that may remain in the OS keychain.
|
|
36
|
+
identity.push('development')
|
|
37
37
|
return createHash('sha256').update(JSON.stringify(identity)).digest('hex')
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -92,13 +92,13 @@ function runSecurityCommand(file, args, { input = '', timeoutMs }) {
|
|
|
92
92
|
*/
|
|
93
93
|
export function createLocalCredentialStore({
|
|
94
94
|
baseURL, portalURL = '', appID, projectPath,
|
|
95
|
-
purpose = '
|
|
95
|
+
purpose = 'development',
|
|
96
96
|
platform = process.platform,
|
|
97
97
|
runCommand = runSecurityCommand,
|
|
98
98
|
timeoutMs = TIMEOUT_MS,
|
|
99
99
|
stateDirectory = join(homedir(), 'Library', 'Caches', 'proxy-app', 'credentials'),
|
|
100
100
|
}) {
|
|
101
|
-
if (
|
|
101
|
+
if (purpose !== 'development') throw new Error('本地凭证缓存只支持开发者授权。')
|
|
102
102
|
const account = credentialAccount({ baseURL, portalURL, appID, projectPath, purpose })
|
|
103
103
|
const markerPath = join(stateDirectory, account + '.disabled')
|
|
104
104
|
const boundedTimeout = Number.isFinite(timeoutMs) ? Math.max(1, Math.min(timeoutMs, TIMEOUT_MS)) : TIMEOUT_MS
|