drop Typescript; 1-file andularjs version; npm/shards update

This commit is contained in:
Gwenhael Le Moine 2021-05-12 14:55:56 +02:00
parent d927e5535f
commit 66c0b952c2
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
12 changed files with 227 additions and 647 deletions

1
.gitignore vendored
View file

@ -1,6 +1,5 @@
/lib
/public/vendor/node_modules
/credger
/public/js
/.shards
/bin/

View file

@ -1,20 +1,14 @@
all: credger public/js/app.min.js
all: credger
credger: credger.cr ledger.cr shard.lock
crystal build --release $<
public/js/app.js: public/ts/app.ts public/ts/services/API.ts public/ts/components/dashboard.ts public/ts/components/bucket.ts
-./public/vendor/node_modules/.bin/tsc --project ./public/tsconfig.json
public/js/app.min.js: public/js/app.js
./public/vendor/node_modules/.bin/google-closure-compiler-js $^ > $@
pull-deps:
shards install --production -v
cd public/vendor; npm install
clean:
-rm public/js/app.min.js public/js/app.js credger
-rm credger
clean-all:
clean-all: clean
-rm -fr lib/ public/vendor/node_modules

View file

@ -41,6 +41,6 @@
<script src="/vendor/node_modules/angularjs-slider/dist/rzslider.min.js"></script>
<!-- APP -->
<script src="/js/app.min.js"></script>
<script src="/js/app.js"></script>
</body>
</html>

View file

@ -1,3 +1,126 @@
var app = angular.module('app',
['ui.router',
'nvd3',
'angularMoment',
'chieffancypants.loadingBar',
'rzSlider',
])
.config(['$stateProvider', '$urlRouterProvider',
function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('app', {
url: '',
component: 'dashboard'
});
}
]);
// BUCKET
app.component('bucket',
{
bindings: {
categories: '<',
period: '<'
},
controller: ['$filter', 'API',
function($filter, API) {
let ctrl = this;
ctrl.depth = 99;
ctrl.graph_options = {
chart: {
type: 'multiBarHorizontalChart',
height: 600,
margin: {
top: 20,
right: 20,
bottom: 20,
left: 200
},
x: (d) => { return d.account; },
y: (d) => { return d.amount; },
valueFormat: (d) => { return `${d}`; },
showYAxis: false,
showValues: true,
showLegend: true,
showControls: false,
showTooltipPercent: true,
duration: 500,
labelThreshold: 0.01,
labelSunbeamLayout: true,
labelsOutside: true,
multibar: {
dispatch: {
elementClick: (event) => {
API.register(ctrl.period, event.data.account)
.then(function success(response) {
let format_transaction = (transaction) => {
return `
<tr>
<td>${transaction.date}</td>
<td>${transaction.payee}</td>
<td style="text-align: right;">${transaction.amount} ${transaction.currency}</td>
</tr>`;
};
swal({
title: response.data.key,
html: `
<table style="width: 100%;">
<thead>
<tr>
<td>Date</td><td>Payee</td><td>Amount</td>
</tr>
</thead>
<tbody>
${response.data.values.map(function(transaction) { return format_transaction(transaction); }).join("")}
</tbody>
<tfoot><td></td><td>Total</td><td style="text-align: right;">${event.data.amount} </td></tfoot>
</table>`});
}, function error(response) { alert("error!"); });
}
}
}
}
};
ctrl.$onChanges = (changes) => {
if (changes.period && changes.period.currentValue != undefined) {
API.balance(ctrl.period, ctrl.categories, ctrl.depth)
.then((response) => {
ctrl.raw_data = _(response.data)
.sortBy((account) => { return account.name; });
ctrl.graph_options.chart.height = 60 + (25 * ctrl.raw_data.length);
ctrl.data = ctrl.categories.split(' ').map((category) => {
return {
key: category,
values: _(ctrl.raw_data).select((line) => { return line.account.match(`^${category}:.*`); })
}
})
});
}
};
}
],
template: `
<div class="bucket">
<div class="content">
<div class="graph">
<nvd3 data="$ctrl.data"
options="$ctrl.graph_options">
</nvd3>
</div>
</div>
</div>
`
});
// DASHBOARD
app.component('dashboard',
{
controller: ['$filter', 'API',
@ -215,3 +338,44 @@ return `
</div>
`
});
// APIS
app.service('API',
['$http',
function($http) {
let API = this;
API.balance = function(period, categories, depth) {
return $http.get('/api/ledger/balance', {
params: {
period: period,
categories: categories,
depth: depth
}
});
};
API.register = function(period, categories) {
return $http.get('/api/ledger/register', {
params: {
period: period,
categories: categories
}
});
};
API.graph_values = function(period, granularity, categories) {
return $http.get('/api/ledger/graph_values', {
params: {
period: period,
granularity: granularity,
categories: categories
}
});
};
API.accounts = _.memoize(function() {
return $http.get('/api/ledger/accounts');
});
}]);

View file

@ -1,20 +0,0 @@
/// <reference path="../vendor/node_modules/@types/angular/index.d.ts" />
/// <reference path="../vendor/node_modules/@types/underscore/index.d.ts" />
/// <reference path="../vendor/node_modules/@types/sweetalert/index.d.ts" />
var app = angular.module('app',
['ui.router',
'nvd3',
'angularMoment',
'chieffancypants.loadingBar',
'rzModule',
])
.config(['$stateProvider', '$urlRouterProvider',
function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('app', {
url: '',
component: 'dashboard'
});
}
]);

