Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cavalion-blocks

Package Overview
Dependencies
Maintainers
0
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cavalion-blocks - npm Package Compare versions

Comparing version 0.9.38 to 0.9.39

7

CHANGELOG.md

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

### 2024/07/07 - 0.9.39
* **Factory**
* Implements thisRequire.toUrl
* Finetunes vcl/Factory.unreq
### 2024/05/20 - 0.9.38

@@ -2,0 +9,0 @@

2

package.json
{
"name": "cavalion-blocks",
"version": "0.9.38",
"version": "0.9.39",
"description": "`blocks-dot-js` `[].js`",

@@ -5,0 +5,0 @@ "main": "README.js",

@@ -112,11 +112,12 @@ define(function(require) {

var args = js.copy_args(arguments);
var args = js.copy_args(arguments), baseUri;
sourceUri = sourceUri || uri;
baseUri = sourceUri.split("!").pop();
/*- TODO clean up */
function thisRequire(modules, success, error) {
if(modules instanceof Array) {
modules = modules.map(module => normalize(sourceUri.split("!").pop(), module));
modules = modules.map(module => normalize(baseUri, module));
} else {
modules = normalize(sourceUri.split("!").pop(), modules);
modules = normalize(baseUri, modules);
}

@@ -130,2 +131,4 @@ // console.log(">>>", modules);

}
thisRequire.toUrl = (url) => normalize(baseUri, url);

@@ -157,2 +160,3 @@ this._parentRequire = thisRequire;

source.indexOf("\"use strict\";") !== 0) {
this._source = source;
if(source.indexOf("\"use ") === 0) {

@@ -591,3 +595,3 @@ // TODO this should be the default

};
// console.log(name, "assuming", source)
instantiate(source);

@@ -603,2 +607,3 @@ });

// + also: ".fallback" could be added (nice!y) to the uri
// console.log(name, "fetch");
this.fetch(name).then(instantiate).catch(fallback);

@@ -657,10 +662,17 @@ },

var factory;
try {
factory = require(String.format("vcl/Factory!%s", name));
} catch(e) {
return;
if(name instanceof Factory) {
factory = name;
} else {
name = String.format("blocks/Factory!%s", name);
if(window.require.s.contexts._.defined[name]) {
factory = require(name);
} else {
console.warn("(can) the puck stop(s) here?", name)
return;
}
}
requirejs.undef(String.format("blocks/Factory!%s", factory._uri));
requirejs.undef(Factory.makeTextUri(factory._uri));
window.require.undef(js.sf("blocks/Factory!%s", factory._uri));
window.require.undef(Factory.makeTextUri(factory._uri));

@@ -667,0 +679,0 @@ console.info("blocks/Factory.unreq: " + name)

"use strict";
console.log("prototypes/Button");
["vcl-ui:Button", {}, []];

@@ -12,2 +12,7 @@ // getStorageKey might solve the problem/challenge with a not being able to specify (specializer) the (automagically created) Hover<>-instance (since it would lead to many implicit bases when dealing with long uri paths) embedding the actual blocks component of interest

let spec = this.getSpecializer(), uri = this.vars("uri");
let props = {
parent: this,
owner: this,
zoom: this.vars("zoom") || 1
};

@@ -20,7 +25,8 @@ // if spec is number maybe not set uri?

B.i([this.vars("storage-uri", uri || this.vars("storage-uri"))]).then(c => c.set({
parent: this,
owner: this,
zoom: this.vars("zoom") || 1
}));
B.i([this.vars("storage-uri", uri || this.vars("storage-uri"))], {
loaded() {
// alert("loaded delayed");
}
})
.then(c => c.set(props).loaded() );

@@ -27,0 +33,0 @@ return this.inherited(arguments);

@@ -48,3 +48,2 @@ "use locale, js, blocks/Blocks";

}
},

@@ -51,0 +50,0 @@ vars: {

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