Skip to content

Commit 10a2017

Browse files
committed
[WIP] Shuffled around more stuff between Dockerfile & package.json
1 parent 34a2f96 commit 10a2017

File tree

4 files changed

+338
-25167
lines changed

4 files changed

+338
-25167
lines changed

.devcontainer/Dockerfile

Lines changed: 40 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
FROM node:22.15.0-bookworm
22

3-
WORKDIR /NebulaLogger
3+
ARG SF_CLI_VERSION=2.86.9
4+
ARG SF_LWC_JEST_VERSION=7.0.1
5+
# ARG PRETTIER_VERSION=3.5.3
6+
# ARG PRETTIER_PLUGIN_APEX_VERSION=2.2.5
7+
8+
# WORKDIR /workspaces/NebulaLogger
49

510
# Updates + locale setup
611
RUN apt-get update && \
@@ -13,29 +18,52 @@ ENV LANGUAGE=en_US:en
1318
ENV LC_ALL=en_US.UTF-8
1419

1520
# Set up npm dependencies (including sf CLI)
21+
# COPY package.json ./
22+
# COPY package-lock.json ./
23+
# COPY package*.json ./
24+
# RUN npm ci
1625

17-
COPY package.json ./
18-
COPY package-lock.json ./
19-
RUN npm ci
26+
# TODO new
27+
# RUN npm install --global @salesforce/cli@${SF_CLI_VERSION} \
28+
# && npm install --global @salesforce/sfdx-lwc-jest@${SF_LWC_JEST_VERSION} \
29+
# && npm install --global prettier@${PRETTIER_VERSION} \
30+
# && npm install --global prettier-plugin-apex@${PRETTIER_PLUGIN_APEX_VERSION}
31+
RUN npm install --global \
32+
@salesforce/cli@${SF_CLI_VERSION} \
33+
@salesforce/sfdx-lwc-jest@${SF_LWC_JEST_VERSION}
34+
# prettier@${PRETTIER_VERSION}
35+
# prettier-plugin-apex@${PRETTIER_PLUGIN_APEX_VERSION}
36+
# "@cparra/apexdocs": "1.13.7",
37+
# "@salesforce/cli": "^2.86.9",
38+
# "@salesforce/sfdx-lwc-jest": "^7.0.1",
39+
# "@types/jest-when": "^3.5.5",
40+
# "husky": "^9.1.7",
41+
# "jest-when": "^3.7.0",
42+
# "jsdoc-to-markdown": "^9.1.1",
43+
# "lint-staged": "^15.5.0",
44+
# "prettier": "^3.5.3",
45+
# "prettier-plugin-apex": "^2.2.5",
46+
# "pwsh": "^0.3.0"
2047

2148
# Now that the npm dependencies are installed locally via package.json, make global shortcuts for them
2249
# so they can be easily used within the devcontainer/VS Code.
23-
RUN ln -s /NebulaLogger/node_modules/.bin/prettier /usr/local/bin/prettier
24-
RUN ln -s /NebulaLogger/node_modules/.bin/sf /usr/local/bin/sf
50+
# RUN ln -s ./node_modules/.bin/prettier /usr/local/bin/prettier
51+
# RUN ln -s ./node_modules/.bin/sf /usr/local/bin/sf
2552
# sf CLI environment variables: https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_dev_cli_env_variables.htm
26-
ENV FORCE_SHOW_SPINNER=true
27-
ENV SF_DISABLE_AUTOUPDATE=true
28-
ENV SF_DISABLE_TELEMETRY=true
29-
ENV SF_LOG_LEVEL=debug
30-
ENV SF_SKIP_NEW_VERSION_CHECK=true
53+
ENV FORCE_SHOW_SPINNER=true \
54+
SF_DISABLE_AUTOUPDATE=true \
55+
SF_DISABLE_TELEMETRY=true \
56+
SF_LOG_LEVEL=debug \
57+
SF_SKIP_NEW_VERSION_CHECK=true
3158

3259
# Set up sf plugins
3360
RUN mkdir $HOME/.config && mkdir $HOME/.config/sf \
3461
# TODO revisit sf-trace-plugin install weirdness with @jamessimone
35-
&& echo '[ "@jongpie/sfdx-bummer-plugin", "jamessimone/sf-trace-plugin", "sf-trace-plugin" ]' > $HOME/.config/sf/unsignedPluginAllowList.json \
62+
&& echo '[ "@dx-cli-toolbox/sfdx-toolbox-package-utils", "@jongpie/sfdx-bummer-plugin", "jamessimone/sf-trace-plugin", "sf-trace-plugin" ]' > $HOME/.config/sf/unsignedPluginAllowList.json \
3663
&& sf plugins install code-analyzer \
3764
&& sf plugins install community \
3865
&& sf plugins install custom-metadata \
66+
&& sf plugins install @dx-cli-toolbox/sfdx-toolbox-package-utils \
3967
&& sf plugins install @jongpie/sfdx-bummer-plugin \
4068
# I am still not clear why this is needed, but echo y is still needed here.
4169
# Putting the plugin into the allow list (above) doesn't seem to work for some reason.

