@kodycodes/cli 3.31.3 → 3.31.5

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 (34) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/{chunk-3G4MV7KG.js → chunk-6KT2QEN3.js} +3 -3
  3. package/dist/{chunk-PMFY674W.js → chunk-GMD3RXXS.js} +2 -2
  4. package/dist/chunk-MAIWMWV7.js +448 -0
  5. package/dist/chunk-MAIWMWV7.js.map +6 -0
  6. package/dist/{chunk-OJT47JLR.js → chunk-PQRALHYL.js} +7 -7
  7. package/dist/{chunk-LVUVBXXK.js → chunk-SQKXY43O.js} +5 -5
  8. package/dist/{chunk-MN5PENPF.js → chunk-VVXXLY65.js} +2 -2
  9. package/dist/cli.js +1 -1
  10. package/dist/{commands-3CZ5DOQA.js → commands-I5EWVOJC.js} +2 -2
  11. package/dist/{dev-command-VBAIG6EU.js → dev-command-TU2ZPP24.js} +32 -8
  12. package/dist/{dev-command-VBAIG6EU.js.map → dev-command-TU2ZPP24.js.map} +1 -1
  13. package/dist/local-bundle.d.ts +1 -0
  14. package/dist/{local-execute-SNWFJZVF.js → local-execute-UTLV5UDA.js} +4 -4
  15. package/dist/{local-package-graph-QAKOKW2R.js → local-package-graph-F3AJFSSG.js} +2 -2
  16. package/dist/{local-package-run-RFAIV4MZ.js → local-package-run-WMGUVB3U.js} +6 -6
  17. package/dist/{mock-local-deps-Q6GG4HKA.js → mock-local-deps-HT5NG52P.js} +4 -4
  18. package/dist/package-check-files.d.ts +10 -2
  19. package/dist/publish-builder.js +190 -6
  20. package/dist/{run-executor-J3MF4RCT.js → run-executor-N5CDFAOB.js} +2 -2
  21. package/package.json +2 -1
  22. package/dist/chunk-YBO6HUV3.js +0 -214
  23. package/dist/chunk-YBO6HUV3.js.map +0 -6
  24. /package/dist/{chunk-3G4MV7KG.js.map → chunk-6KT2QEN3.js.map} +0 -0
  25. /package/dist/{chunk-PMFY674W.js.map → chunk-GMD3RXXS.js.map} +0 -0
  26. /package/dist/{chunk-OJT47JLR.js.map → chunk-PQRALHYL.js.map} +0 -0
  27. /package/dist/{chunk-LVUVBXXK.js.map → chunk-SQKXY43O.js.map} +0 -0
  28. /package/dist/{chunk-MN5PENPF.js.map → chunk-VVXXLY65.js.map} +0 -0
  29. /package/dist/{commands-3CZ5DOQA.js.map → commands-I5EWVOJC.js.map} +0 -0
  30. /package/dist/{local-execute-SNWFJZVF.js.map → local-execute-UTLV5UDA.js.map} +0 -0
  31. /package/dist/{local-package-graph-QAKOKW2R.js.map → local-package-graph-F3AJFSSG.js.map} +0 -0
  32. /package/dist/{local-package-run-RFAIV4MZ.js.map → local-package-run-WMGUVB3U.js.map} +0 -0
  33. /package/dist/{mock-local-deps-Q6GG4HKA.js.map → mock-local-deps-HT5NG52P.js.map} +0 -0
  34. /package/dist/{run-executor-J3MF4RCT.js.map → run-executor-N5CDFAOB.js.map} +0 -0
@@ -12,7 +12,7 @@ import {
12
12
  resolveLocalPackageBinding,
13
13
  runLocalPackageModule,
14
14
  trustedDevHostFromHostedUrl
15
- } from "./chunk-LVUVBXXK.js";
15
+ } from "./chunk-SQKXY43O.js";
16
16
  import {
17
17
  publishOutsideCloudAdvice
18
18
  } from "./chunk-ZUVFYLZA.js";
@@ -21,7 +21,7 @@ import {
21
21
  forwardLocalGatewayFetchStream,
22
22
  installMockFetchShimModules,
23
23
  startLocalRuntimeBridge
24
- } from "./chunk-MN5PENPF.js";
24
+ } from "./chunk-VVXXLY65.js";
25
25
  import {
26
26
  ensureMockTarget
27
27
  } from "./chunk-Y3GXC22T.js";
@@ -35,7 +35,7 @@ import {
35
35
  cleanWorkerdStderrLine,
36
36
  startWorkerd
37
37
  } from "./chunk-PPVTGF73.js";
