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

actbase-cli

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

actbase-cli - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

65

dist/i18n.js

@@ -82,2 +82,31 @@ "use strict";

const parseGJson = json => {
var _json$feed, _json$feed$entry;
let rows = [];
let column = [];
json === null || json === void 0 ? void 0 : (_json$feed = json.feed) === null || _json$feed === void 0 ? void 0 : (_json$feed$entry = _json$feed.entry) === null || _json$feed$entry === void 0 ? void 0 : _json$feed$entry.forEach(v => {
const cell = v['gs$cell'];
if (parseInt(cell.row) === 1) {
column[parseInt(cell.col) - 1] = cell.inputValue;
} else {
if (!rows[parseInt(cell.row) - 2]) rows[parseInt(cell.row) - 2] = [];
rows[parseInt(cell.row) - 2][parseInt(cell.col) - 1] = cell.inputValue;
}
});
let files = {};
for (let i = 1; i < column.length; i++) {
files[column[i]] = {};
}
rows.forEach(data => {
for (let i = 1; i < column.length; i++) {
files[column[i]][data[0]] = data[i] || "$$" + data[0];
}
});
return files;
};
const App =

@@ -174,3 +203,3 @@ /*#__PURE__*/

for (let i = 0; i < (fnames === null || fnames === void 0 ? void 0 : fnames.length); i++) {
const text = JSON.stringify(files[fnames[i]], null, 2);
const text = JSON.stringify(files[fnames[i]], null, ' ');
const savePath = `${_config.output}/${fnames[i]}.json`.replace(/\/\//g, "/");

@@ -180,2 +209,34 @@ yield writeFile(savePath, text);

}
} else if (_config.path.indexOf('/edit#gid=') >= 0) {
let key = _config.path.substring(39);
key = key.substring(0, key.indexOf("/"));
const uri = `https://spreadsheets.google.com/feeds/cells/${key}/1/public/full?alt=json`;
const response = yield fetch(uri);
let data = yield response.text();
let json = null;
try {
json = JSON.parse(data);
} catch (e) {
console.error('Publish 모드가 아닌 것 같습니다. 확인후 다시 시도해주세요.\n참고 URL: https://www.freecodecamp.org/news/cjn-google-sheets-as-json-endpoint/');
process.exit(1);
}
const files = parseGJson(json);
const fnames = Object.keys(files);
if (!fs.existsSync(`${_config.output}`)) {
fs.mkdirSync(`${_config.output}`);
}
for (let i = 0; i < (fnames === null || fnames === void 0 ? void 0 : fnames.length); i++) {
const text = JSON.stringify(files[fnames[i]], null, ' ');
const savePath = `${_config.output}/${fnames[i]}.json`.replace(/\/\//g, "/");
yield writeFile(savePath, text);
console.log(savePath + " 저장 완료!");
}
} else {
console.error('구글 경로가 아닌가봅니다.');
process.exit(1);
}

@@ -196,2 +257,2 @@

var pkgs = program.args;
App(pkgs, process.argv.indexOf('-r') > 0 || process.argv.indexOf('--reset') >= 0); //
App(pkgs, process.argv.indexOf('-r') > 0 || process.argv.indexOf('--reset') >= 0);

8

package.json
{
"name": "actbase-cli",
"version": "0.0.2",
"version": "0.0.3",
"description": "Actbase Command Line Interface",

@@ -19,3 +19,7 @@ "author": "Trabricks LLC",

"React-Native",
"Actbase"
"Actbase",
"CLI",
"boilerplate",
"i18n",
"i18n-generator"
],

@@ -22,0 +26,0 @@ "dependencies": {

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