@ijuantm/simpl-addon 2.4.2 → 2.4.4

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/install.js +9 -9
  2. package/package.json +1 -1
package/install.js CHANGED
@@ -136,13 +136,13 @@ const extractMarkers = (content) => {
136
136
  const markers = [];
137
137
 
138
138
  content.split('\n').forEach((line, i) => {
139
- const afterMatch = line.match(/@addon-insert:after\s*\(\s*["'](.+?)["']\s*\)/);
140
- const beforeMatch = line.match(/@addon-insert:before\s*\(\s*["'](.+?)["']\s*\)/);
141
- const replaceMatch = line.match(/@addon-insert:replace\s*\(\s*["'](.+?)["']\s*\)/);
139
+ const afterMatch = line.match(/@addon-insert:after\s*\(\s*(["'])(.+?)\1\s*\)/);
140
+ const beforeMatch = line.match(/@addon-insert:before\s*\(\s*(["'])(.+?)\1\s*\)/);
141
+ const replaceMatch = line.match(/@addon-insert:replace\s*\(\s*(["'])(.+?)\1\s*\)/);
142
142
 
143
- if (afterMatch) markers.push({type: 'after', lineIndex: i, searchText: afterMatch[1]});
144
- else if (beforeMatch) markers.push({type: 'before', lineIndex: i, searchText: beforeMatch[1]});
145
- else if (replaceMatch) markers.push({type: 'replace', lineIndex: i, markerName: replaceMatch[1]});
143
+ if (afterMatch) markers.push({type: 'after', lineIndex: i, searchText: afterMatch[2]});
144
+ else if (beforeMatch) markers.push({type: 'before', lineIndex: i, searchText: beforeMatch[2]});
145
+ else if (replaceMatch) markers.push({type: 'replace', lineIndex: i, markerName: replaceMatch[2]});
146
146
  else if (line.includes('@addon-insert:prepend')) markers.push({type: 'prepend', lineIndex: i});
147
147
  else if (line.includes('@addon-insert:append')) markers.push({type: 'append', lineIndex: i});
148
148
  });
@@ -406,7 +406,7 @@ const main = async () => {
406
406
 
407
407
  console.log();
408
408
  log(` ╭${'─'.repeat(62)}╮`);
409
- log(` │ ${COLORS.bold}Simpl Add-on Installer${COLORS.reset} ${COLORS.dim}(v${version})${COLORS.reset}${' '.repeat(35 - version.length)}│`);
409
+ log(` │ ${COLORS.bold}Simpl Add-on Installer${COLORS.reset} ${COLORS.dim}(v${version})${COLORS.reset}${' '.repeat(34 - version.length)}│`);
410
410
  log(` ╰${'─'.repeat(62)}╯`);
411
411
  console.log();
412
412
 
@@ -506,10 +506,10 @@ const main = async () => {
506
506
 
507
507
  console.log();
508
508
  log(` ╭${'─'.repeat(62)}╮`);
509
- log(` │ ${COLORS.bold}Installing: ${COLORS.cyan}${addonName}${COLORS.reset} ${COLORS.dim}(v${version})${COLORS.reset}${' '.repeat(43 - addonName.length - version.length)}│`);
509
+ log(` │ ${COLORS.bold}Installing: ${COLORS.cyan}${addonName}${COLORS.reset} ${COLORS.dim}(v${version})${COLORS.reset}${' '.repeat(44 - addonName.length - version.length)}│`);
510
510
  log(` ╰${'─'.repeat(62)}╯`);
511
511
  console.log();
512
- log(' 📦 Downloading add-on...', 'bold');
512
+ log(` 📦 Downloading ${COLORS.cyan}${addonName}${COLORS.reset} add-on...`, 'bold');
513
513
 
514
514
  let copied, skipped, toMerge;
515
515
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ijuantm/simpl-addon",
3
3
  "description": "CLI tool to install Simpl framework add-ons.",
4
- "version": "2.4.2",
4
+ "version": "2.4.4",
5
5
  "scripts": {
6
6
  "link": "npm link",
7
7
  "unlink": "npm unlink -g @ijuantm/simpl-addon"