Committed by cron-git from wodemacookdeAir.lan.yimian.xyz

master
boyao1999 4 years ago
parent ae72c384bc
commit e4f2b4c74e
  1. 1
      README.md
  2. 2
      node_modules/cron-git/LICENSE
  3. 8
      node_modules/cron-git/index.js
  4. 3
      node_modules/cron-git/ini.sh
  5. 12
      node_modules/cron-git/package.json
  6. 2
      node_modules/cron-git/test.js
  7. 6
      package-lock.json

@ -1 +1,2 @@
# FDC # FDC

2
node_modules/cron-git/LICENSE generated vendored

@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier same "printed page" as the copyright notice for easier
identification within third-party archives. identification within third-party archives.
Copyright [yyyy] [name of copyright owner] Copyright [2020] [iotcat]
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

8
node_modules/cron-git/index.js generated vendored

@ -8,7 +8,7 @@ module.exports = function(o_params){
/* factory mode */ /* factory mode */
var o = { var o = {
dir: __dirname, dir: process.cwd(),
debug: false, debug: false,
allowNotice: true, allowNotice: true,
pull: (params, callback, err_callback) => pull(params, callback, err_callback), pull: (params, callback, err_callback) => pull(params, callback, err_callback),
@ -21,6 +21,8 @@ module.exports = function(o_params){
/* merge params */ /* merge params */
Object.assign(o, o_params); Object.assign(o, o_params);
/* log dir */
console.log(new Date() + ' - cron-git: At dir::' + o.dir);
/* modules import */ /* modules import */
const cron = require('node-schedule'); const cron = require('node-schedule');
@ -34,7 +36,7 @@ module.exports = function(o_params){
branch: 'master' branch: 'master'
}, },
add: { add: {
path: './*' path: o.dir
}, },
commit: { commit: {
message: "Committed by cron-git from "+ require('os').hostname() message: "Committed by cron-git from "+ require('os').hostname()
@ -80,7 +82,7 @@ module.exports = function(o_params){
var push = function(params_user, callback){ var push = function(params_user, callback){
var params = { var params = {
add: { add: {
path: './*' path: o.dir
}, },
commit: { commit: {
message: "Committed by cron-git from "+ require('os').hostname() message: "Committed by cron-git from "+ require('os').hostname()

3
node_modules/cron-git/ini.sh generated vendored

@ -1,2 +1,5 @@
git config credential.helper store git config credential.helper store
git pull git pull
git add . -A
git commit -m "init from cron-git"
git push

@ -1,8 +1,8 @@
{ {
"_from": "cron-git", "_from": "cron-git",
"_id": "cron-git@1.0.0", "_id": "cron-git@1.0.5",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha512-DMfZWhvaDtuxxWXew+A+kgED0tRzKw5qEQsN4NSoV1fEf5Gn3+JJZ7LS1NKzX3tsgUvrmyr/KZs198u3/CtIVw==", "_integrity": "sha512-JQMQREUgtz38mG3kuSkV5XKKVGVUdCBgRjZa+CHrzv0ndydMNeUEMdg5WVt2Y7B14how44ptIpN2K5rXtQOJUA==",
"_location": "/cron-git", "_location": "/cron-git",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
@ -19,10 +19,10 @@
"#USER", "#USER",
"/" "/"
], ],
"_resolved": "https://registry.npmjs.org/cron-git/-/cron-git-1.0.0.tgz", "_resolved": "https://registry.npmjs.org/cron-git/-/cron-git-1.0.5.tgz",
"_shasum": "c523f5138274c08a7cc0e191aa8b04c78b9d8e99", "_shasum": "2cfdeeaee5d6ef2bd9515f1eeab75f90fbc91431",
"_spec": "cron-git", "_spec": "cron-git",
"_where": "E:\\cloud\\OneDrive\\git\\fdc", "_where": "/Users/wodemacbook/Desktop/fdc",
"author": { "author": {
"name": "iotcat" "name": "iotcat"
}, },
@ -52,5 +52,5 @@
"scripts": { "scripts": {
"test": "node test.js" "test": "node test.js"
}, },
"version": "1.0.0" "version": "1.0.5"
} }

2
node_modules/cron-git/test.js generated vendored

@ -1,4 +1,4 @@
const crongit = require('./index.js')(); const crongit = require('./index.js')();
//crongit.pull({}, ()=>{console.log('good')}, ()=>{console.log('bed')}); //crongit.pull({}, ()=>{console.log('good')}, ()=>{console.log('bed')});
crongit.schedule("10 * * * * *", ()=>console.log('test ok!!!\nuse Ctrl+C to exit!!'), ()=>console.log('pull err err err err!!!!')); crongit.schedule("*/10 * * * * *", ()=>console.log('test ok!!!\nuse Ctrl+C to exit!!'), ()=>console.log('pull err err err err!!!!'));

6
package-lock.json generated

@ -3,9 +3,9 @@
"lockfileVersion": 1, "lockfileVersion": 1,
"dependencies": { "dependencies": {
"cron-git": { "cron-git": {
"version": "1.0.0", "version": "1.0.5",
"resolved": "https://registry.npmjs.org/cron-git/-/cron-git-1.0.0.tgz", "resolved": "https://registry.npmjs.org/cron-git/-/cron-git-1.0.5.tgz",
"integrity": "sha512-DMfZWhvaDtuxxWXew+A+kgED0tRzKw5qEQsN4NSoV1fEf5Gn3+JJZ7LS1NKzX3tsgUvrmyr/KZs198u3/CtIVw==", "integrity": "sha512-JQMQREUgtz38mG3kuSkV5XKKVGVUdCBgRjZa+CHrzv0ndydMNeUEMdg5WVt2Y7B14how44ptIpN2K5rXtQOJUA==",
"requires": { "requires": {
"node-schedule": "^1.3.2", "node-schedule": "^1.3.2",
"os": "^0.1.1", "os": "^0.1.1",

Loading…
Cancel
Save