38
- import "./chunk-3G4MV7KG.js";
38
+ import "./chunk-6KT2QEN3.js";
39
39
  import {
40
40
  BundleError,
41
41
  bundleInputs,
@@ -43,7 +43,7 @@ import {
43
43
  createBundleError,
44
44
  formatBundleDiagnostic,
45
45
  localBundleOptions
46
- } from "./chunk-YBO6HUV3.js";
46
+ } from "./chunk-MAIWMWV7.js";
47
47
  import {
48
48
  loadPackageManifest,
49
49
  resolveExportModulePath,
@@ -62,7 +62,7 @@ import {
62
62
  resolveLocalPackageGraph,
63
63
  runSecretEnvVar,
64
64
  writePackageModuleFiles
65
- } from "./chunk-PMFY674W.js";
65
+ } from "./chunk-GMD3RXXS.js";
66
66
  import "./chunk-F6SEQDAM.js";
67
67
  import {
68
68
  formatToolResult
@@ -4953,6 +4953,7 @@ import { execFile } from "node:child_process";
4953
4953
  import { readdir as readdir4, readFile as readFile5 } from "node:fs/promises";
4954
4954
  import { isAbsolute as isAbsolute2, join as join9, relative as relative6, sep as sep4 } from "node:path";
4955
4955
  import { promisify } from "node:util";
4956
+ import ignore from "ignore";
4956
4957
  var execFileAsync = promisify(execFile);
4957
4958
  var skippedDirectories = /* @__PURE__ */ new Set(["node_modules", ".git"]);
4958
4959
  async function listGitFiles(root) {
@@ -4980,10 +4981,33 @@ async function walkFiles(root, dir = root) {
4980
4981
  }
4981
4982
  return files;
4982
4983
  }
4984
+ var kodyIgnoreFileName = ".kodyignore";
4985
+ var neverKodyIgnored = /* @__PURE__ */ new Set(["package.json", kodyIgnoreFileName]);
4986
+ function createKodyIgnoreMatcher(content) {
4987
+ if (content == null || content.trim() === "") return null;
4988
+ const matcher = ignore().add(content);
4989
+ return (relativePath) => {
4990
+ const path = relativePath.replace(/^\/+/, "");
4991
+ if (path === "" || neverKodyIgnored.has(path)) return false;
4992
+ try {
4993
+ return matcher.ignores(path);
4994
+ } catch {
4995
+ return false;
4996
+ }
4997
+ };
4998
+ }
4999
+ async function readKodyIgnore(root) {
5000
+ try {
5001
+ return await readFile5(join9(root, kodyIgnoreFileName), "utf8");
5002
+ } catch {
5003
+ return null;
5004
+ }
5005
+ }
4983
5006
  async function listPackageCheckPaths(root) {
4984
5007
  const paths = await listGitFiles(root) ?? await walkFiles(root);
5008
+ const isKodyIgnored = createKodyIgnoreMatcher(await readKodyIgnore(root));
4985
5009
  return paths.filter(
4986
- (path) => !path.split("/").some((segment) => skippedDirectories.has(segment))
5010
+ (path) => !path.split("/").some((segment) => skippedDirectories.has(segment)) && !isKodyIgnored?.(path)
4987
5011
  ).sort();
4988
5012
  }
4989
5013
  function unpublishedBundleInputPaths(input) {
@@ -5002,7 +5026,7 @@ function unpublishedBundleInputPaths(input) {
5002
5026
  return missing;
5003
5027
  }
5004
5028
  function formatUnpublishedBundleInputMessage(relativePath, options) {
5005
- const base = `${relativePath} is imported but will not be in the published snapshot (gitignored or untracked). Commit it, or generate it somewhere publish can see.`;
5029
+ const base = `${relativePath} is imported but will not be in the published snapshot (gitignored, untracked, or matched by .kodyignore). Commit it and keep it out of .kodyignore, or generate it somewhere publish can see.`;
5006
5030
  if (options?.hasPrebuild === true) {
5007
5031
  return `${base} Note: kody.dev.prebuild runs only in \`kody dev\`; publish builds the git snapshot, so commit generated output.`;
5008
5032
  }
@@ -5926,4 +5950,4 @@ export {
5926
5950
  chokidar/esm/index.js:
5927
5951
  (*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) *)
5928
5952
  */
5929
- //# sourceMappingURL=dev-command-VBAIG6EU.js.map
5953
+ //# sourceMappingURL=dev-command-TU2ZPP24.js.map