21037: renamed a few "require" functions to adapt to webpack now reserving that word...
authorLisa Knox <lisaknox83@gmail.com>
Mon, 15 Apr 2024 13:23:31 +0000 (09:23 -0400)
committerLisa Knox <lisaknox83@gmail.com>
Mon, 15 Apr 2024 13:23:31 +0000 (09:23 -0400)
services/workbench2/src/components/workflow-inputs-form/validators.ts
services/workbench2/src/validators/require.tsx
services/workbench2/src/validators/validators.tsx
services/workbench2/src/views-components/dialog-upload/dialog-collection-files-upload.tsx
services/workbench2/src/views/run-process-panel/inputs/enum-input.tsx
services/workbench2/src/views/run-process-panel/inputs/project-input.tsx
services/workbench2/src/views/run-process-panel/inputs/string-input.tsx
services/workbench2/yarn.lock

index 1de21d9f357949b430b1f3b874087fa2ec52723d..7c90c049de75944d94aaa62effe605b207c77bab 100644 (file)
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { CommandInputParameter } from 'models/workflow';
-import { require } from 'validators/require';
+import { fieldRequire } from 'validators/require';
 import { CWLType } from '../../models/workflow';
 
 
@@ -17,5 +17,5 @@ export const required = ({ type }: CommandInputParameter) => {
             }
         }
     }
-    return require;
+    return fieldRequire;
 };
index fbba02aeb4d8e4127da10f58f12723d7672ef5ae..b594bf0803eaab110c860aa6620b48333f30adfb 100644 (file)
@@ -4,6 +4,6 @@
 
 export const ERROR_MESSAGE = 'This field is required.';
 
