trustlocal 0.1.0 → 0.1.2

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.
package/README.md CHANGED
@@ -124,6 +124,4 @@ npx trustlocal init
124
124
 
125
125
  ## License
126
126
 
127
- MIT © Sahil Kashyap
128
-
129
- Built with [Claude Code](https://claude.ai/claude-code)
127
+ MIT © Sahil Kashyap
@@ -1,24 +1,36 @@
1
1
  /**
2
2
  * Next.js injector
3
3
  *
4
- * Adds `experimental.https` to next.config.js / next.config.ts using AST-based
5
- * insertion. Never uses string concatenation on existing files.
4
+ * Next.js 15+ removed `experimental.https` from next.config.
5
+ * The correct approach is to patch the `dev` script in package.json
6
+ * to use `--experimental-https` with explicit cert paths, and set
7
+ * NODE_EXTRA_CA_CERTS so Node trusts the local CA.
8
+ *
9
+ * For Next.js < 15 (detected by next version in package.json),
10
+ * we fall back to injecting `experimental.https` into next.config.
6
11
  */
7
12
  export declare const INJECTION_MARKER = "// trustlocal:https";
13
+ export declare const PKG_INJECTION_MARKER = "trustlocal:https";
8
14
  export interface InjectResult {
9
15
  alreadyConfigured: boolean;
10
16
  created: boolean;
17
+ method: 'package-json-flag' | 'experimental-config' | 'already-done';
11
18
  }
12
19
  /**
13
- * Inject HTTPS config into a Next.js config file.
14
- * Creates the file if it doesn't exist.
15
- * Idempotent — safe to call multiple times.
20
+ * Inject HTTPS into package.json dev script (Next.js 15+ approach).
21
+ * Adds --experimental-https --experimental-https-key and --experimental-https-cert flags.
22
+ */
23
+ export declare function injectPackageJsonScript(pkgPath: string): Promise<InjectResult>;
24
+ /**
25
+ * Inject HTTPS config into a Next.js config file (Next.js < 15 approach).
26
+ * Uses the experimental.https block.
16
27
  */
17
- export declare function injectNextjs(configPath: string): Promise<InjectResult>;
28
+ export declare function injectNextjsConfig(configPath: string): Promise<InjectResult>;
18
29
  /**
19
- * Pure function: insert the HTTPS block into source code.
20
- * Uses the AST to locate the config object opening brace,
21
- * then does a string-slice insertion at that position.
30
+ * Main entry point. Detects Next.js version and uses the right strategy:
31
+ * - Next.js 15+: patch package.json dev script with --experimental-https flags
32
+ * - Next.js < 15: inject experimental.https into next.config.js/ts
22
33
  */
34
+ export declare function injectNextjs(configPath: string, projectRoot?: string): Promise<InjectResult>;
23
35
  export declare function injectIntoSource(source: string): string | null;
24
36
  //# sourceMappingURL=nextjs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nextjs.d.ts","sourceRoot":"","sources":["../../src/injectors/nextjs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AA+BtD,MAAM,WAAW,YAAY;IAC3B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAyC5E;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAmB9D"}
1
+ {"version":3,"file":"nextjs.d.ts","sourceRoot":"","sources":["../../src/injectors/nextjs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AACtD,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AAIvD,MAAM,WAAW,YAAY;IAC3B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,mBAAmB,GAAG,qBAAqB,GAAG,cAAc,CAAC;CACtE;AAkBD;;;GAGG;AACH,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAqCpF;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CA6BlF;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAChC,UAAU,EAAE,MAAM,EAClB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,YAAY,CAAC,CAYvB;AAoBD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAW9D"}
@@ -2,114 +2,158 @@
2
2
  /**
3
3
  * Next.js injector
4
4
  *
5
- * Adds `experimental.https` to next.config.js / next.config.ts using AST-based
6
- * insertion. Never uses string concatenation on existing files.
5
+ * Next.js 15+ removed `experimental.https` from next.config.
6
+ * The correct approach is to patch the `dev` script in package.json
7
+ * to use `--experimental-https` with explicit cert paths, and set
8
+ * NODE_EXTRA_CA_CERTS so Node trusts the local CA.
9
+ *
10
+ * For Next.js < 15 (detected by next version in package.json),
11
+ * we fall back to injecting `experimental.https` into next.config.
7
12
  */
8
13
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.INJECTION_MARKER = void 0;
14
+ exports.PKG_INJECTION_MARKER = exports.INJECTION_MARKER = void 0;
15
+ exports.injectPackageJsonScript = injectPackageJsonScript;
16
+ exports.injectNextjsConfig = injectNextjsConfig;
10
17
  exports.injectNextjs = injectNextjs;
11
18
  exports.injectIntoSource = injectIntoSource;
12
19
  const promises_1 = require("fs/promises");
20
+ const path_1 = require("path");
13
21
  const backup_1 = require("../utils/backup");
14
- const astHelper_1 = require("./astHelper");
15
22
  exports.INJECTION_MARKER = '// trustlocal:https';
23
+ exports.PKG_INJECTION_MARKER = 'trustlocal:https';
16
24
  const CERT_DIR = '.trustlocal';
17
- function buildHttpsBlock(indent) {
18
- return `
19
- ${indent}${exports.INJECTION_MARKER}
20
- ${indent}experimental: {
21
- ${indent} https: {
22
- ${indent} key: '${CERT_DIR}/localhost-key.pem',
23
- ${indent} cert: '${CERT_DIR}/localhost.pem',
24
- ${indent} },
25
- ${indent}},`;
25
+ /**
26
+ * Detect the major version of Next.js installed in the project.
27
+ * Returns the major version number, or null if it can't be determined.
28
+ */
29
+ async function detectNextVersion(projectRoot) {
30
+ try {
31
+ const pkgPath = (0, path_1.join)(projectRoot, 'node_modules', 'next', 'package.json');
32
+ const content = await (0, promises_1.readFile)(pkgPath, 'utf-8');
33
+ const pkg = JSON.parse(content);
34
+ const major = parseInt(pkg.version?.split('.')[0] ?? '', 10);
35
+ return isNaN(major) ? null : major;
36
+ }
37
+ catch {
38
+ return null;
39
+ }
26
40
  }
27
- function buildNewConfigFile() {
28
- return `${exports.INJECTION_MARKER}
29
- /** @type {import('next').NextConfig} */
30
- const nextConfig = {
31
- experimental: {
32
- https: {
33
- key: '${CERT_DIR}/localhost-key.pem',
34
- cert: '${CERT_DIR}/localhost.pem',
35
- },
36
- },
37
- };
38
-
39
- module.exports = nextConfig;
40
- `;
41
+ /**
42
+ * Inject HTTPS into package.json dev script (Next.js 15+ approach).
43
+ * Adds --experimental-https --experimental-https-key and --experimental-https-cert flags.
44
+ */
45
+ async function injectPackageJsonScript(pkgPath) {
46
+ let content;
47
+ try {
48
+ content = await (0, promises_1.readFile)(pkgPath, 'utf-8');
49
+ }
50
+ catch {
51
+ return { alreadyConfigured: false, created: false, method: 'already-done' };
52
+ }
53
+ if (content.includes(exports.PKG_INJECTION_MARKER)) {
54
+ return { alreadyConfigured: true, created: false, method: 'already-done' };
55
+ }
56
+ const pkg = JSON.parse(content);
57
+ if (!pkg.scripts) {
58
+ pkg.scripts = {};
59
+ }
60
+ const devScript = pkg.scripts['dev'] ?? 'next dev';
61
+ // Already has the flag
62
+ if (devScript.includes('--experimental-https')) {
63
+ return { alreadyConfigured: true, created: false, method: 'already-done' };
64
+ }
65
+ // Append HTTPS flags to the dev script
66
+ const certKey = `${CERT_DIR}/localhost-key.pem`;
67
+ const certPem = `${CERT_DIR}/localhost.pem`;
68
+ pkg.scripts['dev'] =
69
+ `${devScript} --experimental-https --experimental-https-key ${certKey} --experimental-https-cert ${certPem}`;
70
+ await (0, backup_1.backupFile)(pkgPath);
71
+ await (0, promises_1.writeFile)(pkgPath, JSON.stringify(pkg, null, 2) + '\n', 'utf-8');
72
+ return { alreadyConfigured: false, created: false, method: 'package-json-flag' };
41
73
  }
42
74
  /**
43
- * Inject HTTPS config into a Next.js config file.
44
- * Creates the file if it doesn't exist.
45
- * Idempotent — safe to call multiple times.
75
+ * Inject HTTPS config into a Next.js config file (Next.js < 15 approach).
76
+ * Uses the experimental.https block.
46
77
  */
47
- async function injectNextjs(configPath) {
78
+ async function injectNextjsConfig(configPath) {
48
79
  let content;
49
- // ── File does not exist → create it ──────────────────────────────────────
50
80
  try {
51
81
  content = await (0, promises_1.readFile)(configPath, 'utf-8');
52
82
  }
53
83
  catch {
54
84
  await (0, promises_1.writeFile)(configPath, buildNewConfigFile(), 'utf-8');
55
- return { alreadyConfigured: false, created: true };
85
+ return { alreadyConfigured: false, created: true, method: 'experimental-config' };
56
86
  }
57
- // ── Already injected (idempotency check) ──────────────────────────────────
58
87
  if (content.includes(exports.INJECTION_MARKER)) {
59
- return { alreadyConfigured: true, created: false };
88
+ return { alreadyConfigured: true, created: false, method: 'already-done' };
60
89
  }
61
- // Additional AST-based check: look for experimental.https already present
62
- try {
63
- const ast = (0, astHelper_1.parseSource)(content);
64
- const configObj = (0, astHelper_1.findTopLevelConfigObject)(ast);
65
- if (configObj && (0, astHelper_1.hasNestedProperty)(configObj, ['experimental', 'https'])) {
66
- return { alreadyConfigured: true, created: false };
67
- }
68
- }
69
- catch {
70
- // If parse fails, proceed cautiously — the regex below will still guard us
90
+ if (/experimental\s*:\s*\{[^}]*https\s*:/.test(content)) {
91
+ return { alreadyConfigured: true, created: false, method: 'already-done' };
71
92
  }
72
- // ── Back up before mutating ───────────────────────────────────────────────
73
93
  await (0, backup_1.backupFile)(configPath);
74
- // ── AST-based injection ───────────────────────────────────────────────────
75
94
  const injected = injectIntoSource(content);
76
95
  if (!injected) {
77
96
  throw new Error(`trustlocal could not locate the config object in ${configPath}.\n` +
78
97
  'Please add the experimental.https block manually.');
79
98
  }
80
99
  await (0, promises_1.writeFile)(configPath, injected, 'utf-8');
81
- return { alreadyConfigured: false, created: false };
100
+ return { alreadyConfigured: false, created: false, method: 'experimental-config' };
82
101
  }
83
102
  /**
84
- * Pure function: insert the HTTPS block into source code.
85
- * Uses the AST to locate the config object opening brace,
86
- * then does a string-slice insertion at that position.
103
+ * Main entry point. Detects Next.js version and uses the right strategy:
104
+ * - Next.js 15+: patch package.json dev script with --experimental-https flags
105
+ * - Next.js < 15: inject experimental.https into next.config.js/ts
87
106
  */
88
- function injectIntoSource(source) {
89
- let ast;
90
- try {
91
- ast = (0, astHelper_1.parseSource)(source);
92
- }
93
- catch {
94
- return null;
107
+ async function injectNextjs(configPath, projectRoot) {
108
+ const root = projectRoot ?? (0, path_1.join)(configPath, '..');
109
+ const nextMajor = await detectNextVersion(root);
110
+ // Next.js 15+ — use CLI flag approach
111
+ if (nextMajor === null || nextMajor >= 15) {
112
+ const pkgPath = (0, path_1.join)(root, 'package.json');
113
+ return injectPackageJsonScript(pkgPath);
95
114
  }
96
- const configObj = (0, astHelper_1.findTopLevelConfigObject)(ast);
97
- if (!configObj)
98
- return null;
99
- const insertPos = (0, astHelper_1.getObjectOpenBraceEnd)(configObj, source);
100
- if (insertPos < 0)
115
+ // Next.js < 15 — use experimental.https config
116
+ return injectNextjsConfig(configPath);
117
+ }
118
+ // ── Legacy helpers kept for the < 15 path ────────────────────────────────────
119
+ function buildNewConfigFile() {
120
+ return `${exports.INJECTION_MARKER}
121
+ /** @type {import('next').NextConfig} */
122
+ const nextConfig = {
123
+ experimental: {
124
+ https: {
125
+ key: '${CERT_DIR}/localhost-key.pem',
126
+ cert: '${CERT_DIR}/localhost.pem',
127
+ },
128
+ },
129
+ };
130
+
131
+ module.exports = nextConfig;
132
+ `;
133
+ }
134
+ function injectIntoSource(source) {
135
+ // Simple regex-based injection for the < 15 path
136
+ // Find the opening brace of the config object and insert after it
137
+ const configObjMatch = /(?:const|let|var)\s+\w+\s*(?::\s*\w+\s*)?\s*=\s*\{/.exec(source);
138
+ if (!configObjMatch)
101
139
  return null;
102
- // Detect indentation: look at the first existing property
103
- const indent = detectIndent(source, configObj);
140
+ const insertPos = (configObjMatch.index ?? 0) + configObjMatch[0].length;
141
+ const indent = detectIndentFromSource(source, insertPos);
104
142
  const block = buildHttpsBlock(indent);
105
143
  return source.slice(0, insertPos) + block + source.slice(insertPos);
106
144
  }
107
- function detectIndent(source, configObj) {
108
- // Find the line after the opening brace and measure its leading whitespace
109
- if (configObj.start === null || configObj.start === undefined)
110
- return ' ';
111
- const bracePos = source.indexOf('{', configObj.start);
112
- const afterBrace = source.slice(bracePos + 1);
145
+ function buildHttpsBlock(indent) {
146
+ return `
147
+ ${indent}${exports.INJECTION_MARKER}
148
+ ${indent}experimental: {
149
+ ${indent} https: {
150
+ ${indent} key: '${CERT_DIR}/localhost-key.pem',
151
+ ${indent} cert: '${CERT_DIR}/localhost.pem',
152
+ ${indent} },
153
+ ${indent}},`;
154
+ }
155
+ function detectIndentFromSource(source, afterPos) {
156
+ const afterBrace = source.slice(afterPos);
113
157
  const nextLineMatch = /\n(\s+)/.exec(afterBrace);
114
158
  return nextLineMatch?.[1] ?? ' ';
115
159
  }
@@ -1 +1 @@
1
- {"version":3,"file":"nextjs.js","sourceRoot":"","sources":["../../src/injectors/nextjs.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AA+CH,oCAyCC;AAOD,4CAmBC;AAhHD,0CAAkD;AAClD,4CAA6C;AAC7C,2CAA8G;AAEjG,QAAA,gBAAgB,GAAG,qBAAqB,CAAC;AAEtD,MAAM,QAAQ,GAAG,aAAa,CAAC;AAE/B,SAAS,eAAe,CAAC,MAAc;IACrC,OAAO;EACP,MAAM,GAAG,wBAAgB;EACzB,MAAM;EACN,MAAM;EACN,MAAM,aAAa,QAAQ;EAC3B,MAAM,cAAc,QAAQ;EAC5B,MAAM;EACN,MAAM,IAAI,CAAC;AACb,CAAC;AAED,SAAS,kBAAkB;IACzB,OAAO,GAAG,wBAAgB;;;;;cAKd,QAAQ;e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,wBAAgB;EACzB,MAAM;EACN,MAAM;EACN,MAAM,aAAa,QAAQ;EAC3B,MAAM,cAAc,QAAQ;EAC5B,MAAM;EACN,MAAM,IAAI,CAAC;AACb,CAAC;AAED,SAAS,sBAAsB,CAAC,MAAc,EAAE,QAAgB;IAC9D,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC1C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACjD,OAAO,aAAa,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;AACpC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trustlocal",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "One command. HTTPS everywhere. Zero config.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {