@stoker-platform/cli 0.5.160 → 0.5.162

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/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/cli",
3
- "version": "0.5.159",
3
+ "version": "0.5.162",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "./lib/src/main.js",
package/lib/src/main.js CHANGED
@@ -284,6 +284,7 @@ program
284
284
  .option("-r, --backup-retention <duration>", "set Firestore backup duration (default 7 days)")
285
285
  .option("-c, --custom-cors <path>", "file path for custom Cloud Storage CORS policy")
286
286
  .option("-d, --development", "specifies that this will be a development project")
287
+ .option("-e, --set-emulator-data", "set emulator data for the project")
287
288
  .option("-t, --test-mode", "add the project in test mode")
288
289
  .action((options) => {
289
290
  addProject(options);
@@ -7,6 +7,7 @@ import { SecretManagerServiceClient } from "@google-cloud/secret-manager";
7
7
  import { addTenant } from "./addTenant.js";
8
8
  import { existsSync } from "fs";
9
9
  import { randomUUID } from "node:crypto";
10
+ import { prepareEmulatorData } from "./prepareEmulatorData.js";
10
11
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11
12
  export const addProject = async (options) => {
12
13
  if (!process.env.GCP_BILLING_ACCOUNT) {
@@ -150,6 +151,7 @@ export const addProject = async (options) => {
150
151
  "services",
151
152
  "enable",
152
153
  "aiplatform.googleapis.com",
154
+ "firebasevertexai.googleapis.com",
153
155
  "monitoring.googleapis.com",
154
156
  "logging.googleapis.com",
155
157
  "cloudtrace.googleapis.com",
@@ -963,6 +965,13 @@ export const addProject = async (options) => {
963
965
  },
964
966
  updateMask: "enforcementMode",
965
967
  },
968
+ {
969
+ service: {
970
+ name: `projects/${projectId}/services/firebaseml.googleapis.com`,
971
+ enforcementMode: "ENFORCED",
972
+ },
973
+ updateMask: "enforcementMode",
974
+ },
966
975
  ],
967
976
  }),
968
977
  });
@@ -1048,5 +1057,8 @@ STOKER_FB_EMULATOR_FUNCTIONS_PORT=${functionsPort}`;
1048
1057
  await runChildProcess("npx", ["stoker", "set-project"]);
1049
1058
  await addTenant();
1050
1059
  await updateProjectData(1000);
1060
+ if (options.development && options.setEmulatorData) {
1061
+ await prepareEmulatorData();
1062
+ }
1051
1063
  process.exit();
1052
1064
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/cli",
3
- "version": "0.5.160",
3
+ "version": "0.5.162",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "./lib/src/main.js",