@p0security/cli 0.18.6 → 0.18.7
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/build/dist/commands/__tests__/login.test.js +2 -0
- package/build/dist/commands/__tests__/login.test.js.map +1 -1
- package/build/dist/commands/aws/index.js +3 -0
- package/build/dist/commands/aws/index.js.map +1 -1
- package/build/dist/commands/aws/role.js +6 -1
- package/build/dist/commands/aws/role.js.map +1 -1
- package/build/dist/commands/index.js +1 -1
- package/build/dist/commands/index.js.map +1 -1
- package/build/dist/drivers/api.d.ts +1 -0
- package/build/dist/drivers/api.js +4 -2
- package/build/dist/drivers/api.js.map +1 -1
- package/build/dist/drivers/auth/index.js +9 -0
- package/build/dist/drivers/auth/index.js.map +1 -1
- package/build/dist/index.d.ts +10 -0
- package/build/dist/index.js +35 -12
- package/build/dist/index.js.map +1 -1
- package/build/dist/middlewares/version.js +1 -1
- package/build/dist/middlewares/version.js.map +1 -1
- package/build/dist/opentelemetry/buffered-exporter.d.ts +34 -0
- package/build/dist/opentelemetry/buffered-exporter.js +83 -0
- package/build/dist/opentelemetry/buffered-exporter.js.map +1 -0
- package/build/dist/opentelemetry/instrumentation.d.ts +4 -0
- package/build/dist/opentelemetry/instrumentation.js +77 -0
- package/build/dist/opentelemetry/instrumentation.js.map +1 -0
- package/build/dist/plugins/ssh/index.js +2 -1
- package/build/dist/plugins/ssh/index.js.map +1 -1
- package/build/dist/version.d.ts +2 -2
- package/build/dist/version.js +6 -15
- package/build/dist/version.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -1
package/build/dist/version.d.ts
CHANGED
package/build/dist/version.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -23,15 +14,15 @@ This file is part of @p0security/cli
|
|
|
23
14
|
|
|
24
15
|
You should have received a copy of the GNU General Public License along with @p0security/cli. If not, see <https://www.gnu.org/licenses/>.
|
|
25
16
|
**/
|
|
26
|
-
const
|
|
17
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
27
18
|
const node_sea_1 = require("node:sea");
|
|
28
|
-
const loadCurrentVersion = () =>
|
|
19
|
+
const loadCurrentVersion = () => {
|
|
29
20
|
try {
|
|
30
21
|
if ((0, node_sea_1.isSea)()) {
|
|
31
22
|
// When building with the standalone CLI, we need to manually include the package.json as a
|
|
32
23
|
// static asset in sea-config.json, as it is not included in the build by default.
|
|
33
|
-
const
|
|
34
|
-
const json = JSON.parse(
|
|
24
|
+
const packageJsonText = (0, node_sea_1.getAsset)("package.json", "utf-8");
|
|
25
|
+
const json = JSON.parse(packageJsonText);
|
|
35
26
|
const { name, version } = json;
|
|
36
27
|
return { name, version };
|
|
37
28
|
}
|
|
@@ -41,13 +32,13 @@ const loadCurrentVersion = () => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
41
32
|
const packageJsonPath = process.env.TS_JEST
|
|
42
33
|
? `${__dirname}/../package.json`
|
|
43
34
|
: `${__dirname}/../../package.json`;
|
|
44
|
-
const { name, version } = JSON.parse(
|
|
35
|
+
const { name, version } = JSON.parse(node_fs_1.default.readFileSync(packageJsonPath).toString("utf-8"));
|
|
45
36
|
return { name, version };
|
|
46
37
|
}
|
|
47
38
|
catch (_a) {
|
|
48
39
|
return { name: "@p0security/cli", version: "unknown" };
|
|
49
40
|
}
|
|
50
|
-
}
|
|
41
|
+
};
|
|
51
42
|
// p0VersionInfo is a promise that resolves to the current version info
|
|
52
43
|
// The importer needs to await this promise to actually read the version number
|
|
53
44
|
// e.g. `const { name, version } = await p0VersionInfo;`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;GASG;AACH,sDAAyB;AACzB,uCAA2C;AAE3C,MAAM,kBAAkB,GAAG,GAGzB,EAAE;IACF,IAAI;QACF,IAAI,IAAA,gBAAK,GAAE,EAAE;YACX,2FAA2F;YAC3F,kFAAkF;YAClF,MAAM,eAAe,GAAG,IAAA,mBAAQ,EAAC,cAAc,EAAE,OAAO,CAAC,CAAC;YAC1D,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YACzC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;YAC/B,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;SAC1B;QAED,8DAA8D;QAC9D,6DAA6D;QAC7D,mEAAmE;QACnE,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO;YACzC,CAAC,CAAC,GAAG,SAAS,kBAAkB;YAChC,CAAC,CAAC,GAAG,SAAS,qBAAqB,CAAC;QACtC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAClC,iBAAE,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CACnD,CAAC;QAEF,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;KAC1B;IAAC,WAAM;QACN,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;KACxD;AACH,CAAC,CAAC;AAEF,uEAAuE;AACvE,+EAA+E;AAC/E,wDAAwD;AACxD,EAAE;AACF,mEAAmE;AACnE,oCAAoC;AACvB,QAAA,aAAa,GAAG,kBAAkB,EAAE,CAAC"}
|