Skip to content

Commit 20a62c9

Browse files
author
Alfred Brockotter
committed
perf: Renamed to kentico kontent
1 parent 60707c6 commit 20a62c9

File tree

6 files changed

+57
-88
lines changed

6 files changed

+57
-88
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,38 @@
22
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
33
[![NPM](https://nodei.co/npm/kenticocloud-nuxt-module.png?mini=true)](https://npmjs.org/package/kenticocloud-nuxt-module)
44

5-
# kenticocloud-nuxt-module
6-
Add kentico cloud super power to your nuxt app
5+
# kentico-kontent-nuxt-module
6+
Add kentico kontent super power to your nuxt app
77

88
## Features
99

10-
The module makes it easy to do delivery client api calls via the [Kentico Cloud Delivery SDK](https://github.com/Enngage/kentico-cloud-js/blob/master/packages/delivery/README.md).
10+
The module makes it easy to do delivery client api calls via the [Kentico kontent Delivery SDK](https://github.com/Kentico/kentico-kontent-js/tree/master/packages/delivery/README.md).
1111

1212
## Quick start
1313
- Install via npm
1414

1515
```
16-
npm i kenticocloud-nuxt-module --save
17-
npm i rxjs --save (because this is a peer dependency of the Kentico Cloud Delivery SDK)
16+
npm i kentico-kontent-nuxt-module --save
17+
npm i rxjs --save (because this is a peer dependency of the Kentico Kontent Delivery SDK)
1818
1919
```
2020

21-
- Add `kenticocloud-nuxt-module` to `modules` section of `nuxt.config.js`
21+
- Add `kentico-kontent-nuxt-module` to `modules` section of `nuxt.config.js`
2222

2323
```js
2424

2525
/*
2626
** Nuxt.js modules
2727
*/
2828
modules: [
29-
'kenticocloud-nuxt-module'
29+
'kentico-kontent-nuxt-module'
3030
],
31-
kenticocloud: {
31+
kenticokontent: {
3232
projectId: 'xxxx-xxx-xxxx-xxxx-xxxxx',
3333
enableAdvancedLogging: false,
3434
previewApiKey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxx',
3535
enablePreviewMode: true,
36-
baseUrl: 'https://custom.uri/api/KenticoCloudProxy',
36+
baseUrl: 'https://custom.uri/api/KenticoKontentProxy',
3737
securedApiKey: 'xxx',
3838
enableSecuredMode: true
3939
},
@@ -49,7 +49,7 @@ npm i rxjs --save (because this is a peer dependency of the Kentico Cloud Delive
4949

5050
```
5151
## Note:
52-
By default Nuxt can only work with promises. Therefor you always use the "toPromise" method provided by the Kentico Cloud Delivery SDK! RxJs operator's are not supported at the moment.
52+
By default Nuxt can only work with promises. Therefor you always use the "toPromise" method provided by the Kentico Kontent Delivery SDK! RxJs operator's are not supported at the moment.
5353

5454
## Caching
5555
API calls can be "cached" (they will be stored in memory) client side via the "viaCache" method.
@@ -64,22 +64,22 @@ API calls can be "cached" (they will be stored in memory) client side via the "v
6464

6565
## Extending
6666

67-
If you need to customize the Kentico Cloud Delivery SDK by registering interceptors and changing global config, you have to create a nuxt plugin.
67+
If you need to customize the Kentico Kontent Delivery SDK by registering interceptors and changing global config, you have to create a nuxt plugin.
6868

6969
### nuxt.config.js
7070
```
7171
{
7272
modules: [
73-
'kenticocloud-nuxt-module',
73+
'kentico-kontent-nuxt-module',
7474
],
7575
7676
plugins: [
77-
'~/plugins/kenticocloudNuxtModule'
77+
'~/plugins/kenticokontentNuxtModule'
7878
]
7979
}
8080
```
8181

82-
### plugins/kenticocloudNuxtModule.js
82+
### plugins/kenticokontentNuxtModule.js
8383
```
8484
export default function ({ store, $deliveryClient }) {
8585
$deliveryClient.config.globalHeaders = (queryConfig) => {

lib/module.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
const path = require('path');
22

3-
module.exports = function kenticocloud (moduleOptions) {
3+
module.exports = function kenticokontent (moduleOptions) {
44
const options = Object.assign({
5-
projectId: process.env.KENTICOCLOUD_PROJECTID || '',
6-
previewApiKey: process.env.KENTICOCLOUD_PREVIEWAPIKEY || null,
7-
enableAdvancedLogging: process.env.KENTICOCLOUD_ENABLEADVANCEDLOGGING || false,
8-
enablePreviewMode: process.env.KENTICOCLOUD_ENABLEPREVIEWMODE || false,
9-
defaultLanguage: process.env.KENTICOCLOUD_DEFAULTLANGUAGE || null,
10-
retryAttempts: process.env.KENTICOCLOUD_RETRYATTEMPTS || null,
11-
baseUrl: process.env.KENTICOCLOUD_BASEURL || null,
12-
proxyUrl: process.env.KENTICOCLOUD_PROXYURL || null,
13-
securedApiKey: process.env.KENTICOCLOUD_SECUREDAPIKEY || null,
14-
enableSecuredMode: process.env.KENTICOCLOUD_ENABLESECUREDMODE || false,
5+
projectId: process.env.KENTICOKONTENT_PROJECTID || '',
6+
previewApiKey: process.env.KENTICOKONTENT_PREVIEWAPIKEY || null,
7+
enableAdvancedLogging: process.env.KENTICOKONTENT_ENABLEADVANCEDLOGGING || false,
8+
enablePreviewMode: process.env.KENTICOKONTENT_ENABLEPREVIEWMODE || false,
9+
defaultLanguage: process.env.KENTICOKONTENT_DEFAULTLANGUAGE || null,
10+
retryAttempts: process.env.KENTICOKONTENT_RETRYATTEMPTS || null,
11+
baseUrl: process.env.KENTICOKONTENT_BASEURL || null,
12+
proxyUrl: process.env.KENTICOKONTENT_PROXYURL || null,
13+
securedApiKey: process.env.KENTICOKONTENT_SECUREDAPIKEY || null,
14+
enableSecuredMode: process.env.KENTICOKONTENT_ENABLESECUREDMODE || false,
1515
config: {
1616
environment: this.options.dev ? 'development' : 'production'
1717
}
18-
}, this.options.kenticocloud, moduleOptions);
18+
}, this.options.kenticokontent, moduleOptions);
1919

2020
if (!options.projectId) {
2121
/* eslint-disable no-console */
22-
console.info('nuxt:kentico-cloud-nuxt-module disabled because no projectId was found');
22+
console.info('nuxt:kentico-kontent-nuxt-module disabled because no projectId was found');
2323
/* eslint-enable no-console */
2424
return;
2525
}
2626

2727
this.addPlugin({
2828
src: path.resolve(__dirname, 'templates/dist/plugin.template.js'),
29-
fileName: 'kenticocloud-nuxt-module.js',
29+
fileName: 'kentico-kontent-nuxt-module.js',
3030
ssr: true,
3131
options
3232
});

lib/templates/plugin.template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DeliveryClient } from 'kentico-cloud-delivery';
1+
import { DeliveryClient } from '@kentico/kontent-delivery';
22
import CacheService from '../services/CacheService';
33

44
export default (ctx, inject) => {

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "kenticocloud-nuxt-module",
2+
"name": "kentico-kontent-nuxt-module",
33
"version": "1.0.0-release",
4-
"description": "Add Kentico Cloud super power to your nuxt app",
4+
"description": "Add Kentico Kontent super power to your nuxt app",
55
"main": "lib/module.js",
66
"directories": {
77
"lib": "lib",
@@ -18,13 +18,14 @@
1818
],
1919
"repository": {
2020
"type": "git",
21-
"url": "https://github.com/Domitnator/kenticocloud-nuxt-module.git"
21+
"url": "https://github.com/Domitnator/kentico-kontent-nuxt-module.git"
2222
},
2323
"keywords": [
2424
"nuxt",
2525
"kentico",
26-
"cloud",
27-
"vuejs"
26+
"kontent",
27+
"vuejs",
28+
"nuxtjs"
2829
],
2930
"files": [
3031
"lib",
@@ -39,11 +40,11 @@
3940
],
4041
"license": "ISC",
4142
"bugs": {
42-
"url": "https://github.com/Domitnator/kenticocloud-nuxt-module/issues"
43+
"url": "https://github.com/Domitnator/kentico-kontent-nuxt-module/issues"
4344
},
44-
"homepage": "https://github.com/Domitnator/kenticocloud-nuxt-module#readme",
45+
"homepage": "https://github.com/Domitnator/kentico-kontent-nuxt-module#readme",
4546
"dependencies": {
46-
"kentico-cloud-delivery": "^6.2.0"
47+
"@kentico/kontent-delivery": "^7.0.1"
4748
},
4849
"devDependencies": {
4950
"@babel/core": "^7.5.5",

rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ export default {
2121
'fs',
2222
'express',
2323
'babel-polyfill',
24-
'kentico-cloud-delivery'
24+
'@kentico/kontent-delivery'
2525
]
2626
};

yarn.lock

Lines changed: 18 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,22 @@
650650
lodash "^4.17.13"
651651
to-fast-properties "^2.0.0"
652652

653+
"@kentico/[email protected]":
654+
version "2.0.0"
655+
resolved "https://registry.yarnpkg.com/@kentico/kontent-core/-/kontent-core-2.0.0.tgz#4a7d8e127a0ee0c5564d1ca2e49793912fbea260"
656+
integrity sha512-Iclap7JOyirb9zKQUfhb0rxkdqe5gNK823dHdOREFyLvByCE2ZaTrpWI04qJMBct2lFgFfgLviIQo2Kx5x5P+w==
657+
dependencies:
658+
axios "0.19.0"
659+
660+
"@kentico/kontent-delivery@^7.0.1":
661+
version "7.0.1"
662+
resolved "https://registry.yarnpkg.com/@kentico/kontent-delivery/-/kontent-delivery-7.0.1.tgz#847a6b165f0849aa32797a5e2a034666c4f0563f"
663+
integrity sha512-1u02vTprW1FnC5AM04RVKyU1cqCLxXLmeYgPEL27sn6vjHngY60HcL8I+QC9Y5aCx7D1CLdBZ+wI5vN6eb40pw==
664+
dependencies:
665+
"@kentico/kontent-core" "2.0.0"
666+
parse5 "5.1.0"
667+
reflect-metadata "0.1.13"
668+
653669
"@nodelib/[email protected]":
654670
version "2.1.2"
655671
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.2.tgz#1f981cd5b83e85cfdeb386fc693d4baab392fa54"
@@ -1756,7 +1772,7 @@ debug@^4.0.0, debug@^4.0.1, debug@^4.1.0:
17561772
dependencies:
17571773
ms "^2.1.1"
17581774

1759-
debuglog@*, debuglog@^1.0.1:
1775+
debuglog@^1.0.1:
17601776
version "1.0.1"
17611777
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
17621778
integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=
@@ -2824,7 +2840,7 @@ import-lazy@^2.1.0:
28242840
resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43"
28252841
integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=
28262842

2827-
imurmurhash@*, imurmurhash@^0.1.4:
2843+
imurmurhash@^0.1.4:
28282844
version "0.1.4"
28292845
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
28302846
integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
@@ -3221,22 +3237,6 @@ jsprim@^1.2.2:
32213237
json-schema "0.2.3"
32223238
verror "1.10.0"
32233239

3224-
3225-
version "1.7.1"
3226-
resolved "https://registry.yarnpkg.com/kentico-cloud-core/-/kentico-cloud-core-1.7.1.tgz#3cea42aedde32801fc2f61cda4de77e78fc907de"
3227-
integrity sha512-SBNwe7zfkLTJwYZjqiqBqgjDr0NEIEDCJcw1H72AfwqduYyx2v/E9TMZZ4u+6lFWCFMofNAwjHnaJAgANLwGGQ==
3228-
dependencies:
3229-
axios "0.19.0"
3230-
3231-
kentico-cloud-delivery@^6.2.0:
3232-
version "6.2.0"
3233-
resolved "https://registry.yarnpkg.com/kentico-cloud-delivery/-/kentico-cloud-delivery-6.2.0.tgz#3cadb441f34984bae8f10c780e2f2859e5077231"
3234-
integrity sha512-BHdwdXiqkKwe9OGcvi4kv8GRjM70Gb9Ct8sl4rkyMiJnO4WoZbbJR/tZ1vXdzcrMiUtNtG5+u1Tr3Vo3lfuVdw==
3235-
dependencies:
3236-
kentico-cloud-core "1.7.1"
3237-
parse5 "5.1.0"
3238-
reflect-metadata "0.1.13"
3239-
32403240
latest-version@^3.0.0:
32413241
version "3.1.0"
32423242
resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-3.1.0.tgz#a205383fea322b33b5ae3b18abee0dc2f356ee15"
@@ -3461,11 +3461,6 @@ lockfile@^1.0.4:
34613461
dependencies:
34623462
signal-exit "^3.0.2"
34633463

3464-
lodash._baseindexof@*:
3465-
version "3.1.0"
3466-
resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c"
3467-
integrity sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw=
3468-
34693464
lodash._baseuniq@~4.6.0:
34703465
version "4.6.0"
34713466
resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8"
@@ -3474,33 +3469,11 @@ lodash._baseuniq@~4.6.0:
34743469
lodash._createset "~4.0.0"
34753470
lodash._root "~3.0.0"
34763471

3477-
lodash._bindcallback@*:
3478-
version "3.0.1"
3479-
resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
3480-
integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4=
3481-
3482-
lodash._cacheindexof@*:
3483-
version "3.0.2"
3484-
resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92"
3485-
integrity sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI=
3486-
3487-
lodash._createcache@*:
3488-
version "3.1.2"
3489-
resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093"
3490-
integrity sha1-VtagZAF2JeeevKa4AY4XRAvc8JM=
3491-
dependencies:
3492-
lodash._getnative "^3.0.0"
3493-
34943472
lodash._createset@~4.0.0:
34953473
version "4.0.3"
34963474
resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26"
34973475
integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY=
34983476

3499-
lodash._getnative@*, lodash._getnative@^3.0.0:
3500-
version "3.9.1"
3501-
resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
3502-
integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=
3503-
35043477
lodash._root@~3.0.0:
35053478
version "3.0.1"
35063479
resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
@@ -3541,11 +3514,6 @@ lodash.isstring@^4.0.1:
35413514
resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451"
35423515
integrity sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=
35433516

3544-
lodash.restparam@*:
3545-
version "3.6.1"
3546-
resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
3547-
integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=
3548-
35493517
lodash.set@^4.3.2:
35503518
version "4.3.2"
35513519
resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23"

0 commit comments

Comments
 (0)