New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@uniformdev/project-map

Package Overview
Dependencies
Maintainers
12
Versions
608
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uniformdev/project-map - npm Package Compare versions

Comparing version

to
17.7.1-alpha.140

dist/chunk-IEPGH77W.mjs

40

dist/index.d.ts
import { ApiClient } from '@uniformdev/context/api';
declare type ProjectMapNodeWithProjectMapReference = ProjectMapNodeWithId & {
type ProjectMapNodeWithProjectMapReference = ProjectMapNodeWithId & {
projectMapId: string;

@@ -434,18 +434,18 @@ };

declare type ProjectMapNodeUpsertRequest = paths['/api/v1/project-map-nodes']['put']['requestBody']['content']['application/json'];
declare type ProjectMapNodeUpsertRequestNode = ProjectMapNodeUpsertRequest['nodes'][0]['node'];
declare type ProjectMapNodeDeleteRequest = paths['/api/v1/project-map-nodes']['delete']['requestBody']['content']['application/json'];
declare type ProjectMapNodeGetRequest = paths['/api/v1/project-map-nodes']['get']['parameters']['query'];
declare type ProjectMapNodeGetResponse = paths['/api/v1/project-map-nodes']['get']['responses']['200']['content']['application/json'];
declare type ProjectMapNode = NonNullable<ProjectMapNodeGetResponse['nodes']>[0];
declare type ProjectMapNodeWithId = ProjectMapNode & Required<Pick<ProjectMapNode, 'id' | 'name'>>;
declare type ProjectMapGetRequest = paths$1['/api/v1/project-map']['get']['parameters']['query'];
declare type ProjectMapGetResponse = paths$1['/api/v1/project-map']['get']['responses']['200']['content']['application/json'];
declare type ProjectMapUpsertRequest = paths$1['/api/v1/project-map']['put']['requestBody']['content']['application/json'];
declare type ProjectMapDeleteRequest = paths$1['/api/v1/project-map']['delete']['requestBody']['content']['application/json'];
declare type ProjectMapDefinition = ProjectMapGetResponse['projectMaps'][0];
declare type ProjectMapDefinitionWithId = ProjectMapDefinition & Required<Pick<ProjectMapDefinition, 'id'>>;
declare type ProjectMapUpsertResponse = paths$1['/api/v1/project-map']['put']['responses']['200']['content']['application/json'];
declare type NodeType = 'placeholder' | 'composition' | 'redirect';
declare type ProjectMapDefinitions = {
type ProjectMapNodeUpsertRequest = paths['/api/v1/project-map-nodes']['put']['requestBody']['content']['application/json'];
type ProjectMapNodeUpsertRequestNode = ProjectMapNodeUpsertRequest['nodes'][0]['node'];
type ProjectMapNodeDeleteRequest = paths['/api/v1/project-map-nodes']['delete']['requestBody']['content']['application/json'];
type ProjectMapNodeGetRequest = paths['/api/v1/project-map-nodes']['get']['parameters']['query'];
type ProjectMapNodeGetResponse = paths['/api/v1/project-map-nodes']['get']['responses']['200']['content']['application/json'];
type ProjectMapNode = NonNullable<ProjectMapNodeGetResponse['nodes']>[0];
type ProjectMapNodeWithId = ProjectMapNode & Required<Pick<ProjectMapNode, 'id' | 'name'>>;
type ProjectMapGetRequest = paths$1['/api/v1/project-map']['get']['parameters']['query'];
type ProjectMapGetResponse = paths$1['/api/v1/project-map']['get']['responses']['200']['content']['application/json'];
type ProjectMapUpsertRequest = paths$1['/api/v1/project-map']['put']['requestBody']['content']['application/json'];
type ProjectMapDeleteRequest = paths$1['/api/v1/project-map']['delete']['requestBody']['content']['application/json'];
type ProjectMapDefinition = ProjectMapGetResponse['projectMaps'][0];
type ProjectMapDefinitionWithId = ProjectMapDefinition & Required<Pick<ProjectMapDefinition, 'id'>>;
type ProjectMapUpsertResponse = paths$1['/api/v1/project-map']['put']['responses']['200']['content']['application/json'];
type NodeType = 'placeholder' | 'composition' | 'redirect';
type ProjectMapDefinitions = {
projectMaps: ProjectMapDefinitionWithId[];

@@ -456,3 +456,3 @@ projectMapNodes: ProjectMapNodeWithProjectMapReference[];

declare const ROOT_NODE_PATH = "/";
declare type ProjectMapClientOptions = {
type ProjectMapClientOptions = {
/** The Uniform API host to use. Internal use. */

@@ -471,3 +471,3 @@ apiHost?: string;

};
declare type ProjectMapSubtree = ProjectMapNode & {
type ProjectMapSubtree = ProjectMapNode & {
children?: Array<ProjectMapSubtree> | undefined;

@@ -478,3 +478,3 @@ parent?: ProjectMapSubtree | undefined;

};
declare type WithoutProjectId<T extends {
type WithoutProjectId<T extends {
projectId: string;

@@ -481,0 +481,0 @@ }> = Omit<T, 'projectId'>;

@@ -1,1 +0,1 @@

import{g as o,h as r,i as e}from"./chunk-OIOFUJKY.mjs";export{r as ProjectMapClient,o as ROOT_NODE_PATH,e as UncachedProjectMapClient};
import{g as o,h as r,i as e}from"./chunk-IEPGH77W.mjs";export{r as ProjectMapClient,o as ROOT_NODE_PATH,e as UncachedProjectMapClient};

@@ -1,1 +0,1 @@

"use strict";var h=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var I=Object.prototype.hasOwnProperty;var N=(o,i)=>{for(var e in i)h(o,e,{get:i[e],enumerable:!0})},g=(o,i,e,r)=>{if(i&&typeof i=="object"||typeof i=="function")for(let t of m(i))!I.call(o,t)&&t!==e&&h(o,t,{get:()=>i[t],enumerable:!(r=M(i,t))||r.enumerable});return o};var R=o=>g(h({},"__esModule",{value:!0}),o);var U={};N(U,{ProjectMapClient:()=>d,ROOT_NODE_PATH:()=>y,UncachedProjectMapClient:()=>j});module.exports=R(U);var l=require("@uniformdev/context/api"),y="/",d=class extends l.ApiClient{constructor(e){super(e);this.getProjectMapDefinitions=async()=>{let{projectId:e}=this.options,r=this.createUrl("/api/v1/project-map",{projectId:e});return await this.apiClient(r)};this.getProjectMapDefinition=async e=>{let{projectId:r}=this.options,t=this.createUrl("/api/v1/project-map",{...e,projectId:r});return await this.apiClient(t)};this.upsertProjectMap=async e=>{let{projectId:r}=this.options,t=this.createUrl("/api/v1/project-map");return(await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:r})})).projectMapId};this.deleteProjectMap=async e=>{let{projectId:r}=this.options,t=this.createUrl("/api/v1/project-map");await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:r}),expectNoContent:!0})};this.upsertProjectMapNodes=async e=>{let{projectId:r}=this.options,t=this.createUrl("/api/v1/project-map-nodes");await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:r,nodes:e.nodes.map(c=>({...c,node:{...this.cleanProjectMapNode(c.node)}}))}),expectNoContent:!0})};this.deleteProjectMapNode=async e=>{let{projectId:r}=this.options,t=this.createUrl("/api/v1/project-map-nodes");(!e.path||this.validatePath(e.path))&&await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:r}),expectNoContent:!0})};this.getSubtree=async e=>{var f;let{projectId:r}=this.options,t={projectId:r,projectMapId:e.projectMapId};e.search?t.search=e.search:e.id?t.id=e.id: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 c=this.createUrl("/api/v1/project-map-nodes",t),P={...(await this.apiClient(c)).tree},s=[P];for(;s&&s.length>0;){let p=s.pop(),n;(f=p==null?void 0:p.children)==null||f.forEach(a=>{a.parent=u(p),a.previousSibling=u(n),n&&(n.nextSibling=u(a)),n=a,s.push(a)})}return P};this.getNodes=async e=>{let{projectId:r}=this.options,t={projectId:r};e.projectMapId&&(t.projectMapId=e.projectMapId),e.search?t.search=e.search: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 c=this.createUrl("/api/v1/project-map-nodes",t);return await this.apiClient(c)}}cleanProjectMapNode(e){var r,t,c;return{id:((c=(t=(r=e.id)==null?void 0:r.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:t.length)!=null?c:0)==1?e.id:void 0,path:e.path,name:e.name,type:e.type,compositionId:e.compositionId,description:e.description}}validatePath(e){let r=/[*%!&@]/g;if(e==null?void 0:e.match(r))throw"Path cannot contain reserved characters * % ! & @";return!0}},j=class extends d{constructor(i){super({...i,bypassCache:!0})}},u=o=>o?{...o,parent:void 0,children:void 0}:void 0;0&&(module.exports={ProjectMapClient,ROOT_NODE_PATH,UncachedProjectMapClient});
"use strict";var h=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var I=Object.prototype.hasOwnProperty;var N=(o,i)=>{for(var e in i)h(o,e,{get:i[e],enumerable:!0})},g=(o,i,e,r)=>{if(i&&typeof i=="object"||typeof i=="function")for(let t of m(i))!I.call(o,t)&&t!==e&&h(o,t,{get:()=>i[t],enumerable:!(r=M(i,t))||r.enumerable});return o};var R=o=>g(h({},"__esModule",{value:!0}),o);var U={};N(U,{ProjectMapClient:()=>d,ROOT_NODE_PATH:()=>y,UncachedProjectMapClient:()=>j});module.exports=R(U);var l=require("@uniformdev/context/api"),y="/",d=class extends l.ApiClient{constructor(e){super(e);this.getProjectMapDefinitions=async()=>{let{projectId:e}=this.options,r=this.createUrl("/api/v1/project-map",{projectId:e});return await this.apiClient(r)};this.getProjectMapDefinition=async e=>{let{projectId:r}=this.options,t=this.createUrl("/api/v1/project-map",{...e,projectId:r});return await this.apiClient(t)};this.upsertProjectMap=async e=>{let{projectId:r}=this.options,t=this.createUrl("/api/v1/project-map");return(await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:r})})).projectMapId};this.deleteProjectMap=async e=>{let{projectId:r}=this.options,t=this.createUrl("/api/v1/project-map");await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:r}),expectNoContent:!0})};this.upsertProjectMapNodes=async e=>{let{projectId:r}=this.options,t=this.createUrl("/api/v1/project-map-nodes");await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:r,nodes:e.nodes.map(a=>({...a,node:{...this.cleanProjectMapNode(a.node)}}))}),expectNoContent:!0})};this.deleteProjectMapNode=async e=>{let{projectId:r}=this.options,t=this.createUrl("/api/v1/project-map-nodes");(!e.path||this.validatePath(e.path))&&await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:r}),expectNoContent:!0})};this.getSubtree=async e=>{var f;let{projectId:r}=this.options,t={projectId:r,projectMapId:e.projectMapId};e.search?t.search=e.search:e.id?t.id=e.id: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 a=this.createUrl("/api/v1/project-map-nodes",t),P={...(await this.apiClient(a)).tree},s=[P];for(;s&&s.length>0;){let p=s.pop(),n;(f=p==null?void 0:p.children)==null||f.forEach(c=>{c.parent=u(p),c.previousSibling=u(n),n&&(n.nextSibling=u(c)),n=c,s.push(c)})}return P};this.getNodes=async e=>{let{projectId:r}=this.options,t={projectId:r};e.projectMapId&&(t.projectMapId=e.projectMapId),e.search?t.search=e.search: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 a=this.createUrl("/api/v1/project-map-nodes",t);return await this.apiClient(a)}}cleanProjectMapNode(e){var r,t,a;return{id:((a=(t=(r=e.id)==null?void 0:r.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:t.length)!=null?a:0)==1?e.id:void 0,path:e.path,name:e.name,type:e.type,order:e.order,data:e.data,compositionId:e.compositionId,description:e.description}}validatePath(e){let r=/[*%!&@]/g;if(e==null?void 0:e.match(r))throw"Path cannot contain reserved characters * % ! & @";return!0}},j=class extends d{constructor(i){super({...i,bypassCache:!0})}},u=o=>o?{...o,parent:void 0,children:void 0}:void 0;0&&(module.exports={ProjectMapClient,ROOT_NODE_PATH,UncachedProjectMapClient});
{
"name": "@uniformdev/project-map",
"version": "17.7.1-alpha.34+084da3172",
"version": "17.7.1-alpha.140+80ab6baf9",
"description": "Uniform Project Map",

@@ -49,9 +49,9 @@ "license": "SEE LICENSE IN LICENSE.txt",

"dependencies": {
"@uniformdev/canvas": "^17.7.1-alpha.34+084da3172",
"@uniformdev/context": "^17.7.1-alpha.34+084da3172",
"@uniformdev/canvas": "^17.7.1-alpha.140+80ab6baf9",
"@uniformdev/context": "^17.7.1-alpha.140+80ab6baf9",
"p-limit": "^3.1.0"
},
"devDependencies": {
"@types/yargs": "17.0.17",
"@uniformdev/cli": "^17.7.1-alpha.34+084da3172",
"@types/yargs": "17.0.19",
"@uniformdev/cli": "^17.7.1-alpha.140+80ab6baf9",
"yargs": "17.6.2"

@@ -62,3 +62,3 @@ },

},
"gitHead": "084da31729798e2c1a1f26ba38c764caabebc958"
"gitHead": "80ab6baf9edea6b520738bd3dff5c6afc882bf77"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet