fraim 2.0.357-next.4 → 2.0.357-next.6
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.
|
@@ -8,10 +8,10 @@ exports.ProviderClient = void 0;
|
|
|
8
8
|
const axios_1 = __importDefault(require("axios"));
|
|
9
9
|
class ProviderClient {
|
|
10
10
|
constructor(fraimKey, serverUrl) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
: 'https://fraim.wellnessatwork.me');
|
|
11
|
+
const isPpe = (process.env.FRAIM_RELEASE_CHANNEL || '').toUpperCase() === 'PPE';
|
|
12
|
+
this.serverUrl = serverUrl ||
|
|
13
|
+
(isPpe ? 'https://app-ashley-fraim-ppe.azurewebsites.net'
|
|
14
|
+
: (process.env.FRAIM_REMOTE_URL || 'https://fraim.wellnessatwork.me'));
|
|
15
15
|
this.client = axios_1.default.create({
|
|
16
16
|
baseURL: this.serverUrl,
|
|
17
17
|
headers: {
|
|
@@ -67,7 +67,7 @@ exports.overrideCommand = new commander_1.Command('override')
|
|
|
67
67
|
serverUrl = `http://localhost:${localPort}`;
|
|
68
68
|
}
|
|
69
69
|
else {
|
|
70
|
-
serverUrl = config.remoteUrl ||
|
|
70
|
+
serverUrl = config.remoteUrl || ((process.env.FRAIM_RELEASE_CHANNEL || '').toUpperCase() === 'PPE' ? 'https://app-ashley-fraim-ppe.azurewebsites.net' : (process.env.FRAIM_REMOTE_URL || 'https://fraim.wellnessatwork.me'));
|
|
71
71
|
}
|
|
72
72
|
const apiKey = isLocal ? 'local-dev' : (config.apiKey || process.env.FRAIM_API_KEY);
|
|
73
73
|
const headers = { 'Content-Type': 'application/json' };
|
|
@@ -125,7 +125,7 @@ const runSync = async (options) => {
|
|
|
125
125
|
// Order: user-level config → env var → project config (only if in a project)
|
|
126
126
|
const remoteUrl = useLocal
|
|
127
127
|
? resolveExplicitLocalSyncUrl() || `http://localhost:${process.env.FRAIM_MCP_PORT || (0, git_utils_1.getPort)()}`
|
|
128
|
-
:
|
|
128
|
+
: (process.env.FRAIM_RELEASE_CHANNEL || '').toUpperCase() === 'PPE' ? 'https://app-ashley-fraim-ppe.azurewebsites.net' : (process.env.FRAIM_REMOTE_URL || 'https://fraim.wellnessatwork.me');
|
|
129
129
|
let apiKey = useLocal ? 'local-dev' : loadUserApiKey() || process.env.FRAIM_API_KEY;
|
|
130
130
|
const hasProject = (0, project_fraim_paths_1.workspaceFraimExists)(projectRoot);
|
|
131
131
|
if (!apiKey && hasProject) {
|
|
@@ -143,7 +143,7 @@ async function discoverCloudManagerStorage(options) {
|
|
|
143
143
|
const apiKey = options?.apiKey || (0, user_config_1.readUserFraimConfig)().apiKey;
|
|
144
144
|
if (!apiKey || apiKey === 'local-dev' || apiKey === 'test-mode-key')
|
|
145
145
|
return null;
|
|
146
|
-
const remoteUrl = options?.remoteUrl ||
|
|
146
|
+
const remoteUrl = options?.remoteUrl || ((process.env.FRAIM_RELEASE_CHANNEL || '').toUpperCase() === 'PPE' ? 'https://app-ashley-fraim-ppe.azurewebsites.net' : (process.env.FRAIM_REMOTE_URL || 'https://fraim.wellnessatwork.me'));
|
|
147
147
|
const pack = await fetchCloudPack(remoteUrl, apiKey);
|
|
148
148
|
if (pack.files.length === 0)
|
|
149
149
|
return null;
|
|
@@ -217,7 +217,7 @@ async function syncManagerCache(options) {
|
|
|
217
217
|
writeHomeMetadata(metadata);
|
|
218
218
|
return { status: 'synced', metadata };
|
|
219
219
|
}
|
|
220
|
-
const remoteUrl = options?.remoteUrl ||
|
|
220
|
+
const remoteUrl = options?.remoteUrl || ((process.env.FRAIM_RELEASE_CHANNEL || '').toUpperCase() === 'PPE' ? 'https://app-ashley-fraim-ppe.azurewebsites.net' : (process.env.FRAIM_REMOTE_URL || 'https://fraim.wellnessatwork.me'));
|
|
221
221
|
const apiKey = options?.apiKey || (0, user_config_1.readUserFraimConfig)().apiKey;
|
|
222
222
|
if (!apiKey)
|
|
223
223
|
throw new Error('No FRAIM API key available for the fraim-cloud manager backend.');
|