@eik/cli 3.1.3 → 3.1.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 (84) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/classes/alias.js +109 -119
  3. package/classes/index.js +58 -58
  4. package/classes/integrity.js +89 -97
  5. package/classes/login.js +47 -47
  6. package/classes/meta.js +75 -80
  7. package/classes/ping.js +53 -53
  8. package/classes/publish/map.js +90 -92
  9. package/classes/publish/package/index.js +130 -130
  10. package/classes/publish/package/tasks/check-bundle-sizes.js +19 -21
  11. package/classes/publish/package/tasks/check-if-already-published.js +67 -72
  12. package/classes/publish/package/tasks/cleanup.js +17 -17
  13. package/classes/publish/package/tasks/create-temp-directory.js +17 -17
  14. package/classes/publish/package/tasks/create-zip-file.js +60 -65
  15. package/classes/publish/package/tasks/dry-run.js +15 -15
  16. package/classes/publish/package/tasks/save-metafile.js +17 -17
  17. package/classes/publish/package/tasks/task.js +7 -7
  18. package/classes/publish/package/tasks/upload-files.js +52 -56
  19. package/classes/publish/package/tasks/validate-input.js +24 -24
  20. package/classes/version.js +152 -163
  21. package/commands/alias.js +61 -95
  22. package/commands/init.js +89 -109
  23. package/commands/integrity.js +42 -55
  24. package/commands/login.js +80 -101
  25. package/commands/map-alias.js +62 -82
  26. package/commands/map.js +69 -83
  27. package/commands/meta.js +36 -53
  28. package/commands/npm-alias.js +55 -80
  29. package/commands/package-alias.js +58 -90
  30. package/commands/ping.js +19 -30
  31. package/commands/publish.js +117 -127
  32. package/commands/version.js +87 -95
  33. package/formatters/alias.js +60 -63
  34. package/formatters/artifact.js +77 -77
  35. package/formatters/file.js +25 -25
  36. package/formatters/index.js +4 -4
  37. package/formatters/version.js +49 -51
  38. package/index.js +76 -72
  39. package/package.json +5 -4
  40. package/readme.md +1 -1
  41. package/types/classes/alias.d.ts +3 -3
  42. package/types/classes/integrity.d.ts +1 -1
  43. package/types/classes/login.d.ts +1 -1
  44. package/types/classes/meta.d.ts +1 -1
  45. package/types/classes/ping.d.ts +1 -1
  46. package/types/classes/publish/map.d.ts +1 -1
  47. package/types/classes/publish/package/index.d.ts +11 -11
  48. package/types/classes/publish/package/tasks/check-bundle-sizes.d.ts +1 -1
  49. package/types/classes/publish/package/tasks/check-if-already-published.d.ts +1 -1
  50. package/types/classes/publish/package/tasks/cleanup.d.ts +1 -1
  51. package/types/classes/publish/package/tasks/create-temp-directory.d.ts +1 -1
  52. package/types/classes/publish/package/tasks/create-zip-file.d.ts +1 -1
  53. package/types/classes/publish/package/tasks/dry-run.d.ts +1 -1
  54. package/types/classes/publish/package/tasks/save-metafile.d.ts +1 -1
  55. package/types/classes/publish/package/tasks/task.d.ts +1 -1
  56. package/types/classes/publish/package/tasks/upload-files.d.ts +1 -1
  57. package/types/classes/publish/package/tasks/validate-input.d.ts +1 -1
  58. package/types/classes/version.d.ts +3 -3
  59. package/types/utils/defaults.d.ts +22 -0
  60. package/types/utils/error.d.ts +19 -0
  61. package/types/utils/hash/index.d.ts +3 -3
  62. package/types/utils/http/index.d.ts +4 -4
  63. package/types/utils/index.d.ts +5 -5
  64. package/types/utils/json/index.d.ts +3 -3
  65. package/utils/command-handler.js +72 -0
  66. package/utils/defaults.js +79 -0
  67. package/utils/error.js +42 -0
  68. package/utils/hash/file.js +4 -4
  69. package/utils/hash/files.js +9 -9
  70. package/utils/hash/index.js +3 -3
  71. package/utils/http/index.js +4 -4
  72. package/utils/http/integrity.js +18 -18
  73. package/utils/http/latest-version.js +37 -37
  74. package/utils/http/request.js +42 -42
  75. package/utils/http/versions.js +20 -20
  76. package/utils/index.js +6 -5
  77. package/utils/json/index.js +3 -3
  78. package/utils/json/read.js +26 -26
  79. package/utils/json/write-eik.js +17 -17
  80. package/utils/json/write.js +26 -28
  81. package/utils/logger.js +43 -43
  82. package/utils/type-title.js +3 -3
  83. package/utils/url.js +2 -2
  84. package/commands/index.js +0 -27
