@keq-request/cli 5.0.0-alpha.10 → 5.0.0-alpha.12

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.
Files changed (83) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/cli.cjs +673 -222
  3. package/dist/cli.cjs.map +1 -1
  4. package/dist/cli.js +673 -222
  5. package/dist/cli.js.map +1 -1
  6. package/dist/compiler/compiler.d.ts +29 -0
  7. package/dist/compiler/compiler.d.ts.map +1 -0
  8. package/dist/compiler/index.d.ts +2 -0
  9. package/dist/compiler/index.d.ts.map +1 -0
  10. package/dist/compiler/intercepter/perfect-error-message.d.ts +3 -0
  11. package/dist/compiler/intercepter/perfect-error-message.d.ts.map +1 -0
  12. package/dist/compiler/intercepter/print-information.d.ts +5 -0
  13. package/dist/compiler/intercepter/print-information.d.ts.map +1 -0
  14. package/dist/index.cjs +620 -154
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.d.ts +9 -1
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +609 -150
  19. package/dist/index.js.map +1 -1
  20. package/dist/plugins/body-fallback/index.d.ts +6 -0
  21. package/dist/plugins/body-fallback/index.d.ts.map +1 -0
  22. package/dist/plugins/eslint/index.d.ts +15 -0
  23. package/dist/plugins/eslint/index.d.ts.map +1 -0
  24. package/dist/plugins/index.d.ts +4 -0
  25. package/dist/plugins/index.d.ts.map +1 -0
  26. package/dist/plugins/prettier/index.d.ts +6 -0
  27. package/dist/plugins/prettier/index.d.ts.map +1 -0
  28. package/dist/plugins.cjs +159 -0
  29. package/dist/plugins.cjs.map +1 -0
  30. package/dist/plugins.js +120 -0
  31. package/dist/plugins.js.map +1 -0
  32. package/dist/renderer/json-schema/index.d.ts.map +1 -1
  33. package/dist/renderer/operation-request/index.d.ts.map +1 -1
  34. package/dist/renderer/operation-type/index.d.ts +2 -1
  35. package/dist/renderer/operation-type/index.d.ts.map +1 -1
  36. package/dist/renderer/request/index.d.ts.map +1 -1
  37. package/dist/tasks/compile/index.d.ts +3 -5
  38. package/dist/tasks/compile/index.d.ts.map +1 -1
  39. package/dist/tasks/compile/utils/compile-operation-definition.d.ts +5 -2
  40. package/dist/tasks/compile/utils/compile-operation-definition.d.ts.map +1 -1
  41. package/dist/tasks/compile/utils/compile-schema-definition.d.ts +5 -2
  42. package/dist/tasks/compile/utils/compile-schema-definition.d.ts.map +1 -1
  43. package/dist/tasks/download/index.d.ts +3 -3
  44. package/dist/tasks/download/index.d.ts.map +1 -1
  45. package/dist/tasks/index.d.ts +9 -11
  46. package/dist/tasks/index.d.ts.map +1 -1
  47. package/dist/tasks/interactive/index.d.ts +9 -6
  48. package/dist/tasks/interactive/index.d.ts.map +1 -1
  49. package/dist/tasks/persist/index.d.ts +3 -8
  50. package/dist/tasks/persist/index.d.ts.map +1 -1
  51. package/dist/tasks/setup/index.d.ts +7 -1
  52. package/dist/tasks/setup/index.d.ts.map +1 -1
  53. package/dist/tasks/shaking/index.d.ts +4 -5
  54. package/dist/tasks/shaking/index.d.ts.map +1 -1
  55. package/dist/tasks/types/base-task-options.d.ts +6 -0
  56. package/dist/tasks/types/base-task-options.d.ts.map +1 -0
  57. package/dist/tasks/types/file.d.ts +4 -0
  58. package/dist/tasks/types/file.d.ts.map +1 -0
  59. package/dist/tasks/types/index.d.ts +6 -0
  60. package/dist/tasks/types/index.d.ts.map +1 -0
  61. package/dist/tasks/types/task-context.d.ts +4 -0
  62. package/dist/tasks/types/task-context.d.ts.map +1 -1
  63. package/dist/tasks/types/task-wrapper.d.ts +4 -0
  64. package/dist/tasks/types/task-wrapper.d.ts.map +1 -0
  65. package/dist/tasks/utils/anchor.d.ts +20 -0
  66. package/dist/tasks/utils/anchor.d.ts.map +1 -0
  67. package/dist/tasks/utils/artifact.d.ts +2 -0
  68. package/dist/tasks/utils/artifact.d.ts.map +1 -1
  69. package/dist/tasks/utils/index.d.ts +11 -0
  70. package/dist/tasks/utils/index.d.ts.map +1 -0
  71. package/dist/tasks/utils/proxy-task-wrapper.d.ts +3 -0
  72. package/dist/tasks/utils/proxy-task-wrapper.d.ts.map +1 -0
  73. package/dist/tasks/validate/index.d.ts +3 -6
  74. package/dist/tasks/validate/index.d.ts.map +1 -1
  75. package/dist/types/index.d.ts +7 -0
  76. package/dist/types/index.d.ts.map +1 -0
  77. package/dist/types/plugin.d.ts +5 -0
  78. package/dist/types/plugin.d.ts.map +1 -0
  79. package/dist/types/runtime-config.d.ts +4 -1
  80. package/dist/types/runtime-config.d.ts.map +1 -1
  81. package/package.json +20 -4
  82. package/dist/tasks/append-ignore-rule/index.d.ts +0 -10
  83. package/dist/tasks/append-ignore-rule/index.d.ts.map +0 -1