-export const require: any = (value: string) => {
+export const fieldRequire: any = (value: string) => {
     return value && value.length > 0 ? undefined : ERROR_MESSAGE;
 };
index 87a4c1f57e2523fee923b41619b288c929fc99f1..73bc4460dc3653807e881b08b8072cfc643746d0 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { require } from './require';
+import { fieldRequire } from './require';
 import { maxLength } from './max-length';
 import { isRsaKey } from './is-rsa-key';
 import { isRemoteHost } from "./is-remote-host";
@@ -11,35 +11,35 @@ import { validFilePath, validName, validNameAllowSlash } from "./valid-name";
 export const TAG_KEY_VALIDATION = [maxLength(255)];
 export const TAG_VALUE_VALIDATION = [maxLength(255)];
 
-export const PROJECT_NAME_VALIDATION = [require, validName, maxLength(255)];
-export const PROJECT_NAME_VALIDATION_ALLOW_SLASH = [require, validNameAllowSlash, maxLength(255)];
+export const PROJECT_NAME_VALIDATION = [fieldRequire, validName, maxLength(255)];
+export const PROJECT_NAME_VALIDATION_ALLOW_SLASH = [fieldRequire, validNameAllowSlash, maxLength(255)];
 
-export const COLLECTION_NAME_VALIDATION = [require, validName, maxLength(255)];
-export const COLLECTION_NAME_VALIDATION_ALLOW_SLASH = [require, validNameAllowSlash, maxLength(255)];
+export const COLLECTION_NAME_VALIDATION = [fieldRequire, validName, maxLength(255)];
+export const COLLECTION_NAME_VALIDATION_ALLOW_SLASH = [fieldRequire, validNameAllowSlash, maxLength(255)];
 export const COLLECTION_DESCRIPTION_VALIDATION = [maxLength(255)];
-export const COLLECTION_PROJECT_VALIDATION = [require];
+export const COLLECTION_PROJECT_VALIDATION = [fieldRequire];
 
-export const COPY_NAME_VALIDATION = [require, maxLength(255)];
-export const COPY_FILE_VALIDATION = [require];
-export const RENAME_FILE_VALIDATION = [require, validFilePath];
+export const COPY_NAME_VALIDATION = [fieldRequire, maxLength(255)];
+export const COPY_FILE_VALIDATION = [fieldRequire];
+export const RENAME_FILE_VALIDATION = [fieldRequire, validFilePath];
 
-export const MOVE_TO_VALIDATION = [require];
+export const MOVE_TO_VALIDATION = [fieldRequire];
 
-export const PROCESS_NAME_VALIDATION = [require, maxLength(255)];
+export const PROCESS_NAME_VALIDATION = [fieldRequire, maxLength(255)];
 export const PROCESS_DESCRIPTION_VALIDATION = [maxLength(255)];
 
-export const REPOSITORY_NAME_VALIDATION = [require, maxLength(255)];
+export const REPOSITORY_NAME_VALIDATION = [fieldRequire, maxLength(255)];
 
-export const USER_EMAIL_VALIDATION = [require, maxLength(255)];
+export const USER_EMAIL_VALIDATION = [fieldRequire, maxLength(255)];
 export const PROFILE_EMAIL_VALIDATION = [maxLength(255)];
 export const PROFILE_URL_VALIDATION = [maxLength(255)];
 export const USER_LENGTH_VALIDATION = [maxLength(255)];
 
-export const SSH_KEY_PUBLIC_VALIDATION = [require, isRsaKey, maxLength(1024)];
-export const SSH_KEY_NAME_VALIDATION = [require, maxLength(255)];
+export const SSH_KEY_PUBLIC_VALIDATION = [fieldRequire, isRsaKey, maxLength(1024)];
+export const SSH_KEY_NAME_VALIDATION = [fieldRequire, maxLength(255)];
 
-export const SITE_MANAGER_REMOTE_HOST_VALIDATION = [require, isRemoteHost, maxLength(255)];
+export const SITE_MANAGER_REMOTE_HOST_VALIDATION = [fieldRequire, isRemoteHost, maxLength(255)];
 
-export const MY_ACCOUNT_VALIDATION = [require];
+export const MY_ACCOUNT_VALIDATION = [fieldRequire];
 
-export const CHOOSE_VM_VALIDATION = [require];
+export const CHOOSE_VM_VALIDATION = [fieldRequire];
index f65bdabfeb935ef79a93609a5beed7f3988a66d6..c29b627d3646ed1bfa57d0441f1199868367b93c 100644 (file)
@@ -7,7 +7,7 @@ import { InjectedFormProps, Field } from 'redux-form';
 import { WithDialogProps } from 'store/dialog/with-dialog';
 import { CollectionCreateFormDialogData } from 'store/collections/collection-create-actions';
 import { FormDialog } from 'components/form-dialog/form-dialog';
-import { require } from 'validators/require';
+import { fieldRequire } from 'validators/require';
 import { FileUploaderField } from 'views-components/file-uploader/file-uploader';
 import { WarningCollection } from 'components/warning-collection/warning-collection';
 import { fileUploaderActions } from 'store/file-uploader/file-uploader-actions';
@@ -43,6 +43,6 @@ const UploadCollectionFilesFields = () => <>
     <WarningCollection text="Uploading new files will change content address." />
 </>;
 
-const FILES_FIELD_VALIDATION = [require];
+const FILES_FIELD_VALIDATION = [fieldRequire];
 
 
index 207a30acd0f6f0d28691fcf0d0db74e2e075efdc..e6a6b90cfe4ac1e095d675823297be85aa8e166b 100644 (file)
@@ -5,7 +5,7 @@
 import React from 'react';
 import { Field } from 'redux-form';
 import { memoize } from 'lodash/fp';
-import { require } from 'validators/require';
+import { fieldRequire } from 'validators/require';
 import { Select, MenuItem } from '@material-ui/core';
 import { EnumCommandInputParameter, CommandInputEnumSchema, isRequiredInput, getEnumType } from 'models/workflow';
 import { GenericInputProps, GenericInput } from './generic-input';
@@ -17,7 +17,7 @@ export interface EnumInputProps {
 const getValidation = memoize(
     (input: EnumCommandInputParameter) => ([
         isRequiredInput(input)
-            ? require
+            ? fieldRequire
             : () => undefined,
     ]));
 
index 438bbe8e7e40163b55b8d363a53b82dc5f23ab01..b455135f3a2c12457692e9de89e2691048238b1e 100644 (file)
@@ -21,7 +21,7 @@ import { getUserUuid } from 'common/getuser';
 
 export type ProjectCommandInputParameter = GenericCommandInputParameter<ProjectResource, ProjectResource>;
 
-const require: any = (value?: ProjectResource) => (value === undefined);
+const isUndefined: any = (value?: ProjectResource) => (value === undefined);
 
 export interface ProjectInputProps {
     required: boolean;
@@ -37,7 +37,7 @@ export const ProjectInput = ({ required, input, options }: ProjectInputProps) =>
         commandInput={input}
         component={ProjectInputComponent as any}
         format={format}
-        validate={required ? require : undefined}
+        validate={required ? isUndefined : undefined}
         {...{
             options,
             required
index 543100db1fe5d9e96fd2d6e18bd28674b15ac91b..e497004801ea0fce01cdcf24edacff0c2226065a 100644 (file)
@@ -6,7 +6,7 @@ import React from 'react';
 import { memoize } from 'lodash/fp';
 import { isRequiredInput, StringCommandInputParameter } from 'models/workflow';
 import { Field } from 'redux-form';
-import { require } from 'validators/require';
+import { fieldRequire } from 'validators/require';
 import { GenericInputProps, GenericInput } from 'views/run-process-panel/inputs/generic-input';
 import { Input as MaterialInput } from '@material-ui/core';
 
@@ -23,7 +23,7 @@ export const StringInput = ({ input }: StringInputProps) =>
 const getValidation = memoize(
     (input: StringCommandInputParameter) => ([
         isRequiredInput(input)
-            ? require
+            ? fieldRequire
             : () => undefined,
     ]));
 
index 5e02181229d26b4665a45c5750e6ac897ea66ae9..b1e048f9d7f197a3c31dffb7f54b374b7cd0ea98 100644 (file)
@@ -2590,12 +2590,12 @@ __metadata:
   linkType: hard
 
 "@nodelib/fs.walk@npm:^1.2.3":
-  version: 1.2.7
-  resolution: "@nodelib/fs.walk@npm:1.2.7"
+  version: 1.2.8
+  resolution: "@nodelib/fs.walk@npm:1.2.8"
   dependencies:
     "@nodelib/fs.scandir": 2.1.5
     fastq: ^1.6.0
-  checksum: f5286c39c2f9cc0e89b2cbee6b735c5cf572c37f9c0a47a16ce3c1d9ba5d488f3153976ceb1b984ad09dbd8d1de620fab3e7b0ef2b64a006267d0895a16ce95c
+  checksum: 190c643f156d8f8f277bf2a6078af1ffde1fd43f498f187c2db24d35b4b4b5785c02c7dc52e356497b9a1b65b13edc996de08de0b961c32844364da02986dc53
   languageName: node
   linkType: hard
 
@@ -3185,14 +3185,14 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@types/json-schema@npm:*, @types/json-schema@npm:^7.0.3, @types/json-schema@npm:^7.0.8":
+"@types/json-schema@npm:*, @types/json-schema@npm:^7.0.3, @types/json-schema@npm:^7.0.7, @types/json-schema@npm:^7.0.8":
   version: 7.0.15
   resolution: "@types/json-schema@npm:7.0.15"
   checksum: 97ed0cb44d4070aecea772b7b2e2ed971e10c81ec87dd4ecc160322ffa55ff330dace1793489540e3e318d90942064bb697cc0f8989391797792d919737b3b98
   languageName: node
   linkType: hard
 
-"@types/json-schema@npm:^7.0.5, @types/json-schema@npm:^7.0.7":
+"@types/json-schema@npm:^7.0.5":
   version: 7.0.7
   resolution: "@types/json-schema@npm:7.0.7"
   checksum: ea3b409235862d28122751158f4054e729e31ad844bd7b8b23868f38c518047b1c0e8e4e7cc293e02c31a2fb8cfc8a4506c2de2a745cf78b218e064fb8898cd4
@@ -5878,9 +5878,9 @@ __metadata:
   linkType: hard
 
 "caniuse-lite@npm:^1.0.30001125":
-  version: 1.0.30001609
-  resolution: "caniuse-lite@npm:1.0.30001609"
-  checksum: 462f38b5c33ce544dcfa65cc3940fca7fe2d3d916ec2d9c9905ea7becf6930c540774a1278f901fe44d3b85f7d7a2f05523d27602c6ce93bb2b3806e9f3e9989
+  version: 1.0.30001610
+  resolution: "caniuse-lite@npm:1.0.30001610"
+  checksum: 580c7367aafd7e524f4e3f0e8b22ac08d081a4d44ceece211f1758e214df9a87961750fb1e1ee28a2cd2830f0daf3edafe5e1d87bf1eefbbe7c6cf3d00e2979d
   languageName: node
   linkType: hard
 
@@ -7977,9 +7977,9 @@ __metadata:
   linkType: hard
 
 "electron-to-chromium@npm:^1.3.564":
-  version: 1.4.735
-  resolution: "electron-to-chromium@npm:1.4.735"
-  checksum: feedf1f10b83430669e69a0bbb41f31b81dac97c07d76e1fe999d555c43fd6f5af1000c86dd6be8a9d609b97f1ddbcfac37edec4b55b2b379775655655989bd3
+  version: 1.4.736
+  resolution: "electron-to-chromium@npm:1.4.736"
+  checksum: dcba6d43ffbc40e5d3decb3a0de67b9721a257fefde4eceac0d75202029c62ace7b377d217f49d1ba9cfbad61f89a14514e85a4de77b7205cee336f2e1f0baee
   languageName: node
   linkType: hard
 
@@ -9215,7 +9215,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"fast-glob@npm:^3.1.1":
+"fast-glob@npm:^3.1.1, fast-glob@npm:^3.2.9":
   version: 3.3.2
   resolution: "fast-glob@npm:3.3.2"
   dependencies:
@@ -9228,19 +9228,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"fast-glob@npm:^3.2.9":
-  version: 3.3.1
-  resolution: "fast-glob@npm:3.3.1"
-  dependencies:
-    "@nodelib/fs.stat": ^2.0.2
-    "@nodelib/fs.walk": ^1.2.3
-    glob-parent: ^5.1.2
-    merge2: ^1.3.0
-    micromatch: ^4.0.4
-  checksum: b6f3add6403e02cf3a798bfbb1183d0f6da2afd368f27456010c0bc1f9640aea308243d4cb2c0ab142f618276e65ecb8be1661d7c62a7b4e5ba774b9ce5432e5
-  languageName: node
-  linkType: hard
-
 "fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0":
   version: 2.1.0
   resolution: "fast-json-stable-stringify@npm:2.1.0"
@@ -9256,11 +9243,11 @@ __metadata:
   linkType: hard
 
 "fastq@npm:^1.6.0":
-  version: 1.11.0
-  resolution: "fastq@npm:1.11.0"
+  version: 1.17.1
+  resolution: "fastq@npm:1.17.1"
   dependencies:
     reusify: ^1.0.4
-  checksum: 9db0ceea9280c5f207da40c562a4e574913c18933cd74b880b01bf8e81a9a6e368ec71e89c9c1b9f4066d0275cc22600efd6dde87f713217acbf67076481734b
+  checksum: a8c5b26788d5a1763f88bae56a8ddeee579f935a831c5fe7a8268cea5b0a91fbfe705f612209e02d639b881d7b48e461a50da4a10cfaa40da5ca7cc9da098d88
   languageName: node
   linkType: hard
 
@@ -10793,20 +10780,13 @@ __metadata:
   languageName: node
   linkType: hard
 
-"ignore@npm:^5.1.4, ignore@npm:^5.1.8":
+"ignore@npm:^5.1.4, ignore@npm:^5.1.8, ignore@npm:^5.2.0":
   version: 5.3.1
   resolution: "ignore@npm:5.3.1"
   checksum: 71d7bb4c1dbe020f915fd881108cbe85a0db3d636a0ea3ba911393c53946711d13a9b1143c7e70db06d571a5822c0a324a6bcde5c9904e7ca5047f01f1bf8cd3
   languageName: node
   linkType: hard
 
-"ignore@npm:^5.2.0":
-  version: 5.2.4
-  resolution: "ignore@npm:5.2.4"
-  checksum: 3d4c309c6006e2621659311783eaea7ebcd41fe4ca1d78c91c473157ad6666a57a2df790fe0d07a12300d9aac2888204d7be8d59f9aaf665b1c7fcdb432517ef
-  languageName: node
-  linkType: hard
-
 "image-extensions@npm:^1.1.0":
   version: 1.1.0
   resolution: "image-extensions@npm:1.1.0"