@upleveled/preflight 9.0.13 → 10.0.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.
package/bin/preflight.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@upleveled/preflight",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"repository": "upleveled/preflight",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "UpLeveled (https://github.com/upleveled)",
|
|
@@ -17,43 +17,49 @@
|
|
|
17
17
|
"files": [
|
|
18
18
|
"src"
|
|
19
19
|
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"docker-build": "docker build --tag preflight .",
|
|
22
|
+
"docker-build-run": "pnpm docker-build && pnpm docker-run",
|
|
23
|
+
"docker-run": "docker run preflight",
|
|
24
|
+
"lint": "eslint . --max-warnings 0",
|
|
25
|
+
"start": "node --watch ./src/index.ts",
|
|
26
|
+
"test": "vitest run",
|
|
27
|
+
"test-local": "rm -rf ./__tests__/fixtures/__temp && pnpm test"
|
|
28
|
+
},
|
|
20
29
|
"dependencies": {
|
|
21
|
-
"algoliasearch": "5.
|
|
22
|
-
"chalk": "
|
|
30
|
+
"algoliasearch": "5.57.0",
|
|
31
|
+
"chalk": "6.0.0",
|
|
23
32
|
"cheerio": "1.2.0",
|
|
24
33
|
"depcheck": "1.4.7",
|
|
25
34
|
"domhandler": "6.0.1",
|
|
26
|
-
"execa": "
|
|
27
|
-
"listr2": "
|
|
35
|
+
"execa": "10.0.1",
|
|
36
|
+
"listr2": "11.0.1",
|
|
28
37
|
"node-fetch": "3.3.2",
|
|
29
38
|
"p-reduce": "3.0.0",
|
|
30
|
-
"readdirp": "5.
|
|
31
|
-
"semver": "7.
|
|
32
|
-
"top-user-agents": "2.1.108"
|
|
39
|
+
"readdirp": "5.1.1",
|
|
40
|
+
"semver": "7.8.5"
|
|
33
41
|
},
|
|
34
42
|
"devDependencies": {
|
|
35
|
-
"@types/node": "
|
|
43
|
+
"@types/node": "26.4.0",
|
|
36
44
|
"@types/p-map": "2.0.0",
|
|
37
|
-
"@types/semver": "7.
|
|
38
|
-
"eslint": "10.
|
|
39
|
-
"eslint-config-upleveled": "10.0.
|
|
40
|
-
"p-map": "7.0.
|
|
41
|
-
"prettier": "3.
|
|
42
|
-
"stylelint": "17.
|
|
45
|
+
"@types/semver": "7.8.0",
|
|
46
|
+
"eslint": "10.9.1",
|
|
47
|
+
"eslint-config-upleveled": "10.0.2",
|
|
48
|
+
"p-map": "7.0.7",
|
|
49
|
+
"prettier": "3.9.6",
|
|
50
|
+
"stylelint": "17.14.1",
|
|
43
51
|
"typescript": "6.0.3",
|
|
44
|
-
"typescript-eslint": "8.
|
|
45
|
-
"vitest": "4.1.
|
|
52
|
+
"typescript-eslint": "8.68.0",
|
|
53
|
+
"vitest": "4.1.11"
|
|
46
54
|
},
|
|
47
55
|
"engines": {
|
|
48
56
|
"node": ">=22"
|
|
49
57
|
},
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"test": "vitest run",
|
|
57
|
-
"test-local": "rm -rf ./__tests__/fixtures/__temp && pnpm test"
|
|
58
|
+
"devEngines": {
|
|
59
|
+
"packageManager": {
|
|
60
|
+
"name": "pnpm",
|
|
61
|
+
"version": "11.24.0",
|
|
62
|
+
"onFail": "download"
|
|
63
|
+
}
|
|
58
64
|
}
|
|
59
|
-
}
|
|
65
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { promises as fs } from 'node:fs';
|
|
2
1
|
import { execa } from 'execa';
|
|
3
2
|
import { commandExample } from '../util/commandExample.ts';
|
|
4
3
|
import { isDrone } from '../util/drone.ts';
|
|
@@ -6,14 +5,6 @@ import { isDrone } from '../util/drone.ts';
|
|
|
6
5
|
export const title = 'All changes committed to Git';
|
|
7
6
|
|
|
8
7
|
export default async function allChangesCommittedToGit() {
|
|
9
|
-
const { stdout: replSlug } = await execa`echo $REPL_SLUG`;
|
|
10
|
-
|
|
11
|
-
const isRunningInReplIt = replSlug !== '';
|
|
12
|
-
|
|
13
|
-
if (isRunningInReplIt) {
|
|
14
|
-
await fs.writeFile('.git/info/exclude', '.replit\n');
|
|
15
|
-
}
|
|
16
|
-
|
|
17
8
|
const { stdout } = await execa`git status --porcelain`;
|
|
18
9
|
|
|
19
10
|
if (stdout !== '') {
|
|
@@ -2,7 +2,6 @@ import { load } from 'cheerio';
|
|
|
2
2
|
import type { Element } from 'domhandler';
|
|
3
3
|
import { execa } from 'execa';
|
|
4
4
|
import fetch from 'node-fetch';
|
|
5
|
-
import { randomUserAgent } from '../util/randomUserAgent.ts';
|
|
6
5
|
|
|
7
6
|
export const title = 'GitHub repo has deployed project link under About';
|
|
8
7
|
|
|
@@ -32,16 +31,11 @@ export default async function linkOnGithubAbout() {
|
|
|
32
31
|
|
|
33
32
|
if (!urlInAboutSection) {
|
|
34
33
|
throw new Error(
|
|
35
|
-
`Deployed project link not found in About section on ${repoUrl}. Click on the
|
|
34
|
+
`Deployed project link not found in About section on ${repoUrl}. Click on the gear symbol to the right of the About heading and paste the StackBlitz / Netlify / Fly.io / Vercel link in the Website box.`,
|
|
36
35
|
);
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
const response = await fetch(urlInAboutSection
|
|
40
|
-
headers: {
|
|
41
|
-
// For Replit
|
|
42
|
-
'user-agent': randomUserAgent(),
|
|
43
|
-
},
|
|
44
|
-
});
|
|
38
|
+
const response = await fetch(urlInAboutSection);
|
|
45
39
|
|
|
46
40
|
if (!response.ok) {
|
|
47
41
|
throw new Error(
|
package/src/index.ts
CHANGED
|
@@ -95,7 +95,7 @@ const listrTasks: ListrTask[] = [
|
|
|
95
95
|
|
|
96
96
|
const tasks = new Listr(listrTasks, {
|
|
97
97
|
exitOnError: false,
|
|
98
|
-
collectErrors:
|
|
98
|
+
collectErrors: true,
|
|
99
99
|
rendererOptions: {
|
|
100
100
|
collapseErrors: false,
|
|
101
101
|
removeEmptyLines: false,
|
|
@@ -107,6 +107,6 @@ const tasks = new Listr(listrTasks, {
|
|
|
107
107
|
|
|
108
108
|
await tasks.run();
|
|
109
109
|
|
|
110
|
-
if (tasks.errors.length > 0) {
|
|
110
|
+
if (tasks.errors && tasks.errors.length > 0) {
|
|
111
111
|
process.exit(1);
|
|
112
112
|
}
|