@@ -1,61 +1,59 @@
1
- import { join } from 'path';
2
- import chalk from 'chalk';
3
- import { formatDistance } from 'date-fns/formatDistance';
4
- import File from './file.js';
1
+ import { join } from "path";
2
+ import chalk from "chalk";
3
+ import { formatDistance } from "date-fns/formatDistance";
4
+ import File from "./file.js";
5
5
 
6
6
  class Version {
7
- constructor({
8
- version = '',
9
- integrity = '',
10
- author = {},
11
- created = null,
12
- type = '',
13
- name = '',
14
- org = '',
15
- files = [],
16
- meta = [],
17
- } = {}) {
18
- this.version = version;
19
- this.integrity = integrity;
20
- this.author = author;
21
- this.created = created;
22
- this.type = type;
23
- this.name = name;
24
- this.org = org;
25
- this.files = files;
26
- this.meta = meta;
27
- }
7
+ constructor({
8
+ version = "",
9
+ integrity = "",
10
+ author = {},
11
+ created = null,
12
+ type = "",
13
+ name = "",
14
+ org = "",
15
+ files = [],
16
+ meta = [],
17
+ } = {}) {
18
+ this.version = version;
19
+ this.integrity = integrity;
20
+ this.author = author;
21
+ this.created = created;
22
+ this.type = type;
23
+ this.name = name;
24
+ this.org = org;
25
+ this.files = files;
26
+ this.meta = meta;
27
+ }
28
28
 
29
- format(baseURL = '') {
30
- const write = process.stdout.write.bind(process.stdout);
31
- const url = new URL(baseURL);
32
- const bURL = new URL(join(url.pathname, this.version), url.origin);
29
+ format(baseURL = "") {
30
+ const write = process.stdout.write.bind(process.stdout);
31
+ const url = new URL(baseURL);
32
+ const bURL = new URL(join(url.pathname, this.version), url.origin);
33
33
 
34
- write(` - ${chalk.green(this.version)}\n`);
35
- write(` ${chalk.bold('url:')} ${chalk.cyan(bURL.href)}\n`);
36
- write(` ${chalk.bold('integrity:')} ${this.integrity}\n`);
34
+ write(` - ${chalk.green(this.version)}\n`);
35
+ write(` ${chalk.bold("url:")} ${chalk.cyan(bURL.href)}\n`);
36
+ write(` ${chalk.bold("integrity:")} ${this.integrity}\n`);
37
37
 
38
- if (this.files && this.files.length) {
39
- write(`\n ${chalk.bold('files:')}\n`);
40
- for (const file of this.files) {
41
- new File(file).format(bURL.href);
42
- write(`\n`);
43
- }
44
- }
38
+ if (this.files && this.files.length) {
39
+ write(`\n ${chalk.bold("files:")}\n`);
40
+ for (const file of this.files) {
41
+ new File(file).format(bURL.href);
42
+ write(`\n`);
43
+ }
44
+ }
45
45
 
46
- if (this.created) {
47
- const d = formatDistance(
48
- new Date(this.created * 1000),
49
- new Date(),
50
- { addSuffix: true },
51
- );
52
- write(` ${chalk.bold('published')} ${chalk.yellow(d)}`);
53
- }
46
+ if (this.created) {
47
+ const d = formatDistance(new Date(this.created * 1000), new Date(), {
48
+ addSuffix: true,
49
+ });
50
+ write(` ${chalk.bold("published")} ${chalk.yellow(d)}`);
51
+ }
54
52
 
55
- if (this.author && this.author.name) {
56
- write(` ${chalk.bold('by')} ${chalk.yellow(this.author.name)}`);
57
- }
58
- }
53
+ if (this.author && this.author.name) {
54
+ write(` ${chalk.bold("by")} ${chalk.yellow(this.author.name)}`);
55
+ }
56
+ }
59
57
  }
60
58
 
61
59
  export default Version;
package/index.js CHANGED
@@ -1,84 +1,88 @@
1
1
  #!/usr/bin/env node
