@gluhar/cli 6.0.0-next.0 → 6.0.0-next.10

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 (69) hide show
  1. package/package.json +3 -5
  2. package/src/commands/build/build.d.ts.map +1 -1
  3. package/src/commands/build/build.js +15 -3
  4. package/src/commands/generate/GenerateOptions.d.ts +2 -1
  5. package/src/commands/generate/GenerateOptions.d.ts.map +1 -1
  6. package/src/commands/generate/generateProject.d.ts.map +1 -1
  7. package/src/commands/generate/generateProject.js +3 -1
  8. package/src/commands/release/ReleaseOptions.d.ts +0 -1
  9. package/src/commands/release/ReleaseOptions.d.ts.map +1 -1
  10. package/src/commands/release/index.d.ts.map +1 -1
  11. package/src/commands/release/index.js +1 -2
  12. package/src/commands/release/publish.d.ts +5 -2
  13. package/src/commands/release/publish.d.ts.map +1 -1
  14. package/src/commands/release/publish.js +8 -13
  15. package/src/commands/release/release.js +1 -1
  16. package/src/commands/upgrade/UpgradeOptions.d.ts +2 -0
  17. package/src/commands/upgrade/UpgradeOptions.d.ts.map +1 -1
  18. package/src/commands/upgrade/index.d.ts.map +1 -1
  19. package/src/commands/upgrade/index.js +1 -0
  20. package/src/commands/upgrade/upgrade.d.ts.map +1 -1
  21. package/src/commands/upgrade/upgrade.js +81 -10
  22. package/src/scripts/cmd/executeBash.d.ts +1 -1
  23. package/src/scripts/cmd/executeBash.d.ts.map +1 -1
  24. package/src/scripts/cmd/executeBash.js +2 -1
  25. package/src/scripts/cmd/executeCmd.d.ts +1 -1
  26. package/src/scripts/cmd/executeCmd.d.ts.map +1 -1
  27. package/src/scripts/cmd/exitOnFailure.d.ts +1 -1
  28. package/src/scripts/cmd/exitOnFailure.js +1 -1
  29. package/src/scripts/cmd/parseArgs.d.ts +6 -1
  30. package/src/scripts/cmd/parseArgs.d.ts.map +1 -1
  31. package/src/scripts/cmd/parseArgs.js +10 -2
  32. package/src/scripts/cmd/parseBashArgs.d.ts +1 -1
  33. package/src/scripts/cmd/parseBashArgs.d.ts.map +1 -1
  34. package/src/scripts/cmd/parseBashArgs.js +2 -2
  35. package/src/scripts/git/branch/checkout.d.ts +1 -1
  36. package/src/scripts/git/branch/checkout.d.ts.map +1 -1
  37. package/src/scripts/git/index.d.ts +7 -7
  38. package/src/scripts/git/tag/createTag.d.ts +1 -1
  39. package/src/scripts/git/tag/createTag.d.ts.map +1 -1
  40. package/src/scripts/git/tag/pushAllTags.d.ts +1 -1
  41. package/src/scripts/git/tag/pushAllTags.d.ts.map +1 -1
  42. package/src/scripts/lerna/index.d.ts +2 -3
  43. package/src/scripts/lerna/index.d.ts.map +1 -1
  44. package/src/scripts/lerna/index.js +0 -1
  45. package/src/commands/danka/DankaOptions.d.ts +0 -4
  46. package/src/commands/danka/DankaOptions.d.ts.map +0 -1
  47. package/src/commands/danka/DankaOptions.js +0 -2
  48. package/src/commands/danka/danka.d.ts +0 -3
  49. package/src/commands/danka/danka.d.ts.map +0 -1
  50. package/src/commands/danka/danka.js +0 -8
  51. package/src/commands/danka/index.d.ts +0 -4
  52. package/src/commands/danka/index.d.ts.map +0 -1
  53. package/src/commands/danka/index.js +0 -9
  54. package/src/commands/danka/log.d.ts +0 -2
  55. package/src/commands/danka/log.d.ts.map +0 -1
  56. package/src/commands/danka/log.js +0 -5
  57. package/src/commands/kiss/KissOptions.d.ts +0 -4
  58. package/src/commands/kiss/KissOptions.d.ts.map +0 -1
  59. package/src/commands/kiss/KissOptions.js +0 -2
  60. package/src/commands/kiss/index.d.ts +0 -4
  61. package/src/commands/kiss/index.d.ts.map +0 -1
  62. package/src/commands/kiss/index.js +0 -9
  63. package/src/commands/kiss/kiss.d.ts +0 -3
  64. package/src/commands/kiss/kiss.d.ts.map +0 -1
  65. package/src/commands/kiss/kiss.js +0 -8
  66. package/src/commands/kiss/log.d.ts +0 -2
  67. package/src/commands/kiss/log.d.ts.map +0 -1
  68. package/src/commands/kiss/log.js +0 -5
  69. package/src/scripts/lerna/publish.sh +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gluhar/cli",
3
- "version": "6.0.0-next.0",
3
+ "version": "6.0.0-next.10",
4
4
  "description": "Gluhar cli commands and scripts",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,8 +8,7 @@
8
8
  "directory": "packages/cli"
9
9
  },
