@lepsto/sdk-app 85.0.1 → 87.1.0
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/{chunk-HRKHYP5B.js → chunk-EMK3O6JA.js} +4 -4
- package/dist/{chunk-HRKHYP5B.js.map → chunk-EMK3O6JA.js.map} +1 -1
- package/dist/index.cjs +12 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/dist/playground/index.cjs.map +1 -1
- package/dist/playground/index.js +1 -1
- package/docs/recipes/sdk-usage.md +4 -3
- package/package.json +3 -2
- package/src/gen/bindings.gen.ts +2 -2
- package/src/gen/manifest.gen.ts +2 -2
package/dist/index.cjs
CHANGED
|
@@ -35,11 +35,15 @@ function isAccessDenied(err) {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
// src/runtime/csrf.ts
|
|
38
|
-
var
|
|
38
|
+
var CSRF_COOKIES = ["lepsto_csrf", "lessly_csrf"];
|
|
39
39
|
function readCsrfCookie() {
|
|
40
40
|
if (typeof document === "undefined" || !document) return null;
|
|
41
|
-
const
|
|
42
|
-
|
|
41
|
+
for (const name of CSRF_COOKIES) {
|
|
42
|
+
const match = document.cookie.match(new RegExp(`(?:^|; )${name}=([^;]*)`));
|
|
43
|
+
const value = match ? decodeURIComponent(match[1]) : "";
|
|
44
|
+
if (value) return value;
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
// src/runtime/request.ts
|
|
@@ -125,7 +129,7 @@ async function executeRequest(opts, binding, input) {
|
|
|
125
129
|
throw new LesslyApiError(
|
|
126
130
|
0,
|
|
127
131
|
"csrf_cookie_missing",
|
|
128
|
-
`CSRF cookie "lessly_csrf" is missing; the session must be re-established before mutating requests (${binding.method} ${binding.path}).`,
|
|
132
|
+
`CSRF cookie "lepsto_csrf" (or the legacy "lessly_csrf") is missing; the session must be re-established before mutating requests (${binding.method} ${binding.path}).`,
|
|
129
133
|
null
|
|
130
134
|
);
|
|
131
135
|
}
|
|
@@ -11260,7 +11264,7 @@ var bindings = {
|
|
|
11260
11264
|
"readOnly": true
|
|
11261
11265
|
},
|
|
11262
11266
|
"set": {
|
|
11263
|
-
"level": "
|
|
11267
|
+
"level": "admin",
|
|
11264
11268
|
"method": "POST",
|
|
11265
11269
|
"operationKey": "workflow_killswitch_set",
|
|
11266
11270
|
"params": [
|
|
@@ -11570,7 +11574,7 @@ var bindings = {
|
|
|
11570
11574
|
},
|
|
11571
11575
|
"wait-list": {
|
|
11572
11576
|
"all": {
|
|
11573
|
-
"level": "
|
|
11577
|
+
"level": "admin",
|
|
11574
11578
|
"method": "GET",
|
|
11575
11579
|
"operationKey": "workflow_wait_list_all",
|
|
11576
11580
|
"params": [
|
|
@@ -12192,7 +12196,7 @@ var operations = {
|
|
|
12192
12196
|
"workflow_health_list": "read",
|
|
12193
12197
|
"workflow_health_ping": "read",
|
|
12194
12198
|
"workflow_killswitch_get": "read",
|
|
12195
|
-
"workflow_killswitch_set": "
|
|
12199
|
+
"workflow_killswitch_set": "admin",
|
|
12196
12200
|
"workflow_run_cancel": "write",
|
|
12197
12201
|
"workflow_run_get": "read",
|
|
12198
12202
|
"workflow_run_list": "read",
|
|
@@ -12207,7 +12211,7 @@ var operations = {
|
|
|
12207
12211
|
"workflow_version_list": "read",
|
|
12208
12212
|
"workflow_wait_get": "read",
|
|
12209
12213
|
"workflow_wait_list": "read",
|
|
12210
|
-
"workflow_wait_list_all": "
|
|
12214
|
+
"workflow_wait_list_all": "admin",
|
|
12211
12215
|
"workflow_wait_resolve": "write"
|
|
12212
12216
|
};
|
|
12213
12217
|
var compositions = {
|