Skip to content

Commit

Permalink
Issue # KN-961 Angular Migration 15 and vulnerabilities fixes (#115)
Browse files Browse the repository at this point in the history
* Issue KN-961 feat: updated package lock file

* Issue KN-961 feat: updated package lock file

* Issue KN-961 feat: Angular version updated to 15

* Issue KN-961 feat: updated player versions

* Issue KN-961 chore: updated node js version of circleci

* Issue KN-961 feat: eslint ignore added

* Issue KN-961 chore: updated package lock file

* Issue  #KN-961 feat:Updated eslint versions

* Issue #KN-961 fix: updated the player dependences version

* Issue #KN-961 fix: updated the player dependences version

* Issue #KN-961 feat: updated the circleci image to latest

* Issue #KN-961 feat: updated the circleci image to latest

* Issue #KN-961 feat: updated the circleci image to latest

* Issue #KN-961 feat: updated the circleci image to latest

* Issue #KN-961 feat: updated the circleci image to latest

* Issue #KN-961 feat: updated the dependecy

* Issue #KN-961 doc: updated the installation steps

* Issue #KN-961 feat: reverted image to LTS

* Issue #KN-961 fix: updated angular json

* Issue #KN-961 fix: updated angular json

* Issue #KN-961 feat: updated the circleci image to latest

* Issue #KN-961 feat: updated the circleci image to latest

* Issue #KN-961 feat: updated the circleci image to latest

* Issue #KN-961 feat: updated the circleci image to latest

* Issue #KN-961 feat: updated the circleci image to latest

* Issue #KN-961 feat: updated the circleci image to latest

* Issue #KN-961 feat:  revert - updated the circleci image to latest

* Issue #KN-961 feat: updated circleci steps
  • Loading branch information
HarishGangula authored Jan 31, 2024
1 parent 7c11244 commit 9babe70
Show file tree
Hide file tree
Showing 24 changed files with 14,092 additions and 14,470 deletions.
15 changes: 5 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,19 @@ jobs:
build:
working_directory: ~/sunbird-pdf-player
docker:
- image: circleci/node:14.18.2-browsers
- image: circleci/node:16.13.1-browsers
steps:
- checkout:
path: ~/sunbird-pdf-player
- run:
name: Show current branch
command: echo ${CIRCLE_BRANCH}
- run:
environment:
NG_CLI_ANALYTICS: "ci"
command: npm install
- run: cd projects/sunbird-pdf-player && sudo npm install
name: Install dependecies and audit for critical
command: cd projects/sunbird-pdf-player && npm install --no-progress --legacy-peer-deps && npx audit-ci@^6 --config ./audit-ci.jsonc
- run:
name: Node install
command: sudo npm install
- run:
name: Linting
command: npm run lint
name: ng lint
command: cd ~/sunbird-pdf-player && npm install --no-progress --legacy-peer-deps && npm run lint
- run:
name: Testing
command: npm run test
Expand Down
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/node_modules
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### Note:
This version of the angular library is compatilbe with angular version 15 and may not work with older versions of the angular 15 Apps.

## The PDF player for the Sunbird!

The PDF player library is powered by Angular. This player is primarily designed to be used on Sunbird consumption platforms _(mobile app, web portal, offline desktop app)_ to drive reusability and maintainability, hence reducing the redundant development effort significantly, and it can be integrated with any platform irrespective of the platforms and the frontend frameworks. It is exported not only as an angular library but also as a web component. 
Expand All @@ -15,12 +18,6 @@ Follow below-mentioned steps to use it in plain javascript project:
```javascript
<script type="text/javascript" src="sunbird-pdf-player.js"></script>
```
- Update below script in index.html file
```javascript
<script src="https://cdnjs.cloudflare.com/ajax/libs/reflect-metadata/0.1.13/Reflect.min.js"
integrity="sha512-jvbPH2TH5BSZumEfOJZn9IV+5bSwwN+qG4dvthYe3KCGC3/9HmxZ4phADbt9Pfcp+XSyyfc2vGZ/RMsSUZ9tbQ=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
```

- Get sample playerConfig from here: [playerConfig](https://github.com/Sunbird-Knowlg/sunbird-pdf-player/blob/release-5.5.0/src/app/data.ts)

Expand Down
3 changes: 2 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@
"./node_modules/@project-sunbird/sb-styles/assets/_styles.scss"
],
"scripts": [
"node_modules/@project-sunbird/telemetry-sdk/index.js"
"node_modules/@project-sunbird/telemetry-sdk/index.js",
"node_modules/reflect-metadata/Reflect.js"
],
"vendorChunk": true,
"extractLicenses": false,
Expand Down
1 change: 1 addition & 0 deletions build-wc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const build = async () => {
const files = [
"./dist/pdf-player-wc/runtime.js",
"./dist/pdf-player-wc/polyfills.js",
"./dist/pdf-player-wc/scripts.js",
"./dist/pdf-player-wc/vendor.js",
"./dist/pdf-player-wc/main.js"
];
Expand Down
Loading

0 comments on commit 9babe70

Please sign in to comment.