@uniformdev/project-map 17.4.0 → 17.4.1-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/{chunk-PFKTXWY5.mjs → chunk-4VJBTGFT.mjs} +1 -1
- package/dist/cli/cli.js +46 -46
- package/dist/cli/cli.mjs +46 -46
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +6 -6
package/dist/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as o,h as r,i as e}from"./chunk-
|
|
1
|
+
import{g as o,h as r,i as e}from"./chunk-4VJBTGFT.mjs";export{r as ProjectMapClient,o as ROOT_NODE_PATH,e as UncachedProjectMapClient};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var j=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var
|
|
1
|
+
"use strict";var j=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var I=(a,p)=>{for(var e in p)j(a,e,{get:p[e],enumerable:!0})},R=(a,p,e,t)=>{if(p&&typeof p=="object"||typeof p=="function")for(let r of m(p))!N.call(a,r)&&r!==e&&j(a,r,{get:()=>p[r],enumerable:!(t=l(p,r))||t.enumerable});return a};var g=a=>R(j({},"__esModule",{value:!0}),a);var U={};I(U,{ProjectMapClient:()=>n,ROOT_NODE_PATH:()=>y,UncachedProjectMapClient:()=>h});module.exports=g(U);var P=require("@uniformdev/context/api"),y="/",n=class extends P.ApiClient{constructor(e){super(e);this.getProjectMapDefinitions=async e=>{let t=this.createUrl("/api/v1/project-map",{projectId:e});return await this.apiClient(t)};this.getProjectMapDefinition=async e=>{let t=this.createUrl("/api/v1/project-map",{...e,projectMapId:e.projectMapId});return await this.apiClient(t)};this.upsertProjectMap=async e=>{let t=this.createUrl("/api/v1/project-map");return(await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectMap:e.projectMap})})).projectMapId};this.deleteProjectMap=async e=>{let t=this.createUrl("/api/v1/project-map");await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectMapId:e.projectMapId}),expectNoContent:!0})};this.upsertProjectMapNodes=async e=>{let t=this.createUrl("/api/v1/project-map-nodes");await this.apiClient(t,{method:"PUT",body:JSON.stringify({projectId:e.projectId,projectMapId:e.projectMapId,nodes:e.nodes.map(r=>({...r,node:{...this.cleanProjectMapNode(r.node)}}))}),expectNoContent:!0})};this.deleteProjectMapNode=async e=>{let t=this.createUrl("/api/v1/project-map-nodes");(!e.path||this.validatePath(e.path))&&await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectMapId:e.projectMapId}),expectNoContent:!0})};this.getSubtree=async e=>{var f;let t={};t.projectId=e.projectId,e.projectMapId?t.projectMapId=e.projectMapId:e.path&&this.validatePath(e.path)?t.path=e.path:e.compositionId&&(t.compositionId=e.compositionId),e.depth&&(t.depth=e.depth.toString()),e.expanded&&(t.expanded="true"),t.tree="true";let r=this.createUrl("/api/v1/project-map-nodes",t),M={...(await this.apiClient(r)).tree},o=[M];for(;o&&o.length>0;){let i=o.pop(),s;(f=i==null?void 0:i.children)==null||f.forEach(c=>{c.parent=u(i),c.previousSibling=u(s),s&&(s.nextSibling=u(c)),s=c,o.push(c)})}return M};this.getNodes=async e=>{let t={};t.projectId=e.projectId,e.projectMapId&&(t.projectMapId=e.projectMapId),e.id?t.id=e.id:e.path&&this.validatePath(e.path)?t.path=e.path:e.compositionId&&(t.compositionId=e.compositionId),e.limit&&(t.limit=e.limit.toString()),e.offset&&(t.offset=e.offset.toString()),e.expanded&&(t.expanded="true");let r=this.createUrl("/api/v1/project-map-nodes",t);return await this.apiClient(r)}}cleanProjectMapNode(e){var t,r,d;return{id:((d=(r=(t=e.id)==null?void 0:t.match(/^[0-9A-F]{8}-[0-9A-F]{4}-[4][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i))==null?void 0:r.length)!=null?d:0)==1?e.id:void 0,path:e.path,name:e.name,type:e.type,compositionId:e.compositionId,description:e.description}}validatePath(e){let t=/[*%!&@]/g;if(e==null?void 0:e.match(t))throw"Path cannot contain reserved characters * % ! & @";return!0}},h=class extends n{constructor(p){super({...p,bypassCache:!0})}},u=a=>a?{...a,parent:void 0,children:void 0}:void 0;0&&(module.exports={ProjectMapClient,ROOT_NODE_PATH,UncachedProjectMapClient});
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as o,h as r,i as e}from"./chunk-
|
|
1
|
+
import{g as o,h as r,i as e}from"./chunk-4VJBTGFT.mjs";export{r as ProjectMapClient,o as ROOT_NODE_PATH,e as UncachedProjectMapClient};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/project-map",
|
|
3
|
-
"version": "17.4.0",
|
|
3
|
+
"version": "17.4.1-alpha.0+59ecbc3",
|
|
4
4
|
"description": "Uniform Project Map",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -46,17 +46,17 @@
|
|
|
46
46
|
"/dist"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@uniformdev/canvas": "^17.4.0",
|
|
50
|
-
"@uniformdev/context": "^17.4.0",
|
|
49
|
+
"@uniformdev/canvas": "^17.4.1-alpha.0+59ecbc3",
|
|
50
|
+
"@uniformdev/context": "^17.4.1-alpha.0+59ecbc3",
|
|
51
51
|
"p-limit": "^3.1.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/yargs": "17.0.13",
|
|
55
|
-
"@uniformdev/cli": "^17.4.0",
|
|
56
|
-
"yargs": "17.6.
|
|
55
|
+
"@uniformdev/cli": "^17.4.1-alpha.0+59ecbc3",
|
|
56
|
+
"yargs": "17.6.2"
|
|
57
57
|
},
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "59ecbc39bc240b9e2e5312a7cc0a5bb565508612"
|
|
62
62
|
}
|