2
- import chalk from 'chalk';
3
- import yargs from 'yargs';
4
- import { hideBin } from 'yargs/helpers';
5
- import boxen from 'boxen';
6
- import { join } from 'path';
7
- import { readFileSync } from 'fs';
8
- import { fileURLToPath } from 'url';
9
- import { dirname } from 'path';
10
- import { commands } from './commands/index.js';
2
+ import yargs from "yargs";
3
+ import { hideBin } from "yargs/helpers";
4
+ import { join } from "path";
5
+ import { readFileSync } from "fs";
6
+ import { fileURLToPath } from "url";
7
+ import { dirname } from "path";
8
+
9
+ import * as alias from "./commands/alias.js";
10
+ import * as init from "./commands/init.js";
11
+ import * as integrity from "./commands/integrity.js";
12
+ import * as login from "./commands/login.js";
13
+ import * as mapAlias from "./commands/map-alias.js";
14
+ import * as map from "./commands/map.js";
15
+ import * as meta from "./commands/meta.js";
16
+ import * as npmAlias from "./commands/npm-alias.js";
17
+ import * as packageAlias from "./commands/package-alias.js";
18
+ import * as ping from "./commands/ping.js";
19
+ import * as publish from "./commands/publish.js";
20
+ import * as version from "./commands/version.js";
11
21
 
12
22
  const __filename = fileURLToPath(import.meta.url);
13
23
  const __dirname = dirname(__filename);
14
24
 
15
- const { version } = JSON.parse(
16
- readFileSync(join(__dirname, './package.json'), { encoding: 'utf-8' }),
25
+ const { version: cliVersion } = JSON.parse(
26
+ readFileSync(join(__dirname, "./package.json"), { encoding: "utf-8" }),
17
27
  );
18
28
 
19
- // short circuit and provide a -v and --version flag
29
+ // Short circuit and provide a -v and --version flag.
30
+ // It's a known limitation in yargs that you can't have both a command
31
+ // and an option named version https://github.com/yargs/yargs/issues/2064
32
+ // We use the version name as a command in yargs, so handle the version
33
+ // option before using yargs.
20
34
  if (
21
- process.argv.includes('-v') ||
22
- // last position only to avoid conflict with publish command
23
- process.argv[process.argv.length - 1].includes('--version')
35
+ process.argv.includes("-v") ||
36
+ // last position only to avoid conflict with publish command
37
+ process.argv[process.argv.length - 1].includes("--version")
24
38
  ) {
25
- console.log(version);
26
- process.exit(0);
39
+ console.log(cliVersion);
40
+ process.exit(0);
27
41
  }
28
42
 
29
- const greeting = chalk.white.bold(`Eik CLI (v${version})`);
30
-
31
- const boxenOptions = {
32
- padding: 1,
33
- margin: 1,
34
- borderStyle: 'round',
35
- borderColor: 'green',
36
- backgroundColor: '#555555',
37
- };
38
- // @ts-expect-error
39
- const msgBox = boxen(greeting, boxenOptions);
40
-
41
- console.log(msgBox);
42
-
43
43
  yargs(hideBin(process.argv))
44
- .options({
45
- config: {
46
- alias: 'c',
47
- describe:
48
- 'Provide an exact path to an eik.json or package.json file to use as config. Default is eik.json in the current working directory.',
49
- },
50
- cwd: {
51
- describe: 'Alter the current working directory.',
52
- default: process.cwd(),
53
- },
54
- debug: {
55
- describe: 'Logs additional messages',
56
- default: false,
57
- type: 'boolean',
58
- },
59
- })
60
- // @ts-expect-error
61
- .example('eik init')
62
- // @ts-expect-error
63
- .example('eik login --server https://assets.myserver.com --key ######')
64
- // @ts-expect-error
65
- .example('eik publish')
66
- // @ts-expect-error
67
- .example('eik meta my-app --server https://assets.myserver.com')
68
- .example(
69
- // @ts-expect-error
70
- 'eik npm-alias lit-html 1.0.0 1 --server https://assets.myserver.com --token ######',
71
- )
72
- .example(
73
- // @ts-expect-error
74
- 'eik map my-map 1.0.0 ./import-map.json --server https://assets.myserver.com --token ######',
75
- )
76
- // @ts-expect-error
77
- .example('eik map-alias my-map 1.0.0 1')
78
- // @ts-expect-error
79
- .command(commands)
80
- .demandCommand()
81
- .wrap(150)
82
- .version(false)
83
- .help()
84
- .parse();
44
+ .scriptName("eik")
45
+ // inspired by git
46
+ .usage(
47
+ `usage: $0 [-v | --version] [-h | --help] [-c <path> | --config <path>]
48
+ [--cwd <path>] [--debug] <command> [<args>]`,
49
+ )
50
+ .epilogue(
51
+ `Run $0 <command> --help to read more about a specific subcommand.
52
+
53
+ For a more detailed description of commands and options, see the reference documentation:
54
+ https://eik.dev/cli`,
55
+ )
56
+ .options({
57
+ config: {
58
+ alias: "c",
59
+ describe: "Path to Eik configuration file (eik.json or package.json)",
60
+ },
61
+ cwd: {
62
+ describe: "Path to a different working directory than the current",
63
+ },
64
+ debug: {
65
+ describe: "Show additional logs",
66
+ type: "boolean",
67
+ },
68
+ })
69
+ .command([
70
+ alias,
71
+ init,
72
+ integrity,
73
+ login,
74
+ map,
75
+ mapAlias,
76
+ meta,
77
+ npmAlias,
78
+ packageAlias,
79
+ ping,
80
+ publish,
81
+ version,
82
+ ])
83
+ .demandCommand()
84
+ .wrap(null)
85
+ .version(false) // Turn off the built-in version option to not conflict with the version command
86
+ .help()
87
+ .alias("h", "help")
88
+ .parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eik/cli",
3
- "version": "3.1.3",
3
+ "version": "3.1.5",
4
4
  "description": "CLI tool for publishing assets to an Eik server",
5
5
  "main": "./classes/index.js",
6
6
  "types": "./types/classes/index.d.ts",
@@ -21,7 +21,7 @@
21
21
  ],
