Skip to content

Commit 966caa7

Browse files
committed
fix(templatizer): use launchql.plan instead of sqitch.plan in workspace install script
The generated install.sh script was searching for sqitch.plan files, but LaunchQL modules use launchql.plan. This caused the script to fail to find any modules during installation. - Change find command to search for launchql.plan files - Fixes module discovery in workspace installation workflow Verified by: - Generating test workspace and module - Confirming install.sh successfully finds and installs modules
1 parent 3032d40 commit 966caa7

1 file changed

Lines changed: 72 additions & 72 deletions

File tree

packages/templatizer/src/generated/workspace.ts

Lines changed: 72 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Auto-generated template module
22

33
export default [
4-
(vars: Record<string, any>) => {
5-
const relPath = `tsconfig.json`;
6-
const content = `{
4+
(vars: Record<string, any>) => {
5+
const relPath = `tsconfig.json`;
6+
const content = `{
77
"compilerOptions": {
88
"target": "es2022",
99
"module": "commonjs",
@@ -20,12 +20,12 @@ export default [
2020
"exclude": ["dist", "node_modules"]
2121
}
2222
`;
23-
return { relPath, content };
24-
},
23+
return { relPath, content };
24+
},
2525

26-
(vars: Record<string, any>) => {
27-
const relPath = `package.json`;
28-
const content = `{
26+
(vars: Record<string, any>) => {
27+
const relPath = `package.json`;
28+
const content = `{
2929
"name": "${vars.MODULENAME}",
3030
"version": "0.0.1",
3131
"author": "${vars.USERFULLNAME} <${vars.USEREMAIL}>",
@@ -67,12 +67,12 @@ export default [
6767
"typescript": "^5.1.6"
6868
}
6969
}`;
70-
return { relPath, content };
71-
},
70+
return { relPath, content };
71+
},
7272

73-
(vars: Record<string, any>) => {
74-
const relPath = `lerna.json`;
75-
const content = `{
73+
(vars: Record<string, any>) => {
74+
const relPath = `lerna.json`;
75+
const content = `{
7676
"lerna": "6",
7777
"conventionalCommits": true,
7878
"npmClient": "pnpm",
@@ -96,23 +96,23 @@ export default [
9696
}
9797
}
9898
}`;
99-
return { relPath, content };
100-
},
99+
return { relPath, content };
100+
},
101101

102-
(vars: Record<string, any>) => {
103-
const relPath = `launchql.json`;
104-
const content = `{
102+
(vars: Record<string, any>) => {
103+
const relPath = `launchql.json`;
104+
const content = `{
105105
"packages": [
106106
"packages/*",
107107
"extensions/*"
108108
]
109109
}`;
110-
return { relPath, content };
111-
},
110+
return { relPath, content };
111+
},
112112

113-
(vars: Record<string, any>) => {
114-
const relPath = `docker-compose.yml`;
115-
const content = `services:
113+
(vars: Record<string, any>) => {
114+
const relPath = `docker-compose.yml`;
115+
const content = `services:
116116
postgres:
117117
container_name: postgres
118118
image: pyramation/pgvector:13.3-alpine
@@ -140,12 +140,12 @@ export default [
140140
- "9000"
141141
command: server /data
142142
`;
143-
return { relPath, content };
144-
},
143+
return { relPath, content };
144+
},
145145

146-
(vars: Record<string, any>) => {
147-
const relPath = `bootstrap-roles.sql`;
148-
const content = `-- anonymous
146+
(vars: Record<string, any>) => {
147+
const relPath = `bootstrap-roles.sql`;
148+
const content = `-- anonymous
149149
CREATE ROLE anonymous;
150150
151151
ALTER USER anonymous WITH NOCREATEDB;
@@ -208,12 +208,12 @@ GRANT authenticated TO administrator;
208208
GRANT administrator TO app_admin;
209209
210210
`;
211-
return { relPath, content };
212-
},
211+
return { relPath, content };
212+
},
213213

214-
(vars: Record<string, any>) => {
215-
const relPath = `README.md`;
216-
const content = `# ${vars.MODULENAME}
214+
(vars: Record<string, any>) => {
215+
const relPath = `README.md`;
216+
const content = `# ${vars.MODULENAME}
217217
218218
<p align="center">
219219
<img src="https://raw.githubusercontent.com/launchql/launchql/refs/heads/main/assets/outline-logo.svg" width="250"><br />
@@ -262,12 +262,12 @@ AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED “AS IS”, AT YOUR OWN
262262
263263
No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.
264264
`;
265-
return { relPath, content };
266-
},
265+
return { relPath, content };
266+
},
267267

268-
(vars: Record<string, any>) => {
269-
const relPath = `Makefile`;
270-
const content = `
268+
(vars: Record<string, any>) => {
269+
const relPath = `Makefile`;
270+
const content = `
271271
up:
272272
docker-compose up -d
273273
@@ -284,12 +284,12 @@ roles:
284284
install:
285285
docker exec postgres /sql-bin/install.sh
286286
`;
287-
return { relPath, content };
288-
},
287+
return { relPath, content };
288+
},
289289

290-
(vars: Record<string, any>) => {
291-
const relPath = `LICENSE`;
292-
const content = `The MIT License (MIT)
290+
(vars: Record<string, any>) => {
291+
const relPath = `LICENSE`;
292+
const content = `The MIT License (MIT)
293293
294294
Copyright (c) 2025 ${vars.USERFULLNAME} <${vars.USEREMAIL}>
295295
@@ -311,12 +311,12 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
311311
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
312312
SOFTWARE.
313313
`;
314-
return { relPath, content };
315-
},
314+
return { relPath, content };
315+
},
316316

317-
(vars: Record<string, any>) => {
318-
const relPath = `bin/install.sh`;
319-
const content = `#!/usr/bin/env bash
317+
(vars: Record<string, any>) => {
318+
const relPath = `bin/install.sh`;
319+
const content = `#!/usr/bin/env bash
320320
set -euo pipefail
321321
322322
# Define colors and styles
@@ -337,7 +337,7 @@ install_sql_modules() {
337337
fi
338338
339339
echo -e "\${GREEN}Installing SQL modules from:\${RESET} \${CYAN}\${base_dir}\${RESET}"
340-
find "$base_dir" -type f -name "sqitch.plan" | while read -r plan_file; do
340+
find "$base_dir" -type f -name "launchql.plan" | while read -r plan_file; do
341341
local dir rel_path pkg_name
342342
dir=$(dirname "$plan_file")
343343
rel_path="\${dir#"$base_dir"/}" # strip base_dir prefix
@@ -350,12 +350,12 @@ install_sql_modules() {
350350
install_sql_modules "/sql-extensions"
351351
install_sql_modules "/sql-packages"
352352
`;
353-
return { relPath, content };
354-
},
353+
return { relPath, content };
354+
},
355355

356-
(vars: Record<string, any>) => {
357-
const relPath = `.questions.json`;
358-
const content = `[
356+
(vars: Record<string, any>) => {
357+
const relPath = `.questions.json`;
358+
const content = `[
359359
{
360360
"name": "${vars.USERFULLNAME}",
361361
"message": "Enter author full name",
@@ -377,34 +377,34 @@ install_sql_modules "/sql-packages"
377377
"required": true
378378
}
379379
]`;
380-
return { relPath, content };
381-
},
380+
return { relPath, content };
381+
},
382382

383-
(vars: Record<string, any>) => {
384-
const relPath = `.prettierrc.json`;
385-
const content = `{
383+
(vars: Record<string, any>) => {
384+
const relPath = `.prettierrc.json`;
385+
const content = `{
386386
"trailingComma": "es5",
387387
"tabWidth": 2,
388388
"semi": true,
389389
"useTabs": false,
390390
"singleQuote": false
391391
}`;
392-
return { relPath, content };
393-
},
392+
return { relPath, content };
393+
},
394394

395-
(vars: Record<string, any>) => {
396-
const relPath = `.gitignore`;
397-
const content = `**/node_modules/
395+
(vars: Record<string, any>) => {
396+
const relPath = `.gitignore`;
397+
const content = `**/node_modules/
398398
**/.DS_Store
399399
**/dist
400400
**/pnpm-debug.log
401401
lerna-debug.log`;
402-
return { relPath, content };
403-
},
402+
return { relPath, content };
403+
},
404404

405-
(vars: Record<string, any>) => {
406-
const relPath = `.eslintrc.json`;
407-
const content = `{
405+
(vars: Record<string, any>) => {
406+
const relPath = `.eslintrc.json`;
407+
const content = `{
408408
"env": {
409409
"browser": true,
410410
"es2021": true,
@@ -467,6 +467,6 @@ lerna-debug.log`;
467467
"@typescript-eslint/no-unsafe-declaration-merging": 0
468468
}
469469
}`;
470-
return { relPath, content };
471-
}
472-
];
470+
return { relPath, content };
471+
},
472+
];

0 commit comments

Comments
 (0)