@gluhar/cli 2.6.4 → 2.7.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gluhar/cli",
3
- "version": "2.6.4",
3
+ "version": "2.7.0",
4
4
  "description": "Gluhar cli commands and scripts",
5
5
  "exports": {
6
6
  ".": "./src/index.ts",
@@ -44,5 +44,5 @@
44
44
  "tsconfig-paths": "^4.2.0",
45
45
  "typescript": "^5.5.4"
46
46
  },
47
- "gitHead": "1e0d0c0edc65aa583b13cb05c100f8afb73911df"
47
+ "gitHead": "d8ca855e9f08accf39a898af2ebb8da72827ec98"
48
48
  }
@@ -1,7 +1,7 @@
1
1
  export declare const generateTypes: readonly ["project", "package", "command"];
2
2
  export type GenerateType = (typeof generateTypes)[number];
3
3
  export interface GenerateOptions {
4
- starterBranch?: string;
4
+ starter?: string;
5
5
  noRepo?: boolean;
6
6
  keepHistory?: boolean;
7
7
  yes: boolean;
@@ -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,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,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,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,GAAG,EAAE,OAAO,CAAC;CACd"}
@@ -7,7 +7,7 @@ const log_1 = require("./log");
7
7
  const cmd_1 = require("../../scripts/cmd");
8
8
  const utils_1 = require("../../utils");
9
9
  const generateProject = async (name, cwd, options) => {
10
- const { starterBranch = "base", noRepo, keepHistory, yes } = options;
10
+ const { starter = "base", noRepo, keepHistory, yes } = options;
11
11
  log_1.log.verbose("Check if project name is valid");
12
12
  if (!name.match(/^[a-z0-9-]+$/)) {
13
13
  log_1.log.error("Project name must be lowercase, alphanumeric, and contain hyphens only.");
@@ -41,7 +41,7 @@ const generateProject = async (name, cwd, options) => {
41
41
  log_1.log.verbose("Skipping gh verification");
42
42
  }
43
43
  log_1.log.verbose("Cloning gluhar project template");
44
- git_1.git.clone("gluharry/starters", name, { branch: starterBranch });
44
+ git_1.git.clone("gluharry/starters", name, { branch: starter });
45
45
  cmd_1.cmd.cd(name);
46
46
  log_1.log.verbose("Replacing gluhar-app with project's name");
47
47
  await filesystem_1.filesystem.copyFiles([
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;;AAIpC,wBAUoB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;;AAIpC,wBAcoB"}
@@ -8,6 +8,7 @@ exports.default = new commander_1.Command()
8
8
  .argument("<type>", "What to generate.")
9
9
  .argument("<name>", "Name of generated thing.")
10
10
  .description(`Generate a ${GenerateOptions_1.generateTypes.join(", ")}.`)
11
+ .option("--starter <branchName>", "When generating a project, which starter template to use: base, mobile.")
11
12
  .option("-nr, --no-repo", "Do not create a github repo automatically.")
12
13
  .option("-kh, --keep-history", "Keep commit history from the starter template.")
13
14
  .action(generate_1.generate);
@@ -1 +1 @@
1
- {"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../../src/commands/release/release.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKvD,eAAO,MAAM,OAAO,YAAmB,cAAc,kBAepD,CAAC"}
1
+ {"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../../src/commands/release/release.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKvD,eAAO,MAAM,OAAO,YAAmB,cAAc,kBAiBpD,CAAC"}
@@ -7,11 +7,14 @@ const publish_1 = require("./publish");
7
7
  const tag_1 = require("./tag");
8
8
  const release = async (options) => {
9
9
  log_1.log.info("Initiating release...");
10
- const { pre, dev } = options;
10
+ const { pre, dev, yes } = options;
11
+ if (yes)
12
+ log_1.log.info("and saying yes to all prompts.");
11
13
  if (options.version)
12
14
  await (0, version_1.version)({
13
15
  pre,
14
16
  dev,
17
+ yes,
15
18
  changelog: !dev,
16
19
  commit: "chore: Releasing gluhar packages.",
17
20
  });
@@ -3,5 +3,6 @@ export interface VersionOptions {
3
3
  dev: boolean;
4
4
  changelog: boolean;
5
5
  commit: boolean | string;
6
+ yes?: boolean;
6
7
  }
7
8
  //# sourceMappingURL=VersionOptions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VersionOptions.d.ts","sourceRoot":"","sources":["../../../../src/commands/version/VersionOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,OAAO,GAAG,MAAM,CAAC;IACtB,GAAG,EAAE,OAAO,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;CAC1B"}
1
+ {"version":3,"file":"VersionOptions.d.ts","sourceRoot":"","sources":["../../../../src/commands/version/VersionOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,OAAO,GAAG,MAAM,CAAC;IACtB,GAAG,EAAE,OAAO,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../../src/commands/version/version.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKvD,eAAO,MAAM,OAAO,YAAmB,cAAc,kBAwBpD,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../../src/commands/version/version.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKvD,eAAO,MAAM,OAAO,YAAmB,cAAc,kBAyBpD,CAAC"}
@@ -7,7 +7,7 @@ const log_1 = require("./log");
7
7
  const getPreid_1 = require("./getPreid");
8
8
  const pimpChangelogs_1 = require("./pimpChangelogs");
9
9
  const version = async (options) => {
10
- const { pre, dev, changelog, commit } = options;
10
+ const { pre, dev, changelog, commit, yes } = options;
11
11
  lerna_1.lerna.version({
12
12
  conventionalCommits: true,
13
13
  conventionalGraduate: (!dev && !pre) || undefined,
@@ -18,6 +18,7 @@ const version = async (options) => {
18
18
  private: false,
19
19
  push: false,
20
20
  changelog,
21
+ yes,
21
22
  });
22
23
  if (changelog)
23
24
  await (0, pimpChangelogs_1.pimpChangelogs)();