diff --git a/javascript-modules-engine-java/src/main/java/org/jahia/modules/javascript/modules/engine/jsengine/GraalVMEngine.java b/javascript-modules-engine-java/src/main/java/org/jahia/modules/javascript/modules/engine/jsengine/GraalVMEngine.java index d107f98..63196ec 100644 --- a/javascript-modules-engine-java/src/main/java/org/jahia/modules/javascript/modules/engine/jsengine/GraalVMEngine.java +++ b/javascript-modules-engine-java/src/main/java/org/jahia/modules/javascript/modules/engine/jsengine/GraalVMEngine.java @@ -170,14 +170,14 @@ private void initialEngineCheckup() { // check VM String vmVendor = System.getProperty("java.vm.vendor", "Unknown"); if (!vmVendor.contains("GraalVM")) { - logger.warn("NPM Modules Engine requires GraalVM for production usage, detected {}.", vmVendor); + logger.warn("Javascript Modules Engine requires GraalVM for production usage, detected {}.", vmVendor); return; } // Check if the 'js' extension is installed try (Context context = Context.create()) { if (!context.getEngine().getLanguages().containsKey(JS)) { - logger.error("NPM Modules Engine detected GraalVM, but the 'js' extension is not installed. You can install it by running: gu install js"); + logger.error("Javascript Modules Engine detected GraalVM, but the 'js' extension is not installed. You can install it by running: gu install js"); } } } diff --git a/javascript-modules-engine-java/src/main/java/org/jahia/modules/javascript/modules/engine/npmhandler/NpmProtocolConnection.java b/javascript-modules-engine-java/src/main/java/org/jahia/modules/javascript/modules/engine/npmhandler/NpmProtocolConnection.java index 9d0d6e9..11f2a42 100644 --- a/javascript-modules-engine-java/src/main/java/org/jahia/modules/javascript/modules/engine/npmhandler/NpmProtocolConnection.java +++ b/javascript-modules-engine-java/src/main/java/org/jahia/modules/javascript/modules/engine/npmhandler/NpmProtocolConnection.java @@ -190,7 +190,7 @@ private Properties generateInstructions(Map properties, Mapjavascript-modules-engine Javascript Modules Engine bundle - This is the engine allowing NPM modules to run on a Jahia server. + This is the engine allowing Javascript modules to run on a Jahia server. MCwCFBJEmGCjTLucq4kjFZXIUdgIa5iXAhRog+SngNKsG41US2+divtyEQpSEQ== diff --git a/javascript-modules-engine/tests/cypress/e2e/module/moduleSettingsTest.cy.ts b/javascript-modules-engine/tests/cypress/e2e/module/moduleSettingsTest.cy.ts index e9cdd2d..f7212cf 100644 --- a/javascript-modules-engine/tests/cypress/e2e/module/moduleSettingsTest.cy.ts +++ b/javascript-modules-engine/tests/cypress/e2e/module/moduleSettingsTest.cy.ts @@ -1,7 +1,7 @@ import {JContent, JContentPageBuilder} from '@jahia/jcontent-cypress/dist/page-object/jcontent'; import {addNode, Collapsible, getComponentBySelector, publishAndWaitJobEnding} from '@jahia/cypress'; import {addSimplePage} from '../../utils/Utils'; -describe('Check that NPM module settings (UI extensions, rules, configs) are correctly deployed', () => { +describe('Check that Javascript module settings (UI extensions, rules, configs) are correctly deployed', () => { before('Create test page and contents', () => { addSimplePage('/sites/npmTestSite/home', 'testModuleSettings', 'testModuleSettings', 'en', 'simple', [ { diff --git a/javascript-modules-engine/tests/cypress/e2e/module/moduleTransformationTest.cy.ts b/javascript-modules-engine/tests/cypress/e2e/module/moduleTransformationTest.cy.ts index 8daec88..ac7bc41 100644 --- a/javascript-modules-engine/tests/cypress/e2e/module/moduleTransformationTest.cy.ts +++ b/javascript-modules-engine/tests/cypress/e2e/module/moduleTransformationTest.cy.ts @@ -1,4 +1,4 @@ -describe('Check that the NPM module has been transformed properly and has the proper header values', +describe('Check that the Javascript module has been transformed properly and has the proper header values', () => { it('Check the transformed module headers', () => { cy.executeGroovy('groovy/getBundleHeaders.groovy', {BUNDLE_SYMBOLIC_NAME: 'jahia-npm-module-example', BUNDLE_VERSION: '1.0.0'}) @@ -8,7 +8,7 @@ describe('Check that the NPM module has been transformed properly and has the pr expect(result).to.contain('Bundle-Description: Jahia NPM Test module'); expect(result).to.contain('Jahia-GroupId: org.example.modules.npm'); expect(result).to.contain('Bundle-License: MIT'); - expect(result).to.contain('Bundle-Name: @jahia/npm-module-example (npm module)'); + expect(result).to.contain('Bundle-Name: @jahia/npm-module-example (javascript module)'); expect(result).to.contain('Bundle-SymbolicName: jahia-npm-module-example'); expect(result).to.contain('Bundle-Vendor: Jahia Solutions Group SA'); expect(result).to.contain('Bundle-Version: 1.0.0'); diff --git a/javascript-modules-engine/tests/jahia-module/README.md b/javascript-modules-engine/tests/jahia-module/README.md index a9453c6..4595b36 100644 --- a/javascript-modules-engine/tests/jahia-module/README.md +++ b/javascript-modules-engine/tests/jahia-module/README.md @@ -11,14 +11,14 @@ Jahia logo -NPM Plugin Module Example +Javascript Module Example ====================== -

A NPM-style modules example

+

A Javascript-style modules example

-

This modules provide an example of a NPM-styled module. +

This modules provide an example of a Javascript-styled module. It must be run inside a GraalVM environment in order to support Javascript language. -NPM modules can contain templates, definitions, filter, and other jahia extensions. +Javascript modules can contain templates, definitions, filter, and other jahia extensions.

## Table of content @@ -31,8 +31,8 @@ NPM modules can contain templates, definitions, filter, and other jahia extensio - [Deploying via API](#deploying-via-api) - [Deploying via Script InstallBundle](#deploying-via-script-installbundle) - [Deploying via Fileinstall](#deploying-via-fileinstall) -- [Activating NPM Module](#activating-npm-module) -- [Creating new NPM modules](#creating-new-npm-modules) +- [Activating Javascript Module](#activating-javascript-module) +- [Creating new Javascript modules](#creating-new-javascript-modules) - [Views](#views) @@ -43,7 +43,7 @@ NPM modules can contain templates, definitions, filter, and other jahia extensio ## Jahia Snapshot Environtment -In order to run npm-modules at Jahia, we need to start an environment with GraalVM running. +In order to run javascript modules at Jahia, we need to start an environment with GraalVM running. Run the command below to start the jahia image with docker (please note that you have to be logged in to be able to pull this image) ```shell @@ -64,15 +64,15 @@ Build the module using: yarn build ``` -Packing the module (It will generate jahia-npm-module-example-v1.0.0.tgz in the root of you project) : +Packing the module (It will generate jahia-javascript-module-example-v1.0.0.tgz in the root of you project) : ```shell yarn pack ``` ## Module deployment -NPM modules can be installed in different ways being the most indicated via Module management UI -Below are all the possible ways to install a npm module: +Javascript modules can be installed in different ways being the most indicated via Module management UI +Below are all the possible ways to install a javascript module: ### Deploying via Module management UI @@ -89,7 +89,7 @@ In Administration - Modules - Ensure you replace the X's in the version number of the bundle with the version number of the `.tgz` file that was created ```shell -curl -s --user root:root1234 --form bundle=@jahia-npm-module-example-vX.X.X.tgz --form start=true http://localhost:8080/modules/api/bundles +curl -s --user root:root1234 --form bundle=@jahia-javascript-module-example-vX.X.X.tgz --form start=true http://localhost:8080/modules/api/bundles ``` ### Deploying via Script InstallBundle @@ -115,17 +115,17 @@ yarn deploy docker cp *.tgz jahia-dev:/var/jahia/modules ``` -## Activating NPM Module +## Activating Javascript Module -In order to test the views and templates created we need to create a site with this npm module as in the example below: +In order to test the views and templates created we need to create a site with this javascript module as in the example below: Screenshot 2021-05-18 at 09 24 09 -## NPM plugin example content +## Javascript plugin example content -NPM modules must be packaged with `npm pack` and must contain a `package.json` file, containing all package information. +Javascript modules must be packaged with `npm pack` and must contain a `package.json` file, containing all package information. In addition to standard mandatory fields, the `package.json` file must contain a `jahia` section with a `server` entry. This entry points to the initialization script of the module, which will be responsible of registering the extensions. -You can specify the module type here (by default, it will be `module`). Our NPM example is a templates set, so it needs to define `"module-type": "templatesSet"`. +You can specify the module type here (by default, it will be `module`). Our Javascript example is a templates set, so it needs to define `"module-type": "templatesSet"`. ```json { diff --git a/javascript-modules-library/typedoc-readme.md b/javascript-modules-library/typedoc-readme.md index 10a93f1..5dbc19d 100644 --- a/javascript-modules-library/typedoc-readme.md +++ b/javascript-modules-library/typedoc-readme.md @@ -3,8 +3,8 @@ Javascript Library for NPM Javascript Module Engine ## Introduction -You will find here all the types exposed by the javascript-modules-library library, to be used in Jahia NPM Modules +You will find here all the types exposed by the javascript-modules-library library, to be used in Jahia Javascript Modules ## Jahia Academy -You can find more documentation about NPM modules, how to get started and more on the [Jahia Academy](https://academy.jahia.com). \ No newline at end of file +You can find more documentation about Javascript modules, how to get started and more on the [Jahia Academy](https://academy.jahia.com). \ No newline at end of file