Skip to content

Commit 911fa14

Browse files
move to ESM
# cli-device-browser-demo: use vite
1 parent 480e1e8 commit 911fa14

91 files changed

Lines changed: 802 additions & 2606 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

extensions/cli-ext-compute-vm/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import info from './package.json';
2-
import ssh from './ssh';
1+
import info from './package.json' assert { type: 'json' };
2+
import ssh from './ssh.js';
33

44
export default {
55
name: info.name,

extensions/cli-ext-compute-vm/package.json

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,8 @@
22
"name": "@hyperone/cli-ext-compute-vm",
33
"version": "2.1.12",
44
"description": "",
5-
"main": "dist/index.js",
6-
"browser": "index.js",
7-
"scripts": {
8-
"prepack": "NODE_ENV=production webpack",
9-
"build": "webpack",
10-
"watch": "webpack --watch",
11-
"clean": "rm dist -rf"
12-
},
13-
"devDependencies": {
14-
"webpack": "^5.67.0",
15-
"webpack-cli": "^4.9.2",
16-
"webpack-dev-server": "^4.7.3"
17-
},
5+
"main": "index.js",
6+
"type": "module",
187
"author": "Adam Dobrawy",
198
"license": "ISC",
209
"dependencies": {

extensions/cli-ext-compute-vm/webpack.config.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

extensions/cli-ext-config-autocomplete/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Category } from '@hyperone/cli-framework';
2-
import comply from './commands/comply';
3-
import install from './commands/install';
2+
import comply from './commands/comply.js';
3+
import install from './commands/install.js';
44

5-
import info from './package.json';
5+
import info from './package.json' assert { type: 'json' };
66

77
export default {
88
name: info.name,

extensions/cli-ext-config-autocomplete/package.json

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,8 @@
22
"name": "@hyperone/cli-ext-config-autocomplete",
33
"version": "2.1.12",
44
"description": "Extension to manage autocompletion of CLI.",
5-
"main": "dist/index.js",
6-
"browser": "index.js",
7-
"scripts": {
8-
"prepack": "NODE_ENV=production webpack",
9-
"build": "webpack",
10-
"watch": "webpack --watch",
11-
"clean": "rm dist -rf"
12-
},
13-
"devDependencies": {
14-
"webpack": "^5.67.0",
15-
"webpack-cli": "^4.9.2",
16-
"webpack-dev-server": "^4.7.3"
17-
},
5+
"main": "index.js",
6+
"type": "module",
187
"author": "Adam Dobrawy",
198
"license": "MIT",
209
"dependencies": {

extensions/cli-ext-config-autocomplete/webpack.config.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

extensions/cli-ext-config-extensions/commands/install.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ import fs from 'fs';
66
import path from 'path';
77
import { remove } from 'fs-extra';
88
import { Command } from '@hyperone/cli-framework';
9-
import npm from '../npm';
10-
11-
const r = eval('require');
9+
import npm from '../npm.js';
1210

1311
export default new Command({
1412
name: 'install',
@@ -59,7 +57,7 @@ export default new Command({
5957

6058
let ext;
6159
try {
62-
ext = r(outDir);
60+
ext = await import(path.join(outDir, 'index.js'));
6361
for (const prop of ['name', 'load', 'version']) {
6462
if (!ext[prop]) {
6563
throw new Error(`Invalid extension. Missing '${prop}' property.`);

extensions/cli-ext-config-extensions/commands/list.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
2-
3-
import npm from '../npm';
41
import { Command } from '@hyperone/cli-framework';
5-
2+
import npm from '../npm.js';
63

74
export default new Command({
85
name: 'list',

extensions/cli-ext-config-extensions/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { Category } from '@hyperone/cli-framework';
22

3-
import list from './commands/list';
4-
import install from './commands/install';
5-
import uninstall from './commands/uninstall';
3+
import list from './commands/list.js';
4+
import install from './commands/install.js';
5+
import uninstall from './commands/uninstall.js';
66

7-
import info from './package.json';
7+
import info from './package.json' assert { type: 'json' };
88

99
export default {
1010
name: info.name,

extensions/cli-ext-config-extensions/npm.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export default (http, baseUri) => {
42
const api = {};
53

0 commit comments

Comments
 (0)