@xanots/sdk 0.0.2 → 0.0.3

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.
Files changed (43) hide show
  1. package/README.md +11 -2
  2. package/dist/.build-fingerprint +1 -1
  3. package/dist/{agent-file-refresh-7XCACU34.js → agent-file-refresh-6M5M7T24.js} +4 -3
  4. package/dist/bin.js +7 -7
  5. package/dist/{chunk-MUDLJG2O.js → chunk-2V4YE6QC.js} +25 -15
  6. package/dist/{chunk-UVLVQWWF.js → chunk-3NFUWXOC.js} +70 -20
  7. package/dist/chunk-6DHJVLYP.js +2044 -0
  8. package/dist/{chunk-IZW6MK3U.js → chunk-6USV65XA.js} +2 -2
  9. package/dist/{chunk-XLD4BUTF.js → chunk-BT2CSEC5.js} +2 -2
  10. package/dist/{chunk-VKFQJEMW.js → chunk-CMZLPTGW.js} +37 -406
  11. package/dist/{chunk-YYRDLFSJ.js → chunk-DYCLVQXW.js} +50 -3
  12. package/dist/chunk-HQ2CBRVI.js +530 -0
  13. package/dist/{chunk-ZPEY5WE4.js → chunk-W2G2WPTB.js} +3 -3
  14. package/dist/chunk-WUSKBXXD.js +25 -0
  15. package/dist/{chunk-ODNMVJ6H.js → chunk-YZ4GU6F5.js} +283 -252
  16. package/dist/{chunk-5YTBTF25.js → chunk-ZO3HJOCJ.js} +2 -2
  17. package/dist/cli.d.ts +31 -0
  18. package/dist/cli.js +5 -5
  19. package/dist/{codegen-command-RY2GWDLX.js → codegen-command-FIADGXRN.js} +13 -11
  20. package/dist/{completion-TIPPZN7H.js → completion-BKAFCZBE.js} +2 -2
  21. package/dist/{deploy-command-DSISLUW5.js → deploy-command-4R6BYC6G.js} +13 -13
  22. package/dist/{env-target-7C2GKBCY.js → env-target-XWS2ZZ2Y.js} +2 -2
  23. package/dist/{ephemeral-command-5K573ZSG.js → ephemeral-command-JL4TPIRQ.js} +15 -15
  24. package/dist/{init-command-4AWL6CLW.js → init-command-LOK75W64.js} +11 -9
  25. package/dist/internal.js +4 -3
  26. package/dist/{lock-commands-7Q5LNZKL.js → lock-commands-XOYS75YQ.js} +9 -9
  27. package/dist/{marketplace-command-RATXTKXN.js → marketplace-command-UVV3XAOL.js} +6 -6
  28. package/dist/meta-client-OW5WKWW7.js +1 -1
  29. package/dist/node.js +8 -8
  30. package/dist/{release-command-QXLRJMY7.js → release-command-HZUY2XZX.js} +15 -15
  31. package/dist/sandbox-export-command-QCJY4GMV.js +1 -1
  32. package/dist/scaffold.d.ts +1896 -0
  33. package/dist/scaffold.js +101 -0
  34. package/dist/{test-command-BOLIU57E.js → test-command-72Y5S22H.js} +4 -4
  35. package/dist/{validate-command-SYCFEYZN.js → validate-command-KDGH537H.js} +7 -7
  36. package/dist/{workspace-command-TOB2AJ6X.js → workspace-command-ICSI6PKO.js} +13 -11
  37. package/dist/workspace-export-AJMGN3CQ.js +1 -1
  38. package/llms/kinds-agent-mcp.md +2 -1
  39. package/llms-full.txt +3 -2
  40. package/llms.txt +1 -1
  41. package/manifest.json +145 -1
  42. package/package.json +7 -1
  43. package/dist/chunk-47WDWMBJ.js +0 -14
