diff --git a/docs/management-apis/endpoints-json.md b/docs/management-apis/endpoints-json.md index 81f7103e49e..2a7f5d068a0 100644 --- a/docs/management-apis/endpoints-json.md +++ b/docs/management-apis/endpoints-json.md @@ -232,7 +232,7 @@ $ curl 'localhost:5678/v1/jobs' ] ``` -## GET /v1/jobs/{jobId} +## GET /v1/jobs/\{jobId\}; Returns the job that matches given job id. @@ -259,7 +259,7 @@ $ curl 'localhost:5678/v1/jobs/5a50580c-4a50-48d9-80f8-ac70a00f3dbd' **NOTE:** Jobs without the `active` property are treated the same as jobs with the `active` property set to `true`. -## PUT /v1/jobs/{jobId} +## PUT /v1/jobs/\{jobId\} Updates a stored job that has the given job id. @@ -283,7 +283,7 @@ $ curl -XPUT 'localhost:5678/v1/jobs/5a50580c-4a50-48d9-80f8-ac70a00f3dbd' -d@jo } ``` -## GET /v1/jobs/{jobId}/ex +## GET /v1/jobs/\{jobId\}/ex Returns the current or latest job execution context that matches given job id. @@ -333,7 +333,7 @@ $ curl 'localhost:5678/v1/jobs/5a50580c-4a50-48d9-80f8-ac70a00f3dbd/ex' } ``` -## POST /v1/jobs/{jobId}/_start +## POST /v1/jobs/\{jobId\}/_start Issues a start command, this will start a fresh new job associated with the job id. @@ -347,7 +347,7 @@ $ curl -XPOST 'localhost:5678/v1/jobs/5a50580c-4a50-48d9-80f8-ac70a00f3dbd/_star } ``` -## POST /v1/jobs/{jobId}/_stop +## POST /v1/jobs/\{jobId\}/_stop Issues a stop command which will shutdown execution controller and workers for that job, marks the job execution context state as stopped. You can optionally add a timeout query parameter to dynamically change how long it will wait as the time the slicer/fetchers take to exit will vary. In a Kubernetes environment the force option will immediately kill all jobs, deployments, execution controllers and workers associated with the job. @@ -377,7 +377,7 @@ $ curl -XPOST 'localhost:5678/v1/jobs/5a50580c-4a50-48d9-80f8-ac70a00f3dbd/_stop } ``` -## POST /v1/jobs/{jobId}/_pause +## POST /v1/jobs/\{jobId\}/_pause Issues a pause command, this will prevent the execution controller from invoking slicers and also prevent the allocation of slices to workers, marks the job execution context state as paused. @@ -390,7 +390,7 @@ $ curl -XPOST 'localhost:5678/v1/jobs/5a50580c-4a50-48d9-80f8-ac70a00f3dbd/_paus } ``` -## POST /v1/jobs/{jobId}/_resume +## POST /v1/jobs/\{jobId\}/_resume Issues a resume command, this allows the execution controller to continue invoking slicers and allocating work if they were in a paused state, marks the job execution context as running. @@ -403,7 +403,7 @@ $ curl -XPOST 'localhost:5678/v1/jobs/5a50580c-4a50-48d9-80f8-ac70a00f3dbd/_resu } ``` -## POST /v1/jobs/{jobId}/_recover +## POST /v1/jobs/\{jobId\}/_recover **IMPORTANT** When recovering an job, the last execution ran will be recovered but any changes applied to the job since the recovery will be applied. @@ -423,7 +423,7 @@ $ curl -XPOST 'localhost:5678/v1/jobs/863678b3-daf3-4ea9-8cb0-88b846cd7e57/_reco } ``` -## POST /v1/jobs/{jobId}/_workers +## POST /v1/jobs/\{jobId\}/_workers You can dynamically change the amount of workers that are allocated for a specific job execution. @@ -442,7 +442,7 @@ $ curl -XPOST 'localhost:5678/v1/jobs/5a50580c-4a50-48d9-80f8-ac70a00f3dbd/_work "5 workers have been add for execution: 863678b3-daf3-4ea9-8cb0-88b846cd7e57" ``` -## POST /v1/jobs/{jobId}/_active +## POST /v1/jobs/\{jobId\}/_active Sets the `active` property on the specified job as `true`. @@ -471,7 +471,7 @@ $ curl -XPOST 'localhost:5678/v1/jobs/5a50580c-4a50-48d9-80f8-ac70a00f3dbd/_acti } ``` -## POST /v1/jobs/{jobId}/_inactive +## POST /v1/jobs/\{jobId\}/_inactive Sets the `active` property on the specified job as `false`. @@ -500,7 +500,7 @@ $ curl -XPOST 'localhost:5678/v1/jobs/5a50580c-4a50-48d9-80f8-ac70a00f3dbd/_inac } ``` -## GET /v1/jobs/{jobId}/controller +## GET /v1/jobs/\{jobId\}/controller Same concept as cluster/controllers, but only get stats on execution controller associated with the given job_id. @@ -530,7 +530,7 @@ $ curl 'localhost:5678/v1/jobs/a8e2be53-fe17-4727-9336-c9f09db9485f/controller' ] ``` -## GET /v1/jobs/{jobId}/errors +## GET /v1/jobs/\{jobId\}/errors This endpoint will return an array of all errors from all executions from oldest to newest. @@ -624,7 +624,7 @@ $ curl 'localhost:5678/v1/ex?status=running&size=10' ] ``` -## GET /v1/ex/{exId} +## GET /v1/ex/\{exId\} Returns the job execution context that matches given execution context id. @@ -705,7 +705,7 @@ $ curl 'localhost:5678/v1/ex/errors' ] ``` -## GET /v1/ex/{jobId}/errors/{exId} +## GET /v1/ex/\{jobId\}/errors/\{exId\} This endpoint will return an array of all errors from the specified execution from oldest to newest. @@ -738,7 +738,7 @@ $ curl 'localhost:5678/v1/ex/863678b3-daf3-4ea9-8cb0-88b846cd7e57/errors' ] ``` -## POST /v1/ex/{exId}/_stop +## POST /v1/ex/\{exId\}/_stop Issues a stop command which will shutdown execution controller and workers for that job, marks the job execution context state as stopped. You can optionally add a timeout query parameter to dynamically change how long it will wait as the time the slicer/fetchers take to exit will vary. In a Kubernetes environment the force option will immediately kill all jobs, deployments, execution controllers and workers associated with the job. @@ -768,7 +768,7 @@ $ curl -XPOST 'localhost:5678/v1/ex/863678b3-daf3-4ea9-8cb0-88b846cd7e57/_stop?f } ``` -## POST /v1/ex/{exId}/_pause +## POST /v1/ex/\{exId\}/_pause Issues a pause command, this will prevent the execution controller from invoking slicers and also prevent the allocation of slices to workers, marks the job execution context state as paused. @@ -781,7 +781,7 @@ $ curl -XPOST 'localhost:5678/v1/ex/863678b3-daf3-4ea9-8cb0-88b846cd7e57/_pause' } ``` -## POST /v1/ex/{exId}/_resume +## POST /v1/ex/\{exId\}/_resume Issues a resume command, this allows the execution controller to continue invoking slicers and allocating work if they were in a paused state, marks the job execution context as running. @@ -794,7 +794,7 @@ $ curl -XPOST 'localhost:5678/v1/ex/863678b3-daf3-4ea9-8cb0-88b846cd7e57/_resume } ``` -## POST /v1/ex/{exId}/_recover +## POST /v1/ex/\{exId\}/_recover **IMPORTANT** When recovering an execution, the configuration from is copied from that execution and any changes added to the job will not be applied. Additionally, recovering an execution that is not the last ran execution for a job should be used with caution. For these reasons it is recommended to [recover a job](#post-v1jobsjobid_recover) unless you need the above recommendations. @@ -814,7 +814,7 @@ $ curl -XPOST 'localhost:5678/v1/ex/d3ce31bd-db5f-41cc-922a-64e1b0cb05c4/_recove } ``` -## POST /v1/ex/{exId}/_workers +## POST /v1/ex/\{exId\}/_workers You can dynamically change the amount of workers that are allocated for a specific job execution. @@ -833,7 +833,7 @@ $ curl -XPOST 'localhost:5678/v1/ex/863678b3-daf3-4ea9-8cb0-88b846cd7e57/_worker "5 workers have been add for execution: 863678b3-daf3-4ea9-8cb0-88b846cd7e57" ``` -## GET /v1/ex/{exId}/controller +## GET /v1/ex/\{exId\}/controller Same concept as cluster/controllers, but only get stats on execution controller associated with the given execution context id. diff --git a/docs/management-apis/endpoints-txt.md b/docs/management-apis/endpoints-txt.md index 7946768f3f7..0449e3dd4e2 100644 --- a/docs/management-apis/endpoints-txt.md +++ b/docs/management-apis/endpoints-txt.md @@ -267,7 +267,7 @@ zipfile 0.0.1 e7f338d0b0fe679698d781ef71b332915d020570 2017-05-30T18:19:18. otherzip 1.0.1 d94hy8d0b0fe679698d781ef71b332915d020570 2017-05-29T18:19:18.638Z Some description ``` -## GET /txt/assets/{assetName} +## GET /txt/assets/\{assetName\} Returns a text table of all assets by the given name, sorted by the most recent at the top. @@ -308,7 +308,7 @@ zipfile 1.0.1 e7f338d0b0fe679698d781ef71b332915d020570 2017-05-30T18:19:18. zipfile 0.3.1 e7f338d0b0fe679698d781ef71b332915d020570 2017-05-28T18:19:18.638Z Some description ``` -## GET /txt/assets/{assetName}/{version} +## GET /txt/assets/\{assetName\}/\{version\} Returns a text table of all assets by a given name and version, sorted by the most recent at the top. diff --git a/docs/packages/data-mate/overview.md b/docs/packages/data-mate/overview.md index 793b905ad29..63292a4fcfd 100644 --- a/docs/packages/data-mate/overview.md +++ b/docs/packages/data-mate/overview.md @@ -135,7 +135,7 @@ all functions take as a second parameter a context? value. Some transforms and v > Field validation functions accept an input and return a Boolean. If additional arguments are needed then an object containing parameters is passed in. -functionName(input, context, {arg1: 'ARG1', arg2: 'ARG2', etc... }) +functionName(input, context, \{arg1: 'ARG1', arg2: 'ARG2', etc... \}) ### isString @@ -327,7 +327,7 @@ FieldValidator.isGeoShapeMultiPolygon([multiPolygon, point]); // false inNumberRange(input, context, args) - returns true if input is a Number within the min and max boundaries, or that the array on numbers are between the values -args: { min: Number, max: Number, inclusive?: Boolean } +args: \{ min: Number, max: Number, inclusive?: Boolean \} note that second parameter is parent object, if there is not any just pass an empty object ```javascript @@ -342,7 +342,7 @@ FieldValidator.inNumberRange(42, {}, { min: 0, max: 42, inclusive: true }); // t ### isEmpty isEmpty(input, context, args) - returns true for an empty string, array, or object -args: { ignoreWhitespace?: Boolean } +args: \{ ignoreWhitespace?: Boolean \} set ignoreWhitespace to true if you want the value to be trimmed @@ -361,7 +361,7 @@ FieldValidator.isEmpty(' ', {}, { ignoreWhitespace: true }); // true contains(input, context, args) - returns true if input contains args value, or the list of inputs contains args value - args: { value: String } + args: \{ value: String \} ```javascript FieldValidator.contains('hello', {}, { value: 'hello' }); // true @@ -375,7 +375,7 @@ FieldValidator.contains('12345', {}, { value: '45' }); // true equals(input, context, args) - Validates that the input matches the value, of that the input array matches the value provided -args: { value: \'String\' } +args: \{ value: \'String\' \} ```javascript FieldValidator.equals('hello', { value: 'hello' }); // true @@ -387,7 +387,7 @@ FieldValidator.equals('hello', { value: 'ello' }); // false isLength(input, context, args) - Check to see if input is a string with given length ranges, or a list of valid string lengths -Optional args: { length: Number, min: Number, max: Number } +Optional args: \{ length: Number, min: Number, max: Number \} ```javascript FieldValidator.isLength('astring', { size: 7 }); // true @@ -400,7 +400,7 @@ FieldValidator.isLength(['astring', 'stuff', 'other'], { min: 3, max: 10 }); // ### isAlpha isAlpha(input, context?, args?) - Validates that the input is alpha or a list of alpha values -arg: { locale?: ANY LOCALE OPTION DEFINED BELOW }, default locale is en-US +arg: \{ locale?: ANY LOCALE OPTION DEFINED BELOW \}, default locale is en-US Locale options: 'ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'fa-IR', 'he', 'hu-HU', 'it-IT', 'ku-IQ', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sl-SI', 'sk-SK', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'tr-TR', 'uk-UA'` @@ -415,7 +415,7 @@ FieldValidator.isAlpha(['validString', 'more']); // true isAlphanumeric(input, context?, args?) - Validates that the input is alphanumeric or a list of alphanumeric values -Optional arg: { locale: ANY LOCALE OPTION DEFINED BELOW }, default locale is en-US +Optional arg: \{ locale: ANY LOCALE OPTION DEFINED BELOW \}, default locale is en-US Locale options: 'ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'fa-IR', 'he', 'hu-HU', 'it-IT', 'ku-IQ', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sl-SI', 'sk-SK', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'tr-TR', 'uk-UA'` @@ -517,7 +517,7 @@ FieldValidator.isEmail(['email@example.com', 'ha3ke5@pawnage.com']); // true isFQDN(input, context?, args) - Validate that the input is a valid domain name, or a list of domain names -args: { require_tld = true, allow_underscores = false, allow_trailing_dot = false } +args: \{ require_tld = true, allow_underscores = false, allow_trailing_dot = false \} ```javascript FieldValidator.isFQDN('example.com.uk'); // true @@ -599,7 +599,7 @@ FieldValidator.isCIDR(['8.8.0.0/12', '2001::1234:5678/128']); // true inIPRange(input, context, args) - Validates if the input IP is within a given range of IP's, or that a list of inputs IP are in range -Optional args: { min?: IP_ADDRESS, max?: IP_ADDRESS, cidr?: IP_ADDRESS/CIDR } +Optional args: \{ min?: IP_ADDRESS, max?: IP_ADDRESS, cidr?: IP_ADDRESS/CIDR \} default values: - MIN_IPV4_IP = '0.0.0.0'; - MAX_IPV4_IP = '255.255.255.255'; @@ -634,7 +634,7 @@ FieldValidator.isISDN(['46707123456', '1-808-915-6800']); // true isMACAddress(input, context?, args?) - Validates that the input is a MACAddress, or a list of MACAddressess -Optional args { delimiter: ['colon', 'dash', 'space', 'dot', 'none', 'any'] } +Optional args \{ delimiter: ['colon', 'dash', 'space', 'dot', 'none', 'any'] \} delimiter can be a string of one delimiter or an array of multiple delimiters @@ -674,7 +674,7 @@ FieldValidator.isUUID([ isHash(input, context, args) - Validates that the input is a hash, or a list of hashes -arg: { algo: 'ANY HASH OPTION DEFINED BELOW'} +arg: \{ algo: 'ANY HASH OPTION DEFINED BELOW'\} Hash options: md4, md5, sha1, sha256, sha384, sha512, ripemd128, ripemd160, tiger128, tiger160, tiger192, crc32, crc32b @@ -715,7 +715,7 @@ FieldValidator.isMIMEType(['application/graphql', 'application/javascript']); // isISSN(input, context?, args?) - returns true if input is a valid international standard serial Number or a list of valid ISSN's -args: { require_hyphen = false, case_sensitive = false } +args: \{ require_hyphen = false, case_sensitive = false \} ```javascript FieldValidator.isISSN('0378-5955'); // true @@ -757,7 +757,7 @@ FieldValidator.isArray([]); // true some(input, context, args) - Validates that the function specified returns true at least once on the list of values -args: { fn: String, options: Any } +args: \{ fn: String, options: Any \} fn - must be a function name from FieldValidator options - any additional parameters necessary for the fn being evoked @@ -772,7 +772,7 @@ FieldValidator.some(mixedArray, mixedArray, { fn: 'isBoolean' }); // false every(input, context?, args) - Validates that the function specified returns true for every single value in the list -args: { fn: String, options: Any } +args: \{ fn: String, options: Any \} fn must be a function name from FieldValidator @@ -788,7 +788,7 @@ FieldValidator.every(strArray, strArray, { fn: 'isString' }); // true isPostalCode(input, context?, args?) - Validates that input is a valid postal code or a list of postal codes -Optional arg: { locale?: \'ANY OF THE DEFINED LOCATIONS BELOW\' } +Optional arg: \{ locale?: \'ANY OF THE DEFINED LOCATIONS BELOW\' \} locations: AD, AT, AU, BE, BG, BR, CA, CH, CZ, DE, DK, DZ, EE, ES, FI, FR, GB, GR, HR, HU, ID, IE, IL, IN, IS, IT, JP, KE, LI, LT, LU, LV, MX, MT, NL, NO, NZ, PL, PR, PT, RO, RU, SA, SE, SI, SK, TN, TW, UA, US, ZA, ZM @@ -832,7 +832,7 @@ FieldTransform.toString([true, undefined, false]); // ['true', 'false']; toNumber(input, context?, args?) - Converts a value to a number if possible -args: { booleanLike: Boolean } +args: \{ booleanLike: Boolean \} if given an array it will convert everything in the array excluding null/undefined values @@ -950,7 +950,7 @@ FieldTransform.toKebabCase(array); // ['Happy Birthday', 'What Is This']; trim(input, context?, args?) - Will trim the input, if given an array it will convert everything in the array excluding null/undefined values -args: { char?: String } +args: \{ char?: String \} char - if provided, are the chars/words to be cut out @@ -972,7 +972,7 @@ FieldTransform.trim(['right ', ' left']); // ['right', 'left']; trimStart(input, context?, args) - Will trim the beginning of the input if given an array it will convert everything in the array excluding null/undefined values -args: { char?: String } +args: \{ char?: String \} char - if provided, are the chars/words to be cut out @@ -989,7 +989,7 @@ FieldTransform.trimStart([' Hello Bob ', 'right ']); // ['Hello Bob trimEnd(input, context?, args) - Will trim the end of the input if given an array it will convert everything in the array excluding null/undefined values -args: { char?: String } +args: \{ char?: String \} char - if provided, are the chars/words to be cut out @@ -1005,7 +1005,7 @@ FieldTransform.trimEnd([' Hello Bob ', 'right ']); // [' Hello Bob', truncate(input, context?, args) - Will truncate the input to the length of the size given. If given an array it will convert everything in the array excluding null/undefined values -args: { size: Number } +args: \{ size: Number \} size - the size that values should be truncated @@ -1090,7 +1090,7 @@ const arrayOfEncodedValues = FieldTransform.encodeMD5([source]); encodeSHA(input, context?, args) - SHA encodes the input to the hash specified if given an array it will convert everything in the array excluding null/undefined values -args { hash = 'sha256', digest = 'hex' } +args \{ hash = 'sha256', digest = 'hex' \} hash - what ever is available on your node server, defaults to sha256 possible digest values (defaults to hex): @@ -1226,13 +1226,13 @@ results === [{ lon: 40, lat: 60 },{ lon: 50, lat: 60 }]; extract(input, context, args) - Can extract values from a string input. You may either specify a regex, a jexl expression, or specify the start and end from which the extraction will take all values inbetween, if given an array it will convert everything in the array excluding null/undefined values -args - { +args - \{ regex?: String, isMultiValue = true, jexlExp?: String, start?: String, end?: String - } + \} If regex is specified, it will run the regex against the value. @@ -1268,12 +1268,12 @@ results; // ['hello', 'world']; replaceRegex(input, context, args) - This function replaces chars in a string based off the regex value provided -args - { +args - \{ regex: String, replace: String, ignoreCase = false, global = false - } + \} returns null if input is null/undefined @@ -1303,7 +1303,7 @@ results === 'soWesWring' replaceLiteral(input, context, args) - This function replaces the searched value with the replace value -args - { search: String, replace: String } +args - \{ search: String, replace: String \} search is the word that is to be changed to the value specified with the parameter replace @@ -1322,7 +1322,7 @@ FieldTransform.replaceLiteral(data, {}, config) // ['Hi mel', 'hello mel']; splitString(input, context?, args?) - Converts a string to an array of characters split by the delimiter provided -args - { delimiter?: String } +args - \{ delimiter?: String \} delimiter defaults to an empty string @@ -1344,7 +1344,7 @@ results // [['a', 'stri', 'ng'], ['hello', 'world']]; toUnixTime(input, context?, args) - Converts a given date to its time in milliseconds or seconds ? -args - { ms = false } +args - \{ ms = false \} set ms to true if you want time in milliseconds returns null if input is null/undefined @@ -1364,7 +1364,7 @@ FieldTransform.toUnixTime(['Jan 1, 2020 UTC', '2020 Jan, 1 UTC']); // [157783680 toISO8601(input, context?, args) - Converts a date string or number to an ISO date -args - { resolution?: String } +args - \{ resolution?: String \} resolution value: ['seconds', 'milliseconds'], defaults to seconds returns null if input is null/undefined @@ -1383,7 +1383,7 @@ FieldTransform.toISO8601(data); // ['2020-01-01T00:00:00.000Z', '2020-01-02T00:0 formatDate(input, context, args) - Function that will format a number or date string to a given date format provided -args - { format: String, resolution?: String } +args - \{ format: String, resolution?: String \} format is the shape that the date will be ie(M/d/yyyy) resolution value: ['seconds', 'milliseconds'], defaults to seconds, is only needed when input is a number @@ -1409,7 +1409,7 @@ results // ['2020-02-06']); parseDate(input, context?, args) - Will use date-fns parse against the input and return a date object -args - { format: String } +args - \{ format: String \} format is the shape that the date will be ie(M/d/yyyy) @@ -1440,7 +1440,7 @@ result === [new Date('2020-02-06T21:52:30.000Z'), new Date('2020-02-06T21:52:30. setDefault(input, context?, args) - This function is used to set a value if input is null or undefined, otherwise the input value is returned -args: { value: Any } +args: \{ value: Any \} value is what will be given when input is null/undefined @@ -1453,7 +1453,7 @@ results === 'someValue'; map(input, context?, args) - This function is used to map an array of values with any FieldTransform method -args: { fn: String, options: Any } +args: \{ fn: String, options: Any \} returns null if input is null/undefined @@ -1472,7 +1472,7 @@ options are any additional parameters necessary for the fn being evoked required(input, context, args) - This function will return false if input record does not have all specified keys -args - { fields: string[] } +args - \{ fields: string[] \} ```javascript const obj1 = { foo: 'hello', bar: 'stuff' }; @@ -1490,11 +1490,11 @@ results2; // false; select(input, context, args) - Will return true if an object matches the xLucene expression -args - { +args - \{ query: xLuceneQuery, type_config?: xLuceneTypeConfig, variables?: xLuceneVariables - } + \} ```javascript @@ -1513,12 +1513,11 @@ results2; // false; reject(input, context, args) - Will return true if an object DOES NOT match the xLucene expression -args - { +args - \{ query: xLuceneQuery, type_config?: xLuceneTypeConfig, variables?: xLuceneVariables - } -` + \} ```javascript const obj1 = { foo: 'hello', bar: 'stuff' }; @@ -1538,7 +1537,7 @@ results2; // true; renameField(input, context, args) - This will migrate a fields value to a new field name -args - { from: string; to: string } +args - \{ from: string; to: string \} ```javascript const obj = { hello: 'world' }; @@ -1551,7 +1550,7 @@ results === { goodbye: 'world' }; setField(input, context, args) - Sets a field on a record with the given value -args - { field: string; value: Any } +args - \{ field: string; value: Any \} ```javascript const obj = { hello: 'world' }; @@ -1564,7 +1563,7 @@ results === { hello: 'world', other: 'stuff' }; dropFields(input, context, args) - removes fields from a record -args - { fields: string[] } +args - \{ fields: string[] \} ```javascript @@ -1578,7 +1577,7 @@ results === { hello: 'world' }; copyField(input, context, args) - Will copy a field to another field -args - { from: string; to: string } +args - \{ from: string; to: string \} ```javascript const obj = { hello: 'world', other: 'stuff' }; @@ -1591,7 +1590,7 @@ results; // { hello: 'world', other: 'stuff', myCopy: 'stuff' }; transformRecord(input, context, args) - Will execute a jexl expression. Can use data-mate functions inside the jexl expression. You do not need to specify the parent context argument as that is automatically the document used as to call it. -args - { jexlExp: string; field: string } +args - \{ jexlExp: string; field: string \} ```javascript const obj = { num: 1234 }; diff --git a/docs/packages/teraslice-state-storage/overview.md b/docs/packages/teraslice-state-storage/overview.md index 977627709da..0845a17d2d5 100644 --- a/docs/packages/teraslice-state-storage/overview.md +++ b/docs/packages/teraslice-state-storage/overview.md @@ -95,7 +95,7 @@ this.state.get('456def'); // undefined ``` ### mset -mset([{ key: KEY1, data: VALUE1}, { key: KEY2, data: VALUE2 }, etc ...]) - Sets multiple key, value pairs. Requires an array of { key: key, data: value } objects +mset([\{ key: KEY1, data: VALUE1\}, \{ key: KEY2, data: VALUE2 \}, etc ...]) - Sets multiple key, value pairs. Requires an array of \{ key: key, data: value \} objects ```javascript this.state.mset([{ key: 1, data: { name: 'foo' } }, { key: 'abc123', data: { name: 'bar' } }]); diff --git a/docs/packages/xlucene-parser/overview.md b/docs/packages/xlucene-parser/overview.md index ed9e7863c4b..b5d786852b4 100644 --- a/docs/packages/xlucene-parser/overview.md +++ b/docs/packages/xlucene-parser/overview.md @@ -4,3 +4,13 @@ sidebar_label: xLucene Parser --- > Flexible Lucene-like evaluator and language parser + +Note: If importing this package into a repo that uses yarn PnP, `ts-pegjs` must also be declared as a dependency and then 'unplugged'. See https://github.com/terascope/teraslice/issues/3724 + +``` +yarn add xlucene-parser +yarn add ts-pegjs +yarn unplug ts-pegjs +``` + +The -A or -R flags may be needed with `unplug` dependending on your workspace structure.