contensis-cli 1.0.0-beta.57 → 1.0.0-beta.59

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/README.md CHANGED
@@ -219,6 +219,7 @@ contensis >
219
219
  - [Import entries](#import-entries)
220
220
  - [Import from another Contensis environment](#import-from-another-contensis-environment-1)
221
221
  - [Import from a file](#import-from-a-file)
222
+ - [Remove entries](#remove-entries)
222
223
 
223
224
  ## Get started
224
225
 
@@ -1135,82 +1136,115 @@ When you are happy you can fetch only the data you intend to import, connect to
1135
1136
  website t.durden@example-dev> import entries --preserve-guids --zenql "sys.contentTypeId = plant" --source-alias example-dev --source-project-id leif
1136
1137
  -------------------------------------
1137
1138
  -- IMPORT PREVIEW --
1138
- [23/11 02:10:48] [INFO] Fetching initial entries in project 'leif'
1139
- [23/11 02:10:48] [INFO] Finding entries in project 'website'
1140
- [23/11 02:10:49] [INFO] Building asset entries
1141
- [23/11 02:10:49] [INFO] Building content entries
1139
+ [26/11 02:16:29] [INFO] Fetching initial entries in project 'leif'
1140
+ Fetch [leif] >> 100% 21 0.0s/0.0s 100000p/s
1141
+ Fetch [leif] >> 100% 79 0.0s/0.0s Infinityp/s
1142
+ Fetch [leif] >> 100% 13 0.0s/0.0s Infinityp/s
1143
+
1144
+ Found 113 entries in leif
1142
1145
  --------------------------------------------
1143
1146
 
1144
- 1 errors
1145
-
1146
- id error
1147
- -----------------------------------------------------------
1148
- 0 Content type 'plantGenus' does not exist in
1149
- project 'website'
1150
- -----------------------------------------------------------
1151
- [23/11 02:10:49] [OK] Done migrating entries
1152
-
1153
- growingConditions Likes high humidity
1154
- 636b925b-a386-4c56-9f33-96cd99cc391c no change
1155
- growingConditions Needs plenty of light
1156
- 2d80e638-eb0d-4bc5-bc96-42b7b8f20678 no change
1157
- growingConditions Partial shade
1158
- 711251f9-f9c6-473b-8b62-0ec8a0d4978c no change
1159
- growingConditions Prefers dry conditions
1160
- d815819d-61c6-4037-95d3-c503acf52153 no change
1161
-
1162
- plant Aloe vera
1163
- 7cf921a0-ee4f-4bd6-a3f2-0fb0fe1a2ac8 no change
1164
- plant Areca palm
1165
- 0d94dbf2-89f8-45fb-96d5-175ae1f382ce no change
1166
- plant Boston fern
1167
- 43a60005-ea92-4b32-9af3-79560e48ecec no change
1168
- plant Calathea orbifolia
1169
- f0cac96c-39a1-4b85-b14b-e8d7d3d08767 no change
1170
- plant Canary Island Date Palm
1171
- d647012b-897e-4b6b-bfb5-b9844ef3d648 no change
1172
-
1173
- plantGenus Aglaonema
1174
- 98347340-a11c-4ee5-b4e7-1ae3b75496a2 error
1175
- [cli] ❌ Content type 'plantGenus' does not exist in project 'website'
1147
+ id contentTypeId entryTitle entryDescrip
1148
+ ------------------------------------------------------------------------------------------------------
1149
+ 7cf921a0-ee4f-4bd6-a3f2-0fb0fe1a2ac8 plant Aloe vera Every kitche
1150
+ 0d94dbf2-89f8-45fb-96d5-175ae1f382ce plant Areca palm An easy-to-c
1151
+ 43a60005-ea92-4b32-9af3-79560e48ecec plant Boston fern Brighten up
1152
+ f0cac96c-39a1-4b85-b14b-e8d7d3d08767 plant Calathea orbifolia This beautif
1153
+ d647012b-897e-4b6b-bfb5-b9844ef3d648 plant Canary Island Date Palm An easy-to-c
1154
+ b7129080-692c-4550-9e2b-28f8ec978651 plant Chinese evergreen Easy to care
1155
+ a3339124-4340-4f31-a209-5a6413a89f15 plant Chinese money plant The Chinese
1156
+ 8c284599-b615-40a7-9d26-0ddd586fff51 plant Dracaena fragrans A great opti
1157
+ 329e3104-332f-48a4-b43a-de852df796b3 plant Elephant ear Elephant ear
1158
+ 504f7b7f-af03-4711-94ca-07edb90fbe00 plant Heartleaf philodendron Native to Ce
1159
+ a9a537e8-5508-4166-878c-d5fcd0d9a723 plant Maidenhair fern Easily ident
1160
+ 9a3cc767-8fc1-4ee5-83e1-63c14a508c69 plant Parlour palm Add a bit of
1161
+ ee488c3b-a3a3-4b9c-a3ad-c5a5bdc7e317 plant Peace lily A classic ch
1162
+ 6a71a864-6f61-471a-8cdd-f80237408666 plant Pink moth orchid Why buy cut
1163
+ 50868245-3e53-4d9f-86ed-403593da67f6 plant Ponytail palm Despite its
1164
+ 4f05979f-d8cf-4568-9045-05731a33f243 plant Spider plant Breate easy
1165
+ 76a16c87-5e6d-465b-a343-3f14cf2fea0a plant String of nickels A hanging pl
1166
+ 61a2af3a-332c-453c-b9f6-1851d9b7d936 plant Swiss cheese plant Bring laid-b
1167
+ 8174fb53-b955-4e36-8f87-646bf286e396 plant Variegated snake plant Snake plants
1168
+ b8aa31da-f993-4d81-a361-94ecd5e42547 plant White moth orchid Why buy cut
1169
+ 0d707ffe-f42d-44a6-b839-46156ee7f4f3 plant Yellow moth orchid Why buy cut
1170
+ 51390024-f193-436f-8552-646cf77ccfdb image aloe-vera-closeup null
1171
+ c0d4ec16-6de2-4394-aaf4-03a56d343bff image aloe-vera-gold-pot null
1172
+ 3b830d97-e976-467c-a833-1b4abcab65d0 image areca-palm-in-room null
1173
+ ed0300b0-e841-4c0f-bd1d-9ecd6bc2a354 image areca-palm-leaf null
1174
+ 00119ef1-c3c4-4a49-9076-27eee5605515 image areca-palm-plant-collection null
1175
+ 248e2817-6241-4de7-ac5d-75411be4339d image boston-fern-close-up null
1176
+
1177
+ - and 87 more...
1178
+
1179
+ [26/11 02:16:29] [INFO] Finding 113 entries in project 'website'
1180
+ Fetch [website] >> 100% 113 0.2s/0.0s 897p/s
1181
+ Fetch [website] >> 100% 4 0.0s/0.0s Infinityp/s
1182
+ [26/11 02:16:30] [INFO] Building 66 asset entries
1183
+ [26/11 02:16:30] [INFO] Building 47 content entries
1184
+
1185
+ 37/113 entries to migrate into [website]
1186
+
1187
+ contentTypeId status total
1188
+ ----------------------------------------------
1189
+ plantGenus error 4
1190
+ growingConditions update 4
1191
+ plant update 21
1192
+ pot update 12
1193
+ image no change 66
1194
+ plantType no change 5
1195
+ tag no change 1
1196
+ ----------------------------------------------
1197
+
1198
+ id contentTypeId status updates entryTitle
1199
+ ------------------------------------------------------------------------------------------------------
1200
+ 98347340-a11c-4ee5-b4e7-1ae3b75496a2 plantGenus error Aglaonema
1201
+ fa464489-6476-4694-b3d4-e77d0c00a185 plantGenus error Alocasia
1202
+ 309d5fd7-a21f-45a8-8abb-f01f820b8f16 plantGenus error Aloe
1203
+ 4ebdcc63-929f-4b06-8848-fe046468a63d plantGenus error Beaucarnea
1204
+ 636b925b-a386-4c56-9f33-96cd99cc391c growingConditions update -1,+0 Likes high humidity
1205
+ 2d80e638-eb0d-4bc5-bc96-42b7b8f20678 growingConditions update -1,+0 Needs plenty of light
1206
+ 711251f9-f9c6-473b-8b62-0ec8a0d4978c growingConditions update -1,+0 Partial shade
1207
+ d815819d-61c6-4037-95d3-c503acf52153 growingConditions update -1,+0 Prefers dry conditions
1208
+ 7cf921a0-ee4f-4bd6-a3f2-0fb0fe1a2ac8 plant update -1,+0 Aloe vera
1209
+ 0d94dbf2-89f8-45fb-96d5-175ae1f382ce plant update -1,+0 Areca palm
1210
+ 43a60005-ea92-4b32-9af3-79560e48ecec plant update -1,+0 Boston fern
1211
+ f0cac96c-39a1-4b85-b14b-e8d7d3d08767 plant update -1,+0 Calathea orbifolia
1212
+ d647012b-897e-4b6b-bfb5-b9844ef3d648 plant update -1,+0 Canary Island Date Pal
1213
+ b7129080-692c-4550-9e2b-28f8ec978651 plant update -1,+0 Chinese evergreen
1214
+ a3339124-4340-4f31-a209-5a6413a89f15 plant update -1,+0 Chinese money plant
1215
+ 8c284599-b615-40a7-9d26-0ddd586fff51 plant update -1,+0 Dracaena fragrans
1216
+ 329e3104-332f-48a4-b43a-de852df796b3 plant update -1,+0 Elephant ear
1217
+ 504f7b7f-af03-4711-94ca-07edb90fbe00 plant update -1,+0 Heartleaf philodendron
1218
+ a9a537e8-5508-4166-878c-d5fcd0d9a723 plant update -1,+0 Maidenhair fern
1219
+ 9a3cc767-8fc1-4ee5-83e1-63c14a508c69 plant update -1,+0 Parlour palm
1220
+ ee488c3b-a3a3-4b9c-a3ad-c5a5bdc7e317 plant update -1,+0 Peace lily
1221
+ 6a71a864-6f61-471a-8cdd-f80237408666 plant update -1,+0 Pink moth orchid
1222
+ 50868245-3e53-4d9f-86ed-403593da67f6 plant update -1,+0 Ponytail palm
1223
+ 4f05979f-d8cf-4568-9045-05731a33f243 plant update -1,+0 Spider plant
1224
+ 76a16c87-5e6d-465b-a343-3f14cf2fea0a plant update -1,+0 String of nickels
1225
+ 61a2af3a-332c-453c-b9f6-1851d9b7d936 plant update -1,+0 Swiss cheese plant
1226
+ 8174fb53-b955-4e36-8f87-646bf286e396 plant update -1,+0 Variegated snake plant
1227
+
1228
+ - and 15 more...
1176
1229
 
1177
- plantGenus Alocasia
1178
- fa464489-6476-4694-b3d4-e77d0c00a185 error
1179
- [cli] ❌ Content type 'plantGenus' does not exist in project 'website'
1230
+ --------------------------------------------
1231
+ [26/11 02:16:30] [OK] Done migrating entries
1180
1232
 
1181
- plantGenus Aloe
1182
- 309d5fd7-a21f-45a8-8abb-f01f820b8f16 error
1183
- [cli] ❌ Content type 'plantGenus' does not exist in project 'website'
1233
+ [cli] ⏩ import from project leif to website
1184
1234
 
1185
- plantGenus Beaucarnea
1186
- 4ebdcc63-929f-4b06-8848-fe046468a63d error
1187
- [cli] Content type 'plantGenus' does not exist in project 'website'
1235
+ - growingConditions: 4 [existing: 100%] [needs update: 100%]
1236
+ - image: 66 up to date
1237
+ - plant: 21 [existing: 100%] [needs update: 100%]
1238
+ - plantGenus: 4 [existing: 0%]
1239
+ - plantType: 5 up to date
1240
+ - pot: 12 [existing: 100%] [needs update: 100%]
1241
+ - tag: 1 up to date
1242
+ - totalCount: 37
1243
+ - errors: 1
1188
1244
 
1245
+ [cli] ❌ Content type 'plantGenus' does not exist in project 'website'
1189
1246
 
1190
- plantType Ferns
1191
- 90e128f5-582c-4430-a232-72022271ec8b no change
1192
- plantType Foliage
1193
- 25f5a78b-9274-4cc9-9a58-03d8dcd4cd17 no change
1194
- plantType Orchids
1195
- 44abca5b-a49b-48a1-8823-811ab31983c0 no change
1196
- plantType Palm
1197
- d66447c5-2198-4b19-bad3-c921e9ef0db0 no change
1198
- plantType Succulents
1199
- 70149568-9725-4c39-8ff5-ef69221a0899 no change
1200
-
1201
- pot Barro decorated terracotta pot
1202
- fa67e1c6-0637-4548-bd4f-c207ec62af0e no change
1203
- pot Bianco white pot
1204
- e3b7907c-f524-45e4-ba5f-e62d1557b477 no change
1205
- pot Canasta mid-sized pot
1206
- 058b20ba-99f7-49ec-9017-a0df35b00dcc no change
1207
- pot Geo mid-sized pot
1208
- dafc4810-a62e-43e5-a056-ab1248181eaf no change
1209
- pot Grå small grey pot
1210
- f2022069-7a92-491d-b197-a3564ab9a8ca no change
1211
-
1212
- tag Promoted
1213
- 3659a333-8d10-4325-9ea6-2f49ae47e7fe no change
1247
+ [cli] ❌ [example-dev] Unable to import entries
1214
1248
 
1215
1249
  website t.durden@example-dev>
1216
1250
  ```
@@ -1224,3 +1258,59 @@ website t.durden@example-dev> import entries --preserve-guids --from-file ./cont
1224
1258
  The output will be the same as the previous command
1225
1259
 
1226
1260
  <sup><sub>Add the `--commit` option to make the changes, be very careful using this! There is no going back</sub></sup>
1261
+
1262
+ ## Remove entries
1263
+
1264
+ Delete entries by id
1265
+
1266
+ ```shell
1267
+ website t.durden@example-dev> remove entries a1c25591-8c9b-50e2-96d8-f6c774fcf023 8df914cc-1da1-59d6-86e0-
1268
+ 8ea4ebd99aaa
1269
+ -- PREVIEW --
1270
+ [26/11 02:19:53] [INFO] Fetching initial entries in project 'website'
1271
+ Fetch [website] >> 100% 2 0.0s/0.0s Infinityp/s
1272
+ [26/11 02:19:53] [INFO] Done deleting entries
1273
+
1274
+ a1c25591-8c9b-50e2-96d8-f6c774fcf023 delete homepage Find the perfect plant
1275
+ 8df914cc-1da1-59d6-86e0-8ea4ebd99aaa delete pot Milano dipped pot
1276
+
1277
+ [cli] ⏩ delete from project website
1278
+
1279
+ - totalCount: 2 [to delete: 2]
1280
+
1281
+ [cli] ✅ [example-dev] Will delete entries
1282
+
1283
+ [cli] ⏩ Add --commit flag to commit the previewed changes
1284
+
1285
+ website t.durden@example-dev>
1286
+ ```
1287
+
1288
+ Delete entries with a supplied zenql statement
1289
+
1290
+ ```shell
1291
+ website t.durden@example-dev> remove entries --zenql "sys.version.created > 2022-11-25 14:00"
1292
+ -- PREVIEW --
1293
+ [26/11 02:20:52] [INFO] Fetching initial entries in project 'website'
1294
+ Fetch [website] >> 100% 7 0.0s/0.0s 100000p/s
1295
+ [26/11 02:20:53] [INFO] Done deleting entries
1296
+
1297
+ a1c25591-8c9b-50e2-96d8-f6c774fcf023 delete homepage Find the perfect plant
1298
+ bb850178-c88c-50a6-8bac-844273cb19b8 delete image parlour-palm-white-room
1299
+ 1553d1c8-7a99-5dcd-b1cb-9a90d4cf1985 delete landingPage New subscription service
1300
+ f0b0ef1b-fdd1-52d6-99fc-4439e0c186e6 delete plantGenus Aglaonema
1301
+ f8f6ee36-9cc4-5d1e-be62-01ac73590947 delete plantGenus Aloe
1302
+ 8df914cc-1da1-59d6-86e0-8ea4ebd99aaa delete pot Milano dipped pot
1303
+ 4efeb0e4-dc19-5f87-ab89-47892b9c4169 delete pot Terra large terracotta pot
1304
+
1305
+ [cli] ⏩ delete from project website
1306
+
1307
+ - totalCount: 7 [to delete: 7]
1308
+
1309
+ [cli] ✅ [example-dev] Will delete entries
1310
+
1311
+ [cli] ⏩ Add --commit flag to commit the previewed changes
1312
+
1313
+ website t.durden@example-dev>
1314
+ ```
1315
+
1316
+ <sup><sub>Add the `--commit` option to make the changes, be very careful using this! There is no going back</sub></sup>
@@ -173,7 +173,7 @@ ${import_logger.Logger.errorText(">>")} Available commands:`,
173
173
  },
174
174
  entries: {
175
175
  imported: (env, commit, count) => `[${env}] ${commit ? `Imported` : `Will import`} ${count} entries`,
176
- failedImport: (env) => `[${env}] Unable to delete entries`,
176
+ failedImport: (env) => `[${env}] Unable to import entries`,
177
177
  removed: (env, commit) => `[${env}] ${commit ? `Deleted` : `Will delete`} entries`,
178
178
  failedRemove: (env) => `[${env}] Unable to delete entries`,
179
179
  notFound: (env) => `[${env}] Entries were not found`,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/localisation/en-GB.ts"],
4
- "sourcesContent": ["import {\n BlockRunningStatus,\n MigrateModelsResult,\n MigrateStatus,\n} from 'migratortron';\nimport { Logger } from '~/util/logger';\n\nexport const LogMessages = {\n app: {\n contensis: () => 'Contensis',\n quit: () => `Goodbye \uD83D\uDC4B\\n`,\n startup: (version: string) =>\n `v${version} \u00A9 2001-${new Date().getFullYear()} Zengenti \uD83C\uDDEC\uD83C\uDDE7. \\n - Creators of Contensis and purveyors of other fine software\\n\\n\uD83D\uDC4B Welcome to the contensis-cli\\n`,\n help: () =>\n 'Press [CTRL]+[C] or type \"quit\" to return to your system shell\\nPress [TAB] for suggestions\\n',\n suggestions: () =>\n `\\n${Logger.errorText('>>')} Press [TAB] for suggestions\\n`,\n autocomplete: () => `\\n${Logger.errorText('>>')} Available commands:`,\n unknownError: () => `Something went wrong...`,\n fileOutput: (format = 'json', path?: string) =>\n `Output ${format} file: ${Logger.infoText(path)}\\n`,\n noFileOutput: () => `No output written\\n`,\n },\n command: {\n notKnown: (command: string) => `${command} is not known`,\n },\n envs: {\n found: (num: number) =>\n `environments store found containing ${num} environment${\n num === 1 ? '' : 's'\n }`,\n tip: () =>\n `Connect to a Contensis cloud instance using \"contensis connect {cms alias}\"`,\n },\n connect: {\n command: {\n name: () => 'connect',\n example: () => `Example call:\\n > connect example-dev`,\n },\n args: {\n alias: {\n name: () => '<alias>',\n description: () => 'the Contensis Cloud alias to connect with',\n },\n },\n noEnv: () => `Cannot connect - no environment alias specified`,\n unreachable: (url: string, status: number) =>\n `Cannot reach ${url}${status ? ` - status ${status}` : ''}`,\n connected: (env: string) => `Current environment set to \"${env}\"`,\n help: () =>\n `Connect to a Contensis cloud instance using \"contensis connect {cms alias}\"`,\n projects: () => `Available projects:`,\n noProjects: () => `Cannot retrieve projects list`,\n tip: () =>\n `Introduce yourself with \"login {username}\" or \"login {clientId} -s {secret}\" or by passing credentials as options with your command`,\n },\n login: {\n command: {\n name: () => 'login',\n usage: () => `<user/clientId> [password] [-s <sharedSecret>]`,\n example: () =>\n `Example call:\\n > login myuserid\\n -- or --\\n > login {clientId} -s {sharedSecret}`,\n },\n args: {\n user: {\n name: () => '<user/clientId>',\n description: () => 'the username to login with',\n },\n password: {\n name: () => '[password]',\n description: () =>\n 'the password to use to login with (optional/insecure)',\n },\n secret: {\n name: () => '-s --sharedSecret <sharedSecret>',\n description: () =>\n 'the shared secret to use when logging in with a client id',\n },\n },\n passwordPrompt: (env?: string, userId?: string) =>\n userId\n ? `Enter password for ${userId}@${env}:`\n : `Please enter a password`,\n failed: (env: string, userId: string) =>\n `Unable to login to ${env} as ${userId}`,\n success: (env: string, userId: string) =>\n `User ${userId} connected to ${env} successfully\\n`,\n insecurePassword: () =>\n `Could not connect to local keystore - your password could be stored unencrypted!`,\n noEnv: () => `No environment set, use \"contensis connect {alias}\" first`,\n noUserId: () => `No user id specified`,\n },\n projects: {\n list: () => `Available projects:`,\n noList: () => `Cannot retrieve projects list`,\n set: (projectId: string) =>\n `Current project is set to ${Logger.highlightText(projectId)}`,\n failedSet: (projectId: string) =>\n `Project ${Logger.highlightText(projectId)} not found`,\n tip: () =>\n `You need to set your current working project with \"set project {projectId}\"`,\n created: (env: string, id: string) =>\n `[${env}] Created project ${Logger.highlightText(id)}`,\n failedCreate: (env: string, id: string) =>\n `[${env}] Unable to create project ${Logger.highlightText(id)}`,\n updated: (env: string, id: string) =>\n `[${env}] Updated project ${Logger.highlightText(id)}`,\n failedUpdate: (env: string, id: string) =>\n `[${env}] Unable to update project ${Logger.highlightText(id)}`,\n },\n migrate: {\n models: {\n result: (\n status: keyof MigrateModelsResult['project']['contentTypes']\n ) => {\n switch (status) {\n case 'created':\n case 'updated':\n return Logger.successText;\n case 'errors':\n return Logger.errorText;\n default:\n return Logger.infoText;\n }\n },\n },\n status: (status: MigrateStatus) => {\n switch (status) {\n case 'no change':\n return Logger.successText;\n case 'create':\n case 'two-pass':\n case 'update':\n case 'delete':\n return Logger.warningText;\n case 'error':\n case 'not found':\n return Logger.errorText;\n default:\n return Logger.infoText;\n }\n },\n },\n models: {\n list: (projectId: string) =>\n `Content models in ${Logger.highlightText(projectId)}:`,\n noList: (projectId: string) =>\n `[${projectId}] Cannot retrieve content models`,\n get: (projectId: string, id: string) =>\n `[${projectId}] Content models ${Logger.infoText(`[ ${id} ]`)}`,\n failedGet: (projectId: string, id: string) =>\n `[${projectId}] Unable to get content models ${Logger.highlightText(id)}`,\n },\n contenttypes: {\n list: (projectId: string) =>\n `Content types in ${Logger.highlightText(projectId)}:`,\n get: (projectId: string, id: string) =>\n `[${projectId}] Content type ${Logger.highlightText(id)}`,\n failedGet: (projectId: string, id: string) =>\n `[${projectId}] Unable to get content type ${Logger.highlightText(id)}`,\n created: (projectId: string, id: string, status?: string) =>\n `[${projectId}] Content type ${status}d ${Logger.highlightText(id)}`,\n removed: (env: string, id: string, commit: boolean) =>\n `[${env}] ${\n commit ? `Deleted` : `Will delete`\n } content type ${Logger.highlightText(id)}`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete content type ${Logger.highlightText(id)}`,\n },\n components: {\n list: (projectId: string) =>\n `Components in ${Logger.highlightText(projectId)}:`,\n get: (projectId: string, id: string) =>\n `[${projectId}] Component ${Logger.highlightText(id)}`,\n failedGet: (projectId: string, id: string) =>\n `[${projectId}] Unable to get component ${Logger.highlightText(id)}`,\n created: (projectId: string, id: string, status?: string) =>\n `[${projectId}] Component ${status}d ${Logger.highlightText(id)}`,\n removed: (env: string, id: string, commit: boolean) =>\n `[${env}] ${\n commit ? `Deleted` : `Will delete`\n } component ${Logger.highlightText(id)}`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete component ${Logger.highlightText(id)}`,\n },\n version: {\n set: (env: string, versionStatus: string) =>\n `[${env}] Content version status set to \"${versionStatus}\"`,\n invalid: (versionStatus: string) =>\n `Content version status \"${versionStatus}\" is not valid, allowed values are \"published\" or \"latest\".`,\n noEnv: () =>\n `No Contensis environment set, connect to your Contensis cloud instance using \"contensis connect {cms alias}\"`,\n },\n entries: {\n imported: (env: string, commit: boolean, count: number) =>\n `[${env}] ${commit ? `Imported` : `Will import`} ${count} entries`,\n failedImport: (env: string) => `[${env}] Unable to delete entries`,\n removed: (env: string, commit: boolean) =>\n `[${env}] ${commit ? `Deleted` : `Will delete`} entries`,\n failedRemove: (env: string) => `[${env}] Unable to delete entries`,\n notFound: (env: string) => `[${env}] Entries were not found`,\n commitTip: () => `Add --commit flag to commit the previewed changes`,\n },\n keys: {\n list: (env: string) => `[${env}] API keys:`,\n noList: (env: string) => `[${env}] Cannot retrieve API`,\n created: (env: string, name: string) =>\n `[${env}] Created API key ${Logger.highlightText(name)}`,\n failedCreate: (env: string, name: string) =>\n `[${env}] Unable to create API key ${Logger.highlightText(name)}`,\n removed: (env: string, id: string) =>\n `[${env}] Deleted API key ${Logger.highlightText(id)}`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete API key ${Logger.highlightText(id)}`,\n },\n blocks: {\n runningStatus: (status: BlockRunningStatus | 'broken') => {\n switch (status) {\n case 'available':\n return Logger.successText(status);\n case 'pending':\n case 'starting':\n case 'stopped':\n return Logger.warningText(status);\n case 'degraded':\n case 'faulted':\n case 'broken':\n return Logger.errorText(status);\n default:\n return Logger.infoText(status);\n }\n },\n get: (id: string, env: string, projectId?: string) =>\n `[${env}] Block ${id} in project ${projectId}:`,\n list: (env: string, projectId?: string) =>\n `[${env}] Blocks in project ${projectId}:`,\n noList: (env: string, projectId?: string) =>\n `[${env}] Cannot retrieve blocks in project ${projectId}`,\n getLogs: (id: string, branch: string, env: string, projectId?: string) =>\n `[${env}] Requesting logs from block ${Logger.highlightText(\n id\n )} in branch ${branch} in project ${projectId}`,\n failedGetLogs: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to fetch block logs for ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n tryPush: (id: string, branch: string, env: string, projectId?: string) =>\n `[${env}] Request to push block ${Logger.highlightText(\n id\n )} in branch ${branch} in project ${projectId}`,\n pushed: (id: string, branch: string, env: string, projectId?: string) =>\n `[${env}] Pushed block ${Logger.highlightText(\n id\n )} in branch ${branch} in project ${projectId}`,\n failedPush: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to push block ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n released: (id: string, env: string, projectId?: string) =>\n `[${env}] Released block ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n failedRelease: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to release block ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n deleted: (id: string, env: string, projectId?: string) =>\n `[${env}] Deleted block ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n failedDelete: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to delete block ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n },\n webhooks: {\n list: (env: string) => `[${env}] Webhook subscriptions:`,\n noList: (env: string) => `[${env}] Cannot retrieve webhook subscriptions`,\n created: (env: string, name: string) =>\n `[${env}] Created Webhook subscription ${Logger.highlightText(name)}`,\n failedCreate: (env: string, name: string) =>\n `[${env}] Unable to create Webhook subscription ${Logger.highlightText(\n name\n )}`,\n deleted: (env: string, id: string) =>\n `[${env}] Deleted Webhook subscription ${Logger.highlightText(id)}`,\n failedDelete: (env: string, id: string) =>\n `[${env}] Unable to delete Webhook subscription ${Logger.highlightText(\n id\n )}`,\n },\n};\n"],
4
+ "sourcesContent": ["import {\n BlockRunningStatus,\n MigrateModelsResult,\n MigrateStatus,\n} from 'migratortron';\nimport { Logger } from '~/util/logger';\n\nexport const LogMessages = {\n app: {\n contensis: () => 'Contensis',\n quit: () => `Goodbye \uD83D\uDC4B\\n`,\n startup: (version: string) =>\n `v${version} \u00A9 2001-${new Date().getFullYear()} Zengenti \uD83C\uDDEC\uD83C\uDDE7. \\n - Creators of Contensis and purveyors of other fine software\\n\\n\uD83D\uDC4B Welcome to the contensis-cli\\n`,\n help: () =>\n 'Press [CTRL]+[C] or type \"quit\" to return to your system shell\\nPress [TAB] for suggestions\\n',\n suggestions: () =>\n `\\n${Logger.errorText('>>')} Press [TAB] for suggestions\\n`,\n autocomplete: () => `\\n${Logger.errorText('>>')} Available commands:`,\n unknownError: () => `Something went wrong...`,\n fileOutput: (format = 'json', path?: string) =>\n `Output ${format} file: ${Logger.infoText(path)}\\n`,\n noFileOutput: () => `No output written\\n`,\n },\n command: {\n notKnown: (command: string) => `${command} is not known`,\n },\n envs: {\n found: (num: number) =>\n `environments store found containing ${num} environment${\n num === 1 ? '' : 's'\n }`,\n tip: () =>\n `Connect to a Contensis cloud instance using \"contensis connect {cms alias}\"`,\n },\n connect: {\n command: {\n name: () => 'connect',\n example: () => `Example call:\\n > connect example-dev`,\n },\n args: {\n alias: {\n name: () => '<alias>',\n description: () => 'the Contensis Cloud alias to connect with',\n },\n },\n noEnv: () => `Cannot connect - no environment alias specified`,\n unreachable: (url: string, status: number) =>\n `Cannot reach ${url}${status ? ` - status ${status}` : ''}`,\n connected: (env: string) => `Current environment set to \"${env}\"`,\n help: () =>\n `Connect to a Contensis cloud instance using \"contensis connect {cms alias}\"`,\n projects: () => `Available projects:`,\n noProjects: () => `Cannot retrieve projects list`,\n tip: () =>\n `Introduce yourself with \"login {username}\" or \"login {clientId} -s {secret}\" or by passing credentials as options with your command`,\n },\n login: {\n command: {\n name: () => 'login',\n usage: () => `<user/clientId> [password] [-s <sharedSecret>]`,\n example: () =>\n `Example call:\\n > login myuserid\\n -- or --\\n > login {clientId} -s {sharedSecret}`,\n },\n args: {\n user: {\n name: () => '<user/clientId>',\n description: () => 'the username to login with',\n },\n password: {\n name: () => '[password]',\n description: () =>\n 'the password to use to login with (optional/insecure)',\n },\n secret: {\n name: () => '-s --sharedSecret <sharedSecret>',\n description: () =>\n 'the shared secret to use when logging in with a client id',\n },\n },\n passwordPrompt: (env?: string, userId?: string) =>\n userId\n ? `Enter password for ${userId}@${env}:`\n : `Please enter a password`,\n failed: (env: string, userId: string) =>\n `Unable to login to ${env} as ${userId}`,\n success: (env: string, userId: string) =>\n `User ${userId} connected to ${env} successfully\\n`,\n insecurePassword: () =>\n `Could not connect to local keystore - your password could be stored unencrypted!`,\n noEnv: () => `No environment set, use \"contensis connect {alias}\" first`,\n noUserId: () => `No user id specified`,\n },\n projects: {\n list: () => `Available projects:`,\n noList: () => `Cannot retrieve projects list`,\n set: (projectId: string) =>\n `Current project is set to ${Logger.highlightText(projectId)}`,\n failedSet: (projectId: string) =>\n `Project ${Logger.highlightText(projectId)} not found`,\n tip: () =>\n `You need to set your current working project with \"set project {projectId}\"`,\n created: (env: string, id: string) =>\n `[${env}] Created project ${Logger.highlightText(id)}`,\n failedCreate: (env: string, id: string) =>\n `[${env}] Unable to create project ${Logger.highlightText(id)}`,\n updated: (env: string, id: string) =>\n `[${env}] Updated project ${Logger.highlightText(id)}`,\n failedUpdate: (env: string, id: string) =>\n `[${env}] Unable to update project ${Logger.highlightText(id)}`,\n },\n migrate: {\n models: {\n result: (\n status: keyof MigrateModelsResult['project']['contentTypes']\n ) => {\n switch (status) {\n case 'created':\n case 'updated':\n return Logger.successText;\n case 'errors':\n return Logger.errorText;\n default:\n return Logger.infoText;\n }\n },\n },\n status: (status: MigrateStatus) => {\n switch (status) {\n case 'no change':\n return Logger.successText;\n case 'create':\n case 'two-pass':\n case 'update':\n case 'delete':\n return Logger.warningText;\n case 'error':\n case 'not found':\n return Logger.errorText;\n default:\n return Logger.infoText;\n }\n },\n },\n models: {\n list: (projectId: string) =>\n `Content models in ${Logger.highlightText(projectId)}:`,\n noList: (projectId: string) =>\n `[${projectId}] Cannot retrieve content models`,\n get: (projectId: string, id: string) =>\n `[${projectId}] Content models ${Logger.infoText(`[ ${id} ]`)}`,\n failedGet: (projectId: string, id: string) =>\n `[${projectId}] Unable to get content models ${Logger.highlightText(id)}`,\n },\n contenttypes: {\n list: (projectId: string) =>\n `Content types in ${Logger.highlightText(projectId)}:`,\n get: (projectId: string, id: string) =>\n `[${projectId}] Content type ${Logger.highlightText(id)}`,\n failedGet: (projectId: string, id: string) =>\n `[${projectId}] Unable to get content type ${Logger.highlightText(id)}`,\n created: (projectId: string, id: string, status?: string) =>\n `[${projectId}] Content type ${status}d ${Logger.highlightText(id)}`,\n removed: (env: string, id: string, commit: boolean) =>\n `[${env}] ${\n commit ? `Deleted` : `Will delete`\n } content type ${Logger.highlightText(id)}`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete content type ${Logger.highlightText(id)}`,\n },\n components: {\n list: (projectId: string) =>\n `Components in ${Logger.highlightText(projectId)}:`,\n get: (projectId: string, id: string) =>\n `[${projectId}] Component ${Logger.highlightText(id)}`,\n failedGet: (projectId: string, id: string) =>\n `[${projectId}] Unable to get component ${Logger.highlightText(id)}`,\n created: (projectId: string, id: string, status?: string) =>\n `[${projectId}] Component ${status}d ${Logger.highlightText(id)}`,\n removed: (env: string, id: string, commit: boolean) =>\n `[${env}] ${\n commit ? `Deleted` : `Will delete`\n } component ${Logger.highlightText(id)}`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete component ${Logger.highlightText(id)}`,\n },\n version: {\n set: (env: string, versionStatus: string) =>\n `[${env}] Content version status set to \"${versionStatus}\"`,\n invalid: (versionStatus: string) =>\n `Content version status \"${versionStatus}\" is not valid, allowed values are \"published\" or \"latest\".`,\n noEnv: () =>\n `No Contensis environment set, connect to your Contensis cloud instance using \"contensis connect {cms alias}\"`,\n },\n entries: {\n imported: (env: string, commit: boolean, count: number) =>\n `[${env}] ${commit ? `Imported` : `Will import`} ${count} entries`,\n failedImport: (env: string) => `[${env}] Unable to import entries`,\n removed: (env: string, commit: boolean) =>\n `[${env}] ${commit ? `Deleted` : `Will delete`} entries`,\n failedRemove: (env: string) => `[${env}] Unable to delete entries`,\n notFound: (env: string) => `[${env}] Entries were not found`,\n commitTip: () => `Add --commit flag to commit the previewed changes`,\n },\n keys: {\n list: (env: string) => `[${env}] API keys:`,\n noList: (env: string) => `[${env}] Cannot retrieve API`,\n created: (env: string, name: string) =>\n `[${env}] Created API key ${Logger.highlightText(name)}`,\n failedCreate: (env: string, name: string) =>\n `[${env}] Unable to create API key ${Logger.highlightText(name)}`,\n removed: (env: string, id: string) =>\n `[${env}] Deleted API key ${Logger.highlightText(id)}`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete API key ${Logger.highlightText(id)}`,\n },\n blocks: {\n runningStatus: (status: BlockRunningStatus | 'broken') => {\n switch (status) {\n case 'available':\n return Logger.successText(status);\n case 'pending':\n case 'starting':\n case 'stopped':\n return Logger.warningText(status);\n case 'degraded':\n case 'faulted':\n case 'broken':\n return Logger.errorText(status);\n default:\n return Logger.infoText(status);\n }\n },\n get: (id: string, env: string, projectId?: string) =>\n `[${env}] Block ${id} in project ${projectId}:`,\n list: (env: string, projectId?: string) =>\n `[${env}] Blocks in project ${projectId}:`,\n noList: (env: string, projectId?: string) =>\n `[${env}] Cannot retrieve blocks in project ${projectId}`,\n getLogs: (id: string, branch: string, env: string, projectId?: string) =>\n `[${env}] Requesting logs from block ${Logger.highlightText(\n id\n )} in branch ${branch} in project ${projectId}`,\n failedGetLogs: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to fetch block logs for ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n tryPush: (id: string, branch: string, env: string, projectId?: string) =>\n `[${env}] Request to push block ${Logger.highlightText(\n id\n )} in branch ${branch} in project ${projectId}`,\n pushed: (id: string, branch: string, env: string, projectId?: string) =>\n `[${env}] Pushed block ${Logger.highlightText(\n id\n )} in branch ${branch} in project ${projectId}`,\n failedPush: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to push block ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n released: (id: string, env: string, projectId?: string) =>\n `[${env}] Released block ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n failedRelease: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to release block ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n deleted: (id: string, env: string, projectId?: string) =>\n `[${env}] Deleted block ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n failedDelete: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to delete block ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n },\n webhooks: {\n list: (env: string) => `[${env}] Webhook subscriptions:`,\n noList: (env: string) => `[${env}] Cannot retrieve webhook subscriptions`,\n created: (env: string, name: string) =>\n `[${env}] Created Webhook subscription ${Logger.highlightText(name)}`,\n failedCreate: (env: string, name: string) =>\n `[${env}] Unable to create Webhook subscription ${Logger.highlightText(\n name\n )}`,\n deleted: (env: string, id: string) =>\n `[${env}] Deleted Webhook subscription ${Logger.highlightText(id)}`,\n failedDelete: (env: string, id: string) =>\n `[${env}] Unable to delete Webhook subscription ${Logger.highlightText(\n id\n )}`,\n },\n};\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,oBAAuB;AAEhB,MAAM,cAAc;AAAA,EACzB,KAAK;AAAA,IACH,WAAW,MAAM;AAAA,IACjB,MAAM,MAAM;AAAA;AAAA,IACZ,SAAS,CAAC,YACR,IAAI,qBAAkB,IAAI,KAAK,EAAE,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA,IAC/C,MAAM,MACJ;AAAA,IACF,aAAa,MACX;AAAA,EAAK,qBAAO,UAAU,IAAI;AAAA;AAAA,IAC5B,cAAc,MAAM;AAAA,EAAK,qBAAO,UAAU,IAAI;AAAA,IAC9C,cAAc,MAAM;AAAA,IACpB,YAAY,CAAC,SAAS,QAAQ,SAC5B,UAAU,gBAAgB,qBAAO,SAAS,IAAI;AAAA;AAAA,IAChD,cAAc,MAAM;AAAA;AAAA,EACtB;AAAA,EACA,SAAS;AAAA,IACP,UAAU,CAAC,YAAoB,GAAG;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AAO;AAAA,MACvC;AAAA,IACF,eAAe,qBAAqB;AAAA,IACtC,QAAQ,CAAC,IAAY,QAAgB,KAAa,cAChD,IAAI,qBAAqB,qBAAO;AAAA,MAC9B;AAAA,IACF,eAAe,qBAAqB;AAAA,IACtC,YAAY,CAAC,IAAY,KAAa,cACpC,IAAI,6BAA6B,qBAAO;AAAA,MACtC;AAAA,IACF,gBAAgB;AAAA,IAClB,UAAU,CAAC,IAAY,KAAa,cAClC,IAAI,uBAAuB,qBAAO;AAAA,MAChC;AAAA,IACF,gBAAgB;AAAA,IAClB,eAAe,CAAC,IAAY,KAAa,cACvC,IAAI,gCAAgC,qBAAO;AAAA,MACzC;AAAA,IACF,gBAAgB;AAAA,IAClB,SAAS,CAAC,IAAY,KAAa,cACjC,IAAI,sBAAsB,qBAAO;AAAA,MAC/B;AAAA,IACF,gBAAgB;AAAA,IAClB,cAAc,CAAC,IAAY,KAAa,cACtC,IAAI,+BAA+B,qBAAO;AAAA,MACxC;AAAA,IACF,gBAAgB;AAAA,EACpB;AAAA,EACA,UAAU;AAAA,IACR,MAAM,CAAC,QAAgB,IAAI;AAAA,IAC3B,QAAQ,CAAC,QAAgB,IAAI;AAAA,IAC7B,SAAS,CAAC,KAAa,SACrB,IAAI,qCAAqC,qBAAO,cAAc,IAAI;AAAA,IACpE,cAAc,CAAC,KAAa,SAC1B,IAAI,8CAA8C,qBAAO;AAAA,MACvD;AAAA,IACF;AAAA,IACF,SAAS,CAAC,KAAa,OACrB,IAAI,qCAAqC,qBAAO,cAAc,EAAE;AAAA,IAClE,cAAc,CAAC,KAAa,OAC1B,IAAI,8CAA8C,qBAAO;AAAA,MACvD;AAAA,IACF;AAAA,EACJ;AACF;",
6
6
  "names": []
7
7
  }
@@ -93,18 +93,6 @@ class ContensisCli {
93
93
  };
94
94
  }
95
95
  }
96
- get contentTypes() {
97
- var _a;
98
- return (_a = this.contensis) == null ? void 0 : _a.models.contentTypes();
99
- }
100
- get components() {
101
- var _a;
102
- return (_a = this.contensis) == null ? void 0 : _a.models.components();
103
- }
104
- get models() {
105
- var _a;
106
- return (_a = this.contensis) == null ? void 0 : _a.models.contentModels();
107
- }
108
96
  constructor(args, outputOpts, contensisOpts = {}) {
109
97
  const [exe, script, verb = "", noun = "", ...restArgs] = args;
110
98
  this.verb = verb == null ? void 0 : verb.toLowerCase();
@@ -548,19 +536,6 @@ class ContensisCli {
548
536
  return false;
549
537
  }
550
538
  };
551
- HydrateContensis = async () => {
552
- const { log } = this;
553
- const contensis = await this.ConnectContensis();
554
- if (contensis) {
555
- const [contensisErr, models] = await (0, import_await_to_js.default)(
556
- contensis.models.HydrateContensisRepositories()
557
- );
558
- if (contensisErr) {
559
- log.error(contensisErr.message);
560
- return contensisErr;
561
- }
562
- }
563
- };
564
539
  PrintApiKeys = async () => {
565
540
  const { currentEnv, log, messages } = this;
566
541
  const contensis = await this.ConnectContensis();
@@ -662,22 +637,13 @@ class ContensisCli {
662
637
  }
663
638
  }
664
639
  };
665
- GetContentTypes = async () => {
666
- const { currentProject, log, messages } = this;
667
- let err;
668
- if (!this.contensis)
669
- err = await this.HydrateContensis();
670
- if (err)
671
- log.error(messages.models.noList(currentProject));
672
- if (!this.contensis)
673
- log.warning(messages.models.noList(currentProject));
674
- return this.contensis;
675
- };
676
640
  PrintContentModels = async (modelIds = []) => {
677
641
  const { currentProject, log, messages } = this;
678
- const contensis = await this.GetContentTypes();
642
+ const contensis = await this.ConnectContensis();
679
643
  if (contensis) {
680
- const { models, contentTypes = [], components = [] } = this;
644
+ const models = await contensis.models.contentModels();
645
+ const contentTypes = await contensis.models.contentTypes();
646
+ const components = await contensis.models.components();
681
647
  const returnModels = (modelIds == null ? void 0 : modelIds.length) ? models == null ? void 0 : models.filter(
682
648
  (m) => modelIds.some((id) => id.toLowerCase() === m.id.toLowerCase())
683
649
  ) : void 0;
@@ -699,8 +665,12 @@ class ContensisCli {
699
665
  )
700
666
  );
701
667
  const contentModelBackup = [
702
- ...contentTypes.filter((c) => contentTypeIds.includes(c.id)),
703
- ...components.filter((c) => componentIds.includes(c.id))
668
+ ...contentTypes.filter(
669
+ (c) => contentTypeIds.map((i) => i.toLowerCase()).includes(c.id.toLowerCase())
670
+ ),
671
+ ...components.filter(
672
+ (c) => componentIds.map((i) => i.toLowerCase()).includes(c.id.toLowerCase())
673
+ )
704
674
  ];
705
675
  if (Array.isArray(returnModels)) {
706
676
  log.success(messages.models.list(currentProject));
@@ -800,9 +770,9 @@ Components:`));
800
770
  };
801
771
  PrintContentTypes = async () => {
802
772
  const { currentProject, log, messages } = this;
803
- await this.GetContentTypes();
804
- if (this.contensis) {
805
- const { contentTypes } = this;
773
+ const contensis = await this.ConnectContensis();
774
+ if (contensis) {
775
+ const contentTypes = await contensis.models.contentTypes();
806
776
  if (Array.isArray(contentTypes)) {
807
777
  log.success(messages.contenttypes.list(currentProject));
808
778
  this.HandleFormattingAndOutput(contentTypes, () => {
@@ -819,9 +789,9 @@ Components:`));
819
789
  };
