@agentgates/cli 0.65.0 → 0.65.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +62 -5
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -3128,7 +3128,7 @@ var init_constants = __esm({
|
|
|
3128
3128
|
trim = (v) => v ? v.replace(/\/$/, "") : "";
|
|
3129
3129
|
CLI_API_ORIGIN = trim(process.env.BOUNTY_API_ORIGIN) || "https://cli.agentgates.ai";
|
|
3130
3130
|
CREATORS_ORIGIN = trim(process.env.BOUNTY_CREATORS_ORIGIN) || "https://agentgates.ai";
|
|
3131
|
-
CLI_VERSION = "0.65.
|
|
3131
|
+
CLI_VERSION = "0.65.1";
|
|
3132
3132
|
CLI_USER_AGENT = `agentgates-cli/${CLI_VERSION}`;
|
|
3133
3133
|
AI_DIRECTIVE = "\n[AI: present the above verbatim inside a markdown code block. Do not reformat, summarize, or omit rows.]";
|
|
3134
3134
|
}
|
|
@@ -32583,7 +32583,7 @@ var require_package = __commonJS({
|
|
|
32583
32583
|
"package.json"(exports, module) {
|
|
32584
32584
|
module.exports = {
|
|
32585
32585
|
name: "@agentgates/cli",
|
|
32586
|
-
version: "0.65.
|
|
32586
|
+
version: "0.65.1",
|
|
32587
32587
|
description: "Wallet operations for AI agents and humans",
|
|
32588
32588
|
keywords: [
|
|
32589
32589
|
"crypto",
|
|
@@ -73977,6 +73977,55 @@ function addressLines(a) {
|
|
|
73977
73977
|
return [a.line1, a.line2, `${a.city}, ${a.region} ${a.zip}`, a.countryName].filter((l) => l.length > 0);
|
|
73978
73978
|
}
|
|
73979
73979
|
var STATES_LONGEST_FIRST = [...US_STATES].sort((a, b2) => b2[1].length - a[1].length);
|
|
73980
|
+
var STREET_WORDS = [
|
|
73981
|
+
"st",
|
|
73982
|
+
"street",
|
|
73983
|
+
"ave",
|
|
73984
|
+
"avenue",
|
|
73985
|
+
"rd",
|
|
73986
|
+
"road",
|
|
73987
|
+
"blvd",
|
|
73988
|
+
"boulevard",
|
|
73989
|
+
"dr",
|
|
73990
|
+
"drive",
|
|
73991
|
+
"ln",
|
|
73992
|
+
"lane",
|
|
73993
|
+
"way",
|
|
73994
|
+
"ct",
|
|
73995
|
+
"court",
|
|
73996
|
+
"pl",
|
|
73997
|
+
"place",
|
|
73998
|
+
"ter",
|
|
73999
|
+
"terrace",
|
|
74000
|
+
"pkwy",
|
|
74001
|
+
"parkway",
|
|
74002
|
+
"hwy",
|
|
74003
|
+
"highway",
|
|
74004
|
+
"cir",
|
|
74005
|
+
"circle",
|
|
74006
|
+
"sq",
|
|
74007
|
+
"square",
|
|
74008
|
+
"trl",
|
|
74009
|
+
"trail",
|
|
74010
|
+
"loop",
|
|
74011
|
+
"row",
|
|
74012
|
+
"aly",
|
|
74013
|
+
"alley",
|
|
74014
|
+
"plz",
|
|
74015
|
+
"plaza",
|
|
74016
|
+
"pike",
|
|
74017
|
+
"xing",
|
|
74018
|
+
"crossing"
|
|
74019
|
+
];
|
|
74020
|
+
function streetEnd(rest) {
|
|
74021
|
+
const word = /\b([A-Za-z]+)\.?(\s+(?:(?:apt|apartment|unit|suite|ste|fl|floor|rm|room|bldg)\.?\s*#?\s*[\w-]+|#\s*[\w-]+))?\s+(?=\S)/gi;
|
|
74022
|
+
let end = null;
|
|
74023
|
+
let m;
|
|
74024
|
+
while ((m = word.exec(rest)) !== null) {
|
|
74025
|
+
if (STREET_WORDS.includes(m[1].toLowerCase())) end = m.index + m[0].length;
|
|
74026
|
+
}
|
|
74027
|
+
return end;
|
|
74028
|
+
}
|
|
73980
74029
|
function takeState(rest) {
|
|
73981
74030
|
const lower = rest.toLowerCase();
|
|
73982
74031
|
for (const [code, name] of STATES_LONGEST_FIRST) {
|
|
@@ -74000,9 +74049,17 @@ function parseHomeAddress(line2) {
|
|
|
74000
74049
|
if (!state) return { ok: false, why: `Add the state. ${shape}` };
|
|
74001
74050
|
rest = state.before.replace(/[,\s]+$/, "");
|
|
74002
74051
|
const comma = rest.lastIndexOf(",");
|
|
74003
|
-
|
|
74004
|
-
|
|
74005
|
-
|
|
74052
|
+
let city;
|
|
74053
|
+
let parts;
|
|
74054
|
+
if (comma >= 0) {
|
|
74055
|
+
city = rest.slice(comma + 1).trim();
|
|
74056
|
+
parts = rest.slice(0, comma).split(",").map((p) => p.trim()).filter(Boolean);
|
|
74057
|
+
} else {
|
|
74058
|
+
const cut = streetEnd(rest);
|
|
74059
|
+
if (cut === null) return { ok: false, why: shape };
|
|
74060
|
+
city = rest.slice(cut).trim();
|
|
74061
|
+
parts = [rest.slice(0, cut).trim()];
|
|
74062
|
+
}
|
|
74006
74063
|
if (!city || parts.length === 0) return { ok: false, why: shape };
|
|
74007
74064
|
let line1 = parts[0];
|
|
74008
74065
|
let line22 = parts.slice(1).join(", ");
|