Skip to content
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
2 changes: 1 addition & 1 deletion arcli-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default async () => {
const cmd = globs[i];

try {
req = await import(cmd);
req = await import(`file://${cmd}`);
} catch (err) {
console.error(err);
req = () => {};
Expand Down
2 changes: 1 addition & 1 deletion bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const importer = (path, options) => {
return fs.readJsonSync(path);
}

return import(path, options);
return import(`file://${path}`, options);
}

const bootstrap = async () => {
Expand Down
2 changes: 1 addition & 1 deletion commands/config/set/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const HELP = () => {
* @since 2.0.0
*/
const SCHEMA = async ({ props }) => {
const listItem = await import(`${arcli.props.root}/lib/listItem`);
const listItem = await import(`file://${arcli.props.root}/lib/listItem`);

const typeList = types
.map((item, index) =>
Expand Down
4 changes: 3 additions & 1 deletion commands/label/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ const ACTION = async ({ opt, props }) => {

let params = {};

const GENERATOR = await import(`${root}/commands/config/set/generator`);
const GENERATOR = await import(
`file://${root}/commands/config/set/generator`
);

return new Promise((resolve, reject) => {
prompt.get(schema, (err, input = {}) => {
Expand Down
2 changes: 1 addition & 1 deletion commands/package/install/actions-unattended.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default spinner => {

for (let i = 0; i < actionFiles.length; i++) {
const file = actionFiles[i];
const mod = await import(normalizePath(file));
const mod = await import(`file://${normalizePath(file)}`);
const acts = mod(spinner, arcli, params, props);
Object.keys(acts).forEach(key =>
op.set(actions, `postinstall_${i}_${key}`, acts[key]),
Expand Down
2 changes: 1 addition & 1 deletion commands/package/install/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export default spinner => {

for (let i = 0; i < actionFiles.length; i++) {
const file = actionFiles[i];
const mod = await import(normalize(file));
const mod = await import(`file://${normalize(file)}`);
const acts = mod(spinner, arcli, params, props);
Object.keys(acts).forEach(key =>
op.set(actions, `postinstall_${i}_${key}`, acts[key]),
Expand Down
2 changes: 1 addition & 1 deletion commands/package/publish/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default spinner => {

for (let i = 0; i < actionFiles.length; i++) {
const filePath = actionFiles[i];
const mod = await import(normalize(filePath));
const mod = await import(`file://${normalize(filePath)}`);
const acts = mod(spinner);
Object.keys(acts).forEach(key =>
op.set(actions, `prepublish_${i}_${key}`, acts[key]),
Expand Down
24 changes: 15 additions & 9 deletions commands/update/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,14 @@ export default spinner => {

// Get the updated installed version file
const { default: updated } = await import(
getUpdatedConfig({ params, props })
`file://${getUpdatedConfig({ params, props })}`
);
params.project = updated;

// Get the current configig
const { default: current } = await import(originalConfigFile);
const { default: current } = await import(
`file://${originalConfigFile}`
);
params.currentConfig = current;

const diff = semver.diff(current.version, updated.version);
Expand Down Expand Up @@ -209,16 +211,20 @@ export default spinner => {
},

deps: ({ params }) => {
const { quick, type } = params;
try {
const { quick, type } = params;

if (cancelled || quick) return;
if (spinner) spinner.stop();
if (cancelled || quick) return;
if (spinner) spinner.stop();

console.log('');
console.log(`Installing ${chalk.cyan(type)} dependencies...`);
console.log('');
console.log('');
console.log(`Installing ${chalk.cyan(type)} dependencies...`);
console.log('');

return arcli.runCommand('reactium', ['install']);
return arcli.runCommand('reactium', ['install']);
} catch (msg) {
console.error(msg);
}
},

cancelled: () => {
Expand Down
2 changes: 1 addition & 1 deletion commands/update/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default async ({ props, params }, updatePath) => {
}

try {
const { default: configObj } = await import(configFile);
const { default: configObj } = await import(`file://${configFile}`);
config = configObj;
} catch (err) {
config = {};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reactium",
"version": "5.0.11",
"version": "5.0.12",
"description": "A CLI for creating Reactium / Actinium projects.",
"type": "module",
"exports": "./arcli-node.js",
Expand Down