@lmjs/cli 1.0.50 → 2.0.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/LICENSE +0 -0
- package/README.md +5 -16
- package/dist/bin/commands.js +2 -0
- package/dist/lib/app.js +3 -0
- package/dist/lib/check-version.js +2 -0
- package/dist/lib/fcs.js +11 -0
- package/{lib → dist/lib}/files/build_serverless/.htaccess +0 -0
- package/{lib/files/build/src → dist/lib/files/build_serverless}/favicon.ico +0 -0
- package/{lib/files/build/src → dist/lib/files/build_serverless}/robots.txt +0 -0
- package/{lib/files/build/src → dist/lib/files/build_serverless}/sitemap.xml +0 -0
- package/dist/lib/files/layout.layout +4 -0
- package/dist/lib/files/libs/bea.css +1 -0
- package/dist/lib/files/libs/lm-with-plugins.js +539 -0
- package/dist/lib/files/libs/lm.js +30 -0
- package/dist/lib/files/libs/lumenjs-plugins.css +2822 -0
- package/{lib → dist/lib}/files/project/config.json +1 -1
- package/dist/lib/files/project/package.json +6 -0
- package/{lib → dist/lib}/files/project/src/404.html +1 -1
- package/{lib → dist/lib}/files/project/src/index.html +3 -3
- package/dist/lib/files/project/src/index.js +1 -0
- package/dist/lib/files/project/src/layouts/default.layout +4 -0
- package/{lib → dist/lib}/files/project/src/views/home.view +2 -3
- package/{lib → dist/lib}/files/sub_view.view +0 -0
- package/dist/lib/files/view.view +13 -0
- package/dist/lib/npm-bundle.js +1 -0
- package/dist/lib/plugins-esbuild-plugin.js +3 -0
- package/package.json +37 -19
- package/bin/commands.js +0 -2
- package/lib/app.js +0 -132
- package/lib/check-version.js +0 -28
- package/lib/fcs.js +0 -804
- package/lib/files/build/func.js +0 -102
- package/lib/files/build/package.json +0 -31
- package/lib/files/build/server.js +0 -58
- package/lib/files/build_serverless/favicon.ico +0 -0
- package/lib/files/build_serverless/robots.txt +0 -4
- package/lib/files/build_serverless/sitemap.xml +0 -9
- package/lib/files/project/src/index.js +0 -15
- package/lib/files/project/src/tpls/tpl1.tpl +0 -1
- package/lib/files/project/src/views/widgets/footer.view +0 -0
- package/lib/files/project/src/views/widgets/header.view +0 -0
- package/lib/files/project/src/views/widgets/nav.view +0 -0
- package/lib/files/tpl.tpl +0 -1
- package/lib/files/view.view +0 -14
- /package/{lib → dist/lib}/files/project/src/images/lumenjs.svg +0 -0
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<meta name="Keywords" content="" />
|
|
14
14
|
<meta name="theme-color" content="#FFA302" />
|
|
15
15
|
|
|
16
|
-
<link href="/css/
|
|
16
|
+
<link href="/css/bea.css" rel="stylesheet" type="text/css" />
|
|
17
17
|
<link href="/css/styles.css" rel="stylesheet" type="text/css" />
|
|
18
18
|
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
|
19
19
|
<!-- <link rel="icon" type="image/png" href="/favicon.png" /> -->
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
</head>
|
|
41
41
|
|
|
42
42
|
<body>
|
|
43
|
-
<
|
|
43
|
+
<script src="https://cdn.roxyon.com/libs/rxjs/1.0.0/rx.js" type="text/javascript"></script>
|
|
44
|
+
<div app></div>
|
|
44
45
|
<script src="/js/lm.js" type="text/javascript"></script>
|
|
45
|
-
<script src="/index.js" defer type="text/javascript"></script>
|
|
46
46
|
</body>
|
|
47
47
|
|
|
48
48
|
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Reactor({"App":"[app]","defaultView":"home","authView":"login","init":function(){},"tick":function(){},"auth":function(){return false}});
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const fs=require("fs");const path=require("path");const acorn=require("acorn");const esbuild=require("esbuild");function hasOwnDependencies(projectRoot){try{const pkgPath=path.join(projectRoot,"package.json");if(!fs.existsSync(pkgPath))return false;const pkg=JSON.parse(fs.readFileSync(pkgPath,"utf8"));return!!(pkg.dependencies&&Object.keys(pkg.dependencies).length>0)}catch(e){return false}}exports.hasOwnDependencies=hasOwnDependencies;let _aliasCounter=0;function nextAlias(){return"__imp_"+_aliasCounter++}function extractImports(source){let ast;try{ast=acorn.parse(source,{ecmaVersion:"latest",sourceType:"module"})}catch(e){return{shimLines:[],splices:[]}}const shimLines=[];const splices=[];for(const node of ast.body){if(node.type!=="ImportDeclaration")continue;const modSpecifier=node.source.value;const bindingLines=[];if(node.specifiers.length===0){shimLines.push(`import ${JSON.stringify(modSpecifier)};`)}else{for(const spec of node.specifiers){const alias=nextAlias();if(spec.type==="ImportDefaultSpecifier"){shimLines.push(`export {default as ${alias}} from ${JSON.stringify(modSpecifier)};`)}else if(spec.type==="ImportNamespaceSpecifier"){shimLines.push(`export * as ${alias} from ${JSON.stringify(modSpecifier)};`)}else{const importedName=spec.imported.name;shimLines.push(`export {${importedName} as ${alias}} from ${JSON.stringify(modSpecifier)};`)}bindingLines.push(`var ${spec.local.name} = __lumenDeps.${alias};`)}}splices.push({start:node.start,end:node.end,replacement:bindingLines.join(" ")})}return{shimLines,splices}}function buildEntryWithImports(absFilePath,projectRoot){const source=fs.readFileSync(absFilePath,"utf8");const{shimLines,splices}=extractImports(source);if(splices.length===0){return source}const depsResult=esbuild.buildSync({stdin:{contents:shimLines.join("\n"),resolveDir:projectRoot,loader:"js"},bundle:true,format:"iife",globalName:"__lumenDeps",platform:"browser",target:["es2019"],write:false,minify:false,logLevel:"silent"});const depsCode=depsResult.outputFiles[0].text;let entryTransformed=source;for(const s of[...splices].sort((a,b)=>b.start-a.start)){entryTransformed=entryTransformed.slice(0,s.start)+s.replacement+entryTransformed.slice(s.end)}return depsCode+"\n"+entryTransformed}exports.buildEntryWithImports=buildEntryWithImports;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const fs=require("fs");const path=require("path");const esbuild=require("esbuild");const CORE_PACKAGE_DIR=path.dirname(require.resolve("@lmjs/core/package.json"));const registry=require(path.join(CORE_PACKAGE_DIR,"build","plugins-registry.js"));function resolveCoreModule(npmPath){return require.resolve(npmPath,{paths:[CORE_PACKAGE_DIR]})}function selectedRegistryEntries(projectDeps){const selected=registry.filter(e=>projectDeps.hasOwnProperty(e.key));if(selected.length===0)return[];const need=new Set(selected.map(e=>e.key));for(const e of selected){for(const dep of e.after){if(!need.has(dep)){console.log(`LumenJS: "${e.key}" requires "${dep}" \u2014 auto-including it.`);need.add(dep)}}}for(const e of registry){if(e.always)need.add(e.key)}return registry.filter(e=>need.has(e.key))}exports.selectedRegistryEntries=selectedRegistryEntries;async function buildJqueryPiece(entry){const npmPath=[].concat(entry.npm)[0];const result=await esbuild.build({stdin:{contents:`import __jquery from ${JSON.stringify(npmPath)};
|
|
2
|
+
window.jQuery = window.$ = __jquery;`,resolveDir:CORE_PACKAGE_DIR,loader:"js"},bundle:true,format:"cjs",platform:"browser",target:["es2019"],write:false,minify:false,logLevel:"silent"});const parts=[result.outputFiles[0].text];if(entry.code)parts.push(entry.code);return parts.join(";\n")}async function buildCjsFactoryPiece(entry){const npmPath=[].concat(entry.npm)[0];const result=await esbuild.build({stdin:{contents:`import __factory from ${JSON.stringify(npmPath)};
|
|
3
|
+
if (typeof __factory === "function") __factory(window, window.jQuery);`,resolveDir:CORE_PACKAGE_DIR,loader:"js"},bundle:true,format:"cjs",platform:"browser",target:["es2019"],write:false,minify:false,logLevel:"silent"});const parts=[result.outputFiles[0].text];if(entry.code)parts.push(entry.code);return parts.join(";\n")}function buildPlainPiece(entry){const parts=[];for(const npmPath of[].concat(entry.npm||[])){let src=fs.readFileSync(resolveCoreModule(npmPath),"utf8");if(entry.patch)src=entry.patch(src);parts.push(src)}if(entry.code)parts.push(entry.code);return parts.join(";\n")}async function buildEntryPiece(entry){if(entry.key==="jquery")return buildJqueryPiece(entry);if(entry.cjsFactory)return buildCjsFactoryPiece(entry);return buildPlainPiece(entry)}function createPatchPlugin(entries){const patchable=entries.filter(e=>e.patch);return{name:"lumenjs-plugins-patch",setup(build){for(const e of patchable){for(const npmPath of[].concat(e.npm||[])){const escaped=npmPath.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");const filter=new RegExp(escaped.split("/").join("[\\\\/]")+"$");build.onLoad({filter},async args=>{let src=await fs.promises.readFile(args.path,"utf8");return{contents:e.patch(src),loader:"js"}})}}}}}exports.createPatchPlugin=createPatchPlugin;async function buildSelectedCss(entries){const less=require("less");const parts=[];for(const e of entries){if(e.css){for(const cssPath of[].concat(e.css)){let src=fs.readFileSync(resolveCoreModule(cssPath),"utf8");if(e.cssPatch)src=e.cssPatch(src);parts.push(src)}}if(e.lessCss){const lessFile=resolveCoreModule(e.lessCss);const lessSrc=fs.readFileSync(lessFile,"utf8");const vendorStubs=path.join(CORE_PACKAGE_DIR,"vendor","bootstrap2-less-stubs");const lessOut=await less.render(lessSrc,{filename:lessFile,paths:[vendorStubs]});parts.push(lessOut.css)}}return parts.join("\n")}exports.buildSelectedCss=buildSelectedCss;async function buildSelectedPluginsBundle(entries){if(entries.length===0)return null;const parts=[];for(const entry of entries){parts.push(await buildEntryPiece(entry))}return parts.join(";\n")}exports.buildSelectedPluginsBundle=buildSelectedPluginsBundle;
|
package/package.json
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmjs/cli",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Command line interface for
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Command line interface for LumenJS — scaffold, develop, and build LumenJS applications. LumenJS is a tiny, fast reactive JavaScript framework for building web applications and interfaces with standard HTML, CSS, and JavaScript.",
|
|
5
5
|
"bin": {
|
|
6
|
-
"lm": "./bin/commands.js",
|
|
7
|
-
"lu": "./bin/commands.js",
|
|
8
|
-
"lumen": "./bin/commands.js"
|
|
6
|
+
"lm": "./dist/bin/commands.js",
|
|
7
|
+
"lu": "./dist/bin/commands.js",
|
|
8
|
+
"lumen": "./dist/bin/commands.js"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
|
-
"
|
|
12
|
-
"lib/"
|
|
11
|
+
"dist/"
|
|
13
12
|
],
|
|
14
13
|
"keywords": [
|
|
15
14
|
"lu",
|
|
@@ -28,37 +27,56 @@
|
|
|
28
27
|
"javascript",
|
|
29
28
|
"tiny",
|
|
30
29
|
"lumen-cli",
|
|
31
|
-
"bea.com.lb",
|
|
32
30
|
"lumenjs.com",
|
|
33
31
|
"lumin",
|
|
34
32
|
"beajs",
|
|
35
33
|
"lumen bea"
|
|
36
34
|
],
|
|
37
35
|
"dependencies": {
|
|
38
|
-
"
|
|
36
|
+
"acorn": "^8.18.0",
|
|
37
|
+
"acorn-loose": "^8.5.2",
|
|
38
|
+
"astring": "^1.9.0",
|
|
39
|
+
"chokidar": "^3.6.0",
|
|
40
|
+
"compression": "^1.7.4",
|
|
41
|
+
"cookie-parser": "^1.4.6",
|
|
42
|
+
"esbuild": "~0.28.0",
|
|
43
|
+
"express": "^4.18.1",
|
|
44
|
+
"express-session": "^1.17.3",
|
|
45
|
+
"ftp-deploy": "^2.4.3",
|
|
46
|
+
"html-minifier": "^4.0.0",
|
|
47
|
+
"less": "^4.9.1",
|
|
48
|
+
"multer": "^2.0.2",
|
|
49
|
+
"node-fetch": "^2.6.9",
|
|
50
|
+
"nodemon": "^2.0.16",
|
|
51
|
+
"ora": "^6.1.2",
|
|
52
|
+
"semver": "^7.3.7",
|
|
53
|
+
"ws": "^8.8.1",
|
|
54
|
+
"@lmjs/core": "2.0.0"
|
|
39
55
|
},
|
|
40
56
|
"engines": {
|
|
41
|
-
"node": ">=
|
|
42
|
-
},
|
|
43
|
-
"scripts": {
|
|
44
|
-
"requirements-check": "node ./lib/check-version.js",
|
|
45
|
-
"postinstall": "npm run requirements-check",
|
|
46
|
-
"build": "lm serve"
|
|
57
|
+
"node": ">=18.0.0"
|
|
47
58
|
},
|
|
48
59
|
"author": {
|
|
49
60
|
"name": "BEA Technology Company",
|
|
50
|
-
"email": "info@
|
|
61
|
+
"email": "info@lumenjs.com"
|
|
51
62
|
},
|
|
52
63
|
"homepage": "https://www.lumenjs.com/",
|
|
53
64
|
"publishConfig": {
|
|
54
65
|
"access": "public"
|
|
55
66
|
},
|
|
56
67
|
"bugs": {
|
|
57
|
-
"url": "https://github.com/bea-technology/
|
|
68
|
+
"url": "https://github.com/bea-technology/lumenjs/issues"
|
|
58
69
|
},
|
|
59
70
|
"license": "MIT",
|
|
60
71
|
"repository": {
|
|
61
72
|
"type": "git",
|
|
62
|
-
"url": "git+https://github.com/bea-technology/
|
|
73
|
+
"url": "git+https://github.com/bea-technology/lumenjs.git",
|
|
74
|
+
"directory": "packages/cli"
|
|
75
|
+
},
|
|
76
|
+
"scripts": {
|
|
77
|
+
"requirements-check": "node ./lib/check-version.js",
|
|
78
|
+
"postinstall": "npm run requirements-check",
|
|
79
|
+
"build": "node build/build.js",
|
|
80
|
+
"test": "node test/run.js"
|
|
63
81
|
}
|
|
64
|
-
}
|
|
82
|
+
}
|
package/bin/commands.js
DELETED
package/lib/app.js
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
var fs = require('fs');
|
|
2
|
-
const path = require("path");
|
|
3
|
-
const express = require('express');
|
|
4
|
-
var compression = require('compression');
|
|
5
|
-
const app = express();
|
|
6
|
-
const server = require('http').createServer(app);
|
|
7
|
-
var WebSocketServer = require("ws").Server;
|
|
8
|
-
var wss = new WebSocketServer({ server: server, path: "/" });
|
|
9
|
-
const fcs = require("./fcs.js");
|
|
10
|
-
var cl = console.log;
|
|
11
|
-
|
|
12
|
-
var cookieParser = require('cookie-parser');
|
|
13
|
-
var expressSession = require('express-session');
|
|
14
|
-
const bodyParser = require('body-parser');
|
|
15
|
-
var multer = require('multer');
|
|
16
|
-
var upload = multer();
|
|
17
|
-
|
|
18
|
-
let session = expressSession({
|
|
19
|
-
secret: 'keyboardcat',
|
|
20
|
-
resave: true,
|
|
21
|
-
saveUninitialized: true,
|
|
22
|
-
cookie: { maxAge: 9999000 }
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
var config = fcs.getConfig();
|
|
26
|
-
var _views = {};
|
|
27
|
-
var _tpls = {};
|
|
28
|
-
|
|
29
|
-
app.use(compression());
|
|
30
|
-
app.use(cookieParser());
|
|
31
|
-
app.use(session);
|
|
32
|
-
app.use('/', express.static(`${process.cwd()}` + path.sep + `src`));
|
|
33
|
-
app.set('etag', false);
|
|
34
|
-
app.use(bodyParser.urlencoded({ extended: true }));
|
|
35
|
-
app.use(bodyParser.json());
|
|
36
|
-
app.use(bodyParser.raw());
|
|
37
|
-
app.use(upload.array());
|
|
38
|
-
|
|
39
|
-
wss.on('connection', (ws) => {
|
|
40
|
-
ws.on('message', async (message) => {
|
|
41
|
-
try {
|
|
42
|
-
const buffer = Buffer.from(message);
|
|
43
|
-
const data = JSON.parse(buffer.toString());
|
|
44
|
-
|
|
45
|
-
if (data.hasOwnProperty('e')) {
|
|
46
|
-
var _data = {
|
|
47
|
-
"e": data.e,
|
|
48
|
-
"_iter": data._iter,
|
|
49
|
-
"payload": {}
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
if (data.e == "getfiles") {
|
|
53
|
-
_data['payload'] = {
|
|
54
|
-
"views": _views,
|
|
55
|
-
"tpls": _tpls
|
|
56
|
-
};
|
|
57
|
-
} else if (data.e == "gettpl") {
|
|
58
|
-
_data.payload = _tpls[data.payload];
|
|
59
|
-
} else if (data.e == "getview") {
|
|
60
|
-
_data.payload = _views[data.payload];
|
|
61
|
-
} else if (data.e == "request") {
|
|
62
|
-
try {
|
|
63
|
-
let pata = data.payload;
|
|
64
|
-
let __data = pata['data'];
|
|
65
|
-
let _body = pata['body'];
|
|
66
|
-
var resa = await API.req(_body['path'], __data, _body['headers'], _body['method'], _body['api'], true);
|
|
67
|
-
let res = await resa.text();
|
|
68
|
-
try {
|
|
69
|
-
res = JSON.parse(res);
|
|
70
|
-
} catch (e) {
|
|
71
|
-
}
|
|
72
|
-
_data.payload = (_body['full']) ? {
|
|
73
|
-
"headers": resa.headers,
|
|
74
|
-
"data": res
|
|
75
|
-
} : res;
|
|
76
|
-
ws.send(JSON.stringify(_data));
|
|
77
|
-
} catch (e) {
|
|
78
|
-
_data.payload = { "code": 108, "error": e.message, "type": "RequestError" };
|
|
79
|
-
ws.send(JSON.stringify(_data));
|
|
80
|
-
}
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
ws.send(JSON.stringify(_data));
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
} catch (e) {
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
}).on('error', (e) => { });
|
|
92
|
-
|
|
93
|
-
global.app = app;
|
|
94
|
-
var fetch = fcs.fetch;
|
|
95
|
-
global.fetch = fetch;
|
|
96
|
-
global.wss = wss;
|
|
97
|
-
global.fs = fs;
|
|
98
|
-
global.path = path;
|
|
99
|
-
|
|
100
|
-
var API = fcs.API;
|
|
101
|
-
global.API = API;
|
|
102
|
-
|
|
103
|
-
if (fs.existsSync(`${process.cwd()}` + path.sep + `src` + path.sep + `app.js`)) {
|
|
104
|
-
require(`${process.cwd()}` + path.sep + `src` + path.sep + `app.js`);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
app.get('*', function (req, res) {
|
|
108
|
-
let nodes = req.params[0].split("/");
|
|
109
|
-
if (nodes.length) nodes.shift();
|
|
110
|
-
res.sendFile(`${process.cwd()}` + path.sep + `src` + path.sep + ((fs.existsSync(`${process.cwd()}` + path.sep + `src` + path.sep + `views` + path.sep + nodes[0] + `.view`)) ? 'index' : '404') + `.html`);
|
|
111
|
-
return;
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
app.post('*', function (req, res) {
|
|
115
|
-
let nodes = req.params[0].split("/");
|
|
116
|
-
if (nodes.length) nodes.shift();
|
|
117
|
-
res.sendFile(`${process.cwd()}` + path.sep + `src` + path.sep + ((fs.existsSync(`${process.cwd()}` + path.sep + `src` + path.sep + `views` + path.sep + nodes[0] + `.view`)) ? 'index' : '404') + `.html`);
|
|
118
|
-
return;
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
server.listen(config.server.port > 0 ? config.server.port : 0, function (err) {
|
|
122
|
-
cl(`LumenJS server running at http://${config.server.host}:${config.server.port > 0 && server.address().port == config.server.port ? config.server.port : server.address().port}/`);
|
|
123
|
-
config.server.port = server.address().port;
|
|
124
|
-
_views = fcs.getAllFiles(`${process.cwd()}` + path.sep + `src` + path.sep + `views` + path.sep);
|
|
125
|
-
_tpls = fcs.getAllFiles(`${process.cwd()}` + path.sep + `src` + path.sep + `tpls` + path.sep);
|
|
126
|
-
}).on('error', (e) => {
|
|
127
|
-
if (e.code === 'EADDRINUSE') {
|
|
128
|
-
cl('Port ' + config.server.port + ' is already in use..');
|
|
129
|
-
server.close();
|
|
130
|
-
server.listen(0);
|
|
131
|
-
}
|
|
132
|
-
});
|
package/lib/check-version.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
const semver = require('semver');
|
|
3
|
-
const path = require('path');
|
|
4
|
-
const fs = require("fs");
|
|
5
|
-
const fcs = require("./fcs.js");
|
|
6
|
-
const BEA_Libs = {
|
|
7
|
-
"BEACSS": "https://s.beacdn.com/beacss/latest",
|
|
8
|
-
"BEAJS": "https://s.beacdn.com/beajs/latest"
|
|
9
|
-
};
|
|
10
|
-
const m = process.version.match(/(\d+)\.(\d+)\.(\d+)/);
|
|
11
|
-
if (!semver.satisfies(m[0].toString(), '>=12')) {
|
|
12
|
-
console.log("Node version should be minimum 12.0.0");
|
|
13
|
-
process.exit(1);
|
|
14
|
-
} else {
|
|
15
|
-
fcs.API.get(BEA_Libs.BEAJS, {})
|
|
16
|
-
.then((beajs) => {
|
|
17
|
-
fcs.API.get(BEA_Libs.BEACSS, {})
|
|
18
|
-
.then((beacss) => {
|
|
19
|
-
var libsPath = `${__dirname}` + path.sep + `files` + path.sep + `libs`;
|
|
20
|
-
fcs.cd(libsPath);
|
|
21
|
-
fs.writeFileSync(libsPath + path.sep + "bea.js", String(beajs.data));
|
|
22
|
-
fs.writeFileSync(libsPath + path.sep + "bea.css", String(beacss.data));
|
|
23
|
-
console.log("Successfully Purged!");
|
|
24
|
-
});
|
|
25
|
-
}).catch(err => {
|
|
26
|
-
console.log("Purge Failed!");
|
|
27
|
-
});
|
|
28
|
-
}
|