@maka/maka-cli 5.2.6 → 5.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/typescript/package.json +119 -0
- package/bundle/typescript/src/README.md +37 -0
- package/bundle/typescript/src/command.d.ts +37 -0
- package/bundle/typescript/src/command.js +231 -0
- package/bundle/typescript/src/command.js.map +1 -0
- package/bundle/typescript/src/commands/_index.d.ts +26 -0
- package/bundle/typescript/src/commands/_index.js +28 -0
- package/bundle/typescript/src/commands/_index.js.map +1 -0
- package/bundle/typescript/src/commands/ai/_index.d.ts +2 -0
- package/bundle/typescript/src/commands/ai/_index.js +3 -0
- package/bundle/typescript/src/commands/ai/_index.js.map +1 -0
- package/bundle/typescript/src/commands/ai/ai.command.d.ts +3 -0
- package/bundle/typescript/src/commands/ai/ai.command.js +83 -0
- package/bundle/typescript/src/commands/ai/ai.command.js.map +1 -0
- package/bundle/typescript/src/commands/ai/mcp.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/ai/mcp.sub.cmd.js +964 -0
- package/bundle/typescript/src/commands/ai/mcp.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/aws/_index.d.ts +16 -0
- package/bundle/typescript/src/commands/aws/_index.js +17 -0
- package/bundle/typescript/src/commands/aws/_index.js.map +1 -0
- package/bundle/typescript/src/commands/aws/aws.command.d.ts +3 -0
- package/bundle/typescript/src/commands/aws/aws.command.js +15 -0
- package/bundle/typescript/src/commands/aws/aws.command.js.map +1 -0
- package/bundle/typescript/src/commands/aws/cecr.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/aws/cecr.sub.cmd.js +38 -0
- package/bundle/typescript/src/commands/aws/cecr.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/aws/chz.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/aws/chz.sub.cmd.js +41 -0
- package/bundle/typescript/src/commands/aws/chz.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/aws/ci.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/aws/ci.sub.cmd.js +199 -0
- package/bundle/typescript/src/commands/aws/ci.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/aws/ckp.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/aws/ckp.sub.cmd.js +42 -0
- package/bundle/typescript/src/commands/aws/ckp.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/aws/csg.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/aws/csg.sub.cmd.js +43 -0
- package/bundle/typescript/src/commands/aws/csg.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/aws/decr.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/aws/decr.sub.cmd.js +31 -0
- package/bundle/typescript/src/commands/aws/decr.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/aws/di.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/aws/di.sub.cmd.js +35 -0
- package/bundle/typescript/src/commands/aws/di.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/aws/dkp.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/aws/dkp.sub.cmd.js +25 -0
- package/bundle/typescript/src/commands/aws/dkp.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/aws/dsg.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/aws/dsg.sub.cmd.js +57 -0
- package/bundle/typescript/src/commands/aws/dsg.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/aws/lecr.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/aws/lecr.sub.cmd.js +32 -0
- package/bundle/typescript/src/commands/aws/lecr.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/aws/rbi.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/aws/rbi.sub.cmd.js +39 -0
- package/bundle/typescript/src/commands/aws/rbi.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/aws/rdn.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/aws/rdn.sub.cmd.js +104 -0
- package/bundle/typescript/src/commands/aws/rdn.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/aws/rkp.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/aws/rkp.sub.cmd.js +52 -0
- package/bundle/typescript/src/commands/aws/rkp.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/aws/sth.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/aws/sth.sub.cmd.js +74 -0
- package/bundle/typescript/src/commands/aws/sth.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/aws/ti.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/aws/ti.sub.cmd.js +45 -0
- package/bundle/typescript/src/commands/aws/ti.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/build/_index.d.ts +2 -0
- package/bundle/typescript/src/commands/build/_index.js +3 -0
- package/bundle/typescript/src/commands/build/_index.js.map +1 -0
- package/bundle/typescript/src/commands/build/build.d.ts +3 -0
- package/bundle/typescript/src/commands/build/build.js +98 -0
- package/bundle/typescript/src/commands/build/build.js.map +1 -0
- package/bundle/typescript/src/commands/build/docker.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/build/docker.sub.cmd.js +138 -0
- package/bundle/typescript/src/commands/build/docker.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/create.d.ts +1 -0
- package/bundle/typescript/src/commands/create.js +645 -0
- package/bundle/typescript/src/commands/create.js.map +1 -0
- package/bundle/typescript/src/commands/debug.d.ts +1 -0
- package/bundle/typescript/src/commands/debug.js +95 -0
- package/bundle/typescript/src/commands/debug.js.map +1 -0
- package/bundle/typescript/src/commands/deploy/_index.d.ts +3 -0
- package/bundle/typescript/src/commands/deploy/_index.js +4 -0
- package/bundle/typescript/src/commands/deploy/_index.js.map +1 -0
- package/bundle/typescript/src/commands/deploy/deploy.command.d.ts +3 -0
- package/bundle/typescript/src/commands/deploy/deploy.command.js +24 -0
- package/bundle/typescript/src/commands/deploy/deploy.command.js.map +1 -0
- package/bundle/typescript/src/commands/deploy/galaxy.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/deploy/galaxy.sub.cmd.js +152 -0
- package/bundle/typescript/src/commands/deploy/galaxy.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/deploy/ubuntu.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/deploy/ubuntu.sub.cmd.js +543 -0
- package/bundle/typescript/src/commands/deploy/ubuntu.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/game/_index.d.ts +5 -0
- package/bundle/typescript/src/commands/game/_index.js +7 -0
- package/bundle/typescript/src/commands/game/_index.js.map +1 -0
- package/bundle/typescript/src/commands/game/battleship.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/game/battleship.sub.cmd.js +12 -0
- package/bundle/typescript/src/commands/game/battleship.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/game/play.command.d.ts +3 -0
- package/bundle/typescript/src/commands/game/play.command.js +18 -0
- package/bundle/typescript/src/commands/game/play.command.js.map +1 -0
- package/bundle/typescript/src/commands/game/pong.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/game/pong.sub.cmd.js +12 -0
- package/bundle/typescript/src/commands/game/pong.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.d.ts +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.js +26 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/command.d.ts +23 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/command.js +24 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/command.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.d.ts +7 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js +33 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.d.ts +7 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js +69 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.d.ts +7 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js +58 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.d.ts +7 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +63 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/kill.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/kill.js +36 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/kill.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lock.d.ts +8 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lock.js +74 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/lock.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.d.ts +10 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js +137 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/read.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/read.js +26 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/read.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.d.ts +8 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js +31 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +24 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js +23 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/store.d.ts +7 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/store.js +33 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/store.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.d.ts +7 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js +41 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.d.ts +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js +54 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.d.ts +7 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js +53 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.d.ts +7 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js +34 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/command-factory.d.ts +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/command-factory.js +17 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/command-factory.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.d.ts +5 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js +25 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/npc-factory.d.ts +10 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/npc-factory.js +36 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/npc-factory.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.js +24 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js +19 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js +126 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +38 -0
- package/bundle/typescript/src/commands/game/sideQuest/game.js +384 -0
- package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/_index.d.ts +8 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/_index.js +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/_index.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/door.d.ts +23 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/door.js +42 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/door.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/inventory.d.ts +47 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/inventory.js +110 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/inventory.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/item.d.ts +56 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js +145 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.d.ts +36 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +407 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +58 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +357 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.d.ts +34 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js +67 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/room.d.ts +69 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js +246 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.d.ts +72 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +310 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/scenes/_index.d.ts +0 -0
- package/bundle/typescript/src/commands/game/sideQuest/scenes/_index.js +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/scenes/_index.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene1.json +281 -0
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +397 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/enums.d.ts +47 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/enums.js +52 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/enums.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/player-equipment.d.ts +62 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/player-equipment.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/player-equipment.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/exit-seed.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/exit-seed.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/exit-seed.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.d.ts +23 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/lifestyle-seed.d.ts +22 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/lifestyle-seed.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/lifestyle-seed.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/npc-seed.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/npc-seed.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/npc-seed.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/player-seed.d.ts +8 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/player-seed.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/player-seed.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.d.ts +11 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/room-seed.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/room-seed.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/room-seed.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.d.ts +20 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/abstracts.d.ts +152 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/abstracts.js +90 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/abstracts.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/direction-enum.d.ts +8 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/direction-enum.js +10 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/direction-enum.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/equipment-enum.d.ts +25 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/equipment-enum.js +27 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/equipment-enum.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.d.ts +69 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js +80 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/ui.d.ts +7 -0
- package/bundle/typescript/src/commands/game/sideQuest/ui.js +72 -0
- package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.js +67 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/logger.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +68 -0
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/game/snake.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/game/snake.sub.cmd.js +12 -0
- package/bundle/typescript/src/commands/game/snake.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/game/tetris.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/game/tetris.sub.cmd.js +12 -0
- package/bundle/typescript/src/commands/game/tetris.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/generate.d.ts +1 -0
- package/bundle/typescript/src/commands/generate.js +42 -0
- package/bundle/typescript/src/commands/generate.js.map +1 -0
- package/bundle/typescript/src/commands/get/_index.d.ts +4 -0
- package/bundle/typescript/src/commands/get/_index.js +5 -0
- package/bundle/typescript/src/commands/get/_index.js.map +1 -0
- package/bundle/typescript/src/commands/get/get.command.d.ts +3 -0
- package/bundle/typescript/src/commands/get/get.command.js +13 -0
- package/bundle/typescript/src/commands/get/get.command.js.map +1 -0
- package/bundle/typescript/src/commands/get/global.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/get/global.sub.cmd.js +20 -0
- package/bundle/typescript/src/commands/get/global.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/get/local.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/get/local.sub.cmd.js +14 -0
- package/bundle/typescript/src/commands/get/local.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/get/whoami.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/get/whoami.sub.cmd.js +21 -0
- package/bundle/typescript/src/commands/get/whoami.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/help.d.ts +1 -0
- package/bundle/typescript/src/commands/help.js +12 -0
- package/bundle/typescript/src/commands/help.js.map +1 -0
- package/bundle/typescript/src/commands/install.d.ts +1 -0
- package/bundle/typescript/src/commands/install.js +269 -0
- package/bundle/typescript/src/commands/install.js.map +1 -0
- package/bundle/typescript/src/commands/jsdoc.d.ts +1 -0
- package/bundle/typescript/src/commands/jsdoc.js +62 -0
- package/bundle/typescript/src/commands/jsdoc.js.map +1 -0
- package/bundle/typescript/src/commands/lint.d.ts +1 -0
- package/bundle/typescript/src/commands/lint.js +127 -0
- package/bundle/typescript/src/commands/lint.js.map +1 -0
- package/bundle/typescript/src/commands/login.d.ts +1 -0
- package/bundle/typescript/src/commands/login.js +168 -0
- package/bundle/typescript/src/commands/login.js.map +1 -0
- package/bundle/typescript/src/commands/logout.d.ts +1 -0
- package/bundle/typescript/src/commands/logout.js +95 -0
- package/bundle/typescript/src/commands/logout.js.map +1 -0
- package/bundle/typescript/src/commands/logs.d.ts +1 -0
- package/bundle/typescript/src/commands/logs.js +35 -0
- package/bundle/typescript/src/commands/logs.js.map +1 -0
- package/bundle/typescript/src/commands/maka.cmd.d.ts +5 -0
- package/bundle/typescript/src/commands/maka.cmd.js +57 -0
- package/bundle/typescript/src/commands/maka.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/murder.d.ts +1 -0
- package/bundle/typescript/src/commands/murder.js +31 -0
- package/bundle/typescript/src/commands/murder.js.map +1 -0
- package/bundle/typescript/src/commands/profile.d.ts +1 -0
- package/bundle/typescript/src/commands/profile.js +277 -0
- package/bundle/typescript/src/commands/profile.js.map +1 -0
- package/bundle/typescript/src/commands/proxy.d.ts +1 -0
- package/bundle/typescript/src/commands/proxy.js +168 -0
- package/bundle/typescript/src/commands/proxy.js.map +1 -0
- package/bundle/typescript/src/commands/reconfig.d.ts +1 -0
- package/bundle/typescript/src/commands/reconfig.js +69 -0
- package/bundle/typescript/src/commands/reconfig.js.map +1 -0
- package/bundle/typescript/src/commands/register.d.ts +1 -0
- package/bundle/typescript/src/commands/register.js +104 -0
- package/bundle/typescript/src/commands/register.js.map +1 -0
- package/bundle/typescript/src/commands/run/_index.d.ts +2 -0
- package/bundle/typescript/src/commands/run/_index.js +3 -0
- package/bundle/typescript/src/commands/run/_index.js.map +1 -0
- package/bundle/typescript/src/commands/run/docker.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/run/docker.sub.cmd.js +82 -0
- package/bundle/typescript/src/commands/run/docker.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/run/run.command.d.ts +3 -0
- package/bundle/typescript/src/commands/run/run.command.js +200 -0
- package/bundle/typescript/src/commands/run/run.command.js.map +1 -0
- package/bundle/typescript/src/commands/set/_index.d.ts +3 -0
- package/bundle/typescript/src/commands/set/_index.js +4 -0
- package/bundle/typescript/src/commands/set/_index.js.map +1 -0
- package/bundle/typescript/src/commands/set/global.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/set/global.sub.cmd.js +129 -0
- package/bundle/typescript/src/commands/set/global.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/set/local.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/set/local.sub.cmd.js +18 -0
- package/bundle/typescript/src/commands/set/local.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/set/set.command.d.ts +3 -0
- package/bundle/typescript/src/commands/set/set.command.js +16 -0
- package/bundle/typescript/src/commands/set/set.command.js.map +1 -0
- package/bundle/typescript/src/commands/ssh.d.ts +1 -0
- package/bundle/typescript/src/commands/ssh.js +43 -0
- package/bundle/typescript/src/commands/ssh.js.map +1 -0
- package/bundle/typescript/src/commands/ssl.d.ts +1 -0
- package/bundle/typescript/src/commands/ssl.js +109 -0
- package/bundle/typescript/src/commands/ssl.js.map +1 -0
- package/bundle/typescript/src/commands/testCmd/_index.d.ts +3 -0
- package/bundle/typescript/src/commands/testCmd/_index.js +4 -0
- package/bundle/typescript/src/commands/testCmd/_index.js.map +1 -0
- package/bundle/typescript/src/commands/testCmd/jest.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/testCmd/jest.sub.cmd.js +131 -0
- package/bundle/typescript/src/commands/testCmd/jest.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/testCmd/mocha.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/testCmd/mocha.sub.cmd.js +133 -0
- package/bundle/typescript/src/commands/testCmd/mocha.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/testCmd/test.command.d.ts +3 -0
- package/bundle/typescript/src/commands/testCmd/test.command.js +15 -0
- package/bundle/typescript/src/commands/testCmd/test.command.js.map +1 -0
- package/bundle/typescript/src/commands/undo.d.ts +1 -0
- package/bundle/typescript/src/commands/undo.js +12 -0
- package/bundle/typescript/src/commands/undo.js.map +1 -0
- package/bundle/typescript/src/commands/uninstall.d.ts +1 -0
- package/bundle/typescript/src/commands/uninstall.js +76 -0
- package/bundle/typescript/src/commands/uninstall.js.map +1 -0
- package/bundle/typescript/src/commands/version/_index.d.ts +4 -0
- package/bundle/typescript/src/commands/version/_index.js +5 -0
- package/bundle/typescript/src/commands/version/_index.js.map +1 -0
- package/bundle/typescript/src/commands/version/list.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/version/list.sub.cmd.js +55 -0
- package/bundle/typescript/src/commands/version/list.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/version/meteor.sub.cmd.d.ts +3 -0
- package/bundle/typescript/src/commands/version/meteor.sub.cmd.js +21 -0
- package/bundle/typescript/src/commands/version/meteor.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/version/use.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/version/use.sub.cmd.js +83 -0
- package/bundle/typescript/src/commands/version/use.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/version/version.d.ts +3 -0
- package/bundle/typescript/src/commands/version/version.js +59 -0
- package/bundle/typescript/src/commands/version/version.js.map +1 -0
- package/bundle/typescript/src/error.d.ts +12 -0
- package/bundle/typescript/src/error.js +13 -0
- package/bundle/typescript/src/error.js.map +1 -0
- package/bundle/typescript/src/exec.d.ts +2 -0
- package/bundle/typescript/src/exec.js +17 -0
- package/bundle/typescript/src/exec.js.map +1 -0
- package/bundle/typescript/src/generator.d.ts +48 -0
- package/bundle/typescript/src/generator.js +394 -0
- package/bundle/typescript/src/generator.js.map +1 -0
- package/bundle/typescript/src/generators/_index.d.ts +18 -0
- package/bundle/typescript/src/generators/_index.js +19 -0
- package/bundle/typescript/src/generators/_index.js.map +1 -0
- package/bundle/typescript/src/generators/api.d.ts +1 -0
- package/bundle/typescript/src/generators/api.js +257 -0
- package/bundle/typescript/src/generators/api.js.map +1 -0
- package/bundle/typescript/src/generators/aws/_index.d.ts +2 -0
- package/bundle/typescript/src/generators/aws/_index.js +3 -0
- package/bundle/typescript/src/generators/aws/_index.js.map +1 -0
- package/bundle/typescript/src/generators/aws/aws.d.ts +3 -0
- package/bundle/typescript/src/generators/aws/aws.js +16 -0
- package/bundle/typescript/src/generators/aws/aws.js.map +1 -0
- package/bundle/typescript/src/generators/aws/cloudformation/_index.d.ts +2 -0
- package/bundle/typescript/src/generators/aws/cloudformation/_index.js +3 -0
- package/bundle/typescript/src/generators/aws/cloudformation/_index.js.map +1 -0
- package/bundle/typescript/src/generators/aws/cloudformation/cloudformation.d.ts +3 -0
- package/bundle/typescript/src/generators/aws/cloudformation/cloudformation.js +21 -0
- package/bundle/typescript/src/generators/aws/cloudformation/cloudformation.js.map +1 -0
- package/bundle/typescript/src/generators/aws/cloudformation/create-ec2-instance.cf.gen.d.ts +3 -0
- package/bundle/typescript/src/generators/aws/cloudformation/create-ec2-instance.cf.gen.js +69 -0
- package/bundle/typescript/src/generators/aws/cloudformation/create-ec2-instance.cf.gen.js.map +1 -0
- package/bundle/typescript/src/generators/collection.d.ts +1 -0
- package/bundle/typescript/src/generators/collection.js +78 -0
- package/bundle/typescript/src/generators/collection.js.map +1 -0
- package/bundle/typescript/src/generators/component.d.ts +1 -0
- package/bundle/typescript/src/generators/component.js +99 -0
- package/bundle/typescript/src/generators/component.js.map +1 -0
- package/bundle/typescript/src/generators/config.d.ts +1 -0
- package/bundle/typescript/src/generators/config.js +75 -0
- package/bundle/typescript/src/generators/config.js.map +1 -0
- package/bundle/typescript/src/generators/dbc.d.ts +1 -0
- package/bundle/typescript/src/generators/dbc.js +85 -0
- package/bundle/typescript/src/generators/dbc.js.map +1 -0
- package/bundle/typescript/src/generators/dockerfile.d.ts +1 -0
- package/bundle/typescript/src/generators/dockerfile.js +42 -0
- package/bundle/typescript/src/generators/dockerfile.js.map +1 -0
- package/bundle/typescript/src/generators/hook.d.ts +1 -0
- package/bundle/typescript/src/generators/hook.js +112 -0
- package/bundle/typescript/src/generators/hook.js.map +1 -0
- package/bundle/typescript/src/generators/kits/_index.d.ts +5 -0
- package/bundle/typescript/src/generators/kits/_index.js +6 -0
- package/bundle/typescript/src/generators/kits/_index.js.map +1 -0
- package/bundle/typescript/src/generators/kits/auth/_index.d.ts +4 -0
- package/bundle/typescript/src/generators/kits/auth/_index.js +5 -0
- package/bundle/typescript/src/generators/kits/auth/_index.js.map +1 -0
- package/bundle/typescript/src/generators/kits/auth/auth.generator.d.ts +3 -0
- package/bundle/typescript/src/generators/kits/auth/auth.generator.js +21 -0
- package/bundle/typescript/src/generators/kits/auth/auth.generator.js.map +1 -0
- package/bundle/typescript/src/generators/kits/auth/auth0-meteor.auth.gen.d.ts +1 -0
- package/bundle/typescript/src/generators/kits/auth/auth0-meteor.auth.gen.js +895 -0
- package/bundle/typescript/src/generators/kits/auth/auth0-meteor.auth.gen.js.map +1 -0
- package/bundle/typescript/src/generators/kits/auth/basic-meteor.auth.gen.d.ts +1 -0
- package/bundle/typescript/src/generators/kits/auth/basic-meteor.auth.gen.js +213 -0
- package/bundle/typescript/src/generators/kits/auth/basic-meteor.auth.gen.js.map +1 -0
- package/bundle/typescript/src/generators/kits/auth/provider.auth.gen.d.ts +1 -0
- package/bundle/typescript/src/generators/kits/auth/provider.auth.gen.js +138 -0
- package/bundle/typescript/src/generators/kits/auth/provider.auth.gen.js.map +1 -0
- package/bundle/typescript/src/generators/kits/esri/_index.d.ts +2 -0
- package/bundle/typescript/src/generators/kits/esri/_index.js +3 -0
- package/bundle/typescript/src/generators/kits/esri/_index.js.map +1 -0
- package/bundle/typescript/src/generators/kits/esri/esri.generator.d.ts +3 -0
- package/bundle/typescript/src/generators/kits/esri/esri.generator.js +31 -0
- package/bundle/typescript/src/generators/kits/esri/esri.generator.js.map +1 -0
- package/bundle/typescript/src/generators/kits/esri/map.esri.gen.d.ts +1 -0
- package/bundle/typescript/src/generators/kits/esri/map.esri.gen.js +85 -0
- package/bundle/typescript/src/generators/kits/esri/map.esri.gen.js.map +1 -0
- package/bundle/typescript/src/generators/kits/frames/_index.d.ts +1 -0
- package/bundle/typescript/src/generators/kits/frames/_index.js +2 -0
- package/bundle/typescript/src/generators/kits/frames/_index.js.map +1 -0
- package/bundle/typescript/src/generators/kits/frames/frames.generator.d.ts +3 -0
- package/bundle/typescript/src/generators/kits/frames/frames.generator.js +166 -0
- package/bundle/typescript/src/generators/kits/frames/frames.generator.js.map +1 -0
- package/bundle/typescript/src/generators/kits/kit.d.ts +3 -0
- package/bundle/typescript/src/generators/kits/kit.js +17 -0
- package/bundle/typescript/src/generators/kits/kit.js.map +1 -0
- package/bundle/typescript/src/generators/kits/mui/_index.d.ts +4 -0
- package/bundle/typescript/src/generators/kits/mui/_index.js +5 -0
- package/bundle/typescript/src/generators/kits/mui/_index.js.map +1 -0
- package/bundle/typescript/src/generators/kits/mui/auth.mui.gen.d.ts +2 -0
- package/bundle/typescript/src/generators/kits/mui/auth.mui.gen.js +228 -0
- package/bundle/typescript/src/generators/kits/mui/auth.mui.gen.js.map +1 -0
- package/bundle/typescript/src/generators/kits/mui/auth0.mui.gen.d.ts +2 -0
- package/bundle/typescript/src/generators/kits/mui/auth0.mui.gen.js +158 -0
- package/bundle/typescript/src/generators/kits/mui/auth0.mui.gen.js.map +1 -0
- package/bundle/typescript/src/generators/kits/mui/frame.mui.gen.d.ts +1 -0
- package/bundle/typescript/src/generators/kits/mui/frame.mui.gen.js +210 -0
- package/bundle/typescript/src/generators/kits/mui/frame.mui.gen.js.map +1 -0
- package/bundle/typescript/src/generators/kits/mui/mui.generator.d.ts +3 -0
- package/bundle/typescript/src/generators/kits/mui/mui.generator.js +79 -0
- package/bundle/typescript/src/generators/kits/mui/mui.generator.js.map +1 -0
- package/bundle/typescript/src/generators/layout.d.ts +1 -0
- package/bundle/typescript/src/generators/layout.js +116 -0
- package/bundle/typescript/src/generators/layout.js.map +1 -0
- package/bundle/typescript/src/generators/maka.gen.d.ts +5 -0
- package/bundle/typescript/src/generators/maka.gen.js +26 -0
- package/bundle/typescript/src/generators/maka.gen.js.map +1 -0
- package/bundle/typescript/src/generators/methods.d.ts +1 -0
- package/bundle/typescript/src/generators/methods.js +65 -0
- package/bundle/typescript/src/generators/methods.js.map +1 -0
- package/bundle/typescript/src/generators/package.d.ts +1 -0
- package/bundle/typescript/src/generators/package.js +71 -0
- package/bundle/typescript/src/generators/package.js.map +1 -0
- package/bundle/typescript/src/generators/page.d.ts +1 -0
- package/bundle/typescript/src/generators/page.js +194 -0
- package/bundle/typescript/src/generators/page.js.map +1 -0
- package/bundle/typescript/src/generators/publish.d.ts +1 -0
- package/bundle/typescript/src/generators/publish.js +75 -0
- package/bundle/typescript/src/generators/publish.js.map +1 -0
- package/bundle/typescript/src/generators/route.d.ts +1 -0
- package/bundle/typescript/src/generators/route.js +68 -0
- package/bundle/typescript/src/generators/route.js.map +1 -0
- package/bundle/typescript/src/generators/services/_index.d.ts +4 -0
- package/bundle/typescript/src/generators/services/_index.js +5 -0
- package/bundle/typescript/src/generators/services/_index.js.map +1 -0
- package/bundle/typescript/src/generators/services/logger.d.ts +1 -0
- package/bundle/typescript/src/generators/services/logger.js +50 -0
- package/bundle/typescript/src/generators/services/logger.js.map +1 -0
- package/bundle/typescript/src/generators/services/openssl.d.ts +1 -0
- package/bundle/typescript/src/generators/services/openssl.js +38 -0
- package/bundle/typescript/src/generators/services/openssl.js.map +1 -0
- package/bundle/typescript/src/generators/services/service.d.ts +3 -0
- package/bundle/typescript/src/generators/services/service.js +16 -0
- package/bundle/typescript/src/generators/services/service.js.map +1 -0
- package/bundle/typescript/src/generators/services/translation.d.ts +1 -0
- package/bundle/typescript/src/generators/services/translation.js +149 -0
- package/bundle/typescript/src/generators/services/translation.js.map +1 -0
- package/bundle/typescript/src/maka.d.ts +2 -0
- package/bundle/typescript/src/maka.js +26 -0
- package/bundle/typescript/src/maka.js.map +1 -0
- package/bundle/typescript/src/templates/aws/cloudformation/create-ec2-instance.template +14 -0
- package/bundle/typescript/src/templates/meteor/api/api.js +20 -0
- package/bundle/typescript/src/templates/meteor/api/api.js.ts +20 -0
- package/bundle/typescript/src/templates/meteor/api/apollo-gateway.js +50 -0
- package/bundle/typescript/src/templates/meteor/api/apollo-gateway.js.ts +55 -0
- package/bundle/typescript/src/templates/meteor/api/graphql-api.js +63 -0
- package/bundle/typescript/src/templates/meteor/api/graphql-api.js.ts +69 -0
- package/bundle/typescript/src/templates/meteor/api/methods.js +39 -0
- package/bundle/typescript/src/templates/meteor/api/methods.js.ts +40 -0
- package/bundle/typescript/src/templates/meteor/api/register-api.js +3 -0
- package/bundle/typescript/src/templates/meteor/api/register-api.js.ts +3 -0
- package/bundle/typescript/src/templates/meteor/api/resolvers.js +9 -0
- package/bundle/typescript/src/templates/meteor/api/resolvers.js.ts +9 -0
- 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 +6 -0
- package/bundle/typescript/src/templates/meteor/api/typeDefs.js.ts +6 -0
- package/bundle/typescript/src/templates/meteor/app/client/.gitkeep +0 -0
- package/bundle/typescript/src/templates/meteor/app/client/body.html +3 -0
- package/bundle/typescript/src/templates/meteor/app/client/head.html +12 -0
- package/bundle/typescript/src/templates/meteor/app/client/main.js +15 -0
- package/bundle/typescript/src/templates/meteor/app/client/main.js.jsx +15 -0
- package/bundle/typescript/src/templates/meteor/app/client/main.js.ts +15 -0
- package/bundle/typescript/src/templates/meteor/app/client/main.js.tsx +15 -0
- package/bundle/typescript/src/templates/meteor/app/imports/api/.gitkeep +0 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/index.js +20 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/index.js.jsx +107 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/index.js.ts +20 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/index.js.tsx +108 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/routes.js +39 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/routes.js.jsx +33 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/routes.js.ts +24 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/routes.js.tsx +33 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/templates.js +9 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/templates.js.jsx +9 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/templates.js.ts +9 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/client/templates.js.tsx +9 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/lib/index.js +1 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/lib/index.js.jsx +20 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/lib/index.js.ts +1 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/lib/index.js.tsx +20 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/lib/routes.js.jsx +28 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/lib/routes.js.tsx +28 -0
- 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 +1 -0
- package/bundle/typescript/src/templates/meteor/app/imports/startup/server/index.js.jsx +98 -0
- 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 +98 -0
- package/bundle/typescript/src/templates/meteor/app/imports/ui/test-helpers.js +24 -0
- package/bundle/typescript/src/templates/meteor/app/imports/ui/test-helpers.js.ts +24 -0
- package/bundle/typescript/src/templates/meteor/app/lib/.gitkeep +0 -0
- package/bundle/typescript/src/templates/meteor/app/lib/main.js +3 -0
- package/bundle/typescript/src/templates/meteor/app/lib/main.js.jsx +3 -0
- package/bundle/typescript/src/templates/meteor/app/lib/main.js.ts +3 -0
- package/bundle/typescript/src/templates/meteor/app/lib/main.js.tsx +3 -0
- package/bundle/typescript/src/templates/meteor/app/maka.d.ts +504 -0
- package/bundle/typescript/src/templates/meteor/app/meteor.d.ts +954 -0
- 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 +27 -0
- package/bundle/typescript/src/templates/meteor/app/public/sw.js +30 -0
- package/bundle/typescript/src/templates/meteor/app/public/sw.js.jsx +30 -0
- package/bundle/typescript/src/templates/meteor/app/public/sw.js.ts +30 -0
- package/bundle/typescript/src/templates/meteor/app/public/sw.js.tsx +30 -0
- package/bundle/typescript/src/templates/meteor/app/server/.gitkeep +0 -0
- package/bundle/typescript/src/templates/meteor/app/server/helmet-csp.js +179 -0
- package/bundle/typescript/src/templates/meteor/app/server/helmet-csp.js.jsx +179 -0
- package/bundle/typescript/src/templates/meteor/app/server/helmet-csp.js.ts +179 -0
- package/bundle/typescript/src/templates/meteor/app/server/helmet-csp.js.tsx +179 -0
- package/bundle/typescript/src/templates/meteor/app/server/main.js +13 -0
- package/bundle/typescript/src/templates/meteor/app/server/main.js.jsx +13 -0
- package/bundle/typescript/src/templates/meteor/app/server/main.js.ts +13 -0
- package/bundle/typescript/src/templates/meteor/app/server/main.js.tsx +13 -0
- package/bundle/typescript/src/templates/meteor/app/tsconfig.json +40 -0
- package/bundle/typescript/src/templates/meteor/collection/collection.js +51 -0
- package/bundle/typescript/src/templates/meteor/collection/collection.js.ts +55 -0
- package/bundle/typescript/src/templates/meteor/collection/tests.js +27 -0
- package/bundle/typescript/src/templates/meteor/collection/tests.js.ts +27 -0
- package/bundle/typescript/src/templates/meteor/config/docker-compose.yaml +17 -0
- package/bundle/typescript/src/templates/meteor/config/pm2.config.js +27 -0
- package/bundle/typescript/src/templates/meteor/config/process.env +5 -0
- package/bundle/typescript/src/templates/meteor/config/settings.json +11 -0
- package/bundle/typescript/src/templates/meteor/config/ssh.json +6 -0
- package/bundle/typescript/src/templates/meteor/dbc/config.js +70 -0
- package/bundle/typescript/src/templates/meteor/dbc/config.js.ts +70 -0
- package/bundle/typescript/src/templates/meteor/dbc/conn.js +37 -0
- package/bundle/typescript/src/templates/meteor/dbc/conn.js.ts +37 -0
- package/bundle/typescript/src/templates/meteor/dbc/register-dbc.js +3 -0
- package/bundle/typescript/src/templates/meteor/dbc/register-dbc.js.ts +3 -0
- package/bundle/typescript/src/templates/meteor/method/method.js +48 -0
- package/bundle/typescript/src/templates/meteor/method/method.js.ts +48 -0
- 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 +37 -0
- package/bundle/typescript/src/templates/meteor/package/package.js.jsx +37 -0
- package/bundle/typescript/src/templates/meteor/package/package.js.ts +36 -0
- package/bundle/typescript/src/templates/meteor/package/package.js.tsx +37 -0
- 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 +5 -0
- package/bundle/typescript/src/templates/meteor/package/tests/client/package.js.jsx +5 -0
- package/bundle/typescript/src/templates/meteor/package/tests/client/package.js.ts +5 -0
- package/bundle/typescript/src/templates/meteor/package/tests/client/package.js.tsx +5 -0
- package/bundle/typescript/src/templates/meteor/package/tests/server/package.js +5 -0
- package/bundle/typescript/src/templates/meteor/package/tests/server/package.js.jsx +5 -0
- package/bundle/typescript/src/templates/meteor/package/tests/server/package.js.ts +5 -0
- package/bundle/typescript/src/templates/meteor/package/tests/server/package.js.tsx +5 -0
- package/bundle/typescript/src/templates/meteor/project/.maka/config.json +29 -0
- package/bundle/typescript/src/templates/meteor/project/.maka/history.json +1 -0
- package/bundle/typescript/src/templates/meteor/project/README.md +33 -0
- package/bundle/typescript/src/templates/meteor/project/build/.gitkeep +0 -0
- package/bundle/typescript/src/templates/meteor/project/build/README +4 -0
- package/bundle/typescript/src/templates/meteor/project/gitignore +9 -0
- package/bundle/typescript/src/templates/meteor/project/package.json +29 -0
- package/bundle/typescript/src/templates/meteor/publish/publish.js +3 -0
- package/bundle/typescript/src/templates/meteor/publish/publish.js.ts +3 -0
- package/bundle/typescript/src/templates/meteor/service/logger/logger.js +27 -0
- package/bundle/typescript/src/templates/meteor/service/logger/logger.js.ts +27 -0
- package/bundle/typescript/src/templates/meteor/stylesheet/stylesheet.css +5 -0
- package/bundle/typescript/src/templates/meteor/stylesheet/stylesheet.css.less +5 -0
- package/bundle/typescript/src/templates/meteor/template/template-tests.js +1 -0
- package/bundle/typescript/src/templates/meteor/template/template-tests.js.jsx +55 -0
- package/bundle/typescript/src/templates/meteor/template/template-tests.js.ts +1 -0
- package/bundle/typescript/src/templates/meteor/template/template-tests.js.tsx +55 -0
- package/bundle/typescript/src/templates/meteor/template/template.css +3 -0
- package/bundle/typescript/src/templates/meteor/template/template.css.less +3 -0
- package/bundle/typescript/src/templates/meteor/template/template.css.scss +3 -0
- package/bundle/typescript/src/templates/meteor/template/template.html +5 -0
- package/bundle/typescript/src/templates/meteor/template/template.js +20 -0
- package/bundle/typescript/src/templates/meteor/template/template.js.jsx +77 -0
- package/bundle/typescript/src/templates/meteor/template/template.js.ts +1 -0
- package/bundle/typescript/src/templates/meteor/template/template.js.tsx +89 -0
- package/bundle/typescript/src/templates/react/component/component.css +6 -0
- package/bundle/typescript/src/templates/react/component/component.css.less +6 -0
- package/bundle/typescript/src/templates/react/component/component.css.scss +3 -0
- package/bundle/typescript/src/templates/react/component/component.js.jsx +54 -0
- package/bundle/typescript/src/templates/react/component/component.js.tsx +59 -0
- package/bundle/typescript/src/templates/react/hook/hook.css +3 -0
- package/bundle/typescript/src/templates/react/hook/hook.css.scss +3 -0
- package/bundle/typescript/src/templates/react/hook/hook.js.jsx +19 -0
- package/bundle/typescript/src/templates/react/hook/hook.js.tsx +18 -0
- package/bundle/typescript/src/templates/react/kit/auth/provider/authentication-provider.js.jsx +293 -0
- package/bundle/typescript/src/templates/react/kit/auth/provider/authentication-provider.js.tsx +329 -0
- package/bundle/typescript/src/templates/react/kit/auth/service/auth0-client.js.jsx +178 -0
- package/bundle/typescript/src/templates/react/kit/auth/service/auth0-client.js.tsx +178 -0
- package/bundle/typescript/src/templates/react/kit/auth/service/auth0-config.js.jsx +59 -0
- package/bundle/typescript/src/templates/react/kit/auth/service/auth0-config.js.tsx +67 -0
- package/bundle/typescript/src/templates/react/kit/auth/service/auth0-methods.js.jsx +273 -0
- package/bundle/typescript/src/templates/react/kit/auth/service/auth0-methods.js.tsx +275 -0
- package/bundle/typescript/src/templates/react/kit/auth/service/auth0-validator.js.jsx +182 -0
- package/bundle/typescript/src/templates/react/kit/auth/service/auth0-validator.js.tsx +199 -0
- package/bundle/typescript/src/templates/react/kit/auth/service/meteor-auth-service.js.jsx +138 -0
- package/bundle/typescript/src/templates/react/kit/auth/service/meteor-auth-service.js.tsx +136 -0
- package/bundle/typescript/src/templates/react/kit/esri/map/basic-map.js.jsx +29 -0
- package/bundle/typescript/src/templates/react/kit/esri/map/basic-map.js.tsx +32 -0
- package/bundle/typescript/src/templates/react/kit/frames/frames-demo.css +63 -0
- package/bundle/typescript/src/templates/react/kit/frames/frames-demo.jsx +153 -0
- package/bundle/typescript/src/templates/react/kit/frames/frames-demo.tsx +164 -0
- package/bundle/typescript/src/templates/react/kit/frames/workspace-manager.css +105 -0
- package/bundle/typescript/src/templates/react/kit/frames/workspace-manager.jsx +158 -0
- package/bundle/typescript/src/templates/react/kit/frames/workspace-manager.tsx +166 -0
- package/bundle/typescript/src/templates/react/kit/mui/auth/forgot-password/basic-forgot-password-page.js.jsx +34 -0
- package/bundle/typescript/src/templates/react/kit/mui/auth/forgot-password/basic-forgot-password-page.js.tsx +33 -0
- package/bundle/typescript/src/templates/react/kit/mui/auth/login/basic-login-page.js.jsx +53 -0
- package/bundle/typescript/src/templates/react/kit/mui/auth/login/basic-login-page.js.tsx +53 -0
- package/bundle/typescript/src/templates/react/kit/mui/auth/logout/basic-logout-page.js.jsx +25 -0
- package/bundle/typescript/src/templates/react/kit/mui/auth/logout/basic-logout-page.js.tsx +25 -0
- package/bundle/typescript/src/templates/react/kit/mui/auth/password-reset/basic-password-reset-page.js.jsx +41 -0
- package/bundle/typescript/src/templates/react/kit/mui/auth/password-reset/basic-password-reset-page.js.tsx +35 -0
- package/bundle/typescript/src/templates/react/kit/mui/auth/register/basic-register-page.js.jsx +33 -0
- package/bundle/typescript/src/templates/react/kit/mui/auth/register/basic-register-page.js.tsx +33 -0
- package/bundle/typescript/src/templates/react/kit/mui/auth0/auth-callback.js.jsx +71 -0
- package/bundle/typescript/src/templates/react/kit/mui/auth0/auth-callback.js.tsx +71 -0
- package/bundle/typescript/src/templates/react/kit/mui/auth0/auth0-account-settings.js.jsx +123 -0
- package/bundle/typescript/src/templates/react/kit/mui/auth0/auth0-account-settings.js.tsx +123 -0
- package/bundle/typescript/src/templates/react/kit/mui/auth0/auth0-login-button.js.jsx +56 -0
- package/bundle/typescript/src/templates/react/kit/mui/auth0/auth0-login-button.js.tsx +74 -0
- package/bundle/typescript/src/templates/react/kit/mui/frame/app-bars/basic-app-bar.js.jsx +43 -0
- package/bundle/typescript/src/templates/react/kit/mui/frame/app-bars/basic-app-bar.js.tsx +43 -0
- package/bundle/typescript/src/templates/react/kit/mui/frame/drawers/basic-drawer.js.jsx +121 -0
- package/bundle/typescript/src/templates/react/kit/mui/frame/drawers/basic-drawer.js.tsx +117 -0
- package/bundle/typescript/src/templates/react/kit/mui/frame/footers/basic-sticky-footer.js.jsx +41 -0
- package/bundle/typescript/src/templates/react/kit/mui/frame/footers/basic-sticky-footer.js.tsx +41 -0
- package/bundle/typescript/src/templates/react/route/route.js +8 -0
- package/bundle/typescript/src/templates/react/route/route.js.jsx +5 -0
- package/bundle/typescript/src/templates/react/route/route.js.ts +8 -0
- package/bundle/typescript/src/templates/react/route/route.js.tsx +5 -0
- package/bundle/typescript/src/templates/react/test/test.js +1 -0
- package/bundle/typescript/src/templates/react/test/test.js.jsx +38 -0
- package/bundle/typescript/src/templates/react/test/test.js.ts +1 -0
- package/bundle/typescript/src/templates/react/test/test.js.tsx +38 -0
- package/bundle/typescript/src/templates/service/docker/Dockerfile +54 -0
- package/bundle/typescript/src/templates/service/eslint/babel.config.js +15 -0
- package/bundle/typescript/src/templates/service/eslint/config.eslint.js +57 -0
- package/bundle/typescript/src/templates/service/i18n/i18n.js +33 -0
- package/bundle/typescript/src/templates/service/i18n/i18n.js.ts +33 -0
- 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 +3 -0
- package/bundle/typescript/src/templates/service/i18n/locales.js.ts +3 -0
- package/bundle/typescript/src/templates/service/openssl/openssl.conf +22 -0
- package/bundle/typescript/src/templates/service/test/jest/jest.config.js +6 -0
- package/bundle/typescript/src/templates/service/test/jest/jest.setup.js +7 -0
- package/bundle/typescript/src/tool.d.ts +74 -0
- package/bundle/typescript/src/tool.js +217 -0
- package/bundle/typescript/src/tool.js.map +1 -0
- package/bundle/typescript/src/tools/actions/actions.class.d.ts +29 -0
- package/bundle/typescript/src/tools/actions/actions.class.js +58 -0
- package/bundle/typescript/src/tools/actions/actions.class.js.map +1 -0
- package/bundle/typescript/src/tools/aws/aws.class.d.ts +51 -0
- package/bundle/typescript/src/tools/aws/aws.class.js +802 -0
- package/bundle/typescript/src/tools/aws/aws.class.js.map +1 -0
- package/bundle/typescript/src/tools/aws/aws.interfaces.d.ts +364 -0
- package/bundle/typescript/src/tools/aws/aws.interfaces.js +255 -0
- package/bundle/typescript/src/tools/aws/aws.interfaces.js.map +1 -0
- package/bundle/typescript/src/tools/cfg/cfg.class.d.ts +42 -0
- package/bundle/typescript/src/tools/cfg/cfg.class.js +402 -0
- package/bundle/typescript/src/tools/cfg/cfg.class.js.map +1 -0
- package/bundle/typescript/src/tools/docker/docker.class.d.ts +10 -0
- package/bundle/typescript/src/tools/docker/docker.class.js +46 -0
- package/bundle/typescript/src/tools/docker/docker.class.js.map +1 -0
- package/bundle/typescript/src/tools/docker/docker.interfaces.d.ts +18 -0
- package/bundle/typescript/src/tools/docker/docker.interfaces.js +2 -0
- package/bundle/typescript/src/tools/docker/docker.interfaces.js.map +1 -0
- package/bundle/typescript/src/tools/fsi/fsi.class.d.ts +130 -0
- package/bundle/typescript/src/tools/fsi/fsi.class.js +685 -0
- package/bundle/typescript/src/tools/fsi/fsi.class.js.map +1 -0
- package/bundle/typescript/src/tools/fsi/fsi.interfaces.d.ts +191 -0
- package/bundle/typescript/src/tools/fsi/fsi.interfaces.js +64 -0
- package/bundle/typescript/src/tools/fsi/fsi.interfaces.js.map +1 -0
- package/bundle/typescript/src/tools/https/https.class.d.ts +13 -0
- package/bundle/typescript/src/tools/https/https.class.js +302 -0
- package/bundle/typescript/src/tools/https/https.class.js.map +1 -0
- package/bundle/typescript/src/tools/https/https.interface.d.ts +40 -0
- package/bundle/typescript/src/tools/https/https.interface.js +2 -0
- package/bundle/typescript/src/tools/https/https.interface.js.map +1 -0
- package/bundle/typescript/src/tools/log/log.class.d.ts +33 -0
- package/bundle/typescript/src/tools/log/log.class.js +206 -0
- package/bundle/typescript/src/tools/log/log.class.js.map +1 -0
- package/bundle/typescript/src/tools/log/log.interfaces.d.ts +7 -0
- package/bundle/typescript/src/tools/log/log.interfaces.js +2 -0
- package/bundle/typescript/src/tools/log/log.interfaces.js.map +1 -0
- package/bundle/typescript/src/tools/mpi/mpi.class.d.ts +26 -0
- package/bundle/typescript/src/tools/mpi/mpi.class.js +523 -0
- package/bundle/typescript/src/tools/mpi/mpi.class.js.map +1 -0
- package/bundle/typescript/src/tools/options/options.class.d.ts +11 -0
- package/bundle/typescript/src/tools/options/options.class.js +64 -0
- package/bundle/typescript/src/tools/options/options.class.js.map +1 -0
- package/bundle/typescript/src/tools/pkg/pkg.class.d.ts +31 -0
- package/bundle/typescript/src/tools/pkg/pkg.class.js +314 -0
- package/bundle/typescript/src/tools/pkg/pkg.class.js.map +1 -0
- package/bundle/typescript/src/tools/progress/progress.class.d.ts +12 -0
- package/bundle/typescript/src/tools/progress/progress.class.js +42 -0
- package/bundle/typescript/src/tools/progress/progress.class.js.map +1 -0
- package/bundle/typescript/src/tools/scaffold/scaffold.class.d.ts +198 -0
- package/bundle/typescript/src/tools/scaffold/scaffold.class.js +868 -0
- package/bundle/typescript/src/tools/scaffold/scaffold.class.js.map +1 -0
- package/bundle/typescript/src/tools/spawn-async/spawn-async.class.d.ts +4 -0
- package/bundle/typescript/src/tools/spawn-async/spawn-async.class.js +42 -0
- package/bundle/typescript/src/tools/spawn-async/spawn-async.class.js.map +1 -0
- package/bundle/typescript/src/tools/spawn-async/spawn-async.interfaces.d.ts +6 -0
- package/bundle/typescript/src/tools/spawn-async/spawn-async.interfaces.js +2 -0
- package/bundle/typescript/src/tools/spawn-async/spawn-async.interfaces.js.map +1 -0
- package/bundle/typescript/src/tools/ssh/ssh.class.d.ts +11 -0
- package/bundle/typescript/src/tools/ssh/ssh.class.js +120 -0
- package/bundle/typescript/src/tools/ssh/ssh.class.js.map +1 -0
- package/bundle/typescript/src/tools/ssh/ssh.interfaces.d.ts +21 -0
- package/bundle/typescript/src/tools/ssh/ssh.interfaces.js +2 -0
- package/bundle/typescript/src/tools/ssh/ssh.interfaces.js.map +1 -0
- package/bundle/typescript/src/tools/ssl/ssl.class.d.ts +17 -0
- package/bundle/typescript/src/tools/ssl/ssl.class.js +54 -0
- package/bundle/typescript/src/tools/ssl/ssl.class.js.map +1 -0
- package/bundle/typescript/src/tools/ssl/ssl.interfaces.d.ts +0 -0
- package/bundle/typescript/src/tools/ssl/ssl.interfaces.js +1 -0
- package/bundle/typescript/src/tools/ssl/ssl.interfaces.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { Generator } from '../generator.js';
|
|
2
|
+
import { Log } from '../tools/log/log.class.js';
|
|
3
|
+
import { Actions } from '../tools/actions/actions.class.js';
|
|
4
|
+
import { ApiEngines } from '../tools/fsi/fsi.interfaces.js';
|
|
5
|
+
import path from 'path';
|
|
6
|
+
import { camelCase, kebabCase, pascalCase } from "change-case";
|
|
7
|
+
Generator.create({
|
|
8
|
+
name: 'api',
|
|
9
|
+
aliases: ['a'],
|
|
10
|
+
usage: 'maka {generate, g}:{api} <resource-name>',
|
|
11
|
+
shortDesc: 'Scaffolding for an API boundary (i.e. Todos).',
|
|
12
|
+
validOpts: [
|
|
13
|
+
{
|
|
14
|
+
name: 'dir',
|
|
15
|
+
description: 'Custom directory path for the API'
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'version',
|
|
19
|
+
description: 'API version (defaults to v1)'
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'withMethods',
|
|
23
|
+
boolFlag: true,
|
|
24
|
+
description: 'Generate RPC methods boundary'
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'withRest',
|
|
28
|
+
boolFlag: true,
|
|
29
|
+
description: 'Generate REST API boundary'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'withGql',
|
|
33
|
+
boolFlag: true,
|
|
34
|
+
description: 'Generate GraphQL boundary'
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'enableGateway',
|
|
38
|
+
boolFlag: true,
|
|
39
|
+
description: 'Enable Apollo Gateway for GraphQL federation'
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'withApolloGateway',
|
|
43
|
+
boolFlag: true,
|
|
44
|
+
description: 'Alias for enableGateway - Enable Apollo Gateway for GraphQL federation'
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
examples: [
|
|
48
|
+
'maka g:api Todos',
|
|
49
|
+
'maka g:api Users --withMethods --withRest',
|
|
50
|
+
'maka g:api Products --withGql --enableGateway --version=v2',
|
|
51
|
+
'maka g:api Products --withGql --withApolloGateway --version=v2',
|
|
52
|
+
'maka g:api Orders --withMethods --withGql --version=v1'
|
|
53
|
+
],
|
|
54
|
+
mustBeInMakaProject: true,
|
|
55
|
+
description: `
|
|
56
|
+
Scaffolding for an API boundary (i.e. Todos).
|
|
57
|
+
|
|
58
|
+
The API generator will create publications, methods, fixtures, and tests
|
|
59
|
+
for the given resource name.
|
|
60
|
+
|
|
61
|
+
The API generator will ask which boundaries to create. The choices are:
|
|
62
|
+
- RPC (Methods)
|
|
63
|
+
- REST API
|
|
64
|
+
- GraphQL
|
|
65
|
+
|
|
66
|
+
`
|
|
67
|
+
}, async function (args, opts) {
|
|
68
|
+
try {
|
|
69
|
+
const { scaffold } = this;
|
|
70
|
+
const config = this.projectConfig;
|
|
71
|
+
const apiChoiceBuilder = [
|
|
72
|
+
{
|
|
73
|
+
name: 'RPC (Methods)',
|
|
74
|
+
value: 'withMethods'
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
apiChoiceBuilder.push({
|
|
78
|
+
name: 'REST API',
|
|
79
|
+
value: 'withRest'
|
|
80
|
+
});
|
|
81
|
+
apiChoiceBuilder.push({
|
|
82
|
+
name: 'GraphQL',
|
|
83
|
+
value: 'withGql'
|
|
84
|
+
});
|
|
85
|
+
const apiChoices = {
|
|
86
|
+
message: 'API boundaries to create',
|
|
87
|
+
name: 'apiAnswers',
|
|
88
|
+
choices: apiChoiceBuilder
|
|
89
|
+
};
|
|
90
|
+
const apiVersion = opts.version || await Actions.ask('API Version? [v1]') || 'v1';
|
|
91
|
+
let apiAnswers = [];
|
|
92
|
+
// Check if any API boundary options were provided
|
|
93
|
+
const hasProvidedBoundaries = opts.withMethods || opts.withRest || opts.withGql;
|
|
94
|
+
if (hasProvidedBoundaries) {
|
|
95
|
+
if (opts.withMethods)
|
|
96
|
+
apiAnswers.push('withMethods');
|
|
97
|
+
if (opts.withRest)
|
|
98
|
+
apiAnswers.push('withRest');
|
|
99
|
+
if (opts.withGql)
|
|
100
|
+
apiAnswers.push('withGql');
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
apiAnswers = await Actions.checkbox(apiChoices);
|
|
104
|
+
if (apiAnswers.length === 0) {
|
|
105
|
+
Log.error(`No API boundaries selected`);
|
|
106
|
+
process.exit(1);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
let engineConfig = 'js';
|
|
110
|
+
if (config.engines.js === 'tsx') {
|
|
111
|
+
engineConfig = 'ts';
|
|
112
|
+
}
|
|
113
|
+
// Ask if user wants to enable Apollo Gateway
|
|
114
|
+
const appDir = this.fsi.findAppDirectory();
|
|
115
|
+
// use path to normalize the path
|
|
116
|
+
const pathToGatewayFile = appDir + path.normalize(`/imports/api/apollo-gateway.${engineConfig}`);
|
|
117
|
+
const gatewayEnabled = this.fsi.isFile(pathToGatewayFile);
|
|
118
|
+
// if gateway is not enabled, log out a message that will describe Apollo Gateway
|
|
119
|
+
if (!gatewayEnabled && config.engines.graphql === 'apollo') {
|
|
120
|
+
Log.info(`Apollo Gateway is a way to combine multiple GraphQL APIs into a single API. It is a way to federate multiple GraphQL APIs.`);
|
|
121
|
+
}
|
|
122
|
+
const resourceName = opts.resourceName;
|
|
123
|
+
const resourceFileName = kebabCase(resourceName);
|
|
124
|
+
const optsDir = (opts.dir) ? `/${opts.dir}/` : '/';
|
|
125
|
+
const context = {
|
|
126
|
+
name: pascalCase(resourceName),
|
|
127
|
+
apiVersion,
|
|
128
|
+
fileName: resourceFileName,
|
|
129
|
+
camelCase: camelCase(resourceName),
|
|
130
|
+
optsDir,
|
|
131
|
+
api: config.engines.api,
|
|
132
|
+
clientGraphql: config.engines.graphql, // Client-side GraphQL (Apollo Client)
|
|
133
|
+
apiGraphql: (config.engines.apis || []).includes(ApiEngines.GRAPHQL) || config.engines.api === ApiEngines.GRAPHQL, // Server-side GraphQL API
|
|
134
|
+
test: config.engines.test,
|
|
135
|
+
noRename: true,
|
|
136
|
+
withMethods: apiAnswers.includes('withMethods'),
|
|
137
|
+
withRest: apiAnswers.includes('withRest'),
|
|
138
|
+
withGql: apiAnswers.includes('withGql'),
|
|
139
|
+
};
|
|
140
|
+
// if the gateway file is already enabled, don't ask and set to false
|
|
141
|
+
let generateGateway = false;
|
|
142
|
+
if (context.withGql) {
|
|
143
|
+
// Check both enableGateway and withApolloGateway flags (they're aliases)
|
|
144
|
+
const gatewayRequested = opts.enableGateway || opts.withApolloGateway;
|
|
145
|
+
if (gatewayRequested !== undefined) {
|
|
146
|
+
generateGateway = gatewayEnabled ? false : gatewayRequested;
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
generateGateway = gatewayEnabled ? false : await Actions.confirm('Do you want to enable Apollo Gateway?');
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
if (context.withRest) {
|
|
153
|
+
this.cfg.setProjectConfig('engines.api', 'rest');
|
|
154
|
+
await this.pkg.checkMeteorPackage(['maka:rest'], { shouldInstall: true });
|
|
155
|
+
await this.scaffold.template({
|
|
156
|
+
srcPath: 'api/api.js',
|
|
157
|
+
destPath: this.scaffold.pathFromApp({
|
|
158
|
+
pathParts: ['imports', 'api', apiVersion, optsDir, resourceFileName, `${resourceFileName}-${apiVersion}-rest-api.${engineConfig}`]
|
|
159
|
+
}),
|
|
160
|
+
context,
|
|
161
|
+
config,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
if (context.withMethods) {
|
|
165
|
+
await this.pkg.checkMeteorPackage(['ddp-rate-limiter', 'mdg:validated-method'], { shouldInstall: true });
|
|
166
|
+
await this.scaffold.template({
|
|
167
|
+
srcPath: 'api/methods.js',
|
|
168
|
+
destPath: this.scaffold.pathFromApp({
|
|
169
|
+
pathParts: ['imports', 'api', apiVersion, optsDir, resourceFileName, `${resourceFileName}-${apiVersion}-rpc-methods.${engineConfig}`],
|
|
170
|
+
}),
|
|
171
|
+
context,
|
|
172
|
+
config,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
if (context.withGql) {
|
|
176
|
+
await this.pkg.checkNpmPackage(['express', '@apollo/server', '@apollo/subgraph', 'graphql-tag', 'express-rate-limit', 'graphql', '@as-integrations/express5'], { shouldInstall: true });
|
|
177
|
+
await this.scaffold.template({
|
|
178
|
+
srcPath: 'api/graphql-api.js',
|
|
179
|
+
destPath: this.scaffold.pathFromApp({
|
|
180
|
+
pathParts: ['imports', 'api', apiVersion, optsDir, resourceFileName, `${resourceFileName}-${apiVersion}-graphql-api.${engineConfig}`],
|
|
181
|
+
}),
|
|
182
|
+
context,
|
|
183
|
+
config,
|
|
184
|
+
});
|
|
185
|
+
const typeDefPath = this.scaffold.pathFromApp({
|
|
186
|
+
pathParts: ['imports', 'api', apiVersion, optsDir, resourceFileName, 'graphql', `typeDefs.${engineConfig}`]
|
|
187
|
+
});
|
|
188
|
+
await this.scaffold.template({
|
|
189
|
+
srcPath: 'api/typeDefs.js',
|
|
190
|
+
destPath: typeDefPath,
|
|
191
|
+
context,
|
|
192
|
+
config,
|
|
193
|
+
});
|
|
194
|
+
const resolversPath = this.scaffold.pathFromApp({
|
|
195
|
+
pathParts: ['imports', 'api', apiVersion, optsDir, resourceFileName, 'graphql', `resolvers.${engineConfig}`]
|
|
196
|
+
});
|
|
197
|
+
await this.scaffold.template({
|
|
198
|
+
srcPath: 'api/resolvers.js',
|
|
199
|
+
destPath: resolversPath,
|
|
200
|
+
context,
|
|
201
|
+
config,
|
|
202
|
+
});
|
|
203
|
+
if (generateGateway) {
|
|
204
|
+
await this.pkg.checkNpmPackage(['@apollo/gateway', 'express'], { shouldInstall: true });
|
|
205
|
+
await this.scaffold.template({
|
|
206
|
+
srcPath: 'api/apollo-gateway.js',
|
|
207
|
+
destPath: pathToGatewayFile,
|
|
208
|
+
context,
|
|
209
|
+
config,
|
|
210
|
+
});
|
|
211
|
+
await scaffold.injectIntoFile({
|
|
212
|
+
filePath: pathToGatewayFile,
|
|
213
|
+
content: `{ name: '${resourceFileName}${apiVersion}', url: Meteor.absoluteUrl('graphql/${apiVersion}/${resourceFileName}') },`,
|
|
214
|
+
begin: `subgraphs: [`,
|
|
215
|
+
end: `]`,
|
|
216
|
+
});
|
|
217
|
+
const destPath = this.scaffold.pathFromApp({
|
|
218
|
+
pathParts: ['imports', 'startup', 'server', `index.${config.engines.js}`]
|
|
219
|
+
});
|
|
220
|
+
await this.scaffold.injectAtEndOfFile({
|
|
221
|
+
filePath: destPath,
|
|
222
|
+
content: `import '/imports/api/apollo-gateway.${engineConfig}';`
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
// just add the subgraph to the gateway if it is already enabled
|
|
226
|
+
if (gatewayEnabled) {
|
|
227
|
+
await scaffold.injectIntoFile({
|
|
228
|
+
filePath: pathToGatewayFile,
|
|
229
|
+
content: `{ name: '${resourceFileName}${apiVersion}', url: Meteor.absoluteUrl('graphql/${apiVersion}/${resourceFileName}') },`,
|
|
230
|
+
begin: `subgraphs: [`,
|
|
231
|
+
end: `]`,
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
await this.scaffold.template({
|
|
236
|
+
srcPath: 'api/register-api.js',
|
|
237
|
+
destPath: this.scaffold.pathFromApp({
|
|
238
|
+
pathParts: ['imports', 'startup', 'server', `register-${resourceFileName}-api.${engineConfig}`]
|
|
239
|
+
}),
|
|
240
|
+
context,
|
|
241
|
+
config,
|
|
242
|
+
force: true
|
|
243
|
+
});
|
|
244
|
+
const destPath = this.scaffold.pathFromApp({
|
|
245
|
+
pathParts: ['imports', 'startup', 'server', `index.${config.engines.js}`]
|
|
246
|
+
});
|
|
247
|
+
await this.scaffold.injectAtEndOfFile({
|
|
248
|
+
filePath: destPath,
|
|
249
|
+
content: `import './register-${resourceFileName}-api';`
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
catch (e) {
|
|
253
|
+
console.error(e);
|
|
254
|
+
process.exit(1);
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../src/generators/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACX,MAAM,aAAa,CAAC;AAarB,SAAS,CAAC,MAAM,CAAC;IACf,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":"","sources":["../../../../../src/generators/aws/_index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,CAAC;AAClB,OAAO,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Generator } from '../../generator.js';
|
|
2
|
+
const AWSGen = Generator.create({
|
|
3
|
+
name: 'aws',
|
|
4
|
+
usage: 'maka {generate, g}:{aws}:<name>',
|
|
5
|
+
shortDesc: 'Generate AWS templates',
|
|
6
|
+
minArgLength: 1,
|
|
7
|
+
isPro: false,
|
|
8
|
+
validOpts: [],
|
|
9
|
+
resourceNameRequired: false,
|
|
10
|
+
examples: [
|
|
11
|
+
'maka g:aws',
|
|
12
|
+
],
|
|
13
|
+
experimental: true
|
|
14
|
+
}, async function () { });
|
|
15
|
+
export default AWSGen;
|
|
16
|
+
//# sourceMappingURL=aws.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aws.js","sourceRoot":"","sources":["../../../../../src/generators/aws/aws.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;IAC9B,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,iCAAiC;IACxC,SAAS,EAAE,wBAAwB;IACnC,YAAY,EAAE,CAAC;IACf,KAAK,EAAE,KAAK;IACZ,SAAS,EAAE,EAAE;IACb,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE;QACR,YAAY;KACb;IACD,YAAY,EAAE,IAAI;CACnB,EAAE,KAAK,eAA8B,CAAC,CAAC,CAAC;AAEzC,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_index.js","sourceRoot":"","sources":["../../../../../../src/generators/aws/cloudformation/_index.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Generator } from '../../../generator.js';
|
|
2
|
+
// import { Actions } from '../../../tools/actions/actions.class.js';
|
|
3
|
+
// import { Log } from '../../../tools/log/log.class.js';
|
|
4
|
+
// import MakaGen from '../../../generators/maka.gen.js'
|
|
5
|
+
import AWSGen from '../aws.js';
|
|
6
|
+
const CFGen = Generator.create({
|
|
7
|
+
name: 'cloudformation',
|
|
8
|
+
aliases: ['cf'],
|
|
9
|
+
usage: 'maka {generate, g}:{aws}:{cloudformation, cf}',
|
|
10
|
+
shortDesc: 'AWS Cloudformation templates',
|
|
11
|
+
resourceNameRequired: false,
|
|
12
|
+
validOpts: [],
|
|
13
|
+
isPro: false,
|
|
14
|
+
examples: [
|
|
15
|
+
'maka g:aws:cf',
|
|
16
|
+
],
|
|
17
|
+
experimental: true
|
|
18
|
+
}, async function () {
|
|
19
|
+
}, async function () { }, AWSGen);
|
|
20
|
+
export default CFGen;
|
|
21
|
+
//# sourceMappingURL=cloudformation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudformation.js","sourceRoot":"","sources":["../../../../../../src/generators/aws/cloudformation/cloudformation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,qEAAqE;AACrE,yDAAyD;AACzD,wDAAwD;AAExD,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC;IAC7B,IAAI,EAAE,gBAAgB;IACtB,OAAO,EAAE,CAAC,IAAI,CAAC;IACf,KAAK,EAAE,+CAA+C;IACtD,SAAS,EAAE,8BAA8B;IACzC,oBAAoB,EAAE,KAAK;IAC3B,SAAS,EAAE,EAAE;IACb,KAAK,EAAE,KAAK;IACZ,QAAQ,EAAE;QACR,eAAe;KAChB;IACD,YAAY,EAAE,IAAI;CACnB,EAAE,KAAK;AACR,CAAC,EAAE,KAAK,eAAe,CAAC,EAAE,MAAM,CAAC,CAAC;AAElC,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { Actions } from '../../../tools/actions/actions.class.js';
|
|
3
|
+
import { capitalCase } from "change-case";
|
|
4
|
+
import { Generator } from '../../../generator.js';
|
|
5
|
+
// import { Actions } from '../../../tools/actions/actions.class.js';
|
|
6
|
+
import { Log } from '../../../tools/log/log.class.js';
|
|
7
|
+
// import MakaGen from '../../../generators/maka.gen.js'
|
|
8
|
+
import CFGen from './cloudformation.js';
|
|
9
|
+
const CEC2Gen = Generator.create({
|
|
10
|
+
name: 'create-ec2-instance',
|
|
11
|
+
aliases: ['cec2i'],
|
|
12
|
+
usage: 'maka {generate, g}:{aws}:{cloudformation, cf}:cec2i',
|
|
13
|
+
resourceNameRequired: false,
|
|
14
|
+
shortDesc: 'AWS Cloudformation template for creating an EC2 instance',
|
|
15
|
+
mustBeInMakaProject: true,
|
|
16
|
+
validOpts: [{
|
|
17
|
+
name: 'keyId',
|
|
18
|
+
description: 'ID of the key pair to use for EC2 instance'
|
|
19
|
+
}],
|
|
20
|
+
isPro: false,
|
|
21
|
+
examples: [
|
|
22
|
+
'maka g:aws:cf:cec2i',
|
|
23
|
+
],
|
|
24
|
+
experimental: true
|
|
25
|
+
}, async function (args, opts) {
|
|
26
|
+
const { aws, fsi, scaffold, projectConfig } = this;
|
|
27
|
+
try {
|
|
28
|
+
const projectDir = fsi.findProjectDirectory();
|
|
29
|
+
const cfDirectory = path.join(projectDir, 'cloudformation');
|
|
30
|
+
const keysList = await aws.ec2describeKeys();
|
|
31
|
+
const keyIdRes = opts.keyId || await Actions.ask('Please choose a key to use: ') || "-1";
|
|
32
|
+
if (parseInt(keyIdRes) < 0) {
|
|
33
|
+
Log.error('You must have a key-pair. Please run "maka aws create-key-pair --env <env-name>" to generate a new key');
|
|
34
|
+
Log.notice('No instance has been created.');
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
let KEY_NAME = '';
|
|
38
|
+
if (keysList) {
|
|
39
|
+
for (const item of keysList) {
|
|
40
|
+
if (parseInt(keyIdRes) === item.id) {
|
|
41
|
+
KEY_NAME = item.name;
|
|
42
|
+
Log.success('Setting the key-pair to: ' + KEY_NAME);
|
|
43
|
+
break; // Exit the loop once the desired key is found
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const SG_ID = await aws.chooseSecurityGroup();
|
|
48
|
+
const context = {
|
|
49
|
+
amiId: 'ami-055744c75048d8296',
|
|
50
|
+
keyPair: KEY_NAME,
|
|
51
|
+
sgId: SG_ID,
|
|
52
|
+
instanceName: capitalCase(projectConfig.appName).replaceAll('-', ' '),
|
|
53
|
+
};
|
|
54
|
+
await scaffold.template({
|
|
55
|
+
srcPath: `cloudformation/create-ec2-instance.template`,
|
|
56
|
+
destPath: path.join(cfDirectory, 'create-ec2-instance.template'),
|
|
57
|
+
framework: 'aws',
|
|
58
|
+
context,
|
|
59
|
+
config: projectConfig,
|
|
60
|
+
ignore: false
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
catch (e) {
|
|
64
|
+
Log.error(e);
|
|
65
|
+
process.exit(1);
|
|
66
|
+
}
|
|
67
|
+
}, async function () { }, CFGen);
|
|
68
|
+
export default CEC2Gen;
|
|
69
|
+
//# sourceMappingURL=create-ec2-instance.cf.gen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-ec2-instance.cf.gen.js","sourceRoot":"","sources":["../../../../../../src/generators/aws/cloudformation/create-ec2-instance.cf.gen.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAElE,OAAO,EACL,WAAW,EACZ,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,qEAAqE;AACrE,OAAO,EAAE,GAAG,EAAE,MAAM,i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IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,EAAE,EAAE,CAAC;oBACnC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;oBACrB,GAAG,CAAC,OAAO,CAAC,2BAA2B,GAAG,QAAQ,CAAC,CAAC;oBACpD,MAAM,CAAC,8CAA8C;gBACvD,CAAC;YACH,CAAC;QACH,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,GAAG,CAAC,mBAAmB,EAAE,CAAC;QAE9C,MAAM,OAAO,GAAG;YACd,KAAK,EAAE,uBAAuB;YAC9B,OAAO,EAAE,QAAQ;YACjB,IAAI,EAAE,KAAK;YACX,YAAY,EAAE,WAAW,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC;SACtE,CAAC;QAEF,MAAM,QAAQ,CAAC,QAAQ,CAAC;YACtB,OAAO,EAAE,6CAA6C;YACtD,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,8BAA8B,CAAC;YAChE,SAAS,EAAE,KAAK;YAChB,OAAO;YACP,MAAM,EAAE,aAAa;YACrB,MAAM,EAAE,KAAK;SACd,CAAC,CAAC;IAEL,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACb,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AAEH,CAAC,EAAE,KAAK,eAAe,CAAC,EAAE,KAAK,CAAC,CAAC;AAEjC,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { kebabCase, pascalCase } from "change-case";
|
|
2
|
+
import { Generator } from '../generator.js';
|
|
3
|
+
import { Log } from '../tools/log/log.class.js';
|
|
4
|
+
Generator.create({
|
|
5
|
+
name: 'collection',
|
|
6
|
+
aliases: ['col'],
|
|
7
|
+
usage: 'maka {generate, g}:{collection, col} <name>',
|
|
8
|
+
checkWhere: true,
|
|
9
|
+
shortDesc: 'Scaffolding for a Meteor (Mongo) Collection',
|
|
10
|
+
validOpts: [{
|
|
11
|
+
name: 'dir',
|
|
12
|
+
description: 'Custom subdirectory for the collection'
|
|
13
|
+
}, {
|
|
14
|
+
name: 'where',
|
|
15
|
+
description: 'Location to generate collection (client, server, or both)',
|
|
16
|
+
values: ['client', 'server', 'both']
|
|
17
|
+
}],
|
|
18
|
+
mustBeInMakaProject: true,
|
|
19
|
+
description: `
|
|
20
|
+
Scaffolding for a Meteor (Mongo) Collection.\nhttps://docs.meteor.com/api/collections.html
|
|
21
|
+
|
|
22
|
+
Collections are generated in the "lib" or "common" directory by default. This location is accessible
|
|
23
|
+
to BOTH client and server (--where=both). Other options are "--where=server" and "--where=client" which
|
|
24
|
+
will setup the collection in their respective locations.
|
|
25
|
+
`,
|
|
26
|
+
examples: [
|
|
27
|
+
'maka g:collection todos'
|
|
28
|
+
]
|
|
29
|
+
}, async function (args, opts) {
|
|
30
|
+
try {
|
|
31
|
+
const config = this.projectConfig;
|
|
32
|
+
const optsDir = (opts.dir) ? `/${opts.dir}/` : '/';
|
|
33
|
+
const resourceFileName = kebabCase(opts.resourceName);
|
|
34
|
+
const context = {
|
|
35
|
+
name: pascalCase(opts.resourceName),
|
|
36
|
+
collectionName: pascalCase(opts.resourceName),
|
|
37
|
+
fileName: resourceFileName,
|
|
38
|
+
where: opts.where,
|
|
39
|
+
test: config.engines.test,
|
|
40
|
+
noRename: true
|
|
41
|
+
};
|
|
42
|
+
// we don't need the jsx or tsx extensions
|
|
43
|
+
let engineConfig = 'js';
|
|
44
|
+
if (config.engines.js === 'tsx') {
|
|
45
|
+
engineConfig = 'ts';
|
|
46
|
+
}
|
|
47
|
+
await this.pkg.checkMeteorPackage(['mongo'], { shouldInstall: true });
|
|
48
|
+
await this.scaffold.template({
|
|
49
|
+
srcPath: 'collection/collection.js',
|
|
50
|
+
destPath: this.scaffold.pathFromApp({
|
|
51
|
+
pathParts: ['imports', 'startup', opts.appPathPrefix, 'collections', optsDir, `${resourceFileName}.${engineConfig}`]
|
|
52
|
+
}),
|
|
53
|
+
context,
|
|
54
|
+
config
|
|
55
|
+
});
|
|
56
|
+
if (config.engines.test !== 'none') {
|
|
57
|
+
await this.scaffold.template({
|
|
58
|
+
srcPath: 'collection/tests.js',
|
|
59
|
+
destPath: this.scaffold.pathFromApp({
|
|
60
|
+
pathParts: ['imports', 'startup', opts.appPathPrefix, 'collections', optsDir, `${resourceFileName}.app-tests.${engineConfig}`]
|
|
61
|
+
}),
|
|
62
|
+
context,
|
|
63
|
+
config,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
const destPath = this.scaffold.pathFromApp({
|
|
67
|
+
pathParts: ['imports', 'startup', opts.appPathPrefix, `index.${config.engines.js}`]
|
|
68
|
+
});
|
|
69
|
+
await this.scaffold.injectAtEndOfFile({
|
|
70
|
+
filePath: destPath,
|
|
71
|
+
content: `import './collections${optsDir}${resourceFileName}';`
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
catch (e) {
|
|
75
|
+
Log.error(e);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
//# sourceMappingURL=collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection.js","sourceRoot":"","sources":["../../../../src/generators/collection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,UAAU,EACX,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAShD,SAAS,CAAC,MAAM,CAAC;IACf,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,CAAC,KAAK,CAAC;IAChB,KAAK,EAAE,6CAA6C;IACpD,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,6CAA6C;IACxD,SAAS,EAAE,CAAC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ascalCase } from "change-case";
|
|
3
|
+
import { Generator } from '../generator.js';
|
|
4
|
+
import { Log } from '../tools/log/log.class.js';
|
|
5
|
+
import { ApiEngines } from '../tools/fsi/fsi.interfaces.js';
|
|
6
|
+
const aliases = ['comp'];
|
|
7
|
+
Generator.create({
|
|
8
|
+
name: 'component',
|
|
9
|
+
aliases,
|
|
10
|
+
usage: 'maka {generate, g}:{comp} [path/]<name>',
|
|
11
|
+
shortDesc: 'Scaffolding for a React Component.\nhttps://reactjs.org/docs/react-component.html',
|
|
12
|
+
mustBeInMakaProject: true,
|
|
13
|
+
validOpts: [{
|
|
14
|
+
name: 'baseDir',
|
|
15
|
+
description: 'Base directory for component'
|
|
16
|
+
}],
|
|
17
|
+
examples: [
|
|
18
|
+
'maka g:comp todos/todos-item'
|
|
19
|
+
]
|
|
20
|
+
}, async function (args, opts) {
|
|
21
|
+
try {
|
|
22
|
+
const projectPath = (opts.baseDir) ? `/imports/ui/${opts.baseDir}` : '/imports/ui/components';
|
|
23
|
+
const pathToTemplate = this.scaffold.pathFromApp({
|
|
24
|
+
pathParts: [
|
|
25
|
+
projectPath,
|
|
26
|
+
opts.dir,
|
|
27
|
+
kebabCase(opts.resourceName),
|
|
28
|
+
kebabCase(opts.resourceName)
|
|
29
|
+
]
|
|
30
|
+
});
|
|
31
|
+
const config = this.projectConfig;
|
|
32
|
+
if (typeof (config.template.test) === 'string') {
|
|
33
|
+
this.cfg.setTemplate('test', config.template.test);
|
|
34
|
+
}
|
|
35
|
+
if (typeof (config.template.css) === 'string') {
|
|
36
|
+
this.cfg.setTemplate('css', config.template.css);
|
|
37
|
+
}
|
|
38
|
+
if (typeof (config.template.js) === 'string') {
|
|
39
|
+
this.cfg.setTemplate('js', config.template.js);
|
|
40
|
+
}
|
|
41
|
+
await this.pkg.checkNpmPackage('ramda', { shouldInstall: !opts.root });
|
|
42
|
+
await this.pkg.checkNpmPackage('react', { shouldInstall: !opts.root });
|
|
43
|
+
const context = {
|
|
44
|
+
name: pascalCase(opts.resourceName),
|
|
45
|
+
myPath: path.relative(this.fsi.findProjectDirectory(), pathToTemplate),
|
|
46
|
+
cssCaseName: kebabCase(opts.resourceName),
|
|
47
|
+
className: pascalCase(opts.resourceName),
|
|
48
|
+
camelCaseName: camelCase(opts.resourceName),
|
|
49
|
+
fileName: kebabCase(opts.resourceName),
|
|
50
|
+
clientGraphql: config.engines.graphql, // Client-side GraphQL (Apollo Client)
|
|
51
|
+
apiGraphql: (config.engines.apis || []).includes(ApiEngines.GRAPHQL) || config.engines.api === ApiEngines.GRAPHQL, // Server-side GraphQL API
|
|
52
|
+
features: config.features,
|
|
53
|
+
client: config.engines.client,
|
|
54
|
+
api: config.engines.api,
|
|
55
|
+
ssr: config.engines.ssr,
|
|
56
|
+
test: config.engines.test,
|
|
57
|
+
theme: config.engines.theme,
|
|
58
|
+
isLayout: false,
|
|
59
|
+
isComponent: true,
|
|
60
|
+
withTranslations: config.features.withTranslations
|
|
61
|
+
};
|
|
62
|
+
await this.scaffold.template({
|
|
63
|
+
srcPath: 'component/component.js',
|
|
64
|
+
destPath: pathToTemplate + '.js',
|
|
65
|
+
context,
|
|
66
|
+
framework: 'react',
|
|
67
|
+
config
|
|
68
|
+
});
|
|
69
|
+
if (config.engines.test !== 'none') {
|
|
70
|
+
await this.scaffold.template({
|
|
71
|
+
srcPath: 'test/test.js',
|
|
72
|
+
destPath: pathToTemplate + '.tests.js',
|
|
73
|
+
context,
|
|
74
|
+
framework: 'react',
|
|
75
|
+
config
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
if (config.template.css) {
|
|
79
|
+
await this.scaffold.template({
|
|
80
|
+
srcPath: 'template/template.css',
|
|
81
|
+
destPath: pathToTemplate + '.css',
|
|
82
|
+
context: Object.assign({}, context, { className: kebabCase(opts.resourceName) }),
|
|
83
|
+
config
|
|
84
|
+
});
|
|
85
|
+
await this.scaffold.injectAtBeginningOfFile({
|
|
86
|
+
filePath: pathToTemplate + "." + config.engines.js,
|
|
87
|
+
content: `import './${context.cssCaseName}.${config.engines.css}';`
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
// Import the template in the templates.js file
|
|
91
|
+
const optsDir = (opts.dir) ? `/${opts.dir}/` : '/';
|
|
92
|
+
const npmImportString = `${projectPath}${optsDir}${context.fileName}/${context.fileName}`;
|
|
93
|
+
await this.scaffold.injectTemplateModule(context.className, config, npmImportString);
|
|
94
|
+
}
|
|
95
|
+
catch (e) {
|
|
96
|
+
Log.error(e);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/generators/component.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACX,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D,MAAM,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC;AASzB,SAAS,CAAC,MAAM,CAAC;IACf,IAAI,EAAE,WAAW;IACjB,OAAO;IACP,KAAK,EAAE,yCAAyC;IAChD,SAAS,EAAE,mFAAmF;IAC9F,mBAAmB,EAAE,IAAI;IACzB,SAAS,EAAE,CAAC;YACV,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,8BAA8B;SAC5C,CAAC;IACF,QAAQ,EAAE;QACR,8BAA8B;KAC/B;CACF,EAAE,KAAK,WAAU,IAAc,EAAE,IAAoB;IACpD,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,eAAe,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,wBAAwB,CAAC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