-
-
-
-
-
-
Top Repositories
-
-
-
-
+
+
+
+
+
Top Repositories
+
+
+
@@ -23,6 +20,7 @@ import Vue from 'vue';
export default Vue.extend({
name: 'IndexPage',
+ layout: 'LoggedIn',
setup() {
const { $auth } = useContext();
diff --git a/nuxt-pinia-tailwind/pages/sign-in/Signin.test.ts b/nuxt-pinia-tailwind/pages/sign-in/Signin.test.ts
index e338cb5ff..06a508801 100644
--- a/nuxt-pinia-tailwind/pages/sign-in/Signin.test.ts
+++ b/nuxt-pinia-tailwind/pages/sign-in/Signin.test.ts
@@ -6,14 +6,14 @@ describe('
', () => {
it('Should redirect the user when clicking at the signin button', async () => {
// Arrange
const STARTER_API_URL =
- process.env.STARTER_API_URL || 'https://api.starter.dev/api';
+ process.env.STARTER_API_URL ||
+ 'https://api.starter.dev/.netlify/functions/server/api';
const BASE_URL = process.env.BASE_URL || 'http://localhost:3000';
// Redefine window.location in order to mock it
const windowLocation = JSON.stringify(window.location);
- global.window = Object.create(window);
- Object.defineProperty(window, 'location', {
+ Object.defineProperty(globalThis, 'location', {
writable: true,
value: JSON.parse(windowLocation),
});
diff --git a/nuxt-pinia-tailwind/schemes/authScheme.ts b/nuxt-pinia-tailwind/schemes/authScheme.ts
index eeb395cff..54242698c 100644
--- a/nuxt-pinia-tailwind/schemes/authScheme.ts
+++ b/nuxt-pinia-tailwind/schemes/authScheme.ts
@@ -35,7 +35,6 @@ export default class CustomLoginScheme extends LocalScheme {
};
const getOrgs = this.$auth.requestWith(this.name, orgsEndpoint);
- //
// Fetch stars
const starsEndpoint: HTTPRequest = {
@@ -44,7 +43,6 @@ export default class CustomLoginScheme extends LocalScheme {
};
const getStars = this.$auth.requestWith(this.name, starsEndpoint);
- //
const [{ data: orgs }, { data: stars }] = await Promise.all([
getOrgs,
@@ -55,6 +53,8 @@ export default class CustomLoginScheme extends LocalScheme {
...user,
orgs,
stars,
+ orgs_count: orgs.length,
+ stars_count: stars.length,
};
this.$auth.setUser(customUser);
diff --git a/nuxt-pinia-tailwind/tsconfig.node.json b/nuxt-pinia-tailwind/tsconfig.node.json
new file mode 100644
index 000000000..9057a0515
--- /dev/null
+++ b/nuxt-pinia-tailwind/tsconfig.node.json
@@ -0,0 +1,16 @@
+{
+ "compilerOptions": {
+ "composite": true,
+ "module": "esnext",
+ "moduleResolution": "node"
+ },
+ "include": ["vite.config.ts"],
+ "vueCompilerOptions": {
+ "experimentalCompatMode": 2, // delete after migrating to nuxt3
+ "experimentalTemplateCompilerOptions": {
+ "compatConfig": {
+ "MODE": 2
+ } // delete after migrating to nuxt3
+ }
+ }
+}
diff --git a/nuxt-pinia-tailwind/types/user/interfaces.ts b/nuxt-pinia-tailwind/types/user/interfaces.ts
index ee40e4b99..6243806b7 100644
--- a/nuxt-pinia-tailwind/types/user/interfaces.ts
+++ b/nuxt-pinia-tailwind/types/user/interfaces.ts
@@ -55,6 +55,7 @@ export interface IUserApiResponse {
email: string;
hireable: boolean;
bio: string;
+ website_url: string;
twitter_username: string;
public_repos: number;
public_gists: number;
@@ -65,6 +66,6 @@ export interface IUserApiResponse {
}
export interface IUser extends IUserApiResponse {
- orgs: IUserOrg[];
- stars: IUserStar[];
+ orgs_count: number;
+ stars_count: number;
}
diff --git a/nuxt-pinia-tailwind/yarn.lock b/nuxt-pinia-tailwind/yarn.lock
index 45a9a1cc2..e4e7d6ae0 100644
--- a/nuxt-pinia-tailwind/yarn.lock
+++ b/nuxt-pinia-tailwind/yarn.lock
@@ -4123,15 +4123,39 @@
estree-walker "^2.0.2"
magic-string "^0.25.7"
-"@vue/shared@3.2.33":
+"@vue/reactivity@3.2.40":
+ version "3.2.40"
+ resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.40.tgz#ae65496f5b364e4e481c426f391568ed7d133cca"
+ integrity sha512-N9qgGLlZmtUBMHF9xDT4EkD9RdXde1Xbveb+niWMXuHVWQP5BzgRmE3SFyUBBcyayG4y1lhoz+lphGRRxxK4RA==
+ dependencies:
+ "@vue/shared" "3.2.40"
+
+"@vue/runtime-core@3.2.40":
+ version "3.2.40"
+ resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.40.tgz#e814358bf1b0ff6d4a6b4f8f62d9f341964fb275"
+ integrity sha512-U1+rWf0H8xK8aBUZhnrN97yoZfHbjgw/bGUzfgKPJl69/mXDuSg8CbdBYBn6VVQdR947vWneQBFzdhasyzMUKg==
+ dependencies:
+ "@vue/reactivity" "3.2.40"
+ "@vue/shared" "3.2.40"
+
+"@vue/runtime-dom@^3.2.40":
+ version "3.2.40"
+ resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.40.tgz#975119feac5ab703aa9bbbf37c9cc966602c8eab"
+ integrity sha512-AO2HMQ+0s2+MCec8hXAhxMgWhFhOPJ/CyRXnmTJ6XIOnJFLrH5Iq3TNwvVcODGR295jy77I6dWPj+wvFoSYaww==
+ dependencies:
+ "@vue/runtime-core" "3.2.40"
+ "@vue/shared" "3.2.40"
+ csstype "^2.6.8"
+
+"@vue/shared@3.2.33", "@vue/shared@^3.2.26":
version "3.2.33"
resolved "https://registry.npmjs.org/@vue/shared/-/shared-3.2.33.tgz"
integrity sha512-UBc1Pg1T3yZ97vsA2ueER0F6GbJebLHYlEi4ou1H5YL4KWvMOOWwpYo9/QpWq93wxKG6Wo13IY74Hcn/f7c7Bg==
-"@vue/shared@^3.2.26":
- version "3.2.39"
- resolved "https://registry.npmjs.org/@vue/shared/-/shared-3.2.39.tgz"
- integrity sha512-D3dl2ZB9qE6mTuWPk9RlhDeP1dgNRUKC3NJxji74A4yL8M2MwlhLKUC/49WHjrNzSPug58fWx/yFbaTzGAQSBw==
+"@vue/shared@3.2.40":
+ version "3.2.40"
+ resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.40.tgz#e57799da2a930b975321981fcee3d1e90ed257ae"
+ integrity sha512-0PLQ6RUtZM0vO3teRfzGi4ltLUO5aO+kLgwh4Um3THSR03rpQWLTuRCkuO5A41ITzwdWeKdPHtSARuPkoo5pCQ==
"@vue/test-utils@^1.1.0", "@vue/test-utils@^1.3.0":
version "1.3.0"
@@ -6664,6 +6688,11 @@ csstype@^2.5.7:
resolved "https://registry.npmjs.org/csstype/-/csstype-2.6.20.tgz"
integrity sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA==
+csstype@^2.6.8:
+ version "2.6.21"
+ resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.21.tgz#2efb85b7cc55c80017c66a5ad7cbd931fda3a90e"
+ integrity sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==
+
csstype@^3.0.2:
version "3.0.11"
resolved "https://registry.npmjs.org/csstype/-/csstype-3.0.11.tgz"