@ps-aux/api-client-gen 0.7.0-rc.6 → 0.7.0-rc.7
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/dist/bin.cjs +5 -5
- package/dist/bin.mjs +3 -3
- package/dist/{generateApiClient.cjs → generate.cjs} +342 -331
- package/dist/{generateApiClient.mjs → generate.mjs} +339 -328
- package/dist/index.cjs +8 -6
- package/dist/index.mjs +6 -4
- package/package.json +1 -1
- package/templates/{http-client.eta → legacy/http-client.eta} +2 -2
- package/templates/{procedure-call.ejs → legacy/procedure-call.ejs} +2 -2
- /package/templates/{api.ejs → legacy/api.ejs} +0 -0
package/dist/bin.cjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var generate = require('./generate.cjs');
|
|
5
5
|
var fs = require('node:fs');
|
|
6
6
|
var Path = require('node:path');
|
|
7
7
|
var c12 = require('c12');
|
|
8
8
|
require('path');
|
|
9
9
|
require('fs');
|
|
10
|
+
require('ts-to-zod');
|
|
11
|
+
require('node:fs/promises');
|
|
10
12
|
require('swagger-typescript-api');
|
|
11
13
|
require('node:url');
|
|
12
|
-
require('node:fs/promises');
|
|
13
|
-
require('ts-to-zod');
|
|
14
14
|
|
|
15
15
|
function _interopNamespaceDefault(e) {
|
|
16
16
|
var n = Object.create(null);
|
|
@@ -77,12 +77,12 @@ const main = async () => {
|
|
|
77
77
|
const conf = await loadConfig({
|
|
78
78
|
cwd: process.cwd(),
|
|
79
79
|
name: "api-client-gen",
|
|
80
|
-
parseConfig:
|
|
80
|
+
parseConfig: generate.parseConfig
|
|
81
81
|
});
|
|
82
82
|
const profileConf = conf.config[profile];
|
|
83
83
|
if (!profileConf)
|
|
84
84
|
throw new Error(`Profile "${profile}" not present in the configuration`);
|
|
85
|
-
await
|
|
85
|
+
await generate.generateApiClientFromConfig(profileConf);
|
|
86
86
|
};
|
|
87
87
|
main().catch((error) => {
|
|
88
88
|
console.error(error instanceof Error ? error.message : String(error));
|
package/dist/bin.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as generateApiClientFromConfig, p as parseConfig } from './
|
|
2
|
+
import { a as generateApiClientFromConfig, p as parseConfig } from './generate.mjs';
|
|
3
3
|
import * as fs from 'node:fs';
|
|
4
4
|
import Path from 'node:path';
|
|
5
5
|
import { loadConfig as loadConfig$1 } from 'c12';
|
|
6
6
|
import 'path';
|
|
7
7
|
import 'fs';
|
|
8
|
+
import 'ts-to-zod';
|
|
9
|
+
import 'node:fs/promises';
|
|
8
10
|
import 'swagger-typescript-api';
|
|
9
11
|
import 'node:url';
|
|
10
|
-
import 'node:fs/promises';
|
|
11
|
-
import 'ts-to-zod';
|
|
12
12
|
|
|
13
13
|
const SUPPORTED_CONFIG_EXTENSIONS = ["ts", "js"];
|
|
14
14
|
const getSupportedConfigFiles = (name) => SUPPORTED_CONFIG_EXTENSIONS.map((ext) => `${name}.config.${ext}`);
|