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

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 (39) hide show
  1. package/package.json +2 -3
  2. package/src/commands/release/ReleaseOptions.d.ts +0 -1
  3. package/src/commands/release/ReleaseOptions.d.ts.map +1 -1
  4. package/src/commands/release/index.d.ts.map +1 -1
  5. package/src/commands/release/index.js +1 -2
  6. package/src/commands/release/publish.d.ts +5 -2
  7. package/src/commands/release/publish.d.ts.map +1 -1
  8. package/src/commands/release/publish.js +8 -13
  9. package/src/commands/release/release.js +1 -1
  10. package/src/scripts/cmd/exitOnFailure.d.ts +1 -1
  11. package/src/scripts/cmd/exitOnFailure.js +1 -1
  12. package/src/scripts/lerna/index.d.ts +0 -1
  13. package/src/scripts/lerna/index.d.ts.map +1 -1
  14. package/src/scripts/lerna/index.js +0 -1
  15. package/src/commands/danka/DankaOptions.d.ts +0 -4
  16. package/src/commands/danka/DankaOptions.d.ts.map +0 -1
  17. package/src/commands/danka/DankaOptions.js +0 -2
  18. package/src/commands/danka/danka.d.ts +0 -3
  19. package/src/commands/danka/danka.d.ts.map +0 -1
  20. package/src/commands/danka/danka.js +0 -8
  21. package/src/commands/danka/index.d.ts +0 -4
  22. package/src/commands/danka/index.d.ts.map +0 -1
  23. package/src/commands/danka/index.js +0 -9
  24. package/src/commands/danka/log.d.ts +0 -2
  25. package/src/commands/danka/log.d.ts.map +0 -1
  26. package/src/commands/danka/log.js +0 -5
  27. package/src/commands/kiss/KissOptions.d.ts +0 -4
  28. package/src/commands/kiss/KissOptions.d.ts.map +0 -1
  29. package/src/commands/kiss/KissOptions.js +0 -2
  30. package/src/commands/kiss/index.d.ts +0 -4
  31. package/src/commands/kiss/index.d.ts.map +0 -1
  32. package/src/commands/kiss/index.js +0 -9
  33. package/src/commands/kiss/kiss.d.ts +0 -3
  34. package/src/commands/kiss/kiss.d.ts.map +0 -1
  35. package/src/commands/kiss/kiss.js +0 -8
  36. package/src/commands/kiss/log.d.ts +0 -2
  37. package/src/commands/kiss/log.d.ts.map +0 -1
  38. package/src/commands/kiss/log.js +0 -5
  39. 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.1",
4
4
  "description": "Gluhar cli commands and scripts",
5
5
  "repository": {
6
6
  "type": "git",
@@ -50,6 +50,5 @@
50
50
  "tsc-alias": "^1.8.10",
51
51
  "tsconfig-paths": "^4.2.0",
52
52
  "typescript": "^5.5.4"
53
- },
54
- "gitHead": "8773cd99c43cbe6a7dc415e50af8b13a7b8d4daf"
53
+ }
55
54
  }
@@ -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)
@@ -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) {
@@ -3,7 +3,6 @@ import { filterByDependency } from './filterByDependency';
3
3
  import type { Args } from '../cmd/types';
4
4
  export declare const lerna: {
5
5
  version: (args?: Args) => import("child_process").SpawnSyncReturns<Buffer>;
6
- publish: (args?: Args) => import("child_process").SpawnSyncReturns<Buffer>;
7
6
  list: (args?: Args) => import("child_process").SpawnSyncReturns<Buffer>;
8
7
  changed: () => import("./types").LernaPackage[];
9
8
  getConfig: () => import("./types").LernaConfig | null;
@@ -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 "$@"