@tonightpass/react 0.0.2 → 0.0.4
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +13 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/hooks/useAPI.ts +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @tonightpass/react@0.0.
|
|
2
|
+
> @tonightpass/react@0.0.4 build /home/runner/work/tonightpass/tonightpass/packages/react
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
[32mCJS[39m [1mdist/index.js [22m[32m438.00 B[39m
|
|
13
|
-
[32mCJS[39m [1mdist/index.js.map [22m[
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
13
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m948.00 B[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 47ms
|
|
15
15
|
[32mESM[39m [1mdist/index.mjs [22m[32m258.00 B[39m
|
|
16
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[
|
|
17
|
-
[32mESM[39m ⚡️ Build success in
|
|
16
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m948.00 B[39m
|
|
17
|
+
[32mESM[39m ⚡️ Build success in 47ms
|
|
18
18
|
[34mDTS[39m Build start
|
|
19
|
-
[32mDTS[39m ⚡️ Build success in
|
|
20
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m2.
|
|
21
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m2.
|
|
19
|
+
[32mDTS[39m ⚡️ Build success in 1289ms
|
|
20
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m2.71 KB[39m
|
|
21
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m2.71 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @tonightpass/react
|
|
2
2
|
|
|
3
|
+
## 0.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ef3cb97`](https://github.com/tonightpass/tonightpass/commit/ef3cb9700747e815bd9ec1757003e4eb1774865a) Thanks [@AntoineKM](https://github.com/AntoineKM)! - Update api hook path types
|
|
8
|
+
|
|
9
|
+
## 0.0.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`2166d44`](https://github.com/tonightpass/tonightpass/commit/2166d44417e5af6e1da86681330b4aa2892775e5)]:
|
|
14
|
+
- tonightpass@0.0.3
|
|
15
|
+
|
|
3
16
|
## 0.0.2
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import * as tonightpass from 'tonightpass';
|
|
|
3
3
|
import { Client, Query, APIRequestOptions } from 'tonightpass';
|
|
4
4
|
|
|
5
5
|
declare const client: Client;
|
|
6
|
-
declare const useAPI: <Path extends "/careers/categories" | "/careers/employmentTypes" | "/careers/jobs" | "/careers/jobs/:id" | "/careers/offices" | "/health/database" | "/health/http" | "/profiles/:username" | "/users" | "/users/:id" | "/users/me" | "/check/:identifier">(path
|
|
6
|
+
declare const useAPI: <Path extends "/careers/categories" | "/careers/employmentTypes" | "/careers/jobs" | "/careers/jobs/:id" | "/careers/offices" | "/health/database" | "/health/http" | "/profiles/:username" | "/users" | "/users/:id" | "/users/me" | "/check/:identifier">(path?: Path | null, query?: Query<Path>, options?: APIRequestOptions) => swr.SWRResponse<(Extract<tonightpass.Endpoint<"GET", "/careers/categories", tonightpass.CareersCategory[], {
|
|
7
7
|
language?: string | undefined;
|
|
8
8
|
}>, {
|
|
9
9
|
path: Path;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import * as tonightpass from 'tonightpass';
|
|
|
3
3
|
import { Client, Query, APIRequestOptions } from 'tonightpass';
|
|
4
4
|
|
|
5
5
|
declare const client: Client;
|
|
6
|
-
declare const useAPI: <Path extends "/careers/categories" | "/careers/employmentTypes" | "/careers/jobs" | "/careers/jobs/:id" | "/careers/offices" | "/health/database" | "/health/http" | "/profiles/:username" | "/users" | "/users/:id" | "/users/me" | "/check/:identifier">(path
|
|
6
|
+
declare const useAPI: <Path extends "/careers/categories" | "/careers/employmentTypes" | "/careers/jobs" | "/careers/jobs/:id" | "/careers/offices" | "/health/database" | "/health/http" | "/profiles/:username" | "/users" | "/users/:id" | "/users/me" | "/check/:identifier">(path?: Path | null, query?: Query<Path>, options?: APIRequestOptions) => swr.SWRResponse<(Extract<tonightpass.Endpoint<"GET", "/careers/categories", tonightpass.CareersCategory[], {
|
|
7
7
|
language?: string | undefined;
|
|
8
8
|
}>, {
|
|
9
9
|
path: Path;
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var n = require('swr');
|
|
4
4
|
var tonightpass = require('tonightpass');
|
|
5
5
|
|
|
6
6
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var n__default = /*#__PURE__*/_interopDefault(n);
|
|
9
9
|
|
|
10
|
-
var a=new tonightpass.Client({baseURL:tonightpass.DEFAULT_API_URL}),E=(t,e,r)=>
|
|
10
|
+
var a=new tonightpass.Client({baseURL:tonightpass.DEFAULT_API_URL}),E=(t,e,r)=>n__default.default(t,o=>a.get(o,e,r));
|
|
11
11
|
|
|
12
12
|
exports.client = a;
|
|
13
13
|
exports.useAPI = E;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/hooks/useAPI.ts"],"names":["useSWR","Client","DEFAULT_API_URL","client","useAPI","path","query","options","key"],"mappings":"AAAA,OAAOA,MAAyB,MAChC,OAGE,UAAAC,EAGA,mBAAAC,MACK,cAEA,IAAMC,EAAS,IAAIF,EAAO,CAAE,QAASC,CAAgB,CAAC,EAEhDE,EAAS,CACpBC,EACAC,EACAC,IAIOP,EACLK,EAH6BG,GAAcL,EAAO,IAAIK,EAAKF,EAAOC,CAAO,CAK3E","sourcesContent":["import useSWR, { Fetcher } from \"swr\";\nimport {\n Endpoints,\n APIRequestOptions,\n Client,\n PathsFor,\n Query,\n DEFAULT_API_URL,\n} from \"tonightpass\";\n\nexport const client = new Client({ baseURL: DEFAULT_API_URL });\n\nexport const useAPI = <Path extends PathsFor<\"GET\">>(\n path
|
|
1
|
+
{"version":3,"sources":["../src/hooks/useAPI.ts"],"names":["useSWR","Client","DEFAULT_API_URL","client","useAPI","path","query","options","key"],"mappings":"AAAA,OAAOA,MAAyB,MAChC,OAGE,UAAAC,EAGA,mBAAAC,MACK,cAEA,IAAMC,EAAS,IAAIF,EAAO,CAAE,QAASC,CAAgB,CAAC,EAEhDE,EAAS,CACpBC,EACAC,EACAC,IAIOP,EACLK,EAH6BG,GAAcL,EAAO,IAAIK,EAAKF,EAAOC,CAAO,CAK3E","sourcesContent":["import useSWR, { Fetcher } from \"swr\";\nimport {\n Endpoints,\n APIRequestOptions,\n Client,\n PathsFor,\n Query,\n DEFAULT_API_URL,\n} from \"tonightpass\";\n\nexport const client = new Client({ baseURL: DEFAULT_API_URL });\n\nexport const useAPI = <Path extends PathsFor<\"GET\">>(\n path?: Path | null,\n query?: Query<Path>,\n options?: APIRequestOptions,\n) => {\n const fetcher: Fetcher<any> = (key: Path) => client.get(key, query, options);\n\n return useSWR<Extract<Endpoints, { path: Path; method: \"GET\" }>[\"res\"]>(\n path,\n fetcher,\n );\n};\n"]}
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import n from 'swr';
|
|
2
2
|
import { Client, DEFAULT_API_URL } from 'tonightpass';
|
|
3
3
|
|
|
4
|
-
var a=new Client({baseURL:DEFAULT_API_URL}),E=(t,e,r)=>
|
|
4
|
+
var a=new Client({baseURL:DEFAULT_API_URL}),E=(t,e,r)=>n(t,o=>a.get(o,e,r));
|
|
5
5
|
|
|
6
6
|
export { a as client, E as useAPI };
|
|
7
7
|
//# sourceMappingURL=out.js.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/hooks/useAPI.ts"],"names":["useSWR","Client","DEFAULT_API_URL","client","useAPI","path","query","options","key"],"mappings":"AAAA,OAAOA,MAAyB,MAChC,OAGE,UAAAC,EAGA,mBAAAC,MACK,cAEA,IAAMC,EAAS,IAAIF,EAAO,CAAE,QAASC,CAAgB,CAAC,EAEhDE,EAAS,CACpBC,EACAC,EACAC,IAIOP,EACLK,EAH6BG,GAAcL,EAAO,IAAIK,EAAKF,EAAOC,CAAO,CAK3E","sourcesContent":["import useSWR, { Fetcher } from \"swr\";\nimport {\n Endpoints,\n APIRequestOptions,\n Client,\n PathsFor,\n Query,\n DEFAULT_API_URL,\n} from \"tonightpass\";\n\nexport const client = new Client({ baseURL: DEFAULT_API_URL });\n\nexport const useAPI = <Path extends PathsFor<\"GET\">>(\n path
|
|
1
|
+
{"version":3,"sources":["../src/hooks/useAPI.ts"],"names":["useSWR","Client","DEFAULT_API_URL","client","useAPI","path","query","options","key"],"mappings":"AAAA,OAAOA,MAAyB,MAChC,OAGE,UAAAC,EAGA,mBAAAC,MACK,cAEA,IAAMC,EAAS,IAAIF,EAAO,CAAE,QAASC,CAAgB,CAAC,EAEhDE,EAAS,CACpBC,EACAC,EACAC,IAIOP,EACLK,EAH6BG,GAAcL,EAAO,IAAIK,EAAKF,EAAOC,CAAO,CAK3E","sourcesContent":["import useSWR, { Fetcher } from \"swr\";\nimport {\n Endpoints,\n APIRequestOptions,\n Client,\n PathsFor,\n Query,\n DEFAULT_API_URL,\n} from \"tonightpass\";\n\nexport const client = new Client({ baseURL: DEFAULT_API_URL });\n\nexport const useAPI = <Path extends PathsFor<\"GET\">>(\n path?: Path | null,\n query?: Query<Path>,\n options?: APIRequestOptions,\n) => {\n const fetcher: Fetcher<any> = (key: Path) => client.get(key, query, options);\n\n return useSWR<Extract<Endpoints, { path: Path; method: \"GET\" }>[\"res\"]>(\n path,\n fetcher,\n );\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tonightpass/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "@tonightpass react sdk.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"types": "dist/index.d.ts",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"swr": "^2.2.5",
|
|
18
|
-
"tonightpass": "^0.0.
|
|
18
|
+
"tonightpass": "^0.0.3"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"react": "*"
|
package/src/hooks/useAPI.ts
CHANGED