create-sprint 0.0.124 → 0.0.128
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.
|
@@ -10,7 +10,13 @@ export default defineMiddleware({
|
|
|
10
10
|
schema: {
|
|
11
11
|
sprint: {
|
|
12
12
|
authorization: z.sprint().authorization()
|
|
13
|
-
}
|
|
13
|
+
},
|
|
14
|
+
headers: z.object({
|
|
15
|
+
"X-Intranet-Origin": z.literal("https://domain.com", {
|
|
16
|
+
// This is an example of how to display a custom error message to avoid filtering values that should not be publicly known.
|
|
17
|
+
errorMap: () => ({ message: "Invalid intranet origin" })
|
|
18
|
+
})
|
|
19
|
+
})
|
|
14
20
|
},
|
|
15
21
|
handler: (req: SprintRequest, res: SprintResponse, next: NextFunction) => {
|
|
16
22
|
const auth = req.sprint.authorization!;
|
|
@@ -34,7 +40,13 @@ export default defineMiddleware({
|
|
|
34
40
|
schema: {
|
|
35
41
|
sprint: {
|
|
36
42
|
authorization: z.sprint().authorization()
|
|
37
|
-
}
|
|
43
|
+
},
|
|
44
|
+
headers: z.object({
|
|
45
|
+
"X-Intranet-Origin": z.literal("https://domain.com", {
|
|
46
|
+
// This is an example of how to display a custom error message to avoid filtering values that should not be publicly known.
|
|
47
|
+
errorMap: () => ({ message: "Invalid intranet origin" })
|
|
48
|
+
})
|
|
49
|
+
})
|
|
38
50
|
},
|
|
39
51
|
handler: (req, res, next) => {
|
|
40
52
|
const auth = req.sprint.authorization!;
|
|
@@ -10,7 +10,7 @@ export function generateJWTKeys() {
|
|
|
10
10
|
;
|
|
11
11
|
export function getTypeScriptPackageJson(name, telemetry, swagger, graphql) {
|
|
12
12
|
const deps = {
|
|
13
|
-
"sprint-es": "^0.0.
|
|
13
|
+
"sprint-es": "^0.0.150"
|
|
14
14
|
};
|
|
15
15
|
const devDeps = {
|
|
16
16
|
"@types/node": "^22.0.0",
|
|
@@ -66,7 +66,7 @@ export function getTypeScriptPackageJson(name, telemetry, swagger, graphql) {
|
|
|
66
66
|
;
|
|
67
67
|
export function getJavaScriptPackageJson(name, telemetry, swagger, graphql) {
|
|
68
68
|
const deps = {
|
|
69
|
-
"sprint-es": "^0.0.
|
|
69
|
+
"sprint-es": "^0.0.150"
|
|
70
70
|
};
|
|
71
71
|
if (telemetry === "sentry" || telemetry === "glitchtip")
|
|
72
72
|
deps["@sentry/node"] = "^8.0.0";
|
package/package.json
CHANGED
|
@@ -10,7 +10,13 @@ export default defineMiddleware({
|
|
|
10
10
|
schema: {
|
|
11
11
|
sprint: {
|
|
12
12
|
authorization: z.sprint().authorization()
|
|
13
|
-
}
|
|
13
|
+
},
|
|
14
|
+
headers: z.object({
|
|
15
|
+
"X-Intranet-Origin": z.literal("https://domain.com", {
|
|
16
|
+
// This is an example of how to display a custom error message to avoid filtering values that should not be publicly known.
|
|
17
|
+
errorMap: () => ({ message: "Invalid intranet origin" })
|
|
18
|
+
})
|
|
19
|
+
})
|
|
14
20
|
},
|
|
15
21
|
handler: (req: SprintRequest, res: SprintResponse, next: NextFunction) => {
|
|
16
22
|
const auth = req.sprint.authorization!;
|
|
@@ -34,7 +40,13 @@ export default defineMiddleware({
|
|
|
34
40
|
schema: {
|
|
35
41
|
sprint: {
|
|
36
42
|
authorization: z.sprint().authorization()
|
|
37
|
-
}
|
|
43
|
+
},
|
|
44
|
+
headers: z.object({
|
|
45
|
+
"X-Intranet-Origin": z.literal("https://domain.com", {
|
|
46
|
+
// This is an example of how to display a custom error message to avoid filtering values that should not be publicly known.
|
|
47
|
+
errorMap: () => ({ message: "Invalid intranet origin" })
|
|
48
|
+
})
|
|
49
|
+
})
|
|
38
50
|
},
|
|
39
51
|
handler: (req, res, next) => {
|
|
40
52
|
const auth = req.sprint.authorization!;
|
|
@@ -16,7 +16,7 @@ export function generateJWTKeys(): JWTKeys {
|
|
|
16
16
|
|
|
17
17
|
export function getTypeScriptPackageJson(name: string, telemetry: string, swagger: boolean, graphql: boolean) {
|
|
18
18
|
const deps: Record<string, string> = {
|
|
19
|
-
"sprint-es": "^0.0.
|
|
19
|
+
"sprint-es": "^0.0.150"
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
const devDeps: Record<string, string> = {
|
|
@@ -73,7 +73,7 @@ export function getTypeScriptPackageJson(name: string, telemetry: string, swagge
|
|
|
73
73
|
|
|
74
74
|
export function getJavaScriptPackageJson(name: string, telemetry: string, swagger: boolean, graphql: boolean) {
|
|
75
75
|
const deps: Record<string, string> = {
|
|
76
|
-
"sprint-es": "^0.0.
|
|
76
|
+
"sprint-es": "^0.0.150"
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
if (telemetry === "sentry" || telemetry === "glitchtip") deps["@sentry/node"] = "^8.0.0";
|