Repository: JoshuaKGoldberg/bingo (ts)

Issue:
🐛 Bug: Inputs aren't told of offline mode
### Bug Report Checklist

- [x] I have tried restarting my IDE and the issue persists.
- [x] I have pulled the latest `main` branch of the repository.
- [x] I have [searched for related issues](https://github.com/JoshuaKGoldberg/bingo/issues?q=is%3Aissue) and found none that matched my issue.

### Expected

When `--offline` is true, input contexts should have that.

### Actual

Right now they don't:

https://github.com/JoshuaKGoldberg/create/blob/293e610b7353a63811a1c513c621e6ab31c0f756/packages/bingo/src/contexts/createSystemContext.ts#L30

Systems don't have an `offline` property.

### Additional Info

💝 

Pull request description:
fix: add offline to take contexts
## PR Checklist

- [x] Addresses an existing open issue: fixes #224
- [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/bingo/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/bingo/blob/main/.github/CONTRIBUTING.md) were taken

## Overview

💝 

Patch:
diff --git a/packages/bingo/src/contexts/createSystemContext.ts b/packages/bingo/src/contexts/createSystemContext.ts
index e636a56..da80235 100644
--- a/packages/bingo/src/contexts/createSystemContext.ts
+++ b/packages/bingo/src/contexts/createSystemContext.ts
@@ -27,7 +27,8 @@ export function createSystemContext(settings: SystemContextSettings) {
 		runner: settings.runner ?? createSystemRunner(settings.directory),
 	};
 
-	const take = ((input, args) => input({ args, take, ...system })) as TakeInput;
+	const take = ((input, args) =>
+		input({ args, offline: settings.offline, take, ...system })) as TakeInput;
 
 	return {
 		...system,


Test patch:
diff --git a/packages/bingo/src/contexts/createSystemContext.test.ts b/packages/bingo/src/contexts/createSystemContext.test.ts
index d64277b..e7e256b 100644
--- a/packages/bingo/src/contexts/createSystemContext.test.ts
+++ b/packages/bingo/src/contexts/createSystemContext.test.ts
@@ -132,4 +132,32 @@ describe("createSystemContext", () => {
 			expect(runner).toBe(mockSystemRunner);
 		});
 	});
+
+	describe("take", () => {
+		it("does not enable offline when settings.offline is not enabled", () => {
+			const input = vi.fn();
+			const { take } = createSystemContext({ directory: "." });
+
+			take(input);
+
+			expect(input).toHaveBeenCalledWith(
+				expect.objectContaining({
+					offline: undefined,
+				}),
+			);
+		});
+
+		it("enables offline when settings.offline is true", () => {
+			const input = vi.fn();
+			const { take } = createSystemContext({ directory: ".", offline: true });
+
+			take(input);
+
+			expect(input).toHaveBeenCalledWith(
+				expect.objectContaining({
+					offline: true,
+				}),
+			);
+		});
+	});
 });