.devcontainer/devcontainer.json

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"context": "..",
44
"dockerFile": "Dockerfile",
55
"remoteUser": "root",
6-
"workspaceFolder": "/NebulaLogger",
7-
"postCreateCommand": "chmod +x scripts/dev/auto-log-fetcher.sh; chmod +x scripts/dev/devcontainer-post-start.sh",
6+
// "workspaceFolder": "/workspaces/NebulaLogger",
7+
"postCreateCommand": "npm ci; chmod +x scripts/dev/auto-fetch-logs.sh; chmod +x scripts/dev/devcontainer-post-start.sh",
88
"postStartCommand": "./scripts/dev/devcontainer-post-start.sh",
99
"mounts": [
1010
"source=nebula-logger-dev-npm-cache,target=/root/.npm,type=volume",
@@ -28,6 +28,7 @@
2828
},
2929
"files.autoSave": "onFocusChange",
3030
"files.trimTrailingWhitespace": true,
31+
"gitlens.telemetry.enabled": false,
3132
"gitlens.views.scm.grouped.views": {
3233
"branches": false,
3334
"commits": false,
@@ -40,14 +41,17 @@
4041
"tags": false,
4142
"worktrees": false
4243
},
44+
"prettier.prettierPath": "./node_modules/prettier",
4345
"salesforcedx-vscode-apex.java.home": "/root/.sdkman/candidates/java/current",
4446
"salesforcedx-vscode-core.show-cli-success-msg": false,
47+
"salesforcedx-vscode-core.telemetry.enabled": false,
48+
"telemetry.feedback.enabled": false,
4549
"terminal.integrated.defaultProfile.linux": "bash"
4650
},
4751
"extensions": [
4852
"albymor.increment-selection",
4953
"bibhasdn.unique-lines",
50-
"chuckjonas.apex-pmd",
54+
// "chuckjonas.apex-pmd",
5155
"dbaeumer.vscode-eslint",
5256
"eamodio.gitlens",
5357
"esbenp.prettier-vscode",
@@ -59,23 +63,23 @@
5963
"mechatroner.rainbow-csv",
6064
"mhutchie.git-graph",
6165
"modicatech.apex-code-coverage-visualizer",
62-
"ms-azuretools.vscode-docker",
63-
"ms-vscode-remote.remote-containers",
64-
"ms-vscode-remote.remote-wsl",
66+
// "ms-azuretools.vscode-docker",
67+
// "ms-vscode-remote.remote-containers",
68+
// "ms-vscode-remote.remote-wsl",
6569
"ms-vscode.sublime-keybindings",
6670
"redhat.vscode-xml",
6771
"redhat.vscode-yaml",
68-
"salesforce.salesforce-vscode-slds",
69-
"salesforce.salesforcedx-einstein-gpt",
70-
"salesforce.salesforcedx-vscode-apex-debugger",
71-
"salesforce.salesforcedx-vscode-apex-replay-debugger",
72-
"salesforce.salesforcedx-vscode-apex",
73-
"salesforce.salesforcedx-vscode-core",
74-
"salesforce.salesforcedx-vscode-expanded",
75-
"salesforce.salesforcedx-vscode-lightning",
76-
"salesforce.salesforcedx-vscode-lwc",
77-
"salesforce.salesforcedx-vscode-soql",
78-
"salesforce.salesforcedx-vscode-visualforce",
72+
// "salesforce.salesforce-vscode-slds",
73+
// "salesforce.salesforcedx-einstein-gpt",
74+
// "salesforce.salesforcedx-vscode-apex-debugger",
75+
// "salesforce.salesforcedx-vscode-apex-replay-debugger",
76+
// "salesforce.salesforcedx-vscode-apex",
77+
// "salesforce.salesforcedx-vscode-core",
78+
// "salesforce.salesforcedx-vscode-expanded",
79+
// "salesforce.salesforcedx-vscode-lightning",
80+
// "salesforce.salesforcedx-vscode-lwc",
81+
// "salesforce.salesforcedx-vscode-soql",
82+
// "salesforce.salesforcedx-vscode-visualforce",
7983
"salesforce.salesforcedx-vscode",
8084
"salesforce.sfdx-code-analyzer-vscode",
8185
"wmaurer.change-case"

0 commit comments

Comments
 (0)