details preview
This commit is contained in:
parent
81238c5182
commit
0a4eea19c5
39 changed files with 242 additions and 286 deletions
|
@ -6,7 +6,6 @@ export const ArrayExtensions = () => {
|
|||
};
|
||||
}
|
||||
if ([].equals === undefined) {
|
||||
// eslint-disable-next-line no-extend-native
|
||||
Array.prototype.equals = function (array, strict = true) {
|
||||
if (!array) return false;
|
||||
|
||||
|
@ -27,7 +26,6 @@ export const ArrayExtensions = () => {
|
|||
};
|
||||
}
|
||||
if ([].lastElement === undefined) {
|
||||
// eslint-disable-next-line no-extend-native
|
||||
Array.prototype.lastElement = function () {
|
||||
const instanceCheck = this;
|
||||
if (instanceCheck === undefined) {
|
||||
|
@ -39,7 +37,6 @@ export const ArrayExtensions = () => {
|
|||
};
|
||||
}
|
||||
if ([].isEmpty === undefined) {
|
||||
// eslint-disable-next-line no-extend-native
|
||||
Array.prototype.isEmpty = function () {
|
||||
return this.length === 0;
|
||||
};
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
export const StringExtensions = () => {
|
||||
if ("".isEmpty === undefined) {
|
||||
// eslint-disable-next-line no-extend-native
|
||||
String.prototype.isEmpty = function () {
|
||||
return this.length === 0;
|
||||
};
|
||||
|
@ -11,7 +10,6 @@ export const StringExtensions = () => {
|
|||
};
|
||||
}
|
||||
if ("".isNotEmpty === undefined) {
|
||||
// eslint-disable-next-line no-extend-native
|
||||
String.prototype.isNotEmpty = function () {
|
||||
return this.length !== 0;
|
||||
};
|
||||
|
|
|
@ -9,7 +9,7 @@ export interface Parts {
|
|||
name: string;
|
||||
part_path: string;
|
||||
material_path: string;
|
||||
httpUrl?: string;
|
||||
stlUrl?: string;
|
||||
}
|
||||
export class RobossemblerAssetsNetworkMapperScenario extends CallbackStrategyWithEmpty {
|
||||
call = async (): ResponseBase => (await new SearchManyDataBaseModelUseCase<IProjectModel>(ProjectDBModel).call({ isActive: true }, 'is dont active projects')).map((projectModel) => {
|
||||
|
@ -22,8 +22,7 @@ export class RobossemblerAssetsNetworkMapperScenario extends CallbackStrategyWit
|
|||
).map((model) => {
|
||||
|
||||
model.map((el) => {
|
||||
el.httpUrl = address + '/' + rootDir.match(new RegExp(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gm))[0] + '/assets/libs/objects/' + el.name + '.glb'
|
||||
// server/build/public/0ddbb777-8002-4424-a3b0-d869783cca97/assets/libs/objects/planet_gear.glb
|
||||
el.stlUrl = address + '/' + rootDir.match(new RegExp(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gm))[0] + '/assets/' + el.part_path
|
||||
return el
|
||||
})
|
||||
return Result.ok(model);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue