Skip to content

Commit

Permalink
apply javascript:bootstrap command types
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Sep 23, 2024
1 parent 8bbf27d commit dbb22af
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions generators/javascript/generators/bootstrap/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
import type { JHipsterCommandDefinition } from '../../../../lib/command/index.js';

const command: JHipsterCommandDefinition = {
const command = {
configs: {
packageJsonNodeEngine: {
cli: {
Expand All @@ -39,6 +39,6 @@ const command: JHipsterCommandDefinition = {
},
},
import: [],
};
} as const satisfies JHipsterCommandDefinition;

export default command;
8 changes: 6 additions & 2 deletions generators/javascript/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import type { ExportApplicationPropertiesFromCommand } from '../../lib/command/types.js';
import type JavascriptBootstrapCommand from './generators/bootstrap/command.ts';

type JavascriptBootstrapProperties = ExportApplicationPropertiesFromCommand<typeof JavascriptBootstrapCommand>;

export type JavaScriptSourceType = {
mergePrettierConfig?: (config: Record<string, unknown>) => void;
addPrettierIgnore?: (newContent: string) => void;
Expand All @@ -6,9 +11,8 @@ export type JavaScriptSourceType = {
addEslintConfig?: (opts: { import?: string | string[]; config?: string | string[] }) => void;
};

export type JavaScriptApplication = {
export type JavaScriptApplication = JavascriptBootstrapProperties & {
packageJsonNodeEngine?: boolean | string;
packageJsonType?: string;
eslintConfigFile?: string;

addPrettierExtensions?: (extensions: string[]) => void;
Expand Down
1 change: 1 addition & 0 deletions lib/types/application/options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export type ApplicationOptions = Simplify<
ExportGeneratorOptionsFromCommand<typeof import('../../../generators/client/command.js').default> &
ExportGeneratorOptionsFromCommand<typeof import('../../../generators/java/generators/bootstrap/command.js').default> &
ExportGeneratorOptionsFromCommand<typeof import('../../../generators/java/generators/build-tool/command.js').default> &
ExportGeneratorOptionsFromCommand<typeof import('../../../generators/javascript/generators/bootstrap/command.js').default> &
ExportGeneratorOptionsFromCommand<typeof import('../../../generators/javascript/generators/prettier/command.js').default> &
ExportGeneratorOptionsFromCommand<typeof import('../../../generators/jdl/command.js').default> &
ExportGeneratorOptionsFromCommand<typeof import('../../../generators/languages/command.js').default> &
Expand Down
1 change: 1 addition & 0 deletions lib/types/application/yo-rc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export type ApplicationConfiguration = Simplify<
ExportStoragePropertiesFromCommand<typeof import('../../../generators/client/command.js').default> &
ExportStoragePropertiesFromCommand<typeof import('../../../generators/java/generators/bootstrap/command.js').default> &
ExportStoragePropertiesFromCommand<typeof import('../../../generators/java/generators/build-tool/command.js').default> &
ExportStoragePropertiesFromCommand<typeof import('../../../generators/javascript/generators/bootstrap/command.js').default> &
ExportStoragePropertiesFromCommand<typeof import('../../../generators/javascript/generators/prettier/command.js').default> &
ExportStoragePropertiesFromCommand<typeof import('../../../generators/jdl/command.js').default> &
ExportStoragePropertiesFromCommand<typeof import('../../../generators/languages/command.js').default> &
Expand Down

0 comments on commit dbb22af

Please sign in to comment.