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

@squiz/base-components

Package Overview
Dependencies
Maintainers
50
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@squiz/base-components - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

LICENSE.md

8

lib/functions.d.ts
import { CommonPrefix } from '@aws-sdk/client-s3';
import { ArtefactVersionKey, ArtefactSearchKey, ArtefactCompositeKey } from './types';
/**
* This functions returns the full artefact key for upload or download from S3 for a given artefact.
*/
export declare function getKeyFromArtefactVersionKey(composite: ArtefactVersionKey | ArtefactCompositeKey): string;
/**
* This function returns a string that can be used to search S3 to determine if an artefact exists for the given artefact information.
*/
export declare function getVersionKeyFromArtefactVersionKey(composite: ArtefactVersionKey | ArtefactCompositeKey): string;
export declare function getArtefactCompositeFromKey(key: string): ArtefactCompositeKey;

@@ -12,0 +4,0 @@ export declare function getArtefactKeyFromComposite({ type, namespace, artefact, version, file }: ArtefactCompositeKey): string;

1

lib/index.d.ts
export * from './types';
export * from './functions';
export * from './repoStructure';
export { SetEnums, SetManifest, SetComponent, SetConfiguration, SetEnvironment, SetHeaders } from '@squiz/base-component-schemas';

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

var u=(n=>(n.Component="Component",n.ComponentSet="ComponentSet",n))(u||{}),t="/",c=(n=>(n.Component="component",n.ComponentSet="component-set",n))(c||{}),m=(n=>(n.Component="component.zip",n.ComponentSet="set-manifest.json",n))(m||{});function S(e){if(e.type==="component")return["component",e.namespace,e.artefact,e.version,"component.zip"].join(t);if(e.type==="component-set")return["component-set",e.artefact,e.version,"set-manifest.json"].join(t);throw Error(`Unknown type: ${e.type}`)}function x(e){if(e.type==="component")return["component",e.namespace,e.artefact,e.version].join(t);if(e.type==="component-set")return["component-set",e.artefact,e.version].join(t);throw Error(`Unknown type: ${e.type}`)}function K(e){let[r]=e.split(t);if(r==="component"){let[n,s,o,i,p]=e.split(t);return{type:n,namespace:s,artefact:o,version:i,file:p}}else if(r==="component-set"){let[n,s,o,i]=e.split(t);return{type:n,artefact:s,version:o,file:i}}throw Error(`Unknown type: ${r}`)}function f({type:e,namespace:r,artefact:n,version:s,file:o}){if(e==="component")return`${e}${t}${r}${t}${n}${t}${s}${t}${o}`;if(e==="component-set")return`${e}${t}${n}${t}${s}${t}${o}`;throw Error(`Unknown type: ${e}`)}function v({type:e,namespace:r,artefact:n}){if(e==="component")return`${e}${t}${r}${t}${n}${t}`;if(e==="component-set")return`${e}${t}${n}${t}`;throw Error(`Unknown type: ${e}`)}function E(e){let r=[];return e.forEach(n=>{let s=n.Prefix;if(s){let o=s.split(t),[i]=o;if(i==="component"){let[,p,a,C]=o;r.push({type:i,namespace:p,artefact:a,version:C})}else if(i==="component-set"){let[,p,a]=o;r.push({type:i,artefact:p,version:a})}}}),r}function P(e){if(e.type==="component")return f({...e,file:"component.zip"});if(e.type==="component-set")return f({...e,file:"set-manifest.json"});throw Error(`Unknown type: ${e.type}`)}var y="package.json",b={components:"/packages/components/",componentSets:"/packages/component-sets/"},j={sourceRoot:"src",packagePath:y,manifestPath:"src/manifest.json"},V={distRoot:"dist",uiPath:"dist/UI/",headlessPath:"dist/Headless/",manifestPath:"manifest.json"},w={packagePath:y,manifestPath:"setManifest.json"};var d=(e=>(e.Latest="latest",e.All="all",e))(d||{});export{t as ARTEFACT_KEY_DELIMITER,m as ArtefactFile,c as ArtefactKeyType,u as ArtefactType,y as DEFAULT_PACKAGE_PATH,d as SetEnums,b as artefactLocation,V as componentDistStructure,j as componentRepoStructure,w as componentSetRepoStructure,K as getArtefactCompositeFromKey,f as getArtefactKeyFromComposite,P as getArtefactKeyFromVersionKey,E as getArtefactKeysFromVersionPrefixList,v as getArtefactListPrefix,S as getKeyFromArtefactVersionKey,x as getVersionKeyFromArtefactVersionKey};
var y=(t=>(t.Component="Component",t.ComponentSet="ComponentSet",t))(y||{}),r="/",m=(t=>(t.Component="component",t.ComponentSet="component-set",t))(m||{});function C(e){let[n]=e.split(r);if(n==="component"){let[t,i,o,s,p]=e.split(r);return{type:t,namespace:i,artefact:o,version:s,file:p}}else if(n==="component-set"){let[t,i,o,s]=e.split(r);return{type:t,artefact:i,version:o,file:s}}throw Error(`Unknown type: ${n}`)}function c({type:e,namespace:n,artefact:t,version:i,file:o}){if(e==="component")return`${e}${r}${n}${r}${t}${r}${i}${r}${o}`;if(e==="component-set")return`${e}${r}${t}${r}${i}${r}${o}`;throw Error(`Unknown type: ${e}`)}function A({type:e,namespace:n,artefact:t}){if(e==="component")return`${e}${r}${n}${r}${t}${r}`;if(e==="component-set")return`${e}${r}${t}${r}`;throw Error(`Unknown type: ${e}`)}function x(e){let n=[];return e.forEach(t=>{let i=t.Prefix;if(i){let o=i.split(r),[s]=o;if(s==="component"){let[,p,a,d]=o;n.push({type:s,namespace:p,artefact:a,version:d})}else if(s==="component-set"){let[,p,a]=o;n.push({type:s,artefact:p,version:a})}}}),n}function S(e){if(e.type==="component")return c({...e,file:"component.zip"});if(e.type==="component-set")return c({...e,file:"setManifest.zip"});throw Error(`Unknown type: ${e.type}`)}var f=(e=>(e.Latest="latest",e.All="all",e))(f||{});export{r as ARTEFACT_KEY_DELIMITER,m as ArtefactKeyType,y as ArtefactType,f as SetEnums,C as getArtefactCompositeFromKey,c as getArtefactKeyFromComposite,S as getArtefactKeyFromVersionKey,x as getArtefactKeysFromVersionPrefixList,A as getArtefactListPrefix};
//# sourceMappingURL=index.js.map

@@ -10,6 +10,2 @@ export declare enum ArtefactType {

}
export declare enum ArtefactFile {
Component = "component.zip",
ComponentSet = "set-manifest.json"
}
export type ArtefactSearchKey = {

@@ -24,3 +20,3 @@ type: string | ArtefactKeyType.Component | ArtefactKeyType.ComponentSet;

export type ArtefactCompositeKey = ArtefactVersionKey & {
file: string | ArtefactFile.Component | ArtefactFile.ComponentSet;
file: string;
};

@@ -27,0 +23,0 @@ export type UpdateMessage = {

{
"name": "@squiz/base-components",
"version": "0.0.2",
"version": "0.0.3",
"description": "",

@@ -14,3 +14,3 @@ "keywords": [],

"dependencies": {
"@squiz/base-component-schemas": "^0.3.0"
"@squiz/base-component-schemas": "^0.3.1"
},

@@ -32,3 +32,4 @@ "devDependencies": {

],
"types": "lib/index.d.ts"
"types": "lib/index.d.ts",
"gitHead": "1edcb0689eeb889c86271b297d27f6fead1afc3d"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc