@oclif/plugin-test-esbuild 0.4.2 → 0.4.4
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/README.md +1 -1
- package/dist/{chunk-T3WI7GAZ.js → chunk-BYM4WPEW.js} +1 -1
- package/dist/{chunk-I2Y7BTZP.js → chunk-DH5NIOE2.js} +1 -1
- package/dist/{chunk-NET6CTRU.js → chunk-DTYT6BZ4.js} +14 -12
- package/dist/{chunk-6AQAVIMI.js → chunk-F3MMY7AL.js} +1 -1
- package/dist/{chunk-YOJ7W5SK.js → chunk-M3FZD5UL.js} +1 -1
- package/dist/commands/esbuild.js +2 -2
- package/dist/commands/hello/index.js +2 -2
- package/dist/commands/hello/world.js +2 -2
- package/dist/hooks/init/init.js +2 -2
- package/dist/index.js +7 -6
- package/oclif.manifest.json +1 -1
- package/package.json +6 -9
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ $ npm install -g @oclif/plugin-test-esbuild
|
|
|
18
18
|
$ bundle COMMAND
|
|
19
19
|
running command...
|
|
20
20
|
$ bundle (--version)
|
|
21
|
-
@oclif/plugin-test-esbuild/0.4.
|
|
21
|
+
@oclif/plugin-test-esbuild/0.4.4 linux-x64 node-v20.11.1
|
|
22
22
|
$ bundle --help [COMMAND]
|
|
23
23
|
USAGE
|
|
24
24
|
$ bundle COMMAND
|
|
@@ -2323,7 +2323,7 @@ var require_package = __commonJS({
|
|
|
2323
2323
|
module.exports = {
|
|
2324
2324
|
name: "@oclif/core",
|
|
2325
2325
|
description: "base library for oclif CLIs",
|
|
2326
|
-
version: "3.
|
|
2326
|
+
version: "3.21.0",
|
|
2327
2327
|
author: "Salesforce",
|
|
2328
2328
|
bugs: "https://github.com/oclif/core/issues",
|
|
2329
2329
|
dependencies: {
|
|
@@ -2360,7 +2360,7 @@ var require_package = __commonJS({
|
|
|
2360
2360
|
"@oclif/plugin-help": "^6",
|
|
2361
2361
|
"@oclif/plugin-plugins": "^4",
|
|
2362
2362
|
"@oclif/prettier-config": "^0.2.1",
|
|
2363
|
-
"@oclif/test": "^3.1
|
|
2363
|
+
"@oclif/test": "^3.2.1",
|
|
2364
2364
|
"@types/ansi-styles": "^3.2.1",
|
|
2365
2365
|
"@types/benchmark": "^2.1.5",
|
|
2366
2366
|
"@types/chai": "^4.3.11",
|
|
@@ -2385,7 +2385,7 @@ var require_package = __commonJS({
|
|
|
2385
2385
|
"chai-as-promised": "^7.1.1",
|
|
2386
2386
|
commitlint: "^17.8.1",
|
|
2387
2387
|
"cross-env": "^7.0.3",
|
|
2388
|
-
eslint: "^8.
|
|
2388
|
+
eslint: "^8.57.0",
|
|
2389
2389
|
"eslint-config-oclif": "^5.0.2",
|
|
2390
2390
|
"eslint-config-oclif-typescript": "^3.0.48",
|
|
2391
2391
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -213494,7 +213494,7 @@ var require_table = __commonJS({
|
|
|
213494
213494
|
getCSVRow(d) {
|
|
213495
213495
|
const values = this.columns.map((col) => d[col.key] || "");
|
|
213496
213496
|
const lineToBeEscaped = values.find((e) => e.includes('"') || e.includes("\n") || e.includes("\r\n") || e.includes("\r") || e.includes(","));
|
|
213497
|
-
return values.map((e) => lineToBeEscaped ? `"${e.
|
|
213497
|
+
return values.map((e) => lineToBeEscaped ? `"${e.replaceAll('"', '""')}"` : e);
|
|
213498
213498
|
}
|
|
213499
213499
|
outputCSV() {
|
|
213500
213500
|
const { columns, data, options } = this;
|
|
@@ -228274,19 +228274,18 @@ var require_plugin = __commonJS({
|
|
|
228274
228274
|
this.isRoot = this.options.isRoot ?? false;
|
|
228275
228275
|
if (this.options.parent)
|
|
228276
228276
|
this.parent = this.options.parent;
|
|
228277
|
-
const root = this.type === "link" && !this.parent ? this.options.root : await (0, find_root_1.findRoot)(this.options.name, this.options.root);
|
|
228277
|
+
const root = this.options.pjson && this.options.isRoot ? this.options.root : this.type === "link" && !this.parent ? this.options.root : await (0, find_root_1.findRoot)(this.options.name, this.options.root);
|
|
228278
228278
|
if (!root)
|
|
228279
228279
|
throw new errors_1.CLIError(`could not find package.json with ${(0, node_util_1.inspect)(this.options)}`);
|
|
228280
228280
|
this.root = root;
|
|
228281
228281
|
this._debug(`loading ${this.type} plugin from ${root}`);
|
|
228282
|
-
this.pjson = await (0, fs_1.readJson)((0, node_path_1.join)(root, "package.json"));
|
|
228282
|
+
this.pjson = this.options.pjson ?? await (0, fs_1.readJson)((0, node_path_1.join)(root, "package.json"));
|
|
228283
228283
|
this.flexibleTaxonomy = this.options?.flexibleTaxonomy || this.pjson.oclif?.flexibleTaxonomy || false;
|
|
228284
228284
|
this.moduleType = this.pjson.type === "module" ? "module" : "commonjs";
|
|
228285
228285
|
this.name = this.pjson.name;
|
|
228286
228286
|
this.alias = this.options.name ?? this.pjson.name;
|
|
228287
|
-
const pjsonPath = (0, node_path_1.join)(root, "package.json");
|
|
228288
228287
|
if (!this.name)
|
|
228289
|
-
throw new errors_1.CLIError(`no name in ${
|
|
228288
|
+
throw new errors_1.CLIError(`no name in package.json (${root})`);
|
|
228290
228289
|
this._debug = (0, util_2.Debug)(this.name);
|
|
228291
228290
|
this.version = this.pjson.version;
|
|
228292
228291
|
if (this.pjson.oclif) {
|
|
@@ -228447,7 +228446,6 @@ This usually means you have an oclif.manifest.json file that should be deleted i
|
|
|
228447
228446
|
}
|
|
228448
228447
|
}
|
|
228449
228448
|
warn(err, scope) {
|
|
228450
|
-
console.trace();
|
|
228451
228449
|
if (this.warned)
|
|
228452
228450
|
return;
|
|
228453
228451
|
if (typeof err === "string")
|
|
@@ -228524,14 +228522,14 @@ var require_plugin_loader = __commonJS({
|
|
|
228524
228522
|
}
|
|
228525
228523
|
return { errors: this.errors, plugins: this.plugins };
|
|
228526
228524
|
}
|
|
228527
|
-
async loadRoot() {
|
|
228525
|
+
async loadRoot({ pjson }) {
|
|
228528
228526
|
let rootPlugin;
|
|
228529
228527
|
if (this.pluginsProvided) {
|
|
228530
228528
|
const plugins = [...this.plugins.values()];
|
|
228531
228529
|
rootPlugin = plugins.find((p) => p.root === this.options.root) ?? plugins[0];
|
|
228532
228530
|
} else {
|
|
228533
228531
|
const marker = performance_1.Performance.mark(performance_1.OCLIF_MARKER_OWNER, "plugin.load#root");
|
|
228534
|
-
rootPlugin = new Plugin.Plugin({ isRoot: true, root: this.options.root });
|
|
228532
|
+
rootPlugin = new Plugin.Plugin({ isRoot: true, pjson, root: this.options.root });
|
|
228535
228533
|
await rootPlugin.load();
|
|
228536
228534
|
marker?.addDetails({
|
|
228537
228535
|
commandCount: rootPlugin.commands.length,
|
|
@@ -228896,7 +228894,7 @@ var require_config3 = __commonJS({
|
|
|
228896
228894
|
settings_1.settings.performanceEnabled = (settings_1.settings.performanceEnabled === void 0 ? this.options.enablePerf : settings_1.settings.performanceEnabled) ?? false;
|
|
228897
228895
|
const marker = performance_1.Performance.mark(performance_1.OCLIF_MARKER_OWNER, "config.load");
|
|
228898
228896
|
this.pluginLoader = new plugin_loader_1.default({ plugins: this.options.plugins, root: this.options.root });
|
|
228899
|
-
this.rootPlugin = await this.pluginLoader.loadRoot();
|
|
228897
|
+
this.rootPlugin = await this.pluginLoader.loadRoot({ pjson: this.options.pjson });
|
|
228900
228898
|
const cache = cache_1.default.getInstance();
|
|
228901
228899
|
cache.set("rootPlugin", this.rootPlugin);
|
|
228902
228900
|
cache.set("exitCodes", this.rootPlugin.pjson.oclif.exitCodes ?? {});
|
|
@@ -230727,10 +230725,14 @@ var require_execute = __commonJS({
|
|
|
230727
230725
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
230728
230726
|
exports.execute = void 0;
|
|
230729
230727
|
var flush_1 = require_flush();
|
|
230728
|
+
var errors_1 = require_errors();
|
|
230730
230729
|
var handle_1 = require_handle();
|
|
230731
230730
|
var main_1 = require_main();
|
|
230732
230731
|
var settings_1 = require_settings();
|
|
230733
230732
|
async function execute(options) {
|
|
230733
|
+
if (!options.dir && !options.loadOptions) {
|
|
230734
|
+
throw new errors_1.CLIError("dir or loadOptions is required.");
|
|
230735
|
+
}
|
|
230734
230736
|
if (options.development) {
|
|
230735
230737
|
process.env.NODE_ENV = "development";
|
|
230736
230738
|
settings_1.settings.debug = true;
|
package/dist/commands/esbuild.js
CHANGED
package/dist/hooks/init/init.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ESBuild
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DH5NIOE2.js";
|
|
4
4
|
import {
|
|
5
5
|
Hello
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BYM4WPEW.js";
|
|
7
7
|
import {
|
|
8
8
|
World
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-M3FZD5UL.js";
|
|
10
10
|
import {
|
|
11
11
|
init_default
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-F3MMY7AL.js";
|
|
13
13
|
import {
|
|
14
14
|
__commonJS,
|
|
15
15
|
__toESM,
|
|
16
16
|
init_cjs_shims,
|
|
17
17
|
require_lib,
|
|
18
18
|
require_src
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-DTYT6BZ4.js";
|
|
20
20
|
|
|
21
21
|
// node_modules/semver/internal/constants.js
|
|
22
22
|
var require_constants = __commonJS({
|
|
@@ -2992,16 +2992,17 @@ var Plugins = class {
|
|
|
2992
2992
|
root,
|
|
2993
2993
|
userPlugins: false
|
|
2994
2994
|
});
|
|
2995
|
-
await this.refresh({ all: true, prod: true }, plugin.root);
|
|
2996
2995
|
this.isValidPlugin(plugin);
|
|
2997
2996
|
await this.add({ name, type: "user", url });
|
|
2998
2997
|
if (plugin.getPluginsList().find((p) => p.root === root)?.moduleType === "module" && await fileExists(join3(plugin.root, "tsconfig.json"))) {
|
|
2999
2998
|
try {
|
|
2999
|
+
await this.yarn.exec(["install"], { ...yarnOpts, cwd: plugin.root });
|
|
3000
3000
|
await this.yarn.exec(["run", "tsc"], { ...yarnOpts, cwd: plugin.root });
|
|
3001
3001
|
} catch (error) {
|
|
3002
3002
|
this.debug(error);
|
|
3003
3003
|
}
|
|
3004
3004
|
}
|
|
3005
|
+
await this.refresh({ all: true, prod: true }, plugin.root);
|
|
3005
3006
|
} else {
|
|
3006
3007
|
const range = (0, import_semver.validRange)(tag);
|
|
3007
3008
|
const unfriendly = this.unfriendlyName(name);
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oclif/plugin-test-esbuild",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Bundled plugin for testing",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/oclif/plugin-test-esbuild/issues",
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
"bundle": "./bin/run.js"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@oclif/core": "3.
|
|
15
|
-
"@oclif/plugin-test-esm-1": "^0.7.
|
|
16
|
-
"@oclif/plugin-plugins": "4.
|
|
14
|
+
"@oclif/core": "^3.21.0",
|
|
15
|
+
"@oclif/plugin-test-esm-1": "^0.7.3",
|
|
16
|
+
"@oclif/plugin-plugins": "^4.3.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@oclif/prettier-config": "^0.2.1",
|
|
20
20
|
"@oclif/test": "^3",
|
|
21
21
|
"@types/chai": "^4",
|
|
22
|
-
"@types/mocha": "^
|
|
22
|
+
"@types/mocha": "^10.0.0",
|
|
23
23
|
"@types/node": "^18",
|
|
24
24
|
"chai": "^4",
|
|
25
25
|
"esbuild": "^0.20.1",
|
|
@@ -28,14 +28,11 @@
|
|
|
28
28
|
"eslint-config-oclif-typescript": "^3",
|
|
29
29
|
"eslint-config-prettier": "^9.1.0",
|
|
30
30
|
"mocha": "^10",
|
|
31
|
-
"oclif": "4.
|
|
31
|
+
"oclif": "^4.5.2",
|
|
32
32
|
"shx": "^0.3.4",
|
|
33
33
|
"ts-node": "^10.9.2",
|
|
34
34
|
"typescript": "^5"
|
|
35
35
|
},
|
|
36
|
-
"resolutions": {
|
|
37
|
-
"@oclif/core": "3.20.1-dev.0"
|
|
38
|
-
},
|
|
39
36
|
"engines": {
|
|
40
37
|
"node": ">=18.0.0"
|
|
41
38
|
},
|