Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
dotcms-js
Advanced tools
Set of components and services which allow you to connect to use data from a dotCMS installation
This is a library of services and components to interact with a DotCMS instance from Angular 2.
npm install dotcms-js --save
import {APP_CONFIG, DOT_CONFIG} from "dotcms-js/core/app.config";
import {FileSystemService} from "dotcms-js/core/util/filesystem.service";
import {HttpClient} from "dotcms-js/core/util/http.service";
import {JWTAuthService} from "dotcms-js/core/util/jwt-auth.service";
import {LocalStoreService} from "dotcms-js/core/util/local-store.service";
import {LoggerService} from "dotcms-js/core/util/logger.service";
import {NotificationService} from "dotcms-js/core/util/notification.service";
import {SettingsStorageService} from "dotcms-js/core/util/settings-storage.service";
import {SiteBrowserService} from "dotcms-js/core/util/site-browser.service";
import {SiteBrowserState} from "dotcms-js/core/util/site-browser.state";
@NgModule({
providers: [
{provide: APP_CONFIG, useValue: DOT_CONFIG},
{provide: FileSystemService, useClass: FileSystemService},
{provide: HttpClient, useClass: HttpClient},
{provide: JWTAuthService, useClass: JWTAuthService},
{provide: LocalStoreService, useClass: LocalStoreService},
{provide: LoggerService, useClass: LoggerService},
{provide: NotificationService, useClass: NotificationService},
{provide: SettingsStorageService, useClass: SettingsStorageService},
{provide: SiteBrowserService, useClass: SiteBrowserService},
{provide: SiteBrowserState, useClass: SiteBrowserState}
],
})
In order to start using the components you need to make sure you have a Auth Token. To get it we provide a login
method in the JWTAuthService
class.
If the login it's succefull the login
method will save an Auth Token to the localStorage in the browser so other services can use it, more info in our documentation.
In this example we are doing the login from the app.component.ts
but you can do it from aywhere you need.
import {Component, ViewEncapsulation} from '@angular/core';
import {JWTAuthService} from "dotcms-js/core/util/jwt-auth.service";
@Component({
selector: 'my-app',
template: '<h1>My App Component</h1>',
})
export class AppComponent {
constructor(authService: JWTAuthService) {
authService.login("http://demo.dotcms.com", "admin@dotcms.com", "admin").subscribe(token => {
console.log('Login successfully');
}, (err) => {
console.log('Error on login', err);
});
}
}
import {BreadcrumbComponent} from "dotcms-js/components/breadcrumb/breadcrumb.componet";
@NgModule({
declarations: [
BreadcrumbComponent
],
})
<breadcrumb></breadcrumb>
Initial commit
After you clone the repo
npm i
typings install
npm run build
FAQs
DotCMS UI Angular App
The npm package dotcms-js receives a total of 5 weekly downloads. As such, dotcms-js popularity was classified as not popular.
We found that dotcms-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.