Regenerate the contracts' TypeScript: the key parsers name their parameter apart from the parts (issue 1966)
Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
@@ -60,16 +60,16 @@ export function haveByNodeModuleKey(node: string, module: string): string {
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<node>.<module>", or undefined for a key of another form. */
|
||||
export function parseHaveByNodeModuleKey(key: string): { node: string; module: string } | undefined {
|
||||
let rest = key;
|
||||
const at0 = rest.indexOf(".");
|
||||
if (at0 <= 0) return undefined;
|
||||
const node = rest.slice(0, at0);
|
||||
rest = rest.slice(at0 + 1);
|
||||
if (rest === "") return undefined;
|
||||
const module = rest;
|
||||
rest = "";
|
||||
if (rest !== "") return undefined;
|
||||
export function parseHaveByNodeModuleKey(_key: string): { node: string; module: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const node = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const module = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { node, module };
|
||||
}
|
||||
|
||||
@@ -79,13 +79,13 @@ export function haveByNodeNodeKey(node: string): string {
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<node>.node", or undefined for a key of another form. */
|
||||
export function parseHaveByNodeNodeKey(key: string): { node: string } | undefined {
|
||||
let rest = key;
|
||||
const at0 = rest.indexOf(".node");
|
||||
if (at0 <= 0) return undefined;
|
||||
const node = rest.slice(0, at0);
|
||||
rest = rest.slice(at0 + 5);
|
||||
if (rest !== "") return undefined;
|
||||
export function parseHaveByNodeNodeKey(_key: string): { node: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".node");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const node = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 5);
|
||||
if (_rest !== "") return undefined;
|
||||
return { node };
|
||||
}
|
||||
|
||||
@@ -95,20 +95,20 @@ export function composedByNodeModuleFingerprintKey(node: string, module: string,
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<node>.<module>.<fingerprint>", or undefined for a key of another form. */
|
||||
export function parseComposedByNodeModuleFingerprintKey(key: string): { node: string; module: string; fingerprint: string } | undefined {
|
||||
let rest = key;
|
||||
const at0 = rest.indexOf(".");
|
||||
if (at0 <= 0) return undefined;
|
||||
const node = rest.slice(0, at0);
|
||||
rest = rest.slice(at0 + 1);
|
||||
const at2 = rest.indexOf(".");
|
||||
if (at2 <= 0) return undefined;
|
||||
const module = rest.slice(0, at2);
|
||||
rest = rest.slice(at2 + 1);
|
||||
if (rest === "") return undefined;
|
||||
const fingerprint = rest;
|
||||
rest = "";
|
||||
if (rest !== "") return undefined;
|
||||
export function parseComposedByNodeModuleFingerprintKey(_key: string): { node: string; module: string; fingerprint: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const node = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
const _at2 = _rest.indexOf(".");
|
||||
if (_at2 <= 0) return undefined;
|
||||
const module = _rest.slice(0, _at2);
|
||||
_rest = _rest.slice(_at2 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const fingerprint = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { node, module, fingerprint };
|
||||
}
|
||||
|
||||
@@ -118,13 +118,13 @@ export function composedByNodeNodeKey(node: string): string {
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<node>.node", or undefined for a key of another form. */
|
||||
export function parseComposedByNodeNodeKey(key: string): { node: string } | undefined {
|
||||
let rest = key;
|
||||
const at0 = rest.indexOf(".node");
|
||||
if (at0 <= 0) return undefined;
|
||||
const node = rest.slice(0, at0);
|
||||
rest = rest.slice(at0 + 5);
|
||||
if (rest !== "") return undefined;
|
||||
export function parseComposedByNodeNodeKey(_key: string): { node: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".node");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const node = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 5);
|
||||
if (_rest !== "") return undefined;
|
||||
return { node };
|
||||
}
|
||||
|
||||
@@ -134,16 +134,16 @@ export function dataByNodeModuleKey(node: string, module: string): string {
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<node>.<module>", or undefined for a key of another form. */
|
||||
export function parseDataByNodeModuleKey(key: string): { node: string; module: string } | undefined {
|
||||
let rest = key;
|
||||
const at0 = rest.indexOf(".");
|
||||
if (at0 <= 0) return undefined;
|
||||
const node = rest.slice(0, at0);
|
||||
rest = rest.slice(at0 + 1);
|
||||
if (rest === "") return undefined;
|
||||
const module = rest;
|
||||
rest = "";
|
||||
if (rest !== "") return undefined;
|
||||
export function parseDataByNodeModuleKey(_key: string): { node: string; module: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const node = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const module = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { node, module };
|
||||
}
|
||||
|
||||
@@ -153,12 +153,12 @@ export function packagesByNodeKey(node: string): string {
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<node>", or undefined for a key of another form. */
|
||||
export function parsePackagesByNodeKey(key: string): { node: string } | undefined {
|
||||
let rest = key;
|
||||
if (rest === "") return undefined;
|
||||
const node = rest;
|
||||
rest = "";
|
||||
if (rest !== "") return undefined;
|
||||
export function parsePackagesByNodeKey(_key: string): { node: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (_rest === "") return undefined;
|
||||
const node = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { node };
|
||||
}
|
||||
|
||||
@@ -168,12 +168,12 @@ export function healthByNodeKey(node: string): string {
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<node>", or undefined for a key of another form. */
|
||||
export function parseHealthByNodeKey(key: string): { node: string } | undefined {
|
||||
let rest = key;
|
||||
if (rest === "") return undefined;
|
||||
const node = rest;
|
||||
rest = "";
|
||||
if (rest !== "") return undefined;
|
||||
export function parseHealthByNodeKey(_key: string): { node: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (_rest === "") return undefined;
|
||||
const node = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { node };
|
||||
}
|
||||
|
||||
@@ -183,12 +183,12 @@ export function findingsByKeyKey(key: string): string {
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<key>", or undefined for a key of another form. */
|
||||
export function parseFindingsByKeyKey(key: string): { key: string } | undefined {
|
||||
let rest = key;
|
||||
if (rest === "") return undefined;
|
||||
const key = rest;
|
||||
rest = "";
|
||||
if (rest !== "") return undefined;
|
||||
export function parseFindingsByKeyKey(_key: string): { key: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (_rest === "") return undefined;
|
||||
const key = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { key };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user