@magda/org-tree 2.3.2 → 3.0.0-alpha.0
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/dist/getNodeIdFromNameOrId.js +21 -0
- package/dist/getUserIdFromNameOrId.js +24 -0
- package/dist/index.js +4466 -0
- package/dist/org-tree-assign.js +13563 -0
- package/dist/org-tree-create.js +13524 -0
- package/dist/org-tree-delete.js +13549 -0
- package/dist/org-tree-insert.js +13545 -0
- package/dist/org-tree-move.js +13543 -0
- package/dist/org-tree-unassign.js +4495 -0
- package/dist/org-tree-view.js +13511 -0
- package/package.json +23 -19
- package/bin/db/getDBConfig.js +0 -19
- package/bin/db/getDBPool.js +0 -13
- package/bin/org-tree/NestedSetModelQueryer.js +0 -19718
- package/bin/org-tree/getNodeIdFromNameOrId.js +0 -134
- package/bin/org-tree/getUserIdFromNameOrId.js +0 -137
- package/bin/org-tree/org-tree-assign.js +0 -220
- package/bin/org-tree/org-tree-create.js +0 -180
- package/bin/org-tree/org-tree-delete.js +0 -206
- package/bin/org-tree/org-tree-insert.js +0 -200
- package/bin/org-tree/org-tree-move.js +0 -202
- package/bin/org-tree/org-tree-unassign.js +0 -197
- package/bin/org-tree/org-tree-view.js +0 -168
- package/bin/org-tree/org-tree.js +0 -199
package/package.json
CHANGED
|
@@ -1,32 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magda/org-tree",
|
|
3
3
|
"description": "MAGDA Organizational Hierarchy Management Utilities",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0-alpha.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./dist/index.js",
|
|
8
|
+
"./package.json": "./package.json"
|
|
9
|
+
},
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=16.0.0"
|
|
12
|
+
},
|
|
5
13
|
"bin": {
|
|
6
|
-
"org-tree": "./
|
|
14
|
+
"org-tree": "./dist/index.js"
|
|
7
15
|
},
|
|
8
16
|
"scripts": {
|
|
9
|
-
"org-tree": "./
|
|
10
|
-
"prebuild": "rimraf
|
|
11
|
-
"build": "node
|
|
17
|
+
"org-tree": "./dist/index.js",
|
|
18
|
+
"prebuild": "rimraf dist",
|
|
19
|
+
"build": "node esbuild.js",
|
|
12
20
|
"release": "npm publish || echo \"Skip releasing npm package @magda/org-tree.\""
|
|
13
21
|
},
|
|
14
22
|
"author": "",
|
|
15
23
|
"license": "Apache-2.0",
|
|
16
24
|
"devDependencies": {
|
|
17
|
-
"@magda/authorization-api": "^
|
|
18
|
-
"@magda/scripts": "^
|
|
19
|
-
"@magda/typescript-common": "^
|
|
20
|
-
"fs-extra": "^2.1.2",
|
|
21
|
-
"webpack": "^4.41.2",
|
|
22
|
-
"webpack-cli": "^3.3.10"
|
|
23
|
-
},
|
|
24
|
-
"dependencies": {
|
|
25
|
+
"@magda/authorization-api": "^3.0.0-alpha.0",
|
|
26
|
+
"@magda/scripts": "^3.0.0-alpha.0",
|
|
27
|
+
"@magda/typescript-common": "^3.0.0-alpha.0",
|
|
25
28
|
"chalk": "^2.4.1",
|
|
26
|
-
"commander": "^
|
|
27
|
-
"
|
|
29
|
+
"commander": "^11.1.0",
|
|
30
|
+
"esbuild": "^0.19.10",
|
|
31
|
+
"fs-extra": "^11.2.0",
|
|
28
32
|
"text-treeview": "^1.0.1"
|
|
29
33
|
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"pg": "^8.7.3"
|
|
36
|
+
},
|
|
30
37
|
"magda": {
|
|
31
38
|
"language": "typescript",
|
|
32
39
|
"categories": {
|
|
@@ -40,10 +47,7 @@
|
|
|
40
47
|
"CLI Tool",
|
|
41
48
|
"org-tree"
|
|
42
49
|
],
|
|
43
|
-
"engines": {
|
|
44
|
-
"node": ">=14.0.0"
|
|
45
|
-
},
|
|
46
50
|
"files": [
|
|
47
|
-
"
|
|
51
|
+
"dist"
|
|
48
52
|
]
|
|
49
53
|
}
|
package/bin/db/getDBConfig.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
function getDBConfig() {
|
|
2
|
-
const {
|
|
3
|
-
POSTGRES_HOST: host,
|
|
4
|
-
POSTGRES_DB: database,
|
|
5
|
-
POSTGRES_USER: user,
|
|
6
|
-
POSTGRES_PASSWORD: password,
|
|
7
|
-
POSTGRES_PORT: port
|
|
8
|
-
} = process.env;
|
|
9
|
-
|
|
10
|
-
return {
|
|
11
|
-
host: host ? host : "localhost",
|
|
12
|
-
database: database ? database : "auth",
|
|
13
|
-
port: port ? port : 5432,
|
|
14
|
-
user: user ? user : "postgres",
|
|
15
|
-
password: password ? password : ""
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
module.exports = getDBConfig;
|
package/bin/db/getDBPool.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const pg = require("pg");
|
|
2
|
-
const getDBConfig = require("./getDBConfig");
|
|
3
|
-
|
|
4
|
-
const pool = new pg.Pool(getDBConfig());
|
|
5
|
-
pool.on("error", function (err, client) {
|
|
6
|
-
console.error("DB Pool Error: ", err.message, err.stack);
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
function getDBPool() {
|
|
10
|
-
return pool;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
module.exports = getDBPool;
|