owndesign 0.3.1 → 0.4.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/dist/index.js +1 -1
- package/dist/server/index.js +461 -391
- package/dist/web/assets/{angular-html-BdqUTOSr.js → angular-html-Dt-3HpmA.js} +1 -1
- package/dist/web/assets/{angular-ts-CHVPl0K2.js → angular-ts--R7ZuJTc.js} +1 -1
- package/dist/web/assets/{apl-Cdj8xhOr.js → apl-CWMGU86F.js} +1 -1
- package/dist/web/assets/{arc-CQzLFt8P.js → arc-Cjzdh6W0.js} +1 -1
- package/dist/web/assets/architecture-7EHR7CIX-BGSmP16y.js +1 -0
- package/dist/web/assets/{architectureDiagram-3BPJPVTR-DQRev6P0.js → architectureDiagram-3BPJPVTR-Cnqfpv7r.js} +1 -1
- package/dist/web/assets/{astro-CqvP6Sm9.js → astro-C-dDEebc.js} +1 -1
- package/dist/web/assets/{blade-AHcrF7FJ.js → blade-D5QonKud.js} +1 -1
- package/dist/web/assets/{blockDiagram-GPEHLZMM-wWr1jqbH.js → blockDiagram-GPEHLZMM-CnMhZu_2.js} +1 -1
- package/dist/web/assets/{c-L6BASEY4.js → c-CqpS4SLy.js} +1 -1
- package/dist/web/assets/{c4Diagram-AAUBKEIU-QcoxyP1-.js → c4Diagram-AAUBKEIU-BiIEJRTR.js} +1 -1
- package/dist/web/assets/channel-oWivUzZs.js +1 -0
- package/dist/web/assets/{chunk-2J33WTMH-Rt8Y9qQM.js → chunk-2J33WTMH-C7sf9u29.js} +1 -1
- package/dist/web/assets/{chunk-4BX2VUAB-DgnUshBl.js → chunk-4BX2VUAB-DJa-ta3_.js} +1 -1
- package/dist/web/assets/{chunk-55IACEB6-C4VtZ0S1.js → chunk-55IACEB6-IuYkBg6Z.js} +1 -1
- package/dist/web/assets/{chunk-727SXJPM-pX8vxQBM.js → chunk-727SXJPM-DRe0RztT.js} +1 -1
- package/dist/web/assets/{chunk-AQP2D5EJ-CtASt0uL.js → chunk-AQP2D5EJ-C9dDxbg-.js} +1 -1
- package/dist/web/assets/{chunk-FMBD7UC4-AYbdnBZ-.js → chunk-FMBD7UC4-DUtDHCn6.js} +1 -1
- package/dist/web/assets/{chunk-ND2GUHAM-Bi2LmhY7.js → chunk-ND2GUHAM-LB_Sxczr.js} +1 -1
- package/dist/web/assets/chunk-QZHKN3VN-XqSWMCuK.js +1 -0
- package/dist/web/assets/classDiagram-4FO5ZUOK-BGKpAm2f.js +1 -0
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-BGKpAm2f.js +1 -0
- package/dist/web/assets/{cobol-2mv2h2I-.js → cobol-BeTgfKZA.js} +1 -1
- package/dist/web/assets/{coffee-WyF-3t43.js → coffee-Dt9wgCya.js} +1 -1
- package/dist/web/assets/{cose-bilkent-S5V4N54A-DM6dd-q1.js → cose-bilkent-S5V4N54A-CRuR2FiM.js} +1 -1
- package/dist/web/assets/{cpp-CAEbN4Ya.js → cpp-Czm9Mgzy.js} +1 -1
- package/dist/web/assets/{crystal-DyRNEnWF.js → crystal-XKuDCEnE.js} +1 -1
- package/dist/web/assets/{css-CG0mYlL5.js → css-B2hJ7nfb.js} +1 -1
- package/dist/web/assets/{dagre-BM42HDAG-D_NqzEVm.js → dagre-BM42HDAG-C-snB-JZ.js} +1 -1
- package/dist/web/assets/{diagram-2AECGRRQ-Bgm-_Eko.js → diagram-2AECGRRQ-CWcC35LG.js} +1 -1
- package/dist/web/assets/{diagram-5GNKFQAL-C_9mv9Qd.js → diagram-5GNKFQAL-Bp4r0qod.js} +1 -1
- package/dist/web/assets/{diagram-KO2AKTUF-BHQT9JgD.js → diagram-KO2AKTUF-hzdZTHQQ.js} +1 -1
- package/dist/web/assets/{diagram-LMA3HP47-B48NzL_Q.js → diagram-LMA3HP47-g3eVYV6c.js} +1 -1
- package/dist/web/assets/{diagram-OG6HWLK6-DKk01CLS.js → diagram-OG6HWLK6-DU6YCKh8.js} +1 -1
- package/dist/web/assets/{edge-WFDIDqY1.js → edge-Cf4-IuU2.js} +1 -1
- package/dist/web/assets/{elixir-CP1ajsZR.js → elixir-BhP-LvoP.js} +1 -1
- package/dist/web/assets/{elm-oora7HJE.js → elm-CXafMjPq.js} +1 -1
- package/dist/web/assets/{erDiagram-TEJ5UH35-ClLJSrwL.js → erDiagram-TEJ5UH35-YoAR2lGO.js} +1 -1
- package/dist/web/assets/{erb-DpZNjJ9_.js → erb-BVT3AhdM.js} +1 -1
- package/dist/web/assets/eventmodeling-FCH6USID-CyaiCiqo.js +1 -0
- package/dist/web/assets/{flowDiagram-I6XJVG4X-m1zK1OOI.js → flowDiagram-I6XJVG4X-7URF-P1c.js} +1 -1
- package/dist/web/assets/{ganttDiagram-6RSMTGT7-R7B6FFxw.js → ganttDiagram-6RSMTGT7-AhzOLDvp.js} +1 -1
- package/dist/web/assets/{git-rebase-Dg9skXJz.js → git-rebase-Du6nkvTe.js} +1 -1
- package/dist/web/assets/gitGraph-WXDBUCRP-BM-DYSID.js +1 -0
- package/dist/web/assets/{gitGraphDiagram-PVQCEYII-rvpKbkxm.js → gitGraphDiagram-PVQCEYII-Bz7fdMUs.js} +1 -1
- package/dist/web/assets/{glimmer-js-BM1sc5ia.js → glimmer-js-eiDlOXb3.js} +1 -1
- package/dist/web/assets/{glimmer-ts-BJ5aeU1p.js → glimmer-ts-C9hrMeAe.js} +1 -1
- package/dist/web/assets/{glsl-DAXCJ1Bs.js → glsl-BNZcc-CU.js} +1 -1
- package/dist/web/assets/{graphql-_HTUmoJJ.js → graphql-We1GMJ9V.js} +1 -1
- package/dist/web/assets/{hack-Bbw_IBNu.js → hack-Cbdgfg30.js} +1 -1
- package/dist/web/assets/{haml-BElCN2ig.js → haml-D12vEbfD.js} +1 -1
- package/dist/web/assets/{handlebars-PfBBM4Ul.js → handlebars-B7ymO2a2.js} +1 -1
- package/dist/web/assets/{highlighted-body-OFNGDK62-B7shmJas.js → highlighted-body-OFNGDK62-C5RKt5TK.js} +1 -1
- package/dist/web/assets/{html-BF5zzurH.js → html-BjHqhvb3.js} +1 -1
- package/dist/web/assets/{html-derivative-oPCMAlhR.js → html-derivative-Cfxz_9AH.js} +1 -1
- package/dist/web/assets/{http-B3FNtPG9.js → http-CIDl6bKJ.js} +1 -1
- package/dist/web/assets/{hurl-Dp2M6dIg.js → hurl-CxNOxlaR.js} +1 -1
- package/dist/web/assets/{index-YSa89xAk.js → index-BPW7AO85.js} +165 -165
- package/dist/web/assets/info-J43DQDTF-DMHBhHEc.js +1 -0
- package/dist/web/assets/{infoDiagram-5YYISTIA-DUiIIzSJ.js → infoDiagram-5YYISTIA-CW2k0pQb.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-BDoM1IJ1.js → ishikawaDiagram-YF4QCWOH-DYFe2lnZ.js} +1 -1
- package/dist/web/assets/{java-D8VYPdmO.js → java-CjjCHMQP.js} +1 -1
- package/dist/web/assets/{javascript-8l7nZMBo.js → javascript-BKyaVUvf.js} +1 -1
- package/dist/web/assets/{jinja-CTV42GN6.js → jinja-B8Y04orJ.js} +1 -1
- package/dist/web/assets/{jison-DOEd3yQu.js → jison-CMFF7oG3.js} +1 -1
- package/dist/web/assets/{journeyDiagram-JHISSGLW-o_K8r6Fc.js → journeyDiagram-JHISSGLW-ByrQEQ4F.js} +1 -1
- package/dist/web/assets/{json-BJP4ONN0.js → json-hq-29_wH.js} +1 -1
- package/dist/web/assets/{jsx-kpZBrH4w.js → jsx-DNiQ6Hw2.js} +1 -1
- package/dist/web/assets/{julia-H9ccs9iA.js → julia-CqLWCdul.js} +1 -1
- package/dist/web/assets/{just-hj2UAEFQ.js → just-DVcFjJbX.js} +1 -1
- package/dist/web/assets/{kanban-definition-UN3LZRKU-QwMAKT_f.js → kanban-definition-UN3LZRKU-XTvvg_8A.js} +1 -1
- package/dist/web/assets/{latex-CyO33iPb.js → latex-P09NZ8wm.js} +1 -1
- package/dist/web/assets/{linear-o7e5jEgw.js → linear-CcPFy4lQ.js} +1 -1
- package/dist/web/assets/{liquid-_mek6fOE.js → liquid-zF9mu1hg.js} +1 -1
- package/dist/web/assets/{lua-C2DhJyVI.js → lua-iTwm_wcO.js} +1 -1
- package/dist/web/assets/{marko-CZEiD-NB.js → marko-BLVWAxsp.js} +1 -1
- package/dist/web/assets/{mdc-A90dq1MH.js → mdc-B75TTk3c.js} +1 -1
- package/dist/web/assets/mermaid-GHXKKRXX-DJ4qcPa4.js +1 -0
- package/dist/web/assets/{mermaid-parser.core-CwzV1M_V.js → mermaid-parser.core-5xwt1UvS.js} +2 -2
- package/dist/web/assets/{mindmap-definition-RKZ34NQL-BMri-V6y.js → mindmap-definition-RKZ34NQL-CeBioqMG.js} +1 -1
- package/dist/web/assets/{nginx-DOMnJ23j.js → nginx-CD0vHVBs.js} +1 -1
- package/dist/web/assets/{nim-zbR5LDAV.js → nim-DvOqbSaR.js} +1 -1
- package/dist/web/assets/packet-YPE3B663-DLGxmT9W.js +1 -0
- package/dist/web/assets/{perl-DdSkRoeE.js → perl-DjuV6ilb.js} +1 -1
- package/dist/web/assets/{php-BpQLZPHO.js → php-nzo1x2wJ.js} +1 -1
- package/dist/web/assets/pie-LRSECV5Y-Db74JZ7J.js +1 -0
- package/dist/web/assets/{pieDiagram-4H26LBE5-DFad80u4.js → pieDiagram-4H26LBE5-D0aCJAZp.js} +1 -1
- package/dist/web/assets/{pug-C_fdPtH-.js → pug-NLTVTGwh.js} +1 -1
- package/dist/web/assets/{qml-CNXBf8kx.js → qml-Ba_lfW8D.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-W4KKPZXB-CXH7Ps0K.js → quadrantDiagram-W4KKPZXB-CN825OKg.js} +1 -1
- package/dist/web/assets/{r-BCVwx55G.js → r-fxZAcHht.js} +1 -1
- package/dist/web/assets/radar-GUYGQ44K-BOanNhTV.js +1 -0
- package/dist/web/assets/{razor-4UnzbliN.js → razor-Dyqmt-9k.js} +1 -1
- package/dist/web/assets/{regexp-Cx44IXhZ.js → regexp-BrVcJQP3.js} +1 -1
- package/dist/web/assets/{requirementDiagram-4Y6WPE33-jgMAzOs_.js → requirementDiagram-4Y6WPE33-BtMFyw8M.js} +1 -1
- package/dist/web/assets/{rst-BQ98T0pl.js → rst-Cc0xN4JL.js} +1 -1
- package/dist/web/assets/{ruby-CQe2_1Mx.js → ruby-BP1mU4jT.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-5OEKKPKP-D_3RedGH.js → sankeyDiagram-5OEKKPKP-0nSEWoqE.js} +1 -1
- package/dist/web/assets/{sas-Df1AewjZ.js → sas-CSjhY03w.js} +1 -1
- package/dist/web/assets/{scss-Mnube1Aq.js → scss-CeOQOIe5.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-3UESZ5HK-C1836wpQ.js → sequenceDiagram-3UESZ5HK-CCy6573d.js} +1 -1
- package/dist/web/assets/{shellscript-CDszjMg6.js → shellscript-CzkwO60i.js} +1 -1
- package/dist/web/assets/{shellsession-CnjHVqYh.js → shellsession-BoxW722T.js} +1 -1
- package/dist/web/assets/{soy-B5asYSZT.js → soy-D0dLAaTh.js} +1 -1
- package/dist/web/assets/{sql-BFrC3Vi5.js → sql-CQKU4uEx.js} +1 -1
- package/dist/web/assets/{stata-KlFU2EjN.js → stata-DIn52ZW5.js} +1 -1
- package/dist/web/assets/{stateDiagram-AJRCARHV-S48Ai71o.js → stateDiagram-AJRCARHV-rcYsa8_O.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-Cc8VusY-.js +1 -0
- package/dist/web/assets/{surrealql-rIRDXr_v.js → surrealql-DGq56tDM.js} +1 -1
- package/dist/web/assets/{svelte-BQftzg5X.js → svelte-CF7ewJNy.js} +1 -1
- package/dist/web/assets/{templ-DfQQPqaN.js → templ-BVhwZIdn.js} +1 -1
- package/dist/web/assets/{tex-8LsiEF9g.js → tex-12BK788i.js} +1 -1
- package/dist/web/assets/{timeline-definition-PNZ67QCA-C9H3XLfz.js → timeline-definition-PNZ67QCA-DV5_kYSS.js} +1 -1
- package/dist/web/assets/treeView-BLDUP644-Bl3Gi2mD.js +1 -0
- package/dist/web/assets/treemap-LRROVOQU-BSnWy9LK.js +1 -0
- package/dist/web/assets/{ts-tags-i6Dbvl26.js → ts-tags-CwsNqdEU.js} +1 -1
- package/dist/web/assets/{tsx-BMATElFg.js → tsx-DUnh4qf7.js} +1 -1
- package/dist/web/assets/{twig-Cy6dMspl.js → twig-CR3njBNT.js} +1 -1
- package/dist/web/assets/{typescript-BMNfloOQ.js → typescript-BLZeG0o6.js} +1 -1
- package/dist/web/assets/{vennDiagram-CIIHVFJN-DGW7CatZ.js → vennDiagram-CIIHVFJN-Boo0gNvX.js} +1 -1
- package/dist/web/assets/{vue-DRQ1Vnbf.js → vue--RPaUu44.js} +1 -1
- package/dist/web/assets/{vue-html-BbCBEXlS.js → vue-html-COVfRgkP.js} +1 -1
- package/dist/web/assets/{vue-vine-CgyY7JdC.js → vue-vine-BJ8mkWrF.js} +1 -1
- package/dist/web/assets/wardley-L42UT6IY-B9gzGpm1.js +1 -0
- package/dist/web/assets/{wardleyDiagram-YWT4CUSO-DCGzfbps.js → wardleyDiagram-YWT4CUSO-B8amSsPy.js} +1 -1
- package/dist/web/assets/{xml-95qkb9yN.js → xml-BvE4JeBo.js} +1 -1
- package/dist/web/assets/{xsl-D6gyo8CK.js → xsl-BLmQgj55.js} +1 -1
- package/dist/web/assets/{xychartDiagram-2RQKCTM6-YEjKJtlZ.js → xychartDiagram-2RQKCTM6-CHu2uWGI.js} +1 -1
- package/dist/web/assets/{yaml-KYdypczj.js → yaml-CfFZORgQ.js} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
- package/dist/web/assets/architecture-7EHR7CIX-D_1q3iHJ.js +0 -1
- package/dist/web/assets/channel-CKLAyPXF.js +0 -1
- package/dist/web/assets/chunk-QZHKN3VN-_jfeFdsU.js +0 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-CPA3GyTp.js +0 -1
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-CPA3GyTp.js +0 -1
- package/dist/web/assets/eventmodeling-FCH6USID-1ivGez78.js +0 -1
- package/dist/web/assets/gitGraph-WXDBUCRP-Dpi4pm_y.js +0 -1
- package/dist/web/assets/info-J43DQDTF-CCIIC-lT.js +0 -1
- package/dist/web/assets/mermaid-GHXKKRXX-BHX3ego2.js +0 -1
- package/dist/web/assets/packet-YPE3B663-ByXdjZNB.js +0 -1
- package/dist/web/assets/pie-LRSECV5Y-B4cm_9Re.js +0 -1
- package/dist/web/assets/radar-GUYGQ44K-BfTLimWm.js +0 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-bf5jD_zW.js +0 -1
- package/dist/web/assets/treeView-BLDUP644-mOvRjQhT.js +0 -1
- package/dist/web/assets/treemap-LRROVOQU--QiNmmi5.js +0 -1
- package/dist/web/assets/wardley-L42UT6IY-CX5eMTMw.js +0 -1
package/dist/server/index.js
CHANGED
|
@@ -12,10 +12,10 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
12
12
|
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
13
13
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
14
14
|
});
|
|
15
|
-
var __glob = (map2) => (
|
|
16
|
-
var fn = map2[
|
|
15
|
+
var __glob = (map2) => (path16) => {
|
|
16
|
+
var fn = map2[path16];
|
|
17
17
|
if (fn) return fn();
|
|
18
|
-
throw new Error("Module not found in bundle: " +
|
|
18
|
+
throw new Error("Module not found in bundle: " + path16);
|
|
19
19
|
};
|
|
20
20
|
var __esm = (fn, res) => function __init() {
|
|
21
21
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
@@ -1187,7 +1187,7 @@ var require_auth_config = __commonJS({
|
|
|
1187
1187
|
});
|
|
1188
1188
|
module.exports = __toCommonJS(auth_config_exports);
|
|
1189
1189
|
var fs12 = __toESM2(__require("fs"));
|
|
1190
|
-
var
|
|
1190
|
+
var path16 = __toESM2(__require("path"));
|
|
1191
1191
|
var import_token_util = require_token_util();
|
|
1192
1192
|
function getAuthConfigPath() {
|
|
1193
1193
|
const dataDir = (0, import_token_util.getVercelDataDir)();
|
|
@@ -1196,7 +1196,7 @@ var require_auth_config = __commonJS({
|
|
|
1196
1196
|
`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`
|
|
1197
1197
|
);
|
|
1198
1198
|
}
|
|
1199
|
-
return
|
|
1199
|
+
return path16.join(dataDir, "auth.json");
|
|
1200
1200
|
}
|
|
1201
1201
|
function readAuthConfig() {
|
|
1202
1202
|
try {
|
|
@@ -1215,7 +1215,7 @@ var require_auth_config = __commonJS({
|
|
|
1215
1215
|
}
|
|
1216
1216
|
function writeAuthConfig(config2) {
|
|
1217
1217
|
const authPath = getAuthConfigPath();
|
|
1218
|
-
const authDir =
|
|
1218
|
+
const authDir = path16.dirname(authPath);
|
|
1219
1219
|
if (!fs12.existsSync(authDir)) {
|
|
1220
1220
|
fs12.mkdirSync(authDir, { mode: 504, recursive: true });
|
|
1221
1221
|
}
|
|
@@ -1410,7 +1410,7 @@ var require_token_util = __commonJS({
|
|
|
1410
1410
|
saveToken: () => saveToken
|
|
1411
1411
|
});
|
|
1412
1412
|
module.exports = __toCommonJS(token_util_exports);
|
|
1413
|
-
var
|
|
1413
|
+
var path16 = __toESM2(__require("path"));
|
|
1414
1414
|
var fs12 = __toESM2(__require("fs"));
|
|
1415
1415
|
var import_token_error = require_token_error();
|
|
1416
1416
|
var import_token_io = require_token_io();
|
|
@@ -1423,7 +1423,7 @@ var require_token_util = __commonJS({
|
|
|
1423
1423
|
if (!dataDir) {
|
|
1424
1424
|
return null;
|
|
1425
1425
|
}
|
|
1426
|
-
return
|
|
1426
|
+
return path16.join(dataDir, vercelFolder);
|
|
1427
1427
|
}
|
|
1428
1428
|
async function getVercelToken2(options) {
|
|
1429
1429
|
const authConfig = (0, import_auth_config.readAuthConfig)();
|
|
@@ -1499,7 +1499,7 @@ var require_token_util = __commonJS({
|
|
|
1499
1499
|
"Unable to find project root directory. Have you linked your project with `vc link?`"
|
|
1500
1500
|
);
|
|
1501
1501
|
}
|
|
1502
|
-
const prjPath =
|
|
1502
|
+
const prjPath = path16.join(dir, ".vercel", "project.json");
|
|
1503
1503
|
if (!fs12.existsSync(prjPath)) {
|
|
1504
1504
|
throw new import_token_error.VercelOidcTokenError(
|
|
1505
1505
|
"project.json not found, have you linked your project with `vc link?`"
|
|
@@ -1520,9 +1520,9 @@ var require_token_util = __commonJS({
|
|
|
1520
1520
|
"Unable to find user data directory. Please reach out to Vercel support."
|
|
1521
1521
|
);
|
|
1522
1522
|
}
|
|
1523
|
-
const tokenPath =
|
|
1523
|
+
const tokenPath = path16.join(dir, "com.vercel.token", `${projectId}.json`);
|
|
1524
1524
|
const tokenJson = JSON.stringify(token);
|
|
1525
|
-
fs12.mkdirSync(
|
|
1525
|
+
fs12.mkdirSync(path16.dirname(tokenPath), { mode: 504, recursive: true });
|
|
1526
1526
|
fs12.writeFileSync(tokenPath, tokenJson);
|
|
1527
1527
|
fs12.chmodSync(tokenPath, 432);
|
|
1528
1528
|
return;
|
|
@@ -1534,7 +1534,7 @@ var require_token_util = __commonJS({
|
|
|
1534
1534
|
"Unable to find user data directory. Please reach out to Vercel support."
|
|
1535
1535
|
);
|
|
1536
1536
|
}
|
|
1537
|
-
const tokenPath =
|
|
1537
|
+
const tokenPath = path16.join(dir, "com.vercel.token", `${projectId}.json`);
|
|
1538
1538
|
if (!fs12.existsSync(tokenPath)) {
|
|
1539
1539
|
return null;
|
|
1540
1540
|
}
|
|
@@ -1805,7 +1805,7 @@ var require_path = __commonJS({
|
|
|
1805
1805
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1806
1806
|
exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
|
|
1807
1807
|
var os7 = __require("os");
|
|
1808
|
-
var
|
|
1808
|
+
var path16 = __require("path");
|
|
1809
1809
|
var IS_WINDOWS_PLATFORM = os7.platform() === "win32";
|
|
1810
1810
|
var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
1811
1811
|
var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
|
|
@@ -1817,7 +1817,7 @@ var require_path = __commonJS({
|
|
|
1817
1817
|
}
|
|
1818
1818
|
exports.unixify = unixify;
|
|
1819
1819
|
function makeAbsolute(cwd, filepath) {
|
|
1820
|
-
return
|
|
1820
|
+
return path16.resolve(cwd, filepath);
|
|
1821
1821
|
}
|
|
1822
1822
|
exports.makeAbsolute = makeAbsolute;
|
|
1823
1823
|
function removeLeadingDotSegment(entry) {
|
|
@@ -3114,7 +3114,7 @@ var require_braces = __commonJS({
|
|
|
3114
3114
|
var require_constants2 = __commonJS({
|
|
3115
3115
|
"../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/constants.js"(exports, module) {
|
|
3116
3116
|
"use strict";
|
|
3117
|
-
var
|
|
3117
|
+
var path16 = __require("path");
|
|
3118
3118
|
var WIN_SLASH = "\\\\/";
|
|
3119
3119
|
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
3120
3120
|
var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
|
|
@@ -3288,7 +3288,7 @@ var require_constants2 = __commonJS({
|
|
|
3288
3288
|
/* | */
|
|
3289
3289
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
3290
3290
|
/* \uFEFF */
|
|
3291
|
-
SEP:
|
|
3291
|
+
SEP: path16.sep,
|
|
3292
3292
|
/**
|
|
3293
3293
|
* Create EXTGLOB_CHARS
|
|
3294
3294
|
*/
|
|
@@ -3315,7 +3315,7 @@ var require_constants2 = __commonJS({
|
|
|
3315
3315
|
var require_utils2 = __commonJS({
|
|
3316
3316
|
"../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/utils.js"(exports) {
|
|
3317
3317
|
"use strict";
|
|
3318
|
-
var
|
|
3318
|
+
var path16 = __require("path");
|
|
3319
3319
|
var win32 = process.platform === "win32";
|
|
3320
3320
|
var {
|
|
3321
3321
|
REGEX_BACKSLASH,
|
|
@@ -3344,7 +3344,7 @@ var require_utils2 = __commonJS({
|
|
|
3344
3344
|
if (options && typeof options.windows === "boolean") {
|
|
3345
3345
|
return options.windows;
|
|
3346
3346
|
}
|
|
3347
|
-
return win32 === true ||
|
|
3347
|
+
return win32 === true || path16.sep === "\\";
|
|
3348
3348
|
};
|
|
3349
3349
|
exports.escapeLast = (input, char, lastIdx) => {
|
|
3350
3350
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
@@ -4708,7 +4708,7 @@ var require_parse2 = __commonJS({
|
|
|
4708
4708
|
var require_picomatch = __commonJS({
|
|
4709
4709
|
"../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/picomatch.js"(exports, module) {
|
|
4710
4710
|
"use strict";
|
|
4711
|
-
var
|
|
4711
|
+
var path16 = __require("path");
|
|
4712
4712
|
var scan = require_scan();
|
|
4713
4713
|
var parse3 = require_parse2();
|
|
4714
4714
|
var utils = require_utils2();
|
|
@@ -4793,7 +4793,7 @@ var require_picomatch = __commonJS({
|
|
|
4793
4793
|
};
|
|
4794
4794
|
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
4795
4795
|
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
4796
|
-
return regex.test(
|
|
4796
|
+
return regex.test(path16.basename(input));
|
|
4797
4797
|
};
|
|
4798
4798
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
4799
4799
|
picomatch.parse = (pattern, options) => {
|
|
@@ -5020,7 +5020,7 @@ var require_pattern = __commonJS({
|
|
|
5020
5020
|
"use strict";
|
|
5021
5021
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5022
5022
|
exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
|
|
5023
|
-
var
|
|
5023
|
+
var path16 = __require("path");
|
|
5024
5024
|
var globParent = require_glob_parent();
|
|
5025
5025
|
var micromatch = require_micromatch();
|
|
5026
5026
|
var GLOBSTAR = "**";
|
|
@@ -5115,7 +5115,7 @@ var require_pattern = __commonJS({
|
|
|
5115
5115
|
}
|
|
5116
5116
|
exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
5117
5117
|
function isAffectDepthOfReadingPattern(pattern) {
|
|
5118
|
-
const basename =
|
|
5118
|
+
const basename = path16.basename(pattern);
|
|
5119
5119
|
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
|
|
5120
5120
|
}
|
|
5121
5121
|
exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
|
|
@@ -5173,7 +5173,7 @@ var require_pattern = __commonJS({
|
|
|
5173
5173
|
}
|
|
5174
5174
|
exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
5175
5175
|
function isAbsolute(pattern) {
|
|
5176
|
-
return
|
|
5176
|
+
return path16.isAbsolute(pattern);
|
|
5177
5177
|
}
|
|
5178
5178
|
exports.isAbsolute = isAbsolute;
|
|
5179
5179
|
}
|
|
@@ -5350,8 +5350,8 @@ var require_utils3 = __commonJS({
|
|
|
5350
5350
|
exports.errno = errno;
|
|
5351
5351
|
var fs12 = require_fs();
|
|
5352
5352
|
exports.fs = fs12;
|
|
5353
|
-
var
|
|
5354
|
-
exports.path =
|
|
5353
|
+
var path16 = require_path();
|
|
5354
|
+
exports.path = path16;
|
|
5355
5355
|
var pattern = require_pattern();
|
|
5356
5356
|
exports.pattern = pattern;
|
|
5357
5357
|
var stream2 = require_stream();
|
|
@@ -5463,8 +5463,8 @@ var require_async = __commonJS({
|
|
|
5463
5463
|
"use strict";
|
|
5464
5464
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5465
5465
|
exports.read = void 0;
|
|
5466
|
-
function read(
|
|
5467
|
-
settings.fs.lstat(
|
|
5466
|
+
function read(path16, settings, callback) {
|
|
5467
|
+
settings.fs.lstat(path16, (lstatError, lstat2) => {
|
|
5468
5468
|
if (lstatError !== null) {
|
|
5469
5469
|
callFailureCallback(callback, lstatError);
|
|
5470
5470
|
return;
|
|
@@ -5473,7 +5473,7 @@ var require_async = __commonJS({
|
|
|
5473
5473
|
callSuccessCallback(callback, lstat2);
|
|
5474
5474
|
return;
|
|
5475
5475
|
}
|
|
5476
|
-
settings.fs.stat(
|
|
5476
|
+
settings.fs.stat(path16, (statError, stat5) => {
|
|
5477
5477
|
if (statError !== null) {
|
|
5478
5478
|
if (settings.throwErrorOnBrokenSymbolicLink) {
|
|
5479
5479
|
callFailureCallback(callback, statError);
|
|
@@ -5505,13 +5505,13 @@ var require_sync = __commonJS({
|
|
|
5505
5505
|
"use strict";
|
|
5506
5506
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5507
5507
|
exports.read = void 0;
|
|
5508
|
-
function read(
|
|
5509
|
-
const lstat2 = settings.fs.lstatSync(
|
|
5508
|
+
function read(path16, settings) {
|
|
5509
|
+
const lstat2 = settings.fs.lstatSync(path16);
|
|
5510
5510
|
if (!lstat2.isSymbolicLink() || !settings.followSymbolicLink) {
|
|
5511
5511
|
return lstat2;
|
|
5512
5512
|
}
|
|
5513
5513
|
try {
|
|
5514
|
-
const stat5 = settings.fs.statSync(
|
|
5514
|
+
const stat5 = settings.fs.statSync(path16);
|
|
5515
5515
|
if (settings.markSymbolicLink) {
|
|
5516
5516
|
stat5.isSymbolicLink = () => true;
|
|
5517
5517
|
}
|
|
@@ -5582,17 +5582,17 @@ var require_out = __commonJS({
|
|
|
5582
5582
|
var sync = require_sync();
|
|
5583
5583
|
var settings_1 = require_settings();
|
|
5584
5584
|
exports.Settings = settings_1.default;
|
|
5585
|
-
function stat5(
|
|
5585
|
+
function stat5(path16, optionsOrSettingsOrCallback, callback) {
|
|
5586
5586
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
5587
|
-
async.read(
|
|
5587
|
+
async.read(path16, getSettings(), optionsOrSettingsOrCallback);
|
|
5588
5588
|
return;
|
|
5589
5589
|
}
|
|
5590
|
-
async.read(
|
|
5590
|
+
async.read(path16, getSettings(optionsOrSettingsOrCallback), callback);
|
|
5591
5591
|
}
|
|
5592
5592
|
exports.stat = stat5;
|
|
5593
|
-
function statSync3(
|
|
5593
|
+
function statSync3(path16, optionsOrSettings) {
|
|
5594
5594
|
const settings = getSettings(optionsOrSettings);
|
|
5595
|
-
return sync.read(
|
|
5595
|
+
return sync.read(path16, settings);
|
|
5596
5596
|
}
|
|
5597
5597
|
exports.statSync = statSync3;
|
|
5598
5598
|
function getSettings(settingsOrOptions = {}) {
|
|
@@ -5808,16 +5808,16 @@ var require_async2 = __commonJS({
|
|
|
5808
5808
|
return;
|
|
5809
5809
|
}
|
|
5810
5810
|
const tasks = names.map((name21) => {
|
|
5811
|
-
const
|
|
5811
|
+
const path16 = common.joinPathSegments(directory, name21, settings.pathSegmentSeparator);
|
|
5812
5812
|
return (done) => {
|
|
5813
|
-
fsStat.stat(
|
|
5813
|
+
fsStat.stat(path16, settings.fsStatSettings, (error51, stats) => {
|
|
5814
5814
|
if (error51 !== null) {
|
|
5815
5815
|
done(error51);
|
|
5816
5816
|
return;
|
|
5817
5817
|
}
|
|
5818
5818
|
const entry = {
|
|
5819
5819
|
name: name21,
|
|
5820
|
-
path:
|
|
5820
|
+
path: path16,
|
|
5821
5821
|
dirent: utils.fs.createDirentFromStats(name21, stats)
|
|
5822
5822
|
};
|
|
5823
5823
|
if (settings.stats) {
|
|
@@ -5935,7 +5935,7 @@ var require_settings2 = __commonJS({
|
|
|
5935
5935
|
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js"(exports) {
|
|
5936
5936
|
"use strict";
|
|
5937
5937
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5938
|
-
var
|
|
5938
|
+
var path16 = __require("path");
|
|
5939
5939
|
var fsStat = require_out();
|
|
5940
5940
|
var fs12 = require_fs4();
|
|
5941
5941
|
var Settings = class {
|
|
@@ -5943,7 +5943,7 @@ var require_settings2 = __commonJS({
|
|
|
5943
5943
|
this._options = _options;
|
|
5944
5944
|
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
|
5945
5945
|
this.fs = fs12.createFileSystemAdapter(this._options.fs);
|
|
5946
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator,
|
|
5946
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path16.sep);
|
|
5947
5947
|
this.stats = this._getValue(this._options.stats, false);
|
|
5948
5948
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
5949
5949
|
this.fsStatSettings = new fsStat.Settings({
|
|
@@ -5970,17 +5970,17 @@ var require_out2 = __commonJS({
|
|
|
5970
5970
|
var sync = require_sync2();
|
|
5971
5971
|
var settings_1 = require_settings2();
|
|
5972
5972
|
exports.Settings = settings_1.default;
|
|
5973
|
-
function scandir(
|
|
5973
|
+
function scandir(path16, optionsOrSettingsOrCallback, callback) {
|
|
5974
5974
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
5975
|
-
async.read(
|
|
5975
|
+
async.read(path16, getSettings(), optionsOrSettingsOrCallback);
|
|
5976
5976
|
return;
|
|
5977
5977
|
}
|
|
5978
|
-
async.read(
|
|
5978
|
+
async.read(path16, getSettings(optionsOrSettingsOrCallback), callback);
|
|
5979
5979
|
}
|
|
5980
5980
|
exports.scandir = scandir;
|
|
5981
|
-
function scandirSync(
|
|
5981
|
+
function scandirSync(path16, optionsOrSettings) {
|
|
5982
5982
|
const settings = getSettings(optionsOrSettings);
|
|
5983
|
-
return sync.read(
|
|
5983
|
+
return sync.read(path16, settings);
|
|
5984
5984
|
}
|
|
5985
5985
|
exports.scandirSync = scandirSync;
|
|
5986
5986
|
function getSettings(settingsOrOptions = {}) {
|
|
@@ -6627,7 +6627,7 @@ var require_settings3 = __commonJS({
|
|
|
6627
6627
|
"../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js"(exports) {
|
|
6628
6628
|
"use strict";
|
|
6629
6629
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6630
|
-
var
|
|
6630
|
+
var path16 = __require("path");
|
|
6631
6631
|
var fsScandir = require_out2();
|
|
6632
6632
|
var Settings = class {
|
|
6633
6633
|
constructor(_options = {}) {
|
|
@@ -6637,7 +6637,7 @@ var require_settings3 = __commonJS({
|
|
|
6637
6637
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
|
6638
6638
|
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
|
6639
6639
|
this.errorFilter = this._getValue(this._options.errorFilter, null);
|
|
6640
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator,
|
|
6640
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path16.sep);
|
|
6641
6641
|
this.fsScandirSettings = new fsScandir.Settings({
|
|
6642
6642
|
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
6643
6643
|
fs: this._options.fs,
|
|
@@ -6699,7 +6699,7 @@ var require_reader2 = __commonJS({
|
|
|
6699
6699
|
"../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js"(exports) {
|
|
6700
6700
|
"use strict";
|
|
6701
6701
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6702
|
-
var
|
|
6702
|
+
var path16 = __require("path");
|
|
6703
6703
|
var fsStat = require_out();
|
|
6704
6704
|
var utils = require_utils3();
|
|
6705
6705
|
var Reader = class {
|
|
@@ -6712,7 +6712,7 @@ var require_reader2 = __commonJS({
|
|
|
6712
6712
|
});
|
|
6713
6713
|
}
|
|
6714
6714
|
_getFullEntryPath(filepath) {
|
|
6715
|
-
return
|
|
6715
|
+
return path16.resolve(this._settings.cwd, filepath);
|
|
6716
6716
|
}
|
|
6717
6717
|
_makeEntry(stats, pattern) {
|
|
6718
6718
|
const entry = {
|
|
@@ -7128,7 +7128,7 @@ var require_provider = __commonJS({
|
|
|
7128
7128
|
"../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js"(exports) {
|
|
7129
7129
|
"use strict";
|
|
7130
7130
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7131
|
-
var
|
|
7131
|
+
var path16 = __require("path");
|
|
7132
7132
|
var deep_1 = require_deep();
|
|
7133
7133
|
var entry_1 = require_entry();
|
|
7134
7134
|
var error_1 = require_error();
|
|
@@ -7142,7 +7142,7 @@ var require_provider = __commonJS({
|
|
|
7142
7142
|
this.entryTransformer = new entry_2.default(this._settings);
|
|
7143
7143
|
}
|
|
7144
7144
|
_getRootDirectory(task) {
|
|
7145
|
-
return
|
|
7145
|
+
return path16.resolve(this._settings.cwd, task.base);
|
|
7146
7146
|
}
|
|
7147
7147
|
_getReaderOptions(task) {
|
|
7148
7148
|
const basePath = task.base === "." ? "" : task.base;
|
|
@@ -7775,7 +7775,7 @@ var require_ignore = __commonJS({
|
|
|
7775
7775
|
// path matching.
|
|
7776
7776
|
// - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
|
|
7777
7777
|
// @returns {TestResult} true if a file is ignored
|
|
7778
|
-
test(
|
|
7778
|
+
test(path16, checkUnignored, mode) {
|
|
7779
7779
|
let ignored = false;
|
|
7780
7780
|
let unignored = false;
|
|
7781
7781
|
let matchedRule;
|
|
@@ -7784,7 +7784,7 @@ var require_ignore = __commonJS({
|
|
|
7784
7784
|
if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
|
|
7785
7785
|
return;
|
|
7786
7786
|
}
|
|
7787
|
-
const matched = rule[mode].test(
|
|
7787
|
+
const matched = rule[mode].test(path16);
|
|
7788
7788
|
if (!matched) {
|
|
7789
7789
|
return;
|
|
7790
7790
|
}
|
|
@@ -7805,17 +7805,17 @@ var require_ignore = __commonJS({
|
|
|
7805
7805
|
var throwError = (message, Ctor) => {
|
|
7806
7806
|
throw new Ctor(message);
|
|
7807
7807
|
};
|
|
7808
|
-
var checkPath = (
|
|
7809
|
-
if (!isString(
|
|
7808
|
+
var checkPath = (path16, originalPath, doThrow) => {
|
|
7809
|
+
if (!isString(path16)) {
|
|
7810
7810
|
return doThrow(
|
|
7811
7811
|
`path must be a string, but got \`${originalPath}\``,
|
|
7812
7812
|
TypeError
|
|
7813
7813
|
);
|
|
7814
7814
|
}
|
|
7815
|
-
if (!
|
|
7815
|
+
if (!path16) {
|
|
7816
7816
|
return doThrow(`path must not be empty`, TypeError);
|
|
7817
7817
|
}
|
|
7818
|
-
if (checkPath.isNotRelative(
|
|
7818
|
+
if (checkPath.isNotRelative(path16)) {
|
|
7819
7819
|
const r = "`path.relative()`d";
|
|
7820
7820
|
return doThrow(
|
|
7821
7821
|
`path should be a ${r} string, but got "${originalPath}"`,
|
|
@@ -7824,7 +7824,7 @@ var require_ignore = __commonJS({
|
|
|
7824
7824
|
}
|
|
7825
7825
|
return true;
|
|
7826
7826
|
};
|
|
7827
|
-
var isNotRelative = (
|
|
7827
|
+
var isNotRelative = (path16) => REGEX_TEST_INVALID_PATH.test(path16);
|
|
7828
7828
|
checkPath.isNotRelative = isNotRelative;
|
|
7829
7829
|
checkPath.convert = (p) => p;
|
|
7830
7830
|
var Ignore = class {
|
|
@@ -7854,19 +7854,19 @@ var require_ignore = __commonJS({
|
|
|
7854
7854
|
}
|
|
7855
7855
|
// @returns {TestResult}
|
|
7856
7856
|
_test(originalPath, cache, checkUnignored, slices) {
|
|
7857
|
-
const
|
|
7857
|
+
const path16 = originalPath && checkPath.convert(originalPath);
|
|
7858
7858
|
checkPath(
|
|
7859
|
-
|
|
7859
|
+
path16,
|
|
7860
7860
|
originalPath,
|
|
7861
7861
|
this._strictPathCheck ? throwError : RETURN_FALSE
|
|
7862
7862
|
);
|
|
7863
|
-
return this._t(
|
|
7863
|
+
return this._t(path16, cache, checkUnignored, slices);
|
|
7864
7864
|
}
|
|
7865
|
-
checkIgnore(
|
|
7866
|
-
if (!REGEX_TEST_TRAILING_SLASH.test(
|
|
7867
|
-
return this.test(
|
|
7865
|
+
checkIgnore(path16) {
|
|
7866
|
+
if (!REGEX_TEST_TRAILING_SLASH.test(path16)) {
|
|
7867
|
+
return this.test(path16);
|
|
7868
7868
|
}
|
|
7869
|
-
const slices =
|
|
7869
|
+
const slices = path16.split(SLASH).filter(Boolean);
|
|
7870
7870
|
slices.pop();
|
|
7871
7871
|
if (slices.length) {
|
|
7872
7872
|
const parent = this._t(
|
|
@@ -7879,18 +7879,18 @@ var require_ignore = __commonJS({
|
|
|
7879
7879
|
return parent;
|
|
7880
7880
|
}
|
|
7881
7881
|
}
|
|
7882
|
-
return this._rules.test(
|
|
7882
|
+
return this._rules.test(path16, false, MODE_CHECK_IGNORE);
|
|
7883
7883
|
}
|
|
7884
|
-
_t(
|
|
7885
|
-
if (
|
|
7886
|
-
return cache[
|
|
7884
|
+
_t(path16, cache, checkUnignored, slices) {
|
|
7885
|
+
if (path16 in cache) {
|
|
7886
|
+
return cache[path16];
|
|
7887
7887
|
}
|
|
7888
7888
|
if (!slices) {
|
|
7889
|
-
slices =
|
|
7889
|
+
slices = path16.split(SLASH).filter(Boolean);
|
|
7890
7890
|
}
|
|
7891
7891
|
slices.pop();
|
|
7892
7892
|
if (!slices.length) {
|
|
7893
|
-
return cache[
|
|
7893
|
+
return cache[path16] = this._rules.test(path16, checkUnignored, MODE_IGNORE);
|
|
7894
7894
|
}
|
|
7895
7895
|
const parent = this._t(
|
|
7896
7896
|
slices.join(SLASH) + SLASH,
|
|
@@ -7898,29 +7898,29 @@ var require_ignore = __commonJS({
|
|
|
7898
7898
|
checkUnignored,
|
|
7899
7899
|
slices
|
|
7900
7900
|
);
|
|
7901
|
-
return cache[
|
|
7901
|
+
return cache[path16] = parent.ignored ? parent : this._rules.test(path16, checkUnignored, MODE_IGNORE);
|
|
7902
7902
|
}
|
|
7903
|
-
ignores(
|
|
7904
|
-
return this._test(
|
|
7903
|
+
ignores(path16) {
|
|
7904
|
+
return this._test(path16, this._ignoreCache, false).ignored;
|
|
7905
7905
|
}
|
|
7906
7906
|
createFilter() {
|
|
7907
|
-
return (
|
|
7907
|
+
return (path16) => !this.ignores(path16);
|
|
7908
7908
|
}
|
|
7909
7909
|
filter(paths) {
|
|
7910
7910
|
return makeArray(paths).filter(this.createFilter());
|
|
7911
7911
|
}
|
|
7912
7912
|
// @returns {TestResult}
|
|
7913
|
-
test(
|
|
7914
|
-
return this._test(
|
|
7913
|
+
test(path16) {
|
|
7914
|
+
return this._test(path16, this._testCache, true);
|
|
7915
7915
|
}
|
|
7916
7916
|
};
|
|
7917
7917
|
var factory12 = (options) => new Ignore(options);
|
|
7918
|
-
var isPathValid = (
|
|
7918
|
+
var isPathValid = (path16) => checkPath(path16 && checkPath.convert(path16), path16, RETURN_FALSE);
|
|
7919
7919
|
var setupWindows = () => {
|
|
7920
7920
|
const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
|
|
7921
7921
|
checkPath.convert = makePosix;
|
|
7922
7922
|
const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
|
|
7923
|
-
checkPath.isNotRelative = (
|
|
7923
|
+
checkPath.isNotRelative = (path16) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path16) || isNotRelative(path16);
|
|
7924
7924
|
};
|
|
7925
7925
|
if (
|
|
7926
7926
|
// Detect `process` so that it can run in browsers.
|
|
@@ -7937,7 +7937,7 @@ var require_ignore = __commonJS({
|
|
|
7937
7937
|
|
|
7938
7938
|
// ../../node_modules/.pnpm/move-file@4.1.0/node_modules/move-file/index.js
|
|
7939
7939
|
import process5 from "node:process";
|
|
7940
|
-
import
|
|
7940
|
+
import path9 from "node:path";
|
|
7941
7941
|
import fs4, { promises as fsPromises3 } from "node:fs";
|
|
7942
7942
|
async function moveFile(sourcePath, destinationPath, options) {
|
|
7943
7943
|
validatePathsExist(sourcePath, destinationPath);
|
|
@@ -7947,8 +7947,8 @@ var resolvePath, validatePathsExist, validateSameDirectory, _moveFile;
|
|
|
7947
7947
|
var init_move_file = __esm({
|
|
7948
7948
|
"../../node_modules/.pnpm/move-file@4.1.0/node_modules/move-file/index.js"() {
|
|
7949
7949
|
resolvePath = (cwd, sourcePath, destinationPath) => {
|
|
7950
|
-
sourcePath =
|
|
7951
|
-
destinationPath =
|
|
7950
|
+
sourcePath = path9.resolve(cwd, sourcePath);
|
|
7951
|
+
destinationPath = path9.resolve(cwd, destinationPath);
|
|
7952
7952
|
return {
|
|
7953
7953
|
sourcePath,
|
|
7954
7954
|
destinationPath
|
|
@@ -7960,7 +7960,7 @@ var init_move_file = __esm({
|
|
|
7960
7960
|
}
|
|
7961
7961
|
};
|
|
7962
7962
|
validateSameDirectory = (source, destination) => {
|
|
7963
|
-
if (
|
|
7963
|
+
if (path9.dirname(source) !== path9.dirname(destination)) {
|
|
7964
7964
|
throw new Error("`source` and `destination` must be in the same directory");
|
|
7965
7965
|
}
|
|
7966
7966
|
};
|
|
@@ -7974,7 +7974,7 @@ var init_move_file = __esm({
|
|
|
7974
7974
|
if (!overwrite && fs4.existsSync(destinationPath)) {
|
|
7975
7975
|
throw new Error(`The destination file exists: ${destinationPath}`);
|
|
7976
7976
|
}
|
|
7977
|
-
await fsPromises3.mkdir(
|
|
7977
|
+
await fsPromises3.mkdir(path9.dirname(destinationPath), {
|
|
7978
7978
|
recursive: true,
|
|
7979
7979
|
mode: directoryMode
|
|
7980
7980
|
});
|
|
@@ -8058,7 +8058,7 @@ __export(macos_exports, {
|
|
|
8058
8058
|
});
|
|
8059
8059
|
import os2 from "node:os";
|
|
8060
8060
|
import fs5 from "node:fs";
|
|
8061
|
-
import
|
|
8061
|
+
import path10 from "node:path";
|
|
8062
8062
|
import process6 from "node:process";
|
|
8063
8063
|
async function macOS(paths) {
|
|
8064
8064
|
if (isOlderThanMountainLion) {
|
|
@@ -8073,19 +8073,19 @@ async function macOS(paths) {
|
|
|
8073
8073
|
throw error51;
|
|
8074
8074
|
}
|
|
8075
8075
|
const trashDirectories = [
|
|
8076
|
-
|
|
8077
|
-
|
|
8076
|
+
path10.join(os2.homedir(), ".Trash"),
|
|
8077
|
+
path10.join(process6.cwd(), ".Trash")
|
|
8078
8078
|
];
|
|
8079
8079
|
await Promise.all(paths.map(async (filePath) => {
|
|
8080
|
-
const base =
|
|
8080
|
+
const base = path10.basename(filePath);
|
|
8081
8081
|
let lastError;
|
|
8082
8082
|
for (const dir of trashDirectories) {
|
|
8083
8083
|
try {
|
|
8084
8084
|
await fs5.promises.mkdir(dir, { recursive: true });
|
|
8085
|
-
let destination =
|
|
8085
|
+
let destination = path10.join(dir, base);
|
|
8086
8086
|
let counter = 1;
|
|
8087
8087
|
while (fs5.existsSync(destination)) {
|
|
8088
|
-
destination =
|
|
8088
|
+
destination = path10.join(dir, `${base} ${counter++}`);
|
|
8089
8089
|
}
|
|
8090
8090
|
await moveFile(filePath, destination, { overwrite: false });
|
|
8091
8091
|
return;
|
|
@@ -8343,16 +8343,16 @@ var init_wsl_utils = __esm({
|
|
|
8343
8343
|
const { stdout } = await executePowerShell(command, { powerShellPath: psPath });
|
|
8344
8344
|
return stdout.trim();
|
|
8345
8345
|
};
|
|
8346
|
-
isUrl = (
|
|
8346
|
+
isUrl = (path16) => /^[a-z]+:\/\//i.test(path16);
|
|
8347
8347
|
convertWslPathToWindows = async (paths) => {
|
|
8348
8348
|
const isBatch = Array.isArray(paths);
|
|
8349
8349
|
const pathArray = isBatch ? paths : [paths];
|
|
8350
8350
|
const indicesToConvert = [];
|
|
8351
8351
|
const pathsToConvert = [];
|
|
8352
|
-
for (const [index,
|
|
8353
|
-
if (!isUrl(
|
|
8352
|
+
for (const [index, path16] of pathArray.entries()) {
|
|
8353
|
+
if (!isUrl(path16)) {
|
|
8354
8354
|
indicesToConvert.push(index);
|
|
8355
|
-
pathsToConvert.push(
|
|
8355
|
+
pathsToConvert.push(path16);
|
|
8356
8356
|
}
|
|
8357
8357
|
}
|
|
8358
8358
|
const results = [...pathArray];
|
|
@@ -8368,9 +8368,9 @@ var init_wsl_utils = __esm({
|
|
|
8368
8368
|
}
|
|
8369
8369
|
return isBatch ? results : results[0];
|
|
8370
8370
|
};
|
|
8371
|
-
isUncPath = (
|
|
8372
|
-
isPathOnWindowsFilesystem = async (
|
|
8373
|
-
const windowsPath = await convertWslPathToWindows(
|
|
8371
|
+
isUncPath = (path16) => /^\\\\/u.test(path16);
|
|
8372
|
+
isPathOnWindowsFilesystem = async (path16) => {
|
|
8373
|
+
const windowsPath = await convertWslPathToWindows(path16);
|
|
8374
8374
|
return !isUncPath(windowsPath);
|
|
8375
8375
|
};
|
|
8376
8376
|
convertWindowsPathToWsl = async (paths) => {
|
|
@@ -8435,7 +8435,7 @@ var require_windows = __commonJS({
|
|
|
8435
8435
|
module.exports = isexe;
|
|
8436
8436
|
isexe.sync = sync;
|
|
8437
8437
|
var fs12 = __require("fs");
|
|
8438
|
-
function checkPathExt(
|
|
8438
|
+
function checkPathExt(path16, options) {
|
|
8439
8439
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
8440
8440
|
if (!pathext) {
|
|
8441
8441
|
return true;
|
|
@@ -8446,25 +8446,25 @@ var require_windows = __commonJS({
|
|
|
8446
8446
|
}
|
|
8447
8447
|
for (var i = 0; i < pathext.length; i++) {
|
|
8448
8448
|
var p = pathext[i].toLowerCase();
|
|
8449
|
-
if (p &&
|
|
8449
|
+
if (p && path16.substr(-p.length).toLowerCase() === p) {
|
|
8450
8450
|
return true;
|
|
8451
8451
|
}
|
|
8452
8452
|
}
|
|
8453
8453
|
return false;
|
|
8454
8454
|
}
|
|
8455
|
-
function checkStat(stat5,
|
|
8455
|
+
function checkStat(stat5, path16, options) {
|
|
8456
8456
|
if (!stat5.isSymbolicLink() && !stat5.isFile()) {
|
|
8457
8457
|
return false;
|
|
8458
8458
|
}
|
|
8459
|
-
return checkPathExt(
|
|
8459
|
+
return checkPathExt(path16, options);
|
|
8460
8460
|
}
|
|
8461
|
-
function isexe(
|
|
8462
|
-
fs12.stat(
|
|
8463
|
-
cb(er, er ? false : checkStat(stat5,
|
|
8461
|
+
function isexe(path16, options, cb) {
|
|
8462
|
+
fs12.stat(path16, function(er, stat5) {
|
|
8463
|
+
cb(er, er ? false : checkStat(stat5, path16, options));
|
|
8464
8464
|
});
|
|
8465
8465
|
}
|
|
8466
|
-
function sync(
|
|
8467
|
-
return checkStat(fs12.statSync(
|
|
8466
|
+
function sync(path16, options) {
|
|
8467
|
+
return checkStat(fs12.statSync(path16), path16, options);
|
|
8468
8468
|
}
|
|
8469
8469
|
}
|
|
8470
8470
|
});
|
|
@@ -8475,13 +8475,13 @@ var require_mode = __commonJS({
|
|
|
8475
8475
|
module.exports = isexe;
|
|
8476
8476
|
isexe.sync = sync;
|
|
8477
8477
|
var fs12 = __require("fs");
|
|
8478
|
-
function isexe(
|
|
8479
|
-
fs12.stat(
|
|
8478
|
+
function isexe(path16, options, cb) {
|
|
8479
|
+
fs12.stat(path16, function(er, stat5) {
|
|
8480
8480
|
cb(er, er ? false : checkStat(stat5, options));
|
|
8481
8481
|
});
|
|
8482
8482
|
}
|
|
8483
|
-
function sync(
|
|
8484
|
-
return checkStat(fs12.statSync(
|
|
8483
|
+
function sync(path16, options) {
|
|
8484
|
+
return checkStat(fs12.statSync(path16), options);
|
|
8485
8485
|
}
|
|
8486
8486
|
function checkStat(stat5, options) {
|
|
8487
8487
|
return stat5.isFile() && checkMode(stat5, options);
|
|
@@ -8514,7 +8514,7 @@ var require_isexe = __commonJS({
|
|
|
8514
8514
|
}
|
|
8515
8515
|
module.exports = isexe;
|
|
8516
8516
|
isexe.sync = sync;
|
|
8517
|
-
function isexe(
|
|
8517
|
+
function isexe(path16, options, cb) {
|
|
8518
8518
|
if (typeof options === "function") {
|
|
8519
8519
|
cb = options;
|
|
8520
8520
|
options = {};
|
|
@@ -8524,7 +8524,7 @@ var require_isexe = __commonJS({
|
|
|
8524
8524
|
throw new TypeError("callback not provided");
|
|
8525
8525
|
}
|
|
8526
8526
|
return new Promise(function(resolve2, reject) {
|
|
8527
|
-
isexe(
|
|
8527
|
+
isexe(path16, options || {}, function(er, is) {
|
|
8528
8528
|
if (er) {
|
|
8529
8529
|
reject(er);
|
|
8530
8530
|
} else {
|
|
@@ -8533,7 +8533,7 @@ var require_isexe = __commonJS({
|
|
|
8533
8533
|
});
|
|
8534
8534
|
});
|
|
8535
8535
|
}
|
|
8536
|
-
core(
|
|
8536
|
+
core(path16, options || {}, function(er, is) {
|
|
8537
8537
|
if (er) {
|
|
8538
8538
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
8539
8539
|
er = null;
|
|
@@ -8543,9 +8543,9 @@ var require_isexe = __commonJS({
|
|
|
8543
8543
|
cb(er, is);
|
|
8544
8544
|
});
|
|
8545
8545
|
}
|
|
8546
|
-
function sync(
|
|
8546
|
+
function sync(path16, options) {
|
|
8547
8547
|
try {
|
|
8548
|
-
return core.sync(
|
|
8548
|
+
return core.sync(path16, options || {});
|
|
8549
8549
|
} catch (er) {
|
|
8550
8550
|
if (options && options.ignoreErrors || er.code === "EACCES") {
|
|
8551
8551
|
return false;
|
|
@@ -8561,7 +8561,7 @@ var require_isexe = __commonJS({
|
|
|
8561
8561
|
var require_which = __commonJS({
|
|
8562
8562
|
"../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports, module) {
|
|
8563
8563
|
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
8564
|
-
var
|
|
8564
|
+
var path16 = __require("path");
|
|
8565
8565
|
var COLON = isWindows ? ";" : ":";
|
|
8566
8566
|
var isexe = require_isexe();
|
|
8567
8567
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -8599,7 +8599,7 @@ var require_which = __commonJS({
|
|
|
8599
8599
|
return opt.all && found.length ? resolve2(found) : reject(getNotFoundError(cmd));
|
|
8600
8600
|
const ppRaw = pathEnv[i];
|
|
8601
8601
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
8602
|
-
const pCmd =
|
|
8602
|
+
const pCmd = path16.join(pathPart, cmd);
|
|
8603
8603
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
8604
8604
|
resolve2(subStep(p, i, 0));
|
|
8605
8605
|
});
|
|
@@ -8626,7 +8626,7 @@ var require_which = __commonJS({
|
|
|
8626
8626
|
for (let i = 0; i < pathEnv.length; i++) {
|
|
8627
8627
|
const ppRaw = pathEnv[i];
|
|
8628
8628
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
8629
|
-
const pCmd =
|
|
8629
|
+
const pCmd = path16.join(pathPart, cmd);
|
|
8630
8630
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
8631
8631
|
for (let j = 0; j < pathExt.length; j++) {
|
|
8632
8632
|
const cur = p + pathExt[j];
|
|
@@ -8674,7 +8674,7 @@ var require_path_key = __commonJS({
|
|
|
8674
8674
|
var require_resolveCommand = __commonJS({
|
|
8675
8675
|
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
|
|
8676
8676
|
"use strict";
|
|
8677
|
-
var
|
|
8677
|
+
var path16 = __require("path");
|
|
8678
8678
|
var which = require_which();
|
|
8679
8679
|
var getPathKey = require_path_key();
|
|
8680
8680
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -8692,7 +8692,7 @@ var require_resolveCommand = __commonJS({
|
|
|
8692
8692
|
try {
|
|
8693
8693
|
resolved = which.sync(parsed.command, {
|
|
8694
8694
|
path: env[getPathKey({ env })],
|
|
8695
|
-
pathExt: withoutPathExt ?
|
|
8695
|
+
pathExt: withoutPathExt ? path16.delimiter : void 0
|
|
8696
8696
|
});
|
|
8697
8697
|
} catch (e) {
|
|
8698
8698
|
} finally {
|
|
@@ -8701,7 +8701,7 @@ var require_resolveCommand = __commonJS({
|
|
|
8701
8701
|
}
|
|
8702
8702
|
}
|
|
8703
8703
|
if (resolved) {
|
|
8704
|
-
resolved =
|
|
8704
|
+
resolved = path16.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
8705
8705
|
}
|
|
8706
8706
|
return resolved;
|
|
8707
8707
|
}
|
|
@@ -8755,8 +8755,8 @@ var require_shebang_command = __commonJS({
|
|
|
8755
8755
|
if (!match2) {
|
|
8756
8756
|
return null;
|
|
8757
8757
|
}
|
|
8758
|
-
const [
|
|
8759
|
-
const binary3 =
|
|
8758
|
+
const [path16, argument] = match2[0].replace(/#! ?/, "").split(" ");
|
|
8759
|
+
const binary3 = path16.split("/").pop();
|
|
8760
8760
|
if (binary3 === "env") {
|
|
8761
8761
|
return argument;
|
|
8762
8762
|
}
|
|
@@ -8791,7 +8791,7 @@ var require_readShebang = __commonJS({
|
|
|
8791
8791
|
var require_parse3 = __commonJS({
|
|
8792
8792
|
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports, module) {
|
|
8793
8793
|
"use strict";
|
|
8794
|
-
var
|
|
8794
|
+
var path16 = __require("path");
|
|
8795
8795
|
var resolveCommand = require_resolveCommand();
|
|
8796
8796
|
var escape = require_escape();
|
|
8797
8797
|
var readShebang = require_readShebang();
|
|
@@ -8816,7 +8816,7 @@ var require_parse3 = __commonJS({
|
|
|
8816
8816
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
8817
8817
|
if (parsed.options.forceShell || needsShell) {
|
|
8818
8818
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
8819
|
-
parsed.command =
|
|
8819
|
+
parsed.command = path16.normalize(parsed.command);
|
|
8820
8820
|
parsed.command = escape.command(parsed.command);
|
|
8821
8821
|
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
8822
8822
|
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
@@ -8948,7 +8948,7 @@ var require_strip_final_newline = __commonJS({
|
|
|
8948
8948
|
var require_npm_run_path = __commonJS({
|
|
8949
8949
|
"../../node_modules/.pnpm/npm-run-path@3.1.0/node_modules/npm-run-path/index.js"(exports, module) {
|
|
8950
8950
|
"use strict";
|
|
8951
|
-
var
|
|
8951
|
+
var path16 = __require("path");
|
|
8952
8952
|
var pathKey = require_path_key();
|
|
8953
8953
|
var npmRunPath = (options) => {
|
|
8954
8954
|
options = {
|
|
@@ -8957,15 +8957,15 @@ var require_npm_run_path = __commonJS({
|
|
|
8957
8957
|
...options
|
|
8958
8958
|
};
|
|
8959
8959
|
let previous;
|
|
8960
|
-
let cwdPath =
|
|
8960
|
+
let cwdPath = path16.resolve(options.cwd);
|
|
8961
8961
|
const result = [];
|
|
8962
8962
|
while (previous !== cwdPath) {
|
|
8963
|
-
result.push(
|
|
8963
|
+
result.push(path16.join(cwdPath, "node_modules/.bin"));
|
|
8964
8964
|
previous = cwdPath;
|
|
8965
|
-
cwdPath =
|
|
8965
|
+
cwdPath = path16.resolve(cwdPath, "..");
|
|
8966
8966
|
}
|
|
8967
|
-
result.push(
|
|
8968
|
-
return result.concat(options.path).join(
|
|
8967
|
+
result.push(path16.dirname(process.execPath));
|
|
8968
|
+
return result.concat(options.path).join(path16.delimiter);
|
|
8969
8969
|
};
|
|
8970
8970
|
module.exports = npmRunPath;
|
|
8971
8971
|
module.exports.default = npmRunPath;
|
|
@@ -8975,9 +8975,9 @@ var require_npm_run_path = __commonJS({
|
|
|
8975
8975
|
...options
|
|
8976
8976
|
};
|
|
8977
8977
|
const env = { ...options.env };
|
|
8978
|
-
const
|
|
8979
|
-
options.path = env[
|
|
8980
|
-
env[
|
|
8978
|
+
const path17 = pathKey({ env });
|
|
8979
|
+
options.path = env[path17];
|
|
8980
|
+
env[path17] = module.exports(options);
|
|
8981
8981
|
return env;
|
|
8982
8982
|
};
|
|
8983
8983
|
}
|
|
@@ -9998,7 +9998,7 @@ var require_command = __commonJS({
|
|
|
9998
9998
|
var require_execa = __commonJS({
|
|
9999
9999
|
"../../node_modules/.pnpm/execa@2.1.0/node_modules/execa/index.js"(exports, module) {
|
|
10000
10000
|
"use strict";
|
|
10001
|
-
var
|
|
10001
|
+
var path16 = __require("path");
|
|
10002
10002
|
var childProcess4 = __require("child_process");
|
|
10003
10003
|
var crossSpawn = require_cross_spawn();
|
|
10004
10004
|
var stripFinalNewline = require_strip_final_newline();
|
|
@@ -10038,7 +10038,7 @@ var require_execa = __commonJS({
|
|
|
10038
10038
|
};
|
|
10039
10039
|
options.env = getEnv(options);
|
|
10040
10040
|
options.stdio = normalizeStdio(options);
|
|
10041
|
-
if (process.platform === "win32" &&
|
|
10041
|
+
if (process.platform === "win32" && path16.basename(file2, ".exe") === "cmd") {
|
|
10042
10042
|
args.unshift("/q");
|
|
10043
10043
|
}
|
|
10044
10044
|
return { file: file2, args, options, parsed };
|
|
@@ -10695,12 +10695,12 @@ var require_xdg_basedir = __commonJS({
|
|
|
10695
10695
|
"../../node_modules/.pnpm/xdg-basedir@4.0.0/node_modules/xdg-basedir/index.js"(exports) {
|
|
10696
10696
|
"use strict";
|
|
10697
10697
|
var os7 = __require("os");
|
|
10698
|
-
var
|
|
10698
|
+
var path16 = __require("path");
|
|
10699
10699
|
var homeDirectory = os7.homedir();
|
|
10700
10700
|
var { env } = process;
|
|
10701
|
-
exports.data = env.XDG_DATA_HOME || (homeDirectory ?
|
|
10702
|
-
exports.config = env.XDG_CONFIG_HOME || (homeDirectory ?
|
|
10703
|
-
exports.cache = env.XDG_CACHE_HOME || (homeDirectory ?
|
|
10701
|
+
exports.data = env.XDG_DATA_HOME || (homeDirectory ? path16.join(homeDirectory, ".local", "share") : void 0);
|
|
10702
|
+
exports.config = env.XDG_CONFIG_HOME || (homeDirectory ? path16.join(homeDirectory, ".config") : void 0);
|
|
10703
|
+
exports.cache = env.XDG_CACHE_HOME || (homeDirectory ? path16.join(homeDirectory, ".cache") : void 0);
|
|
10704
10704
|
exports.runtime = env.XDG_RUNTIME_DIR || void 0;
|
|
10705
10705
|
exports.dataDirs = (env.XDG_DATA_DIRS || "/usr/local/share/:/usr/share/").split(":");
|
|
10706
10706
|
if (exports.data) {
|
|
@@ -10718,7 +10718,7 @@ var require_xdg_trashdir = __commonJS({
|
|
|
10718
10718
|
"../../node_modules/.pnpm/xdg-trashdir@3.1.0/node_modules/xdg-trashdir/index.js"(exports, module) {
|
|
10719
10719
|
"use strict";
|
|
10720
10720
|
var fs12 = __require("fs").promises;
|
|
10721
|
-
var
|
|
10721
|
+
var path16 = __require("path");
|
|
10722
10722
|
var df = require_df();
|
|
10723
10723
|
var mountPoint = require_mount_point();
|
|
10724
10724
|
var userHome = require_user_home();
|
|
@@ -10731,12 +10731,12 @@ var require_xdg_trashdir = __commonJS({
|
|
|
10731
10731
|
if (stats.isSymbolicLink() || stats.mode !== stickyBitMode) {
|
|
10732
10732
|
return topuid;
|
|
10733
10733
|
}
|
|
10734
|
-
return
|
|
10734
|
+
return path16.join(filePath, String(process.getuid()));
|
|
10735
10735
|
} catch (error51) {
|
|
10736
10736
|
if (error51.code === "ENOENT") {
|
|
10737
10737
|
return topuid;
|
|
10738
10738
|
}
|
|
10739
|
-
return
|
|
10739
|
+
return path16.join(xdgBasedir.data, "Trash");
|
|
10740
10740
|
}
|
|
10741
10741
|
};
|
|
10742
10742
|
module.exports = async (filePath) => {
|
|
@@ -10744,7 +10744,7 @@ var require_xdg_trashdir = __commonJS({
|
|
|
10744
10744
|
return Promise.reject(new Error("Only Linux systems are supported"));
|
|
10745
10745
|
}
|
|
10746
10746
|
if (!filePath) {
|
|
10747
|
-
return Promise.resolve(
|
|
10747
|
+
return Promise.resolve(path16.join(xdgBasedir.data, "Trash"));
|
|
10748
10748
|
}
|
|
10749
10749
|
const [homeMountPoint, fileMountPoint] = await Promise.all([
|
|
10750
10750
|
mountPoint(userHome),
|
|
@@ -10753,9 +10753,9 @@ var require_xdg_trashdir = __commonJS({
|
|
|
10753
10753
|
})
|
|
10754
10754
|
]);
|
|
10755
10755
|
if (!fileMountPoint || fileMountPoint === homeMountPoint) {
|
|
10756
|
-
return
|
|
10756
|
+
return path16.join(xdgBasedir.data, "Trash");
|
|
10757
10757
|
}
|
|
10758
|
-
return check2(
|
|
10758
|
+
return check2(path16.join(fileMountPoint, ".Trash"));
|
|
10759
10759
|
};
|
|
10760
10760
|
module.exports.all = async () => {
|
|
10761
10761
|
if (process.platform !== "linux") {
|
|
@@ -10763,9 +10763,9 @@ var require_xdg_trashdir = __commonJS({
|
|
|
10763
10763
|
}
|
|
10764
10764
|
return Promise.all((await df()).map((fileSystem) => {
|
|
10765
10765
|
if (fileSystem.mountpoint === "/") {
|
|
10766
|
-
return
|
|
10766
|
+
return path16.join(xdgBasedir.data, "Trash");
|
|
10767
10767
|
}
|
|
10768
|
-
return check2(
|
|
10768
|
+
return check2(path16.join(fileSystem.mountpoint, ".Trash"));
|
|
10769
10769
|
}));
|
|
10770
10770
|
};
|
|
10771
10771
|
}
|
|
@@ -11139,8 +11139,8 @@ var require_utils6 = __commonJS({
|
|
|
11139
11139
|
var tmpBufMinLen = 4096 * 2;
|
|
11140
11140
|
var tmpBufMaxLen = 4096 * 8;
|
|
11141
11141
|
var tmpBuf = Buffer.allocUnsafeSlow(tmpBufMinLen);
|
|
11142
|
-
var read = (
|
|
11143
|
-
const fd = openSync(
|
|
11142
|
+
var read = (path16) => {
|
|
11143
|
+
const fd = openSync(path16, "r", 438);
|
|
11144
11144
|
let pos = 0;
|
|
11145
11145
|
let bytesRead;
|
|
11146
11146
|
let buf = tmpBuf;
|
|
@@ -11161,8 +11161,8 @@ var require_utils6 = __commonJS({
|
|
|
11161
11161
|
closeSync(fd);
|
|
11162
11162
|
return buf.toString("utf8", 0, pos);
|
|
11163
11163
|
};
|
|
11164
|
-
var readIdList = (
|
|
11165
|
-
let ls = readdirSync(
|
|
11164
|
+
var readIdList = (path16) => {
|
|
11165
|
+
let ls = readdirSync(path16);
|
|
11166
11166
|
for (let i = 0; i < ls.length; i++) {
|
|
11167
11167
|
ls[i] = parseInt(ls[i]);
|
|
11168
11168
|
}
|
|
@@ -12329,7 +12329,7 @@ var require_procfs = __commonJS({
|
|
|
12329
12329
|
Procfs.prototype.devIdGetMinor = devIdGetMinor;
|
|
12330
12330
|
Procfs.prototype.devIdGetMajor = devIdGetMajor;
|
|
12331
12331
|
Procfs.prototype.devIdFromMajorMinor = devIdFromMajorMinor;
|
|
12332
|
-
for (let [name21,
|
|
12332
|
+
for (let [name21, path16] of [
|
|
12333
12333
|
["processExe", "/exe"],
|
|
12334
12334
|
["processCwd", "/cwd"]
|
|
12335
12335
|
]) {
|
|
@@ -12338,13 +12338,13 @@ var require_procfs = __commonJS({
|
|
|
12338
12338
|
throw new TypeError("pid");
|
|
12339
12339
|
}
|
|
12340
12340
|
try {
|
|
12341
|
-
return parsers[name21](readLink(`${this.rootSlash}${pid === void 0 ? "self" : pid}${
|
|
12341
|
+
return parsers[name21](readLink(`${this.rootSlash}${pid === void 0 ? "self" : pid}${path16}`));
|
|
12342
12342
|
} catch (error51) {
|
|
12343
12343
|
throw ProcfsError.generic(error51);
|
|
12344
12344
|
}
|
|
12345
12345
|
};
|
|
12346
12346
|
}
|
|
12347
|
-
for (let [name21,
|
|
12347
|
+
for (let [name21, path16] of [
|
|
12348
12348
|
["processMountinfo", "/mountinfo"],
|
|
12349
12349
|
["processIo", "/io"],
|
|
12350
12350
|
["processUidMap", "/uid_map"],
|
|
@@ -12375,7 +12375,7 @@ var require_procfs = __commonJS({
|
|
|
12375
12375
|
throw new TypeError("pid");
|
|
12376
12376
|
}
|
|
12377
12377
|
try {
|
|
12378
|
-
return parsers[name21](read(`${this.rootSlash}${pid === void 0 ? "self" : pid}${
|
|
12378
|
+
return parsers[name21](read(`${this.rootSlash}${pid === void 0 ? "self" : pid}${path16}`));
|
|
12379
12379
|
} catch (error51) {
|
|
12380
12380
|
throw ProcfsError.generic(error51);
|
|
12381
12381
|
}
|
|
@@ -12404,7 +12404,7 @@ var require_procfs = __commonJS({
|
|
|
12404
12404
|
}
|
|
12405
12405
|
};
|
|
12406
12406
|
}
|
|
12407
|
-
for (let [name21, parser,
|
|
12407
|
+
for (let [name21, parser, path16] of [
|
|
12408
12408
|
["netDev", "processNetDev", "net/dev"],
|
|
12409
12409
|
["netWireless", "processNetWireless", "net/wireless"],
|
|
12410
12410
|
["netUnix", "processNetUnix", "net/unix"],
|
|
@@ -12415,7 +12415,7 @@ var require_procfs = __commonJS({
|
|
|
12415
12415
|
]) {
|
|
12416
12416
|
Procfs.prototype[name21] = function() {
|
|
12417
12417
|
try {
|
|
12418
|
-
return parsers[parser](read(this.rootSlash +
|
|
12418
|
+
return parsers[parser](read(this.rootSlash + path16));
|
|
12419
12419
|
} catch (error51) {
|
|
12420
12420
|
throw ProcfsError.generic(error51);
|
|
12421
12421
|
}
|
|
@@ -12436,7 +12436,7 @@ __export(linux_exports, {
|
|
|
12436
12436
|
default: () => linux
|
|
12437
12437
|
});
|
|
12438
12438
|
import os4 from "node:os";
|
|
12439
|
-
import
|
|
12439
|
+
import path11 from "node:path";
|
|
12440
12440
|
import fs10 from "node:fs";
|
|
12441
12441
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
12442
12442
|
async function linux(paths) {
|
|
@@ -12459,8 +12459,8 @@ async function linux(paths) {
|
|
|
12459
12459
|
const mountPoint = deviceId === homeDevId ? void 0 : mountPointMap.get(deviceId);
|
|
12460
12460
|
const trashPath = await (0, import_xdg_trashdir.default)(mountPoint);
|
|
12461
12461
|
const paths2 = {
|
|
12462
|
-
filesPath:
|
|
12463
|
-
infoPath:
|
|
12462
|
+
filesPath: path11.join(trashPath, "files"),
|
|
12463
|
+
infoPath: path11.join(trashPath, "info")
|
|
12464
12464
|
};
|
|
12465
12465
|
await fs10.promises.mkdir(paths2.filesPath, { mode: 448, recursive: true });
|
|
12466
12466
|
await fs10.promises.mkdir(paths2.infoPath, { mode: 448, recursive: true });
|
|
@@ -12500,8 +12500,8 @@ var init_linux = __esm({
|
|
|
12500
12500
|
};
|
|
12501
12501
|
trash = async (filePath, { filesPath, infoPath }) => {
|
|
12502
12502
|
const name21 = randomUUID2();
|
|
12503
|
-
const destination =
|
|
12504
|
-
const trashInfoPath =
|
|
12503
|
+
const destination = path11.join(filesPath, name21);
|
|
12504
|
+
const trashInfoPath = path11.join(infoPath, `${name21}.trashinfo`);
|
|
12505
12505
|
const trashInfo = [
|
|
12506
12506
|
"[Trash Info]",
|
|
12507
12507
|
`Path=${encodeFilePath(filePath)}`,
|
|
@@ -13629,14 +13629,14 @@ var serve = (options, listeningListener) => {
|
|
|
13629
13629
|
};
|
|
13630
13630
|
|
|
13631
13631
|
// src/index.ts
|
|
13632
|
-
import
|
|
13632
|
+
import path15 from "node:path";
|
|
13633
13633
|
|
|
13634
13634
|
// src/app.ts
|
|
13635
13635
|
import { createWriteStream, statSync as statSync2 } from "node:fs";
|
|
13636
13636
|
import { mkdtemp, readFile as readFile5, rm as rm2, stat as stat4 } from "node:fs/promises";
|
|
13637
13637
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
13638
13638
|
import os6 from "node:os";
|
|
13639
|
-
import
|
|
13639
|
+
import path14 from "node:path";
|
|
13640
13640
|
|
|
13641
13641
|
// ../../node_modules/.pnpm/@hono+node-server@2.0.4_hono@4.12.23/node_modules/@hono/node-server/dist/utils/stream.mjs
|
|
13642
13642
|
import { Readable as Readable2 } from "node:stream";
|
|
@@ -13779,10 +13779,10 @@ var ENCODINGS = {
|
|
|
13779
13779
|
gzip: ".gz"
|
|
13780
13780
|
};
|
|
13781
13781
|
var ENCODINGS_ORDERED_KEYS = Object.keys(ENCODINGS);
|
|
13782
|
-
var getStats = (
|
|
13782
|
+
var getStats = (path16) => {
|
|
13783
13783
|
let stats;
|
|
13784
13784
|
try {
|
|
13785
|
-
stats = statSync(
|
|
13785
|
+
stats = statSync(path16);
|
|
13786
13786
|
} catch {
|
|
13787
13787
|
}
|
|
13788
13788
|
return stats;
|
|
@@ -13816,29 +13816,29 @@ var serveStatic = (options = { root: "" }) => {
|
|
|
13816
13816
|
await options.onNotFound?.(c.req.path, c);
|
|
13817
13817
|
return next();
|
|
13818
13818
|
}
|
|
13819
|
-
let
|
|
13820
|
-
let stats = getStats(
|
|
13819
|
+
let path16 = join(root, !optionPath && options.rewriteRequestPath ? options.rewriteRequestPath(filename, c) : filename);
|
|
13820
|
+
let stats = getStats(path16);
|
|
13821
13821
|
if (stats && stats.isDirectory()) {
|
|
13822
13822
|
const indexFile = options.index ?? "index.html";
|
|
13823
|
-
|
|
13824
|
-
stats = getStats(
|
|
13823
|
+
path16 = join(path16, indexFile);
|
|
13824
|
+
stats = getStats(path16);
|
|
13825
13825
|
}
|
|
13826
13826
|
if (!stats) {
|
|
13827
|
-
await options.onNotFound?.(
|
|
13827
|
+
await options.onNotFound?.(path16, c);
|
|
13828
13828
|
return next();
|
|
13829
13829
|
}
|
|
13830
|
-
const mimeType = getMimeType(
|
|
13830
|
+
const mimeType = getMimeType(path16);
|
|
13831
13831
|
c.header("Content-Type", mimeType || "application/octet-stream");
|
|
13832
13832
|
if (options.precompressed && (!mimeType || COMPRESSIBLE_CONTENT_TYPE_REGEX.test(mimeType))) {
|
|
13833
13833
|
const acceptEncodingSet = new Set(c.req.header("Accept-Encoding")?.split(",").map((encoding) => encoding.trim()));
|
|
13834
13834
|
for (const encoding of ENCODINGS_ORDERED_KEYS) {
|
|
13835
13835
|
if (!acceptEncodingSet.has(encoding)) continue;
|
|
13836
|
-
const precompressedStats = getStats(
|
|
13836
|
+
const precompressedStats = getStats(path16 + ENCODINGS[encoding]);
|
|
13837
13837
|
if (precompressedStats) {
|
|
13838
13838
|
c.header("Content-Encoding", encoding);
|
|
13839
13839
|
c.header("Vary", "Accept-Encoding", { append: true });
|
|
13840
13840
|
stats = precompressedStats;
|
|
13841
|
-
|
|
13841
|
+
path16 = path16 + ENCODINGS[encoding];
|
|
13842
13842
|
break;
|
|
13843
13843
|
}
|
|
13844
13844
|
}
|
|
@@ -13853,7 +13853,7 @@ var serveStatic = (options = { root: "" }) => {
|
|
|
13853
13853
|
result = c.body(null);
|
|
13854
13854
|
} else if (!range) {
|
|
13855
13855
|
c.header("Content-Length", size.toString());
|
|
13856
|
-
result = c.body(createStreamBody(createReadStream(
|
|
13856
|
+
result = c.body(createStreamBody(createReadStream(path16)), 200);
|
|
13857
13857
|
} else {
|
|
13858
13858
|
c.header("Accept-Ranges", "bytes");
|
|
13859
13859
|
const parts = range.replace(/bytes=/, "").split("-", 2);
|
|
@@ -13861,7 +13861,7 @@ var serveStatic = (options = { root: "" }) => {
|
|
|
13861
13861
|
let end = parseInt(parts[1], 10) || size - 1;
|
|
13862
13862
|
if (size < end - start + 1) end = size - 1;
|
|
13863
13863
|
const chunksize = end - start + 1;
|
|
13864
|
-
const stream2 = createReadStream(
|
|
13864
|
+
const stream2 = createReadStream(path16, {
|
|
13865
13865
|
start,
|
|
13866
13866
|
end
|
|
13867
13867
|
});
|
|
@@ -13869,7 +13869,7 @@ var serveStatic = (options = { root: "" }) => {
|
|
|
13869
13869
|
c.header("Content-Range", `bytes ${start}-${end}/${stats.size}`);
|
|
13870
13870
|
result = c.body(createStreamBody(stream2), 206);
|
|
13871
13871
|
}
|
|
13872
|
-
await options.onFound?.(
|
|
13872
|
+
await options.onFound?.(path16, c);
|
|
13873
13873
|
return result;
|
|
13874
13874
|
};
|
|
13875
13875
|
};
|
|
@@ -14197,26 +14197,26 @@ var handleParsingNestedValues = (form, key, value) => {
|
|
|
14197
14197
|
};
|
|
14198
14198
|
|
|
14199
14199
|
// ../../node_modules/.pnpm/hono@4.12.23/node_modules/hono/dist/utils/url.js
|
|
14200
|
-
var splitPath = (
|
|
14201
|
-
const paths =
|
|
14200
|
+
var splitPath = (path16) => {
|
|
14201
|
+
const paths = path16.split("/");
|
|
14202
14202
|
if (paths[0] === "") {
|
|
14203
14203
|
paths.shift();
|
|
14204
14204
|
}
|
|
14205
14205
|
return paths;
|
|
14206
14206
|
};
|
|
14207
14207
|
var splitRoutingPath = (routePath) => {
|
|
14208
|
-
const { groups, path:
|
|
14209
|
-
const paths = splitPath(
|
|
14208
|
+
const { groups, path: path16 } = extractGroupsFromPath(routePath);
|
|
14209
|
+
const paths = splitPath(path16);
|
|
14210
14210
|
return replaceGroupMarks(paths, groups);
|
|
14211
14211
|
};
|
|
14212
|
-
var extractGroupsFromPath = (
|
|
14212
|
+
var extractGroupsFromPath = (path16) => {
|
|
14213
14213
|
const groups = [];
|
|
14214
|
-
|
|
14214
|
+
path16 = path16.replace(/\{[^}]+\}/g, (match2, index) => {
|
|
14215
14215
|
const mark = `@${index}`;
|
|
14216
14216
|
groups.push([mark, match2]);
|
|
14217
14217
|
return mark;
|
|
14218
14218
|
});
|
|
14219
|
-
return { groups, path:
|
|
14219
|
+
return { groups, path: path16 };
|
|
14220
14220
|
};
|
|
14221
14221
|
var replaceGroupMarks = (paths, groups) => {
|
|
14222
14222
|
for (let i = groups.length - 1; i >= 0; i--) {
|
|
@@ -14273,8 +14273,8 @@ var getPath = (request) => {
|
|
|
14273
14273
|
const queryIndex = url2.indexOf("?", i);
|
|
14274
14274
|
const hashIndex = url2.indexOf("#", i);
|
|
14275
14275
|
const end = queryIndex === -1 ? hashIndex === -1 ? void 0 : hashIndex : hashIndex === -1 ? queryIndex : Math.min(queryIndex, hashIndex);
|
|
14276
|
-
const
|
|
14277
|
-
return tryDecodeURI2(
|
|
14276
|
+
const path16 = url2.slice(start, end);
|
|
14277
|
+
return tryDecodeURI2(path16.includes("%25") ? path16.replace(/%25/g, "%2525") : path16);
|
|
14278
14278
|
} else if (charCode === 63 || charCode === 35) {
|
|
14279
14279
|
break;
|
|
14280
14280
|
}
|
|
@@ -14291,11 +14291,11 @@ var mergePath = (base, sub, ...rest) => {
|
|
|
14291
14291
|
}
|
|
14292
14292
|
return `${base?.[0] === "/" ? "" : "/"}${base}${sub === "/" ? "" : `${base?.at(-1) === "/" ? "" : "/"}${sub?.[0] === "/" ? sub.slice(1) : sub}`}`;
|
|
14293
14293
|
};
|
|
14294
|
-
var checkOptionalParameter = (
|
|
14295
|
-
if (
|
|
14294
|
+
var checkOptionalParameter = (path16) => {
|
|
14295
|
+
if (path16.charCodeAt(path16.length - 1) !== 63 || !path16.includes(":")) {
|
|
14296
14296
|
return null;
|
|
14297
14297
|
}
|
|
14298
|
-
const segments =
|
|
14298
|
+
const segments = path16.split("/");
|
|
14299
14299
|
const results = [];
|
|
14300
14300
|
let basePath = "";
|
|
14301
14301
|
segments.forEach((segment) => {
|
|
@@ -14436,9 +14436,9 @@ var HonoRequest = class {
|
|
|
14436
14436
|
*/
|
|
14437
14437
|
path;
|
|
14438
14438
|
bodyCache = {};
|
|
14439
|
-
constructor(request,
|
|
14439
|
+
constructor(request, path16 = "/", matchResult = [[]]) {
|
|
14440
14440
|
this.raw = request;
|
|
14441
|
-
this.path =
|
|
14441
|
+
this.path = path16;
|
|
14442
14442
|
this.#matchResult = matchResult;
|
|
14443
14443
|
this.#validatedData = {};
|
|
14444
14444
|
}
|
|
@@ -15192,8 +15192,8 @@ var Hono = class _Hono {
|
|
|
15192
15192
|
return this;
|
|
15193
15193
|
};
|
|
15194
15194
|
});
|
|
15195
|
-
this.on = (method,
|
|
15196
|
-
for (const p of [
|
|
15195
|
+
this.on = (method, path16, ...handlers) => {
|
|
15196
|
+
for (const p of [path16].flat()) {
|
|
15197
15197
|
this.#path = p;
|
|
15198
15198
|
for (const m of [method].flat()) {
|
|
15199
15199
|
handlers.map((handler) => {
|
|
@@ -15250,8 +15250,8 @@ var Hono = class _Hono {
|
|
|
15250
15250
|
* app.route("/api", app2) // GET /api/user
|
|
15251
15251
|
* ```
|
|
15252
15252
|
*/
|
|
15253
|
-
route(
|
|
15254
|
-
const subApp = this.basePath(
|
|
15253
|
+
route(path16, app2) {
|
|
15254
|
+
const subApp = this.basePath(path16);
|
|
15255
15255
|
app2.routes.map((r) => {
|
|
15256
15256
|
let handler;
|
|
15257
15257
|
if (app2.errorHandler === errorHandler) {
|
|
@@ -15277,9 +15277,9 @@ var Hono = class _Hono {
|
|
|
15277
15277
|
* const api = new Hono().basePath('/api')
|
|
15278
15278
|
* ```
|
|
15279
15279
|
*/
|
|
15280
|
-
basePath(
|
|
15280
|
+
basePath(path16) {
|
|
15281
15281
|
const subApp = this.#clone();
|
|
15282
|
-
subApp._basePath = mergePath(this._basePath,
|
|
15282
|
+
subApp._basePath = mergePath(this._basePath, path16);
|
|
15283
15283
|
return subApp;
|
|
15284
15284
|
}
|
|
15285
15285
|
/**
|
|
@@ -15353,7 +15353,7 @@ var Hono = class _Hono {
|
|
|
15353
15353
|
* })
|
|
15354
15354
|
* ```
|
|
15355
15355
|
*/
|
|
15356
|
-
mount(
|
|
15356
|
+
mount(path16, applicationHandler, options) {
|
|
15357
15357
|
let replaceRequest;
|
|
15358
15358
|
let optionHandler;
|
|
15359
15359
|
if (options) {
|
|
@@ -15380,7 +15380,7 @@ var Hono = class _Hono {
|
|
|
15380
15380
|
return [c.env, executionContext];
|
|
15381
15381
|
};
|
|
15382
15382
|
replaceRequest ||= (() => {
|
|
15383
|
-
const mergedPath = mergePath(this._basePath,
|
|
15383
|
+
const mergedPath = mergePath(this._basePath, path16);
|
|
15384
15384
|
const pathPrefixLength = mergedPath === "/" ? 0 : mergedPath.length;
|
|
15385
15385
|
return (request) => {
|
|
15386
15386
|
const url2 = new URL(request.url);
|
|
@@ -15395,19 +15395,19 @@ var Hono = class _Hono {
|
|
|
15395
15395
|
}
|
|
15396
15396
|
await next();
|
|
15397
15397
|
};
|
|
15398
|
-
this.#addRoute(METHOD_NAME_ALL, mergePath(
|
|
15398
|
+
this.#addRoute(METHOD_NAME_ALL, mergePath(path16, "*"), handler);
|
|
15399
15399
|
return this;
|
|
15400
15400
|
}
|
|
15401
|
-
#addRoute(method,
|
|
15401
|
+
#addRoute(method, path16, handler, baseRoutePath) {
|
|
15402
15402
|
method = method.toUpperCase();
|
|
15403
|
-
|
|
15403
|
+
path16 = mergePath(this._basePath, path16);
|
|
15404
15404
|
const r = {
|
|
15405
15405
|
basePath: baseRoutePath !== void 0 ? mergePath(this._basePath, baseRoutePath) : this._basePath,
|
|
15406
|
-
path:
|
|
15406
|
+
path: path16,
|
|
15407
15407
|
method,
|
|
15408
15408
|
handler
|
|
15409
15409
|
};
|
|
15410
|
-
this.router.add(method,
|
|
15410
|
+
this.router.add(method, path16, [handler, r]);
|
|
15411
15411
|
this.routes.push(r);
|
|
15412
15412
|
}
|
|
15413
15413
|
#handleError(err, c) {
|
|
@@ -15420,10 +15420,10 @@ var Hono = class _Hono {
|
|
|
15420
15420
|
if (method === "HEAD") {
|
|
15421
15421
|
return (async () => new Response(null, await this.#dispatch(request, executionCtx, env, "GET")))();
|
|
15422
15422
|
}
|
|
15423
|
-
const
|
|
15424
|
-
const matchResult = this.router.match(method,
|
|
15423
|
+
const path16 = this.getPath(request, { env });
|
|
15424
|
+
const matchResult = this.router.match(method, path16);
|
|
15425
15425
|
const c = new Context(request, {
|
|
15426
|
-
path:
|
|
15426
|
+
path: path16,
|
|
15427
15427
|
matchResult,
|
|
15428
15428
|
env,
|
|
15429
15429
|
executionCtx,
|
|
@@ -15523,7 +15523,7 @@ var Hono = class _Hono {
|
|
|
15523
15523
|
|
|
15524
15524
|
// ../../node_modules/.pnpm/hono@4.12.23/node_modules/hono/dist/router/reg-exp-router/matcher.js
|
|
15525
15525
|
var emptyParam = [];
|
|
15526
|
-
function match(method,
|
|
15526
|
+
function match(method, path16) {
|
|
15527
15527
|
const matchers = this.buildAllMatchers();
|
|
15528
15528
|
const match2 = ((method2, path22) => {
|
|
15529
15529
|
const matcher = matchers[method2] || matchers[METHOD_NAME_ALL];
|
|
@@ -15539,7 +15539,7 @@ function match(method, path15) {
|
|
|
15539
15539
|
return [matcher[1][index], match3];
|
|
15540
15540
|
});
|
|
15541
15541
|
this.match = match2;
|
|
15542
|
-
return match2(method,
|
|
15542
|
+
return match2(method, path16);
|
|
15543
15543
|
}
|
|
15544
15544
|
|
|
15545
15545
|
// ../../node_modules/.pnpm/hono@4.12.23/node_modules/hono/dist/router/reg-exp-router/node.js
|
|
@@ -15654,12 +15654,12 @@ var Node = class _Node {
|
|
|
15654
15654
|
var Trie = class {
|
|
15655
15655
|
#context = { varIndex: 0 };
|
|
15656
15656
|
#root = new Node();
|
|
15657
|
-
insert(
|
|
15657
|
+
insert(path16, index, pathErrorCheckOnly) {
|
|
15658
15658
|
const paramAssoc = [];
|
|
15659
15659
|
const groups = [];
|
|
15660
15660
|
for (let i = 0; ; ) {
|
|
15661
15661
|
let replaced = false;
|
|
15662
|
-
|
|
15662
|
+
path16 = path16.replace(/\{[^}]+\}/g, (m) => {
|
|
15663
15663
|
const mark = `@\\${i}`;
|
|
15664
15664
|
groups[i] = [mark, m];
|
|
15665
15665
|
i++;
|
|
@@ -15670,7 +15670,7 @@ var Trie = class {
|
|
|
15670
15670
|
break;
|
|
15671
15671
|
}
|
|
15672
15672
|
}
|
|
15673
|
-
const tokens =
|
|
15673
|
+
const tokens = path16.match(/(?::[^\/]+)|(?:\/\*$)|./g) || [];
|
|
15674
15674
|
for (let i = groups.length - 1; i >= 0; i--) {
|
|
15675
15675
|
const [mark] = groups[i];
|
|
15676
15676
|
for (let j = tokens.length - 1; j >= 0; j--) {
|
|
@@ -15709,9 +15709,9 @@ var Trie = class {
|
|
|
15709
15709
|
// ../../node_modules/.pnpm/hono@4.12.23/node_modules/hono/dist/router/reg-exp-router/router.js
|
|
15710
15710
|
var nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)];
|
|
15711
15711
|
var wildcardRegExpCache = /* @__PURE__ */ Object.create(null);
|
|
15712
|
-
function buildWildcardRegExp(
|
|
15713
|
-
return wildcardRegExpCache[
|
|
15714
|
-
|
|
15712
|
+
function buildWildcardRegExp(path16) {
|
|
15713
|
+
return wildcardRegExpCache[path16] ??= new RegExp(
|
|
15714
|
+
path16 === "*" ? "" : `^${path16.replace(
|
|
15715
15715
|
/\/\*$|([.\\+*[^\]$()])/g,
|
|
15716
15716
|
(_, metaChar) => metaChar ? `\\${metaChar}` : "(?:|/.*)"
|
|
15717
15717
|
)}$`
|
|
@@ -15733,17 +15733,17 @@ function buildMatcherFromPreprocessedRoutes(routes) {
|
|
|
15733
15733
|
);
|
|
15734
15734
|
const staticMap = /* @__PURE__ */ Object.create(null);
|
|
15735
15735
|
for (let i = 0, j = -1, len = routesWithStaticPathFlag.length; i < len; i++) {
|
|
15736
|
-
const [pathErrorCheckOnly,
|
|
15736
|
+
const [pathErrorCheckOnly, path16, handlers] = routesWithStaticPathFlag[i];
|
|
15737
15737
|
if (pathErrorCheckOnly) {
|
|
15738
|
-
staticMap[
|
|
15738
|
+
staticMap[path16] = [handlers.map(([h]) => [h, /* @__PURE__ */ Object.create(null)]), emptyParam];
|
|
15739
15739
|
} else {
|
|
15740
15740
|
j++;
|
|
15741
15741
|
}
|
|
15742
15742
|
let paramAssoc;
|
|
15743
15743
|
try {
|
|
15744
|
-
paramAssoc = trie.insert(
|
|
15744
|
+
paramAssoc = trie.insert(path16, j, pathErrorCheckOnly);
|
|
15745
15745
|
} catch (e) {
|
|
15746
|
-
throw e === PATH_ERROR ? new UnsupportedPathError(
|
|
15746
|
+
throw e === PATH_ERROR ? new UnsupportedPathError(path16) : e;
|
|
15747
15747
|
}
|
|
15748
15748
|
if (pathErrorCheckOnly) {
|
|
15749
15749
|
continue;
|
|
@@ -15777,12 +15777,12 @@ function buildMatcherFromPreprocessedRoutes(routes) {
|
|
|
15777
15777
|
}
|
|
15778
15778
|
return [regexp, handlerMap, staticMap];
|
|
15779
15779
|
}
|
|
15780
|
-
function findMiddleware(middleware,
|
|
15780
|
+
function findMiddleware(middleware, path16) {
|
|
15781
15781
|
if (!middleware) {
|
|
15782
15782
|
return void 0;
|
|
15783
15783
|
}
|
|
15784
15784
|
for (const k of Object.keys(middleware).sort((a, b) => b.length - a.length)) {
|
|
15785
|
-
if (buildWildcardRegExp(k).test(
|
|
15785
|
+
if (buildWildcardRegExp(k).test(path16)) {
|
|
15786
15786
|
return [...middleware[k]];
|
|
15787
15787
|
}
|
|
15788
15788
|
}
|
|
@@ -15796,7 +15796,7 @@ var RegExpRouter = class {
|
|
|
15796
15796
|
this.#middleware = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) };
|
|
15797
15797
|
this.#routes = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) };
|
|
15798
15798
|
}
|
|
15799
|
-
add(method,
|
|
15799
|
+
add(method, path16, handler) {
|
|
15800
15800
|
const middleware = this.#middleware;
|
|
15801
15801
|
const routes = this.#routes;
|
|
15802
15802
|
if (!middleware || !routes) {
|
|
@@ -15811,18 +15811,18 @@ var RegExpRouter = class {
|
|
|
15811
15811
|
});
|
|
15812
15812
|
});
|
|
15813
15813
|
}
|
|
15814
|
-
if (
|
|
15815
|
-
|
|
15814
|
+
if (path16 === "/*") {
|
|
15815
|
+
path16 = "*";
|
|
15816
15816
|
}
|
|
15817
|
-
const paramCount = (
|
|
15818
|
-
if (/\*$/.test(
|
|
15819
|
-
const re2 = buildWildcardRegExp(
|
|
15817
|
+
const paramCount = (path16.match(/\/:/g) || []).length;
|
|
15818
|
+
if (/\*$/.test(path16)) {
|
|
15819
|
+
const re2 = buildWildcardRegExp(path16);
|
|
15820
15820
|
if (method === METHOD_NAME_ALL) {
|
|
15821
15821
|
Object.keys(middleware).forEach((m) => {
|
|
15822
|
-
middleware[m][
|
|
15822
|
+
middleware[m][path16] ||= findMiddleware(middleware[m], path16) || findMiddleware(middleware[METHOD_NAME_ALL], path16) || [];
|
|
15823
15823
|
});
|
|
15824
15824
|
} else {
|
|
15825
|
-
middleware[method][
|
|
15825
|
+
middleware[method][path16] ||= findMiddleware(middleware[method], path16) || findMiddleware(middleware[METHOD_NAME_ALL], path16) || [];
|
|
15826
15826
|
}
|
|
15827
15827
|
Object.keys(middleware).forEach((m) => {
|
|
15828
15828
|
if (method === METHOD_NAME_ALL || method === m) {
|
|
@@ -15840,7 +15840,7 @@ var RegExpRouter = class {
|
|
|
15840
15840
|
});
|
|
15841
15841
|
return;
|
|
15842
15842
|
}
|
|
15843
|
-
const paths = checkOptionalParameter(
|
|
15843
|
+
const paths = checkOptionalParameter(path16) || [path16];
|
|
15844
15844
|
for (let i = 0, len = paths.length; i < len; i++) {
|
|
15845
15845
|
const path22 = paths[i];
|
|
15846
15846
|
Object.keys(routes).forEach((m) => {
|
|
@@ -15867,13 +15867,13 @@ var RegExpRouter = class {
|
|
|
15867
15867
|
const routes = [];
|
|
15868
15868
|
let hasOwnRoute = method === METHOD_NAME_ALL;
|
|
15869
15869
|
[this.#middleware, this.#routes].forEach((r) => {
|
|
15870
|
-
const ownRoute = r[method] ? Object.keys(r[method]).map((
|
|
15870
|
+
const ownRoute = r[method] ? Object.keys(r[method]).map((path16) => [path16, r[method][path16]]) : [];
|
|
15871
15871
|
if (ownRoute.length !== 0) {
|
|
15872
15872
|
hasOwnRoute ||= true;
|
|
15873
15873
|
routes.push(...ownRoute);
|
|
15874
15874
|
} else if (method !== METHOD_NAME_ALL) {
|
|
15875
15875
|
routes.push(
|
|
15876
|
-
...Object.keys(r[METHOD_NAME_ALL]).map((
|
|
15876
|
+
...Object.keys(r[METHOD_NAME_ALL]).map((path16) => [path16, r[METHOD_NAME_ALL][path16]])
|
|
15877
15877
|
);
|
|
15878
15878
|
}
|
|
15879
15879
|
});
|
|
@@ -15893,13 +15893,13 @@ var SmartRouter = class {
|
|
|
15893
15893
|
constructor(init) {
|
|
15894
15894
|
this.#routers = init.routers;
|
|
15895
15895
|
}
|
|
15896
|
-
add(method,
|
|
15896
|
+
add(method, path16, handler) {
|
|
15897
15897
|
if (!this.#routes) {
|
|
15898
15898
|
throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT);
|
|
15899
15899
|
}
|
|
15900
|
-
this.#routes.push([method,
|
|
15900
|
+
this.#routes.push([method, path16, handler]);
|
|
15901
15901
|
}
|
|
15902
|
-
match(method,
|
|
15902
|
+
match(method, path16) {
|
|
15903
15903
|
if (!this.#routes) {
|
|
15904
15904
|
throw new Error("Fatal error");
|
|
15905
15905
|
}
|
|
@@ -15914,7 +15914,7 @@ var SmartRouter = class {
|
|
|
15914
15914
|
for (let i2 = 0, len2 = routes.length; i2 < len2; i2++) {
|
|
15915
15915
|
router.add(...routes[i2]);
|
|
15916
15916
|
}
|
|
15917
|
-
res = router.match(method,
|
|
15917
|
+
res = router.match(method, path16);
|
|
15918
15918
|
} catch (e) {
|
|
15919
15919
|
if (e instanceof UnsupportedPathError) {
|
|
15920
15920
|
continue;
|
|
@@ -15964,10 +15964,10 @@ var Node2 = class _Node2 {
|
|
|
15964
15964
|
}
|
|
15965
15965
|
this.#patterns = [];
|
|
15966
15966
|
}
|
|
15967
|
-
insert(method,
|
|
15967
|
+
insert(method, path16, handler) {
|
|
15968
15968
|
this.#order = ++this.#order;
|
|
15969
15969
|
let curNode = this;
|
|
15970
|
-
const parts = splitRoutingPath(
|
|
15970
|
+
const parts = splitRoutingPath(path16);
|
|
15971
15971
|
const possibleKeys = [];
|
|
15972
15972
|
for (let i = 0, len = parts.length; i < len; i++) {
|
|
15973
15973
|
const p = parts[i];
|
|
@@ -16016,12 +16016,12 @@ var Node2 = class _Node2 {
|
|
|
16016
16016
|
}
|
|
16017
16017
|
}
|
|
16018
16018
|
}
|
|
16019
|
-
search(method,
|
|
16019
|
+
search(method, path16) {
|
|
16020
16020
|
const handlerSets = [];
|
|
16021
16021
|
this.#params = emptyParams;
|
|
16022
16022
|
const curNode = this;
|
|
16023
16023
|
let curNodes = [curNode];
|
|
16024
|
-
const parts = splitPath(
|
|
16024
|
+
const parts = splitPath(path16);
|
|
16025
16025
|
const curNodesQueue = [];
|
|
16026
16026
|
const len = parts.length;
|
|
16027
16027
|
let partOffsets = null;
|
|
@@ -16063,13 +16063,13 @@ var Node2 = class _Node2 {
|
|
|
16063
16063
|
if (matcher instanceof RegExp) {
|
|
16064
16064
|
if (partOffsets === null) {
|
|
16065
16065
|
partOffsets = new Array(len);
|
|
16066
|
-
let offset =
|
|
16066
|
+
let offset = path16[0] === "/" ? 1 : 0;
|
|
16067
16067
|
for (let p = 0; p < len; p++) {
|
|
16068
16068
|
partOffsets[p] = offset;
|
|
16069
16069
|
offset += parts[p].length + 1;
|
|
16070
16070
|
}
|
|
16071
16071
|
}
|
|
16072
|
-
const restPathString =
|
|
16072
|
+
const restPathString = path16.substring(partOffsets[i]);
|
|
16073
16073
|
const m = matcher.exec(restPathString);
|
|
16074
16074
|
if (m) {
|
|
16075
16075
|
params[name21] = m[0];
|
|
@@ -16122,18 +16122,18 @@ var TrieRouter = class {
|
|
|
16122
16122
|
constructor() {
|
|
16123
16123
|
this.#node = new Node2();
|
|
16124
16124
|
}
|
|
16125
|
-
add(method,
|
|
16126
|
-
const results = checkOptionalParameter(
|
|
16125
|
+
add(method, path16, handler) {
|
|
16126
|
+
const results = checkOptionalParameter(path16);
|
|
16127
16127
|
if (results) {
|
|
16128
16128
|
for (let i = 0, len = results.length; i < len; i++) {
|
|
16129
16129
|
this.#node.insert(method, results[i], handler);
|
|
16130
16130
|
}
|
|
16131
16131
|
return;
|
|
16132
16132
|
}
|
|
16133
|
-
this.#node.insert(method,
|
|
16133
|
+
this.#node.insert(method, path16, handler);
|
|
16134
16134
|
}
|
|
16135
|
-
match(method,
|
|
16136
|
-
return this.#node.search(method,
|
|
16135
|
+
match(method, path16) {
|
|
16136
|
+
return this.#node.search(method, path16);
|
|
16137
16137
|
}
|
|
16138
16138
|
};
|
|
16139
16139
|
|
|
@@ -17267,10 +17267,10 @@ function mergeDefs(...defs) {
|
|
|
17267
17267
|
function cloneDef(schema) {
|
|
17268
17268
|
return mergeDefs(schema._zod.def);
|
|
17269
17269
|
}
|
|
17270
|
-
function getElementAtPath(obj,
|
|
17271
|
-
if (!
|
|
17270
|
+
function getElementAtPath(obj, path16) {
|
|
17271
|
+
if (!path16)
|
|
17272
17272
|
return obj;
|
|
17273
|
-
return
|
|
17273
|
+
return path16.reduce((acc, key) => acc?.[key], obj);
|
|
17274
17274
|
}
|
|
17275
17275
|
function promiseAllObject(promisesObj) {
|
|
17276
17276
|
const keys = Object.keys(promisesObj);
|
|
@@ -17679,11 +17679,11 @@ function explicitlyAborted(x, startIndex = 0) {
|
|
|
17679
17679
|
}
|
|
17680
17680
|
return false;
|
|
17681
17681
|
}
|
|
17682
|
-
function prefixIssues(
|
|
17682
|
+
function prefixIssues(path16, issues) {
|
|
17683
17683
|
return issues.map((iss) => {
|
|
17684
17684
|
var _a21;
|
|
17685
17685
|
(_a21 = iss).path ?? (_a21.path = []);
|
|
17686
|
-
iss.path.unshift(
|
|
17686
|
+
iss.path.unshift(path16);
|
|
17687
17687
|
return iss;
|
|
17688
17688
|
});
|
|
17689
17689
|
}
|
|
@@ -17830,16 +17830,16 @@ function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
|
17830
17830
|
}
|
|
17831
17831
|
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
17832
17832
|
const fieldErrors = { _errors: [] };
|
|
17833
|
-
const processError = (error52,
|
|
17833
|
+
const processError = (error52, path16 = []) => {
|
|
17834
17834
|
for (const issue2 of error52.issues) {
|
|
17835
17835
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
17836
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
17836
|
+
issue2.errors.map((issues) => processError({ issues }, [...path16, ...issue2.path]));
|
|
17837
17837
|
} else if (issue2.code === "invalid_key") {
|
|
17838
|
-
processError({ issues: issue2.issues }, [...
|
|
17838
|
+
processError({ issues: issue2.issues }, [...path16, ...issue2.path]);
|
|
17839
17839
|
} else if (issue2.code === "invalid_element") {
|
|
17840
|
-
processError({ issues: issue2.issues }, [...
|
|
17840
|
+
processError({ issues: issue2.issues }, [...path16, ...issue2.path]);
|
|
17841
17841
|
} else {
|
|
17842
|
-
const fullpath = [...
|
|
17842
|
+
const fullpath = [...path16, ...issue2.path];
|
|
17843
17843
|
if (fullpath.length === 0) {
|
|
17844
17844
|
fieldErrors._errors.push(mapper(issue2));
|
|
17845
17845
|
} else {
|
|
@@ -17866,17 +17866,17 @@ function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
|
17866
17866
|
}
|
|
17867
17867
|
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
17868
17868
|
const result = { errors: [] };
|
|
17869
|
-
const processError = (error52,
|
|
17869
|
+
const processError = (error52, path16 = []) => {
|
|
17870
17870
|
var _a21, _b17;
|
|
17871
17871
|
for (const issue2 of error52.issues) {
|
|
17872
17872
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
17873
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
17873
|
+
issue2.errors.map((issues) => processError({ issues }, [...path16, ...issue2.path]));
|
|
17874
17874
|
} else if (issue2.code === "invalid_key") {
|
|
17875
|
-
processError({ issues: issue2.issues }, [...
|
|
17875
|
+
processError({ issues: issue2.issues }, [...path16, ...issue2.path]);
|
|
17876
17876
|
} else if (issue2.code === "invalid_element") {
|
|
17877
|
-
processError({ issues: issue2.issues }, [...
|
|
17877
|
+
processError({ issues: issue2.issues }, [...path16, ...issue2.path]);
|
|
17878
17878
|
} else {
|
|
17879
|
-
const fullpath = [...
|
|
17879
|
+
const fullpath = [...path16, ...issue2.path];
|
|
17880
17880
|
if (fullpath.length === 0) {
|
|
17881
17881
|
result.errors.push(mapper(issue2));
|
|
17882
17882
|
continue;
|
|
@@ -17908,8 +17908,8 @@ function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
|
17908
17908
|
}
|
|
17909
17909
|
function toDotPath(_path) {
|
|
17910
17910
|
const segs = [];
|
|
17911
|
-
const
|
|
17912
|
-
for (const seg of
|
|
17911
|
+
const path16 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
17912
|
+
for (const seg of path16) {
|
|
17913
17913
|
if (typeof seg === "number")
|
|
17914
17914
|
segs.push(`[${seg}]`);
|
|
17915
17915
|
else if (typeof seg === "symbol")
|
|
@@ -30601,13 +30601,13 @@ function resolveRef(ref, ctx) {
|
|
|
30601
30601
|
if (!ref.startsWith("#")) {
|
|
30602
30602
|
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
30603
30603
|
}
|
|
30604
|
-
const
|
|
30605
|
-
if (
|
|
30604
|
+
const path16 = ref.slice(1).split("/").filter(Boolean);
|
|
30605
|
+
if (path16.length === 0) {
|
|
30606
30606
|
return ctx.rootSchema;
|
|
30607
30607
|
}
|
|
30608
30608
|
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
30609
|
-
if (
|
|
30610
|
-
const key =
|
|
30609
|
+
if (path16[0] === defsKey) {
|
|
30610
|
+
const key = path16[1];
|
|
30611
30611
|
if (!key || !ctx.defs[key]) {
|
|
30612
30612
|
throw new Error(`Reference not found: ${ref}`);
|
|
30613
30613
|
}
|
|
@@ -31374,8 +31374,8 @@ function getErrorMap2() {
|
|
|
31374
31374
|
|
|
31375
31375
|
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v3/helpers/parseUtil.js
|
|
31376
31376
|
var makeIssue = (params) => {
|
|
31377
|
-
const { data, path:
|
|
31378
|
-
const fullPath = [...
|
|
31377
|
+
const { data, path: path16, errorMaps, issueData } = params;
|
|
31378
|
+
const fullPath = [...path16, ...issueData.path || []];
|
|
31379
31379
|
const fullIssue = {
|
|
31380
31380
|
...issueData,
|
|
31381
31381
|
path: fullPath
|
|
@@ -31490,11 +31490,11 @@ var errorUtil;
|
|
|
31490
31490
|
|
|
31491
31491
|
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v3/types.js
|
|
31492
31492
|
var ParseInputLazyPath = class {
|
|
31493
|
-
constructor(parent, value,
|
|
31493
|
+
constructor(parent, value, path16, key) {
|
|
31494
31494
|
this._cachedPath = [];
|
|
31495
31495
|
this.parent = parent;
|
|
31496
31496
|
this.data = value;
|
|
31497
|
-
this._path =
|
|
31497
|
+
this._path = path16;
|
|
31498
31498
|
this._key = key;
|
|
31499
31499
|
}
|
|
31500
31500
|
get path() {
|
|
@@ -54580,7 +54580,7 @@ function createDeepSeek(options = {}) {
|
|
|
54580
54580
|
const createLanguageModel = (modelId) => {
|
|
54581
54581
|
return new DeepSeekChatLanguageModel(modelId, {
|
|
54582
54582
|
provider: `deepseek.chat`,
|
|
54583
|
-
url: ({ path:
|
|
54583
|
+
url: ({ path: path16 }) => `${baseURL}${path16}`,
|
|
54584
54584
|
headers: getHeaders,
|
|
54585
54585
|
fetch: options.fetch
|
|
54586
54586
|
});
|
|
@@ -56217,8 +56217,8 @@ function createOpenAICompatible(options) {
|
|
|
56217
56217
|
const getHeaders = () => withUserAgentSuffix(headers, `ai-sdk/openai-compatible/${VERSION7}`);
|
|
56218
56218
|
const getCommonModelConfig = (modelType) => ({
|
|
56219
56219
|
provider: `${providerName}.${modelType}`,
|
|
56220
|
-
url: ({ path:
|
|
56221
|
-
const url2 = new URL(`${baseURL}${
|
|
56220
|
+
url: ({ path: path16 }) => {
|
|
56221
|
+
const url2 = new URL(`${baseURL}${path16}`);
|
|
56222
56222
|
if (options.queryParams) {
|
|
56223
56223
|
url2.search = new URLSearchParams(options.queryParams).toString();
|
|
56224
56224
|
}
|
|
@@ -56676,6 +56676,32 @@ function elapsedWallTime(startedAt) {
|
|
|
56676
56676
|
return Math.max(0, Math.round((performance.now() - startedAt) * 100) / 100);
|
|
56677
56677
|
}
|
|
56678
56678
|
|
|
56679
|
+
// ../core/src/agent/tools/protected-paths.ts
|
|
56680
|
+
import path3 from "node:path";
|
|
56681
|
+
|
|
56682
|
+
// ../core/src/workspace-store/paths.ts
|
|
56683
|
+
import path2 from "node:path";
|
|
56684
|
+
function isMissingPathError2(error51) {
|
|
56685
|
+
return error51 instanceof Error && "code" in error51 && error51.code === "ENOENT";
|
|
56686
|
+
}
|
|
56687
|
+
function normalizeWorkspaceRelativePath(relativePath) {
|
|
56688
|
+
return relativePath.split(path2.sep).join("/");
|
|
56689
|
+
}
|
|
56690
|
+
|
|
56691
|
+
// ../core/src/agent/tools/protected-paths.ts
|
|
56692
|
+
var PROTECTED_ROOT_DESIGN_DOCUMENT_PATH = "design.md";
|
|
56693
|
+
function assertAgentWorkspaceMutationPathAllowed(relativePath) {
|
|
56694
|
+
const normalizedPath = normalizeAgentWorkspaceMutationPath(relativePath);
|
|
56695
|
+
if (normalizedPath.toLowerCase() === PROTECTED_ROOT_DESIGN_DOCUMENT_PATH) {
|
|
56696
|
+
throw new Error("Agent workspace mutation tools cannot modify root-level DESIGN.md.");
|
|
56697
|
+
}
|
|
56698
|
+
}
|
|
56699
|
+
function normalizeAgentWorkspaceMutationPath(relativePath) {
|
|
56700
|
+
const slashNormalizedPath = normalizeWorkspaceRelativePath(relativePath);
|
|
56701
|
+
const normalizedPath = path3.posix.normalize(slashNormalizedPath);
|
|
56702
|
+
return normalizedPath === "." ? "" : normalizedPath.replace(/^\.\//, "");
|
|
56703
|
+
}
|
|
56704
|
+
|
|
56679
56705
|
// ../core/src/workspace-store/text.ts
|
|
56680
56706
|
var MAX_LINE_LENGTH = 2e3;
|
|
56681
56707
|
function normalizePositiveInteger(value, fallback, name21) {
|
|
@@ -56782,15 +56808,6 @@ function buildUnifiedDiff(oldContent, newContent, relativePath) {
|
|
|
56782
56808
|
return lines.join("\n");
|
|
56783
56809
|
}
|
|
56784
56810
|
|
|
56785
|
-
// ../core/src/workspace-store/paths.ts
|
|
56786
|
-
import path2 from "node:path";
|
|
56787
|
-
function isMissingPathError2(error51) {
|
|
56788
|
-
return error51 instanceof Error && "code" in error51 && error51.code === "ENOENT";
|
|
56789
|
-
}
|
|
56790
|
-
function normalizeWorkspaceRelativePath(relativePath) {
|
|
56791
|
-
return relativePath.split(path2.sep).join("/");
|
|
56792
|
-
}
|
|
56793
|
-
|
|
56794
56811
|
// ../core/src/templates/owndesign-runtime.ts
|
|
56795
56812
|
var OWNDESIGN_RUNTIME_ATTRIBUTE = 'data-owndesign-runtime="preview-route-bridge"';
|
|
56796
56813
|
var OWNDESIGN_RUNTIME_SCRIPT_TAG = `<script ${OWNDESIGN_RUNTIME_ATTRIBUTE}>
|
|
@@ -56939,22 +56956,23 @@ function createEditToolDefinition() {
|
|
|
56939
56956
|
}).strict(),
|
|
56940
56957
|
name: "edit",
|
|
56941
56958
|
parallelSafe: false,
|
|
56942
|
-
execute: async ({ newString, oldString, path:
|
|
56943
|
-
|
|
56959
|
+
execute: async ({ newString, oldString, path: path16, replaceAll }, { projectId, workspaceStore }) => {
|
|
56960
|
+
assertAgentWorkspaceMutationPathAllowed(path16);
|
|
56961
|
+
const content = await workspaceStore.readProjectWorkspaceFile(projectId, path16);
|
|
56944
56962
|
const { content: updatedContent, replacements } = applyTextEdit(
|
|
56945
56963
|
content,
|
|
56946
56964
|
oldString,
|
|
56947
56965
|
newString,
|
|
56948
56966
|
replaceAll,
|
|
56949
|
-
|
|
56967
|
+
path16
|
|
56950
56968
|
);
|
|
56951
|
-
if (isProtectedSingleHtmlPath(
|
|
56969
|
+
if (isProtectedSingleHtmlPath(path16)) {
|
|
56952
56970
|
assertOwnDesignRuntimeScript(updatedContent);
|
|
56953
56971
|
}
|
|
56954
|
-
await workspaceStore.writeProjectWorkspaceFile(projectId,
|
|
56972
|
+
await workspaceStore.writeProjectWorkspaceFile(projectId, path16, updatedContent);
|
|
56955
56973
|
return {
|
|
56956
|
-
diff: buildUnifiedDiff(content, updatedContent, normalizeWorkspaceRelativePath(
|
|
56957
|
-
path: normalizeWorkspaceRelativePath(
|
|
56974
|
+
diff: buildUnifiedDiff(content, updatedContent, normalizeWorkspaceRelativePath(path16)),
|
|
56975
|
+
path: normalizeWorkspaceRelativePath(path16),
|
|
56958
56976
|
replacements: replaceAll ? replacements : 1
|
|
56959
56977
|
};
|
|
56960
56978
|
}
|
|
@@ -56983,8 +57001,8 @@ function createGlobToolDefinition() {
|
|
|
56983
57001
|
}).strict(),
|
|
56984
57002
|
name: "glob",
|
|
56985
57003
|
parallelSafe: true,
|
|
56986
|
-
execute: async ({ path:
|
|
56987
|
-
return workspaceStore.globProjectWorkspace(projectId, pattern,
|
|
57004
|
+
execute: async ({ path: path16, pattern }, { projectId, workspaceStore }) => {
|
|
57005
|
+
return workspaceStore.globProjectWorkspace(projectId, pattern, path16);
|
|
56988
57006
|
}
|
|
56989
57007
|
};
|
|
56990
57008
|
}
|
|
@@ -57013,10 +57031,10 @@ function createGrepToolDefinition() {
|
|
|
57013
57031
|
}).strict(),
|
|
57014
57032
|
name: "grep",
|
|
57015
57033
|
parallelSafe: true,
|
|
57016
|
-
execute: async ({ include, path:
|
|
57034
|
+
execute: async ({ include, path: path16, pattern }, { projectId, workspaceStore }) => {
|
|
57017
57035
|
return workspaceStore.grepProjectWorkspace(projectId, pattern, {
|
|
57018
57036
|
include,
|
|
57019
|
-
path:
|
|
57037
|
+
path: path16
|
|
57020
57038
|
});
|
|
57021
57039
|
}
|
|
57022
57040
|
};
|
|
@@ -57192,8 +57210,8 @@ function createReadToolDefinition() {
|
|
|
57192
57210
|
}).strict(),
|
|
57193
57211
|
name: "read",
|
|
57194
57212
|
parallelSafe: true,
|
|
57195
|
-
execute: async ({ limit, offset, path:
|
|
57196
|
-
return workspaceStore.readProjectWorkspaceEntry(projectId,
|
|
57213
|
+
execute: async ({ limit, offset, path: path16 }, { projectId, workspaceStore }) => {
|
|
57214
|
+
return workspaceStore.readProjectWorkspaceEntry(projectId, path16, {
|
|
57197
57215
|
limit,
|
|
57198
57216
|
offset
|
|
57199
57217
|
});
|
|
@@ -57224,11 +57242,12 @@ function createWriteToolDefinition() {
|
|
|
57224
57242
|
}).strict(),
|
|
57225
57243
|
name: "write",
|
|
57226
57244
|
parallelSafe: false,
|
|
57227
|
-
execute: async ({ content, path:
|
|
57228
|
-
|
|
57245
|
+
execute: async ({ content, path: path16 }, { projectId, workspaceStore }) => {
|
|
57246
|
+
assertAgentWorkspaceMutationPathAllowed(path16);
|
|
57247
|
+
if (isProtectedSingleHtmlPath(path16)) {
|
|
57229
57248
|
assertOwnDesignRuntimeScript(content);
|
|
57230
57249
|
}
|
|
57231
|
-
return workspaceStore.writeProjectWorkspaceFile(projectId,
|
|
57250
|
+
return workspaceStore.writeProjectWorkspaceFile(projectId, path16, content);
|
|
57232
57251
|
}
|
|
57233
57252
|
};
|
|
57234
57253
|
}
|
|
@@ -57247,7 +57266,7 @@ function createProjectWorkspaceToolDefinitions() {
|
|
|
57247
57266
|
|
|
57248
57267
|
// ../core/src/prompts/index.ts
|
|
57249
57268
|
import { readFileSync } from "node:fs";
|
|
57250
|
-
import
|
|
57269
|
+
import path4 from "node:path";
|
|
57251
57270
|
import { fileURLToPath } from "node:url";
|
|
57252
57271
|
var PROMPT_FILES = {
|
|
57253
57272
|
"agents/design-page": "agents/design-page.md"
|
|
@@ -57257,10 +57276,10 @@ function loadPrompt(name21) {
|
|
|
57257
57276
|
if (!promptFile) {
|
|
57258
57277
|
throw new Error(`Unsupported prompt: ${String(name21)}`);
|
|
57259
57278
|
}
|
|
57260
|
-
const currentDir =
|
|
57279
|
+
const currentDir = path4.dirname(fileURLToPath(import.meta.url));
|
|
57261
57280
|
const candidatePaths = [
|
|
57262
|
-
|
|
57263
|
-
|
|
57281
|
+
path4.join(currentDir, "prompts", promptFile),
|
|
57282
|
+
path4.join(currentDir, promptFile)
|
|
57264
57283
|
];
|
|
57265
57284
|
for (const candidatePath of candidatePaths) {
|
|
57266
57285
|
try {
|
|
@@ -57306,7 +57325,7 @@ function buildFrontendCapabilityPrompt() {
|
|
|
57306
57325
|
}
|
|
57307
57326
|
|
|
57308
57327
|
// ../core/src/agent/design-page-agent.ts
|
|
57309
|
-
var DESIGN_PAGE_AGENT_PROMPT_VERSION =
|
|
57328
|
+
var DESIGN_PAGE_AGENT_PROMPT_VERSION = 9;
|
|
57310
57329
|
var AiSdkDesignPageAgent = class {
|
|
57311
57330
|
constructor(workspaceStore) {
|
|
57312
57331
|
this.workspaceStore = workspaceStore;
|
|
@@ -57444,7 +57463,7 @@ function normalizeProjectType(projectType, outputType) {
|
|
|
57444
57463
|
}
|
|
57445
57464
|
return "single_html";
|
|
57446
57465
|
}
|
|
57447
|
-
function buildDesignPageConversationInstructions(resources) {
|
|
57466
|
+
function buildDesignPageConversationInstructions(resources, designDocument) {
|
|
57448
57467
|
const sections = [
|
|
57449
57468
|
{
|
|
57450
57469
|
tag: "design_agent_core",
|
|
@@ -57467,8 +57486,35 @@ function buildDesignPageConversationInstructions(resources) {
|
|
|
57467
57486
|
content: resources ? buildResourcePolicyPrompt(resources) : buildResourcePolicyFallbackPrompt()
|
|
57468
57487
|
}
|
|
57469
57488
|
];
|
|
57489
|
+
const projectDesignPrompt = buildProjectDesignDocumentPrompt(designDocument);
|
|
57490
|
+
if (projectDesignPrompt) {
|
|
57491
|
+
sections.push({
|
|
57492
|
+
tag: "project_design_document",
|
|
57493
|
+
content: projectDesignPrompt
|
|
57494
|
+
});
|
|
57495
|
+
}
|
|
57470
57496
|
return renderDesignPromptSections(sections);
|
|
57471
57497
|
}
|
|
57498
|
+
function buildProjectDesignDocumentPrompt(designDocument) {
|
|
57499
|
+
if (designDocument == null) {
|
|
57500
|
+
return void 0;
|
|
57501
|
+
}
|
|
57502
|
+
return [
|
|
57503
|
+
"## Project DESIGN.md",
|
|
57504
|
+
"",
|
|
57505
|
+
"The following content is the user-maintained project design document frozen for this conversation.",
|
|
57506
|
+
"It is encoded as a JSON string literal so markdown content inside it cannot break the prompt structure.",
|
|
57507
|
+
"Treat it as read-only design guidance when creating or editing `index.html`.",
|
|
57508
|
+
"OwnDesign must not create, edit, overwrite, normalize, migrate, or summarize this document.",
|
|
57509
|
+
"Do not claim that you changed `DESIGN.md`; only the user can update it in project settings.",
|
|
57510
|
+
"If the user asks for a change that conflicts with this document, explain the conflict briefly and follow the user request only as a one-off change unless they update project settings.",
|
|
57511
|
+
"",
|
|
57512
|
+
encodeDesignDocumentForPrompt(designDocument)
|
|
57513
|
+
].join("\n");
|
|
57514
|
+
}
|
|
57515
|
+
function encodeDesignDocumentForPrompt(designDocument) {
|
|
57516
|
+
return JSON.stringify(designDocument).replaceAll("`", "\\u0060").replaceAll("<", "\\u003c").replaceAll(">", "\\u003e");
|
|
57517
|
+
}
|
|
57472
57518
|
function renderDesignPromptSections(sections) {
|
|
57473
57519
|
return sections.map(({ content, tag }) => {
|
|
57474
57520
|
const trimmedContent = content.trim();
|
|
@@ -57580,7 +57626,7 @@ function formatResourceLibraryList(libraries) {
|
|
|
57580
57626
|
|
|
57581
57627
|
// ../core/src/preview/preview-server-manager.ts
|
|
57582
57628
|
import { access, readFile as readFile2 } from "node:fs/promises";
|
|
57583
|
-
import
|
|
57629
|
+
import path5 from "node:path";
|
|
57584
57630
|
var DEFAULT_CLEANUP_INTERVAL_MS = 3e4;
|
|
57585
57631
|
var DEFAULT_LEASE_TTL_MS = 9e4;
|
|
57586
57632
|
var PREVIEW_HOST = "127.0.0.1";
|
|
@@ -57783,7 +57829,7 @@ function getPreviewServerManager(workspaceStore) {
|
|
|
57783
57829
|
return globalThis.__owndesignPreviewServerManager;
|
|
57784
57830
|
}
|
|
57785
57831
|
async function readIndexHtmlOrNotFound(workspaceDirectory) {
|
|
57786
|
-
const indexPath =
|
|
57832
|
+
const indexPath = path5.join(workspaceDirectory, "index.html");
|
|
57787
57833
|
try {
|
|
57788
57834
|
await access(indexPath);
|
|
57789
57835
|
return htmlResponse(await readFile2(indexPath, "utf8"));
|
|
@@ -57798,7 +57844,7 @@ async function readIndexHtmlOrNotFound(workspaceDirectory) {
|
|
|
57798
57844
|
}
|
|
57799
57845
|
async function indexHtmlExists(workspaceDirectory) {
|
|
57800
57846
|
try {
|
|
57801
|
-
await access(
|
|
57847
|
+
await access(path5.join(workspaceDirectory, "index.html"));
|
|
57802
57848
|
return true;
|
|
57803
57849
|
} catch {
|
|
57804
57850
|
return false;
|
|
@@ -57954,7 +58000,7 @@ function summarizeConversationTitle(content) {
|
|
|
57954
58000
|
|
|
57955
58001
|
// ../core/src/templates/index.ts
|
|
57956
58002
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
57957
|
-
import
|
|
58003
|
+
import path6 from "node:path";
|
|
57958
58004
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
57959
58005
|
var TEMPLATE_FILES = {
|
|
57960
58006
|
"html/page-shell": "html/page-shell.html"
|
|
@@ -57964,10 +58010,10 @@ function loadTemplate(name21) {
|
|
|
57964
58010
|
if (!templateFile) {
|
|
57965
58011
|
throw new Error(`Unsupported template: ${String(name21)}`);
|
|
57966
58012
|
}
|
|
57967
|
-
const currentDir =
|
|
58013
|
+
const currentDir = path6.dirname(fileURLToPath2(import.meta.url));
|
|
57968
58014
|
const candidatePaths = [
|
|
57969
|
-
|
|
57970
|
-
|
|
58015
|
+
path6.join(currentDir, "templates", templateFile),
|
|
58016
|
+
path6.join(currentDir, templateFile)
|
|
57971
58017
|
];
|
|
57972
58018
|
for (const candidatePath of candidatePaths) {
|
|
57973
58019
|
try {
|
|
@@ -58018,6 +58064,7 @@ var ProjectService = class {
|
|
|
58018
58064
|
throw new Error("React project type is reserved but not supported yet.");
|
|
58019
58065
|
}
|
|
58020
58066
|
const timestamp = this.now();
|
|
58067
|
+
const designDocument = normalizeCreateDesignDocument(input.designDocument);
|
|
58021
58068
|
const project = {
|
|
58022
58069
|
id: this.createId(),
|
|
58023
58070
|
name: input.name,
|
|
@@ -58025,7 +58072,8 @@ var ProjectService = class {
|
|
|
58025
58072
|
projectType,
|
|
58026
58073
|
outputType: "html",
|
|
58027
58074
|
createdAt: timestamp,
|
|
58028
|
-
updatedAt: timestamp
|
|
58075
|
+
updatedAt: timestamp,
|
|
58076
|
+
...designDocument !== void 0 ? { designDocument } : {}
|
|
58029
58077
|
};
|
|
58030
58078
|
const conversation = {
|
|
58031
58079
|
id: this.createId(),
|
|
@@ -58052,6 +58100,13 @@ var ProjectService = class {
|
|
|
58052
58100
|
description: input.description,
|
|
58053
58101
|
updatedAt: this.now()
|
|
58054
58102
|
};
|
|
58103
|
+
if (Object.prototype.hasOwnProperty.call(input, "designDocument")) {
|
|
58104
|
+
if (input.designDocument === null) {
|
|
58105
|
+
delete renamedProject.designDocument;
|
|
58106
|
+
} else if (typeof input.designDocument === "string") {
|
|
58107
|
+
renamedProject.designDocument = input.designDocument;
|
|
58108
|
+
}
|
|
58109
|
+
}
|
|
58055
58110
|
return this.workspaceStore.updateProject(projectId, renamedProject);
|
|
58056
58111
|
}
|
|
58057
58112
|
async deleteProject(projectId) {
|
|
@@ -58065,11 +58120,14 @@ var ProjectService = class {
|
|
|
58065
58120
|
};
|
|
58066
58121
|
}
|
|
58067
58122
|
};
|
|
58123
|
+
function normalizeCreateDesignDocument(value) {
|
|
58124
|
+
return typeof value === "string" ? value : void 0;
|
|
58125
|
+
}
|
|
58068
58126
|
|
|
58069
58127
|
// ../core/src/workspace-store/store.ts
|
|
58070
58128
|
import { copyFile, lstat, mkdir as mkdir2, readdir, readFile as readFile4, rm, stat as stat3, writeFile as writeFile2 } from "node:fs/promises";
|
|
58071
58129
|
import os5 from "node:os";
|
|
58072
|
-
import
|
|
58130
|
+
import path13 from "node:path";
|
|
58073
58131
|
import process12 from "node:process";
|
|
58074
58132
|
|
|
58075
58133
|
// ../core/src/workspace-store/files.ts
|
|
@@ -58154,7 +58212,7 @@ import { promisify as promisify6 } from "node:util";
|
|
|
58154
58212
|
|
|
58155
58213
|
// ../../node_modules/.pnpm/trash@10.1.1/node_modules/trash/index.js
|
|
58156
58214
|
import fs11 from "node:fs";
|
|
58157
|
-
import
|
|
58215
|
+
import path12 from "node:path";
|
|
58158
58216
|
import process10 from "node:process";
|
|
58159
58217
|
|
|
58160
58218
|
// ../../node_modules/.pnpm/globby@14.1.0/node_modules/globby/index.js
|
|
@@ -58395,15 +58453,15 @@ var import_ignore = __toESM(require_ignore(), 1);
|
|
|
58395
58453
|
import process3 from "node:process";
|
|
58396
58454
|
import fs2 from "node:fs";
|
|
58397
58455
|
import fsPromises2 from "node:fs/promises";
|
|
58398
|
-
import
|
|
58456
|
+
import path7 from "node:path";
|
|
58399
58457
|
|
|
58400
58458
|
// ../../node_modules/.pnpm/slash@5.1.0/node_modules/slash/index.js
|
|
58401
|
-
function slash(
|
|
58402
|
-
const isExtendedLengthPath =
|
|
58459
|
+
function slash(path16) {
|
|
58460
|
+
const isExtendedLengthPath = path16.startsWith("\\\\?\\");
|
|
58403
58461
|
if (isExtendedLengthPath) {
|
|
58404
|
-
return
|
|
58462
|
+
return path16;
|
|
58405
58463
|
}
|
|
58406
|
-
return
|
|
58464
|
+
return path16.replace(/\\/g, "/");
|
|
58407
58465
|
}
|
|
58408
58466
|
|
|
58409
58467
|
// ../../node_modules/.pnpm/globby@14.1.0/node_modules/globby/utilities.js
|
|
@@ -58421,16 +58479,16 @@ var ignoreFilesGlobOptions = {
|
|
|
58421
58479
|
dot: true
|
|
58422
58480
|
};
|
|
58423
58481
|
var GITIGNORE_FILES_PATTERN = "**/.gitignore";
|
|
58424
|
-
var applyBaseToPattern = (pattern, base) => isNegativePattern(pattern) ? "!" +
|
|
58482
|
+
var applyBaseToPattern = (pattern, base) => isNegativePattern(pattern) ? "!" + path7.posix.join(base, pattern.slice(1)) : path7.posix.join(base, pattern);
|
|
58425
58483
|
var parseIgnoreFile = (file2, cwd) => {
|
|
58426
|
-
const base = slash(
|
|
58484
|
+
const base = slash(path7.relative(cwd, path7.dirname(file2.filePath)));
|
|
58427
58485
|
return file2.content.split(/\r?\n/).filter((line) => line && !line.startsWith("#")).map((pattern) => applyBaseToPattern(pattern, base));
|
|
58428
58486
|
};
|
|
58429
58487
|
var toRelativePath = (fileOrDirectory, cwd) => {
|
|
58430
58488
|
cwd = slash(cwd);
|
|
58431
|
-
if (
|
|
58489
|
+
if (path7.isAbsolute(fileOrDirectory)) {
|
|
58432
58490
|
if (slash(fileOrDirectory).startsWith(cwd)) {
|
|
58433
|
-
return
|
|
58491
|
+
return path7.relative(cwd, fileOrDirectory);
|
|
58434
58492
|
}
|
|
58435
58493
|
throw new Error(`Path ${fileOrDirectory} is not in cwd ${cwd}`);
|
|
58436
58494
|
}
|
|
@@ -58491,8 +58549,8 @@ var assertPatternsInput = (patterns) => {
|
|
|
58491
58549
|
}
|
|
58492
58550
|
};
|
|
58493
58551
|
var normalizePathForDirectoryGlob = (filePath, cwd) => {
|
|
58494
|
-
const
|
|
58495
|
-
return nodePath.isAbsolute(
|
|
58552
|
+
const path16 = isNegativePattern(filePath) ? filePath.slice(1) : filePath;
|
|
58553
|
+
return nodePath.isAbsolute(path16) ? path16 : nodePath.join(cwd, path16);
|
|
58496
58554
|
};
|
|
58497
58555
|
var getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
58498
58556
|
const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
|
|
@@ -58675,11 +58733,11 @@ var generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);
|
|
|
58675
58733
|
var { convertPathToPattern } = import_fast_glob2.default;
|
|
58676
58734
|
|
|
58677
58735
|
// ../../node_modules/.pnpm/is-path-inside@4.0.0/node_modules/is-path-inside/index.js
|
|
58678
|
-
import
|
|
58736
|
+
import path8 from "node:path";
|
|
58679
58737
|
function isPathInside(childPath, parentPath) {
|
|
58680
|
-
const relation =
|
|
58738
|
+
const relation = path8.relative(parentPath, childPath);
|
|
58681
58739
|
return Boolean(
|
|
58682
|
-
relation && relation !== ".." && !relation.startsWith(`..${
|
|
58740
|
+
relation && relation !== ".." && !relation.startsWith(`..${path8.sep}`) && relation !== path8.resolve(childPath)
|
|
58683
58741
|
);
|
|
58684
58742
|
}
|
|
58685
58743
|
|
|
@@ -58691,7 +58749,7 @@ async function trash2(paths, options = {}) {
|
|
|
58691
58749
|
const patterns = paths.map((pattern) => {
|
|
58692
58750
|
const isNegated = pattern.startsWith("!");
|
|
58693
58751
|
const body = isNegated ? pattern.slice(1) : pattern;
|
|
58694
|
-
const normalized = body.endsWith("/**") ?
|
|
58752
|
+
const normalized = body.endsWith("/**") ? path12.dirname(body) : body;
|
|
58695
58753
|
return isNegated ? "!" + normalized : normalized;
|
|
58696
58754
|
});
|
|
58697
58755
|
const matches = await globby(patterns, {
|
|
@@ -58715,7 +58773,7 @@ async function trash2(paths, options = {}) {
|
|
|
58715
58773
|
}
|
|
58716
58774
|
try {
|
|
58717
58775
|
await fs11.promises.lstat(filePath);
|
|
58718
|
-
return
|
|
58776
|
+
return path12.resolve(filePath);
|
|
58719
58777
|
} catch (error51) {
|
|
58720
58778
|
if (error51.code !== "ENOENT") {
|
|
58721
58779
|
throw error51;
|
|
@@ -58792,7 +58850,7 @@ var WorkspaceStore = class {
|
|
|
58792
58850
|
workspaceRoot;
|
|
58793
58851
|
moveToTrash;
|
|
58794
58852
|
constructor(options = {}) {
|
|
58795
|
-
this.workspaceRoot = options.workspaceRoot ??
|
|
58853
|
+
this.workspaceRoot = options.workspaceRoot ?? path13.join(os5.homedir(), ".owndesign");
|
|
58796
58854
|
this.moveToTrash = options.moveToTrash ?? (async (targetPath) => {
|
|
58797
58855
|
await movePathToTrash(targetPath, {
|
|
58798
58856
|
platform: options.platform ?? process12.platform,
|
|
@@ -58805,12 +58863,12 @@ var WorkspaceStore = class {
|
|
|
58805
58863
|
}
|
|
58806
58864
|
async createProject(project) {
|
|
58807
58865
|
const projectDirectory = this.getProjectDirectory(project.id);
|
|
58808
|
-
await mkdir2(
|
|
58809
|
-
await mkdir2(
|
|
58866
|
+
await mkdir2(path13.join(projectDirectory, "workspace"), { recursive: true });
|
|
58867
|
+
await mkdir2(path13.join(projectDirectory, "conversations"), {
|
|
58810
58868
|
recursive: true
|
|
58811
58869
|
});
|
|
58812
58870
|
await writeFile2(
|
|
58813
|
-
|
|
58871
|
+
path13.join(projectDirectory, "project.json"),
|
|
58814
58872
|
JSON.stringify(project, null, 2),
|
|
58815
58873
|
"utf8"
|
|
58816
58874
|
);
|
|
@@ -58823,7 +58881,7 @@ var WorkspaceStore = class {
|
|
|
58823
58881
|
const projects = await Promise.all(
|
|
58824
58882
|
projectEntries.filter((entry) => entry.isDirectory()).map(async (entry) => {
|
|
58825
58883
|
const projectJson = await readFile4(
|
|
58826
|
-
|
|
58884
|
+
path13.join(projectsRoot, entry.name, "project.json"),
|
|
58827
58885
|
"utf8"
|
|
58828
58886
|
);
|
|
58829
58887
|
return normalizeProjectRecord(JSON.parse(projectJson));
|
|
@@ -58841,14 +58899,14 @@ var WorkspaceStore = class {
|
|
|
58841
58899
|
}
|
|
58842
58900
|
async getProject(projectId) {
|
|
58843
58901
|
const projectJson = await readFile4(
|
|
58844
|
-
|
|
58902
|
+
path13.join(this.getProjectDirectory(projectId), "project.json"),
|
|
58845
58903
|
"utf8"
|
|
58846
58904
|
);
|
|
58847
58905
|
return normalizeProjectRecord(JSON.parse(projectJson));
|
|
58848
58906
|
}
|
|
58849
58907
|
async updateProject(projectId, project) {
|
|
58850
58908
|
await writeFile2(
|
|
58851
|
-
|
|
58909
|
+
path13.join(this.getProjectDirectory(projectId), "project.json"),
|
|
58852
58910
|
JSON.stringify(project, null, 2),
|
|
58853
58911
|
"utf8"
|
|
58854
58912
|
);
|
|
@@ -58874,7 +58932,7 @@ var WorkspaceStore = class {
|
|
|
58874
58932
|
const conversations = await Promise.all(
|
|
58875
58933
|
conversationEntries.filter((entry) => entry.isFile() && entry.name.endsWith(".json")).map(async (entry) => {
|
|
58876
58934
|
const conversationJson = await readFile4(
|
|
58877
|
-
|
|
58935
|
+
path13.join(conversationsDirectory, entry.name),
|
|
58878
58936
|
"utf8"
|
|
58879
58937
|
);
|
|
58880
58938
|
return JSON.parse(conversationJson);
|
|
@@ -58914,14 +58972,14 @@ var WorkspaceStore = class {
|
|
|
58914
58972
|
files: ["index.html"]
|
|
58915
58973
|
};
|
|
58916
58974
|
const checkpointDirectory = this.getCheckpointDirectory(input.projectId, input.id);
|
|
58917
|
-
const filesDirectory =
|
|
58975
|
+
const filesDirectory = path13.join(checkpointDirectory, "files");
|
|
58918
58976
|
const sourceFilePath = await this.resolveProjectWorkspacePath(input.projectId, "index.html", {
|
|
58919
58977
|
checkTargetSymlink: true
|
|
58920
58978
|
});
|
|
58921
58979
|
await mkdir2(filesDirectory, { recursive: true });
|
|
58922
|
-
await copyFile(sourceFilePath,
|
|
58980
|
+
await copyFile(sourceFilePath, path13.join(filesDirectory, "index.html"));
|
|
58923
58981
|
await writeFile2(
|
|
58924
|
-
|
|
58982
|
+
path13.join(checkpointDirectory, "meta.json"),
|
|
58925
58983
|
`${JSON.stringify(record2, null, 2)}
|
|
58926
58984
|
`,
|
|
58927
58985
|
"utf8"
|
|
@@ -58948,7 +59006,7 @@ var WorkspaceStore = class {
|
|
|
58948
59006
|
async readCheckpoint(projectId, checkpointId) {
|
|
58949
59007
|
assertSafeCheckpointId(checkpointId);
|
|
58950
59008
|
const checkpointJson = await readFile4(
|
|
58951
|
-
|
|
59009
|
+
path13.join(this.getCheckpointDirectory(projectId, checkpointId), "meta.json"),
|
|
58952
59010
|
"utf8"
|
|
58953
59011
|
);
|
|
58954
59012
|
const checkpoint = JSON.parse(checkpointJson);
|
|
@@ -58961,19 +59019,19 @@ var WorkspaceStore = class {
|
|
|
58961
59019
|
const checkpoint = await this.readCheckpoint(projectId, checkpointId);
|
|
58962
59020
|
const checkpointDirectory = this.getCheckpointDirectory(projectId, checkpointId);
|
|
58963
59021
|
for (const file2 of checkpoint.files) {
|
|
58964
|
-
const sourcePath =
|
|
59022
|
+
const sourcePath = path13.join(checkpointDirectory, "files", file2);
|
|
58965
59023
|
const targetPath = await this.resolveProjectWorkspacePath(projectId, file2, {
|
|
58966
59024
|
checkTargetSymlink: true,
|
|
58967
59025
|
targetMayBeMissing: true
|
|
58968
59026
|
});
|
|
58969
|
-
await mkdir2(
|
|
59027
|
+
await mkdir2(path13.dirname(targetPath), { recursive: true });
|
|
58970
59028
|
await copyFile(sourcePath, targetPath);
|
|
58971
59029
|
}
|
|
58972
59030
|
return checkpoint;
|
|
58973
59031
|
}
|
|
58974
59032
|
async writeProjectOutput(projectId, outputType, content) {
|
|
58975
59033
|
const outputPath = this.getProjectOutputFilePath(projectId, outputType);
|
|
58976
|
-
await mkdir2(
|
|
59034
|
+
await mkdir2(path13.dirname(outputPath), { recursive: true });
|
|
58977
59035
|
await writeFile2(outputPath, content, "utf8");
|
|
58978
59036
|
return outputPath;
|
|
58979
59037
|
}
|
|
@@ -58981,7 +59039,7 @@ var WorkspaceStore = class {
|
|
|
58981
59039
|
return readFile4(this.getProjectOutputFilePath(projectId, outputType), "utf8");
|
|
58982
59040
|
}
|
|
58983
59041
|
getProjectWorkspaceDirectory(projectId) {
|
|
58984
|
-
return
|
|
59042
|
+
return path13.join(this.getProjectDirectory(projectId), "workspace");
|
|
58985
59043
|
}
|
|
58986
59044
|
async listProjectWorkspace(projectId) {
|
|
58987
59045
|
const entries = [];
|
|
@@ -59006,7 +59064,7 @@ var WorkspaceStore = class {
|
|
|
59006
59064
|
const entries = await readdir(targetPath, { withFileTypes: true });
|
|
59007
59065
|
const visibleEntries = (await Promise.all(
|
|
59008
59066
|
entries.map(async (entry) => {
|
|
59009
|
-
const absolutePath =
|
|
59067
|
+
const absolutePath = path13.join(targetPath, entry.name);
|
|
59010
59068
|
const entryStats = await lstat(absolutePath);
|
|
59011
59069
|
if (entryStats.isSymbolicLink()) {
|
|
59012
59070
|
return void 0;
|
|
@@ -59015,7 +59073,7 @@ var WorkspaceStore = class {
|
|
|
59015
59073
|
return void 0;
|
|
59016
59074
|
}
|
|
59017
59075
|
return {
|
|
59018
|
-
path: normalizeWorkspaceRelativePath(
|
|
59076
|
+
path: normalizeWorkspaceRelativePath(path13.relative(rootPath, absolutePath)),
|
|
59019
59077
|
type: entryStats.isDirectory() ? "directory" : "file"
|
|
59020
59078
|
};
|
|
59021
59079
|
})
|
|
@@ -59093,8 +59151,8 @@ var WorkspaceStore = class {
|
|
|
59093
59151
|
const matcher = globToRegExp(pattern);
|
|
59094
59152
|
const matches = [];
|
|
59095
59153
|
await this.walkProjectWorkspace(projectId, startPath, async (entry) => {
|
|
59096
|
-
const pathFromStart = startPath ? normalizeWorkspaceRelativePath(
|
|
59097
|
-
if (matcher.test(pathFromStart) || matcher.test(
|
|
59154
|
+
const pathFromStart = startPath ? normalizeWorkspaceRelativePath(path13.relative(startPath, entry.path)) : entry.path;
|
|
59155
|
+
if (matcher.test(pathFromStart) || matcher.test(path13.basename(entry.path))) {
|
|
59098
59156
|
matches.push({
|
|
59099
59157
|
path: entry.path,
|
|
59100
59158
|
type: entry.type,
|
|
@@ -59135,9 +59193,9 @@ var WorkspaceStore = class {
|
|
|
59135
59193
|
const startStats = await stat3(absoluteStartPath);
|
|
59136
59194
|
const visitFile = async (absolutePath) => {
|
|
59137
59195
|
const relativeFilePath = normalizeWorkspaceRelativePath(
|
|
59138
|
-
|
|
59196
|
+
path13.relative(this.getProjectWorkspaceDirectory(projectId), absolutePath)
|
|
59139
59197
|
);
|
|
59140
|
-
if (includeMatcher && !includeMatcher.test(relativeFilePath) && !includeMatcher.test(
|
|
59198
|
+
if (includeMatcher && !includeMatcher.test(relativeFilePath) && !includeMatcher.test(path13.basename(relativeFilePath))) {
|
|
59141
59199
|
return;
|
|
59142
59200
|
}
|
|
59143
59201
|
const fileStats = await stat3(absolutePath);
|
|
@@ -59205,7 +59263,7 @@ var WorkspaceStore = class {
|
|
|
59205
59263
|
await rm(change.absolutePath, { force: false, recursive: true });
|
|
59206
59264
|
continue;
|
|
59207
59265
|
}
|
|
59208
|
-
await mkdir2(
|
|
59266
|
+
await mkdir2(path13.dirname(change.absolutePath), { recursive: true });
|
|
59209
59267
|
await writeFile2(change.absolutePath, change.content ?? "", "utf8");
|
|
59210
59268
|
}
|
|
59211
59269
|
const results = prepared.map((change) => ({
|
|
@@ -59275,7 +59333,7 @@ var WorkspaceStore = class {
|
|
|
59275
59333
|
targetMayBeMissing: true
|
|
59276
59334
|
});
|
|
59277
59335
|
const previousContent = await readTextFileIfExists(filePath);
|
|
59278
|
-
await mkdir2(
|
|
59336
|
+
await mkdir2(path13.dirname(filePath), { recursive: true });
|
|
59279
59337
|
await writeFile2(filePath, content, "utf8");
|
|
59280
59338
|
return {
|
|
59281
59339
|
bytesWritten: Buffer.byteLength(content, "utf8"),
|
|
@@ -59283,11 +59341,11 @@ var WorkspaceStore = class {
|
|
|
59283
59341
|
previousContent ?? "",
|
|
59284
59342
|
content,
|
|
59285
59343
|
normalizeWorkspaceRelativePath(
|
|
59286
|
-
|
|
59344
|
+
path13.relative(this.getProjectWorkspaceDirectory(projectId), filePath)
|
|
59287
59345
|
)
|
|
59288
59346
|
),
|
|
59289
59347
|
path: normalizeWorkspaceRelativePath(
|
|
59290
|
-
|
|
59348
|
+
path13.relative(this.getProjectWorkspaceDirectory(projectId), filePath)
|
|
59291
59349
|
)
|
|
59292
59350
|
};
|
|
59293
59351
|
}
|
|
@@ -59330,25 +59388,25 @@ var WorkspaceStore = class {
|
|
|
59330
59388
|
await this.moveToTrash(this.getProjectDirectory(projectId));
|
|
59331
59389
|
}
|
|
59332
59390
|
getProjectsRoot() {
|
|
59333
|
-
return
|
|
59391
|
+
return path13.join(this.workspaceRoot, "projects");
|
|
59334
59392
|
}
|
|
59335
59393
|
getProjectDirectory(projectId) {
|
|
59336
|
-
return
|
|
59394
|
+
return path13.join(this.getProjectsRoot(), projectId);
|
|
59337
59395
|
}
|
|
59338
59396
|
getConversationsDirectory(projectId) {
|
|
59339
|
-
return
|
|
59397
|
+
return path13.join(this.getProjectDirectory(projectId), "conversations");
|
|
59340
59398
|
}
|
|
59341
59399
|
getCheckpointsDirectory(projectId) {
|
|
59342
|
-
return
|
|
59400
|
+
return path13.join(this.getProjectDirectory(projectId), "checkpoints");
|
|
59343
59401
|
}
|
|
59344
59402
|
getCheckpointDirectory(projectId, checkpointId) {
|
|
59345
|
-
return
|
|
59403
|
+
return path13.join(this.getCheckpointsDirectory(projectId), checkpointId);
|
|
59346
59404
|
}
|
|
59347
59405
|
getProjectOutputFilePath(projectId, outputType) {
|
|
59348
|
-
return
|
|
59406
|
+
return path13.join(this.getProjectWorkspaceDirectory(projectId), `index.${outputType}`);
|
|
59349
59407
|
}
|
|
59350
59408
|
getConversationFilePath(projectId, conversationId) {
|
|
59351
|
-
return
|
|
59409
|
+
return path13.join(this.getConversationsDirectory(projectId), `${conversationId}.json`);
|
|
59352
59410
|
}
|
|
59353
59411
|
async walkProjectWorkspace(projectId, relativePath, visit2) {
|
|
59354
59412
|
const rootPath = this.getProjectWorkspaceDirectory(projectId);
|
|
@@ -59358,13 +59416,13 @@ var WorkspaceStore = class {
|
|
|
59358
59416
|
async function walk(absoluteDirectory) {
|
|
59359
59417
|
const dirEntries = await readdir(absoluteDirectory, { withFileTypes: true });
|
|
59360
59418
|
for (const dirEntry of dirEntries) {
|
|
59361
|
-
const absolutePath =
|
|
59419
|
+
const absolutePath = path13.join(absoluteDirectory, dirEntry.name);
|
|
59362
59420
|
const entryStats = await lstat(absolutePath);
|
|
59363
59421
|
if (entryStats.isSymbolicLink()) {
|
|
59364
59422
|
continue;
|
|
59365
59423
|
}
|
|
59366
59424
|
const relativeEntryPath = normalizeWorkspaceRelativePath(
|
|
59367
|
-
|
|
59425
|
+
path13.relative(rootPath, absolutePath)
|
|
59368
59426
|
);
|
|
59369
59427
|
if (entryStats.isDirectory()) {
|
|
59370
59428
|
await visit2(
|
|
@@ -59399,7 +59457,7 @@ var WorkspaceStore = class {
|
|
|
59399
59457
|
} else if (startStats.isFile()) {
|
|
59400
59458
|
await visit2(
|
|
59401
59459
|
{
|
|
59402
|
-
path: normalizeWorkspaceRelativePath(
|
|
59460
|
+
path: normalizeWorkspaceRelativePath(path13.relative(rootPath, startPath)),
|
|
59403
59461
|
size: startStats.size,
|
|
59404
59462
|
type: "file",
|
|
59405
59463
|
updatedAt: startStats.mtime.toISOString()
|
|
@@ -59410,7 +59468,7 @@ var WorkspaceStore = class {
|
|
|
59410
59468
|
}
|
|
59411
59469
|
async searchWorkspaceFile(projectId, absolutePath, query, matches, skippedFiles) {
|
|
59412
59470
|
const relativePath = normalizeWorkspaceRelativePath(
|
|
59413
|
-
|
|
59471
|
+
path13.relative(this.getProjectWorkspaceDirectory(projectId), absolutePath)
|
|
59414
59472
|
);
|
|
59415
59473
|
const fileStats = await stat3(absolutePath);
|
|
59416
59474
|
if (fileStats.size > MAX_TEXT_FILE_BYTES) {
|
|
@@ -59525,24 +59583,24 @@ var WorkspaceStore = class {
|
|
|
59525
59583
|
if (!relativePath.trim()) {
|
|
59526
59584
|
throw new Error("Project Workspace path must not be empty.");
|
|
59527
59585
|
}
|
|
59528
|
-
if (
|
|
59586
|
+
if (path13.isAbsolute(relativePath)) {
|
|
59529
59587
|
throw new Error(`Project Workspace path must be relative: ${relativePath}`);
|
|
59530
59588
|
}
|
|
59531
59589
|
const workspaceDirectory = this.getProjectWorkspaceDirectory(projectId);
|
|
59532
|
-
const targetPath =
|
|
59533
|
-
const relativeFromWorkspace =
|
|
59534
|
-
if (!relativeFromWorkspace || relativeFromWorkspace.startsWith("..") ||
|
|
59590
|
+
const targetPath = path13.resolve(workspaceDirectory, relativePath);
|
|
59591
|
+
const relativeFromWorkspace = path13.relative(workspaceDirectory, targetPath);
|
|
59592
|
+
if (!relativeFromWorkspace || relativeFromWorkspace.startsWith("..") || path13.isAbsolute(relativeFromWorkspace)) {
|
|
59535
59593
|
throw new Error(`Project Workspace path escapes workspace: ${relativePath}`);
|
|
59536
59594
|
}
|
|
59537
59595
|
await this.assertNoWorkspaceSymlinkPath(workspaceDirectory, relativeFromWorkspace, options);
|
|
59538
59596
|
return targetPath;
|
|
59539
59597
|
}
|
|
59540
59598
|
async assertNoWorkspaceSymlinkPath(workspaceDirectory, relativeFromWorkspace, options) {
|
|
59541
|
-
const segments = relativeFromWorkspace.split(
|
|
59599
|
+
const segments = relativeFromWorkspace.split(path13.sep).filter((segment) => segment && segment !== ".");
|
|
59542
59600
|
const lastIndex = segments.length - 1;
|
|
59543
59601
|
let currentPath = workspaceDirectory;
|
|
59544
59602
|
for (const [index, segment] of segments.entries()) {
|
|
59545
|
-
currentPath =
|
|
59603
|
+
currentPath = path13.join(currentPath, segment);
|
|
59546
59604
|
try {
|
|
59547
59605
|
const pathStats = await lstat(currentPath);
|
|
59548
59606
|
const isTarget = index === lastIndex;
|
|
@@ -59561,6 +59619,7 @@ var WorkspaceStore = class {
|
|
|
59561
59619
|
function normalizeProjectRecord(project) {
|
|
59562
59620
|
return {
|
|
59563
59621
|
...project,
|
|
59622
|
+
designDocument: typeof project.designDocument === "string" ? project.designDocument : void 0,
|
|
59564
59623
|
projectType: project.projectType ?? "single_html"
|
|
59565
59624
|
};
|
|
59566
59625
|
}
|
|
@@ -59686,9 +59745,9 @@ function getPathFromValue(value) {
|
|
|
59686
59745
|
if (!value || typeof value !== "object") {
|
|
59687
59746
|
return void 0;
|
|
59688
59747
|
}
|
|
59689
|
-
const
|
|
59690
|
-
if (typeof
|
|
59691
|
-
return
|
|
59748
|
+
const path16 = "path" in value ? value.path : "targetPath" in value ? value.targetPath : void 0;
|
|
59749
|
+
if (typeof path16 === "string" && path16.length > 0) {
|
|
59750
|
+
return path16;
|
|
59692
59751
|
}
|
|
59693
59752
|
const nestedOutput = "output" in value ? value.output : void 0;
|
|
59694
59753
|
if (nestedOutput && typeof nestedOutput === "object") {
|
|
@@ -59701,13 +59760,13 @@ function getSanitizedToolOutput(value) {
|
|
|
59701
59760
|
return void 0;
|
|
59702
59761
|
}
|
|
59703
59762
|
const ok = "ok" in value && typeof value.ok === "boolean" ? value.ok : void 0;
|
|
59704
|
-
const
|
|
59705
|
-
if (ok === void 0 && !
|
|
59763
|
+
const path16 = getPathFromValue(value);
|
|
59764
|
+
if (ok === void 0 && !path16) {
|
|
59706
59765
|
return void 0;
|
|
59707
59766
|
}
|
|
59708
59767
|
return {
|
|
59709
59768
|
...ok !== void 0 ? { ok } : {},
|
|
59710
|
-
...
|
|
59769
|
+
...path16 ? { path: path16 } : {}
|
|
59711
59770
|
};
|
|
59712
59771
|
}
|
|
59713
59772
|
|
|
@@ -60173,6 +60232,7 @@ function createOwnDesignApp(options = {}) {
|
|
|
60173
60232
|
defaultConversationTitle: getDefaultConversationTitle(settings.interfaceLanguage),
|
|
60174
60233
|
name: trimmedName,
|
|
60175
60234
|
description: asNonEmptyString(body.description),
|
|
60235
|
+
designDocument: asDesignDocument(body.designDocument),
|
|
60176
60236
|
projectType
|
|
60177
60237
|
});
|
|
60178
60238
|
return context2.json({
|
|
@@ -60191,7 +60251,8 @@ function createOwnDesignApp(options = {}) {
|
|
|
60191
60251
|
}
|
|
60192
60252
|
await createProjectService(options).renameProject(projectId, {
|
|
60193
60253
|
name: trimmedName,
|
|
60194
|
-
description: asNonEmptyString(body.description)
|
|
60254
|
+
description: asNonEmptyString(body.description),
|
|
60255
|
+
designDocument: asDesignDocument(body.designDocument)
|
|
60195
60256
|
});
|
|
60196
60257
|
return context2.json({});
|
|
60197
60258
|
});
|
|
@@ -60312,7 +60373,10 @@ function createOwnDesignApp(options = {}) {
|
|
|
60312
60373
|
if (!conversation.agentInstructions) {
|
|
60313
60374
|
conversation = await workspaceStore.updateConversation(projectId, conversationId, {
|
|
60314
60375
|
...conversation,
|
|
60315
|
-
agentInstructions: buildDesignPageConversationInstructions(
|
|
60376
|
+
agentInstructions: buildDesignPageConversationInstructions(
|
|
60377
|
+
agentContext.resources,
|
|
60378
|
+
project.designDocument
|
|
60379
|
+
),
|
|
60316
60380
|
agentPromptVersion: DESIGN_PAGE_AGENT_PROMPT_VERSION
|
|
60317
60381
|
});
|
|
60318
60382
|
}
|
|
@@ -60592,7 +60656,7 @@ function resolveStaticIndexPath(staticRoot2) {
|
|
|
60592
60656
|
}
|
|
60593
60657
|
try {
|
|
60594
60658
|
const rootStats = statSync2(staticRoot2);
|
|
60595
|
-
const indexPath =
|
|
60659
|
+
const indexPath = path14.join(staticRoot2, "index.html");
|
|
60596
60660
|
const indexStats = statSync2(indexPath);
|
|
60597
60661
|
if (!rootStats.isDirectory() || !indexStats.isFile()) {
|
|
60598
60662
|
return void 0;
|
|
@@ -60609,7 +60673,7 @@ function shouldServeSpaIndex(request, requestPath) {
|
|
|
60609
60673
|
if (request.method !== "GET" && request.method !== "HEAD") {
|
|
60610
60674
|
return false;
|
|
60611
60675
|
}
|
|
60612
|
-
if (
|
|
60676
|
+
if (path14.extname(requestPath)) {
|
|
60613
60677
|
return false;
|
|
60614
60678
|
}
|
|
60615
60679
|
const accept = request.headers.get("Accept");
|
|
@@ -60638,8 +60702,8 @@ async function downloadWorkspaceZip(workspaceStore, projectId) {
|
|
|
60638
60702
|
let tempDirectory;
|
|
60639
60703
|
try {
|
|
60640
60704
|
const project = await workspaceStore.getProject(projectId);
|
|
60641
|
-
tempDirectory = await mkdtemp(
|
|
60642
|
-
const zipPath =
|
|
60705
|
+
tempDirectory = await mkdtemp(path14.join(os6.tmpdir(), "owndesign-project-download-"));
|
|
60706
|
+
const zipPath = path14.join(tempDirectory, "workspace.zip");
|
|
60643
60707
|
await writeWorkspaceZip(workspaceStore, projectId, zipPath);
|
|
60644
60708
|
const [zipStats, zipBuffer] = await Promise.all([stat4(zipPath), readFile5(zipPath)]);
|
|
60645
60709
|
await rm2(tempDirectory, { force: true, recursive: true });
|
|
@@ -60767,7 +60831,7 @@ function sanitizeDownloadFilename(value) {
|
|
|
60767
60831
|
return value?.replace(/[<>:"/\\|?*\u0000-\u001F]/g, "-").replace(/[.\s]+$/g, "").trim();
|
|
60768
60832
|
}
|
|
60769
60833
|
function createAsciiFilenameFallback(filename) {
|
|
60770
|
-
const extension =
|
|
60834
|
+
const extension = path14.extname(filename);
|
|
60771
60835
|
const basename = extension ? filename.slice(0, -extension.length) : filename;
|
|
60772
60836
|
const safeBasename = basename.normalize("NFKD").replace(/[^\x20-\x7E]/g, "-").replace(/["\\]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^[.-]+|[.-]+$/g, "");
|
|
60773
60837
|
const safeExtension = extension.replace(/[^\x20-\x7E]/g, "");
|
|
@@ -60831,6 +60895,12 @@ function isRecord2(value) {
|
|
|
60831
60895
|
function asNonEmptyString(value) {
|
|
60832
60896
|
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
60833
60897
|
}
|
|
60898
|
+
function asDesignDocument(value) {
|
|
60899
|
+
if (typeof value === "string") {
|
|
60900
|
+
return value;
|
|
60901
|
+
}
|
|
60902
|
+
return value === null ? null : void 0;
|
|
60903
|
+
}
|
|
60834
60904
|
function hasPreviewPath(value) {
|
|
60835
60905
|
return isRecord2(value) && Object.hasOwn(value, "previewPath");
|
|
60836
60906
|
}
|
|
@@ -60896,7 +60966,7 @@ var DEFAULT_HOST = "127.0.0.1";
|
|
|
60896
60966
|
var DEFAULT_PORT = 3711;
|
|
60897
60967
|
var host = process.env.OWNDESIGN_SERVER_HOST ?? DEFAULT_HOST;
|
|
60898
60968
|
var port = parsePort(process.env.OWNDESIGN_SERVER_PORT ?? String(DEFAULT_PORT));
|
|
60899
|
-
var staticRoot = process.env.OWNDESIGN_WEB_ROOT ??
|
|
60969
|
+
var staticRoot = process.env.OWNDESIGN_WEB_ROOT ?? path15.resolve(process.cwd(), "web");
|
|
60900
60970
|
var app = createOwnDesignApp({
|
|
60901
60971
|
staticRoot
|
|
60902
60972
|
});
|