firebase-tools-with-isolate 15.27.0 → 15.28.2-1

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.
Files changed (54) hide show
  1. package/lib/apphosting/backend.js +44 -10
  2. package/lib/apphosting/githubConnections.js +1 -1
  3. package/lib/apphosting/repo.js +1 -1
  4. package/lib/apphosting/rollout.js +1 -1
  5. package/lib/commands/ext-export.js +78 -17
  6. package/lib/commands/ext-migrate.js +36 -0
  7. package/lib/commands/ext-uninstall.js +35 -1
  8. package/lib/commands/functions-delete.js +19 -5
  9. package/lib/commands/functions-kits-install.js +18 -275
  10. package/lib/commands/functions-kits-list.js +27 -0
  11. package/lib/commands/functions-kits-uninstall.js +266 -0
  12. package/lib/commands/index.js +5 -0
  13. package/lib/config.js +34 -0
  14. package/lib/dataconnect/client.js +13 -2
  15. package/lib/dataconnect/schemaMigration.js +16 -5
  16. package/lib/deploy/extensions/secrets.js +18 -0
  17. package/lib/deploy/functions/ensure.js +29 -19
  18. package/lib/deploy/functions/functionsDeployHelper.js +39 -15
  19. package/lib/deploy/functions/prepare.js +51 -10
  20. package/lib/deploy/functions/release/fabricator.js +19 -3
  21. package/lib/deploy/functions/release/planner.js +8 -0
  22. package/lib/deploy/functions/runtimes/dart/features.js +51 -0
  23. package/lib/deploy/functions/runtimes/dart/index.js +60 -16
  24. package/lib/emulator/downloadableEmulatorInfo.json +31 -31
  25. package/lib/emulator/functionsEmulator.js +4 -1
  26. package/lib/experiments.js +6 -0
  27. package/lib/extensions/export.js +26 -0
  28. package/lib/extensions/listExtensions.js +27 -3
  29. package/lib/extensions/migrate.js +171 -0
  30. package/lib/extensions/replacementRegistry.js +65 -0
  31. package/lib/extensions/replacements.json +464 -0
  32. package/lib/fetchMOTD.js +3 -0
  33. package/lib/functions/env.js +11 -0
  34. package/lib/functions/iac/export.js +16 -1
  35. package/lib/functions/kits/config.js +8 -0
  36. package/lib/functions/kits/env.js +38 -0
  37. package/lib/functions/kits/index.js +19 -0
  38. package/lib/functions/kits/install.js +709 -0
  39. package/lib/gcp/secretManager.js +3 -3
  40. package/lib/init/features/functions/dart.js +1 -1
  41. package/lib/mcp/tools/core/deploy.js +2 -0
  42. package/lib/mcp/tools/core/login.js +59 -4
  43. package/lib/mcp/tools/dataconnect/compile.js +23 -2
  44. package/lib/mcp/tools/dataconnect/list_services.js +3 -4
  45. package/lib/requireTosAcceptance.js +2 -1
  46. package/lib/tsconfig.publish.tsbuildinfo +1 -1
  47. package/lib/unzip.js +12 -2
  48. package/package.json +6 -5
  49. package/schema/firebase-config.json +1 -1
  50. package/templates/init/functions/dart/_gitignore +1 -0
  51. package/templates/init/functions/typescript/index.ts +3 -3
  52. package/templates/init/functions/typescript/package-ongraphrequest.lint.json +3 -3
  53. package/templates/init/functions/typescript/package.lint.json +3 -3
  54. package/templates/init/functions/typescript/tsconfig.dev.json +4 -0
package/lib/unzip.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createUnzipTransform = exports.unzip = void 0;
4
+ exports.isChildDir = isChildDir;
4
5
  const fs = require("fs");
5
6
  const path = require("path");
6
7
  const zlib = require("zlib");
@@ -66,7 +67,7 @@ const extractEntriesFromBuffer = async (data, outputDir) => {
66
67
  await fs.promises.mkdir(outputFilePath, { recursive: true });
67
68
  }
68
69
  else {
69
- const parentDir = outputFilePath.substring(0, outputFilePath.lastIndexOf(path.sep));
70
+ const parentDir = path.dirname(outputFilePath);
70
71
  logger_1.logger.debug(`[unzip] else mkdir: ${parentDir}`);
71
72
  await fs.promises.mkdir(parentDir, { recursive: true });
72
73
  const compressionMethod = entryHeader.readUInt16LE(8);
@@ -89,7 +90,16 @@ function isChildDir(parentDir, potentialChild) {
89
90
  try {
90
91
  const resolvedParent = path.resolve(parentDir);
91
92
  const resolvedChild = path.resolve(potentialChild);
92
- return resolvedChild.startsWith(resolvedParent) && resolvedChild !== resolvedParent;
93
+ if (process.platform === "win32") {
94
+ const lowerParent = resolvedParent.toLowerCase();
95
+ const lowerChild = resolvedChild.toLowerCase();
96
+ const parentWithSep = lowerParent.endsWith(path.sep) ? lowerParent : lowerParent + path.sep;
97
+ return lowerChild.startsWith(parentWithSep) && lowerChild !== lowerParent;
98
+ }
99
+ const parentWithSep = resolvedParent.endsWith(path.sep)
100
+ ? resolvedParent
101
+ : resolvedParent + path.sep;
102
+ return resolvedChild.startsWith(parentWithSep) && resolvedChild !== resolvedParent;
93
103
  }
94
104
  catch (error) {
95
105
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "firebase-tools-with-isolate",
3
- "version": "15.27.0",
3
+ "version": "15.28.2-1",
4
4
  "description": "Command-Line Interface for Firebase with monorepo support",
5
5
  "main": "./lib/index.js",
6
6
  "mcpName": "io.github.firebase/firebase-mcp",
@@ -19,6 +19,7 @@
19
19
  "format:ts": "npm run lint:ts -- --fix --quiet",
20
20
  "generate:auth-api": "ts-node scripts/gen-auth-api-spec.ts",
21
21
  "generate:json-schema": "typescript-json-schema --strictNullChecks --required --noExtraProps --ignoreErrors src/firebaseConfig.ts FirebaseConfig > schema/firebase-config.json",
22
+ "scrape:extensions": "ts-node scripts/extensions-scraper/run-live-scan.ts",
22
23
  "lint": "npm run lint:ts && npm run lint:other",
23
24
  "lint:changed-files": "ts-node ./scripts/lint-changed-files.ts",
24
25
  "lint:other": "prettier --check '**/*.{md,yaml,yml}'",
@@ -128,6 +129,7 @@
128
129
  "cross-env": "^7.0.3",
129
130
  "cross-spawn": "^7.0.5",
130
131
  "csv-parse": "^5.0.4",
132
+ "detect-monorepo": "^1.2.0",
131
133
  "exegesis": "^4.2.0",
132
134
  "exegesis-express": "^4.0.0",
133
135
  "express": "^4.16.4",
@@ -138,6 +140,7 @@
138
140
  "glob": "^10.5.0",
139
141
  "google-auth-library": "^9.11.0",
140
142
  "ignore": "^7.0.4",
143
+ "isolate-package": "1.37.0",
141
144
  "js-yaml": "^4.2.0",
142
145
  "jsonwebtoken": "^9.0.2",
143
146
  "libsodium-wrappers": "^0.7.10",
@@ -167,16 +170,14 @@
167
170
  "tcp-port-used": "^1.0.2",
168
171
  "tmp": "^0.2.3",
169
172
  "triple-beam": "^1.3.0",
173
+ "undici": "^6.19.0",
170
174
  "universal-analytics": "^0.5.3",
171
175
  "update-notifier-cjs": "^5.1.6",
172
- "undici": "^6.19.0",
173
176
  "winston": "^3.0.0",
174
177
  "winston-transport": "^4.4.0",
175
178
  "ws": "^8.21.1",
176
179
  "yaml": "^2.8.3",
177
- "zod": "^4.0.0",
178
- "isolate-package": "1.35.0",
179
- "detect-monorepo": "^1.2.0"
180
+ "zod": "^4.0.0"
180
181
  },
181
182
  "devDependencies": {
182
183
  "@angular-devkit/architect": "^0.1402.2",
@@ -1018,7 +1018,7 @@
1018
1018
  "description": "Package details when resolved from a package repository.",
1019
1019
  "properties": {
1020
1020
  "name": {
1021
- "description": "Package name (e.g., \"@firebase-functions-kits/firestore-bigquery-export\")",
1021
+ "description": "Package name (e.g., \"@firebase-function-kits/firestore-bigquery-export\")",
1022
1022
  "type": "string"
1023
1023
  }
1024
1024
  },
@@ -1,3 +1,4 @@
1
1
  .dart_tool/
2
2
  bin/server
3
+ build/
3
4
  *.local
@@ -8,8 +8,8 @@
8
8
  */
9
9
 
10
10
  import {setGlobalOptions} from "firebase-functions";
11
- import {onRequest} from "firebase-functions/https";
12
- import * as logger from "firebase-functions/logger";
11
+ // import {onRequest} from "firebase-functions/https";
12
+ // import * as logger from "firebase-functions/logger";
13
13
 
14
14
  // Start writing functions
15
15
  // https://firebase.google.com/docs/functions/typescript
@@ -24,7 +24,7 @@ import * as logger from "firebase-functions/logger";
24
24
  // functions should each use functions.runWith({ maxInstances: 10 }) instead.
25
25
  // In the v1 API, each function can only serve one request per container, so
26
26
  // this will be the maximum concurrent request count.
27
- setGlobalOptions({ maxInstances: 10 });
27
+ setGlobalOptions({maxInstances: 10});
28
28
 
29
29
  // export const helloWorld = onRequest((request, response) => {
30
30
  // logger.info("Hello logs!", {structuredData: true});
@@ -21,9 +21,9 @@
21
21
  "@as-integrations/express4": "^1.1.2"
22
22
  },
23
23
  "devDependencies": {
24
- "@typescript-eslint/eslint-plugin": "^5.12.0",
25
- "@typescript-eslint/parser": "^5.12.0",
26
- "eslint": "^8.9.0",
24
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
25
+ "@typescript-eslint/parser": "^8.0.0",
26
+ "eslint": "^8.57.0",
27
27
  "eslint-config-google": "^0.14.0",
28
28
  "eslint-plugin-import": "^2.25.4",
29
29
  "firebase-functions-test": "^3.4.1",
@@ -19,9 +19,9 @@
19
19
  "firebase-functions": "^7.0.0"
20
20
  },
21
21
  "devDependencies": {
22
- "@typescript-eslint/eslint-plugin": "^5.12.0",
23
- "@typescript-eslint/parser": "^5.12.0",
24
- "eslint": "^8.9.0",
22
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
23
+ "@typescript-eslint/parser": "^8.0.0",
24
+ "eslint": "^8.57.0",
25
25
  "eslint-config-google": "^0.14.0",
26
26
  "eslint-plugin-import": "^2.25.4",
27
27
  "firebase-functions-test": "^3.4.1",
@@ -1,4 +1,8 @@
1
1
  {
2
+ "compilerOptions": {
3
+ "allowJs": true,
4
+ "noEmit": true
5
+ },
2
6
  "include": [
3
7
  ".eslintrc.js"
4
8
  ]