diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index ef4a52c..c936144 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -12,7 +12,7 @@ jobs: steps: # Checkout the repository to the GitHub Actions runner - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Repo metadata - name: Repo metadata @@ -53,7 +53,7 @@ jobs: echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ') # Set up Buildx env - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 # Login - name: Login to GitHub Container Registry @@ -65,7 +65,7 @@ jobs: # Build image and push to registry - name: Build and push - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . file: ./Dockerfile diff --git a/.github/workflows/vscode-publish.yml b/.github/workflows/vscode-publish.yml index 33c7953..0a1f9c8 100644 --- a/.github/workflows/vscode-publish.yml +++ b/.github/workflows/vscode-publish.yml @@ -8,8 +8,8 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 16 - run: npm ci diff --git a/Dockerfile b/Dockerfile index c1f7705..d311a1f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1.2 -FROM golang:1.19-bullseye as builder +FROM golang:1.20-bullseye as builder LABEL maintainer="allan.nava@hiway.media" ENV DOCKER_BUILDKIT=1 # diff --git a/extensions/vscode/src/extension.ts b/extensions/vscode/src/extension.ts index d5d7c94..133cc37 100644 --- a/extensions/vscode/src/extension.ts +++ b/extensions/vscode/src/extension.ts @@ -2,8 +2,12 @@ // Import the module and reference it with the alias vscode in your code below import * as vscode from 'vscode'; import * as _ from "lodash"; +import * as mkdirp from "mkdirp"; import { newScaffold } from "./commands"; // +let homeDir = os.homedir(); +let CONFIG_PATH : string; +// // This method is called when your extension is activated // Your extension is activated the very first time the command is executed export function activate(context: vscode.ExtensionContext) { @@ -12,6 +16,11 @@ export function activate(context: vscode.ExtensionContext) { // This line of code will only be executed once when your extension is activated console.log('Congratulations, your extension "go-ddd-scaffold" is now active!'); // + CONFIG_PATH = getConfigPath(CONFIG_NAME); + /// https://github.com/Microsoft/vscode-extension-samples/blob/master/configuration-sample/src/extension.ts + //console.log(ConfigurationTarget.Workspace); + console.log(`CONFIG_PATH = ${CONFIG_PATH}`); + // // The command has been defined in the package.json file // Now provide the implementation of the command with registerCommand // The commandId parameter must match the command field in package.json @@ -30,4 +39,40 @@ export function activate(context: vscode.ExtensionContext) { // // This method is called when your extension is deactivated export function deactivate() {} -// \ No newline at end of file +// +/// +window.onDidChangeActiveTextEditor(function(event){ + console.log("onDidChangeActiveTextEditor "+event); +}); +// +/// +async function promptForTargetFiles(): Promise { + console.log("promptForTargetFiles()"); + const options: OpenDialogOptions = { + canSelectMany: false, + openLabel: "Select a file to upload", + canSelectFolders: false, + canSelectFiles: true, + }; + + return window.showOpenDialog(options).then(uri => { + if (_.isNil(uri) || _.isEmpty(uri)) { + return undefined; + } + return uri[0].fsPath; + }); +} +/// + +// +function createDirectory(targetDirectory: string): Promise { + return new Promise((resolve, reject) => { + mkdirp(targetDirectory, { mode: '0777' }).then(made => { + if(made){ + return reject(made); + } + resolve(); + }); + }); +} +/// \ No newline at end of file diff --git a/go.mod b/go.mod index aeb6609..59ce252 100644 --- a/go.mod +++ b/go.mod @@ -14,6 +14,6 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/urfave/cli/v2 v2.23.7 + github.com/urfave/cli/v2 v2.24.3 gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 2a797e7..00e1109 100644 --- a/go.sum +++ b/go.sum @@ -16,8 +16,10 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/urfave/cli/v2 v2.23.7 h1:YHDQ46s3VghFHFf1DdF+Sh7H4RqhcM+t0TmZRJx4oJY= -github.com/urfave/cli/v2 v2.23.7/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= +github.com/urfave/cli/v2 v2.24.2 h1:q1VA+ofZ8SWfEKB9xXHUD4QZaeI9e+ItEqSbfH2JBXk= +github.com/urfave/cli/v2 v2.24.2/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= +github.com/urfave/cli/v2 v2.24.3 h1:7Q1w8VN8yE0MJEHP06bv89PjYsN4IHWED2s1v/Zlfm0= +github.com/urfave/cli/v2 v2.24.3/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..39a2b6e --- /dev/null +++ b/renovate.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:base" + ] +} diff --git a/template/Dockerfile b/template/Dockerfile index d396947..22a3528 100644 --- a/template/Dockerfile +++ b/template/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1.2 -FROM golang:1.19-bullseye as builder +FROM golang:1.20-bullseye as builder LABEL maintainer="allan.nava@hiway.media" ENV DOCKER_BUILDKIT=1 #