How to install only NPM dev dependencies
Mike Street Blog
by
4M ago
There are some situations where you wish to only install the devDependencies from the package.json. We encountered this recently where we set Playwright [https://www.mikestreety.co.uk/category/playwright/] as a development dependency and wished to install the specified version in a CI scenario. ---------------------------------------------------------------------------------------------------------------------------------- TL:DR; You can install just the dev dependencies from your package.json with the following command (provinding you have node installed) mv package.json _package.json &&a ..read more
Visit website
Scanning your code with Bearer; a Gitlab compatible SAST
Mike Street Blog
by
4M ago
Gitlab offer Static Application Security Testing (SAST) with all tiers of their product, however for any kind of UI integration and configuration you need to be on their Ultimate tier. SAST is a way of scanning your code to highlight any known vulnerabilities. It's worth noting it scans the code in your repository, so you won't get bogged down with dependency issues. You can run the SAST without paying the big bucks, but all you can get out of it is a JSON report, which requires some processing to even start reading the results which isn't very conducive to a productive workflow. Looking to ad ..read more
Visit website
Validate a JSON API with Playwright & JSON Schema
Mike Street Blog
by
4M ago
Chase Jarvis once said "the best camera is the one that is with you" and I often apply this to other parts of my life. Playwright might not be the best tool [https://json-schema.org/implementations] to validate JSON with, but if you are already using it and have it set up, then it is better than loading a whole new framework or tool. This post will walk through calling a JSON API and validating it against a predefined JSON Schema [https://json-schema.org/]. This will flag if the JSON output changes - which might impact users using the API (or your own internal calls to the endpoint). This post ..read more
Visit website
Testing the frontend of a TYPO3 project
Mike Street Blog
by
5M ago
Testing is an interesting topic in the web world; everyone you talk to seems to know how valuable it is, but finding concrete examples on the web is hard. We have started testing our TYPO3 websites with Playwright [https://playwright.dev/] - an end-to-end testing framework that can simulate a lot of browsers on a lot of devices. This blog post is going to run through our conventions for testing with TYPO3 and Playwright. To help with onboarding and consistency throughout all our projects, we created a meta-framework [https://github.com/liquidlight/playwright-framework] which sets some sensible ..read more
Visit website
Tweetback
Mike Street Blog
by
5M ago
I finally downloaded my ~Twitter~ X archive [https://help.twitter.com/en/managing-your-account/how-to-download-your-x-archive] as a trusty zip file and set up a version of Tweetback [https://github.com/tweetback/tweetback]. You can see my tweets here [https://tweets.mikestreety.co.uk/]. Interestingly, it uses tweetback-canonical [https://github.com/tweetback/tweetback-canonical] which replaces any Twitter links it finds with other people's instances instead of linking to the bird site, as long as they have added themselves. This kind of marks an end of an era for me, really. I don't care much ..read more
Visit website
Composer Best Practices for TYPO3
Mike Street Blog
by
5M ago
I revel in reading about other peoples processes, file structures and best practices. I soak up their standards, seeing if I can optimise, tweak or evolve my own to seek that golden chalice of efficiency. Following in the same vein of Daniel Siepmann's TYPO3 Composer Best Practices [https://daniel-siepmann.de/typo3-composer-best-practices.html], I thought I would outline the file structure and conventions for our TYPO3 composer-based projects. We look after more than 60 TYPO3 sites, so our methodology is based on being able to switch between projects and have consistency between them. This hel ..read more
Visit website
2023 In Review
Mike Street Blog
by
6M ago
2023 was a year which seemed to fly by - it doesn't seem like 12 months have passed since I was last reflecting my annual achievements. Despite this, there were some pretty big events this year, when I actually think about it, but it all seems to be compressed into, what feels like, only a couple of months. As with previous years [https://www.mikestreety.co.uk/category/annual-review/], these posts are written mainly for me, to reflect on the year and think about the one coming. LIFE There was a major milestone this year - Alfie starting school. We picked the school last December and found out ..read more
Visit website
Accessing iframe content and JavaScript variables from Puppeteer
Mike Street Blog
by
8M ago
Following on from the previous post about logging in and saving cookies with Puppeteer [https://www.mikestreety.co.uk/blog/login-with-puppeteer-and-re-use-cookies-for-another-window/], I also needed to access content and, more specifically, a JavaScript variable present within the iframe itself from within Puppeteer as this contained information I was hunting down. A working example of this code can be found in this git repository [https://github.com/liquidlight/puppeteer-typo3-translations]. In this example, we will be loading Wikipedia [https://www.wikipedia.org/] with an iframe tester [http ..read more
Visit website
Login with Puppeteer and re-use cookies for another window
Mike Street Blog
by
8M ago
For a recent project I needed to automate something which was only available in the CMS via a login. To help speed to process up, I created a script which can login with supplied credentials and store the cookies in a local file. The main process can then use these cookies to carry out the task rather than needing to login each time. A working example of this code can be found in this git repository [https://github.com/liquidlight/puppeteer-typo3-translations]. WHAT IS PUPPETEER? Puppeteer [https://pptr.dev/] is a Node/NPM package which allows you to create & control a headless Chrome inst ..read more
Visit website
Get your Pocket Casts data using the unofficial API and PHP
Mike Street Blog
by
10M ago
Pocket Casts is a Android podcast player I've been using for some time. I wanted a method of extracting podcasts I had listened to to gather some stats and keep a history of my podcasts. Pocket Casts doesn't offer an official API, unfortunately, but does have some data available on https://api.pocketcasts.com - which I assume is what the web application uses to get data behind the scenes. Using hints from the `pocketcasts`` NPM package [https://www.npmjs.com/package/pocketcasts], I backwards engineered the code below which requires "logging in" and then accessing other endpoints with a Bearer ..read more
Visit website

Follow Mike Street Blog on FeedSpot

Continue with Google
Continue with Apple
OR