10
10
  "exports": {
11
- ".": "./src/index.ts",
12
- "./*": "./src/*/index.ts"
11
+ ".": "./src/index.js"
13
12
  },
14
13
  "main": "./src/index.js",
15
14
  "bin": {
@@ -50,6 +49,5 @@
50
49
  "tsc-alias": "^1.8.10",
51
50
  "tsconfig-paths": "^4.2.0",
52
51
  "typescript": "^5.5.4"
53
- },
54
- "gitHead": "8773cd99c43cbe6a7dc415e50af8b13a7b8d4daf"
52
+ }
55
53
  }
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../src/commands/build/build.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,eAAO,MAAM,KAAK,GAAI,SAAS,YAAY,SAmB1C,CAAC"}
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../src/commands/build/build.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,eAAO,MAAM,KAAK,GAAI,SAAS,YAAY,SAmC1C,CAAC"}
@@ -1,22 +1,34 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.build = void 0;
4
+ const fs_1 = require("fs");
4
5
  const cmd_1 = require("../../scripts/cmd");
5
6
  const log_1 = require("./log");
6
7
  const build = (options) => {
7
8
  const { type } = options;
8
9
  // INFO Nuxt modules need a structure of [pkg.json, dist/] to function properly where as my release script needs all pkgs to be released from a dist folder
9
10
  if (type === "module") {
11
+ // The package's own builder, not whatever `nuxt-module-build` is first on PATH: the CLI runs
12
+ // through the root workspace, whose .bin holds @nuxtjs/device's module-builder 0.8.3 (Nuxt 3).
13
+ // Every 6.0.0-next.* up to .1 was built with it instead of the declared ^1. npm only nests ^1
14
+ // under each package while that conflict lasts; once it can hoist ^1, the root bin is right.
15
+ const local = "./node_modules/.bin/nuxt-module-build";
16
+ const builder = (0, fs_1.existsSync)(local) ? local : "nuxt-module-build";
17
+ // Every module's tsconfig extends ./.nuxt/tsconfig.json, which only `prepare` generates.
18
+ // Locally `dev:prepare` has always run; on a clean CI checkout it hasn't, the build
19
+ // fails, and an empty dist used to get published (6.0.0-next.1).
20
+ log_1.log.info("Prepare nuxt module types");
21
+ (0, cmd_1.exitOnFailure)((0, cmd_1.executeCmd)(`${builder} prepare`), "nuxt-module-build prepare");
10
22
  log_1.log.info("Build nuxt module in dist");
11
- (0, cmd_1.executeCmd)("nuxt-module-build build");
23
+ (0, cmd_1.exitOnFailure)((0, cmd_1.executeCmd)(`${builder} build`), "nuxt-module-build build");
12
24
  log_1.log.info("Copy contents of dist on level down");
13
- (0, cmd_1.executeCmd)('copyfiles "dist/**/*" dist');
25
+ (0, cmd_1.exitOnFailure)((0, cmd_1.executeCmd)('copyfiles "dist/**/*" dist'), "copyfiles dist");
14
26
  // log.info("Delete the copied files");
15
27
  // executeCmd(
16
28
  // "find ./dist -mindepth 1 ! -path './dist/dist*' -exec rm -rf {} +"
17
29
  // );
18
30
  log_1.log.info("Copy pkg.json and mds to dist as well");
19
- (0, cmd_1.executeCmd)("copyfiles package.json README.md CHANGELOG.md dist");
31
+ (0, cmd_1.exitOnFailure)((0, cmd_1.executeCmd)("copyfiles package.json README.md CHANGELOG.md dist"), "copyfiles package.json");
20
32
  }
21
33
  };
22
34
  exports.build = build;
@@ -2,7 +2,8 @@ export declare const generateTypes: readonly ["project", "package", "command"];
2
2
  export type GenerateType = (typeof generateTypes)[number];
