@utilix-tech/sdk 0.50.0 → 0.52.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/CHANGELOG.md +7 -0
- package/README.md +16 -3
- package/dist/{chunk-JL7YTXRB.js → chunk-K4ZERKBD.js} +338 -2
- package/dist/{chunk-MDREETCH.js → chunk-ZZJPD366.js} +53 -1
- package/dist/{code-KXoRsHtl.d.cts → code-B_gDkRAx.d.cts} +67 -2
- package/dist/{code-KXoRsHtl.d.ts → code-B_gDkRAx.d.ts} +67 -2
- package/dist/index.cjs +389 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/tools/code.cjs +336 -0
- package/dist/tools/code.d.cts +1 -1
- package/dist/tools/code.d.ts +1 -1
- package/dist/tools/code.js +1 -1
- package/dist/tools/units.cjs +52 -0
- package/dist/tools/units.d.cts +1 -1
- package/dist/tools/units.d.ts +1 -1
- package/dist/tools/units.js +1 -1
- package/dist/{units-DNz6YS5D.d.cts → units-y30YVhqI.d.cts} +35 -2
- package/dist/{units-DNz6YS5D.d.ts → units-y30YVhqI.d.ts} +35 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Full release notes for all Utilix surfaces (browser tools, REST API, SDKs, MCP server) live at [utilix.tech/changelog](https://utilix.tech/changelog). This file tracks just this package.
|
|
4
4
|
|
|
5
|
+
## 0.52.0
|
|
6
|
+
- Add `validateEditorConfig` (editorconfig-validator): parse an .editorconfig file into its root flag and glob sections, and flag structural mistakes against the EditorConfig spec.
|
|
7
|
+
- Add `validateTsconfig` (tsconfig-validator): parse a tsconfig.json file as JSONC and flag unknown keys, unknown compilerOptions, and type mismatches against a curated list of known options.
|
|
8
|
+
|
|
9
|
+
## 0.51.0
|
|
10
|
+
- Add `calculateGpa` (gpa-calculator): compute a weighted GPA from a list of courses, each with a letter grade and credit hours, using the standard 4.0-capped scale.
|
|
11
|
+
|
|
5
12
|
## 0.50.0
|
|
6
13
|
- Add `calculateMovingAverages` (moving-average-calculator): compute SMA and EMA series from a list of numbers and a window size.
|
|
7
14
|
- Add `calculateMarkdownTaskListProgress` (markdown-task-list-progress): parse a Markdown document's checkbox task list and report completion percentage overall and per section.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @utilix-tech/sdk
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**644 developer utility functions for Node.js: runs locally, no API key required.**
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@utilix-tech/sdk)
|
|
6
6
|
[](https://www.npmjs.com/package/@utilix-tech/sdk)
|
|
@@ -322,7 +322,7 @@ formatIso8601Duration(90061); // { iso: "P1DT1H1M1S", ... }
|
|
|
322
322
|
### `/units`: Conversions
|
|
323
323
|
|
|
324
324
|
```ts
|
|
325
|
-
import { convertBytes, pxToAll, convert, formatValue, validateCardNumber, validateIban, calculateLoan, validateBarcode, calculateTax, calculateCompoundInterest, validateIsbn, calculateTipSplit, calculateSimpleInterest, calculateTimeValue, calculatePercentageChange, convertAprApy, calculateMarginMarkup, calculateDiscount, applySuccessiveDiscounts, calculateBreakEven, calculateVideoBitrate, calculateRuleOf72, calculateEmi, calculateRoi, compareUnitPrices, calculatePaybackPeriod, calculateCdMaturity, calculateDepreciationSchedule, calculateCashRounding, calculateMovingAverages } from "@utilix-tech/sdk/units";
|
|
325
|
+
import { convertBytes, pxToAll, convert, formatValue, validateCardNumber, validateIban, calculateLoan, validateBarcode, calculateTax, calculateCompoundInterest, validateIsbn, calculateTipSplit, calculateSimpleInterest, calculateTimeValue, calculatePercentageChange, convertAprApy, calculateMarginMarkup, calculateDiscount, applySuccessiveDiscounts, calculateBreakEven, calculateVideoBitrate, calculateRuleOf72, calculateEmi, calculateRoi, compareUnitPrices, calculatePaybackPeriod, calculateCdMaturity, calculateDepreciationSchedule, calculateCashRounding, calculateMovingAverages, calculateGpa } from "@utilix-tech/sdk/units";
|
|
326
326
|
|
|
327
327
|
// File sizes
|
|
328
328
|
convertBytes(1073741824, "GB"); // 1
|
|
@@ -452,6 +452,10 @@ calculateCashRounding(2.02, 0.05);
|
|
|
452
452
|
// Simple and exponential moving averages over a numeric series
|
|
453
453
|
calculateMovingAverages([102, 104, 101, 108, 112], 3);
|
|
454
454
|
// { windowSize: 3, multiplier: 0.5, latestSma: 107, latestEma: 108.5834, points: [...] }
|
|
455
|
+
|
|
456
|
+
// Weighted GPA from a list of courses (letter grade + credit hours)
|
|
457
|
+
calculateGpa([{ name: "Calculus", grade: "A", credits: 4 }, { name: "History", grade: "B+", credits: 3 }]);
|
|
458
|
+
// { gpa: 3.7, totalCredits: 7, totalQualityPoints: 25.9, courses: [...] }
|
|
455
459
|
```
|
|
456
460
|
|
|
457
461
|
---
|
|
@@ -619,7 +623,8 @@ generateCspHeader({ "default-src": ["'self'"], "script-src": ["'self'", "cdn.exa
|
|
|
619
623
|
```ts
|
|
620
624
|
import { formatSql, minifySql, testRegex, formatHtml, formatGql,
|
|
621
625
|
detectDialect, splitStatements, lookupMime, parseGithubUrl,
|
|
622
|
-
detectRedos, testGitignorePatterns
|
|
626
|
+
detectRedos, testGitignorePatterns, validateEditorConfig,
|
|
627
|
+
validateTsconfig } from "@utilix-tech/sdk/code";
|
|
623
628
|
|
|
624
629
|
// SQL
|
|
625
630
|
formatSql("SELECT id,name FROM users WHERE active=1 ORDER BY name");
|
|
@@ -659,6 +664,14 @@ detectRedos("(a+)+");
|
|
|
659
664
|
// Test paths against a .gitignore file's patterns
|
|
660
665
|
testGitignorePatterns("node_modules/\n*.log", ["node_modules/foo.js", "debug.log", "src/index.js"]);
|
|
661
666
|
// [{ path: "node_modules/foo.js", ignored: true, matchedPattern: "node_modules/", matchedLine: 1 }, ...]
|
|
667
|
+
|
|
668
|
+
// Validate an .editorconfig file
|
|
669
|
+
validateEditorConfig("root = true\n\n[*]\nindent_style = space\nindent_size = 2\n");
|
|
670
|
+
// { root: true, sections: [{ glob: "*", properties: [...] }], issues: [], valid: true }
|
|
671
|
+
|
|
672
|
+
// Validate a tsconfig.json file (JSONC comments and trailing commas are stripped first)
|
|
673
|
+
validateTsconfig(JSON.stringify({ compilerOptions: { target: "ES2020", strict: true } }));
|
|
674
|
+
// { parsed: true, topLevelKeys: ["compilerOptions"], compilerOptionKeys: ["target", "strict"], issues: [], valid: true }
|
|
662
675
|
```
|
|
663
676
|
|
|
664
677
|
---
|
|
@@ -55,7 +55,9 @@ __export(code_exports, {
|
|
|
55
55
|
testGitignorePatterns: () => testGitignorePatterns,
|
|
56
56
|
testPattern: () => testPattern,
|
|
57
57
|
testRegex: () => testRegex,
|
|
58
|
-
|
|
58
|
+
validateEditorConfig: () => validateEditorConfig,
|
|
59
|
+
validateEnvKey: () => validateEnvKey,
|
|
60
|
+
validateTsconfig: () => validateTsconfig
|
|
59
61
|
});
|
|
60
62
|
var ALL_FLAGS = ["g", "i", "m", "s", "u"];
|
|
61
63
|
function testRegex(pattern, flags, input) {
|
|
@@ -2940,5 +2942,339 @@ function testGitignorePatterns(gitignoreContent, paths) {
|
|
|
2940
2942
|
return { path, ignored, matchedPattern, matchedLine };
|
|
2941
2943
|
});
|
|
2942
2944
|
}
|
|
2945
|
+
var EDITORCONFIG_ENUM_PROPERTIES = {
|
|
2946
|
+
indent_style: ["tab", "space"],
|
|
2947
|
+
end_of_line: ["lf", "cr", "crlf"],
|
|
2948
|
+
charset: ["latin1", "utf-8", "utf-8-bom", "utf-16be", "utf-16le"],
|
|
2949
|
+
trim_trailing_whitespace: ["true", "false"],
|
|
2950
|
+
insert_final_newline: ["true", "false"]
|
|
2951
|
+
};
|
|
2952
|
+
var EDITORCONFIG_KNOWN_PROPERTIES = /* @__PURE__ */ new Set([
|
|
2953
|
+
"indent_style",
|
|
2954
|
+
"indent_size",
|
|
2955
|
+
"tab_width",
|
|
2956
|
+
"end_of_line",
|
|
2957
|
+
"charset",
|
|
2958
|
+
"trim_trailing_whitespace",
|
|
2959
|
+
"insert_final_newline",
|
|
2960
|
+
"max_line_length",
|
|
2961
|
+
"root"
|
|
2962
|
+
]);
|
|
2963
|
+
var POSITIVE_INT_RE = /^[1-9][0-9]*$/;
|
|
2964
|
+
function validateEditorConfig(text) {
|
|
2965
|
+
if (!text || !text.trim()) return { error: "Input is empty" };
|
|
2966
|
+
const lines = text.split("\n");
|
|
2967
|
+
const issues = [];
|
|
2968
|
+
const sections = [];
|
|
2969
|
+
let root = false;
|
|
2970
|
+
let rootSeen = false;
|
|
2971
|
+
let currentSection = null;
|
|
2972
|
+
for (let i = 0; i < lines.length; i++) {
|
|
2973
|
+
const lineNum = i + 1;
|
|
2974
|
+
const trimmed = lines[i].trim();
|
|
2975
|
+
if (!trimmed || trimmed.startsWith("#") || trimmed.startsWith(";")) continue;
|
|
2976
|
+
const sectionMatch = trimmed.match(/^\[(.*)\]$/);
|
|
2977
|
+
if (sectionMatch) {
|
|
2978
|
+
const glob = sectionMatch[1];
|
|
2979
|
+
if (!glob) {
|
|
2980
|
+
issues.push({ severity: "warning", line: lineNum, message: 'Section header is empty ("[]" matches no files)' });
|
|
2981
|
+
}
|
|
2982
|
+
if (sections.some((s) => s.glob === glob)) {
|
|
2983
|
+
issues.push({ severity: "warning", line: lineNum, message: `Duplicate section "[${glob}]" (an earlier section already uses this exact glob)` });
|
|
2984
|
+
}
|
|
2985
|
+
currentSection = { glob, line: lineNum, properties: [] };
|
|
2986
|
+
sections.push(currentSection);
|
|
2987
|
+
continue;
|
|
2988
|
+
}
|
|
2989
|
+
const eqIdx = trimmed.indexOf("=");
|
|
2990
|
+
if (eqIdx === -1) {
|
|
2991
|
+
issues.push({ severity: "error", line: lineNum, message: `Malformed line (missing '='): "${trimmed}"` });
|
|
2992
|
+
continue;
|
|
2993
|
+
}
|
|
2994
|
+
const rawKey = trimmed.slice(0, eqIdx).trim();
|
|
2995
|
+
const key = rawKey.toLowerCase();
|
|
2996
|
+
const rawValue = trimmed.slice(eqIdx + 1).trim();
|
|
2997
|
+
const normalizedValue = rawValue.toLowerCase();
|
|
2998
|
+
if (!rawKey) {
|
|
2999
|
+
issues.push({ severity: "error", line: lineNum, message: "Property is missing a name" });
|
|
3000
|
+
continue;
|
|
3001
|
+
}
|
|
3002
|
+
if (key === "root") {
|
|
3003
|
+
if (sections.length > 0) {
|
|
3004
|
+
issues.push({ severity: "error", line: lineNum, message: `"root" must appear before any section, in the file's preamble` });
|
|
3005
|
+
} else if (rootSeen) {
|
|
3006
|
+
issues.push({ severity: "warning", line: lineNum, message: 'Duplicate "root" declaration' });
|
|
3007
|
+
} else if (normalizedValue !== "true" && normalizedValue !== "false") {
|
|
3008
|
+
issues.push({ severity: "error", line: lineNum, message: `"root" must be "true" or "false", got "${rawValue}"` });
|
|
3009
|
+
} else {
|
|
3010
|
+
root = normalizedValue === "true";
|
|
3011
|
+
}
|
|
3012
|
+
rootSeen = true;
|
|
3013
|
+
continue;
|
|
3014
|
+
}
|
|
3015
|
+
if (!currentSection) {
|
|
3016
|
+
issues.push({ severity: "error", line: lineNum, message: `Property "${rawKey}" found before any section header` });
|
|
3017
|
+
continue;
|
|
3018
|
+
}
|
|
3019
|
+
if (currentSection.properties.some((p) => p.key === key)) {
|
|
3020
|
+
issues.push({ severity: "warning", line: lineNum, message: `Duplicate property "${key}" in section "[${currentSection.glob}]"` });
|
|
3021
|
+
}
|
|
3022
|
+
currentSection.properties.push({ key, value: rawValue, line: lineNum });
|
|
3023
|
+
if (!EDITORCONFIG_KNOWN_PROPERTIES.has(key)) {
|
|
3024
|
+
issues.push({ severity: "warning", line: lineNum, message: `Unknown property "${key}"` });
|
|
3025
|
+
continue;
|
|
3026
|
+
}
|
|
3027
|
+
if (key in EDITORCONFIG_ENUM_PROPERTIES) {
|
|
3028
|
+
if (!EDITORCONFIG_ENUM_PROPERTIES[key].includes(normalizedValue)) {
|
|
3029
|
+
issues.push({ severity: "error", line: lineNum, message: `"${key}" must be one of ${EDITORCONFIG_ENUM_PROPERTIES[key].join(", ")}, got "${rawValue}"` });
|
|
3030
|
+
}
|
|
3031
|
+
} else if (key === "indent_size") {
|
|
3032
|
+
if (normalizedValue !== "tab" && !POSITIVE_INT_RE.test(rawValue)) {
|
|
3033
|
+
issues.push({ severity: "error", line: lineNum, message: `"indent_size" must be a positive integer or "tab", got "${rawValue}"` });
|
|
3034
|
+
}
|
|
3035
|
+
} else if (key === "tab_width") {
|
|
3036
|
+
if (!POSITIVE_INT_RE.test(rawValue)) {
|
|
3037
|
+
issues.push({ severity: "error", line: lineNum, message: `"tab_width" must be a positive integer, got "${rawValue}"` });
|
|
3038
|
+
}
|
|
3039
|
+
} else if (key === "max_line_length") {
|
|
3040
|
+
if (normalizedValue !== "off" && !POSITIVE_INT_RE.test(rawValue)) {
|
|
3041
|
+
issues.push({ severity: "error", line: lineNum, message: `"max_line_length" must be a positive integer or "off", got "${rawValue}"` });
|
|
3042
|
+
}
|
|
3043
|
+
}
|
|
3044
|
+
}
|
|
3045
|
+
if (sections.length === 0 && !rootSeen) {
|
|
3046
|
+
issues.push({ severity: "warning", line: 1, message: "File has no section headers and no root declaration" });
|
|
3047
|
+
}
|
|
3048
|
+
const valid = !issues.some((i) => i.severity === "error");
|
|
3049
|
+
return { root, sections, issues, valid };
|
|
3050
|
+
}
|
|
3051
|
+
function stripJsonComments(input) {
|
|
3052
|
+
let out = "";
|
|
3053
|
+
let i = 0;
|
|
3054
|
+
const n = input.length;
|
|
3055
|
+
let inString = false;
|
|
3056
|
+
while (i < n) {
|
|
3057
|
+
const c = input[i];
|
|
3058
|
+
const next = input[i + 1];
|
|
3059
|
+
if (inString) {
|
|
3060
|
+
out += c;
|
|
3061
|
+
if (c === "\\") {
|
|
3062
|
+
out += next ?? "";
|
|
3063
|
+
i += 2;
|
|
3064
|
+
continue;
|
|
3065
|
+
}
|
|
3066
|
+
if (c === '"') inString = false;
|
|
3067
|
+
i++;
|
|
3068
|
+
continue;
|
|
3069
|
+
}
|
|
3070
|
+
if (c === '"') {
|
|
3071
|
+
inString = true;
|
|
3072
|
+
out += c;
|
|
3073
|
+
i++;
|
|
3074
|
+
continue;
|
|
3075
|
+
}
|
|
3076
|
+
if (c === "/" && next === "/") {
|
|
3077
|
+
while (i < n && input[i] !== "\n") i++;
|
|
3078
|
+
continue;
|
|
3079
|
+
}
|
|
3080
|
+
if (c === "/" && next === "*") {
|
|
3081
|
+
i += 2;
|
|
3082
|
+
while (i < n && !(input[i] === "*" && input[i + 1] === "/")) {
|
|
3083
|
+
out += input[i] === "\n" ? "\n" : "";
|
|
3084
|
+
i++;
|
|
3085
|
+
}
|
|
3086
|
+
i += 2;
|
|
3087
|
+
continue;
|
|
3088
|
+
}
|
|
3089
|
+
out += c;
|
|
3090
|
+
i++;
|
|
3091
|
+
}
|
|
3092
|
+
return out;
|
|
3093
|
+
}
|
|
3094
|
+
function stripTrailingCommas(input) {
|
|
3095
|
+
return input.replace(/,(\s*[}\]])/g, "$1");
|
|
3096
|
+
}
|
|
3097
|
+
var TSCONFIG_TOP_LEVEL_KEYS = /* @__PURE__ */ new Set([
|
|
3098
|
+
"compilerOptions",
|
|
3099
|
+
"files",
|
|
3100
|
+
"include",
|
|
3101
|
+
"exclude",
|
|
3102
|
+
"extends",
|
|
3103
|
+
"references",
|
|
3104
|
+
"compileOnSave",
|
|
3105
|
+
"typeAcquisition",
|
|
3106
|
+
"watchOptions",
|
|
3107
|
+
"buildOptions",
|
|
3108
|
+
"$schema"
|
|
3109
|
+
]);
|
|
3110
|
+
var TSCONFIG_ENUM_OPTIONS = {
|
|
3111
|
+
target: ["es3", "es5", "es6", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021", "es2022", "es2023", "esnext"],
|
|
3112
|
+
module: ["none", "commonjs", "amd", "umd", "system", "es6", "es2015", "es2020", "es2022", "esnext", "node16", "nodenext", "node18", "preserve"],
|
|
3113
|
+
moduleResolution: ["classic", "node", "node10", "node16", "nodenext", "bundler"],
|
|
3114
|
+
moduleDetection: ["legacy", "auto", "force"],
|
|
3115
|
+
jsx: ["preserve", "react", "react-jsx", "react-jsxdev", "react-native"],
|
|
3116
|
+
newLine: ["crlf", "lf"],
|
|
3117
|
+
importsNotUsedAsValues: ["remove", "preserve", "error"]
|
|
3118
|
+
};
|
|
3119
|
+
var TSCONFIG_BOOLEAN_OPTIONS = /* @__PURE__ */ new Set([
|
|
3120
|
+
"allowJs",
|
|
3121
|
+
"checkJs",
|
|
3122
|
+
"strict",
|
|
3123
|
+
"noImplicitAny",
|
|
3124
|
+
"strictNullChecks",
|
|
3125
|
+
"strictFunctionTypes",
|
|
3126
|
+
"strictBindCallApply",
|
|
3127
|
+
"strictPropertyInitialization",
|
|
3128
|
+
"noImplicitThis",
|
|
3129
|
+
"useUnknownInCatchVariables",
|
|
3130
|
+
"alwaysStrict",
|
|
3131
|
+
"noUnusedLocals",
|
|
3132
|
+
"noUnusedParameters",
|
|
3133
|
+
"exactOptionalPropertyTypes",
|
|
3134
|
+
"noImplicitReturns",
|
|
3135
|
+
"noFallthroughCasesInSwitch",
|
|
3136
|
+
"noUncheckedIndexedAccess",
|
|
3137
|
+
"noImplicitOverride",
|
|
3138
|
+
"noPropertyAccessFromIndexSignature",
|
|
3139
|
+
"esModuleInterop",
|
|
3140
|
+
"allowSyntheticDefaultImports",
|
|
3141
|
+
"forceConsistentCasingInFileNames",
|
|
3142
|
+
"isolatedModules",
|
|
3143
|
+
"verbatimModuleSyntax",
|
|
3144
|
+
"declaration",
|
|
3145
|
+
"declarationMap",
|
|
3146
|
+
"emitDeclarationOnly",
|
|
3147
|
+
"sourceMap",
|
|
3148
|
+
"inlineSourceMap",
|
|
3149
|
+
"inlineSources",
|
|
3150
|
+
"noEmit",
|
|
3151
|
+
"noEmitOnError",
|
|
3152
|
+
"preserveConstEnums",
|
|
3153
|
+
"removeComments",
|
|
3154
|
+
"skipLibCheck",
|
|
3155
|
+
"composite",
|
|
3156
|
+
"incremental",
|
|
3157
|
+
"experimentalDecorators",
|
|
3158
|
+
"emitDecoratorMetadata",
|
|
3159
|
+
"resolveJsonModule",
|
|
3160
|
+
"allowUmdGlobalAccess",
|
|
3161
|
+
"downlevelIteration",
|
|
3162
|
+
"importHelpers",
|
|
3163
|
+
"preserveSymlinks",
|
|
3164
|
+
"allowUnreachableCode",
|
|
3165
|
+
"allowUnusedLabels",
|
|
3166
|
+
"disableSizeLimit",
|
|
3167
|
+
"noResolve",
|
|
3168
|
+
"skipDefaultLibCheck",
|
|
3169
|
+
"suppressImplicitAnyIndexErrors"
|
|
3170
|
+
]);
|
|
3171
|
+
var TSCONFIG_STRING_OPTIONS = /* @__PURE__ */ new Set([
|
|
3172
|
+
"outDir",
|
|
3173
|
+
"rootDir",
|
|
3174
|
+
"baseUrl",
|
|
3175
|
+
"outFile",
|
|
3176
|
+
"declarationDir",
|
|
3177
|
+
"tsBuildInfoFile",
|
|
3178
|
+
"jsxFactory",
|
|
3179
|
+
"jsxFragmentFactory",
|
|
3180
|
+
"jsxImportSource"
|
|
3181
|
+
]);
|
|
3182
|
+
var TSCONFIG_ARRAY_OPTIONS = /* @__PURE__ */ new Set(["lib", "types", "typeRoots", "rootDirs"]);
|
|
3183
|
+
function validateTsconfig(text) {
|
|
3184
|
+
if (!text || !text.trim()) return { error: "Input is empty" };
|
|
3185
|
+
const stripped = stripTrailingCommas(stripJsonComments(text));
|
|
3186
|
+
let parsed;
|
|
3187
|
+
try {
|
|
3188
|
+
parsed = JSON.parse(stripped);
|
|
3189
|
+
} catch (e) {
|
|
3190
|
+
return { error: `Invalid JSON: ${e.message}` };
|
|
3191
|
+
}
|
|
3192
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
3193
|
+
return { error: "Root of tsconfig.json must be an object" };
|
|
3194
|
+
}
|
|
3195
|
+
const obj = parsed;
|
|
3196
|
+
const issues = [];
|
|
3197
|
+
const topLevelKeys = Object.keys(obj);
|
|
3198
|
+
for (const key of topLevelKeys) {
|
|
3199
|
+
if (!TSCONFIG_TOP_LEVEL_KEYS.has(key)) {
|
|
3200
|
+
issues.push({ severity: "warning", path: key, message: `Unknown top-level key "${key}"` });
|
|
3201
|
+
}
|
|
3202
|
+
}
|
|
3203
|
+
for (const key of ["files", "include", "exclude"]) {
|
|
3204
|
+
if (key in obj) {
|
|
3205
|
+
const v = obj[key];
|
|
3206
|
+
if (!Array.isArray(v) || !v.every((x) => typeof x === "string")) {
|
|
3207
|
+
issues.push({ severity: "error", path: key, message: `"${key}" must be an array of strings` });
|
|
3208
|
+
}
|
|
3209
|
+
}
|
|
3210
|
+
}
|
|
3211
|
+
if ("extends" in obj) {
|
|
3212
|
+
const v = obj.extends;
|
|
3213
|
+
const validExtends = typeof v === "string" || Array.isArray(v) && v.every((x) => typeof x === "string");
|
|
3214
|
+
if (!validExtends) {
|
|
3215
|
+
issues.push({ severity: "error", path: "extends", message: '"extends" must be a string or an array of strings' });
|
|
3216
|
+
}
|
|
3217
|
+
}
|
|
3218
|
+
if ("references" in obj) {
|
|
3219
|
+
const v = obj.references;
|
|
3220
|
+
const validRefs = Array.isArray(v) && v.every((r) => typeof r === "object" && r !== null && typeof r.path === "string");
|
|
3221
|
+
if (!validRefs) {
|
|
3222
|
+
issues.push({ severity: "error", path: "references", message: '"references" must be an array of objects with a "path" string' });
|
|
3223
|
+
}
|
|
3224
|
+
}
|
|
3225
|
+
let compilerOptionKeys = [];
|
|
3226
|
+
if ("compilerOptions" in obj) {
|
|
3227
|
+
const co = obj.compilerOptions;
|
|
3228
|
+
if (typeof co !== "object" || co === null || Array.isArray(co)) {
|
|
3229
|
+
issues.push({ severity: "error", path: "compilerOptions", message: '"compilerOptions" must be an object' });
|
|
3230
|
+
} else {
|
|
3231
|
+
const coObj = co;
|
|
3232
|
+
compilerOptionKeys = Object.keys(coObj);
|
|
3233
|
+
for (const key of compilerOptionKeys) {
|
|
3234
|
+
const value = coObj[key];
|
|
3235
|
+
const path = `compilerOptions.${key}`;
|
|
3236
|
+
if (key === "paths") {
|
|
3237
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
3238
|
+
issues.push({ severity: "error", path, message: '"paths" must be an object mapping patterns to arrays of strings' });
|
|
3239
|
+
} else {
|
|
3240
|
+
for (const [k, v] of Object.entries(value)) {
|
|
3241
|
+
if (!Array.isArray(v) || !v.every((x) => typeof x === "string")) {
|
|
3242
|
+
issues.push({ severity: "error", path: `${path}.${k}`, message: `"paths.${k}" must be an array of strings` });
|
|
3243
|
+
}
|
|
3244
|
+
}
|
|
3245
|
+
}
|
|
3246
|
+
continue;
|
|
3247
|
+
}
|
|
3248
|
+
if (key in TSCONFIG_ENUM_OPTIONS) {
|
|
3249
|
+
if (typeof value !== "string" || !TSCONFIG_ENUM_OPTIONS[key].includes(value.toLowerCase())) {
|
|
3250
|
+
issues.push({ severity: "error", path, message: `"${key}" must be one of ${TSCONFIG_ENUM_OPTIONS[key].join(", ")}, got ${JSON.stringify(value)}` });
|
|
3251
|
+
}
|
|
3252
|
+
continue;
|
|
3253
|
+
}
|
|
3254
|
+
if (TSCONFIG_BOOLEAN_OPTIONS.has(key)) {
|
|
3255
|
+
if (typeof value !== "boolean") {
|
|
3256
|
+
issues.push({ severity: "error", path, message: `"${key}" must be a boolean, got ${JSON.stringify(value)}` });
|
|
3257
|
+
}
|
|
3258
|
+
continue;
|
|
3259
|
+
}
|
|
3260
|
+
if (TSCONFIG_STRING_OPTIONS.has(key)) {
|
|
3261
|
+
if (typeof value !== "string") {
|
|
3262
|
+
issues.push({ severity: "error", path, message: `"${key}" must be a string, got ${JSON.stringify(value)}` });
|
|
3263
|
+
}
|
|
3264
|
+
continue;
|
|
3265
|
+
}
|
|
3266
|
+
if (TSCONFIG_ARRAY_OPTIONS.has(key)) {
|
|
3267
|
+
if (!Array.isArray(value) || !value.every((x) => typeof x === "string")) {
|
|
3268
|
+
issues.push({ severity: "error", path, message: `"${key}" must be an array of strings, got ${JSON.stringify(value)}` });
|
|
3269
|
+
}
|
|
3270
|
+
continue;
|
|
3271
|
+
}
|
|
3272
|
+
issues.push({ severity: "warning", path, message: `Unknown compilerOption "${key}"` });
|
|
3273
|
+
}
|
|
3274
|
+
}
|
|
3275
|
+
}
|
|
3276
|
+
const valid = !issues.some((i) => i.severity === "error");
|
|
3277
|
+
return { parsed: true, topLevelKeys, compilerOptionKeys, issues, valid };
|
|
3278
|
+
}
|
|
2943
3279
|
|
|
2944
|
-
export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, buildDockerPull, buildDockerRun, buildGitCommand, code_exports, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, detectDialect, detectOperationType, detectRedos, envToExport, envToJson, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lintConventionalCommit, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseDockerImage, parseEnv, parseGitCommand, parseGithubUrl, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, testGitignorePatterns, testPattern, testRegex, validateEnvKey };
|
|
3280
|
+
export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, buildDockerPull, buildDockerRun, buildGitCommand, code_exports, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, detectDialect, detectOperationType, detectRedos, envToExport, envToJson, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lintConventionalCommit, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseDockerImage, parseEnv, parseGitCommand, parseGithubUrl, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, testGitignorePatterns, testPattern, testRegex, validateEditorConfig, validateEnvKey, validateTsconfig };
|
|
@@ -14,6 +14,7 @@ __export(units_exports, {
|
|
|
14
14
|
COMMON_TAX_RATES: () => COMMON_TAX_RATES,
|
|
15
15
|
COMMON_TIP_PERCENTAGES: () => COMMON_TIP_PERCENTAGES,
|
|
16
16
|
COMMON_VIEWPORTS: () => COMMON_VIEWPORTS,
|
|
17
|
+
GPA_GRADE_POINTS: () => GPA_GRADE_POINTS,
|
|
17
18
|
USD_DENOMINATIONS: () => USD_DENOMINATIONS,
|
|
18
19
|
applySuccessiveDiscounts: () => applySuccessiveDiscounts,
|
|
19
20
|
autoFormat: () => autoFormat,
|
|
@@ -29,6 +30,7 @@ __export(units_exports, {
|
|
|
29
30
|
calculateDepreciationSchedule: () => calculateDepreciationSchedule,
|
|
30
31
|
calculateDiscount: () => calculateDiscount,
|
|
31
32
|
calculateEmi: () => calculateEmi,
|
|
33
|
+
calculateGpa: () => calculateGpa,
|
|
32
34
|
calculateLoan: () => calculateLoan,
|
|
33
35
|
calculateMarginMarkup: () => calculateMarginMarkup,
|
|
34
36
|
calculateMovingAverages: () => calculateMovingAverages,
|
|
@@ -2138,5 +2140,55 @@ function calculateMovingAverages(values, windowSize) {
|
|
|
2138
2140
|
latestEma: last.ema
|
|
2139
2141
|
};
|
|
2140
2142
|
}
|
|
2143
|
+
var GPA_GRADE_POINTS = {
|
|
2144
|
+
"A+": 4,
|
|
2145
|
+
A: 4,
|
|
2146
|
+
"A-": 3.7,
|
|
2147
|
+
"B+": 3.3,
|
|
2148
|
+
B: 3,
|
|
2149
|
+
"B-": 2.7,
|
|
2150
|
+
"C+": 2.3,
|
|
2151
|
+
C: 2,
|
|
2152
|
+
"C-": 1.7,
|
|
2153
|
+
"D+": 1.3,
|
|
2154
|
+
D: 1,
|
|
2155
|
+
"D-": 0.7,
|
|
2156
|
+
F: 0
|
|
2157
|
+
};
|
|
2158
|
+
function calculateGpa(courses) {
|
|
2159
|
+
if (!Array.isArray(courses) || courses.length === 0) {
|
|
2160
|
+
return { error: "courses must be a non-empty array" };
|
|
2161
|
+
}
|
|
2162
|
+
const round22 = (n) => Math.round(n * 100) / 100;
|
|
2163
|
+
let totalCredits = 0;
|
|
2164
|
+
let totalQualityPoints = 0;
|
|
2165
|
+
const results = [];
|
|
2166
|
+
for (let i = 0; i < courses.length; i++) {
|
|
2167
|
+
const course = courses[i];
|
|
2168
|
+
if (typeof course.credits !== "number" || !Number.isFinite(course.credits) || course.credits <= 0) {
|
|
2169
|
+
return { error: `course ${i + 1}: credits must be a finite number greater than zero` };
|
|
2170
|
+
}
|
|
2171
|
+
const gradeKey = typeof course.grade === "string" ? course.grade.trim().toUpperCase() : "";
|
|
2172
|
+
const points = GPA_GRADE_POINTS[gradeKey];
|
|
2173
|
+
if (points === void 0) {
|
|
2174
|
+
return { error: `course ${i + 1}: unrecognized grade "${course.grade}" (expected one of ${Object.keys(GPA_GRADE_POINTS).join(", ")})` };
|
|
2175
|
+
}
|
|
2176
|
+
const qualityPoints = round22(points * course.credits);
|
|
2177
|
+
totalCredits += course.credits;
|
|
2178
|
+
totalQualityPoints += qualityPoints;
|
|
2179
|
+
results.push({
|
|
2180
|
+
name: course.name?.trim() || `Course ${i + 1}`,
|
|
2181
|
+
grade: gradeKey,
|
|
2182
|
+
credits: course.credits,
|
|
2183
|
+
qualityPoints
|
|
2184
|
+
});
|
|
2185
|
+
}
|
|
2186
|
+
return {
|
|
2187
|
+
courses: results,
|
|
2188
|
+
totalCredits: round22(totalCredits),
|
|
2189
|
+
totalQualityPoints: round22(totalQualityPoints),
|
|
2190
|
+
gpa: round22(totalQualityPoints / totalCredits)
|
|
2191
|
+
};
|
|
2192
|
+
}
|
|
2141
2193
|
|
|
2142
|
-
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateLoan, calculateMarginMarkup, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, units_exports, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx };
|
|
2194
|
+
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateGpa, calculateLoan, calculateMarginMarkup, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, units_exports, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx };
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
* - redos-detector (detectRedos)
|
|
23
23
|
* - conventional-commit-linter (lintConventionalCommit)
|
|
24
24
|
* - gitignore-tester (testGitignorePatterns)
|
|
25
|
+
* - editorconfig-validator (validateEditorConfig)
|
|
26
|
+
* - tsconfig-validator (validateTsconfig)
|
|
25
27
|
*/
|
|
26
28
|
type RegexFlag = 'g' | 'i' | 'm' | 's' | 'u';
|
|
27
29
|
declare const ALL_FLAGS: RegexFlag[];
|
|
@@ -392,6 +394,61 @@ interface GitignoreTestResult {
|
|
|
392
394
|
declare function testGitignorePatterns(gitignoreContent: string, paths: string[]): GitignoreTestResult[] | {
|
|
393
395
|
error: string;
|
|
394
396
|
};
|
|
397
|
+
interface EditorConfigProperty {
|
|
398
|
+
key: string;
|
|
399
|
+
value: string;
|
|
400
|
+
line: number;
|
|
401
|
+
}
|
|
402
|
+
interface EditorConfigSection {
|
|
403
|
+
glob: string;
|
|
404
|
+
line: number;
|
|
405
|
+
properties: EditorConfigProperty[];
|
|
406
|
+
}
|
|
407
|
+
interface EditorConfigIssue {
|
|
408
|
+
severity: 'error' | 'warning';
|
|
409
|
+
line: number;
|
|
410
|
+
message: string;
|
|
411
|
+
}
|
|
412
|
+
interface EditorConfigValidationResult {
|
|
413
|
+
root: boolean;
|
|
414
|
+
sections: EditorConfigSection[];
|
|
415
|
+
issues: EditorConfigIssue[];
|
|
416
|
+
valid: boolean;
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Validate an .editorconfig file: parse it into its root flag and glob
|
|
420
|
+
* sections, and flag structural mistakes against the EditorConfig spec —
|
|
421
|
+
* unknown properties, invalid values for known properties (indent_style,
|
|
422
|
+
* end_of_line, charset, indent_size, tab_width, max_line_length), a `root`
|
|
423
|
+
* declaration outside the file's preamble, and duplicate properties within
|
|
424
|
+
* the same section.
|
|
425
|
+
*/
|
|
426
|
+
declare function validateEditorConfig(text: string): EditorConfigValidationResult | {
|
|
427
|
+
error: string;
|
|
428
|
+
};
|
|
429
|
+
interface TsconfigIssue {
|
|
430
|
+
severity: 'error' | 'warning';
|
|
431
|
+
path: string;
|
|
432
|
+
message: string;
|
|
433
|
+
}
|
|
434
|
+
interface TsconfigValidationResult {
|
|
435
|
+
parsed: true;
|
|
436
|
+
topLevelKeys: string[];
|
|
437
|
+
compilerOptionKeys: string[];
|
|
438
|
+
issues: TsconfigIssue[];
|
|
439
|
+
valid: boolean;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Validate a tsconfig.json file: parse it as JSONC (`//` and `/* *\/`
|
|
443
|
+
* comments plus trailing commas are stripped before parsing, matching how
|
|
444
|
+
* `tsc` itself reads the file) and flag structural mistakes — unknown
|
|
445
|
+
* top-level keys, unknown `compilerOptions` keys, wrong types (a boolean
|
|
446
|
+
* option given a string, an enum option given a value outside its known
|
|
447
|
+
* set), and malformed `files`/`include`/`exclude`/`references`/`paths`.
|
|
448
|
+
*/
|
|
449
|
+
declare function validateTsconfig(text: string): TsconfigValidationResult | {
|
|
450
|
+
error: string;
|
|
451
|
+
};
|
|
395
452
|
|
|
396
453
|
declare const code_ALL_FLAGS: typeof ALL_FLAGS;
|
|
397
454
|
type code_ApiEndpoint = ApiEndpoint;
|
|
@@ -407,6 +464,10 @@ type code_ConventionalCommitSeverity = ConventionalCommitSeverity;
|
|
|
407
464
|
type code_CssResult = CssResult;
|
|
408
465
|
declare const code_DEFAULT_COMMIT_TYPES: typeof DEFAULT_COMMIT_TYPES;
|
|
409
466
|
type code_DockerImageRef = DockerImageRef;
|
|
467
|
+
type code_EditorConfigIssue = EditorConfigIssue;
|
|
468
|
+
type code_EditorConfigProperty = EditorConfigProperty;
|
|
469
|
+
type code_EditorConfigSection = EditorConfigSection;
|
|
470
|
+
type code_EditorConfigValidationResult = EditorConfigValidationResult;
|
|
410
471
|
type code_EnvEntry = EnvEntry;
|
|
411
472
|
type code_EnvParseResult = EnvParseResult;
|
|
412
473
|
type code_GitCommandConfig = GitCommandConfig;
|
|
@@ -441,6 +502,8 @@ type code_SpecVersion = SpecVersion;
|
|
|
441
502
|
type code_SqlDialect = SqlDialect;
|
|
442
503
|
type code_SqlFormatOptions = SqlFormatOptions;
|
|
443
504
|
type code_TestPatternResult = TestPatternResult;
|
|
505
|
+
type code_TsconfigIssue = TsconfigIssue;
|
|
506
|
+
type code_TsconfigValidationResult = TsconfigValidationResult;
|
|
444
507
|
declare const code_buildDockerPull: typeof buildDockerPull;
|
|
445
508
|
declare const code_buildDockerRun: typeof buildDockerRun;
|
|
446
509
|
declare const code_buildGitCommand: typeof buildGitCommand;
|
|
@@ -486,9 +549,11 @@ declare const code_splitStatements: typeof splitStatements;
|
|
|
486
549
|
declare const code_testGitignorePatterns: typeof testGitignorePatterns;
|
|
487
550
|
declare const code_testPattern: typeof testPattern;
|
|
488
551
|
declare const code_testRegex: typeof testRegex;
|
|
552
|
+
declare const code_validateEditorConfig: typeof validateEditorConfig;
|
|
489
553
|
declare const code_validateEnvKey: typeof validateEnvKey;
|
|
554
|
+
declare const code_validateTsconfig: typeof validateTsconfig;
|
|
490
555
|
declare namespace code {
|
|
491
|
-
export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, code_CHEATSHEET as CHEATSHEET, type code_CheatsheetEntry as CheatsheetEntry, type code_ConventionalCommitFinding as ConventionalCommitFinding, type code_ConventionalCommitFooter as ConventionalCommitFooter, type code_ConventionalCommitOptions as ConventionalCommitOptions, type code_ConventionalCommitParsed as ConventionalCommitParsed, type code_ConventionalCommitResult as ConventionalCommitResult, type code_ConventionalCommitSeverity as ConventionalCommitSeverity, type code_CssResult as CssResult, code_DEFAULT_COMMIT_TYPES as DEFAULT_COMMIT_TYPES, type code_DockerImageRef as DockerImageRef, type code_EnvEntry as EnvEntry, type code_EnvParseResult as EnvParseResult, type code_GitCommandConfig as GitCommandConfig, type code_GitCommandResult as GitCommandResult, type code_GitOperation as GitOperation, type code_GithubUrlInfo as GithubUrlInfo, type code_GithubUrlType as GithubUrlType, type code_GitignoreTestResult as GitignoreTestResult, type code_GqlFormatResult as GqlFormatResult, type code_HtmlFormatResult as HtmlFormatResult, type code_HtmlMinifyOptions as HtmlMinifyOptions, type code_HtmlMinifyResult as HtmlMinifyResult, type code_JsMinifyOptions as JsMinifyOptions, type code_JsMinifyResult as JsMinifyResult, code_MIME_TABLE as MIME_TABLE, type code_MatchResult as MatchResult, type code_MimeEntry as MimeEntry, type code_MimeLookupResult as MimeLookupResult, code_OPERATIONS as OPERATIONS, type code_ParsedSpec as ParsedSpec, type code_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexMatch as RegexMatch, type code_RegexResult as RegexResult, type code_RegexSuccess as RegexSuccess, code_SQL_DEFAULT_OPTIONS as SQL_DEFAULT_OPTIONS, type code_Segment as Segment, type code_SpecVersion as SpecVersion, type code_SqlDialect as SqlDialect, type code_SqlFormatOptions as SqlFormatOptions, type code_TestPatternResult as TestPatternResult, code_buildDockerPull as buildDockerPull, code_buildDockerRun as buildDockerRun, code_buildGitCommand as buildGitCommand, code_collapseHtmlWhitespace as collapseHtmlWhitespace, code_collapseJsWhitespace as collapseJsWhitespace, code_countProperties as countProperties, code_countRules as countRules, code_detectDialect as detectDialect, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, code_formatCss as formatCss, code_formatGql as formatGql, code_formatHtml as formatHtml, code_formatSql as formatSql, code_getEndpointsByTag as getEndpointsByTag, code_getHtmlStats as getHtmlStats, code_getJsStats as getJsStats, code_getMethodColor as getMethodColor, code_isValidTag as isValidTag, code_lintConventionalCommit as lintConventionalCommit, code_lookupMime as lookupMime, code_minifyCss as minifyCss, code_minifyGql as minifyGql, code_minifyHtml as minifyHtml, code_minifyJs as minifyJs, code_minifySql as minifySql, code_normalizeRef as normalizeRef, code_parseDockerImage as parseDockerImage, code_parseEnv as parseEnv, code_parseGitCommand as parseGitCommand, code_parseGithubUrl as parseGithubUrl, code_parseSpec as parseSpec, code_removeConsoleCalls as removeConsoleCalls, code_removeEmptyAttributes as removeEmptyAttributes, code_removeHtmlComments as removeHtmlComments, code_removeJsComments as removeJsComments, code_removeRedundantAttributes as removeRedundantAttributes, code_searchCheatsheet as searchCheatsheet, code_searchEndpoints as searchEndpoints, code_splitStatements as splitStatements, code_testGitignorePatterns as testGitignorePatterns, code_testPattern as testPattern, code_testRegex as testRegex, code_validateEnvKey as validateEnvKey };
|
|
556
|
+
export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, code_CHEATSHEET as CHEATSHEET, type code_CheatsheetEntry as CheatsheetEntry, type code_ConventionalCommitFinding as ConventionalCommitFinding, type code_ConventionalCommitFooter as ConventionalCommitFooter, type code_ConventionalCommitOptions as ConventionalCommitOptions, type code_ConventionalCommitParsed as ConventionalCommitParsed, type code_ConventionalCommitResult as ConventionalCommitResult, type code_ConventionalCommitSeverity as ConventionalCommitSeverity, type code_CssResult as CssResult, code_DEFAULT_COMMIT_TYPES as DEFAULT_COMMIT_TYPES, type code_DockerImageRef as DockerImageRef, type code_EditorConfigIssue as EditorConfigIssue, type code_EditorConfigProperty as EditorConfigProperty, type code_EditorConfigSection as EditorConfigSection, type code_EditorConfigValidationResult as EditorConfigValidationResult, type code_EnvEntry as EnvEntry, type code_EnvParseResult as EnvParseResult, type code_GitCommandConfig as GitCommandConfig, type code_GitCommandResult as GitCommandResult, type code_GitOperation as GitOperation, type code_GithubUrlInfo as GithubUrlInfo, type code_GithubUrlType as GithubUrlType, type code_GitignoreTestResult as GitignoreTestResult, type code_GqlFormatResult as GqlFormatResult, type code_HtmlFormatResult as HtmlFormatResult, type code_HtmlMinifyOptions as HtmlMinifyOptions, type code_HtmlMinifyResult as HtmlMinifyResult, type code_JsMinifyOptions as JsMinifyOptions, type code_JsMinifyResult as JsMinifyResult, code_MIME_TABLE as MIME_TABLE, type code_MatchResult as MatchResult, type code_MimeEntry as MimeEntry, type code_MimeLookupResult as MimeLookupResult, code_OPERATIONS as OPERATIONS, type code_ParsedSpec as ParsedSpec, type code_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexMatch as RegexMatch, type code_RegexResult as RegexResult, type code_RegexSuccess as RegexSuccess, code_SQL_DEFAULT_OPTIONS as SQL_DEFAULT_OPTIONS, type code_Segment as Segment, type code_SpecVersion as SpecVersion, type code_SqlDialect as SqlDialect, type code_SqlFormatOptions as SqlFormatOptions, type code_TestPatternResult as TestPatternResult, type code_TsconfigIssue as TsconfigIssue, type code_TsconfigValidationResult as TsconfigValidationResult, code_buildDockerPull as buildDockerPull, code_buildDockerRun as buildDockerRun, code_buildGitCommand as buildGitCommand, code_collapseHtmlWhitespace as collapseHtmlWhitespace, code_collapseJsWhitespace as collapseJsWhitespace, code_countProperties as countProperties, code_countRules as countRules, code_detectDialect as detectDialect, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, code_formatCss as formatCss, code_formatGql as formatGql, code_formatHtml as formatHtml, code_formatSql as formatSql, code_getEndpointsByTag as getEndpointsByTag, code_getHtmlStats as getHtmlStats, code_getJsStats as getJsStats, code_getMethodColor as getMethodColor, code_isValidTag as isValidTag, code_lintConventionalCommit as lintConventionalCommit, code_lookupMime as lookupMime, code_minifyCss as minifyCss, code_minifyGql as minifyGql, code_minifyHtml as minifyHtml, code_minifyJs as minifyJs, code_minifySql as minifySql, code_normalizeRef as normalizeRef, code_parseDockerImage as parseDockerImage, code_parseEnv as parseEnv, code_parseGitCommand as parseGitCommand, code_parseGithubUrl as parseGithubUrl, code_parseSpec as parseSpec, code_removeConsoleCalls as removeConsoleCalls, code_removeEmptyAttributes as removeEmptyAttributes, code_removeHtmlComments as removeHtmlComments, code_removeJsComments as removeJsComments, code_removeRedundantAttributes as removeRedundantAttributes, code_searchCheatsheet as searchCheatsheet, code_searchEndpoints as searchEndpoints, code_splitStatements as splitStatements, code_testGitignorePatterns as testGitignorePatterns, code_testPattern as testPattern, code_testRegex as testRegex, code_validateEditorConfig as validateEditorConfig, code_validateEnvKey as validateEnvKey, code_validateTsconfig as validateTsconfig };
|
|
492
557
|
}
|
|
493
558
|
|
|
494
|
-
export {
|
|
559
|
+
export { type TsconfigIssue as $, ALL_FLAGS as A, type MatchResult as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type EditorConfigIssue as E, type MimeEntry as F, type GitCommandConfig as G, type HtmlFormatResult as H, type MimeLookupResult as I, type JsMinifyOptions as J, type RedosResult as K, type RedosSeverity as L, MIME_TABLE as M, type RegexError as N, OPERATIONS as O, type ParsedSpec as P, type RegexFlag as Q, type RedosFinding as R, type RegexMatch as S, type RegexResult as T, type RegexSuccess as U, SQL_DEFAULT_OPTIONS as V, type Segment as W, type SpecVersion as X, type SqlDialect as Y, type SqlFormatOptions as Z, type TestPatternResult as _, type ApiEndpoint as a, type TsconfigValidationResult as a0, buildDockerPull as a1, buildDockerRun as a2, buildGitCommand as a3, collapseHtmlWhitespace as a4, collapseJsWhitespace as a5, countProperties as a6, countRules as a7, detectDialect as a8, detectOperationType as a9, removeEmptyAttributes as aA, removeHtmlComments as aB, removeJsComments as aC, removeRedundantAttributes as aD, searchCheatsheet as aE, searchEndpoints as aF, splitStatements as aG, testGitignorePatterns as aH, testPattern as aI, testRegex as aJ, validateEditorConfig as aK, validateEnvKey as aL, validateTsconfig as aM, detectRedos as aa, envToExport as ab, envToJson as ac, formatCss as ad, formatGql as ae, formatHtml as af, formatSql as ag, getEndpointsByTag as ah, getHtmlStats as ai, getJsStats as aj, getMethodColor as ak, isValidTag as al, lintConventionalCommit as am, lookupMime as an, minifyCss as ao, minifyGql as ap, minifyHtml as aq, minifyJs as ar, minifySql as as, normalizeRef as at, parseDockerImage as au, parseEnv as av, parseGitCommand as aw, parseGithubUrl as ax, parseSpec as ay, removeConsoleCalls as az, type ApiInfo as b, code as c, type CheatsheetEntry as d, type ConventionalCommitFinding as e, type ConventionalCommitFooter as f, type ConventionalCommitOptions as g, type ConventionalCommitParsed as h, type ConventionalCommitResult as i, type ConventionalCommitSeverity as j, type CssResult as k, type DockerImageRef as l, type EditorConfigProperty as m, type EditorConfigSection as n, type EditorConfigValidationResult as o, type EnvEntry as p, type EnvParseResult as q, type GitCommandResult as r, type GitOperation as s, type GithubUrlInfo as t, type GithubUrlType as u, type GitignoreTestResult as v, type GqlFormatResult as w, type HtmlMinifyOptions as x, type HtmlMinifyResult as y, type JsMinifyResult as z };
|