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

qcobjects-cli

Package Overview
Dependencies
Maintainers
1
Versions
198
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qcobjects-cli - npm Package Compare versions

Comparing version 2.4.35 to 2.4.37

2

package.json
{
"name": "qcobjects-cli",
"version": "2.4.35",
"version": "2.4.37",
"description": "qcobjects cli command line tool",

@@ -5,0 +5,0 @@ "main": "src/index.cjs",

@@ -136,3 +136,14 @@ /**

exec("npm uninstall "+appTemplateName+" --save && npm cache verify",(err,stdout,stderr)=>{
switchCommander.generateServiceWorker(appName);
if (err) {
throw Error (err.message);
process.exit(1);
return;
}
/*
switchCommander.generateServiceWorker(appName)
.then(()=>{
execSync("npm install --save-dev qcobjects-cli ");
});
*/
execSync("npm install --save-dev qcobjects-cli ");

@@ -276,38 +287,41 @@ });

generateServiceWorker(appName){
var filelist = ["/"].concat(this.fileListRecursive("./"));
filelist = filelist.filter(function (fl){return fl !== "sw.js" && (!fl.startsWith("node_modules/")); });
filelist = filelist.filter(fname => !fname.endsWith(".pem"));
filelist = filelist.filter(fname => !fname.endsWith(".sh"));
filelist = filelist.filter(fname => !(new RegExp("^package(.*).json$")).test(fname));
filelist = filelist.filter(fname => !fname.startsWith("."));
var fileListString = "\n\t\""+filelist.join("\",\n\t\"")+"\"";
var component = New(Component, {
templateURI: "sw.js",
basePath:templatePwaPath,
name:"sw",
cached:false,
tplsource: "default",
data: {
appName: appName,
appVersion: "0.0.1",
filelist: fileListString
},
done ({request, component}) {
fs.writeFile("./sw.js", component.parsedAssignmentText, err => {
logger.info("Service Worker Generated");
console.log("");
console.log("Now simply put:");
console.log("CONFIG.set('serviceWorkerURI','/sw.js');");
console.log(" In your init.js file ");
console.log("");
console.log("To start your app in a local server ");
console.log("Execute the command: ");
console.log("> qcobjects launch <appname>");
console.log("");
process.exit(0);
});
return Promise.resolve({request, component});
}
});
return component;
return new Promise( (resolve, reject) => {
var filelist = ["/"].concat(this.fileListRecursive("./"));
filelist = filelist.filter(function (fl){return fl !== "sw.js" && (!fl.startsWith("node_modules/")); });
filelist = filelist.filter(fname => !fname.endsWith(".pem"));
filelist = filelist.filter(fname => !fname.endsWith(".sh"));
filelist = filelist.filter(fname => !(new RegExp("^package(.*).json$")).test(fname));
filelist = filelist.filter(fname => !fname.startsWith("."));
var fileListString = "\n\t\""+filelist.join("\",\n\t\"")+"\"";
var component = New(Component, {
templateURI: "sw.js",
basePath:templatePwaPath,
name:"sw",
cached:false,
tplsource: "default",
data: {
appName: appName,
appVersion: "1.0.0",
filelist: fileListString
},
done ({request, component}) {
return new Promise ((resolve, reject)=> {
fs.writeFile("./sw.js", component.parsedAssignmentText, err => {
logger.info("Service Worker Generated");
console.log("");
console.log("Now simply put:");
console.log("CONFIG.set('serviceWorkerURI','/sw.js');");
console.log(" In your init.js file ");
console.log("");
console.log("To start your app in a local server ");
console.log("Execute the command: ");
console.log("> qcobjects launch <appname>");
console.log("");
});
resolve({request, component});
});
}
});
} );
}

@@ -314,0 +328,0 @@

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