@@ -0,0 +1,6 @@
1
+ import { Compiler } from '../../compiler/compiler.js';
2
+ import { Plugin } from '../../types/plugin.js';
3
+ export declare class BodyFallbackPlugin implements Plugin {
4
+ apply(compiler: Compiler): void;
5
+ }
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/body-fallback/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAGjD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAK1C,qBAAa,kBAAmB,YAAW,MAAM;IAC/C,KAAK,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAwDhC"}
@@ -0,0 +1,15 @@
1
+ import { Compiler } from '../../compiler/compiler.js';
2
+ import { Plugin } from '../../types/plugin.js';
3
+ interface EslintPluginOptions {
4
+ /**
5
+ * List of ESLint rules to disable
6
+ */
7
+ disable?: string[];
8
+ }
9
+ export declare class EslintPlugin implements Plugin {
10
+ private options;
11
+ constructor(options?: EslintPluginOptions);
12
+ apply(compiler: Compiler): void;
13
+ }
14
+ export {};
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/eslint/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAI1C,UAAU,mBAAmB;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB;AAED,qBAAa,YAAa,YAAW,MAAM;IAC7B,OAAO,CAAC,OAAO;gBAAP,OAAO,GAAE,mBAAwB;IAGrD,KAAK,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAoChC"}
@@ -0,0 +1,4 @@
1
+ export * from './eslint/index.js';
2
+ export * from './prettier/index.js';
3
+ export * from './body-fallback/index.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,0BAA0B,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { Compiler } from '../../compiler/compiler.js';
2
+ import { Plugin } from '../../types/plugin.js';
3
+ export declare class PrettierPlugin implements Plugin {
4
+ apply(compiler: Compiler): void;
5
+ }
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/prettier/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAO1C,qBAAa,cAAe,YAAW,MAAM;IAC3C,KAAK,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAShC"}
@@ -0,0 +1,159 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/plugins/index.ts
31
+ var plugins_exports = {};
32
+ __export(plugins_exports, {
33
+ BodyFallbackPlugin: () => BodyFallbackPlugin,
34
+ EslintPlugin: () => EslintPlugin,
35
+ PrettierPlugin: () => PrettierPlugin
36
+ });
37
+ module.exports = __toCommonJS(plugins_exports);
38
+
39
+ // src/plugins/eslint/index.ts
40
+ var import_eslint = require("eslint");
41
+ var EslintPlugin = class _EslintPlugin {
42
+ constructor(options = {}) {
43
+ this.options = options;
44
+ }
45
+ apply(compiler) {
46
+ compiler.hooks.afterPersist.tapPromise(_EslintPlugin.name, async (task) => {
47
+ const files = compiler.context.persisted?.files || [];
48
+ if (files.length === 0) return;
49
+ const eslint = new import_eslint.ESLint({ fix: true });
50
+ const results = await eslint.lintFiles(files.map((file) => file.path));
51
+ await import_eslint.ESLint.outputFixes(results);
52
+ });
53
+ if (this.options.disable && this.options.disable.length > 0) {
54
+ const $rules = [
55
+ ...this.options.disable.map((rule) => `/* eslint-disable ${rule} */`)
56
+ ].join("\n");
57
+ compiler.hooks.afterCompileKeqRequest.tap(_EslintPlugin.name, (artifact) => {
58
+ artifact.anchor.append("file:start", $rules);
59
+ return artifact;
60
+ });
61
+ compiler.hooks.afterCompileOperationRequest.tap(_EslintPlugin.name, (artifact) => {
62
+ artifact.anchor.append("file:start", $rules);
63
+ return artifact;
64
+ });
65
+ compiler.hooks.afterCompileOperationType.tap(_EslintPlugin.name, (artifact) => {
66
+ artifact.anchor.append("file:start", $rules);
67
+ return artifact;
68
+ });
69
+ compiler.hooks.afterCompileSchema.tap(_EslintPlugin.name, (artifact) => {
70
+ artifact.anchor.append("file:start", $rules);
71
+ return artifact;
72
+ });
73
+ }
74
+ }
75
+ };
76
+
77
+ // src/plugins/prettier/index.ts
78
+ var import_child_process = require("child_process");
79
+ var import_util = require("util");
80
+ var execAsync = (0, import_util.promisify)(import_child_process.exec);
81
+ var PrettierPlugin = class _PrettierPlugin {
82
+ apply(compiler) {
83
+ compiler.hooks.afterPersist.tapPromise(_PrettierPlugin.name, async () => {
84
+ const files = compiler.context.persisted?.files || [];
85
+ if (files.length === 0) return;
86
+ const filePaths = files.map((file) => file.path).join(" ");
87
+ await execAsync(`prettier --write ${filePaths}`);
88
+ });
89
+ }
90
+ };
91
+
92
+ // src/plugins/body-fallback/index.ts
93
+ var R = __toESM(require("ramda"), 1);
94
+
95
+ // src/utils/json-schema-utils/is-array.ts
96
+ function isArray(schema) {
97
+ return schema.type === "array";
98
+ }
99
+
100
+ // src/utils/json-schema-utils/is-mixed.ts
101
+ function isMixed(schema) {
102
+ return Array.isArray(schema.type);
103
+ }
104
+
105
+ // src/utils/json-schema-utils/is-non-array.ts
106
+ function isNonArray(schema) {
107
+ return typeof schema.type === "string" && schema.type !== "array";
108
+ }
109
+
110
+ // src/utils/json-schema-utils/is-ref.ts
111
+ function isRef(schema) {
112
+ return "$ref" in schema;
113
+ }
114
+
115
+ // src/utils/json-schema-utils/index.ts
116
+ var JsonSchemaUtils = class {
117
+ static isRef = isRef;
118
+ static isArray = isArray;
119
+ static isNonArray = isNonArray;
120
+ static isMixed = isMixed;
121
+ };
122
+
123
+ // src/plugins/body-fallback/index.ts
124
+ var BodyFallbackPlugin = class _BodyFallbackPlugin {
125
+ apply(compiler) {
126
+ compiler.hooks.afterCompileOperationRequest.tap(_BodyFallbackPlugin.name, (artifact, operationDefinition) => {
127
+ const operation = operationDefinition.operation;
128
+ const parameters = operation.parameters?.filter((p) => !JsonSchemaUtils.isRef(p)) || [];
129
+ const keys = parameters.map((p) => p.name).filter(R.isNotNil);
130
+ const $acc = !keys.length ? " acc[key] = args[key]" : [
131
+ ` if (![${keys.map((k) => JSON.stringify(k)).join(", ")}].includes(key)) {`,
132
+ " acc[key] = args[key]",
133
+ " }"
134
+ ].join("\n");
135
+ artifact.anchor.block.replace("body", [
136
+ // $mediaType ? `${$mediaType}\n` : undefined,
137
+ ' if (typeof args === "object" && args !== null && !Array.isArray(args)) {',
138
+ " const requestBody = Object.keys(args)",
139
+ " .reduce((acc, key) => {",
140
+ $acc,
141
+ " return acc",
142
+ " }, {} as Record<string, unknown>)",
143
+ "",
144
+ " if (Object.keys(requestBody).length > 0) {",
145
+ " req.send(requestBody)",
146
+ " }",
147
+ " }"
148
+ ].filter(R.isNotNil).join("\n"));
149
+ return artifact;
150
+ });
151
+ }
152
+ };
153
+ // Annotate the CommonJS export names for ESM import in node:
154
+ 0 && (module.exports = {
155
+ BodyFallbackPlugin,
156
+ EslintPlugin,
157
+ PrettierPlugin
158
+ });
159
+ //# sourceMappingURL=plugins.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/plugins/index.ts","../src/plugins/eslint/index.ts","../src/plugins/prettier/index.ts","../src/plugins/body-fallback/index.ts","../src/utils/json-schema-utils/is-array.ts","../src/utils/json-schema-utils/is-mixed.ts","../src/utils/json-schema-utils/is-non-array.ts","../src/utils/json-schema-utils/is-ref.ts","../src/utils/json-schema-utils/index.ts"],"sourcesContent":["export * from './eslint/index.js'\nexport * from './prettier/index.js'\nexport * from './body-fallback/index.js'\n","import { Compiler } from '~/compiler/compiler.js'\nimport { Plugin } from '~/types/plugin.js'\nimport { ESLint } from 'eslint'\n\n\ninterface EslintPluginOptions {\n /**\n * List of ESLint rules to disable\n */\n disable?: string[]\n}\n\nexport class EslintPlugin implements Plugin {\n constructor(private options: EslintPluginOptions = {}) {}\n\n\n apply(compiler: Compiler): void {\n compiler.hooks.afterPersist.tapPromise(EslintPlugin.name, async (task) => {\n const files = compiler.context.persisted?.files || []\n if (files.length === 0) return\n\n const eslint = new ESLint({ fix: true })\n const results = await eslint.lintFiles(files.map((file) => file.path))\n await ESLint.outputFixes(results)\n })\n\n if (this.options.disable && this.options.disable.length > 0) {\n const $rules = [\n ...this.options.disable.map((rule) => `/* eslint-disable ${rule} */`),\n ].join('\\n')\n\n compiler.hooks.afterCompileKeqRequest.tap(EslintPlugin.name, (artifact) => {\n artifact.anchor.append('file:start', $rules)\n return artifact\n })\n\n compiler.hooks.afterCompileOperationRequest.tap(EslintPlugin.name, (artifact) => {\n artifact.anchor.append('file:start', $rules)\n return artifact\n })\n\n compiler.hooks.afterCompileOperationType.tap(EslintPlugin.name, (artifact) => {\n artifact.anchor.append('file:start', $rules)\n return artifact\n })\n\n compiler.hooks.afterCompileSchema.tap(EslintPlugin.name, (artifact) => {\n artifact.anchor.append('file:start', $rules)\n return artifact\n })\n }\n }\n}\n","import { Compiler } from '~/compiler/compiler.js'\nimport { Plugin } from '~/types/plugin.js'\nimport { exec } from 'child_process'\nimport { promisify } from 'util'\n\nconst execAsync = promisify(exec)\n\n\nexport class PrettierPlugin implements Plugin {\n apply(compiler: Compiler): void {\n compiler.hooks.afterPersist.tapPromise(PrettierPlugin.name, async () => {\n const files = compiler.context.persisted?.files || []\n if (files.length === 0) return\n\n const filePaths = files.map((file) => file.path).join(' ')\n await execAsync(`prettier --write ${filePaths}`)\n })\n }\n}\n","import * as R from 'ramda'\nimport { Compiler } from '~/compiler/compiler.js'\nimport { Artifact } from '~/tasks/utils/artifact.js'\nimport { OperationDefinition } from '~/tasks/utils/operation-definition.js'\nimport { Plugin } from '~/types/plugin.js'\nimport { JsonSchemaUtils } from '~/utils/json-schema-utils/index.js'\nimport { OpenAPIV3_1 } from '@scalar/openapi-types'\n\n\nexport class BodyFallbackPlugin implements Plugin {\n apply(compiler: Compiler): void {\n compiler.hooks.afterCompileOperationRequest.tap(BodyFallbackPlugin.name, (artifact: Artifact, operationDefinition: OperationDefinition) => {\n const operation = operationDefinition.operation\n\n // const mediaTypes = Object.keys(operation.requestBody?.content || {})\n // .filter((key) => key !== '*/*')\n\n // console.log('BodyFallbackPlugin mediaTypes:', mediaTypes)\n // let $mediaType: string | undefined = undefined\n\n // if (mediaTypes.length === 1) {\n // const mediaType = mediaTypes[0]\n // if (mediaType === 'application/json') $mediaType = ' req.type(\"application/json\")'\n // else if (mediaType === 'application/x-www-form-urlencoded') $mediaType = ' req.type(\"application/x-www-form-urlencoded\")'\n // else if (mediaType === 'multipart/form-data') $mediaType = ' req.type(\"multipart/form-data\")'\n // } else if (mediaTypes.length > 1) {\n // $mediaType = [\n // ' req.appendMiddlewares(async (context, next) => {',\n // ' const contentType = context.request.headers.get(\"Content-Type\") || \"\"',\n // ' if (!contentType) {',\n // ` throw new Error(\"[Plugin ${BodyFallbackPlugin.name}] Cannot determine request body media type. Multiple media types are defined: ${mediaTypes.join(', ')}. Please set the Content-Type header explicitly.\")`,\n // ' }',\n // ' await next()',\n // ' })',\n // ].join('\\n')\n // }\n\n const parameters = operation.parameters?.filter((p): p is OpenAPIV3_1.ParameterObject => !JsonSchemaUtils.isRef(p)) || []\n const keys = parameters.map((p) => p.name).filter(R.isNotNil)\n\n const $acc = !keys.length\n ? ' acc[key] = args[key]'\n : [\n ` if (![${keys.map((k) => JSON.stringify(k)).join(', ')}].includes(key)) {`,\n ' acc[key] = args[key]',\n ' }',\n ].join('\\n')\n\n artifact.anchor.block.replace('body', [\n // $mediaType ? `${$mediaType}\\n` : undefined,\n ' if (typeof args === \"object\" && args !== null && !Array.isArray(args)) {',\n ' const requestBody = Object.keys(args)',\n ' .reduce((acc, key) => {',\n $acc,\n ' return acc',\n ' }, {} as Record<string, unknown>)',\n '',\n ' if (Object.keys(requestBody).length > 0) {',\n ' req.send(requestBody)',\n ' }',\n ' }',\n ].filter(R.isNotNil).join('\\n'))\n\n return artifact\n })\n }\n}\n","import type { OpenAPIV3_1 } from '@scalar/openapi-types'\n\nexport function isArray(schema: OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ReferenceObject): schema is OpenAPIV3_1.ArraySchemaObject {\n return schema.type === 'array'\n}\n","\nimport type { OpenAPIV3_1 } from '@scalar/openapi-types'\nimport { MixedSchemaObject } from './types/mixed-schema-object.js'\n\nexport function isMixed(schema: OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ReferenceObject): schema is MixedSchemaObject {\n return Array.isArray(schema.type)\n}\n","import type { OpenAPIV3_1 } from '@scalar/openapi-types'\n\nexport function isNonArray(schema: OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ReferenceObject): schema is OpenAPIV3_1.NonArraySchemaObject {\n return typeof schema.type === 'string' && schema.type !== 'array'\n}\n","import type { OpenAPIV3_1 } from '@scalar/openapi-types'\n\n\nexport function isRef(schema: OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ResponseObject | OpenAPIV3_1.ParameterObject): schema is OpenAPIV3_1.ReferenceObject {\n return '$ref' in schema\n}\n","import { isArray } from './is-array.js'\nimport { isMixed } from './is-mixed.js'\nimport { isNonArray } from './is-non-array.js'\nimport { isRef } from './is-ref.js'\n\n\nexport class JsonSchemaUtils {\n static isRef = isRef\n static isArray = isArray\n static isNonArray = isNonArray\n static isMixed = isMixed\n}\n"],"mappings":"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","names":[]}
@@ -0,0 +1,120 @@
1
+ // src/plugins/eslint/index.ts
2
+ import { ESLint } from "eslint";
3
+ var EslintPlugin = class _EslintPlugin {
4
+ constructor(options = {}) {
5
+ this.options = options;
6
+ }
7
+ apply(compiler) {
8
+ compiler.hooks.afterPersist.tapPromise(_EslintPlugin.name, async (task) => {
9
+ const files = compiler.context.persisted?.files || [];
10
+ if (files.length === 0) return;
11
+ const eslint = new ESLint({ fix: true });
12
+ const results = await eslint.lintFiles(files.map((file) => file.path));
13
+ await ESLint.outputFixes(results);
14
+ });
15
+ if (this.options.disable && this.options.disable.length > 0) {
16
+ const $rules = [
17
+ ...this.options.disable.map((rule) => `/* eslint-disable ${rule} */`)
18
+ ].join("\n");
19
+ compiler.hooks.afterCompileKeqRequest.tap(_EslintPlugin.name, (artifact) => {
20
+ artifact.anchor.append("file:start", $rules);
21
+ return artifact;
22
+ });
23
+ compiler.hooks.afterCompileOperationRequest.tap(_EslintPlugin.name, (artifact) => {
24
+ artifact.anchor.append("file:start", $rules);
25
+ return artifact;
26
+ });
27
+ compiler.hooks.afterCompileOperationType.tap(_EslintPlugin.name, (artifact) => {
28
+ artifact.anchor.append("file:start", $rules);
29
+ return artifact;
30
+ });
31
+ compiler.hooks.afterCompileSchema.tap(_EslintPlugin.name, (artifact) => {
32
+ artifact.anchor.append("file:start", $rules);
33
+ return artifact;
34
+ });
35
+ }
36
+ }
37
+ };
38
+
39
+ // src/plugins/prettier/index.ts
40
+ import { exec } from "child_process";
41
+ import { promisify } from "util";
42
+ var execAsync = promisify(exec);
43
+ var PrettierPlugin = class _PrettierPlugin {
44
+ apply(compiler) {
45
+ compiler.hooks.afterPersist.tapPromise(_PrettierPlugin.name, async () => {
46
+ const files = compiler.context.persisted?.files || [];
47
+ if (files.length === 0) return;
48
+ const filePaths = files.map((file) => file.path).join(" ");
49
+ await execAsync(`prettier --write ${filePaths}`);
50
+ });
51
+ }
52
+ };
53
+
54
+ // src/plugins/body-fallback/index.ts
55
+ import * as R from "ramda";
56
+
57
+ // src/utils/json-schema-utils/is-array.ts
58
+ function isArray(schema) {
59
+ return schema.type === "array";
60
+ }
61
+
62
+ // src/utils/json-schema-utils/is-mixed.ts
63
+ function isMixed(schema) {
64
+ return Array.isArray(schema.type);
65
+ }
66
+
67
+ // src/utils/json-schema-utils/is-non-array.ts
68
+ function isNonArray(schema) {
69
+ return typeof schema.type === "string" && schema.type !== "array";
70
+ }
71
+
72
+ // src/utils/json-schema-utils/is-ref.ts
73
+ function isRef(schema) {
74
+ return "$ref" in schema;
75
+ }
76
+
77
+ // src/utils/json-schema-utils/index.ts
78
+ var JsonSchemaUtils = class {
79
+ static isRef = isRef;
80
+ static isArray = isArray;
81
+ static isNonArray = isNonArray;
82
+ static isMixed = isMixed;
83
+ };
84
+
85
+ // src/plugins/body-fallback/index.ts
86
+ var BodyFallbackPlugin = class _BodyFallbackPlugin {
87
+ apply(compiler) {
88
+ compiler.hooks.afterCompileOperationRequest.tap(_BodyFallbackPlugin.name, (artifact, operationDefinition) => {
89
+ const operation = operationDefinition.operation;
90
+ const parameters = operation.parameters?.filter((p) => !JsonSchemaUtils.isRef(p)) || [];
91
+ const keys = parameters.map((p) => p.name).filter(R.isNotNil);
92
+ const $acc = !keys.length ? " acc[key] = args[key]" : [
93
+ ` if (![${keys.map((k) => JSON.stringify(k)).join(", ")}].includes(key)) {`,
94
+ " acc[key] = args[key]",
95
+ " }"
96
+ ].join("\n");
97
+ artifact.anchor.block.replace("body", [
98
+ // $mediaType ? `${$mediaType}\n` : undefined,
99
+ ' if (typeof args === "object" && args !== null && !Array.isArray(args)) {',
100
+ " const requestBody = Object.keys(args)",
101
+ " .reduce((acc, key) => {",
102
+ $acc,
103
+ " return acc",
104
+ " }, {} as Record<string, unknown>)",
105
+ "",
106
+ " if (Object.keys(requestBody).length > 0) {",
107
+ " req.send(requestBody)",
108
+ " }",
109
+ " }"
110
+ ].filter(R.isNotNil).join("\n"));
111
+ return artifact;
112
+ });
113
+ }
114
+ };
115
+ export {
116
+ BodyFallbackPlugin,
117
+ EslintPlugin,
118
+ PrettierPlugin
119
+ };
120
+ //# sourceMappingURL=plugins.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/plugins/eslint/index.ts","../src/plugins/prettier/index.ts","../src/plugins/body-fallback/index.ts","../src/utils/json-schema-utils/is-array.ts","../src/utils/json-schema-utils/is-mixed.ts","../src/utils/json-schema-utils/is-non-array.ts","../src/utils/json-schema-utils/is-ref.ts","../src/utils/json-schema-utils/index.ts"],"sourcesContent":["import { Compiler } from '~/compiler/compiler.js'\nimport { Plugin } from '~/types/plugin.js'\nimport { ESLint } from 'eslint'\n\n\ninterface EslintPluginOptions {\n /**\n * List of ESLint rules to disable\n */\n disable?: string[]\n}\n\nexport class EslintPlugin implements Plugin {\n constructor(private options: EslintPluginOptions = {}) {}\n\n\n apply(compiler: Compiler): void {\n compiler.hooks.afterPersist.tapPromise(EslintPlugin.name, async (task) => {\n const files = compiler.context.persisted?.files || []\n if (files.length === 0) return\n\n const eslint = new ESLint({ fix: true })\n const results = await eslint.lintFiles(files.map((file) => file.path))\n await ESLint.outputFixes(results)\n })\n\n if (this.options.disable && this.options.disable.length > 0) {\n const $rules = [\n ...this.options.disable.map((rule) => `/* eslint-disable ${rule} */`),\n ].join('\\n')\n\n compiler.hooks.afterCompileKeqRequest.tap(EslintPlugin.name, (artifact) => {\n artifact.anchor.append('file:start', $rules)\n return artifact\n })\n\n compiler.hooks.afterCompileOperationRequest.tap(EslintPlugin.name, (artifact) => {\n artifact.anchor.append('file:start', $rules)\n return artifact\n })\n\n compiler.hooks.afterCompileOperationType.tap(EslintPlugin.name, (artifact) => {\n artifact.anchor.append('file:start', $rules)\n return artifact\n })\n\n compiler.hooks.afterCompileSchema.tap(EslintPlugin.name, (artifact) => {\n artifact.anchor.append('file:start', $rules)\n return artifact\n })\n }\n }\n}\n","import { Compiler } from '~/compiler/compiler.js'\nimport { Plugin } from '~/types/plugin.js'\nimport { exec } from 'child_process'\nimport { promisify } from 'util'\n\nconst execAsync = promisify(exec)\n\n\nexport class PrettierPlugin implements Plugin {\n apply(compiler: Compiler): void {\n compiler.hooks.afterPersist.tapPromise(PrettierPlugin.name, async () => {\n const files = compiler.context.persisted?.files || []\n if (files.length === 0) return\n\n const filePaths = files.map((file) => file.path).join(' ')\n await execAsync(`prettier --write ${filePaths}`)\n })\n }\n}\n","import * as R from 'ramda'\nimport { Compiler } from '~/compiler/compiler.js'\nimport { Artifact } from '~/tasks/utils/artifact.js'\nimport { OperationDefinition } from '~/tasks/utils/operation-definition.js'\nimport { Plugin } from '~/types/plugin.js'\nimport { JsonSchemaUtils } from '~/utils/json-schema-utils/index.js'\nimport { OpenAPIV3_1 } from '@scalar/openapi-types'\n\n\nexport class BodyFallbackPlugin implements Plugin {\n apply(compiler: Compiler): void {\n compiler.hooks.afterCompileOperationRequest.tap(BodyFallbackPlugin.name, (artifact: Artifact, operationDefinition: OperationDefinition) => {\n const operation = operationDefinition.operation\n\n // const mediaTypes = Object.keys(operation.requestBody?.content || {})\n // .filter((key) => key !== '*/*')\n\n // console.log('BodyFallbackPlugin mediaTypes:', mediaTypes)\n // let $mediaType: string | undefined = undefined\n\n // if (mediaTypes.length === 1) {\n // const mediaType = mediaTypes[0]\n // if (mediaType === 'application/json') $mediaType = ' req.type(\"application/json\")'\n // else if (mediaType === 'application/x-www-form-urlencoded') $mediaType = ' req.type(\"application/x-www-form-urlencoded\")'\n // else if (mediaType === 'multipart/form-data') $mediaType = ' req.type(\"multipart/form-data\")'\n // } else if (mediaTypes.length > 1) {\n // $mediaType = [\n // ' req.appendMiddlewares(async (context, next) => {',\n // ' const contentType = context.request.headers.get(\"Content-Type\") || \"\"',\n // ' if (!contentType) {',\n // ` throw new Error(\"[Plugin ${BodyFallbackPlugin.name}] Cannot determine request body media type. Multiple media types are defined: ${mediaTypes.join(', ')}. Please set the Content-Type header explicitly.\")`,\n // ' }',\n // ' await next()',\n // ' })',\n // ].join('\\n')\n // }\n\n const parameters = operation.parameters?.filter((p): p is OpenAPIV3_1.ParameterObject => !JsonSchemaUtils.isRef(p)) || []\n const keys = parameters.map((p) => p.name).filter(R.isNotNil)\n\n const $acc = !keys.length\n ? ' acc[key] = args[key]'\n : [\n ` if (![${keys.map((k) => JSON.stringify(k)).join(', ')}].includes(key)) {`,\n ' acc[key] = args[key]',\n ' }',\n ].join('\\n')\n\n artifact.anchor.block.replace('body', [\n // $mediaType ? `${$mediaType}\\n` : undefined,\n ' if (typeof args === \"object\" && args !== null && !Array.isArray(args)) {',\n ' const requestBody = Object.keys(args)',\n ' .reduce((acc, key) => {',\n $acc,\n ' return acc',\n ' }, {} as Record<string, unknown>)',\n '',\n ' if (Object.keys(requestBody).length > 0) {',\n ' req.send(requestBody)',\n ' }',\n ' }',\n ].filter(R.isNotNil).join('\\n'))\n\n return artifact\n })\n }\n}\n","import type { OpenAPIV3_1 } from '@scalar/openapi-types'\n\nexport function isArray(schema: OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ReferenceObject): schema is OpenAPIV3_1.ArraySchemaObject {\n return schema.type === 'array'\n}\n","\nimport type { OpenAPIV3_1 } from '@scalar/openapi-types'\nimport { MixedSchemaObject } from './types/mixed-schema-object.js'\n\nexport function isMixed(schema: OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ReferenceObject): schema is MixedSchemaObject {\n return Array.isArray(schema.type)\n}\n","import type { OpenAPIV3_1 } from '@scalar/openapi-types'\n\nexport function isNonArray(schema: OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ReferenceObject): schema is OpenAPIV3_1.NonArraySchemaObject {\n return typeof schema.type === 'string' && schema.type !== 'array'\n}\n","import type { OpenAPIV3_1 } from '@scalar/openapi-types'\n\n\nexport function isRef(schema: OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ResponseObject | OpenAPIV3_1.ParameterObject): schema is OpenAPIV3_1.ReferenceObject {\n return '$ref' in schema\n}\n","import { isArray } from './is-array.js'\nimport { isMixed } from './is-mixed.js'\nimport { isNonArray } from './is-non-array.js'\nimport { isRef } from './is-ref.js'\n\n\nexport class JsonSchemaUtils {\n static isRef = isRef\n static isArray = isArray\n static isNonArray = isNonArray\n static isMixed = isMixed\n}\n"],"mappings":"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","names":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/renderer/json-schema/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAMrE,wBAAsB,kBAAkB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAa5F"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/renderer/json-schema/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAMrE,wBAAsB,kBAAkB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAoC5F"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/renderer/operation-request/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAA;AAM3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAiBlE,UAAU,+BAA+B;IACvC,EAAE,EAAE,sBAAsB,CAAA;CAC3B;AAGD,wBAAsB,wBAAwB,CAAC,mBAAmB,EAAE,mBAAmB,EAAE,OAAO,EAAE,+BAA+B,GAAG,OAAO,CAAC,MAAM,CAAC,CAwGlJ"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/renderer/operation-request/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAA;AAM3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAiBlE,UAAU,+BAA+B;IACvC,EAAE,EAAE,sBAAsB,CAAA;CAC3B;AAyID,wBAAsB,wBAAwB,CAAC,mBAAmB,EAAE,mBAAmB,EAAE,OAAO,EAAE,+BAA+B,GAAG,OAAO,CAAC,MAAM,CAAC,CAwDlJ"}
@@ -1,5 +1,6 @@
1
1
  import { Alias } from '../utils/generate-schema.js';
