@remotion/bundler 4.0.495 → 4.0.497

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import type { GitSource, RenderDefaults } from '@remotion/studio-shared';
2
2
  import webpack from 'webpack';
3
3
  import type { WebpackOverrideFn } from './webpack-config';
4
+ export declare const getBundlePublicPath: (publicPath: string | null) => string;
5
+ export declare const getBundleStaticHash: (publicPath: string) => string;
4
6
  export type MandatoryLegacyBundleOptions = {
5
7
  webpackOverride: WebpackOverrideFn;
6
8
  outDir: string | null;
package/dist/bundle.js CHANGED
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.internalBundle = exports.findClosestFolderWithItem = exports.getConfig = void 0;
39
+ exports.internalBundle = exports.findClosestFolderWithItem = exports.getConfig = exports.getBundleStaticHash = exports.getBundlePublicPath = void 0;
40
40
  exports.bundle = bundle;
41
41
  const node_fs_1 = __importStar(require("node:fs"));
42
42
  const node_os_1 = __importDefault(require("node:os"));
@@ -86,6 +86,20 @@ const trimTrailingSlash = (p) => {
86
86
  }
87
87
  return p;
88
88
  };
89
+ const getBundlePublicPath = (publicPath) => {
90
+ return publicPath !== null && publicPath !== void 0 ? publicPath : './';
91
+ };
92
+ exports.getBundlePublicPath = getBundlePublicPath;
93
+ const getBundleStaticHash = (publicPath) => {
94
+ if (publicPath === './') {
95
+ return './public';
96
+ }
97
+ return ('/' +
98
+ [trimTrailingSlash(trimLeadingSlash(publicPath)), 'public']
99
+ .filter(Boolean)
100
+ .join('/'));
101
+ };
102
+ exports.getBundleStaticHash = getBundleStaticHash;
89
103
  const getConfig = ({ entryPoint, outDir, resolvedRemotionRoot, onProgress, options, bufferStateDelayInMilliseconds, maxTimelineTracks, }) => {
90
104
  var _a, _b, _c, _d, _e;
91
105
  const configArgs = {
@@ -161,7 +175,7 @@ const validateEntryPoint = async (entryPoint) => {
161
175
  };
162
176
  const internalBundle = async (actualArgs) => {
163
177
  var _a, _b;
164
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
178
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l;
165
179
  const entryPoint = node_path_1.default.resolve(process.cwd(), actualArgs.entryPoint);
166
180
  const resolvedRemotionRoot = (_d = (_c = actualArgs === null || actualArgs === void 0 ? void 0 : actualArgs.rootDir) !== null && _c !== void 0 ? _c : findClosestPackageJsonFolder(entryPoint)) !== null && _d !== void 0 ? _d : process.cwd();
167
181
  if (!actualArgs.ignoreRegisterRootWarning) {
@@ -238,11 +252,8 @@ const internalBundle = async (actualArgs) => {
238
252
  }
239
253
  }
240
254
  }
241
- const publicPath = (_g = actualArgs === null || actualArgs === void 0 ? void 0 : actualArgs.publicPath) !== null && _g !== void 0 ? _g : '/';
242
- const staticHash = '/' +
243
- [trimTrailingSlash(trimLeadingSlash(publicPath)), 'public']
244
- .filter(Boolean)
245
- .join('/');
255
+ const publicPath = (0, exports.getBundlePublicPath)(actualArgs.publicPath);
256
+ const staticHash = (0, exports.getBundleStaticHash)(publicPath);
246
257
  const from = (options === null || options === void 0 ? void 0 : options.publicDir)
247
258
  ? node_path_1.default.resolve(resolvedRemotionRoot, options.publicDir)
248
259
  : node_path_1.default.join(resolvedRemotionRoot, 'public');
@@ -301,12 +312,12 @@ const internalBundle = async (actualArgs) => {
301
312
  }),
302
313
  includeFavicon: true,
303
314
  title: 'Remotion Bundle',
304
- renderDefaults: (_h = actualArgs.renderDefaults) !== null && _h !== void 0 ? _h : undefined,
315
+ renderDefaults: (_g = actualArgs.renderDefaults) !== null && _g !== void 0 ? _g : undefined,
305
316
  publicFolderExists: `${publicPath + (publicPath.endsWith('/') ? '' : '/')}public`,
306
317
  fileSystemPlatform: null,
307
- gitSource: (_j = actualArgs.gitSource) !== null && _j !== void 0 ? _j : null,
318
+ gitSource: (_h = actualArgs.gitSource) !== null && _h !== void 0 ? _h : null,
308
319
  projectName: (0, studio_shared_1.getProjectName)({
309
- gitSource: (_k = actualArgs.gitSource) !== null && _k !== void 0 ? _k : null,
320
+ gitSource: (_j = actualArgs.gitSource) !== null && _j !== void 0 ? _j : null,
310
321
  resolvedRemotionRoot,
311
322
  basename: node_path_1.default.basename,
312
323
  }),
@@ -315,8 +326,8 @@ const internalBundle = async (actualArgs) => {
315
326
  // Actual log level is set in setPropsAndEnv()
316
327
  logLevel: 'info',
317
328
  mode: 'bundle',
318
- audioLatencyHint: (_l = actualArgs.audioLatencyHint) !== null && _l !== void 0 ? _l : 'playback',
319
- sampleRate: (_m = (_b = actualArgs.renderDefaults) === null || _b === void 0 ? void 0 : _b.sampleRate) !== null && _m !== void 0 ? _m : 48000,
329
+ audioLatencyHint: (_k = actualArgs.audioLatencyHint) !== null && _k !== void 0 ? _k : 'playback',
330
+ sampleRate: (_l = (_b = actualArgs.renderDefaults) === null || _b === void 0 ? void 0 : _b.sampleRate) !== null && _l !== void 0 ? _l : 48000,
320
331
  studioRuntimeConfig: {
321
332
  askAIEnabled: actualArgs.askAIEnabled,
322
333
  bufferStateDelayInMilliseconds: actualArgs.bufferStateDelayInMilliseconds,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/bundler"
4
4
  },
5
5
  "name": "@remotion/bundler",
6
- "version": "4.0.495",
6
+ "version": "4.0.497",
7
7
  "description": "Bundle Remotion compositions using Webpack",
8
8
  "main": "dist/index.js",
9
9
  "bugs": {
@@ -24,11 +24,11 @@
24
24
  "css-loader": "7.1.4",
25
25
  "esbuild": "0.28.1",
26
26
  "react-refresh": "0.18.0",
27
- "remotion": "4.0.495",
28
- "@remotion/studio": "4.0.495",
29
- "@remotion/studio-shared": "4.0.495",
30
- "@remotion/timeline-utils": "4.0.495",
31
- "@remotion/media-parser": "4.0.495",
27
+ "remotion": "4.0.497",
28
+ "@remotion/studio": "4.0.497",
29
+ "@remotion/studio-shared": "4.0.497",
30
+ "@remotion/timeline-utils": "4.0.497",
31
+ "@remotion/media-parser": "4.0.497",
32
32
  "style-loader": "4.0.0",
33
33
  "webpack": "5.105.0"
34
34
  },
@@ -39,7 +39,7 @@
39
39
  "devDependencies": {
40
40
  "react": "19.2.3",
41
41
  "react-dom": "19.2.3",
42
- "@remotion/eslint-config-internal": "4.0.495",
42
+ "@remotion/eslint-config-internal": "4.0.497",
43
43
  "eslint": "9.19.0",
44
44
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
45
45
  },