contensis-cli 1.0.0-beta.37 ā 1.0.0-beta.38
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/dist/localisation/en-GB.js +1 -1
- package/dist/localisation/en-GB.js.map +2 -2
- package/dist/shell.js +2 -1
- package/dist/shell.js.map +2 -2
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
- package/src/localisation/en-GB.ts +2 -2
- package/src/shell.ts +2 -1
- package/src/version.ts +1 -1
|
@@ -27,7 +27,7 @@ const LogMessages = {
|
|
|
27
27
|
contensis: () => "Contensis",
|
|
28
28
|
quit: () => `Goodbye \u{1F44B}
|
|
29
29
|
`,
|
|
30
|
-
startup: () =>
|
|
30
|
+
startup: (version) => `v${version} \xA9 2001-${new Date().getFullYear()} Zengenti \u{1F1EC}\u{1F1E7}.
|
|
31
31
|
- Creators of Contensis and purveyors of other fine software
|
|
32
32
|
|
|
33
33
|
\u{1F44B} Welcome to the contensis-cli
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/localisation/en-GB.ts"],
|
|
4
|
-
"sourcesContent": ["import { BlockRunningStatus, MigrateStatus } from 'migratortron';\nimport { Logger } from '~/util/logger';\n\nexport const LogMessages = {\n app: {\n contensis: () => 'Contensis',\n quit: () => `Goodbye \uD83D\uDC4B\\n`,\n startup: () =>\n `\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) => `Current project is set to \"${projectId}\"`,\n failedSet: (projectId: string) => `Project \"${projectId}\" not found`,\n tip: () =>\n `You need to set your current working project with \"set project {projectId}\"`,\n },\n contenttypes: {\n list: (projectId: string) => `Content types in \"${projectId}\":`,\n noList: (projectId: string) =>\n `[${projectId}] Cannot retrieve content types list`,\n get: (projectId: string, contentTypeId: string) =>\n `[${projectId}] Content type \"${contentTypeId}\"`,\n failedGet: (projectId: string, contentTypeId: string) =>\n `[${projectId}] Unable to get content type \"${contentTypeId}\"`,\n created: (projectId: string, componentId: string, status?: string) =>\n `[${projectId}] Content type ${status}d \"${componentId}\"`,\n removed: (env: string, id: string, commit: boolean) =>\n `[${env}] ${commit ? `Deleted` : `Will delete`} content type \"${id}\"`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete content type \"${id}\"`,\n },\n components: {\n list: (projectId: string) => `Components in \"${projectId}\":`,\n noList: (projectId: string) =>\n `[${projectId}] Cannot retrieve components list`,\n get: (projectId: string, componentId: string) =>\n `[${projectId}] Component \"${componentId}\"`,\n failedGet: (projectId: string, componentId: string) =>\n `[${projectId}] Unable to get component \"${componentId}\"`,\n created: (projectId: string, componentId: string, status?: string) =>\n `[${projectId}] Component ${status}d \"${componentId}\"`,\n removed: (env: string, id: string, commit: boolean) =>\n `[${env}] ${commit ? `Deleted` : `Will delete`} component \"${id}\"`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete component \"${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 migrateStatus: (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 removed: (env: string, id: string, commit: boolean) =>\n `[${env}] ${commit ? `Deleted` : `Will delete`} entry \"${id}\"`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete entry \"${id}\"`,\n notFound: (id: string) => `Entry \"${id}\" 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 \"${name}\"`,\n failedCreate: (env: string, name: string) =>\n `[${env}] Unable to create API key \"${name}\"`,\n removed: (env: string, id: string) => `[${env}] Deleted API key \"${id}\"`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete API key \"${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 \"${id}\" in branch ${branch} in project ${projectId}`,\n failedGetLogs: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to fetch block logs for \"${id}\" in project ${projectId}`,\n tryPush: (id: string, branch: string, env: string, projectId?: string) =>\n `[${env}] Request to push block \"${id}\" in branch ${branch} in project ${projectId}`,\n pushed: (id: string, branch: string, env: string, projectId?: string) =>\n `[${env}] Pushed block \"${id}\" in branch ${branch} in project ${projectId}`,\n failedPush: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to push block \"${id}\" in project ${projectId}`,\n released: (id: string, env: string, projectId?: string) =>\n `[${env}] Released block \"${id}\" in project ${projectId}`,\n failedRelease: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to release block \"${id}\" in project ${projectId}`,\n deleted: (id: string, env: string, projectId?: string) =>\n `[${env}] Deleted block \"${id}\" in project ${projectId}`,\n failedDelete: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to delete block \"${id}\" 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 \"${name}\"`,\n failedCreate: (env: string, name: string) =>\n `[${env}] Unable to create Webhook subscription \"${name}\"`,\n deleted: (env: string, id: string) =>\n `[${env}] Deleted Webhook subscription \"${id}\"`,\n failedDelete: (env: string, id: string) =>\n `[${env}] Unable to delete Webhook subscription \"${id}\"`,\n },\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAuB;AAEhB,MAAM,cAAc;AAAA,EACzB,KAAK;AAAA,IACH,WAAW,MAAM;AAAA,IACjB,MAAM,MAAM;AAAA;AAAA,IACZ,SAAS,
|
|
4
|
+
"sourcesContent": ["import { BlockRunningStatus, MigrateStatus } 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) => `Current project is set to \"${projectId}\"`,\n failedSet: (projectId: string) => `Project \"${projectId}\" not found`,\n tip: () =>\n `You need to set your current working project with \"set project {projectId}\"`,\n },\n contenttypes: {\n list: (projectId: string) => `Content types in \"${projectId}\":`,\n noList: (projectId: string) =>\n `[${projectId}] Cannot retrieve content types list`,\n get: (projectId: string, contentTypeId: string) =>\n `[${projectId}] Content type \"${contentTypeId}\"`,\n failedGet: (projectId: string, contentTypeId: string) =>\n `[${projectId}] Unable to get content type \"${contentTypeId}\"`,\n created: (projectId: string, componentId: string, status?: string) =>\n `[${projectId}] Content type ${status}d \"${componentId}\"`,\n removed: (env: string, id: string, commit: boolean) =>\n `[${env}] ${commit ? `Deleted` : `Will delete`} content type \"${id}\"`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete content type \"${id}\"`,\n },\n components: {\n list: (projectId: string) => `Components in \"${projectId}\":`,\n noList: (projectId: string) =>\n `[${projectId}] Cannot retrieve components list`,\n get: (projectId: string, componentId: string) =>\n `[${projectId}] Component \"${componentId}\"`,\n failedGet: (projectId: string, componentId: string) =>\n `[${projectId}] Unable to get component \"${componentId}\"`,\n created: (projectId: string, componentId: string, status?: string) =>\n `[${projectId}] Component ${status}d \"${componentId}\"`,\n removed: (env: string, id: string, commit: boolean) =>\n `[${env}] ${commit ? `Deleted` : `Will delete`} component \"${id}\"`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete component \"${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 migrateStatus: (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 removed: (env: string, id: string, commit: boolean) =>\n `[${env}] ${commit ? `Deleted` : `Will delete`} entry \"${id}\"`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete entry \"${id}\"`,\n notFound: (id: string) => `Entry \"${id}\" 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 \"${name}\"`,\n failedCreate: (env: string, name: string) =>\n `[${env}] Unable to create API key \"${name}\"`,\n removed: (env: string, id: string) => `[${env}] Deleted API key \"${id}\"`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete API key \"${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 \"${id}\" in branch ${branch} in project ${projectId}`,\n failedGetLogs: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to fetch block logs for \"${id}\" in project ${projectId}`,\n tryPush: (id: string, branch: string, env: string, projectId?: string) =>\n `[${env}] Request to push block \"${id}\" in branch ${branch} in project ${projectId}`,\n pushed: (id: string, branch: string, env: string, projectId?: string) =>\n `[${env}] Pushed block \"${id}\" in branch ${branch} in project ${projectId}`,\n failedPush: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to push block \"${id}\" in project ${projectId}`,\n released: (id: string, env: string, projectId?: string) =>\n `[${env}] Released block \"${id}\" in project ${projectId}`,\n failedRelease: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to release block \"${id}\" in project ${projectId}`,\n deleted: (id: string, env: string, projectId?: string) =>\n `[${env}] Deleted block \"${id}\" in project ${projectId}`,\n failedDelete: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to delete block \"${id}\" 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 \"${name}\"`,\n failedCreate: (env: string, name: string) =>\n `[${env}] Unable to create Webhook subscription \"${name}\"`,\n deleted: (env: string, id: string) =>\n `[${env}] Deleted Webhook subscription \"${id}\"`,\n failedDelete: (env: string, id: string) =>\n `[${env}] Unable to delete Webhook subscription \"${id}\"`,\n },\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,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,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AAA,IAChC,QAAQ,CAAC,KAAa,cACpB,IAAI,0CAA0C;AAAA,IAChD,SAAS,CAAC,IAAY,QAAgB,KAAa,cACjD,IAAI,oCAAoC,iBAAiB,qBAAqB;AAAA,IAChF,eAAe,CAAC,IAAY,KAAa,cACvC,IAAI,wCAAwC,kBAAkB;AAAA,IAChE,SAAS,CAAC,IAAY,QAAgB,KAAa,cACjD,IAAI,+BAA+B,iBAAiB,qBAAqB;AAAA,IAC3E,QAAQ,CAAC,IAAY,QAAgB,KAAa,cAChD,IAAI,sBAAsB,iBAAiB,qBAAqB;AAAA,IAClE,YAAY,CAAC,IAAY,KAAa,cACpC,IAAI,8BAA8B,kBAAkB;AAAA,IACtD,UAAU,CAAC,IAAY,KAAa,cAClC,IAAI,wBAAwB,kBAAkB;AAAA,IAChD,eAAe,CAAC,IAAY,KAAa,cACvC,IAAI,iCAAiC,kBAAkB;AAAA,IACzD,SAAS,CAAC,IAAY,KAAa,cACjC,IAAI,uBAAuB,kBAAkB;AAAA,IAC/C,cAAc,CAAC,IAAY,KAAa,cACtC,IAAI,gCAAgC,kBAAkB;AAAA,EAC1D;AAAA,EACA,UAAU;AAAA,IACR,MAAM,CAAC,QAAgB,IAAI;AAAA,IAC3B,QAAQ,CAAC,QAAgB,IAAI;AAAA,IAC7B,SAAS,CAAC,KAAa,SACrB,IAAI,sCAAsC;AAAA,IAC5C,cAAc,CAAC,KAAa,SAC1B,IAAI,+CAA+C;AAAA,IACrD,SAAS,CAAC,KAAa,OACrB,IAAI,sCAAsC;AAAA,IAC5C,cAAc,CAAC,KAAa,OAC1B,IAAI,+CAA+C;AAAA,EACvD;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/shell.js
CHANGED
|
@@ -37,6 +37,7 @@ var import_logger = require("./util/logger");
|
|
|
37
37
|
var import_CredentialProvider = __toESM(require("./providers/CredentialProvider"));
|
|
38
38
|
var import_ContensisCliService = __toESM(require("./services/ContensisCliService"));
|
|
39
39
|
var import_util = require("./util");
|
|
40
|
+
var import_version = require("./version");
|
|
40
41
|
class ContensisShell {
|
|
41
42
|
currentEnvironment;
|
|
42
43
|
emptyInputCounter = 0;
|
|
@@ -83,7 +84,7 @@ class ContensisShell {
|
|
|
83
84
|
return;
|
|
84
85
|
}
|
|
85
86
|
console.log(log.successText(data));
|
|
86
|
-
console.log(log.infoText(messages.app.startup()));
|
|
87
|
+
console.log(log.infoText(messages.app.startup(import_version.LIB_VERSION)));
|
|
87
88
|
console.log(log.helpText(messages.app.help()));
|
|
88
89
|
this.start().catch((ex) => log.error(ex));
|
|
89
90
|
}
|
package/dist/shell.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/shell.ts"],
|
|
4
|
-
"sourcesContent": ["import path from 'path';\nimport figlet from 'figlet';\nimport inquirer from 'inquirer';\nimport inquirerPrompt from 'inquirer-command-prompt';\nimport commands from './commands';\nimport { LogMessages } from './localisation/en-GB';\nimport { logError, Logger } from './util/logger';\nimport CredentialProvider from './providers/CredentialProvider';\nimport ContensisCli, { cliCommand } from './services/ContensisCliService';\nimport { Logging } from './util';\n\nclass ContensisShell {\n private currentEnvironment!: string;\n private emptyInputCounter: number = 0;\n private env!: EnvironmentCache;\n private firstStart = true;\n private userId: string = '';\n private log = Logger;\n private messages = LogMessages;\n\n private refreshEnvironment = () => {\n // Reload any persisted changes from the disk cache\n const {\n cache: { currentEnvironment = '', environments = {} },\n } = new ContensisCli([]);\n // console.log(`refreshing env w/${currentEnvironment}`);\n this.currentEnvironment = currentEnvironment;\n this.env = environments[currentEnvironment];\n\n // Reload logging here to support changing language\n Logging('en-GB').then(({ messages, Log }) => {\n this.log = Log;\n this.messages = messages;\n });\n };\n\n constructor() {\n this.refreshEnvironment();\n inquirerPrompt.setConfig({\n history: {\n save: true,\n folder: path.join(process.cwd(), '../'),\n limit: 100,\n blacklist: ['quit'],\n },\n });\n // inquirer.registerPrompt('command', inquirerPrompt);\n\n const { log, messages } = this;\n\n figlet.text(\n messages.app.contensis(),\n {\n font: 'Block',\n horizontalLayout: 'default',\n verticalLayout: 'default',\n width: process.stdout.columns,\n whitespaceBreak: true,\n },\n (err, data) => {\n if (err) {\n log.error(messages.app.unknownError());\n console.dir(err);\n return;\n }\n console.log(log.successText(data));\n console.log(log.infoText(messages.app.startup()));\n console.log(log.helpText(messages.app.help()));\n\n this.start().catch(ex => log.error(ex));\n }\n );\n }\n\n restart = async () => {\n this.firstStart = false;\n this.log.line(); // add a line so we can see where the shell has been restarted\n await this.start();\n };\n\n start = async () => {\n this.refreshEnvironment();\n this.userId = '';\n const { currentEnvironment, env, log, messages } = this;\n\n if (env?.lastUserId) {\n const [credsErr, credentials] = await new CredentialProvider(\n {\n userId: env.lastUserId,\n alias: currentEnvironment,\n },\n env.passwordFallback\n ).Init();\n if (credsErr && !credentials.current) {\n log.error(credsErr.message);\n }\n if (credentials.current) {\n if (this.firstStart) {\n const token = await cliCommand(['login', env.lastUserId]).Login(\n env.lastUserId,\n {\n promptPassword: false,\n silent: true,\n }\n );\n if (token) {\n this.userId = env.lastUserId;\n if (!env.currentProject) log.warning(messages.projects.tip());\n }\n this.firstStart = false;\n this.refreshEnvironment();\n } else {\n this.userId = env.lastUserId;\n }\n }\n }\n await this.contensisPrompt();\n };\n\n contensisPrompt = async (): Promise<any> => {\n const { currentEnvironment, env, log, messages, userId } = this;\n\n const availableCommands = [\n {\n filter: (str: string) => {\n return str.replace(/ \\[.*$/, '');\n },\n },\n 'connect',\n 'list envs',\n 'quit',\n ];\n\n if (currentEnvironment)\n availableCommands.push('login', 'list projects', 'set project');\n if (userId)\n availableCommands.push(\n 'get block',\n 'get block logs',\n 'get contenttype',\n 'get component',\n 'get entries',\n 'get version',\n 'import contenttypes',\n 'import components',\n 'import entries',\n 'list blocks',\n 'list contenttypes',\n 'list components',\n 'list models',\n 'list keys',\n 'list webhooks',\n 'create key',\n 'push block',\n 'release block',\n 'remove key',\n 'remove entry',\n 'remove contenttypes',\n 'remove components'\n );\n\n const prompt = inquirer.createPromptModule();\n prompt.registerPrompt('command', inquirerPrompt);\n return prompt([\n {\n type: 'command',\n name: 'cmd',\n autoCompletion: availableCommands,\n autocompletePrompt: log.infoText(messages.app.autocomplete()),\n message: `${userId ? `${userId}@` : ''}${currentEnvironment || ''}>`,\n context: 0,\n validate: (val: string) => {\n if (!val) this.emptyInputCounter++;\n if (this.emptyInputCounter > 1)\n console.log(this.log.infoText(this.messages.app.suggestions()));\n if (val) {\n this.emptyInputCounter = 0;\n return true;\n }\n },\n prefix: `${env?.currentProject || log.infoText('contensis')}`,\n short: true,\n },\n ])\n .then(async (answers: { cmd: string }) => {\n if (answers.cmd === 'quit') {\n this.quit();\n } else {\n try {\n if (answers.cmd) {\n const program = commands();\n await program.parseAsync(\n answers.cmd\n .match(/\"[^\"]+\"|[^\\s]+/g)\n ?.map(e => e.replace(/\"(.+)\"/, '$1')),\n {\n from: 'user',\n }\n );\n }\n } catch (ex: any) {\n const str = ex.toString();\n if (!str.includes('CommanderError'))\n logError(ex, `Shell ${ex.toString()}`);\n } finally {\n return this.contensisPrompt();\n }\n }\n })\n .catch((err: Error) => {\n log.error(err.message);\n this.quit();\n });\n };\n\n quit = (error?: Error) => {\n const { log, messages } = this;\n process.removeAllListeners('exit');\n\n if (error) {\n log.error(error.message);\n process.exit(1);\n } else {\n log.success(messages.app.quit());\n process.exitCode = 0;\n process.exit(0);\n }\n };\n}\n\nlet globalShell: ContensisShell;\n\nexport const shell = () => {\n // Return a benign function for shell().restart() when used in cli context\n // as some commands need to restart the shell to show an updated prompt\n // after successful connect / login / set project\n if (typeof process.argv?.[2] !== 'undefined') return { restart() {} } as any;\n if (!globalShell) globalShell = new ContensisShell();\n return globalShell;\n};\n\nprocess.on('uncaughtException', function (err) {\n // Handle the error safely\n console.log(err);\n});\n\nprocess.on('SIGINT', () => {\n console.log('catching SIGINT');\n shell().quit();\n});\n\nprocess.on('SIGTERM', () => {\n console.log('catching SIGTERM');\n shell().quit();\n});\n\nprocess.stdin.on('data', key => {\n if ((key as any) == '\\u0003') {\n console.log('');\n Logger.info(`[CTRL]+[C] detected, exiting shell...`);\n shell().quit();\n }\n});\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,oBAAmB;AACnB,sBAAqB;AACrB,qCAA2B;AAC3B,sBAAqB;AACrB,mBAA4B;AAC5B,oBAAiC;AACjC,gCAA+B;AAC/B,iCAAyC;AACzC,kBAAwB;
|
|
4
|
+
"sourcesContent": ["import path from 'path';\nimport figlet from 'figlet';\nimport inquirer from 'inquirer';\nimport inquirerPrompt from 'inquirer-command-prompt';\nimport commands from './commands';\nimport { LogMessages } from './localisation/en-GB';\nimport { logError, Logger } from './util/logger';\nimport CredentialProvider from './providers/CredentialProvider';\nimport ContensisCli, { cliCommand } from './services/ContensisCliService';\nimport { Logging } from './util';\nimport { LIB_VERSION } from './version';\n\nclass ContensisShell {\n private currentEnvironment!: string;\n private emptyInputCounter: number = 0;\n private env!: EnvironmentCache;\n private firstStart = true;\n private userId: string = '';\n private log = Logger;\n private messages = LogMessages;\n\n private refreshEnvironment = () => {\n // Reload any persisted changes from the disk cache\n const {\n cache: { currentEnvironment = '', environments = {} },\n } = new ContensisCli([]);\n // console.log(`refreshing env w/${currentEnvironment}`);\n this.currentEnvironment = currentEnvironment;\n this.env = environments[currentEnvironment];\n\n // Reload logging here to support changing language\n Logging('en-GB').then(({ messages, Log }) => {\n this.log = Log;\n this.messages = messages;\n });\n };\n\n constructor() {\n this.refreshEnvironment();\n inquirerPrompt.setConfig({\n history: {\n save: true,\n folder: path.join(process.cwd(), '../'),\n limit: 100,\n blacklist: ['quit'],\n },\n });\n // inquirer.registerPrompt('command', inquirerPrompt);\n\n const { log, messages } = this;\n\n figlet.text(\n messages.app.contensis(),\n {\n font: 'Block',\n horizontalLayout: 'default',\n verticalLayout: 'default',\n width: process.stdout.columns,\n whitespaceBreak: true,\n },\n (err, data) => {\n if (err) {\n log.error(messages.app.unknownError());\n console.dir(err);\n return;\n }\n console.log(log.successText(data));\n console.log(log.infoText(messages.app.startup(LIB_VERSION)));\n console.log(log.helpText(messages.app.help()));\n\n this.start().catch(ex => log.error(ex));\n }\n );\n }\n\n restart = async () => {\n this.firstStart = false;\n this.log.line(); // add a line so we can see where the shell has been restarted\n await this.start();\n };\n\n start = async () => {\n this.refreshEnvironment();\n this.userId = '';\n const { currentEnvironment, env, log, messages } = this;\n\n if (env?.lastUserId) {\n const [credsErr, credentials] = await new CredentialProvider(\n {\n userId: env.lastUserId,\n alias: currentEnvironment,\n },\n env.passwordFallback\n ).Init();\n if (credsErr && !credentials.current) {\n log.error(credsErr.message);\n }\n if (credentials.current) {\n if (this.firstStart) {\n const token = await cliCommand(['login', env.lastUserId]).Login(\n env.lastUserId,\n {\n promptPassword: false,\n silent: true,\n }\n );\n if (token) {\n this.userId = env.lastUserId;\n if (!env.currentProject) log.warning(messages.projects.tip());\n }\n this.firstStart = false;\n this.refreshEnvironment();\n } else {\n this.userId = env.lastUserId;\n }\n }\n }\n await this.contensisPrompt();\n };\n\n contensisPrompt = async (): Promise<any> => {\n const { currentEnvironment, env, log, messages, userId } = this;\n\n const availableCommands = [\n {\n filter: (str: string) => {\n return str.replace(/ \\[.*$/, '');\n },\n },\n 'connect',\n 'list envs',\n 'quit',\n ];\n\n if (currentEnvironment)\n availableCommands.push('login', 'list projects', 'set project');\n if (userId)\n availableCommands.push(\n 'get block',\n 'get block logs',\n 'get contenttype',\n 'get component',\n 'get entries',\n 'get version',\n 'import contenttypes',\n 'import components',\n 'import entries',\n 'list blocks',\n 'list contenttypes',\n 'list components',\n 'list models',\n 'list keys',\n 'list webhooks',\n 'create key',\n 'push block',\n 'release block',\n 'remove key',\n 'remove entry',\n 'remove contenttypes',\n 'remove components'\n );\n\n const prompt = inquirer.createPromptModule();\n prompt.registerPrompt('command', inquirerPrompt);\n return prompt([\n {\n type: 'command',\n name: 'cmd',\n autoCompletion: availableCommands,\n autocompletePrompt: log.infoText(messages.app.autocomplete()),\n message: `${userId ? `${userId}@` : ''}${currentEnvironment || ''}>`,\n context: 0,\n validate: (val: string) => {\n if (!val) this.emptyInputCounter++;\n if (this.emptyInputCounter > 1)\n console.log(this.log.infoText(this.messages.app.suggestions()));\n if (val) {\n this.emptyInputCounter = 0;\n return true;\n }\n },\n prefix: `${env?.currentProject || log.infoText('contensis')}`,\n short: true,\n },\n ])\n .then(async (answers: { cmd: string }) => {\n if (answers.cmd === 'quit') {\n this.quit();\n } else {\n try {\n if (answers.cmd) {\n const program = commands();\n await program.parseAsync(\n answers.cmd\n .match(/\"[^\"]+\"|[^\\s]+/g)\n ?.map(e => e.replace(/\"(.+)\"/, '$1')),\n {\n from: 'user',\n }\n );\n }\n } catch (ex: any) {\n const str = ex.toString();\n if (!str.includes('CommanderError'))\n logError(ex, `Shell ${ex.toString()}`);\n } finally {\n return this.contensisPrompt();\n }\n }\n })\n .catch((err: Error) => {\n log.error(err.message);\n this.quit();\n });\n };\n\n quit = (error?: Error) => {\n const { log, messages } = this;\n process.removeAllListeners('exit');\n\n if (error) {\n log.error(error.message);\n process.exit(1);\n } else {\n log.success(messages.app.quit());\n process.exitCode = 0;\n process.exit(0);\n }\n };\n}\n\nlet globalShell: ContensisShell;\n\nexport const shell = () => {\n // Return a benign function for shell().restart() when used in cli context\n // as some commands need to restart the shell to show an updated prompt\n // after successful connect / login / set project\n if (typeof process.argv?.[2] !== 'undefined') return { restart() {} } as any;\n if (!globalShell) globalShell = new ContensisShell();\n return globalShell;\n};\n\nprocess.on('uncaughtException', function (err) {\n // Handle the error safely\n console.log(err);\n});\n\nprocess.on('SIGINT', () => {\n console.log('catching SIGINT');\n shell().quit();\n});\n\nprocess.on('SIGTERM', () => {\n console.log('catching SIGTERM');\n shell().quit();\n});\n\nprocess.stdin.on('data', key => {\n if ((key as any) == '\\u0003') {\n console.log('');\n Logger.info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AI,eAAe;AACnD,SAAO;AACT;AAEA,QAAQ,GAAG,qBAAqB,SAAU,KAAK;AAE7C,UAAQ,IAAI,GAAG;AACjB,CAAC;AAED,QAAQ,GAAG,UAAU,MAAM;AACzB,UAAQ,IAAI,iBAAiB;AAC7B,QAAM,EAAE,KAAK;AACf,CAAC;AAED,QAAQ,GAAG,WAAW,MAAM;AAC1B,UAAQ,IAAI,kBAAkB;AAC9B,QAAM,EAAE,KAAK;AACf,CAAC;AAED,QAAQ,MAAM,GAAG,QAAQ,SAAO;AAC9B,MAAK,OAAe,KAAU;AAC5B,YAAQ,IAAI,EAAE;AACd,yBAAO,KAAK,uCAAuC;AACnD,UAAM,EAAE,KAAK;AAAA,EACf;AACF,CAAC;",
|
|
6
6
|
"names": ["ContensisCli", "inquirerPrompt", "path", "figlet", "CredentialProvider", "inquirer", "commands"]
|
|
7
7
|
}
|
package/dist/version.js
CHANGED
|
@@ -21,7 +21,7 @@ __export(version_exports, {
|
|
|
21
21
|
LIB_VERSION: () => LIB_VERSION
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(version_exports);
|
|
24
|
-
const LIB_VERSION = "1.0.0-beta.
|
|
24
|
+
const LIB_VERSION = "1.0.0-beta.38";
|
|
25
25
|
// Annotate the CommonJS export names for ESM import in node:
|
|
26
26
|
0 && (module.exports = {
|
|
27
27
|
LIB_VERSION
|
package/dist/version.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/version.ts"],
|
|
4
|
-
"sourcesContent": ["export const LIB_VERSION = \"1.0.0-beta.
|
|
4
|
+
"sourcesContent": ["export const LIB_VERSION = \"1.0.0-beta.38\";\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contensis-cli",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.38",
|
|
4
4
|
"description": "A fully featured Contensis command line interface with a shell UI provides simple and intuitive ways to manage or profile your content in any NodeJS terminal.",
|
|
5
5
|
"repository": "https://github.com/contensis/node-cli",
|
|
6
6
|
"homepage": "https://github.com/contensis/node-cli/tree/main/packages/contensis-cli#readme",
|
|
@@ -5,8 +5,8 @@ export const LogMessages = {
|
|
|
5
5
|
app: {
|
|
6
6
|
contensis: () => 'Contensis',
|
|
7
7
|
quit: () => `Goodbye š\n`,
|
|
8
|
-
startup: () =>
|
|
9
|
-
|
|
8
|
+
startup: (version: string) =>
|
|
9
|
+
`v${version} Ā© 2001-${new Date().getFullYear()} Zengenti š¬š§. \n - Creators of Contensis and purveyors of other fine software\n\nš Welcome to the contensis-cli\n`,
|
|
10
10
|
help: () =>
|
|
11
11
|
'Press [CTRL]+[C] or type "quit" to return to your system shell\nPress [TAB] for suggestions\n',
|
|
12
12
|
suggestions: () =>
|
package/src/shell.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { logError, Logger } from './util/logger';
|
|
|
8
8
|
import CredentialProvider from './providers/CredentialProvider';
|
|
9
9
|
import ContensisCli, { cliCommand } from './services/ContensisCliService';
|
|
10
10
|
import { Logging } from './util';
|
|
11
|
+
import { LIB_VERSION } from './version';
|
|
11
12
|
|
|
12
13
|
class ContensisShell {
|
|
13
14
|
private currentEnvironment!: string;
|
|
@@ -64,7 +65,7 @@ class ContensisShell {
|
|
|
64
65
|
return;
|
|
65
66
|
}
|
|
66
67
|
console.log(log.successText(data));
|
|
67
|
-
console.log(log.infoText(messages.app.startup()));
|
|
68
|
+
console.log(log.infoText(messages.app.startup(LIB_VERSION)));
|
|
68
69
|
console.log(log.helpText(messages.app.help()));
|
|
69
70
|
|
|
70
71
|
this.start().catch(ex => log.error(ex));
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const LIB_VERSION = "1.0.0-beta.
|
|
1
|
+
export const LIB_VERSION = "1.0.0-beta.38";
|