22
22
  "scripts": {
23
23
  "clean": "rimraf .tap node_modules types",
24
- "test": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 0 --disable-coverage test/**/*.test.mjs",
24
+ "test": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 0 --disable-coverage",
25
25
  "test:integration": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 0 --disable-coverage test/integration/**/*.test.mjs",
26
26
  "test:unit": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 0 --disable-coverage test/*.test.mjs",
27
27
  "test:tasks": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 0 --disable-coverage test/tasks/*.test.mjs",
@@ -40,14 +40,13 @@
40
40
  "dependencies": {
41
41
  "@eik/common": "4.1.1",
42
42
  "abslog": "2.4.4",
43
- "boxen": "8.0.1",
44
43
  "bytes": "3.1.2",
45
44
  "chalk": "5.3.0",
46
45
  "date-fns": "3.6.0",
47
46
  "form-data": "4.0.0",
48
47
  "gzip-size": "7.0.0",
49
48
  "make-dir": "5.0.0",
50
- "ora": "8.0.1",
49
+ "ora": "8.1.0",
51
50
  "rimraf": "6.0.1",
52
51
  "semver": "7.6.3",
53
52
  "ssri": "10.0.6",
@@ -57,10 +56,12 @@
57
56
  },
58
57
  "devDependencies": {
59
58
  "@eik/eslint-config": "1.0.2",
59
+ "@eik/prettier-config": "1.0.1",
60
60
  "@eik/semantic-release-config": "1.0.0",
61
61
  "@eik/service": "2.3.1",
62
62
  "@eik/sink-memory": "1.1.2",
63
63
  "@eik/typescript-config": "1.0.0",
64
+ "@types/yargs": "17.0.33",
64
65
  "cross-env": "7.0.3",
65
66
  "eslint": "9.8.0",
66
67
  "fastify": "4.28.1",
package/readme.md CHANGED
@@ -18,4 +18,4 @@ eik --version
18
18
 
19
19
  ## Usage
20
20
 
21
- See [the CLI reference documentation](https://eik.dev/docs/reference/at-eik-cli) to learn about the available commands.
21
+ See [the CLI reference documentation](https://eik.dev/cli) to learn about the available commands.
@@ -2,7 +2,7 @@
2
2
  * @typedef {object} AliasOptions
3
3
  * @property {import('abslog').AbstractLoggerOptions} [logger]
4
4
  * @property {string} server
5
- * @property {"package" | "npm" | "map"} [type="package"]
5
+ * @property {"package" | "npm" | "image" | "map"} [type="package"]
6
6
  * @property {string} name
7
7
  * @property {string} version
8
8
  * @property {string} alias
@@ -40,7 +40,7 @@ export default class Alias {
40
40
  export type AliasOptions = {
41
41
  logger?: import("abslog").AbstractLoggerOptions;
42
42
  server: string;
43
- type?: "package" | "npm" | "map";
43
+ type?: "package" | "npm" | "image" | "map";
44
44
  name: string;
45
45
  version: string;
46
46
  alias: string;
@@ -57,4 +57,4 @@ export type AliasResult = {
57
57
  org: string;
58
58
  integrity: string;
59
59
  };
60
- import abslog from 'abslog';
60
+ import abslog from "abslog";
@@ -32,4 +32,4 @@ export type IntegrityOptions = {
32
32
  cwd?: string;
33
33
  debug?: boolean;
34
34
  };
35
- import abslog from 'abslog';
35
+ import abslog from "abslog";
@@ -22,4 +22,4 @@ export type LoginOptions = {
22
22
  server: string;
23
23
  key: string;
24
24
  };
25
- import abslog from 'abslog';
25
+ import abslog from "abslog";
@@ -25,4 +25,4 @@ export type MetaOptions = {
25
25
  name: string;
26
26
  version: string;
27
27
  };
28
- import abslog from 'abslog';
28
+ import abslog from "abslog";
@@ -20,4 +20,4 @@ export type PingOptions = {
20
20
  server?: string;
21
21
  logger?: import("abslog").AbstractLoggerOptions;
22
22
  };
23
- import abslog from 'abslog';
23
+ import abslog from "abslog";
@@ -48,4 +48,4 @@ export type PublishMapResult = {
48
48
  version: string;
49
49
  type: string;
50
50
  };
51
- import abslog from 'abslog';
51
+ import abslog from "abslog";
@@ -81,14 +81,14 @@ export type PublishResult = {
81
81
  type: string;
82
82
  }>;
83
83
  };
84
- import abslog from 'abslog';
85
- import { EikConfig } from '@eik/common';
86
- import ValidateInput from './tasks/validate-input.js';
87
- import CreateTempDirectory from './tasks/create-temp-directory.js';
88
- import CreateZipFile from './tasks/create-zip-file.js';
89
- import CheckBundleSizes from './tasks/check-bundle-sizes.js';
90
- import DryRun from './tasks/dry-run.js';
91
- import CheckIfAlreadyPublished from './tasks/check-if-already-published.js';
92
- import UploadFiles from './tasks/upload-files.js';
93
- import SaveMetafile from './tasks/save-metafile.js';
94
- import Cleanup from './tasks/cleanup.js';
84
+ import abslog from "abslog";
85
+ import { EikConfig } from "@eik/common";
86
+ import ValidateInput from "./tasks/validate-input.js";
87
+ import CreateTempDirectory from "./tasks/create-temp-directory.js";
88
+ import CreateZipFile from "./tasks/create-zip-file.js";
89
+ import CheckBundleSizes from "./tasks/check-bundle-sizes.js";
90
+ import DryRun from "./tasks/dry-run.js";
91
+ import CheckIfAlreadyPublished from "./tasks/check-if-already-published.js";
92
+ import UploadFiles from "./tasks/upload-files.js";
93
+ import SaveMetafile from "./tasks/save-metafile.js";
94
+ import Cleanup from "./tasks/cleanup.js";
@@ -1,4 +1,4 @@
1
1
  export default class CheckBundleSizes extends Task {
2
2
  process(): Promise<void>;
3
3
  }
4
- import Task from './task.js';
4
+ import Task from "./task.js";
@@ -1,4 +1,4 @@
1
1
  export default class CheckIfAlreadyPublished extends Task {
2
2
  process(): Promise<string>;
3
3
  }
4
- import Task from './task.js';
4
+ import Task from "./task.js";
@@ -1,4 +1,4 @@
1
1
  export default class Cleanup extends Task {
2
2
  process(): Promise<void>;
3
3
  }
4
- import Task from './task.js';
4
+ import Task from "./task.js";
@@ -1,4 +1,4 @@
1
1
  export default class CreateTempDir extends Task {
2
2
  process(): Promise<void>;
3
3
  }
4
- import Task from './task.js';
4
+ import Task from "./task.js";
@@ -1,4 +1,4 @@
1
1
  export default class CreateZipFile extends Task {
2
2
  process(): Promise<string>;
3
3
  }
4
- import Task from './task.js';
4
+ import Task from "./task.js";
@@ -4,4 +4,4 @@ export default class DryRun extends Task {
4
4
  type: string;
5
5
  }[]>;
6
6
  }
7
- import Task from './task.js';
7
+ import Task from "./task.js";
@@ -1,4 +1,4 @@
1
1
  export default class SaveMetaFile extends Task {
2
2
  process(response: any): Promise<void>;
3
3
  }
4
- import Task from './task.js';
4
+ import Task from "./task.js";
@@ -5,4 +5,4 @@ export default class Task {
5
5
  path: any;
6
6
  config: any;
7
7
  }
8
- import abslog from 'abslog';
8
+ import abslog from "abslog";
@@ -1,4 +1,4 @@
1
1
  export default class UploadFiles extends Task {
2
2
  process(zipFile: any): Promise<any>;
3
3
  }
4
- import Task from './task.js';
4
+ import Task from "./task.js";
@@ -1,4 +1,4 @@
1
1
  export default class ValidateInput extends Task {
2
2
  process(): void;
3
3
  }
4
- import Task from './task.js';
4
+ import Task from "./task.js";
@@ -38,6 +38,6 @@ export type VersionOptions = {
38
38
  out?: string;
39
39
  files: string | Record<string, string>;
40
40
  };
41
- import abslog from 'abslog';
42
- import { EikConfig } from '@eik/common';
43
- import semver from 'semver';
41
+ import abslog from "abslog";
42
+ import { EikConfig } from "@eik/common";
43
+ import semver from "semver";
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Get defaults for things like server, name and version from Eik config.
3
+ * If a specific argument is given for it, that takes precedence.
4
+ * @template [T=Record<string, unknown>]
5
+ * @param {any} argv
6
+ * @param {{ command: string; options?: string[] }} opts
7
+ * @returns {import('@eik/common').EikConfig & typeof defaults & T}
8
+ */
9
+ export function getArgsOrDefaults<T = Record<string, unknown>>(argv: any, opts: {
10
+ command: string;
11
+ options?: string[];
12
+ }): import("@eik/common").EikConfig & typeof defaults & T;
13
+ declare const defaults: {
14
+ name: string;
15
+ type: string;
16
+ version: string;
17
+ server: string;
18
+ out: string;
19
+ files: string;
20
+ "import-map": any[];
21
+ };
22
+ export {};
@@ -0,0 +1,19 @@
1
+ export namespace errors {
2
+ let ERR_MISSING_CONFIG: string;
3
+ let ERR_WRONG_TYPE: string;
4
+ let ERR_VERSION_EXISTS: string;
5
+ let ERR_NOT_GIT: string;
6
+ let ERR_GIT_COMMIT: string;
7
+ }
8
+ export class EikCliError extends Error {
9
+ /**
10
+ * @param {string} errorCode
11
+ * @param {string} message
12
+ * @param {Error} [cause]
13
+ */
14
+ constructor(errorCode: string, message: string, cause?: Error);
15
+ cause: Error;
16
+ get errorCode(): string;
17
+ get exitCode(): number;
18
+ #private;
19
+ }
@@ -4,6 +4,6 @@ declare namespace _default {
4
4
  export { compare };
5
5
  }
6
6
  export default _default;
7
- import file from './file.js';
8
- import files from './files.js';
9
- import compare from './compare.js';
7
+ import file from "./file.js";
8
+ import files from "./files.js";
9
+ import compare from "./compare.js";
@@ -5,8 +5,8 @@ declare namespace _default {
5
5
  export { request };
6
6
  }
7
7
  export default _default;
8
- import latestVersion from './latest-version.js';
9
- import versions from './versions.js';
10
- import integrity from './integrity.js';
11
- import request from './request.js';
8
+ import latestVersion from "./latest-version.js";
9
+ import versions from "./versions.js";
10
+ import integrity from "./integrity.js";
11
+ import request from "./request.js";
12
12
  export { latestVersion, versions, integrity, request };
@@ -1,6 +1,6 @@
1
- import logger from './logger.js';
2
- export const getDefaults: typeof helpers.getDefaults;
1
+ import logger from "./logger.js";
2
+ import { getArgsOrDefaults } from "./defaults.js";
3
3
  export const typeSlug: typeof helpers.typeSlug;
4
- import typeTitle from './type-title.js';
5
- import { helpers } from '@eik/common';
6
- export { logger, typeTitle };
4
+ import typeTitle from "./type-title.js";
5
+ import { helpers } from "@eik/common";
6
+ export { logger, getArgsOrDefaults, typeTitle };
@@ -4,6 +4,6 @@ declare namespace _default {
4
4
  export { writeEik };
5
5
  }
6
6
  export default _default;
7
- import read from './read.js';
8
- import write from './write.js';
9
- import writeEik from './write-eik.js';
7
+ import read from "./read.js";
8
+ import write from "./write.js";
9
+ import writeEik from "./write-eik.js";