@automatons/tools 2.1.4 → 2.2.1
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/index.d.ts +13 -3
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type Method = 'get' | 'put' | 'post' | 'delete' | 'options' | 'head' | 'patch' | 'trace';
|
|
1
|
+
type Method = 'get' | 'put' | 'post' | 'delete' | 'options' | 'head' | 'patch' | 'trace' | 'query';
|
|
2
2
|
|
|
3
3
|
interface Openapi {
|
|
4
4
|
openapi: string;
|
|
@@ -63,10 +63,12 @@ interface OpenapiPath {
|
|
|
63
63
|
head?: OpenapiPathOperation;
|
|
64
64
|
patch?: OpenapiPathOperation;
|
|
65
65
|
trace?: OpenapiPathOperation;
|
|
66
|
+
query?: OpenapiPathOperation;
|
|
67
|
+
additionalOperations?: OpenapiMap<OpenapiPathOperation>;
|
|
66
68
|
servers?: OpenapiServer[];
|
|
67
69
|
parameters?: OpenapiParameter[];
|
|
68
70
|
}
|
|
69
|
-
type OpenapiParameter = OpenapiParameterPath | OpenapiParameterQuery | OpenapiParameterHeader | OpenapiParameterCookie | OpenapiReference;
|
|
71
|
+
type OpenapiParameter = OpenapiParameterPath | OpenapiParameterQuery | OpenapiParameterQueryString | OpenapiParameterHeader | OpenapiParameterCookie | OpenapiReference;
|
|
70
72
|
type OpenapiParameterCommon = {
|
|
71
73
|
name: string;
|
|
72
74
|
description?: string;
|
|
@@ -100,6 +102,13 @@ type OpenapiParameterCookie = {
|
|
|
100
102
|
style: 'form';
|
|
101
103
|
required?: boolean;
|
|
102
104
|
} & OpenapiParameterCommon;
|
|
105
|
+
type OpenapiParameterQueryString = {
|
|
106
|
+
in: 'querystring';
|
|
107
|
+
name: string;
|
|
108
|
+
description?: string;
|
|
109
|
+
required?: boolean;
|
|
110
|
+
content: OpenapiMap<OpenapiPathMedia>;
|
|
111
|
+
};
|
|
103
112
|
interface OpenapiPathOperation extends OpenapiPathCommon {
|
|
104
113
|
operationId: string;
|
|
105
114
|
tags?: string[];
|
|
@@ -319,6 +328,7 @@ declare const hasContent: (param: OpenapiParameter) => param is OpenapiParameter
|
|
|
319
328
|
};
|
|
320
329
|
declare const isPathParam: (param: OpenapiParameter) => param is OpenapiParameterPath;
|
|
321
330
|
declare const isQueryParam: (param: OpenapiParameter) => param is OpenapiParameterQuery;
|
|
331
|
+
declare const isQueryStringParam: (param: OpenapiParameter) => param is OpenapiParameterQueryString;
|
|
322
332
|
declare const isHeaderParam: (param: OpenapiParameter) => param is OpenapiParameterHeader;
|
|
323
333
|
declare const isCookieParam: (param: OpenapiParameter) => param is OpenapiParameterCookie;
|
|
324
334
|
|
|
@@ -349,4 +359,4 @@ type AutomatonSetting = {
|
|
|
349
359
|
options?: object;
|
|
350
360
|
};
|
|
351
361
|
|
|
352
|
-
export { type Automaton, type AutomatonContext, type AutomatonSetting, type AutomatonSettings, HTTP_METHODS, type Method, type Openapi, type OpenapiComponents, type OpenapiExample, type OpenapiExternalDocument, type OpenapiInfo, type OpenapiInfoContact, type OpenapiInfoLicense, type OpenapiMap, type OpenapiParameter, type OpenapiParameterCommon, type OpenapiParameterCookie, type OpenapiParameterHeader, type OpenapiParameterPath, type OpenapiParameterQuery, type OpenapiPath, type OpenapiPathCommon, type OpenapiPathMedia, type OpenapiPathOperation, type OpenapiPathRequestBody, type OpenapiPathResponse, type OpenapiPathResponseHeader, type OpenapiPathResponseLink, type OpenapiPathResponseMediaEncoding, type OpenapiReference, type OpenapiSchema, type OpenapiSchemaAllOf, type OpenapiSchemaAnyOf, type OpenapiSchemaArray, type OpenapiSchemaBoolean, type OpenapiSchemaCommon, type OpenapiSchemaInteger, type OpenapiSchemaNumber, type OpenapiSchemaObject, type OpenapiSchemaOneOf, type OpenapiSchemaReference, type OpenapiSchemaString, type OpenapiSecurity, type OpenapiSecurityApiKeySchema, type OpenapiSecurityHttpBearerSchema, type OpenapiSecurityHttpSchema, type OpenapiSecurityOAuth2Schema, type OpenapiSecurityOAuthFlow, type OpenapiSecurityOpenIdConnectSchema, type OpenapiSecuritySchema, type OpenapiServer, type OpenapiServerVariable, type OpenapiTag, type Setting, fetch, hasContent, hasSchema, isCookieParam, isHeaderParam, isPathParam, isQueryParam, isRef, isSchemaAllOf, isSchemaAnyOf, isSchemaArray, isSchemaBoolean, isSchemaInteger, isSchemaNumber, isSchemaObject, isSchemaOneOf, isSchemaRef, isSchemaString, isUrl, referenceSchema, referenceTitle };
|
|
362
|
+
export { type Automaton, type AutomatonContext, type AutomatonSetting, type AutomatonSettings, HTTP_METHODS, type Method, type Openapi, type OpenapiComponents, type OpenapiExample, type OpenapiExternalDocument, type OpenapiInfo, type OpenapiInfoContact, type OpenapiInfoLicense, type OpenapiMap, type OpenapiParameter, type OpenapiParameterCommon, type OpenapiParameterCookie, type OpenapiParameterHeader, type OpenapiParameterPath, type OpenapiParameterQuery, type OpenapiParameterQueryString, type OpenapiPath, type OpenapiPathCommon, type OpenapiPathMedia, type OpenapiPathOperation, type OpenapiPathRequestBody, type OpenapiPathResponse, type OpenapiPathResponseHeader, type OpenapiPathResponseLink, type OpenapiPathResponseMediaEncoding, type OpenapiReference, type OpenapiSchema, type OpenapiSchemaAllOf, type OpenapiSchemaAnyOf, type OpenapiSchemaArray, type OpenapiSchemaBoolean, type OpenapiSchemaCommon, type OpenapiSchemaInteger, type OpenapiSchemaNumber, type OpenapiSchemaObject, type OpenapiSchemaOneOf, type OpenapiSchemaReference, type OpenapiSchemaString, type OpenapiSecurity, type OpenapiSecurityApiKeySchema, type OpenapiSecurityHttpBearerSchema, type OpenapiSecurityHttpSchema, type OpenapiSecurityOAuth2Schema, type OpenapiSecurityOAuthFlow, type OpenapiSecurityOpenIdConnectSchema, type OpenapiSecuritySchema, type OpenapiServer, type OpenapiServerVariable, type OpenapiTag, type Setting, fetch, hasContent, hasSchema, isCookieParam, isHeaderParam, isPathParam, isQueryParam, isQueryStringParam, isRef, isSchemaAllOf, isSchemaAnyOf, isSchemaArray, isSchemaBoolean, isSchemaInteger, isSchemaNumber, isSchemaObject, isSchemaOneOf, isSchemaRef, isSchemaString, isUrl, referenceSchema, referenceTitle };
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/values/http.ts
|
|
2
|
-
var HTTP_METHODS = ["get", "put", "post", "delete", "options", "head", "patch", "trace"];
|
|
2
|
+
var HTTP_METHODS = ["get", "put", "post", "delete", "options", "head", "patch", "trace", "query"];
|
|
3
3
|
|
|
4
4
|
// src/utils/fetch.ts
|
|
5
5
|
import { readFile } from "fs/promises";
|
|
@@ -53,6 +53,7 @@ var hasSchema = (param) => Object.hasOwn(param, "schema");
|
|
|
53
53
|
var hasContent = (param) => Object.hasOwn(param, "content");
|
|
54
54
|
var isPathParam = (param) => !isRef(param) && param.in === "path";
|
|
55
55
|
var isQueryParam = (param) => !isRef(param) && param.in === "query";
|
|
56
|
+
var isQueryStringParam = (param) => !isRef(param) && param.in === "querystring";
|
|
56
57
|
var isHeaderParam = (param) => !isRef(param) && param.in === "header";
|
|
57
58
|
var isCookieParam = (param) => !isRef(param) && param.in === "cookie";
|
|
58
59
|
|
|
@@ -107,6 +108,7 @@ export {
|
|
|
107
108
|
isHeaderParam,
|
|
108
109
|
isPathParam,
|
|
109
110
|
isQueryParam,
|
|
111
|
+
isQueryStringParam,
|
|
110
112
|
isRef,
|
|
111
113
|
isSchemaAllOf,
|
|
112
114
|
isSchemaAnyOf,
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/values/http.ts","../src/utils/fetch.ts","../src/utils/url.ts","../src/utils/openapi.ts","../src/utils/parameter.ts","../src/utils/reference.ts","../src/utils/schema.ts"],"sourcesContent":["import {Method} from '../types';\n\nexport const HTTP_METHODS: Method[] = ['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace'];\n","import {readFile} from 'node:fs/promises';\nimport {dirname, extname, resolve} from 'node:path';\nimport {load} from 'js-yaml';\nimport {Openapi} from '../types';\nimport {isUrl} from './url';\n\nexport const fetch = async <T = Openapi>(url: string, openapiPath?: string): Promise<T> =>\n parse(await read(url, openapiPath), url);\n\nconst read = async (url: string, openapiPath?: string): Promise<string> => {\n if (isUrl(url)) {\n return fetchText(url);\n }\n if (openapiPath && isUrl(openapiPath)) {\n return fetchText(new URL(url, openapiPath).toString());\n }\n const base = openapiPath ? (extname(openapiPath) ? dirname(openapiPath) : openapiPath) : '';\n return readFile(resolve(base, url), {encoding: 'utf-8'});\n};\n\nconst fetchText = async (url: string): Promise<string> => {\n const response = await globalThis.fetch(url);\n if (!response.ok) {\n throw new Error(`Failed to fetch ${url}: ${response.status} ${response.statusText}`);\n }\n return response.text();\n};\n\nconst parse = <T = Openapi>(data: string, filePath: string): T => {\n switch (extname(filePath)) {\n case '.json':\n return JSON.parse(data);\n case '.yml':\n case '.yaml': {\n const yaml = load(data);\n if (typeof yaml === 'object') {\n return yaml as T;\n }\n throw new Error('Unsupported file format');\n }\n default:\n throw new Error('Unsupported file extension');\n }\n};\n","export const isUrl = (url: string) =>\n url.startsWith('http://') || url.startsWith('https://');\n","import {OpenapiReference} from '../types';\n\nexport const isRef = (schema: any): schema is OpenapiReference => Object.hasOwn(schema, '$ref');\n","import {\n OpenapiMap,\n OpenapiParameter,\n OpenapiParameterCookie,\n OpenapiParameterHeader,\n OpenapiParameterPath,\n OpenapiParameterQuery,\n OpenapiPathMedia,\n OpenapiSchema,\n} from '../types';\nimport {isRef} from './openapi';\n\nexport const hasSchema =\n (param: OpenapiParameter): param is OpenapiParameter & { schema: OpenapiSchema } =>\n Object.hasOwn(param, 'schema');\nexport const hasContent =\n (param: OpenapiParameter): param is OpenapiParameter & { content: OpenapiMap<OpenapiPathMedia> } =>\n Object.hasOwn(param, 'content');\nexport const isPathParam =\n (param: OpenapiParameter): param is OpenapiParameterPath => !isRef(param) && param.in === 'path';\nexport const isQueryParam =\n (param: OpenapiParameter): param is OpenapiParameterQuery => !isRef(param) && param.in === 'query';\nexport const isHeaderParam =\n (param: OpenapiParameter): param is OpenapiParameterHeader => !isRef(param) && param.in === 'header';\nexport const isCookieParam =\n (param: OpenapiParameter): param is OpenapiParameterCookie => !isRef(param) && param.in === 'cookie';\n","import {parse} from 'path';\nimport {AutomatonContext, OpenapiReference} from '../types';\nimport {fetch} from './fetch';\nimport {isRef} from './openapi';\nimport {isUrl} from './url';\n\nexport const referenceTitle = (schema: OpenapiReference): string => {\n const [url = '', path = ''] = schema.$ref.split('#');\n const paths = path.split('/').slice(1);\n if (paths.length) {\n return paths[paths.length - 1]!;\n } else if (isUrl(url)) {\n return parse(url).name;\n }\n throw new Error(`Invalid ref format: ${schema.$ref}\\n Can not extract name.`);\n};\n\ntype ReferenceSchema<T = unknown> = (T | OpenapiReference) | (T & OpenapiReference);\nexport const referenceSchema =\n async <T = unknown>(schema: ReferenceSchema<T>, {openapi, settings: {openapiPath}}: AutomatonContext): Promise<T> => {\n if (!isRef(schema)) return schema;\n const [url, path] = schema.$ref.split('#');\n const file = url ? await fetch<T>(url, openapiPath) : openapi;\n if (!path) {\n if (!file) {\n throw new Error(`Invalid ref path ${schema.$ref}`);\n }\n return file as T;\n }\n const paths = path?.split('/').slice(1);\n const extractSchema = paths?.reduce((pre: any, cur) => pre?.[cur], file) as T | undefined;\n if (!extractSchema) {\n throw new Error(`Invalid ref path ${schema.$ref}`);\n }\n return extractSchema;\n };\n","import {\n OpenapiSchema,\n OpenapiSchemaAllOf,\n OpenapiSchemaArray,\n OpenapiSchemaBoolean,\n OpenapiSchemaInteger,\n OpenapiSchemaNumber,\n OpenapiSchemaAnyOf,\n OpenapiSchemaObject,\n OpenapiSchemaOneOf,\n OpenapiSchemaReference,\n OpenapiSchemaString,\n} from '../types';\n\nexport const isSchemaString =\n (type: OpenapiSchema): type is OpenapiSchemaString => (type as OpenapiSchemaString).type === 'string';\nexport const isSchemaNumber =\n (type: OpenapiSchema): type is OpenapiSchemaNumber => (type as OpenapiSchemaNumber).type === 'number';\nexport const isSchemaInteger =\n (type: OpenapiSchema): type is OpenapiSchemaInteger => (type as OpenapiSchemaInteger).type === 'integer';\nexport const isSchemaBoolean =\n (type: OpenapiSchema): type is OpenapiSchemaBoolean => (type as OpenapiSchemaBoolean).type === 'boolean';\nexport const isSchemaObject =\n (type: OpenapiSchema): type is OpenapiSchemaObject =>\n (type as OpenapiSchemaObject).type === 'object' || Object.hasOwn(type, 'properties');\nexport const isSchemaArray =\n (type: OpenapiSchema): type is OpenapiSchemaArray =>\n (type as OpenapiSchemaArray).type === 'array' || Object.hasOwn(type, 'items');\nexport const isSchemaAllOf =\n (type: OpenapiSchema): type is OpenapiSchemaAllOf => Object.hasOwn(type, 'allOf');\nexport const isSchemaOneOf =\n (type: OpenapiSchema): type is OpenapiSchemaOneOf => Object.hasOwn(type, 'oneOf');\nexport const isSchemaAnyOf =\n (type: OpenapiSchema): type is OpenapiSchemaAnyOf => Object.hasOwn(type, 'anyOf');\nexport const isSchemaRef =\n (type: OpenapiSchema): type is OpenapiSchemaReference => Object.hasOwn(type, '$ref');\n"],"mappings":";AAEO,IAAM,eAAyB,CAAC,OAAO,OAAO,QAAQ,UAAU,WAAW,QAAQ,SAAS,OAAO;;;
|
|
1
|
+
{"version":3,"sources":["../src/values/http.ts","../src/utils/fetch.ts","../src/utils/url.ts","../src/utils/openapi.ts","../src/utils/parameter.ts","../src/utils/reference.ts","../src/utils/schema.ts"],"sourcesContent":["import {Method} from '../types';\n\nexport const HTTP_METHODS: Method[] = ['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace', 'query'];\n","import {readFile} from 'node:fs/promises';\nimport {dirname, extname, resolve} from 'node:path';\nimport {load} from 'js-yaml';\nimport {Openapi} from '../types';\nimport {isUrl} from './url';\n\nexport const fetch = async <T = Openapi>(url: string, openapiPath?: string): Promise<T> =>\n parse(await read(url, openapiPath), url);\n\nconst read = async (url: string, openapiPath?: string): Promise<string> => {\n if (isUrl(url)) {\n return fetchText(url);\n }\n if (openapiPath && isUrl(openapiPath)) {\n return fetchText(new URL(url, openapiPath).toString());\n }\n const base = openapiPath ? (extname(openapiPath) ? dirname(openapiPath) : openapiPath) : '';\n return readFile(resolve(base, url), {encoding: 'utf-8'});\n};\n\nconst fetchText = async (url: string): Promise<string> => {\n const response = await globalThis.fetch(url);\n if (!response.ok) {\n throw new Error(`Failed to fetch ${url}: ${response.status} ${response.statusText}`);\n }\n return response.text();\n};\n\nconst parse = <T = Openapi>(data: string, filePath: string): T => {\n switch (extname(filePath)) {\n case '.json':\n return JSON.parse(data);\n case '.yml':\n case '.yaml': {\n const yaml = load(data);\n if (typeof yaml === 'object') {\n return yaml as T;\n }\n throw new Error('Unsupported file format');\n }\n default:\n throw new Error('Unsupported file extension');\n }\n};\n","export const isUrl = (url: string) =>\n url.startsWith('http://') || url.startsWith('https://');\n","import {OpenapiReference} from '../types';\n\nexport const isRef = (schema: any): schema is OpenapiReference => Object.hasOwn(schema, '$ref');\n","import {\n OpenapiMap,\n OpenapiParameter,\n OpenapiParameterCookie,\n OpenapiParameterHeader,\n OpenapiParameterPath,\n OpenapiParameterQuery,\n OpenapiParameterQueryString,\n OpenapiPathMedia,\n OpenapiSchema,\n} from '../types';\nimport {isRef} from './openapi';\n\nexport const hasSchema =\n (param: OpenapiParameter): param is OpenapiParameter & { schema: OpenapiSchema } =>\n Object.hasOwn(param, 'schema');\nexport const hasContent =\n (param: OpenapiParameter): param is OpenapiParameter & { content: OpenapiMap<OpenapiPathMedia> } =>\n Object.hasOwn(param, 'content');\nexport const isPathParam =\n (param: OpenapiParameter): param is OpenapiParameterPath => !isRef(param) && param.in === 'path';\nexport const isQueryParam =\n (param: OpenapiParameter): param is OpenapiParameterQuery => !isRef(param) && param.in === 'query';\nexport const isQueryStringParam =\n (param: OpenapiParameter): param is OpenapiParameterQueryString => !isRef(param) && param.in === 'querystring';\nexport const isHeaderParam =\n (param: OpenapiParameter): param is OpenapiParameterHeader => !isRef(param) && param.in === 'header';\nexport const isCookieParam =\n (param: OpenapiParameter): param is OpenapiParameterCookie => !isRef(param) && param.in === 'cookie';\n","import {parse} from 'path';\nimport {AutomatonContext, OpenapiReference} from '../types';\nimport {fetch} from './fetch';\nimport {isRef} from './openapi';\nimport {isUrl} from './url';\n\nexport const referenceTitle = (schema: OpenapiReference): string => {\n const [url = '', path = ''] = schema.$ref.split('#');\n const paths = path.split('/').slice(1);\n if (paths.length) {\n return paths[paths.length - 1]!;\n } else if (isUrl(url)) {\n return parse(url).name;\n }\n throw new Error(`Invalid ref format: ${schema.$ref}\\n Can not extract name.`);\n};\n\ntype ReferenceSchema<T = unknown> = (T | OpenapiReference) | (T & OpenapiReference);\nexport const referenceSchema =\n async <T = unknown>(schema: ReferenceSchema<T>, {openapi, settings: {openapiPath}}: AutomatonContext): Promise<T> => {\n if (!isRef(schema)) return schema;\n const [url, path] = schema.$ref.split('#');\n const file = url ? await fetch<T>(url, openapiPath) : openapi;\n if (!path) {\n if (!file) {\n throw new Error(`Invalid ref path ${schema.$ref}`);\n }\n return file as T;\n }\n const paths = path?.split('/').slice(1);\n const extractSchema = paths?.reduce((pre: any, cur) => pre?.[cur], file) as T | undefined;\n if (!extractSchema) {\n throw new Error(`Invalid ref path ${schema.$ref}`);\n }\n return extractSchema;\n };\n","import {\n OpenapiSchema,\n OpenapiSchemaAllOf,\n OpenapiSchemaArray,\n OpenapiSchemaBoolean,\n OpenapiSchemaInteger,\n OpenapiSchemaNumber,\n OpenapiSchemaAnyOf,\n OpenapiSchemaObject,\n OpenapiSchemaOneOf,\n OpenapiSchemaReference,\n OpenapiSchemaString,\n} from '../types';\n\nexport const isSchemaString =\n (type: OpenapiSchema): type is OpenapiSchemaString => (type as OpenapiSchemaString).type === 'string';\nexport const isSchemaNumber =\n (type: OpenapiSchema): type is OpenapiSchemaNumber => (type as OpenapiSchemaNumber).type === 'number';\nexport const isSchemaInteger =\n (type: OpenapiSchema): type is OpenapiSchemaInteger => (type as OpenapiSchemaInteger).type === 'integer';\nexport const isSchemaBoolean =\n (type: OpenapiSchema): type is OpenapiSchemaBoolean => (type as OpenapiSchemaBoolean).type === 'boolean';\nexport const isSchemaObject =\n (type: OpenapiSchema): type is OpenapiSchemaObject =>\n (type as OpenapiSchemaObject).type === 'object' || Object.hasOwn(type, 'properties');\nexport const isSchemaArray =\n (type: OpenapiSchema): type is OpenapiSchemaArray =>\n (type as OpenapiSchemaArray).type === 'array' || Object.hasOwn(type, 'items');\nexport const isSchemaAllOf =\n (type: OpenapiSchema): type is OpenapiSchemaAllOf => Object.hasOwn(type, 'allOf');\nexport const isSchemaOneOf =\n (type: OpenapiSchema): type is OpenapiSchemaOneOf => Object.hasOwn(type, 'oneOf');\nexport const isSchemaAnyOf =\n (type: OpenapiSchema): type is OpenapiSchemaAnyOf => Object.hasOwn(type, 'anyOf');\nexport const isSchemaRef =\n (type: OpenapiSchema): type is OpenapiSchemaReference => Object.hasOwn(type, '$ref');\n"],"mappings":";AAEO,IAAM,eAAyB,CAAC,OAAO,OAAO,QAAQ,UAAU,WAAW,QAAQ,SAAS,SAAS,OAAO;;;ACFnH,SAAQ,gBAAe;AACvB,SAAQ,SAAS,SAAS,eAAc;AACxC,SAAQ,YAAW;;;ACFZ,IAAM,QAAQ,CAAC,QACpB,IAAI,WAAW,SAAS,KAAK,IAAI,WAAW,UAAU;;;ADKjD,IAAM,QAAQ,OAAoB,KAAa,gBACpD,MAAM,MAAM,KAAK,KAAK,WAAW,GAAG,GAAG;AAEzC,IAAM,OAAO,OAAO,KAAa,gBAA0C;AACzE,MAAI,MAAM,GAAG,GAAG;AACd,WAAO,UAAU,GAAG;AAAA,EACtB;AACA,MAAI,eAAe,MAAM,WAAW,GAAG;AACrC,WAAO,UAAU,IAAI,IAAI,KAAK,WAAW,EAAE,SAAS,CAAC;AAAA,EACvD;AACA,QAAM,OAAO,cAAe,QAAQ,WAAW,IAAI,QAAQ,WAAW,IAAI,cAAe;AACzF,SAAO,SAA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ACzE,IAAM,gBACX,CAAC,SAAoD,OAAO,OAAO,MAAM,OAAO;AAC3E,IAAM,gBACX,CAAC,SAAoD,OAAO,OAAO,MAAM,OAAO;AAC3E,IAAM,gBACX,CAAC,SAAoD,OAAO,OAAO,MAAM,OAAO;AAC3E,IAAM,cACX,CAAC,SAAwD,OAAO,OAAO,MAAM,MAAM;","names":["parse","parse"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automatons/tools",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"repository": "https://github.com/openapi-automatons/tools.git",
|
|
5
5
|
"author": "tanmen <yt.prog@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@semantic-release/changelog": "^6.0.3",
|
|
43
43
|
"@semantic-release/git": "^10.0.1",
|
|
44
44
|
"@types/js-yaml": "^4.0.9",
|
|
45
|
-
"@types/node": "^25.9.
|
|
45
|
+
"@types/node": "^25.9.2",
|
|
46
46
|
"@vitest/coverage-v8": "^3.2.0",
|
|
47
47
|
"depcheck": "^1.4.7",
|
|
48
48
|
"eslint": "^10.4.1",
|