create-powerapp 1.0.1 → 1.1.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/.github/workflows/ci.yml +108 -112
- package/index.js +868 -964
- package/package.json +1 -1
package/.github/workflows/ci.yml
CHANGED
|
@@ -1,112 +1,108 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [main]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
test:
|
|
11
|
-
name: Smoke test — scaffold all app types
|
|
12
|
-
runs-on: ${{ matrix.os }}
|
|
13
|
-
strategy:
|
|
14
|
-
matrix:
|
|
15
|
-
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
16
|
-
node-version: [18, 20, 22]
|
|
17
|
-
|
|
18
|
-
steps:
|
|
19
|
-
- name: Checkout
|
|
20
|
-
uses: actions/checkout@v4
|
|
21
|
-
|
|
22
|
-
- name: Set up Node.js ${{ matrix.node-version }}
|
|
23
|
-
uses: actions/setup-node@v4
|
|
24
|
-
with:
|
|
25
|
-
node-version: ${{ matrix.node-version }}
|
|
26
|
-
|
|
27
|
-
- name: Verify Node and npm versions
|
|
28
|
-
run: |
|
|
29
|
-
node --version
|
|
30
|
-
npm --version
|
|
31
|
-
|
|
32
|
-
- name: Scaffold Canvas App (Copilot)
|
|
33
|
-
run: |
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
test -f test-canvas/.
|
|
40
|
-
test -f test-canvas
|
|
41
|
-
test -f test-canvas/
|
|
42
|
-
test -f test-canvas/
|
|
43
|
-
test -f test-canvas/
|
|
44
|
-
test -
|
|
45
|
-
test -d test-canvas/canvas-src/
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
test -f test-mda
|
|
57
|
-
test -f test-mda/
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
shell: bash
|
|
78
|
-
|
|
79
|
-
- name:
|
|
80
|
-
run: |
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
test -f test-codeapp/
|
|
87
|
-
test -f test-codeapp/
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
- name: Check index.js parses without errors
|
|
110
|
-
run: node --check index.js
|
|
111
|
-
- name: Check package.json is valid JSON
|
|
112
|
-
run: node -e "JSON.parse(require('fs').readFileSync('package.json','utf8')); console.log('package.json OK')"
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
name: Smoke test — scaffold all app types
|
|
12
|
+
runs-on: ${{ matrix.os }}
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
16
|
+
node-version: [18, 20, 22]
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout
|
|
20
|
+
uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- name: Set up Node.js ${{ matrix.node-version }}
|
|
23
|
+
uses: actions/setup-node@v4
|
|
24
|
+
with:
|
|
25
|
+
node-version: ${{ matrix.node-version }}
|
|
26
|
+
|
|
27
|
+
- name: Verify Node and npm versions
|
|
28
|
+
run: |
|
|
29
|
+
node --version
|
|
30
|
+
npm --version
|
|
31
|
+
|
|
32
|
+
- name: Scaffold Canvas App (Copilot)
|
|
33
|
+
run: printf 'test-canvas\n1\n1\n\n' | node index.js
|
|
34
|
+
shell: bash
|
|
35
|
+
|
|
36
|
+
- name: Check Canvas App files exist
|
|
37
|
+
run: |
|
|
38
|
+
test -f test-canvas/.gitignore
|
|
39
|
+
test -f test-canvas/.env
|
|
40
|
+
test -f test-canvas/README.md
|
|
41
|
+
test -f test-canvas/instructions/canvas-instructions.md
|
|
42
|
+
test -f test-canvas/prompts/starter.md
|
|
43
|
+
test -f test-canvas/.github/copilot-instructions.md
|
|
44
|
+
test -d test-canvas/canvas-src/Src
|
|
45
|
+
test -d test-canvas/canvas-src/Assets
|
|
46
|
+
shell: bash
|
|
47
|
+
|
|
48
|
+
- name: Scaffold Model-Driven App (Claude Code)
|
|
49
|
+
run: printf 'test-mda\n2\n2\n\n' | node index.js
|
|
50
|
+
shell: bash
|
|
51
|
+
|
|
52
|
+
- name: Check MDA files exist
|
|
53
|
+
run: |
|
|
54
|
+
test -f test-mda/.gitignore
|
|
55
|
+
test -f test-mda/CLAUDE.md
|
|
56
|
+
test -f test-mda/instructions/mda-instructions.md
|
|
57
|
+
test -f test-mda/prompts/starter.md
|
|
58
|
+
shell: bash
|
|
59
|
+
|
|
60
|
+
- name: Scaffold PCF Component
|
|
61
|
+
run: printf 'test-pcf\n3\n1\n\n' | node index.js
|
|
62
|
+
shell: bash
|
|
63
|
+
|
|
64
|
+
- name: Scaffold Power Pages
|
|
65
|
+
run: printf 'test-pages\n4\n2\n\n' | node index.js
|
|
66
|
+
shell: bash
|
|
67
|
+
|
|
68
|
+
- name: Check Power Pages folder structure
|
|
69
|
+
run: |
|
|
70
|
+
test -d test-pages/site/web-files
|
|
71
|
+
test -d test-pages/site/web-pages
|
|
72
|
+
test -d test-pages/site/web-templates
|
|
73
|
+
shell: bash
|
|
74
|
+
|
|
75
|
+
- name: Scaffold Code App (auto npm install runs inside scaffold)
|
|
76
|
+
run: printf 'test-codeapp\n5\n1\n\n' | node index.js
|
|
77
|
+
shell: bash
|
|
78
|
+
|
|
79
|
+
- name: Check Code App files exist
|
|
80
|
+
run: |
|
|
81
|
+
test -f test-codeapp/package.json
|
|
82
|
+
test -f test-codeapp/tsconfig.json
|
|
83
|
+
test -f test-codeapp/vite.config.ts
|
|
84
|
+
test -f test-codeapp/index.html
|
|
85
|
+
test -f test-codeapp/src/main.tsx
|
|
86
|
+
test -f test-codeapp/src/App.tsx
|
|
87
|
+
test -f test-codeapp/src/App.module.css
|
|
88
|
+
test -f test-codeapp/src/index.css
|
|
89
|
+
test -f test-codeapp/src/vite-env.d.ts
|
|
90
|
+
node -e "JSON.parse(require('fs').readFileSync('test-codeapp/package.json','utf8'))"
|
|
91
|
+
shell: bash
|
|
92
|
+
|
|
93
|
+
- name: Code App — npm run build succeeds with zero errors
|
|
94
|
+
run: cd test-codeapp && npm run build
|
|
95
|
+
shell: bash
|
|
96
|
+
|
|
97
|
+
lint:
|
|
98
|
+
name: Check syntax
|
|
99
|
+
runs-on: ubuntu-latest
|
|
100
|
+
steps:
|
|
101
|
+
- uses: actions/checkout@v4
|
|
102
|
+
- uses: actions/setup-node@v4
|
|
103
|
+
with:
|
|
104
|
+
node-version: 20
|
|
105
|
+
- name: Check index.js parses without errors
|
|
106
|
+
run: node --check index.js
|
|
107
|
+
- name: Check package.json is valid JSON
|
|
108
|
+
run: node -e "JSON.parse(require('fs').readFileSync('package.json','utf8')); console.log('package.json OK')"
|