Skip to content

Commit 010d73e

Browse files
Introduce @asgardeo/angular SDK
1 parent 103b83d commit 010d73e

35 files changed

Lines changed: 3149 additions & 34 deletions

packages/angular/.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/dist
2+
/build
3+
/node_modules
4+
/coverage

packages/angular/.eslintrc.cjs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
* Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).
3+
*
4+
* WSO2 LLC. licenses this file to you under the Apache License,
5+
* Version 2.0 (the "License"); you may not use this file except
6+
* in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing,
12+
* software distributed under the License is distributed on an
13+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
* KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations
16+
* under the License.
17+
*/
18+
19+
const path = require('path');
20+
21+
module.exports = {
22+
extends: ['plugin:@wso2/typescript', 'plugin:@wso2/strict', 'plugin:@wso2/internal', 'plugin:@wso2/prettier'],
23+
parserOptions: {
24+
project: [path.resolve(__dirname, 'tsconfig.json'), path.resolve(__dirname, 'tsconfig.eslint.json')],
25+
},
26+
plugins: ['@wso2'],
27+
rules: {
28+
'import/no-extraneous-dependencies': ['error', {devDependencies: true}],
29+
'no-underscore-dangle': ['off'],
30+
},
31+
};
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/**
2+
* Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).
3+
*
4+
* WSO2 LLC. licenses this file to you under the Apache License,
5+
* Version 2.0 (the "License"); you may not use this file except
6+
* in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing,
12+
* software distributed under the License is distributed on an
13+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
* KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations
16+
* under the License.
17+
*/
18+
19+
import {readFileSync} from 'fs';
20+
import {build} from 'esbuild';
21+
22+
const pkg = JSON.parse(readFileSync('./package.json', 'utf8'));
23+
24+
const commonOptions = {
25+
bundle: true,
26+
entryPoints: ['src/index.ts'],
27+
external: [...Object.keys(pkg.dependencies || {}), ...Object.keys(pkg.peerDependencies || {})],
28+
metafile: true,
29+
platform: 'browser',
30+
target: ['es2020'],
31+
};
32+
33+
await build({
34+
...commonOptions,
35+
format: 'esm',
36+
outfile: 'dist/index.js',
37+
sourcemap: true,
38+
});
39+
40+
await build({
41+
...commonOptions,
42+
format: 'cjs',
43+
outfile: 'dist/cjs/index.js',
44+
sourcemap: true,
45+
});

packages/angular/package.json

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"name": "@asgardeo/angular",
3+
"version": "0.1.0",
4+
"description": "Angular implementation of Asgardeo JavaScript SDK.",
5+
"keywords": [
6+
"asgardeo",
7+
"angular",
8+
"spa",
9+
"authentication",
10+
"oidc"
11+
],
12+
"homepage": "https://github.com/asgardeo/javascript/tree/main/packages/angular#readme",
13+
"bugs": {
14+
"url": "https://github.com/asgardeo/javascript/issues"
15+
},
16+
"author": "WSO2",
17+
"license": "Apache-2.0",
18+
"type": "module",
19+
"main": "dist/cjs/index.js",
20+
"module": "dist/index.js",
21+
"exports": {
22+
"import": "./dist/index.js",
23+
"require": "./dist/cjs/index.js"
24+
},
25+
"files": [
26+
"dist",
27+
"README.md",
28+
"LICENSE"
29+
],
30+
"types": "dist/index.d.ts",
31+
"repository": {
32+
"type": "git",
33+
"url": "https://github.com/asgardeo/javascript",
34+
"directory": "packages/angular"
35+
},
36+
"scripts": {
37+
"build": "pnpm clean && node esbuild.config.mjs && tsc -p tsconfig.lib.json --emitDeclarationOnly --outDir dist",
38+
"clean": "rimraf dist",
39+
"fix:lint": "eslint . --ext .js,.ts,.cjs,.mjs",
40+
"lint": "eslint . --ext .js,.ts,.cjs,.mjs",
41+
"test": "vitest",
42+
"typecheck": "tsc -p tsconfig.lib.json"
43+
},
44+
"devDependencies": {
45+
"@types/node": "22.15.3",
46+
"@wso2/eslint-plugin": "catalog:",
47+
"@wso2/prettier-config": "catalog:",
48+
"esbuild": "0.25.9",
49+
"eslint": "8.57.0",
50+
"jsdom": "26.1.0",
51+
"prettier": "2.6.2",
52+
"rimraf": "6.1.0",
53+
"typescript": "5.7.2",
54+
"vitest": "3.1.3"
55+
},
56+
"peerDependencies": {
57+
"@angular/common": ">=17.0.0",
58+
"@angular/core": ">=17.0.0",
59+
"@angular/router": ">=17.0.0",
60+
"rxjs": ">=7.0.0"
61+
},
62+
"dependencies": {
63+
"@asgardeo/browser": "workspace:*",
64+
"@asgardeo/i18n": "workspace:*",
65+
"tslib": "2.8.1"
66+
},
67+
"publishConfig": {
68+
"access": "public"
69+
}
70+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).
3+
*
4+
* WSO2 LLC. licenses this file to you under the Apache License,
5+
* Version 2.0 (the "License"); you may not use this file except
6+
* in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing,
12+
* software distributed under the License is distributed on an
13+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
* KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations
16+
* under the License.
17+
*/
18+
19+
module.exports = require('@wso2/prettier-config');

0 commit comments

Comments
 (0)