@topolo/sdk 0.10.2 → 0.10.3
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/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -4299,7 +4299,7 @@ function sampleString(schema, hint) {
|
|
|
4299
4299
|
if (schema.format === "uri" || schema.format === "url") return "https://topolo.app";
|
|
4300
4300
|
if (schema.format === "date-time") return patternedString(schema.pattern || "", hint) || "2026-01-15T12:00:00Z";
|
|
4301
4301
|
const words = String(hint || "value").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").toLowerCase();
|
|
4302
|
-
let value = typeof schema.pattern === "string" ? patternedString(schema.pattern, hint) : /(^|\s)id$/.test(words) ? `${slugify(words.replace(/\sid$/, "") || "resource")}_01` : words.includes("date") ? "2026-01-15" : words.includes("period") || words.includes("month") ? "2026-01" : words.includes("year") ? "2026" : `Sample ${words}`;
|
|
4302
|
+
let value = typeof schema.pattern === "string" ? patternedString(schema.pattern, hint) : words === "workspace" ? "ws_example" : /(^|\s)id$/.test(words) ? `${slugify(words.replace(/\sid$/, "") || "resource")}_01` : words.includes("date") ? "2026-01-15" : words.includes("period") || words.includes("month") ? "2026-01" : words.includes("year") ? "2026" : `Sample ${words}`;
|
|
4303
4303
|
const minimum = Number.isInteger(schema.minLength) ? schema.minLength : 0;
|
|
4304
4304
|
const maximum = Number.isInteger(schema.maxLength) ? schema.maxLength : null;
|
|
4305
4305
|
if (value.length < minimum) value = value.padEnd(minimum, "x");
|
package/dist/index.js
CHANGED
|
@@ -4223,7 +4223,7 @@ function sampleString(schema, hint) {
|
|
|
4223
4223
|
if (schema.format === "uri" || schema.format === "url") return "https://topolo.app";
|
|
4224
4224
|
if (schema.format === "date-time") return patternedString(schema.pattern || "", hint) || "2026-01-15T12:00:00Z";
|
|
4225
4225
|
const words = String(hint || "value").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").toLowerCase();
|
|
4226
|
-
let value = typeof schema.pattern === "string" ? patternedString(schema.pattern, hint) : /(^|\s)id$/.test(words) ? `${slugify(words.replace(/\sid$/, "") || "resource")}_01` : words.includes("date") ? "2026-01-15" : words.includes("period") || words.includes("month") ? "2026-01" : words.includes("year") ? "2026" : `Sample ${words}`;
|
|
4226
|
+
let value = typeof schema.pattern === "string" ? patternedString(schema.pattern, hint) : words === "workspace" ? "ws_example" : /(^|\s)id$/.test(words) ? `${slugify(words.replace(/\sid$/, "") || "resource")}_01` : words.includes("date") ? "2026-01-15" : words.includes("period") || words.includes("month") ? "2026-01" : words.includes("year") ? "2026" : `Sample ${words}`;
|
|
4227
4227
|
const minimum = Number.isInteger(schema.minLength) ? schema.minLength : 0;
|
|
4228
4228
|
const maximum = Number.isInteger(schema.maxLength) ? schema.maxLength : null;
|
|
4229
4229
|
if (value.length < minimum) value = value.padEnd(minimum, "x");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topolo/sdk",
|
|
3
|
-
"version": "0.10.
|
|
4
|
-
"topoloPublishedVersion": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
4
|
+
"topoloPublishedVersion": "0.10.3",
|
|
5
5
|
"description": "Typed client SDK for the Topolo platform. Used by TopoloCli, TopoloMCP, and third-party agents.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|