free trial fixes
This commit is contained in:
parent
db8f0b0e2d
commit
4baca3d4ec
9 changed files with 45 additions and 26 deletions
8
core/package-lock.json
generated
8
core/package-lock.json
generated
|
|
@ -13,7 +13,7 @@
|
|||
"@aws-sdk/client-sagemaker-runtime": "^3.621.0",
|
||||
"@aws-sdk/credential-providers": "^3.620.1",
|
||||
"@continuedev/config-types": "^1.0.13",
|
||||
"@continuedev/config-yaml": "^1.0.20",
|
||||
"@continuedev/config-yaml": "^1.0.23",
|
||||
"@continuedev/fetch": "^1.0.4",
|
||||
"@continuedev/llm-info": "^1.0.2",
|
||||
"@continuedev/openai-adapters": "^1.0.10",
|
||||
|
|
@ -3038,9 +3038,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@continuedev/config-yaml": {
|
||||
"version": "1.0.20",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.20.tgz",
|
||||
"integrity": "sha512-MMCqE5khk5MnQc4udPOGCuXf8q+Zo01D4n4qbZu4oPV1foXHfQIZwQkWaQLJOJzzODZEBpgeJeJCknweYckgWg==",
|
||||
"version": "1.0.23",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.23.tgz",
|
||||
"integrity": "sha512-F2Hwc85iCwAHJuwJALOsmZIBeHdF+87mS0YT7dlC6QiE+zAhZKUHcLQ/nTt9bJuhyVyufpb9LApkp40UdGsaWw==",
|
||||
"dependencies": {
|
||||
"@continuedev/config-types": "^1.0.14",
|
||||
"yaml": "^2.6.1",
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
"@aws-sdk/client-sagemaker-runtime": "^3.621.0",
|
||||
"@aws-sdk/credential-providers": "^3.620.1",
|
||||
"@continuedev/config-types": "^1.0.13",
|
||||
"@continuedev/config-yaml": "^1.0.20",
|
||||
"@continuedev/config-yaml": "^1.0.23",
|
||||
"@continuedev/fetch": "^1.0.4",
|
||||
"@continuedev/llm-info": "^1.0.2",
|
||||
"@continuedev/openai-adapters": "^1.0.10",
|
||||
|
|
|
|||
6
extensions/vscode/package-lock.json
generated
6
extensions/vscode/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "continue",
|
||||
"version": "0.9.254",
|
||||
"version": "0.9.255",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "continue",
|
||||
"version": "0.9.254",
|
||||
"version": "0.9.255",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/fetch": "^1.0.3",
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
"@aws-sdk/client-sagemaker-runtime": "^3.621.0",
|
||||
"@aws-sdk/credential-providers": "^3.620.1",
|
||||
"@continuedev/config-types": "^1.0.13",
|
||||
"@continuedev/config-yaml": "^1.0.16",
|
||||
"@continuedev/config-yaml": "^1.0.20",
|
||||
"@continuedev/fetch": "^1.0.4",
|
||||
"@continuedev/llm-info": "^1.0.2",
|
||||
"@continuedev/openai-adapters": "^1.0.10",
|
||||
|
|
|
|||
10
gui/package-lock.json
generated
10
gui/package-lock.json
generated
|
|
@ -7,7 +7,7 @@
|
|||
"name": "gui",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/config-yaml": "^1.0.20",
|
||||
"@continuedev/config-yaml": "^1.0.23",
|
||||
"@headlessui/react": "^1.7.17",
|
||||
"@heroicons/react": "^2.0.18",
|
||||
"@reduxjs/toolkit": "^2.3.0",
|
||||
|
|
@ -108,7 +108,7 @@
|
|||
"@aws-sdk/client-sagemaker-runtime": "^3.621.0",
|
||||
"@aws-sdk/credential-providers": "^3.620.1",
|
||||
"@continuedev/config-types": "^1.0.13",
|
||||
"@continuedev/config-yaml": "^1.0.20",
|
||||
"@continuedev/config-yaml": "^1.0.23",
|
||||
"@continuedev/fetch": "^1.0.4",
|
||||
"@continuedev/llm-info": "^1.0.2",
|
||||
"@continuedev/openai-adapters": "^1.0.10",
|
||||
|
|
@ -556,9 +556,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@continuedev/config-yaml": {
|
||||
"version": "1.0.20",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.20.tgz",
|
||||
"integrity": "sha512-MMCqE5khk5MnQc4udPOGCuXf8q+Zo01D4n4qbZu4oPV1foXHfQIZwQkWaQLJOJzzODZEBpgeJeJCknweYckgWg==",
|
||||
"version": "1.0.23",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.23.tgz",
|
||||
"integrity": "sha512-F2Hwc85iCwAHJuwJALOsmZIBeHdF+87mS0YT7dlC6QiE+zAhZKUHcLQ/nTt9bJuhyVyufpb9LApkp40UdGsaWw==",
|
||||
"dependencies": {
|
||||
"@continuedev/config-types": "^1.0.14",
|
||||
"yaml": "^2.6.1",
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
"test:watch": "vitest"
|
||||
},
|
||||
"dependencies": {
|
||||
"@continuedev/config-yaml": "^1.0.20",
|
||||
"@continuedev/config-yaml": "^1.0.23",
|
||||
"@headlessui/react": "^1.7.17",
|
||||
"@heroicons/react": "^2.0.18",
|
||||
"@reduxjs/toolkit": "^2.3.0",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@continuedev/config-yaml",
|
||||
"version": "1.0.22",
|
||||
"version": "1.0.23",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ export enum SecretType {
|
|||
User = "user",
|
||||
Package = "package",
|
||||
Organization = "organization",
|
||||
NotFound = "not_found",
|
||||
}
|
||||
|
||||
export interface OrgSecretLocation {
|
||||
|
|
@ -24,18 +25,34 @@ export interface UserSecretLocation {
|
|||
secretName: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* If not found in user/package/org secrets, then there's a chance it's in
|
||||
* - the on-prem proxy
|
||||
* - models add-on
|
||||
* - free trial
|
||||
*/
|
||||
export interface NotFoundSecretLocation {
|
||||
secretType: SecretType.NotFound;
|
||||
secretName: string;
|
||||
}
|
||||
|
||||
export type SecretLocation =
|
||||
| OrgSecretLocation
|
||||
| PackageSecretLocation
|
||||
| UserSecretLocation;
|
||||
| UserSecretLocation
|
||||
| NotFoundSecretLocation;
|
||||
|
||||
export function encodeSecretLocation(secretLocation: SecretLocation): string {
|
||||
if (secretLocation.secretType === SecretType.Organization) {
|
||||
return `${SecretType.Organization}:${secretLocation.orgSlug}/${secretLocation.secretName}`;
|
||||
} else if (secretLocation.secretType === SecretType.User) {
|
||||
return `${SecretType.User}:${secretLocation.userSlug}/${secretLocation.secretName}`;
|
||||
} else {
|
||||
} else if (secretLocation.secretType === SecretType.Package) {
|
||||
return `${SecretType.Package}:${encodePackageSlug(secretLocation.packageSlug)}/${secretLocation.secretName}`;
|
||||
} else if (secretLocation.secretType === SecretType.NotFound) {
|
||||
return `${SecretType.NotFound}:${secretLocation.secretName}`;
|
||||
} else {
|
||||
throw new Error(`Invalid secret type: ${secretLocation}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -63,6 +80,11 @@ export function decodeSecretLocation(secretLocation: string): SecretLocation {
|
|||
packageSlug: { ownerSlug: parts[0], packageSlug: parts[1] },
|
||||
secretName,
|
||||
};
|
||||
case SecretType.NotFound:
|
||||
return {
|
||||
secretType: SecretType.NotFound,
|
||||
secretName,
|
||||
};
|
||||
default:
|
||||
throw new Error(`Invalid secret type: ${secretType}`);
|
||||
}
|
||||
|
|
@ -70,6 +92,7 @@ export function decodeSecretLocation(secretLocation: string): SecretLocation {
|
|||
|
||||
export interface NotFoundSecretResult {
|
||||
found: false;
|
||||
secretLocation: NotFoundSecretLocation;
|
||||
fqsn: FQSN;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ export async function resolveFQSN(
|
|||
secretLocation,
|
||||
value: secret,
|
||||
};
|
||||
} else {
|
||||
} else if (secretLocation.secretType !== SecretType.NotFound) {
|
||||
return {
|
||||
found: true,
|
||||
fqsn,
|
||||
|
|
@ -81,6 +81,10 @@ export async function resolveFQSN(
|
|||
|
||||
return {
|
||||
found: false,
|
||||
secretLocation: {
|
||||
secretName: fqsn.secretName,
|
||||
secretType: SecretType.NotFound,
|
||||
},
|
||||
fqsn,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,14 +45,6 @@ export async function clientRender(
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!secretResult.found) {
|
||||
// When a secret isn't found anywhere, we keep it templated as just the secret name
|
||||
// in case it can be found in the on-prem proxy's env
|
||||
secretsTemplateData["secrets." + encodeFQSN(secretResult.fqsn)] =
|
||||
`\${{ secrets.${secretResult.fqsn.secretName} }}`;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ("value" in secretResult) {
|
||||
secretStore.set(secretResult.fqsn.secretName, secretResult.value);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue