repowise 0.1.67 → 0.1.69

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.
@@ -843,10 +843,10 @@ function isStagingMode() {
843
843
  }
844
844
  var PRODUCTION = {
845
845
  apiUrl: "https://api.repowise.ai",
846
- cognitoDomain: "auth-repowise",
846
+ cognitoDomain: "auth.repowise.ai",
847
847
  cognitoClientId: "50so1fkmjbqt1ufnsmbhsjbtst",
848
848
  cognitoRegion: "us-east-1",
849
- customDomain: false
849
+ customDomain: true
850
850
  };
851
851
  var STAGING = {
852
852
  apiUrl: "https://staging-api.repowise.ai",
@@ -2768,12 +2768,16 @@ async function sync() {
2768
2768
  return;
2769
2769
  }
2770
2770
  let repoId;
2771
+ let repoPlatform;
2772
+ let repoExternalId;
2771
2773
  spinner.start("Resolving repository...");
2772
2774
  try {
2773
2775
  const repos = await apiRequest("/v1/repos");
2774
2776
  const match = repos.find((r) => r.name === repoName || r.fullName.endsWith(`/${repoName}`));
2775
2777
  if (match) {
2776
2778
  repoId = match.repoId;
2779
+ repoPlatform = match.platform;
2780
+ repoExternalId = match.externalId;
2777
2781
  }
2778
2782
  } catch {
2779
2783
  }
@@ -2893,6 +2897,28 @@ async function sync() {
2893
2897
  spinner.warn(chalk8.yellow(`Could not download context files: ${msg}
2894
2898
  Retry when online.`));
2895
2899
  }
2900
+ if (repoRoot && repoId) {
2901
+ try {
2902
+ const existingConfig = await getConfig();
2903
+ const existingRepos = existingConfig.repos ?? [];
2904
+ if (!existingRepos.some((r) => r.repoId === repoId)) {
2905
+ const repoEntry = { repoId, localPath: repoRoot };
2906
+ if (isStagingMode()) {
2907
+ repoEntry.apiUrl = getEnvConfig().apiUrl;
2908
+ }
2909
+ if (repoPlatform) repoEntry.platform = repoPlatform;
2910
+ if (repoExternalId) repoEntry.externalId = repoExternalId;
2911
+ existingRepos.push(repoEntry);
2912
+ await saveConfig({ ...existingConfig, repos: existingRepos });
2913
+ }
2914
+ } catch {
2915
+ }
2916
+ try {
2917
+ await install();
2918
+ await startBackground();
2919
+ } catch {
2920
+ }
2921
+ }
2896
2922
  const elapsed = formatElapsed2(Date.now() - startTime);
2897
2923
  console.log(chalk8.dim(`
2898
2924
  Total time: ${elapsed}`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repowise",
3
- "version": "0.1.67",
3
+ "version": "0.1.69",
4
4
  "type": "module",
5
5
  "description": "AI-optimized codebase context generator",
6
6
  "bin": {