@dyrected/sdk 2.5.27 → 2.5.29
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 +5 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1237,6 +1237,11 @@ var DyrectedClient = class {
|
|
|
1237
1237
|
if (res && typeof res.ok === "boolean") {
|
|
1238
1238
|
if (!res.ok) {
|
|
1239
1239
|
const body = await res.json().catch(() => ({ message: "Unknown error" }));
|
|
1240
|
+
if (res.status === 429 && typeof window !== "undefined") {
|
|
1241
|
+
window.dispatchEvent(new CustomEvent("dyrected:rate-limit", {
|
|
1242
|
+
detail: { message: body.message, code: body.code }
|
|
1243
|
+
}));
|
|
1244
|
+
}
|
|
1240
1245
|
throw new DyrectedError(body.message || `Request failed with status ${res.status}`, res.status, body.code);
|
|
1241
1246
|
}
|
|
1242
1247
|
return res.json();
|
package/dist/index.d.cts
CHANGED
|
@@ -31,6 +31,7 @@ interface SetupPromptConfig {
|
|
|
31
31
|
baseUrl?: string;
|
|
32
32
|
isSelfHosted?: boolean;
|
|
33
33
|
existingSite?: boolean;
|
|
34
|
+
defaultTechStack?: string;
|
|
34
35
|
}
|
|
35
36
|
declare function generateFreshSetupPrompt(activeTab: "next" | "nuxt" | "react" | "vue", config: SetupPromptConfig): string;
|
|
36
37
|
declare function generateAIPrompt(activeTab: "next" | "nuxt" | "react" | "vue", config: SetupPromptConfig): string;
|
package/dist/index.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ interface SetupPromptConfig {
|
|
|
31
31
|
baseUrl?: string;
|
|
32
32
|
isSelfHosted?: boolean;
|
|
33
33
|
existingSite?: boolean;
|
|
34
|
+
defaultTechStack?: string;
|
|
34
35
|
}
|
|
35
36
|
declare function generateFreshSetupPrompt(activeTab: "next" | "nuxt" | "react" | "vue", config: SetupPromptConfig): string;
|
|
36
37
|
declare function generateAIPrompt(activeTab: "next" | "nuxt" | "react" | "vue", config: SetupPromptConfig): string;
|
package/dist/index.js
CHANGED
|
@@ -1207,6 +1207,11 @@ var DyrectedClient = class {
|
|
|
1207
1207
|
if (res && typeof res.ok === "boolean") {
|
|
1208
1208
|
if (!res.ok) {
|
|
1209
1209
|
const body = await res.json().catch(() => ({ message: "Unknown error" }));
|
|
1210
|
+
if (res.status === 429 && typeof window !== "undefined") {
|
|
1211
|
+
window.dispatchEvent(new CustomEvent("dyrected:rate-limit", {
|
|
1212
|
+
detail: { message: body.message, code: body.code }
|
|
1213
|
+
}));
|
|
1214
|
+
}
|
|
1210
1215
|
throw new DyrectedError(body.message || `Request failed with status ${res.status}`, res.status, body.code);
|
|
1211
1216
|
}
|
|
1212
1217
|
return res.json();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dyrected/sdk",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.29",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"tsup": "^8.5.1",
|
|
31
31
|
"typescript": "^5.4.5",
|
|
32
32
|
"vitest": "^1.0.0",
|
|
33
|
-
"@dyrected/core": "2.5.
|
|
33
|
+
"@dyrected/core": "2.5.29"
|
|
34
34
|
},
|
|
35
35
|
"license": "BSL-1.1",
|
|
36
36
|
"author": "Busola Okeowo <busolaokemoney@gmail.com>",
|