aaden-cli 1.3.20 → 1.3.22
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/babel.config.json +3 -0
- package/dist/index.js +81701 -10896
- package/index.js +2 -1
- package/modules/cli-utils.js +2 -2
- package/modules/{firebase.mjs → firebase.js} +5 -5
- package/package.json +4 -1
package/index.js
CHANGED
|
@@ -8,6 +8,7 @@ const colors = require('colors')
|
|
|
8
8
|
const fs = require('fs')
|
|
9
9
|
const InnerKenTimeStampFormat = 'YYYYMMDDHHmmss'
|
|
10
10
|
const prompts = require('prompts')
|
|
11
|
+
const {deviceEcho} = require('./modules/firebase')
|
|
11
12
|
const GlobalDeviceId = 'notset'
|
|
12
13
|
|
|
13
14
|
const {program} = require('commander')
|
|
@@ -624,7 +625,7 @@ async function removeAllData() {
|
|
|
624
625
|
|
|
625
626
|
|
|
626
627
|
async function doLog() {
|
|
627
|
-
const res = cli.executeInShell(['snap info aaden-vue-app'])
|
|
628
|
+
const res = cli.executeInShell(['snap info aaden-vue-app'], program.debug, true)
|
|
628
629
|
const log = res.stdout
|
|
629
630
|
console.log(JSON.stringify(res))
|
|
630
631
|
await deviceEcho(log, version)
|
package/modules/cli-utils.js
CHANGED
|
@@ -16,7 +16,7 @@ function showCommand (arr) {
|
|
|
16
16
|
console.log('')
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
function executeInShell (cmd, debug = false) {
|
|
19
|
+
function executeInShell (cmd, debug = false,needResult=false) {
|
|
20
20
|
let _cmd = commandBuilder(cmd)
|
|
21
21
|
try {
|
|
22
22
|
showCommand(cmd)
|
|
@@ -29,7 +29,7 @@ function executeInShell (cmd, debug = false) {
|
|
|
29
29
|
result: true,
|
|
30
30
|
...spawnSync(_cmd, [], {
|
|
31
31
|
shell: true,
|
|
32
|
-
stdio: 'inherit'
|
|
32
|
+
stdio: needResult?'pipe':'inherit'
|
|
33
33
|
})}
|
|
34
34
|
} catch (e) {
|
|
35
35
|
console.log(getLine('*'))
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// Import the functions you need from the SDKs you need
|
|
2
|
-
|
|
2
|
+
const { initializeApp } =require( "firebase/app");
|
|
3
3
|
import { getAnalytics } from "firebase/analytics";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const { doc, getFirestore, setDoc, updateDoc } =require( 'firebase/firestore')
|
|
5
|
+
const dayjs =require( "dayjs");
|
|
6
|
+
const {hillo} = require('hillo')
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
// https://firebase.google.com/docs/web/setup#available-libraries
|
|
@@ -27,7 +27,7 @@ const deviceEchoPath = 'DeviceEcho'
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
const echoLogPath = 'echoLog'
|
|
30
|
-
|
|
30
|
+
hillo.initial('http://localhost/PHP/')
|
|
31
31
|
|
|
32
32
|
export async function deviceEcho (frontEndVersion,cliVersion) {
|
|
33
33
|
const myDeviceId = await getCurrentDeviceId()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aaden-cli",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.22",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
+
"@babel/cli": "^7.23.4",
|
|
29
|
+
"@babel/core": "^7.23.3",
|
|
30
|
+
"@babel/preset-env": "^7.23.3",
|
|
28
31
|
"@vercel/ncc": "^0.28.5",
|
|
29
32
|
"colors": "^1.4.0",
|
|
30
33
|
"commander": "^5.1.0",
|