Add barcode-detector-api-polyfill dependency and update environment variable declarations in SvelteKit project
CI / build (push) Has been skipped
CI / deploy (push) Successful in 1m50s

This commit is contained in:
eewing
2026-02-17 14:58:53 -06:00
parent cff20a652a
commit 9022114c8d
2137 changed files with 201996 additions and 762 deletions
+22
View File
@@ -0,0 +1,22 @@
interface ErrorOptions {
cause?: unknown;
}
export declare class CustomError extends Error {
name: string;
constructor(message?: string, options?: ErrorOptions);
}
export {};
export interface CustomErrorInterface extends Error {
}
export interface CustomErrorProperties {
[property: string]: any;
}
export interface CustomErrorConstructor<Properties extends CustomErrorProperties> extends ErrorConstructor {
readonly prototype: CustomErrorInterface;
new (...args: any[]): CustomErrorInterface & Properties;
(...args: any[]): CustomErrorInterface & Properties;
}
export declare type GenericErrorConstructor = ErrorConstructor | EvalErrorConstructor | RangeErrorConstructor | ReferenceErrorConstructor | SyntaxErrorConstructor | TypeErrorConstructor | URIErrorConstructor | CustomErrorConstructor<CustomErrorProperties>;
declare type CustomErrorFunction<Properties> = (this: Properties, ...args: any[]) => void;
export declare function customErrorFactory<Properties extends CustomErrorProperties>(fn: CustomErrorFunction<Properties>, parent?: GenericErrorConstructor): CustomErrorConstructor<Properties>;
export {};
+110
View File
@@ -0,0 +1,110 @@
function fixProto(target, prototype) {
var setPrototypeOf = Object.setPrototypeOf;
setPrototypeOf ? setPrototypeOf(target, prototype) : target.__proto__ = prototype;
}
function fixStack(target, fn) {
if (fn === void 0) {
fn = target.constructor;
}
var captureStackTrace = Error.captureStackTrace;
captureStackTrace && captureStackTrace(target, fn);
}
var __extends = undefined && undefined.__extends || function () {
var _extendStatics = function extendStatics(d, b) {
_extendStatics = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function (d, b) {
d.__proto__ = b;
} || function (d, b) {
for (var p in b) {
if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
}
};
return _extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
_extendStatics(d, b);
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
}();
var CustomError = function (_super) {
__extends(CustomError, _super);
function CustomError(message, options) {
var _newTarget = this.constructor;
var _this = _super.call(this, message, options) || this;
Object.defineProperty(_this, 'name', {
value: _newTarget.name,
enumerable: false,
configurable: true
});
fixProto(_this, _newTarget.prototype);
fixStack(_this);
return _this;
}
return CustomError;
}(Error);
var __spreadArray = undefined && undefined.__spreadArray || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
function customErrorFactory(fn, parent) {
if (parent === void 0) {
parent = Error;
}
function CustomError() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (!(this instanceof CustomError)) return new (CustomError.bind.apply(CustomError, __spreadArray([void 0], args, false)))();
parent.apply(this, args);
Object.defineProperty(this, 'name', {
value: fn.name || parent.name,
enumerable: false,
configurable: true
});
fn.apply(this, args);
fixStack(this, CustomError);
}
return Object.defineProperties(CustomError, {
prototype: {
value: Object.create(parent.prototype, {
constructor: {
value: CustomError,
writable: true,
configurable: true
}
})
}
});
}
exports.CustomError = CustomError;
exports.customErrorFactory = customErrorFactory;
//# sourceMappingURL=custom-error.js.map
File diff suppressed because one or more lines are too long
+109
View File
@@ -0,0 +1,109 @@
function fixProto(target, prototype) {
var setPrototypeOf = Object.setPrototypeOf;
setPrototypeOf ? setPrototypeOf(target, prototype) : target.__proto__ = prototype;
}
function fixStack(target, fn) {
if (fn === void 0) {
fn = target.constructor;
}
var captureStackTrace = Error.captureStackTrace;
captureStackTrace && captureStackTrace(target, fn);
}
var __extends = undefined && undefined.__extends || function () {
var _extendStatics = function extendStatics(d, b) {
_extendStatics = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function (d, b) {
d.__proto__ = b;
} || function (d, b) {
for (var p in b) {
if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
}
};
return _extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
_extendStatics(d, b);
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
}();
var CustomError = function (_super) {
__extends(CustomError, _super);
function CustomError(message, options) {
var _newTarget = this.constructor;
var _this = _super.call(this, message, options) || this;
Object.defineProperty(_this, 'name', {
value: _newTarget.name,
enumerable: false,
configurable: true
});
fixProto(_this, _newTarget.prototype);
fixStack(_this);
return _this;
}
return CustomError;
}(Error);
var __spreadArray = undefined && undefined.__spreadArray || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
function customErrorFactory(fn, parent) {
if (parent === void 0) {
parent = Error;
}
function CustomError() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (!(this instanceof CustomError)) return new (CustomError.bind.apply(CustomError, __spreadArray([void 0], args, false)))();
parent.apply(this, args);
Object.defineProperty(this, 'name', {
value: fn.name || parent.name,
enumerable: false,
configurable: true
});
fn.apply(this, args);
fixStack(this, CustomError);
}
return Object.defineProperties(CustomError, {
prototype: {
value: Object.create(parent.prototype, {
constructor: {
value: CustomError,
writable: true,
configurable: true
}
})
}
});
}
export { CustomError, customErrorFactory };
//# sourceMappingURL=custom-error.mjs.map
File diff suppressed because one or more lines are too long
+107
View File
@@ -0,0 +1,107 @@
function fixProto(target, prototype) {
var setPrototypeOf = Object.setPrototypeOf;
setPrototypeOf ? setPrototypeOf(target, prototype) : target.__proto__ = prototype;
}
function fixStack(target, fn) {
if (fn === void 0) {
fn = target.constructor;
}
var captureStackTrace = Error.captureStackTrace;
captureStackTrace && captureStackTrace(target, fn);
}
var __extends = undefined && undefined.__extends || function () {
var _extendStatics = function extendStatics(d, b) {
_extendStatics = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function (d, b) {
d.__proto__ = b;
} || function (d, b) {
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
};
return _extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
_extendStatics(d, b);
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
}();
var CustomError = function (_super) {
__extends(CustomError, _super);
function CustomError(message, options) {
var _newTarget = this.constructor;
var _this = _super.call(this, message, options) || this;
Object.defineProperty(_this, 'name', {
value: _newTarget.name,
enumerable: false,
configurable: true
});
fixProto(_this, _newTarget.prototype);
fixStack(_this);
return _this;
}
return CustomError;
}(Error);
var __spreadArray = undefined && undefined.__spreadArray || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
function customErrorFactory(fn, parent) {
if (parent === void 0) {
parent = Error;
}
function CustomError() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (!(this instanceof CustomError)) return new (CustomError.bind.apply(CustomError, __spreadArray([void 0], args, false)))();
parent.apply(this, args);
Object.defineProperty(this, 'name', {
value: fn.name || parent.name,
enumerable: false,
configurable: true
});
fn.apply(this, args);
fixStack(this, CustomError);
}
return Object.defineProperties(CustomError, {
prototype: {
value: Object.create(parent.prototype, {
constructor: {
value: CustomError,
writable: true,
configurable: true
}
})
}
});
}
export { CustomError, customErrorFactory };
//# sourceMappingURL=custom-error.modern.mjs.map
File diff suppressed because one or more lines are too long
+22
View File
@@ -0,0 +1,22 @@
interface ErrorOptions {
cause?: unknown;
}
export declare class CustomError extends Error {
name: string;
constructor(message?: string, options?: ErrorOptions);
}
export {};
export interface CustomErrorInterface extends Error {
}
export interface CustomErrorProperties {
[property: string]: any;
}
export interface CustomErrorConstructor<Properties extends CustomErrorProperties> extends ErrorConstructor {
readonly prototype: CustomErrorInterface;
new (...args: any[]): CustomErrorInterface & Properties;
(...args: any[]): CustomErrorInterface & Properties;
}
export declare type GenericErrorConstructor = ErrorConstructor | EvalErrorConstructor | RangeErrorConstructor | ReferenceErrorConstructor | SyntaxErrorConstructor | TypeErrorConstructor | URIErrorConstructor | CustomErrorConstructor<CustomErrorProperties>;
declare type CustomErrorFunction<Properties> = (this: Properties, ...args: any[]) => void;
export declare function customErrorFactory<Properties extends CustomErrorProperties>(fn: CustomErrorFunction<Properties>, parent?: GenericErrorConstructor): CustomErrorConstructor<Properties>;
export {};
+1
View File
@@ -0,0 +1 @@
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports):"function"==typeof define&&define.amd?define(["exports"],factory):factory((global=global||self).tsCustomError={})}(this,function(exports){function fixStack(target,fn){void 0===fn&&(fn=target.constructor);var captureStackTrace=Error.captureStackTrace;captureStackTrace&&captureStackTrace(target,fn)}_extendStatics=function(d,b){return(_extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)Object.prototype.hasOwnProperty.call(b,p)&&(d[p]=b[p])})(d,b)};var _extendStatics,__extends=function(d,b){if("function"!=typeof b&&null!==b)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function __(){this.constructor=d}_extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)},CustomError=function(_super){function CustomError(message,options){var setPrototypeOf,_newTarget=this.constructor,message=_super.call(this,message,options)||this;return Object.defineProperty(message,"name",{value:_newTarget.name,enumerable:!1,configurable:!0}),options=message,_newTarget=_newTarget.prototype,(setPrototypeOf=Object.setPrototypeOf)?setPrototypeOf(options,_newTarget):options.__proto__=_newTarget,fixStack(message),message}return __extends(CustomError,_super),CustomError}(Error),__spreadArray=function(to,from,pack){if(pack||2===arguments.length)for(var ar,i=0,l=from.length;i<l;i++)!ar&&i in from||((ar=ar||Array.prototype.slice.call(from,0,i))[i]=from[i]);return to.concat(ar||Array.prototype.slice.call(from))};exports.CustomError=CustomError,exports.customErrorFactory=function(fn,parent){function CustomError(){for(var args=[],_i=0;_i<arguments.length;_i++)args[_i]=arguments[_i];if(!(this instanceof CustomError))return new(CustomError.bind.apply(CustomError,__spreadArray([void 0],args,!1)));parent.apply(this,args),Object.defineProperty(this,"name",{value:fn.name||parent.name,enumerable:!1,configurable:!0}),fn.apply(this,args),fixStack(this,CustomError)}return void 0===parent&&(parent=Error),Object.defineProperties(CustomError,{prototype:{value:Object.create(parent.prototype,{constructor:{value:CustomError,writable:!0,configurable:!0}})}})}});
File diff suppressed because one or more lines are too long
+2
View File
@@ -0,0 +1,2 @@
export * from "./custom-error";
export * from "./factory";