Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

enonic-types

Package Overview
Dependencies
Maintainers
1
Versions
179
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enonic-types - npm Package Compare versions

Comparing version 7.12.2 to 7.13.0

2

modules/react4xp.d.ts
declare module "*/lib/enonic/react4xp" {
const lib: typeof import("@item-enonic-types/lib-react4xp");
const lib: typeof import("@enonic-types/lib-react4xp");
export = lib;
}
{
"name": "enonic-types",
"sideEffects": false,
"version": "7.12.2",
"version": "7.13.0",
"description": "TypeScript types for Enonic XP",

@@ -27,11 +27,12 @@ "typings": "index.d.ts",

"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.56.0",
"@typescript-eslint/parser": "^5.56.0",
"eslint": "^8.36.0",
"@enonic-types/lib-react4xp": "^4.0.0",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.8.6",
"rimraf": "^4.4.0",
"tsd": "^0.28.0",
"typescript": "^5.0.2"
"eslint-plugin-prettier": "^5.0.0",
"prettier": "^3.0.0",
"rimraf": "^5.0.1",
"tsd": "^0.28.1",
"typescript": "^5.1.6"
},

@@ -42,33 +43,33 @@ "workspaces": [

"dependencies": {
"@enonic-types/core": "^7.12.2",
"@enonic-types/global": "^7.12.2",
"@enonic-types/lib-admin": "^7.12.2",
"@enonic-types/lib-app": "^7.12.2",
"@enonic-types/lib-auditlog": "^7.12.2",
"@enonic-types/lib-auth": "^7.12.2",
"@enonic-types/lib-cluster": "^7.12.2",
"@enonic-types/lib-common": "^7.12.2",
"@enonic-types/lib-content": "^7.12.2",
"@enonic-types/lib-context": "^7.12.2",
"@enonic-types/lib-event": "^7.12.2",
"@enonic-types/lib-export": "^7.12.2",
"@enonic-types/lib-grid": "^7.12.2",
"@enonic-types/lib-i18n": "^7.12.2",
"@enonic-types/lib-io": "^7.12.2",
"@enonic-types/lib-mail": "^7.12.2",
"@enonic-types/lib-node": "^7.12.2",
"@enonic-types/lib-portal": "^7.12.2",
"@enonic-types/lib-project": "^7.12.2",
"@enonic-types/lib-repo": "^7.12.2",
"@enonic-types/lib-scheduler": "^7.12.2",
"@enonic-types/lib-schema": "^7.12.2",
"@enonic-types/lib-task": "^7.12.2",
"@enonic-types/lib-value": "^7.12.2",
"@enonic-types/lib-vhost": "^7.12.2",
"@enonic-types/lib-websocket": "^7.12.2",
"@item-enonic-types/lib-cache": "^2.1.1",
"@enonic-types/core": "^7.13.0",
"@enonic-types/global": "^7.13.0",
"@enonic-types/lib-admin": "^7.13.0",
"@enonic-types/lib-app": "^7.13.0",
"@enonic-types/lib-auditlog": "^7.13.0",
"@enonic-types/lib-auth": "^7.13.0",
"@enonic-types/lib-cluster": "^7.13.0",
"@enonic-types/lib-common": "^7.13.0",
"@enonic-types/lib-content": "^7.13.0",
"@enonic-types/lib-context": "^7.13.0",
"@enonic-types/lib-event": "^7.13.0",
"@enonic-types/lib-export": "^7.13.0",
"@enonic-types/lib-grid": "^7.13.0",
"@enonic-types/lib-i18n": "^7.13.0",
"@enonic-types/lib-io": "^7.13.0",
"@enonic-types/lib-mail": "^7.13.0",
"@enonic-types/lib-node": "^7.13.0",
"@enonic-types/lib-portal": "^7.13.0",
"@enonic-types/lib-project": "^7.13.0",
"@enonic-types/lib-repo": "^7.13.0",
"@enonic-types/lib-scheduler": "^7.13.0",
"@enonic-types/lib-schema": "^7.13.0",
"@enonic-types/lib-task": "^7.13.0",
"@enonic-types/lib-value": "^7.13.0",
"@enonic-types/lib-vhost": "^7.13.0",
"@enonic-types/lib-websocket": "^7.13.0",
"@item-enonic-types/global": "^7.13.0",
"@item-enonic-types/lib-cache": "^2.2.0",
"@item-enonic-types/lib-cron": "^1.1.1",
"@item-enonic-types/lib-explorer": "^3.20.6",
"@item-enonic-types/lib-explorer": "^3.20.6-patch1",
"@item-enonic-types/lib-freemarker": "^2.0.2",
"@item-enonic-types/global": "^7.12.2",
"@item-enonic-types/lib-graphql": "^2.0.2",

@@ -78,17 +79,16 @@ "@item-enonic-types/lib-graphql-playground": "^0.0.1",

"@item-enonic-types/lib-http-client": "^3.2.1",
"@item-enonic-types/lib-menu": "4.2.0-patch1",
"@item-enonic-types/lib-menu": "^4.2.1",
"@item-enonic-types/lib-mustache": "^2.1.0",
"@item-enonic-types/lib-notifications": "^2.0.0",
"@item-enonic-types/lib-qrcode": "^2.0.2",
"@item-enonic-types/lib-react4xp": "^2.0.0",
"@item-enonic-types/lib-recaptcha": "^3.0.0",
"@item-enonic-types/lib-recaptcha": "^3.0.1",
"@item-enonic-types/lib-router": "^3.0.0",
"@item-enonic-types/lib-sql": "^1.0.0",
"@item-enonic-types/lib-static": "^1.0.2",
"@item-enonic-types/lib-testing": "^7.12.2",
"@item-enonic-types/lib-testing": "^7.13.0",
"@item-enonic-types/lib-text-encoding": "^2.1.0",
"@item-enonic-types/lib-thymeleaf": "^2.1.0",
"@item-enonic-types/lib-xslt": "^2.1.1",
"@item-enonic-types/lib-turbo-streams": "^1.0.4"
"@item-enonic-types/lib-turbo-streams": "^1.0.4",
"@item-enonic-types/lib-xslt": "^2.1.1"
}
}

@@ -99,15 +99,20 @@ # TypeScript types for Enonic XP

if (content !== null) { // 4
const article: Article = content.data;
assertIsDefined(content); // 4
return {
status: 200,
body: article
}
} else {
return {
status: 404
};
const article: Article = content.data;
return {
status: 200,
body: article
}
}
/**
* Create this function in a utilities file of your choice...
*/
function assertIsDefined<T>(value: T): asserts value is NonNullable<T> {
if (value === undefined || value === null) {
throw new Error(`${value} is not defined`);
}
}
```

@@ -118,3 +123,3 @@

3. We use `XP.Request` and `XP.Response` to control the shape of our controller.
4. `content` is of the type `Content<Article> | null`, so we have to do a null check before proceeding.
4. `content` is of the type `Content<Article> | null`, but we can "assert" that it is not nullable (or throw an exception here if it is).

@@ -143,2 +148,2 @@ ## Supported libraries

* [ThymeleafLibrary](./packages/thymeleaf)
* [XsltLibrary](./packages/xslt)
* [XsltLibrary](./packages/xslt)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc