pushnetgo-cli 1.0.0 → 1.0.2
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/README.md +19 -0
- package/bin/pushnetgo-cli.js +12 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -83,6 +83,25 @@ pushnetgo-cli token check
|
|
|
83
83
|
pushnetgo-cli token check --key pushnetgo-xxx
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
+
## Uploading Music (Avoid 403)
|
|
87
|
+
|
|
88
|
+
Do NOT call Firebase Storage REST API directly — requests will be blocked by Security Rules (App Check).
|
|
89
|
+
|
|
90
|
+
Use the Cloud Functions endpoint or CLI instead:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# HTTP API (any language)
|
|
94
|
+
curl -X POST https://us-central1-flutter-ai-playground-f8e3b.cloudfunctions.net/unifiedGatewayApi \
|
|
95
|
+
-H "Content-Type: application/json" \
|
|
96
|
+
-H "x-api-key: pushnetgo-xxx" \
|
|
97
|
+
-d '{"action":"sync-music","projectId":"p1","url":"https://..."}'
|
|
98
|
+
|
|
99
|
+
# CLI
|
|
100
|
+
pushnetgo-cli sync-music --url "https://api.mureka.ai/output.mp3"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Both methods use server-side Firebase Admin SDK to bypass Storage rules.
|
|
104
|
+
|
|
86
105
|
## API Key Format
|
|
87
106
|
|
|
88
107
|
PushNetGo API keys use the format:
|
package/bin/pushnetgo-cli.js
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
const { Command } = require('commander');
|
|
4
4
|
const program = new Command();
|
|
5
|
+
const API_URL = 'https://us-central1-flutter-ai-playground-f8e3b.cloudfunctions.net/unifiedGatewayApi';
|
|
5
6
|
|
|
6
7
|
program
|
|
7
8
|
.name('pushnetgo-cli')
|
|
8
|
-
.
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
.description(`PushNetGo App CLI — sync music, validate tokens
|
|
10
|
+
HTTP API: ${API_URL}
|
|
11
|
+
Auth: x-api-key: pushnetgo-xxx`)
|
|
12
|
+
.version(require('../package.json').version);
|
|
11
13
|
|
|
12
14
|
program
|
|
13
15
|
.command('sync-music')
|
|
@@ -35,4 +37,11 @@ program
|
|
|
35
37
|
}
|
|
36
38
|
});
|
|
37
39
|
|
|
40
|
+
program
|
|
41
|
+
.command('api-url')
|
|
42
|
+
.description('Print the HTTP API endpoint URL')
|
|
43
|
+
.action(() => {
|
|
44
|
+
console.log(API_URL);
|
|
45
|
+
});
|
|
46
|
+
|
|
38
47
|
program.parse(process.argv);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pushnetgo-cli",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "PushNetGo App CLI —
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "PushNetGo App CLI — HTTP API: https://us-central1-flutter-ai-playground-f8e3b.cloudfunctions.net/unifiedGatewayApi",
|
|
5
5
|
"bin": {
|
|
6
6
|
"pushnetgo-cli": "./bin/pushnetgo-cli.js"
|
|
7
7
|
},
|