Skip to content

Commit ddbdd5a

Browse files
authored
Bump Deno runtime 2.2.12, added devcontainer settings (#43)
* Bump Deno runtime 2.2.12, added devcontainer settings * Fixed fmt
1 parent 586cfb3 commit ddbdd5a

File tree

12 files changed

+100
-35
lines changed

12 files changed

+100
-35
lines changed

.devcontainer/Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM denoland/deno:2.2.12
2+
3+
# Install tools
4+
RUN apt-get update && \
5+
apt-get install -y git && \
6+
rm -rf /var/lib/apt/lists/*
7+
8+
# Creates a non-root user for the devcontainer
9+
ARG USERNAME=developer
10+
ARG USER_UID=1000
11+
ARG USER_GID=$USER_UID
12+
RUN groupadd --gid "$USER_GID" "$USERNAME" \
13+
&& useradd -s /bin/bash --uid "$USER_UID" --gid "$USER_GID" -m "$USERNAME" \
14+
&& mkdir -p /home/"$USERNAME"/.deno \
15+
&& chown -R "$USERNAME":"$USERNAME" /home/"$USERNAME" \
16+
&& chown -R "$USERNAME":"$USERNAME" /deno-dir
17+
18+
# Switch to the non-root user
19+
USER $USERNAME
20+
21+
# Set the working directory
22+
WORKDIR /home/$USERNAME/workspace

.devcontainer/devcontainer.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "Switcher Management Feature Dev Container",
3+
"dockerComposeFile": [
4+
"docker-compose.yml"
5+
],
6+
"service": "switcher-management-feature",
7+
"workspaceFolder": "/workspace",
8+
"customizations":{
9+
"vscode": {
10+
"extensions": ["denoland.vscode-deno"],
11+
"settings": {
12+
"terminal.integrated.shell.linux": "/bin/bash"
13+
}
14+
}
15+
}
16+
}

.devcontainer/docker-compose.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: '3.9'
2+
3+
services:
4+
5+
switcher-management-feature:
6+
build:
7+
context: .
8+
dockerfile: Dockerfile
9+
volumes:
10+
- ..:/workspace:cached
11+
command: sleep infinity

.github/workflows/master.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
with:
1919
fetch-depth: 0
2020

21-
- name: Setup Deno v2.2.8
21+
- name: Setup Deno v2.2.12
2222
uses: denoland/setup-deno@v1
2323
with:
24-
deno-version: v2.2.8
24+
deno-version: v2.2.12
2525

2626
- name: Setup LCOV
2727
run: sudo apt install -y lcov

.github/workflows/re-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
fetch-depth: 0
2222
ref: ${{ github.event.inputs.tag }}
2323

24-
- name: Setup Deno v2.2.8
24+
- name: Setup Deno v2.2.12
2525
uses: denoland/setup-deno@v1
2626
with:
27-
deno-version: v2.2.8
27+
deno-version: v2.2.12
2828

2929
- name: Verify formatting
3030
run: deno task fmt

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
with:
1717
fetch-depth: 0
1818

19-
- name: Setup Deno v2.2.8
19+
- name: Setup Deno v2.2.12
2020
uses: denoland/setup-deno@v1
2121
with:
22-
deno-version: v2.2.8
22+
deno-version: v2.2.12
2323

2424
- name: Verify formatting
2525
run: deno task fmt

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM denoland/deno:alpine-2.2.8
1+
FROM denoland/deno:alpine-2.2.12
22

33
ENV APP_HOME=/home/app
44
WORKDIR $APP_HOME

deno.lock

Lines changed: 29 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/api-docs/paths/common.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,3 @@ export const commonSchemaContent = (ref: string) => ({
55
},
66
},
77
});
8-
9-
export const commonArraySchemaContent = (ref: string) => ({
10-
'application/json': {
11-
schema: {
12-
type: 'array',
13-
items: {
14-
$ref: `#/components/schemas/${ref}`,
15-
},
16-
},
17-
},
18-
});
19-
20-
export const commonOneOfSchemaContent = (refs: string[]) => ({
21-
'application/json': {
22-
schema: {
23-
oneOf: refs.map((ref) => ({
24-
$ref: `#/components/schemas/${ref}`,
25-
})),
26-
},
27-
},
28-
});

src/deps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ export { Application, Context, type Middleware, type Next, Router } from 'jsr:@o
22
export { Client } from 'jsr:@switcherapi/switcher-client-deno@2.1.0';
33
export { ValidatorFn, ValidatorMiddleware } from 'jsr:@trackerforce/validator4oak@1.2.0';
44
export { load } from 'jsr:@std/dotenv@0.225.3';
5-
export { bold, cyan, green } from 'jsr:@std/fmt@1.0.6/colors';
5+
export { bold, cyan, green } from 'jsr:@std/fmt@1.0.7/colors';

0 commit comments

Comments
 (0)