3
3
  export interface GenerateOptions {
4
4
  starter?: string;
5
- noRepo?: boolean;
5
+ /** `--no-repo` sets this to false (commander's negatable option); default true. */
6
+ repo?: boolean;
6
7
  keepHistory?: boolean;
7
8
  yes: boolean;
8
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GenerateOptions.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/GenerateOptions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,4CAA6C,CAAC;AACxE,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,GAAG,EAAE,OAAO,CAAC;CACd"}
1
+ {"version":3,"file":"GenerateOptions.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/GenerateOptions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,4CAA6C,CAAC;AACxE,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mFAAmF;IACnF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,GAAG,EAAE,OAAO,CAAC;CACd"}
@@ -1 +1 @@
1
- {"version":3,"file":"generateProject.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/generateProject.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,eAAO,MAAM,eAAe,GAC1B,MAAM,MAAM,EACZ,KAAK,MAAM,EACX,SAAS,eAAe,kBAwGzB,CAAC"}
1
+ {"version":3,"file":"generateProject.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/generateProject.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,eAAO,MAAM,eAAe,GAC1B,MAAM,MAAM,EACZ,KAAK,MAAM,EACX,SAAS,eAAe,kBA0GzB,CAAC"}
@@ -9,7 +9,9 @@ const cmd_1 = require("../../scripts/cmd");
9
9
  const utils_1 = require("../../utils");
10
10
  const generateProject = async (name, cwd, options) => {
11
11
  // `dev` is the starters' main branch; others (e.g. `mobile`) are variants.
12
- const { starter = "dev", noRepo, keepHistory, yes } = options;
12
+ const { starter = "dev", repo = true, keepHistory, yes } = options;
13
+ // `--no-repo` arrives as `repo: false`; there is no `noRepo` key
14
+ const noRepo = !repo;
13
15
  log_1.log.verbose("Check if project name is valid");
14
16
  if (!name.match(/^[a-z0-9-]+$/)) {
15
17
  log_1.log.error("Project name must be lowercase, alphanumeric, and contain hyphens only.");
@@ -1,7 +1,6 @@
1
1
  export interface ReleaseOptions {
2
2
  pre: boolean | string;
3
3
  dev: boolean;
4
- directory: string;
5
4
  yes: boolean;
6
5
  version: boolean;
7
6
  publish: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"ReleaseOptions.d.ts","sourceRoot":"","sources":["../../../../src/commands/release/ReleaseOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,OAAO,GAAG,MAAM,CAAC;IACtB,GAAG,EAAE,OAAO,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;CAC1B"}
1
+ {"version":3,"file":"ReleaseOptions.d.ts","sourceRoot":"","sources":["../../../../src/commands/release/ReleaseOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,OAAO,GAAG,MAAM,CAAC;IACtB,GAAG,EAAE,OAAO,CAAC;IACb,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;CAC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/release/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;;AAIpC,wBA6CmB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/release/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;;AAIpC,wBAwCmB"}
@@ -12,8 +12,7 @@ exports.default = new commander_1.Command()
12
12
  .option("-y, --yes", "When run with this flag, we will skip all confirmation prompts. NOTE does not currently work.", false)
13
13
  .option("--pre [id]", "Prerelease identifier. Use this when releasing a prerelease version.", false)
14
14
  .option("-d, --dev", "Release a dev version. This is a shorthand for a prerelease with a 'dev' identifier.", false)
15
- .option("--publish", "Also publish from this machine with lerna (asks for an npm OTP). Only needed for packages that aren't on npm yet, since trusted publishing can't be set up before a first publish.", false)
16
- .option("--dir, --directory <path>", "Subdirectory to publish with --publish. Must apply to ALL packages, and MUST contain a package.json file.", "dist")
15
+ .option("--publish", "Also publish from this machine with scripts/publish.mjs (npm asks for 2FA in the browser). Only needed for packages that aren't on npm yet, since trusted publishing can't be set up before a first publish.", false)
17
16
  .option("--no-version", "Disable versioning and changelog gen.")
18
17
  .option("--git-tag [tag]", [
19
18
  "Create and push git tag(s). Optionally provide a template.",
@@ -1,3 +1,6 @@
1
- import type { ReleaseOptions } from "./ReleaseOptions";
2
- export declare const publish: (options: ReleaseOptions) => void;
1
+ /**
2
+ * Publishes from this machine with the same script CI runs. Plain `npm publish` handles
3
+ * passkey 2FA in the browser, which lerna's OTP prompt can't. Run from the monorepo root.
4
+ */
5
+ export declare const publish: () => void;
3
6
  //# sourceMappingURL=publish.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../../src/commands/release/publish.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIvD,eAAO,MAAM,OAAO,GAAI,SAAS,cAAc,SAa9C,CAAC"}
1
+ {"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../../src/commands/release/publish.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,OAAO,YAInB,CAAC"}
@@ -1,20 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.publish = void 0;
4
- const lerna_1 = require("../../scripts/lerna");
5
4
  const cmd_1 = require("../../scripts/cmd");
6
5
  const log_1 = require("./log");
7
- const getPreid_1 = require("../version/getPreid");
8
- const publish = (options) => {
9
- const { yes, pre, dev, directory } = options;
10
- const distTag = dev ? "dev" : (0, getPreid_1.getPreid)(pre) ?? "latest";
11
- log_1.log.info("Dist tag:", distTag);
12
- log_1.log.info("Directory:", directory);
13
- const result = lerna_1.lerna.publish({
14
- distTag,
15
- contents: directory,
16
- yes,
17
- });
18
- (0, cmd_1.exitOnFailure)(result, "lerna publish");
6
+ /**
7
+ * Publishes from this machine with the same script CI runs. Plain `npm publish` handles
8
+ * passkey 2FA in the browser, which lerna's OTP prompt can't. Run from the monorepo root.
9
+ */
10
+ const publish = () => {
11
+ log_1.log.info("Building and publishing from this machine (npm will ask for 2FA).");
12
+ (0, cmd_1.exitOnFailure)((0, cmd_1.executeCmd)("npm run build"), "npm run build");
13
+ (0, cmd_1.exitOnFailure)((0, cmd_1.executeCmd)("node scripts/publish.mjs"), "scripts/publish.mjs");
19
14
  };
20
15
  exports.publish = publish;
@@ -19,7 +19,7 @@ const release = async (options) => {
19
19
  commit: "chore: Releasing gluhar packages.",
20
20
  });
21
21
  if (options.publish)
22
- (0, publish_1.publish)(options);
22
+ (0, publish_1.publish)();
23
23
  await (0, tag_1.tag)(options);
24
24
  if (!options.publish) {
25
25
  if (options.gitTag)
@@ -1,5 +1,7 @@
1
1
  export interface UpgradeOptions {
2
2
  /** npm dist-tag or version to install, e.g. `latest`, `next`, `6`. */
3
3
  tag: string;
4
+ /** Print the planned package.json changes without writing or installing. */
5
+ dryRun?: boolean;
4
6
  }
5
7
  //# sourceMappingURL=UpgradeOptions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UpgradeOptions.d.ts","sourceRoot":"","sources":["../../../../src/commands/upgrade/UpgradeOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,sEAAsE;IACtE,GAAG,EAAE,MAAM,CAAC;CACb"}
1
+ {"version":3,"file":"UpgradeOptions.d.ts","sourceRoot":"","sources":["../../../../src/commands/upgrade/UpgradeOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,sEAAsE;IACtE,GAAG,EAAE,MAAM,CAAC;IACZ,4EAA4E;IAC5E,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/upgrade/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;;AAGpC,wBAMmB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/upgrade/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;;AAGpC,wBAUmB"}
@@ -6,4 +6,5 @@ exports.default = new commander_1.Command()
6
6
  .name("upgrade")
7
7
  .description("Upgrade all @gluhar/* dependencies in a project, across major versions.")
8
8
  .option("-t, --tag <tag>", "npm dist-tag or version to install.", "latest")
9
+ .option("-d, --dry-run", "Print the planned package.json changes without writing or installing.")
9
10
  .action(upgrade_1.upgrade);
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../../../src/commands/upgrade/upgrade.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,eAAO,MAAM,OAAO,GAAI,SAAS,cAAc,SAiB9C,CAAC"}
1
+ {"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../../../src/commands/upgrade/upgrade.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAyClD,eAAO,MAAM,OAAO,GAAI,SAAS,cAAc,SAyE9C,CAAC"}
@@ -3,20 +3,91 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.upgrade = void 0;
4
4
  const fs_1 = require("fs");
5
5
  const path_1 = require("path");
6
+ const semver_1 = require("semver");
6
7
  const cmd_1 = require("../../scripts/cmd");
7
8
  const log_1 = require("./log");
9
+ const fields = ["dependencies", "devDependencies"];
10
+ /** The version a tag or range resolves to on npm, with that version's peers. */
11
+ const resolve = (name, tag) => {
12
+ const output = JSON.parse((0, cmd_1.getCmdOutput)(`npm view ${name}@${tag} version peerDependencies --json`));
13
+ // A single field comes back as a bare string; a range (`6`) as an array
14
+ // of matches, oldest first
15
+ const latest = Array.isArray(output) ? output[output.length - 1] : output;
16
+ return typeof latest === "string" ? { version: latest } : latest;
17
+ };
18
+ /** The version npm installed, else the lowest the range in package.json allows. */
19
+ const currentVersion = (cwd, name, range) => {
20
+ const installed = (0, path_1.join)(cwd, "node_modules", name, "package.json");
21
+ if (!(0, fs_1.existsSync)(installed))
22
+ return (0, semver_1.minVersion)(range)?.version;
23
+ const { version } = JSON.parse((0, fs_1.readFileSync)(installed).toString());
24
+ return version;
25
+ };
26
+ /** Of several ranges, the one whose lowest version is highest. */
27
+ const strictest = (ranges) => ranges.reduce((a, b) => {
28
+ const [minA, minB] = [(0, semver_1.minVersion)(a), (0, semver_1.minVersion)(b)];
29
+ return minA && minB && minB.compare(minA) > 0 ? b : a;
30
+ });
8
31
  const upgrade = (options) => {
9
- const { tag } = options;
10
- log_1.log.info(`Upgrading gluhar dependencies to "${tag}".`);
11
- const pkg = JSON.parse((0, fs_1.readFileSync)((0, path_1.join)(process.cwd(), "package.json")).toString());
12
- const names = Object.keys({
13
- ...pkg.dependencies,
14
- ...pkg.devDependencies,
15
- }).filter((name) => name.startsWith("@gluhar/"));
32
+ const { tag, dryRun } = options;
33
+ const cwd = process.cwd();
34
+ const pkgPath = (0, path_1.join)(cwd, "package.json");
35
+ const source = (0, fs_1.readFileSync)(pkgPath).toString();
36
+ const pkg = JSON.parse(source);
37
+ // The dependency map that lists `name` (dependencies or devDependencies)
38
+ const depsOf = (name) => fields
39
+ .map((field) => pkg[field])
40
+ .find((deps) => deps?.[name] !== undefined);
41
+ const names = fields
42
+ .flatMap((field) => Object.keys(pkg[field] ?? {}))
43
+ .filter((name) => name.startsWith("@gluhar/"));
16
44
  if (!names.length)
17
45
  return log_1.log.info("No @gluhar/* dependencies found.");
18
- // `npm install pkg@tag`, not `npm update`: update stays inside the semver
19
- // range already in package.json, so it can never cross a major version.
20
- (0, cmd_1.executeCmd)(`npm install ${names.map((name) => `${name}@${tag}`).join(" ")}`);
46
+ log_1.log.info(`Upgrading gluhar dependencies to "${tag}".`);
47
+ const changes = new Map();
48
+ const peerRanges = new Map();
49
+ for (const name of names) {
50
+ const { version, peerDependencies = {} } = resolve(name, tag);
51
+ changes.set(name, `^${version}`);
52
+ for (const [peer, range] of Object.entries(peerDependencies))
53
+ peerRanges.set(peer, [...(peerRanges.get(peer) ?? []), range]);
54
+ }
55
+ // A peer the project depends on directly (in practice `nuxt`) has to move in
56
+ // the same install. `npm install @gluhar/*@<tag>` alone fails with ERESOLVE:
57
+ // the old nuxt pins its own @nuxt/vite-builder exactly, so npm won't replace
58
+ // nuxt unless package.json already asks for the new range.
59
+ for (const [peer, ranges] of peerRanges) {
60
+ const deps = depsOf(peer);
61
+ if (!deps || peer.startsWith("@gluhar/"))
62
+ continue;
63
+ const current = currentVersion(cwd, peer, deps[peer]);
64
+ const opts = { includePrerelease: true };
65
+ if (current && ranges.every((range) => (0, semver_1.satisfies)(current, range, opts)))
66
+ continue;
67
+ changes.set(peer, strictest(ranges));
68
+ }
69
+ for (const [name, range] of changes) {
70
+ const deps = depsOf(name);
71
+ if (!deps || deps[name] === range)
72
+ continue;
73
+ const note = name.startsWith("@gluhar/") ? "" : " (peer of @gluhar/*)";
74
+ log_1.log.info(`${name}: ${deps[name]} -> ${range}${note}`);
75
+ deps[name] = range;
76
+ }
77
+ if (dryRun)
78
+ return log_1.log.info("Dry run: package.json not written.");
79
+ const indent = source.match(/^[ \t]+/m)?.[0] ?? " ";
80
+ (0, fs_1.writeFileSync)(pkgPath, `${JSON.stringify(pkg, null, indent)}\n`);
81
+ // A plain install with the existing lockfile: npm re-resolves only what the
82
+ // new ranges require
83
+ const result = (0, cmd_1.executeCmd)("npm install");
84
+ if (result.status !== 0) {
85
+ log_1.log.error("npm install failed. package.json already has the new ranges; if it is still ERESOLVE, delete package-lock.json and node_modules and run npm install.");
86
+ process.exit(result.status || 1);
87
+ }
88
+ const studioPkg = (0, path_1.join)(cwd, "sanity", "package.json");
89
+ if ((0, fs_1.existsSync)(studioPkg) &&
90
+ (0, fs_1.readFileSync)(studioPkg).toString().includes('"@gluhar/'))
91
+ log_1.log.info("The Studio in sanity/ has its own @gluhar/* dependencies: run `gluhar upgrade` there too.");
21
92
  };
22
93
  exports.upgrade = upgrade;
@@ -6,5 +6,5 @@ import type { Args } from './types';
6
6
  * @param absolute Flag if you are providing an absolute path.
7
7
  * @returns Executes the bash script file in the same stdio.
8
8
  */
9
- export declare const executeBash: (path: string, args?: Args, absolute?: boolean) => import("child_process").SpawnSyncReturns<Buffer>;
9
+ export declare const executeBash: (path: string, args?: Args, absolute?: boolean) => import("child_process").SpawnSyncReturns<NonSharedBuffer>;
10
10
  //# sourceMappingURL=executeBash.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"executeBash.d.ts","sourceRoot":"","sources":["../../../../src/scripts/cmd/executeBash.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,EAAE,OAAO,IAAI,EAAE,WAAW,OAAO,qDAQxE,CAAC"}
1
+ {"version":3,"file":"executeBash.d.ts","sourceRoot":"","sources":["../../../../src/scripts/cmd/executeBash.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,EAAE,OAAO,IAAI,EAAE,WAAW,OAAO,8DASxE,CAAC"}
@@ -11,7 +11,8 @@ const parseBashArgs_1 = require("./parseBashArgs");
11
11
  * @returns Executes the bash script file in the same stdio.
12
12
  */
13
13
  const executeBash = (path, args, absolute) => {
14
- const bashArgs = (0, parseBashArgs_1.parseBashArgs)(path, args, absolute);
14
+ // An argv array, not a shell line: values must not be quoted
15
+ const bashArgs = (0, parseBashArgs_1.parseBashArgs)(path, args, absolute, false);
15
16
  // TODO make stdio configurable
16
17
  // TODO make an async option
17
18
  return (0, child_process_1.spawnSync)('bash', bashArgs, {
@@ -5,5 +5,5 @@ import type { Args } from './types';
5
5
  * @param args Option flags to pass to the script: { m: 'Message', msg: 'asdf' }.
6
6
  * @returns Executes the bash script in the same stdio.
7
7
  */
8
- export declare const executeCmd: (cmd: string, args?: Args) => import("child_process").SpawnSyncReturns<Buffer>;
8
+ export declare const executeCmd: (cmd: string, args?: Args) => import("child_process").SpawnSyncReturns<NonSharedBuffer>;
9
9
  //# sourceMappingURL=executeCmd.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"executeCmd.d.ts","sourceRoot":"","sources":["../../../../src/scripts/cmd/executeCmd.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAGpC;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,EAAE,OAAO,IAAI,qDASlD,CAAC"}
1
+ {"version":3,"file":"executeCmd.d.ts","sourceRoot":"","sources":["../../../../src/scripts/cmd/executeCmd.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAGpC;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,EAAE,OAAO,IAAI,8DASlD,CAAC"}
@@ -2,7 +2,7 @@ import type { SpawnSyncReturns } from 'child_process';
2
2
  /**
3
3
  * Exits the process when a spawned command failed, so later steps don't run on a broken state.
4
4
  * @param result The return value of `executeBash` / `executeCmd`.
5
- * @param label What failed, for the error message: 'lerna publish'.
5
+ * @param label What failed, for the error message: 'lerna version'.
6
6
  */
7
7
  export declare const exitOnFailure: (result: SpawnSyncReturns<Buffer>, label: string) => void;
8
8
  //# sourceMappingURL=exitOnFailure.d.ts.map
@@ -5,7 +5,7 @@ const log_1 = require("./log");
5
5
  /**
6
6
  * Exits the process when a spawned command failed, so later steps don't run on a broken state.
7
7
  * @param result The return value of `executeBash` / `executeCmd`.
8
- * @param label What failed, for the error message: 'lerna publish'.
8
+ * @param label What failed, for the error message: 'lerna version'.
9
9
  */
10
10
  const exitOnFailure = (result, label) => {
11
11
  if (result.error) {
@@ -1,3 +1,8 @@
1
1
  import type { Args } from "./types";
2
- export declare const parseArgs: (args: Args) => string[];
2
+ /**
3
+ * @param shell The result is joined into a shell command line, so values with spaces stay
4
+ * quoted. Pass `false` for an argv array (`spawnSync` without a shell), where quotes would
5
+ * end up in the value itself.
6
+ */
7
+ export declare const parseArgs: (args: Args, shell?: boolean) => string[];
3
8
  //# sourceMappingURL=parseArgs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parseArgs.d.ts","sourceRoot":"","sources":["../../../../src/scripts/cmd/parseArgs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA+B,MAAM,SAAS,CAAC;AAQjE,eAAO,MAAM,SAAS,GAAI,MAAM,IAAI,KAAG,MAAM,EAkC5C,CAAC"}
1
+ {"version":3,"file":"parseArgs.d.ts","sourceRoot":"","sources":["../../../../src/scripts/cmd/parseArgs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA+B,MAAM,SAAS,CAAC;AAQjE;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,MAAM,IAAI,EAAE,eAAY,KAAG,MAAM,EAoC1D,CAAC"}
@@ -9,7 +9,12 @@ const hyphenize = (s) => humps_1.default.decamelize(s, { separator: "-" });
9
9
  const hasValue = (arg) => {
10
10
  return arg.value !== undefined;
11
11
  };
12
- const parseArgs = (args) => {
12
+ /**
13
+ * @param shell The result is joined into a shell command line, so values with spaces stay
14
+ * quoted. Pass `false` for an argv array (`spawnSync` without a shell), where quotes would
15
+ * end up in the value itself.
16
+ */
17
+ const parseArgs = (args, shell = true) => {
13
18
  return Object.entries(args)
14
19
  .map(([name, value]) => ({
15
20
  name,
@@ -26,7 +31,10 @@ const parseArgs = (args) => {
26
31
  result.push(`-${parsedName}`);
27
32
  }
28
33
  value.toString();
29
- if (value !== true) {
34
+ if (value !== true && !shell) {
35
+ result.push(String(value));
36
+ }
37
+ else if (value !== true) {
30
38
  let v = parsedValue;
31
39
  if (v.length > 2 &&
32
40
  v[0] === '"' &&
@@ -1,3 +1,3 @@
1
1
  import type { Args } from './types';
2
- export declare const parseBashArgs: (path: string, args?: Args, absolute?: boolean) => string[];
2
+ export declare const parseBashArgs: (path: string, args?: Args, absolute?: boolean, shell?: boolean) => string[];
3
3
  //# sourceMappingURL=parseBashArgs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parseBashArgs.d.ts","sourceRoot":"","sources":["../../../../src/scripts/cmd/parseBashArgs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAGpC,eAAO,MAAM,aAAa,GACxB,MAAM,MAAM,EACZ,OAAO,IAAI,EACX,WAAW,OAAO,aAanB,CAAC"}
1
+ {"version":3,"file":"parseBashArgs.d.ts","sourceRoot":"","sources":["../../../../src/scripts/cmd/parseBashArgs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAGpC,eAAO,MAAM,aAAa,GACxB,MAAM,MAAM,EACZ,OAAO,IAAI,EACX,WAAW,OAAO,EAClB,eAAY,aAab,CAAC"}
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.parseBashArgs = void 0;
4
4
  const log_1 = require("./log");
5
5
  const parseArgs_1 = require("./parseArgs");
6
- const parseBashArgs = (path, args, absolute) => {
6
+ const parseBashArgs = (path, args, absolute, shell = true) => {
7
7
  const filePath = path.endsWith('.sh') ? path : `${path}.sh`;
8
8
  const absolutePath = !absolute ? `${__dirname}/../${filePath}` : filePath;
9
9
  const flags = [absolutePath];
10
10
  if (args) {
11
- flags.push(...(0, parseArgs_1.parseArgs)(args));
11
+ flags.push(...(0, parseArgs_1.parseArgs)(args, shell));
12
12
  }
13
13
  log_1.log.verbose('executeBash:', flags.join(' '));
14
14
  return flags;
@@ -1,5 +1,5 @@
1
1
  export interface CheckoutOptions {
2
2
  newBranch?: boolean;
3
3
  }
4
- export declare const checkout: (branchName: string, opt?: CheckoutOptions) => import("child_process").SpawnSyncReturns<Buffer>;
4
+ export declare const checkout: (branchName: string, opt?: CheckoutOptions) => import("child_process").SpawnSyncReturns<NonSharedBuffer>;
5
5
  //# sourceMappingURL=checkout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkout.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/git/branch/checkout.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,QAAQ,GAAI,YAAY,MAAM,EAAE,MAAK,eAAoB,qDAYrE,CAAC"}
1
+ {"version":3,"file":"checkout.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/git/branch/checkout.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,QAAQ,GAAI,YAAY,MAAM,EAAE,MAAK,eAAoB,8DAYrE,CAAC"}
@@ -3,10 +3,10 @@ export declare const git: {
3
3
  openPr: (sourceBranch: string, destinationBranch: string) => void;
4
4
  getRepo: () => string;
5
5
  remoteStatus: (branch?: string, upstream?: string) => import("./remoteStatus").RemoteStatus;
6
- commit: (args: Args) => import("child_process").SpawnSyncReturns<Buffer>;
7
- push: (branchOrTag: string, remote?: string) => import("child_process").SpawnSyncReturns<Buffer>;
8
- pull: (branchName: string, remote?: string) => import("child_process").SpawnSyncReturns<Buffer>;
9
- merge: (branchName: string, y?: boolean) => import("child_process").SpawnSyncReturns<Buffer>;
6
+ commit: (args: Args) => import("child_process").SpawnSyncReturns<NonSharedBuffer>;
7
+ push: (branchOrTag: string, remote?: string) => import("child_process").SpawnSyncReturns<NonSharedBuffer>;
8
+ pull: (branchName: string, remote?: string) => import("child_process").SpawnSyncReturns<NonSharedBuffer>;
9
+ merge: (branchName: string, y?: boolean) => import("child_process").SpawnSyncReturns<NonSharedBuffer>;
10
10
  branch: {
11
11
  exists: (branchName: string) => {
12
12
  local: boolean;
@@ -14,14 +14,14 @@ export declare const git: {
14
14
  };
15
15
  delete: (branch: string, options?: import("./branch/branchDelete").BranchDeleteOptions) => void;
16
16
  getCurrent: () => import("./branch/getCurrentBranch").BranchInfo;
17
- checkout: (branchName: string, opt?: import("./branch/checkout").CheckoutOptions) => import("child_process").SpawnSyncReturns<Buffer>;
17
+ checkout: (branchName: string, opt?: import("./branch/checkout").CheckoutOptions) => import("child_process").SpawnSyncReturns<NonSharedBuffer>;
18
18
  };
19
19
  tag: {
20
20
  getAll: () => string[];
21
- create: (name: string, options?: import("./tag/createTag").TagCreateOptions) => import("child_process").SpawnSyncReturns<Buffer>;
21
+ create: (name: string, options?: import("./tag/createTag").TagCreateOptions) => import("child_process").SpawnSyncReturns<NonSharedBuffer>;
22
22
  delete: (name: string) => void;
23
23
  rename: (oldTagName: string, newTagName: string) => void;
24
- pushAll: (remote?: string) => import("child_process").SpawnSyncReturns<Buffer>;
24
+ pushAll: (remote?: string) => import("child_process").SpawnSyncReturns<NonSharedBuffer>;
25
25
  };
26
26
  clone: (repo: string, dir?: string, options?: import("./clone").CloneOptions) => void;
27
27
  };
@@ -14,5 +14,5 @@ export interface TagCreateOptions {
14
14
  * @param name The name of the tag to create.
15
15
  * @param object The object that the new tag will refer to, usually a commit. Defaults to HEAD.
16
16
  */
17
- export declare const createTag: (name: string, options?: TagCreateOptions) => import("child_process").SpawnSyncReturns<Buffer>;
17
+ export declare const createTag: (name: string, options?: TagCreateOptions) => import("child_process").SpawnSyncReturns<NonSharedBuffer>;
18
18
  //# sourceMappingURL=createTag.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createTag.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/git/tag/createTag.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,EAAE,UAAS,gBAAqB,qDAOrE,CAAC"}
1
+ {"version":3,"file":"createTag.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/git/tag/createTag.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,EAAE,UAAS,gBAAqB,8DAOrE,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const pushAllTags: (remote?: string) => import("child_process").SpawnSyncReturns<Buffer>;
1
+ export declare const pushAllTags: (remote?: string) => import("child_process").SpawnSyncReturns<NonSharedBuffer>;
2
2
  //# sourceMappingURL=pushAllTags.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pushAllTags.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/git/tag/pushAllTags.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,GAAI,eAAiB,qDAGzC,CAAC"}
1
+ {"version":3,"file":"pushAllTags.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/git/tag/pushAllTags.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,GAAI,eAAiB,8DAGzC,CAAC"}
@@ -2,9 +2,8 @@ import { getDependencies } from './getDependencies';
2
2
  import { filterByDependency } from './filterByDependency';
3
3
  import type { Args } from '../cmd/types';
4
4
  export declare const lerna: {
5
- version: (args?: Args) => import("child_process").SpawnSyncReturns<Buffer>;
6
- publish: (args?: Args) => import("child_process").SpawnSyncReturns<Buffer>;
7
- list: (args?: Args) => import("child_process").SpawnSyncReturns<Buffer>;
5
+ version: (args?: Args) => import("child_process").SpawnSyncReturns<NonSharedBuffer>;
6
+ list: (args?: Args) => import("child_process").SpawnSyncReturns<NonSharedBuffer>;
8
7
  changed: () => import("./types").LernaPackage[];
9
8
  getConfig: () => import("./types").LernaConfig | null;
10
9
  getDependencies: typeof getDependencies;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/scripts/lerna/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,KAAK;qBACC,IAAI;qBACJ,IAAI;kBACP,IAAI;;;;;;CAMnB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/scripts/lerna/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,KAAK;qBACC,IAAI;kBACP,IAAI;;;;;;CAMnB,CAAC"}
@@ -9,7 +9,6 @@ const filterByDependency_1 = require("./filterByDependency");
9
9
  const getDetails_1 = require("./getDetails");
10
10
  exports.lerna = {
11
11
  version: (args) => (0, cmd_1.executeBash)('lerna/version', args),
12
- publish: (args) => (0, cmd_1.executeBash)('lerna/publish', args),
13
12
  list: (args) => (0, cmd_1.executeBash)('lerna/list', args),
14
13
  changed: changed_1.changed,
15
14
  getConfig: getConfig_1.getConfig,
@@ -1,4 +0,0 @@
1
- export interface DankaOptions {
2
- danka: boolean;
3
- }
4
- //# sourceMappingURL=DankaOptions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DankaOptions.d.ts","sourceRoot":"","sources":["../../../../src/commands/danka/DankaOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,OAAO,CAAC;CAChB"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +0,0 @@
1
- import { DankaOptions } from "./DankaOptions";
2
- export declare const danka: (options: DankaOptions) => void;
3
- //# sourceMappingURL=danka.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"danka.d.ts","sourceRoot":"","sources":["../../../../src/commands/danka/danka.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,eAAO,MAAM,KAAK,YAAa,YAAY,SAE1C,CAAC"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.danka = void 0;
4
- const log_1 = require("./log");
5
- const danka = (options) => {
6
- log_1.log.info("danka", options);
7
- };
8
- exports.danka = danka;
@@ -1,4 +0,0 @@
1
- import { Command } from "commander";
2
- declare const _default: Command;
3
- export default _default;
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/danka/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;;AAGpC,wBAIiB"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const commander_1 = require("commander");
4
- const danka_1 = require("./danka");
5
- exports.default = new commander_1.Command()
6
- .name("danka")
7
- .description("Description of command.")
8
- .option("-b, --danka", "A boolean option.")
9
- .action(danka_1.danka);
@@ -1,2 +0,0 @@
1
- export declare const log: import("../../utils").Logger;
2
- //# sourceMappingURL=log.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../src/commands/danka/log.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,4BAAkB,CAAC"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.log = void 0;
4
- const utils_1 = require("../../utils");
5
- exports.log = (0, utils_1.logger)("danka");
@@ -1,4 +0,0 @@
1
- export interface KissOptions {
2
- kiss: boolean;
3
- }
4
- //# sourceMappingURL=KissOptions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"KissOptions.d.ts","sourceRoot":"","sources":["../../../../src/commands/kiss/KissOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,CAAC;CACf"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- import { Command } from "commander";
2
- declare const _default: Command;
3
- export default _default;
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/kiss/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;;AAGpC,wBAIgB"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const commander_1 = require("commander");
4
- const kiss_1 = require("./kiss");
5
- exports.default = new commander_1.Command()
6
- .name("kiss")
7
- .description("Description of command.")
8
- .option("-b, --kiss", "A boolean option.")
9
- .action(kiss_1.kiss);
@@ -1,3 +0,0 @@
1
- import { KissOptions } from "./KissOptions";
2
- export declare const kiss: (options: KissOptions) => void;
3
- //# sourceMappingURL=kiss.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kiss.d.ts","sourceRoot":"","sources":["../../../../src/commands/kiss/kiss.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,eAAO,MAAM,IAAI,YAAa,WAAW,SAExC,CAAC"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.kiss = void 0;
4
- const log_1 = require("./log");
5
- const kiss = (options) => {
6
- log_1.log.info("kiss", options);
7
- };
8
- exports.kiss = kiss;
@@ -1,2 +0,0 @@
1
- export declare const log: import("../../utils").Logger;
2
- //# sourceMappingURL=log.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../src/commands/kiss/log.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,4BAAiB,CAAC"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.log = void 0;
4
- const utils_1 = require("../../utils");
5
- exports.log = (0, utils_1.logger)("kiss");
@@ -1 +0,0 @@
1
- npx lerna publish from-package "$@"