@tolinax/ayoune-cli 2024.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/data/defaultActions.js +9 -0
  2. package/data/operations.js +5 -0
  3. package/index.js +34 -0
  4. package/lib/api/apiCallHandler.js +42 -0
  5. package/lib/api/apiClient.js +16 -0
  6. package/lib/api/auditCallHandler.js +42 -0
  7. package/lib/api/handleAPIError.js +0 -0
  8. package/lib/api/login.js +33 -0
  9. package/lib/commands/createAuditCommand.js +28 -0
  10. package/lib/commands/createCopyCommand.js +24 -0
  11. package/lib/commands/createCreateCommand.js +29 -0
  12. package/lib/commands/createDescribeCommand.js +24 -0
  13. package/lib/commands/createEditCommand.js +25 -0
  14. package/lib/commands/createEventsCommand.js +54 -0
  15. package/lib/commands/createGetCommand.js +36 -0
  16. package/lib/commands/createListCommand.js +35 -0
  17. package/lib/commands/createLoginCommand.js +17 -0
  18. package/lib/commands/createModulesCommand.js +33 -0
  19. package/lib/commands/createProgram.js +63 -0
  20. package/lib/commands/createStorageCommand.js +16 -0
  21. package/lib/commands/createStreamCommand.js +45 -0
  22. package/lib/helpers/addSpacesToCamelCase.js +5 -0
  23. package/lib/helpers/handleResponseFormatOptions.js +43 -0
  24. package/lib/helpers/initializeSettings.js +14 -0
  25. package/lib/helpers/localStorage.js +4 -0
  26. package/lib/helpers/parseInt.js +9 -0
  27. package/lib/helpers/saveFile.js +39 -0
  28. package/lib/models/getCollections.js +15 -0
  29. package/lib/models/getModelsInModules.js +13 -0
  30. package/lib/models/getModuleFromCollection.js +7 -0
  31. package/lib/operations/handleAuditOperation.js +22 -0
  32. package/lib/operations/handleCollectionOperation.js +27 -0
  33. package/lib/operations/handleCopySingleOperation.js +22 -0
  34. package/lib/operations/handleCreateSingleOperation.js +27 -0
  35. package/lib/operations/handleDescribeSingleOperation.js +20 -0
  36. package/lib/operations/handleEditOperation.js +51 -0
  37. package/lib/operations/handleEditRawOperation.js +35 -0
  38. package/lib/operations/handleGetOperation.js +25 -0
  39. package/lib/operations/handleGetSingleOperation.js +20 -0
  40. package/lib/operations/handleListOperation.js +24 -0
  41. package/lib/operations/handleSingleAuditOperation.js +27 -0
  42. package/lib/prompts/promptAudits.js +15 -0
  43. package/lib/prompts/promptCollection.js +13 -0
  44. package/lib/prompts/promptCollectionInModule.js +13 -0
  45. package/lib/prompts/promptCollectionWithModule.js +15 -0
  46. package/lib/prompts/promptDefaultAction.js +13 -0
  47. package/lib/prompts/promptEntry.js +12 -0
  48. package/lib/prompts/promptModule.js +19 -0
  49. package/lib/prompts/promptName.js +11 -0
  50. package/lib/prompts/promptOperation.js +13 -0
  51. package/lib/socket/customerSocketClient.js +12 -0
  52. package/lib/socket/socketClient.js +11 -0
  53. package/package.json +147 -0
