@scalar/pre-post-request-scripts 0.3.9
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/CHANGELOG.md +1132 -0
- package/LICENSE +21 -0
- package/README.md +51 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/components/ViewLayout/ValueEmitter.vue.d.ts +32 -0
- package/dist/components/ViewLayout/ValueEmitter.vue.d.ts.map +1 -0
- package/dist/components/ViewLayout/ValueEmitter.vue.js +21 -0
- package/dist/components/ViewLayout/ValueEmitter.vue2.js +4 -0
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts +44 -0
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -0
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +89 -0
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue2.js +4 -0
- package/dist/components/ViewLayout/index.d.ts +2 -0
- package/dist/components/ViewLayout/index.d.ts.map +1 -0
- package/dist/consts/example-scripts.d.ts +13 -0
- package/dist/consts/example-scripts.d.ts.map +1 -0
- package/dist/consts/example-scripts.js +88 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/libs/execute-scripts/context/console.d.ts +11 -0
- package/dist/libs/execute-scripts/context/console.d.ts.map +1 -0
- package/dist/libs/execute-scripts/context/console.js +12 -0
- package/dist/libs/execute-scripts/execute-post-response-script.d.ts +12 -0
- package/dist/libs/execute-scripts/execute-post-response-script.d.ts.map +1 -0
- package/dist/libs/execute-scripts/execute-post-response-script.js +13 -0
- package/dist/libs/execute-scripts/index.d.ts +2 -0
- package/dist/libs/execute-scripts/index.d.ts.map +1 -0
- package/dist/libs/execute-scripts/index.js +4 -0
- package/dist/libs/execute-scripts/postman-sandbox-adapter.d.ts +9 -0
- package/dist/libs/execute-scripts/postman-sandbox-adapter.d.ts.map +1 -0
- package/dist/libs/execute-scripts/postman-sandbox-adapter.js +88 -0
- package/dist/plugins/post-response-scripts/components/PostResponseScripts/ExampleScripts.vue.d.ts +11 -0
- package/dist/plugins/post-response-scripts/components/PostResponseScripts/ExampleScripts.vue.d.ts.map +1 -0
- package/dist/plugins/post-response-scripts/components/PostResponseScripts/ExampleScripts.vue.js +32 -0
- package/dist/plugins/post-response-scripts/components/PostResponseScripts/ExampleScripts.vue2.js +4 -0
- package/dist/plugins/post-response-scripts/components/PostResponseScripts/PostResponseScripts.vue.d.ts +12 -0
- package/dist/plugins/post-response-scripts/components/PostResponseScripts/PostResponseScripts.vue.d.ts.map +1 -0
- package/dist/plugins/post-response-scripts/components/PostResponseScripts/PostResponseScripts.vue.js +53 -0
- package/dist/plugins/post-response-scripts/components/PostResponseScripts/PostResponseScripts.vue2.js +4 -0
- package/dist/plugins/post-response-scripts/components/PostResponseScripts/ScriptEditor.vue.d.ts +11 -0
- package/dist/plugins/post-response-scripts/components/PostResponseScripts/ScriptEditor.vue.d.ts.map +1 -0
- package/dist/plugins/post-response-scripts/components/PostResponseScripts/ScriptEditor.vue.js +7 -0
- package/dist/plugins/post-response-scripts/components/PostResponseScripts/ScriptEditor.vue2.js +33 -0
- package/dist/plugins/post-response-scripts/components/PostResponseScripts/index.d.ts +2 -0
- package/dist/plugins/post-response-scripts/components/PostResponseScripts/index.d.ts.map +1 -0
- package/dist/plugins/post-response-scripts/components/PostResponseScripts/index.js +4 -0
- package/dist/plugins/post-response-scripts/components/TestResults/TestResultIndicator.vue.d.ts +12 -0
- package/dist/plugins/post-response-scripts/components/TestResults/TestResultIndicator.vue.d.ts.map +1 -0
- package/dist/plugins/post-response-scripts/components/TestResults/TestResultIndicator.vue.js +48 -0
- package/dist/plugins/post-response-scripts/components/TestResults/TestResultIndicator.vue2.js +4 -0
- package/dist/plugins/post-response-scripts/components/TestResults/TestResultItem.vue.d.ts +9 -0
- package/dist/plugins/post-response-scripts/components/TestResults/TestResultItem.vue.d.ts.map +1 -0
- package/dist/plugins/post-response-scripts/components/TestResults/TestResultItem.vue.js +34 -0
- package/dist/plugins/post-response-scripts/components/TestResults/TestResultItem.vue2.js +4 -0
- package/dist/plugins/post-response-scripts/components/TestResults/TestResults.vue.d.ts +9 -0
- package/dist/plugins/post-response-scripts/components/TestResults/TestResults.vue.d.ts.map +1 -0
- package/dist/plugins/post-response-scripts/components/TestResults/TestResults.vue.js +68 -0
- package/dist/plugins/post-response-scripts/components/TestResults/TestResults.vue2.js +4 -0
- package/dist/plugins/post-response-scripts/components/TestResults/TestSummary.vue.d.ts +13 -0
- package/dist/plugins/post-response-scripts/components/TestResults/TestSummary.vue.d.ts.map +1 -0
- package/dist/plugins/post-response-scripts/components/TestResults/TestSummary.vue.js +32 -0
- package/dist/plugins/post-response-scripts/components/TestResults/TestSummary.vue2.js +4 -0
- package/dist/plugins/post-response-scripts/components/TestResults/index.d.ts +2 -0
- package/dist/plugins/post-response-scripts/components/TestResults/index.d.ts.map +1 -0
- package/dist/plugins/post-response-scripts/components/TestResults/index.js +4 -0
- package/dist/plugins/post-response-scripts/index.d.ts +2 -0
- package/dist/plugins/post-response-scripts/index.d.ts.map +1 -0
- package/dist/plugins/post-response-scripts/index.js +4 -0
- package/dist/plugins/post-response-scripts/post-response-scripts-plugin.d.ts +6 -0
- package/dist/plugins/post-response-scripts/post-response-scripts-plugin.d.ts.map +1 -0
- package/dist/plugins/post-response-scripts/post-response-scripts-plugin.js +65 -0
- package/dist/style.css +1 -0
- package/package.json +91 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023-present Scalar
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Scalar Scripts
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@scalar/pre-post-request-scripts)
|
|
4
|
+
[](https://www.npmjs.com/package/@scalar/pre-post-request-scripts)
|
|
5
|
+
[](https://www.npmjs.com/package/@scalar/pre-post-request-scripts)
|
|
6
|
+
[](https://discord.gg/scalar)
|
|
7
|
+
|
|
8
|
+
Post-response scripts for your OpenAPI documents.
|
|
9
|
+
|
|
10
|
+
Scripts are executed with the official Postman sandbox runtime (`postman-sandbox`), so the `pm` API behavior follows Postman semantics.
|
|
11
|
+
|
|
12
|
+
> Note: This is intended to be used as a plugin with @scalar/api-client.
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @scalar/pre-post-request-scripts
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import { createApiClientWeb } from '@scalar/api-client/layouts/Web'
|
|
24
|
+
import { postResponseScriptsPlugin } from '@scalar/pre-post-request-scripts'
|
|
25
|
+
import '@scalar/api-client/style.css'
|
|
26
|
+
|
|
27
|
+
createApiClientWeb(
|
|
28
|
+
document.getElementById('app'),
|
|
29
|
+
{
|
|
30
|
+
proxyUrl: 'https://proxy.scalar.com',
|
|
31
|
+
// Load the plugin
|
|
32
|
+
plugins: [
|
|
33
|
+
postResponseScriptsPlugin()
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Script Runtime
|
|
40
|
+
|
|
41
|
+
- Uses the official Postman sandbox package: <https://github.com/postmanlabs/postman-sandbox>
|
|
42
|
+
- Scripts run as Postman `test` scripts, so `pm.response`, `pm.test`, and `pm.expect` are provided by Postman
|
|
43
|
+
- Script results are surfaced in the Tests panel via the plugin
|
|
44
|
+
|
|
45
|
+
## Community
|
|
46
|
+
|
|
47
|
+
We are API nerds. You too? Let's chat on Discord: <https://discord.gg/scalar>
|
|
48
|
+
|
|
49
|
+
## License
|
|
50
|
+
|
|
51
|
+
The source code in this repository is licensed under [MIT](https://github.com/scalar/scalar/blob/main/LICENSE).
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This component takes in any value and emits it back
|
|
3
|
+
*
|
|
4
|
+
* This is useful when we need to catch the open state of a disclosure from its v-slot
|
|
5
|
+
*/
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
8
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
9
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
10
|
+
value: T;
|
|
11
|
+
} & {
|
|
12
|
+
onUnmount?: (() => any) | undefined;
|
|
13
|
+
onChange?: ((value: T) => any) | undefined;
|
|
14
|
+
}> & (typeof globalThis extends {
|
|
15
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
16
|
+
} ? P : {});
|
|
17
|
+
expose: (exposed: {}) => void;
|
|
18
|
+
attrs: any;
|
|
19
|
+
slots: {};
|
|
20
|
+
emit: {
|
|
21
|
+
(e: "change", value: T): void;
|
|
22
|
+
(e: "unmount"): void;
|
|
23
|
+
};
|
|
24
|
+
}>) => import("vue").VNode & {
|
|
25
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
26
|
+
};
|
|
27
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
28
|
+
[K in keyof T]: T[K];
|
|
29
|
+
} : {
|
|
30
|
+
[K in keyof T as K]: T[K];
|
|
31
|
+
}) & {};
|
|
32
|
+
//# sourceMappingURL=ValueEmitter.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValueEmitter.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ValueEmitter.vue"],"names":[],"mappings":"AAuCA;;;;GAIG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY,GAAK,CAAC,EACvB,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,gBAAgB,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EAClE;WAkCO,OAAO,KAAK,EAAE,WAAW,GAAG,mBAAmB,CAAC;eAjC5B,CAAC;;;;KAiC8D,CAAC,GAAG,CAAC,OAAO,UAAU,SAAS;QAAE,oBAAoB,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,CAAC,GAAG,EAAE,CAAC;YAC5J,CAAC,OAAO,EAAE,EAAE,KAAK,IAAI;WACtB,GAAG;WACH,EAAE;;YAhCJ,QAAQ,SAAS,CAAC,GAAG,IAAI;YACzB,SAAS,GAAG,IAAI;;EAkClB,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAI,CAAC;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,CAAC,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as m, watch as o, onBeforeUnmount as a } from "vue";
|
|
2
|
+
const r = {
|
|
3
|
+
name: "ValueEmitter"
|
|
4
|
+
}, s = /* @__PURE__ */ m({
|
|
5
|
+
...r,
|
|
6
|
+
props: {
|
|
7
|
+
value: {}
|
|
8
|
+
},
|
|
9
|
+
emits: ["change", "unmount"],
|
|
10
|
+
setup(n, { emit: u }) {
|
|
11
|
+
const e = u;
|
|
12
|
+
return o(
|
|
13
|
+
() => n.value,
|
|
14
|
+
(t) => e("change", t),
|
|
15
|
+
{ immediate: !0 }
|
|
16
|
+
), a(() => e("unmount")), (t, c) => null;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
s as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simple collapsible section component that can be used to wrap content that should be collapsed and expanded
|
|
3
|
+
*
|
|
4
|
+
* Would like to replace with details/summary elements, but they are not supported in all browsers yet?
|
|
5
|
+
*/
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
8
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
9
|
+
/** Whether the disclosure is open by default. */
|
|
10
|
+
defaultOpen?: boolean;
|
|
11
|
+
/** Number of items to show in badge when collapsed. */
|
|
12
|
+
itemCount?: number;
|
|
13
|
+
/** Whether the disclosure is static and cannot be toggled. */
|
|
14
|
+
isStatic?: boolean;
|
|
15
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
16
|
+
"update:modelValue": (value: boolean) => any;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
18
|
+
/** Whether the disclosure is open by default. */
|
|
19
|
+
defaultOpen?: boolean;
|
|
20
|
+
/** Number of items to show in badge when collapsed. */
|
|
21
|
+
itemCount?: number;
|
|
22
|
+
/** Whether the disclosure is static and cannot be toggled. */
|
|
23
|
+
isStatic?: boolean;
|
|
24
|
+
}> & Readonly<{
|
|
25
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
26
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
27
|
+
title?: (props: {
|
|
28
|
+
open: any;
|
|
29
|
+
}) => any;
|
|
30
|
+
} & {
|
|
31
|
+
actions?: (props: {
|
|
32
|
+
open: any;
|
|
33
|
+
}) => any;
|
|
34
|
+
} & {
|
|
35
|
+
default?: (props: {
|
|
36
|
+
open: any;
|
|
37
|
+
}) => any;
|
|
38
|
+
}>;
|
|
39
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=ViewLayoutCollapse.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewLayoutCollapse.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutCollapse.vue"],"names":[],"mappings":"AA2HA;;;;GAIG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY;IAEhB,iDAAiD;kBACnC,OAAO;IACrB,uDAAuD;gBAC3C,MAAM;IAClB,8DAA8D;eACnD,OAAO;;;;IALlB,iDAAiD;kBACnC,OAAO;IACrB,uDAAuD;gBAC3C,MAAM;IAClB,8DAA8D;eACnD,OAAO;;;;YAkPR,CAAC,KAAK;;KAAiB,KAAK,GAAG;;cAC7B,CAAC,KAAK;;KAAiB,KAAK,GAAG;;cAC/B,CAAC,KAAK;;KAAiB,KAAK,GAAG;EAUzC,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { defineComponent as y, useId as C, createBlock as p, openBlock as l, unref as s, normalizeClass as n, withCtx as c, createVNode as d, createElementVNode as a, createElementBlock as r, createCommentVNode as i, renderSlot as u, createTextVNode as S, toDisplayString as b, mergeProps as v } from "vue";
|
|
2
|
+
import { Disclosure as k, DisclosureButton as B, DisclosurePanel as V } from "@headlessui/vue";
|
|
3
|
+
import { ScalarIcon as $ } from "@scalar/components";
|
|
4
|
+
import w from "./ValueEmitter.vue.js";
|
|
5
|
+
const D = ["aria-labelledby"], I = { class: "text-c-1 m-0 flex flex-1 items-center gap-1.5 leading-[20px]" }, N = ["id"], O = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "sr-only"
|
|
8
|
+
}, z = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "bg-b-2 text-c-2 inline-flex h-5 w-5 items-center justify-center rounded-full border text-xs font-semibold"
|
|
11
|
+
}, E = { class: "sr-only" }, P = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "ui-not-open:hidden flex items-center gap-2 pr-0.75"
|
|
14
|
+
}, _ = {
|
|
15
|
+
name: "CollapsibleSection"
|
|
16
|
+
}, A = /* @__PURE__ */ y({
|
|
17
|
+
..._,
|
|
18
|
+
props: {
|
|
19
|
+
defaultOpen: { type: Boolean, default: !0 },
|
|
20
|
+
itemCount: { default: 0 },
|
|
21
|
+
isStatic: { type: Boolean }
|
|
22
|
+
},
|
|
23
|
+
emits: ["update:modelValue"],
|
|
24
|
+
setup(e, { emit: x }) {
|
|
25
|
+
const h = x, f = C();
|
|
26
|
+
return (o, m) => (l(), p(s(k), {
|
|
27
|
+
as: "div",
|
|
28
|
+
class: n(["group/collapse text-c-2 focus-within:text-c-1 last:ui-open:border-b-0 border-b", e.isStatic && "last-of-type:first-of-type:border-b-0"]),
|
|
29
|
+
defaultOpen: e.defaultOpen,
|
|
30
|
+
static: e.isStatic
|
|
31
|
+
}, {
|
|
32
|
+
default: c(({ open: t }) => [
|
|
33
|
+
d(w, {
|
|
34
|
+
value: t,
|
|
35
|
+
onChange: m[0] || (m[0] = (g) => h("update:modelValue", g))
|
|
36
|
+
}, null, 8, ["value"]),
|
|
37
|
+
a("section", {
|
|
38
|
+
"aria-labelledby": s(f),
|
|
39
|
+
class: "contents"
|
|
40
|
+
}, [
|
|
41
|
+
a("div", {
|
|
42
|
+
class: n(["bg-b-2 flex items-center", e.isStatic && "rounded-t-lg border border-b-0"])
|
|
43
|
+
}, [
|
|
44
|
+
d(s(B), {
|
|
45
|
+
class: n(["hover:text-c-1 group box-content flex max-h-8 flex-1 items-center gap-2.5 overflow-hidden px-1 py-1.5 text-base font-medium outline-none md:px-1.5 xl:pr-0.5 xl:pl-2", e.isStatic && "!pl-3"]),
|
|
46
|
+
disabled: e.isStatic
|
|
47
|
+
}, {
|
|
48
|
+
default: c(() => [
|
|
49
|
+
e.isStatic ? i("", !0) : (l(), p(s($), {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: "text-c-3 group-hover:text-c-1 rounded-px ui-open:rotate-90 ui-not-open:rotate-0 outline-offset-2 group-focus-visible:outline",
|
|
52
|
+
icon: "ChevronRight",
|
|
53
|
+
size: "md"
|
|
54
|
+
})),
|
|
55
|
+
a("h2", I, [
|
|
56
|
+
a("span", {
|
|
57
|
+
id: s(f),
|
|
58
|
+
class: "contents"
|
|
59
|
+
}, [
|
|
60
|
+
u(o.$slots, "title", { open: t }),
|
|
61
|
+
t ? i("", !0) : (l(), r("span", O, " (Collapsed) "))
|
|
62
|
+
], 8, N),
|
|
63
|
+
!t && e.itemCount ? (l(), r("span", z, [
|
|
64
|
+
S(b(e.itemCount) + " ", 1),
|
|
65
|
+
a("span", E, "Item" + b(e.itemCount === 1 ? "" : "s"), 1)
|
|
66
|
+
])) : i("", !0)
|
|
67
|
+
])
|
|
68
|
+
]),
|
|
69
|
+
_: 2
|
|
70
|
+
}, 1032, ["class", "disabled"]),
|
|
71
|
+
o.$slots.actions ? (l(), r("div", P, [
|
|
72
|
+
u(o.$slots, "actions", { open: t })
|
|
73
|
+
])) : i("", !0)
|
|
74
|
+
], 2),
|
|
75
|
+
d(s(V), v(o.$attrs, { class: "diclosure-panel h-full max-h-fit rounded-b" }), {
|
|
76
|
+
default: c(() => [
|
|
77
|
+
u(o.$slots, "default", { open: t })
|
|
78
|
+
]),
|
|
79
|
+
_: 2
|
|
80
|
+
}, 1040)
|
|
81
|
+
], 8, D)
|
|
82
|
+
]),
|
|
83
|
+
_: 3
|
|
84
|
+
}, 8, ["class", "defaultOpen", "static"]));
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
export {
|
|
88
|
+
A as default
|
|
89
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type ExampleScript = {
|
|
2
|
+
title: string;
|
|
3
|
+
script: string;
|
|
4
|
+
mockResponse: {
|
|
5
|
+
body?: any;
|
|
6
|
+
status?: number;
|
|
7
|
+
headers?: Record<string, string>;
|
|
8
|
+
text?: () => string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const EXAMPLE_SCRIPTS: ExampleScript[];
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=example-scripts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"example-scripts.d.ts","sourceRoot":"","sources":["../../src/consts/example-scripts.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE;QACZ,IAAI,CAAC,EAAE,GAAG,CAAA;QACV,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAChC,IAAI,CAAC,EAAE,MAAM,MAAM,CAAA;KACpB,CAAA;CACF,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,aAAa,EAoF1C,CAAA"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
const e = [
|
|
2
|
+
{
|
|
3
|
+
title: "Check the status code",
|
|
4
|
+
script: `pm.test("Status code is 200", () => {
|
|
5
|
+
pm.response.to.have.status(200)
|
|
6
|
+
})`,
|
|
7
|
+
mockResponse: {
|
|
8
|
+
status: 200,
|
|
9
|
+
body: { success: !0 }
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
// TODO: We didn't add the proper response duration yet.
|
|
13
|
+
// {
|
|
14
|
+
// title: 'Check response time',
|
|
15
|
+
// script: `pm.test("Response time is acceptable", () => {
|
|
16
|
+
// pm.expect(pm.response.responseTime).to.be.below(200)
|
|
17
|
+
// })`,
|
|
18
|
+
// mockResponse: {
|
|
19
|
+
// status: 200,
|
|
20
|
+
// body: { success: true },
|
|
21
|
+
// },
|
|
22
|
+
// },
|
|
23
|
+
{
|
|
24
|
+
title: "Check JSON response",
|
|
25
|
+
script: `pm.test("Response is valid JSON", () => {
|
|
26
|
+
const responseData = pm.response.json()
|
|
27
|
+
pm.expect(responseData).to.be.an('object')
|
|
28
|
+
})`,
|
|
29
|
+
mockResponse: {
|
|
30
|
+
status: 200,
|
|
31
|
+
body: { data: "test" },
|
|
32
|
+
headers: { "Content-Type": "application/json" }
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: "Check response headers",
|
|
37
|
+
script: `pm.test("Content-Type header is present", () => {
|
|
38
|
+
pm.response.to.have.header('Content-Type')
|
|
39
|
+
})`,
|
|
40
|
+
mockResponse: {
|
|
41
|
+
status: 200,
|
|
42
|
+
body: { success: !0 },
|
|
43
|
+
headers: { "Content-Type": "application/json" }
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
title: "Validate JSON schema",
|
|
48
|
+
script: `pm.test("Response matches schema", () => {
|
|
49
|
+
const schema = {
|
|
50
|
+
type: 'object',
|
|
51
|
+
required: ['id', 'name'],
|
|
52
|
+
properties: {
|
|
53
|
+
id: { type: 'number' },
|
|
54
|
+
name: { type: 'string' }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
pm.response.to.have.jsonSchema(schema)
|
|
58
|
+
})`,
|
|
59
|
+
mockResponse: {
|
|
60
|
+
status: 200,
|
|
61
|
+
body: { id: 1, name: "Test Item" },
|
|
62
|
+
headers: { "Content-Type": "application/json" }
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
title: "Check response body",
|
|
67
|
+
script: `pm.test("Response body contains string", () => {
|
|
68
|
+
pm.expect(pm.response.text()).to.include('success')
|
|
69
|
+
})`,
|
|
70
|
+
mockResponse: {
|
|
71
|
+
status: 200,
|
|
72
|
+
body: "This is a successful response"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: "Successful POST request",
|
|
77
|
+
script: `pm.test("Successful POST request", () => {
|
|
78
|
+
pm.expect(pm.response.code).to.be.oneOf([201, 202])
|
|
79
|
+
})`,
|
|
80
|
+
mockResponse: {
|
|
81
|
+
status: 201,
|
|
82
|
+
body: { success: !0 }
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
];
|
|
86
|
+
export {
|
|
87
|
+
e as EXAMPLE_SCRIPTS
|
|
88
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ViewLayoutCollapse } from './components/ViewLayout';
|
|
2
|
+
export { postResponseScriptsPlugin } from './plugins/post-response-scripts/index.js';
|
|
3
|
+
export { postResponseScriptsPluginV2 } from './plugins/post-response-scripts/post-response-scripts-plugin.js';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { postResponseScriptsPlugin as e, postResponseScriptsPluginV2 as p } from "./plugins/post-response-scripts/post-response-scripts-plugin.js";
|
|
2
|
+
import { default as r } from "./components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
3
|
+
export {
|
|
4
|
+
r as ViewLayoutCollapse,
|
|
5
|
+
e as postResponseScriptsPlugin,
|
|
6
|
+
p as postResponseScriptsPluginV2
|
|
7
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ConsoleContext {
|
|
2
|
+
log: (...args: any[]) => void;
|
|
3
|
+
error: (...args: any[]) => void;
|
|
4
|
+
warn: (...args: any[]) => void;
|
|
5
|
+
info: (...args: any[]) => void;
|
|
6
|
+
debug: (...args: any[]) => void;
|
|
7
|
+
trace: (...args: any[]) => void;
|
|
8
|
+
table: (tabularData: any, properties?: readonly string[]) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const createConsoleContext: () => ConsoleContext;
|
|
11
|
+
//# sourceMappingURL=console.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../../../src/libs/execute-scripts/context/console.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;IAC7B,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;IAC/B,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;IAC9B,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;IAC9B,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;IAC/B,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;IAC/B,KAAK,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,KAAK,IAAI,CAAA;CAClE;AAED,eAAO,MAAM,oBAAoB,QAAO,cAQtC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const e = () => ({
|
|
2
|
+
log: (...o) => console.log("[Script]", ...o),
|
|
3
|
+
error: (...o) => console.error("[Script Error]", ...o),
|
|
4
|
+
warn: (...o) => console.warn("[Script Warning]", ...o),
|
|
5
|
+
info: (...o) => console.info("[Script Info]", ...o),
|
|
6
|
+
debug: (...o) => console.debug("[Script Debug]", ...o),
|
|
7
|
+
trace: (...o) => console.trace("[Script Trace]", ...o),
|
|
8
|
+
table: (o, r) => console.table(o, r)
|
|
9
|
+
});
|
|
10
|
+
export {
|
|
11
|
+
e as createConsoleContext
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type TestResult = {
|
|
2
|
+
title: string;
|
|
3
|
+
passed: boolean;
|
|
4
|
+
duration: number;
|
|
5
|
+
error?: string;
|
|
6
|
+
status: 'pending' | 'passed' | 'failed';
|
|
7
|
+
};
|
|
8
|
+
export declare const executePostResponseScript: (script: string | undefined, data: {
|
|
9
|
+
response: Response;
|
|
10
|
+
onTestResultsUpdate?: ((results: TestResult[]) => void) | undefined;
|
|
11
|
+
}) => Promise<void>;
|
|
12
|
+
//# sourceMappingURL=execute-post-response-script.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute-post-response-script.d.ts","sourceRoot":"","sources":["../../../src/libs/execute-scripts/execute-post-response-script.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,OAAO,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAA;CACxC,CAAA;AAED,eAAO,MAAM,yBAAyB,GACpC,QAAQ,MAAM,GAAG,SAAS,EAC1B,MAAM;IACJ,QAAQ,EAAE,QAAQ,CAAA;IAClB,mBAAmB,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC,GAAG,SAAS,CAAA;CACpE,KACA,OAAO,CAAC,IAAI,CAUd,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createConsoleContext as t } from "./context/console.js";
|
|
2
|
+
import { executeInPostmanSandbox as s } from "./postman-sandbox-adapter.js";
|
|
3
|
+
const p = async (e, o) => {
|
|
4
|
+
e && await s({
|
|
5
|
+
script: e,
|
|
6
|
+
response: o.response,
|
|
7
|
+
onTestResultsUpdate: o.onTestResultsUpdate,
|
|
8
|
+
scriptConsole: t()
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
p as executePostResponseScript
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/libs/execute-scripts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ConsoleContext } from './context/console.js';
|
|
2
|
+
import type { TestResult } from './execute-post-response-script.js';
|
|
3
|
+
export declare const executeInPostmanSandbox: ({ script, response, onTestResultsUpdate, scriptConsole, }: {
|
|
4
|
+
script: string;
|
|
5
|
+
response: Response;
|
|
6
|
+
onTestResultsUpdate?: ((results: TestResult[]) => void) | undefined;
|
|
7
|
+
scriptConsole: ConsoleContext;
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
//# sourceMappingURL=postman-sandbox-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postman-sandbox-adapter.d.ts","sourceRoot":"","sources":["../../../src/libs/execute-scripts/postman-sandbox-adapter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAiEhE,eAAO,MAAM,uBAAuB,GAAU,2DAK3C;IACD,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,QAAQ,CAAA;IAClB,mBAAmB,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC,GAAG,SAAS,CAAA;IACnE,aAAa,EAAE,cAAc,CAAA;CAC9B,KAAG,OAAO,CAAC,IAAI,CAqEf,CAAA"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import l from "postman-sandbox";
|
|
2
|
+
const g = async (e) => {
|
|
3
|
+
const t = await e.text(), o = Array.from(new TextEncoder().encode(t));
|
|
4
|
+
return {
|
|
5
|
+
code: e.status,
|
|
6
|
+
status: e.statusText || String(e.status),
|
|
7
|
+
header: Array.from(e.headers.entries()).map(([s, n]) => ({ key: s, value: n })),
|
|
8
|
+
stream: {
|
|
9
|
+
type: "Buffer",
|
|
10
|
+
data: o
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}, w = () => new Promise((e, t) => {
|
|
14
|
+
l.createContext((o, s) => {
|
|
15
|
+
if (o) {
|
|
16
|
+
t(o);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
e(s);
|
|
20
|
+
});
|
|
21
|
+
}), y = (e) => e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : String(e), h = (e, t, o) => {
|
|
22
|
+
const s = t.name || `Assertion ${t.index + 1}`, n = {
|
|
23
|
+
title: s,
|
|
24
|
+
passed: t.passed,
|
|
25
|
+
duration: o,
|
|
26
|
+
error: t.error?.message,
|
|
27
|
+
status: t.passed ? "passed" : "failed"
|
|
28
|
+
}, a = e.findIndex((i) => i.title === s);
|
|
29
|
+
if (a === -1) {
|
|
30
|
+
e.push(n);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
e[a] = n;
|
|
34
|
+
}, A = async ({
|
|
35
|
+
script: e,
|
|
36
|
+
response: t,
|
|
37
|
+
onTestResultsUpdate: o,
|
|
38
|
+
scriptConsole: s
|
|
39
|
+
}) => {
|
|
40
|
+
const n = [];
|
|
41
|
+
let a = 0, i = 0;
|
|
42
|
+
const r = await w(), f = (x, d) => {
|
|
43
|
+
d.forEach((c) => {
|
|
44
|
+
const u = Number((performance.now() - a).toFixed(2));
|
|
45
|
+
a = performance.now(), h(n, c, u);
|
|
46
|
+
}), o?.([...n]);
|
|
47
|
+
}, m = (x, d, ...c) => {
|
|
48
|
+
(s[d] ?? s.log)(...c);
|
|
49
|
+
};
|
|
50
|
+
try {
|
|
51
|
+
r.on("execution.assertion", f), r.on("console", m);
|
|
52
|
+
const x = await g(t);
|
|
53
|
+
i = performance.now(), a = i, await new Promise((d) => {
|
|
54
|
+
r.execute(
|
|
55
|
+
{
|
|
56
|
+
listen: "test",
|
|
57
|
+
script: {
|
|
58
|
+
exec: [e]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
disableLegacyAPIs: !0,
|
|
63
|
+
context: {
|
|
64
|
+
response: x
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
(c) => {
|
|
68
|
+
if (c) {
|
|
69
|
+
const u = Number((performance.now() - i).toFixed(2)), p = y(c);
|
|
70
|
+
s.error(`[Post-Response Script] Error (${u}ms):`, p), n.push({
|
|
71
|
+
title: "Script Execution",
|
|
72
|
+
passed: !1,
|
|
73
|
+
duration: u,
|
|
74
|
+
error: p,
|
|
75
|
+
status: "failed"
|
|
76
|
+
}), o?.([...n]);
|
|
77
|
+
}
|
|
78
|
+
d();
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
});
|
|
82
|
+
} finally {
|
|
83
|
+
r.off("execution.assertion", f), r.off("console", m), r.dispose();
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
export {
|
|
87
|
+
A as executeInPostmanSandbox
|
|
88
|
+
};
|
package/dist/plugins/post-response-scripts/components/PostResponseScripts/ExampleScripts.vue.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
5
|
+
"update:modelValue": (value: string) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
7
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=ExampleScripts.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleScripts.vue.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/post-response-scripts/components/PostResponseScripts/ExampleScripts.vue"],"names":[],"mappings":"AA0CA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAA;CACnB,CAAC;AA6EF,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
package/dist/plugins/post-response-scripts/components/PostResponseScripts/ExampleScripts.vue.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { defineComponent as m, createElementBlock as l, openBlock as o, Fragment as u, renderList as d, unref as p, createElementVNode as f, toDisplayString as _ } from "vue";
|
|
2
|
+
import { EXAMPLE_SCRIPTS as x } from "../../../../consts/example-scripts.js";
|
|
3
|
+
const b = { class: "flex flex-wrap gap-1" }, E = ["onClick"], h = /* @__PURE__ */ m({
|
|
4
|
+
__name: "ExampleScripts",
|
|
5
|
+
props: {
|
|
6
|
+
modelValue: {}
|
|
7
|
+
},
|
|
8
|
+
emits: ["update:modelValue"],
|
|
9
|
+
setup(i, { emit: s }) {
|
|
10
|
+
const n = i, a = s, c = (r) => {
|
|
11
|
+
let e = r;
|
|
12
|
+
n.modelValue.trim() !== "" && (e = `
|
|
13
|
+
|
|
14
|
+
${e}`), a("update:modelValue", n.modelValue.trim() + e);
|
|
15
|
+
};
|
|
16
|
+
return (r, e) => (o(), l("ul", b, [
|
|
17
|
+
(o(!0), l(u, null, d(p(x), (t) => (o(), l("li", {
|
|
18
|
+
key: t.title,
|
|
19
|
+
class: "bg-b-2 text-c-2 hover:bg-b-3 inline-flex flex-col rounded-full px-3 py-1 text-xs font-medium"
|
|
20
|
+
}, [
|
|
21
|
+
f("button", {
|
|
22
|
+
class: "w-full",
|
|
23
|
+
type: "button",
|
|
24
|
+
onClick: (V) => c(t.script)
|
|
25
|
+
}, _(t.title), 9, E)
|
|
26
|
+
]))), 128))
|
|
27
|
+
]));
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export {
|
|
31
|
+
h as default
|
|
32
|
+
};
|