@maka/maka-cli 5.2.5 → 5.2.6
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 +4 -3
- package/bundle/typescript/package.json +0 -118
- package/bundle/typescript/src/README.md +0 -37
- package/bundle/typescript/src/command.d.ts +0 -37
- package/bundle/typescript/src/command.js +0 -231
- package/bundle/typescript/src/command.js.map +0 -1
- package/bundle/typescript/src/commands/_index.d.ts +0 -26
- package/bundle/typescript/src/commands/_index.js +0 -28
- package/bundle/typescript/src/commands/_index.js.map +0 -1
- package/bundle/typescript/src/commands/ai/_index.d.ts +0 -2
- package/bundle/typescript/src/commands/ai/_index.js +0 -3
- package/bundle/typescript/src/commands/ai/_index.js.map +0 -1
- package/bundle/typescript/src/commands/ai/ai.command.d.ts +0 -3
- package/bundle/typescript/src/commands/ai/ai.command.js +0 -83
- package/bundle/typescript/src/commands/ai/ai.command.js.map +0 -1
- package/bundle/typescript/src/commands/ai/mcp.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/ai/mcp.sub.cmd.js +0 -964
- package/bundle/typescript/src/commands/ai/mcp.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/aws/_index.d.ts +0 -16
- package/bundle/typescript/src/commands/aws/_index.js +0 -17
- package/bundle/typescript/src/commands/aws/_index.js.map +0 -1
- package/bundle/typescript/src/commands/aws/aws.command.d.ts +0 -3
- package/bundle/typescript/src/commands/aws/aws.command.js +0 -15
- package/bundle/typescript/src/commands/aws/aws.command.js.map +0 -1
- package/bundle/typescript/src/commands/aws/cecr.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/aws/cecr.sub.cmd.js +0 -38
- package/bundle/typescript/src/commands/aws/cecr.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/aws/chz.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/aws/chz.sub.cmd.js +0 -41
- package/bundle/typescript/src/commands/aws/chz.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/aws/ci.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/aws/ci.sub.cmd.js +0 -199
- package/bundle/typescript/src/commands/aws/ci.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/aws/ckp.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/aws/ckp.sub.cmd.js +0 -42
- package/bundle/typescript/src/commands/aws/ckp.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/aws/csg.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/aws/csg.sub.cmd.js +0 -43
- package/bundle/typescript/src/commands/aws/csg.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/aws/decr.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/aws/decr.sub.cmd.js +0 -31
- package/bundle/typescript/src/commands/aws/decr.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/aws/di.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/aws/di.sub.cmd.js +0 -35
- package/bundle/typescript/src/commands/aws/di.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/aws/dkp.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/aws/dkp.sub.cmd.js +0 -25
- package/bundle/typescript/src/commands/aws/dkp.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/aws/dsg.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/aws/dsg.sub.cmd.js +0 -57
- package/bundle/typescript/src/commands/aws/dsg.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/aws/lecr.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/aws/lecr.sub.cmd.js +0 -32
- package/bundle/typescript/src/commands/aws/lecr.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/aws/rbi.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/aws/rbi.sub.cmd.js +0 -39
- package/bundle/typescript/src/commands/aws/rbi.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/aws/rdn.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/aws/rdn.sub.cmd.js +0 -104
- package/bundle/typescript/src/commands/aws/rdn.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/aws/rkp.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/aws/rkp.sub.cmd.js +0 -52
- package/bundle/typescript/src/commands/aws/rkp.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/aws/sth.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/aws/sth.sub.cmd.js +0 -74
- package/bundle/typescript/src/commands/aws/sth.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/aws/ti.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/aws/ti.sub.cmd.js +0 -45
- package/bundle/typescript/src/commands/aws/ti.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/build/_index.d.ts +0 -2
- package/bundle/typescript/src/commands/build/_index.js +0 -3
- package/bundle/typescript/src/commands/build/_index.js.map +0 -1
- package/bundle/typescript/src/commands/build/build.d.ts +0 -3
- package/bundle/typescript/src/commands/build/build.js +0 -98
- package/bundle/typescript/src/commands/build/build.js.map +0 -1
- package/bundle/typescript/src/commands/build/docker.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/build/docker.sub.cmd.js +0 -138
- package/bundle/typescript/src/commands/build/docker.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/create.d.ts +0 -1
- package/bundle/typescript/src/commands/create.js +0 -645
- package/bundle/typescript/src/commands/create.js.map +0 -1
- package/bundle/typescript/src/commands/debug.d.ts +0 -1
- package/bundle/typescript/src/commands/debug.js +0 -95
- package/bundle/typescript/src/commands/debug.js.map +0 -1
- package/bundle/typescript/src/commands/deploy/_index.d.ts +0 -3
- package/bundle/typescript/src/commands/deploy/_index.js +0 -4
- package/bundle/typescript/src/commands/deploy/_index.js.map +0 -1
- package/bundle/typescript/src/commands/deploy/deploy.command.d.ts +0 -3
- package/bundle/typescript/src/commands/deploy/deploy.command.js +0 -24
- package/bundle/typescript/src/commands/deploy/deploy.command.js.map +0 -1
- package/bundle/typescript/src/commands/deploy/galaxy.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/deploy/galaxy.sub.cmd.js +0 -152
- package/bundle/typescript/src/commands/deploy/galaxy.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/deploy/ubuntu.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/deploy/ubuntu.sub.cmd.js +0 -543
- package/bundle/typescript/src/commands/deploy/ubuntu.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/game/_index.d.ts +0 -5
- package/bundle/typescript/src/commands/game/_index.js +0 -7
- package/bundle/typescript/src/commands/game/_index.js.map +0 -1
- package/bundle/typescript/src/commands/game/battleship.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/game/battleship.sub.cmd.js +0 -12
- package/bundle/typescript/src/commands/game/battleship.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/game/play.command.d.ts +0 -3
- package/bundle/typescript/src/commands/game/play.command.js +0 -18
- package/bundle/typescript/src/commands/game/play.command.js.map +0 -1
- package/bundle/typescript/src/commands/game/pong.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/game/pong.sub.cmd.js +0 -12
- package/bundle/typescript/src/commands/game/pong.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.d.ts +0 -9
- package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.js +0 -26
- package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/command.d.ts +0 -23
- package/bundle/typescript/src/commands/game/sideQuest/commands/command.js +0 -24
- package/bundle/typescript/src/commands/game/sideQuest/commands/command.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.d.ts +0 -7
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js +0 -33
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.d.ts +0 -7
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js +0 -69
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.d.ts +0 -7
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js +0 -58
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.d.ts +0 -7
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +0 -63
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/kill.d.ts +0 -6
- package/bundle/typescript/src/commands/game/sideQuest/commands/kill.js +0 -36
- package/bundle/typescript/src/commands/game/sideQuest/commands/kill.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/lock.d.ts +0 -8
- package/bundle/typescript/src/commands/game/sideQuest/commands/lock.js +0 -74
- package/bundle/typescript/src/commands/game/sideQuest/commands/lock.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.d.ts +0 -10
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js +0 -137
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/read.d.ts +0 -6
- package/bundle/typescript/src/commands/game/sideQuest/commands/read.js +0 -26
- package/bundle/typescript/src/commands/game/sideQuest/commands/read.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.d.ts +0 -8
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js +0 -31
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.d.ts +0 -6
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +0 -24
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.d.ts +0 -6
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js +0 -23
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/store.d.ts +0 -7
- package/bundle/typescript/src/commands/game/sideQuest/commands/store.js +0 -33
- package/bundle/typescript/src/commands/game/sideQuest/commands/store.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.d.ts +0 -7
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js +0 -41
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.d.ts +0 -9
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js +0 -54
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.d.ts +0 -6
- package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js +0 -13
- package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.d.ts +0 -7
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js +0 -53
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.d.ts +0 -7
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js +0 -34
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/command-factory.d.ts +0 -9
- package/bundle/typescript/src/commands/game/sideQuest/factories/command-factory.js +0 -17
- package/bundle/typescript/src/commands/game/sideQuest/factories/command-factory.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.d.ts +0 -5
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js +0 -25
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/npc-factory.d.ts +0 -10
- package/bundle/typescript/src/commands/game/sideQuest/factories/npc-factory.js +0 -36
- package/bundle/typescript/src/commands/game/sideQuest/factories/npc-factory.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.d.ts +0 -6
- package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.js +0 -24
- package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.d.ts +0 -6
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js +0 -19
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.d.ts +0 -6
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js +0 -126
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +0 -38
- package/bundle/typescript/src/commands/game/sideQuest/game.js +0 -384
- package/bundle/typescript/src/commands/game/sideQuest/game.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/_index.d.ts +0 -8
- package/bundle/typescript/src/commands/game/sideQuest/models/_index.js +0 -9
- package/bundle/typescript/src/commands/game/sideQuest/models/_index.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/door.d.ts +0 -23
- package/bundle/typescript/src/commands/game/sideQuest/models/door.js +0 -42
- package/bundle/typescript/src/commands/game/sideQuest/models/door.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/inventory.d.ts +0 -47
- package/bundle/typescript/src/commands/game/sideQuest/models/inventory.js +0 -110
- package/bundle/typescript/src/commands/game/sideQuest/models/inventory.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/item.d.ts +0 -56
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js +0 -145
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.d.ts +0 -36
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +0 -407
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +0 -58
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +0 -357
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.d.ts +0 -34
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js +0 -67
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/room.d.ts +0 -69
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js +0 -246
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.d.ts +0 -72
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +0 -310
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/_index.d.ts +0 -0
- package/bundle/typescript/src/commands/game/sideQuest/scenes/_index.js +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/_index.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene1.json +0 -281
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +0 -397
- package/bundle/typescript/src/commands/game/sideQuest/types/enums.d.ts +0 -47
- package/bundle/typescript/src/commands/game/sideQuest/types/enums.js +0 -52
- package/bundle/typescript/src/commands/game/sideQuest/types/enums.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/player-equipment.d.ts +0 -62
- package/bundle/typescript/src/commands/game/sideQuest/types/player-equipment.js +0 -2
- package/bundle/typescript/src/commands/game/sideQuest/types/player-equipment.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/exit-seed.d.ts +0 -6
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/exit-seed.js +0 -2
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/exit-seed.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.d.ts +0 -23
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.js +0 -2
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/lifestyle-seed.d.ts +0 -22
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/lifestyle-seed.js +0 -2
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/lifestyle-seed.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/npc-seed.d.ts +0 -6
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/npc-seed.js +0 -2
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/npc-seed.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/player-seed.d.ts +0 -8
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/player-seed.js +0 -2
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/player-seed.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.d.ts +0 -11
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.js +0 -2
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/room-seed.d.ts +0 -16
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/room-seed.js +0 -2
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/room-seed.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.d.ts +0 -20
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.js +0 -2
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/abstracts.d.ts +0 -152
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/abstracts.js +0 -90
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/abstracts.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/direction-enum.d.ts +0 -8
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/direction-enum.js +0 -10
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/direction-enum.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/equipment-enum.d.ts +0 -25
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/equipment-enum.js +0 -27
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/equipment-enum.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.d.ts +0 -69
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js +0 -80
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/ui.d.ts +0 -7
- package/bundle/typescript/src/commands/game/sideQuest/ui.js +0 -72
- package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.d.ts +0 -16
- package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.js +0 -67
- package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.js.map +0 -1
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +0 -68
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/game/snake.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/game/snake.sub.cmd.js +0 -12
- package/bundle/typescript/src/commands/game/snake.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/game/tetris.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/game/tetris.sub.cmd.js +0 -12
- package/bundle/typescript/src/commands/game/tetris.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/generate.d.ts +0 -1
- package/bundle/typescript/src/commands/generate.js +0 -42
- package/bundle/typescript/src/commands/generate.js.map +0 -1
- package/bundle/typescript/src/commands/get/_index.d.ts +0 -4
- package/bundle/typescript/src/commands/get/_index.js +0 -5
- package/bundle/typescript/src/commands/get/_index.js.map +0 -1
- package/bundle/typescript/src/commands/get/get.command.d.ts +0 -3
- package/bundle/typescript/src/commands/get/get.command.js +0 -13
- package/bundle/typescript/src/commands/get/get.command.js.map +0 -1
- package/bundle/typescript/src/commands/get/global.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/get/global.sub.cmd.js +0 -20
- package/bundle/typescript/src/commands/get/global.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/get/local.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/get/local.sub.cmd.js +0 -14
- package/bundle/typescript/src/commands/get/local.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/get/whoami.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/get/whoami.sub.cmd.js +0 -21
- package/bundle/typescript/src/commands/get/whoami.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/help.d.ts +0 -1
- package/bundle/typescript/src/commands/help.js +0 -12
- package/bundle/typescript/src/commands/help.js.map +0 -1
- package/bundle/typescript/src/commands/install.d.ts +0 -1
- package/bundle/typescript/src/commands/install.js +0 -269
- package/bundle/typescript/src/commands/install.js.map +0 -1
- package/bundle/typescript/src/commands/jsdoc.d.ts +0 -1
- package/bundle/typescript/src/commands/jsdoc.js +0 -62
- package/bundle/typescript/src/commands/jsdoc.js.map +0 -1
- package/bundle/typescript/src/commands/lint.d.ts +0 -1
- package/bundle/typescript/src/commands/lint.js +0 -127
- package/bundle/typescript/src/commands/lint.js.map +0 -1
- package/bundle/typescript/src/commands/login.d.ts +0 -1
- package/bundle/typescript/src/commands/login.js +0 -168
- package/bundle/typescript/src/commands/login.js.map +0 -1
- package/bundle/typescript/src/commands/logout.d.ts +0 -1
- package/bundle/typescript/src/commands/logout.js +0 -95
- package/bundle/typescript/src/commands/logout.js.map +0 -1
- package/bundle/typescript/src/commands/logs.d.ts +0 -1
- package/bundle/typescript/src/commands/logs.js +0 -35
- package/bundle/typescript/src/commands/logs.js.map +0 -1
- package/bundle/typescript/src/commands/maka.cmd.d.ts +0 -5
- package/bundle/typescript/src/commands/maka.cmd.js +0 -57
- package/bundle/typescript/src/commands/maka.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/murder.d.ts +0 -1
- package/bundle/typescript/src/commands/murder.js +0 -31
- package/bundle/typescript/src/commands/murder.js.map +0 -1
- package/bundle/typescript/src/commands/profile.d.ts +0 -1
- package/bundle/typescript/src/commands/profile.js +0 -277
- package/bundle/typescript/src/commands/profile.js.map +0 -1
- package/bundle/typescript/src/commands/proxy.d.ts +0 -1
- package/bundle/typescript/src/commands/proxy.js +0 -168
- package/bundle/typescript/src/commands/proxy.js.map +0 -1
- package/bundle/typescript/src/commands/reconfig.d.ts +0 -1
- package/bundle/typescript/src/commands/reconfig.js +0 -69
- package/bundle/typescript/src/commands/reconfig.js.map +0 -1
- package/bundle/typescript/src/commands/register.d.ts +0 -1
- package/bundle/typescript/src/commands/register.js +0 -104
- package/bundle/typescript/src/commands/register.js.map +0 -1
- package/bundle/typescript/src/commands/run/_index.d.ts +0 -2
- package/bundle/typescript/src/commands/run/_index.js +0 -3
- package/bundle/typescript/src/commands/run/_index.js.map +0 -1
- package/bundle/typescript/src/commands/run/docker.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/run/docker.sub.cmd.js +0 -82
- package/bundle/typescript/src/commands/run/docker.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/run/run.command.d.ts +0 -3
- package/bundle/typescript/src/commands/run/run.command.js +0 -200
- package/bundle/typescript/src/commands/run/run.command.js.map +0 -1
- package/bundle/typescript/src/commands/set/_index.d.ts +0 -3
- package/bundle/typescript/src/commands/set/_index.js +0 -4
- package/bundle/typescript/src/commands/set/_index.js.map +0 -1
- package/bundle/typescript/src/commands/set/global.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/set/global.sub.cmd.js +0 -129
- package/bundle/typescript/src/commands/set/global.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/set/local.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/set/local.sub.cmd.js +0 -18
- package/bundle/typescript/src/commands/set/local.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/set/set.command.d.ts +0 -3
- package/bundle/typescript/src/commands/set/set.command.js +0 -16
- package/bundle/typescript/src/commands/set/set.command.js.map +0 -1
- package/bundle/typescript/src/commands/ssh.d.ts +0 -1
- package/bundle/typescript/src/commands/ssh.js +0 -43
- package/bundle/typescript/src/commands/ssh.js.map +0 -1
- package/bundle/typescript/src/commands/ssl.d.ts +0 -1
- package/bundle/typescript/src/commands/ssl.js +0 -109
- package/bundle/typescript/src/commands/ssl.js.map +0 -1
- package/bundle/typescript/src/commands/testCmd/_index.d.ts +0 -3
- package/bundle/typescript/src/commands/testCmd/_index.js +0 -4
- package/bundle/typescript/src/commands/testCmd/_index.js.map +0 -1
- package/bundle/typescript/src/commands/testCmd/jest.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/testCmd/jest.sub.cmd.js +0 -131
- package/bundle/typescript/src/commands/testCmd/jest.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/testCmd/mocha.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/testCmd/mocha.sub.cmd.js +0 -133
- package/bundle/typescript/src/commands/testCmd/mocha.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/testCmd/test.command.d.ts +0 -3
- package/bundle/typescript/src/commands/testCmd/test.command.js +0 -15
- package/bundle/typescript/src/commands/testCmd/test.command.js.map +0 -1
- package/bundle/typescript/src/commands/undo.d.ts +0 -1
- package/bundle/typescript/src/commands/undo.js +0 -12
- package/bundle/typescript/src/commands/undo.js.map +0 -1
- package/bundle/typescript/src/commands/uninstall.d.ts +0 -1
- package/bundle/typescript/src/commands/uninstall.js +0 -76
- package/bundle/typescript/src/commands/uninstall.js.map +0 -1
- package/bundle/typescript/src/commands/version/_index.d.ts +0 -4
- package/bundle/typescript/src/commands/version/_index.js +0 -5
- package/bundle/typescript/src/commands/version/_index.js.map +0 -1
- package/bundle/typescript/src/commands/version/list.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/version/list.sub.cmd.js +0 -55
- package/bundle/typescript/src/commands/version/list.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/version/meteor.sub.cmd.d.ts +0 -3
- package/bundle/typescript/src/commands/version/meteor.sub.cmd.js +0 -21
- package/bundle/typescript/src/commands/version/meteor.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/version/use.sub.cmd.d.ts +0 -1
- package/bundle/typescript/src/commands/version/use.sub.cmd.js +0 -83
- package/bundle/typescript/src/commands/version/use.sub.cmd.js.map +0 -1
- package/bundle/typescript/src/commands/version/version.d.ts +0 -3
- package/bundle/typescript/src/commands/version/version.js +0 -59
- package/bundle/typescript/src/commands/version/version.js.map +0 -1
- package/bundle/typescript/src/error.d.ts +0 -12
- package/bundle/typescript/src/error.js +0 -13
- package/bundle/typescript/src/error.js.map +0 -1
- package/bundle/typescript/src/exec.d.ts +0 -2
- package/bundle/typescript/src/exec.js +0 -17
- package/bundle/typescript/src/exec.js.map +0 -1
- package/bundle/typescript/src/generator.d.ts +0 -48
- package/bundle/typescript/src/generator.js +0 -394
- package/bundle/typescript/src/generator.js.map +0 -1
- package/bundle/typescript/src/generators/_index.d.ts +0 -18
- package/bundle/typescript/src/generators/_index.js +0 -19
- package/bundle/typescript/src/generators/_index.js.map +0 -1
- package/bundle/typescript/src/generators/api.d.ts +0 -1
- package/bundle/typescript/src/generators/api.js +0 -257
- package/bundle/typescript/src/generators/api.js.map +0 -1
- package/bundle/typescript/src/generators/aws/_index.d.ts +0 -2
- package/bundle/typescript/src/generators/aws/_index.js +0 -3
- package/bundle/typescript/src/generators/aws/_index.js.map +0 -1
- package/bundle/typescript/src/generators/aws/aws.d.ts +0 -3
- package/bundle/typescript/src/generators/aws/aws.js +0 -16
- package/bundle/typescript/src/generators/aws/aws.js.map +0 -1
- package/bundle/typescript/src/generators/aws/cloudformation/_index.d.ts +0 -2
- package/bundle/typescript/src/generators/aws/cloudformation/_index.js +0 -3
- package/bundle/typescript/src/generators/aws/cloudformation/_index.js.map +0 -1
- package/bundle/typescript/src/generators/aws/cloudformation/cloudformation.d.ts +0 -3
- package/bundle/typescript/src/generators/aws/cloudformation/cloudformation.js +0 -21
- package/bundle/typescript/src/generators/aws/cloudformation/cloudformation.js.map +0 -1
- package/bundle/typescript/src/generators/aws/cloudformation/create-ec2-instance.cf.gen.d.ts +0 -3
- package/bundle/typescript/src/generators/aws/cloudformation/create-ec2-instance.cf.gen.js +0 -69
- package/bundle/typescript/src/generators/aws/cloudformation/create-ec2-instance.cf.gen.js.map +0 -1
- package/bundle/typescript/src/generators/collection.d.ts +0 -1
- package/bundle/typescript/src/generators/collection.js +0 -78
- package/bundle/typescript/src/generators/collection.js.map +0 -1
- package/bundle/typescript/src/generators/component.d.ts +0 -1
- package/bundle/typescript/src/generators/component.js +0 -99
- package/bundle/typescript/src/generators/component.js.map +0 -1
- package/bundle/typescript/src/generators/config.d.ts +0 -1
- package/bundle/typescript/src/generators/config.js +0 -75
- package/bundle/typescript/src/generators/config.js.map +0 -1
- package/bundle/typescript/src/generators/dbc.d.ts +0 -1
- package/bundle/typescript/src/generators/dbc.js +0 -85
- package/bundle/typescript/src/generators/dbc.js.map +0 -1
- package/bundle/typescript/src/generators/dockerfile.d.ts +0 -1
- package/bundle/typescript/src/generators/dockerfile.js +0 -42
- package/bundle/typescript/src/generators/dockerfile.js.map +0 -1
- package/bundle/typescript/src/generators/hook.d.ts +0 -1
- package/bundle/typescript/src/generators/hook.js +0 -112
- package/bundle/typescript/src/generators/hook.js.map +0 -1
- package/bundle/typescript/src/generators/kits/_index.d.ts +0 -5
- package/bundle/typescript/src/generators/kits/_index.js +0 -6
- package/bundle/typescript/src/generators/kits/_index.js.map +0 -1
- package/bundle/typescript/src/generators/kits/auth/_index.d.ts +0 -4
- package/bundle/typescript/src/generators/kits/auth/_index.js +0 -5
- package/bundle/typescript/src/generators/kits/auth/_index.js.map +0 -1
- package/bundle/typescript/src/generators/kits/auth/auth.generator.d.ts +0 -3
- package/bundle/typescript/src/generators/kits/auth/auth.generator.js +0 -21
- package/bundle/typescript/src/generators/kits/auth/auth.generator.js.map +0 -1
- package/bundle/typescript/src/generators/kits/auth/auth0-meteor.auth.gen.d.ts +0 -1
- package/bundle/typescript/src/generators/kits/auth/auth0-meteor.auth.gen.js +0 -895
- package/bundle/typescript/src/generators/kits/auth/auth0-meteor.auth.gen.js.map +0 -1
- package/bundle/typescript/src/generators/kits/auth/basic-meteor.auth.gen.d.ts +0 -1
- package/bundle/typescript/src/generators/kits/auth/basic-meteor.auth.gen.js +0 -213
- package/bundle/typescript/src/generators/kits/auth/basic-meteor.auth.gen.js.map +0 -1
- package/bundle/typescript/src/generators/kits/auth/provider.auth.gen.d.ts +0 -1
- package/bundle/typescript/src/generators/kits/auth/provider.auth.gen.js +0 -138
- package/bundle/typescript/src/generators/kits/auth/provider.auth.gen.js.map +0 -1
- package/bundle/typescript/src/generators/kits/esri/_index.d.ts +0 -2
- package/bundle/typescript/src/generators/kits/esri/_index.js +0 -3
- package/bundle/typescript/src/generators/kits/esri/_index.js.map +0 -1
- package/bundle/typescript/src/generators/kits/esri/esri.generator.d.ts +0 -3
- package/bundle/typescript/src/generators/kits/esri/esri.generator.js +0 -31
- package/bundle/typescript/src/generators/kits/esri/esri.generator.js.map +0 -1
- package/bundle/typescript/src/generators/kits/esri/map.esri.gen.d.ts +0 -1
- package/bundle/typescript/src/generators/kits/esri/map.esri.gen.js +0 -85
- package/bundle/typescript/src/generators/kits/esri/map.esri.gen.js.map +0 -1
- package/bundle/typescript/src/generators/kits/frames/_index.d.ts +0 -1
- package/bundle/typescript/src/generators/kits/frames/_index.js +0 -2
- package/bundle/typescript/src/generators/kits/frames/_index.js.map +0 -1
- package/bundle/typescript/src/generators/kits/frames/frames.generator.d.ts +0 -3
- package/bundle/typescript/src/generators/kits/frames/frames.generator.js +0 -166
- package/bundle/typescript/src/generators/kits/frames/frames.generator.js.map +0 -1
- package/bundle/typescript/src/generators/kits/kit.d.ts +0 -3
- package/bundle/typescript/src/generators/kits/kit.js +0 -17
- package/bundle/typescript/src/generators/kits/kit.js.map +0 -1
- package/bundle/typescript/src/generators/kits/mui/_index.d.ts +0 -4
- package/bundle/typescript/src/generators/kits/mui/_index.js +0 -5
- package/bundle/typescript/src/generators/kits/mui/_index.js.map +0 -1
- package/bundle/typescript/src/generators/kits/mui/auth.mui.gen.d.ts +0 -2
- package/bundle/typescript/src/generators/kits/mui/auth.mui.gen.js +0 -228
- package/bundle/typescript/src/generators/kits/mui/auth.mui.gen.js.map +0 -1
- package/bundle/typescript/src/generators/kits/mui/auth0.mui.gen.d.ts +0 -2
- package/bundle/typescript/src/generators/kits/mui/auth0.mui.gen.js +0 -158
- package/bundle/typescript/src/generators/kits/mui/auth0.mui.gen.js.map +0 -1
- package/bundle/typescript/src/generators/kits/mui/frame.mui.gen.d.ts +0 -1
- package/bundle/typescript/src/generators/kits/mui/frame.mui.gen.js +0 -210
- package/bundle/typescript/src/generators/kits/mui/frame.mui.gen.js.map +0 -1
- package/bundle/typescript/src/generators/kits/mui/mui.generator.d.ts +0 -3
- package/bundle/typescript/src/generators/kits/mui/mui.generator.js +0 -79
- package/bundle/typescript/src/generators/kits/mui/mui.generator.js.map +0 -1
- package/bundle/typescript/src/generators/layout.d.ts +0 -1
- package/bundle/typescript/src/generators/layout.js +0 -116
- package/bundle/typescript/src/generators/layout.js.map +0 -1
- package/bundle/typescript/src/generators/maka.gen.d.ts +0 -5
- package/bundle/typescript/src/generators/maka.gen.js +0 -26
- package/bundle/typescript/src/generators/maka.gen.js.map +0 -1
- package/bundle/typescript/src/generators/methods.d.ts +0 -1
- package/bundle/typescript/src/generators/methods.js +0 -65
- package/bundle/typescript/src/generators/methods.js.map +0 -1
- package/bundle/typescript/src/generators/package.d.ts +0 -1
- package/bundle/typescript/src/generators/package.js +0 -71
- package/bundle/typescript/src/generators/package.js.map +0 -1
- package/bundle/typescript/src/generators/page.d.ts +0 -1
- package/bundle/typescript/src/generators/page.js +0 -194
- package/bundle/typescript/src/generators/page.js.map +0 -1
- package/bundle/typescript/src/generators/publish.d.ts +0 -1
- package/bundle/typescript/src/generators/publish.js +0 -75
- package/bundle/typescript/src/generators/publish.js.map +0 -1
- package/bundle/typescript/src/generators/route.d.ts +0 -1
- package/bundle/typescript/src/generators/route.js +0 -68
- package/bundle/typescript/src/generators/route.js.map +0 -1
- package/bundle/typescript/src/generators/services/_index.d.ts +0 -4
- package/bundle/typescript/src/generators/services/_index.js +0 -5
- package/bundle/typescript/src/generators/services/_index.js.map +0 -1
- package/bundle/typescript/src/generators/services/logger.d.ts +0 -1
- package/bundle/typescript/src/generators/services/logger.js +0 -50
- package/bundle/typescript/src/generators/services/logger.js.map +0 -1
- package/bundle/typescript/src/generators/services/openssl.d.ts +0 -1
- package/bundle/typescript/src/generators/services/openssl.js +0 -38
- package/bundle/typescript/src/generators/services/openssl.js.map +0 -1
- package/bundle/typescript/src/generators/services/service.d.ts +0 -3
- package/bundle/typescript/src/generators/services/service.js +0 -16
- package/bundle/typescript/src/generators/services/service.js.map +0 -1
- package/bundle/typescript/src/generators/services/translation.d.ts +0 -1
- package/bundle/typescript/src/generators/services/translation.js +0 -149
- package/bundle/typescript/src/generators/services/translation.js.map +0 -1
- package/bundle/typescript/src/maka.d.ts +0 -2
- package/bundle/typescript/src/maka.js +0 -26
- package/bundle/typescript/src/maka.js.map +0 -1
- package/bundle/typescript/src/templates/aws/cloudformation/create-ec2-instance.template +0 -14
- package/bundle/typescript/src/templates/meteor/api/api.js +0 -20
- package/bundle/typescript/src/templates/meteor/api/api.js.ts +0 -20
- package/bundle/typescript/src/templates/meteor/api/apollo-gateway.js +0 -50
- package/bundle/typescript/src/templates/meteor/api/apollo-gateway.js.ts +0 -55
- package/bundle/typescript/src/templates/meteor/api/graphql-api.js +0 -63
- package/bundle/typescript/src/templates/meteor/api/graphql-api.js.ts +0 -69
- package/bundle/typescript/src/templates/meteor/api/methods.js +0 -39
- package/bundle/typescript/src/templates/meteor/api/methods.js.ts +0 -40
- package/bundle/typescript/src/templates/meteor/api/register-api.js +0 -3
- package/bundle/typescript/src/templates/meteor/api/register-api.js.ts +0 -3
- package/bundle/typescript/src/templates/meteor/api/resolvers.js +0 -9
- package/bundle/typescript/src/templates/meteor/api/resolvers.js.ts +0 -9
- package/bundle/typescript/src/templates/meteor/api/tests.js +0 -0
- package/bundle/typescript/src/templates/meteor/api/tests.js.ts +0 -0
- package/bundle/typescript/src/templates/meteor/api/typeDefs.js +0 -6
- package/bundle/typescript/src/templates/meteor/api/typeDefs.js.ts +0 -6
- package/bundle/typescript/src/templates/meteor/app/client/.gitkeep +0 -0
- package/bundle/typescript/src/templates/meteor/app/client/body.html +0 -3
- package/bundle/typescript/src/templates/meteor/app/client/head.html +0 -12
- package/bundle/typescript/src/templates/meteor/app/client/main.js +0 -15
- package/bundle/typescript/src/templates/meteor/app/client/main.js.jsx +0 -15
- package/bundle/typescript/src/templates/meteor/app/client/main.js.ts +0 -15
- package/bundle/typescript/src/templates/meteor/app/client/main.js.tsx +0 -15
- package/bundle/typescript/src/templates/meteor/app/imports/api/.gitkeep +0 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/index.js +0 -20
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/index.js.jsx +0 -107
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/index.js.ts +0 -20
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/index.js.tsx +0 -108
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/routes.js +0 -39
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/routes.js.jsx +0 -33
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/routes.js.ts +0 -24
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/routes.js.tsx +0 -33
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/templates.js +0 -9
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/templates.js.jsx +0 -9
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/templates.js.ts +0 -9
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/templates.js.tsx +0 -9
- package/bundle/typescript/src/templates/meteor/app/imports/startup/lib/index.js +0 -1
- package/bundle/typescript/src/templates/meteor/app/imports/startup/lib/index.js.jsx +0 -20
- package/bundle/typescript/src/templates/meteor/app/imports/startup/lib/index.js.ts +0 -1
- package/bundle/typescript/src/templates/meteor/app/imports/startup/lib/index.js.tsx +0 -20
- package/bundle/typescript/src/templates/meteor/app/imports/startup/lib/routes.js.jsx +0 -28
- package/bundle/typescript/src/templates/meteor/app/imports/startup/lib/routes.js.tsx +0 -28
- package/bundle/typescript/src/templates/meteor/app/imports/startup/lib/templates.js.jsx +0 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/lib/templates.js.tsx +0 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/server/index.js +0 -1
- package/bundle/typescript/src/templates/meteor/app/imports/startup/server/index.js.jsx +0 -98
- package/bundle/typescript/src/templates/meteor/app/imports/startup/server/index.js.ts +0 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/server/index.js.tsx +0 -98
- package/bundle/typescript/src/templates/meteor/app/imports/ui/test-helpers.js +0 -24
- package/bundle/typescript/src/templates/meteor/app/imports/ui/test-helpers.js.ts +0 -24
- package/bundle/typescript/src/templates/meteor/app/lib/.gitkeep +0 -0
- package/bundle/typescript/src/templates/meteor/app/lib/main.js +0 -3
- package/bundle/typescript/src/templates/meteor/app/lib/main.js.jsx +0 -3
- package/bundle/typescript/src/templates/meteor/app/lib/main.js.ts +0 -3
- package/bundle/typescript/src/templates/meteor/app/lib/main.js.tsx +0 -3
- package/bundle/typescript/src/templates/meteor/app/maka.d.ts +0 -504
- package/bundle/typescript/src/templates/meteor/app/meteor.d.ts +0 -954
- package/bundle/typescript/src/templates/meteor/app/packages/.gitkeep +0 -0
- package/bundle/typescript/src/templates/meteor/app/private/.gitkeep +0 -0
- package/bundle/typescript/src/templates/meteor/app/public/.gitkeep +0 -0
- package/bundle/typescript/src/templates/meteor/app/public/favicon.ico +0 -0
- package/bundle/typescript/src/templates/meteor/app/public/maka-144x144.png +0 -0
- package/bundle/typescript/src/templates/meteor/app/public/maka-192x192.png +0 -0
- package/bundle/typescript/src/templates/meteor/app/public/maka-512x512.png +0 -0
- package/bundle/typescript/src/templates/meteor/app/public/manifest.json +0 -27
- package/bundle/typescript/src/templates/meteor/app/public/sw.js +0 -30
- package/bundle/typescript/src/templates/meteor/app/public/sw.js.jsx +0 -30
- package/bundle/typescript/src/templates/meteor/app/public/sw.js.ts +0 -30
- package/bundle/typescript/src/templates/meteor/app/public/sw.js.tsx +0 -30
- package/bundle/typescript/src/templates/meteor/app/server/.gitkeep +0 -0
- package/bundle/typescript/src/templates/meteor/app/server/helmet-csp.js +0 -179
- package/bundle/typescript/src/templates/meteor/app/server/helmet-csp.js.jsx +0 -179
- package/bundle/typescript/src/templates/meteor/app/server/helmet-csp.js.ts +0 -179
- package/bundle/typescript/src/templates/meteor/app/server/helmet-csp.js.tsx +0 -179
- package/bundle/typescript/src/templates/meteor/app/server/main.js +0 -13
- package/bundle/typescript/src/templates/meteor/app/server/main.js.jsx +0 -13
- package/bundle/typescript/src/templates/meteor/app/server/main.js.ts +0 -13
- package/bundle/typescript/src/templates/meteor/app/server/main.js.tsx +0 -13
- package/bundle/typescript/src/templates/meteor/app/tsconfig.json +0 -40
- package/bundle/typescript/src/templates/meteor/collection/collection.js +0 -51
- package/bundle/typescript/src/templates/meteor/collection/collection.js.ts +0 -55
- package/bundle/typescript/src/templates/meteor/collection/tests.js +0 -27
- package/bundle/typescript/src/templates/meteor/collection/tests.js.ts +0 -27
- package/bundle/typescript/src/templates/meteor/config/docker-compose.yaml +0 -17
- package/bundle/typescript/src/templates/meteor/config/pm2.config.js +0 -27
- package/bundle/typescript/src/templates/meteor/config/process.env +0 -5
- package/bundle/typescript/src/templates/meteor/config/settings.json +0 -11
- package/bundle/typescript/src/templates/meteor/config/ssh.json +0 -6
- package/bundle/typescript/src/templates/meteor/dbc/config.js +0 -70
- package/bundle/typescript/src/templates/meteor/dbc/config.js.ts +0 -70
- package/bundle/typescript/src/templates/meteor/dbc/conn.js +0 -37
- package/bundle/typescript/src/templates/meteor/dbc/conn.js.ts +0 -37
- package/bundle/typescript/src/templates/meteor/dbc/register-dbc.js +0 -3
- package/bundle/typescript/src/templates/meteor/dbc/register-dbc.js.ts +0 -3
- package/bundle/typescript/src/templates/meteor/method/method.js +0 -48
- package/bundle/typescript/src/templates/meteor/method/method.js.ts +0 -48
- package/bundle/typescript/src/templates/meteor/package/client/package.js +0 -0
- package/bundle/typescript/src/templates/meteor/package/client/package.js.jsx +0 -0
- package/bundle/typescript/src/templates/meteor/package/client/package.js.ts +0 -0
- package/bundle/typescript/src/templates/meteor/package/client/package.js.tsx +0 -0
- package/bundle/typescript/src/templates/meteor/package/lib/package.js +0 -0
- package/bundle/typescript/src/templates/meteor/package/lib/package.js.jsx +0 -0
- package/bundle/typescript/src/templates/meteor/package/lib/package.js.ts +0 -0
- package/bundle/typescript/src/templates/meteor/package/lib/package.js.tsx +0 -0
- package/bundle/typescript/src/templates/meteor/package/package.js +0 -37
- package/bundle/typescript/src/templates/meteor/package/package.js.jsx +0 -37
- package/bundle/typescript/src/templates/meteor/package/package.js.ts +0 -36
- package/bundle/typescript/src/templates/meteor/package/package.js.tsx +0 -37
- package/bundle/typescript/src/templates/meteor/package/server/package.js +0 -0
- package/bundle/typescript/src/templates/meteor/package/server/package.js.jsx +0 -0
- package/bundle/typescript/src/templates/meteor/package/server/package.js.ts +0 -0
- package/bundle/typescript/src/templates/meteor/package/server/package.js.tsx +0 -0
- package/bundle/typescript/src/templates/meteor/package/tests/client/package.js +0 -5
- package/bundle/typescript/src/templates/meteor/package/tests/client/package.js.jsx +0 -5
- package/bundle/typescript/src/templates/meteor/package/tests/client/package.js.ts +0 -5
- package/bundle/typescript/src/templates/meteor/package/tests/client/package.js.tsx +0 -5
- package/bundle/typescript/src/templates/meteor/package/tests/server/package.js +0 -5
- package/bundle/typescript/src/templates/meteor/package/tests/server/package.js.jsx +0 -5
- package/bundle/typescript/src/templates/meteor/package/tests/server/package.js.ts +0 -5
- package/bundle/typescript/src/templates/meteor/package/tests/server/package.js.tsx +0 -5
- package/bundle/typescript/src/templates/meteor/project/.maka/config.json +0 -29
- package/bundle/typescript/src/templates/meteor/project/.maka/history.json +0 -1
- package/bundle/typescript/src/templates/meteor/project/README.md +0 -33
- package/bundle/typescript/src/templates/meteor/project/build/.gitkeep +0 -0
- package/bundle/typescript/src/templates/meteor/project/build/README +0 -4
- package/bundle/typescript/src/templates/meteor/project/gitignore +0 -9
- package/bundle/typescript/src/templates/meteor/project/package.json +0 -29
- package/bundle/typescript/src/templates/meteor/publish/publish.js +0 -3
- package/bundle/typescript/src/templates/meteor/publish/publish.js.ts +0 -3
- package/bundle/typescript/src/templates/meteor/service/logger/logger.js +0 -27
- package/bundle/typescript/src/templates/meteor/service/logger/logger.js.ts +0 -27
- package/bundle/typescript/src/templates/meteor/stylesheet/stylesheet.css +0 -5
- package/bundle/typescript/src/templates/meteor/stylesheet/stylesheet.css.less +0 -5
- package/bundle/typescript/src/templates/meteor/template/template-tests.js +0 -1
- package/bundle/typescript/src/templates/meteor/template/template-tests.js.jsx +0 -55
- package/bundle/typescript/src/templates/meteor/template/template-tests.js.ts +0 -1
- package/bundle/typescript/src/templates/meteor/template/template-tests.js.tsx +0 -55
- package/bundle/typescript/src/templates/meteor/template/template.css +0 -3
- package/bundle/typescript/src/templates/meteor/template/template.css.less +0 -3
- package/bundle/typescript/src/templates/meteor/template/template.css.scss +0 -3
- package/bundle/typescript/src/templates/meteor/template/template.html +0 -5
- package/bundle/typescript/src/templates/meteor/template/template.js +0 -20
- package/bundle/typescript/src/templates/meteor/template/template.js.jsx +0 -77
- package/bundle/typescript/src/templates/meteor/template/template.js.ts +0 -1
- package/bundle/typescript/src/templates/meteor/template/template.js.tsx +0 -89
- package/bundle/typescript/src/templates/react/component/component.css +0 -6
- package/bundle/typescript/src/templates/react/component/component.css.less +0 -6
- package/bundle/typescript/src/templates/react/component/component.css.scss +0 -3
- package/bundle/typescript/src/templates/react/component/component.js.jsx +0 -54
- package/bundle/typescript/src/templates/react/component/component.js.tsx +0 -59
- package/bundle/typescript/src/templates/react/hook/hook.css +0 -3
- package/bundle/typescript/src/templates/react/hook/hook.css.scss +0 -3
- package/bundle/typescript/src/templates/react/hook/hook.js.jsx +0 -19
- package/bundle/typescript/src/templates/react/hook/hook.js.tsx +0 -18
- package/bundle/typescript/src/templates/react/kit/auth/provider/authentication-provider.js.jsx +0 -293
- package/bundle/typescript/src/templates/react/kit/auth/provider/authentication-provider.js.tsx +0 -329
- package/bundle/typescript/src/templates/react/kit/auth/service/auth0-client.js.jsx +0 -178
- package/bundle/typescript/src/templates/react/kit/auth/service/auth0-client.js.tsx +0 -178
- package/bundle/typescript/src/templates/react/kit/auth/service/auth0-config.js.jsx +0 -59
- package/bundle/typescript/src/templates/react/kit/auth/service/auth0-config.js.tsx +0 -67
- package/bundle/typescript/src/templates/react/kit/auth/service/auth0-methods.js.jsx +0 -273
- package/bundle/typescript/src/templates/react/kit/auth/service/auth0-methods.js.tsx +0 -275
- package/bundle/typescript/src/templates/react/kit/auth/service/auth0-validator.js.jsx +0 -182
- package/bundle/typescript/src/templates/react/kit/auth/service/auth0-validator.js.tsx +0 -199
- package/bundle/typescript/src/templates/react/kit/auth/service/meteor-auth-service.js.jsx +0 -138
- package/bundle/typescript/src/templates/react/kit/auth/service/meteor-auth-service.js.tsx +0 -136
- package/bundle/typescript/src/templates/react/kit/esri/map/basic-map.js.jsx +0 -29
- package/bundle/typescript/src/templates/react/kit/esri/map/basic-map.js.tsx +0 -32
- package/bundle/typescript/src/templates/react/kit/frames/frames-demo.css +0 -63
- package/bundle/typescript/src/templates/react/kit/frames/frames-demo.jsx +0 -153
- package/bundle/typescript/src/templates/react/kit/frames/frames-demo.tsx +0 -164
- package/bundle/typescript/src/templates/react/kit/frames/workspace-manager.css +0 -105
- package/bundle/typescript/src/templates/react/kit/frames/workspace-manager.jsx +0 -158
- package/bundle/typescript/src/templates/react/kit/frames/workspace-manager.tsx +0 -166
- package/bundle/typescript/src/templates/react/kit/mui/auth/forgot-password/basic-forgot-password-page.js.jsx +0 -34
- package/bundle/typescript/src/templates/react/kit/mui/auth/forgot-password/basic-forgot-password-page.js.tsx +0 -33
- package/bundle/typescript/src/templates/react/kit/mui/auth/login/basic-login-page.js.jsx +0 -53
- package/bundle/typescript/src/templates/react/kit/mui/auth/login/basic-login-page.js.tsx +0 -53
- package/bundle/typescript/src/templates/react/kit/mui/auth/logout/basic-logout-page.js.jsx +0 -25
- package/bundle/typescript/src/templates/react/kit/mui/auth/logout/basic-logout-page.js.tsx +0 -25
- package/bundle/typescript/src/templates/react/kit/mui/auth/password-reset/basic-password-reset-page.js.jsx +0 -41
- package/bundle/typescript/src/templates/react/kit/mui/auth/password-reset/basic-password-reset-page.js.tsx +0 -35
- package/bundle/typescript/src/templates/react/kit/mui/auth/register/basic-register-page.js.jsx +0 -33
- package/bundle/typescript/src/templates/react/kit/mui/auth/register/basic-register-page.js.tsx +0 -33
- package/bundle/typescript/src/templates/react/kit/mui/auth0/auth-callback.js.jsx +0 -71
- package/bundle/typescript/src/templates/react/kit/mui/auth0/auth-callback.js.tsx +0 -71
- package/bundle/typescript/src/templates/react/kit/mui/auth0/auth0-account-settings.js.jsx +0 -123
- package/bundle/typescript/src/templates/react/kit/mui/auth0/auth0-account-settings.js.tsx +0 -123
- package/bundle/typescript/src/templates/react/kit/mui/auth0/auth0-login-button.js.jsx +0 -56
- package/bundle/typescript/src/templates/react/kit/mui/auth0/auth0-login-button.js.tsx +0 -74
- package/bundle/typescript/src/templates/react/kit/mui/frame/app-bars/basic-app-bar.js.jsx +0 -43
- package/bundle/typescript/src/templates/react/kit/mui/frame/app-bars/basic-app-bar.js.tsx +0 -43
- package/bundle/typescript/src/templates/react/kit/mui/frame/drawers/basic-drawer.js.jsx +0 -121
- package/bundle/typescript/src/templates/react/kit/mui/frame/drawers/basic-drawer.js.tsx +0 -117
- package/bundle/typescript/src/templates/react/kit/mui/frame/footers/basic-sticky-footer.js.jsx +0 -41
- package/bundle/typescript/src/templates/react/kit/mui/frame/footers/basic-sticky-footer.js.tsx +0 -41
- package/bundle/typescript/src/templates/react/route/route.js +0 -8
- package/bundle/typescript/src/templates/react/route/route.js.jsx +0 -5
- package/bundle/typescript/src/templates/react/route/route.js.ts +0 -8
- package/bundle/typescript/src/templates/react/route/route.js.tsx +0 -5
- package/bundle/typescript/src/templates/react/test/test.js +0 -1
- package/bundle/typescript/src/templates/react/test/test.js.jsx +0 -38
- package/bundle/typescript/src/templates/react/test/test.js.ts +0 -1
- package/bundle/typescript/src/templates/react/test/test.js.tsx +0 -38
- package/bundle/typescript/src/templates/service/docker/Dockerfile +0 -54
- package/bundle/typescript/src/templates/service/eslint/babel.config.js +0 -15
- package/bundle/typescript/src/templates/service/eslint/config.eslint.js +0 -57
- package/bundle/typescript/src/templates/service/i18n/i18n.js +0 -33
- package/bundle/typescript/src/templates/service/i18n/i18n.js.ts +0 -33
- package/bundle/typescript/src/templates/service/i18n/index.js +0 -0
- package/bundle/typescript/src/templates/service/i18n/index.js.jsx +0 -0
- package/bundle/typescript/src/templates/service/i18n/locales.js +0 -3
- package/bundle/typescript/src/templates/service/i18n/locales.js.ts +0 -3
- package/bundle/typescript/src/templates/service/openssl/openssl.conf +0 -22
- package/bundle/typescript/src/templates/service/test/jest/jest.config.js +0 -6
- package/bundle/typescript/src/templates/service/test/jest/jest.setup.js +0 -7
- package/bundle/typescript/src/tool.d.ts +0 -74
- package/bundle/typescript/src/tool.js +0 -217
- package/bundle/typescript/src/tool.js.map +0 -1
- package/bundle/typescript/src/tools/actions/actions.class.d.ts +0 -29
- package/bundle/typescript/src/tools/actions/actions.class.js +0 -58
- package/bundle/typescript/src/tools/actions/actions.class.js.map +0 -1
- package/bundle/typescript/src/tools/aws/aws.class.d.ts +0 -51
- package/bundle/typescript/src/tools/aws/aws.class.js +0 -802
- package/bundle/typescript/src/tools/aws/aws.class.js.map +0 -1
- package/bundle/typescript/src/tools/aws/aws.interfaces.d.ts +0 -364
- package/bundle/typescript/src/tools/aws/aws.interfaces.js +0 -255
- package/bundle/typescript/src/tools/aws/aws.interfaces.js.map +0 -1
- package/bundle/typescript/src/tools/cfg/cfg.class.d.ts +0 -42
- package/bundle/typescript/src/tools/cfg/cfg.class.js +0 -402
- package/bundle/typescript/src/tools/cfg/cfg.class.js.map +0 -1
- package/bundle/typescript/src/tools/docker/docker.class.d.ts +0 -10
- package/bundle/typescript/src/tools/docker/docker.class.js +0 -46
- package/bundle/typescript/src/tools/docker/docker.class.js.map +0 -1
- package/bundle/typescript/src/tools/docker/docker.interfaces.d.ts +0 -18
- package/bundle/typescript/src/tools/docker/docker.interfaces.js +0 -2
- package/bundle/typescript/src/tools/docker/docker.interfaces.js.map +0 -1
- package/bundle/typescript/src/tools/fsi/fsi.class.d.ts +0 -130
- package/bundle/typescript/src/tools/fsi/fsi.class.js +0 -685
- package/bundle/typescript/src/tools/fsi/fsi.class.js.map +0 -1
- package/bundle/typescript/src/tools/fsi/fsi.interfaces.d.ts +0 -191
- package/bundle/typescript/src/tools/fsi/fsi.interfaces.js +0 -64
- package/bundle/typescript/src/tools/fsi/fsi.interfaces.js.map +0 -1
- package/bundle/typescript/src/tools/https/https.class.d.ts +0 -13
- package/bundle/typescript/src/tools/https/https.class.js +0 -302
- package/bundle/typescript/src/tools/https/https.class.js.map +0 -1
- package/bundle/typescript/src/tools/https/https.interface.d.ts +0 -40
- package/bundle/typescript/src/tools/https/https.interface.js +0 -2
- package/bundle/typescript/src/tools/https/https.interface.js.map +0 -1
- package/bundle/typescript/src/tools/log/log.class.d.ts +0 -33
- package/bundle/typescript/src/tools/log/log.class.js +0 -206
- package/bundle/typescript/src/tools/log/log.class.js.map +0 -1
- package/bundle/typescript/src/tools/log/log.interfaces.d.ts +0 -7
- package/bundle/typescript/src/tools/log/log.interfaces.js +0 -2
- package/bundle/typescript/src/tools/log/log.interfaces.js.map +0 -1
- package/bundle/typescript/src/tools/mpi/mpi.class.d.ts +0 -26
- package/bundle/typescript/src/tools/mpi/mpi.class.js +0 -523
- package/bundle/typescript/src/tools/mpi/mpi.class.js.map +0 -1
- package/bundle/typescript/src/tools/options/options.class.d.ts +0 -11
- package/bundle/typescript/src/tools/options/options.class.js +0 -64
- package/bundle/typescript/src/tools/options/options.class.js.map +0 -1
- package/bundle/typescript/src/tools/pkg/pkg.class.d.ts +0 -31
- package/bundle/typescript/src/tools/pkg/pkg.class.js +0 -314
- package/bundle/typescript/src/tools/pkg/pkg.class.js.map +0 -1
- package/bundle/typescript/src/tools/progress/progress.class.d.ts +0 -12
- package/bundle/typescript/src/tools/progress/progress.class.js +0 -42
- package/bundle/typescript/src/tools/progress/progress.class.js.map +0 -1
- package/bundle/typescript/src/tools/scaffold/scaffold.class.d.ts +0 -198
- package/bundle/typescript/src/tools/scaffold/scaffold.class.js +0 -868
- package/bundle/typescript/src/tools/scaffold/scaffold.class.js.map +0 -1
- package/bundle/typescript/src/tools/spawn-async/spawn-async.class.d.ts +0 -4
- package/bundle/typescript/src/tools/spawn-async/spawn-async.class.js +0 -42
- package/bundle/typescript/src/tools/spawn-async/spawn-async.class.js.map +0 -1
- package/bundle/typescript/src/tools/spawn-async/spawn-async.interfaces.d.ts +0 -6
- package/bundle/typescript/src/tools/spawn-async/spawn-async.interfaces.js +0 -2
- package/bundle/typescript/src/tools/spawn-async/spawn-async.interfaces.js.map +0 -1
- package/bundle/typescript/src/tools/ssh/ssh.class.d.ts +0 -11
- package/bundle/typescript/src/tools/ssh/ssh.class.js +0 -120
- package/bundle/typescript/src/tools/ssh/ssh.class.js.map +0 -1
- package/bundle/typescript/src/tools/ssh/ssh.interfaces.d.ts +0 -21
- package/bundle/typescript/src/tools/ssh/ssh.interfaces.js +0 -2
- package/bundle/typescript/src/tools/ssh/ssh.interfaces.js.map +0 -1
- package/bundle/typescript/src/tools/ssl/ssl.class.d.ts +0 -17
- package/bundle/typescript/src/tools/ssl/ssl.class.js +0 -54
- package/bundle/typescript/src/tools/ssl/ssl.class.js.map +0 -1
- package/bundle/typescript/src/tools/ssl/ssl.interfaces.d.ts +0 -0
- package/bundle/typescript/src/tools/ssl/ssl.interfaces.js +0 -1
- package/bundle/typescript/src/tools/ssl/ssl.interfaces.js.map +0 -1
|
@@ -1,868 +0,0 @@
|
|
|
1
|
-
// Scaffold
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import fs from 'fs';
|
|
4
|
-
import util from 'util';
|
|
5
|
-
import { exec } from 'child_process';
|
|
6
|
-
import del from 'delete';
|
|
7
|
-
import ejs from 'ejs';
|
|
8
|
-
import { pascalCase } from "change-case";
|
|
9
|
-
import { Log } from '../log/log.class.js';
|
|
10
|
-
const errorHandler = (caller, error) => {
|
|
11
|
-
if (process.env['MAKA_DEV'] === 'True') {
|
|
12
|
-
Log.error(`Error in ${caller}`);
|
|
13
|
-
}
|
|
14
|
-
if (error) {
|
|
15
|
-
console.error(error);
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
const isWin = process.platform === 'win32';
|
|
19
|
-
const treeSymbol = (isWin) ? ' ->' : ' \u2517';
|
|
20
|
-
export class Scaffold {
|
|
21
|
-
static instance;
|
|
22
|
-
fsi;
|
|
23
|
-
mpi;
|
|
24
|
-
constructor(fsi, mpi) {
|
|
25
|
-
this.fsi = fsi;
|
|
26
|
-
this.mpi = mpi;
|
|
27
|
-
}
|
|
28
|
-
// Static method to get the singleton instance
|
|
29
|
-
static getInstance(fsi, mpi) {
|
|
30
|
-
if (!Scaffold.instance) {
|
|
31
|
-
Scaffold.instance = new Scaffold(fsi, mpi);
|
|
32
|
-
}
|
|
33
|
-
return Scaffold.instance;
|
|
34
|
-
}
|
|
35
|
-
async createEmptyMeteorProject(name, opts) {
|
|
36
|
-
opts.cwd = opts.cwd || '.';
|
|
37
|
-
const appPath = path.join(opts.cwd, name);
|
|
38
|
-
const meteorPath = path.join(appPath, '.meteor');
|
|
39
|
-
if (this.fsi.isDirectory(meteorPath)) {
|
|
40
|
-
throw new Error('Meteor project already exists at ' + JSON.stringify(appPath));
|
|
41
|
-
}
|
|
42
|
-
const minFlag = '--minimal';
|
|
43
|
-
const projectDirectory = path.join(opts.cwd);
|
|
44
|
-
// Convert the callback-based exec to a promise-based function
|
|
45
|
-
const execPromise = util.promisify(exec);
|
|
46
|
-
const releaseVersion = opts.release ? `--release ${opts.release}` : '';
|
|
47
|
-
// Log a notice if the release is an alpha, beta, etc
|
|
48
|
-
if (opts.release && opts.release.includes('alpha')) {
|
|
49
|
-
Log.warn(`Creating a new Meteor project with an alpha release: ${opts.release}`);
|
|
50
|
-
Log.warn(`Please report any issues to https://github.com/maka-io/maka-cli/issues`);
|
|
51
|
-
}
|
|
52
|
-
try {
|
|
53
|
-
await execPromise(`${this.mpi.meteor} create ${name} ${minFlag} ${releaseVersion}`, { cwd: projectDirectory });
|
|
54
|
-
}
|
|
55
|
-
catch (error) {
|
|
56
|
-
Log.error(`\n${error.message}`);
|
|
57
|
-
throw error; // Propagate the error
|
|
58
|
-
}
|
|
59
|
-
const appDirectory = path.join(projectDirectory, name);
|
|
60
|
-
if (!fs.existsSync(appDirectory)) {
|
|
61
|
-
throw new Error(`Directory ${appDirectory} doesn't exist`);
|
|
62
|
-
}
|
|
63
|
-
const directoryEntries = fs.readdirSync(appDirectory);
|
|
64
|
-
for (const entryPath of directoryEntries) {
|
|
65
|
-
if (entryPath !== '.git' && entryPath !== '.meteor') {
|
|
66
|
-
const entryFullPath = path.join(appDirectory, entryPath);
|
|
67
|
-
await del(entryFullPath, { force: true }); // Use the promise-based version of 'del'
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Returns an object with the type and engine given a srcPath.
|
|
73
|
-
* For example, given foo.bar.baz, returns { type: 'bar', engine: 'baz' }
|
|
74
|
-
*/
|
|
75
|
-
engineAndTypeFromfilePath({ filePath }) {
|
|
76
|
-
try {
|
|
77
|
-
const re = /\.([A-Za-z0-9.]+)$/g;
|
|
78
|
-
let matches = filePath.match(re);
|
|
79
|
-
matches = matches && matches[0].split('.', 3);
|
|
80
|
-
if (!matches)
|
|
81
|
-
return { type: undefined, engine: undefined };
|
|
82
|
-
// matches can be an array of n length. I'll assume the last entry is the
|
|
83
|
-
// engine, and the one before that the type. If there's only one entry I'll
|
|
84
|
-
// assume the engine and type are the same. For example, template.js.js is
|
|
85
|
-
// equivalent to template.js
|
|
86
|
-
let engine = matches.pop();
|
|
87
|
-
let type = matches.pop() || engine;
|
|
88
|
-
if (engine)
|
|
89
|
-
engine = engine.replace('.', '');
|
|
90
|
-
if (type)
|
|
91
|
-
type = type.replace('.', '');
|
|
92
|
-
return {
|
|
93
|
-
type: type,
|
|
94
|
-
engine: engine
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
catch (e) {
|
|
98
|
-
errorHandler('engineAndTypeFromfilePath()', e);
|
|
99
|
-
process.exit(1);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Given a path of ./foo.bar.baz of the schema ./foo.<type>.<engine>, rewrite
|
|
104
|
-
* the destination path to only use the type extension. For example,
|
|
105
|
-
*
|
|
106
|
-
* foo.css.less would be rewritten to be foo.css
|
|
107
|
-
*/
|
|
108
|
-
rewriteDestinationPathForType({ pathParts, config }) {
|
|
109
|
-
try {
|
|
110
|
-
const destPath = pathParts.join(path.sep);
|
|
111
|
-
const fileType = this.engineAndTypeFromfilePath({ filePath: destPath }).type;
|
|
112
|
-
// get the engine from config for the given type
|
|
113
|
-
const engine = config?.engines[fileType];
|
|
114
|
-
// replace everything after the file type with only the file type
|
|
115
|
-
const replaceTypeWithEngineRe = new RegExp('\\.' + fileType + '\\S*$');
|
|
116
|
-
if (!fileType || !engine) {
|
|
117
|
-
return destPath;
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
return destPath.replace(replaceTypeWithEngineRe, '.' + fileType);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
catch (e) {
|
|
124
|
-
errorHandler('rewriteDestinationPathForType()', e);
|
|
125
|
-
process.exit(1);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Given a source file with a name that follows this schema:
|
|
130
|
-
*
|
|
131
|
-
* <template-name>.<type>[.engine]
|
|
132
|
-
*
|
|
133
|
-
* Iff there is an engine defined, make sure this template file is the right one
|
|
134
|
-
* for the given engine. If there is no engine defined, assume the file is okay
|
|
135
|
-
* and return true.
|
|
136
|
-
*/
|
|
137
|
-
isTemplateForEngine({ pathParts, config }) {
|
|
138
|
-
try {
|
|
139
|
-
if (!config) {
|
|
140
|
-
throw new Error("No configuration so can't determine engines.");
|
|
141
|
-
}
|
|
142
|
-
const srcPath = pathParts.join(path.sep);
|
|
143
|
-
const engineAndType = this.engineAndTypeFromfilePath({ filePath: srcPath });
|
|
144
|
-
// if the file doesn't have an extension return true
|
|
145
|
-
if (!engineAndType.type || !engineAndType.engine)
|
|
146
|
-
return true;
|
|
147
|
-
const configuredEngine = config.engines[engineAndType.type];
|
|
148
|
-
// if we haven't explicitly declared an engine, assume it's okay
|
|
149
|
-
if (!configuredEngine)
|
|
150
|
-
return true;
|
|
151
|
-
// ok we have a configured engine and a file engine so
|
|
152
|
-
// let's see if they match.
|
|
153
|
-
return configuredEngine === engineAndType.engine;
|
|
154
|
-
}
|
|
155
|
-
catch (e) {
|
|
156
|
-
errorHandler('isTemplateForEngine()', e);
|
|
157
|
-
process.exit(1);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Like the function above, but doesn't change the name of the extension.
|
|
162
|
-
*/
|
|
163
|
-
writeSourcePath({ pathParts = [] }) {
|
|
164
|
-
return pathParts.join(path.sep);
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Given a path of ./foo.bar.baz of the schema ./foo.<type>.<engine>, rewrite
|
|
168
|
-
* the destination path to only use the engine extension. For example,
|
|
169
|
-
*
|
|
170
|
-
* foo.css.less would be rewritten to be foo.less.
|
|
171
|
-
*/
|
|
172
|
-
rewriteDestinationPathForEngine({ pathParts = [], config }) {
|
|
173
|
-
try {
|
|
174
|
-
const destPath = pathParts.join(path.sep);
|
|
175
|
-
const fileType = this.engineAndTypeFromfilePath({ filePath: destPath }).type;
|
|
176
|
-
// get the engine from config for the given type
|
|
177
|
-
const engine = config?.engines[fileType];
|
|
178
|
-
// replace everything after the file type with the new
|
|
179
|
-
// engine extensions
|
|
180
|
-
const replaceTypeWithEngineRe = new RegExp('\\.' + fileType + '\\S*$');
|
|
181
|
-
if (!fileType || !engine) {
|
|
182
|
-
return destPath;
|
|
183
|
-
}
|
|
184
|
-
else {
|
|
185
|
-
return destPath.replace(replaceTypeWithEngineRe, '.' + engine);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
catch (e) {
|
|
189
|
-
errorHandler('rewriteDestinationPathForEngine()', e);
|
|
190
|
-
process.exit(1);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* If we have a srcPath of foo/bar.js and an engine for js that maps to typescript,
|
|
195
|
-
* then rewrite the path to foo/bar.js.ts.
|
|
196
|
-
*
|
|
197
|
-
* The schema for templates looks like this:
|
|
198
|
-
*
|
|
199
|
-
* <template-name>.<type>[.<engine>]
|
|
200
|
-
*
|
|
201
|
-
* You should omit the engine in the template file name if it's the same as the
|
|
202
|
-
* type. So instead of mytemplate.js.js you would just create mytemplate.js and
|
|
203
|
-
* it's assumed that the engine is js.
|
|
204
|
-
*
|
|
205
|
-
* The path paramter to this function is automatically adjusted to look for the
|
|
206
|
-
* template file for the configured engine. For example, if your js engine is
|
|
207
|
-
* 'typescript' then a src path of '/path/to/template.js' will be translated to
|
|
208
|
-
* '/path/to/template.js.ts'.
|
|
209
|
-
*
|
|
210
|
-
*/
|
|
211
|
-
rewriteSourcePathForEngine({ pathParts = [], framework = 'meteor', config }) {
|
|
212
|
-
try {
|
|
213
|
-
// Join and normalize the path parts to remove redundant slashes
|
|
214
|
-
const srcPath = path.normalize(pathParts.join(path.sep));
|
|
215
|
-
// Ensure the original path ends with '.js'
|
|
216
|
-
if (!srcPath.endsWith('.js')) {
|
|
217
|
-
return srcPath;
|
|
218
|
-
}
|
|
219
|
-
const fileType = 'js'; // Set file type as js
|
|
220
|
-
if (!config?.engines || !config?.engines[fileType]) {
|
|
221
|
-
return srcPath;
|
|
222
|
-
}
|
|
223
|
-
const engine = config.engines[fileType];
|
|
224
|
-
// Define the order of extensions to try based on the engine
|
|
225
|
-
const extensionsToTry = engine === 'tsx' ? ['.js.tsx', '.js.ts', '.js'] : ['.js.jsx', '.js'];
|
|
226
|
-
for (const extension of extensionsToTry) {
|
|
227
|
-
const newPath = srcPath.replace(/\.js$/, extension);
|
|
228
|
-
const srcDirPath = path.join('templates', framework, newPath);
|
|
229
|
-
const fullPath = path.normalize(path.join(global.MAKA_COMMAND_PATH, srcDirPath));
|
|
230
|
-
// Check if the file with the current extension exists
|
|
231
|
-
if (fs.existsSync(fullPath)) {
|
|
232
|
-
return newPath;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
return srcPath;
|
|
236
|
-
}
|
|
237
|
-
catch (e) {
|
|
238
|
-
errorHandler('rewriteSourcePathForEngine()', e);
|
|
239
|
-
process.exit(1);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Returns a path relative to lib/templates, with the source path
|
|
244
|
-
* rewritten to use the appropriate engine. See the rewriteSourcePathForEngine
|
|
245
|
-
* method above.
|
|
246
|
-
*/
|
|
247
|
-
pathFromTemplates({ pathParts, framework = 'meteor', config }) {
|
|
248
|
-
try {
|
|
249
|
-
const srcPath = this.rewriteSourcePathForEngine({ pathParts, framework, config });
|
|
250
|
-
const srcDirPath = path.join(`src/templates/${framework}`, srcPath);
|
|
251
|
-
const templatePath = path.join(global.MAKA_COMMAND_PATH, '..', srcDirPath);
|
|
252
|
-
return templatePath;
|
|
253
|
-
}
|
|
254
|
-
catch (e) {
|
|
255
|
-
errorHandler('pathFromTemplates()', e);
|
|
256
|
-
process.exit(1);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
/**
|
|
260
|
-
* Returns a compiled template from srcPath using the ejs templating.
|
|
261
|
-
* A data context can be passed as the last parameter. This function
|
|
262
|
-
* lets us get a compiled template result without writing to a file. It
|
|
263
|
-
* can be useful when you want to inject some template content into an
|
|
264
|
-
* existing file, for example.
|
|
265
|
-
*/
|
|
266
|
-
templateContent({ srcPath, context, framework, config }) {
|
|
267
|
-
try {
|
|
268
|
-
let tmplpath = this.pathFromTemplates({ pathParts: [srcPath], framework, config });
|
|
269
|
-
const { engine } = this.engineAndTypeFromfilePath({ filePath: tmplpath });
|
|
270
|
-
const ejsFileType = [
|
|
271
|
-
'css',
|
|
272
|
-
'scss',
|
|
273
|
-
'less',
|
|
274
|
-
'html',
|
|
275
|
-
'js',
|
|
276
|
-
'jsx',
|
|
277
|
-
'ts',
|
|
278
|
-
'tsx',
|
|
279
|
-
'json',
|
|
280
|
-
'env',
|
|
281
|
-
'yaml',
|
|
282
|
-
'template'
|
|
283
|
-
];
|
|
284
|
-
const imageFileTypes = [
|
|
285
|
-
'png',
|
|
286
|
-
'ico'
|
|
287
|
-
];
|
|
288
|
-
if (!this.fsi.isFile(tmplpath)) {
|
|
289
|
-
if (engine === 'jsx') {
|
|
290
|
-
tmplpath = tmplpath.replace('.jsx', '');
|
|
291
|
-
}
|
|
292
|
-
if (engine === 'tsx') {
|
|
293
|
-
tmplpath = tmplpath.replace('.tsx', '');
|
|
294
|
-
}
|
|
295
|
-
if (!this.fsi.isFile(tmplpath)) {
|
|
296
|
-
throw new Error("Couldn't find a source template in " + JSON.stringify(tmplpath));
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
const tmplPathParts = tmplpath.split('.');
|
|
300
|
-
const pathParts = path.normalize(tmplpath).split(path.sep);
|
|
301
|
-
const isDockerfile = pathParts[pathParts.length - 1] === 'Dockerfile';
|
|
302
|
-
const isImage = imageFileTypes.includes(tmplPathParts[tmplPathParts.length - 1]);
|
|
303
|
-
const contents = fs.readFileSync(tmplpath);
|
|
304
|
-
if (isDockerfile) {
|
|
305
|
-
return ejs.render(contents.toString(), context).trim();
|
|
306
|
-
}
|
|
307
|
-
if (isImage) {
|
|
308
|
-
// convert binary data to base64 encoded string
|
|
309
|
-
return Buffer.from(contents).toString('base64');
|
|
310
|
-
}
|
|
311
|
-
if (!ejsFileType.includes(tmplPathParts[tmplPathParts.length - 1])) {
|
|
312
|
-
return contents.toString().trim();
|
|
313
|
-
}
|
|
314
|
-
return ejs.render(contents.toString(), context || {}).trim();
|
|
315
|
-
}
|
|
316
|
-
catch (e) {
|
|
317
|
-
errorHandler('templateContent()', e);
|
|
318
|
-
process.exit(1);
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
/**
|
|
322
|
-
* Compile and write an ejs template from the srcPath to the destPath. The
|
|
323
|
-
* destPath is rewritten for the given engine. For example, if your js
|
|
324
|
-
* engine is 'coffee' then '/path/to/dest.js' will be rewritten to
|
|
325
|
-
* 'path/to/dest.coffee'
|
|
326
|
-
*/
|
|
327
|
-
async template({ srcPath, destPath, context, config, framework, force = false, ignore = false }) {
|
|
328
|
-
try {
|
|
329
|
-
const imageFileTypes = [
|
|
330
|
-
'png',
|
|
331
|
-
'ico'
|
|
332
|
-
];
|
|
333
|
-
const isImage = imageFileTypes.includes(srcPath.split('.').pop() || '');
|
|
334
|
-
const renderedTemplate = this.templateContent({ srcPath, context, framework, config }) + '\n';
|
|
335
|
-
if (context?.noRename) {
|
|
336
|
-
destPath = this.rewriteDestinationPathForType({ pathParts: [destPath], config });
|
|
337
|
-
}
|
|
338
|
-
else {
|
|
339
|
-
destPath = this.rewriteDestinationPathForEngine({ pathParts: [destPath], config });
|
|
340
|
-
}
|
|
341
|
-
const ret = await this.fsi.createFile({
|
|
342
|
-
filePath: destPath,
|
|
343
|
-
data: renderedTemplate,
|
|
344
|
-
opts: { force, isImage, absolute: false, ignore }
|
|
345
|
-
});
|
|
346
|
-
return ret;
|
|
347
|
-
}
|
|
348
|
-
catch (e) {
|
|
349
|
-
errorHandler('template()', e);
|
|
350
|
-
process.exit(1);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
/**
|
|
354
|
-
* Recursively copies a template directory (from the lib/templates directory) to
|
|
355
|
-
* the dest path following these rules:
|
|
356
|
-
*
|
|
357
|
-
* 1. All folders in the srcPath are copied to destPath, building the folder
|
|
358
|
-
* hierarchy as needed.
|
|
359
|
-
* 2. Files matching the current engines (e.g. html/jade, js/coffee,
|
|
360
|
-
* css/scss/less) are copied. Files not matching any current engines are
|
|
361
|
-
* ignored.
|
|
362
|
-
* 3. All files are compiled through ejs with the data context optionally
|
|
363
|
-
* provided as a last parameter.
|
|
364
|
-
* 4. ignore accepts an array of strings which will match files with relative
|
|
365
|
-
* paths to the app folder to ignore.
|
|
366
|
-
*/
|
|
367
|
-
async copyTemplateDirectory({ srcPath, destPath, context, ignore, keep, framework, config }) {
|
|
368
|
-
try {
|
|
369
|
-
const fullSourcePath = this.pathFromTemplates({ pathParts: [srcPath], framework, config });
|
|
370
|
-
const withoutTemplatePathParts = this.pathFromTemplates({ pathParts: [], framework, config });
|
|
371
|
-
const withoutTemplatePath = (fullpath) => {
|
|
372
|
-
return fullpath.replace(withoutTemplatePathParts, '');
|
|
373
|
-
};
|
|
374
|
-
const todestPath = (src) => {
|
|
375
|
-
return src.replace(fullSourcePath, destPath);
|
|
376
|
-
};
|
|
377
|
-
// first create the destination directory
|
|
378
|
-
await this.fsi.createDirectory({ dirPath: destPath });
|
|
379
|
-
const dirEntries = fs.readdirSync(fullSourcePath);
|
|
380
|
-
for (const srcEntryName of dirEntries) {
|
|
381
|
-
try {
|
|
382
|
-
const fullEntryPath = path.join(fullSourcePath, srcEntryName);
|
|
383
|
-
const relsrcPath = withoutTemplatePath(fullEntryPath);
|
|
384
|
-
const destPath = todestPath(fullEntryPath);
|
|
385
|
-
// Normalize paths for comparison
|
|
386
|
-
const normalizedIgnorePaths = ignore.map(p => path.normalize(p));
|
|
387
|
-
const normalizedEntryPath = path.normalize(path.join(srcPath, srcEntryName));
|
|
388
|
-
if (normalizedIgnorePaths.includes(normalizedEntryPath)) {
|
|
389
|
-
continue; // Use continue instead of return for the for...of loop
|
|
390
|
-
}
|
|
391
|
-
if (this.fsi.isDirectory(fullEntryPath)) {
|
|
392
|
-
await this.copyTemplateDirectory({
|
|
393
|
-
srcPath: relsrcPath,
|
|
394
|
-
destPath,
|
|
395
|
-
context,
|
|
396
|
-
ignore,
|
|
397
|
-
keep,
|
|
398
|
-
framework,
|
|
399
|
-
config
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
else if (this.fsi.isFile(fullEntryPath) && this.isTemplateForEngine({ pathParts: [fullEntryPath], config })) {
|
|
403
|
-
await this.template({
|
|
404
|
-
srcPath: relsrcPath,
|
|
405
|
-
destPath,
|
|
406
|
-
context,
|
|
407
|
-
framework,
|
|
408
|
-
config
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
else if (keep.indexOf(path.join(srcPath, srcEntryName)) >= 0 && this.fsi.isFile(fullEntryPath)) {
|
|
412
|
-
context.noRename = true;
|
|
413
|
-
await this.template({
|
|
414
|
-
srcPath: relsrcPath, destPath, context, framework, config
|
|
415
|
-
});
|
|
416
|
-
context.noRename = false;
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
catch (e) {
|
|
420
|
-
console.error(e);
|
|
421
|
-
process.exit(1);
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
catch (e) {
|
|
426
|
-
errorHandler('copyTemplateDirectory()', e);
|
|
427
|
-
process.exit(1);
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* Inject content at the top of a file. If the file
|
|
432
|
-
* doesn't exist yet, create it. If the content already exists,
|
|
433
|
-
* do not inject it again.
|
|
434
|
-
*/
|
|
435
|
-
async injectAtBeginningOfFile({ filePath, content, opts }) {
|
|
436
|
-
if (!filePath) {
|
|
437
|
-
throw new Error('No filePath provided to injectAtBeginningOfFile()');
|
|
438
|
-
}
|
|
439
|
-
try {
|
|
440
|
-
if (!this.fsi.isFile(filePath)) {
|
|
441
|
-
await this.fsi.createFile({
|
|
442
|
-
filePath,
|
|
443
|
-
data: content
|
|
444
|
-
});
|
|
445
|
-
}
|
|
446
|
-
else {
|
|
447
|
-
let fileContent = fs.readFileSync(filePath, 'utf8');
|
|
448
|
-
// Check if the content already exists in the file
|
|
449
|
-
if (!fileContent.includes(content)) {
|
|
450
|
-
fileContent = content + "\n" + fileContent;
|
|
451
|
-
fs.writeFileSync(filePath, fileContent);
|
|
452
|
-
}
|
|
453
|
-
if (opts?.verbose) {
|
|
454
|
-
Log.header(`${treeSymbol} updated file ${path.relative(process.cwd(), filePath)}`);
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
catch (e) {
|
|
459
|
-
errorHandler('injectAtBeginningOfFile()', e);
|
|
460
|
-
process.exit(1);
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
/**
|
|
464
|
-
* Inject content at the end of the file. If the file
|
|
465
|
-
* doesn't exist yet, create it. If the content already exists,
|
|
466
|
-
* do not inject it again.
|
|
467
|
-
*/
|
|
468
|
-
async injectAtEndOfFile({ filePath, content, opts }) {
|
|
469
|
-
try {
|
|
470
|
-
if (!this.fsi.isFile(filePath)) {
|
|
471
|
-
await this.fsi.createFile({
|
|
472
|
-
filePath,
|
|
473
|
-
data: content
|
|
474
|
-
});
|
|
475
|
-
}
|
|
476
|
-
else {
|
|
477
|
-
let fileContent = fs.readFileSync(filePath, 'utf8');
|
|
478
|
-
// Check if the content already exists in the file
|
|
479
|
-
if (!fileContent.includes(content)) {
|
|
480
|
-
fileContent = fileContent + '\n' + content;
|
|
481
|
-
fs.writeFileSync(filePath, fileContent);
|
|
482
|
-
}
|
|
483
|
-
if (opts?.verbose) {
|
|
484
|
-
Log.header(`${treeSymbol} updated file ${path.relative(process.cwd(), filePath)}`);
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
catch (e) {
|
|
489
|
-
errorHandler('injectAtEndOfFile()', e);
|
|
490
|
-
process.exit(1);
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
/**
|
|
494
|
-
* Inject content around a specified target string or strings in a file, matching and adjusting the file's indentation,
|
|
495
|
-
* but only if the content is not already present. Allows separate adjustment of the target line's indentation.
|
|
496
|
-
*/
|
|
497
|
-
async injectAroundString({ filePath, aboveContent, belowContent, targetString, indentAdjustment = 0, targetIndentAdjustment = 0 }) {
|
|
498
|
-
try {
|
|
499
|
-
if (!this.fsi.isFile(filePath)) {
|
|
500
|
-
throw Log.error("No file found at path " + JSON.stringify(filePath));
|
|
501
|
-
}
|
|
502
|
-
const raw = fs.readFileSync(filePath, 'utf8');
|
|
503
|
-
// Normalize line endings in the file content
|
|
504
|
-
const normalizedRaw = raw.replace(/\r\n|\r/g, '\n');
|
|
505
|
-
const lines = normalizedRaw.split('\n');
|
|
506
|
-
// Detect the most common indentation
|
|
507
|
-
const indent = this.detectIndentation(lines);
|
|
508
|
-
// Split and normalize the above and below content into lines without indentation
|
|
509
|
-
const aboveContentLines = aboveContent.replace(/\r\n|\r/g, '\n').split('\n');
|
|
510
|
-
const belowContentLines = belowContent.replace(/\r\n|\r/g, '\n').split('\n');
|
|
511
|
-
// Build the target regular expression
|
|
512
|
-
const targetRegExp = new RegExp(Array.isArray(targetString) ? targetString.join('|') : targetString, 'i');
|
|
513
|
-
const newLines = [];
|
|
514
|
-
for (let i = 0; i < lines.length; i++) {
|
|
515
|
-
const line = lines[i];
|
|
516
|
-
if (targetRegExp.test(line)) {
|
|
517
|
-
// Adjust the indentation for the target line
|
|
518
|
-
const adjustedTargetIndent = this.adjustIndentation(indent, targetIndentAdjustment);
|
|
519
|
-
const adjustedTargetLine = adjustedTargetIndent + line.trim();
|
|
520
|
-
// Check and inject aboveContentLines if not present
|
|
521
|
-
aboveContentLines.forEach(aboveLine => {
|
|
522
|
-
if (!normalizedRaw.includes(aboveLine.trim())) {
|
|
523
|
-
newLines.push(this.adjustIndentation(indent, indentAdjustment) + aboveLine);
|
|
524
|
-
}
|
|
525
|
-
});
|
|
526
|
-
newLines.push(adjustedTargetLine);
|
|
527
|
-
// Check and inject belowContentLines if not present
|
|
528
|
-
belowContentLines.forEach(belowLine => {
|
|
529
|
-
if (!normalizedRaw.includes(belowLine.trim())) {
|
|
530
|
-
newLines.push(this.adjustIndentation(indent, indentAdjustment) + belowLine);
|
|
531
|
-
}
|
|
532
|
-
});
|
|
533
|
-
}
|
|
534
|
-
else {
|
|
535
|
-
newLines.push(line);
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
const newContent = newLines.join('\n');
|
|
539
|
-
// Write the modified content back to the file
|
|
540
|
-
fs.writeFileSync(filePath, newContent);
|
|
541
|
-
Log.header(`${treeSymbol} updated file ${path.relative(process.cwd(), filePath)}`);
|
|
542
|
-
}
|
|
543
|
-
catch (e) {
|
|
544
|
-
errorHandler('injectAroundString()', e);
|
|
545
|
-
process.exit(1);
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
/**
|
|
549
|
-
* Adjusts the detected indentation by the specified amount.
|
|
550
|
-
*/
|
|
551
|
-
adjustIndentation(indent, adjustment) {
|
|
552
|
-
if (adjustment === 0)
|
|
553
|
-
return indent;
|
|
554
|
-
const indentLength = indent.length + adjustment;
|
|
555
|
-
return indentLength > 0 ? indent[0].repeat(indentLength) : '';
|
|
556
|
-
}
|
|
557
|
-
/**
|
|
558
|
-
* Detects the most common indentation in the file.
|
|
559
|
-
*/
|
|
560
|
-
detectIndentation(lines) {
|
|
561
|
-
let spaceCount = 0;
|
|
562
|
-
let tabCount = 0;
|
|
563
|
-
lines.forEach(line => {
|
|
564
|
-
if (line.startsWith(' ')) {
|
|
565
|
-
spaceCount++;
|
|
566
|
-
}
|
|
567
|
-
else if (line.startsWith('\t')) {
|
|
568
|
-
tabCount++;
|
|
569
|
-
}
|
|
570
|
-
});
|
|
571
|
-
// Determine the most common indentation type
|
|
572
|
-
const commonIndentType = spaceCount >= tabCount ? ' ' : '\t';
|
|
573
|
-
// Find the most common number of indent characters in lines with the common indent type
|
|
574
|
-
const indentSize = this.getCommonIndentSize(lines, commonIndentType);
|
|
575
|
-
return commonIndentType.repeat(indentSize);
|
|
576
|
-
}
|
|
577
|
-
/**
|
|
578
|
-
* Finds the most common number of indent characters of a given type in the lines.
|
|
579
|
-
*/
|
|
580
|
-
getCommonIndentSize(lines, indentType) {
|
|
581
|
-
const indentSizes = lines
|
|
582
|
-
.filter(line => line && line.startsWith(indentType)) // Check if the line is defined and starts with the indent type
|
|
583
|
-
.map(line => {
|
|
584
|
-
const match = line.match(new RegExp(`^${indentType}+`));
|
|
585
|
-
return match ? match[0].length : 0; // Return the length of the match or 0 if no match
|
|
586
|
-
});
|
|
587
|
-
// If there are no indent sizes, default to 0
|
|
588
|
-
if (indentSizes.length === 0) {
|
|
589
|
-
return 0;
|
|
590
|
-
}
|
|
591
|
-
// Calculate the most common indent size
|
|
592
|
-
return this.calculateMode(indentSizes);
|
|
593
|
-
}
|
|
594
|
-
/**
|
|
595
|
-
* Calculates the mode (most frequent value) in an array.
|
|
596
|
-
*/
|
|
597
|
-
calculateMode(array) {
|
|
598
|
-
const frequencyMap = array.reduce((acc, val) => {
|
|
599
|
-
acc[val] = (acc[val] || 0) + 1;
|
|
600
|
-
return acc;
|
|
601
|
-
}, {});
|
|
602
|
-
return Object.keys(frequencyMap).reduce((a, b) => {
|
|
603
|
-
const freqA = frequencyMap[+a];
|
|
604
|
-
const freqB = frequencyMap[+b];
|
|
605
|
-
return freqA > freqB ? +a : +b;
|
|
606
|
-
}, 0);
|
|
607
|
-
}
|
|
608
|
-
/**
|
|
609
|
-
* Inject content into a specific section of a file, defined by start pattern(s), but only if the content doesn't already exist.
|
|
610
|
-
*/
|
|
611
|
-
async injectIntoCodeBlock({ filePath, content, begin, replace = false }) {
|
|
612
|
-
try {
|
|
613
|
-
if (!this.fsi.isFile(filePath)) {
|
|
614
|
-
throw new Error("File not found: " + filePath);
|
|
615
|
-
}
|
|
616
|
-
const raw = fs.readFileSync(filePath, 'utf8');
|
|
617
|
-
const lines = raw.split('\n');
|
|
618
|
-
let startIndex = -1;
|
|
619
|
-
let endIndex = -1;
|
|
620
|
-
let braceCount = 0;
|
|
621
|
-
let insideTargetBlock = false;
|
|
622
|
-
let contentAlreadyExists = false;
|
|
623
|
-
const beginPatterns = Array.isArray(begin) ? begin : [begin]; // Ensure begin is an array
|
|
624
|
-
// Locate the start index and check if content already exists
|
|
625
|
-
for (let i = 0; i < lines.length; i++) {
|
|
626
|
-
const line = lines[i];
|
|
627
|
-
if (insideTargetBlock && line.includes('{')) {
|
|
628
|
-
braceCount++;
|
|
629
|
-
}
|
|
630
|
-
// Check for any of the begin patterns
|
|
631
|
-
if (beginPatterns.some(pattern => line.includes(pattern))) {
|
|
632
|
-
startIndex = i;
|
|
633
|
-
insideTargetBlock = true;
|
|
634
|
-
braceCount++; // Start counting braces from the function start
|
|
635
|
-
continue; // Skip the line with the begin pattern
|
|
636
|
-
}
|
|
637
|
-
if (insideTargetBlock) {
|
|
638
|
-
// Check if the content already exists in the target block
|
|
639
|
-
if (line.includes(content.trim())) {
|
|
640
|
-
contentAlreadyExists = true;
|
|
641
|
-
}
|
|
642
|
-
if (line.includes('}')) {
|
|
643
|
-
braceCount--;
|
|
644
|
-
if (braceCount === 0) {
|
|
645
|
-
endIndex = i; // Include the line with the closing brace
|
|
646
|
-
break;
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
if (startIndex === -1 || endIndex === -1) {
|
|
652
|
-
Log.error(`Unable to find the target block to inject content in ${filePath}`);
|
|
653
|
-
Log.error(`While injecting ${content}`);
|
|
654
|
-
Log.error(`Looking for ${begin}`);
|
|
655
|
-
throw new Error("Unable to find the target block to inject content.");
|
|
656
|
-
}
|
|
657
|
-
// If content already exists, skip the replacement
|
|
658
|
-
if (contentAlreadyExists) {
|
|
659
|
-
return;
|
|
660
|
-
}
|
|
661
|
-
// Construct new content
|
|
662
|
-
let newContent = lines.slice(0, startIndex + 1);
|
|
663
|
-
if (replace) {
|
|
664
|
-
newContent.push(content.trim());
|
|
665
|
-
newContent.push(lines[endIndex]); // Add the line with the closing brace
|
|
666
|
-
}
|
|
667
|
-
else {
|
|
668
|
-
newContent = newContent.concat(lines.slice(startIndex + 1, endIndex));
|
|
669
|
-
newContent.push(content.trim());
|
|
670
|
-
}
|
|
671
|
-
newContent = newContent.concat(lines.slice(endIndex + 1));
|
|
672
|
-
fs.writeFileSync(filePath, newContent.join('\n'), 'utf8');
|
|
673
|
-
}
|
|
674
|
-
catch (e) {
|
|
675
|
-
console.error("Error in injectIntoCodeBlock: ", e);
|
|
676
|
-
throw e;
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
/**
|
|
680
|
-
* Inject content at the end of the section which begins with the 'begin'
|
|
681
|
-
* parameter and ends with 'end' parameter. The begin and end parameters
|
|
682
|
-
* should be regular expressions.
|
|
683
|
-
*/
|
|
684
|
-
async injectIntoFile({ filePath, content, begin, end, replace = false }) {
|
|
685
|
-
try {
|
|
686
|
-
const alreadyInjected = await this.fsi.fileContainsString(filePath, content);
|
|
687
|
-
if (alreadyInjected)
|
|
688
|
-
return;
|
|
689
|
-
if (!this.fsi.isFile(filePath)) {
|
|
690
|
-
throw Log.error("No file found to inject content into at path " + JSON.stringify(filePath));
|
|
691
|
-
}
|
|
692
|
-
const raw = fs.readFileSync(filePath, 'utf8');
|
|
693
|
-
if (!Array.isArray(begin))
|
|
694
|
-
begin = [begin];
|
|
695
|
-
if (!Array.isArray(end))
|
|
696
|
-
end = [end];
|
|
697
|
-
let modifiedContent = raw;
|
|
698
|
-
let found = false;
|
|
699
|
-
for (const b of begin) {
|
|
700
|
-
for (const e of end) {
|
|
701
|
-
// Creating a regex to find the block where the content needs to be inserted
|
|
702
|
-
const re = new RegExp(`(${b}[\\s\\S]*?)(${e})`, 'i');
|
|
703
|
-
modifiedContent = raw.replace(re, (match, p1, p2) => {
|
|
704
|
-
found = true;
|
|
705
|
-
return replace ? `${p1}${content}${p2}` : `${p1}${content}\n${p2}`;
|
|
706
|
-
});
|
|
707
|
-
if (found)
|
|
708
|
-
break;
|
|
709
|
-
}
|
|
710
|
-
if (found)
|
|
711
|
-
break;
|
|
712
|
-
}
|
|
713
|
-
if (!found) {
|
|
714
|
-
throw new Error("No matching section found.");
|
|
715
|
-
}
|
|
716
|
-
fs.writeFileSync(filePath, modifiedContent);
|
|
717
|
-
Log.header(`${treeSymbol} updated file ${path.relative(process.cwd(), filePath)}`);
|
|
718
|
-
}
|
|
719
|
-
catch (e) {
|
|
720
|
-
errorHandler('injectIntoFile()', e);
|
|
721
|
-
process.exit(1);
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
/**
|
|
725
|
-
* Inject content at the end of the section which begins with the 'begin'
|
|
726
|
-
* parameter and ends with 'end' parameter. The begin and end parameters
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
* Injects a new import at the specified position of all the imports in a JS file.
|
|
730
|
-
*/
|
|
731
|
-
async injectImport({ filePath, importName, modulePath, isNamedExport, injectAtStart = false }) {
|
|
732
|
-
try {
|
|
733
|
-
const content = fs.readFileSync(filePath, 'utf8');
|
|
734
|
-
let newImport;
|
|
735
|
-
if (isNamedExport) {
|
|
736
|
-
newImport = `import { ${importName} } from '${modulePath}';\n`;
|
|
737
|
-
}
|
|
738
|
-
else {
|
|
739
|
-
newImport = `import ${importName} from '${modulePath}';\n`;
|
|
740
|
-
}
|
|
741
|
-
const lines = content.split('\n');
|
|
742
|
-
let importInsertionIndex = 0;
|
|
743
|
-
let alreadyImported = false;
|
|
744
|
-
// Check if the import already exists in the file
|
|
745
|
-
for (const line of lines) {
|
|
746
|
-
if (line.includes(`from '${modulePath}'`) || line.includes(`from "${modulePath}"`)) {
|
|
747
|
-
const importRegex = isNamedExport ? new RegExp(`\\b${importName}\\b`, 'g') : new RegExp(`import ${importName} from`);
|
|
748
|
-
if (line.match(importRegex)) {
|
|
749
|
-
alreadyImported = true;
|
|
750
|
-
break;
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
if (alreadyImported)
|
|
755
|
-
return;
|
|
756
|
-
if (injectAtStart) {
|
|
757
|
-
// Find the first import line number in the file
|
|
758
|
-
for (let i = 0; i < lines.length; i++) {
|
|
759
|
-
if (lines[i].match(/^import .* from .*;$/)) {
|
|
760
|
-
importInsertionIndex = i;
|
|
761
|
-
break;
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
else {
|
|
766
|
-
// Find the last import line number in the file
|
|
767
|
-
for (let i = 0; i < lines.length; i++) {
|
|
768
|
-
if (lines[i].match(/^import .* from .*;$/)) {
|
|
769
|
-
importInsertionIndex = i;
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
importInsertionIndex++; // Increment to insert after the last import
|
|
773
|
-
}
|
|
774
|
-
// Insert the new import at the determined position
|
|
775
|
-
lines.splice(importInsertionIndex, 0, newImport);
|
|
776
|
-
const updatedContent = lines.join('\n');
|
|
777
|
-
fs.writeFileSync(filePath, updatedContent, 'utf8');
|
|
778
|
-
}
|
|
779
|
-
catch (e) {
|
|
780
|
-
errorHandler('injectImport()', e);
|
|
781
|
-
process.exit(1);
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
async injectTemplateModule(resourceName, projectConfig, modulePath) {
|
|
785
|
-
try {
|
|
786
|
-
// Determine the template path based on the project configuration
|
|
787
|
-
let templateBasePath;
|
|
788
|
-
if (projectConfig.engines.ssr !== 'none') {
|
|
789
|
-
templateBasePath = this.pathFromApp({ pathParts: ['imports', 'startup', 'lib', 'templates.js'], config: projectConfig });
|
|
790
|
-
}
|
|
791
|
-
else {
|
|
792
|
-
templateBasePath = this.pathFromApp({ pathParts: ['imports', 'startup', 'client', 'templates.js'], config: projectConfig });
|
|
793
|
-
}
|
|
794
|
-
// Rewrite the destination path for the engine
|
|
795
|
-
const templatePath = this.rewriteDestinationPathForEngine({
|
|
796
|
-
pathParts: [templateBasePath],
|
|
797
|
-
config: projectConfig
|
|
798
|
-
});
|
|
799
|
-
const exportString = `export { ${pascalCase(resourceName)} } from '${modulePath}';`;
|
|
800
|
-
// Check if exportString exists in the file, don't inject it again
|
|
801
|
-
const alreadyExported = await this.fsi.fileContainsString(templatePath, exportString);
|
|
802
|
-
if (!alreadyExported) {
|
|
803
|
-
// Inject the module at the end of the file
|
|
804
|
-
this.injectAtEndOfFile({
|
|
805
|
-
filePath: templatePath,
|
|
806
|
-
content: exportString + '\n'
|
|
807
|
-
});
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
catch (e) {
|
|
811
|
-
errorHandler('injectTemplateModule()', e);
|
|
812
|
-
process.exit(1);
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
/**
|
|
816
|
-
* Inject a string into a file after a line number.
|
|
817
|
-
*/
|
|
818
|
-
injectAfterLineNumber({ filePath, content, lineNumber }) {
|
|
819
|
-
try {
|
|
820
|
-
const data = fs.readFileSync(filePath).toString().split("\n");
|
|
821
|
-
data.splice(lineNumber, 0, content);
|
|
822
|
-
const text = data.join('\n');
|
|
823
|
-
fs.writeFileSync(filePath, text);
|
|
824
|
-
}
|
|
825
|
-
catch (e) {
|
|
826
|
-
errorHandler('injectAfterLineNumber()', e);
|
|
827
|
-
process.exit(1);
|
|
828
|
-
}
|
|
829
|
-
}
|
|
830
|
-
/**
|
|
831
|
-
* Returns the absolute path to the given filePath relative to the app
|
|
832
|
-
* directory (e.g. my-project/app/filePath). If no app directory is
|
|
833
|
-
* found the function returns false. Rewrites the source path to use
|
|
834
|
-
* the appropriate engine. See the rewriteSourcePathForEngine method above.
|
|
835
|
-
*/
|
|
836
|
-
pathFromApp({ pathParts, config }) {
|
|
837
|
-
try {
|
|
838
|
-
if (!pathParts) {
|
|
839
|
-
throw new Error('No pathParts option provided');
|
|
840
|
-
}
|
|
841
|
-
const srcPath = this.rewriteSourcePathForEngine({ pathParts, config });
|
|
842
|
-
const appDirectory = this.fsi.findAppDirectory();
|
|
843
|
-
return appDirectory ? path.join(appDirectory, srcPath) : '';
|
|
844
|
-
}
|
|
845
|
-
catch (e) {
|
|
846
|
-
errorHandler('pathFromApp()', e);
|
|
847
|
-
process.exit(1);
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
/**
|
|
851
|
-
* Just like above, but doesn't rewrite the extension.
|
|
852
|
-
*/
|
|
853
|
-
pathFromAppWithNoReWrite({ pathParts, config }) {
|
|
854
|
-
try {
|
|
855
|
-
const srcPath = this.writeSourcePath({ pathParts, config });
|
|
856
|
-
const appDirectory = this.fsi.findAppDirectory();
|
|
857
|
-
if (!appDirectory) {
|
|
858
|
-
throw new Error('No app directory found');
|
|
859
|
-
}
|
|
860
|
-
return path.join(appDirectory, srcPath);
|
|
861
|
-
}
|
|
862
|
-
catch (e) {
|
|
863
|
-
errorHandler('pathFromAppWithNoReWrite()', e);
|
|
864
|
-
process.exit(1);
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
//# sourceMappingURL=scaffold.class.js.map
|