create-outsystems-astro 0.8.1 → 0.9.0

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
@@ -178,7 +178,7 @@ All commands are run from the root of the project, from a terminal:
178
178
 
179
179
  | Command | Action |
180
180
  | :------------------------ | :----------------------------------------------- |
181
- | `deno install && deno run postinstall:deno` | Installs dependencies |
181
+ | `deno install && deno run postinstall` | Installs dependencies |
182
182
  | `deno run dev` | Starts local dev server at `localhost:4321` |
183
183
  | `deno run build` | Build distribution to `./dist/` |
184
184
  | `deno run output:deno` | Build OutSystems production site to `./output/` |
package/bin/cli.js CHANGED
@@ -51,6 +51,8 @@ async function main() {
51
51
 
52
52
  const packageManager = packageInstall(targetDir);
53
53
 
54
+ selectWorkflowTestCI(targetDir, packageManager);
55
+
54
56
  let selectedFrameworks = [];
55
57
 
56
58
  while (selectedFrameworks.length === 0) {
@@ -258,6 +260,29 @@ function updateMultiAstroPage(projectDir, selectedFrameworks) {
258
260
  console.log(`✨ Cleaned up components in ${path.relative(projectDir, pagePath)}`);
259
261
  }
260
262
 
263
+ function selectWorkflowTestCI(projectDir, packageManager) {
264
+ const workflowDir = path.join(projectDir, '.github', 'workflows');
265
+ if (!fs.existsSync(workflowDir)) return;
266
+
267
+ const allPMs = ['npm', 'yarn', 'pnpm', 'bun', 'deno'];
268
+ const activePM = allPMs.includes(packageManager) ? packageManager : 'npm';
269
+
270
+ for (const pm of allPMs) {
271
+ if (pm === activePM) continue;
272
+ const file = path.join(workflowDir, `${pm}-test.yml`);
273
+ if (fs.existsSync(file)) {
274
+ fs.rmSync(file, { force: true });
275
+ }
276
+ }
277
+
278
+ const src = path.join(workflowDir, `${activePM}-test.yml`);
279
+ const dest = path.join(workflowDir, 'test.yml');
280
+ if (fs.existsSync(src)) {
281
+ fs.renameSync(src, dest);
282
+ console.log(`✅ Added .github/workflows/test.yml for ${activePM}`);
283
+ }
284
+ }
285
+
261
286
  function detectPackageManager() {
262
287
  if (typeof Deno !== "undefined") return "deno";
263
288
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-outsystems-astro",
3
3
  "type": "module",
4
- "version": "0.8.1",
4
+ "version": "0.9.0",
5
5
  "description": "Create an OutSystems Astro Island project to import as a component into your OutSystems application",
6
6
  "repository": {
7
7
  "type": "git",
@@ -0,0 +1,127 @@
1
+ name: Test
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches: [ main ]
7
+ schedule:
8
+ - cron: '0 12 * * *'
9
+
10
+ env:
11
+ BUN_VERSION: '1.3.14'
12
+
13
+ jobs:
14
+
15
+ format:
16
+ runs-on: ubuntu-latest
17
+
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v6.0.2
21
+
22
+ - name: Install Bun
23
+ uses: oven-sh/setup-bun@v2.2.0
24
+ with:
25
+ bun-version: ${{ env.BUN_VERSION }}
26
+
27
+ - name: Install dependencies
28
+ working-directory: template
29
+ run: bun install --frozen-lockfile
30
+
31
+ - name: Run format
32
+ run: bun run format
33
+
34
+ lint:
35
+ runs-on: ubuntu-latest
36
+
37
+ steps:
38
+ - name: Checkout code
39
+ uses: actions/checkout@v6.0.2
40
+
41
+ - name: Install Bun
42
+ uses: oven-sh/setup-bun@v2.2.0
43
+ with:
44
+ bun-version: ${{ env.BUN_VERSION }}
45
+
46
+ - name: Install dependencies
47
+ working-directory: template
48
+ run: bun install --frozen-lockfile
49
+
50
+ - name: Run lint
51
+ run: bun run lint
52
+
53
+ security:
54
+ runs-on: ubuntu-latest
55
+
56
+ steps:
57
+ - name: Checkout code
58
+ uses: actions/checkout@v6.0.2
59
+
60
+ - name: Install Bun
61
+ uses: oven-sh/setup-bun@v2.2.0
62
+ with:
63
+ bun-version: ${{ env.BUN_VERSION }}
64
+
65
+ - name: Install dependencies
66
+ working-directory: template
67
+ run: bun install --frozen-lockfile
68
+
69
+ - name: Run security check
70
+ run: bun run audit:bun
71
+
72
+ test:
73
+ runs-on: ubuntu-latest
74
+
75
+ steps:
76
+ - name: Checkout code
77
+ uses: actions/checkout@v6.0.2
78
+
79
+ - name: Install Bun
80
+ uses: oven-sh/setup-bun@v2.2.0
81
+ with:
82
+ bun-version: ${{ env.BUN_VERSION }}
83
+
84
+ - name: Install dependencies
85
+ run: bun install --frozen-lockfile
86
+
87
+ - name: Run tests
88
+ run: bun run test
89
+
90
+ teste2e:
91
+ runs-on: ubuntu-latest
92
+
93
+ steps:
94
+ - name: Checkout code
95
+ uses: actions/checkout@v6.0.2
96
+
97
+ - name: Install Bun
98
+ uses: oven-sh/setup-bun@v2.2.0
99
+ with:
100
+ bun-version: ${{ env.BUN_VERSION }}
101
+
102
+ - name: Install dependencies
103
+ run: bun install --frozen-lockfile
104
+
105
+ - name: Install Playwright
106
+ run: bun run test:e2e:install
107
+
108
+ - name: Run tests
109
+ run: bun run test:e2e:bun
110
+
111
+ typecheck:
112
+ runs-on: ubuntu-latest
113
+
114
+ steps:
115
+ - name: Checkout code
116
+ uses: actions/checkout@v6.0.2
117
+
118
+ - name: Install Bun
119
+ uses: oven-sh/setup-bun@v2.2.0
120
+ with:
121
+ bun-version: ${{ env.BUN_VERSION }}
122
+
123
+ - name: Install dependencies
124
+ run: bun install --frozen-lockfile
125
+
126
+ - name: Run type check
127
+ run: bun run typecheck
@@ -0,0 +1,127 @@
1
+ name: Test
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches: [ main ]
7
+ schedule:
8
+ - cron: '0 12 * * *'
9
+
10
+ env:
11
+ DENO_VERSION: '2.7.14'
12
+
13
+ jobs:
14
+
15
+ format:
16
+ runs-on: ubuntu-latest
17
+
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v6.0.2
21
+
22
+ - name: Install Deno
23
+ uses: denoland/setup-deno@v2.0.4
24
+ with:
25
+ deno-version: ${{ env.DENO_VERSION }}
26
+
27
+ - name: Install dependencies
28
+ working-directory: template
29
+ run: deno install --frozen && deno run postinstall
30
+
31
+ - name: Run format
32
+ run: deno run format
33
+
34
+ lint:
35
+ runs-on: ubuntu-latest
36
+
37
+ steps:
38
+ - name: Checkout code
39
+ uses: actions/checkout@v6.0.2
40
+
41
+ - name: Install Deno
42
+ uses: denoland/setup-deno@v2.0.4
43
+ with:
44
+ deno-version: ${{ env.DENO_VERSION }}
45
+
46
+ - name: Install dependencies
47
+ working-directory: template
48
+ run: deno install --frozen && deno run postinstall
49
+
50
+ - name: Run lint
51
+ run: deno run lint
52
+
53
+ security:
54
+ runs-on: ubuntu-latest
55
+
56
+ steps:
57
+ - name: Checkout code
58
+ uses: actions/checkout@v6.0.2
59
+
60
+ - name: Install Deno
61
+ uses: denoland/setup-deno@v2.0.4
62
+ with:
63
+ deno-version: ${{ env.DENO_VERSION }}
64
+
65
+ - name: Install dependencies
66
+ working-directory: template
67
+ run: deno install --frozen && deno run postinstall
68
+
69
+ - name: Run security check
70
+ run: deno run audit:deno
71
+
72
+ test:
73
+ runs-on: ubuntu-latest
74
+
75
+ steps:
76
+ - name: Checkout code
77
+ uses: actions/checkout@v6.0.2
78
+
79
+ - name: Install Deno
80
+ uses: denoland/setup-deno@v2.0.4
81
+ with:
82
+ deno-version: ${{ env.DENO_VERSION }}
83
+
84
+ - name: Install dependencies
85
+ run: deno install --frozen && deno run postinstall
86
+
87
+ - name: Run tests
88
+ run: deno run test
89
+
90
+ teste2e:
91
+ runs-on: ubuntu-latest
92
+
93
+ steps:
94
+ - name: Checkout code
95
+ uses: actions/checkout@v6.0.2
96
+
97
+ - name: Install Deno
98
+ uses: denoland/setup-deno@v2.0.4
99
+ with:
100
+ deno-version: ${{ env.DENO_VERSION }}
101
+
102
+ - name: Install dependencies
103
+ run: deno install --frozen && deno run postinstall
104
+
105
+ - name: Install Playwright
106
+ run: deno run test:e2e:install
107
+
108
+ - name: Run tests
109
+ run: deno run test:e2e:deno
110
+
111
+ typecheck:
112
+ runs-on: ubuntu-latest
113
+
114
+ steps:
115
+ - name: Checkout code
116
+ uses: actions/checkout@v6.0.2
117
+
118
+ - name: Install Deno
119
+ uses: denoland/setup-deno@v2.0.4
120
+ with:
121
+ deno-version: ${{ env.DENO_VERSION }}
122
+
123
+ - name: Install dependencies
124
+ run: deno install --frozen && deno run postinstall
125
+
126
+ - name: Run type check
127
+ run: deno run typecheck
@@ -8,7 +8,7 @@ on:
8
8
  - cron: '0 12 * * *'
9
9
 
10
10
  env:
11
- NODE_VERSION: '24.14.1'
11
+ NODE_VERSION: '24.15.0'
12
12
 
13
13
  jobs:
14
14
 
@@ -20,7 +20,7 @@ jobs:
20
20
  uses: actions/checkout@v6.0.2
21
21
 
22
22
  - name: Use Node.js
23
- uses: actions/setup-node@v6.3.0
23
+ uses: actions/setup-node@v6.4.0
24
24
  with:
25
25
  node-version: ${{ env.NODE_VERSION }}
26
26
 
@@ -39,7 +39,7 @@ jobs:
39
39
  uses: actions/checkout@v6.0.2
40
40
 
41
41
  - name: Use Node.js
42
- uses: actions/setup-node@v6.3.0
42
+ uses: actions/setup-node@v6.4.0
43
43
  with:
44
44
  node-version: ${{ env.NODE_VERSION }}
45
45
 
@@ -58,7 +58,7 @@ jobs:
58
58
  uses: actions/checkout@v6.0.2
59
59
 
60
60
  - name: Use Node.js
61
- uses: actions/setup-node@v6.3.0
61
+ uses: actions/setup-node@v6.4.0
62
62
  with:
63
63
  node-version: ${{ env.NODE_VERSION }}
64
64
 
@@ -77,7 +77,7 @@ jobs:
77
77
  uses: actions/checkout@v6.0.2
78
78
 
79
79
  - name: Use Node.js
80
- uses: actions/setup-node@v6.3.0
80
+ uses: actions/setup-node@v6.4.0
81
81
  with:
82
82
  node-version: ${{ env.NODE_VERSION }}
83
83
 
@@ -95,7 +95,7 @@ jobs:
95
95
  uses: actions/checkout@v6.0.2
96
96
 
97
97
  - name: Use Node.js
98
- uses: actions/setup-node@v6.3.0
98
+ uses: actions/setup-node@v6.4.0
99
99
  with:
100
100
  node-version: ${{ env.NODE_VERSION }}
101
101
 
@@ -116,7 +116,7 @@ jobs:
116
116
  uses: actions/checkout@v6.0.2
117
117
 
118
118
  - name: Use Node.js
119
- uses: actions/setup-node@v6.3.0
119
+ uses: actions/setup-node@v6.4.0
120
120
  with:
121
121
  node-version: ${{ env.NODE_VERSION }}
122
122
 
@@ -0,0 +1,158 @@
1
+ name: Test
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches: [ main ]
7
+ schedule:
8
+ - cron: '0 12 * * *'
9
+
10
+ env:
11
+ NODE_VERSION: '24.15.0'
12
+ PNPM_VERSION: '11.1.1'
13
+
14
+ jobs:
15
+
16
+ format:
17
+ runs-on: ubuntu-latest
18
+
19
+ steps:
20
+ - name: Checkout code
21
+ uses: actions/checkout@v6.0.2
22
+
23
+ - name: Use Node.js
24
+ uses: actions/setup-node@v6.4.0
25
+ with:
26
+ node-version: ${{ env.NODE_VERSION }}
27
+
28
+ - name: Install pnpm
29
+ uses: pnpm/action-setup@v6.0.8
30
+ with:
31
+ version: ${{ env.PNPM_VERSION }}
32
+
33
+ - name: Install dependencies
34
+ working-directory: template
35
+ run: pnpm install --frozen-lockfile
36
+
37
+ - name: Run format
38
+ run: pnpm run format
39
+
40
+ lint:
41
+ runs-on: ubuntu-latest
42
+
43
+ steps:
44
+ - name: Checkout code
45
+ uses: actions/checkout@v6.0.2
46
+
47
+ - name: Use Node.js
48
+ uses: actions/setup-node@v6.4.0
49
+ with:
50
+ node-version: ${{ env.NODE_VERSION }}
51
+
52
+ - name: Install pnpm
53
+ uses: pnpm/action-setup@v6.0.8
54
+ with:
55
+ version: ${{ env.PNPM_VERSION }}
56
+
57
+ - name: Install dependencies
58
+ working-directory: template
59
+ run: pnpm install --frozen-lockfile
60
+
61
+ - name: Run lint
62
+ run: pnpm run lint
63
+
64
+ security:
65
+ runs-on: ubuntu-latest
66
+
67
+ steps:
68
+ - name: Checkout code
69
+ uses: actions/checkout@v6.0.2
70
+
71
+ - name: Use Node.js
72
+ uses: actions/setup-node@v6.4.0
73
+ with:
74
+ node-version: ${{ env.NODE_VERSION }}
75
+
76
+ - name: Install pnpm
77
+ uses: pnpm/action-setup@v6.0.8
78
+ with:
79
+ version: ${{ env.PNPM_VERSION }}
80
+
81
+ - name: Install dependencies
82
+ working-directory: template
83
+ run: pnpm install --frozen-lockfile
84
+
85
+ - name: Run security check
86
+ run: pnpm run audit:pnpm
87
+
88
+ test:
89
+ runs-on: ubuntu-latest
90
+
91
+ steps:
92
+ - name: Checkout code
93
+ uses: actions/checkout@v6.0.2
94
+
95
+ - name: Use Node.js
96
+ uses: actions/setup-node@v6.4.0
97
+ with:
98
+ node-version: ${{ env.NODE_VERSION }}
99
+
100
+ - name: Install pnpm
101
+ uses: pnpm/action-setup@v6.0.8
102
+ with:
103
+ version: ${{ env.PNPM_VERSION }}
104
+
105
+ - name: Install dependencies
106
+ run: pnpm install --frozen-lockfile
107
+
108
+ - name: Run tests
109
+ run: pnpm run test
110
+
111
+ teste2e:
112
+ runs-on: ubuntu-latest
113
+
114
+ steps:
115
+ - name: Checkout code
116
+ uses: actions/checkout@v6.0.2
117
+
118
+ - name: Use Node.js
119
+ uses: actions/setup-node@v6.4.0
120
+ with:
121
+ node-version: ${{ env.NODE_VERSION }}
122
+
123
+ - name: Install pnpm
124
+ uses: pnpm/action-setup@v6.0.8
125
+ with:
126
+ version: ${{ env.PNPM_VERSION }}
127
+
128
+ - name: Install dependencies
129
+ run: pnpm install --frozen-lockfile
130
+
131
+ - name: Install Playwright
132
+ run: pnpm run test:e2e:install
133
+
134
+ - name: Run tests
135
+ run: pnpm run test:e2e
136
+
137
+ typecheck:
138
+ runs-on: ubuntu-latest
139
+
140
+ steps:
141
+ - name: Checkout code
142
+ uses: actions/checkout@v6.0.2
143
+
144
+ - name: Use Node.js
145
+ uses: actions/setup-node@v6.4.0
146
+ with:
147
+ node-version: ${{ env.NODE_VERSION }}
148
+
149
+ - name: Install pnpm
150
+ uses: pnpm/action-setup@v6.0.8
151
+ with:
152
+ version: ${{ env.PNPM_VERSION }}
153
+
154
+ - name: Install dependencies
155
+ run: pnpm install --frozen-lockfile
156
+
157
+ - name: Run type check
158
+ run: pnpm run typecheck
@@ -0,0 +1,145 @@
1
+ name: Test
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches: [ main ]
7
+ schedule:
8
+ - cron: '0 12 * * *'
9
+
10
+ env:
11
+ NODE_VERSION: '24.15.0'
12
+
13
+ jobs:
14
+
15
+ format:
16
+ runs-on: ubuntu-latest
17
+
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v6.0.2
21
+
22
+ - name: Use Node.js
23
+ uses: actions/setup-node@v6.4.0
24
+ with:
25
+ node-version: ${{ env.NODE_VERSION }}
26
+
27
+ - name: Enable Corepack
28
+ run: corepack enable
29
+
30
+ - name: Install dependencies
31
+ working-directory: template
32
+ run: yarn install --frozen-lockfile
33
+
34
+ - name: Run format
35
+ run: yarn run format
36
+
37
+ lint:
38
+ runs-on: ubuntu-latest
39
+
40
+ steps:
41
+ - name: Checkout code
42
+ uses: actions/checkout@v6.0.2
43
+
44
+ - name: Use Node.js
45
+ uses: actions/setup-node@v6.4.0
46
+ with:
47
+ node-version: ${{ env.NODE_VERSION }}
48
+
49
+ - name: Enable Corepack
50
+ run: corepack enable
51
+
52
+ - name: Install dependencies
53
+ working-directory: template
54
+ run: yarn install --frozen-lockfile
55
+
56
+ - name: Run lint
57
+ run: yarn run lint
58
+
59
+ security:
60
+ runs-on: ubuntu-latest
61
+
62
+ steps:
63
+ - name: Checkout code
64
+ uses: actions/checkout@v6.0.2
65
+
66
+ - name: Use Node.js
67
+ uses: actions/setup-node@v6.4.0
68
+ with:
69
+ node-version: ${{ env.NODE_VERSION }}
70
+
71
+ - name: Enable Corepack
72
+ run: corepack enable
73
+
74
+ - name: Install dependencies
75
+ working-directory: template
76
+ run: yarn install --frozen-lockfile
77
+
78
+ - name: Run security check
79
+ run: yarn run audit:yarn
80
+
81
+ test:
82
+ runs-on: ubuntu-latest
83
+
84
+ steps:
85
+ - name: Checkout code
86
+ uses: actions/checkout@v6.0.2
87
+
88
+ - name: Use Node.js
89
+ uses: actions/setup-node@v6.4.0
90
+ with:
91
+ node-version: ${{ env.NODE_VERSION }}
92
+
93
+ - name: Enable Corepack
94
+ run: corepack enable
95
+
96
+ - name: Install dependencies
97
+ run: yarn install --frozen-lockfile
98
+
99
+ - name: Run tests
100
+ run: yarn run test
101
+
102
+ teste2e:
103
+ runs-on: ubuntu-latest
104
+
105
+ steps:
106
+ - name: Checkout code
107
+ uses: actions/checkout@v6.0.2
108
+
109
+ - name: Use Node.js
110
+ uses: actions/setup-node@v6.4.0
111
+ with:
112
+ node-version: ${{ env.NODE_VERSION }}
113
+
114
+ - name: Enable Corepack
115
+ run: corepack enable
116
+
117
+ - name: Install dependencies
118
+ run: yarn install --frozen-lockfile
119
+
120
+ - name: Install Playwright
121
+ run: yarn run test:e2e:install
122
+
123
+ - name: Run tests
124
+ run: yarn run test:e2e
125
+
126
+ typecheck:
127
+ runs-on: ubuntu-latest
128
+
129
+ steps:
130
+ - name: Checkout code
131
+ uses: actions/checkout@v6.0.2
132
+
133
+ - name: Use Node.js
134
+ uses: actions/setup-node@v6.4.0
135
+ with:
136
+ node-version: ${{ env.NODE_VERSION }}
137
+
138
+ - name: Enable Corepack
139
+ run: corepack enable
140
+
141
+ - name: Install dependencies
142
+ run: yarn install --frozen-lockfile
143
+
144
+ - name: Run type check
145
+ run: yarn run typecheck
@@ -10,6 +10,7 @@ import { defineConfig } from "astro/config";
10
10
  // https://astro.build/config
11
11
  export default defineConfig({
12
12
  build: {
13
+ assets: "assets",
13
14
  inlineStylesheets: "always",
14
15
  },
15
16
  integrations: [
@@ -46,9 +47,9 @@ export default defineConfig({
46
47
  build: {
47
48
  rollupOptions: {
48
49
  output: {
49
- assetFileNames: `assets/[name]_[hash].[ext]`,
50
- chunkFileNames: `[name]_[hash].js`,
51
- entryFileNames: `[name]_[hash].js`,
50
+ assetFileNames: `assets/[name].[hash].[ext]`,
51
+ chunkFileNames: `[name].[hash].js`,
52
+ entryFileNames: `[name].[hash].js`,
52
53
  manualChunks: (id) => {
53
54
  if (id.includes("node_modules")) {
54
55
  return "app";