View file

@ -1,101 +0,0 @@
app.component('bucket',
{
bindings: {
categories: '<',
period: '<'
},
controller: ['$filter', 'API',
function($filter, API) {
let ctrl = this;
ctrl.depth = 99;
ctrl.graph_options = {
chart: {
type: 'multiBarHorizontalChart',
height: 600,
margin: {
top: 20,
right: 20,
bottom: 20,
left: 200
},
x: (d) => { return d.account; },
y: (d) => { return d.amount; },
valueFormat: (d) => { return `${d}`; },
showYAxis: false,
showValues: true,
showLegend: true,
showControls: false,
showTooltipPercent: true,
duration: 500,
labelThreshold: 0.01,
labelSunbeamLayout: true,
labelsOutside: true,
multibar: {
dispatch: {
elementClick: (event) => {
API.register(ctrl.period, event.data.account)
.then(function success(response) {
let format_transaction = (transaction) => {
return `
<tr>
<td>${transaction.date}</td>
<td>${transaction.payee}</td>
<td style="text-align: right;">${transaction.amount} ${transaction.currency}</td>
</tr>`;
};
swal({
title: response.data.key,
html: `
<table style="width: 100%;">
<thead>
<tr>
<td>Date</td><td>Payee</td><td>Amount</td>
</tr>
</thead>
<tbody>
${response.data.values.map(function(transaction) { return format_transaction(transaction); }).join("")}
</tbody>
<tfoot><td></td><td>Total</td><td style="text-align: right;">${event.data.amount} </td></tfoot>
</table>`});
}, function error(response) { alert("error!"); });
}
}
}
}
};
ctrl.$onChanges = (changes) => {
if (changes.period && changes.period.currentValue != undefined) {
API.balance(ctrl.period, ctrl.categories, ctrl.depth)
.then((response) => {
ctrl.raw_data = _(response.data)
.sortBy((account) => { return account.name; });
ctrl.graph_options.chart.height = 60 + (25 * ctrl.raw_data.length);
ctrl.data = ctrl.categories.split(' ').map((category) => {
return {
key: category,
values: _(ctrl.raw_data).select((line) => { return line.account.match(`^${category}:.*`); })
}
})
});
}
};
}
],
template: `
<div class="bucket">
<div class="content">
<div class="graph">
<nvd3 data="$ctrl.data"
options="$ctrl.graph_options">
</nvd3>
</div>
</div>
</div>
`
});

View file

@ -1,38 +0,0 @@
app.service('API',
['$http',
function($http) {
let API = this;
API.balance = function(period, categories, depth) {
return $http.get('/api/ledger/balance', {
params: {
period: period,
categories: categories,
depth: depth
}
});
};
API.register = function(period, categories) {
return $http.get('/api/ledger/register', {
params: {
period: period,
categories: categories
}
});
};
API.graph_values = function(period, granularity, categories) {
return $http.get('/api/ledger/graph_values', {
params: {
period: period,
granularity: granularity,
categories: categories
}
});
};
API.accounts = _.memoize(function() {
return $http.get('/api/ledger/accounts');
});
}]);

View file

@ -1,18 +0,0 @@
{
"compilerOptions": {
"target": "es5",
"module": "none",
"declaration": false,
"removeComments": true,
"sourceMap": false,
"outFile": "js/app.js",
"lib": [
"dom","es2015"
],
},
"include": [
"ts/app.ts",
"ts/services/*.ts",
"ts/components/*.ts",
],
}

View file

@ -1,23 +0,0 @@
{
"baseIndentSize": 0,
"indentSize": 2,
"tabSize": 2,
"indentStyle": 2,
"newLineCharacter": "\n",
"convertTabsToSpaces": true,
"insertSpaceAfterCommaDelimiter": true,
"insertSpaceAfterSemicolonInForStatements": true,
"insertSpaceBeforeAndAfterBinaryOperators": true,
"insertSpaceAfterConstructor": false,
"insertSpaceAfterKeywordsInControlFlowStatements": true,
"insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": true,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": true,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
"insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": true,
"insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": true,
"insertSpaceAfterTypeAssertion": true,
"insertSpaceBeforeFunctionParenthesis": false,
"placeOpenBraceOnNewLineForFunctions": false,
"placeOpenBraceOnNewLineForControlBlocks": false,
}

428
public/vendor/package-lock.json generated vendored
View file

@ -9,53 +9,28 @@
"version": "1.0.0",
"license": "GPL-3.0",
"dependencies": {
"@uirouter/angularjs": "^1.0.21",
"angular": "^1.7.6",
"angular-animate": "^1.7.6",
"angular-aria": "^1.7.6",
"angular-i18n": "^1.7.6",
"angular-loader": "^1.7.6",
"angular-loading-bar": "^0.9.0",
"angular-messages": "^1.7.6",
"angular-mocks": "^1.7.6",
"angular-moment": "^1.3.0",
"angular-nvd3": "^1.0.8",
"angularjs-nvd3-directives": "0.0.8",
"angularjs-slider": "^6.6.1",
"boilerplate": "^0.6.1",
"d3": "^3.5.17",
"google-closure-compiler-js": "^20170910.0.1",
"hammerjs": "^2.0.8",
"moment": "^2.24.0",
"nvd3": "^1.8.4",
"sweetalert2": "^7.33.1",
"typescript": "^2.9.2",
"underscore": "^1.9.1"
},
"devDependencies": {
"@types/angular": "^1.6.53",
"@types/sweetalert": "^1.1.28",
"@types/underscore": "^1.8.9"
"@uirouter/angularjs": "*",
"angular": "*",
"angular-animate": "*",
"angular-aria": "*",
"angular-i18n": "*",
"angular-loader": "*",
"angular-loading-bar": "*",
"angular-messages": "*",
"angular-mocks": "*",
"angular-moment": "*",
"angular-nvd3": "*",
"angularjs-nvd3-directives": "*",
"angularjs-slider": "*",
"boilerplate": "*",
"d3": "*",
"hammerjs": "*",
"moment": "*",
"nvd3": "*",
"sweetalert2": "*",
"underscore": "*"
}
},
"node_modules/@types/angular": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/@types/angular/-/angular-1.8.1.tgz",
"integrity": "sha512-8zEjTC3gpkva6/dbUkiSxIUGUxYm9HD/pJJ0lbqfEM2TWqi/3vs4VtgoFxVXt5bmuJ+6G2caO2HaMD+NzB1VwA==",
"dev": true
},
"node_modules/@types/sweetalert": {
"version": "1.1.28",
"resolved": "https://registry.npmjs.org/@types/sweetalert/-/sweetalert-1.1.28.tgz",
"integrity": "sha512-5A90pxXPIb+TwN/WhS5VBb6QQgIN6ArSXJrr7L8HcqgwiYwL0pIueZ302H5VVK43/uit+KICS6HfrJxm61x4dA==",
"dev": true
},
"node_modules/@types/underscore": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/@types/underscore/-/underscore-1.11.1.tgz",
"integrity": "sha512-mW23Xkp9HYgdMV7gnwuzqnPx6aG0J7xg/b7erQszOcyOizWylwCr9cgYM/BVVJHezUDxwyigG6+wCFQwCvyMBw==",
"dev": true
},
"node_modules/@uirouter/angularjs": {
"version": "1.0.29",
"resolved": "https://registry.npmjs.org/@uirouter/angularjs/-/angularjs-1.0.29.tgz",
@ -78,14 +53,6 @@
"node": ">=4.0.0"
}
},
"node_modules/amdefine": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
"integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=",
"engines": {
"node": ">=0.4.2"
}
},
"node_modules/angular": {
"version": "1.8.2",
"resolved": "https://registry.npmjs.org/angular/-/angular-1.8.2.tgz",
@ -157,9 +124,9 @@
}
},
"node_modules/angularjs-slider": {
"version": "6.7.0",
"resolved": "https://registry.npmjs.org/angularjs-slider/-/angularjs-slider-6.7.0.tgz",
"integrity": "sha512-Cizsuax65wN2Y+htmA3safE5ALOSCyWcKyWkziaO8vCVymi26bQQs6kKDhkYc8GFix/KE7Oc9gH3QLlTUgD38w==",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/angularjs-slider/-/angularjs-slider-7.0.0.tgz",
"integrity": "sha512-qNWPARWEktSthHj0/SAMVhy+3AIRnyVCXRK58gXT+3uRORXu/3QJ2L9MjCZvA9yeZxFceEYMOrtK8sSsTKobUw==",
"peerDependencies": {
"angular": "^1.2.x"
}
@ -363,37 +330,6 @@
"node": ">=0.10.0"
}
},
"node_modules/clone": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
"integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=",
"engines": {
"node": ">=0.8"
}
},
"node_modules/clone-buffer": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz",
"integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=",
"engines": {
"node": ">= 0.10"
}
},
"node_modules/clone-stats": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz",
"integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA="
},
"node_modules/cloneable-readable": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz",
"integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==",
"dependencies": {
"inherits": "^2.0.1",
"process-nextick-args": "^2.0.0",
"readable-stream": "^2.3.5"
}
},
"node_modules/collection-visit": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
@ -424,11 +360,6 @@
"node": ">=0.10.0"
}
},
"node_modules/core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"node_modules/d3": {
"version": "3.5.17",
"resolved": "https://registry.npmjs.org/d3/-/d3-3.5.17.tgz",
@ -560,9 +491,9 @@
}
},
"node_modules/glob": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"version": "7.1.7",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
"integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@ -612,19 +543,6 @@
"node": ">=0.10.0"
}
},
"node_modules/google-closure-compiler-js": {
"version": "20170910.0.1",
"resolved": "https://registry.npmjs.org/google-closure-compiler-js/-/google-closure-compiler-js-20170910.0.1.tgz",
"integrity": "sha512-Vric7QFWxzHFxITZ10bmlG1H/5rhODb7hJuWyKWMD8GflpQzRmbMVqkFp3fKvN+U9tPwZItGVhkiOR+84PX3ew==",
"dependencies": {
"minimist": "^1.2.0",
"vinyl": "^2.0.1",
"webpack-core": "^0.6.8"
},
"bin": {
"google-closure-compiler-js": "cmd.js"
}
},
"node_modules/hammerjs": {
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz",
@ -968,11 +886,6 @@
"node": "*"
}
},
"node_modules/minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
},
"node_modules/mixin-deep": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
@ -1130,25 +1043,6 @@
"node": ">=0.10.0"
}
},
"node_modules/process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
},
"node_modules/readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"dependencies": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"node_modules/relative": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/relative/-/relative-3.0.2.tgz",
@ -1160,19 +1054,6 @@
"node": ">= 0.8.0"
}
},
"node_modules/remove-trailing-separator": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
"integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8="
},
"node_modules/replace-ext": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz",
"integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==",
"engines": {
"node": ">= 0.10"
}
},
"node_modules/resolve-dir": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz",
@ -1185,11 +1066,6 @@
"node": ">=0.10.0"
}
},
"node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"node_modules/scaffold": {
"version": "0.2.13",
"resolved": "https://registry.npmjs.org/scaffold/-/scaffold-0.2.13.tgz",
@ -1234,22 +1110,6 @@
"node": ">=0.10.0"
}
},
"node_modules/source-list-map": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz",
"integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY="
},
"node_modules/source-map": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
"integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
"dependencies": {
"amdefine": ">=0.0.4"
},
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/split-string": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
@ -1296,20 +1156,12 @@
"node": ">=0.10.0"
}
},
"node_modules/string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dependencies": {
"safe-buffer": "~5.1.0"
}
},
"node_modules/sweetalert2": {
"version": "7.33.1",
"resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-7.33.1.tgz",
"integrity": "sha512-69KYtyhtxejFG0HDb8aVhAwbpAWPSTZwaL5vxDHgojErD2KeFxTmRgmkbiLtMC8UdTFXRmvTPtZTF4459MUb7w==",
"engines": {
"node": ">=0.10.0"
"version": "10.16.7",
"resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-10.16.7.tgz",
"integrity": "sha512-8w7UMU+joJro3r7CyyqLOK5Agc0/TI2OqC2T8odOOYRKbPvq2Bq9GF3HoQT2tFnjiqP5QEpVugayowoIl2ZlWw==",
"funding": {
"url": "https://sweetalert2.github.io/#donations"
}
},
"node_modules/to-object-path": {
@ -1334,18 +1186,6 @@
"node": ">=0.10.0"
}
},
"node_modules/typescript": {
"version": "2.9.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz",
"integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=4.2.0"
}
},
"node_modules/underscore": {
"version": "1.13.1",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz",
@ -1417,39 +1257,6 @@
"node": ">=0.10.0"
}
},
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"node_modules/vinyl": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz",
"integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==",
"dependencies": {
"clone": "^2.1.1",
"clone-buffer": "^1.0.0",
"clone-stats": "^1.0.0",
"cloneable-readable": "^1.0.0",
"remove-trailing-separator": "^1.0.1",
"replace-ext": "^1.0.0"
},
"engines": {
"node": ">= 0.10"
}
},
"node_modules/webpack-core": {
"version": "0.6.9",
"resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz",
"integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=",
"dependencies": {
"source-list-map": "~0.1.7",
"source-map": "~0.4.1"
},
"engines": {
"node": ">=0.6"
}
},
"node_modules/which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
@ -1468,24 +1275,6 @@
}
},
"dependencies": {
"@types/angular": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/@types/angular/-/angular-1.8.1.tgz",
"integrity": "sha512-8zEjTC3gpkva6/dbUkiSxIUGUxYm9HD/pJJ0lbqfEM2TWqi/3vs4VtgoFxVXt5bmuJ+6G2caO2HaMD+NzB1VwA==",
"dev": true
},
"@types/sweetalert": {
"version": "1.1.28",
"resolved": "https://registry.npmjs.org/@types/sweetalert/-/sweetalert-1.1.28.tgz",
"integrity": "sha512-5A90pxXPIb+TwN/WhS5VBb6QQgIN6ArSXJrr7L8HcqgwiYwL0pIueZ302H5VVK43/uit+KICS6HfrJxm61x4dA==",
"dev": true
},
"@types/underscore": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/@types/underscore/-/underscore-1.11.1.tgz",
"integrity": "sha512-mW23Xkp9HYgdMV7gnwuzqnPx6aG0J7xg/b7erQszOcyOizWylwCr9cgYM/BVVJHezUDxwyigG6+wCFQwCvyMBw==",
"dev": true
},
"@uirouter/angularjs": {
"version": "1.0.29",
"resolved": "https://registry.npmjs.org/@uirouter/angularjs/-/angularjs-1.0.29.tgz",
@ -1499,11 +1288,6 @@
"resolved": "https://registry.npmjs.org/@uirouter/core/-/core-6.0.7.tgz",
"integrity": "sha512-KUTJxL+6q0PiBnFx4/Z+Hsyg0pSGiaW5yZQeJmUxknecjpTbnXkLU8H2EqRn9N2B+qDRa7Jg8RcgeNDPY72O1w=="
},
"amdefine": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
"integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU="
},
"angular": {
"version": "1.8.2",
"resolved": "https://registry.npmjs.org/angular/-/angular-1.8.2.tgz",
@ -1568,9 +1352,9 @@
"integrity": "sha1-6fOraHjoGNAC+3nRDKkv+hreA7k="
},
"angularjs-slider": {
"version": "6.7.0",
"resolved": "https://registry.npmjs.org/angularjs-slider/-/angularjs-slider-6.7.0.tgz",
"integrity": "sha512-Cizsuax65wN2Y+htmA3safE5ALOSCyWcKyWkziaO8vCVymi26bQQs6kKDhkYc8GFix/KE7Oc9gH3QLlTUgD38w==",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/angularjs-slider/-/angularjs-slider-7.0.0.tgz",
"integrity": "sha512-qNWPARWEktSthHj0/SAMVhy+3AIRnyVCXRK58gXT+3uRORXu/3QJ2L9MjCZvA9yeZxFceEYMOrtK8sSsTKobUw==",
"requires": {}
},
"arr-union": {
@ -1730,31 +1514,6 @@
}
}
},
"clone": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
"integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18="
},
"clone-buffer": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz",
"integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg="
},
"clone-stats": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz",
"integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA="
},
"cloneable-readable": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz",
"integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==",
"requires": {
"inherits": "^2.0.1",
"process-nextick-args": "^2.0.0",
"readable-stream": "^2.3.5"
}
},
"collection-visit": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
@ -1779,11 +1538,6 @@
"resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
"integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40="
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"d3": {
"version": "3.5.17",
"resolved": "https://registry.npmjs.org/d3/-/d3-3.5.17.tgz",
@ -1885,9 +1639,9 @@
"integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg="
},
"glob": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"version": "7.1.7",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
"integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@ -1925,16 +1679,6 @@
"which": "^1.2.12"
}
},
"google-closure-compiler-js": {
"version": "20170910.0.1",
"resolved": "https://registry.npmjs.org/google-closure-compiler-js/-/google-closure-compiler-js-20170910.0.1.tgz",
"integrity": "sha512-Vric7QFWxzHFxITZ10bmlG1H/5rhODb7hJuWyKWMD8GflpQzRmbMVqkFp3fKvN+U9tPwZItGVhkiOR+84PX3ew==",
"requires": {
"minimist": "^1.2.0",
"vinyl": "^2.0.1",
"webpack-core": "^0.6.8"
}
},
"hammerjs": {
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz",
@ -2203,11 +1947,6 @@
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
},
"mixin-deep": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
@ -2329,25 +2068,6 @@
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
},
"readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"relative": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/relative/-/relative-3.0.2.tgz",
@ -2356,16 +2076,6 @@
"isobject": "^2.0.0"
}
},
"remove-trailing-separator": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
"integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8="
},
"replace-ext": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz",
"integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw=="
},
"resolve-dir": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz",
@ -2375,11 +2085,6 @@
"global-modules": "^0.2.3"
}
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"scaffold": {
"version": "0.2.13",
"resolved": "https://registry.npmjs.org/scaffold/-/scaffold-0.2.13.tgz",
@ -2415,19 +2120,6 @@
"split-string": "^3.0.1"
}
},
"source-list-map": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz",
"integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY="
},
"source-map": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
"integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
"requires": {
"amdefine": ">=0.0.4"
}
},
"split-string": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
@ -2464,18 +2156,10 @@
"object-copy": "^0.1.0"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
}
},
"sweetalert2": {
"version": "7.33.1",
"resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-7.33.1.tgz",
"integrity": "sha512-69KYtyhtxejFG0HDb8aVhAwbpAWPSTZwaL5vxDHgojErD2KeFxTmRgmkbiLtMC8UdTFXRmvTPtZTF4459MUb7w=="
"version": "10.16.7",
"resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-10.16.7.tgz",
"integrity": "sha512-8w7UMU+joJro3r7CyyqLOK5Agc0/TI2OqC2T8odOOYRKbPvq2Bq9GF3HoQT2tFnjiqP5QEpVugayowoIl2ZlWw=="
},
"to-object-path": {
"version": "0.3.0",
@ -2495,11 +2179,6 @@
}
}
},
"typescript": {
"version": "2.9.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz",
"integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w=="
},
"underscore": {
"version": "1.13.1",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz",
@ -2557,33 +2236,6 @@
}
}
},
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"vinyl": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz",
"integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==",
"requires": {
"clone": "^2.1.1",
"clone-buffer": "^1.0.0",
"clone-stats": "^1.0.0",
"cloneable-readable": "^1.0.0",
"remove-trailing-separator": "^1.0.1",
"replace-ext": "^1.0.0"
}
},
"webpack-core": {
"version": "0.6.9",
"resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz",
"integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=",
"requires": {
"source-list-map": "~0.1.7",
"source-map": "~0.4.1"
}
},
"which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",

