Skip to content

Commit 5dec56f

Browse files
authored
Merge branch 'master' into leoortizz_fixWindowsDotEnv
2 parents 3a1dc8e + be02559 commit 5dec56f

File tree

22 files changed

+1756
-2542
lines changed

22 files changed

+1756
-2542
lines changed

.github/workflows/node-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
run: npm run test:e2e
118118
working-directory: firebase-vscode
119119

120-
- uses: actions/upload-artifact@v3
120+
- uses: actions/upload-artifact@v4
121121
if: failure()
122122
with:
123123
name: screenshots

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Updated `cross-env` and `cross-spawn` dependencies to avoid vulnerable versions. (#7979)
2+
- Fixed an issue with the Data Connect emulator where `dataDir` and `--export` were relative to the current directory insead of `firebase.json`.

firebase-vscode/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## NEXT
22

3+
- [Feature] Added `debug` setting to run commands with `--debug`
4+
35
## 0.12.0
46

57
- Updated internal firebase-tools dependency to 13.29.1

firebase-vscode/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@
7777
"default": true,
7878
"markdownDescription": "%ext.config.idx.viewMetricNotice%",
7979
"scope": "application"
80+
},
81+
"firebase.debug": {
82+
"type": "boolean",
83+
"default": false,
84+
"markdownDescription": "%ext.config.debug%"
8085
}
8186
}
8287
},

firebase-vscode/package.nls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"ext.config.firebasePath": "Path to the `Firebase` module, e.g. `./node_modules/firebase`",
55
"ext.config.hosting.useFrameworks": "Enable web frameworks",
66
"ext.config.npmPath": "Path to NPM executable in local environment",
7+
"ext.config.debug": "When true, add the --debug flag to any commands run by the extension",
78
"ext.config.title": "Prettier",
89
"ext.config.idx.viewMetricNotice": "Show data collection notice on next startup (IDX Only)"
910
}

firebase-vscode/src/data-connect/terminal.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export function setTerminalEnvVars(envVar: string, value: string) {
1717
}
1818

1919
export function runCommand(command: string) {
20+
const settings = getSettings();
2021
const terminalOptions: TerminalOptions = {
2122
name: "Data Connect Terminal",
2223
env: environmentVariables,
@@ -30,6 +31,9 @@ export function runCommand(command: string) {
3031
if (currentProjectId.value) {
3132
command = `${command} --project ${currentProjectId.value}`;
3233
}
34+
if (settings.debug) {
35+
command = `${command} --debug`;
36+
}
3337
terminal.sendText(command);
3438
}
3539

@@ -38,6 +42,7 @@ export function runTerminalTask(
3842
command: string,
3943
presentationOptions: vscode.TaskPresentationOptions = { focus: true },
4044
): Promise<string> {
45+
const settings = getSettings();
4146
const type = "firebase-" + Date.now();
4247
return new Promise(async (resolve, reject) => {
4348
vscode.tasks.onDidEndTaskProcess(async (e) => {
@@ -60,7 +65,7 @@ export function runTerminalTask(
6065
vscode.TaskScope.Workspace,
6166
taskName,
6267
"firebase",
63-
new vscode.ShellExecution(command, executionOptions),
68+
new vscode.ShellExecution(`${command}${settings.debug ? " --debug" : ""}`, executionOptions),
6469
);
6570
task.presentationOptions = presentationOptions;
6671
await vscode.tasks.executeTask(task);

firebase-vscode/src/utils/settings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export interface Settings {
77
readonly npmPath: string;
88
readonly useFrameworks: boolean;
99
readonly shouldShowIdxMetricNotice: boolean;
10+
readonly debug: boolean;
1011
}
1112

1213
// TODO: Temporary fallback for bashing, this should probably point to the global firebase binary on the system
@@ -37,6 +38,7 @@ export function getSettings(): Settings {
3738
"idx.viewMetricNotice",
3839
true,
3940
),
41+
debug: config.get<boolean>("debug", false),
4042
};
4143
}
4244

firebase-vscode/webpack.common.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -191,19 +191,20 @@ const extensionConfig = {
191191
from: "../schema",
192192
to: "./schema",
193193
},
194+
// TODO(hlshen): Sanity check if these should be fixed or removed. AFIACT, they exist for functions and hosting deploys, which are not relevant anymore.
194195
// Copy uncompiled JS files called at runtime by
195196
// firebase-tools/src/parseTriggers.ts
196-
{
197-
from: "*.js",
198-
to: "./",
199-
context: "../src/deploy/functions/runtimes/node",
200-
},
201-
// Copy cross-env-shell.js used to run predeploy scripts
202-
// to ensure they work in Windows
203-
{
204-
from: "../node_modules/cross-env/dist",
205-
to: "./cross-env/dist",
206-
},
197+
// {
198+
// from: "*.js",
199+
// to: "./",
200+
// context: "../src/deploy/functions/runtimes/node",
201+
// },
202+
// // Copy cross-env-shell.js used to run predeploy scripts
203+
// // to ensure they work in Windows
204+
// {
205+
// from: "../node_modules/cross-env/dist",
206+
// to: "./cross-env/dist",
207+
// },
207208
],
208209
}),
209210
],

0 commit comments

Comments
 (0)