Skip to content

Commit a227b25

Browse files
squash!
1 parent ecfdf79 commit a227b25

63 files changed

Lines changed: 914 additions & 791 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Source/constants.ts

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -51,84 +51,84 @@ export const CONSTANTS = {
5151
"Writing to COM port (GetOverlappedResult): Unknown error code 121",
5252
CPX_FILE_ERROR: localize(
5353
"error.cpxFileFormat",
54-
"The cpx.json file format is not correct."
54+
"The cpx.json file format is not correct.",
5555
),
5656
DEBUGGER_SERVER_INIT_FAILED: (port: number) => {
5757
return localize(
5858
"error.debuggerServerInitFailed",
59-
`Warning : The Debugger Server cannot be opened. Please try to free the port ${port} if it's already in use or select another one in your Settings 'Device Simulator Express: Debugger Server Port' and start another debug session.\n You can still debug your code but you won't be able to use the Simulator.`
59+
`Warning : The Debugger Server cannot be opened. Please try to free the port ${port} if it's already in use or select another one in your Settings 'Device Simulator Express: Debugger Server Port' and start another debug session.\n You can still debug your code but you won't be able to use the Simulator.`,
6060
);
6161
},
6262
DEBUGGING_SESSION_IN_PROGESS: localize(
6363
"error.debuggingSessionInProgress",
64-
"[ERROR] A debugging session is currently in progress, please stop it before running your code. \n"
64+
"[ERROR] A debugging session is currently in progress, please stop it before running your code. \n",
6565
),
6666
DEPENDENCY_DOWNLOAD_ERROR:
6767
"Dependency download could not be completed. Functionality may be limited. Please review the installation docs.",
6868

6969
FAILED_TO_OPEN_SERIAL_PORT: (port: string): string => {
7070
return localize(
7171
"error.failedToOpenSerialPort",
72-
`[ERROR] Failed to open serial port ${port}.`
72+
`[ERROR] Failed to open serial port ${port}.`,
7373
);
7474
},
7575
FAILED_TO_OPEN_SERIAL_PORT_DUE_TO: (port: string, error: any) => {
7676
return localize(
7777
"error.failedToOpenSerialPortDueTo",
78-
`[ERROR] Failed to open serial port ${port} due to error: ${error}. \n`
78+
`[ERROR] Failed to open serial port ${port} due to error: ${error}. \n`,
7979
);
8080
},
8181
INSTALLATION_ERROR: localize(
8282
"error.installationError",
83-
"Installation Error"
83+
"Installation Error",
8484
),
8585

8686
INVALID_FILE_EXTENSION_DEBUG: localize(
8787
"error.invalidFileExtensionDebug",
88-
"The file you tried to run isn't a Python file."
88+
"The file you tried to run isn't a Python file.",
8989
),
9090
INVALID_PYTHON_PATH: localize(
9191
"error.invalidPythonPath",
92-
'We found that your selected Python interpreter version is too low to run the extension. Please upgrade to version 3.7+ or select a different interpreter (CTRL+SHIFT+P and type "python.selectInterpreter") and restart the application.'
92+
'We found that your selected Python interpreter version is too low to run the extension. Please upgrade to version 3.7+ or select a different interpreter (CTRL+SHIFT+P and type "python.selectInterpreter") and restart the application.',
9393
),
9494
LOW_PYTHON_VERSION_FOR_MICROBIT_DEPLOYMENT: localize(
9595
"error.lowPythonVersionForMicrobitDeployment",
96-
"To deploy your code to the micro:bit, you must be using Python 3.3+"
96+
"To deploy your code to the micro:bit, you must be using Python 3.3+",
9797
),
9898
NO_DEVICE: localize(
9999
"error.noDevice",
100-
"The device is not detected. Please double check if your board is connected and/or properly formatted"
100+
"The device is not detected. Please double check if your board is connected and/or properly formatted",
101101
),
102102
NO_FILE_TO_RUN: localize(
103103
"error.noFileToRun",
104-
'[ERROR] We can\'t find a Python file to run. Please make sure you select or open a new ".py" code file, or use the "New File" command to get started and see useful links.\n'
104+
'[ERROR] We can\'t find a Python file to run. Please make sure you select or open a new ".py" code file, or use the "New File" command to get started and see useful links.\n',
105105
),
106106
NO_FILE_TO_DEPLOY: localize(
107107
"error.noFileToDeploy",
108-
"[ERROR] We can't find a Python file to deploy to your device.\n"
108+
"[ERROR] We can't find a Python file to deploy to your device.\n",
109109
),
110110
NO_FOLDER_OPENED: localize(
111111
"error.noFolderCreated",
112-
"In order to use the Serial Monitor, you need to open a folder and reload VS Code."
112+
"In order to use the Serial Monitor, you need to open a folder and reload VS Code.",
113113
),
114114
NO_PROGRAM_FOUND_DEBUG: localize(
115115
"error.noProgramFoundDebug",
116-
"Cannot find a program to debug."
116+
"Cannot find a program to debug.",
117117
),
118118
NO_PYTHON_PATH: localize(
119119
"error.noPythonPath",
120-
"We found that you don't have Python 3 installed on your computer, please install the latest version, add it to your PATH and try again."
120+
"We found that you don't have Python 3 installed on your computer, please install the latest version, add it to your PATH and try again.",
121121
),
122122
RECONNECT_DEVICE: localize(
123123
"error.reconnectDevice",
124-
"Please disconnect your Circuit Playground Express and try again."
124+
"Please disconnect your Circuit Playground Express and try again.",
125125
),
126126
STDERR: (data: string) => {
127127
return localize("error.stderr", `\n[ERROR] ${data} \n`);
128128
},
129129
UNEXPECTED_MESSAGE: localize(
130130
"error.unexpectedMessage",
131-
"Webview sent an unexpected message"
131+
"Webview sent an unexpected message",
132132
),
133133
},
134134
FILESYSTEM: {
@@ -141,124 +141,124 @@ export const CONSTANTS = {
141141
INFO: {
142142
ALREADY_SUCCESSFUL_INSTALL: localize(
143143
"info.successfulInstall",
144-
"Your current configuration is already successfully set up for the Device Simulator Expresss."
144+
"Your current configuration is already successfully set up for the Device Simulator Expresss.",
145145
),
146146
ARE_YOU_SURE: localize(
147147
"info.areYouSure",
148-
"Are you sure you don't want to install the dependencies? The extension can't run without installing them."
148+
"Are you sure you don't want to install the dependencies? The extension can't run without installing them.",
149149
),
150150
CLOSED_SERIAL_PORT: (port: string) => {
151151
return localize(
152152
"info.closedSerialPort",
153-
`[DONE] Closed the serial port - ${port} \n`
153+
`[DONE] Closed the serial port - ${port} \n`,
154154
);
155155
},
156156
COMPLETED_MESSAGE: "Completed",
157157
CPX_JSON_ALREADY_GENERATED: localize(
158158
"info.cpxJsonAlreadyGenerated",
159-
"cpx.json has already been generated."
159+
"cpx.json has already been generated.",
160160
),
161161
DEPLOY_DEVICE: localize(
162162
"info.deployDevice",
163-
"\n[INFO] Deploying code to the device...\n"
163+
"\n[INFO] Deploying code to the device...\n",
164164
),
165165
DEPLOY_SIMULATOR: localize(
166166
"info.deploySimulator",
167-
"\n[INFO] Deploying code to the simulator...\n"
167+
"\n[INFO] Deploying code to the simulator...\n",
168168
),
169169
DEPLOY_SUCCESS: localize(
170170
"info.deploySuccess",
171-
"\n[INFO] Code successfully copied! Your device should be loading and ready to go shortly.\n"
171+
"\n[INFO] Code successfully copied! Your device should be loading and ready to go shortly.\n",
172172
),
173173
EXTENSION_ACTIVATED: localize(
174174
"info.extensionActivated",
175-
"Congratulations, your extension Device Simulator Express is now active!"
175+
"Congratulations, your extension Device Simulator Express is now active!",
176176
),
177177
FILE_SELECTED: (filePath: string) => {
178178
return localize(
179179
"info.fileSelected",
180-
`[INFO] File selected : ${filePath} \n`
180+
`[INFO] File selected : ${filePath} \n`,
181181
);
182182
},
183183
FIRST_TIME_WEBVIEW: localize(
184184
"info.firstTimeWebview",
185-
'To reopen the simulator select the command "Open Simulator" from command palette.'
185+
'To reopen the simulator select the command "Open Simulator" from command palette.',
186186
),
187187
INSTALLING_PYTHON_VENV: localize(
188188
"info.installingPythonVenv",
189-
"A virtual environment is currently being created. The required Python packages will be installed. You will be prompted a message telling you when the installation is done."
189+
"A virtual environment is currently being created. The required Python packages will be installed. You will be prompted a message telling you when the installation is done.",
190190
),
191191
INSTALL_PYTHON_DEPS: localize(
192192
"info.installPythonDependencies",
193-
"Do you want us to try and install this extension's dependencies on your selected Python interpreter for you?"
193+
"Do you want us to try and install this extension's dependencies on your selected Python interpreter for you?",
194194
),
195195
INSTALL_PYTHON_VENV: localize(
196196
"info.installPythonVenv",
197-
"Do you want us to try and install this extension's dependencies via virtual environment for you?"
197+
"Do you want us to try and install this extension's dependencies via virtual environment for you?",
198198
),
199199
NEW_FILE: localize(
200200
"info.newFile",
201-
"New to Python or the Circuit Playground Express? We are here to help!"
201+
"New to Python or the Circuit Playground Express? We are here to help!",
202202
),
203203
NO_DEVICE_CHOSEN_TO_DEPLOY_TO: localize(
204204
"info.noDeviceChosenToDeployTo",
205-
"\n[INFO] No device was selected to deploy to.\n"
205+
"\n[INFO] No device was selected to deploy to.\n",
206206
),
207207
NO_DEVICE_CHOSEN_TO_SIMULATE_TO: localize(
208208
"info.noDeviceChosenToSimulateTo",
209-
"\n[INFO] No device was selected to simulate.\n"
209+
"\n[INFO] No device was selected to simulate.\n",
210210
),
211211
NO_DEVICE_CHOSEN_FOR_NEW_FILE: localize(
212212
"info.noDeviceChosenForNewFile",
213-
"\n[INFO] No device was selected to open a template file for.\n"
213+
"\n[INFO] No device was selected to open a template file for.\n",
214214
),
215215
OPENED_SERIAL_PORT: (port: string) => {
216216
return localize(
217217
"info.openedSerialPort",
218-
`[INFO] Opened the serial port - ${port} \n`
218+
`[INFO] Opened the serial port - ${port} \n`,
219219
);
220220
},
221221
OPENING_SERIAL_PORT: (port: string) => {
222222
return localize(
223223
"info.openingSerialPort",
224-
`[STARTING] Opening the serial port - ${port} \n`
224+
`[STARTING] Opening the serial port - ${port} \n`,
225225
);
226226
},
227227
PLEASE_OPEN_FOLDER: localize(
228228
"info.pleaseOpenFolder",
229-
"Please open a folder first."
229+
"Please open a folder first.",
230230
),
231231
REDIRECT: localize("info.redirect", "You are being redirected."),
232232
RUNNING_CODE: localize("info.runningCode", "Running user code"),
233233
SUCCESSFUL_INSTALL: localize(
234234
"info.successfulInstall",
235-
"Successfully set up the Python environment."
235+
"Successfully set up the Python environment.",
236236
),
237237
THIRD_PARTY_WEBSITE_ADAFRUIT: localize(
238238
"info.thirdPartyWebsiteAdafruit",
239-
'By clicking "Agree and Proceed" you will be redirected to adafruit.com, a third party website not managed by Microsoft. Please note that your activity on adafruit.com is subject to Adafruit\'s privacy policy'
239+
'By clicking "Agree and Proceed" you will be redirected to adafruit.com, a third party website not managed by Microsoft. Please note that your activity on adafruit.com is subject to Adafruit\'s privacy policy',
240240
),
241241
THIRD_PARTY_WEBSITE_PIP: localize(
242242
"info.thirdPartyWebsitePip",
243-
'By clicking "Agree and Proceed" you will be redirected to pip.pypa.io, a third party website not managed by Microsoft. Please note that your activity on pip.pypa.io is subject to PyPA\'s privacy policy'
243+
'By clicking "Agree and Proceed" you will be redirected to pip.pypa.io, a third party website not managed by Microsoft. Please note that your activity on pip.pypa.io is subject to PyPA\'s privacy policy',
244244
),
245245
THIRD_PARTY_WEBSITE_PYTHON: localize(
246246
"info.thirdPartyWebsitePython",
247-
'By clicking "Agree and Proceed" you will be redirected to python.org, a third party website not managed by Microsoft. Please note that your activity on python.org is subject to Python\'s privacy policy'
247+
'By clicking "Agree and Proceed" you will be redirected to python.org, a third party website not managed by Microsoft. Please note that your activity on python.org is subject to Python\'s privacy policy',
248248
),
249249
UPDATED_TO_EXTENSION_VENV: localize(
250250
"info.updatedToExtensionsVenv",
251-
"Automatically updated interpreter to point to extension's virtual environment."
251+
"Automatically updated interpreter to point to extension's virtual environment.",
252252
),
253253
WELCOME_OUTPUT_TAB: localize(
254254
"info.welcomeOutputTab",
255-
"Welcome to the Device Simulator Express output tab!\n\n"
255+
"Welcome to the Device Simulator Express output tab!\n\n",
256256
),
257257
},
258258
LABEL: {
259259
WEBVIEW_PANEL: localize(
260260
"label.webviewPanel",
261-
"Device Simulator Express"
261+
"Device Simulator Express",
262262
),
263263
},
264264
LINKS: {
@@ -278,15 +278,15 @@ export const CONSTANTS = {
278278
MISC: {
279279
SELECT_PORT_PLACEHOLDER: localize(
280280
"misc.selectPortPlaceholder",
281-
"Select a serial port"
281+
"Select a serial port",
282282
),
283283
SERIAL_MONITOR_NAME: localize(
284284
"misc.serialMonitorName",
285-
"Device Simulator Express Serial Monitor"
285+
"Device Simulator Express Serial Monitor",
286286
),
287287
SERIAL_MONITOR_TEST_IF_OPEN: localize(
288288
"misc.testIfPortOpen",
289-
"Test if serial port is open"
289+
"Test if serial port is open",
290290
),
291291
},
292292
NAME: localize("name", "Device Simulator Express"),
@@ -298,33 +298,33 @@ export const CONSTANTS = {
298298
WARNING: {
299299
ACCEPT_AND_RUN: localize(
300300
"warning.agreeAndRun",
301-
"By selecting ‘Agree and Run’, you understand the extension executes Python code on your local computer, which may be a potential security risk."
301+
"By selecting ‘Agree and Run’, you understand the extension executes Python code on your local computer, which may be a potential security risk.",
302302
),
303303
INVALID_BAUD_RATE: localize(
304304
"warning.invalidBaudRate",
305-
"Invalid baud rate, keep baud rate unchanged."
305+
"Invalid baud rate, keep baud rate unchanged.",
306306
),
307307
NO_RATE_SELECTED: localize(
308308
"warning.noRateSelected",
309-
"No rate is selected, keep baud rate unchanged."
309+
"No rate is selected, keep baud rate unchanged.",
310310
),
311311
NO_SERIAL_PORT_SELECTED: localize(
312312
"warning.noSerialPortSelected",
313-
"No serial port was selected, please select a serial port first"
313+
"No serial port was selected, please select a serial port first",
314314
),
315315
SERIAL_MONITOR_ALREADY_OPENED: (port: string) => {
316316
return localize(
317317
"warning.serialMonitorAlreadyOpened",
318-
`Serial monitor is already opened for ${port} \n`
318+
`Serial monitor is already opened for ${port} \n`,
319319
);
320320
},
321321
SERIAL_MONITOR_NOT_STARTED: localize(
322322
"warning.serialMonitorNotStarted",
323-
"Serial monitor has not been started."
323+
"Serial monitor has not been started.",
324324
),
325325
SERIAL_PORT_NOT_STARTED: localize(
326326
"warning.serialPortNotStarted",
327-
"Serial port has not been started.\n"
327+
"Serial port has not been started.\n",
328328
),
329329
},
330330
};
@@ -494,7 +494,7 @@ export namespace DialogResponses {
494494
export const EXAMPLE_CODE: MessageItem = {
495495
title: localize(
496496
"dialogResponses.exampleCode",
497-
"Example Code on GitHub"
497+
"Example Code on GitHub",
498498
),
499499
};
500500
export const MESSAGE_UNDERSTOOD: MessageItem = {
@@ -503,13 +503,13 @@ export namespace DialogResponses {
503503
export const INSTALL_PIP: MessageItem = {
504504
title: localize(
505505
"dialogResponses.installPip",
506-
"Install from Pip's webpage"
506+
"Install from Pip's webpage",
507507
),
508508
};
509509
export const INSTALL_PYTHON: MessageItem = {
510510
title: localize(
511511
"dialogResponses.installPython",
512-
"Install from python.org"
512+
"Install from python.org",
513513
),
514514
};
515515
export const YES: MessageItem = {
@@ -518,7 +518,7 @@ export namespace DialogResponses {
518518
export const READ_INSTALL_MD: MessageItem = {
519519
title: localize(
520520
"dialogResponses.readInstall",
521-
"Read installation docs"
521+
"Read installation docs",
522522
),
523523
};
524524
}

Source/cpxWorkspace.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class CPXWorkspace {
1414
const cpxConfigPath = path.join(
1515
workspaceFolderPath,
1616
".vscode",
17-
"cpx.json"
17+
"cpx.json",
1818
);
1919
if (fs.existsSync(cpxConfigPath)) {
2020
return workspaceFolderPath;

Source/debugger/debugAdapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class DebugAdapter implements DebugAdapterTracker {
1010
constructor(
1111
debugSession: DebugSession,
1212
messagingService: MessagingService,
13-
debugCommunicationService: DebuggerCommunicationService
13+
debugCommunicationService: DebuggerCommunicationService,
1414
) {
1515
this.console = debugSession.configuration.console;
1616
this.messagingService = messagingService;

Source/debugger/debugAdapterFactory.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ export class DebugAdapterFactory implements DebugAdapterTrackerFactory {
1515
constructor(
1616
debugSession: DebugSession,
1717
messagingService: MessagingService,
18-
debugCommunicationService: DebuggerCommunicationService
18+
debugCommunicationService: DebuggerCommunicationService,
1919
) {
2020
this.debugSession = debugSession;
2121
this.messagingService = messagingService;
2222
this.debugCommunicationService = debugCommunicationService;
2323
}
2424
public createDebugAdapterTracker(
25-
session: DebugSession
25+
session: DebugSession,
2626
): ProviderResult<DebugAdapterTracker> {
2727
return new DebugAdapter(
2828
session,
2929
this.messagingService,
30-
this.debugCommunicationService
30+
this.debugCommunicationService,
3131
);
3232
}
3333
}

0 commit comments

Comments
 (0)