@pylair/cli 0.1.0-rc.3 → 0.1.0-rc.31

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 (112) hide show
  1. package/README.md +3 -2
  2. package/dist/bin.d.ts +3 -0
  3. package/dist/bin.d.ts.map +1 -0
  4. package/dist/bin.js +7 -0
  5. package/dist/bin.js.map +1 -0
  6. package/dist/build/artifacts.d.ts +14 -0
  7. package/dist/build/artifacts.d.ts.map +1 -0
  8. package/dist/build/artifacts.js +61 -0
  9. package/dist/build/artifacts.js.map +1 -0
  10. package/dist/build/bytecode.d.ts +29 -0
  11. package/dist/build/bytecode.d.ts.map +1 -0
  12. package/dist/build/bytecode.js +65 -0
  13. package/dist/build/bytecode.js.map +1 -0
  14. package/dist/build/download.d.ts +53 -0
  15. package/dist/build/download.d.ts.map +1 -0
  16. package/dist/build/download.js +327 -0
  17. package/dist/build/download.js.map +1 -0
  18. package/dist/build/notices.d.ts +10 -0
  19. package/dist/build/notices.d.ts.map +1 -0
  20. package/dist/build/notices.js +109 -0
  21. package/dist/build/notices.js.map +1 -0
  22. package/dist/build/pbs.d.ts +12 -0
  23. package/dist/build/pbs.d.ts.map +1 -0
  24. package/dist/build/pbs.js +36 -0
  25. package/dist/build/pbs.js.map +1 -0
  26. package/dist/build/python.d.ts +24 -0
  27. package/dist/build/python.d.ts.map +1 -0
  28. package/dist/build/python.js +106 -0
  29. package/dist/build/python.js.map +1 -0
  30. package/dist/build/sign.d.ts +18 -0
  31. package/dist/build/sign.d.ts.map +1 -0
  32. package/dist/build/sign.js +182 -0
  33. package/dist/build/sign.js.map +1 -0
  34. package/dist/build/source.d.ts +19 -0
  35. package/dist/build/source.d.ts.map +1 -0
  36. package/dist/build/source.js +91 -0
  37. package/dist/build/source.js.map +1 -0
  38. package/dist/build/util.d.ts +20 -0
  39. package/dist/build/util.d.ts.map +1 -0
  40. package/dist/build/util.js +62 -0
  41. package/dist/build/util.js.map +1 -0
  42. package/dist/build.d.ts +26 -12
  43. package/dist/build.d.ts.map +1 -1
  44. package/dist/build.js +240 -270
  45. package/dist/build.js.map +1 -1
  46. package/dist/capabilities.d.ts +51 -0
  47. package/dist/capabilities.d.ts.map +1 -0
  48. package/dist/capabilities.js +232 -0
  49. package/dist/capabilities.js.map +1 -0
  50. package/dist/cli.d.ts +38 -1
  51. package/dist/cli.d.ts.map +1 -1
  52. package/dist/cli.js +266 -39
  53. package/dist/cli.js.map +1 -1
  54. package/dist/codegen.d.ts.map +1 -1
  55. package/dist/codegen.js +12 -1
  56. package/dist/codegen.js.map +1 -1
  57. package/dist/config.d.ts +25 -1
  58. package/dist/config.d.ts.map +1 -1
  59. package/dist/config.js +31 -12
  60. package/dist/config.js.map +1 -1
  61. package/dist/dev.d.ts +7 -3
  62. package/dist/dev.d.ts.map +1 -1
  63. package/dist/dev.js +120 -16
  64. package/dist/dev.js.map +1 -1
  65. package/dist/doctor.d.ts +34 -1
  66. package/dist/doctor.d.ts.map +1 -1
  67. package/dist/doctor.js +268 -19
  68. package/dist/doctor.js.map +1 -1
  69. package/dist/keys.d.ts +50 -0
  70. package/dist/keys.d.ts.map +1 -0
  71. package/dist/keys.js +192 -0
  72. package/dist/keys.js.map +1 -0
  73. package/dist/prune.d.ts.map +1 -1
  74. package/dist/prune.js +1 -0
  75. package/dist/prune.js.map +1 -1
  76. package/dist/ui/caps.d.ts +45 -0
  77. package/dist/ui/caps.d.ts.map +1 -0
  78. package/dist/ui/caps.js +81 -0
  79. package/dist/ui/caps.js.map +1 -0
  80. package/dist/ui/index.d.ts +106 -0
  81. package/dist/ui/index.d.ts.map +1 -0
  82. package/dist/ui/index.js +264 -0
  83. package/dist/ui/index.js.map +1 -0
  84. package/dist/ui/prompts.d.ts +39 -0
  85. package/dist/ui/prompts.d.ts.map +1 -0
  86. package/dist/ui/prompts.js +209 -0
  87. package/dist/ui/prompts.js.map +1 -0
  88. package/dist/ui/style.d.ts +27 -0
  89. package/dist/ui/style.d.ts.map +1 -0
  90. package/dist/ui/style.js +71 -0
  91. package/dist/ui/style.js.map +1 -0
  92. package/dist/update.d.ts +64 -0
  93. package/dist/update.d.ts.map +1 -0
  94. package/dist/update.js +266 -0
  95. package/dist/update.js.map +1 -0
  96. package/dist/version.d.ts +5 -0
  97. package/dist/version.d.ts.map +1 -0
  98. package/dist/version.js +15 -0
  99. package/dist/version.js.map +1 -0
  100. package/dist/wrap.d.ts +69 -0
  101. package/dist/wrap.d.ts.map +1 -0
  102. package/dist/wrap.js +292 -0
  103. package/dist/wrap.js.map +1 -0
  104. package/dist/wrapbuild.d.ts +33 -0
  105. package/dist/wrapbuild.d.ts.map +1 -0
  106. package/dist/wrapbuild.js +83 -0
  107. package/dist/wrapbuild.js.map +1 -0
  108. package/dist/wrapconfig.d.ts +52 -0
  109. package/dist/wrapconfig.d.ts.map +1 -0
  110. package/dist/wrapconfig.js +117 -0
  111. package/dist/wrapconfig.js.map +1 -0
  112. package/package.json +4 -3
