@remixhq/core 0.1.4 → 0.1.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.
package/dist/api.d.ts CHANGED
@@ -11,6 +11,7 @@ type MergeRequest = {
11
11
  sourceTipCommitId: string | null;
12
12
  targetAppId: string;
13
13
  targetCommitId: string | null;
14
+ kind: "merge" | "sync";
14
15
  status: MergeRequestStatus;
15
16
  title: string | null;
16
17
  description: string | null;
@@ -0,0 +1,46 @@
1
+ import {
2
+ RemixError
3
+ } from "./chunk-YZ34ICNN.js";
4
+
5
+ // src/config/model.ts
6
+ import { z } from "zod";
7
+ var DEFAULT_API_URL = "http://192.168.8.242:8080";
8
+ var DEFAULT_SUPABASE_URL = "https://xtfxwbckjpfmqubnsusu.supabase.co";
9
+ var DEFAULT_SUPABASE_ANON_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Inh0Znh3YmNranBmbXF1Ym5zdXN1Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjA2MDEyMzAsImV4cCI6MjA3NjE3NzIzMH0.dzWGAWrK4CvrmHVHzf8w7JlUZohdap0ZPnLZnABMV8s";
10
+ function isValidUrl(value) {
11
+ try {
12
+ new URL(value);
13
+ return true;
14
+ } catch {
15
+ return false;
16
+ }
17
+ }
18
+ var urlSchema = z.string().min(1).transform((s) => s.trim()).refine((s) => isValidUrl(s), "Invalid URL.").transform((s) => s.replace(/\/+$/, ""));
19
+ var configSchema = z.object({
20
+ apiUrl: urlSchema,
21
+ supabaseUrl: urlSchema,
22
+ supabaseAnonKey: z.string().min(1)
23
+ });
24
+ var cachedConfig = null;
25
+ async function resolveConfig(_opts) {
26
+ if (cachedConfig) return cachedConfig;
27
+ const cfgRaw = {
28
+ apiUrl: DEFAULT_API_URL,
29
+ supabaseUrl: DEFAULT_SUPABASE_URL,
30
+ supabaseAnonKey: DEFAULT_SUPABASE_ANON_KEY
31
+ };
32
+ const parsedCfg = configSchema.safeParse(cfgRaw);
33
+ if (!parsedCfg.success) {
34
+ throw new RemixError("Invalid core configuration.", {
35
+ exitCode: 1,
36
+ hint: parsedCfg.error.issues.map((i) => `${i.path.join(".") || "config"}: ${i.message}`).join("; ")
37
+ });
38
+ }
39
+ cachedConfig = parsedCfg.data;
40
+ return parsedCfg.data;
41
+ }
42
+
43
+ export {
44
+ configSchema,
45
+ resolveConfig
46
+ };
package/dist/collab.d.ts CHANGED
@@ -8,6 +8,7 @@ type MergeRequest = {
8
8
  sourceTipCommitId: string | null;
9
9
  targetAppId: string;
10
10
  targetCommitId: string | null;
11
+ kind: "merge" | "sync";
11
12
  status: MergeRequestStatus;
12
13
  title: string | null;
13
14
  description: string | null;
@@ -458,12 +459,6 @@ declare function collabApprove(params: {
458
459
  allowBranchMismatch?: boolean;
459
460
  }): Promise<CollabApproveResult>;
460
461
 
461
- declare function collabInbox(params: {
462
- api: CollabApiClient;
463
- }): Promise<{
464
- mergeRequests: MergeRequest[];
465
- }>;
466
-
467
462
  declare function collabListMergeRequests(params: {
468
463
  api: CollabApiClient;
469
464
  queue: MergeRequestQueue;
@@ -716,4 +711,4 @@ declare function collabView(params: {
716
711
  mrId: string;
717
712
  }): Promise<MergeRequestReview>;
718
713
 
719
- export { type AppReconcileResponse, type CollabApiClient, type CollabApproveMode, type CollabApproveResult, type CollabRecordingPreflight, type CollabRecordingPreflightStatus, type CollabStatus, type CollabStatusBlockedReason, type CollabStatusRecommendedAction, type CollabTurn, type InvitationScopeType, type JsonObject, type MergeRequest, type MergeRequestQueue, type MergeRequestReview, type MergeRequestStatus, type ReconcilePreflightResponse, type SyncLocalResponse, type SyncUpstreamResponse, collabAdd, collabApprove, collabInbox, collabInit, collabInvite, collabList, collabListMergeRequests, collabReconcile, collabRecordTurn, collabRecordingPreflight, collabReject, collabRemix, collabRequestMerge, collabStatus, collabSync, collabSyncUpstream, collabView };
714
+ export { type AppReconcileResponse, type CollabApiClient, type CollabApproveMode, type CollabApproveResult, type CollabRecordingPreflight, type CollabRecordingPreflightStatus, type CollabStatus, type CollabStatusBlockedReason, type CollabStatusRecommendedAction, type CollabTurn, type InvitationScopeType, type JsonObject, type MergeRequest, type MergeRequestQueue, type MergeRequestReview, type MergeRequestStatus, type ReconcilePreflightResponse, type SyncLocalResponse, type SyncUpstreamResponse, collabAdd, collabApprove, collabInit, collabInvite, collabList, collabListMergeRequests, collabReconcile, collabRecordTurn, collabRecordingPreflight, collabReject, collabRemix, collabRequestMerge, collabStatus, collabSync, collabSyncUpstream, collabView };
package/dist/collab.js CHANGED
@@ -1322,17 +1322,6 @@ async function collabListMergeRequests(params) {
1322
1322
  };
1323
1323
  }
1324
1324
 
1325
- // src/application/collab/collabInbox.ts
1326
- async function collabInbox(params) {
1327
- const result = await collabListMergeRequests({
1328
- api: params.api,
1329
- queue: "reviewable",
1330
- status: "open",
1331
- kind: "merge"
1332
- });
1333
- return { mergeRequests: result.mergeRequests };
1334
- }
1335
-
1336
1325
  // src/application/collab/collabInit.ts
1337
1326
  import fs6 from "fs/promises";
1338
1327
  import path4 from "path";
@@ -2216,7 +2205,6 @@ async function collabView(params) {
2216
2205
  export {
2217
2206
  collabAdd,
2218
2207
  collabApprove,
2219
- collabInbox,
2220
2208
  collabInit,
2221
2209
  collabInvite,
2222
2210
  collabList,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remixhq/core",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Remix core library",
5
5
  "homepage": "https://github.com/RemixDotOne/remix-core",
6
6
  "license": "MIT",