View file

@ -1,48 +1 @@
{
"name": "ledgerrb",
"version": "1.0.0",
"description": "Ledger reporting for the Web",
"main": "./app/index.html",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/cycojesus/ledgerrb.git"
},
"author": "Gwenhael Le Moine",
"license": "GPL-3.0",
"bugs": {
"url": "https://github.com/cycojesus/ledgerrb/issues"
},
"homepage": "https://github.com/cycojesus/ledgerrb#readme",
"dependencies": {
"@uirouter/angularjs": "^1.0.21",
"angular": "^1.7.6",
"angular-animate": "^1.7.6",
"angular-aria": "^1.7.6",
"angular-i18n": "^1.7.6",
"angular-loader": "^1.7.6",
"angular-loading-bar": "^0.9.0",
"angular-messages": "^1.7.6",
"angular-mocks": "^1.7.6",
"angular-moment": "^1.3.0",
"angular-nvd3": "^1.0.8",
"angularjs-nvd3-directives": "0.0.8",
"angularjs-slider": "^6.6.1",
"boilerplate": "^0.6.1",
"d3": "^3.5.17",
"google-closure-compiler-js": "^20170910.0.1",
"hammerjs": "^2.0.8",
"moment": "^2.24.0",
"nvd3": "^1.8.4",
"sweetalert2": "^7.33.1",
"typescript": "^2.9.2",
"underscore": "^1.9.1"
},
"devDependencies": {
"@types/angular": "^1.6.53",
"@types/sweetalert": "^1.1.28",
"@types/underscore": "^1.8.9"
}
}
{"name":"ledgerrb","version":"1.0.0","description":"Ledger reporting for the Web","main":"./app/index.html","repository":{"type":"git","url":"git+https://github.com/cycojesus/ledgerrb.git"},"author":"Gwenhael Le Moine","license":"GPL-3.0","bugs":{"url":"https://github.com/cycojesus/ledgerrb/issues"},"homepage":"https://github.com/cycojesus/ledgerrb#readme","scripts":{"update:packages":"node wipe-dependencies.js && rm -rf node_modules && npm update --save-dev && npm update --save"},"dependencies":{"@uirouter/angularjs":"*","angular":"*","angular-animate":"*","angular-aria":"*","angular-i18n":"*","angular-loader":"*","angular-loading-bar":"*","angular-messages":"*","angular-mocks":"*","angular-moment":"*","angular-nvd3":"*","angularjs-nvd3-directives":"*","angularjs-slider":"*","boilerplate":"*","d3":"*","hammerjs":"*","moment":"*","nvd3":"*","sweetalert2":"*","underscore":"*"}}

18
public/vendor/wipe-dependencies.js vendored Executable file
View file

@ -0,0 +1,18 @@
const fs = require('fs')
const wipeDependencies = () => {
const file = fs.readFileSync('package.json')
const content = JSON.parse(file)
for (const devDep in content.devDependencies) {
content.devDependencies[devDep] = '*'
}
for (const dep in content.dependencies) {
content.dependencies[dep] = '*'
}
fs.writeFileSync('package.json', JSON.stringify(content))
}
if (require.main === module) {
wipeDependencies()
} else {
module.exports = wipeDependencies
}