@scalar/oas-utils 0.2.11 → 0.2.13

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @scalar/oas-utils
2
2
 
3
+ ## 0.2.13
4
+
5
+ ### Patch Changes
6
+
7
+ - 1a675be: feat: add empty state + drafts collection
8
+
9
+ ## 0.2.12
10
+
11
+ ### Patch Changes
12
+
13
+ - 618285e: feat: add localStorage syncing to client app
14
+ - Updated dependencies [618285e]
15
+ - @scalar/themes@0.9.13
16
+
3
17
  ## 0.2.11
4
18
 
5
19
  ### Patch Changes
@@ -8,7 +8,7 @@ import { deepMerge } from '../../../helpers/deepMerge.js';
8
8
  const requestBodySchema = z.any();
9
9
  const parametersSchema = z.record(z.string(), z.any());
10
10
  const requestSchema = z.object({
11
- path: z.string().optional().default('/'),
11
+ path: z.string().optional().default(''),
12
12
  method: z
13
13
  .enum(Object.keys(REQUEST_METHODS))
14
14
  .optional()
@@ -15,7 +15,7 @@ declare const workspaceSchema: z.ZodObject<{
15
15
  /** Workspace level proxy for all requests to be sent through */
16
16
  proxyUrl: z.ZodOptional<z.ZodString>;
17
17
  /** Workspace level theme, we might move this to user level later */
18
- themeId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
18
+ themeId: z.ZodDefault<z.ZodOptional<z.ZodEnum<["alternate", "default", "moon", "purple", "solarized", "bluePlanet", "deepSpace", "saturn", "kepler", "mars", "none"]>>>;
19
19
  }, "strip", z.ZodTypeAny, {
20
20
  uid: string;
21
21
  description: string;
@@ -24,7 +24,7 @@ declare const workspaceSchema: z.ZodObject<{
24
24
  collectionUids: string[];
25
25
  environmentUids: string[];
26
26
  cookieUids: string[];
27
- themeId: string;
27
+ themeId: "default" | "alternate" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "mars" | "none";
28
28
  proxyUrl?: string | undefined;
29
29
  }, {
30
30
  uid?: string | undefined;
@@ -35,7 +35,7 @@ declare const workspaceSchema: z.ZodObject<{
35
35
  environmentUids?: string[] | undefined;
36
36
  cookieUids?: string[] | undefined;
37
37
  proxyUrl?: string | undefined;
38
- themeId?: string | undefined;
38
+ themeId?: "default" | "alternate" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "mars" | "none" | undefined;
39
39
  }>;
40
40
  /** The base scalar workspace */
41
41
  export type Workspace = z.infer<typeof workspaceSchema>;
@@ -48,7 +48,7 @@ export declare const createWorkspace: (payload: WorkspacePayload) => {
48
48
  collectionUids: string[];
49
49
  environmentUids: string[];
50
50
  cookieUids: string[];
51
- themeId: string;
51
+ themeId: "default" | "alternate" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "mars" | "none";
52
52
  proxyUrl?: string | undefined;
53
53
  };
54
54
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../../src/entities/workspace/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,QAAA,MAAM,eAAe;;;IAGnB,4BAA4B;;IAE5B,6EAA6E;;IAE7E,uDAAuD;;IAEvD,wDAAwD;;IAExD,mDAAmD;;IAEnD,gEAAgE;;IAEhE,oEAAoE;;;;;;;;;;;;;;;;;;;;;;EAEpE,CAAA;AAEF,gCAAgC;AAChC,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AACvD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAE9D,eAAO,MAAM,eAAe,YAAa,gBAAgB;;;;;;;;;;CACzB,CAAA"}
1
+ {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../../src/entities/workspace/workspace.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,QAAA,MAAM,eAAe;;;IAGnB,4BAA4B;;IAE5B,6EAA6E;;IAE7E,uDAAuD;;IAEvD,wDAAwD;;IAExD,mDAAmD;;IAEnD,gEAAgE;;IAEhE,oEAAoE;;;;;;;;;;;;;;;;;;;;;;EAEpE,CAAA;AAEF,gCAAgC;AAChC,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AACvD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAE9D,eAAO,MAAM,eAAe,YAAa,gBAAgB;;;;;;;;;;CACzB,CAAA"}
@@ -1,9 +1,10 @@
1
+ import { themeIds } from '@scalar/themes';
1
2
  import { z } from 'zod';
2
3
  import { nanoidSchema } from './shared/utility.js';
3
4
 
4
5
  const workspaceSchema = z.object({
5
6
  uid: nanoidSchema,
6
- name: z.string().default('Workspace'),
7
+ name: z.string().default('Default Workspace'),
7
8
  /** Workspace description */
8
9
  description: z.string().default('Basic Scalar Workspace'),
9
10
  /** Controls read only mode for most entitites, but not things like params */
@@ -17,7 +18,7 @@ const workspaceSchema = z.object({
17
18
  /** Workspace level proxy for all requests to be sent through */
18
19
  proxyUrl: z.string().optional(),
19
20
  /** Workspace level theme, we might move this to user level later */
20
- themeId: z.string().optional().default('default'),
21
+ themeId: z.enum(themeIds).optional().default('default'),
21
22
  });
22
23
  const createWorkspace = (payload) => workspaceSchema.parse(payload);
23
24
 
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "specification",
17
17
  "yaml"
18
18
  ],
19
- "version": "0.2.11",
19
+ "version": "0.2.13",
20
20
  "engines": {
21
21
  "node": ">=18"
22
22
  },
@@ -89,10 +89,11 @@
89
89
  "axios": "^1.6.8",
90
90
  "nanoid": "^5.0.7",
91
91
  "yaml": "^2.4.5",
92
- "zod": "^3.22.4"
92
+ "zod": "^3.22.4",
93
+ "@scalar/themes": "0.9.13"
93
94
  },
94
95
  "devDependencies": {
95
- "@scalar/openapi-parser": "^0.7.1",
96
+ "@scalar/openapi-parser": "^0.7.2",
96
97
  "axios": "^1.6.8",
97
98
  "httpsnippet-lite": "^3.0.5",
98
99
  "openapi-types": "^12.1.3",
@@ -101,7 +102,7 @@
101
102
  "type-fest": "^4.20.0",
102
103
  "vite": "^5.2.10",
103
104
  "vitest": "^1.6.0",
104
- "@scalar/build-tooling": "0.1.8"
105
+ "@scalar/build-tooling": "0.1.9"
105
106
  },
106
107
  "scripts": {
107
108
  "build": "scalar-build-rollup",