fastify-flux-cli 4.7.0 → 4.8.0
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/helper/generateSdk.d.ts.map +1 -1
- package/dist/helper/generateSdk.js +0 -7
- package/dist/helper/generateSdk.js.map +1 -1
- package/package.json +1 -2
- package/dist/helper/formatWithBiome.d.ts +0 -2
- package/dist/helper/formatWithBiome.d.ts.map +0 -1
- package/dist/helper/formatWithBiome.js +0 -19
- package/dist/helper/formatWithBiome.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateSdk.d.ts","sourceRoot":"","sources":["../../src/helper/generateSdk.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generateSdk.d.ts","sourceRoot":"","sources":["../../src/helper/generateSdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAGrD,wBAAsB,WAAW,CAAC,GAAG,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,iBAsCvE"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { readFile, writeFile } from 'node:fs/promises';
|
|
2
|
-
import { join } from 'node:path';
|
|
3
1
|
import { generateApi } from 'swagger-typescript-api';
|
|
4
|
-
import { formatWithBiome } from './formatWithBiome.js';
|
|
5
2
|
import { log } from '../log.js';
|
|
6
3
|
export async function generateSdk(sdk) {
|
|
7
4
|
const logFunction = console.log;
|
|
@@ -32,10 +29,6 @@ export async function generateSdk(sdk) {
|
|
|
32
29
|
log({ component: 'cli', error: 'SDK error', details: error.join('\n') });
|
|
33
30
|
}
|
|
34
31
|
else {
|
|
35
|
-
const filePath = join(sdk.output, sdk.fileName);
|
|
36
|
-
const content = await readFile(filePath, 'utf-8');
|
|
37
|
-
const formatted = await formatWithBiome(content);
|
|
38
|
-
await writeFile(filePath, formatted);
|
|
39
32
|
log({
|
|
40
33
|
component: 'cli',
|
|
41
34
|
success: 'SDK written to',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateSdk.js","sourceRoot":"","sources":["../../src/helper/generateSdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"generateSdk.js","sourceRoot":"","sources":["../../src/helper/generateSdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,GAAsC;IACtE,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC;IAEhC,IAAI,OAAO,GAAG,CAAC,EAAE,CAAa,CAAC;IAC/B,IAAI,KAAK,GAAG,CAAC,EAAE,CAAa,CAAC;IAC7B,OAAO,CAAC,GAAG,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;IACvB,OAAO,CAAC,IAAI,GAAG,CAAC,GAAG,OAAO,EAAE,EAAE;QAC5B,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAClC,CAAC,CAAC;IACF,OAAO,CAAC,KAAK,GAAG,CAAC,GAAG,OAAO,EAAE,EAAE;QAC7B,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAChC,CAAC,CAAC;IAEF,IAAI,CAAC;QACH,MAAM,WAAW,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAED,OAAO,CAAC,GAAG,GAAG,WAAW,CAAC;IAE1B,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,GAAG,CAAC;YACF,SAAS,EAAE,KAAK;YAChB,OAAO,EAAE,aAAa;YACtB,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;SAC5B,CAAC,CAAC;IACL,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,GAAG,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3E,CAAC;SAAM,CAAC;QACN,GAAG,CAAC;YACF,SAAS,EAAE,KAAK;YAChB,OAAO,EAAE,gBAAgB;YACzB,OAAO,EAAE,GAAG,CAAC,MAAgB;SAC9B,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"author": "",
|
|
21
21
|
"license": "ISC",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@biomejs/js-api": "^4.0.0",
|
|
24
23
|
"@types/lodash": "4.17.24",
|
|
25
24
|
"chalk": "5.6.2",
|
|
26
25
|
"chokidar": "5.0.0",
|
|
@@ -51,5 +50,5 @@
|
|
|
51
50
|
"sdk-templates/"
|
|
52
51
|
],
|
|
53
52
|
"type": "module",
|
|
54
|
-
"version": "4.
|
|
53
|
+
"version": "4.8.0"
|
|
55
54
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatWithBiome.d.ts","sourceRoot":"","sources":["../../src/helper/formatWithBiome.ts"],"names":[],"mappings":"AAEA,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAmBtE"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Biome, Distribution } from '@biomejs/js-api';
|
|
2
|
-
export async function formatWithBiome(content) {
|
|
3
|
-
const biome = await Biome.create({ distribution: Distribution.NODE });
|
|
4
|
-
const project = biome.openProject();
|
|
5
|
-
biome.applyConfiguration(project.projectKey, {
|
|
6
|
-
files: { maxSize: Number.MAX_SAFE_INTEGER },
|
|
7
|
-
formatter: { indentStyle: 'space' },
|
|
8
|
-
javascript: {
|
|
9
|
-
formatter: {
|
|
10
|
-
quoteStyle: 'single',
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
|
-
const result = biome.formatContent(project.projectKey, content, {
|
|
15
|
-
filePath: 'generated.ts',
|
|
16
|
-
});
|
|
17
|
-
return result.content;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=formatWithBiome.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatWithBiome.js","sourceRoot":"","sources":["../../src/helper/formatWithBiome.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,OAAe;IACnD,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC;IACtE,MAAM,OAAO,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IAEpC,KAAK,CAAC,kBAAkB,CAAC,OAAO,CAAC,UAAU,EAAE;QAC3C,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,gBAAgB,EAAE;QAC3C,SAAS,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE;QACnC,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,UAAU,EAAE,QAAQ;aACrB;SACF;KACF,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE;QAC9D,QAAQ,EAAE,cAAc;KACzB,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC,OAAO,CAAC;AACxB,CAAC"}
|