@tolinax/ayoune-cli 2026.3.0 → 2026.4.0

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 (70) hide show
  1. package/data/contextSlots.js +189 -0
  2. package/data/modelsAndRights.js +56 -0
  3. package/data/modules.js +16 -0
  4. package/lib/api/apiCallHandler.js +6 -2
  5. package/lib/api/apiClient.js +9 -1
  6. package/lib/api/auditCallHandler.js +2 -2
  7. package/lib/api/handleAPIError.js +20 -18
  8. package/lib/api/login.js +3 -3
  9. package/lib/api/searchClient.js +119 -0
  10. package/lib/commands/createAccessCommand.js +126 -0
  11. package/lib/commands/createActionsCommand.js +40 -9
  12. package/lib/commands/createAiCommand.js +17 -17
  13. package/lib/commands/createAliasCommand.js +4 -6
  14. package/lib/commands/createAuditCommand.js +5 -9
  15. package/lib/commands/createBatchCommand.js +15 -28
  16. package/lib/commands/createCompletionsCommand.js +6 -3
  17. package/lib/commands/createConfigCommand.js +8 -14
  18. package/lib/commands/createContextCommand.js +163 -0
  19. package/lib/commands/createCopyCommand.js +4 -7
  20. package/lib/commands/createCreateCommand.js +4 -7
  21. package/lib/commands/createDeleteCommand.js +4 -6
  22. package/lib/commands/createDeployCommand.js +31 -55
  23. package/lib/commands/createDescribeCommand.js +12 -10
  24. package/lib/commands/createEditCommand.js +13 -8
  25. package/lib/commands/createEventsCommand.js +4 -4
  26. package/lib/commands/createExecCommand.js +65 -35
  27. package/lib/commands/createExportCommand.js +21 -24
  28. package/lib/commands/createGetCommand.js +13 -14
  29. package/lib/commands/createJobsCommand.js +8 -13
  30. package/lib/commands/createListCommand.js +13 -14
  31. package/lib/commands/createLoginCommand.js +16 -4
  32. package/lib/commands/createLogoutCommand.js +2 -2
  33. package/lib/commands/createModulesCommand.js +16 -19
  34. package/lib/commands/createMonitorCommand.js +9 -16
  35. package/lib/commands/createPermissionsCommand.js +10 -18
  36. package/lib/commands/createProgram.js +47 -21
  37. package/lib/commands/createSearchCommand.js +219 -69
  38. package/lib/commands/createSelfHostUpdateCommand.js +166 -0
  39. package/lib/commands/createServicesCommand.js +5 -8
  40. package/lib/commands/createSetupCommand.js +305 -0
  41. package/lib/commands/createStatusCommand.js +147 -0
  42. package/lib/commands/createStorageCommand.js +2 -3
  43. package/lib/commands/createStreamCommand.js +4 -4
  44. package/lib/commands/createSyncCommand.js +5 -8
  45. package/lib/commands/createTemplateCommand.js +9 -16
  46. package/lib/commands/createUpdateCommand.js +12 -15
  47. package/lib/commands/createUsersCommand.js +21 -31
  48. package/lib/commands/createWebhooksCommand.js +15 -22
  49. package/lib/commands/createWhoAmICommand.js +8 -6
  50. package/lib/helpers/cliError.js +24 -0
  51. package/lib/helpers/config.js +1 -0
  52. package/lib/helpers/configLoader.js +6 -0
  53. package/lib/helpers/contextInjector.js +65 -0
  54. package/lib/helpers/contextResolver.js +70 -0
  55. package/lib/helpers/contextStore.js +46 -0
  56. package/lib/helpers/handleResponseFormatOptions.js +59 -10
  57. package/lib/helpers/logo.js +48 -0
  58. package/lib/helpers/resolveCollectionArgs.js +36 -0
  59. package/lib/helpers/sanitizeFields.js +18 -0
  60. package/lib/helpers/secureStorage.js +72 -0
  61. package/lib/helpers/tokenPayload.js +21 -0
  62. package/lib/helpers/updateNotifier.js +49 -0
  63. package/lib/models/getModuleFromCollection.js +4 -1
  64. package/lib/operations/handleCopySingleOperation.js +10 -2
  65. package/lib/operations/handleCreateSingleOperation.js +3 -0
  66. package/lib/operations/handleDescribeSingleOperation.js +23 -0
  67. package/lib/operations/handleGetOperation.js +9 -3
  68. package/lib/operations/handleListOperation.js +14 -10
  69. package/lib/prompts/promptModule.js +9 -6
  70. package/package.json +163 -158
