@toolplex/client 0.1.38 → 0.1.39
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/server-manager/serverManager.js +14 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -50,6 +50,9 @@ function extractPrivateRegistryScope(args) {
|
|
|
50
50
|
* - username: the scope without @ (e.g., "tp-user-abc123def45")
|
|
51
51
|
* - password: the ToolPlex API key (tp_live_xxx or tp_test_xxx)
|
|
52
52
|
*
|
|
53
|
+
* IMPORTANT: We also clear _authToken to override any expired tokens in the
|
|
54
|
+
* user's ~/.npmrc. This ensures our injected basic auth takes precedence.
|
|
55
|
+
*
|
|
53
56
|
* @param scope - The scope without @ (e.g., "tp-user-abc123def45")
|
|
54
57
|
* @param apiKey - The ToolPlex API key
|
|
55
58
|
*/
|
|
@@ -66,14 +69,24 @@ function getPrivateRegistryEnv(scope, apiKey) {
|
|
|
66
69
|
// Set Basic auth for the registry
|
|
67
70
|
// npm_config_//host/:_auth maps to //host/:_auth in .npmrc
|
|
68
71
|
"npm_config_//registry.toolplex.ai/:_auth": auth,
|
|
72
|
+
// Clear any existing _authToken from user's ~/.npmrc to prevent expired tokens
|
|
73
|
+
// from taking precedence over our injected basic auth
|
|
74
|
+
"npm_config_//registry.toolplex.ai/:_authToken": "",
|
|
69
75
|
};
|
|
70
76
|
}
|
|
71
77
|
/**
|
|
72
78
|
* Get additional args to prepend for private registry packages.
|
|
73
79
|
* Uses --registry flag which is more reliable than env vars with special chars.
|
|
80
|
+
*
|
|
81
|
+
* IMPORTANT: We use --userconfig=/dev/null to completely ignore the user's ~/.npmrc.
|
|
82
|
+
* This prevents expired tokens in ~/.npmrc from interfering with our injected basic auth.
|
|
74
83
|
*/
|
|
75
84
|
function getPrivateRegistryArgs() {
|
|
76
|
-
return [
|
|
85
|
+
return [
|
|
86
|
+
`--registry=${PRIVATE_REGISTRY_URL}`,
|
|
87
|
+
// Ignore user's ~/.npmrc to prevent expired _authToken from taking precedence
|
|
88
|
+
`--userconfig=/dev/null`,
|
|
89
|
+
];
|
|
77
90
|
}
|
|
78
91
|
export class ServerManager {
|
|
79
92
|
constructor() {
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.1.
|
|
1
|
+
export declare const version = "0.1.39";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '0.1.
|
|
1
|
+
export const version = '0.1.39';
|