@scalar/snippetz 0.6.4 → 0.6.6
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.
|
@@ -6,7 +6,7 @@ const pythonHttpxAsync = {
|
|
|
6
6
|
generate(request, configuration) {
|
|
7
7
|
let formattedReq = requestsLikeGenerate("await client", request, configuration);
|
|
8
8
|
formattedReq = formattedReq.split("\n").map((line) => line.trim() === "" ? line : " " + line).join("\n");
|
|
9
|
-
return `with httpx.AsyncClient() as client:
|
|
9
|
+
return `async with httpx.AsyncClient() as client:
|
|
10
10
|
${formattedReq}`;
|
|
11
11
|
}
|
|
12
12
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/plugins/python/httpx/async.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Plugin } from '@scalar/types/snippetz'\n\nimport { requestsLikeGenerate } from '@/plugins/python/requestsLike'\n\n/**\n * python/httpx_async\n */\nexport const pythonHttpxAsync: Plugin = {\n target: 'python',\n client: 'httpx_async',\n title: 'HTTPX (Async)',\n generate(request, configuration) {\n let formattedReq = requestsLikeGenerate('await client', request, configuration)\n // add indent\n formattedReq = formattedReq\n .split('\\n')\n .map((line) => (line.trim() === '' ? line : ' ' + line))\n .join('\\n')\n\n return `with httpx.AsyncClient() as client:\\n${formattedReq}`\n },\n}\n"],
|
|
5
|
-
"mappings": "AAEA,SAAS,4BAA4B;AAK9B,MAAM,mBAA2B;AAAA,EACtC,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,SAAS,SAAS,eAAe;AAC/B,QAAI,eAAe,qBAAqB,gBAAgB,SAAS,aAAa;AAE9E,mBAAe,aACZ,MAAM,IAAI,EACV,IAAI,CAAC,SAAU,KAAK,KAAK,MAAM,KAAK,OAAO,SAAS,IAAK,EACzD,KAAK,IAAI;AAEZ,WAAO;AAAA,
|
|
4
|
+
"sourcesContent": ["import type { Plugin } from '@scalar/types/snippetz'\n\nimport { requestsLikeGenerate } from '@/plugins/python/requestsLike'\n\n/**\n * python/httpx_async\n */\nexport const pythonHttpxAsync: Plugin = {\n target: 'python',\n client: 'httpx_async',\n title: 'HTTPX (Async)',\n generate(request, configuration) {\n let formattedReq = requestsLikeGenerate('await client', request, configuration)\n // add indent\n formattedReq = formattedReq\n .split('\\n')\n .map((line) => (line.trim() === '' ? line : ' ' + line))\n .join('\\n')\n\n return `async with httpx.AsyncClient() as client:\\n${formattedReq}`\n },\n}\n"],
|
|
5
|
+
"mappings": "AAEA,SAAS,4BAA4B;AAK9B,MAAM,mBAA2B;AAAA,EACtC,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,SAAS,SAAS,eAAe;AAC/B,QAAI,eAAe,qBAAqB,gBAAgB,SAAS,aAAa;AAE9E,mBAAe,aACZ,MAAM,IAAI,EACV,IAAI,CAAC,SAAU,KAAK,KAAK,MAAM,KAAK,OAAO,SAAS,IAAK,EACzD,KAAK,IAAI;AAEZ,WAAO;AAAA,EAA8C,YAAY;AAAA,EACnE;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"url": "git+https://github.com/scalar/scalar.git",
|
|
10
10
|
"directory": "packages/snippetz"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.6.
|
|
12
|
+
"version": "0.6.6",
|
|
13
13
|
"engines": {
|
|
14
14
|
"node": ">=20"
|
|
15
15
|
},
|
|
@@ -230,11 +230,11 @@
|
|
|
230
230
|
"dependencies": {
|
|
231
231
|
"js-base64": "^3.7.8",
|
|
232
232
|
"stringify-object": "^5.0.0",
|
|
233
|
-
"@scalar/types": "0.5.
|
|
233
|
+
"@scalar/types": "0.5.8"
|
|
234
234
|
},
|
|
235
235
|
"devDependencies": {
|
|
236
236
|
"@types/stringify-object": "^4.0.5",
|
|
237
|
-
"vite": "7.1
|
|
237
|
+
"vite": "^7.3.1",
|
|
238
238
|
"@scalar/build-tooling": "0.4.1"
|
|
239
239
|
},
|
|
240
240
|
"scripts": {
|