Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@callstack/repack-dev-server

Package Overview
Dependencies
Maintainers
11
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@callstack/repack-dev-server - npm Package Compare versions

Comparing version 4.3.2 to 4.4.0-canary-20240909082848

2

CHANGELOG.md
# @callstack/repack-dev-server
## 4.4.0-canary-20240909082848
## 4.3.2

@@ -4,0 +6,0 @@

@@ -104,2 +104,3 @@ import { Writable } from 'stream';

instance.use('/open-url', openURLMiddleware);
// @ts-ignore
instance.use('/open-stack-frame', openStackFrameInEditorMiddleware);

@@ -106,0 +107,0 @@ await instance.register(symbolicatePlugin, {

17

dist/plugins/compiler/compilerPlugin.js

@@ -19,7 +19,7 @@ import fastifyPlugin from 'fastify-plugin';

handler: async (request, reply) => {
let file = request.params['*'];
const filename = request.params['*'];
let {
platform
} = request.query;
if (!file) {
if (!filename) {
// This technically should never happen - this route should not be called if file is missing.

@@ -33,11 +33,2 @@ request.log.error(`File was not provided`);

platform = delegate.compiler.inferPlatform?.(request.url) ?? platform;
if (!platform) {
request.log.error('Cannot detect platform');
return reply.badRequest('Cannot detect platform');
}
// If platform happens to be in front of an asset remove it.
if (file.startsWith(`${platform}/`)) {
file = file.replace(`${platform}/`, '');
}
const multipart = reply.asMultipart();

@@ -56,4 +47,4 @@ const sendProgress = ({

try {
const asset = await delegate.compiler.getAsset(file, platform, sendProgress);
const mimeType = delegate.compiler.getMimeType(file, platform, asset);
const asset = await delegate.compiler.getAsset(filename, platform, sendProgress);
const mimeType = delegate.compiler.getMimeType(filename, platform, asset);
if (multipart) {

@@ -60,0 +51,0 @@ const buffer = Buffer.isBuffer(asset) ? asset : Buffer.from(asset);

@@ -15,3 +15,3 @@ import type { SendProgress } from '../../types';

*/
getAsset: (filename: string, platform: string, sendProgress?: SendProgress) => Promise<string | Buffer>;
getAsset: (filename: string, platform: string | undefined, sendProgress?: SendProgress) => Promise<string | Buffer>;
/**

@@ -24,3 +24,3 @@ * Detect MIME type of the asset from `filename`, `platform` or `data` (or from combination of either).

*/
getMimeType: (filename: string, platform: string, data: string | Buffer) => string;
getMimeType: (filename: string, platform: string | undefined, data: string | Buffer) => string;
/**

@@ -27,0 +27,0 @@ * Detect the platform from the URI - either from filename, query params or both.

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "4.3.2",
"version": "4.4.0-canary-20240909082848",
"type": "module",

@@ -8,0 +8,0 @@ "main": "./dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc