kasy-cli 1.21.4 → 1.21.5
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.
|
@@ -49,6 +49,16 @@ const REQUIRED_APIS = [
|
|
|
49
49
|
'logging.googleapis.com', // Cloud Logging (Cloud Build writes build logs here)
|
|
50
50
|
];
|
|
51
51
|
|
|
52
|
+
// fcmOnly (Supabase/API): only the APIs needed for push + Google Sign-In, all
|
|
53
|
+
// of which work on the free Spark plan. Crucially NONE of these require billing
|
|
54
|
+
// — the heavy Cloud Run/Functions/Build/Compute APIs above all demand Blaze.
|
|
55
|
+
const FCM_ONLY_APIS = [
|
|
56
|
+
'firebase.googleapis.com', // Firebase Management (addFirebase)
|
|
57
|
+
'identitytoolkit.googleapis.com', // Firebase Auth / Google Sign-In
|
|
58
|
+
'fcm.googleapis.com', // Cloud Messaging (push) — free
|
|
59
|
+
'iam.googleapis.com', // service accounts (the FCM admin key)
|
|
60
|
+
];
|
|
61
|
+
|
|
52
62
|
async function run(cmd, cwd = process.cwd()) {
|
|
53
63
|
try {
|
|
54
64
|
const { stdout, stderr } = await execAsync(cmd, {
|
|
@@ -382,8 +392,8 @@ async function applyStorageCors(projectId, options = {}) {
|
|
|
382
392
|
/**
|
|
383
393
|
* Enable required Google Cloud APIs.
|
|
384
394
|
*/
|
|
385
|
-
async function enableApis(projectId) {
|
|
386
|
-
const apis = REQUIRED_APIS.join(' ');
|
|
395
|
+
async function enableApis(projectId, fcmOnly = false) {
|
|
396
|
+
const apis = (fcmOnly ? FCM_ONLY_APIS : REQUIRED_APIS).join(' ');
|
|
387
397
|
const result = await run(`gcloud services enable ${apis} --project=${projectId}`);
|
|
388
398
|
if (!result.ok) {
|
|
389
399
|
return { ok: false, error: result.stderr || result.error };
|
|
@@ -954,7 +964,7 @@ async function setupFromScratch(appName, bundleId, options = {}) {
|
|
|
954
964
|
}
|
|
955
965
|
|
|
956
966
|
onProgress('enable-apis');
|
|
957
|
-
const apisResult = await enableApis(projectId);
|
|
967
|
+
const apisResult = await enableApis(projectId, fcmOnly);
|
|
958
968
|
if (!apisResult.ok) return { ok: false, error: apisResult.error };
|
|
959
969
|
|
|
960
970
|
// Set ADC quota project so Firebase REST API calls (createAndroidApp etc.) work with user credentials.
|