2
2
  import { OperationDefinition } from '../../tasks/utils/operation-definition.js';
3
- export declare function typeNameFactory(operationDefinition: OperationDefinition): (name: string) => string;
3
+ export type TypeNameFn = (name: string) => string;
4
+ export declare function typeNameFactory(operationDefinition: OperationDefinition): TypeNameFn;
4
5
  export declare function operationTypeRenderer(operationDefinition: OperationDefinition, alias?: Alias): Promise<string>;
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/renderer/operation-type/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAA0B,MAAM,6BAA6B,CAAA;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAA;AAK3E,wBAAgB,eAAe,CAAC,mBAAmB,EAAE,mBAAmB,IAE9D,MAAM,MAAM,YACrB;AAGD,wBAAsB,qBAAqB,CAAC,mBAAmB,EAAE,mBAAmB,EAAE,KAAK,GAAE,KAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,CAiEhI"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/renderer/operation-type/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAA0B,MAAM,6BAA6B,CAAA;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAA;AAM3E,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;AAEjD,wBAAgB,eAAe,CAAC,mBAAmB,EAAE,mBAAmB,GAAG,UAAU,CAGpF;AAqHD,wBAAsB,qBAAqB,CAAC,mBAAmB,EAAE,mBAAmB,EAAE,KAAK,GAAE,KAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,CAwChI"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/renderer/request/index.ts"],"names":[],"mappings":"AACA,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAKvD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/renderer/request/index.ts"],"names":[],"mappings":"AACA,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAWvD"}
@@ -1,8 +1,6 @@
1
1
  import { ListrTask } from 'listr2';
