veryfront 0.1.1090 → 0.1.1091
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/esm/deno.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-tools.d.ts","sourceRoot":"","sources":["../../../src/src/integrations/remote-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAYH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAsBvD,KAAK,qCAAqC,GAAG;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;
|
|
1
|
+
{"version":3,"file":"remote-tools.d.ts","sourceRoot":"","sources":["../../../src/src/integrations/remote-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAYH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAsBvD,KAAK,qCAAqC,GAAG;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAwKF;;;;;;;GAOG;AACH,wBAAsB,mCAAmC,IAAI,OAAO,CAClE,cAAc,EAAE,CACjB,CAwBA;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEjE;AAED;;;GAGG;AACH,wBAAsB,4BAA4B,CAChD,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,CAAC,EAAE,qCAAqC,GAC9C,OAAO,CAAC,OAAO,CAAC,CA4BlB"}
|
|
@@ -40,6 +40,14 @@ function resolveRequestToken() {
|
|
|
40
40
|
const environmentToken = getApiTokenEnv();
|
|
41
41
|
return isValidApiToken(environmentToken) ? environmentToken : undefined;
|
|
42
42
|
}
|
|
43
|
+
function normalizeProjectSlug(projectSlug) {
|
|
44
|
+
const normalized = projectSlug?.trim();
|
|
45
|
+
return normalized || undefined;
|
|
46
|
+
}
|
|
47
|
+
function resolveRequestProjectSlug() {
|
|
48
|
+
const requestProjectSlug = normalizeProjectSlug(getCurrentRequestContext()?.projectSlug);
|
|
49
|
+
return requestProjectSlug ?? normalizeProjectSlug(getEnvironmentConfig().projectSlug);
|
|
50
|
+
}
|
|
43
51
|
// ---------------------------------------------------------------------------
|
|
44
52
|
// API communication
|
|
45
53
|
// ---------------------------------------------------------------------------
|
|
@@ -81,11 +89,13 @@ function isToolListResponse(value) {
|
|
|
81
89
|
* (a retried call could re-send an email or re-create a record).
|
|
82
90
|
*/
|
|
83
91
|
async function postIntegrationApi(baseUrl, path, token, body) {
|
|
92
|
+
const projectSlug = resolveRequestProjectSlug();
|
|
84
93
|
return await fetch(`${baseUrl}${path}`, {
|
|
85
94
|
method: "POST",
|
|
86
95
|
headers: {
|
|
87
96
|
Authorization: `Bearer ${token}`,
|
|
88
97
|
"Content-Type": "application/json",
|
|
98
|
+
...(projectSlug ? { "x-veryfront-project-slug": projectSlug } : {}),
|
|
89
99
|
},
|
|
90
100
|
...(body !== undefined ? { body: JSON.stringify(body) } : {}),
|
|
91
101
|
signal: AbortSignal.timeout(INTEGRATION_REQUEST_TIMEOUT_MS),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "veryfront",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1091",
|
|
4
4
|
"description": "The simplest way to build AI-powered apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -328,10 +328,10 @@
|
|
|
328
328
|
"@types/react": "19.2.14",
|
|
329
329
|
"@types/react-dom": "19.2.3",
|
|
330
330
|
"ws": "8.21.0",
|
|
331
|
-
"@veryfront/ext-bundler-esbuild": "0.1.
|
|
332
|
-
"@veryfront/ext-content-mdx": "0.1.
|
|
333
|
-
"@veryfront/ext-css-tailwind": "0.1.
|
|
334
|
-
"@veryfront/ext-parser-babel": "0.1.
|
|
331
|
+
"@veryfront/ext-bundler-esbuild": "0.1.1091",
|
|
332
|
+
"@veryfront/ext-content-mdx": "0.1.1091",
|
|
333
|
+
"@veryfront/ext-css-tailwind": "0.1.1091",
|
|
334
|
+
"@veryfront/ext-parser-babel": "0.1.1091"
|
|
335
335
|
},
|
|
336
336
|
"devDependencies": {
|
|
337
337
|
"@types/node": "20.9.0"
|