getta 1.0.25 → 1.0.27

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,7 +1,7 @@
1
1
  {
2
2
  "name": "getta",
3
3
  "description": "An isomorphic rest client based on the Fetch API.",
4
- "version": "1.0.25",
4
+ "version": "1.0.27",
5
5
  "author": "miami-man",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/badbatch/getta",
@@ -2,7 +2,7 @@ import { describe, expect, it } from '@jest/globals';
2
2
  import yargs, { type Argv } from 'yargs';
3
3
  import * as generateOpenApiCommand from './command.ts';
4
4
 
5
- describe('generate-openapi command', () => {
5
+ describe('generate-client command', () => {
6
6
  it('When help is requested, then it displays the command usage and options', async () => {
7
7
  // Arrange
8
8
  // @ts-expect-error not important in test
@@ -18,7 +18,7 @@ describe('generate-openapi command', () => {
18
18
 
19
19
  // Assert
20
20
  expect(help).toMatchInlineSnapshot(`
21
- "getta generate-openapi <schema> [output]
21
+ "getta generate-client <schema> [output]
22
22
 
23
23
  Generate a typed Getta client from an OpenAPI 3.x document.
24
24
 
@@ -26,6 +26,6 @@ export const builder: CommandBuilder<object, GenerateOpenApiArguments> = yargs =
26
26
  return true;
27
27
  });
28
28
 
29
- export const command = 'generate-openapi <schema> [output]';
29
+ export const command = 'generate-client <schema> [output]';
30
30
  export const describe = 'Generate a typed Getta client from an OpenAPI 3.x document.';
31
31
  export { handler } from './handler.ts';
@@ -4,7 +4,7 @@ import { tmpdir } from 'node:os';
4
4
  import { join } from 'node:path';
5
5
  import { handler } from './handler.ts';
6
6
 
7
- describe('generate-openapi handler', () => {
7
+ describe('generate-client handler', () => {
8
8
  let directory: string | undefined;
9
9
  let originalWorkingDirectory: string | undefined;
10
10
 
package/src/cli.test.ts CHANGED
@@ -26,14 +26,14 @@ describe('runGettaCli', () => {
26
26
  }
27
27
  });
28
28
 
29
- it('When invoked with generate-openapi arguments, then it runs the command and writes the client', async () => {
29
+ it('When invoked with generate-client arguments, then it runs the command and writes the client', async () => {
30
30
  // Arrange
31
31
  directory = await mkdtemp(join(tmpdir(), 'getta-cli-'));
32
32
  originalWorkingDirectory = process.cwd();
33
33
  originalArguments = process.argv;
34
34
  process.chdir(directory);
35
35
  await writeFile('spec.json', JSON.stringify({ openapi: '3.0.0', paths: {} }));
36
- process.argv = ['node', 'getta', 'generate-openapi', 'spec.json', 'generated.ts'];
36
+ process.argv = ['node', 'getta', 'generate-client', 'spec.json', 'generated.ts'];
37
37
 
38
38
  // Act
39
39
  await runGettaCli();