diff --git a/src/getPatchZip.ts b/src/getPatchZip.ts index a5c3b2e..9d19204 100644 --- a/src/getPatchZip.ts +++ b/src/getPatchZip.ts @@ -5,8 +5,8 @@ import { getPatchZip, ISsnFileEntry, Product, verifyProductName } from 'ssn'; const { args, fail } = parseArguments({ product: { short: 'p', description: 'Name of the product you want to get the patch info on', verify: verifyProductName, message: (value) => `"${value}" is not a valid product name.` }, - from: { short: 'f', description: 'Number of the from release, must be an integer in the range [-1, 999]', verify: (str) => (str.match(/^(-1|0|[1-9][0-9]{0,2})$/) !== null) }, - to: { short: 't', description: 'Number of the to release, must be an integer in the range [0, 999]', verify: (str) => (str.match(/^(0|[1-9][0-9]{0,2})$/) !== null) }, + from: { short: 'f', description: 'Number of the from release, must be an integer in the range [-1, 999]', verify: (str) => (str.match(/^(?:-1|0|[1-9][0-9]{0,2})$/) !== null) }, + to: { short: 't', description: 'Number of the to release, must be an integer in the range [0, 999]', verify: (str) => (str.match(/^(?:0|[1-9][0-9]{0,2})$/) !== null) }, }, (origArgs) => ((origArgs.length === 3) ? ['--product', origArgs[0], '--from', origArgs[1], '--to', origArgs[2]] : undefined)); //Get the .zip file from this patch and write output to stdout diff --git a/src/getSolidpkg.ts b/src/getSolidpkg.ts index 7faed25..08ef1a4 100644 --- a/src/getSolidpkg.ts +++ b/src/getSolidpkg.ts @@ -5,8 +5,8 @@ import { getSolidpkg, ISolidSimple, Product, verifyProductName } from 'ssn'; const { args, fail } = parseArguments({ product: { short: 'p', description: 'Name of the product you want to get the solidpkg on', verify: verifyProductName, message: (value) => `"${value}" is not a valid product name.` }, - from: { short: 'f', description: 'Number of the from release, must be an integer in the range [-1, 999]', verify: (str) => (str.match(/^(-1|0|[1-9][0-9]{0,2})$/) !== null) }, - to: { short: 't', description: 'Number of the to release, must be an integer in the range [0, 999]', verify: (str) => (str.match(/^(0|[1-9][0-9]{0,2})$/) !== null) }, + from: { short: 'f', description: 'Number of the from release, must be an integer in the range [-1, 999]', verify: (str) => (str.match(/^(?:-1|0|[1-9][0-9]{0,2})$/) !== null) }, + to: { short: 't', description: 'Number of the to release, must be an integer in the range [0, 999]', verify: (str) => (str.match(/^(?:0|[1-9][0-9]{0,2})$/) !== null) }, }, (origArgs) => ((origArgs.length === 3) ? ['--product', origArgs[0], '--from', origArgs[1], '--to', origArgs[2]] : undefined)); //Get solidpkg and write output to stdout diff --git a/src/installPatch.ts b/src/installPatch.ts index 5a2072f..3a1e1c3 100644 --- a/src/installPatch.ts +++ b/src/installPatch.ts @@ -5,8 +5,8 @@ import { installPatch, Product, verifyProductName } from 'ssn'; const { args, fail } = parseArguments({ product: { short: 'p', description: 'Name of the product you want to install', verify: verifyProductName, message: (value) => `"${value}" is not a valid product name.` }, - from: { short: 'f', description: 'Number of the from release, must be an integer in the range [-1, 999]', verify: (str) => (str.match(/^(-1|0|[1-9][0-9]{0,2})$/) !== null) }, - to: { short: 't', description: 'Number of the to release, must be an integer in the range [0, 999]', verify: (str) => (str.match(/^(0|[1-9][0-9]{0,2})$/) !== null) }, + from: { short: 'f', description: 'Number of the from release, must be an integer in the range [-1, 999]', verify: (str) => (str.match(/^(?:-1|0|[1-9][0-9]{0,2})$/) !== null) }, + to: { short: 't', description: 'Number of the to release, must be an integer in the range [0, 999]', verify: (str) => (str.match(/^(?:0|[1-9][0-9]{0,2})$/) !== null) }, }, (origArgs) => ((origArgs.length === 3) ? ['--product', origArgs[0], '--from', origArgs[1], '--to', origArgs[2]] : undefined)); //TODO: set directory with existing patch data