@citolab/tspci 2.4.0-alpha.1 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/cli.js +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citolab/tspci",
3
- "version": "2.4.0-alpha.1",
3
+ "version": "2.4.0",
4
4
  "description": "an opiniated typescript ims-pci builder with tao integration",
5
5
  "author": "patrick <patrick.deklein@cito.nl>",
6
6
  "repository": "@citolab/tspci",
@@ -46,5 +46,5 @@
46
46
  "help": "tspci --help",
47
47
  "init": "tspci init --force --path=../../pcis"
48
48
  },
49
- "gitHead": "434a5ab926c5cae6fad663851b78a72cf02358a2"
49
+ "gitHead": "3f39a92aa0d565cb5a0fc4b4f2d3102aab9402dc"
50
50
  }
package/src/cli.js CHANGED
@@ -232,7 +232,7 @@ const run = async () => {
232
232
  console.log(chalk.green(figlet.textSync("@citolab/tspci", { horizontalLayout: "full" })));
233
233
 
234
234
  // prompt for name
235
- let pciName = (await askOption("What your pci identifier (typeIdentifier) (default: myPci) ")) || "myPci";
235
+ let pciName = (await askOption("What your pci identifier (typeIdentifier). this can only contain alphanumeric characters (default: myPci) ")) || "myPci";
236
236
  let destinationFolder = path.join(process.cwd(), pciName);
237
237
  if (args.find((arg) => arg.startsWith("--path"))) {
238
238
  const pathIndex = args.findIndex((arg) => arg.startsWith("--path"));
@@ -255,11 +255,11 @@ const run = async () => {
255
255
  return;
256
256
  }
257
257
  // check if contains other characters than letters and numbers
258
- if (!/^[a-zA-Z0-9]+$/.test(pciName)) {
258
+ if (!/^[a-zA-Z]+$/.test(pciName)) {
259
259
  console.log(
260
- chalk.yellow("The identifier of your pci can only contain letters and numbers, stripping special characters")
260
+ chalk.yellow("The identifier of your pci can only contain alphanumeric characters, stripping others")
261
261
  );
262
- pciName = pciName.replace(/[^a-zA-Z0-9]/g, "");
262
+ pciName = pciName.replace(/[^a-zA-Z]/g, "");
263
263
  }
264
264
  console.log(chalk.green(`pci: ${pciName}`));
265
265
  const description =