Skip to content

fix: make usable without esm #514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions _helpers/add-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const Listr = require('listr');
const { promisify } = require('util');
const path = require('path');
const fs = require('fs');
const { error, success } = require('log-symbols');

const mkdir = promisify(fs.mkdir);

Expand Down Expand Up @@ -45,7 +44,7 @@ async function run() {

const successMessage = `

${success} Template created
Template created

You can find your template in the directory ${targetPath}.

Expand All @@ -59,7 +58,7 @@ ${success} Template created
run().catch((err) => {
if (err.code && err.code === 'EEXIST') {
console.error(
`${error} The name you specified already exists. Please pick a name that is not currently a directory name in this project`
`The name you specified already exists. Please pick a name that is not currently a directory name in this project`
);
} else {
console.error(err.message);
Expand Down
7 changes: 3 additions & 4 deletions _helpers/import-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const Listr = require('listr');
const { promisify } = require('util');
const path = require('path');
const fs = require('fs');
const { error, success } = require('log-symbols');
const inquirer = require('inquirer');

const mkdir = promisify(fs.mkdir);
Expand All @@ -25,7 +24,7 @@ async function run(args) {

if (!(await isServerlessProject(fullExistingProjectPath))) {
throw new Error(
`${error} Invalid project structure. The path you specfied does not match what a Twilio Serverless project should look like. Please point the tool at the root of a project created with "twilio serverless:init".`
`Invalid project structure. The path you specfied does not match what a Twilio Serverless project should look like. Please point the tool at the root of a project created with "twilio serverless:init".`
);
}

Expand Down Expand Up @@ -86,7 +85,7 @@ async function run(args) {

const successMessage = `

${success} Template created
Template created

You can find your template in the directory ${targetPath}.

Expand All @@ -100,7 +99,7 @@ async function run(args) {
run(process.argv).catch((err) => {
if (err.code && err.code === 'EEXIST') {
console.error(
`${error} The name you specified already exists. Please pick a name that is not currently a directory name in this project`
`The name you specified already exists. Please pick a name that is not currently a directory name in this project`
);
} else {
console.error(err.message);
Expand Down
1 change: 0 additions & 1 deletion _helpers/utils/new-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const { promisify } = require('util');
const path = require('path');
const fs = require('fs');
const { stat, readdir, copyFile, mkdir, rename } = require('fs/promises');
const { error, success } = require('log-symbols');
const { parser } = require('configure-env');
const { createOutput } = require('configure-env/dist/output');
const { stripIndents } = require('common-tags');
Expand Down
Loading
Loading