2
2
  import { TaskContext } from '../../tasks/types/task-context.js';
3
- export interface CompileTaskOptions {
4
- enabled?: boolean | ((ctx: TaskContext) => boolean | Promise<boolean>);
5
- skip?: boolean | string | ((ctx: TaskContext) => boolean | string | Promise<boolean | string>);
6
- }
7
- export declare function createCompileTask(options?: CompileTaskOptions): ListrTask<TaskContext>;
3
+ import { BaseTaskOptions } from '../types/base-task-options.js';
4
+ import type { Compiler } from '../../compiler/compiler.js';
5
+ export declare function createCompileTask(compiler: Compiler, options?: BaseTaskOptions): ListrTask<TaskContext>;
8
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tasks/compile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAO3D,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAA;IACtE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAA;CAC/F;AAED,wBAAgB,iBAAiB,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC,WAAW,CAAC,CAkCtF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tasks/compile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAK3D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAyCtD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC,WAAW,CAAC,CAkBvG"}
@@ -1,7 +1,10 @@
1
1
  import { RuntimeConfig } from '../../../types/runtime-config.js';
2
- import { Artifact } from '../../../tasks/utils/artifact.js';
3
- import { OperationDefinition } from '../../../tasks/utils/operation-definition.js';
2
+ import type { Compiler } from '../../../compiler/compiler.js';
3
+ import { OperationDefinition, Artifact } from '../../../tasks/utils/index.js';
4
+ import { TaskWrapper } from '../../../tasks/types/index.js';
4
5
  interface CompileProcessorOptions {
6
+ compiler: Compiler;
7
+ task: TaskWrapper;
5
8
  rc: RuntimeConfig;
6
9
  requestArtifact: Artifact;
7
10
  schemaArtifacts: Artifact[];
@@ -1 +1 @@
1
- {"version":3,"file":"compile-operation-definition.d.ts","sourceRoot":"","sources":["../../../../src/tasks/compile/utils/compile-operation-definition.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAEpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAA;AAI3E,UAAU,uBAAuB;IAC/B,EAAE,EAAE,aAAa,CAAA;IACjB,eAAe,EAAE,QAAQ,CAAA;IACzB,eAAe,EAAE,QAAQ,EAAE,CAAA;IAC3B,oBAAoB,EAAE,mBAAmB,EAAE,CAAA;CAC5C;AAgCD,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CA0ItG"}
1
+ {"version":3,"file":"compile-operation-definition.d.ts","sourceRoot":"","sources":["../../../../src/tasks/compile/utils/compile-operation-definition.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAGzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,EAAwB,mBAAmB,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAC5F,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAGpD,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,QAAQ,CAAA;IAClB,IAAI,EAAE,WAAW,CAAA;IACjB,EAAE,EAAE,aAAa,CAAA;IACjB,eAAe,EAAE,QAAQ,CAAA;IACzB,eAAe,EAAE,QAAQ,EAAE,CAAA;IAC3B,oBAAoB,EAAE,mBAAmB,EAAE,CAAA;CAC5C;AAgCD,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAyItG"}
@@ -1,6 +1,9 @@
1
- import { Artifact } from '../../../tasks/utils/artifact.js';
2
- import { SchemaDefinition } from '../../../tasks/utils/schema-definition.js';
1
+ import { Compiler } from '../../../compiler/compiler.js';
2
+ import { TaskWrapper } from '../../../tasks/types/index.js';
3
+ import { SchemaDefinition, Artifact } from '../../../tasks/utils/index.js';
3
4
  interface CompileProcessorOptions {
5
+ compiler: Compiler;
6
+ task: TaskWrapper;
4
7
  schemaDefinitions: SchemaDefinition[];
5
8
  }
6
9
  export declare function genSchemaDefinitionFilepath(schemaDefinition: SchemaDefinition): string;
@@ -1 +1 @@
1
- {"version":3,"file":"compile-schema-definition.d.ts","sourceRoot":"","sources":["../../../../src/tasks/compile/utils/compile-schema-definition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAGrE,UAAU,uBAAuB;IAE/B,iBAAiB,EAAE,gBAAgB,EAAE,CAAA;CACtC;AAED,wBAAgB,2BAA2B,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,MAAM,CAStF;AAYD,eAAO,MAAM,oBAAoB,GAAa,kBAAkB,gBAAgB,MACtE,UAAU,QAAQ,KAAG,OAC9B,CAAA;AAED,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAmEnG"}
1
+ {"version":3,"file":"compile-schema-definition.d.ts","sourceRoot":"","sources":["../../../../src/tasks/compile/utils/compile-schema-definition.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAGnE,UAAU,uBAAuB;IAE/B,QAAQ,EAAE,QAAQ,CAAA;IAClB,IAAI,EAAE,WAAW,CAAA;IACjB,iBAAiB,EAAE,gBAAgB,EAAE,CAAA;CACtC;AAED,wBAAgB,2BAA2B,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,MAAM,CAStF;AAYD,eAAO,MAAM,oBAAoB,GAAa,kBAAkB,gBAAgB,MACtE,UAAU,QAAQ,KAAG,OAC9B,CAAA;AAED,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAqEnG"}
@@ -1,10 +1,10 @@
1
1
  import { ListrTask } from 'listr2';
2
2
  import { TaskContext } from '../types/task-context.js';
3
+ import { BaseTaskOptions } from '../types/base-task-options.js';
4
+ import type { Compiler } from '../../compiler/compiler.js';
3
5
  interface DownloadTaskOptions {
4
- enabled?: boolean | ((ctx: TaskContext) => boolean | Promise<boolean>);
5
- skip?: boolean | string | ((ctx: TaskContext) => boolean | string | Promise<boolean | string>);
6
6
  skipIgnoredModules?: boolean;
7
7
  }
8
- export declare function createDownloadTask(options?: DownloadTaskOptions): ListrTask<TaskContext>;
8
+ export declare function createDownloadTask(compiler: Compiler, options?: DownloadTaskOptions & BaseTaskOptions): ListrTask<TaskContext>;
9
9
  export {};
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tasks/download/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAgB,MAAM,QAAQ,CAAA;AAGhD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAGtD,UAAU,mBAAmB;IAC3B,OAAO,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAA;IACtE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAA;IAE9F,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC,WAAW,CAAC,CA+CxF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tasks/download/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAgB,MAAM,QAAQ,CAAA;AAGhD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAGtD,UAAU,mBAAmB;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAgDD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,eAAe,GAAG,SAAS,CAAC,WAAW,CAAC,CAkB9H"}
@@ -1,12 +1,10 @@
1
- import { SetupTaskOptions } from './setup/index.js';
2
- import { AppendIgnoreRulesTaskOptions } from './append-ignore-rule/index.js';
3
- export type BuildOptions = SetupTaskOptions & {
4
- interactive?: boolean;
5
- };
6
- export declare function build(options: BuildOptions): Promise<void>;
7
- export type IgnoreOptions = SetupTaskOptions & AppendIgnoreRulesTaskOptions & {
8
- build?: boolean;
9
- interactive?: boolean;
10
- };
11
- export declare function ignore(options: IgnoreOptions): Promise<void>;
1
+ export * from './setup/index.js';
2
+ export * from './download/index.js';
3
+ export * from './validate/index.js';
4
+ export * from './shaking/index.js';
5
+ export * from './persist/index.js';
6
+ export * from './compile/index.js';
7
+ export * from './interactive/index.js';
8
+ export { TaskWrapper, TaskContext, } from './types/index.js';
9
+ export { Artifact, OperationDefinition, SchemaDefinition, ModuleDefinition, ApiDocument, ApiDocumentV3_1, } from './utils/index.js';
12
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tasks/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAMpE,OAAO,EAA+B,4BAA4B,EAAE,MAAM,+BAA+B,CAAA;AAIzG,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,wBAAsB,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBhE;AAGD,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG,4BAA4B,GAAG;IAC5E,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,wBAAsB,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBlE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tasks/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,wBAAwB,CAAA;AAEtC,OAAO,EACL,WAAW,EACX,WAAW,GACZ,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EACL,QAAQ,EACR,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,eAAe,GAChB,MAAM,kBAAkB,CAAA"}
@@ -1,12 +1,15 @@
1
1
  import { ListrTask } from 'listr2';
2
2
  import { TaskContext } from '../types/task-context.js';
3
3
  import { IgnoreMode } from '../types/ignore-mode.js';
4
- interface InteractiveTaskOptions {
5
- enabled?: boolean | ((ctx: TaskContext) => boolean | Promise<boolean>);
6
- skip?: boolean | string | ((ctx: TaskContext) => boolean | string | Promise<boolean | string>);
4
+ import { BaseTaskOptions } from '../types/base-task-options.js';
5
+ export interface InteractiveTaskOptions {
7
6
  mode: IgnoreMode;
8
- override?: boolean;
7
+ persist?: boolean;
8
+ /**
9
+ * Remove all previously matcher rules.
10
+ * This means that all rules form `.keqignore` file will be removed.
11
+ */
12
+ clear?: boolean;
9
13
  }
10
- export declare function createInteractiveTask(options: InteractiveTaskOptions): ListrTask<TaskContext>;
11
- export {};
14
+ export declare function createInteractiveTask(options: InteractiveTaskOptions & BaseTaskOptions): ListrTask<TaskContext>;
12
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tasks/interactive/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD,UAAU,sBAAsB;IAC9B,OAAO,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAA;IACtE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAA;IAE9F,IAAI,EAAE,UAAU,CAAA;IAGhB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAGD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,GAAG,SAAS,CAAC,WAAW,CAAC,CAkC7F"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tasks/interactive/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,UAAU,CAAA;IAEhB,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAGD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,GAAG,eAAe,GAAG,SAAS,CAAC,WAAW,CAAC,CAkC/G"}
@@ -1,11 +1,6 @@
1
1
  import { ListrTask } from 'listr2';
2
2
  import { TaskContext } from '../../tasks/types/task-context.js';
3
- interface PersistTaskOptions {
4
- enabled?: boolean | ((ctx: TaskContext) => boolean | Promise<boolean>);
5
- skip?: boolean | string | ((ctx: TaskContext) => boolean | string | Promise<boolean | string>);
6
- persistIgnore?: boolean;
7
- persistArtifacts?: boolean;
8
- }
9
- export declare function createPersistTask(options?: PersistTaskOptions): ListrTask<TaskContext>;
10
- export {};
3
+ import { BaseTaskOptions } from '../types/base-task-options.js';
4
+ import type { Compiler } from '../../compiler/compiler.js';
5
+ export declare function createPersistTask(compiler: Compiler, options?: BaseTaskOptions): ListrTask<TaskContext>;
11
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tasks/persist/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAG3D,UAAU,kBAAkB;IAC1B,OAAO,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAA;IACtE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAA;IAE9F,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAgDD,wBAAgB,iBAAiB,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC,WAAW,CAAC,CAkBtF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tasks/persist/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAmEtD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC,WAAW,CAAC,CAkBvG"}
@@ -1,10 +1,16 @@
1
1
  import { ListrTask } from 'listr2';
2
+ import { IgnoreMatcherRule } from '../../utils/ignore-matcher.js';
2
3
  import type { TaskContext } from '../types/task-context.js';
4
+ import type { BaseTaskOptions } from '../types/base-task-options.js';
5
+ import type { Compiler } from '../../compiler/compiler.js';
3
6
  export interface SetupTaskOptions {
4
7
  config?: string;
5
8
  debug?: boolean;
6
9
  tolerant?: boolean;
7
10
  modules?: string[];
11
+ ignore?: false | {
12
+ rules: IgnoreMatcherRule[];
13
+ };
8
14
  }
9
- export declare function createSetupTask(options: SetupTaskOptions): ListrTask<TaskContext>;
15
+ export declare function createSetupTask(compiler: Compiler, options: SetupTaskOptions & BaseTaskOptions): ListrTask<TaskContext>;
10
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tasks/setup/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAGlC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAI3D,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB;AAID,wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,SAAS,CAAC,WAAW,CAAC,CAmEjF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tasks/setup/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElC,OAAO,EAAiB,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAEhF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAG1D,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAElB,MAAM,CAAC,EAAE,KAAK,GAAG;QACf,KAAK,EAAE,iBAAiB,EAAE,CAAA;KAC3B,CAAA;CACF;AAwFD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,gBAAgB,GAAG,eAAe,GAAG,SAAS,CAAC,WAAW,CAAC,CAkBvH"}