contensis-cli 1.0.0-beta.83 → 1.0.0-beta.85
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/commands/dev.js +23 -2
- package/dist/commands/dev.js.map +2 -2
- package/dist/localisation/en-GB.js +52 -0
- package/dist/localisation/en-GB.js.map +2 -2
- package/dist/mappers/ContensisCliService-to-RequestHanderSiteConfigYaml.js +56 -0
- package/dist/mappers/ContensisCliService-to-RequestHanderSiteConfigYaml.js.map +7 -0
- package/dist/providers/file-provider.js +4 -2
- package/dist/providers/file-provider.js.map +2 -2
- package/dist/services/ContensisCliService.js +3 -53
- package/dist/services/ContensisCliService.js.map +2 -2
- package/dist/services/ContensisDevService.js +203 -0
- package/dist/services/ContensisDevService.js.map +7 -0
- package/dist/shell.js +2 -9
- package/dist/shell.js.map +2 -2
- package/dist/util/git.js +119 -0
- package/dist/util/git.js.map +7 -0
- package/dist/util/os.js +39 -0
- package/dist/util/os.js.map +7 -0
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +8 -2
- package/src/commands/dev.ts +29 -2
- package/src/localisation/en-GB.ts +85 -0
- package/src/mappers/ContensisCliService-to-RequestHanderSiteConfigYaml.ts +44 -0
- package/src/models/JsModules.d.ts +1 -0
- package/src/providers/file-provider.ts +5 -2
- package/src/services/ContensisCliService.ts +24 -78
- package/src/services/ContensisDevService.ts +243 -0
- package/src/shell.ts +3 -12
- package/src/util/git.ts +118 -0
- package/src/util/os.ts +7 -0
- package/src/version.ts +1 -1
package/dist/commands/dev.js
CHANGED
|
@@ -22,10 +22,31 @@ __export(dev_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(dev_exports);
|
|
24
24
|
var import_commander = require("commander");
|
|
25
|
-
var
|
|
25
|
+
var import_ContensisDevService = require("../services/ContensisDevService");
|
|
26
26
|
const makeDevCommand = () => {
|
|
27
27
|
const dev = new import_commander.Command().command("dev").description("dev command").addHelpText("after", `
|
|
28
28
|
`).showHelpAfterError(true).exitOverride();
|
|
29
|
+
dev.command("init").description(
|
|
30
|
+
"initialise a git clone directory to connect and deploy to Contensis"
|
|
31
|
+
).argument(
|
|
32
|
+
"[projectHome]",
|
|
33
|
+
"the path of the folder to initialise",
|
|
34
|
+
process.cwd()
|
|
35
|
+
).option(
|
|
36
|
+
"--url <url>",
|
|
37
|
+
"override the git url or add one to initialise a non-git folder"
|
|
38
|
+
).addHelpText(
|
|
39
|
+
"after",
|
|
40
|
+
`
|
|
41
|
+
Example call:
|
|
42
|
+
> dev init
|
|
43
|
+
`
|
|
44
|
+
).action(async (projectHome, opts) => {
|
|
45
|
+
await (0, import_ContensisDevService.devCommand)(["dev", "init", projectHome], opts).DevelopmentInit(
|
|
46
|
+
projectHome,
|
|
47
|
+
opts
|
|
48
|
+
);
|
|
49
|
+
});
|
|
29
50
|
dev.command("requests").description("launch request handler for local development").argument("[block-ids...]", "ids of any blocks to develop locally").option("--args <args...>", "override or add additional args").usage("[block-ids...]").addHelpText(
|
|
30
51
|
"after",
|
|
31
52
|
`
|
|
@@ -33,7 +54,7 @@ Example call:
|
|
|
33
54
|
> dev requests test-block-one
|
|
34
55
|
`
|
|
35
56
|
).action(async (blockIds = [], opts) => {
|
|
36
|
-
await (0,
|
|
57
|
+
await (0, import_ContensisDevService.devCommand)(
|
|
37
58
|
["dev", "requests", blockIds.join(" ")],
|
|
38
59
|
opts
|
|
39
60
|
).ExecRequestHandler(blockIds, opts == null ? void 0 : opts.args);
|
package/dist/commands/dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/commands/dev.ts"],
|
|
4
|
-
"sourcesContent": ["import { Command } from 'commander';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAwB;AACxB,iCAA2B;AAEpB,MAAM,iBAAiB,MAAM;AAClC,QAAM,MAAM,IAAI,yBAAQ,EACrB,QAAQ,KAAK,EACb,YAAY,aAAa,EACzB,YAAY,SAAS;AAAA,CAAI,EACzB,mBAAmB,IAAI,EACvB,aAAa;AAEhB,MACG,QAAQ,UAAU,EAClB,YAAY,8CAA8C,EAC1D,SAAS,kBAAkB,sCAAsC,EACjE,OAAO,oBAAoB,iCAAiC,EAC5D,MAAM,gBAAgB,EACtB;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAGF,EACC,OAAO,OAAO,WAAqB,CAAC,GAAG,SAAS;AAC/C,cAAM;AAAA,MACJ,CAAC,OAAO,YAAY,SAAS,KAAK,GAAG,CAAC;AAAA,MACtC;AAAA,IACF,EAAE,mBAAmB,UAAU,6BAAM,IAAI;AAAA,EAC3C,CAAC;AAEH,SAAO;AACT;",
|
|
4
|
+
"sourcesContent": ["import { Command } from 'commander';\nimport { devCommand } from '~/services/ContensisDevService';\n\nexport const makeDevCommand = () => {\n const dev = new Command()\n .command('dev')\n .description('dev command')\n .addHelpText('after', `\\n`)\n .showHelpAfterError(true)\n .exitOverride();\n\n dev\n .command('init')\n .description(\n 'initialise a git clone directory to connect and deploy to Contensis'\n )\n .argument(\n '[projectHome]',\n 'the path of the folder to initialise',\n process.cwd()\n )\n .option(\n '--url <url>',\n 'override the git url or add one to initialise a non-git folder'\n )\n .addHelpText(\n 'after',\n `\nExample call:\n > dev init\\n`\n )\n .action(async (projectHome: string, opts) => {\n await devCommand(['dev', 'init', projectHome], opts).DevelopmentInit(\n projectHome,\n opts\n );\n });\n\n dev\n .command('requests')\n .description('launch request handler for local development')\n .argument('[block-ids...]', 'ids of any blocks to develop locally')\n .option('--args <args...>', 'override or add additional args')\n .usage('[block-ids...]')\n .addHelpText(\n 'after',\n `\nExample call:\n > dev requests test-block-one\\n`\n )\n .action(async (blockIds: string[] = [], opts) => {\n await devCommand(\n ['dev', 'requests', blockIds.join(' ')],\n opts\n ).ExecRequestHandler(blockIds, opts?.args);\n });\n\n return dev;\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAwB;AACxB,iCAA2B;AAEpB,MAAM,iBAAiB,MAAM;AAClC,QAAM,MAAM,IAAI,yBAAQ,EACrB,QAAQ,KAAK,EACb,YAAY,aAAa,EACzB,YAAY,SAAS;AAAA,CAAI,EACzB,mBAAmB,IAAI,EACvB,aAAa;AAEhB,MACG,QAAQ,MAAM,EACd;AAAA,IACC;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA,IACA,QAAQ,IAAI;AAAA,EACd,EACC;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAGF,EACC,OAAO,OAAO,aAAqB,SAAS;AAC3C,cAAM,uCAAW,CAAC,OAAO,QAAQ,WAAW,GAAG,IAAI,EAAE;AAAA,MACnD;AAAA,MACA;AAAA,IACF;AAAA,EACF,CAAC;AAEH,MACG,QAAQ,UAAU,EAClB,YAAY,8CAA8C,EAC1D,SAAS,kBAAkB,sCAAsC,EACjE,OAAO,oBAAoB,iCAAiC,EAC5D,MAAM,gBAAgB,EACtB;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAGF,EACC,OAAO,OAAO,WAAqB,CAAC,GAAG,SAAS;AAC/C,cAAM;AAAA,MACJ,CAAC,OAAO,YAAY,SAAS,KAAK,GAAG,CAAC;AAAA,MACtC;AAAA,IACF,EAAE,mBAAmB,UAAU,6BAAM,IAAI;AAAA,EAC3C,CAAC;AAEH,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -22,6 +22,7 @@ __export(en_GB_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(en_GB_exports);
|
|
24
24
|
var import_logger = require("../util/logger");
|
|
25
|
+
var import_os = require("../util/os");
|
|
25
26
|
const LogMessages = {
|
|
26
27
|
app: {
|
|
27
28
|
contensis: () => "Contensis",
|
|
@@ -338,6 +339,57 @@ ${import_logger.Logger.errorText(">>")} Available commands:`,
|
|
|
338
339
|
failedDelete: (env, id) => `[${env}] Unable to delete Webhook subscription ${import_logger.Logger.highlightText(
|
|
339
340
|
id
|
|
340
341
|
)}`
|
|
342
|
+
},
|
|
343
|
+
devinit: {
|
|
344
|
+
intro: () => `Contensis developer environment initialisation`,
|
|
345
|
+
projectDetails: (name, env, projectId, git) => `Project: ${import_logger.Logger.highlightText(name)} set arg --name to override
|
|
346
|
+
- Home: ${import_logger.Logger.standardText(process.cwd())}
|
|
347
|
+
- Repository: ${git.home}
|
|
348
|
+
|
|
349
|
+
Connect to Contensis instance: ${import_logger.Logger.standardText(env)}
|
|
350
|
+
- Project id: ${import_logger.Logger.standardText(projectId)}`,
|
|
351
|
+
developmentKey: (name, existing) => ` - ${!existing ? "Create development API key" : "Development API key found"}: ${import_logger.Logger[!existing ? "highlightText" : "standardText"](name)}`,
|
|
352
|
+
deploymentKey: (name, existing) => ` - ${!existing ? "Create deployment API key" : "Deployment API key found"}: ${import_logger.Logger[!existing ? "highlightText" : "standardText"](name)}`,
|
|
353
|
+
ciIntro: (git) => `We will create API keys with permissions to use this project with Contensis, and add a job to your CI that will deploy a container build. We will ask you to add secrets/variables to your git repository to give your workflow permission to push a Block to Contensis.
|
|
354
|
+
|
|
355
|
+
You could visit ${git.secretsUri} to check that you can see repository settings`,
|
|
356
|
+
ciDetails: (filename) => `Add push-block job to CI file: ${import_logger.Logger.highlightText(filename)}
|
|
357
|
+
`,
|
|
358
|
+
confirm: () => `Confirm these details are correct so we can make changes to your project`,
|
|
359
|
+
accessTokenPrompt: () => `Please supply the access token for the Delivery API (optional)`,
|
|
360
|
+
createDevKey: (keyName, existing) => `${!existing ? "Created" : "Checked permissions for"} development API key ${import_logger.Logger.standardText(keyName)}`,
|
|
361
|
+
createDeployKey: (keyName, existing) => `${!existing ? "Created" : "Checked permissions for"} deployment API key ${import_logger.Logger.standardText(keyName)}`,
|
|
362
|
+
createKeyFail: (keyName, existing) => `Failed to ${!existing ? "create" : "update"} API key ${import_logger.Logger.highlightText(keyName)}`,
|
|
363
|
+
writeEnvFile: () => `Written .env file to project home directory`,
|
|
364
|
+
useEnvFileTip: () => `You should alter existing project code that connects a Contensis client to use the variables from this file`,
|
|
365
|
+
writeCiFile: (ciFilePath) => `Updated CI file ${import_logger.Logger.standardText((0, import_os.winSlash)(ciFilePath))}`,
|
|
366
|
+
ciBlockTip: (blockId, env, projectId) => `A job is included to deploy your built container image to ${import_logger.Logger.standardText(
|
|
367
|
+
projectId
|
|
368
|
+
)} at ${import_logger.Logger.standardText(env)} in a block called ${import_logger.Logger.standardText(
|
|
369
|
+
blockId
|
|
370
|
+
)}`,
|
|
371
|
+
addGitSecretsIntro: () => `We have ceated an API key that allows you to deploy your app image to a Contensis Block but we need you to add these details to your GitLab repository.`,
|
|
372
|
+
addGitSecretsHelp: (git, id, secret) => `Add secrets or variables in your repository's settings page
|
|
373
|
+
|
|
374
|
+
Go to ${import_logger.Logger.highlightText(
|
|
375
|
+
git.secretsUri
|
|
376
|
+
)}
|
|
377
|
+
|
|
378
|
+
${git.type === "github" ? `Add a "New repository secret"` : `Expand "Variables" and hit "Add variable"`}
|
|
379
|
+
|
|
380
|
+
${git.type === "github" ? `Secret name:` : `Key:`} ${import_logger.Logger.highlightText(`CONTENSIS_CLIENT_ID`)}
|
|
381
|
+
${git.type === "github" ? `Secret:` : `Value:`} ${import_logger.Logger.highlightText(
|
|
382
|
+
id
|
|
383
|
+
)}
|
|
384
|
+
|
|
385
|
+
${`Add one more secret/variable to the repository`}
|
|
386
|
+
|
|
387
|
+
${git.type === "github" ? `Secret name:` : `Key:`} ${import_logger.Logger.highlightText(`CONTENSIS_SHARED_SECRET`)}
|
|
388
|
+
${git.type === "github" ? `Secret:` : `Value:`} ${import_logger.Logger.highlightText(secret)}`,
|
|
389
|
+
success: () => `Contensis developer environment initialisation complete`,
|
|
390
|
+
partialSuccess: () => `Contensis developer environment initialisation completed with errors`,
|
|
391
|
+
failed: () => `Contensis developer environment initialisation failed`,
|
|
392
|
+
startProjectTip: () => `Start up your project in the normal way for development`
|
|
341
393
|
}
|
|
342
394
|
};
|
|
343
395
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/localisation/en-GB.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n BlockActionType,\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 keys`,\n created: (env: string, name: string) =>\n `[${env}] Created API key ${Logger.highlightText(name)}`,\n tip: () =>\n `Assign your new key to a role with \"set role assignments\", or create a new role with \"create role\"`,\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 proxies: {\n list: (env: string, projectId: string | undefined) =>\n `[${env}] Retrieved proxies in project ${projectId}:`,\n noList: (env: string, projectId: string | undefined) =>\n `[${env}] Cannot retrieve proxies in project ${projectId}`,\n // noneExist: () => `Create a role with \"create renderer\"`,\n failedGet: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to find proxy ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n created: (env: string, name: string, projectId: string) =>\n `[${env}] Created proxy ${Logger.highlightText(\n name\n )} in project ${projectId}\\n`,\n failedCreate: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to create proxy ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n setPayload: () => `Updating proxy with details\\n`,\n set: () => `Succesfully updated proxy\\n`,\n failedSet: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to update proxy ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n removed: (env: string, id: string, projectId: string) =>\n `[${env}] Deleted proxy ${Logger.highlightText(\n id\n )} in project ${projectId}\\n`,\n failedRemove: (env: string, id: string, projectId: string) =>\n `[${env}] Unable to delete proxy ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n },\n renderers: {\n list: (env: string, projectId: string | undefined) =>\n `[${env}] Retrieved renderers in project ${projectId}:`,\n noList: (env: string, projectId: string | undefined) =>\n `[${env}] Cannot retrieve renderers in project ${projectId}`,\n // noneExist: () => `Create a role with \"create renderer\"`,\n failedGet: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to find renderer ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n created: (env: string, name: string, projectId: string) =>\n `[${env}] Created renderer ${Logger.highlightText(\n name\n )} in project ${projectId}\\n`,\n failedCreate: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to create renderer ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n setPayload: () => `Updating renderer with details\\n`,\n set: () => `Succesfully updated renderer\\n`,\n failedSet: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to update renderer ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n removed: (env: string, id: string, projectId: string) =>\n `[${env}] Deleted renderer ${Logger.highlightText(\n id\n )} in project ${projectId}\\n`,\n failedRemove: (env: string, id: string, projectId: string) =>\n `[${env}] Unable to delete renderer ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n },\n roles: {\n list: (env: string) => `[${env}] Retrieved roles`,\n noList: (env: string) => `[${env}] Cannot retrieve roles`,\n noneExist: () => `Create a role with \"create role\"`,\n failedGet: (env: string, name: string) =>\n `[${env}] Unable to find role ${Logger.highlightText(name)}`,\n created: (env: string, name: string) =>\n `[${env}] Created role ${Logger.highlightText(name)}\\n`,\n tip: () =>\n `Give access to your role with \"set role assignments\", allow your role to do things with \"set role permissions\"`,\n failedCreate: (env: string, name: string) =>\n `[${env}] Unable to create role ${Logger.highlightText(name)}`,\n setPayload: () => `Updating role with details\\n`,\n set: () => `Succesfully updated role\\n`,\n failedSet: (env: string, name: string) =>\n `[${env}] Unable to update role ${Logger.highlightText(name)}`,\n removed: (env: string, id: string) =>\n `[${env}] Deleted role ${Logger.highlightText(id)}\\n`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete role ${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 latestVersion: (\n version: string,\n id: string,\n env: string,\n projectId?: string\n ) =>\n `[${env}] Found latest block version ${Logger.highlightText(\n id\n )} in project ${projectId} ${Logger.highlightText(version)}`,\n failedParsingVersion: () =>\n `Did not find a \"version.versionNo\" in response`,\n actionComplete: (\n action: BlockActionType,\n id: string,\n env: string,\n projectId?: string\n ) =>\n `[${env}] Action ${Logger.highlightText(\n action\n )} on ${Logger.highlightText(\n id\n )} in project ${projectId} requested successfully`,\n actionFailed: (\n action: BlockActionType,\n id: string,\n env: string,\n projectId?: string\n ) =>\n `[${env}] Problem executing ${action} on 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 stopFollow: (id: string, env: string, projectId?: string) =>\n `[${env}]\\n\\n \uD83D\uDC4C stop fetching new ${Logger.highlightText(\n id\n )} logs in project ${projectId}`,\n timeoutFollow: (id: string, env: string, projectId?: string) =>\n `[${env}]\\n\\n \uD83E\uDD0F pausing fetching new ${Logger.highlightText(\n id\n )} logs in project ${projectId} due to too many requests`,\n },\n webhooks: {\n list: (env: string) => `[${env}] Webhook subscriptions:`,\n noList: (env: string) => `[${env}] Cannot retrieve webhook subscriptions`,\n noneExist: () => `No webhook subscriptions exist`,\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
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["import {\n BlockActionType,\n BlockRunningStatus,\n MigrateModelsResult,\n MigrateStatus,\n} from 'migratortron';\nimport { GitHelper } from '~/util/git';\nimport { Logger } from '~/util/logger';\nimport { winSlash } from '~/util/os';\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 keys`,\n created: (env: string, name: string) =>\n `[${env}] Created API key ${Logger.highlightText(name)}`,\n tip: () =>\n `Assign your new key to a role with \"set role assignments\", or create a new role with \"create role\"`,\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 proxies: {\n list: (env: string, projectId: string | undefined) =>\n `[${env}] Retrieved proxies in project ${projectId}:`,\n noList: (env: string, projectId: string | undefined) =>\n `[${env}] Cannot retrieve proxies in project ${projectId}`,\n // noneExist: () => `Create a role with \"create renderer\"`,\n failedGet: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to find proxy ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n created: (env: string, name: string, projectId: string) =>\n `[${env}] Created proxy ${Logger.highlightText(\n name\n )} in project ${projectId}\\n`,\n failedCreate: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to create proxy ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n setPayload: () => `Updating proxy with details\\n`,\n set: () => `Succesfully updated proxy\\n`,\n failedSet: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to update proxy ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n removed: (env: string, id: string, projectId: string) =>\n `[${env}] Deleted proxy ${Logger.highlightText(\n id\n )} in project ${projectId}\\n`,\n failedRemove: (env: string, id: string, projectId: string) =>\n `[${env}] Unable to delete proxy ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n },\n renderers: {\n list: (env: string, projectId: string | undefined) =>\n `[${env}] Retrieved renderers in project ${projectId}:`,\n noList: (env: string, projectId: string | undefined) =>\n `[${env}] Cannot retrieve renderers in project ${projectId}`,\n // noneExist: () => `Create a role with \"create renderer\"`,\n failedGet: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to find renderer ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n created: (env: string, name: string, projectId: string) =>\n `[${env}] Created renderer ${Logger.highlightText(\n name\n )} in project ${projectId}\\n`,\n failedCreate: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to create renderer ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n setPayload: () => `Updating renderer with details\\n`,\n set: () => `Succesfully updated renderer\\n`,\n failedSet: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to update renderer ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n removed: (env: string, id: string, projectId: string) =>\n `[${env}] Deleted renderer ${Logger.highlightText(\n id\n )} in project ${projectId}\\n`,\n failedRemove: (env: string, id: string, projectId: string) =>\n `[${env}] Unable to delete renderer ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n },\n roles: {\n list: (env: string) => `[${env}] Retrieved roles`,\n noList: (env: string) => `[${env}] Cannot retrieve roles`,\n noneExist: () => `Create a role with \"create role\"`,\n failedGet: (env: string, name: string) =>\n `[${env}] Unable to find role ${Logger.highlightText(name)}`,\n created: (env: string, name: string) =>\n `[${env}] Created role ${Logger.highlightText(name)}\\n`,\n tip: () =>\n `Give access to your role with \"set role assignments\", allow your role to do things with \"set role permissions\"`,\n failedCreate: (env: string, name: string) =>\n `[${env}] Unable to create role ${Logger.highlightText(name)}`,\n setPayload: () => `Updating role with details\\n`,\n set: () => `Succesfully updated role\\n`,\n failedSet: (env: string, name: string) =>\n `[${env}] Unable to update role ${Logger.highlightText(name)}`,\n removed: (env: string, id: string) =>\n `[${env}] Deleted role ${Logger.highlightText(id)}\\n`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete role ${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 latestVersion: (\n version: string,\n id: string,\n env: string,\n projectId?: string\n ) =>\n `[${env}] Found latest block version ${Logger.highlightText(\n id\n )} in project ${projectId} ${Logger.highlightText(version)}`,\n failedParsingVersion: () =>\n `Did not find a \"version.versionNo\" in response`,\n actionComplete: (\n action: BlockActionType,\n id: string,\n env: string,\n projectId?: string\n ) =>\n `[${env}] Action ${Logger.highlightText(\n action\n )} on ${Logger.highlightText(\n id\n )} in project ${projectId} requested successfully`,\n actionFailed: (\n action: BlockActionType,\n id: string,\n env: string,\n projectId?: string\n ) =>\n `[${env}] Problem executing ${action} on 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 stopFollow: (id: string, env: string, projectId?: string) =>\n `[${env}]\\n\\n \uD83D\uDC4C stop fetching new ${Logger.highlightText(\n id\n )} logs in project ${projectId}`,\n timeoutFollow: (id: string, env: string, projectId?: string) =>\n `[${env}]\\n\\n \uD83E\uDD0F pausing fetching new ${Logger.highlightText(\n id\n )} logs in project ${projectId} due to too many requests`,\n },\n webhooks: {\n list: (env: string) => `[${env}] Webhook subscriptions:`,\n noList: (env: string) => `[${env}] Cannot retrieve webhook subscriptions`,\n noneExist: () => `No webhook subscriptions exist`,\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 devinit: {\n intro: () => `Contensis developer environment initialisation`,\n //`This will initialise your local working directory to develop with the current connected Contensis project`,\n projectDetails: (\n name: string,\n env: string,\n projectId: string,\n git: GitHelper\n ) =>\n `Project: ${Logger.highlightText(name)} set arg --name to override\n - Home: ${Logger.standardText(process.cwd())}\n - Repository: ${git.home} \n \nConnect to Contensis instance: ${Logger.standardText(env)}\n - Project id: ${Logger.standardText(projectId)}`,\n developmentKey: (name: string, existing: boolean) =>\n ` - ${\n !existing ? 'Create development API key' : 'Development API key found'\n }: ${Logger[!existing ? 'highlightText' : 'standardText'](name)}`,\n deploymentKey: (name: string, existing: boolean) =>\n ` - ${\n !existing ? 'Create deployment API key' : 'Deployment API key found'\n }: ${Logger[!existing ? 'highlightText' : 'standardText'](name)}`,\n ciIntro: (git: GitHelper) =>\n `We will create API keys with permissions to use this project with Contensis, and add a job to your CI that will deploy a container build. We will ask you to add secrets/variables to your git repository to give your workflow permission to push a Block to Contensis.\n\nYou could visit ${git.secretsUri} to check that you can see repository settings`,\n ciDetails: (filename: string) =>\n `Add push-block job to CI file: ${Logger.highlightText(filename)}\\n`,\n confirm: () =>\n `Confirm these details are correct so we can make changes to your project`,\n accessTokenPrompt: () =>\n `Please supply the access token for the Delivery API (optional)`,\n createDevKey: (keyName: string, existing: boolean) =>\n `${\n !existing ? 'Created' : 'Checked permissions for'\n } development API key ${Logger.standardText(keyName)}`,\n createDeployKey: (keyName: string, existing: boolean) =>\n `${\n !existing ? 'Created' : 'Checked permissions for'\n } deployment API key ${Logger.standardText(keyName)}`,\n createKeyFail: (keyName: string, existing: boolean) =>\n `Failed to ${\n !existing ? 'create' : 'update'\n } API key ${Logger.highlightText(keyName)}`,\n writeEnvFile: () => `Written .env file to project home directory`,\n useEnvFileTip: () =>\n `You should alter existing project code that connects a Contensis client to use the variables from this file`,\n writeCiFile: (ciFilePath: string) =>\n `Updated CI file ${Logger.standardText(winSlash(ciFilePath))}`,\n ciBlockTip: (blockId: string, env: string, projectId: string) =>\n `A job is included to deploy your built container image to ${Logger.standardText(\n projectId\n )} at ${Logger.standardText(env)} in a block called ${Logger.standardText(\n blockId\n )}`,\n addGitSecretsIntro: () =>\n `We have ceated an API key that allows you to deploy your app image to a Contensis Block but we need you to add these details to your GitLab repository.`,\n addGitSecretsHelp: (git: GitHelper, id: string, secret: string) =>\n `Add secrets or variables in your repository's settings page\\n\\nGo to ${Logger.highlightText(\n git.secretsUri\n )}\\n\\n${\n git.type === 'github'\n ? `Add a \"New repository secret\"`\n : `Expand \"Variables\" and hit \"Add variable\"`\n }\\n\\n ${\n git.type === 'github' ? `Secret name:` : `Key:`\n } ${Logger.highlightText(`CONTENSIS_CLIENT_ID`)}\\n ${\n git.type === 'github' ? `Secret:` : `Value:`\n } ${Logger.highlightText(\n id\n )}\\n\\n ${`Add one more secret/variable to the repository`}\\n\\n ${\n git.type === 'github' ? `Secret name:` : `Key:`\n } ${Logger.highlightText(`CONTENSIS_SHARED_SECRET`)}\\n ${\n git.type === 'github' ? `Secret:` : `Value:`\n } ${Logger.highlightText(secret)}`,\n success: () => `Contensis developer environment initialisation complete`,\n partialSuccess: () =>\n `Contensis developer environment initialisation completed with errors`,\n failed: () => `Contensis developer environment initialisation failed`,\n startProjectTip: () =>\n `Start up your project in the normal way for development`,\n },\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,oBAAuB;AACvB,gBAAyB;AAElB,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;AAAA,EACpC;AAAA,EACA,MAAM;AAAA,I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AAwE,qBAAO;AAAA,MAC7E,IAAI;AAAA,IACN;AAAA;AAAA,EACE,IAAI,SAAS,WACT,kCACA;AAAA;AAAA,MAEJ,IAAI,SAAS,WAAW,iBAAiB,UACvC,qBAAO,cAAc,qBAAqB;AAAA,MAC5C,IAAI,SAAS,WAAW,YAAY,YAClC,qBAAO;AAAA,MACT;AAAA,IACF;AAAA;AAAA,GAAS;AAAA;AAAA,MACP,IAAI,SAAS,WAAW,iBAAiB,UACvC,qBAAO,cAAc,yBAAyB;AAAA,MAChD,IAAI,SAAS,WAAW,YAAY,YAClC,qBAAO,cAAc,MAAM;AAAA,IACjC,SAAS,MAAM;AAAA,IACf,gBAAgB,MACd;AAAA,IACF,QAAQ,MAAM;AAAA,IACd,iBAAiB,MACf;AAAA,EACJ;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var ContensisCliService_to_RequestHanderSiteConfigYaml_exports = {};
|
|
20
|
+
__export(ContensisCliService_to_RequestHanderSiteConfigYaml_exports, {
|
|
21
|
+
mapSiteConfigYaml: () => mapSiteConfigYaml
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(ContensisCliService_to_RequestHanderSiteConfigYaml_exports);
|
|
24
|
+
const mapSiteConfigYaml = async (cli) => {
|
|
25
|
+
var _a, _b;
|
|
26
|
+
const credentials = await cli.GetCredentials(cli.env.lastUserId);
|
|
27
|
+
const blocks = [];
|
|
28
|
+
const blocksRaw = await cli.PrintBlocks();
|
|
29
|
+
for (const block of blocksRaw || []) {
|
|
30
|
+
const versions = await cli.PrintBlockVersions(
|
|
31
|
+
block.id,
|
|
32
|
+
"default",
|
|
33
|
+
"latest"
|
|
34
|
+
);
|
|
35
|
+
if (versions == null ? void 0 : versions[0]) {
|
|
36
|
+
blocks.push({
|
|
37
|
+
id: versions[0].id,
|
|
38
|
+
baseUri: versions[0].previewUrl
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
const siteConfig = {
|
|
43
|
+
alias: cli.currentEnv,
|
|
44
|
+
projectId: cli.currentProject,
|
|
45
|
+
accessToken: "",
|
|
46
|
+
clientId: ((_a = credentials == null ? void 0 : credentials.current) == null ? void 0 : _a.account) || "",
|
|
47
|
+
sharedSecret: ((_b = credentials == null ? void 0 : credentials.current) == null ? void 0 : _b.password) || "",
|
|
48
|
+
blocks
|
|
49
|
+
};
|
|
50
|
+
return siteConfig;
|
|
51
|
+
};
|
|
52
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
53
|
+
0 && (module.exports = {
|
|
54
|
+
mapSiteConfigYaml
|
|
55
|
+
});
|
|
56
|
+
//# sourceMappingURL=ContensisCliService-to-RequestHanderSiteConfigYaml.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/mappers/ContensisCliService-to-RequestHanderSiteConfigYaml.ts"],
|
|
4
|
+
"sourcesContent": ["import ContensisCli from '~/services/ContensisCliService';\n\ninterface ISiteConfigYaml {\n alias: string;\n projectId: string;\n accessToken: string;\n clientId: string;\n sharedSecret: string;\n blocks: {\n id: string;\n baseUri: string;\n }[];\n}\n\nexport const mapSiteConfigYaml = async (cli: ContensisCli) => {\n const credentials = await cli.GetCredentials(cli.env.lastUserId);\n\n const blocks = [];\n const blocksRaw = await cli.PrintBlocks();\n\n for (const block of blocksRaw || []) {\n const versions = await cli.PrintBlockVersions(\n block.id,\n 'default',\n 'latest'\n );\n if (versions?.[0]) {\n blocks.push({\n id: versions[0].id,\n baseUri: versions[0].previewUrl,\n });\n }\n }\n\n const siteConfig: ISiteConfigYaml = {\n alias: cli.currentEnv,\n projectId: cli.currentProject,\n accessToken: '',\n clientId: credentials?.current?.account || '',\n sharedSecret: credentials?.current?.password || '',\n blocks,\n };\n return siteConfig;\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAcO,MAAM,oBAAoB,OAAO,QAAsB;AAd9D;AAeE,QAAM,cAAc,MAAM,IAAI,eAAe,IAAI,IAAI,UAAU;AAE/D,QAAM,SAAS,CAAC;AAChB,QAAM,YAAY,MAAM,IAAI,YAAY;AAExC,aAAW,SAAS,aAAa,CAAC,GAAG;AACnC,UAAM,WAAW,MAAM,IAAI;AAAA,MACzB,MAAM;AAAA,MACN;AAAA,MACA;AAAA,IACF;AACA,QAAI,qCAAW,IAAI;AACjB,aAAO,KAAK;AAAA,QACV,IAAI,SAAS,GAAG;AAAA,QAChB,SAAS,SAAS,GAAG;AAAA,MACvB,CAAC;AAAA,IACH;AAAA,EACF;AAEA,QAAM,aAA8B;AAAA,IAClC,OAAO,IAAI;AAAA,IACX,WAAW,IAAI;AAAA,IACf,aAAa;AAAA,IACb,YAAU,gDAAa,YAAb,mBAAsB,YAAW;AAAA,IAC3C,gBAAc,gDAAa,YAAb,mBAAsB,aAAY;AAAA,IAChD;AAAA,EACF;AACA,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -56,14 +56,16 @@ const readFile = (filePath) => {
|
|
|
56
56
|
return void 0;
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
-
const readFiles = (directory) => {
|
|
59
|
+
const readFiles = (directory, createDirectory = true) => {
|
|
60
60
|
const directoryPath = localPath(directory);
|
|
61
61
|
if (import_fs.default.existsSync(directoryPath)) {
|
|
62
62
|
const files = import_fs.default.readdirSync(directoryPath);
|
|
63
63
|
return files;
|
|
64
|
-
} else {
|
|
64
|
+
} else if (createDirectory) {
|
|
65
65
|
import_fs.default.mkdirSync(directoryPath, { recursive: true });
|
|
66
66
|
return [];
|
|
67
|
+
} else {
|
|
68
|
+
throw new Error(`ENOENT: Directory does not exist ${directoryPath}`);
|
|
67
69
|
}
|
|
68
70
|
};
|
|
69
71
|
const writeFile = (filePath, content) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/providers/file-provider.ts"],
|
|
4
|
-
"sourcesContent": ["import fs from 'fs';\nimport { homedir } from 'os';\nimport path from 'path';\nimport { tryParse } from '~/util';\n\nconst userHomeDir = homedir();\n\nexport const appRootDir =\n process.env.CONTAINER_CONTEXT === 'true'\n ? process.cwd()\n : path.join(userHomeDir, '.contensis/');\n\nexport const readJsonFile = <T>(filePath: string) => {\n const file = readFile(filePath);\n if (file) return tryParse(file) as T | string;\n return undefined;\n};\nexport const readFile = (filePath: string) => {\n const directoryPath = localPath(filePath);\n if (fs.existsSync(directoryPath)) {\n const file = fs.readFileSync(directoryPath, 'utf8');\n return file;\n } else {\n return undefined;\n }\n};\n\nexport const readFiles = (directory: string) => {\n const directoryPath = localPath(directory);\n if (fs.existsSync(directoryPath)) {\n const files = fs.readdirSync(directoryPath);\n return files;\n } else {\n fs.mkdirSync(directoryPath, { recursive: true });\n return [];\n }\n};\n\nexport const writeFile = (filePath: string, content: string) => {\n const directoryPath = localPath(filePath);\n fs.writeFileSync(directoryPath, content, { encoding: 'utf-8' });\n};\n\nexport const removeFile = (filePath: string) => {\n const directoryPath = localPath(filePath);\n if (fs.existsSync(directoryPath)) {\n fs.rmSync(directoryPath);\n }\n};\n\nexport const moveFile = (file: string, fromPath: string, toPath: string) => {\n const from = path.join(appRootDir, `${fromPath}${file}`);\n const to = path.join(appRootDir, `${toPath}${file}`);\n if (fs.existsSync(from)) {\n checkDir(toPath);\n // if (!fs.existsSync(toPath)) fs.mkdirSync(toPath, { recursive: true });\n\n fs.rename(from, to, err => {\n if (err)\n console.error(\n `Could not rename file \"${file}\" from: ${fromPath} to: ${toPath}`,\n err\n );\n console.info(`Renamed file \"${file}\" from: ${fromPath} to: ${toPath}`);\n });\n } else {\n console.error(\n `Could not rename file \"${file}\" from: ${fromPath} to: ${toPath}\\nFile does not exist!`\n );\n }\n};\n\nexport const checkDir = (filePath: string) => {\n const directoryPath = path.dirname(localPath(filePath));\n if (!fs.existsSync(directoryPath))\n fs.mkdirSync(directoryPath, { recursive: true });\n};\n\nexport const localPath = (filePath: string) =>\n path.isAbsolute(filePath) ? filePath : path.join(appRootDir, filePath);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAe;AACf,gBAAwB;AACxB,kBAAiB;AACjB,kBAAyB;AAEzB,MAAM,kBAAc,mBAAQ;AAErB,MAAM,aACX,QAAQ,IAAI,sBAAsB,SAC9B,QAAQ,IAAI,IACZ,YAAAA,QAAK,KAAK,aAAa,aAAa;AAEnC,MAAM,eAAe,CAAI,aAAqB;AACnD,QAAM,OAAO,SAAS,QAAQ;AAC9B,MAAI;AAAM,eAAO,sBAAS,IAAI;AAC9B,SAAO;AACT;AACO,MAAM,WAAW,CAAC,aAAqB;AAC5C,QAAM,gBAAgB,UAAU,QAAQ;AACxC,MAAI,UAAAC,QAAG,WAAW,aAAa,GAAG;AAChC,UAAM,OAAO,UAAAA,QAAG,aAAa,eAAe,MAAM;AAClD,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;AAEO,MAAM,YAAY,CAAC,
|
|
4
|
+
"sourcesContent": ["import fs from 'fs';\nimport { homedir } from 'os';\nimport path from 'path';\nimport { tryParse } from '~/util';\n\nconst userHomeDir = homedir();\n\nexport const appRootDir =\n process.env.CONTAINER_CONTEXT === 'true'\n ? process.cwd()\n : path.join(userHomeDir, '.contensis/');\n\nexport const readJsonFile = <T>(filePath: string) => {\n const file = readFile(filePath);\n if (file) return tryParse(file) as T | string;\n return undefined;\n};\nexport const readFile = (filePath: string) => {\n const directoryPath = localPath(filePath);\n if (fs.existsSync(directoryPath)) {\n const file = fs.readFileSync(directoryPath, 'utf8');\n return file;\n } else {\n return undefined;\n }\n};\n\nexport const readFiles = (directory: string, createDirectory = true) => {\n const directoryPath = localPath(directory);\n if (fs.existsSync(directoryPath)) {\n const files = fs.readdirSync(directoryPath);\n return files;\n } else if (createDirectory) {\n fs.mkdirSync(directoryPath, { recursive: true });\n return [];\n } else {\n throw new Error(`ENOENT: Directory does not exist ${directoryPath}`);\n // return undefined;\n }\n};\n\nexport const writeFile = (filePath: string, content: string) => {\n const directoryPath = localPath(filePath);\n fs.writeFileSync(directoryPath, content, { encoding: 'utf-8' });\n};\n\nexport const removeFile = (filePath: string) => {\n const directoryPath = localPath(filePath);\n if (fs.existsSync(directoryPath)) {\n fs.rmSync(directoryPath);\n }\n};\n\nexport const moveFile = (file: string, fromPath: string, toPath: string) => {\n const from = path.join(appRootDir, `${fromPath}${file}`);\n const to = path.join(appRootDir, `${toPath}${file}`);\n if (fs.existsSync(from)) {\n checkDir(toPath);\n // if (!fs.existsSync(toPath)) fs.mkdirSync(toPath, { recursive: true });\n\n fs.rename(from, to, err => {\n if (err)\n console.error(\n `Could not rename file \"${file}\" from: ${fromPath} to: ${toPath}`,\n err\n );\n console.info(`Renamed file \"${file}\" from: ${fromPath} to: ${toPath}`);\n });\n } else {\n console.error(\n `Could not rename file \"${file}\" from: ${fromPath} to: ${toPath}\\nFile does not exist!`\n );\n }\n};\n\nexport const checkDir = (filePath: string) => {\n const directoryPath = path.dirname(localPath(filePath));\n if (!fs.existsSync(directoryPath))\n fs.mkdirSync(directoryPath, { recursive: true });\n};\n\nexport const localPath = (filePath: string) =>\n path.isAbsolute(filePath) ? filePath : path.join(appRootDir, filePath);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAe;AACf,gBAAwB;AACxB,kBAAiB;AACjB,kBAAyB;AAEzB,MAAM,kBAAc,mBAAQ;AAErB,MAAM,aACX,QAAQ,IAAI,sBAAsB,SAC9B,QAAQ,IAAI,IACZ,YAAAA,QAAK,KAAK,aAAa,aAAa;AAEnC,MAAM,eAAe,CAAI,aAAqB;AACnD,QAAM,OAAO,SAAS,QAAQ;AAC9B,MAAI;AAAM,eAAO,sBAAS,IAAI;AAC9B,SAAO;AACT;AACO,MAAM,WAAW,CAAC,aAAqB;AAC5C,QAAM,gBAAgB,UAAU,QAAQ;AACxC,MAAI,UAAAC,QAAG,WAAW,aAAa,GAAG;AAChC,UAAM,OAAO,UAAAA,QAAG,aAAa,eAAe,MAAM;AAClD,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;AAEO,MAAM,YAAY,CAAC,WAAmB,kBAAkB,SAAS;AACtE,QAAM,gBAAgB,UAAU,SAAS;AACzC,MAAI,UAAAA,QAAG,WAAW,aAAa,GAAG;AAChC,UAAM,QAAQ,UAAAA,QAAG,YAAY,aAAa;AAC1C,WAAO;AAAA,EACT,WAAW,iBAAiB;AAC1B,cAAAA,QAAG,UAAU,eAAe,EAAE,WAAW,KAAK,CAAC;A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s"]
|
|
7
7
|
}
|
|
@@ -28,7 +28,6 @@ __export(ContensisCliService_exports, {
|
|
|
28
28
|
default: () => ContensisCliService_default
|
|
29
29
|
});
|
|
30
30
|
module.exports = __toCommonJS(ContensisCliService_exports);
|
|
31
|
-
var import_child_process = require("child_process");
|
|
32
31
|
var import_fs = __toESM(require("fs"));
|
|
33
32
|
var import_path = __toESM(require("path"));
|
|
34
33
|
var import_node_fetch = __toESM(require("node-fetch"));
|
|
@@ -142,57 +141,6 @@ class ContensisCli {
|
|
|
142
141
|
}
|
|
143
142
|
}
|
|
144
143
|
}
|
|
145
|
-
ExecRequestHandler = async (blockIds, overrideArgs) => {
|
|
146
|
-
var _a, _b;
|
|
147
|
-
const { log } = this;
|
|
148
|
-
const exeHome = import_path.default.join(import_file_provider.appRootDir, "reqhan");
|
|
149
|
-
const exe = "Zengenti.Contensis.RequestHandler.LocalDevelopment";
|
|
150
|
-
const exePath = import_path.default.join(exeHome, exe);
|
|
151
|
-
const siteConfigPath = import_path.default.join(import_file_provider.appRootDir, "site_config.yaml");
|
|
152
|
-
const args = overrideArgs ? typeof (overrideArgs == null ? void 0 : overrideArgs[0]) === "string" && overrideArgs[0].includes(" ", 2) ? overrideArgs[0].split(" ") : overrideArgs : [];
|
|
153
|
-
if (!args.find((a) => a === "-c"))
|
|
154
|
-
args.push("-c", siteConfigPath);
|
|
155
|
-
const child = (0, import_child_process.spawn)(exePath, args, { stdio: "inherit" });
|
|
156
|
-
log.raw("");
|
|
157
|
-
log.info(`Launching request handler...`);
|
|
158
|
-
if (overrideArgs == null ? void 0 : overrideArgs.length)
|
|
159
|
-
this.log.warning(
|
|
160
|
-
`Spawning process: ${JSON.stringify(child.spawnargs, null, 2)}`
|
|
161
|
-
);
|
|
162
|
-
let isRunning = false;
|
|
163
|
-
(_a = child == null ? void 0 : child.stdout) == null ? void 0 : _a.on("data", (data) => {
|
|
164
|
-
isRunning = true;
|
|
165
|
-
log.raw(data);
|
|
166
|
-
});
|
|
167
|
-
(_b = child == null ? void 0 : child.stderr) == null ? void 0 : _b.on("data", (data) => {
|
|
168
|
-
log.error(data);
|
|
169
|
-
});
|
|
170
|
-
child.on("spawn", () => {
|
|
171
|
-
isRunning = true;
|
|
172
|
-
log.help(
|
|
173
|
-
`You may see a firewall popup requesting network access, it is safe to approve`
|
|
174
|
-
);
|
|
175
|
-
});
|
|
176
|
-
child.on("exit", (code) => {
|
|
177
|
-
isRunning = false;
|
|
178
|
-
log[code === 0 ? "success" : "warning"](
|
|
179
|
-
`Request handler exited with code ${code}
|
|
180
|
-
`
|
|
181
|
-
);
|
|
182
|
-
});
|
|
183
|
-
child.on("error", (error) => {
|
|
184
|
-
isRunning = false;
|
|
185
|
-
log.error(`Could not launch request handler due to error
|
|
186
|
-
${error}`);
|
|
187
|
-
});
|
|
188
|
-
await new Promise((resolve) => setTimeout(resolve, 2e3));
|
|
189
|
-
while (true) {
|
|
190
|
-
if (!isRunning) {
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
144
|
PrintEnvironments = () => {
|
|
197
145
|
const { log, messages } = this;
|
|
198
146
|
const { currentEnvironment, environments = {} } = this.cache;
|
|
@@ -1486,6 +1434,7 @@ Components:`));
|
|
|
1486
1434
|
);
|
|
1487
1435
|
}
|
|
1488
1436
|
});
|
|
1437
|
+
return blocks;
|
|
1489
1438
|
}
|
|
1490
1439
|
if (err) {
|
|
1491
1440
|
log.error(messages.blocks.noList(currentEnv));
|
|
@@ -1519,6 +1468,7 @@ Components:`));
|
|
|
1519
1468
|
} : void 0
|
|
1520
1469
|
);
|
|
1521
1470
|
});
|
|
1471
|
+
return blocks;
|
|
1522
1472
|
}
|
|
1523
1473
|
if (err) {
|
|
1524
1474
|
log.error(messages.blocks.noList(currentEnv, env.currentProject));
|
|
@@ -1833,7 +1783,7 @@ Components:`));
|
|
|
1833
1783
|
}
|
|
1834
1784
|
};
|
|
1835
1785
|
}
|
|
1836
|
-
const cliCommand = (commandArgs, outputOpts
|
|
1786
|
+
const cliCommand = (commandArgs, outputOpts, contensisOpts = {}) => {
|
|
1837
1787
|
return new ContensisCli(["", "", ...commandArgs], outputOpts, contensisOpts);
|
|
1838
1788
|
};
|
|
1839
1789
|
var ContensisCliService_default = ContensisCli;
|