Skip to content

Commit 2ed3de9

Browse files
committed
feat: update imports from inquirerer to genomic
- Update all imports from 'inquirerer' to 'genomic' - Update all imports from 'create-gen-app' to '@genomic/scaffolds' - Rename Inquirerer class references to Genomic - Update package.json dependencies to use new package names: - inquirerer@^2.4.0 -> genomic@^3.0.0 - create-gen-app@^0.10.0 -> @genomic/scaffolds@^1.0.0 BREAKING CHANGE: This PR depends on constructive-io/dev-utils#39 being merged and the genomic packages being published to npm first.
1 parent 66729c1 commit 2ed3de9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+146
-146
lines changed

packages/cli/__tests__/cli.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { Inquirerer, Question } from 'inquirerer';
1+
import { Genomic, Question } from 'genomic';
22

33
import { KEY_SEQUENCES, setupTests, TestEnvironment } from '../test-utils';
44

55
const beforeEachSetup = setupTests();
66

7-
describe('Inquirerer', () => {
7+
describe('Genomic', () => {
88
let environment: TestEnvironment;
99

1010
beforeEach(() => {
@@ -14,7 +14,7 @@ describe('Inquirerer', () => {
1414
it('prompts user and correctly processes delayed input', async () => {
1515
const { mockInput, mockOutput, writeResults, transformResults, enqueueInputResponse } = environment;
1616

17-
const prompter = new Inquirerer({
17+
const prompter = new Genomic({
1818
input: mockInput,
1919
output: mockOutput,
2020
noTty: false

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"@pgpmjs/server-utils": "workspace:^",
5656
"@pgpmjs/types": "workspace:^",
5757
"find-and-require-package-json": "^0.8.2",
58-
"inquirerer": "^2.4.0",
58+
"genomic": "^3.0.0",
5959
"js-yaml": "^4.1.0",
6060
"minimist": "^1.2.8",
6161
"pg-cache": "workspace:^",

packages/cli/src/commands.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { findAndRequirePackageJson } from 'find-and-require-package-json';
2-
import { CLIOptions, Inquirerer } from 'inquirerer';
2+
import { CLIOptions, Genomic } from 'genomic';
33
import { ParsedArgs } from 'minimist';
44

55
import codegen from './commands/codegen';
@@ -18,7 +18,7 @@ const createCommandMap = (): Record<string, Function> => {
1818
};
1919
};
2020

21-
export const commands = async (argv: Partial<ParsedArgs>, prompter: Inquirerer, options: CLIOptions & { skipPgTeardown?: boolean }) => {
21+
export const commands = async (argv: Partial<ParsedArgs>, prompter: Genomic, options: CLIOptions & { skipPgTeardown?: boolean }) => {
2222
let { first: command, newArgv } = extractFirst(argv);
2323

2424
// Run update check early so it shows on help/version paths too

packages/cli/src/commands/codegen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CLIOptions, Inquirerer } from 'inquirerer'
1+
import { CLIOptions, Genomic } from 'genomic'
22
import { ParsedArgs } from 'minimist'
33
import { promises as fs } from 'fs'
44
import { join } from 'path'
@@ -48,7 +48,7 @@ async function loadConfig(path: string): Promise<Partial<GraphQLCodegenOptions>>
4848

4949
export default async (
5050
argv: Partial<ParsedArgs>,
51-
_prompter: Inquirerer,
51+
_prompter: Genomic,
5252
_options: CLIOptions
5353
) => {
5454
if (argv.help || argv.h) {

packages/cli/src/commands/explorer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { getEnvOptions } from '@constructive-io/graphql-env';
22
import { GraphQLExplorer as explorer } from '@constructive-io/graphql-explorer';
33
import { Logger } from '@pgpmjs/logger';
44
import { PgpmOptions } from '@pgpmjs/types';
5-
import { CLIOptions, Inquirerer, Question } from 'inquirerer';
5+
import { CLIOptions, Genomic, Question } from 'genomic';
66

77
const log = new Logger('explorer');
88

@@ -72,7 +72,7 @@ const questions: Question[] = [
7272

7373
export default async (
7474
argv: Partial<Record<string, any>>,
75-
prompter: Inquirerer,
75+
prompter: Genomic,
7676
_options: CLIOptions
7777
) => {
7878
// Show usage if explicitly requested

packages/cli/src/commands/get-graphql-schema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CLIOptions, Inquirerer } from 'inquirerer'
1+
import { CLIOptions, Genomic } from 'genomic'
22
import { ParsedArgs } from 'minimist'
33
import { promises as fs } from 'fs'
44
import { buildSchemaSDL, fetchEndpointSchemaSDL } from '@constructive-io/graphql-server'
@@ -26,7 +26,7 @@ const defaultSchemas = [
2626

2727
export default async (
2828
argv: Partial<ParsedArgs>,
29-
prompter: Inquirerer,
29+
prompter: Genomic,
3030
_options: CLIOptions
3131
) => {
3232
if (argv.help || argv.h) {

packages/cli/src/commands/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { getEnvOptions } from '@constructive-io/graphql-env';
22
import { Logger } from '@pgpmjs/logger';
33
import { GraphQLServer as server } from '@constructive-io/graphql-server';
44
import { PgpmOptions } from '@pgpmjs/types';
5-
import { CLIOptions, Inquirerer, OptionValue,Question } from 'inquirerer';
5+
import { CLIOptions, Genomic, OptionValue,Question } from 'genomic';
66
import { getPgPool } from 'pg-cache';
77

88
const log = new Logger('server');
@@ -83,7 +83,7 @@ const questions: Question[] = [
8383

8484
export default async (
8585
argv: Partial<Record<string, any>>,
86-
prompter: Inquirerer,
86+
prompter: Genomic,
8787
_options: CLIOptions
8888
) => {
8989
// Show usage if explicitly requested

packages/cli/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env node
22
import { findAndRequirePackageJson } from 'find-and-require-package-json';
3-
import { CLI, CLIOptions } from 'inquirerer';
3+
import { CLI, CLIOptions } from 'genomic';
44

55
import { commands } from './commands';
66

packages/cli/test-utils/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CLIOptions } from 'inquirerer';
1+
import { CLIOptions } from 'genomic';
22
import readline from 'readline';
33
import { Readable, Transform, Writable } from 'stream';
44
import { cleanAnsi } from 'clean-ansi';

packages/cli/test-utils/fixtures.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import fs from 'fs';
2-
import { Inquirerer } from 'inquirerer';
2+
import { Genomic } from 'genomic';
33
import { ParsedArgs } from 'minimist';
44
import os from 'os';
55
import path from 'path';
@@ -53,7 +53,7 @@ export class TestFixture {
5353
transformResults
5454
} = this.environment;
5555

56-
const prompter = new Inquirerer({
56+
const prompter = new Genomic({
5757
input: mockInput,
5858
output: mockOutput,
5959
noTty: true

0 commit comments

Comments
 (0)