@scalar/helpers 0.2.4 → 0.2.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @scalar/helpers
|
|
2
2
|
|
|
3
|
+
## 0.2.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#7661](https://github.com/scalar/scalar/pull/7661): fix: all issues for client modal v2 preparation
|
|
8
|
+
|
|
9
|
+
## 0.2.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#7605](https://github.com/scalar/scalar/pull/7605): fix: all issues for client modal v2 preparation
|
|
14
|
+
|
|
3
15
|
## 0.2.4
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -18,22 +18,33 @@ export declare const LS_KEYS: {
|
|
|
18
18
|
* to ensure we do not have any conflicts
|
|
19
19
|
*/
|
|
20
20
|
export declare const REFERENCE_LS_KEYS: {
|
|
21
|
-
/**
|
|
22
|
-
* We should remove after some time as we no longer store an object
|
|
23
|
-
* @deprecated
|
|
24
|
-
*/
|
|
25
|
-
readonly SELECTED_CLIENT_DEPRECATED: "scalar-reference-selected-client";
|
|
26
21
|
/**
|
|
27
22
|
* Store the selected client as a string in localStorage
|
|
28
23
|
*/
|
|
29
24
|
readonly SELECTED_CLIENT: "scalar-reference-selected-client-v2";
|
|
25
|
+
/**
|
|
26
|
+
* Store the auth schemes as a string in localStorage
|
|
27
|
+
*/
|
|
28
|
+
readonly AUTH_SCHEMES: "scalar-reference-auth-schemes";
|
|
29
|
+
/**
|
|
30
|
+
* Store the selected auth schemes as a string in localStorage
|
|
31
|
+
*/
|
|
32
|
+
readonly SELECTED_AUTH_SCHEMES: "scalar-reference-selected-auth-schemes";
|
|
30
33
|
};
|
|
31
34
|
/**
|
|
32
35
|
* localStorage keys for all client resources
|
|
33
36
|
* to ensure we do not have any conflicts
|
|
34
37
|
*/
|
|
35
38
|
export declare const CLIENT_LS_KEYS: {
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated This key is deprecated and will be removed in a future release.
|
|
41
|
+
* We are now storing the entire document for the api-client instead.
|
|
42
|
+
*/
|
|
36
43
|
readonly AUTH: "scalar-client-auth";
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated This key is deprecated and will be removed in a future release.
|
|
46
|
+
* We are now storing the entire document for the api-client instead.
|
|
47
|
+
*/
|
|
37
48
|
readonly SELECTED_SECURITY_SCHEMES: "scalar-client-selected-security-schemes";
|
|
38
49
|
};
|
|
39
50
|
/** SSR safe alias for localStorage */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-storage.d.ts","sourceRoot":"","sources":["../../src/object/local-storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;CAUV,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,iBAAiB;IAC5B
|
|
1
|
+
{"version":3,"file":"local-storage.d.ts","sourceRoot":"","sources":["../../src/object/local-storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;CAUV,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,iBAAiB;IAC5B;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAEK,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,cAAc;IACzB;;;OAGG;;IAEH;;;OAGG;;CAEK,CAAA;AAEV,sCAAsC;AACtC,eAAO,MAAM,gBAAgB;;;;CAOX,CAAA"}
|
|
@@ -11,17 +11,28 @@ const LS_KEYS = {
|
|
|
11
11
|
};
|
|
12
12
|
const REFERENCE_LS_KEYS = {
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
* @deprecated
|
|
14
|
+
* Store the selected client as a string in localStorage
|
|
16
15
|
*/
|
|
17
|
-
|
|
16
|
+
SELECTED_CLIENT: "scalar-reference-selected-client-v2",
|
|
18
17
|
/**
|
|
19
|
-
* Store the
|
|
18
|
+
* Store the auth schemes as a string in localStorage
|
|
19
|
+
*/
|
|
20
|
+
AUTH_SCHEMES: "scalar-reference-auth-schemes",
|
|
21
|
+
/**
|
|
22
|
+
* Store the selected auth schemes as a string in localStorage
|
|
20
23
|
*/
|
|
21
|
-
|
|
24
|
+
SELECTED_AUTH_SCHEMES: "scalar-reference-selected-auth-schemes"
|
|
22
25
|
};
|
|
23
26
|
const CLIENT_LS_KEYS = {
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated This key is deprecated and will be removed in a future release.
|
|
29
|
+
* We are now storing the entire document for the api-client instead.
|
|
30
|
+
*/
|
|
24
31
|
AUTH: "scalar-client-auth",
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated This key is deprecated and will be removed in a future release.
|
|
34
|
+
* We are now storing the entire document for the api-client instead.
|
|
35
|
+
*/
|
|
25
36
|
SELECTED_SECURITY_SCHEMES: "scalar-client-selected-security-schemes"
|
|
26
37
|
};
|
|
27
38
|
const safeLocalStorage = () => typeof window === "undefined" ? {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/object/local-storage.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * localStorage keys for resources\n * DO NOT CHANGE THESE AS IT WILL BREAK THE MIGRATION\n */\nexport const LS_KEYS = {\n COLLECTION: 'collection',\n COOKIE: 'cookie',\n ENVIRONMENT: 'environment',\n REQUEST: 'request',\n REQUEST_EXAMPLE: 'requestExample',\n SECURITY_SCHEME: 'securityScheme',\n SERVER: 'server',\n TAG: 'tag',\n WORKSPACE: 'workspace',\n} as const\n\n/**\n * localStorage keys for all reference resources\n * to ensure we do not have any conflicts\n */\nexport const REFERENCE_LS_KEYS = {\n /**\n *
|
|
5
|
-
"mappings": "AAIO,MAAM,UAAU;AAAA,EACrB,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,SAAS;AAAA,EACT,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,WAAW;AACb;AAMO,MAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA
|
|
4
|
+
"sourcesContent": ["/**\n * localStorage keys for resources\n * DO NOT CHANGE THESE AS IT WILL BREAK THE MIGRATION\n */\nexport const LS_KEYS = {\n COLLECTION: 'collection',\n COOKIE: 'cookie',\n ENVIRONMENT: 'environment',\n REQUEST: 'request',\n REQUEST_EXAMPLE: 'requestExample',\n SECURITY_SCHEME: 'securityScheme',\n SERVER: 'server',\n TAG: 'tag',\n WORKSPACE: 'workspace',\n} as const\n\n/**\n * localStorage keys for all reference resources\n * to ensure we do not have any conflicts\n */\nexport const REFERENCE_LS_KEYS = {\n /**\n * Store the selected client as a string in localStorage\n */\n SELECTED_CLIENT: 'scalar-reference-selected-client-v2',\n /**\n * Store the auth schemes as a string in localStorage\n */\n AUTH_SCHEMES: 'scalar-reference-auth-schemes',\n /**\n * Store the selected auth schemes as a string in localStorage\n */\n SELECTED_AUTH_SCHEMES: 'scalar-reference-selected-auth-schemes',\n} as const\n\n/**\n * localStorage keys for all client resources\n * to ensure we do not have any conflicts\n */\nexport const CLIENT_LS_KEYS = {\n /**\n * @deprecated This key is deprecated and will be removed in a future release.\n * We are now storing the entire document for the api-client instead.\n */\n AUTH: 'scalar-client-auth',\n /**\n * @deprecated This key is deprecated and will be removed in a future release.\n * We are now storing the entire document for the api-client instead.\n */\n SELECTED_SECURITY_SCHEMES: 'scalar-client-selected-security-schemes',\n} as const\n\n/** SSR safe alias for localStorage */\nexport const safeLocalStorage = () =>\n typeof window === 'undefined'\n ? {\n getItem: () => null,\n setItem: () => null,\n removeItem: () => null,\n }\n : localStorage\n"],
|
|
5
|
+
"mappings": "AAIO,MAAM,UAAU;AAAA,EACrB,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,SAAS;AAAA,EACT,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,WAAW;AACb;AAMO,MAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA,EAI/B,iBAAiB;AAAA;AAAA;AAAA;AAAA,EAIjB,cAAc;AAAA;AAAA;AAAA;AAAA,EAId,uBAAuB;AACzB;AAMO,MAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA,EAK5B,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,EAKN,2BAA2B;AAC7B;AAGO,MAAM,mBAAmB,MAC9B,OAAO,WAAW,cACd;AAAA,EACE,SAAS,MAAM;AAAA,EACf,SAAS,MAAM;AAAA,EACf,YAAY,MAAM;AACpB,IACA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"helpers",
|
|
15
15
|
"js"
|
|
16
16
|
],
|
|
17
|
-
"version": "0.2.
|
|
17
|
+
"version": "0.2.6",
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">=20"
|
|
20
20
|
},
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"jsdom": "26.1.0",
|
|
92
92
|
"vite": "7.1.11",
|
|
93
93
|
"vitest": "3.2.4",
|
|
94
|
-
"@scalar/build-tooling": "0.4.
|
|
94
|
+
"@scalar/build-tooling": "0.4.1"
|
|
95
95
|
},
|
|
96
96
|
"scripts": {
|
|
97
97
|
"build": "scalar-build-esbuild",
|