Is there any way to call and use auth0 sdk libraries in chrome extension mv3 background.js file - auth0

Trying convert chrome extension v2 to v3 . Since background.js is a service worker now ,i'm not able to use auth0-spa libraries in it. Is there any workaround to use auth0/auth0-spa libraries in background.js . Any help would be much appreciated

Related

Configure CRA-generated app to NOT download Workbox from CDN, but a local copy

I am looking for a recommendation on configuring my CRA-generated app's generated Workbox service-worker.js to fetch the Workbox library from my main app bundle's workbox library, so that the app does not need to depend on Google's CDN. By default, the CRA app loads workbox from the Google CDN.
Specifically, I want the generated line importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); inside the generated serice-worker.js file to be replaced.
There seem to be no elegant solutions to configuring this, and I would be super appreciative if someone could guide me forward. Thanks!
I would recommend using create-react-app v4, along with the cra-template-pwa.
That will give you a Workbox-based service worker that is self-contained and does not depend on loading anything from the CDN.
Earlier versions of c-r-a unfortunately are not customizable in this regard.

Is it possible to integrate Webpack/VueJS with the Odoo Framework (v12)?

I'd like to integrate VueJS through WebPack in one of my custom Odoo modules, and have it start up automatically when I launch Odoo-bin.
Does anyone have a solution?
Is it even possible?
I know you can include VueJS as a simple .JS file in the module's template, but that means I can't use the .vue components supported by WebPack.
I also read that Odoo has its own JS framework, but I couldn't find good tutorials/documentation for it.
EDIT: To anyone that might be wondering how I solved this, here's what I did:
I initialized a package.json file in the root of my Odoo folder using npm init. I added a start script to the package that launches webpack and bundles all vue components in myAddons folder (where I store my custom modules), then launches Odoo through the python odoo-bin ... command. All that's left is to use npm start to start it all up.
This way, the vue components get bundled into single JS files, that I then add to the templates of my modules. This has a small inconvenient in that the first bundle has to be done manually in order to know which JS files need to be imported to the templates. Also, i'm still trying to figure out how to bundle the components of every single module separately. Will update this once I find a proper way to do it. ...Hopefully.
By default, odoo frontend part is heavily built upon backbone, jquery, underscore. If you want to use any other JS library, you have to make sure the compatibility in between them. The odoo backend parts of JS functionalities are written under web module can be found in odoo/addons/web/static/src/js directory in odoo community codes. The ecommerce/website part is under website* modules.
Along with the fact that the Odoo JS API documentation is basically non-existent (as of the time I am posting this) .. I would add the fact that its going to be like working with a moving target compared to calling Odoo's JSON-RPC API directly since their JSON-RPC API changes very little over different versions of Odoo.
Moreover, making JSON-RPC API calls with Axios is extremely simple. So just go directly to the server's JSON-RPC API from your Vue project.
This is what I am doing with at odooinvue.org which is basically a Vue project that uses Odoo in the back-end. That project is designed specifically as a resource for Vue developers that are trying to use Odoo in the back-end but have difficulty because they are new to Odoo development.
I suggest trying #StartupGuy's odooinvue, which is really nice.
With Odoo 14 they created a new modern frontend framework: Owl framework.
I have not tried it myself.

Upgrade AdWords API from version v201609 to v201705

I am using Adwords API version of v201609 and want to upgrade the version to v201705. I have downloaded the API integration folder from [https://github.com/googleads/googleads-php-lib][1]
In my version v201609, I used below code and in the new version v201705 there is no folder structure like this.
require_once getcwd() . '/protected/adv20169/examples/AdWords/v201609/init.php';
require_once getcwd() . '/protected/adv20169/src/Google/Api/Ads/AdWords/Util/v201609/ReportUtils.php';
If anyone can help me with the step by step instruction to upgrade the Adwords API from version version v201609 to v201705, that would be helpful. Can't find such an instruction while google it.
The library seems to have been changed.
Here is new ads PHP client library upgrade guide.
https://github.com/googleads/googleads-php-lib/blob/cfc0c930a4b4063042d0553e5a31b57b619982a6/UPGRADING.md

include JavaScript library on the server side in mobilefirst

is it possible now, include an external JavaScript library in the HttpAdapter code in MobileFirst. If not, what is the alternative?
I have seen this type of questions,but that was worklight older version and impossible .. IBM Worklight - Include a JavaScript library on the server side
MobileFirst: version 7.1.0.00-20151114-1616
Thank you
It is not possible to include external JS files in adapters. What you can do, is to include the JS source in the existing *-impl.js file.

Download HERE JS API for IDE code completion?

is there a way to download the here maps JS api 3.x to provide code completion in my IDE (like PHPStorm)?
I didn't find anything in the documentation.
Regards, Kristian
My knowledge of PHPStorm is limited, but are you able to use the javascript files by downloading them using the direct urls ?
Although you will run into issues when there are updates in the javascript file.