Skip to content

Commit

Permalink
fix(cli): Resolved issues with cli package build
Browse files Browse the repository at this point in the history
  • Loading branch information
sullivanpj committed Dec 11, 2023
1 parent 4d1c25b commit 3a0c051
Show file tree
Hide file tree
Showing 10 changed files with 262 additions and 665 deletions.
4 changes: 2 additions & 2 deletions docs/api-reports/packages/utilities/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export { EMPTY_OBJECT };
export { EMPTY_OBJECT as EMPTY_OBJECT_alias_1 };

// @public (undocumented)
const EMPTY_STRING: "";
const EMPTY_STRING = "";
export { EMPTY_STRING };
export { EMPTY_STRING as EMPTY_STRING_alias_1 };

Expand Down Expand Up @@ -505,7 +505,7 @@ export { Newable };
export { Newable as Newable_alias_1 };

// @public (undocumented)
const NEWLINE_STRING: "\r\n";
const NEWLINE_STRING = "\r\n";
export { NEWLINE_STRING };
export { NEWLINE_STRING as NEWLINE_STRING_alias_1 };

Expand Down
20 changes: 14 additions & 6 deletions docs/api-reports/packages/utilities/documents-model.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -1030,20 +1030,24 @@
"excerptTokens": [
{
"kind": "Content",
"text": "EMPTY_STRING: "
"text": "EMPTY_STRING = "
},
{
"kind": "Content",
"text": "\"\""
}
],
"fileUrlPath": "packages/utilities/src/types.ts",
"initializerTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"isReadonly": true,
"releaseTag": "Public",
"name": "EMPTY_STRING",
"variableTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
"startIndex": 0,
"endIndex": 0
}
},
{
Expand Down Expand Up @@ -3076,20 +3080,24 @@
"excerptTokens": [
{
"kind": "Content",
"text": "NEWLINE_STRING: "
"text": "NEWLINE_STRING = "
},
{
"kind": "Content",
"text": "\"\\r\\n\""
}
],
"fileUrlPath": "packages/utilities/src/types.ts",
"initializerTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"isReadonly": true,
"releaseTag": "Public",
"name": "NEWLINE_STRING",
"variableTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
"startIndex": 0,
"endIndex": 0
}
},
{
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@
"@nx/devkit": "17.2.0",
"@nx/eslint": "17.2.0",
"@nx/eslint-plugin": "17.2.0",
"@nx/jest": "17.1.3",
"@nx/jest": "17.2.0",
"@nx/js": "17.2.0",
"@nx/plugin": "17.2.0",
"@nx/workspace": "17.0.3",
"@nx/workspace": "17.2.0",
"@semantic-release/changelog": "6.0.3",
"@semantic-release/commit-analyzer": "11.1.0",
"@semantic-release/exec": "6.0.3",
Expand Down Expand Up @@ -109,7 +109,7 @@
"jest-environment-node": "29.7.0",
"lint-staged": "15.2.0",
"log4brains": "1.0.1",
"nx": "17.0.3",
"nx": "17.2.0",
"prettier": "3.1.1",
"prettier-plugin-packagejson": "2.4.7",
"prettier-plugin-prisma": "5.0.0",
Expand Down
20 changes: 10 additions & 10 deletions packages/cli/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
import { MaybePromise } from "@storm-stack/utilities";
import { Command } from "commander";

export type CLIConfig = {
export interface CLIConfig {
name: string;
description: string;
commands: CLICommand[];
preAction: (command: Command) => MaybePromise<void>;
postAction: (command: Command) => MaybePromise<void>;
};
}

export type CLICommand = {
export interface CLICommand {
name: string;
description: string;
commands?: CLICommand[];
options?: CLIOption[];
argument?: CLIArgument[];
action: (...args: any[]) => MaybePromise<void>;
};
}

export type CLIArgument = {
export interface CLIArgument {
flags: string;
description?: string;
default?: unknown | undefined;
};
}

export type CLIOption = {
export interface CLIOption {
flags: string;
description: string | undefined;
choices?: string[];
default?: CLIOptionDefault;
};
}

export type CLIOptionDefault = {
export interface CLIOptionDefault {
value: unknown;
description?: string | undefined;
};
}
2 changes: 1 addition & 1 deletion packages/file-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"semver": "7.5.4"
},
"devDependencies": {
"@types/node": "20.10.4",
"@types/node": "^20.10.4",
"@types/semver": "7.5.6"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/logging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"zod": "3.22.4"
},
"devDependencies": {
"@types/node": "20.10.4"
"@types/node": "^20.10.4"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/logging/src/utilities/get-log-level.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const LogLevel = {
INFO: 40 as LogLevel,
DEBUG: 60 as LogLevel,
TRACE: 70 as LogLevel
} as const;
};

export type LogLevelLabel =
| "silent"
Expand All @@ -25,7 +25,7 @@ export const LogLevelLabel = {
INFO: "info" as LogLevelLabel,
DEBUG: "debug" as LogLevelLabel,
TRACE: "trace" as LogLevelLabel
} as const;
};

/**
* Convert the log level label to a log level
Expand Down
2 changes: 1 addition & 1 deletion packages/serialization/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"superjson": "2.2.1"
},
"devDependencies": {
"@types/node": "20.10.4",
"@types/node": "^20.10.4",
"@types/qs": "6.9.10"
},
"publishConfig": {
Expand Down
6 changes: 3 additions & 3 deletions packages/utilities/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ export type Indexable = {
[index: IndexType]: any;
};

export const EMPTY_STRING = "" as const;
export const NEWLINE_STRING = "\r\n" as const;
export const EMPTY_OBJECT = {} as const;
export const EMPTY_STRING = "";
export const NEWLINE_STRING = "\r\n";
export const EMPTY_OBJECT = {};

export type AnyCase<T extends IndexType> = string extends T
? string
Expand Down

0 comments on commit 3a0c051

Please sign in to comment.