@vertexvis/plm-cli 0.1.3
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 +373 -0
- package/bin/run +5 -0
- package/bin/run.cmd +3 -0
- package/lib/commands/configure.d.ts +30 -0
- package/lib/commands/configure.js +162 -0
- package/lib/commands/set-overwrite.d.ts +13 -0
- package/lib/commands/set-overwrite.js +75 -0
- package/lib/commands/view-part-jobs.d.ts +13 -0
- package/lib/commands/view-part-jobs.js +58 -0
- package/lib/commands/view-part-structure.d.ts +13 -0
- package/lib/commands/view-part-structure.js +53 -0
- package/lib/commands/view-part.d.ts +13 -0
- package/lib/commands/view-part.js +83 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +5 -0
- package/lib/lib/args.d.ts +11 -0
- package/lib/lib/args.js +20 -0
- package/lib/lib/base.d.ts +7 -0
- package/lib/lib/base.js +13 -0
- package/lib/lib/config.d.ts +15 -0
- package/lib/lib/config.js +59 -0
- package/lib/lib/plm-api/find-registered-part-revision.d.ts +6 -0
- package/lib/lib/plm-api/find-registered-part-revision.js +24 -0
- package/lib/lib/plm-api/get-registered-part-revision-jobs.d.ts +3 -0
- package/lib/lib/plm-api/get-registered-part-revision-jobs.js +25 -0
- package/lib/lib/plm-api/index.d.ts +4 -0
- package/lib/lib/plm-api/index.js +7 -0
- package/lib/lib/plm-api/plm-api.d.ts +9 -0
- package/lib/lib/plm-api/plm-api.js +14 -0
- package/lib/lib/plm-api/set-overwrite-policy.d.ts +7 -0
- package/lib/lib/plm-api/set-overwrite-policy.js +24 -0
- package/lib/lib/prompt.d.ts +2 -0
- package/lib/lib/prompt.js +19 -0
- package/lib/lib/tree/tree-node.d.ts +64 -0
- package/lib/lib/tree/tree-node.js +150 -0
- package/lib/lib/vertex-api/client.d.ts +2 -0
- package/lib/lib/vertex-api/client.js +26 -0
- package/lib/lib/vertex-api/get-part-revision-instance-tree.d.ts +10 -0
- package/lib/lib/vertex-api/get-part-revision-instance-tree.js +97 -0
- package/lib/lib/vertex-api/index.d.ts +2 -0
- package/lib/lib/vertex-api/index.js +5 -0
- package/oclif.manifest.json +1 -0
- package/package.json +69 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// tree-node.ts
|
|
3
|
+
// USAGE EXAMPLE:
|
|
4
|
+
// import { TreeNode } from './tree-node'
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TreeNode = void 0;
|
|
7
|
+
// const root = new TreeNode<string>('root')
|
|
8
|
+
// const a = new TreeNode('child A', root)
|
|
9
|
+
// new TreeNode('grandchild A1', a)
|
|
10
|
+
// new TreeNode('child B', root)
|
|
11
|
+
// console.log(root.size) // 4
|
|
12
|
+
// console.log(root.depth) // 0
|
|
13
|
+
// console.log(a.depth) // 1
|
|
14
|
+
// console.log(root.contains('A1')) // true
|
|
15
|
+
// for (const node of root) {
|
|
16
|
+
// console.log(node.data)
|
|
17
|
+
// }
|
|
18
|
+
// console.log(root.dump())
|
|
19
|
+
/**
|
|
20
|
+
* A simple tree node class that can be used to create a tree structure.
|
|
21
|
+
* Each node can have multiple children and a single parent.
|
|
22
|
+
* The class provides methods to traverse the tree, check properties of nodes,
|
|
23
|
+
* and manipulate the tree structure.
|
|
24
|
+
*
|
|
25
|
+
* @template T The type of the data stored in the node.
|
|
26
|
+
* @class TreeNode
|
|
27
|
+
*/
|
|
28
|
+
class TreeNode {
|
|
29
|
+
constructor(data = null, parent) {
|
|
30
|
+
this.parent = null;
|
|
31
|
+
this.children = [];
|
|
32
|
+
this.data = data;
|
|
33
|
+
if (parent) {
|
|
34
|
+
this.parent = parent;
|
|
35
|
+
parent.children.push(this);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/** Pre-order traversal generator
|
|
39
|
+
* @param {TreeNode<U>} node - The node to start traversal from.
|
|
40
|
+
* @returns {Generator<TreeNode<U>>} A generator yielding nodes in pre-order.
|
|
41
|
+
*/
|
|
42
|
+
static *preorder(node) {
|
|
43
|
+
yield node;
|
|
44
|
+
for (const child of node.children) {
|
|
45
|
+
yield* TreeNode.preorder(child);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/** Total number of nodes in this subtree (includes this node) */
|
|
49
|
+
get size() {
|
|
50
|
+
let count = 1;
|
|
51
|
+
for (const child of this.children) {
|
|
52
|
+
count += child.size;
|
|
53
|
+
}
|
|
54
|
+
return count;
|
|
55
|
+
}
|
|
56
|
+
isRoot() {
|
|
57
|
+
return this.parent === null;
|
|
58
|
+
}
|
|
59
|
+
isLeaf() {
|
|
60
|
+
return this.children.length === 0;
|
|
61
|
+
}
|
|
62
|
+
hasChildren() {
|
|
63
|
+
return this.children.length > 0;
|
|
64
|
+
}
|
|
65
|
+
hasSiblings() {
|
|
66
|
+
return this.parent !== null && this.parent.children.length > 1;
|
|
67
|
+
}
|
|
68
|
+
isEmpty() {
|
|
69
|
+
return this.children.length === 0;
|
|
70
|
+
}
|
|
71
|
+
/** Distance from this node up to the root (root.depth === 0) */
|
|
72
|
+
get depth() {
|
|
73
|
+
let d = 0;
|
|
74
|
+
let current = this.parent;
|
|
75
|
+
while (current !== null) {
|
|
76
|
+
d++;
|
|
77
|
+
current = current.parent;
|
|
78
|
+
}
|
|
79
|
+
return d;
|
|
80
|
+
}
|
|
81
|
+
/** Number of direct children */
|
|
82
|
+
get numChildren() {
|
|
83
|
+
return this.children.length;
|
|
84
|
+
}
|
|
85
|
+
/** Number of siblings (including this node) */
|
|
86
|
+
get numSiblings() {
|
|
87
|
+
return this.parent ? this.parent.children.length : 0;
|
|
88
|
+
}
|
|
89
|
+
/** Allow `for (const n of someNode) { … }`
|
|
90
|
+
* @returns {Iterator<TreeNode<T>>} An iterator over nodes in pre-order.
|
|
91
|
+
*/
|
|
92
|
+
[Symbol.iterator]() {
|
|
93
|
+
return TreeNode.preorder(this);
|
|
94
|
+
}
|
|
95
|
+
/** True if any node in this subtree holds `obj` (by `===`)
|
|
96
|
+
* @param {T} obj - The object to search for.
|
|
97
|
+
* @returns {boolean} True if found, false otherwise.
|
|
98
|
+
*/
|
|
99
|
+
contains(obj) {
|
|
100
|
+
for (const node of this) {
|
|
101
|
+
if (node.data === obj)
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
/** Remove all descendants (but not this node itself)
|
|
107
|
+
* @returns {void}
|
|
108
|
+
*/
|
|
109
|
+
clear() {
|
|
110
|
+
for (const child of this.children) {
|
|
111
|
+
child.clear();
|
|
112
|
+
}
|
|
113
|
+
this.children = [];
|
|
114
|
+
}
|
|
115
|
+
/** Grab the data payload in pre-order as a flat array
|
|
116
|
+
* @returns {(T | null)[]} Array of data values in pre-order.
|
|
117
|
+
*/
|
|
118
|
+
toArray() {
|
|
119
|
+
const out = [];
|
|
120
|
+
for (const node of TreeNode.preorder(this)) {
|
|
121
|
+
out.push(node.data);
|
|
122
|
+
}
|
|
123
|
+
return out;
|
|
124
|
+
}
|
|
125
|
+
/** Returns a string representation of this node
|
|
126
|
+
* @returns {string} String representation of the node.
|
|
127
|
+
*/
|
|
128
|
+
toString({ node, data, } = {}) {
|
|
129
|
+
const role = this.isRoot() ? '(root)' : '';
|
|
130
|
+
const childInfo = this.isLeaf()
|
|
131
|
+
? '(leaf)'
|
|
132
|
+
: `has ${this.children.length.toString()} child node${this.children.length === 1 ? '' : 's'}`;
|
|
133
|
+
return node
|
|
134
|
+
? node(this)
|
|
135
|
+
: `[TreeNode ${role} ${childInfo}, data=[${data ? data(this.data) : JSON.stringify(this.data).slice(0, 160)}]]`;
|
|
136
|
+
}
|
|
137
|
+
/** Human-readable dump with ASCII-tree lines
|
|
138
|
+
* @returns {string} A multi-line string representation of the tree.
|
|
139
|
+
*/
|
|
140
|
+
dump({ node, data, } = {}) {
|
|
141
|
+
let result = '';
|
|
142
|
+
for (const treeNode of TreeNode.preorder(this)) {
|
|
143
|
+
const d = treeNode.depth;
|
|
144
|
+
const prefix = d > 0 ? '│ '.repeat(d - 1) + '└── ' : '';
|
|
145
|
+
result += prefix + treeNode.toString({ node, data }) + '\n';
|
|
146
|
+
}
|
|
147
|
+
return result;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
exports.TreeNode = TreeNode;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getClient = void 0;
|
|
4
|
+
const api_client_node_1 = require("@vertexvis/api-client-node");
|
|
5
|
+
let clientPromise;
|
|
6
|
+
function buildClient() {
|
|
7
|
+
if (!process.env.VERTEX_CLIENT_ID ||
|
|
8
|
+
!process.env.VERTEX_CLIENT_SECRET ||
|
|
9
|
+
!process.env.VERTEX_API_HOST) {
|
|
10
|
+
throw new Error('VERTEX_CLIENT_ID, VERTEX_CLIENT_SECRET, and VERTEX_API_HOST must be set in configuration or environment variables');
|
|
11
|
+
}
|
|
12
|
+
return api_client_node_1.VertexClient.build({
|
|
13
|
+
basePath: process.env.VERTEX_API_HOST,
|
|
14
|
+
client: {
|
|
15
|
+
id: process.env.VERTEX_CLIENT_ID,
|
|
16
|
+
secret: process.env.VERTEX_CLIENT_SECRET,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function getClient() {
|
|
21
|
+
if (clientPromise === undefined) {
|
|
22
|
+
clientPromise = buildClient();
|
|
23
|
+
}
|
|
24
|
+
return clientPromise;
|
|
25
|
+
}
|
|
26
|
+
exports.getClient = getClient;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PartData, PartRevisionData, PartRevisionInstanceData, VertexClient } from '@vertexvis/api-client-node';
|
|
2
|
+
import { TreeNode } from '../tree/tree-node';
|
|
3
|
+
interface PartAndPartRevision {
|
|
4
|
+
part: PartData;
|
|
5
|
+
partRevision: PartRevisionData;
|
|
6
|
+
}
|
|
7
|
+
export declare function fetchPartRevisionInstanceTree(partRevisionId: string): Promise<TreeNode<PartRevisionInstanceData>>;
|
|
8
|
+
export declare function getUniquePartRevisionsForInstanceTree(partRevisionId: string): Promise<Array<PartAndPartRevision>>;
|
|
9
|
+
export declare function fetchPartRevisionInstances(client: VertexClient, partRevisionId: string): Promise<Array<PartRevisionInstanceData>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchPartRevisionInstances = exports.getUniquePartRevisionsForInstanceTree = exports.fetchPartRevisionInstanceTree = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const p_limit_1 = (0, tslib_1.__importDefault)(require("p-limit"));
|
|
6
|
+
const tree_node_1 = require("../tree/tree-node");
|
|
7
|
+
const client_1 = require("./client");
|
|
8
|
+
const API_LIMIT = process.env.VERTEX_API_LIMIT
|
|
9
|
+
? parseInt(process.env.VERTEX_API_LIMIT, 10)
|
|
10
|
+
: 20;
|
|
11
|
+
const limit = (0, p_limit_1.default)(API_LIMIT);
|
|
12
|
+
async function fetchPartRevisionInstanceTree(partRevisionId) {
|
|
13
|
+
const rootNode = new tree_node_1.TreeNode({
|
|
14
|
+
id: partRevisionId,
|
|
15
|
+
type: 'part-revision',
|
|
16
|
+
attributes: {},
|
|
17
|
+
relationships: {
|
|
18
|
+
partRevision: { data: { id: partRevisionId, type: 'part-revision' } },
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
const client = await (0, client_1.getClient)();
|
|
22
|
+
const partRevisionInstanceCache = new Map();
|
|
23
|
+
await addInstanceChildrenRecursively(client, rootNode, partRevisionInstanceCache);
|
|
24
|
+
// console.log(`Found total of ${partRevisionInstanceCache.size} unique part revisions in the instance tree.`);
|
|
25
|
+
// console.log(`${[...partRevisionInstanceCache.entries()].map(([k,v]) => `Part Revision ID: ${k}, Instance Count: ${v.length}`).join('\n')}`);
|
|
26
|
+
// console.log(JSON.stringify([...partRevisionInstanceCache.entries()], null, 2));
|
|
27
|
+
return rootNode;
|
|
28
|
+
}
|
|
29
|
+
exports.fetchPartRevisionInstanceTree = fetchPartRevisionInstanceTree;
|
|
30
|
+
async function getUniquePartRevisionsForInstanceTree(partRevisionId) {
|
|
31
|
+
const rootNode = new tree_node_1.TreeNode({
|
|
32
|
+
id: partRevisionId,
|
|
33
|
+
type: 'part-revision',
|
|
34
|
+
attributes: {},
|
|
35
|
+
relationships: {
|
|
36
|
+
partRevision: { data: { id: partRevisionId, type: 'part-revision' } },
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
const client = await (0, client_1.getClient)();
|
|
40
|
+
const partRevisionInstanceCache = new Map();
|
|
41
|
+
await addInstanceChildrenRecursively(client, rootNode, partRevisionInstanceCache);
|
|
42
|
+
const uniquePartRevisions = [...partRevisionInstanceCache.keys()];
|
|
43
|
+
const results = await Promise.all(uniquePartRevisions.map(async (prId) => {
|
|
44
|
+
const partRevision = await limit(() => client.partRevisions.getPartRevision({
|
|
45
|
+
id: prId,
|
|
46
|
+
fieldsPartRevision: 'suppliedId,created,metadata',
|
|
47
|
+
}));
|
|
48
|
+
if (partRevision.data.data === null ||
|
|
49
|
+
partRevision.data.data === undefined) {
|
|
50
|
+
console.warn(`Part Revision ID: ${prId} not found when fetching unique part revisions.`);
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
const partRelationship = partRevision.data.data.relationships.part;
|
|
54
|
+
if (partRelationship === null || partRelationship === undefined) {
|
|
55
|
+
console.warn(`Part relationship not found for part revision ${prId}.`);
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
const part = await client.parts.getPart({ id: partRelationship.id });
|
|
59
|
+
return {
|
|
60
|
+
partRevision: partRevision.data.data,
|
|
61
|
+
part: part.data.data,
|
|
62
|
+
};
|
|
63
|
+
}));
|
|
64
|
+
// console.log(`Fetched total of ${results.length} unique part revisions in the instance tree.`);
|
|
65
|
+
// console.log(JSON.stringify(results, null, 2));
|
|
66
|
+
return results.filter((r) => r !== undefined);
|
|
67
|
+
}
|
|
68
|
+
exports.getUniquePartRevisionsForInstanceTree = getUniquePartRevisionsForInstanceTree;
|
|
69
|
+
async function addInstanceChildrenRecursively(client, node, partRevisionInstanceCache) {
|
|
70
|
+
var _a, _b, _c;
|
|
71
|
+
if (!((_c = (_b = (_a = node.data) === null || _a === void 0 ? void 0 : _a.relationships.partRevision) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.id)) {
|
|
72
|
+
console.warn(`Node [${node.toString()}] does not have a part revision relationship. Skipping children fetch.`);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
const partRevisionId = node.data.relationships.partRevision.data.id;
|
|
76
|
+
let instances = partRevisionInstanceCache.get(partRevisionId);
|
|
77
|
+
if (instances === null || instances === undefined) {
|
|
78
|
+
instances = await fetchPartRevisionInstances(client, partRevisionId);
|
|
79
|
+
partRevisionInstanceCache.set(partRevisionId, instances);
|
|
80
|
+
}
|
|
81
|
+
await Promise.allSettled(instances.map(async (instance) => {
|
|
82
|
+
const childNode = new tree_node_1.TreeNode(instance);
|
|
83
|
+
node.children.push(childNode);
|
|
84
|
+
childNode.parent = node;
|
|
85
|
+
await addInstanceChildrenRecursively(client, childNode, partRevisionInstanceCache);
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
async function fetchPartRevisionInstances(client, partRevisionId) {
|
|
89
|
+
// Fetch the whole instance tree for a given part revision from the platform APIs
|
|
90
|
+
// console.log(`Fetching instance tree for Part Revision ID: ${partRevisionId}`);
|
|
91
|
+
const instanceTreeResponse = await limit(() => client.partRevisionInstances.getPartRevisionInstanceList({
|
|
92
|
+
filterParent: partRevisionId,
|
|
93
|
+
}));
|
|
94
|
+
// console.log(`Fetched ${instanceTreeResponse.data.data.length} instance tree items.`);
|
|
95
|
+
return instanceTreeResponse.data.data.sort((a, b) => { var _a, _b; return ((_a = a.attributes.ordinal) !== null && _a !== void 0 ? _a : 0) - ((_b = b.attributes.ordinal) !== null && _b !== void 0 ? _b : 0); });
|
|
96
|
+
}
|
|
97
|
+
exports.fetchPartRevisionInstances = fetchPartRevisionInstances;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"0.1.3","commands":{"configure":{"id":"configure","description":"Manage config at /home/runner/.vertex-plm/config.json (env vars override config at runtime)","pluginName":"@vertexvis/plm-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"VERTEX_CLIENT_ID":{"name":"VERTEX_CLIENT_ID","type":"option","description":"Vertex client id"},"VERTEX_CLIENT_SECRET":{"name":"VERTEX_CLIENT_SECRET","type":"option","description":"Vertex client secret"},"VERTEX_API_HOST":{"name":"VERTEX_API_HOST","type":"option","description":"Vertex API host (e.g. https://api.example.com)"},"VERTEX_PLM_HOST":{"name":"VERTEX_PLM_HOST","type":"option","description":"Vertex PLM host (e.g. https://plm.example.com)"},"VERTEX_PLM_API_KEY":{"name":"VERTEX_PLM_API_KEY","type":"option","description":"Vertex PLM API key"},"interactive":{"name":"interactive","type":"boolean","description":"Prompt for missing values (leave blank to keep current)","allowNo":false},"unset":{"name":"unset","type":"option","description":"Unset one or more config keys"},"reset":{"name":"reset","type":"boolean","description":"Delete config file and reset all values","allowNo":false},"show":{"name":"show","type":"boolean","description":"Show current config (secrets redacted)","allowNo":false}},"args":[]},"set-overwrite":{"id":"set-overwrite","description":"Set overwrite flag for a given part revision","pluginName":"@vertexvis/plm-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"plmPartId","description":"PLM part ID (string)","required":true},{"name":"plmRevisionId","description":"PLM revision ID (string)","required":true},{"name":"plmIterationId","description":"PLM iteration ID (string, optional)","required":false}]},"view-part-jobs":{"id":"view-part-jobs","description":"View PLM kernel jobs for a given part revision","pluginName":"@vertexvis/plm-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"plmPartId","description":"PLM part ID (string)","required":true},{"name":"plmRevisionId","description":"PLM revision ID (string)","required":true},{"name":"plmIterationId","description":"PLM iteration ID (string, optional)","required":false}]},"view-part-structure":{"id":"view-part-structure","description":"View structure for a given part revision","pluginName":"@vertexvis/plm-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"plmPartId","description":"PLM part ID (string)","required":true},{"name":"plmRevisionId","description":"PLM revision ID (string)","required":true},{"name":"plmIterationId","description":"PLM iteration ID (string, optional)","required":false}]},"view-part":{"id":"view-part","description":"Find a registered part revision","pluginName":"@vertexvis/plm-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"plmPartId","description":"PLM part ID (string)","required":true},{"name":"plmRevisionId","description":"PLM revision ID (string)","required":true},{"name":"plmIterationId","description":"PLM iteration ID (string, optional)","required":false}]}}}
|
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vertexvis/plm-cli",
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"main": "lib/index.js",
|
|
5
|
+
"types": "lib/index.d.ts",
|
|
6
|
+
"bin": {
|
|
7
|
+
"vertex-plm": "./bin/run"
|
|
8
|
+
},
|
|
9
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=16.0.0"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"/bin",
|
|
15
|
+
"/lib",
|
|
16
|
+
"/oclif.manifest.json"
|
|
17
|
+
],
|
|
18
|
+
"oclif": {
|
|
19
|
+
"commands": "./lib/commands",
|
|
20
|
+
"bin": "vertex-plm",
|
|
21
|
+
"plugins": [
|
|
22
|
+
"@oclif/plugin-help"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "tsc --build",
|
|
27
|
+
"clean": "rm -rf coverage lib && rm -f oclif.manifest.json",
|
|
28
|
+
"format": "prettier --write './**/*.+(js|jsx|ts|tsx|json|yml|yaml|md|mdx|html|css)'",
|
|
29
|
+
"lint": "eslint . --ext .ts",
|
|
30
|
+
"postpack": "rm -f oclif.manifest.json",
|
|
31
|
+
"pre-commit": "yarn lint && yarn format",
|
|
32
|
+
"prepack": "yarn clean && yarn build && oclif-dev manifest",
|
|
33
|
+
"setup": "yarn",
|
|
34
|
+
"test": "TS_NODE_PROJECT=test/tsconfig.json nyc mocha",
|
|
35
|
+
"version": "git add package.json"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@oclif/command": "^1",
|
|
39
|
+
"@oclif/config": "^1.18.9",
|
|
40
|
+
"@oclif/plugin-help": "^3.3.1",
|
|
41
|
+
"@vertexvis/api-client-node": "^0.40.0",
|
|
42
|
+
"cli-ux": "^5.6.7",
|
|
43
|
+
"p-limit": "^3.1",
|
|
44
|
+
"tslib": "2.8.1"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@istanbuljs/nyc-config-typescript": "^1.0",
|
|
48
|
+
"@oclif/dev-cli": "^1",
|
|
49
|
+
"@oclif/parser": "^3.8",
|
|
50
|
+
"@oclif/test": "^1.2",
|
|
51
|
+
"@types/chai": "^4.3",
|
|
52
|
+
"@types/mocha": "^9",
|
|
53
|
+
"@types/node": "~16.11.26",
|
|
54
|
+
"@vertexvis/eslint-config-vertexvis-typescript": "0.4",
|
|
55
|
+
"chai": "^4.3",
|
|
56
|
+
"eslint": "^7",
|
|
57
|
+
"eslint-config-oclif": "3.1.0",
|
|
58
|
+
"eslint-config-oclif-typescript": "^1.0",
|
|
59
|
+
"eslint-plugin-promise": "^5.2",
|
|
60
|
+
"eslint-plugin-simple-import-sort": "^7.0",
|
|
61
|
+
"mocha": "^9",
|
|
62
|
+
"nyc": "^15.1",
|
|
63
|
+
"prettier": "^2.5",
|
|
64
|
+
"sinon": "^12.0",
|
|
65
|
+
"source-map-support": "^0.5",
|
|
66
|
+
"ts-node": "^10.4",
|
|
67
|
+
"typescript": "4.4.x"
|
|
68
|
+
}
|
|
69
|
+
}
|