We're using bun for the local runtime, so we'll need a bun init:
bun init
Then we can copy the followign code into index.ts:
import SQLite from 'bun:sqlite';
import sys | |
import os | |
import pathlib | |
PREFIX = os.getenv("CE_PREFIX", "environments/") | |
def main(): | |
""" Find the next environment path to switch to in the current IaC project. | |
Example: |
def determine_taskname(T): | |
""" | |
Find the string that is contained in every testcase | |
""" | |
i = 1 | |
exists_everywhere = True | |
while True: | |
min_taskname = T[0][0:i] | |
for task in T: | |
if min_taskname not in task: |