package/README.md CHANGED
@@ -102,8 +102,17 @@ npx @xanots/sdk init my-app && cd my-app
102
102
  npm run dev # the frontend runs immediately
103
103
  ```
104
104
 
105
+ In a terminal it asks three questions — framework, theme, AI instruction files — each with a
106
+ default. The theme is shadcn's own: a base color plus an optional accent, rendered into the
107
+ token stylesheet, with a complete dark palette either way.
108
+
109
+ ```bash
110
+ npx @xanots/sdk init my-app --theme zinc-blue --dark toggle
111
+ npx @xanots/sdk init my-app --theme https://ui.shadcn.com/r/themes/slate.json # or any registry theme
112
+ ```
113
+
105
114
  The starter backend is empty but already compiles and deploys — grow it from the walkthrough
106
- in `xano/EXAMPLE.md`. For the flags, the two presets, and add-ons, see
115
+ in `xano/EXAMPLE.md`. For the flags, the two presets, theming, and add-ons, see
107
116
  [The scaffolded project](https://github.com/xanots/sdk/blob/main/guides/scaffold.md).
108
117
 
109
118
  **3. Build the frontend.**
@@ -352,7 +361,7 @@ reference, the guides carry the shape of a project and the behavior that will bi
352
361
  | Guide | What's in it |
353
362
  |---|---|
354
363
  | [Project structure](https://github.com/xanots/sdk/blob/main/guides/project-structure.md) | How a `xano/` project is laid out, and why registration is explicit |
355
- | [The scaffolded project](https://github.com/xanots/sdk/blob/main/guides/scaffold.md) | What `xanots init` writes, the two frontend presets, add-ons, SvelteKit rules |
364
+ | [The scaffolded project](https://github.com/xanots/sdk/blob/main/guides/scaffold.md) | What `xanots init` writes, the two frontend presets, theming, add-ons, SvelteKit rules |
356
365
  | [Object kinds](https://github.com/xanots/sdk/blob/main/guides/object-kinds.md) | Every authorable kind, and splitting a workspace across microservices |
357
366
  | [Authoring reference](https://github.com/xanots/sdk/blob/main/guides/authoring.md) | Tables and fields, statements, values, inputs, middleware, seed data |
358
367
  | [CLI](https://github.com/xanots/sdk/blob/main/guides/cli.md) | Every command, shell completion, and what failures look like |
@@ -1 +1 @@
1
- c55e4f9d5b84cbeb62826b396d7824e3302e42e404c14866421d7e54d035853c
1
+ 07182bd42383cb8fe65cb807a679f776ecf2395dce7ca0d984068e2be86e7150
@@ -5,8 +5,9 @@ import {
5
5
  presetFilePath,
6
6
  renderPreset,
7
7
  upsertManagedBlock
8
- } from "./chunk-VKFQJEMW.js";
9
- import "./chunk-47WDWMBJ.js";
8
+ } from "./chunk-CMZLPTGW.js";
9
+ import "./chunk-WUSKBXXD.js";
10
+ import "./chunk-6DHJVLYP.js";
10
11
  import {
11
12
  warn
12
13
  } from "./chunk-EZG76F7R.js";
@@ -92,4 +93,4 @@ export {
92
93
  isCI,
93
94
  refreshAgentFiles
94
95
  };
95
- //# sourceMappingURL=agent-file-refresh-7XCACU34.js.map
96
+ //# sourceMappingURL=agent-file-refresh-6M5M7T24.js.map
package/dist/bin.js CHANGED
@@ -2,11 +2,12 @@
2
2
  import {
3
3
  readVersion,
4
4
  run
5
- } from "./chunk-UVLVQWWF.js";
5
+ } from "./chunk-3NFUWXOC.js";
6
6
  import {
7
7
  exitCodeOf,
8
8
  reportFailure
9
- } from "./chunk-IZW6MK3U.js";
9
+ } from "./chunk-6USV65XA.js";
10
+ import "./chunk-HJPTWBLH.js";
10
11
  import {
11
12
  blank,
12
13
  clearProgress,
@@ -15,15 +16,14 @@ import {
15
16
  style,
16
17
  warn
17
18
  } from "./chunk-EZG76F7R.js";
19
+ import {
20
+ atomicWrite
21
+ } from "./chunk-GNPVYOPB.js";
18
22
  import "./chunk-55VHDNW5.js";
19
- import "./chunk-YYRDLFSJ.js";
23
+ import "./chunk-DYCLVQXW.js";
20
24
  import "./chunk-5L4X5LS6.js";
21
25
  import "./chunk-WHOJWOSV.js";
22
26
  import "./chunk-5XZ744TS.js";
23
- import "./chunk-HJPTWBLH.js";
24
- import {
25
- atomicWrite
26
- } from "./chunk-GNPVYOPB.js";
27
27
  import "./chunk-4HT3BNZ7.js";
28
28
 
29
29
  // src/emit/update-check.ts
@@ -20,19 +20,16 @@ import {
20
20
  exportWorkspaceBundle
21
21
  } from "./chunk-QTNO2WD6.js";
22
22
  import {
23
- codegenLanding,
24
- describeOrigin,
25
23
  projectShellFiles,
26
- renderCodegenMarker,
27
- renderCodegenReadme,
28
24
  resolveFrontendPreset,
25
+ resolveThemeChoice,
29
26
  sanitizeAppName
30
- } from "./chunk-ODNMVJ6H.js";
27
+ } from "./chunk-HQ2CBRVI.js";
31
28
  import {
32
29
  XANO_DIR,
33
30
  resolveAiPresets,
34
31
  scaffoldProject
35
- } from "./chunk-VKFQJEMW.js";
32
+ } from "./chunk-CMZLPTGW.js";
36
33
  import {
37
34
  getAccessToken
38
35
  } from "./chunk-C56BC2FY.js";
@@ -42,6 +39,12 @@ import {
42
39
  import {
43
40
  raw
44
41
  } from "./chunk-LU7TRWMC.js";
42
+ import {
43
+ codegenLanding,
44
+ describeOrigin,
45
+ renderCodegenMarker,
46
+ renderCodegenReadme
47
+ } from "./chunk-YZ4GU6F5.js";
45
48
  import {
46
49
  FIELD_METHODS,
47
50
  STATEMENT_SURFACES,
@@ -68,10 +71,10 @@ import {
68
71
  import {
69
72
  loadDefault,
70
73
  readVersion
71
- } from "./chunk-UVLVQWWF.js";
74
+ } from "./chunk-3NFUWXOC.js";
72
75
  import {
73
76
  UsageError
74
- } from "./chunk-IZW6MK3U.js";
77
+ } from "./chunk-6USV65XA.js";
75
78
  import {
76
79
  blank,
77
80
  detail,
@@ -6651,7 +6654,7 @@ async function fetchBundle(args, source) {
6651
6654
  );
6652
6655
  }
6653
6656
  const auth3 = await getAccessToken(args);
6654
- const { resolveLive, fetchEphemeralBundle } = await import("./ephemeral-command-5K573ZSG.js");
6657
+ const { resolveLive, fetchEphemeralBundle } = await import("./ephemeral-command-JL4TPIRQ.js");
6655
6658
  const summary = await resolveLive(auth3, auth3.workspaceId, name);
6656
6659
  step(`Reading ephemeral "${name}"`);
6657
6660
  return {
@@ -6757,13 +6760,19 @@ async function runCodegenCommand(args, source) {
6757
6760
  const appName = sanitizeAppName(args.name ?? basename(out2));
6758
6761
  const vars = { appName, sdkVersion: readVersion() };
6759
6762
  const preset = await resolveFrontendPreset(args.framework);
6763
+ const choice = await resolveThemeChoice(args);
6760
6764
  const presets = await resolveAiPresets(args.ai);
6761
6765
  const project = decodeBundle(bundle);
6762
6766
  const files = [
6763
- ...projectShellFiles(vars, preset, {
6764
- readme: renderCodegenReadme(vars, origin, envNames(bundle.payload ?? {}), preset),
6765
- landing: codegenLanding(vars, origin)
6766
- }),
6767
+ ...projectShellFiles(
6768
+ vars,
6769
+ preset,
6770
+ {
6771
+ readme: renderCodegenReadme(vars, origin, envNames(bundle.payload ?? {}), preset),
6772
+ landing: codegenLanding(vars, origin)
6773
+ },
6774
+ choice
6775
+ ),
6767
6776
  ...placeGeneratedFiles(project),
6768
6777
  {
6769
6778
  path: `${XANO_DIR}/.xanots-codegen.json`,
@@ -6780,7 +6789,8 @@ async function runCodegenCommand(args, source) {
6780
6789
  noInstall: args.noInstall,
6781
6790
  regenerable: true,
6782
6791
  sdkVersion: readVersion(),
6783
- frontend: preset
6792
+ frontend: preset,
6793
+ theme: choice
6784
6794
  });
6785
6795
  let verified = null;
6786
6796
  if (!args.noVerify) {
@@ -6913,4 +6923,4 @@ export {
6913
6923
  verifyCrashEntry,
6914
6924
  blameGeneratedFile
6915
6925
  };
6916
- //# sourceMappingURL=chunk-MUDLJG2O.js.map
6926
+ //# sourceMappingURL=chunk-2V4YE6QC.js.map
@@ -9,7 +9,11 @@ import {
9
9
  unknownFlag,
10
10
  unknownHelpTopic,
11
11
  unknownSubcommand
12
- } from "./chunk-IZW6MK3U.js";
12
+ } from "./chunk-6USV65XA.js";
13
+ import {
14
+ readLockFile,
15
+ writeLockFile
16
+ } from "./chunk-HJPTWBLH.js";
13
17
  import {
14
18
  detail,
15
19
  info,
@@ -26,7 +30,7 @@ import {
26
30
  getSubcommand,
27
31
  isCommand,
28
32
  suggest
29
- } from "./chunk-YYRDLFSJ.js";
33
+ } from "./chunk-DYCLVQXW.js";
30
34
  import {
31
35
  FILTER_NAMES,
32
36
  SEED_FILE,
@@ -39,10 +43,6 @@ import {
39
43
  serializeBundle,
40
44
  tableColumns
41
45
  } from "./chunk-5L4X5LS6.js";
42
- import {
43
- readLockFile,
44
- writeLockFile
45
- } from "./chunk-HJPTWBLH.js";
46
46
  import {
47
47
  WORKSPACE_KEY,
48
48
  createLockContext,
@@ -328,7 +328,15 @@ function parseArgs(argv) {
328
328
  let path;
329
329
  let name;
330
330
  const ai = [];
331
+ const marketplace = [];
331
332
  let framework;
333
+ let theme;
334
+ let radius;
335
+ let dark;
336
+ let font;
337
+ let fontMono;
338
+ let fontHeading;
339
+ let icons;
332
340
  let force = false;
333
341
  let noInstall = false;
334
342
  let noVerify = false;
@@ -470,6 +478,40 @@ function parseArgs(argv) {
470
478
  framework = rest[++i];
471
479
  } else if (arg.startsWith("--framework=")) {
472
480
  framework = arg.slice("--framework=".length);
481
+ } else if (arg === "--theme") {
482
+ theme = rest[++i];
483
+ } else if (arg.startsWith("--theme=")) {
484
+ theme = arg.slice("--theme=".length);
485
+ } else if (arg === "--radius") {
486
+ radius = rest[++i];
487
+ } else if (arg.startsWith("--radius=")) {
488
+ radius = arg.slice("--radius=".length);
489
+ } else if (arg === "--dark") {
490
+ dark = rest[++i];
491
+ } else if (arg.startsWith("--dark=")) {
492
+ dark = arg.slice("--dark=".length);
493
+ } else if (arg === "--font-mono") {
494
+ fontMono = rest[++i];
495
+ } else if (arg.startsWith("--font-mono=")) {
496
+ fontMono = arg.slice("--font-mono=".length);
497
+ } else if (arg === "--font-heading") {
498
+ fontHeading = rest[++i];
499
+ } else if (arg.startsWith("--font-heading=")) {
500
+ fontHeading = arg.slice("--font-heading=".length);
501
+ } else if (arg === "--font") {
502
+ font = rest[++i];
503
+ } else if (arg.startsWith("--font=")) {
504
+ font = arg.slice("--font=".length);
505
+ } else if (arg === "--icons") {
506
+ icons = rest[++i];
507
+ } else if (arg.startsWith("--icons=")) {
508
+ icons = arg.slice("--icons=".length);
509
+ } else if (arg === "--marketplace" || arg.startsWith("--marketplace=")) {
510
+ const raw = arg === "--marketplace" ? rest[++i] : arg.slice("--marketplace=".length);
511
+ for (const p of (raw ?? "").split(",")) {
512
+ const pkg = p.trim();
513
+ if (pkg !== "") marketplace.push(pkg);
514
+ }
473
515
  } else if (arg === "--ai" || arg.startsWith("--ai=")) {
474
516
  const raw = arg === "--ai" ? rest[++i] : arg.slice("--ai=".length);
475
517
  for (const p of (raw ?? "").split(",")) {
@@ -574,9 +616,17 @@ function parseArgs(argv) {
574
616
  path,
575
617
  name,
576
618
  ai,
619
+ marketplace,
577
620
  force,
578
621
  noInstall,
579
622
  framework,
623
+ theme,
624
+ radius,
625
+ dark,
626
+ font,
627
+ fontMono,
628
+ fontHeading,
629
+ icons,
580
630
  noVerify,
581
631
  requireMicroservices,
582
632
  report,
@@ -790,11 +840,11 @@ async function run(argv) {
790
840
  return;
791
841
  }
792
842
  if (command === "init") {
793
- const { runInitCommand } = await import("./init-command-4AWL6CLW.js");
843
+ const { runInitCommand } = await import("./init-command-LOK75W64.js");
794
844
  return runInitCommand(args);
795
845
  }
796
846
  if (command === "completion") {
797
- const { isCompletionShell, runCompletionCommand, COMPLETION_SHELLS } = await import("./completion-TIPPZN7H.js");
847
+ const { isCompletionShell, runCompletionCommand, COMPLETION_SHELLS } = await import("./completion-BKAFCZBE.js");
798
848
  const shell = args.positionals[0];
799
849
  if (shell === void 0 || !isCompletionShell(shell)) {
800
850
  throw new UsageError(
@@ -805,7 +855,7 @@ async function run(argv) {
805
855
  return runCompletionCommand(shell);
806
856
  }
807
857
  if (command === "lock") {
808
- const { runLockCommand } = await import("./lock-commands-7Q5LNZKL.js");
858
+ const { runLockCommand } = await import("./lock-commands-XOYS75YQ.js");
809
859
  return runLockCommand(args);
810
860
  }
811
861
  if (command === "login") {
@@ -817,15 +867,15 @@ async function run(argv) {
817
867
  return runLogoutCommand(args);
818
868
  }
819
869
  if (command === "deploy") {
820
- const { runDeployCommand } = await import("./deploy-command-DSISLUW5.js");
870
+ const { runDeployCommand } = await import("./deploy-command-4R6BYC6G.js");
821
871
  return runDeployCommand(args);
822
872
  }
823
873
  if (command === "ephemeral") {
824
- const { runEphemeralCommand } = await import("./ephemeral-command-5K573ZSG.js");
874
+ const { runEphemeralCommand } = await import("./ephemeral-command-JL4TPIRQ.js");
825
875
  return runEphemeralCommand(args);
826
876
  }
827
877
  if (command === "release") {
828
- const { runReleaseCommand } = await import("./release-command-QXLRJMY7.js");
878
+ const { runReleaseCommand } = await import("./release-command-HZUY2XZX.js");
829
879
  return runReleaseCommand(args);
830
880
  }
831
881
  if (command === "sandbox") {
@@ -841,21 +891,21 @@ async function run(argv) {
841
891
  return runSandboxExportCommand(args);
842
892
  }
843
893
  if (args.subcommand === "codegen") {
844
- const { runCodegenCommand } = await import("./codegen-command-RY2GWDLX.js");
894
+ const { runCodegenCommand } = await import("./codegen-command-FIADGXRN.js");
845
895
  return runCodegenCommand(args, { kind: "sandbox" });
846
896
  }
847
897
  throw unknownSubcommand("sandbox", args.subcommand);
848
898
  }
849
899
  if (command === "test") {
850
- const { runTestCommand } = await import("./test-command-BOLIU57E.js");
900
+ const { runTestCommand } = await import("./test-command-72Y5S22H.js");
851
901
  return runTestCommand(args);
852
902
  }
853
903
  if (command === "workspace") {
854
- const { runWorkspaceCommand } = await import("./workspace-command-TOB2AJ6X.js");
904
+ const { runWorkspaceCommand } = await import("./workspace-command-ICSI6PKO.js");
855
905
  return runWorkspaceCommand(args);
856
906
  }
857
907
  if (command === "codegen") {
858
- const { runCodegenCommand } = await import("./codegen-command-RY2GWDLX.js");
908
+ const { runCodegenCommand } = await import("./codegen-command-FIADGXRN.js");
859
909
  return runCodegenCommand(args, { kind: "file" });
860
910
  }
861
911
  if (command === "profile") {
@@ -873,7 +923,7 @@ async function run(argv) {
873
923
  if (!["list", "search", "details", "install"].includes(args.subcommand ?? "")) {
874
924
  throw unknownSubcommand("marketplace", args.subcommand);
875
925
  }
876
- const marketplace = await import("./marketplace-command-RATXTKXN.js");
926
+ const marketplace = await import("./marketplace-command-UVV3XAOL.js");
877
927
  if (args.subcommand === "list") return marketplace.runMarketplaceListCommand(args);
878
928
  if (args.subcommand === "search") return marketplace.runMarketplaceSearchCommand(args);
879
929
  if (args.subcommand === "details") return marketplace.runMarketplaceDetailsCommand(args);
@@ -883,7 +933,7 @@ async function run(argv) {
883
933
  throw unknownCommand("push");
884
934
  }
885
935
  if (command === "validate") {
886
- const { runValidateCommand } = await import("./validate-command-SYCFEYZN.js");
936
+ const { runValidateCommand } = await import("./validate-command-KDGH537H.js");
887
937
  return runValidateCommand(args);
888
938
  }
889
939
  if (command !== "compile" && command !== "export" && command !== "paths" && command !== "routes") {
@@ -915,7 +965,7 @@ async function run(argv) {
915
965
  }
916
966
  async function refreshAgentGuidance() {
917
967
  try {
918
- const { refreshAgentFiles } = await import("./agent-file-refresh-7XCACU34.js");
968
+ const { refreshAgentFiles } = await import("./agent-file-refresh-6M5M7T24.js");
919
969
  const refreshed = refreshAgentFiles({
920
970
  projectDir: process.cwd(),
921
971
  sdkVersion: readVersion()
@@ -1143,4 +1193,4 @@ export {
1143
1193
  exportBundleJson,
1144
1194
  compileBundle
1145
1195
  };
1146
- //# sourceMappingURL=chunk-UVLVQWWF.js.map
1196
+ //# sourceMappingURL=chunk-3NFUWXOC.js.map