package/package.json ADDED
@@ -0,0 +1,147 @@
1
+ {
2
+ "name": "@tolinax/ayoune-cli",
3
+ "version": "2024.2.1",
4
+ "description": "",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "bin": {
8
+ "ay": "./dist/index.js"
9
+ },
10
+ "scripts": {
11
+ "prebuild": "rimraf dist",
12
+ "build": "npx tsc",
13
+ "postbuild": "cpx package.json dist",
14
+ "update-models": "npm install @tolinax/ayoune-models@latest",
15
+ "update-core": "npm install @tolinax/ayoune-core@latest",
16
+ "copy-package": "cpx package.json dist",
17
+ "update-interfaces": "npm install @tolinax/ayoune-interfaces@latest",
18
+ "release": "release-it --ci",
19
+ "postrelease": "npm run release-package",
20
+ "prerelease-package": "npm run copy-package",
21
+ "release-package": "cd dist && npm publish"
22
+ },
23
+ "files": [
24
+ "/"
25
+ ],
26
+ "autoupdater": {
27
+ "updateMessage": "Would you like to update now?",
28
+ "checkCommand": "ay -v",
29
+ "installCommand": "npm install -g @tolinax/ayoune-cli",
30
+ "promptUser": true
31
+ },
32
+ "keywords": [],
33
+ "author": "",
34
+ "license": "ISC",
35
+ "release-it": {
36
+ "git": {
37
+ "changelog": "git log --pretty=format:\"* %s (%h)\" ${from}...${to}",
38
+ "requireCleanWorkingDir": false,
39
+ "addUntrackedFiles": true,
40
+ "commit": true,
41
+ "push": true,
42
+ "commitMessage": "ci(chore): release v${version}\n\n${changelog}",
43
+ "tag": true
44
+ },
45
+ "npm": {
46
+ "publish": false
47
+ },
48
+ "plugins": {
49
+ "@release-it/conventional-changelog": {
50
+ "preset": {
51
+ "name": "conventionalcommits",
52
+ "header": "# Changelog",
53
+ "types": [
54
+ {
55
+ "type": "feat",
56
+ "section": "Features"
57
+ },
58
+ {
59
+ "type": "fix",
60
+ "section": "Bug Fixes"
61
+ },
62
+ {
63
+ "type": "chore",
64
+ "section": "Chores"
65
+ },
66
+ {
67
+ "type": "docs",
68
+ "section": "Docs"
69
+ },
70
+ {
71
+ "type": "style",
72
+ "section": "Style changes"
73
+ },
74
+ {
75
+ "type": "refactor",
76
+ "section": "Refactorings"
77
+ },
78
+ {
79
+ "type": "perf",
80
+ "section": "Performance"
81
+ },
82
+ {
83
+ "type": "test",
84
+ "section": "Tests"
85
+ },
86
+ {
87
+ "type": "ci",
88
+ "section": "Continous Integration"
89
+ },
90
+ {
91
+ "type": "build",
92
+ "section": "Build Process"
93
+ },
94
+ {
95
+ "type": "infra",
96
+ "section": "Infrastructure"
97
+ }
98
+ ]
99
+ },
100
+ "infile": "CHANGELOG.md"
101
+ }
102
+ }
103
+ },
104
+ "dependencies": {
105
+ "@tolinax/ayoune-core": "^2024.2.166",
106
+ "@tolinax/ayoune-models": "^2024.2.29",
107
+ "axios": "^1.6.7",
108
+ "axios-retry": "^4.0.0",
109
+ "chalk": "^5.3.0",
110
+ "chalk-animation": "^2.0.3",
111
+ "cli-autoupdater": "^1.1.0",
112
+ "commander": "^12.0.0",
113
+ "figlet": "^1.7.0",
114
+ "gradient-string": "^2.0.2",
115
+ "inquirer": "^9.2.14",
116
+ "inquirer-autocomplete-prompt": "^3.0.1",
117
+ "inquirer-file-tree-selection-prompt": "^2.0.5",
118
+ "inquirer-fuzzy-path": "^2.3.0",
119
+ "inquirer-interrupted-prompt": "^3.0.0",
120
+ "inquirer-search-list": "^1.2.6",
121
+ "inquirer-table-input": "^0.0.3",
122
+ "js-yaml": "^4.1.0",
123
+ "lodash": "^4.17.21",
124
+ "mkdirp": "^3.0.1",
125
+ "moment": "^2.30.1",
126
+ "nanospinner": "^1.1.0",
127
+ "node-localstorage": "^3.0.5",
128
+ "os": "^0.1.2",
129
+ "socket.io-client": "^4.7.4"
130
+ },
131
+ "devDependencies": {
132
+ "@release-it/conventional-changelog": "^5.0.0",
133
+ "@types/chalk": "^2.2.0",
134
+ "@types/chalk-animation": "^1.6.3",
135
+ "@types/commander": "^2.12.2",
136
+ "@types/figlet": "^1.5.8",
137
+ "@types/gradient-string": "^1.1.5",
138
+ "@types/inquirer": "^9.0.7",
139
+ "@types/js-yaml": "^4.0.9",
140
+ "@types/lodash": "^4.14.202",
141
+ "@types/node": "^20.11.16",
142
+ "@types/node-localstorage": "^1.3.3",
143
+ "cpx": "^1.5.0",
144
+ "prettier": "^3.2.5",
145
+ "rimraf": "^5.0.5"
146
+ }
147
+ }