@alfabit/keycloak 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/package.json +2 -11
- package/src/index.ts +0 -1
- package/src/plugins/keycloak.ts +8 -8
- package/tsconfig.app.json +0 -25
- package/tsconfig.json +0 -11
- package/tsconfig.node.json +0 -39
- package/vite.config.ts +0 -38
package/package.json
CHANGED
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfabit/keycloak",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"main": "src/index.ts",
|
|
8
|
-
"style": "output/index.css",
|
|
9
8
|
"files": [
|
|
10
|
-
"
|
|
11
|
-
"build/*",
|
|
12
|
-
"src/*",
|
|
13
|
-
"scripts/*",
|
|
14
|
-
"tsconfig.app.json",
|
|
15
|
-
"tsconfig.json",
|
|
16
|
-
"tsconfig.node.json",
|
|
17
|
-
"vite.config.ts",
|
|
18
|
-
"yarn.lock"
|
|
9
|
+
"src/*"
|
|
19
10
|
],
|
|
20
11
|
"scripts": {
|
|
21
12
|
"pub": "npm publish",
|
package/src/index.ts
CHANGED
package/src/plugins/keycloak.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, ref, type App, type Ref } from 'vue';
|
|
2
|
-
import { createKeycloakInit, getAuthMethods, keycloakInit
|
|
2
|
+
import { createKeycloakInit, getAuthMethods, keycloakInit } from '../composables';
|
|
3
3
|
|
|
4
4
|
interface KeycloakPluginOptions {
|
|
5
5
|
dontChangeRedirectUri?: Ref<boolean>;
|
|
@@ -30,14 +30,14 @@ export const createKeycloak = (options: KeycloakPluginOptions = {}) => {
|
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
export const keycloakPlugin = {
|
|
33
|
-
install(
|
|
33
|
+
install(_: App, options: KeycloakPluginOptions = {}) {
|
|
34
34
|
createKeycloak(options);
|
|
35
|
-
app.config.globalProperties.$keycloak = useKeycloak();
|
|
35
|
+
//app.config.globalProperties.$keycloak = useKeycloak();
|
|
36
36
|
},
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
declare module '@vue/runtime-core' {
|
|
40
|
-
interface ComponentCustomProperties {
|
|
41
|
-
$keycloak: IUseKeycloak;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
39
|
+
//declare module '@vue/runtime-core' {
|
|
40
|
+
// interface ComponentCustomProperties {
|
|
41
|
+
// $keycloak: IUseKeycloak;
|
|
42
|
+
// }
|
|
43
|
+
//}
|
package/tsconfig.app.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
5
|
-
/* Linting */
|
|
6
|
-
"strict": true,
|
|
7
|
-
"noUnusedLocals": true,
|
|
8
|
-
"noUnusedParameters": true,
|
|
9
|
-
"noFallthroughCasesInSwitch": true,
|
|
10
|
-
"noUncheckedSideEffectImports": true,
|
|
11
|
-
"allowJs": true,
|
|
12
|
-
"types": [
|
|
13
|
-
"node"
|
|
14
|
-
]
|
|
15
|
-
},
|
|
16
|
-
"include": [
|
|
17
|
-
"src/**/*.ts",
|
|
18
|
-
"src/**/*.tsx",
|
|
19
|
-
"src/**/*.vue",
|
|
20
|
-
"index.ts",
|
|
21
|
-
"src/composables/use-chat.ts",
|
|
22
|
-
"chatra.d.ts",
|
|
23
|
-
"types.d.ts"
|
|
24
|
-
]
|
|
25
|
-
}
|
package/tsconfig.json
DELETED
package/tsconfig.node.json
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
4
|
-
"target": "ES2022",
|
|
5
|
-
"lib": [
|
|
6
|
-
"ES2023",
|
|
7
|
-
"DOM"
|
|
8
|
-
],
|
|
9
|
-
"module": "ESNext",
|
|
10
|
-
"skipLibCheck": true,
|
|
11
|
-
/* Bundler mode */
|
|
12
|
-
"moduleResolution": "bundler",
|
|
13
|
-
"allowImportingTsExtensions": true,
|
|
14
|
-
"isolatedModules": true,
|
|
15
|
-
"moduleDetection": "force",
|
|
16
|
-
"noEmit": true,
|
|
17
|
-
/* Linting */
|
|
18
|
-
"strict": true,
|
|
19
|
-
"noUnusedLocals": true,
|
|
20
|
-
"noUnusedParameters": true,
|
|
21
|
-
"noFallthroughCasesInSwitch": true,
|
|
22
|
-
"noUncheckedSideEffectImports": true,
|
|
23
|
-
"declaration": true,
|
|
24
|
-
"emitDeclarationOnly": true,
|
|
25
|
-
"outDir": "dist",
|
|
26
|
-
// "moduleResolution": "Node",
|
|
27
|
-
"jsx": "preserve",
|
|
28
|
-
"esModuleInterop": true,
|
|
29
|
-
"types": [
|
|
30
|
-
"vite/client"
|
|
31
|
-
]
|
|
32
|
-
},
|
|
33
|
-
"include": [
|
|
34
|
-
"vite.config.ts",
|
|
35
|
-
"src/**/*.ts",
|
|
36
|
-
"src/**/*.d.ts",
|
|
37
|
-
"src/**/*.vue",
|
|
38
|
-
]
|
|
39
|
-
}
|
package/vite.config.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vite';
|
|
2
|
-
import Vue from '@vitejs/plugin-vue';
|
|
3
|
-
import VueI18n from '@intlify/unplugin-vue-i18n/vite';
|
|
4
|
-
import { resolve, dirname } from 'node:path';
|
|
5
|
-
import { fileURLToPath } from 'node:url';
|
|
6
|
-
|
|
7
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
-
const __dirname = dirname(__filename);
|
|
9
|
-
|
|
10
|
-
const IS_PROD = process.env.NODE_ENV === 'production';
|
|
11
|
-
const IS_DEV = !IS_PROD;
|
|
12
|
-
|
|
13
|
-
// https://vite.dev/config/
|
|
14
|
-
export default defineConfig({
|
|
15
|
-
plugins: [
|
|
16
|
-
Vue(),
|
|
17
|
-
VueI18n({
|
|
18
|
-
// Path to your locales directory
|
|
19
|
-
include: resolve(__dirname, './src/i18n/**'),
|
|
20
|
-
}),
|
|
21
|
-
],
|
|
22
|
-
build: {
|
|
23
|
-
chunkSizeWarningLimit: 10000,
|
|
24
|
-
rollupOptions: {
|
|
25
|
-
output: {
|
|
26
|
-
manualChunks: (id: string) => {
|
|
27
|
-
if (id.includes('src/constants/')) return 'ui-core-constants';
|
|
28
|
-
if (id.includes('src/plugins/')) return 'ui-core-plugins';
|
|
29
|
-
if (id.includes('src/composables/')) return 'ui-core-composables';
|
|
30
|
-
return null;
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
sourcemap: IS_DEV,
|
|
36
|
-
cssCodeSplit: IS_DEV,
|
|
37
|
-
},
|
|
38
|
-
});
|