@datacamp/learn-vm-scripts 0.0.1-rc.11 → 0.0.1-rc.13

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.
Files changed (2) hide show
  1. package/dist/index.cjs +9 -0
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -95429,6 +95429,14 @@ var handleInput = async ({
95429
95429
  console.error(source_default.red(`Error: ${error.message}`));
95430
95430
  }
95431
95431
  };
95432
+ var createFileIfNotExists = async (filePath) => {
95433
+ try {
95434
+ await fs6.access(filePath);
95435
+ } catch {
95436
+ const handle = await fs6.open(filePath, "w");
95437
+ await handle.close();
95438
+ }
95439
+ };
95432
95440
  var startInputWatcher = async ({
95433
95441
  inputFilePath,
95434
95442
  outputFilePath,
@@ -95436,6 +95444,7 @@ var startInputWatcher = async ({
95436
95444
  userDataDir
95437
95445
  }) => {
95438
95446
  const outputFileHandle = await fs6.open(outputFilePath, "a");
95447
+ await createFileIfNotExists(inputFilePath);
95439
95448
  for await (const event of fs6.watch(inputFilePath)) {
95440
95449
  if (event.eventType !== "change") {
95441
95450
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datacamp/learn-vm-scripts",
3
- "version": "0.0.1-rc.11",
3
+ "version": "0.0.1-rc.13",
4
4
  "repository": "git@github.com:datacamp-engineering/learn-vm-scripts.git",
5
5
  "description": "Scripts used by VMs in learn.",
6
6
  "main": "./dist/index.cjs",