Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import * as utils from "./utils";
import { getValidator, getErrorMessage } from "./firebaseConfigValidate";
import { logger } from "./logger";
import { loadCJSON } from "./loadCJSON";
const parseBoltRules = require("./parseBoltRules");

export class Config {
static DEFAULT_FUNCTIONS_SOURCE = "functions";
Expand Down Expand Up @@ -68,7 +67,7 @@ export class Config {
}

// If a top-level key contains a string path pointing to a suported file
// type (JSON or Bolt), we read the file.
// type (JSON ), we read the file.
//
// TODO: This is janky and confusing behavior, we should remove it ASAP.
Config.MATERIALIZE_TARGETS.forEach((target) => {
Expand Down Expand Up @@ -166,10 +165,9 @@ export class Config {
return loadCJSON(fullPath);
/* istanbul ignore-next */
case ".bolt":
if (target === "database") {
this.notes.databaseRules = "bolt";
}
return parseBoltRules(fullPath);
throw new FirebaseError(
"As of [email protected], .bolt rules are no longer supported.",
);
default:
throw new FirebaseError(
"Parse Error: " + filePath + " is not of a supported config file type",
Expand Down
6 changes: 3 additions & 3 deletions src/deploy/database/prepare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as clc from "colorette";
import * as path from "path";

import { FirebaseError } from "../../error";
import { parseBoltRules } from "../../parseBoltRules";
import * as rtdb from "../../rtdb";
import * as utils from "../../utils";
import * as dbRulesConfig from "../../database/rulesConfig";
Expand Down Expand Up @@ -34,8 +33,9 @@ export function prepare(context: any, options: DeployOptions): Promise<any> {
ruleFiles[file] = options.config.readProjectFile(file);
break;
case ".bolt":
ruleFiles[file] = parseBoltRules(file);
break;
throw new FirebaseError(
"As of [email protected], .bolt rules are no longer supported.",
);
default:
throw new FirebaseError("Unexpected rules format " + path.extname(file));
}
Expand Down
7 changes: 1 addition & 6 deletions src/emulator/databaseEmulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { Constants } from "./constants";
import { EmulatorRegistry } from "./registry";
import { EmulatorLogger } from "./emulatorLogger";
import { FirebaseError } from "../error";
import { parseBoltRules } from "../parseBoltRules";
import { connectableHostname } from "../utils";

export interface DatabaseEmulatorArgs {
Expand Down Expand Up @@ -163,11 +162,7 @@ export class DatabaseEmulator implements EmulatorInstance {
}

private async updateRules(instance: string, rulesPath: string): Promise<any> {
const rulesExt = path.extname(rulesPath);
const content =
rulesExt === ".bolt"
? parseBoltRules(rulesPath).toString()
: fs.readFileSync(rulesPath, "utf8");
const content = fs.readFileSync(rulesPath, "utf8");

try {
await EmulatorRegistry.client(Emulators.DATABASE).put(`/.settings/rules.json`, content, {
Expand Down
30 changes: 0 additions & 30 deletions src/parseBoltRules.ts

This file was deleted.

Loading