diff --git a/backend/src/handlers/CreateAuthToken/index.ts b/backend/src/handlers/CreateAuthToken/index.ts index fe156d5..3034dbe 100644 --- a/backend/src/handlers/CreateAuthToken/index.ts +++ b/backend/src/handlers/CreateAuthToken/index.ts @@ -3,6 +3,7 @@ import { APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda'; // eslint-disable-next-line @typescript-eslint/no-unused-vars export const handler = async (_event: APIGatewayProxyEvent): Promise => { const message = "This system does not support authentication."; + console.log(message); return { statusCode: 501, headers: { diff --git a/backend/src/handlers/CreateIndex/index.ts b/backend/src/handlers/CreateIndex/index.ts index 3e66f8b..bc49877 100644 --- a/backend/src/handlers/CreateIndex/index.ts +++ b/backend/src/handlers/CreateIndex/index.ts @@ -44,6 +44,7 @@ export const handler = async (event: LambdaEvent, context: Context) => { let exists = await checkIndexExists(domainEndpoint, indexName); if (!exists) { + console.log(`Index '${indexName}' does not exist. Creating...`); await createIndex(domainEndpoint, indexName); } else { console.log(`Index '${indexName}' already exists. Skipping creation.`); @@ -54,6 +55,7 @@ export const handler = async (event: LambdaEvent, context: Context) => { exists = await checkIndexExists(domainEndpoint, indexName); if (!exists) { + console.log(`Index '${indexName}' does not exist. Creating...`); await createIndex(domainEndpoint, indexName); } else { console.log(`Index '${indexName}' already exists. Skipping creation.`); @@ -73,6 +75,7 @@ export const handler = async (event: LambdaEvent, context: Context) => { // Send response to CloudFormation await sendCloudFormationResponse(event.ResponseURL, response); + console.log("Create index operation complete."); }; interface CloudFormationResponse { diff --git a/backend/src/handlers/GetCost/event.json b/backend/src/handlers/GetCost/event.json index cfddcd5..bfeca54 100644 --- a/backend/src/handlers/GetCost/event.json +++ b/backend/src/handlers/GetCost/event.json @@ -1,6 +1,6 @@ { "pathParameters": { - "id": "HQr6s53GdhTKyF9hF0zx" + "id": "C5p7p5HW-qfT9VQPF_2A" }, "queryStringParameters": { "dependency": "true" diff --git a/backend/src/handlers/GetCost/index.ts b/backend/src/handlers/GetCost/index.ts index 221b3a7..a2f8223 100644 --- a/backend/src/handlers/GetCost/index.ts +++ b/backend/src/handlers/GetCost/index.ts @@ -55,6 +55,7 @@ export const handler = async (event: APIGatewayProxyEvent): Promise => { try { const plannedTracks: string[] = ["ML inside track"]; + console.log("Retrieved the student's track information."); return { statusCode: 200, headers: { @@ -14,6 +15,7 @@ export const handler = async (_event: APIGatewayProxyEvent): Promise 1000) { + console.error(`Unsafe quantifier range detected: {${min},${max}}`); + return true; + } + } + + return false; // Regex is safe +} + async function searchReadmes( domainEndpoint: string, indexName: string, diff --git a/backend/src/handlers/PackageCreate/circular1.json b/backend/src/handlers/PackageCreate/circular1.json new file mode 100644 index 0000000..33f3037 --- /dev/null +++ b/backend/src/handlers/PackageCreate/circular1.json @@ -0,0 +1,20 @@ +{ + "body": { + "Name": "circular1", + "Content": "UEsDBBQAAAAAAG9whVkAAAAAAAAAAAAAAAAQACAAY2lyY3VsYXIxLTEuMC4wL1VUDQAHAvlRZ875UWfi+FFndXgLAAEEAAAAAAQAAAAAUEsDBBQACAAIAJdwhVkAAAAAAAAAACQBAAAcACAAY2lyY3VsYXIxLTEuMC4wL3BhY2thZ2UuanNvblVUDQAHTvlRZ075UWcC+VFndXgLAAEEAAAAAAQAAAAATY8xD4IwEIV3Ev7DpQOTIeDIZoyDs44sTTnlFNqmLYbE8N9tS0XHe9+9u/feeQbAJB+RNcAEGTEN3NRsF/UXGktKBlSXVVkluUMrDGmX0BWtA83Fk98xbYycIiLZ4Vw+bJJXm/Uk/vWK896wiKJX0LKTMco0IBUEAFajoBth1zIoCsCZHNQsWJf1IJ9cr8wW4rCOKxtIoLSx1/ly3KJr9JmkIPyP8S2+/1WNX/JsybMPUEsHCAuoi1+xAAAAJAEAAFBLAwQUAAgACAB5cIVZAAAAAAAAAAAzAAAAGQAgAGNpcmN1bGFyMS0xLjAuMC9SRUFETUUubWRVVA0ABxb5UWcW+VFnAvlRZ3V4CwABBAAAAAAEAAAAAAtydXTxdVVIy8xJVUjLL1JIzixKLs1JLFJISS1IzUtJzUuuVDBSKEstKs7Mz1Mw1DPQMwAAUEsHCF/kfYg1AAAAMwAAAFBLAQIUAxQAAAAAAG9whVkAAAAAAAAAAAAAAAAQACAAAAAAAAAAAAD/QQAAAABjaXJjdWxhcjEtMS4wLjAvVVQNAAcC+VFnzvlRZ+L4UWd1eAsAAQQAAAAABAAAAABQSwECFAMUAAgACACXcIVZC6iLX7EAAAAkAQAAHAAgAAAAAAAAAAAAtoFOAAAAY2lyY3VsYXIxLTEuMC4wL3BhY2thZ2UuanNvblVUDQAHTvlRZ075UWcC+VFndXgLAAEEAAAAAAQAAAAAUEsBAhQDFAAIAAgAeXCFWV/kfYg1AAAAMwAAABkAIAAAAAAAAAAAALaBaQEAAGNpcmN1bGFyMS0xLjAuMC9SRUFETUUubWRVVA0ABxb5UWcW+VFnAvlRZ3V4CwABBAAAAAAEAAAAAFBLBQYAAAAAAwADAC8BAAAFAgAAAAA=", + "JSProgram": "if (process.argv.length === 7) { console.log('Success'); process.exit(0); } else { console.log('Failed'); process.exit(1); }", + "debloat": true + }, + "httpMethod": "POST", + "headers": { + "Content-Type": "application/json" + }, + "pathParameters": null, + "queryStringParameters": null, + "requestContext": { + "requestId": "test-request-id", + "httpMethod": "POST", + "resourcePath": "/package" + } + } + \ No newline at end of file diff --git a/backend/src/handlers/PackageCreate/circular2.json b/backend/src/handlers/PackageCreate/circular2.json new file mode 100644 index 0000000..35794f0 --- /dev/null +++ b/backend/src/handlers/PackageCreate/circular2.json @@ -0,0 +1,20 @@ +{ + "body": { + "Name": "circular2", + "Content": "UEsDBBQAAAAAAG5whVkAAAAAAAAAAAAAAAAQACAAY2lyY3VsYXIyLTEuMC4wL1VUDQAHAflRZ9j5UWf4+FFndXgLAAEEAAAAAAQAAAAAUEsDBBQACAAIAJtwhVkAAAAAAAAAACQBAAAcACAAY2lyY3VsYXIyLTEuMC4wL3BhY2thZ2UuanNvblVUDQAHVvlRZ1b5UWcB+VFndXgLAAEEAAAAAAQAAAAATY8xD4IwEIV3Ev7DpQOTIeDIZoyDs44sTTnlFNqmLYbE8N9tS0XHe9+9u/feeQbAJB+RNcAEGTEN3OzZLuovNJaUDKguq7JKcodWGNIuoStaB5qLJ79j2hg5RUSyw7l82CSvNutJ/OsV571hEUWvoGUnY5RpQCoIAKxGQTfCrmVQFIAzOahZsC7rQT65XpktxGEdVzaQQGljr/PluEXX6DNJQfgf41u8/lWNX/JsybMPUEsHCG+FnauxAAAAJAEAAFBLAwQUAAgACAB0cIVZAAAAAAAAAAAzAAAAGQAgAGNpcmN1bGFyMi0xLjAuMC9SRUFETUUubWRVVA0ABw35UWcO+VFnAflRZ3V4CwABBAAAAAAEAAAAAAtydXTxdVVIy8xJVUjLL1JIzixKLs1JLFJISS1IzUtJzUuuVDBUKEstKs7Mz1Mw1DPQMwAAUEsHCCaOAJk1AAAAMwAAAFBLAQIUAxQAAAAAAG5whVkAAAAAAAAAAAAAAAAQACAAAAAAAAAAAAD/QQAAAABjaXJjdWxhcjItMS4wLjAvVVQNAAcB+VFn2PlRZ/j4UWd1eAsAAQQAAAAABAAAAABQSwECFAMUAAgACACbcIVZb4Wdq7EAAAAkAQAAHAAgAAAAAAAAAAAAtoFOAAAAY2lyY3VsYXIyLTEuMC4wL3BhY2thZ2UuanNvblVUDQAHVvlRZ1b5UWcB+VFndXgLAAEEAAAAAAQAAAAAUEsBAhQDFAAIAAgAdHCFWSaOAJk1AAAAMwAAABkAIAAAAAAAAAAAALaBaQEAAGNpcmN1bGFyMi0xLjAuMC9SRUFETUUubWRVVA0ABw35UWcO+VFnAflRZ3V4CwABBAAAAAAEAAAAAFBLBQYAAAAAAwADAC8BAAAFAgAAAAA=", + "JSProgram": "if (process.argv.length === 7) { console.log('Success'); process.exit(0); } else { console.log('Failed'); process.exit(1); }", + "debloat": true + }, + "httpMethod": "POST", + "headers": { + "Content-Type": "application/json" + }, + "pathParameters": null, + "queryStringParameters": null, + "requestContext": { + "requestId": "test-request-id", + "httpMethod": "POST", + "resourcePath": "/package" + } + } + \ No newline at end of file diff --git a/backend/src/handlers/PackageDelete/index.ts b/backend/src/handlers/PackageDelete/index.ts index 2681b27..d140b10 100644 --- a/backend/src/handlers/PackageDelete/index.ts +++ b/backend/src/handlers/PackageDelete/index.ts @@ -33,11 +33,15 @@ export const handler = async (event: APIGatewayProxyEvent): Promise isNaN(num) || num < 0 ) ) { + console.error('Invalid version number format.'); throw new Error("Invalid version number format."); } diff --git a/backend/src/handlers/RegistryReset/index.ts b/backend/src/handlers/RegistryReset/index.ts index c7954a3..c3df6f1 100644 --- a/backend/src/handlers/RegistryReset/index.ts +++ b/backend/src/handlers/RegistryReset/index.ts @@ -32,6 +32,7 @@ export const handler: APIGatewayProxyHandler = async () => { const bucket = getEnvVariable("S3_BUCKET_NAME"); const domain = getEnvVariable("DOMAIN_ENDPOINT"); + console.log("Clearing resources..."); // Perform all operations concurrently await Promise.all([ clearDynamoDBTable(dynamoDBClient, table1, (item) => ({ ID: item.ID })), @@ -47,7 +48,7 @@ export const handler: APIGatewayProxyHandler = async () => { await createIndex(domain, "readmes"); await createIndex(domain, "packagejsons"); - console.log("Indices created successfully."); + console.log("Indices recreated successfully."); return { statusCode: 200, diff --git a/backend/src/handlers/__tests__/end_to_end/getCost.test.ts b/backend/src/handlers/__tests__/end_to_end/getCost.test.ts index 86bf4ac..610b259 100644 --- a/backend/src/handlers/__tests__/end_to_end/getCost.test.ts +++ b/backend/src/handlers/__tests__/end_to_end/getCost.test.ts @@ -8,6 +8,8 @@ const timeout = 30000; describe("E2E Test for Get Cost Endpoint", () => { let yazl_id: string; let buffer_crc32_id: string; + let circular1_id: string; + let circular2_id: string; beforeAll(async () => { // Reset the registry before running the tests await axios.delete(`${baseUrl}/reset`); @@ -36,6 +38,24 @@ describe("E2E Test for Get Cost Endpoint", () => { // Get the ID of the uploaded package buffer_crc32_id = response2.data.metadata.ID; + // Upload circular1 to the registry + const requestBody3: PackageData = { + Name: "circular1", + Content: "UEsDBBQAAAAAAG9whVkAAAAAAAAAAAAAAAAQACAAY2lyY3VsYXIxLTEuMC4wL1VUDQAHAvlRZ875UWfi+FFndXgLAAEEAAAAAAQAAAAAUEsDBBQACAAIAJdwhVkAAAAAAAAAACQBAAAcACAAY2lyY3VsYXIxLTEuMC4wL3BhY2thZ2UuanNvblVUDQAHTvlRZ075UWcC+VFndXgLAAEEAAAAAAQAAAAATY8xD4IwEIV3Ev7DpQOTIeDIZoyDs44sTTnlFNqmLYbE8N9tS0XHe9+9u/feeQbAJB+RNcAEGTEN3NRsF/UXGktKBlSXVVkluUMrDGmX0BWtA83Fk98xbYycIiLZ4Vw+bJJXm/Uk/vWK896wiKJX0LKTMco0IBUEAFajoBth1zIoCsCZHNQsWJf1IJ9cr8wW4rCOKxtIoLSx1/ly3KJr9JmkIPyP8S2+/1WNX/JsybMPUEsHCAuoi1+xAAAAJAEAAFBLAwQUAAgACAB5cIVZAAAAAAAAAAAzAAAAGQAgAGNpcmN1bGFyMS0xLjAuMC9SRUFETUUubWRVVA0ABxb5UWcW+VFnAvlRZ3V4CwABBAAAAAAEAAAAAAtydXTxdVVIy8xJVUjLL1JIzixKLs1JLFJISS1IzUtJzUuuVDBSKEstKs7Mz1Mw1DPQMwAAUEsHCF/kfYg1AAAAMwAAAFBLAQIUAxQAAAAAAG9whVkAAAAAAAAAAAAAAAAQACAAAAAAAAAAAAD/QQAAAABjaXJjdWxhcjEtMS4wLjAvVVQNAAcC+VFnzvlRZ+L4UWd1eAsAAQQAAAAABAAAAABQSwECFAMUAAgACACXcIVZC6iLX7EAAAAkAQAAHAAgAAAAAAAAAAAAtoFOAAAAY2lyY3VsYXIxLTEuMC4wL3BhY2thZ2UuanNvblVUDQAHTvlRZ075UWcC+VFndXgLAAEEAAAAAAQAAAAAUEsBAhQDFAAIAAgAeXCFWV/kfYg1AAAAMwAAABkAIAAAAAAAAAAAALaBaQEAAGNpcmN1bGFyMS0xLjAuMC9SRUFETUUubWRVVA0ABxb5UWcW+VFnAvlRZ3V4CwABBAAAAAAEAAAAAFBLBQYAAAAAAwADAC8BAAAFAgAAAAA=", + debloat: false, + }; + const response3 = await axios.post(`${baseUrl}/package`, requestBody3); + circular1_id = response3.data.metadata.ID; + + // Upload circular2 to the registry + const requestBody4: PackageData = { + Name: "circular2", + Content: "UEsDBBQAAAAAAG5whVkAAAAAAAAAAAAAAAAQACAAY2lyY3VsYXIyLTEuMC4wL1VUDQAHAflRZ9j5UWf4+FFndXgLAAEEAAAAAAQAAAAAUEsDBBQACAAIAJtwhVkAAAAAAAAAACQBAAAcACAAY2lyY3VsYXIyLTEuMC4wL3BhY2thZ2UuanNvblVUDQAHVvlRZ1b5UWcB+VFndXgLAAEEAAAAAAQAAAAATY8xD4IwEIV3Ev7DpQOTIeDIZoyDs44sTTnlFNqmLYbE8N9tS0XHe9+9u/feeQbAJB+RNcAEGTEN3OzZLuovNJaUDKguq7JKcodWGNIuoStaB5qLJ79j2hg5RUSyw7l82CSvNutJ/OsV571hEUWvoGUnY5RpQCoIAKxGQTfCrmVQFIAzOahZsC7rQT65XpktxGEdVzaQQGljr/PluEXX6DNJQfgf41u8/lWNX/JsybMPUEsHCG+FnauxAAAAJAEAAFBLAwQUAAgACAB0cIVZAAAAAAAAAAAzAAAAGQAgAGNpcmN1bGFyMi0xLjAuMC9SRUFETUUubWRVVA0ABw35UWcO+VFnAflRZ3V4CwABBAAAAAAEAAAAAAtydXTxdVVIy8xJVUjLL1JIzixKLs1JLFJISS1IzUtJzUuuVDBUKEstKs7Mz1Mw1DPQMwAAUEsHCCaOAJk1AAAAMwAAAFBLAQIUAxQAAAAAAG5whVkAAAAAAAAAAAAAAAAQACAAAAAAAAAAAAD/QQAAAABjaXJjdWxhcjItMS4wLjAvVVQNAAcB+VFn2PlRZ/j4UWd1eAsAAQQAAAAABAAAAABQSwECFAMUAAgACACbcIVZb4Wdq7EAAAAkAQAAHAAgAAAAAAAAAAAAtoFOAAAAY2lyY3VsYXIyLTEuMC4wL3BhY2thZ2UuanNvblVUDQAHVvlRZ1b5UWcB+VFndXgLAAEEAAAAAAQAAAAAUEsBAhQDFAAIAAgAdHCFWSaOAJk1AAAAMwAAABkAIAAAAAAAAAAAALaBaQEAAGNpcmN1bGFyMi0xLjAuMC9SRUFETUUubWRVVA0ABw35UWcO+VFnAflRZ3V4CwABBAAAAAAEAAAAAFBLBQYAAAAAAwADAC8BAAAFAgAAAAA=", + debloat: false, + }; + const response4 = await axios.post(`${baseUrl}/package`, requestBody4); + circular2_id = response4.data.metadata.ID; + }, 90000); afterAll(async () => { // Reset the registry after running the tests @@ -65,6 +85,19 @@ describe("E2E Test for Get Cost Endpoint", () => { expect(cost[buffer_crc32_id].totalCost).toBeGreaterThan(0); }, timeout); + + it("should handle circular dependencies", async () => { + const response = await axios.get(`${baseUrl}/package/${circular1_id}/cost?dependency=true`); + expect(response.status).toBe(200); + + const cost: PackageCost = response.data; + expect(cost).not.toBeNull(); + expect(cost[circular1_id].standaloneCost).toBeGreaterThan(0); + expect(cost[circular1_id].totalCost).toBeGreaterThan(0); + expect(cost[circular2_id].standaloneCost).toBeGreaterThan(0); + expect(cost[circular2_id].totalCost).toBeGreaterThan(0); + + }, timeout); it("should return a 404 status if the package does not exist", async () => { try { diff --git a/backend/src/handlers/__tests__/end_to_end/packageByRegex.test.ts b/backend/src/handlers/__tests__/end_to_end/packageByRegex.test.ts index ea00678..9280f7f 100644 --- a/backend/src/handlers/__tests__/end_to_end/packageByRegex.test.ts +++ b/backend/src/handlers/__tests__/end_to_end/packageByRegex.test.ts @@ -62,14 +62,44 @@ describe("E2E Test for PackageByRegEx Endpoint", () => { }, timeout); - it ("should return a 200 status for this regex", async () => { + it ("should return a 400 status for this regex", async () => { const requestBody: PackageRegEx = { - RegEx: ".*(e|ee).*" + RegEx: "(a{1,99999}){1,99999}$" }; - const response = await axios.post(`${baseUrl}/package/byRegEx`, requestBody); - console.log(response.data); - expect(response.status).toBe(200); + try { + await axios.post(`${baseUrl}/package/byRegEx`, requestBody); + } catch (error) { + if (!axios.isAxiosError(error)) { + throw error; + } + + const response = error.response; + if (!response) { + throw error; + } + expect(response.status).toBe(400); + } + }, timeout); + + it ("should return a 404 status for this regex", async () => { + const requestBody: PackageRegEx = { + RegEx: "(a|aa)*$" + }; + + try { + await axios.post(`${baseUrl}/package/byRegEx`, requestBody); + } catch (error) { + if (!axios.isAxiosError(error)) { + throw error; + } + + const response = error.response; + if (!response) { + throw error; + } + expect(response.status).toBe(404); + } }, timeout); it("should return a 400 status for an invalid regex", async () => { diff --git a/backend/template.yml b/backend/template.yml index 03b1894..8c56be5 100644 --- a/backend/template.yml +++ b/backend/template.yml @@ -48,6 +48,7 @@ Resources: - sts:AssumeRole ManagedPolicyArns: # Attach AWS Managed Policies - arn:aws:iam::aws:policy/AmazonOpenSearchServiceFullAccess + - arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole CreateIndex: Type: AWS::Serverless::Function @@ -85,6 +86,7 @@ Resources: - arn:aws:iam::aws:policy/AmazonS3FullAccess - arn:aws:iam::aws:policy/AmazonOpenSearchServiceFullAccess - arn:aws:iam::aws:policy/SecretsManagerReadWrite + - arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole DependenciesLayer: Type: AWS::Serverless::LayerVersion @@ -179,6 +181,8 @@ Resources: - arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess - arn:aws:iam::aws:policy/AmazonS3FullAccess - arn:aws:iam::aws:policy/AmazonOpenSearchServiceFullAccess + - arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + RegistryReset: Type: AWS::Serverless::Function @@ -272,6 +276,7 @@ Resources: - arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess - arn:aws:iam::aws:policy/AmazonS3FullAccess - arn:aws:iam::aws:policy/AmazonOpenSearchServiceFullAccess + - arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole PackageDelete: Type: AWS::Serverless::Function @@ -356,6 +361,7 @@ Resources: ManagedPolicyArns: # Attach AWS Managed Policies - arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess - arn:aws:iam::aws:policy/AmazonOpenSearchServiceFullAccess + - arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole GetCost: Type: AWS::Serverless::Function @@ -435,6 +441,7 @@ Resources: ManagedPolicyArns: # Attach AWS Managed Policies - arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess - arn:aws:iam::aws:policy/AmazonOpenSearchServiceFullAccess + - arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole PackageByRegEx: Type: AWS::Serverless::Function diff --git a/backend/test_zip_files/circular1-1.0.0-string.txt b/backend/test_zip_files/circular1-1.0.0-string.txt new file mode 100644 index 0000000..c6bc77c --- /dev/null +++ b/backend/test_zip_files/circular1-1.0.0-string.txt @@ -0,0 +1 @@ +UEsDBBQAAAAAAG9whVkAAAAAAAAAAAAAAAAQACAAY2lyY3VsYXIxLTEuMC4wL1VUDQAHAvlRZ875UWfi+FFndXgLAAEEAAAAAAQAAAAAUEsDBBQACAAIAJdwhVkAAAAAAAAAACQBAAAcACAAY2lyY3VsYXIxLTEuMC4wL3BhY2thZ2UuanNvblVUDQAHTvlRZ075UWcC+VFndXgLAAEEAAAAAAQAAAAATY8xD4IwEIV3Ev7DpQOTIeDIZoyDs44sTTnlFNqmLYbE8N9tS0XHe9+9u/feeQbAJB+RNcAEGTEN3NRsF/UXGktKBlSXVVkluUMrDGmX0BWtA83Fk98xbYycIiLZ4Vw+bJJXm/Uk/vWK896wiKJX0LKTMco0IBUEAFajoBth1zIoCsCZHNQsWJf1IJ9cr8wW4rCOKxtIoLSx1/ly3KJr9JmkIPyP8S2+/1WNX/JsybMPUEsHCAuoi1+xAAAAJAEAAFBLAwQUAAgACAB5cIVZAAAAAAAAAAAzAAAAGQAgAGNpcmN1bGFyMS0xLjAuMC9SRUFETUUubWRVVA0ABxb5UWcW+VFnAvlRZ3V4CwABBAAAAAAEAAAAAAtydXTxdVVIy8xJVUjLL1JIzixKLs1JLFJISS1IzUtJzUuuVDBSKEstKs7Mz1Mw1DPQMwAAUEsHCF/kfYg1AAAAMwAAAFBLAQIUAxQAAAAAAG9whVkAAAAAAAAAAAAAAAAQACAAAAAAAAAAAAD/QQAAAABjaXJjdWxhcjEtMS4wLjAvVVQNAAcC+VFnzvlRZ+L4UWd1eAsAAQQAAAAABAAAAABQSwECFAMUAAgACACXcIVZC6iLX7EAAAAkAQAAHAAgAAAAAAAAAAAAtoFOAAAAY2lyY3VsYXIxLTEuMC4wL3BhY2thZ2UuanNvblVUDQAHTvlRZ075UWcC+VFndXgLAAEEAAAAAAQAAAAAUEsBAhQDFAAIAAgAeXCFWV/kfYg1AAAAMwAAABkAIAAAAAAAAAAAALaBaQEAAGNpcmN1bGFyMS0xLjAuMC9SRUFETUUubWRVVA0ABxb5UWcW+VFnAvlRZ3V4CwABBAAAAAAEAAAAAFBLBQYAAAAAAwADAC8BAAAFAgAAAAA= \ No newline at end of file diff --git a/backend/test_zip_files/circular1-1.0.0.zip b/backend/test_zip_files/circular1-1.0.0.zip new file mode 100644 index 0000000..a2f3a62 Binary files /dev/null and b/backend/test_zip_files/circular1-1.0.0.zip differ diff --git a/backend/test_zip_files/circular1-1.0.0/README.md b/backend/test_zip_files/circular1-1.0.0/README.md new file mode 100644 index 0000000..f9fa9e0 --- /dev/null +++ b/backend/test_zip_files/circular1-1.0.0/README.md @@ -0,0 +1 @@ +README file for circular dependency 2 version 1.0.0 \ No newline at end of file diff --git a/backend/test_zip_files/circular1-1.0.0/package.json b/backend/test_zip_files/circular1-1.0.0/package.json new file mode 100644 index 0000000..9cf1385 --- /dev/null +++ b/backend/test_zip_files/circular1-1.0.0/package.json @@ -0,0 +1,14 @@ +{ + "name": "circular1", + "version": "1.0.0", + "description": "Test package", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Test Author", + "license": "ISC", + "dependencies": { + "circular2": "1.0.0" + } +} diff --git a/backend/test_zip_files/circular2-1.0.0-string.txt b/backend/test_zip_files/circular2-1.0.0-string.txt new file mode 100644 index 0000000..c9c9564 --- /dev/null +++ b/backend/test_zip_files/circular2-1.0.0-string.txt @@ -0,0 +1 @@ +UEsDBBQAAAAAAG5whVkAAAAAAAAAAAAAAAAQACAAY2lyY3VsYXIyLTEuMC4wL1VUDQAHAflRZ9j5UWf4+FFndXgLAAEEAAAAAAQAAAAAUEsDBBQACAAIAJtwhVkAAAAAAAAAACQBAAAcACAAY2lyY3VsYXIyLTEuMC4wL3BhY2thZ2UuanNvblVUDQAHVvlRZ1b5UWcB+VFndXgLAAEEAAAAAAQAAAAATY8xD4IwEIV3Ev7DpQOTIeDIZoyDs44sTTnlFNqmLYbE8N9tS0XHe9+9u/feeQbAJB+RNcAEGTEN3OzZLuovNJaUDKguq7JKcodWGNIuoStaB5qLJ79j2hg5RUSyw7l82CSvNutJ/OsV571hEUWvoGUnY5RpQCoIAKxGQTfCrmVQFIAzOahZsC7rQT65XpktxGEdVzaQQGljr/PluEXX6DNJQfgf41u8/lWNX/JsybMPUEsHCG+FnauxAAAAJAEAAFBLAwQUAAgACAB0cIVZAAAAAAAAAAAzAAAAGQAgAGNpcmN1bGFyMi0xLjAuMC9SRUFETUUubWRVVA0ABw35UWcO+VFnAflRZ3V4CwABBAAAAAAEAAAAAAtydXTxdVVIy8xJVUjLL1JIzixKLs1JLFJISS1IzUtJzUuuVDBUKEstKs7Mz1Mw1DPQMwAAUEsHCCaOAJk1AAAAMwAAAFBLAQIUAxQAAAAAAG5whVkAAAAAAAAAAAAAAAAQACAAAAAAAAAAAAD/QQAAAABjaXJjdWxhcjItMS4wLjAvVVQNAAcB+VFn2PlRZ/j4UWd1eAsAAQQAAAAABAAAAABQSwECFAMUAAgACACbcIVZb4Wdq7EAAAAkAQAAHAAgAAAAAAAAAAAAtoFOAAAAY2lyY3VsYXIyLTEuMC4wL3BhY2thZ2UuanNvblVUDQAHVvlRZ1b5UWcB+VFndXgLAAEEAAAAAAQAAAAAUEsBAhQDFAAIAAgAdHCFWSaOAJk1AAAAMwAAABkAIAAAAAAAAAAAALaBaQEAAGNpcmN1bGFyMi0xLjAuMC9SRUFETUUubWRVVA0ABw35UWcO+VFnAflRZ3V4CwABBAAAAAAEAAAAAFBLBQYAAAAAAwADAC8BAAAFAgAAAAA= \ No newline at end of file diff --git a/backend/test_zip_files/circular2-1.0.0.zip b/backend/test_zip_files/circular2-1.0.0.zip new file mode 100644 index 0000000..ffb65e8 Binary files /dev/null and b/backend/test_zip_files/circular2-1.0.0.zip differ diff --git a/backend/test_zip_files/circular2-1.0.0/README.md b/backend/test_zip_files/circular2-1.0.0/README.md new file mode 100644 index 0000000..6787ef9 --- /dev/null +++ b/backend/test_zip_files/circular2-1.0.0/README.md @@ -0,0 +1 @@ +README file for circular dependency 1 version 1.0.0 \ No newline at end of file diff --git a/backend/test_zip_files/circular2-1.0.0/package.json b/backend/test_zip_files/circular2-1.0.0/package.json new file mode 100644 index 0000000..e359863 --- /dev/null +++ b/backend/test_zip_files/circular2-1.0.0/package.json @@ -0,0 +1,14 @@ +{ + "name": "circular2", + "version": "1.0.0", + "description": "Test package", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Test Author", + "license": "ISC", + "dependencies": { + "circular1": "1.0.0" + } +}