@salesforce/packaging 3.5.10 → 3.5.11
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.
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DirectedGraph } from 'graphology';
|
|
2
2
|
import { AsyncCreatable } from '@salesforce/kit';
|
|
3
|
-
import { Tree } from '@oclif/core/lib/cli-ux/styled/tree';
|
|
4
3
|
import { AncestryRepresentationProducer, AncestryRepresentationProducerOptions, PackageAncestryNodeData, PackageAncestryNodeOptions, PackageAncestryOptions } from '../interfaces';
|
|
5
4
|
import { VersionNumber } from './versionNumber';
|
|
6
5
|
/**
|
|
@@ -57,6 +56,14 @@ export declare class PackageAncestry extends AsyncCreatable<PackageAncestryOptio
|
|
|
57
56
|
private addToGraph;
|
|
58
57
|
private getDescendants;
|
|
59
58
|
}
|
|
59
|
+
declare class Tree {
|
|
60
|
+
nodes: {
|
|
61
|
+
[key: string]: Tree;
|
|
62
|
+
};
|
|
63
|
+
display(logger?: (text: string) => void): void;
|
|
64
|
+
insert(child: string, value?: Tree): Tree;
|
|
65
|
+
search(key: string): Tree | undefined;
|
|
66
|
+
}
|
|
60
67
|
export declare class AncestryTreeProducer extends Tree implements AncestryRepresentationProducer {
|
|
61
68
|
label: string;
|
|
62
69
|
options?: AncestryRepresentationProducerOptions;
|
|
@@ -110,3 +117,4 @@ export declare class PackageAncestryNode extends AsyncCreatable<PackageAncestryN
|
|
|
110
117
|
getVersion(): string;
|
|
111
118
|
protected init(): Promise<void>;
|
|
112
119
|
}
|
|
120
|
+
export {};
|
|
@@ -22,6 +22,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
25
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
29
|
exports.PackageAncestryNode = exports.AncestryDotProducer = exports.AncestryJsonProducer = exports.AncestryTreeProducer = exports.PackageAncestry = void 0;
|
|
27
30
|
/*
|
|
@@ -34,8 +37,9 @@ const node_os_1 = require("node:os");
|
|
|
34
37
|
const core_1 = require("@salesforce/core");
|
|
35
38
|
const graphology_1 = require("graphology");
|
|
36
39
|
const kit_1 = require("@salesforce/kit");
|
|
37
|
-
const tree_1 = require("@oclif/core/lib/cli-ux/styled/tree");
|
|
38
40
|
const graphology_traversal_1 = require("graphology-traversal");
|
|
41
|
+
// @ts-expect-error because object-treeify v2 is not typed
|
|
42
|
+
const object_treeify_1 = __importDefault(require("object-treeify"));
|
|
39
43
|
const pkgUtils = __importStar(require("../utils/packageUtils"));
|
|
40
44
|
const packageVersion_1 = require("./packageVersion");
|
|
41
45
|
const package_1 = require("./package");
|
|
@@ -324,7 +328,39 @@ class PackageAncestry extends kit_1.AsyncCreatable {
|
|
|
324
328
|
}
|
|
325
329
|
}
|
|
326
330
|
exports.PackageAncestry = PackageAncestry;
|
|
327
|
-
class
|
|
331
|
+
class Tree {
|
|
332
|
+
constructor() {
|
|
333
|
+
this.nodes = {};
|
|
334
|
+
}
|
|
335
|
+
// eslint-disable-next-line no-console
|
|
336
|
+
display(logger = console.log) {
|
|
337
|
+
const addNodes = function (nodes) {
|
|
338
|
+
const tree = {};
|
|
339
|
+
for (const p of Object.keys(nodes)) {
|
|
340
|
+
tree[p] = addNodes(nodes[p].nodes);
|
|
341
|
+
}
|
|
342
|
+
return tree;
|
|
343
|
+
};
|
|
344
|
+
const tree = addNodes(this.nodes);
|
|
345
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call
|
|
346
|
+
logger((0, object_treeify_1.default)(tree));
|
|
347
|
+
}
|
|
348
|
+
insert(child, value = new Tree()) {
|
|
349
|
+
this.nodes[child] = value;
|
|
350
|
+
return this;
|
|
351
|
+
}
|
|
352
|
+
search(key) {
|
|
353
|
+
for (const child of Object.keys(this.nodes)) {
|
|
354
|
+
if (child === key) {
|
|
355
|
+
return this.nodes[child];
|
|
356
|
+
}
|
|
357
|
+
const c = this.nodes[child].search(key);
|
|
358
|
+
if (c)
|
|
359
|
+
return c;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
class AncestryTreeProducer extends Tree {
|
|
328
364
|
constructor(options) {
|
|
329
365
|
super();
|
|
330
366
|
this.options = options;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/packaging",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.11",
|
|
4
4
|
"description": "Packaging library for the Salesforce packaging platform",
|
|
5
5
|
"main": "lib/exported",
|
|
6
6
|
"types": "lib/exported.d.ts",
|
|
@@ -42,8 +42,7 @@
|
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@jsforce/jsforce-node": "^3.2.0",
|
|
45
|
-
"@
|
|
46
|
-
"@salesforce/core": "^7.3.1",
|
|
45
|
+
"@salesforce/core": "^7.3.2",
|
|
47
46
|
"@salesforce/kit": "^3.1.1",
|
|
48
47
|
"@salesforce/schemas": "^1.7.0",
|
|
49
48
|
"@salesforce/source-deploy-retrieve": "^11.1.2",
|
|
@@ -53,15 +52,16 @@
|
|
|
53
52
|
"graphology": "^0.25.4",
|
|
54
53
|
"graphology-traversal": "^0.3.1",
|
|
55
54
|
"graphology-types": "^0.24.7",
|
|
56
|
-
"jszip": "^3.10.1"
|
|
55
|
+
"jszip": "^3.10.1",
|
|
56
|
+
"object-treeify": "^2"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@salesforce/cli-plugins-testkit": "^5.3.
|
|
59
|
+
"@salesforce/cli-plugins-testkit": "^5.3.1",
|
|
60
60
|
"@salesforce/dev-scripts": "^9.0.0",
|
|
61
61
|
"@salesforce/ts-sinon": "^1.4.19",
|
|
62
62
|
"@types/globby": "^9.1.0",
|
|
63
63
|
"@types/jszip": "^3.4.1",
|
|
64
|
-
"eslint-plugin-sf-plugin": "^1.18.
|
|
64
|
+
"eslint-plugin-sf-plugin": "^1.18.3",
|
|
65
65
|
"shelljs": "0.8.5",
|
|
66
66
|
"ts-node": "^10.9.2",
|
|
67
67
|
"typescript": "^5.4.5"
|