Create npm package with CommonJS and ESM support in TypeScript
Waldek Mastykarz
by
3w ago
If you want to create an npm package and ensure it can be used by everyone, you'll want it to support CommonJS (CJS) and ECMAScript Modules (ESM). Here's how to build such a package using TypeScript. CommonJS and ESM When building JavaScript apps, you have two module systems to choose from: CommonJS and ECMAScript Modules. Despite the recent rise of ESM, CommonJS is still widely used, and not to mention default in Node.js. To make sure your npm package can be used by everyone, you'll want to support both module systems. Project setup CommonJS and ESM are not compatible with each other. To sup ..read more
Visit website
Trace the location of API requests
Waldek Mastykarz
by
1M ago
These days, it's hard to imagine an app that's not using APIs. APIs give us access to data and insights and allow us to integrate with cloud services easily. But as we use more and more APIs, we struggle with debugging our app. What if a request fails? What if we need to change something about a particular request? How do we know where in our app the request is coming from? Tracing API requests If you call just a handful of API endpoints, and they're distinct to the specific portions of your app, it's easy to find where the request is coming from. But as your app grows, and you have more and ..read more
Visit website
Add background color to menu bar icon in macOS
Waldek Mastykarz
by
6M ago
When building apps for macOS, you might want to add a background color to your icon in the menu bar. This is a great way to make your app stand out and make it easier for users to find your app in the menu bar. To add a background color to your icon in the menu bar, the trick is to find the right view to apply the background color to. Here's how you can do it in Swift. Start, by getting a reference to the status item. Then, get the status item's button. Configure the image to fit the button. // get a reference to the status item let statusItem = NSStatusBar.system.statusItem(withLength: NSSt ..read more
Visit website
Easily see if you have system proxy configured on macOS
Waldek Mastykarz
by
6M ago
ProxyStat is a macOS utility that shows when you have a system proxy configured. When you enable a system proxy, the ProxyStat icon the menu bar turns orange. <p><picture> <source srcset="/assets/images/2024/02/proxystat-proxy-on.webp" type="image/webp"> <img src="/assets/images/2024/02/proxystat-proxy-on.png" alt="ProxyStat showing an orange icon when system proxy is configured"> </picture></p> When you don't have a system proxy configured, the icon is greyed out. <p><picture> <source srcset="/assets/images/2024/02/proxystat-proxy-off.webp ..read more
Visit website
Easily debug Microsoft Graph Python SDK requests
Waldek Mastykarz
by Waldek Mastykarz
9M ago
Using the Microsoft Graph Python SDK is a convenient way to connect your app to Microsoft 365. Here's how you can easily debug API requests issued from the SDK. Build apps that work with Microsoft 365 Microsoft 365 is a platform where millions of users work together every day. You can create apps that use the data and insights from Microsoft 365 to help them do their work more efficiently and effectively. Microsoft Graph is the API that connects you to your organization's data in Microsoft 365. You can access it using its REST endpoints. If you build an app connected to Microsoft 365 using Py ..read more
Visit website
Easily debug Microsoft Graph .NET SDK requests
Waldek Mastykarz
by Waldek Mastykarz
10M ago
Using the Microsoft Graph .NET SDK is a convenient way to connect your app to Microsoft 365. Here's how you can easily debug API requests issued from the SDK. Build apps that work with Microsoft 365 Microsoft 365 is a platform where millions of users work together every day. You can create apps that use the data and insights from Microsoft 365 to help them do their work more efficiently and effectively. Microsoft Graph is the API that connects you to your organization's data in Microsoft 365. You can access it using its REST endpoints. If you build an app connected to Microsoft 365 using .NET ..read more
Visit website
#67 External content on Microsoft 365
Waldek Mastykarz
by Waldek Mastykarz
10M ago
Recently, I've been looking into Microsoft Graph connectors. Graph connectors are pretty cool and allow you to bring external content to Microsoft 365. Now, why would I want to do that? - you might ask. Good question. Why you should consider Microsoft Graph connectors We often use many different apps that help us work productively. The price we pay for it though, is that the data is locked in each of these apps. To find what you need, you need to know where you stored the information. What makes things worse, is that often search isn't the core feature of these apps, making it hard to find th ..read more
Visit website
Create an Entra app with API permissions, admin consent and a secret using Microsoft Graph PowerShell SDK
Waldek Mastykarz
by Waldek Mastykarz
10M ago
When building apps for Microsoft 365, the first step is to create an Entra app registration. Here's how to do it using Microsoft Graph PowerShell SDK. First things first: Entra app registrations In my previous article, I told you about the necessity of having an Entra app registration when building apps for Microsoft 365. I also showed you, how to script creating and configuring an Entra app registration using the CLI for Microsoft 365. If you're using PowerShell you might be more inclined to use the Microsoft Graph PowerShell SDK instead, and here's how you can write a similar script using i ..read more
Visit website
Create an Entra app with API permissions, admin consent and a secret using CLI for Microsoft 365
Waldek Mastykarz
by Waldek Mastykarz
10M ago
When building apps for Microsoft 365, the first step is to create an Entra app registration. Here's how to do it using CLI for Microsoft 365. First things first: Entra app registrations When you build apps for Microsoft 365, to access data and insights from Microsoft 365, or even just to let users sign in to your app using their work or school account, you'll need an Entra app registration. An app registration registers your app with the Microsoft Cloud and defines settings such as API permissions or authentication flows. You can create an Entra app registration in the Azure portal where you ..read more
Visit website
Easily handle long-running operations using middleware in the Microsoft Graph JavaScript SDK
Waldek Mastykarz
by Waldek Mastykarz
10M ago
If you use the Microsoft Graph JavaScript SDK and need to handle long-running operations, build it as a middleware. Here's how. Why you should consider to use a Microsoft Graph SDK Microsoft Graph JavaScript SDK offers you a convenient way to connect to Microsoft Graph - the API to data and insights on Microsoft 365. The SDK takes care of authentication and other request-related plumbing helping you to focus on building your app. Long-running operations on Microsoft Graph While most operations on Microsoft Graph are instantaneous, there are some exceptions. One example is creating a Microsoft ..read more
Visit website

Follow Waldek Mastykarz on FeedSpot

Continue with Google
Continue with Apple
OR