package/package.json CHANGED
@@ -1,158 +1,163 @@
1
- {
2
- "name": "@tolinax/ayoune-cli",
3
- "version": "2026.3.0",
4
- "description": "",
5
- "type": "module",
6
- "main": "./index.js",
7
- "bin": {
8
- "ay": "./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
- "test": "vitest run",
19
- "test:watch": "vitest",
20
- "lint": "eslint src/",
21
- "format": "prettier --write src/",
22
- "format:check": "prettier --check src/",
23
- "release": "release-it --ci",
24
- "postrelease": "npm run release-package",
25
- "prerelease-package": "npm run copy-package",
26
- "release-package": "cd dist && npm publish"
27
- },
28
- "files": [
29
- "**/*"
30
- ],
31
- "autoupdater": {
32
- "updateMessage": "Would you like to update now?",
33
- "checkCommand": "ay -v",
34
- "installCommand": "npm install -g @tolinax/ayoune-cli",
35
- "promptUser": true
36
- },
37
- "keywords": [],
38
- "author": "",
39
- "license": "ISC",
40
- "release-it": {
41
- "git": {
42
- "changelog": "git log --pretty=format:\"* %s (%h)\" ${from}...${to}",
43
- "requireCleanWorkingDir": false,
44
- "addUntrackedFiles": true,
45
- "commit": true,
46
- "push": true,
47
- "commitMessage": "ci(chore): release v${version}\n\n${changelog}",
48
- "tag": true
49
- },
50
- "npm": {
51
- "publish": false
52
- },
53
- "plugins": {
54
- "@release-it/conventional-changelog": {
55
- "preset": {
56
- "name": "conventionalcommits",
57
- "header": "# Changelog",
58
- "types": [
59
- {
60
- "type": "feat",
61
- "section": "Features"
62
- },
63
- {
64
- "type": "fix",
65
- "section": "Bug Fixes"
66
- },
67
- {
68
- "type": "chore",
69
- "section": "Chores"
70
- },
71
- {
72
- "type": "docs",
73
- "section": "Docs"
74
- },
75
- {
76
- "type": "style",
77
- "section": "Style changes"
78
- },
79
- {
80
- "type": "refactor",
81
- "section": "Refactorings"
82
- },
83
- {
84
- "type": "perf",
85
- "section": "Performance"
86
- },
87
- {
88
- "type": "test",
89
- "section": "Tests"
90
- },
91
- {
92
- "type": "ci",
93
- "section": "Continous Integration"
94
- },
95
- {
96
- "type": "build",
97
- "section": "Build Process"
98
- },
99
- {
100
- "type": "infra",
101
- "section": "Infrastructure"
102
- }
103
- ]
104
- },
105
- "infile": "CHANGELOG.md"
106
- }
107
- }
108
- },
109
- "dependencies": {
110
- "@types/jmespath": "^0.15.2",
111
- "axios": "^1.6.7",
112
- "axios-retry": "^4.0.0",
113
- "chalk": "^5.3.0",
114
- "chalk-animation": "^2.0.3",
115
- "cli-autoupdater": "^1.1.0",
116
- "commander": "^12.0.0",
117
- "figlet": "^1.7.0",
118
- "gradient-string": "^2.0.2",
119
- "inquirer": "^9.2.14",
120
- "inquirer-autocomplete-prompt": "^3.0.1",
121
- "inquirer-file-tree-selection-prompt": "^2.0.5",
122
- "inquirer-fuzzy-path": "^2.3.0",
123
- "inquirer-interrupted-prompt": "^3.0.0",
124
- "inquirer-search-list": "^1.2.6",
125
- "inquirer-table-input": "^0.0.3",
126
- "jmespath": "^0.16.0",
127
- "js-yaml": "^4.1.0",
128
- "jsonwebtoken": "^9.0.2",
129
- "lodash": "^4.17.21",
130
- "mkdirp": "^3.0.1",
131
- "moment": "^2.30.1",
132
- "nanospinner": "^1.1.0",
133
- "node-localstorage": "^3.0.5",
134
- "os": "^0.1.2",
135
- "socket.io-client": "^4.7.4"
136
- },
137
- "devDependencies": {
138
- "@release-it/conventional-changelog": "^5.0.0",
139
- "@types/chalk": "^2.2.0",
140
- "@types/chalk-animation": "^1.6.3",
141
- "@types/commander": "^2.12.2",
142
- "@types/figlet": "^1.5.8",
143
- "@types/gradient-string": "^1.1.5",
144
- "@types/inquirer": "^9.0.7",
145
- "@types/js-yaml": "^4.0.9",
146
- "@types/jsonwebtoken": "^9.0.5",
147
- "@types/lodash": "^4.14.202",
148
- "@types/node": "^20.11.16",
149
- "@types/node-localstorage": "^1.3.3",
150
- "@typescript-eslint/eslint-plugin": "^8.55.0",
151
- "@typescript-eslint/parser": "^8.55.0",
152
- "cpx": "^1.5.0",
153
- "eslint": "^9.39.2",
154
- "prettier": "^3.2.5",
155
- "rimraf": "^5.0.5",
156
- "vitest": "^4.0.18"
157
- }
158
- }
1
+ {
2
+ "name": "@tolinax/ayoune-cli",
3
+ "version": "2026.4.0",
4
+ "description": "CLI for the aYOUne Business-as-a-Service platform",
5
+ "type": "module",
6
+ "main": "./index.js",
7
+ "bin": {
8
+ "ay": "./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
+ "test": "vitest run",
19
+ "test:watch": "vitest",
20
+ "lint": "eslint src/",
21
+ "format": "prettier --write src/",
22
+ "format:check": "prettier --check src/",
23
+ "sync-models": "npx ts-node --esm scripts/sync-models-and-rights.ts",
24
+ "sync-models:fix": "npx ts-node --esm scripts/sync-models-and-rights.ts --fix",
25
+ "release": "release-it --ci",
26
+ "postrelease": "npm run release-package",
27
+ "prerelease-package": "npm run copy-package",
28
+ "release-package": "cd dist && npm publish"
29
+ },
30
+ "files": [
31
+ "index.js",
32
+ "lib/**/*.js",
33
+ "data/**/*.js"
34
+ ],
35
+ "publishConfig": {
36
+ "access": "public"
37
+ },
38
+ "keywords": [
39
+ "ayoune",
40
+ "cli",
41
+ "tolinax",
42
+ "baas"
43
+ ],
44
+ "author": "Tolinax <info@tolinax.com>",
45
+ "license": "ISC",
46
+ "release-it": {
47
+ "git": {
48
+ "changelog": "git log --pretty=format:\"* %s (%h)\" ${from}...${to}",
49
+ "requireCleanWorkingDir": false,
50
+ "addUntrackedFiles": true,
51
+ "commit": true,
52
+ "push": true,
53
+ "commitMessage": "ci(chore): release v${version}\n\n${changelog}",
54
+ "tag": true
55
+ },
56
+ "npm": {
57
+ "publish": false
58
+ },
59
+ "plugins": {
60
+ "@release-it/conventional-changelog": {
61
+ "preset": {
62
+ "name": "conventionalcommits",
63
+ "header": "# Changelog",
64
+ "types": [
65
+ {
66
+ "type": "feat",
67
+ "section": "Features"
68
+ },
69
+ {
70
+ "type": "fix",
71
+ "section": "Bug Fixes"
72
+ },
73
+ {
74
+ "type": "chore",
75
+ "section": "Chores"
76
+ },
77
+ {
78
+ "type": "docs",
79
+ "section": "Docs"
80
+ },
81
+ {
82
+ "type": "style",
83
+ "section": "Style changes"
84
+ },
85
+ {
86
+ "type": "refactor",
87
+ "section": "Refactorings"
88
+ },
89
+ {
90
+ "type": "perf",
91
+ "section": "Performance"
92
+ },
93
+ {
94
+ "type": "test",
95
+ "section": "Tests"
96
+ },
97
+ {
98
+ "type": "ci",
99
+ "section": "Continous Integration"
100
+ },
101
+ {
102
+ "type": "build",
103
+ "section": "Build Process"
104
+ },
105
+ {
106
+ "type": "infra",
107
+ "section": "Infrastructure"
108
+ }
109
+ ]
110
+ },
111
+ "infile": "CHANGELOG.md"
112
+ }
113
+ }
114
+ },
115
+ "dependencies": {
116
+ "@types/jmespath": "^0.15.2",
117
+ "axios": "^1.6.7",
118
+ "axios-retry": "^4.0.0",
119
+ "chalk": "^5.3.0",
120
+ "chalk-animation": "^2.0.3",
121
+ "commander": "^12.0.0",
122
+ "figlet": "^1.7.0",
123
+ "gradient-string": "^2.0.2",
124
+ "inquirer": "^9.2.14",
125
+ "inquirer-autocomplete-prompt": "^3.0.1",
126
+ "inquirer-file-tree-selection-prompt": "^2.0.5",
127
+ "inquirer-fuzzy-path": "^2.3.0",
128
+ "inquirer-interrupted-prompt": "^3.0.0",
129
+ "inquirer-search-list": "^1.2.6",
130
+ "inquirer-table-input": "^0.0.3",
131
+ "jmespath": "^0.16.0",
132
+ "js-yaml": "^4.1.0",
133
+ "jsonwebtoken": "^9.0.2",
134
+ "lodash": "^4.17.21",
135
+ "mkdirp": "^3.0.1",
136
+ "moment": "^2.30.1",
137
+ "nanospinner": "^1.1.0",
138
+ "node-localstorage": "^3.0.5",
139
+ "os": "^0.1.2",
140
+ "socket.io-client": "^4.7.4"
141
+ },
142
+ "devDependencies": {
143
+ "@release-it/conventional-changelog": "^5.0.0",
144
+ "@types/chalk": "^2.2.0",
145
+ "@types/chalk-animation": "^1.6.3",
146
+ "@types/commander": "^2.12.2",
147
+ "@types/figlet": "^1.5.8",
148
+ "@types/gradient-string": "^1.1.5",
149
+ "@types/inquirer": "^9.0.7",
150
+ "@types/js-yaml": "^4.0.9",
151
+ "@types/jsonwebtoken": "^9.0.5",
152
+ "@types/lodash": "^4.14.202",
153
+ "@types/node": "^20.11.16",
154
+ "@types/node-localstorage": "^1.3.3",
155
+ "@typescript-eslint/eslint-plugin": "^8.55.0",
156
+ "@typescript-eslint/parser": "^8.55.0",
157
+ "cpx": "^1.5.0",
158
+ "eslint": "^9.39.2",
159
+ "prettier": "^3.2.5",
160
+ "rimraf": "^5.0.5",
161
+ "vitest": "^4.0.18"
162
+ }
163
+ }