@utilix-tech/sdk 0.62.0 → 0.63.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 +4 -0
- package/README.md +11 -3
- package/dist/{chunk-JW4NG2GN.js → chunk-JPFHEZ4P.js} +92 -1
- package/dist/{chunk-43WFN3CW.js → chunk-YTH76KAF.js} +101 -1
- package/dist/{code-rxidGgvB.d.cts → code-CKI2Z_NM.d.cts} +49 -2
- package/dist/{code-rxidGgvB.d.ts → code-CKI2Z_NM.d.ts} +49 -2
- package/dist/index.cjs +191 -0
- 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 +91 -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 +100 -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-izyUpUAb.d.cts → units-CLJ16Zzv.d.cts} +56 -2
- package/dist/{units-izyUpUAb.d.ts → units-CLJ16Zzv.d.ts} +56 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -8485,6 +8485,7 @@ __export(units_exports, {
|
|
|
8485
8485
|
permissionsToChmod: () => permissionsToChmod,
|
|
8486
8486
|
permissionsToOctal: () => permissionsToOctal,
|
|
8487
8487
|
permissionsToSymbolic: () => permissionsToSymbolic,
|
|
8488
|
+
planDebtPayoff: () => planDebtPayoff,
|
|
8488
8489
|
ptToPx: () => ptToPx,
|
|
8489
8490
|
pxToAll: () => pxToAll,
|
|
8490
8491
|
pxToViewport: () => pxToViewport,
|
|
@@ -10779,6 +10780,105 @@ function calculateFreelancerRate(input) {
|
|
|
10779
10780
|
monthlyRevenueTarget: round23(requiredAnnualRevenue / 12)
|
|
10780
10781
|
};
|
|
10781
10782
|
}
|
|
10783
|
+
var DEBT_PAYOFF_MAX_MONTHS = 1200;
|
|
10784
|
+
function _simulateDebtPayoff(debts, order, extraMonthlyPayment) {
|
|
10785
|
+
const round23 = (n) => Math.round(n * 100) / 100;
|
|
10786
|
+
const balances = debts.map((d) => d.balance);
|
|
10787
|
+
const totalMinPayment = debts.reduce((sum, d) => sum + d.minPayment, 0);
|
|
10788
|
+
const totalBudget = totalMinPayment + extraMonthlyPayment;
|
|
10789
|
+
let totalInterestPaid = 0;
|
|
10790
|
+
let totalPaid = 0;
|
|
10791
|
+
const schedule = [];
|
|
10792
|
+
let month = 0;
|
|
10793
|
+
while (balances.some((b) => b > 5e-3) && month < DEBT_PAYOFF_MAX_MONTHS) {
|
|
10794
|
+
month++;
|
|
10795
|
+
for (let i = 0; i < balances.length; i++) {
|
|
10796
|
+
if (balances[i] <= 0) continue;
|
|
10797
|
+
const interest = balances[i] * debts[i].ratePercent / 100 / 12;
|
|
10798
|
+
balances[i] += interest;
|
|
10799
|
+
totalInterestPaid += interest;
|
|
10800
|
+
}
|
|
10801
|
+
let remainingBudget = totalBudget;
|
|
10802
|
+
for (let i = 0; i < balances.length; i++) {
|
|
10803
|
+
if (balances[i] <= 0) continue;
|
|
10804
|
+
const pay = Math.min(balances[i], debts[i].minPayment);
|
|
10805
|
+
balances[i] -= pay;
|
|
10806
|
+
remainingBudget -= pay;
|
|
10807
|
+
totalPaid += pay;
|
|
10808
|
+
}
|
|
10809
|
+
for (const i of order) {
|
|
10810
|
+
if (remainingBudget <= 0) break;
|
|
10811
|
+
if (balances[i] <= 0) continue;
|
|
10812
|
+
const pay = Math.min(balances[i], remainingBudget);
|
|
10813
|
+
balances[i] -= pay;
|
|
10814
|
+
remainingBudget -= pay;
|
|
10815
|
+
totalPaid += pay;
|
|
10816
|
+
}
|
|
10817
|
+
for (const i of order) {
|
|
10818
|
+
if (balances[i] <= 5e-3 && !schedule.some((s) => s.label === debts[i].label)) {
|
|
10819
|
+
schedule.push({ label: debts[i].label, monthPaidOff: month });
|
|
10820
|
+
}
|
|
10821
|
+
}
|
|
10822
|
+
}
|
|
10823
|
+
if (balances.some((b) => b > 5e-3)) return null;
|
|
10824
|
+
return {
|
|
10825
|
+
order: order.map((i) => debts[i].label),
|
|
10826
|
+
monthsToPayoff: month,
|
|
10827
|
+
totalInterestPaid: round23(totalInterestPaid),
|
|
10828
|
+
totalPaid: round23(totalPaid),
|
|
10829
|
+
schedule
|
|
10830
|
+
};
|
|
10831
|
+
}
|
|
10832
|
+
function planDebtPayoff(debts, extraMonthlyPayment = 0) {
|
|
10833
|
+
if (!Array.isArray(debts) || debts.length === 0) {
|
|
10834
|
+
return { error: "debts must be a non-empty array" };
|
|
10835
|
+
}
|
|
10836
|
+
if (!Number.isFinite(extraMonthlyPayment) || extraMonthlyPayment < 0) {
|
|
10837
|
+
return { error: "extraMonthlyPayment must be a finite, non-negative number" };
|
|
10838
|
+
}
|
|
10839
|
+
const normalized = [];
|
|
10840
|
+
for (let i = 0; i < debts.length; i++) {
|
|
10841
|
+
const d = debts[i];
|
|
10842
|
+
if (typeof d.balance !== "number" || !Number.isFinite(d.balance) || d.balance <= 0) {
|
|
10843
|
+
return { error: `debt ${i + 1}: balance must be a finite number greater than zero` };
|
|
10844
|
+
}
|
|
10845
|
+
if (typeof d.ratePercent !== "number" || !Number.isFinite(d.ratePercent) || d.ratePercent < 0) {
|
|
10846
|
+
return { error: `debt ${i + 1}: ratePercent must be a finite, non-negative number` };
|
|
10847
|
+
}
|
|
10848
|
+
if (typeof d.minPayment !== "number" || !Number.isFinite(d.minPayment) || d.minPayment <= 0) {
|
|
10849
|
+
return { error: `debt ${i + 1}: minPayment must be a finite number greater than zero` };
|
|
10850
|
+
}
|
|
10851
|
+
normalized.push({
|
|
10852
|
+
label: d.label?.trim() || `Debt ${i + 1}`,
|
|
10853
|
+
balance: d.balance,
|
|
10854
|
+
ratePercent: d.ratePercent,
|
|
10855
|
+
minPayment: d.minPayment
|
|
10856
|
+
});
|
|
10857
|
+
}
|
|
10858
|
+
const snowballOrder = normalized.map((_, i) => i).sort((a, b) => normalized[a].balance - normalized[b].balance);
|
|
10859
|
+
const avalancheOrder = normalized.map((_, i) => i).sort((a, b) => normalized[b].ratePercent - normalized[a].ratePercent);
|
|
10860
|
+
const snowball = _simulateDebtPayoff(normalized, snowballOrder, extraMonthlyPayment);
|
|
10861
|
+
const avalanche = _simulateDebtPayoff(normalized, avalancheOrder, extraMonthlyPayment);
|
|
10862
|
+
if (!snowball || !avalanche) {
|
|
10863
|
+
return { error: `debts cannot be paid off within ${DEBT_PAYOFF_MAX_MONTHS} months at this payment level; increase a minimum payment or the extra monthly payment` };
|
|
10864
|
+
}
|
|
10865
|
+
const round23 = (n) => Math.round(n * 100) / 100;
|
|
10866
|
+
const monthsDifference = Math.abs(snowball.monthsToPayoff - avalanche.monthsToPayoff);
|
|
10867
|
+
const interestDifference = round23(Math.abs(snowball.totalInterestPaid - avalanche.totalInterestPaid));
|
|
10868
|
+
return {
|
|
10869
|
+
debts: normalized,
|
|
10870
|
+
totalMonthlyBudget: round23(normalized.reduce((sum, d) => sum + d.minPayment, 0) + extraMonthlyPayment),
|
|
10871
|
+
extraMonthlyPayment,
|
|
10872
|
+
snowball,
|
|
10873
|
+
avalanche,
|
|
10874
|
+
comparison: {
|
|
10875
|
+
fasterStrategy: snowball.monthsToPayoff === avalanche.monthsToPayoff ? "tie" : snowball.monthsToPayoff < avalanche.monthsToPayoff ? "snowball" : "avalanche",
|
|
10876
|
+
monthsDifference,
|
|
10877
|
+
cheaperStrategy: snowball.totalInterestPaid === avalanche.totalInterestPaid ? "tie" : snowball.totalInterestPaid < avalanche.totalInterestPaid ? "snowball" : "avalanche",
|
|
10878
|
+
interestDifference
|
|
10879
|
+
}
|
|
10880
|
+
};
|
|
10881
|
+
}
|
|
10782
10882
|
|
|
10783
10883
|
// src/tools/network.ts
|
|
10784
10884
|
var network_exports = {};
|
|
@@ -15212,6 +15312,7 @@ __export(code_exports, {
|
|
|
15212
15312
|
MIME_TABLE: () => MIME_TABLE,
|
|
15213
15313
|
OPERATIONS: () => OPERATIONS,
|
|
15214
15314
|
SQL_DEFAULT_OPTIONS: () => SQL_DEFAULT_OPTIONS,
|
|
15315
|
+
auditDependencyRanges: () => auditDependencyRanges,
|
|
15215
15316
|
buildDockerPull: () => buildDockerPull,
|
|
15216
15317
|
buildDockerRun: () => buildDockerRun,
|
|
15217
15318
|
buildGitCommand: () => buildGitCommand,
|
|
@@ -18596,6 +18697,96 @@ function validatePackageExports(packageJsonText) {
|
|
|
18596
18697
|
const valid = !issues.some((i) => i.severity === "error");
|
|
18597
18698
|
return { parsed: true, exportsShape, subpaths, issues, valid };
|
|
18598
18699
|
}
|
|
18700
|
+
var DEPENDENCY_SECTIONS = ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"];
|
|
18701
|
+
var EXACT_SEMVER_RE = /^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$/;
|
|
18702
|
+
function classifyDependencyRange(version2) {
|
|
18703
|
+
const v = version2.trim();
|
|
18704
|
+
if (v === "" || v === "*" || v.toLowerCase() === "x") return "wildcard";
|
|
18705
|
+
if (v.startsWith("workspace:")) return "workspace";
|
|
18706
|
+
if (v.startsWith("file:")) return "file";
|
|
18707
|
+
if (v.startsWith("link:")) return "link";
|
|
18708
|
+
if (v.startsWith("http://") || v.startsWith("https://")) return "url";
|
|
18709
|
+
if (v.startsWith("git+") || v.startsWith("git://") || v.startsWith("github:") || v.endsWith(".git") || /^[\w-]+\/[\w.-]+$/.test(v)) return "git";
|
|
18710
|
+
if (v.startsWith("^")) return "caret";
|
|
18711
|
+
if (v.startsWith("~")) return "tilde";
|
|
18712
|
+
if (v.includes("||") || v.includes(" ") || v.startsWith(">") || v.startsWith("<") || v.startsWith("=")) return "range";
|
|
18713
|
+
if (EXACT_SEMVER_RE.test(v)) return "exact";
|
|
18714
|
+
if (/^[A-Za-z][\w.-]*$/.test(v)) return "tag";
|
|
18715
|
+
return "unknown";
|
|
18716
|
+
}
|
|
18717
|
+
function auditDependencyRanges(packageJsonText) {
|
|
18718
|
+
if (!packageJsonText || !packageJsonText.trim()) return { error: "Input is empty" };
|
|
18719
|
+
let parsed;
|
|
18720
|
+
try {
|
|
18721
|
+
parsed = JSON.parse(packageJsonText);
|
|
18722
|
+
} catch (e) {
|
|
18723
|
+
return { error: `Invalid JSON: ${e.message}` };
|
|
18724
|
+
}
|
|
18725
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
18726
|
+
return { error: "Root of package.json must be an object" };
|
|
18727
|
+
}
|
|
18728
|
+
const obj = parsed;
|
|
18729
|
+
const presentSections = DEPENDENCY_SECTIONS.filter((s) => obj[s] && typeof obj[s] === "object");
|
|
18730
|
+
if (presentSections.length === 0) {
|
|
18731
|
+
return { error: "package.json has no dependencies, devDependencies, peerDependencies, or optionalDependencies field" };
|
|
18732
|
+
}
|
|
18733
|
+
const dependencies = [];
|
|
18734
|
+
const issues = [];
|
|
18735
|
+
const byName = /* @__PURE__ */ new Map();
|
|
18736
|
+
for (const section of presentSections) {
|
|
18737
|
+
const map = obj[section];
|
|
18738
|
+
for (const [name, versionRaw] of Object.entries(map)) {
|
|
18739
|
+
const version2 = typeof versionRaw === "string" ? versionRaw : String(versionRaw);
|
|
18740
|
+
const rangeType = classifyDependencyRange(version2);
|
|
18741
|
+
const entryIssues = [];
|
|
18742
|
+
if (rangeType === "wildcard") {
|
|
18743
|
+
entryIssues.push("no real version constraint; any version, including breaking ones, could be installed");
|
|
18744
|
+
}
|
|
18745
|
+
if (rangeType === "tag" && version2.trim().toLowerCase() === "latest") {
|
|
18746
|
+
entryIssues.push('"latest" is not reproducible; a fresh install can pull in a different, potentially breaking version at any time');
|
|
18747
|
+
}
|
|
18748
|
+
if (rangeType === "git" || rangeType === "url") {
|
|
18749
|
+
entryIssues.push(`not resolved from the npm registry (${rangeType}); can't be checked against registry advisories the same way`);
|
|
18750
|
+
}
|
|
18751
|
+
if (rangeType === "file" || rangeType === "link") {
|
|
18752
|
+
entryIssues.push(`local ${rangeType === "file" ? "path" : "symlink"} dependency; not portable to a machine or CI runner without the same local path`);
|
|
18753
|
+
}
|
|
18754
|
+
const entry = { name, version: version2, section, rangeType, issues: entryIssues };
|
|
18755
|
+
dependencies.push(entry);
|
|
18756
|
+
for (const issue of entryIssues) {
|
|
18757
|
+
issues.push({ severity: "warning", name, message: issue });
|
|
18758
|
+
}
|
|
18759
|
+
const existing = byName.get(name);
|
|
18760
|
+
if (existing) existing.push(entry);
|
|
18761
|
+
else byName.set(name, [entry]);
|
|
18762
|
+
}
|
|
18763
|
+
}
|
|
18764
|
+
const duplicates = [];
|
|
18765
|
+
for (const [name, entries] of byName) {
|
|
18766
|
+
if (entries.length < 2) continue;
|
|
18767
|
+
const versions = new Set(entries.map((e) => e.version));
|
|
18768
|
+
const sameVersion = versions.size === 1;
|
|
18769
|
+
duplicates.push({ name, sections: entries.map((e) => e.section), sameVersion });
|
|
18770
|
+
if (!sameVersion) {
|
|
18771
|
+
issues.push({ severity: "error", name, message: `listed with different version ranges in ${entries.map((e) => `${e.section} ("${e.version}")`).join(" and ")}` });
|
|
18772
|
+
} else {
|
|
18773
|
+
issues.push({ severity: "warning", name, message: `listed in more than one section (${entries.map((e) => e.section).join(", ")}) with the same range; redundant` });
|
|
18774
|
+
}
|
|
18775
|
+
}
|
|
18776
|
+
const rangeTypeCounts = {};
|
|
18777
|
+
for (const dep of dependencies) {
|
|
18778
|
+
rangeTypeCounts[dep.rangeType] = (rangeTypeCounts[dep.rangeType] ?? 0) + 1;
|
|
18779
|
+
}
|
|
18780
|
+
return {
|
|
18781
|
+
parsed: true,
|
|
18782
|
+
sections: presentSections,
|
|
18783
|
+
totalDependencies: dependencies.length,
|
|
18784
|
+
dependencies,
|
|
18785
|
+
duplicates,
|
|
18786
|
+
rangeTypeCounts,
|
|
18787
|
+
issues
|
|
18788
|
+
};
|
|
18789
|
+
}
|
|
18599
18790
|
|
|
18600
18791
|
// src/tools/color.ts
|
|
18601
18792
|
var color_exports = {};
|
package/dist/index.d.cts
CHANGED
|
@@ -5,10 +5,10 @@ export { t as text } from './text-DWUcY8H1.cjs';
|
|
|
5
5
|
export { d as data } from './data-vxXrBlWh.cjs';
|
|
6
6
|
export { g as generators } from './generators-DAXXrMvG.cjs';
|
|
7
7
|
export { t as time } from './time-KqJjdqII.cjs';
|
|
8
|
-
export { u as units } from './units-
|
|
8
|
+
export { u as units } from './units-CLJ16Zzv.cjs';
|
|
9
9
|
export { n as network } from './network-DewFJy4E.cjs';
|
|
10
10
|
export { a as api } from './api-DmTNE4c1.cjs';
|
|
11
|
-
export { c as code } from './code-
|
|
11
|
+
export { c as code } from './code-CKI2Z_NM.cjs';
|
|
12
12
|
export { c as color } from './color-tPwZCr9H.cjs';
|
|
13
13
|
export { c as css } from './css-Cf7AMGM-.cjs';
|
|
14
14
|
export { m as misc } from './misc-CA3N198T.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -5,10 +5,10 @@ export { t as text } from './text-DWUcY8H1.js';
|
|
|
5
5
|
export { d as data } from './data-vxXrBlWh.js';
|
|
6
6
|
export { g as generators } from './generators-DAXXrMvG.js';
|
|
7
7
|
export { t as time } from './time-KqJjdqII.js';
|
|
8
|
-
export { u as units } from './units-
|
|
8
|
+
export { u as units } from './units-CLJ16Zzv.js';
|
|
9
9
|
export { n as network } from './network-DewFJy4E.js';
|
|
10
10
|
export { a as api } from './api-DmTNE4c1.js';
|
|
11
|
-
export { c as code } from './code-
|
|
11
|
+
export { c as code } from './code-CKI2Z_NM.js';
|
|
12
12
|
export { c as color } from './color-tPwZCr9H.js';
|
|
13
13
|
export { c as css } from './css-Cf7AMGM-.js';
|
|
14
14
|
export { m as misc } from './misc-CA3N198T.js';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { media_exports as media } from './chunk-226EH3ZI.js';
|
|
2
|
-
export { units_exports as units } from './chunk-
|
|
2
|
+
export { units_exports as units } from './chunk-YTH76KAF.js';
|
|
3
3
|
export { network_exports as network } from './chunk-43L7H3L2.js';
|
|
4
4
|
export { api_exports as api } from './chunk-52ZDKSIX.js';
|
|
5
|
-
export { code_exports as code } from './chunk-
|
|
5
|
+
export { code_exports as code } from './chunk-JPFHEZ4P.js';
|
|
6
6
|
export { color_exports as color } from './chunk-BPVAB4P2.js';
|
|
7
7
|
export { css_exports as css } from './chunk-6YPV2AB5.js';
|
|
8
8
|
export { misc_exports as misc } from './chunk-GX7H6TAX.js';
|
package/dist/tools/code.cjs
CHANGED
|
@@ -3337,6 +3337,96 @@ function validatePackageExports(packageJsonText) {
|
|
|
3337
3337
|
const valid = !issues.some((i) => i.severity === "error");
|
|
3338
3338
|
return { parsed: true, exportsShape, subpaths, issues, valid };
|
|
3339
3339
|
}
|
|
3340
|
+
var DEPENDENCY_SECTIONS = ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"];
|
|
3341
|
+
var EXACT_SEMVER_RE = /^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$/;
|
|
3342
|
+
function classifyDependencyRange(version) {
|
|
3343
|
+
const v = version.trim();
|
|
3344
|
+
if (v === "" || v === "*" || v.toLowerCase() === "x") return "wildcard";
|
|
3345
|
+
if (v.startsWith("workspace:")) return "workspace";
|
|
3346
|
+
if (v.startsWith("file:")) return "file";
|
|
3347
|
+
if (v.startsWith("link:")) return "link";
|
|
3348
|
+
if (v.startsWith("http://") || v.startsWith("https://")) return "url";
|
|
3349
|
+
if (v.startsWith("git+") || v.startsWith("git://") || v.startsWith("github:") || v.endsWith(".git") || /^[\w-]+\/[\w.-]+$/.test(v)) return "git";
|
|
3350
|
+
if (v.startsWith("^")) return "caret";
|
|
3351
|
+
if (v.startsWith("~")) return "tilde";
|
|
3352
|
+
if (v.includes("||") || v.includes(" ") || v.startsWith(">") || v.startsWith("<") || v.startsWith("=")) return "range";
|
|
3353
|
+
if (EXACT_SEMVER_RE.test(v)) return "exact";
|
|
3354
|
+
if (/^[A-Za-z][\w.-]*$/.test(v)) return "tag";
|
|
3355
|
+
return "unknown";
|
|
3356
|
+
}
|
|
3357
|
+
function auditDependencyRanges(packageJsonText) {
|
|
3358
|
+
if (!packageJsonText || !packageJsonText.trim()) return { error: "Input is empty" };
|
|
3359
|
+
let parsed;
|
|
3360
|
+
try {
|
|
3361
|
+
parsed = JSON.parse(packageJsonText);
|
|
3362
|
+
} catch (e) {
|
|
3363
|
+
return { error: `Invalid JSON: ${e.message}` };
|
|
3364
|
+
}
|
|
3365
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
3366
|
+
return { error: "Root of package.json must be an object" };
|
|
3367
|
+
}
|
|
3368
|
+
const obj = parsed;
|
|
3369
|
+
const presentSections = DEPENDENCY_SECTIONS.filter((s) => obj[s] && typeof obj[s] === "object");
|
|
3370
|
+
if (presentSections.length === 0) {
|
|
3371
|
+
return { error: "package.json has no dependencies, devDependencies, peerDependencies, or optionalDependencies field" };
|
|
3372
|
+
}
|
|
3373
|
+
const dependencies = [];
|
|
3374
|
+
const issues = [];
|
|
3375
|
+
const byName = /* @__PURE__ */ new Map();
|
|
3376
|
+
for (const section of presentSections) {
|
|
3377
|
+
const map = obj[section];
|
|
3378
|
+
for (const [name, versionRaw] of Object.entries(map)) {
|
|
3379
|
+
const version = typeof versionRaw === "string" ? versionRaw : String(versionRaw);
|
|
3380
|
+
const rangeType = classifyDependencyRange(version);
|
|
3381
|
+
const entryIssues = [];
|
|
3382
|
+
if (rangeType === "wildcard") {
|
|
3383
|
+
entryIssues.push("no real version constraint; any version, including breaking ones, could be installed");
|
|
3384
|
+
}
|
|
3385
|
+
if (rangeType === "tag" && version.trim().toLowerCase() === "latest") {
|
|
3386
|
+
entryIssues.push('"latest" is not reproducible; a fresh install can pull in a different, potentially breaking version at any time');
|
|
3387
|
+
}
|
|
3388
|
+
if (rangeType === "git" || rangeType === "url") {
|
|
3389
|
+
entryIssues.push(`not resolved from the npm registry (${rangeType}); can't be checked against registry advisories the same way`);
|
|
3390
|
+
}
|
|
3391
|
+
if (rangeType === "file" || rangeType === "link") {
|
|
3392
|
+
entryIssues.push(`local ${rangeType === "file" ? "path" : "symlink"} dependency; not portable to a machine or CI runner without the same local path`);
|
|
3393
|
+
}
|
|
3394
|
+
const entry = { name, version, section, rangeType, issues: entryIssues };
|
|
3395
|
+
dependencies.push(entry);
|
|
3396
|
+
for (const issue of entryIssues) {
|
|
3397
|
+
issues.push({ severity: "warning", name, message: issue });
|
|
3398
|
+
}
|
|
3399
|
+
const existing = byName.get(name);
|
|
3400
|
+
if (existing) existing.push(entry);
|
|
3401
|
+
else byName.set(name, [entry]);
|
|
3402
|
+
}
|
|
3403
|
+
}
|
|
3404
|
+
const duplicates = [];
|
|
3405
|
+
for (const [name, entries] of byName) {
|
|
3406
|
+
if (entries.length < 2) continue;
|
|
3407
|
+
const versions = new Set(entries.map((e) => e.version));
|
|
3408
|
+
const sameVersion = versions.size === 1;
|
|
3409
|
+
duplicates.push({ name, sections: entries.map((e) => e.section), sameVersion });
|
|
3410
|
+
if (!sameVersion) {
|
|
3411
|
+
issues.push({ severity: "error", name, message: `listed with different version ranges in ${entries.map((e) => `${e.section} ("${e.version}")`).join(" and ")}` });
|
|
3412
|
+
} else {
|
|
3413
|
+
issues.push({ severity: "warning", name, message: `listed in more than one section (${entries.map((e) => e.section).join(", ")}) with the same range; redundant` });
|
|
3414
|
+
}
|
|
3415
|
+
}
|
|
3416
|
+
const rangeTypeCounts = {};
|
|
3417
|
+
for (const dep of dependencies) {
|
|
3418
|
+
rangeTypeCounts[dep.rangeType] = (rangeTypeCounts[dep.rangeType] ?? 0) + 1;
|
|
3419
|
+
}
|
|
3420
|
+
return {
|
|
3421
|
+
parsed: true,
|
|
3422
|
+
sections: presentSections,
|
|
3423
|
+
totalDependencies: dependencies.length,
|
|
3424
|
+
dependencies,
|
|
3425
|
+
duplicates,
|
|
3426
|
+
rangeTypeCounts,
|
|
3427
|
+
issues
|
|
3428
|
+
};
|
|
3429
|
+
}
|
|
3340
3430
|
|
|
3341
3431
|
exports.ALL_FLAGS = ALL_FLAGS;
|
|
3342
3432
|
exports.CHEATSHEET = CHEATSHEET;
|
|
@@ -3344,6 +3434,7 @@ exports.DEFAULT_COMMIT_TYPES = DEFAULT_COMMIT_TYPES;
|
|
|
3344
3434
|
exports.MIME_TABLE = MIME_TABLE;
|
|
3345
3435
|
exports.OPERATIONS = OPERATIONS;
|
|
3346
3436
|
exports.SQL_DEFAULT_OPTIONS = SQL_DEFAULT_OPTIONS;
|
|
3437
|
+
exports.auditDependencyRanges = auditDependencyRanges;
|
|
3347
3438
|
exports.buildDockerPull = buildDockerPull;
|
|
3348
3439
|
exports.buildDockerRun = buildDockerRun;
|
|
3349
3440
|
exports.buildGitCommand = buildGitCommand;
|
package/dist/tools/code.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as ALL_FLAGS, a as ApiEndpoint, b as ApiInfo, C as CHEATSHEET, d as CheatsheetEntry, e as ConventionalCommitFinding, f as ConventionalCommitFooter, g as ConventionalCommitOptions, h as ConventionalCommitParsed, i as ConventionalCommitResult, j as ConventionalCommitSeverity, k as CssResult, D as DEFAULT_COMMIT_TYPES, l as DockerImageRef, E as EditorConfigIssue,
|
|
1
|
+
export { A as ALL_FLAGS, a as ApiEndpoint, b as ApiInfo, C as CHEATSHEET, d as CheatsheetEntry, e as ConventionalCommitFinding, f as ConventionalCommitFooter, g as ConventionalCommitOptions, h as ConventionalCommitParsed, i as ConventionalCommitResult, j as ConventionalCommitSeverity, k as CssResult, D as DEFAULT_COMMIT_TYPES, l as DependencyAuditDuplicate, m as DependencyAuditEntry, n as DependencyAuditIssue, o as DependencyAuditResult, p as DependencyRangeType, q as DependencySection, r as DockerImageRef, E as EditorConfigIssue, s as EditorConfigProperty, t as EditorConfigSection, u as EditorConfigValidationResult, v as EnvEntry, w as EnvParseResult, x as ExportsIssue, y as ExportsShape, z as ExportsValidationResult, G as GitCommandConfig, B as GitCommandResult, F as GitOperation, H as GithubUrlInfo, I as GithubUrlType, J as GitignoreTestResult, K as GqlFormatResult, L as HtmlFormatResult, M as HtmlMinifyOptions, N as HtmlMinifyResult, O as JsMinifyOptions, P as JsMinifyResult, Q as MIME_TABLE, R as MatchResult, S as MimeEntry, T as MimeLookupResult, U as OPERATIONS, V as ParsedSpec, W as RedosFinding, X as RedosResult, Y as RedosSeverity, Z as RegexError, _ as RegexFlag, $ as RegexMatch, a0 as RegexResult, a1 as RegexSuccess, a2 as SQL_DEFAULT_OPTIONS, a3 as Segment, a4 as SpecVersion, a5 as SqlDialect, a6 as SqlFormatOptions, a7 as TestPatternResult, a8 as TsconfigIssue, a9 as TsconfigValidationResult, aa as auditDependencyRanges, ab as buildDockerPull, ac as buildDockerRun, ad as buildGitCommand, ae as collapseHtmlWhitespace, af as collapseJsWhitespace, ag as countProperties, ah as countRules, ai as detectDialect, aj as detectOperationType, ak as detectRedos, al as envToExport, am as envToJson, an as formatCss, ao as formatGql, ap as formatHtml, aq as formatSql, ar as getEndpointsByTag, as as getHtmlStats, at as getJsStats, au as getMethodColor, av as isValidTag, aw as lintConventionalCommit, ax as lookupMime, ay as minifyCss, az as minifyGql, aA as minifyHtml, aB as minifyJs, aC as minifySql, aD as normalizeRef, aE as parseDockerImage, aF as parseEnv, aG as parseGitCommand, aH as parseGithubUrl, aI as parseSpec, aJ as removeConsoleCalls, aK as removeEmptyAttributes, aL as removeHtmlComments, aM as removeJsComments, aN as removeRedundantAttributes, aO as searchCheatsheet, aP as searchEndpoints, aQ as splitStatements, aR as testGitignorePatterns, aS as testPattern, aT as testRegex, aU as validateEditorConfig, aV as validateEnvKey, aW as validatePackageExports, aX as validateTsconfig } from '../code-CKI2Z_NM.cjs';
|
package/dist/tools/code.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as ALL_FLAGS, a as ApiEndpoint, b as ApiInfo, C as CHEATSHEET, d as CheatsheetEntry, e as ConventionalCommitFinding, f as ConventionalCommitFooter, g as ConventionalCommitOptions, h as ConventionalCommitParsed, i as ConventionalCommitResult, j as ConventionalCommitSeverity, k as CssResult, D as DEFAULT_COMMIT_TYPES, l as DockerImageRef, E as EditorConfigIssue,
|
|
1
|
+
export { A as ALL_FLAGS, a as ApiEndpoint, b as ApiInfo, C as CHEATSHEET, d as CheatsheetEntry, e as ConventionalCommitFinding, f as ConventionalCommitFooter, g as ConventionalCommitOptions, h as ConventionalCommitParsed, i as ConventionalCommitResult, j as ConventionalCommitSeverity, k as CssResult, D as DEFAULT_COMMIT_TYPES, l as DependencyAuditDuplicate, m as DependencyAuditEntry, n as DependencyAuditIssue, o as DependencyAuditResult, p as DependencyRangeType, q as DependencySection, r as DockerImageRef, E as EditorConfigIssue, s as EditorConfigProperty, t as EditorConfigSection, u as EditorConfigValidationResult, v as EnvEntry, w as EnvParseResult, x as ExportsIssue, y as ExportsShape, z as ExportsValidationResult, G as GitCommandConfig, B as GitCommandResult, F as GitOperation, H as GithubUrlInfo, I as GithubUrlType, J as GitignoreTestResult, K as GqlFormatResult, L as HtmlFormatResult, M as HtmlMinifyOptions, N as HtmlMinifyResult, O as JsMinifyOptions, P as JsMinifyResult, Q as MIME_TABLE, R as MatchResult, S as MimeEntry, T as MimeLookupResult, U as OPERATIONS, V as ParsedSpec, W as RedosFinding, X as RedosResult, Y as RedosSeverity, Z as RegexError, _ as RegexFlag, $ as RegexMatch, a0 as RegexResult, a1 as RegexSuccess, a2 as SQL_DEFAULT_OPTIONS, a3 as Segment, a4 as SpecVersion, a5 as SqlDialect, a6 as SqlFormatOptions, a7 as TestPatternResult, a8 as TsconfigIssue, a9 as TsconfigValidationResult, aa as auditDependencyRanges, ab as buildDockerPull, ac as buildDockerRun, ad as buildGitCommand, ae as collapseHtmlWhitespace, af as collapseJsWhitespace, ag as countProperties, ah as countRules, ai as detectDialect, aj as detectOperationType, ak as detectRedos, al as envToExport, am as envToJson, an as formatCss, ao as formatGql, ap as formatHtml, aq as formatSql, ar as getEndpointsByTag, as as getHtmlStats, at as getJsStats, au as getMethodColor, av as isValidTag, aw as lintConventionalCommit, ax as lookupMime, ay as minifyCss, az as minifyGql, aA as minifyHtml, aB as minifyJs, aC as minifySql, aD as normalizeRef, aE as parseDockerImage, aF as parseEnv, aG as parseGitCommand, aH as parseGithubUrl, aI as parseSpec, aJ as removeConsoleCalls, aK as removeEmptyAttributes, aL as removeHtmlComments, aM as removeJsComments, aN as removeRedundantAttributes, aO as searchCheatsheet, aP as searchEndpoints, aQ as splitStatements, aR as testGitignorePatterns, aS as testPattern, aT as testRegex, aU as validateEditorConfig, aV as validateEnvKey, aW as validatePackageExports, aX as validateTsconfig } from '../code-CKI2Z_NM.js';
|
package/dist/tools/code.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, buildDockerPull, buildDockerRun, buildGitCommand, 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, validatePackageExports, validateTsconfig } from '../chunk-
|
|
1
|
+
export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, auditDependencyRanges, buildDockerPull, buildDockerRun, buildGitCommand, 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, validatePackageExports, validateTsconfig } from '../chunk-JPFHEZ4P.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
package/dist/tools/units.cjs
CHANGED
|
@@ -2279,6 +2279,105 @@ function calculateFreelancerRate(input) {
|
|
|
2279
2279
|
monthlyRevenueTarget: round22(requiredAnnualRevenue / 12)
|
|
2280
2280
|
};
|
|
2281
2281
|
}
|
|
2282
|
+
var DEBT_PAYOFF_MAX_MONTHS = 1200;
|
|
2283
|
+
function _simulateDebtPayoff(debts, order, extraMonthlyPayment) {
|
|
2284
|
+
const round22 = (n) => Math.round(n * 100) / 100;
|
|
2285
|
+
const balances = debts.map((d) => d.balance);
|
|
2286
|
+
const totalMinPayment = debts.reduce((sum, d) => sum + d.minPayment, 0);
|
|
2287
|
+
const totalBudget = totalMinPayment + extraMonthlyPayment;
|
|
2288
|
+
let totalInterestPaid = 0;
|
|
2289
|
+
let totalPaid = 0;
|
|
2290
|
+
const schedule = [];
|
|
2291
|
+
let month = 0;
|
|
2292
|
+
while (balances.some((b) => b > 5e-3) && month < DEBT_PAYOFF_MAX_MONTHS) {
|
|
2293
|
+
month++;
|
|
2294
|
+
for (let i = 0; i < balances.length; i++) {
|
|
2295
|
+
if (balances[i] <= 0) continue;
|
|
2296
|
+
const interest = balances[i] * debts[i].ratePercent / 100 / 12;
|
|
2297
|
+
balances[i] += interest;
|
|
2298
|
+
totalInterestPaid += interest;
|
|
2299
|
+
}
|
|
2300
|
+
let remainingBudget = totalBudget;
|
|
2301
|
+
for (let i = 0; i < balances.length; i++) {
|
|
2302
|
+
if (balances[i] <= 0) continue;
|
|
2303
|
+
const pay = Math.min(balances[i], debts[i].minPayment);
|
|
2304
|
+
balances[i] -= pay;
|
|
2305
|
+
remainingBudget -= pay;
|
|
2306
|
+
totalPaid += pay;
|
|
2307
|
+
}
|
|
2308
|
+
for (const i of order) {
|
|
2309
|
+
if (remainingBudget <= 0) break;
|
|
2310
|
+
if (balances[i] <= 0) continue;
|
|
2311
|
+
const pay = Math.min(balances[i], remainingBudget);
|
|
2312
|
+
balances[i] -= pay;
|
|
2313
|
+
remainingBudget -= pay;
|
|
2314
|
+
totalPaid += pay;
|
|
2315
|
+
}
|
|
2316
|
+
for (const i of order) {
|
|
2317
|
+
if (balances[i] <= 5e-3 && !schedule.some((s) => s.label === debts[i].label)) {
|
|
2318
|
+
schedule.push({ label: debts[i].label, monthPaidOff: month });
|
|
2319
|
+
}
|
|
2320
|
+
}
|
|
2321
|
+
}
|
|
2322
|
+
if (balances.some((b) => b > 5e-3)) return null;
|
|
2323
|
+
return {
|
|
2324
|
+
order: order.map((i) => debts[i].label),
|
|
2325
|
+
monthsToPayoff: month,
|
|
2326
|
+
totalInterestPaid: round22(totalInterestPaid),
|
|
2327
|
+
totalPaid: round22(totalPaid),
|
|
2328
|
+
schedule
|
|
2329
|
+
};
|
|
2330
|
+
}
|
|
2331
|
+
function planDebtPayoff(debts, extraMonthlyPayment = 0) {
|
|
2332
|
+
if (!Array.isArray(debts) || debts.length === 0) {
|
|
2333
|
+
return { error: "debts must be a non-empty array" };
|
|
2334
|
+
}
|
|
2335
|
+
if (!Number.isFinite(extraMonthlyPayment) || extraMonthlyPayment < 0) {
|
|
2336
|
+
return { error: "extraMonthlyPayment must be a finite, non-negative number" };
|
|
2337
|
+
}
|
|
2338
|
+
const normalized = [];
|
|
2339
|
+
for (let i = 0; i < debts.length; i++) {
|
|
2340
|
+
const d = debts[i];
|
|
2341
|
+
if (typeof d.balance !== "number" || !Number.isFinite(d.balance) || d.balance <= 0) {
|
|
2342
|
+
return { error: `debt ${i + 1}: balance must be a finite number greater than zero` };
|
|
2343
|
+
}
|
|
2344
|
+
if (typeof d.ratePercent !== "number" || !Number.isFinite(d.ratePercent) || d.ratePercent < 0) {
|
|
2345
|
+
return { error: `debt ${i + 1}: ratePercent must be a finite, non-negative number` };
|
|
2346
|
+
}
|
|
2347
|
+
if (typeof d.minPayment !== "number" || !Number.isFinite(d.minPayment) || d.minPayment <= 0) {
|
|
2348
|
+
return { error: `debt ${i + 1}: minPayment must be a finite number greater than zero` };
|
|
2349
|
+
}
|
|
2350
|
+
normalized.push({
|
|
2351
|
+
label: d.label?.trim() || `Debt ${i + 1}`,
|
|
2352
|
+
balance: d.balance,
|
|
2353
|
+
ratePercent: d.ratePercent,
|
|
2354
|
+
minPayment: d.minPayment
|
|
2355
|
+
});
|
|
2356
|
+
}
|
|
2357
|
+
const snowballOrder = normalized.map((_, i) => i).sort((a, b) => normalized[a].balance - normalized[b].balance);
|
|
2358
|
+
const avalancheOrder = normalized.map((_, i) => i).sort((a, b) => normalized[b].ratePercent - normalized[a].ratePercent);
|
|
2359
|
+
const snowball = _simulateDebtPayoff(normalized, snowballOrder, extraMonthlyPayment);
|
|
2360
|
+
const avalanche = _simulateDebtPayoff(normalized, avalancheOrder, extraMonthlyPayment);
|
|
2361
|
+
if (!snowball || !avalanche) {
|
|
2362
|
+
return { error: `debts cannot be paid off within ${DEBT_PAYOFF_MAX_MONTHS} months at this payment level; increase a minimum payment or the extra monthly payment` };
|
|
2363
|
+
}
|
|
2364
|
+
const round22 = (n) => Math.round(n * 100) / 100;
|
|
2365
|
+
const monthsDifference = Math.abs(snowball.monthsToPayoff - avalanche.monthsToPayoff);
|
|
2366
|
+
const interestDifference = round22(Math.abs(snowball.totalInterestPaid - avalanche.totalInterestPaid));
|
|
2367
|
+
return {
|
|
2368
|
+
debts: normalized,
|
|
2369
|
+
totalMonthlyBudget: round22(normalized.reduce((sum, d) => sum + d.minPayment, 0) + extraMonthlyPayment),
|
|
2370
|
+
extraMonthlyPayment,
|
|
2371
|
+
snowball,
|
|
2372
|
+
avalanche,
|
|
2373
|
+
comparison: {
|
|
2374
|
+
fasterStrategy: snowball.monthsToPayoff === avalanche.monthsToPayoff ? "tie" : snowball.monthsToPayoff < avalanche.monthsToPayoff ? "snowball" : "avalanche",
|
|
2375
|
+
monthsDifference,
|
|
2376
|
+
cheaperStrategy: snowball.totalInterestPaid === avalanche.totalInterestPaid ? "tie" : snowball.totalInterestPaid < avalanche.totalInterestPaid ? "snowball" : "avalanche",
|
|
2377
|
+
interestDifference
|
|
2378
|
+
}
|
|
2379
|
+
};
|
|
2380
|
+
}
|
|
2282
2381
|
|
|
2283
2382
|
exports.BASE_LABELS = BASE_LABELS;
|
|
2284
2383
|
exports.BASE_PREFIXES = BASE_PREFIXES;
|
|
@@ -2364,6 +2463,7 @@ exports.parseSemver = parseSemver;
|
|
|
2364
2463
|
exports.permissionsToChmod = permissionsToChmod;
|
|
2365
2464
|
exports.permissionsToOctal = permissionsToOctal;
|
|
2366
2465
|
exports.permissionsToSymbolic = permissionsToSymbolic;
|
|
2466
|
+
exports.planDebtPayoff = planDebtPayoff;
|
|
2367
2467
|
exports.ptToPx = ptToPx;
|
|
2368
2468
|
exports.pxToAll = pxToAll;
|
|
2369
2469
|
exports.pxToViewport = pxToViewport;
|
package/dist/tools/units.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BlendedLoanRateResult, j as BreakEvenInput, k as BreakEvenResult, l as ByteConvertResult, m as ByteUnit, C as COMMON_CURRENCIES, n as COMMON_LOCALES, o as COMMON_PERMISSIONS, p as COMMON_RATIOS, q as COMMON_SIZES, r as COMMON_TAX_RATES, s as COMMON_TIP_PERCENTAGES, t as COMMON_VIEWPORTS, v as CardValidationResult, w as CashBreakdownResult, x as CashChangeResult, y as CashDenominationItem, z as CashRoundingMode, D as CashRoundingResult, E as CdMaturityResult, F as CompareUnitPricesResult, G as CompoundInterestResult, H as CompoundYearRow, I as CreditAccountInput, J as CreditAccountResult, K as CreditUtilizationResult, L as DebtItemInput, M as DebtItemResult, N as
|
|
1
|
+
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BlendedLoanRateResult, j as BreakEvenInput, k as BreakEvenResult, l as ByteConvertResult, m as ByteUnit, C as COMMON_CURRENCIES, n as COMMON_LOCALES, o as COMMON_PERMISSIONS, p as COMMON_RATIOS, q as COMMON_SIZES, r as COMMON_TAX_RATES, s as COMMON_TIP_PERCENTAGES, t as COMMON_VIEWPORTS, v as CardValidationResult, w as CashBreakdownResult, x as CashChangeResult, y as CashDenominationItem, z as CashRoundingMode, D as CashRoundingResult, E as CdMaturityResult, F as CompareUnitPricesResult, G as CompoundInterestResult, H as CompoundYearRow, I as CreditAccountInput, J as CreditAccountResult, K as CreditUtilizationResult, L as DebtItemInput, M as DebtItemResult, N as DebtPayoffComparison, O as DebtPayoffInput, P as DebtPayoffPlanResult, Q as DebtPayoffScheduleEntry, R as DebtPayoffStrategy, S as DebtPayoffStrategyResult, T as DebtToIncomeRatioResult, U as DepreciationMethod, V as DepreciationResult, W as DepreciationYear, X as Dimensions, Y as DiscountField, Z as DiscountInput, _ as DiscountResult, $ as DtiTier, a0 as EmiResult, a1 as EmiTenureUnit, a2 as EmiYearlyBreakdownRow, a3 as ExtraPaymentPayoffResult, a4 as FilePermissions, a5 as FormatOptions, a6 as FreelancerRateInput, a7 as FreelancerRateResult, a8 as GPA_GRADE_POINTS, a9 as GpaCourse, aa as GpaCourseResult, ab as GpaResult, ac as IbanValidationResult, ad as IpConversion, ae as IsbnFormat, af as IsbnResult, ag as LoanBalanceInput, ah as LoanBalanceResult, ai as LoanResult, aj as MarginMarkupField, ak as MarginMarkupInput, al as MarginMarkupResult, am as MovingAveragePoint, an as MovingAverageResult, ao as NotationStyle, ap as NumberBase, aq as PaybackPeriodInput, ar as PaybackPeriodResult, as as PercentChangeDirection, at as PercentageChangeResult, au as Permission, av as PxConvertResult, aw as RoiInput, ax as RoiResult, ay as RuleOf72Direction, az as RuleOf72Result, aA as SavingsGoalInput, aB as SavingsGoalMode, aC as SavingsGoalResult, aD as SemverVersion, aE as SimpleInterestResult, aF as SubnetInfo, aG as SuccessiveDiscountResult, aH as SuccessiveDiscountStep, aI as TaxDirection, aJ as TaxResult, aK as TimeValueDirection, aL as TimeValueResult, aM as TipSplitResult, aN as USD_DENOMINATIONS, aO as UnitPriceItem, aP as UnitPriceResult, aQ as UtilizationTier, aR as VideoBitrateInput, aS as VideoBitrateMode, aT as VideoBitrateResult, aU as ViewportConvertResult, aV as applySuccessiveDiscounts, aW as autoFormat, aX as bumpVersion, aY as calcAspectRatio, aZ as calcSubnet, a_ as calculateBlendedLoanRate, a$ as calculateBreakEven, b0 as calculateCashBreakdown, b1 as calculateCashRounding, b2 as calculateCdMaturity, b3 as calculateChange, b4 as calculateCompoundInterest, b5 as calculateCreditUtilization, b6 as calculateDebtToIncomeRatio, b7 as calculateDepreciationSchedule, b8 as calculateDiscount, b9 as calculateEmi, ba as calculateExtraPaymentPayoff, bb as calculateFreelancerRate, bc as calculateGpa, bd as calculateLoan, be as calculateMarginMarkup, bf as calculateMovingAverages, bg as calculatePaybackPeriod, bh as calculatePercentageChange, bi as calculateRoi, bj as calculateRuleOf72, bk as calculateSavingsGoal, bl as calculateSimpleInterest, bm as calculateTax, bn as calculateTimeValue, bo as calculateTipSplit, bp as calculateVideoBitrate, bq as compareSemver, br as compareUnitPrices, bs as convert, bt as convertAprApy, bu as convertBytes, bv as convertIp, bw as coverBox, bx as decimalToIp, by as decimalToIpCidr, bz as describePermissions, bA as fitIntoBox, bB as formatNumber, bC as formatValue, bD as formatVwValue, bE as formatWithSeparator, bF as gcd, bG as ipFromBinary, bH as ipFromDecimal, bI as ipFromHex, bJ as ipToBinary, bK as ipToDecimal, bL as ipToDecimalCidr, bM as ipToHex, bN as ipToOctal, bO as isValid, bP as isValidCidr, bQ as isValidIp, bR as isValidIpv4, bS as marginToMarkup, bT as markupToMargin, bU as octalToPermissions, bV as parseFileSize, bW as parseInput, bX as parseNumberString, bY as parseSemver, bZ as permissionsToChmod, b_ as permissionsToOctal, b$ as permissionsToSymbolic, c0 as planDebtPayoff, c1 as ptToPx, c2 as pxToAll, c3 as pxToViewport, c4 as remToPx, c5 as satisfiesRange, c6 as scaleByHeight, c7 as scaleByWidth, c8 as sortVersions, c9 as splitSubnet, ca as symbolicToPermissions, cb as validateBarcode, cc as validateCardNumber, cd as validateIban, ce as validateIsbn, cf as viewportToPx } from '../units-CLJ16Zzv.cjs';
|
package/dist/tools/units.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BlendedLoanRateResult, j as BreakEvenInput, k as BreakEvenResult, l as ByteConvertResult, m as ByteUnit, C as COMMON_CURRENCIES, n as COMMON_LOCALES, o as COMMON_PERMISSIONS, p as COMMON_RATIOS, q as COMMON_SIZES, r as COMMON_TAX_RATES, s as COMMON_TIP_PERCENTAGES, t as COMMON_VIEWPORTS, v as CardValidationResult, w as CashBreakdownResult, x as CashChangeResult, y as CashDenominationItem, z as CashRoundingMode, D as CashRoundingResult, E as CdMaturityResult, F as CompareUnitPricesResult, G as CompoundInterestResult, H as CompoundYearRow, I as CreditAccountInput, J as CreditAccountResult, K as CreditUtilizationResult, L as DebtItemInput, M as DebtItemResult, N as
|
|
1
|
+
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BlendedLoanRateResult, j as BreakEvenInput, k as BreakEvenResult, l as ByteConvertResult, m as ByteUnit, C as COMMON_CURRENCIES, n as COMMON_LOCALES, o as COMMON_PERMISSIONS, p as COMMON_RATIOS, q as COMMON_SIZES, r as COMMON_TAX_RATES, s as COMMON_TIP_PERCENTAGES, t as COMMON_VIEWPORTS, v as CardValidationResult, w as CashBreakdownResult, x as CashChangeResult, y as CashDenominationItem, z as CashRoundingMode, D as CashRoundingResult, E as CdMaturityResult, F as CompareUnitPricesResult, G as CompoundInterestResult, H as CompoundYearRow, I as CreditAccountInput, J as CreditAccountResult, K as CreditUtilizationResult, L as DebtItemInput, M as DebtItemResult, N as DebtPayoffComparison, O as DebtPayoffInput, P as DebtPayoffPlanResult, Q as DebtPayoffScheduleEntry, R as DebtPayoffStrategy, S as DebtPayoffStrategyResult, T as DebtToIncomeRatioResult, U as DepreciationMethod, V as DepreciationResult, W as DepreciationYear, X as Dimensions, Y as DiscountField, Z as DiscountInput, _ as DiscountResult, $ as DtiTier, a0 as EmiResult, a1 as EmiTenureUnit, a2 as EmiYearlyBreakdownRow, a3 as ExtraPaymentPayoffResult, a4 as FilePermissions, a5 as FormatOptions, a6 as FreelancerRateInput, a7 as FreelancerRateResult, a8 as GPA_GRADE_POINTS, a9 as GpaCourse, aa as GpaCourseResult, ab as GpaResult, ac as IbanValidationResult, ad as IpConversion, ae as IsbnFormat, af as IsbnResult, ag as LoanBalanceInput, ah as LoanBalanceResult, ai as LoanResult, aj as MarginMarkupField, ak as MarginMarkupInput, al as MarginMarkupResult, am as MovingAveragePoint, an as MovingAverageResult, ao as NotationStyle, ap as NumberBase, aq as PaybackPeriodInput, ar as PaybackPeriodResult, as as PercentChangeDirection, at as PercentageChangeResult, au as Permission, av as PxConvertResult, aw as RoiInput, ax as RoiResult, ay as RuleOf72Direction, az as RuleOf72Result, aA as SavingsGoalInput, aB as SavingsGoalMode, aC as SavingsGoalResult, aD as SemverVersion, aE as SimpleInterestResult, aF as SubnetInfo, aG as SuccessiveDiscountResult, aH as SuccessiveDiscountStep, aI as TaxDirection, aJ as TaxResult, aK as TimeValueDirection, aL as TimeValueResult, aM as TipSplitResult, aN as USD_DENOMINATIONS, aO as UnitPriceItem, aP as UnitPriceResult, aQ as UtilizationTier, aR as VideoBitrateInput, aS as VideoBitrateMode, aT as VideoBitrateResult, aU as ViewportConvertResult, aV as applySuccessiveDiscounts, aW as autoFormat, aX as bumpVersion, aY as calcAspectRatio, aZ as calcSubnet, a_ as calculateBlendedLoanRate, a$ as calculateBreakEven, b0 as calculateCashBreakdown, b1 as calculateCashRounding, b2 as calculateCdMaturity, b3 as calculateChange, b4 as calculateCompoundInterest, b5 as calculateCreditUtilization, b6 as calculateDebtToIncomeRatio, b7 as calculateDepreciationSchedule, b8 as calculateDiscount, b9 as calculateEmi, ba as calculateExtraPaymentPayoff, bb as calculateFreelancerRate, bc as calculateGpa, bd as calculateLoan, be as calculateMarginMarkup, bf as calculateMovingAverages, bg as calculatePaybackPeriod, bh as calculatePercentageChange, bi as calculateRoi, bj as calculateRuleOf72, bk as calculateSavingsGoal, bl as calculateSimpleInterest, bm as calculateTax, bn as calculateTimeValue, bo as calculateTipSplit, bp as calculateVideoBitrate, bq as compareSemver, br as compareUnitPrices, bs as convert, bt as convertAprApy, bu as convertBytes, bv as convertIp, bw as coverBox, bx as decimalToIp, by as decimalToIpCidr, bz as describePermissions, bA as fitIntoBox, bB as formatNumber, bC as formatValue, bD as formatVwValue, bE as formatWithSeparator, bF as gcd, bG as ipFromBinary, bH as ipFromDecimal, bI as ipFromHex, bJ as ipToBinary, bK as ipToDecimal, bL as ipToDecimalCidr, bM as ipToHex, bN as ipToOctal, bO as isValid, bP as isValidCidr, bQ as isValidIp, bR as isValidIpv4, bS as marginToMarkup, bT as markupToMargin, bU as octalToPermissions, bV as parseFileSize, bW as parseInput, bX as parseNumberString, bY as parseSemver, bZ as permissionsToChmod, b_ as permissionsToOctal, b$ as permissionsToSymbolic, c0 as planDebtPayoff, c1 as ptToPx, c2 as pxToAll, c3 as pxToViewport, c4 as remToPx, c5 as satisfiesRange, c6 as scaleByHeight, c7 as scaleByWidth, c8 as sortVersions, c9 as splitSubnet, ca as symbolicToPermissions, cb as validateBarcode, cc as validateCardNumber, cd as validateIban, ce as validateIsbn, cf as viewportToPx } from '../units-CLJ16Zzv.js';
|
package/dist/tools/units.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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, calculateBlendedLoanRate, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateExtraPaymentPayoff, calculateFreelancerRate, 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, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx } from '../chunk-
|
|
1
|
+
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, calculateBlendedLoanRate, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateExtraPaymentPayoff, calculateFreelancerRate, 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, planDebtPayoff, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx } from '../chunk-YTH76KAF.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|