@citolab/tspci 2.4.0-alpha.1 → 2.4.1
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.
- package/package.json +2 -2
- package/preset/preact/src/store.ts +1 -1
- 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.
|
|
3
|
+
"version": "2.4.1",
|
|
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": "
|
|
49
|
+
"gitHead": "c40332cbf554eb2c8c958e8b83db568317378142"
|
|
50
50
|
}
|
|
@@ -4,7 +4,7 @@ export type ActionType = "SET_INPUT" | "RESTORE_STATE";
|
|
|
4
4
|
export type StateModel = { input: number };
|
|
5
5
|
|
|
6
6
|
export const initStore = (initialState: StateModel, restoreData?: {
|
|
7
|
-
state
|
|
7
|
+
state: StateModel;
|
|
8
8
|
actions: { type: string; payload: any; timestamp?: number }[];
|
|
9
9
|
}) => {
|
|
10
10
|
const store = new Store<StateModel>(initialState, restoreData);
|
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-
|
|
258
|
+
if (!/^[a-zA-Z]+$/.test(pciName)) {
|
|
259
259
|
console.log(
|
|
260
|
-
chalk.yellow("The identifier of your pci can only contain
|
|
260
|
+
chalk.yellow("The identifier of your pci can only contain alphanumeric characters, stripping others")
|
|
261
261
|
);
|
|
262
|
-
pciName = pciName.replace(/[^a-zA-
|
|
262
|
+
pciName = pciName.replace(/[^a-zA-Z]/g, "");
|
|
263
263
|
}
|
|
264
264
|
console.log(chalk.green(`pci: ${pciName}`));
|
|
265
265
|
const description =
|