@scalar/api-client 2.1.24 → 2.1.26
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 +18 -0
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +5 -5
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +42 -42
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +56 -54
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +23 -18
- package/dist/style.css +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
- package/dist/views/Settings/Settings.vue2.js +15 -45
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +135 -102
- package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneralMode.vue.js +76 -68
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/store/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAMzD,OAAO,EACL,KAAK,SAAS,EAEf,MAAM,sCAAsC,CAAA;AAK7C,4CAA4C;AAC5C,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,OAAO;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/store/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAMzD,OAAO,EACL,KAAK,SAAS,EAEf,MAAM,sCAAsC,CAAA;AAK7C,4CAA4C;AAC5C,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,OAAO;;;;;;;;;;;;;mBA4E6+L,CAAC;;yBAAq5B,CAAC;;;;;;;;;;;;;;;;;;uBAAv5B,CAAC;;6BAAq5B,CAAC;;;;;;;;;;;;;;;;;;uBAAv5B,CAAC;;6BAAq5B,CAAC;;;;;;;;;;;;;;;;;uBAAv5B,CAAC;;6BAAq5B,CAAC;;;;;;;;;;;;;;;;uBAAv5B,CAAC;;6BAAq5B,CAAC;;;;;;;;;;;;;;;;uBAAv5B,CAAC;;6BAAq5B,CAAC;;;;;;;;;;;;;;;;;uBAAv5B,CAAC;;6BAAq5B,CAAC;;;;;;;;;;;;;;;;uBAAv5B,CAAC;;6BAAq5B,CAAC;;;;;;;;;;;;;;;;uBAAv5B,CAAC;;6BAAq5B,CAAC;;;;;;;;EA/Dj8N;AAED,oDAAoD;AACpD,wBAAgB,4BAA4B,CAAC,EAC3C,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,GACvB,EAAE,YAAY;6BACkB,OAAO,CAAC,SAAS,CAAC;;;;;;;;;;;;mBAqDw/L,CAAC;;yBAAq5B,CAAC;;;;;2BAbl6N,MAAM;EAYrC"}
|
package/dist/store/workspace.js
CHANGED
|
@@ -1,52 +1,57 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { requestSchema as i, requestExampleSchema as l, collectionSchema as u } from "@scalar/oas-utils/entities/spec";
|
|
2
2
|
import { workspaceSchema as k } from "@scalar/oas-utils/entities/workspace";
|
|
3
3
|
import { LS_KEYS as f } from "@scalar/oas-utils/helpers";
|
|
4
4
|
import { mutationFactory as h } from "@scalar/object-utils/mutator-record";
|
|
5
5
|
import { reactive as p } from "vue";
|
|
6
|
-
function F(
|
|
7
|
-
const e = p({}),
|
|
6
|
+
function F(r) {
|
|
7
|
+
const e = p({}), o = h(
|
|
8
8
|
e,
|
|
9
9
|
p({}),
|
|
10
|
-
|
|
10
|
+
r && f.WORKSPACE
|
|
11
11
|
);
|
|
12
12
|
return {
|
|
13
13
|
workspaces: e,
|
|
14
|
-
workspaceMutators:
|
|
14
|
+
workspaceMutators: o
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
function b({
|
|
18
|
-
workspaces:
|
|
18
|
+
workspaces: r,
|
|
19
19
|
workspaceMutators: e,
|
|
20
|
-
collectionMutators:
|
|
20
|
+
collectionMutators: o,
|
|
21
21
|
requestMutators: d,
|
|
22
22
|
requestExampleMutators: m
|
|
23
23
|
}) {
|
|
24
24
|
return {
|
|
25
|
-
addWorkspace: (
|
|
26
|
-
const
|
|
25
|
+
addWorkspace: (a = {}) => {
|
|
26
|
+
const t = i.parse({
|
|
27
27
|
method: "get",
|
|
28
28
|
parameters: [],
|
|
29
29
|
path: "",
|
|
30
30
|
summary: "My First Request",
|
|
31
|
-
examples: [
|
|
32
|
-
}),
|
|
31
|
+
examples: []
|
|
32
|
+
}), s = l.parse({
|
|
33
|
+
name: "Example",
|
|
34
|
+
requestUid: t.uid
|
|
35
|
+
});
|
|
36
|
+
t.examples.push(s.uid);
|
|
37
|
+
const c = u.parse({
|
|
33
38
|
info: {
|
|
34
39
|
title: "Drafts"
|
|
35
40
|
},
|
|
36
|
-
children: [
|
|
37
|
-
requests: [
|
|
41
|
+
children: [t.uid],
|
|
42
|
+
requests: [t.uid]
|
|
38
43
|
}), n = k.parse({
|
|
39
|
-
...
|
|
44
|
+
...a,
|
|
40
45
|
collections: [c.uid]
|
|
41
46
|
});
|
|
42
|
-
return m.add(s), d.add(
|
|
47
|
+
return m.add(s), d.add(t), o.add(c), e.add(n), n;
|
|
43
48
|
},
|
|
44
|
-
deleteWorkspace: (
|
|
45
|
-
if (Object.keys(
|
|
49
|
+
deleteWorkspace: (a) => {
|
|
50
|
+
if (Object.keys(r).length <= 1) {
|
|
46
51
|
console.warn("The last workspace cannot be deleted.");
|
|
47
52
|
return;
|
|
48
53
|
}
|
|
49
|
-
e.delete(
|
|
54
|
+
e.delete(a);
|
|
50
55
|
}
|
|
51
56
|
};
|
|
52
57
|
}
|