Skip to content

Commit 7b140a6

Browse files
Merge pull request #54 from 3nethz/feat/vue-sdk
Rename api.ts to auth-api.ts and update workspace dependencies
2 parents 0f52f2b + 95103e9 commit 7b140a6

File tree

8 files changed

+36
-43
lines changed

8 files changed

+36
-43
lines changed

packages/vue/.eslintrc.cjs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,7 @@
1919
const path = require('path');
2020

2121
module.exports = {
22-
extends: [
23-
'plugin:@wso2/typescript',
24-
// 'plugin:@wso2/vue',
25-
'plugin:@wso2/strict',
26-
'plugin:@wso2/internal',
27-
'plugin:@wso2/prettier',
28-
],
22+
extends: ['plugin:@wso2/typescript', 'plugin:@wso2/strict', 'plugin:@wso2/internal', 'plugin:@wso2/prettier'],
2923
parserOptions: {
3024
project: [path.resolve(__dirname, 'tsconfig.json'), path.resolve(__dirname, 'tsconfig.eslint.json')],
3125
},

packages/vue/package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@
3939
"dev": "rollup -c -w",
4040
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts",
4141
"lint:fix": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
42-
"type-check": "vue-tsc --noEmit",
43-
"test": "vitest --config src/vitest.config.ts --environment=jsdom --run --passWithNoTests",
44-
"prepublishOnly": "npm run build"
42+
"typecheck": "vue-tsc --noEmit",
43+
"test": "vitest --config src/vitest.config.ts --environment=jsdom --run --passWithNoTests"
4544
},
4645
"publishConfig": {
4746
"access": "public"
@@ -70,19 +69,19 @@
7069
"stylelint": "15.1.0",
7170
"tslib": "^2.6.2",
7271
"typescript": "5.1.6",
73-
"vue-tsc": "^2.2.2",
74-
"vitest": "^3.0.8"
72+
"vitest": "^3.0.8",
73+
"vue-tsc": "^2.2.2"
7574
},
7675
"dependencies": {
7776
"@asgardeo/auth-spa": "^3.1.4",
7877
"@asgardeo/js": "*",
78+
"@vitejs/plugin-vue": "^5.0.0",
7979
"base64url": "^3.0.1",
8080
"buffer": "^6.0.3",
8181
"clsx": "^2.1.1",
8282
"fast-sha256": "^1.3.0",
8383
"jose": "^5.3.0",
84-
"randombytes": "^2.1.0",
85-
"@vitejs/plugin-vue": "^5.0.0"
84+
"randombytes": "^2.1.0"
8685
},
8786
"peerDependencies": {
8887
"vue": ">=3.5.13"

packages/vue/src/plugins/AsgardeoPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
} from '@asgardeo/auth-spa';
3535
import type {Plugin, Ref, App, Reactive} from 'vue';
3636
import {reactive, ref} from 'vue';
37-
import AuthAPI from '../api';
37+
import AuthAPI from '../auth-api';
3838
import type {AuthContextInterface, AuthParams, AuthStateInterface, AuthVueConfig} from '../types';
3939

4040
export type AsgardeoPluginOptions = AuthVueConfig;

packages/vue/src/tests/AsgardeoPlugin.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ import {
2929
import {describe, it, expect, beforeEach, vi, Mock} from 'vitest';
3030
import {createApp} from 'vue';
3131
import {mockAuthAPI, mockState, mockConfig} from './mocks/mocks';
32-
import AuthAPI from '../api';
32+
import AuthAPI from '../auth-api';
3333
import {asgardeoPlugin, ASGARDEO_INJECTION_KEY} from '../plugins/AsgardeoPlugin';
3434
import {AuthContextInterface, AuthStateInterface} from '../types';
3535

36-
vi.mock('../api');
36+
vi.mock('../auth-api');
3737
vi.mock('@asgardeo/auth-spa');
3838

3939
vi.mocked(AuthAPI).mockImplementation(() => mockAuthAPI as unknown as AuthAPI);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import {
3131
} from '@asgardeo/auth-spa';
3232
import {describe, it, expect, beforeEach, vi, Mock} from 'vitest';
3333
import {MockAsgardeoAuthException, asgardeoAuthSPAMock} from './mocks/mocks';
34-
import AuthAPI from '../api';
34+
import AuthAPI from '../auth-api';
3535
import {type AuthStateInterface, type AuthVueConfig} from '../types';
3636

3737
vi.doMock('@asgardeo/auth-spa', () => asgardeoAuthSPAMock);

pnpm-lock.yaml

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ packages:
44
- "recipes/*"
55

66
catalog:
7-
"@wso2/eslint-plugin": "https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/eslint-plugin?21281faa4f8354491747075f40f58b497d0c4730"
8-
"@wso2/prettier-config": "https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/prettier-config?21281faa4f8354491747075f40f58b497d0c4730"
9-
"@wso2/stylelint-config": "https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/stylelint-config?21281faa4f8354491747075f40f58b497d0c4730"
7+
"@wso2/eslint-plugin": "https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/eslint-plugin?4ee6f6be232d7631999d709a86b91612f1d34ce7"
8+
"@wso2/prettier-config": "https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/prettier-config?4ee6f6be232d7631999d709a86b91612f1d34ce7"
9+
"@wso2/stylelint-config": "https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/stylelint-config?4ee6f6be232d7631999d709a86b91612f1d34ce7"
1010
"eslint": "~8.57.0"

0 commit comments

Comments
 (0)