@keystrokehq/cli 0.0.139 → 0.0.140

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/index.mjs CHANGED
@@ -7842,9 +7842,20 @@ async function confirmTargetDir(targetDir) {
7842
7842
  });
7843
7843
  }
7844
7844
  //#endregion
7845
+ //#region src/init/catalog-versions.ts
7846
+ const INIT_CATALOG_VERSIONS = {
7847
+ zod: "^4.4.3",
7848
+ oxlint: "^1.66.0",
7849
+ typescript: "^6.0.3",
7850
+ vitest: "^4.1.7",
7851
+ "@types/node": "^25.9.1"
7852
+ };
7853
+ //#endregion
7845
7854
  //#region src/init/copy-template.ts
7846
7855
  function renderTemplate(content, variables) {
7847
- return content.replaceAll("{{projectName}}", variables.projectName).replaceAll("{{version}}", variables.version);
7856
+ let rendered = content.replaceAll("{{projectName}}", variables.projectName).replaceAll("{{version}}", variables.version);
7857
+ for (const [dep, version] of Object.entries(INIT_CATALOG_VERSIONS)) rendered = rendered.replaceAll(`{{catalog:${dep}}}`, version);
7858
+ return rendered;
7848
7859
  }
7849
7860
  async function copyEntry(sourcePath, targetPath, variables) {
7850
7861
  if ((await stat(sourcePath)).isDirectory()) {
@@ -7882,6 +7893,7 @@ function linkSpec(fromDir, toDir) {
7882
7893
  const path = relative(fromDir, toDir);
7883
7894
  return `link:${path.startsWith(".") ? path : `./${path}`}`;
7884
7895
  }
7896
+ /** Monorepo playground only (`KEYSTROKE_DEV` + `playground/`). Distributed init uses copyTemplate. */
7885
7897
  function buildPlaygroundPackageJson(projectName, targetDir, monorepoRoot) {
7886
7898
  return `${JSON.stringify({
7887
7899
  name: projectName,
@@ -7904,15 +7916,15 @@ function buildPlaygroundPackageJson(projectName, targetDir, monorepoRoot) {
7904
7916
  "@keystrokehq/google": linkSpec(targetDir, join(monorepoRoot, "packages/integrations/google")),
7905
7917
  "@keystrokehq/slack": linkSpec(targetDir, join(monorepoRoot, "packages/integrations/slack")),
7906
7918
  "@keystrokehq/workflow": linkSpec(targetDir, join(monorepoRoot, "packages/workflow")),
7907
- zod: "^4.4.3"
7919
+ zod: INIT_CATALOG_VERSIONS.zod
7908
7920
  },
7909
7921
  devDependencies: {
7910
7922
  "@keystrokehq/cli": linkSpec(targetDir, join(monorepoRoot, "apps/cli")),
7911
7923
  "@keystrokehq/tsconfig": linkSpec(targetDir, join(monorepoRoot, "packages/tsconfig")),
7912
- "@types/node": "^25.9.1",
7913
- oxlint: "^1.66.0",
7914
- typescript: "^6.0.3",
7915
- vitest: "^4.1.7"
7924
+ "@types/node": INIT_CATALOG_VERSIONS["@types/node"],
7925
+ oxlint: INIT_CATALOG_VERSIONS.oxlint,
7926
+ typescript: INIT_CATALOG_VERSIONS.typescript,
7927
+ vitest: INIT_CATALOG_VERSIONS.vitest
7916
7928
  }
7917
7929
  }, null, 2)}\n`;
7918
7930
  }