Add .gitignore to exclude all node packages and lock files

This commit is contained in:
Adolfo Reyna
2026-02-23 21:56:04 -05:00
parent faae96c9ed
commit dcc5c6c044
9747 changed files with 1555105 additions and 2 deletions
@@ -0,0 +1,3 @@
import type { TRenderAsset } from '../CompositionManager';
export declare const validateArtifactFilename: (filename: unknown) => void;
export declare const validateRenderAsset: (artifact: TRenderAsset) => void;
@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateRenderAsset = exports.validateArtifactFilename = void 0;
const validateArtifactFilename = (filename) => {
if (typeof filename !== 'string') {
throw new TypeError(`The "filename" must be a string, but you passed a value of type ${typeof filename}`);
}
if (filename.trim() === '') {
throw new Error('The `filename` must not be empty');
}
if (!filename.match(/^([0-9a-zA-Z-!_.*'()/:&$@=;+,?]+)/g)) {
throw new Error('The `filename` must match "/^([0-9a-zA-Z-!_.*\'()/:&$@=;+,?]+)/g". Use forward slashes only, even on Windows.');
}
};
exports.validateArtifactFilename = validateArtifactFilename;
const validateContent = (content) => {
if (typeof content !== 'string' && !(content instanceof Uint8Array)) {
throw new TypeError(`The "content" must be a string or Uint8Array, but you passed a value of type ${typeof content}`);
}
if (typeof content === 'string' && content.trim() === '') {
throw new Error('The `content` must not be empty');
}
};
const validateRenderAsset = (artifact) => {
// We don't have validation for it yet
if (artifact.type !== 'artifact') {
return;
}
(0, exports.validateArtifactFilename)(artifact.filename);
if (artifact.contentType === 'thumbnail') {
return;
}
validateContent(artifact.content);
};
exports.validateRenderAsset = validateRenderAsset;
@@ -0,0 +1,3 @@
export declare const isCompositionIdValid: (id: string) => RegExpMatchArray | null;
export declare const validateCompositionId: (id: string) => void;
export declare const invalidCompositionErrorMessage: string;
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.invalidCompositionErrorMessage = exports.validateCompositionId = exports.isCompositionIdValid = void 0;
const getRegex = () => /^([a-zA-Z0-9-\u4E00-\u9FFF])+$/g;
const isCompositionIdValid = (id) => id.match(getRegex());
exports.isCompositionIdValid = isCompositionIdValid;
const validateCompositionId = (id) => {
if (!(0, exports.isCompositionIdValid)(id)) {
throw new Error(`Composition id can only contain a-z, A-Z, 0-9, CJK characters and -. You passed ${id}`);
}
};
exports.validateCompositionId = validateCompositionId;
exports.invalidCompositionErrorMessage = `Composition ID must match ${String(getRegex())}`;
@@ -0,0 +1,2 @@
import type { CodecOrUndefined } from '../codec';
export declare function validateCodec(defaultCodec: unknown, location: string, name: string): asserts defaultCodec is CodecOrUndefined;
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateCodec = validateCodec;
const codec_1 = require("../codec");
function validateCodec(defaultCodec, location, name) {
if (typeof defaultCodec === 'undefined') {
return;
}
if (typeof defaultCodec !== 'string') {
throw new TypeError(`The "${name}" prop ${location} must be a string, but you passed a value of type ${typeof defaultCodec}.`);
}
if (!codec_1.validCodecs.includes(defaultCodec)) {
throw new Error(`The "${name}" prop ${location} must be one of ${codec_1.validCodecs.join(', ')}, but you passed ${defaultCodec}.`);
}
}
@@ -0,0 +1 @@
export declare const validateDefaultAndInputProps: (defaultProps: unknown, name: "defaultProps" | "inputProps", compositionId: string | null) => void;
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateDefaultAndInputProps = void 0;
const validateDefaultAndInputProps = (defaultProps, name, compositionId) => {
if (!defaultProps) {
return;
}
if (typeof defaultProps !== 'object') {
throw new Error(`"${name}" must be an object, but you passed a value of type ${typeof defaultProps}`);
}
if (Array.isArray(defaultProps)) {
throw new Error(`"${name}" must be an object, an array was passed ${compositionId ? `for composition "${compositionId}"` : ''}`);
}
};
exports.validateDefaultAndInputProps = validateDefaultAndInputProps;
@@ -0,0 +1 @@
export declare function validateDimension(amount: unknown, nameOfProp: string, location: string): asserts amount is number;
@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateDimension = validateDimension;
function validateDimension(amount, nameOfProp, location) {
if (typeof amount !== 'number') {
throw new Error(`The "${nameOfProp}" prop ${location} must be a number, but you passed a value of type ${typeof amount}`);
}
if (isNaN(amount)) {
throw new TypeError(`The "${nameOfProp}" prop ${location} must not be NaN, but is NaN.`);
}
if (!Number.isFinite(amount)) {
throw new TypeError(`The "${nameOfProp}" prop ${location} must be finite, but is ${amount}.`);
}
if (amount % 1 !== 0) {
throw new TypeError(`The "${nameOfProp}" prop ${location} must be an integer, but is ${amount}.`);
}
if (amount <= 0) {
throw new TypeError(`The "${nameOfProp}" prop ${location} must be positive, but got ${amount}.`);
}
}
@@ -0,0 +1,4 @@
export declare function validateDurationInFrames(durationInFrames: unknown, options: {
component: string;
allowFloats: boolean;
}): asserts durationInFrames is number;
@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateDurationInFrames = validateDurationInFrames;
function validateDurationInFrames(durationInFrames, options) {
const { allowFloats, component } = options;
if (typeof durationInFrames === 'undefined') {
throw new Error(`The "durationInFrames" prop ${component} is missing.`);
}
if (typeof durationInFrames !== 'number') {
throw new Error(`The "durationInFrames" prop ${component} must be a number, but you passed a value of type ${typeof durationInFrames}`);
}
if (durationInFrames <= 0) {
throw new TypeError(`The "durationInFrames" prop ${component} must be positive, but got ${durationInFrames}.`);
}
if (!allowFloats && durationInFrames % 1 !== 0) {
throw new TypeError(`The "durationInFrames" prop ${component} must be an integer, but got ${durationInFrames}.`);
}
if (!Number.isFinite(durationInFrames)) {
throw new TypeError(`The "durationInFrames" prop ${component} must be finite, but got ${durationInFrames}.`);
}
}
@@ -0,0 +1,3 @@
export declare const isFolderNameValid: (name: string) => RegExpMatchArray | null;
export declare const validateFolderName: (name: string | null) => void;
export declare const invalidFolderNameErrorMessage: string;
@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.invalidFolderNameErrorMessage = exports.validateFolderName = exports.isFolderNameValid = void 0;
const getRegex = () => /^([a-zA-Z0-9-\u4E00-\u9FFF])+$/g;
const isFolderNameValid = (name) => name.match(getRegex());
exports.isFolderNameValid = isFolderNameValid;
const validateFolderName = (name) => {
if (name === undefined || name === null) {
throw new TypeError('You must pass a name to a <Folder />.');
}
if (typeof name !== 'string') {
throw new TypeError(`The "name" you pass into <Folder /> must be a string. Got: ${typeof name}`);
}
if (!(0, exports.isFolderNameValid)(name)) {
throw new Error(`Folder name can only contain a-z, A-Z, 0-9 and -. You passed ${name}`);
}
};
exports.validateFolderName = validateFolderName;
exports.invalidFolderNameErrorMessage = `Folder name must match ${String(getRegex())}`;
@@ -0,0 +1 @@
export declare function validateFps(fps: unknown, location: string, isGif: boolean): asserts fps is number;
@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateFps = validateFps;
function validateFps(fps, location, isGif) {
if (typeof fps !== 'number') {
throw new Error(`"fps" must be a number, but you passed a value of type ${typeof fps} ${location}`);
}
if (!Number.isFinite(fps)) {
throw new Error(`"fps" must be a finite, but you passed ${fps} ${location}`);
}
if (isNaN(fps)) {
throw new Error(`"fps" must not be NaN, but got ${fps} ${location}`);
}
if (fps <= 0) {
throw new TypeError(`"fps" must be positive, but got ${fps} ${location}`);
}
if (isGif && fps > 50) {
throw new TypeError(`The FPS for a GIF cannot be higher than 50. Use the --every-nth-frame option to lower the FPS: https://remotion.dev/docs/render-as-gif`);
}
}
@@ -0,0 +1 @@
export declare const validateSpringDuration: (dur: unknown) => void;
@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateSpringDuration = void 0;
const validateSpringDuration = (dur) => {
if (typeof dur === 'undefined') {
return;
}
if (typeof dur !== 'number') {
throw new TypeError(`A "duration" of a spring must be a "number" but is "${typeof dur}"`);
}
if (Number.isNaN(dur)) {
throw new TypeError('A "duration" of a spring is NaN, which it must not be');
}
if (!Number.isFinite(dur)) {
throw new TypeError('A "duration" of a spring must be finite, but is ' + dur);
}
if (dur <= 0) {
throw new TypeError('A "duration" of a spring must be positive, but is ' + dur);
}
};
exports.validateSpringDuration = validateSpringDuration;