@jpkme/diff-review 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/README.md +4 -4
- package/bin/diff-review.mjs +240 -90
- package/lib/autocomplete-es.mjs +143 -0
- package/lib/check-report.mjs +213 -0
- package/lib/check-report.test.mjs +46 -0
- package/lib/output-name.mjs +18 -30
- package/lib/output-name.test.mjs +10 -27
- package/lib/prompt.mjs +29 -10
- package/package.json +3 -2
- package/schema.json +12 -0
- package/web/build/client/_app/immutable/chunks/{CAnYe5db.js → Ber_0nz7.js} +1 -1
- package/web/build/client/_app/immutable/chunks/Ber_0nz7.js.br +2 -0
- package/web/build/client/_app/immutable/chunks/Ber_0nz7.js.gz +0 -0
- package/web/build/client/_app/immutable/chunks/{BaYDuTXu.js → DRga3k74.js} +28 -17
- package/web/build/client/_app/immutable/chunks/DRga3k74.js.br +0 -0
- package/web/build/client/_app/immutable/chunks/DRga3k74.js.gz +0 -0
- package/web/build/client/_app/immutable/chunks/{Gya4IU1I.js → zvcaSoGP.js} +2 -2
- package/web/build/client/_app/immutable/chunks/zvcaSoGP.js.br +0 -0
- package/web/build/client/_app/immutable/chunks/zvcaSoGP.js.gz +0 -0
- package/web/build/client/_app/immutable/entry/{app.e96uPVtl.js → app.BP_R_kTF.js} +2 -2
- package/web/build/client/_app/immutable/entry/app.BP_R_kTF.js.br +0 -0
- package/web/build/client/_app/immutable/entry/app.BP_R_kTF.js.gz +0 -0
- package/web/build/client/_app/immutable/entry/start.lXpYdwbt.js +1 -0
- package/web/build/client/_app/immutable/entry/start.lXpYdwbt.js.br +1 -0
- package/web/build/client/_app/immutable/entry/start.lXpYdwbt.js.gz +0 -0
- package/web/build/client/_app/immutable/nodes/{1.V-g5-sfL.js → 1.CGJk77oo.js} +1 -1
- package/web/build/client/_app/immutable/nodes/1.CGJk77oo.js.br +3 -0
- package/web/build/client/_app/immutable/nodes/1.CGJk77oo.js.gz +0 -0
- package/web/build/client/_app/immutable/nodes/2.Dl2xIvoV.js +66 -0
- package/web/build/client/_app/immutable/nodes/2.Dl2xIvoV.js.br +0 -0
- package/web/build/client/_app/immutable/nodes/2.Dl2xIvoV.js.gz +0 -0
- package/web/build/client/_app/immutable/nodes/3.Bn5l-P1e.js +170 -0
- package/web/build/client/_app/immutable/nodes/3.Bn5l-P1e.js.br +0 -0
- package/web/build/client/_app/immutable/nodes/3.Bn5l-P1e.js.gz +0 -0
- package/web/build/client/_app/version.json +1 -1
- package/web/build/client/_app/version.json.br +0 -0
- package/web/build/client/_app/version.json.gz +0 -0
- package/web/build/handler.js +3 -3
- package/web/build/index.js +3 -3
- package/web/build/server/chunks/1-CRg9pswO.js +7 -0
- package/web/build/server/chunks/{1-DCKScL3A.js.map → 1-CRg9pswO.js.map} +1 -1
- package/web/build/server/chunks/{2-BpBQQ02B.js → 2-BmYzresl.js} +2 -2
- package/web/build/server/chunks/{2-BpBQQ02B.js.map → 2-BmYzresl.js.map} +1 -1
- package/web/build/server/chunks/{3-rGkcNCVz.js → 3-DaeIJXI7.js} +2 -2
- package/web/build/server/chunks/{3-rGkcNCVz.js.map → 3-DaeIJXI7.js.map} +1 -1
- package/web/build/server/chunks/{handler-BaT-QavL.js → handler-2eew4UOl.js} +3 -3
- package/web/build/server/chunks/{handler-BaT-QavL.js.map → handler-2eew4UOl.js.map} +1 -1
- package/web/build/server/chunks/{index.js-C-K0YDBJ.js → index.js-DbiNsix3.js} +2 -2
- package/web/build/server/chunks/{index.js-C-K0YDBJ.js.map → index.js-DbiNsix3.js.map} +1 -1
- package/web/build/server/chunks/{manifest.js-CDz-Fem4.js → manifest.js-BYNXhn6E.js} +6 -6
- package/web/build/server/chunks/{manifest.js-CDz-Fem4.js.map → manifest.js-BYNXhn6E.js.map} +1 -1
- package/web/build/server/chunks/{remote-1g4ayag-DXdFe1BG.js → remote-1g4ayag-DESnyPRn.js} +27 -40
- package/web/build/server/chunks/{remote-1g4ayag-DXdFe1BG.js.map → remote-1g4ayag-DESnyPRn.js.map} +1 -1
- package/web/build/client/_app/immutable/chunks/BaYDuTXu.js.br +0 -0
- package/web/build/client/_app/immutable/chunks/BaYDuTXu.js.gz +0 -0
- package/web/build/client/_app/immutable/chunks/CAnYe5db.js.br +0 -1
- package/web/build/client/_app/immutable/chunks/CAnYe5db.js.gz +0 -0
- package/web/build/client/_app/immutable/chunks/Gya4IU1I.js.br +0 -0
- package/web/build/client/_app/immutable/chunks/Gya4IU1I.js.gz +0 -0
- package/web/build/client/_app/immutable/entry/app.e96uPVtl.js.br +0 -0
- package/web/build/client/_app/immutable/entry/app.e96uPVtl.js.gz +0 -0
- package/web/build/client/_app/immutable/entry/start.D-D-7QPy.js +0 -1
- package/web/build/client/_app/immutable/entry/start.D-D-7QPy.js.br +0 -0
- package/web/build/client/_app/immutable/entry/start.D-D-7QPy.js.gz +0 -0
- package/web/build/client/_app/immutable/nodes/1.V-g5-sfL.js.br +0 -0
- package/web/build/client/_app/immutable/nodes/1.V-g5-sfL.js.gz +0 -0
- package/web/build/client/_app/immutable/nodes/2.lcRePHZ5.js +0 -66
- package/web/build/client/_app/immutable/nodes/2.lcRePHZ5.js.br +0 -0
- package/web/build/client/_app/immutable/nodes/2.lcRePHZ5.js.gz +0 -0
- package/web/build/client/_app/immutable/nodes/3.GZPWeD9I.js +0 -170
- package/web/build/client/_app/immutable/nodes/3.GZPWeD9I.js.br +0 -0
- package/web/build/client/_app/immutable/nodes/3.GZPWeD9I.js.gz +0 -0
- package/web/build/server/chunks/1-DCKScL3A.js +0 -7
|
@@ -10,15 +10,15 @@ return {
|
|
|
10
10
|
assets: new Set([]),
|
|
11
11
|
mimeTypes: {},
|
|
12
12
|
_: {
|
|
13
|
-
client: {start:"_app/immutable/entry/start.
|
|
13
|
+
client: {start:"_app/immutable/entry/start.lXpYdwbt.js",app:"_app/immutable/entry/app.BP_R_kTF.js",imports:["_app/immutable/entry/start.lXpYdwbt.js","_app/immutable/chunks/zvcaSoGP.js","_app/immutable/chunks/Dur-vdUf.js","_app/immutable/entry/app.BP_R_kTF.js","_app/immutable/chunks/Dur-vdUf.js","_app/immutable/chunks/tYeNsyIK.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
|
|
14
14
|
nodes: [
|
|
15
15
|
__memo(() => import('./0-SseDy__O.js')),
|
|
16
|
-
__memo(() => import('./1-
|
|
17
|
-
__memo(() => import('./2-
|
|
18
|
-
__memo(() => import('./3-
|
|
16
|
+
__memo(() => import('./1-CRg9pswO.js')),
|
|
17
|
+
__memo(() => import('./2-BmYzresl.js')),
|
|
18
|
+
__memo(() => import('./3-DaeIJXI7.js'))
|
|
19
19
|
],
|
|
20
20
|
remotes: {
|
|
21
|
-
'1g4ayag': __memo(() => import('./remote-1g4ayag-
|
|
21
|
+
'1g4ayag': __memo(() => import('./remote-1g4ayag-DESnyPRn.js'))
|
|
22
22
|
},
|
|
23
23
|
routes: [
|
|
24
24
|
{
|
|
@@ -47,4 +47,4 @@ return {
|
|
|
47
47
|
})();
|
|
48
48
|
|
|
49
49
|
export { manifest as m };
|
|
50
|
-
//# sourceMappingURL=manifest.js-
|
|
50
|
+
//# sourceMappingURL=manifest.js-BYNXhn6E.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js-
|
|
1
|
+
{"version":3,"file":"manifest.js-BYNXhn6E.js","sources":["../../../.svelte-kit/output/server/manifest.js"],"sourcesContent":["export const manifest = (() => {\nfunction __memo(fn) {\n\tlet value;\n\treturn () => value ??= (value = fn());\n}\n\nreturn {\n\tappDir: \"_app\",\n\tappPath: \"_app\",\n\tassets: new Set([]),\n\tmimeTypes: {},\n\t_: {\n\t\tclient: {start:\"_app/immutable/entry/start.lXpYdwbt.js\",app:\"_app/immutable/entry/app.BP_R_kTF.js\",imports:[\"_app/immutable/entry/start.lXpYdwbt.js\",\"_app/immutable/chunks/zvcaSoGP.js\",\"_app/immutable/chunks/Dur-vdUf.js\",\"_app/immutable/entry/app.BP_R_kTF.js\",\"_app/immutable/chunks/Dur-vdUf.js\",\"_app/immutable/chunks/tYeNsyIK.js\"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},\n\t\tnodes: [\n\t\t\t__memo(() => import('./nodes/0.js')),\n\t\t\t__memo(() => import('./nodes/1.js')),\n\t\t\t__memo(() => import('./nodes/2.js')),\n\t\t\t__memo(() => import('./nodes/3.js'))\n\t\t],\n\t\tremotes: {\n\t\t\t'1g4ayag': __memo(() => import('./chunks/remote-1g4ayag.js'))\n\t\t},\n\t\troutes: [\n\t\t\t{\n\t\t\t\tid: \"/\",\n\t\t\t\tpattern: /^\\/$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 2 },\n\t\t\t\tendpoint: null\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/report/[id]\",\n\t\t\t\tpattern: /^\\/report\\/([^/]+?)\\/?$/,\n\t\t\t\tparams: [{\"name\":\"id\",\"optional\":false,\"rest\":false,\"chained\":false}],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 3 },\n\t\t\t\tendpoint: null\n\t\t\t}\n\t\t],\n\t\tprerendered_routes: new Set([]),\n\t\tmatchers: async () => {\n\t\t\t\n\t\t\treturn { };\n\t\t},\n\t\tserver_assets: {}\n\t}\n}\n})();\n"],"names":[],"mappings":"AAAY,MAAC,QAAQ,GAAG,CAAC,MAAM;AAC/B,SAAS,MAAM,CAAC,EAAE,EAAE;AACpB,CAAC,IAAI,KAAK;AACV,CAAC,OAAO,MAAM,KAAK,MAAM,KAAK,GAAG,EAAE,EAAE,CAAC;AACtC;;AAEA,OAAO;AACP,CAAC,MAAM,EAAE,MAAM;AACf,CAAC,OAAO,EAAE,MAAM;AAChB,CAAC,MAAM,EAAE,IAAI,GAAG,CAAC,EAAE,CAAC;AACpB,CAAC,SAAS,EAAE,EAAE;AACd,CAAC,CAAC,EAAE;AACJ,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,wCAAwC,CAAC,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kBAAkB,EAAE,IAAI,GAAG,CAAC,EAAE,CAAC;AACjC,EAAE,QAAQ,EAAE,YAAY;AACxB;AACA,GAAG,OAAO,IAAI;AACd,EAAE,CAAC;AACH,EAAE,aAAa,EAAE;AACjB;AACA;AACA,CAAC;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as error, g as get_request_store, b as stringify_remote_arg, M as MUTATIVE_METHODS, w as with_request_store, c as create_remote_key, n as noop, H as HttpError, S as SvelteKitError, h as handle_error_and_jsonify, _ as __exportAll, i as init_remote_functions } from './index.js-
|
|
1
|
+
import { e as error, g as get_request_store, b as stringify_remote_arg, M as MUTATIVE_METHODS, w as with_request_store, c as create_remote_key, n as noop, H as HttpError, S as SvelteKitError, h as handle_error_and_jsonify, _ as __exportAll, i as init_remote_functions } from './index.js-DbiNsix3.js';
|
|
2
2
|
import { execFileSync, spawnSync } from 'node:child_process';
|
|
3
3
|
import { existsSync, readFileSync, statSync, readdirSync, mkdtempSync, rmSync, writeFileSync, mkdirSync } from 'node:fs';
|
|
4
4
|
import { join, basename, resolve } from 'node:path';
|
|
@@ -1115,39 +1115,33 @@ function getRemoteUrl(repo, preferred = "origin") {
|
|
|
1115
1115
|
//#region ../lib/output-name.mjs
|
|
1116
1116
|
/**
|
|
1117
1117
|
* Nombre del JSON que escribe el agente.
|
|
1118
|
-
* Preferido: tips cortos
|
|
1118
|
+
* Preferido: tips cortos branch/base. Legacy (con stamp o sin tips) sigue válido al importar.
|
|
1119
1119
|
*/
|
|
1120
|
-
/** Prefijo del formato actual
|
|
1121
|
-
var OUTPUT_PREFIX = "diff-
|
|
1122
|
-
/**
|
|
1123
|
-
var
|
|
1120
|
+
/** Prefijo del formato actual. */
|
|
1121
|
+
var OUTPUT_PREFIX = "diff-rev";
|
|
1122
|
+
/** Nombre legacy fijo. */
|
|
1123
|
+
var OUTPUT_FILENAME_LEGACY = `diff-review-output.json`;
|
|
1124
1124
|
/**
|
|
1125
1125
|
* Válidos:
|
|
1126
|
-
* - diff-
|
|
1127
|
-
* - diff-
|
|
1128
|
-
* - diff-
|
|
1126
|
+
* - diff-rev_{branchTip}_{baseTip}.json
|
|
1127
|
+
* - diff-report_{branchTip}-{baseTip}_YYYYMMDD-HHmmss.json (legacy)
|
|
1128
|
+
* - diff-review-output.json / diff-review-output-YYYYMMDD-HHmmss.json (legacy)
|
|
1129
1129
|
*/
|
|
1130
|
-
var OUTPUT_FILENAME_RE = /^(?:diff-
|
|
1130
|
+
var OUTPUT_FILENAME_RE = /^(?:diff-rev_[0-9a-f]{7,12}_[0-9a-f]{7,12}|diff-report_[0-9a-f]{7,12}-[0-9a-f]{7,12}_\d{8}-\d{6}|diff-review-output(?:-\d{8}-\d{6})?)\.json$/i;
|
|
1131
1131
|
/**
|
|
1132
|
-
* @param {
|
|
1133
|
-
* @returns {string} ej. 20260915-143045
|
|
1134
|
-
*/
|
|
1135
|
-
function formatOutputStamp(when = /* @__PURE__ */ new Date()) {
|
|
1136
|
-
const pad = (n) => String(n).padStart(2, "0");
|
|
1137
|
-
return `${when.getFullYear()}${pad(when.getMonth() + 1)}${pad(when.getDate())}-${pad(when.getHours())}${pad(when.getMinutes())}${pad(when.getSeconds())}`;
|
|
1138
|
-
}
|
|
1139
|
-
/**
|
|
1140
|
-
* @param {{ branchSha?: string, baseSha?: string, stamp?: string, when?: Date } | Date} [input]
|
|
1132
|
+
* @param {{ branchSha?: string, baseSha?: string }} [input]
|
|
1141
1133
|
* @returns {string}
|
|
1142
|
-
* con tips: diff-
|
|
1143
|
-
* sin tips: diff-review-output
|
|
1134
|
+
* con tips: diff-rev_aaaaaaaaaa_bbbbbbbbbb.json
|
|
1135
|
+
* sin tips: diff-review-output.json
|
|
1144
1136
|
*/
|
|
1145
1137
|
function makeOutputFilename(input = {}) {
|
|
1146
|
-
const opts = input instanceof Date ? {
|
|
1147
|
-
const stamp = opts.stamp || formatOutputStamp(opts.when ?? /* @__PURE__ */ new Date());
|
|
1138
|
+
const opts = input instanceof Date ? {} : input || {};
|
|
1148
1139
|
const fp = fingerprint(opts.branchSha, opts.baseSha);
|
|
1149
|
-
if (fp)
|
|
1150
|
-
|
|
1140
|
+
if (fp) {
|
|
1141
|
+
const [branchTip, baseTip] = fp.split("-");
|
|
1142
|
+
if (branchTip && baseTip) return `${OUTPUT_PREFIX}_${branchTip}_${baseTip}.json`;
|
|
1143
|
+
}
|
|
1144
|
+
return OUTPUT_FILENAME_LEGACY;
|
|
1151
1145
|
}
|
|
1152
1146
|
function isOutputFilename(name) {
|
|
1153
1147
|
return OUTPUT_FILENAME_RE.test(String(name || "").trim());
|
|
@@ -2564,14 +2558,12 @@ async function pickLocalFolder$1() {
|
|
|
2564
2558
|
return pickFolder();
|
|
2565
2559
|
}
|
|
2566
2560
|
/** Nombre de salida con tips cortos del branch y la base (repo local). */
|
|
2567
|
-
function resolveOutputName(repo, branch, base
|
|
2568
|
-
const outStamp = String(stamp || "").trim() || formatOutputStamp();
|
|
2561
|
+
function resolveOutputName(repo, branch, base) {
|
|
2569
2562
|
const raw = String(repo || "").trim();
|
|
2570
2563
|
const b = String(branch || "").trim();
|
|
2571
2564
|
const baseRef = String(base || "").trim() || "develop";
|
|
2572
2565
|
if (!raw || looksLikeGitUrl(raw) || !b) return {
|
|
2573
|
-
filename: makeOutputFilename({
|
|
2574
|
-
stamp: outStamp,
|
|
2566
|
+
filename: makeOutputFilename({}),
|
|
2575
2567
|
fingerprint: null
|
|
2576
2568
|
};
|
|
2577
2569
|
try {
|
|
@@ -2580,18 +2572,15 @@ function resolveOutputName(repo, branch, base, stamp) {
|
|
|
2580
2572
|
return {
|
|
2581
2573
|
filename: makeOutputFilename({
|
|
2582
2574
|
branchSha: tips.branchSha,
|
|
2583
|
-
baseSha: tips.baseSha
|
|
2584
|
-
stamp: outStamp
|
|
2575
|
+
baseSha: tips.baseSha
|
|
2585
2576
|
}),
|
|
2586
|
-
stamp: outStamp,
|
|
2587
2577
|
fingerprint: fp,
|
|
2588
2578
|
branchSha: tips.branchSha,
|
|
2589
2579
|
baseSha: tips.baseSha
|
|
2590
2580
|
};
|
|
2591
2581
|
} catch {
|
|
2592
2582
|
return {
|
|
2593
|
-
filename: makeOutputFilename({
|
|
2594
|
-
stamp: outStamp,
|
|
2583
|
+
filename: makeOutputFilename({}),
|
|
2595
2584
|
fingerprint: null
|
|
2596
2585
|
};
|
|
2597
2586
|
}
|
|
@@ -2712,16 +2701,14 @@ var detectOutput = /* @__PURE__ */ query("unchecked", async (input) => {
|
|
|
2712
2701
|
return null;
|
|
2713
2702
|
}
|
|
2714
2703
|
});
|
|
2715
|
-
/** Nombre sugerido con tips cortos (branch/base)
|
|
2704
|
+
/** Nombre sugerido con tips cortos (branch/base). */
|
|
2716
2705
|
var outputName = /* @__PURE__ */ query("unchecked", async (input) => {
|
|
2717
2706
|
try {
|
|
2718
|
-
return resolveOutputName(String(input?.repo || "").trim(), String(input?.branch || "").trim(), String(input?.base || "develop").trim()
|
|
2707
|
+
return resolveOutputName(String(input?.repo || "").trim(), String(input?.branch || "").trim(), String(input?.base || "develop").trim());
|
|
2719
2708
|
} catch (err) {
|
|
2720
2709
|
console.error("[diff-review git] output name", describeGitError(err), err);
|
|
2721
|
-
const stamp = String(input?.stamp || "").trim() || formatOutputStamp();
|
|
2722
2710
|
return {
|
|
2723
|
-
filename: makeOutputFilename({
|
|
2724
|
-
stamp,
|
|
2711
|
+
filename: makeOutputFilename({}),
|
|
2725
2712
|
fingerprint: null
|
|
2726
2713
|
};
|
|
2727
2714
|
}
|
|
@@ -2785,4 +2772,4 @@ for (const [name, fn] of Object.entries(git_remote_exports)) {
|
|
|
2785
2772
|
var _sveltekit_remote_1g4ayag_default = git_remote_exports;
|
|
2786
2773
|
|
|
2787
2774
|
export { _sveltekit_remote_1g4ayag_default as default };
|
|
2788
|
-
//# sourceMappingURL=remote-1g4ayag-
|
|
2775
|
+
//# sourceMappingURL=remote-1g4ayag-DESnyPRn.js.map
|