@rashidee/co2 1.3.6 → 1.3.8
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/.co2-dat/app.db +0 -0
- package/dist/.co2-dat/app.db-shm +0 -0
- package/dist/.co2-dat/app.db-wal +0 -0
- package/dist/index.js +167 -68
- package/package.json +41 -41
- package/plugin/skills/conductor-feature-develop/SKILL.md +1384 -1383
- package/plugin/skills/conductor-feature-develop/references/playwright-setup.md +225 -224
- package/plugin/skills/mockgen-shadcn/SKILL.md +1073 -1067
- package/plugin/skills/mockgen-shadcn/references/admin-layout-template.md +5 -3
- package/plugin/skills/mockgen-shadcn/references/mockup-hub-template.md +631 -498
- package/plugin/skills/mockgen-shadcn/references/mockup-index-template.md +2 -2
- package/plugin/skills/mockgen-tailwind/SKILL.md +913 -904
- package/plugin/skills/mockgen-tailwind/references/admin-layout-template.md +722 -720
- package/plugin/skills/mockgen-tailwind/references/mockup-hub-template.md +631 -498
- package/plugin/skills/mockgen-tailwind/references/mockup-index-template.md +190 -190
- package/static/assets/{abnfDiagram-VRR7QNED-CzKpxD9q.js → abnfDiagram-VRR7QNED-DP7zbvBZ.js} +1 -1
- package/static/assets/{arc-0jj0p8Qe.js → arc-Ckh0cqx_.js} +1 -1
- package/static/assets/{architectureDiagram-ZJ3FMSHR-DXUL6S5t.js → architectureDiagram-ZJ3FMSHR-EpVuCwzS.js} +1 -1
- package/static/assets/{blockDiagram-677ZJIJ3-BBjsQESd.js → blockDiagram-677ZJIJ3-DsgBkX_g.js} +1 -1
- package/static/assets/{c4Diagram-LMCZKHZV-CTsLC95S.js → c4Diagram-LMCZKHZV-CR04rrP-.js} +1 -1
- package/static/assets/channel-DfxyTZ0M.js +1 -0
- package/static/assets/{chunk-2Q5K7J3B-BpisBKYx.js → chunk-2Q5K7J3B-DeQC-sio.js} +1 -1
- package/static/assets/{chunk-32BRIVSS-DAfsr4ph.js → chunk-32BRIVSS-Qbam-XOV.js} +1 -1
- package/static/assets/{chunk-5VM5RSS4-Z3FtY-B6.js → chunk-5VM5RSS4-CH-IX0uh.js} +1 -1
- package/static/assets/{chunk-EX3LRPZG-FI9smQaN.js → chunk-EX3LRPZG-6gUCPZ6x.js} +1 -1
- package/static/assets/{chunk-JWPE2WC7-sOygQj_B.js → chunk-JWPE2WC7-DSNEXnbo.js} +1 -1
- package/static/assets/{chunk-MOJQB5TN-DCSpai7w.js → chunk-MOJQB5TN-BVmlLOXk.js} +1 -1
- package/static/assets/{chunk-RYQCIY6F-CchqtfnI.js → chunk-RYQCIY6F-2pIZN6PI.js} +1 -1
- package/static/assets/{chunk-V7JOEXUC-DaOzsfx7.js → chunk-V7JOEXUC-Dj8a39S7.js} +1 -1
- package/static/assets/{chunk-VR4S4FIN-DmxuoVTy.js → chunk-VR4S4FIN-D2kLoVlo.js} +1 -1
- package/static/assets/{chunk-XXDRQBXY-ChERxfri.js → chunk-XXDRQBXY-x3SQWIAg.js} +1 -1
- package/static/assets/classDiagram-OUVF2IWQ-DPLLyb_P.js +1 -0
- package/static/assets/classDiagram-v2-EOCWNBFH-DPLLyb_P.js +1 -0
- package/static/assets/{cose-bilkent-JH36ORCC-CO7_eF6b.js → cose-bilkent-JH36ORCC-ltgQwU4R.js} +1 -1
- package/static/assets/{cynefin-VYW2F7L2-CzQkWtdY.js → cynefin-VYW2F7L2-BwJnOy5O.js} +1 -1
- package/static/assets/{cynefinDiagram-TSTJHNR4-BN2o8rFa.js → cynefinDiagram-TSTJHNR4-Bi47Fvnv.js} +1 -1
- package/static/assets/{dagre-VKFMJZFB-GLjBE-Xs.js → dagre-VKFMJZFB-5_l7QdUh.js} +1 -1
- package/static/assets/{diagram-FQU43EPY-Cyv7saju.js → diagram-FQU43EPY-HKDyXOzo.js} +1 -1
- package/static/assets/{diagram-G47NLZAW-B9PmZJ3U.js → diagram-G47NLZAW-xHHInyx1.js} +1 -1
- package/static/assets/{diagram-NH7WQ7WH-ByKD8yJU.js → diagram-NH7WQ7WH-nftmRdjw.js} +1 -1
- package/static/assets/{diagram-OA4YK3LP-BvbW7fIS.js → diagram-OA4YK3LP-CX8gIXu7.js} +1 -1
- package/static/assets/{diagram-WEI45ONY-BgXZ9SJ8.js → diagram-WEI45ONY-BaT3ur6a.js} +1 -1
- package/static/assets/{ebnfDiagram-CCIWWBDH-CXEEJ26B.js → ebnfDiagram-CCIWWBDH-CM9hwJSh.js} +1 -1
- package/static/assets/{erDiagram-Q63AITRT-CcHs_S16.js → erDiagram-Q63AITRT-C9cK36a5.js} +1 -1
- package/static/assets/{flowDiagram-23GEKE2U-Cwg3I3GK.js → flowDiagram-23GEKE2U-BQw_JFaW.js} +1 -1
- package/static/assets/{ganttDiagram-NO4QXBWP-ky6w5Lvy.js → ganttDiagram-NO4QXBWP-Cgg9ZbM9.js} +1 -1
- package/static/assets/{gitGraphDiagram-IHSO6WYX-DN0eRQ7r.js → gitGraphDiagram-IHSO6WYX-SciNAnN3.js} +1 -1
- package/static/assets/{index-Cz5Fcq3G.css → index-CM4GfOLV.css} +1 -1
- package/static/assets/{index-CCC4-Ibh.js → index-HUEMwsDE.js} +167 -167
- package/static/assets/{infoDiagram-FWYZ7A6U-COojw6OC.js → infoDiagram-FWYZ7A6U-BPCKxKmJ.js} +1 -1
- package/static/assets/{ishikawaDiagram-FXEZZL3T-BR5w5ZqM.js → ishikawaDiagram-FXEZZL3T-C0eQKvpo.js} +1 -1
- package/static/assets/{journeyDiagram-5HDEW3XC-B5WtTEBM.js → journeyDiagram-5HDEW3XC-DgrJ90BU.js} +1 -1
- package/static/assets/{kanban-definition-HUTT4EX6-DnQ_zg4E.js → kanban-definition-HUTT4EX6-ISgFrxBl.js} +1 -1
- package/static/assets/{linear-C5kGzenz.js → linear-CaPqviiq.js} +1 -1
- package/static/assets/{mindmap-definition-LN4V7U3C-BMksxBso.js → mindmap-definition-LN4V7U3C-DTpJ3Okf.js} +1 -1
- package/static/assets/{pegDiagram-2B236MQR-BKrF97iU.js → pegDiagram-2B236MQR-D0EbYB8X.js} +1 -1
- package/static/assets/{pieDiagram-ENE6RG2P-DZAQkZwC.js → pieDiagram-ENE6RG2P-lAwviOjS.js} +1 -1
- package/static/assets/{quadrantDiagram-ABIIQ3AL-Dx0-5odM.js → quadrantDiagram-ABIIQ3AL-Dn8yVCWJ.js} +1 -1
- package/static/assets/{railroadDiagram-RFXS5EU6-BbY-CxL_.js → railroadDiagram-RFXS5EU6-BVLcNBsS.js} +1 -1
- package/static/assets/{requirementDiagram-TGXJPOKE-ItSYgvcN.js → requirementDiagram-TGXJPOKE-Bmjsh1uy.js} +1 -1
- package/static/assets/{sankeyDiagram-HTMAVEWB-CjIuRRYE.js → sankeyDiagram-HTMAVEWB-tdNqcgyd.js} +1 -1
- package/static/assets/{sequenceDiagram-DBY2YBRQ-B277PT2z.js → sequenceDiagram-DBY2YBRQ-ChtQkNW9.js} +1 -1
- package/static/assets/{sizeCapture-X5ZJPWSS-BYc46yWE.js → sizeCapture-X5ZJPWSS-BAnRJGV8.js} +1 -1
- package/static/assets/{stateDiagram-2N3HPSRC-Cq41gYoq.js → stateDiagram-2N3HPSRC-CI7wmYAe.js} +1 -1
- package/static/assets/stateDiagram-v2-6OUMAXLB-BJrR07NX.js +1 -0
- package/static/assets/{swimlanes-5IMT3BWC-DMxA2jQL.js → swimlanes-5IMT3BWC-k6NGsb3p.js} +2 -2
- package/static/assets/swimlanesDiagram-G3AALYLV-B0-5v6_-.js +8 -0
- package/static/assets/{timeline-definition-FHXFAJF6-CB8iORNI.js → timeline-definition-FHXFAJF6-CweEa8iU.js} +1 -1
- package/static/assets/{vennDiagram-L72KCM5P-CHwAX4cP.js → vennDiagram-L72KCM5P-DDPbV_sp.js} +1 -1
- package/static/assets/{wardleyDiagram-EHGQE667-DL19kD5s.js → wardleyDiagram-EHGQE667-IP4J8kqe.js} +1 -1
- package/static/assets/{xychartDiagram-FW5EYKEG-b271oXxd.js → xychartDiagram-FW5EYKEG-CMfWLoM8.js} +1 -1
- package/static/index.html +2 -2
- package/static/assets/channel-1MKDXK8w.js +0 -1
- package/static/assets/classDiagram-OUVF2IWQ-bADaUwoJ.js +0 -1
- package/static/assets/classDiagram-v2-EOCWNBFH-bADaUwoJ.js +0 -1
- package/static/assets/stateDiagram-v2-6OUMAXLB-B9V3_HpU.js +0 -1
- package/static/assets/swimlanesDiagram-G3AALYLV-qx8IX4cU.js +0 -8
package/dist/.co2-dat/app.db
CHANGED
|
Binary file
|
package/dist/.co2-dat/app.db-shm
CHANGED
|
Binary file
|
package/dist/.co2-dat/app.db-wal
CHANGED
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -6809,7 +6809,7 @@ var {
|
|
|
6809
6809
|
// package.json
|
|
6810
6810
|
var package_default = {
|
|
6811
6811
|
name: "@rashidee/co2",
|
|
6812
|
-
version: "1.3.
|
|
6812
|
+
version: "1.3.8",
|
|
6813
6813
|
description: "Compound Context Studio \u2014 self-hosted team context authoring for CO2 projects",
|
|
6814
6814
|
type: "module",
|
|
6815
6815
|
license: "MIT",
|
|
@@ -19258,8 +19258,13 @@ var mockupHubStatusSchema = external_exports.object({
|
|
|
19258
19258
|
// HTTP probe on the hub port succeeded
|
|
19259
19259
|
port: external_exports.number().int().nullable(),
|
|
19260
19260
|
// resolved port (null when hub absent)
|
|
19261
|
-
url: external_exports.string().nullable()
|
|
19261
|
+
url: external_exports.string().nullable(),
|
|
19262
19262
|
// client-facing URL (request host + hub port)
|
|
19263
|
+
// Prefill for the Mockup page's port input: the configured/running port when known,
|
|
19264
|
+
// else the first unused port starting from 4000.
|
|
19265
|
+
suggestedPort: external_exports.number().int(),
|
|
19266
|
+
// True while the hub process was spawned by (and is stoppable from) co2-cli itself.
|
|
19267
|
+
spawned: external_exports.boolean()
|
|
19263
19268
|
});
|
|
19264
19269
|
|
|
19265
19270
|
// ../core/src/schemas/notification.ts
|
|
@@ -19747,12 +19752,14 @@ var zValidator = (target, schema, hook) => (
|
|
|
19747
19752
|
|
|
19748
19753
|
// ../server/src/features/artifact/mockup-hub.ts
|
|
19749
19754
|
import { spawn } from "child_process";
|
|
19750
|
-
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
|
|
19755
|
+
import { existsSync as existsSync2, readFileSync as readFileSync2, writeFileSync } from "fs";
|
|
19751
19756
|
import { request as httpRequest } from "http";
|
|
19757
|
+
import { connect, createServer } from "net";
|
|
19752
19758
|
import { join as join2 } from "path";
|
|
19753
19759
|
function svcError(code, status) {
|
|
19754
19760
|
return Object.assign(new Error(code), { code, status });
|
|
19755
19761
|
}
|
|
19762
|
+
var HUB_PORT_SCAN_START = 4e3;
|
|
19756
19763
|
var spawnedHubs = /* @__PURE__ */ new Map();
|
|
19757
19764
|
function killSpawnedHubs() {
|
|
19758
19765
|
for (const [, child] of spawnedHubs) {
|
|
@@ -19775,14 +19782,14 @@ function resolveHub(db, workspacePath, projectId) {
|
|
|
19775
19782
|
const hubDir = [join2(projectDir2, "mockup"), join2(projectDir2, "source", "mockup")].find(
|
|
19776
19783
|
(d) => existsSync2(join2(d, "server.js"))
|
|
19777
19784
|
);
|
|
19778
|
-
if (!hubDir) return { hubDir: join2(projectDir2, "mockup"), present: false,
|
|
19779
|
-
let
|
|
19785
|
+
if (!hubDir) return { hubDir: join2(projectDir2, "mockup"), present: false, configPort: null };
|
|
19786
|
+
let configPort = null;
|
|
19780
19787
|
try {
|
|
19781
19788
|
const config = JSON.parse(readFileSync2(join2(hubDir, "mockup.config.json"), "utf8"));
|
|
19782
|
-
if (typeof config.port === "number")
|
|
19789
|
+
if (typeof config.port === "number") configPort = config.port;
|
|
19783
19790
|
} catch {
|
|
19784
19791
|
}
|
|
19785
|
-
return { hubDir, present: true,
|
|
19792
|
+
return { hubDir, present: true, configPort };
|
|
19786
19793
|
}
|
|
19787
19794
|
function probeHub(port, timeoutMs = 1e3) {
|
|
19788
19795
|
return new Promise((resolve5) => {
|
|
@@ -19801,40 +19808,112 @@ function probeHub(port, timeoutMs = 1e3) {
|
|
|
19801
19808
|
req.end();
|
|
19802
19809
|
});
|
|
19803
19810
|
}
|
|
19804
|
-
function
|
|
19811
|
+
function tcpBusy(port, timeoutMs = 400) {
|
|
19812
|
+
return new Promise((resolve5) => {
|
|
19813
|
+
const sock = connect({ host: "127.0.0.1", port, timeout: timeoutMs });
|
|
19814
|
+
sock.once("connect", () => {
|
|
19815
|
+
sock.destroy();
|
|
19816
|
+
resolve5(true);
|
|
19817
|
+
});
|
|
19818
|
+
sock.once("timeout", () => {
|
|
19819
|
+
sock.destroy();
|
|
19820
|
+
resolve5(false);
|
|
19821
|
+
});
|
|
19822
|
+
sock.once("error", () => resolve5(false));
|
|
19823
|
+
});
|
|
19824
|
+
}
|
|
19825
|
+
async function isPortFree(port) {
|
|
19826
|
+
if (await tcpBusy(port)) return false;
|
|
19827
|
+
return new Promise((resolve5) => {
|
|
19828
|
+
const probe2 = createServer();
|
|
19829
|
+
probe2.once("error", () => resolve5(false));
|
|
19830
|
+
probe2.listen(port, "0.0.0.0", () => {
|
|
19831
|
+
probe2.close(() => resolve5(true));
|
|
19832
|
+
});
|
|
19833
|
+
});
|
|
19834
|
+
}
|
|
19835
|
+
async function findUnusedPort(start = HUB_PORT_SCAN_START) {
|
|
19836
|
+
for (let port = start; port < start + 100; port++) {
|
|
19837
|
+
if (await isPortFree(port)) return port;
|
|
19838
|
+
}
|
|
19839
|
+
return start;
|
|
19840
|
+
}
|
|
19841
|
+
async function detectHub(location) {
|
|
19842
|
+
if (!location.present || !location.configPort) {
|
|
19843
|
+
return { location, running: false, activePort: null };
|
|
19844
|
+
}
|
|
19845
|
+
const running = await probeHub(location.configPort);
|
|
19846
|
+
return { location, running, activePort: location.configPort };
|
|
19847
|
+
}
|
|
19848
|
+
async function toStatus(state, requestHost, projectId) {
|
|
19805
19849
|
const hostname = requestHost.replace(/:\d+$/, "") || "localhost";
|
|
19850
|
+
const { location, running, activePort } = state;
|
|
19851
|
+
const suggestedPort = activePort ?? await findUnusedPort();
|
|
19852
|
+
const child = spawnedHubs.get(projectId);
|
|
19806
19853
|
return {
|
|
19807
19854
|
present: location.present,
|
|
19808
19855
|
running,
|
|
19809
|
-
port: location.present ?
|
|
19810
|
-
url: location.present ? `http://${hostname}:${
|
|
19856
|
+
port: location.present ? activePort : null,
|
|
19857
|
+
url: location.present && activePort ? `http://${hostname}:${activePort}/` : null,
|
|
19858
|
+
suggestedPort,
|
|
19859
|
+
spawned: running && child != null && child.exitCode === null
|
|
19811
19860
|
};
|
|
19812
19861
|
}
|
|
19813
19862
|
async function getMockupHubStatus(db, workspacePath, projectId, requestHost) {
|
|
19814
19863
|
const location = resolveHub(db, workspacePath, projectId);
|
|
19815
|
-
|
|
19816
|
-
return toStatus(location, running, requestHost);
|
|
19864
|
+
return toStatus(await detectHub(location), requestHost, projectId);
|
|
19817
19865
|
}
|
|
19818
|
-
async function startMockupHub(db, workspacePath, projectId, requestHost) {
|
|
19866
|
+
async function startMockupHub(db, workspacePath, projectId, requestHost, port) {
|
|
19819
19867
|
const location = resolveHub(db, workspacePath, projectId);
|
|
19820
19868
|
if (!location.present) throw svcError("MOCKUP_HUB_MISSING", 404);
|
|
19821
|
-
|
|
19869
|
+
const targetPort = port ?? location.configPort ?? await findUnusedPort();
|
|
19870
|
+
if (await probeHub(targetPort)) {
|
|
19871
|
+
return toStatus({ location, running: true, activePort: targetPort }, requestHost, projectId);
|
|
19872
|
+
}
|
|
19873
|
+
if (targetPort !== location.configPort) {
|
|
19874
|
+
try {
|
|
19875
|
+
writeFileSync(
|
|
19876
|
+
join2(location.hubDir, "mockup.config.json"),
|
|
19877
|
+
`${JSON.stringify({ port: targetPort }, null, 2)}
|
|
19878
|
+
`
|
|
19879
|
+
);
|
|
19880
|
+
location.configPort = targetPort;
|
|
19881
|
+
} catch {
|
|
19882
|
+
}
|
|
19883
|
+
}
|
|
19822
19884
|
const existing = spawnedHubs.get(projectId);
|
|
19823
|
-
if (
|
|
19824
|
-
|
|
19825
|
-
|
|
19826
|
-
|
|
19827
|
-
|
|
19828
|
-
|
|
19829
|
-
child.on("error", () => spawnedHubs.delete(projectId));
|
|
19830
|
-
child.on("exit", () => spawnedHubs.delete(projectId));
|
|
19831
|
-
spawnedHubs.set(projectId, child);
|
|
19885
|
+
if (existing && existing.exitCode === null) {
|
|
19886
|
+
try {
|
|
19887
|
+
existing.kill();
|
|
19888
|
+
} catch {
|
|
19889
|
+
}
|
|
19890
|
+
spawnedHubs.delete(projectId);
|
|
19832
19891
|
}
|
|
19892
|
+
const child = spawn(process.execPath, ["server.js"], {
|
|
19893
|
+
cwd: location.hubDir,
|
|
19894
|
+
stdio: "ignore",
|
|
19895
|
+
env: { ...process.env, PORT: String(targetPort) }
|
|
19896
|
+
});
|
|
19897
|
+
child.on("error", () => spawnedHubs.delete(projectId));
|
|
19898
|
+
child.on("exit", () => spawnedHubs.delete(projectId));
|
|
19899
|
+
spawnedHubs.set(projectId, child);
|
|
19833
19900
|
for (let attempt = 0; attempt < 20; attempt++) {
|
|
19834
|
-
if (await probeHub(
|
|
19901
|
+
if (await probeHub(targetPort, 500)) {
|
|
19902
|
+
return toStatus({ location, running: true, activePort: targetPort }, requestHost, projectId);
|
|
19903
|
+
}
|
|
19835
19904
|
await new Promise((r) => setTimeout(r, 250));
|
|
19836
19905
|
}
|
|
19837
|
-
return toStatus(location, false, requestHost);
|
|
19906
|
+
return toStatus({ location, running: false, activePort: targetPort }, requestHost, projectId);
|
|
19907
|
+
}
|
|
19908
|
+
function stopMockupHub(projectId) {
|
|
19909
|
+
const child = spawnedHubs.get(projectId);
|
|
19910
|
+
if (!child) return false;
|
|
19911
|
+
try {
|
|
19912
|
+
child.kill();
|
|
19913
|
+
} catch {
|
|
19914
|
+
}
|
|
19915
|
+
spawnedHubs.delete(projectId);
|
|
19916
|
+
return true;
|
|
19838
19917
|
}
|
|
19839
19918
|
|
|
19840
19919
|
// ../server/src/features/artifact/service.ts
|
|
@@ -20089,19 +20168,39 @@ function artifactRoutes(db, workspacePath) {
|
|
|
20089
20168
|
return errorResponse(c, e);
|
|
20090
20169
|
}
|
|
20091
20170
|
});
|
|
20092
|
-
|
|
20171
|
+
const hubStartSchema = hubQuerySchema.extend({
|
|
20172
|
+
port: external_exports.coerce.number().int().min(1024).max(65535).optional()
|
|
20173
|
+
});
|
|
20174
|
+
app.post("/mockup-hub/start", zValidator("json", hubStartSchema), async (c) => {
|
|
20093
20175
|
try {
|
|
20176
|
+
const { projectId, port } = c.req.valid("json");
|
|
20094
20177
|
const status = await startMockupHub(
|
|
20095
20178
|
db,
|
|
20096
20179
|
workspacePath,
|
|
20097
|
-
|
|
20098
|
-
c.req.header("host") ?? "localhost"
|
|
20180
|
+
projectId,
|
|
20181
|
+
c.req.header("host") ?? "localhost",
|
|
20182
|
+
port
|
|
20099
20183
|
);
|
|
20100
20184
|
return c.json(status);
|
|
20101
20185
|
} catch (e) {
|
|
20102
20186
|
return errorResponse(c, e);
|
|
20103
20187
|
}
|
|
20104
20188
|
});
|
|
20189
|
+
app.post("/mockup-hub/stop", zValidator("json", hubQuerySchema), async (c) => {
|
|
20190
|
+
try {
|
|
20191
|
+
const { projectId } = c.req.valid("json");
|
|
20192
|
+
const host = c.req.header("host") ?? "localhost";
|
|
20193
|
+
const stopped = stopMockupHub(projectId);
|
|
20194
|
+
let status = await getMockupHubStatus(db, workspacePath, projectId, host);
|
|
20195
|
+
for (let attempt = 0; stopped && status.running && attempt < 8; attempt++) {
|
|
20196
|
+
await new Promise((r) => setTimeout(r, 250));
|
|
20197
|
+
status = await getMockupHubStatus(db, workspacePath, projectId, host);
|
|
20198
|
+
}
|
|
20199
|
+
return c.json({ stopped, status });
|
|
20200
|
+
} catch (e) {
|
|
20201
|
+
return errorResponse(c, e);
|
|
20202
|
+
}
|
|
20203
|
+
});
|
|
20105
20204
|
app.get("/:id/content", (c) => {
|
|
20106
20205
|
const id = Number(c.req.param("id"));
|
|
20107
20206
|
if (Number.isNaN(id)) return c.json({ code: "INVALID_ID" }, 400);
|
|
@@ -20116,7 +20215,7 @@ function artifactRoutes(db, workspacePath) {
|
|
|
20116
20215
|
}
|
|
20117
20216
|
|
|
20118
20217
|
// ../server/src/features/brainstorm/service.ts
|
|
20119
|
-
import { existsSync as existsSync7, mkdirSync as mkdirSync2, readFileSync as readFileSync5, writeFileSync as
|
|
20218
|
+
import { existsSync as existsSync7, mkdirSync as mkdirSync2, readFileSync as readFileSync5, writeFileSync as writeFileSync4 } from "fs";
|
|
20120
20219
|
import { join as join8 } from "path";
|
|
20121
20220
|
|
|
20122
20221
|
// ../server/src/features/notification/service.ts
|
|
@@ -20172,11 +20271,11 @@ function filterClause(userId, filter) {
|
|
|
20172
20271
|
import { join as join7 } from "path";
|
|
20173
20272
|
|
|
20174
20273
|
// ../server/src/features/context-authoring/prd-file.ts
|
|
20175
|
-
import { existsSync as existsSync5, readFileSync as readFileSync4, readdirSync as readdirSync2, writeFileSync as
|
|
20274
|
+
import { existsSync as existsSync5, readFileSync as readFileSync4, readdirSync as readdirSync2, writeFileSync as writeFileSync3 } from "fs";
|
|
20176
20275
|
import { join as join5 } from "path";
|
|
20177
20276
|
|
|
20178
20277
|
// ../server/src/features/context-authoring/service.ts
|
|
20179
|
-
import { existsSync as existsSync4, mkdirSync, writeFileSync } from "fs";
|
|
20278
|
+
import { existsSync as existsSync4, mkdirSync, writeFileSync as writeFileSync2 } from "fs";
|
|
20180
20279
|
import { join as join4 } from "path";
|
|
20181
20280
|
function svcError3(code, status) {
|
|
20182
20281
|
return Object.assign(new Error(code), { code, status });
|
|
@@ -20322,7 +20421,7 @@ Run in the Workspace Terminal:
|
|
|
20322
20421
|
|
|
20323
20422
|
/util-updprd "${description.trim().replace(/"/g, '\\"')}"
|
|
20324
20423
|
`;
|
|
20325
|
-
|
|
20424
|
+
writeFileSync2(abs, body, "utf-8");
|
|
20326
20425
|
const relative3 = join4(project.folder, "execution", "prd_updates", fileName).replace(/\\/g, "/");
|
|
20327
20426
|
return { markdownPath: relative3 };
|
|
20328
20427
|
}
|
|
@@ -20726,7 +20825,7 @@ function writeFacetToDisk(db, workspacePath, projectId, moduleId, prdVersionId,
|
|
|
20726
20825
|
...newBody,
|
|
20727
20826
|
""
|
|
20728
20827
|
);
|
|
20729
|
-
|
|
20828
|
+
writeFileSync3(target.prdPath, lines.join("\n"), "utf8");
|
|
20730
20829
|
return;
|
|
20731
20830
|
}
|
|
20732
20831
|
let facetStart = -1;
|
|
@@ -20746,7 +20845,7 @@ function writeFacetToDisk(db, workspacePath, projectId, moduleId, prdVersionId,
|
|
|
20746
20845
|
while (insertAt > moduleStart + 1 && (!lines[insertAt - 1].trim() || /^-{3,}$/.test(lines[insertAt - 1].trim())))
|
|
20747
20846
|
insertAt--;
|
|
20748
20847
|
lines.splice(insertAt, 0, "", `### ${FACET_HEADING[facet]}`, ...newBody);
|
|
20749
|
-
|
|
20848
|
+
writeFileSync3(target.prdPath, lines.join("\n"), "utf8");
|
|
20750
20849
|
return;
|
|
20751
20850
|
}
|
|
20752
20851
|
let end = facetEnd;
|
|
@@ -20796,7 +20895,7 @@ function writeFacetToDisk(db, workspacePath, projectId, moduleId, prdVersionId,
|
|
|
20796
20895
|
rebuilt.push(...blockLines);
|
|
20797
20896
|
}
|
|
20798
20897
|
lines.splice(facetStart, end - facetStart, ...rebuilt);
|
|
20799
|
-
|
|
20898
|
+
writeFileSync3(target.prdPath, lines.join("\n"), "utf8");
|
|
20800
20899
|
}
|
|
20801
20900
|
function resolveSectionPrdPath(db, workspacePath, projectId, applicationId) {
|
|
20802
20901
|
const project = db.select().from(projects).where(eq(projects.id, projectId)).limit(1).get();
|
|
@@ -20838,7 +20937,7 @@ function writeSectionToDisk(db, workspacePath, projectId, applicationId, section
|
|
|
20838
20937
|
while (end > sectionStart + 1 && (!lines[end - 1].trim() || /^-{3,}$/.test(lines[end - 1].trim())))
|
|
20839
20938
|
end--;
|
|
20840
20939
|
lines.splice(sectionStart, end - sectionStart, `# ${PRD_SECTION_HEADING[sectionType]}`, ...body);
|
|
20841
|
-
|
|
20940
|
+
writeFileSync3(prdPath, lines.join("\n"), "utf8");
|
|
20842
20941
|
return;
|
|
20843
20942
|
}
|
|
20844
20943
|
const laterSections = new Set(PRD_SECTION_ORDER.slice(PRD_SECTION_ORDER.indexOf(sectionType) + 1));
|
|
@@ -20859,7 +20958,7 @@ function writeSectionToDisk(db, workspacePath, projectId, applicationId, section
|
|
|
20859
20958
|
} else {
|
|
20860
20959
|
lines.splice(insertAt, 0, ...block, "", "---", "");
|
|
20861
20960
|
}
|
|
20862
|
-
|
|
20961
|
+
writeFileSync3(prdPath, lines.join("\n"), "utf8");
|
|
20863
20962
|
}
|
|
20864
20963
|
|
|
20865
20964
|
// ../server/src/features/workflow/git-service.ts
|
|
@@ -21444,7 +21543,7 @@ function createSession(db, workspacePath, projectId, userId, username, title) {
|
|
|
21444
21543
|
createdAt: nowIso,
|
|
21445
21544
|
updatedAt: nowIso
|
|
21446
21545
|
}).returning().get();
|
|
21447
|
-
|
|
21546
|
+
writeFileSync4(
|
|
21448
21547
|
sessionAbsPath(workspacePath, project.folder, brainstormFilePath),
|
|
21449
21548
|
template,
|
|
21450
21549
|
"utf-8"
|
|
@@ -21519,7 +21618,7 @@ function updateSession(db, workspacePath, projectId, sessionId, patch) {
|
|
|
21519
21618
|
if (patch.ideaMarkdown !== void 0 && session.brainstormFilePath) {
|
|
21520
21619
|
const abs = sessionAbsPath(workspacePath, project.folder, session.brainstormFilePath);
|
|
21521
21620
|
mkdirSync2(join8(abs, ".."), { recursive: true });
|
|
21522
|
-
|
|
21621
|
+
writeFileSync4(abs, patch.ideaMarkdown, "utf-8");
|
|
21523
21622
|
}
|
|
21524
21623
|
}
|
|
21525
21624
|
function addReference(db, workspacePath, projectId, sessionId, file) {
|
|
@@ -21532,7 +21631,7 @@ function addReference(db, workspacePath, projectId, sessionId, file) {
|
|
|
21532
21631
|
const safeName = safeSegment(file.name);
|
|
21533
21632
|
const storageRel = `${folderRel}/${safeName}`;
|
|
21534
21633
|
mkdirSync2(sessionAbsPath(workspacePath, project.folder, folderRel), { recursive: true });
|
|
21535
|
-
|
|
21634
|
+
writeFileSync4(sessionAbsPath(workspacePath, project.folder, storageRel), file.bytes);
|
|
21536
21635
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
21537
21636
|
const inserted = db.insert(brainstormReferences).values({
|
|
21538
21637
|
brainstormSessionId: session.id,
|
|
@@ -21799,7 +21898,7 @@ import { existsSync as existsSync10 } from "fs";
|
|
|
21799
21898
|
import { join as join11 } from "path";
|
|
21800
21899
|
|
|
21801
21900
|
// ../server/src/features/prd-wizard/service.ts
|
|
21802
|
-
import { existsSync as existsSync9, mkdirSync as mkdirSync3, statSync as statSync2, writeFileSync as
|
|
21901
|
+
import { existsSync as existsSync9, mkdirSync as mkdirSync3, statSync as statSync2, writeFileSync as writeFileSync5 } from "fs";
|
|
21803
21902
|
import { join as join10 } from "path";
|
|
21804
21903
|
function svcError7(code, status) {
|
|
21805
21904
|
return Object.assign(new Error(code), { code, status });
|
|
@@ -21877,7 +21976,7 @@ function generatePrdWizardMarkdown(db, workspacePath, requestId, targetModule) {
|
|
|
21877
21976
|
`execution/${filename}`,
|
|
21878
21977
|
targetModule
|
|
21879
21978
|
);
|
|
21880
|
-
|
|
21979
|
+
writeFileSync5(filePath, markdown, "utf8");
|
|
21881
21980
|
db.update(prdWizardRequests).set({
|
|
21882
21981
|
generatedMarkdownPath: filePath,
|
|
21883
21982
|
status: "generated",
|
|
@@ -22114,7 +22213,7 @@ function evaluateBuildGuard(db, workspacePath, projectId, versionId) {
|
|
|
22114
22213
|
}
|
|
22115
22214
|
|
|
22116
22215
|
// ../server/src/features/cicd/service.ts
|
|
22117
|
-
import { appendFileSync, existsSync as existsSync12, mkdirSync as mkdirSync4, statSync as statSync4, writeFileSync as
|
|
22216
|
+
import { appendFileSync, existsSync as existsSync12, mkdirSync as mkdirSync4, statSync as statSync4, writeFileSync as writeFileSync6 } from "fs";
|
|
22118
22217
|
import { join as join13 } from "path";
|
|
22119
22218
|
|
|
22120
22219
|
// ../server/src/features/batch-job/constants.ts
|
|
@@ -22257,7 +22356,7 @@ function requestPlan(db, workspacePath, projectId, userId) {
|
|
|
22257
22356
|
const filename = `cicd-plan-${setup.id}-${Date.now()}.md`;
|
|
22258
22357
|
const filePath = join13(executionDir, filename);
|
|
22259
22358
|
const relative3 = `execution/${filename}`;
|
|
22260
|
-
|
|
22359
|
+
writeFileSync6(
|
|
22261
22360
|
filePath,
|
|
22262
22361
|
buildPlanRequestMarkdown(
|
|
22263
22362
|
project.name,
|
|
@@ -22567,11 +22666,11 @@ function cicdGuardRoutes(db, workspacePath) {
|
|
|
22567
22666
|
}
|
|
22568
22667
|
|
|
22569
22668
|
// ../server/src/features/project/service.ts
|
|
22570
|
-
import { existsSync as existsSync14, mkdirSync as mkdirSync6, readFileSync as readFileSync9, writeFileSync as
|
|
22669
|
+
import { existsSync as existsSync14, mkdirSync as mkdirSync6, readFileSync as readFileSync9, writeFileSync as writeFileSync8 } from "fs";
|
|
22571
22670
|
import { join as join16 } from "path";
|
|
22572
22671
|
|
|
22573
22672
|
// ../server/src/features/project-config/service.ts
|
|
22574
|
-
import { mkdirSync as mkdirSync5, writeFileSync as
|
|
22673
|
+
import { mkdirSync as mkdirSync5, writeFileSync as writeFileSync7 } from "fs";
|
|
22575
22674
|
import { join as join15 } from "path";
|
|
22576
22675
|
function svcError9(code, status) {
|
|
22577
22676
|
return Object.assign(new Error(code), { code, status });
|
|
@@ -22595,7 +22694,7 @@ function resolveImportedByName(db, importedBy) {
|
|
|
22595
22694
|
function writeProjectFile(workspacePath, folder, fileName, content) {
|
|
22596
22695
|
const dir = join15(workspacePath, folder);
|
|
22597
22696
|
mkdirSync5(dir, { recursive: true });
|
|
22598
|
-
|
|
22697
|
+
writeFileSync7(join15(dir, fileName), content, "utf8");
|
|
22599
22698
|
}
|
|
22600
22699
|
function toDto5(db, row, field) {
|
|
22601
22700
|
return {
|
|
@@ -22741,8 +22840,8 @@ function scaffoldProjectFolder(workspacePath, folderName, name, baseIdea) {
|
|
|
22741
22840
|
"# Feedback",
|
|
22742
22841
|
"<!-- Human answers appear here -->"
|
|
22743
22842
|
].join("\n");
|
|
22744
|
-
|
|
22745
|
-
|
|
22843
|
+
writeFileSync8(join16(projectDir2, `${folderName}.brainstorm.md`), template, "utf8");
|
|
22844
|
+
writeFileSync8(
|
|
22746
22845
|
join16(projectDir2, "context", "references", "brainstorm-protocol.md"),
|
|
22747
22846
|
"# Brainstorm Protocol\n\n[Installed by the co2 plugin]\n",
|
|
22748
22847
|
"utf8"
|
|
@@ -22780,7 +22879,7 @@ function updateBrainstormMd(db, workspacePath, projectId, content) {
|
|
|
22780
22879
|
project.workspaceFolderName,
|
|
22781
22880
|
`${project.workspaceFolderName}.brainstorm.md`
|
|
22782
22881
|
);
|
|
22783
|
-
|
|
22882
|
+
writeFileSync8(filePath, content, "utf8");
|
|
22784
22883
|
}
|
|
22785
22884
|
function listProjects(db, archived) {
|
|
22786
22885
|
return db.select({
|
|
@@ -22903,7 +23002,7 @@ function regenerateCO2Files(db, workspacePath, projectId) {
|
|
|
22903
23002
|
const projectDir2 = join16(workspacePath, project.workspaceFolderName);
|
|
22904
23003
|
mkdirSync6(projectDir2, { recursive: true });
|
|
22905
23004
|
const apps = db.select().from(applications).where(and(eq(applications.projectId, projectId), eq(applications.isDeleted, 0))).all();
|
|
22906
|
-
|
|
23005
|
+
writeFileSync8(
|
|
22907
23006
|
join16(projectDir2, "CLAUDE.md"),
|
|
22908
23007
|
project.rawClaudeMd ?? buildClaudeMd(project.name, apps),
|
|
22909
23008
|
"utf8"
|
|
@@ -22920,7 +23019,7 @@ function regenerateCO2Files(db, workspacePath, projectId) {
|
|
|
22920
23019
|
const appRel = resolveAppFolderName(projectDir2, app.name);
|
|
22921
23020
|
const appDir = join16(projectDir2, appRel, "context");
|
|
22922
23021
|
mkdirSync6(appDir, { recursive: true });
|
|
22923
|
-
|
|
23022
|
+
writeFileSync8(
|
|
22924
23023
|
join16(appDir, "PRD.md"),
|
|
22925
23024
|
prdSnapshot[String(app.id)] ?? buildPrdMd(app.name, mods, loadPrdSections(db, app.id)),
|
|
22926
23025
|
"utf8"
|
|
@@ -23313,7 +23412,7 @@ function dashboardRoutes(db) {
|
|
|
23313
23412
|
}
|
|
23314
23413
|
|
|
23315
23414
|
// ../server/src/features/defect/service.ts
|
|
23316
|
-
import { existsSync as existsSync15, mkdirSync as mkdirSync7, readFileSync as readFileSync10, writeFileSync as
|
|
23415
|
+
import { existsSync as existsSync15, mkdirSync as mkdirSync7, readFileSync as readFileSync10, writeFileSync as writeFileSync9 } from "fs";
|
|
23317
23416
|
import { join as join17 } from "path";
|
|
23318
23417
|
|
|
23319
23418
|
// ../server/src/features/project-import/bug-md.ts
|
|
@@ -23745,7 +23844,7 @@ function writeBugMdFile(db, workspacePath, app, projectFolderName) {
|
|
|
23745
23844
|
const appRel = resolveAppFolderName(projectDir2, app.name);
|
|
23746
23845
|
const appContextDir = join17(projectDir2, appRel, "context");
|
|
23747
23846
|
mkdirSync7(appContextDir, { recursive: true });
|
|
23748
|
-
|
|
23847
|
+
writeFileSync9(join17(appContextDir, "BUG.md"), content, "utf8");
|
|
23749
23848
|
return { content, bugCount: bugs.length };
|
|
23750
23849
|
}
|
|
23751
23850
|
function syncBugStatusesFromMaster(db, trackingFilePath, applicationId) {
|
|
@@ -23789,7 +23888,7 @@ function syncBugMdToDisk(db, workspacePath, applicationId, bugId, mode = "replac
|
|
|
23789
23888
|
).all().find((m) => m.name.toLowerCase() === bug.module?.toLowerCase())?.category : void 0) ?? null;
|
|
23790
23889
|
const merged = mergeBugIntoBugMd(readFileSync10(file, "utf8"), bug, semver, category, mode);
|
|
23791
23890
|
if (merged !== null) {
|
|
23792
|
-
|
|
23891
|
+
writeFileSync9(file, merged, "utf8");
|
|
23793
23892
|
return;
|
|
23794
23893
|
}
|
|
23795
23894
|
}
|
|
@@ -23923,7 +24022,7 @@ function defectRoutes(db, workspacePath) {
|
|
|
23923
24022
|
}
|
|
23924
24023
|
|
|
23925
24024
|
// ../server/src/features/document/service.ts
|
|
23926
|
-
import { existsSync as existsSync16, mkdirSync as mkdirSync8, readFileSync as readFileSync11, writeFileSync as
|
|
24025
|
+
import { existsSync as existsSync16, mkdirSync as mkdirSync8, readFileSync as readFileSync11, writeFileSync as writeFileSync10 } from "fs";
|
|
23927
24026
|
import { join as join18 } from "path";
|
|
23928
24027
|
function svcError12(code, status) {
|
|
23929
24028
|
return Object.assign(new Error(code), { code, status });
|
|
@@ -23936,7 +24035,7 @@ function uploadDocument(db, dataDir, projectId, file) {
|
|
|
23936
24035
|
mkdirSync8(dir, { recursive: true });
|
|
23937
24036
|
const safeName = file.name.replace(/[^a-zA-Z0-9._-]/g, "_");
|
|
23938
24037
|
const stamped = `${Date.now()}_${safeName}`;
|
|
23939
|
-
|
|
24038
|
+
writeFileSync10(join18(dir, stamped), file.bytes);
|
|
23940
24039
|
const relativePath = `${projectId}/${stamped}`;
|
|
23941
24040
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
23942
24041
|
const inserted = db.insert(documents).values({
|
|
@@ -24023,7 +24122,7 @@ function documentRoutes(db, dataDir) {
|
|
|
24023
24122
|
|
|
24024
24123
|
// ../server/src/features/git/service.ts
|
|
24025
24124
|
import { execFileSync as execFileSync3 } from "child_process";
|
|
24026
|
-
import { existsSync as existsSync17, readFileSync as readFileSync12, rmSync, writeFileSync as
|
|
24125
|
+
import { existsSync as existsSync17, readFileSync as readFileSync12, rmSync, writeFileSync as writeFileSync11 } from "fs";
|
|
24027
24126
|
import { join as join19 } from "path";
|
|
24028
24127
|
var GitServiceError = class extends Error {
|
|
24029
24128
|
code;
|
|
@@ -24263,7 +24362,7 @@ function resolveConflict(db, workspacePath, projectId, input) {
|
|
|
24263
24362
|
if (input.content === void 0) {
|
|
24264
24363
|
throw new GitServiceError("CONTENT_REQUIRED", 400, "Manual resolution requires content");
|
|
24265
24364
|
}
|
|
24266
|
-
|
|
24365
|
+
writeFileSync11(join19(dir, input.path), input.content, "utf8");
|
|
24267
24366
|
} else {
|
|
24268
24367
|
git3(dir, ["checkout", `--${input.resolution}`, "--", input.path]);
|
|
24269
24368
|
}
|
|
@@ -24947,7 +25046,7 @@ function scanProject(db, workspacePath, folderName) {
|
|
|
24947
25046
|
import { join as join22, relative as relative2 } from "path";
|
|
24948
25047
|
|
|
24949
25048
|
// ../server/src/features/workflow/service.ts
|
|
24950
|
-
import { existsSync as existsSync19, mkdirSync as mkdirSync9, readFileSync as readFileSync14, writeFileSync as
|
|
25049
|
+
import { existsSync as existsSync19, mkdirSync as mkdirSync9, readFileSync as readFileSync14, writeFileSync as writeFileSync12 } from "fs";
|
|
24951
25050
|
import { join as join21, relative, resolve as resolve2, sep } from "path";
|
|
24952
25051
|
var ACTIVE_RUN_STATUSES = ["pending", "in_progress"];
|
|
24953
25052
|
function svcError14(code, status) {
|
|
@@ -25174,7 +25273,7 @@ function generateWorkflowMarkdown(db, workspacePath, input, creatingUser, watche
|
|
|
25174
25273
|
relPath
|
|
25175
25274
|
);
|
|
25176
25275
|
mkdirSync9(join21(projectDir2, "workflow", creatingUser.username), { recursive: true });
|
|
25177
|
-
|
|
25276
|
+
writeFileSync12(join21(projectDir2, relPath), content, "utf8");
|
|
25178
25277
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
25179
25278
|
const wfm = db.insert(workflowMarkdowns).values({
|
|
25180
25279
|
projectId: input.projectId,
|
|
@@ -26018,7 +26117,7 @@ function projectRoutes(db, workspacePath) {
|
|
|
26018
26117
|
}
|
|
26019
26118
|
|
|
26020
26119
|
// ../server/src/features/shared-context/service.ts
|
|
26021
|
-
import { existsSync as existsSync20, mkdirSync as mkdirSync10, readFileSync as readFileSync15, readdirSync as readdirSync4, statSync as statSync6, writeFileSync as
|
|
26120
|
+
import { existsSync as existsSync20, mkdirSync as mkdirSync10, readFileSync as readFileSync15, readdirSync as readdirSync4, statSync as statSync6, writeFileSync as writeFileSync13 } from "fs";
|
|
26022
26121
|
import { join as join23, resolve as resolve3, sep as sep2 } from "path";
|
|
26023
26122
|
function svcError16(code, status) {
|
|
26024
26123
|
return Object.assign(new Error(code), { code, status });
|
|
@@ -26109,7 +26208,7 @@ function uploadFile(db, workspacePath, projectId, folder, file) {
|
|
|
26109
26208
|
const dir = folder ? safeResolve(root, folder) : root;
|
|
26110
26209
|
if (folder && !existsSync20(dir)) throw svcError16("FOLDER_NOT_FOUND", 404);
|
|
26111
26210
|
const safeName = sanitizeSegment(file.name);
|
|
26112
|
-
|
|
26211
|
+
writeFileSync13(join23(dir, safeName), file.bytes);
|
|
26113
26212
|
return { path: folder ? `${folder}/${safeName}` : safeName };
|
|
26114
26213
|
}
|
|
26115
26214
|
function getFileContent(db, workspacePath, projectId, relPath) {
|
|
@@ -26124,7 +26223,7 @@ function saveMarkdown(db, workspacePath, projectId, relPath, content) {
|
|
|
26124
26223
|
const root = resolveSharedRoot(db, workspacePath, projectId);
|
|
26125
26224
|
const full = safeResolve(root, relPath);
|
|
26126
26225
|
if (!existsSync20(full) || !statSync6(full).isFile()) throw svcError16("NOT_FOUND", 404);
|
|
26127
|
-
|
|
26226
|
+
writeFileSync13(full, content, "utf8");
|
|
26128
26227
|
}
|
|
26129
26228
|
|
|
26130
26229
|
// ../server/src/features/shared-context/routes.ts
|
|
@@ -27114,7 +27213,7 @@ function workspaceRoutes(_db, config, port, host, workspacePath) {
|
|
|
27114
27213
|
}
|
|
27115
27214
|
|
|
27116
27215
|
// ../server/src/lib/config.ts
|
|
27117
|
-
import { existsSync as existsSync22, readFileSync as readFileSync17, writeFileSync as
|
|
27216
|
+
import { existsSync as existsSync22, readFileSync as readFileSync17, writeFileSync as writeFileSync14 } from "fs";
|
|
27118
27217
|
import { join as join25 } from "path";
|
|
27119
27218
|
var configSchema = external_exports.object({
|
|
27120
27219
|
port: external_exports.number().int().min(1).max(65535).optional(),
|
|
@@ -27132,7 +27231,7 @@ function loadConfig(dataDir) {
|
|
|
27132
27231
|
}
|
|
27133
27232
|
}
|
|
27134
27233
|
function saveConfig(dataDir, config) {
|
|
27135
|
-
|
|
27234
|
+
writeFileSync14(join25(dataDir, "config.json"), JSON.stringify(config, null, 2));
|
|
27136
27235
|
}
|
|
27137
27236
|
|
|
27138
27237
|
// ../server/src/lib/logger.ts
|
|
@@ -28151,8 +28250,8 @@ var createAdaptorServer = (options) => {
|
|
|
28151
28250
|
overrideGlobalObjects: options.overrideGlobalObjects,
|
|
28152
28251
|
autoCleanupIncoming: options.autoCleanupIncoming
|
|
28153
28252
|
});
|
|
28154
|
-
const
|
|
28155
|
-
const server =
|
|
28253
|
+
const createServer2 = options.createServer || createServerHTTP;
|
|
28254
|
+
const server = createServer2(options.serverOptions || {}, requestListener);
|
|
28156
28255
|
return server;
|
|
28157
28256
|
};
|
|
28158
28257
|
var serve = (options, listeningListener) => {
|
package/package.json
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@rashidee/co2",
|
|
3
|
-
"version": "1.3.
|
|
4
|
-
"description": "Compound Context Studio — self-hosted team context authoring for CO2 projects",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"publishConfig": {
|
|
8
|
-
"access": "public"
|
|
9
|
-
},
|
|
10
|
-
"engines": {
|
|
11
|
-
"node": ">=22"
|
|
12
|
-
},
|
|
13
|
-
"bin": {
|
|
14
|
-
"co2": "dist/index.js"
|
|
15
|
-
},
|
|
16
|
-
"files": [
|
|
17
|
-
"dist",
|
|
18
|
-
"static",
|
|
19
|
-
"drizzle",
|
|
20
|
-
"plugin"
|
|
21
|
-
],
|
|
22
|
-
"scripts": {
|
|
23
|
-
"build": "tsup && node ../../scripts/copy-migrations.mjs && node ../../scripts/copy-web.mjs && node ../../scripts/copy-plugin.mjs"
|
|
24
|
-
},
|
|
25
|
-
"dependencies": {
|
|
26
|
-
"better-sqlite3": "^12.2.0",
|
|
27
|
-
"node-pty": "^1.0.0"
|
|
28
|
-
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"@co2-cli/core": "workspace:*",
|
|
31
|
-
"@co2-cli/server": "workspace:*",
|
|
32
|
-
"@hono/node-server": "^1.13.0",
|
|
33
|
-
"@hono/zod-validator": "^0.4.1",
|
|
34
|
-
"commander": "^12.1.0",
|
|
35
|
-
"drizzle-orm": "^0.36.0",
|
|
36
|
-
"hono": "^4.6.0",
|
|
37
|
-
"picocolors": "^1.1.0",
|
|
38
|
-
"tsup": "^8.3.0",
|
|
39
|
-
"zod": "^3.23.8"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@rashidee/co2",
|
|
3
|
+
"version": "1.3.8",
|
|
4
|
+
"description": "Compound Context Studio — self-hosted team context authoring for CO2 projects",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=22"
|
|
12
|
+
},
|
|
13
|
+
"bin": {
|
|
14
|
+
"co2": "dist/index.js"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"static",
|
|
19
|
+
"drizzle",
|
|
20
|
+
"plugin"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsup && node ../../scripts/copy-migrations.mjs && node ../../scripts/copy-web.mjs && node ../../scripts/copy-plugin.mjs"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"better-sqlite3": "^12.2.0",
|
|
27
|
+
"node-pty": "^1.0.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@co2-cli/core": "workspace:*",
|
|
31
|
+
"@co2-cli/server": "workspace:*",
|
|
32
|
+
"@hono/node-server": "^1.13.0",
|
|
33
|
+
"@hono/zod-validator": "^0.4.1",
|
|
34
|
+
"commander": "^12.1.0",
|
|
35
|
+
"drizzle-orm": "^0.36.0",
|
|
36
|
+
"hono": "^4.6.0",
|
|
37
|
+
"picocolors": "^1.1.0",
|
|
38
|
+
"tsup": "^8.3.0",
|
|
39
|
+
"zod": "^3.23.8"
|
|
40
|
+
}
|
|
41
|
+
}
|