@@ -0,0 +1,91 @@
1
+ /** Staging the app source into the bundle, minus anything that looks
2
+ * like a secret unless `[tool.pylair] include` names it. */
3
+ import { cpSync } from "node:fs";
4
+ import { relative } from "node:path";
5
+ import { matchGlob } from "../glob.js";
6
+ import { ui } from "../ui/index.js";
7
+ /** Basename globs for files that look like secrets or credentials —
8
+ * staged source must never carry them into an installer. */
9
+ const SECRET_PATTERNS = [
10
+ "*.pem",
11
+ "*.key",
12
+ "*.p12",
13
+ "*.pfx",
14
+ "id_rsa*",
15
+ "id_ed25519*",
16
+ "credentials*.json",
17
+ "service-account*.json",
18
+ ];
19
+ /** True when a `/`-separated relative path looks like it holds secrets:
20
+ * any dot-segment (.env, .git, .venv, .DS_Store) or a basename matching
21
+ * the credential patterns. */
22
+ function secretish(rel) {
23
+ const segs = rel.split("/");
24
+ if (segs.some((s) => s.startsWith(".")))
25
+ return true;
26
+ return SECRET_PATTERNS.some((g) => matchGlob(g, segs[segs.length - 1]));
27
+ }
28
+ /** Could `pattern` match something beneath `dir`? Refusing a denied dir
29
+ * would otherwise hide an included descendant from cpSync's walk. */
30
+ function couldMatchUnder(pattern, dir) {
31
+ const d = dir.split("/");
32
+ const p = pattern.split("/");
33
+ for (let i = 0; i < d.length; i++) {
34
+ if (i >= p.length)
35
+ return false; // pattern ends above the dir
36
+ if (p[i] === "**")
37
+ return true; // ** crosses any depth
38
+ if (/[*?]/.test(p[i])) {
39
+ if (!matchGlob(p[i], d[i]))
40
+ return false;
41
+ }
42
+ else if (p[i] !== d[i])
43
+ return false;
44
+ }
45
+ return true;
46
+ }
47
+ /**
48
+ * Copy the app source tree into the bundle, minus anything that looks
49
+ * like a secret. A path is skipped when any segment starts with "." or
50
+ * its basename matches SECRET_PATTERNS, UNLESS an `include` glob
51
+ * (relative to srcDir, same shape as `prune` entries) names it — an
52
+ * include wins even inside a denied directory, which stays walkable so
53
+ * the descent can reach it. Skips are reported, not fatal: `warn` gets
54
+ * the count, the first 10 names, and how to opt a path back in; nothing
55
+ * is printed when nothing was skipped.
56
+ *
57
+ * Returns the `/`-separated relative paths that were refused.
58
+ */
59
+ export function stageSource(srcDir, dest, include = [], warn = (m) => /^\s/.test(m) ? ui.dump(`${m}\n`) : ui.warn(m, { bare: !m.startsWith("warning:") }),
60
+ /** Top-level names to leave out entirely (a root source dir holding the
61
+ * project's own `src-tauri`, `node_modules`...). Not reported as skipped. */
62
+ exclude = []) {
63
+ const pats = include.map((g) => g.replace(/\\/g, "/").replace(/^\.\//, ""));
64
+ const skipped = [];
65
+ cpSync(srcDir, dest, {
66
+ recursive: true,
67
+ filter: (src) => {
68
+ const rel = relative(srcDir, src).replace(/\\/g, "/");
69
+ if (!rel)
70
+ return true; // the root itself
71
+ if (exclude.includes(rel.split("/")[0]))
72
+ return false;
73
+ if (pats.some((g) => matchGlob(g, rel)))
74
+ return true;
75
+ if (!secretish(rel))
76
+ return true;
77
+ if (pats.some((g) => couldMatchUnder(g, rel)))
78
+ return true; // descend only
79
+ skipped.push(rel);
80
+ return false;
81
+ },
82
+ });
83
+ if (skipped.length) {
84
+ warn(`warning: skipped ${skipped.length} secret-looking path(s) under ${srcDir}: ` +
85
+ skipped.slice(0, 10).join(", ") +
86
+ (skipped.length > 10 ? ", and more" : ""));
87
+ warn(` to ship one deliberately, list it in [tool.pylair] include = ["path/under/source"]`);
88
+ }
89
+ return skipped;
90
+ }
91
+ //# sourceMappingURL=source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.js","sourceRoot":"","sources":["../../src/build/source.ts"],"names":[],"mappings":"AAAA;4DAC4D;AAE5D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC;4DAC4D;AAC5D,MAAM,eAAe,GAAG;IACtB,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,SAAS;IACT,aAAa;IACb,mBAAmB;IACnB,uBAAuB;CACxB,CAAC;AAEF;;8BAE8B;AAC9B,SAAS,SAAS,CAAC,GAAW;IAC5B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC5B,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACrD,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1E,CAAC;AAED;qEACqE;AACrE,SAAS,eAAe,CAAC,OAAe,EAAE,GAAW;IACnD,MAAM,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACzB,MAAM,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,CAAC;IAC/F,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,20 @@
1
+ /** Small helpers shared by build.ts and the build/ modules. */
2
+ import { type StepHandle, type Ui } from "../ui/index.js";
3
+ export declare const isWin: boolean;
4
+ export declare function run(cmd: string, args: string[], cwd: string): void;
5
+ export interface RunToolOptions {
6
+ env?: NodeJS.ProcessEnv;
7
+ /** The step the tool runs under: its last output line becomes the live
8
+ * progress line. */
9
+ step?: StepHandle;
10
+ /** `--verbose`: stream everything, fold nothing. */
11
+ verbose?: boolean;
12
+ }
13
+ /** Run a tool and wait for it.
14
+ *
15
+ * Plain output or `--verbose`: the tool inherits our stdio and streams
16
+ * exactly as before. Fancy output: the tool's output is captured and shown as
17
+ * the running step's single progress line (on a live terminal), and the whole
18
+ * captured log is printed only if the tool fails. */
19
+ export declare function runTool(ui: Ui, cmd: string, args: string[], cwd: string, o?: RunToolOptions): Promise<void>;
20
+ //# sourceMappingURL=util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/build/util.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAI/D,OAAO,EAAa,KAAK,UAAU,EAAE,KAAK,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAErE,eAAO,MAAM,KAAK,SAAyB,CAAC;AAE5C,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,QAI3D;AAMD,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB;wBACoB;IACpB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;qDAKqD;AACrD,wBAAsB,OAAO,CAC3B,EAAE,EAAE,EAAE,EACN,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,EAAE,MAAM,EACX,CAAC,GAAE,cAAmB,GACrB,OAAO,CAAC,IAAI,CAAC,CAuCf"}
@@ -0,0 +1,62 @@
1
+ /** Small helpers shared by build.ts and the build/ modules. */
2
+ import { spawn, spawnSync } from "node:child_process";
3
+ import { platform } from "node:os";
4
+ import { stripAnsi } from "../ui/index.js";
5
+ export const isWin = platform() === "win32";
6
+ export function run(cmd, args, cwd) {
7
+ const r = spawnSync(cmd, args, { cwd, stdio: "inherit" });
8
+ if (r.error)
9
+ throw new Error(`${cmd} ${args.join(" ")} failed to start: ${r.error.message}`);
10
+ if (r.status !== 0)
11
+ throw new Error(`${cmd} ${args.join(" ")} exited ${r.status}`);
12
+ }
13
+ /** Most of a tool's output kept for the failure dump (the tail wins: that is
14
+ * where the error is). */
15
+ const MAX_LOG_BYTES = 16 * 2 ** 20;
16
+ /** Run a tool and wait for it.
17
+ *
18
+ * Plain output or `--verbose`: the tool inherits our stdio and streams
19
+ * exactly as before. Fancy output: the tool's output is captured and shown as
20
+ * the running step's single progress line (on a live terminal), and the whole
21
+ * captured log is printed only if the tool fails. */
22
+ export async function runTool(ui, cmd, args, cwd, o = {}) {
23
+ const label = `${cmd} ${args.join(" ")}`;
24
+ const fold = ui.caps.fancy && !o.verbose && o.step !== undefined;
25
+ const child = spawn(cmd, args, {
26
+ cwd,
27
+ env: o.env ?? process.env,
28
+ stdio: fold ? ["ignore", "pipe", "pipe"] : "inherit",
29
+ });
30
+ let log = "";
31
+ if (fold) {
32
+ let pending = "";
33
+ const feed = (b) => {
34
+ const text = b.toString("utf-8");
35
+ log += text;
36
+ if (log.length > MAX_LOG_BYTES)
37
+ log = log.slice(log.length - MAX_LOG_BYTES);
38
+ pending += text;
39
+ const lines = pending.split(/\r\n|\n|\r/);
40
+ pending = lines.pop() ?? "";
41
+ for (const l of lines) {
42
+ const clean = stripAnsi(l).trim();
43
+ if (clean)
44
+ o.step.progress(clean);
45
+ }
46
+ };
47
+ child.stdout.on("data", feed);
48
+ child.stderr.on("data", feed);
49
+ }
50
+ const code = await new Promise((resolve, reject) => {
51
+ child.once("error", reject);
52
+ child.once("close", (c) => resolve(c));
53
+ }).catch((e) => {
54
+ throw new Error(`${label} failed to start: ${e.message}`);
55
+ });
56
+ if (code !== 0) {
57
+ if (fold && log)
58
+ ui.dump(log.endsWith("\n") ? log : log + "\n");
59
+ throw new Error(`${label} exited ${code}`);
60
+ }
61
+ }
62
+ //# sourceMappingURL=util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/build/util.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAE/D,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,SAAS,EAA4B,MAAM,gBAAgB,CAAC;AAErE,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,EAAE,KAAK,OAAO,CAAC;AAE5C,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,IAAc,EAAE,GAAW;IAC1D,MAAM,CAAC,GAAG,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAC1D,IAAI,CAAC,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAC7F,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;AACrF,CAAC;AAED;0BAC0B;AAC1B,MAAM,aAAa,GAAG,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC;AAWnC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I,EAAE,CAAC;gBAClC,IAAI,KAAK;oBAAE,CAAC,CAAC,IAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YACrC,CAAC;QACH,CAAC,CAAC;QACF,KAAK,CAAC,MAAO,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC/B,KAAK,CAAC,MAAO,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,IAAI,OAAO,CAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAChE,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC5B,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAQ,EAAE,EAAE;QACpB,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,qBAAqB,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IAEH,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;QACf,IAAI,IAAI,IAAI,GAAG;YAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;QAChE,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,WAAW,IAAI,EAAE,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC"}
package/dist/build.d.ts CHANGED
@@ -1,22 +1,36 @@
1
- /** `pylair build` — the M0 recipe, generalized:
2
- * fetch standalone CPython → stage site-packages via the bundled
3
- * interpreter (native wheels only — no cross-compile) → stage app
4
- * source → prune → tauri build → unsigned warning.
1
+ /** `pylair build`, the M0 recipe, generalized:
2
+ * fetch standalone CPython, stage site-packages via the bundled
3
+ * interpreter (native wheels only, no cross-compile), stage app
4
+ * source, prune, tauri build, unsigned warning.
5
+ *
6
+ * Output goes through ui/ (one step line per stage with its time; the tauri
7
+ * build folded into one progress line on a live terminal; plain, stable text
8
+ * everywhere else).
5
9
  */
6
- export declare function hostTriple(): string;
7
- /** Shipped bundles must carry the licenses of what they embed. Collects:
8
- * pylair's own dual license, the interpreter's license tree (PSF license
9
- * requires LICENSE text with redistributed CPython), and each wheel's
10
- * dist-info license files. Runs before prune so nothing collected is
11
- * deleted afterwards. Returns the notice dir.
12
- */
13
- export declare function stageNotices(resources: string, pylairDir: string): string;
10
+ export { compileBytecode, PYC_INVALIDATION_MODE } from "./build/bytecode.js";
11
+ export { DownloadError, backoffMs, download, downloadTimeoutMs, downloadWithRetry, ensureTarball, } from "./build/download.js";
12
+ export { stageNotices } from "./build/notices.js";
13
+ export { hostTriple } from "./build/pbs.js";
14
+ export { stageSource } from "./build/source.js";
15
+ export { requirementsHaveHashes, uvExportArgs, uvPipInstallArgs } from "./build/python.js";
14
16
  export interface BuildOptions {
15
17
  appDir: string;
16
18
  /** Extra tauri-cli args (e.g. --bundles). */
17
19
  tauriArgs?: string[];
20
+ /** `pylair build --sign`: produce signed updater artifacts — forces
21
+ * bundle.createUpdaterArtifacts and requires TAURI_SIGNING_PRIVATE_KEY
22
+ * in the environment (0011 §6). */
23
+ sign?: boolean;
18
24
  /** Skip the interpreter fetch (reuse staged resources/python). */
19
25
  skipFetch?: boolean;
26
+ /** Stage and verify everything (interpreter, locked env, source, prune,
27
+ * bytecode, the import check) but stop before `tauri build`: no installer,
28
+ * no signing. What CI and `pylair build --stage-only` use to prove a
29
+ * project builds without paying for a native bundle. */
30
+ stageOnly?: boolean;
31
+ /** Stream the uv and tauri output as it comes instead of folding it into
32
+ * the live progress line (`pylair build --verbose`). */
33
+ verbose?: boolean;
20
34
  }
21
35
  export declare function build(opts: BuildOptions): Promise<void>;
22
36
  //# sourceMappingURL=build.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAmDH,wBAAgB,UAAU,IAAI,MAAM,CAInC;AAkGD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CA8FzE;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,kEAAkE;IAClE,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAsB,KAAK,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA4E7D"}
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAyDH,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EACL,aAAa,EACb,SAAS,EACT,QAAQ,EACR,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE3F,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB;;uCAEmC;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,kEAAkE;IAClE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;4DAGwD;IACxD,SAAS,CAAC,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