@xanots/sdk 0.0.11 → 0.0.12
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/CHANGELOG.md +16 -0
- package/README.md +11 -6
- package/dist/.build-fingerprint +1 -1
- package/dist/{agent-file-refresh-QNKN5RYD.js → agent-file-refresh-GQWAAOBV.js} +4 -4
- package/dist/bin.js +11 -11
- package/dist/{branch-commands-2BLOC2GR.js → branch-commands-5KMPAAZV.js} +7 -7
- package/dist/bundle.d.ts +2 -2
- package/dist/bundle.js +2 -2
- package/dist/{capture-4WVJY4DQ.js → capture-YLUVAITI.js} +2 -2
- package/dist/chunk-2VTJSI6X.js +192 -0
- package/dist/{chunk-5XZ744TS.js → chunk-2ZCUO2UG.js} +1 -1
- package/dist/{chunk-XEOX6AM7.js → chunk-3LQGF2WS.js} +2 -2
- package/dist/{chunk-WP4OZZV4.js → chunk-3VFCKHOB.js} +2 -2
- package/dist/{chunk-XHEXOES3.js → chunk-5YDINUAP.js} +1 -1
- package/dist/{chunk-LU7TRWMC.js → chunk-6VNRMKFJ.js} +2 -2
- package/dist/{chunk-CTD5ZCV6.js → chunk-7WRJPKGK.js} +2 -2
- package/dist/{chunk-3INK4Y4E.js → chunk-AE3PDSDS.js} +1 -1
- package/dist/{chunk-22TKBSDV.js → chunk-AG5GCZDD.js} +2 -2
- package/dist/{chunk-DBFU47BJ.js → chunk-AOFFKSJC.js} +2 -2
- package/dist/{chunk-TCFIPDB3.js → chunk-AVGDL6RB.js} +1 -1
- package/dist/{chunk-BC2C5GVI.js → chunk-DCMANKMX.js} +1 -1
- package/dist/{chunk-WHOJWOSV.js → chunk-EETVJZAZ.js} +1 -1
- package/dist/{chunk-4Q7ZOHH7.js → chunk-ELK7UALJ.js} +3 -3
- package/dist/{chunk-VNQM3V2C.js → chunk-EXENFOWE.js} +2 -2
- package/dist/{chunk-UOZMSF4C.js → chunk-GSP2BY4F.js} +5 -5
- package/dist/{chunk-AIZKXUNP.js → chunk-IMLYGQK6.js} +2 -2
- package/dist/{chunk-QK7ZQJLP.js → chunk-N74KDCBD.js} +39 -25
- package/dist/{chunk-3IGNIP6R.js → chunk-NDP7OUPS.js} +1 -1
- package/dist/{chunk-EQW3YT5U.js → chunk-P6PVBQL6.js} +2 -2
- package/dist/{chunk-HYBN4H3F.js → chunk-PLE5QQOZ.js} +27 -20
- package/dist/{chunk-BSK7ELHU.js → chunk-PR7OXHGZ.js} +1 -1
- package/dist/{chunk-OWGCOGKK.js → chunk-QYSQ3UDO.js} +8 -8
- package/dist/{chunk-ZQ2PKR6R.js → chunk-RQ3FXV4K.js} +2 -2
- package/dist/{chunk-Q77KNEUL.js → chunk-RQNMTDXD.js} +1703 -2
- package/dist/{chunk-QKM4U5UK.js → chunk-TJS2AF5Y.js} +2 -2
- package/dist/{chunk-DIA7CT7J.js → chunk-V5Y7D4LH.js} +11 -2
- package/dist/{chunk-KA6G2L7U.js → chunk-VK26K7AY.js} +3 -3
- package/dist/{chunk-4IF54NU5.js → chunk-VPAWRBK5.js} +12 -16
- package/dist/{chunk-QYMAZRAU.js → chunk-VRNZ2NVV.js} +5 -5
- package/dist/{chunk-RCT7UX7B.js → chunk-XT3XQ4PF.js} +32 -27
- package/dist/{chunk-VAF6A3YD.js → chunk-XWFRNJMQ.js} +1 -1
- package/dist/{chunk-7ZYW652H.js → chunk-YHS6VVLJ.js} +2 -2
- package/dist/{chunk-G4EJMQLD.js → chunk-YX22LKQE.js} +2 -2
- package/dist/{chunk-F6CYJ7TN.js → chunk-Z2ZIE5CO.js} +2 -2
- package/dist/cli.d.ts +13 -6
- package/dist/cli.js +10 -10
- package/dist/codegen-command-Y2SPMAUW.js +47 -0
- package/dist/codegen.d.ts +5 -5
- package/dist/codegen.js +2 -2
- package/dist/{completion-WF46272M.js → completion-HJU5QEFB.js} +2 -2
- package/dist/{deploy-command-IP7V7GT4.js → deploy-command-XHS5PKPV.js} +19 -19
- package/dist/{ephemeral-command-U4AQ3TXX.js → ephemeral-command-2NKPEXUU.js} +8 -8
- package/dist/index.d.ts +88 -104
- package/dist/index.js +9 -9
- package/dist/init-command-23FFNUFT.js +32 -0
- package/dist/internal.d.ts +10 -16
- package/dist/internal.js +26 -26
- package/dist/{io-P2H75UV2.js → io-UBDMMDH6.js} +3 -3
- package/dist/{live-diff-IXKBVG4K.js → live-diff-HCOTN5WC.js} +3 -3
- package/dist/{lock-46FWYE4D.js → lock-HQ4KARU2.js} +2 -2
- package/dist/{lock-commands-ZZKZ4LZJ.js → lock-commands-WCRC56ME.js} +11 -11
- package/dist/{login-command-Z6CHTA57.js → login-command-P7LXD5TE.js} +6 -6
- package/dist/{loop-D5NPL4VH.js → loop-IC5ISSYB.js} +3 -3
- package/dist/{marketplace-command-P4IPLJ6J.js → marketplace-command-T6JCHW7J.js} +4 -4
- package/dist/{meta-client-K2J4XH64.js → meta-client-LKRKR3L2.js} +4 -4
- package/dist/node.d.ts +6 -6
- package/dist/node.js +14 -14
- package/dist/{preflight-command-K346GPTY.js → preflight-command-TZWPHBXY.js} +16 -16
- package/dist/{profile-command-LJSBDV2L.js → profile-command-WBNSMQSI.js} +3 -3
- package/dist/{release-command-IMNTIVWK.js → release-command-WEFYRTCI.js} +26 -26
- package/dist/{response-BQVQ24l1.d.ts → response-D6xGLEIn.d.ts} +18 -23
- package/dist/{routes-manifest-PWZHDOI5.js → routes-manifest-5ZFKUQWA.js} +2 -2
- package/dist/{runtime-V4C3AC3A.js → runtime-LSLIDALK.js} +1 -1
- package/dist/scaffold.d.ts +16 -8
- package/dist/scaffold.js +7 -11
- package/dist/{static-host-3WMV7IZO.js → static-host-4JDQCHUW.js} +1 -1
- package/dist/{status-command-AL47VG7H.js → status-command-VARULAR5.js} +4 -4
- package/dist/{store-BLyNeQ8S.d.ts → store-DAnUIi1T.d.ts} +81 -86
- package/dist/{test-command-YAZLKLGQ.js → test-command-YCAR4O35.js} +7 -7
- package/dist/{upgrade-command-BN3EHAOI.js → upgrade-command-GYEIMJBG.js} +15 -16
- package/dist/{workspace-2COHDBM3.js → workspace-33KHFLX3.js} +2 -2
- package/dist/{workspace-command-MNK7Y7MQ.js → workspace-command-2ZTGT26W.js} +26 -28
- package/dist/{workspace-export-DURY5WYL.js → workspace-export-MLYTYZS5.js} +3 -3
- package/dist/{xdo-BjJj5W_E.d.ts → xdo-ODuJklk6.d.ts} +27 -23
- package/guides/authoring.md +11 -2
- package/guides/typed-frontend.md +4 -4
- package/llms/statements-data.md +3 -2
- package/llms/values.md +1 -1
- package/llms-full.txt +18 -18
- package/llms.txt +14 -15
- package/manifest.json +6 -2
- package/package.json +1 -1
- package/dist/chunk-ANUDXFEX.js +0 -881
- package/dist/chunk-JGCWTCA7.js +0 -95
- package/dist/chunk-YBC3IKMF.js +0 -845
- package/dist/codegen-command-FUT2KJB6.js +0 -49
- package/dist/init-command-NPVL32L6.js +0 -34
package/dist/chunk-JGCWTCA7.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AI_PRESETS,
|
|
3
|
-
CODEGEN_MARKER,
|
|
4
|
-
managedBlockVersion,
|
|
5
|
-
presetFilePath,
|
|
6
|
-
renderPreset,
|
|
7
|
-
upsertManagedBlock
|
|
8
|
-
} from "./chunk-KA6G2L7U.js";
|
|
9
|
-
import {
|
|
10
|
-
warn
|
|
11
|
-
} from "./chunk-EZG76F7R.js";
|
|
12
|
-
|
|
13
|
-
// src/emit/agent-file-refresh.ts
|
|
14
|
-
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
15
|
-
import { basename, join } from "path";
|
|
16
|
-
var AGENT_ENV_VARS = [
|
|
17
|
-
"CLAUDECODE",
|
|
18
|
-
"CLAUDE_CODE",
|
|
19
|
-
"CURSOR_TRACE_ID",
|
|
20
|
-
"CURSOR_AGENT",
|
|
21
|
-
"CODEX_SANDBOX",
|
|
22
|
-
"AIDER_MODEL",
|
|
23
|
-
"GITHUB_COPILOT_AGENT"
|
|
24
|
-
];
|
|
25
|
-
function codingAgentDetected(env = process.env) {
|
|
26
|
-
return AGENT_ENV_VARS.some((name) => (env[name] ?? "") !== "");
|
|
27
|
-
}
|
|
28
|
-
var CI_ENV_VARS = [
|
|
29
|
-
"CI",
|
|
30
|
-
"GITHUB_ACTIONS",
|
|
31
|
-
"GITLAB_CI",
|
|
32
|
-
"BUILDKITE",
|
|
33
|
-
"TEAMCITY_VERSION"
|
|
34
|
-
];
|
|
35
|
-
function isCI(env = process.env) {
|
|
36
|
-
return CI_ENV_VARS.some((name) => (env[name] ?? "") !== "");
|
|
37
|
-
}
|
|
38
|
-
function guidanceModeFor(projectDir) {
|
|
39
|
-
return existsSync(join(projectDir, CODEGEN_MARKER)) ? "generated" : "authored";
|
|
40
|
-
}
|
|
41
|
-
function appNameFor(projectDir) {
|
|
42
|
-
try {
|
|
43
|
-
const pkg = JSON.parse(readFileSync(join(projectDir, "package.json"), "utf8"));
|
|
44
|
-
if (typeof pkg.name === "string" && pkg.name.length > 0) return pkg.name;
|
|
45
|
-
} catch {
|
|
46
|
-
}
|
|
47
|
-
return basename(projectDir);
|
|
48
|
-
}
|
|
49
|
-
function refreshAgentFiles(opts) {
|
|
50
|
-
const env = opts.env ?? process.env;
|
|
51
|
-
if (opts.explicit !== true && (isCI(env) || !codingAgentDetected(env))) return [];
|
|
52
|
-
const mode = opts.mode ?? guidanceModeFor(opts.projectDir);
|
|
53
|
-
const appName = opts.appName ?? appNameFor(opts.projectDir);
|
|
54
|
-
const managed = [];
|
|
55
|
-
for (const preset of AI_PRESETS) {
|
|
56
|
-
const path = presetFilePath(preset);
|
|
57
|
-
const absolute = join(opts.projectDir, path);
|
|
58
|
-
if (!existsSync(absolute)) continue;
|
|
59
|
-
try {
|
|
60
|
-
const existing = readFileSync(absolute, "utf8");
|
|
61
|
-
const version = managedBlockVersion(existing);
|
|
62
|
-
if (version === null) continue;
|
|
63
|
-
managed.push({ preset, path, existing, version });
|
|
64
|
-
} catch (err) {
|
|
65
|
-
warn(`could not read ${path}: ${err instanceof Error ? err.message : String(err)}`);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
const selected = managed.map((m) => m.preset);
|
|
69
|
-
const refreshed = [];
|
|
70
|
-
for (const { preset, path, existing, version } of managed) {
|
|
71
|
-
const absolute = join(opts.projectDir, path);
|
|
72
|
-
try {
|
|
73
|
-
if (version === opts.sdkVersion) continue;
|
|
74
|
-
const rendered = renderPreset(preset, appName, mode, {
|
|
75
|
-
selected,
|
|
76
|
-
version: opts.sdkVersion
|
|
77
|
-
});
|
|
78
|
-
const updated = upsertManagedBlock(existing, rendered);
|
|
79
|
-
if (updated === existing) continue;
|
|
80
|
-
writeFileSync(absolute, updated);
|
|
81
|
-
refreshed.push(path);
|
|
82
|
-
} catch (err) {
|
|
83
|
-
warn(`could not refresh ${path}: ${err instanceof Error ? err.message : String(err)}`);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return refreshed;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export {
|
|
90
|
-
codingAgentDetected,
|
|
91
|
-
CI_ENV_VARS,
|
|
92
|
-
isCI,
|
|
93
|
-
refreshAgentFiles
|
|
94
|
-
};
|
|
95
|
-
//# sourceMappingURL=chunk-JGCWTCA7.js.map
|