SAP / spartacus

Spartacus is a lean, Angular-based JavaScript storefront for SAP Commerce Cloud that communicates exclusively through the Commerce REST API.
Apache License 2.0
738 stars 383 forks source link

[ON HOLD] Include smartedit webApplicationInjector.js in schematics #3805

Closed dunqan closed 3 years ago

dunqan commented 5 years ago

We need to resolve legal/security issues with webApplicationInjector.js file first:

Xymmer commented 4 years ago

talking to Petra about feasibility of publishing sap commerce webappinjector file, which currently is under license in commerce suite only

Xymmer commented 4 years ago

1) Olga (SmartEdit PO) approves moving webApplicationInjector.js to open source. Copy from 1905.5 and change legal header. 2) Include in our security/sonar scans.

Xymmer commented 4 years ago

Existing header is:

The new header:

tobi-or-not-tobi commented 4 years ago

I'd rather not include this as part of schematics, as I believe we need to change the approach here. instead of making the import a blocking JS resource in the application, I rather make it configurable, and load it in a singleton service. We do this similar in the qualtrics integration. The main reason for this is that we don't like to load this in production. If we make the import part of the index.html, we basically need a public app and a non-public app. This makes deployments unnecessary complicated. The alternative is that the injector JS file is always loaded on production builds.

artem-zur commented 4 years ago

I'd rather not include this as part of schematics, as I believe we need to change the approach here. instead of making the import a blocking JS resource in the application, I rather make it configurable, and load it in a singleton service. We do this similar in the qualtrics integration. The main reason for this is that we don't like to load this in production. If we make the import part of the index.html, we basically need a public app and a non-public app. This makes deployments unnecessary complicated. The alternative is that the injector JS file is always loaded on production builds.

Hi guys! Any updates on it ?

marlass commented 3 years ago

In 3.2 we released @spartacus/smartedit as a standalone package containing the Smartedit integration with spartacus.

In this package under assets directory we ship webApplicationInjector.js file.

Additionally this package have schematics setup. When you run ng add @spartacus/smartedit it will configure integration in your application and add to angular.json assets section of your application build glob that will copy webApplicationInjector.js file when you build application. image