820
790
  PrintContentType = async (contentTypeId) => {
821
791
  const { currentProject, log, messages } = this;
822
- await this.GetContentTypes();
823
- if (this.contensis) {
824
- const { contentTypes } = this;
792
+ const contensis = await this.ConnectContensis();
793
+ if (contensis) {
794
+ const contentTypes = await contensis.models.contentTypes();
825
795
  if (Array.isArray(contentTypes)) {
826
796
  const contentType = contentTypes.find(
827
797
  (c) => c.id.toLowerCase() === contentTypeId.toLowerCase()
@@ -950,9 +920,9 @@ Components:`));
950
920
  };
951
921
  PrintComponents = async () => {
952
922
  const { currentProject, log, messages } = this;
953
- await this.GetContentTypes();
954
- if (this.contensis) {
955
- const { components } = this;
923
+ const contensis = await this.ConnectContensis();
924
+ if (contensis) {
925
+ const components = await contensis.models.components();
956
926
  if (Array.isArray(components)) {
957
927
  log.success(messages.components.list(currentProject));
958
928
  this.HandleFormattingAndOutput(components, () => {
@@ -969,9 +939,9 @@ Components:`));
969
939
  };
970
940
  PrintComponent = async (componentId) => {
971
941
  const { currentProject, log, messages } = this;
972
- await this.GetContentTypes();
973
- if (this.contensis) {
974
- const { components } = this;
942
+ const contensis = await this.ConnectContensis();
943
+ if (contensis) {
944
+ const components = await contensis.models.components();
975
945
  if (Array.isArray(components)) {
976
946
  const component = components.find(
977
947
  (c) => c.id.toLowerCase() === componentId.toLowerCase()
@@ -1117,7 +1087,7 @@ Components:`));
1117
1087
  fromFile,
1118
1088
  logOutput
1119
1089
  }) => {
1120
- var _a, _b, _c, _d;
1090
+ var _a, _b, _c, _d, _e;
1121
1091
  const { currentEnv, currentProject, log, messages } = this;
1122
1092
  const contensis = await this.ConnectContensisImport({
1123
1093
  commit,
@@ -1141,12 +1111,12 @@ Components:`));
1141
1111
  showChangedEntries: logOutput === "changes"
1142
1112
  });
1143
1113
  });
1144
- if (!err && (!commit && result.entriesToMigrate[currentProject].totalCount || commit && (((_a = result.migrateResult) == null ? void 0 : _a.created) || ((_b = result.migrateResult) == null ? void 0 : _b.updated)))) {
1114
+ if (!err && !((_a = result.errors) == null ? void 0 : _a.length) && (!commit && result.entriesToMigrate[currentProject].totalCount || commit && (((_b = result.migrateResult) == null ? void 0 : _b.created) || ((_c = result.migrateResult) == null ? void 0 : _c.updated)))) {
1145
1115
  log.success(
1146
1116
  messages.entries.imported(
1147
1117
  currentEnv,
1148
1118
  commit,
1149
- commit ? (((_c = result.migrateResult) == null ? void 0 : _c.created) || 0) + (((_d = result.migrateResult) == null ? void 0 : _d.updated) || 0) : result.entriesToMigrate[currentProject].totalCount
1119
+ commit ? (((_d = result.migrateResult) == null ? void 0 : _d.created) || 0) + (((_e = result.migrateResult) == null ? void 0 : _e.updated) || 0) : result.entriesToMigrate[currentProject].totalCount
1150
1120
  )
1151
1121
  );
1152
1122
  if (!commit) {