@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.
- package/install.js +9 -9
- 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*["'](.+?)
|
|
140
|
-
const beforeMatch = line.match(/@addon-insert:before\s*\(\s*["'](.+?)
|
|
141
|
-
const replaceMatch = line.match(/@addon-insert:replace\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[
|
|
144
|
-
else if (beforeMatch) markers.push({type: 'before', lineIndex: i, searchText: beforeMatch[
|
|
145
|
-
else if (replaceMatch) markers.push({type: 'replace', lineIndex: i, markerName: replaceMatch[
|
|
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(
|
|
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(
|
|
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(
|
|
512
|
+
log(` 📦 Downloading ${COLORS.cyan}${addonName}${COLORS.reset} add-on...`, 'bold');
|
|
513
513
|
|
|
514
514
|
let copied, skipped, toMerge;
|
|
515
515
|
|