lula2 0.6.6-nightly.0 → 0.7.0
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/README.md +1 -0
- package/dist/_app/immutable/assets/0.KSamNhnP.css +1 -0
- package/dist/_app/immutable/chunks/24UDoAn4.js +65 -0
- package/dist/_app/immutable/chunks/B0ygo1VA.js +2 -0
- package/dist/_app/immutable/chunks/B2nEDjq4.js +1 -0
- package/dist/_app/immutable/chunks/BNHHvtTX.js +1 -0
- package/dist/_app/immutable/chunks/CpBmCwmc.js +1 -0
- package/dist/_app/immutable/chunks/CttDkklr.js +2 -0
- package/dist/_app/immutable/chunks/P3psI8RV.js +1 -0
- package/dist/_app/immutable/chunks/iLqChAUt.js +1 -0
- package/dist/_app/immutable/chunks/iYE0hyoB.js +1 -0
- package/dist/_app/immutable/chunks/l0xMBaDV.js +1 -0
- package/dist/_app/immutable/entry/app.DK674slU.js +2 -0
- package/dist/_app/immutable/entry/start.BzhV34ug.js +1 -0
- package/dist/_app/immutable/nodes/0.CX00wLgP.js +2 -0
- package/dist/_app/immutable/nodes/1.eWlwSy7C.js +1 -0
- package/dist/_app/immutable/nodes/2.C8hXOpRf.js +1 -0
- package/dist/_app/immutable/nodes/3.DeLiyve3.js +1 -0
- package/dist/_app/immutable/nodes/{4.CjJtAzwd.js → 4.CSVxIlBM.js} +1 -1
- package/dist/_app/version.json +1 -1
- package/dist/cli/commands/ui.js +281 -14
- package/dist/cli/server/index.js +281 -14
- package/dist/cli/server/server.js +281 -14
- package/dist/cli/server/serverState.js +247 -3
- package/dist/cli/server/spreadsheetRoutes.js +821 -2
- package/dist/cli/server/websocketServer.js +281 -14
- package/dist/index.html +11 -11
- package/dist/index.js +281 -14
- package/package.json +21 -20
- package/src/lib/components/git-status/GitStatusDropdown.svelte +261 -0
- package/src/lib/components/git-status/index.ts +4 -0
- package/src/lib/types.ts +19 -0
- package/src/routes/+layout.svelte +4 -0
- package/dist/_app/immutable/assets/0.DT0yw00X.css +0 -1
- package/dist/_app/immutable/chunks/BAMA-SMn.js +0 -1
- package/dist/_app/immutable/chunks/BIpNkEdo.js +0 -65
- package/dist/_app/immutable/chunks/BOeu7SQt.js +0 -2
- package/dist/_app/immutable/chunks/Bvx51L6t.js +0 -1
- package/dist/_app/immutable/chunks/DQTRhwGS.js +0 -1
- package/dist/_app/immutable/chunks/DkIUt-Ae.js +0 -1
- package/dist/_app/immutable/chunks/DoNUPQ2F.js +0 -1
- package/dist/_app/immutable/chunks/DsnmJJEf.js +0 -1
- package/dist/_app/immutable/chunks/kqS9jm6m.js +0 -2
- package/dist/_app/immutable/chunks/oPg1Ic49.js +0 -1
- package/dist/_app/immutable/entry/app.Dqwn7sww.js +0 -2
- package/dist/_app/immutable/entry/start.B-O5NM7y.js +0 -1
- package/dist/_app/immutable/nodes/0.CZ3i370e.js +0 -2
- package/dist/_app/immutable/nodes/1.C9kqHM-h.js +0 -1
- package/dist/_app/immutable/nodes/2.BDP2l8IW.js +0 -1
- package/dist/_app/immutable/nodes/3.HVBwzXF9.js +0 -1
package/dist/index.js
CHANGED
|
@@ -2456,13 +2456,10 @@ var init_yamlDiff = __esm({
|
|
|
2456
2456
|
});
|
|
2457
2457
|
|
|
2458
2458
|
// cli/server/infrastructure/gitHistory.ts
|
|
2459
|
-
var gitHistory_exports = {};
|
|
2460
|
-
__export(gitHistory_exports, {
|
|
2461
|
-
GitHistoryUtil: () => GitHistoryUtil
|
|
2462
|
-
});
|
|
2463
2459
|
import * as fs2 from "fs";
|
|
2464
2460
|
import * as git from "isomorphic-git";
|
|
2465
2461
|
import { relative } from "path";
|
|
2462
|
+
import { execSync } from "child_process";
|
|
2466
2463
|
var GitHistoryUtil;
|
|
2467
2464
|
var init_gitHistory = __esm({
|
|
2468
2465
|
"cli/server/infrastructure/gitHistory.ts"() {
|
|
@@ -2470,8 +2467,30 @@ var init_gitHistory = __esm({
|
|
|
2470
2467
|
init_yamlDiff();
|
|
2471
2468
|
GitHistoryUtil = class {
|
|
2472
2469
|
baseDir;
|
|
2473
|
-
|
|
2470
|
+
execSync;
|
|
2471
|
+
constructor(baseDir, execSyncFn) {
|
|
2474
2472
|
this.baseDir = baseDir;
|
|
2473
|
+
this.execSync = execSyncFn || execSync;
|
|
2474
|
+
}
|
|
2475
|
+
/**
|
|
2476
|
+
* Execute a git command using native git binary with credentials support
|
|
2477
|
+
*/
|
|
2478
|
+
async executeGitCommand(command, cwd) {
|
|
2479
|
+
try {
|
|
2480
|
+
const workingDir = cwd || await git.findRoot({ fs: fs2, filepath: process.cwd() });
|
|
2481
|
+
const output = this.execSync(command, {
|
|
2482
|
+
cwd: workingDir,
|
|
2483
|
+
encoding: "utf8",
|
|
2484
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
2485
|
+
});
|
|
2486
|
+
return { success: true, output: output.toString() };
|
|
2487
|
+
} catch (error) {
|
|
2488
|
+
return {
|
|
2489
|
+
success: false,
|
|
2490
|
+
output: "",
|
|
2491
|
+
error: error.stderr?.toString() || error.message
|
|
2492
|
+
};
|
|
2493
|
+
}
|
|
2475
2494
|
}
|
|
2476
2495
|
/**
|
|
2477
2496
|
* Check if the directory is a git repository
|
|
@@ -2655,7 +2674,7 @@ var init_gitHistory = __esm({
|
|
|
2655
2674
|
}
|
|
2656
2675
|
const currentLines = currentContent ? currentContent.split("\n") : [];
|
|
2657
2676
|
const parentLines = parentContent ? parentContent.split("\n") : [];
|
|
2658
|
-
const diff = this.createSimpleDiff(parentLines, currentLines, relativePath);
|
|
2677
|
+
const diff = await this.createSimpleDiff(parentLines, currentLines, relativePath);
|
|
2659
2678
|
const { insertions, deletions } = this.countChanges(parentLines, currentLines);
|
|
2660
2679
|
const isMappingFile = relativePath.includes("-mappings.yaml");
|
|
2661
2680
|
const yamlDiff = createYamlDiff(parentContent || "", currentContent || "", isMappingFile);
|
|
@@ -2687,7 +2706,7 @@ var init_gitHistory = __esm({
|
|
|
2687
2706
|
/**
|
|
2688
2707
|
* Create a simple unified diff between two file versions
|
|
2689
2708
|
*/
|
|
2690
|
-
createSimpleDiff(oldLines, newLines, filepath) {
|
|
2709
|
+
async createSimpleDiff(oldLines, newLines, filepath) {
|
|
2691
2710
|
const diffLines = [];
|
|
2692
2711
|
diffLines.push(`--- a/${filepath}`);
|
|
2693
2712
|
diffLines.push(`+++ b/${filepath}`);
|
|
@@ -2769,6 +2788,227 @@ var init_gitHistory = __esm({
|
|
|
2769
2788
|
};
|
|
2770
2789
|
}
|
|
2771
2790
|
}
|
|
2791
|
+
/**
|
|
2792
|
+
* Get current branch name
|
|
2793
|
+
*/
|
|
2794
|
+
async getCurrentBranch() {
|
|
2795
|
+
try {
|
|
2796
|
+
const isGitRepo = await this.isGitRepository();
|
|
2797
|
+
if (!isGitRepo) {
|
|
2798
|
+
return null;
|
|
2799
|
+
}
|
|
2800
|
+
const gitRoot = await git.findRoot({ fs: fs2, filepath: process.cwd() });
|
|
2801
|
+
const branch = await git.currentBranch({ fs: fs2, dir: gitRoot });
|
|
2802
|
+
return branch || null;
|
|
2803
|
+
} catch (error) {
|
|
2804
|
+
console.error("Error getting current branch:", error);
|
|
2805
|
+
return null;
|
|
2806
|
+
}
|
|
2807
|
+
}
|
|
2808
|
+
/**
|
|
2809
|
+
* Get git status information
|
|
2810
|
+
*/
|
|
2811
|
+
async getGitStatus() {
|
|
2812
|
+
try {
|
|
2813
|
+
const isGitRepo = await this.isGitRepository();
|
|
2814
|
+
if (!isGitRepo) {
|
|
2815
|
+
return {
|
|
2816
|
+
isGitRepository: false,
|
|
2817
|
+
currentBranch: null,
|
|
2818
|
+
branchInfo: null,
|
|
2819
|
+
canPull: false,
|
|
2820
|
+
canPush: false
|
|
2821
|
+
};
|
|
2822
|
+
}
|
|
2823
|
+
const currentBranch2 = await this.getCurrentBranch();
|
|
2824
|
+
if (!currentBranch2) {
|
|
2825
|
+
return {
|
|
2826
|
+
isGitRepository: true,
|
|
2827
|
+
currentBranch: null,
|
|
2828
|
+
branchInfo: null,
|
|
2829
|
+
canPull: false,
|
|
2830
|
+
canPush: false
|
|
2831
|
+
};
|
|
2832
|
+
}
|
|
2833
|
+
const branchInfo = await this.getBranchInfo(currentBranch2);
|
|
2834
|
+
return {
|
|
2835
|
+
isGitRepository: true,
|
|
2836
|
+
currentBranch: currentBranch2,
|
|
2837
|
+
branchInfo,
|
|
2838
|
+
canPull: branchInfo?.isBehind || false,
|
|
2839
|
+
canPush: branchInfo?.isAhead || false
|
|
2840
|
+
};
|
|
2841
|
+
} catch (error) {
|
|
2842
|
+
console.error("Error getting git status:", error);
|
|
2843
|
+
return {
|
|
2844
|
+
isGitRepository: false,
|
|
2845
|
+
currentBranch: null,
|
|
2846
|
+
branchInfo: null,
|
|
2847
|
+
canPull: false,
|
|
2848
|
+
canPush: false
|
|
2849
|
+
};
|
|
2850
|
+
}
|
|
2851
|
+
}
|
|
2852
|
+
/**
|
|
2853
|
+
* Get branch comparison information
|
|
2854
|
+
*/
|
|
2855
|
+
async getBranchInfo(branchName) {
|
|
2856
|
+
try {
|
|
2857
|
+
const gitRoot = await git.findRoot({ fs: fs2, filepath: process.cwd() });
|
|
2858
|
+
const localCommits = await git.log({ fs: fs2, dir: gitRoot, ref: branchName });
|
|
2859
|
+
try {
|
|
2860
|
+
const remotes = await git.listRemotes({ fs: fs2, dir: gitRoot });
|
|
2861
|
+
for (const remote of remotes) {
|
|
2862
|
+
try {
|
|
2863
|
+
const fetchResult = await this.executeGitCommand(`git fetch ${remote.remote}`, gitRoot);
|
|
2864
|
+
if (!fetchResult.success) {
|
|
2865
|
+
console.warn(`Could not fetch from remote ${remote.remote}:`, fetchResult.error);
|
|
2866
|
+
}
|
|
2867
|
+
} catch (fetchError) {
|
|
2868
|
+
console.warn(`Could not fetch from remote ${remote.remote}:`, fetchError);
|
|
2869
|
+
}
|
|
2870
|
+
}
|
|
2871
|
+
let remoteCommits = [];
|
|
2872
|
+
let foundRemote = false;
|
|
2873
|
+
for (const remote of remotes) {
|
|
2874
|
+
const remoteBranchRef = `${remote.remote}/${branchName}`;
|
|
2875
|
+
try {
|
|
2876
|
+
remoteCommits = await git.log({ fs: fs2, dir: gitRoot, ref: remoteBranchRef });
|
|
2877
|
+
foundRemote = true;
|
|
2878
|
+
break;
|
|
2879
|
+
} catch (error) {
|
|
2880
|
+
console.warn(`Could not get commits for ${remoteBranchRef}: ${error}`);
|
|
2881
|
+
}
|
|
2882
|
+
}
|
|
2883
|
+
if (!foundRemote || remoteCommits.length === 0) {
|
|
2884
|
+
const lastCommit2 = localCommits[0];
|
|
2885
|
+
return {
|
|
2886
|
+
currentBranch: branchName,
|
|
2887
|
+
isAhead: false,
|
|
2888
|
+
isBehind: false,
|
|
2889
|
+
aheadCount: 0,
|
|
2890
|
+
behindCount: 0,
|
|
2891
|
+
lastCommitDate: lastCommit2 ? new Date(lastCommit2.commit.author.timestamp * 1e3).toISOString() : null,
|
|
2892
|
+
lastCommitMessage: lastCommit2?.commit.message || null,
|
|
2893
|
+
hasUnpushedChanges: false
|
|
2894
|
+
};
|
|
2895
|
+
}
|
|
2896
|
+
const localHashes = new Set(localCommits.map((c) => c.oid));
|
|
2897
|
+
const remoteHashes = new Set(remoteCommits.map((c) => c.oid));
|
|
2898
|
+
const aheadCount = localCommits.filter((c) => !remoteHashes.has(c.oid)).length;
|
|
2899
|
+
const behindCount = remoteCommits.filter((c) => !localHashes.has(c.oid)).length;
|
|
2900
|
+
const lastCommit = localCommits[0];
|
|
2901
|
+
return {
|
|
2902
|
+
currentBranch: branchName,
|
|
2903
|
+
isAhead: aheadCount > 0,
|
|
2904
|
+
isBehind: behindCount > 0,
|
|
2905
|
+
aheadCount,
|
|
2906
|
+
behindCount,
|
|
2907
|
+
lastCommitDate: lastCommit ? new Date(lastCommit.commit.author.timestamp * 1e3).toISOString() : null,
|
|
2908
|
+
lastCommitMessage: lastCommit?.commit.message || null,
|
|
2909
|
+
hasUnpushedChanges: aheadCount > 0
|
|
2910
|
+
};
|
|
2911
|
+
} catch {
|
|
2912
|
+
const lastCommit = localCommits[0];
|
|
2913
|
+
return {
|
|
2914
|
+
currentBranch: branchName,
|
|
2915
|
+
isAhead: false,
|
|
2916
|
+
isBehind: false,
|
|
2917
|
+
aheadCount: 0,
|
|
2918
|
+
behindCount: 0,
|
|
2919
|
+
lastCommitDate: lastCommit ? new Date(lastCommit.commit.author.timestamp * 1e3).toISOString() : null,
|
|
2920
|
+
lastCommitMessage: lastCommit?.commit.message || null,
|
|
2921
|
+
hasUnpushedChanges: false
|
|
2922
|
+
};
|
|
2923
|
+
}
|
|
2924
|
+
} catch (error) {
|
|
2925
|
+
console.error("Error getting branch info:", error);
|
|
2926
|
+
return null;
|
|
2927
|
+
}
|
|
2928
|
+
}
|
|
2929
|
+
/**
|
|
2930
|
+
* Fetch updates from remote repositories using native git command
|
|
2931
|
+
*/
|
|
2932
|
+
async fetchFromRemotes() {
|
|
2933
|
+
try {
|
|
2934
|
+
const isGitRepo = await this.isGitRepository();
|
|
2935
|
+
if (!isGitRepo) {
|
|
2936
|
+
return { success: false, message: "Not a git repository", details: [] };
|
|
2937
|
+
}
|
|
2938
|
+
const gitRoot = await git.findRoot({ fs: fs2, filepath: process.cwd() });
|
|
2939
|
+
const remotes = await git.listRemotes({ fs: fs2, dir: gitRoot });
|
|
2940
|
+
if (remotes.length === 0) {
|
|
2941
|
+
return { success: true, message: "No remotes configured", details: [] };
|
|
2942
|
+
}
|
|
2943
|
+
const details = [];
|
|
2944
|
+
let hasErrors = false;
|
|
2945
|
+
for (const remote of remotes) {
|
|
2946
|
+
try {
|
|
2947
|
+
const fetchResult = await this.executeGitCommand(`git fetch ${remote.remote}`, gitRoot);
|
|
2948
|
+
if (fetchResult.success) {
|
|
2949
|
+
details.push(`Fetched from ${remote.remote}`);
|
|
2950
|
+
} else {
|
|
2951
|
+
details.push(`Failed to fetch from ${remote.remote}: ${fetchResult.error}`);
|
|
2952
|
+
hasErrors = true;
|
|
2953
|
+
}
|
|
2954
|
+
} catch (error) {
|
|
2955
|
+
details.push(`Error fetching from ${remote.remote}: ${error}`);
|
|
2956
|
+
hasErrors = true;
|
|
2957
|
+
}
|
|
2958
|
+
}
|
|
2959
|
+
return {
|
|
2960
|
+
success: !hasErrors,
|
|
2961
|
+
message: hasErrors ? "Fetch completed with some errors" : "Successfully fetched from all remotes",
|
|
2962
|
+
details
|
|
2963
|
+
};
|
|
2964
|
+
} catch (error) {
|
|
2965
|
+
console.error("Error fetching from remotes:", error);
|
|
2966
|
+
return {
|
|
2967
|
+
success: false,
|
|
2968
|
+
message: error instanceof Error ? error.message : "Unknown error occurred",
|
|
2969
|
+
details: []
|
|
2970
|
+
};
|
|
2971
|
+
}
|
|
2972
|
+
}
|
|
2973
|
+
/**
|
|
2974
|
+
* Pull changes from remote using native git command
|
|
2975
|
+
*/
|
|
2976
|
+
async pullChanges() {
|
|
2977
|
+
try {
|
|
2978
|
+
const isGitRepo = await this.isGitRepository();
|
|
2979
|
+
if (!isGitRepo) {
|
|
2980
|
+
return { success: false, message: "Not a git repository" };
|
|
2981
|
+
}
|
|
2982
|
+
const currentBranch2 = await this.getCurrentBranch();
|
|
2983
|
+
if (!currentBranch2) {
|
|
2984
|
+
return { success: false, message: "No current branch found" };
|
|
2985
|
+
}
|
|
2986
|
+
const gitRoot = await git.findRoot({ fs: fs2, filepath: process.cwd() });
|
|
2987
|
+
const remotes = await git.listRemotes({ fs: fs2, dir: gitRoot });
|
|
2988
|
+
if (remotes.length === 0) {
|
|
2989
|
+
return { success: false, message: "No remotes configured" };
|
|
2990
|
+
}
|
|
2991
|
+
const targetRemote = remotes[0].remote;
|
|
2992
|
+
const pullCommand = `git pull ${targetRemote} ${currentBranch2}`;
|
|
2993
|
+
const pullResult = await this.executeGitCommand(pullCommand, gitRoot);
|
|
2994
|
+
if (!pullResult.success) {
|
|
2995
|
+
return {
|
|
2996
|
+
success: false,
|
|
2997
|
+
message: `Failed to pull changes: ${pullResult.error}`
|
|
2998
|
+
};
|
|
2999
|
+
}
|
|
3000
|
+
return {
|
|
3001
|
+
success: true,
|
|
3002
|
+
message: pullResult.output || "Successfully pulled changes"
|
|
3003
|
+
};
|
|
3004
|
+
} catch (error) {
|
|
3005
|
+
console.error("Error pulling changes:", error);
|
|
3006
|
+
return {
|
|
3007
|
+
success: false,
|
|
3008
|
+
message: error instanceof Error ? error.message : "Unknown error occurred"
|
|
3009
|
+
};
|
|
3010
|
+
}
|
|
3011
|
+
}
|
|
2772
3012
|
};
|
|
2773
3013
|
}
|
|
2774
3014
|
});
|
|
@@ -3619,6 +3859,7 @@ var init_spreadsheetRoutes = __esm({
|
|
|
3619
3859
|
"use strict";
|
|
3620
3860
|
init_debug();
|
|
3621
3861
|
init_serverState();
|
|
3862
|
+
init_gitHistory();
|
|
3622
3863
|
MAX_HEADER_CANDIDATES = 5;
|
|
3623
3864
|
PREVIEW_COLUMNS = 4;
|
|
3624
3865
|
router = express.Router();
|
|
@@ -3938,6 +4179,32 @@ var init_spreadsheetRoutes = __esm({
|
|
|
3938
4179
|
res.status(500).json({ error: "Failed to get sheet previews" });
|
|
3939
4180
|
}
|
|
3940
4181
|
});
|
|
4182
|
+
router.get("/git-status", async (req, res) => {
|
|
4183
|
+
try {
|
|
4184
|
+
const state = getServerState();
|
|
4185
|
+
const gitUtil = new GitHistoryUtil(state.CONTROL_SET_DIR);
|
|
4186
|
+
const gitStatus = await gitUtil.getGitStatus();
|
|
4187
|
+
res.json(gitStatus);
|
|
4188
|
+
} catch (error) {
|
|
4189
|
+
console.error("Error getting git status:", error);
|
|
4190
|
+
res.status(500).json({ error: "Failed to get git status" });
|
|
4191
|
+
}
|
|
4192
|
+
});
|
|
4193
|
+
router.post("/git-pull", async (req, res) => {
|
|
4194
|
+
try {
|
|
4195
|
+
const state = getServerState();
|
|
4196
|
+
const gitUtil = new GitHistoryUtil(state.CONTROL_SET_DIR);
|
|
4197
|
+
const result = await gitUtil.pullChanges();
|
|
4198
|
+
if (result.success) {
|
|
4199
|
+
res.json(result);
|
|
4200
|
+
} else {
|
|
4201
|
+
res.status(400).json(result);
|
|
4202
|
+
}
|
|
4203
|
+
} catch (error) {
|
|
4204
|
+
console.error("Error pulling changes:", error);
|
|
4205
|
+
res.status(500).json({ error: "Failed to pull changes" });
|
|
4206
|
+
}
|
|
4207
|
+
});
|
|
3941
4208
|
spreadsheetRoutes_default = router;
|
|
3942
4209
|
}
|
|
3943
4210
|
});
|
|
@@ -4822,6 +5089,7 @@ import { readFileSync as readFileSync4 } from "fs";
|
|
|
4822
5089
|
init_debug();
|
|
4823
5090
|
init_controlHelpers();
|
|
4824
5091
|
init_serverState();
|
|
5092
|
+
init_gitHistory();
|
|
4825
5093
|
import * as yaml5 from "js-yaml";
|
|
4826
5094
|
import { join as join5 } from "path";
|
|
4827
5095
|
import { WebSocket, WebSocketServer } from "ws";
|
|
@@ -4985,8 +5253,7 @@ var WebSocketManager = class {
|
|
|
4985
5253
|
if (!control.id) {
|
|
4986
5254
|
control.id = controlId;
|
|
4987
5255
|
}
|
|
4988
|
-
const {
|
|
4989
|
-
const { execSync } = await import("child_process");
|
|
5256
|
+
const { execSync: execSync2 } = await import("child_process");
|
|
4990
5257
|
let timeline = null;
|
|
4991
5258
|
try {
|
|
4992
5259
|
const currentPath2 = getCurrentControlSetPath();
|
|
@@ -5026,7 +5293,7 @@ var WebSocketManager = class {
|
|
|
5026
5293
|
console.error(`Could not find file for control ${control.id}`);
|
|
5027
5294
|
timeline = null;
|
|
5028
5295
|
} else {
|
|
5029
|
-
const gitUtil = new
|
|
5296
|
+
const gitUtil = new GitHistoryUtil(currentPath2);
|
|
5030
5297
|
const controlHistory = await gitUtil.getFileHistory(controlPath);
|
|
5031
5298
|
debug(`Git history for ${control.id}:`, {
|
|
5032
5299
|
path: controlPath,
|
|
@@ -5047,12 +5314,12 @@ var WebSocketManager = class {
|
|
|
5047
5314
|
let hasPendingChanges = false;
|
|
5048
5315
|
try {
|
|
5049
5316
|
try {
|
|
5050
|
-
|
|
5317
|
+
execSync2(`git ls-files --error-unmatch "${controlPath}"`, {
|
|
5051
5318
|
encoding: "utf8",
|
|
5052
5319
|
cwd: process.cwd(),
|
|
5053
5320
|
stdio: "pipe"
|
|
5054
5321
|
});
|
|
5055
|
-
const gitStatus =
|
|
5322
|
+
const gitStatus = execSync2(`git status --porcelain "${controlPath}"`, {
|
|
5056
5323
|
encoding: "utf8",
|
|
5057
5324
|
cwd: process.cwd()
|
|
5058
5325
|
}).trim();
|
|
@@ -5071,12 +5338,12 @@ var WebSocketManager = class {
|
|
|
5071
5338
|
if (existsSync6(mappingPath)) {
|
|
5072
5339
|
try {
|
|
5073
5340
|
try {
|
|
5074
|
-
|
|
5341
|
+
execSync2(`git ls-files --error-unmatch "${mappingPath}"`, {
|
|
5075
5342
|
encoding: "utf8",
|
|
5076
5343
|
cwd: process.cwd(),
|
|
5077
5344
|
stdio: "pipe"
|
|
5078
5345
|
});
|
|
5079
|
-
const gitStatus =
|
|
5346
|
+
const gitStatus = execSync2(`git status --porcelain "${mappingPath}"`, {
|
|
5080
5347
|
encoding: "utf8",
|
|
5081
5348
|
cwd: process.cwd()
|
|
5082
5349
|
}).trim();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lula2",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "A tool for managing compliance as code in your GitHub repositories.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"lula2": "./dist/lula2"
|
|
@@ -33,6 +33,25 @@
|
|
|
33
33
|
"!dist/**/*.test.js*",
|
|
34
34
|
"!dist/**/*.test.d.ts*"
|
|
35
35
|
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"dev": "vite dev --port 5173",
|
|
38
|
+
"dev:api": "tsx --watch index.ts --debug ui --port 3000 --no-open-browser",
|
|
39
|
+
"dev:full": "concurrently \"npm run dev:api\" \"npm run dev\"",
|
|
40
|
+
"build": "npm run build:svelte && npm run build:cli && npm run postbuild:cli",
|
|
41
|
+
"build:svelte": "vite build",
|
|
42
|
+
"build:cli": "esbuild index.ts cli/**/*.ts --bundle --platform=node --target=node22 --format=esm --outdir=dist --external:express --external:commander --external:js-yaml --external:yaml --external:isomorphic-git --external:glob --external:open --external:ws --external:cors --external:multer --external:@octokit/rest --external:undici --external:xlsx-republish --external:csv-parse",
|
|
43
|
+
"postbuild:cli": "cp cli-wrapper.mjs dist/lula2 && chmod +x dist/lula2",
|
|
44
|
+
"preview": "vite preview",
|
|
45
|
+
"prepare": "svelte-kit sync || echo ''",
|
|
46
|
+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json && tsc --noEmit",
|
|
47
|
+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
48
|
+
"format": "prettier --write 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts'",
|
|
49
|
+
"format:check": "prettier --check 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts'",
|
|
50
|
+
"lint": "prettier --check 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts' && eslint src cli",
|
|
51
|
+
"test": "npm run test:unit -- --run --coverage",
|
|
52
|
+
"test:integration": "vitest --config integration/vitest.config.integration.ts",
|
|
53
|
+
"test:unit": "vitest"
|
|
54
|
+
},
|
|
36
55
|
"dependencies": {
|
|
37
56
|
"@octokit/rest": "^22.0.0",
|
|
38
57
|
"@types/ws": "^8.18.1",
|
|
@@ -105,23 +124,5 @@
|
|
|
105
124
|
"main",
|
|
106
125
|
"next"
|
|
107
126
|
]
|
|
108
|
-
},
|
|
109
|
-
"scripts": {
|
|
110
|
-
"dev": "vite dev --port 5173",
|
|
111
|
-
"dev:api": "tsx --watch index.ts --debug ui --port 3000 --no-open-browser",
|
|
112
|
-
"dev:full": "concurrently \"npm run dev:api\" \"npm run dev\"",
|
|
113
|
-
"build": "npm run build:svelte && npm run build:cli && npm run postbuild:cli",
|
|
114
|
-
"build:svelte": "vite build",
|
|
115
|
-
"build:cli": "esbuild index.ts cli/**/*.ts --bundle --platform=node --target=node22 --format=esm --outdir=dist --external:express --external:commander --external:js-yaml --external:yaml --external:isomorphic-git --external:glob --external:open --external:ws --external:cors --external:multer --external:@octokit/rest --external:undici --external:xlsx-republish --external:csv-parse",
|
|
116
|
-
"postbuild:cli": "cp cli-wrapper.mjs dist/lula2 && chmod +x dist/lula2",
|
|
117
|
-
"preview": "vite preview",
|
|
118
|
-
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json && tsc --noEmit",
|
|
119
|
-
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
120
|
-
"format": "prettier --write 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts'",
|
|
121
|
-
"format:check": "prettier --check 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts'",
|
|
122
|
-
"lint": "prettier --check 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts' && eslint src cli",
|
|
123
|
-
"test": "npm run test:unit -- --run --coverage",
|
|
124
|
-
"test:integration": "vitest --config integration/vitest.config.integration.ts",
|
|
125
|
-
"test:unit": "vitest"
|
|
126
127
|
}
|
|
127
|
-
}
|
|
128
|
+
}
|