@maka/maka-cli 5.1.31 → 5.1.32
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/bundle/typescript/package.json +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.js +2 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/command.d.ts +2 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js +8 -5
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js +7 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/kill.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/kill.js +34 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/kill.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lock.d.ts +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/lock.js +52 -18
- package/bundle/typescript/src/commands/game/sideQuest/commands/lock.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js +4 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/read.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/read.js +26 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/read.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +15 -11
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/store.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/store.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/store.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js +2 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js +12 -10
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +16 -4
- package/bundle/typescript/src/commands/game/sideQuest/game.js +191 -3
- package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/inventory.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/inventory.js +19 -6
- package/bundle/typescript/src/commands/game/sideQuest/models/inventory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/item.d.ts +5 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js +20 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.d.ts +3 -2
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +78 -38
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.d.ts +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +30 -2
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene1.json +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +241 -116
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/ui.js +17 -161
- package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +5 -2
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import blessed from 'blessed';
|
|
2
2
|
import { capitalCase } from 'change-case';
|
|
3
3
|
import Game from './game.js';
|
|
4
|
-
import { Player, Room } from './models/_index.js';
|
|
4
|
+
import { Player, Room, } from './models/_index.js';
|
|
5
5
|
import { Logger } from './utilities/logger.js';
|
|
6
6
|
export async function main(playerName, sceneSeed, options) {
|
|
7
7
|
// Create a screen object
|
|
@@ -9,156 +9,12 @@ export async function main(playerName, sceneSeed, options) {
|
|
|
9
9
|
smartCSR: true,
|
|
10
10
|
title: 'Side Quest Adventure Game',
|
|
11
11
|
});
|
|
12
|
+
screen.key(['C-c'], async () => {
|
|
13
|
+
process.exit(0);
|
|
14
|
+
});
|
|
12
15
|
// Initialize Logger
|
|
13
16
|
const gameLog = Logger.getInstance(options.logFilePath, screen);
|
|
14
17
|
try {
|
|
15
|
-
const inventoryBox = blessed.box({
|
|
16
|
-
top: '0%',
|
|
17
|
-
left: '75%',
|
|
18
|
-
width: '25%',
|
|
19
|
-
height: '45%',
|
|
20
|
-
border: {
|
|
21
|
-
type: 'line'
|
|
22
|
-
},
|
|
23
|
-
label: ' Inventory ',
|
|
24
|
-
content: 'Your items will be listed here...',
|
|
25
|
-
tags: true, // Enable formatting tags in content
|
|
26
|
-
scrollable: true, // Enable scrolling if the content overflows
|
|
27
|
-
scrollbar: {
|
|
28
|
-
ch: ' ',
|
|
29
|
-
track: {
|
|
30
|
-
bg: 'yellow'
|
|
31
|
-
},
|
|
32
|
-
style: {
|
|
33
|
-
inverse: true
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
keys: true,
|
|
37
|
-
mouse: true,
|
|
38
|
-
});
|
|
39
|
-
// Function to update the inventory
|
|
40
|
-
const updateInventory = (playerInventory, currencyName = 'currency') => {
|
|
41
|
-
const items = playerInventory.getAllItems();
|
|
42
|
-
let currencyTotal = 0;
|
|
43
|
-
const itemLines = [];
|
|
44
|
-
for (const item of items) {
|
|
45
|
-
let line = item.name;
|
|
46
|
-
if (item.isCurrencyCarrier?.() && item.currencyAmount > 0) {
|
|
47
|
-
line += ` [${item.currencyAmount}]`;
|
|
48
|
-
currencyTotal += item.currencyAmount;
|
|
49
|
-
}
|
|
50
|
-
itemLines.push(line);
|
|
51
|
-
}
|
|
52
|
-
itemLines.unshift(`{bold}Total ${currencyName}:{/bold} ${currencyTotal}\n`);
|
|
53
|
-
inventoryBox.setContent(itemLines.join('\n'));
|
|
54
|
-
screen.render();
|
|
55
|
-
};
|
|
56
|
-
// Append the inventory box to the screen
|
|
57
|
-
screen.append(inventoryBox);
|
|
58
|
-
const equipmentBox = blessed.box({
|
|
59
|
-
top: '45%',
|
|
60
|
-
left: '75%',
|
|
61
|
-
width: '25%',
|
|
62
|
-
height: '25%',
|
|
63
|
-
border: {
|
|
64
|
-
type: 'line'
|
|
65
|
-
},
|
|
66
|
-
label: ' Equipment ',
|
|
67
|
-
content: 'Your equipped items will be listed here...',
|
|
68
|
-
tags: true,
|
|
69
|
-
scrollable: true,
|
|
70
|
-
scrollbar: {
|
|
71
|
-
ch: ' ',
|
|
72
|
-
track: {
|
|
73
|
-
bg: 'yellow'
|
|
74
|
-
},
|
|
75
|
-
style: {
|
|
76
|
-
inverse: true
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
keys: true,
|
|
80
|
-
mouse: true,
|
|
81
|
-
});
|
|
82
|
-
// Append the equipment box to the screen
|
|
83
|
-
screen.append(equipmentBox);
|
|
84
|
-
const updateEquipment = (playerEquipment) => {
|
|
85
|
-
const sections = [];
|
|
86
|
-
const renderSlotGroup = (label, group) => {
|
|
87
|
-
if (!group) {
|
|
88
|
-
sections.push(`{bold}${label}:{/bold} None`);
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
const equipped = Object.entries(group)
|
|
92
|
-
.filter(([_, item]) => item !== null)
|
|
93
|
-
.map(([slot, item]) => ` ${slot}: ${item.name}`);
|
|
94
|
-
if (equipped.length > 0) {
|
|
95
|
-
sections.push(`{bold}${label}:{/bold}`);
|
|
96
|
-
sections.push(...equipped);
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
sections.push(`{bold}${label}:{/bold} None`);
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
renderSlotGroup("Head", playerEquipment.head);
|
|
103
|
-
renderSlotGroup("Torso", playerEquipment.torso);
|
|
104
|
-
renderSlotGroup("Legs", playerEquipment.legs);
|
|
105
|
-
renderSlotGroup("Feet", playerEquipment.feet);
|
|
106
|
-
renderSlotGroup("Arms", playerEquipment.arms);
|
|
107
|
-
renderSlotGroup("Gloves", playerEquipment.gloves);
|
|
108
|
-
renderSlotGroup("Left Hand", playerEquipment.leftHand);
|
|
109
|
-
renderSlotGroup("Right Hand", playerEquipment.rightHand);
|
|
110
|
-
equipmentBox.setContent(sections.join('\n'));
|
|
111
|
-
screen.render();
|
|
112
|
-
};
|
|
113
|
-
// Create a log box to display game output
|
|
114
|
-
const logBox = blessed.box({
|
|
115
|
-
id: 'logBox',
|
|
116
|
-
top: '0%',
|
|
117
|
-
left: '0%',
|
|
118
|
-
width: '75%',
|
|
119
|
-
height: '90%',
|
|
120
|
-
border: {
|
|
121
|
-
type: 'line'
|
|
122
|
-
},
|
|
123
|
-
label: ' Game Log ',
|
|
124
|
-
scrollable: true, // Enable scrolling
|
|
125
|
-
alwaysScroll: true,
|
|
126
|
-
scrollbar: {
|
|
127
|
-
ch: ' ',
|
|
128
|
-
track: {
|
|
129
|
-
bg: 'yellow'
|
|
130
|
-
},
|
|
131
|
-
style: {
|
|
132
|
-
inverse: true
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
keys: true, // Enable keyboard input
|
|
136
|
-
mouse: true, // Enable mouse input
|
|
137
|
-
tags: true // Intercept tags
|
|
138
|
-
});
|
|
139
|
-
logBox.removeAllListeners('mousemove');
|
|
140
|
-
screen.append(logBox);
|
|
141
|
-
// Create an input box for user commands
|
|
142
|
-
const inputBox = blessed.textbox({
|
|
143
|
-
bottom: 0,
|
|
144
|
-
left: 0,
|
|
145
|
-
width: '100%',
|
|
146
|
-
height: '10%',
|
|
147
|
-
tags: true,
|
|
148
|
-
border: { type: 'line' },
|
|
149
|
-
style: { fg: 'white', border: { fg: 'cyan' } },
|
|
150
|
-
keys: true, // Enable keyboard input
|
|
151
|
-
mouse: true, // Enable mouse input
|
|
152
|
-
inputOnFocus: true, // Focus the text input when clicked,
|
|
153
|
-
vi: true
|
|
154
|
-
});
|
|
155
|
-
screen.append(inputBox);
|
|
156
|
-
// Key bindings
|
|
157
|
-
screen.key(['escape', 'C-c'], () => process.exit(0));
|
|
158
|
-
// Focus on the input box by default
|
|
159
|
-
inputBox.focus();
|
|
160
|
-
// Render the screen
|
|
161
|
-
screen.render();
|
|
162
18
|
gameLog.write(`----->>>>>> Initializing Game`);
|
|
163
19
|
const nexus = new Room({
|
|
164
20
|
name: 'Nexus',
|
|
@@ -170,25 +26,25 @@ export async function main(playerName, sceneSeed, options) {
|
|
|
170
26
|
const game = await Game.getInstance(player, sceneSeed);
|
|
171
27
|
const ready = await game.init(options, screen);
|
|
172
28
|
// Print welcome message or initial room description
|
|
173
|
-
logBox.setContent(ready); // getWelcomeMessage should return the initial game introduction or room description
|
|
174
|
-
updateEquipment(game.player.equipment);
|
|
175
|
-
updateInventory(game.player.inventory, capitalCase(game.scene.getCurrencyType()));
|
|
29
|
+
game.logBox.setContent(ready); // getWelcomeMessage should return the initial game introduction or room description
|
|
30
|
+
game.updateEquipment(game.player.equipment);
|
|
31
|
+
game.updateInventory(game.player.inventory, capitalCase(game.scene.getCurrencyType()));
|
|
176
32
|
game.updateExits(game.player.currentLocation);
|
|
177
|
-
inputBox.key(['enter'], async () => {
|
|
178
|
-
const input = inputBox.getValue();
|
|
179
|
-
const response = game.handleInput(input); // handleInput is the method that processes commands
|
|
33
|
+
game.inputBox.key(['enter'], async () => {
|
|
34
|
+
const input = game.inputBox.getValue();
|
|
35
|
+
const response = await game.handleInput(input); // handleInput is the method that processes commands
|
|
180
36
|
// eslint-disable-next-line no-constant-condition
|
|
181
37
|
if (input.split(' ')[0] === 'take' || 'equip' || 'unequip') {
|
|
182
38
|
// Example usage: update the inventory with a new list of items
|
|
183
|
-
updateInventory(game.player.inventory, capitalCase(game.scene.getCurrencyType()));
|
|
184
|
-
updateEquipment(game.player.equipment);
|
|
39
|
+
game.updateInventory(game.player.inventory, capitalCase(game.scene.getCurrencyType()));
|
|
40
|
+
game.updateEquipment(game.player.equipment);
|
|
185
41
|
}
|
|
186
42
|
// eslint-disable-next-line no-constant-condition
|
|
187
43
|
if (input.split(' ')[0] === 'go' || 'lock' || 'unlock') {
|
|
188
44
|
game.updateExits(game.player.currentLocation);
|
|
189
45
|
}
|
|
190
46
|
if (input.split(' ')[0] === 'clear') {
|
|
191
|
-
logBox.setContent('');
|
|
47
|
+
game.logBox.setContent('');
|
|
192
48
|
}
|
|
193
49
|
gameLog.write(`Input response: ${response}`);
|
|
194
50
|
if (response === null) {
|
|
@@ -196,10 +52,10 @@ export async function main(playerName, sceneSeed, options) {
|
|
|
196
52
|
gameLog.write(`<<<<<<<<--------- Terminating game`);
|
|
197
53
|
process.exit(0); // Exit the game
|
|
198
54
|
}
|
|
199
|
-
logBox.pushLine(response);
|
|
200
|
-
logBox.scroll(1);
|
|
201
|
-
inputBox.clearValue();
|
|
202
|
-
inputBox.focus();
|
|
55
|
+
game.logBox.pushLine(response);
|
|
56
|
+
game.logBox.scroll(1);
|
|
57
|
+
game.inputBox.clearValue();
|
|
58
|
+
game.inputBox.focus();
|
|
203
59
|
screen.render();
|
|
204
60
|
});
|
|
205
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../../../../../../src/commands/game/sideQuest/ui.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../../../../../../src/commands/game/sideQuest/ui.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EACL,MAAM,EACN,IAAI,GACL,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAU/C,MAAM,CAAC,KAAK,UAAU,IAAI,CACxB,UAAkB,EAClB,SAAyB,EACzB,OAAwB;IAExB,yBAAyB;IACzB,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC5B,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,2BAA2B;KACnC,CAAC,CAAC;IAEH,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI,EAAE;QAC7B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;IAGH,oBAAoB;IACpB,MAAM,OAAO,GAAG,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAEhE,IAAI,CAAC;QAEH,OAAO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,OAAO,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC;QACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,sCAAsC;AACtC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEnC,mDAAmD;AACnD,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -35,8 +35,8 @@ Command.create({
|
|
|
35
35
|
message: 'Which Run would you like to play?',
|
|
36
36
|
name: 'sideQuestAnswer',
|
|
37
37
|
choices: [
|
|
38
|
-
{ name:
|
|
39
|
-
{ name:
|
|
38
|
+
{ name: shadowrunConfig1.name, value: shadowrunConfig1 },
|
|
39
|
+
{ name: shadowrunConfig2.name, value: shadowrunConfig2 },
|
|
40
40
|
]
|
|
41
41
|
});
|
|
42
42
|
if (playerName && sideQuestAnswer) {
|
|
@@ -52,6 +52,9 @@ Command.create({
|
|
|
52
52
|
if (code === 0) {
|
|
53
53
|
Log.bright(`Thanks for playing!`);
|
|
54
54
|
}
|
|
55
|
+
else if (code === 2) {
|
|
56
|
+
Log.bright(`You died! Thanks for playing!`);
|
|
57
|
+
}
|
|
55
58
|
else {
|
|
56
59
|
Log.error(`Side quest exited with code ${code} or signal ${signal}`);
|
|
57
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sideQuest.sub.cmd.js","sourceRoot":"","sources":["../../../../../src/commands/game/sideQuest.sub.cmd.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC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+BAA+B,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;YAC1D,CAAC,CAAC,CAAC;YAEH,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE;gBAChC,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;oBACf,GAAG,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;gBACpC,CAAC;qBAAM,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;oBACtB,GAAG,CAAC,MAAM,CAAC,+BAA+B,CAAC,CAAC;gBAC9C,CAAC;qBAAM,CAAC;oBACN,GAAG,CAAC,KAAK,CAAC,+BAA+B,IAAI,cAAc,MAAM,EAAE,CAAC,CAAC;gBACvE,CAAC;YACH,CAAC,CAAC,CAAC;QAEL,CAAC;IAEH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;AAEH,CAAC,EAAE,WAAW,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maka/maka-cli",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.32",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"summary": "A command line tool for scaffolding Meteor 2.x applications using either React.",
|
|
6
6
|
"description": "A command line tool for scaffolding Meteor 2.x applications using React.",
|