nlang-cli 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/init.js +5 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nlang-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Executable Extensions - Build system for double-extension files",
5
5
  "type": "module",
6
6
  "bin": {
package/src/init.js CHANGED
@@ -73,13 +73,10 @@ function generateWorkflow(cronMap, files) {
73
73
  // For cron, we determine which files to build based on the schedule
74
74
  const cronDispatchLogic = cronEntries
75
75
  .map(([cron, paths], i) => {
76
- const condition =
77
- i === 0
78
- ? `if [ "\${{ github.event.schedule }}" = "${cron}" ]; then`
79
- : `elif [ \${{ github.event.schedule }}" = "${cron}" ]; then`;
76
+ const condition = `elif [ "\${{ github.event.schedule }}" = "${cron}" ]; then`;
80
77
  // Build each file individually via --file flag
81
78
  const buildCmds = paths
82
- .map((p) => ` npx nlang build --file "${p}"`)
79
+ .map((p) => ` nlang build --file "${p}"`)
83
80
  .join("\n");
84
81
  return ` ${condition}\n${buildCmds}`;
85
82
  })
@@ -125,7 +122,7 @@ jobs:
125
122
  node-version: '22'
126
123
 
127
124
  - name: Install nlang
128
- run: npm install -g nlang
125
+ run: npm install -g nlang-cli
129
126
 
130
127
  ${hasTsFiles ? ` - name: Install tsx (for TypeScript support)\n run: npm install -g tsx\n` : ""}
131
128
  - name: Restore cache
@@ -142,8 +139,8 @@ ${hasTsFiles ? ` - name: Install tsx (for TypeScript support)\n run:
142
139
  LLM_API_KEY: \${{ secrets.LLM_API_KEY }}
143
140
  run: |
144
141
  if [ -n "\${{ github.event.inputs.file }}" ]; then
145
- npx nlang build --file "\${{ github.event.inputs.file }}"
146
- ${cronDispatchLogic ? `${cronDispatchLogic}\n fi` : " else\n npx nlang build\n fi"}${!cronDispatchLogic ? "" : `\n else\n npx nlang build\n fi`}
142
+ nlang build --file "\${{ github.event.inputs.file }}"
143
+ ${cronDispatchLogic ? `${cronDispatchLogic}\n else\n nlang build\n fi` : " else\n nlang build\n fi"}
147
144
 
148
145
  - name: Commit and push output
149
146
  run: |