@dword-design/base-config-app 5.0.7 → 6.0.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/README.md CHANGED
@@ -3,49 +3,49 @@
3
3
  <!-- /TITLE -->
4
4
 
5
5
  <!-- BADGES/ -->
6
- <p>
7
- <a href="https://npmjs.org/package/@dword-design/base-config-app">
8
- <img
9
- src="https://img.shields.io/npm/v/@dword-design/base-config-app.svg"
10
- alt="npm version"
11
- >
12
- </a><img src="https://img.shields.io/badge/os-linux%20%7C%C2%A0macos%20%7C%C2%A0windows-blue" alt="Linux macOS Windows compatible"><a href="https://github.com/dword-design/base-config-app/actions">
13
- <img
14
- src="https://github.com/dword-design/base-config-app/workflows/build/badge.svg"
15
- alt="Build status"
16
- >
17
- </a><a href="https://codecov.io/gh/dword-design/base-config-app">
18
- <img
19
- src="https://codecov.io/gh/dword-design/base-config-app/branch/master/graph/badge.svg"
20
- alt="Coverage status"
21
- >
22
- </a><a href="https://david-dm.org/dword-design/base-config-app">
23
- <img src="https://img.shields.io/david/dword-design/base-config-app" alt="Dependency status">
24
- </a><img src="https://img.shields.io/badge/renovate-enabled-brightgreen" alt="Renovate enabled"><br/><a href="https://gitpod.io/#https://github.com/dword-design/base-config-app">
25
- <img
26
- src="https://gitpod.io/button/open-in-gitpod.svg"
27
- alt="Open in Gitpod"
28
- width="114"
29
- >
30
- </a><a href="https://www.buymeacoffee.com/dword">
31
- <img
32
- src="https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-2.svg"
33
- alt="Buy Me a Coffee"
34
- width="114"
35
- >
36
- </a><a href="https://paypal.me/SebastianLandwehr">
37
- <img
38
- src="https://sebastianlandwehr.com/images/paypal.svg"
39
- alt="PayPal"
40
- width="163"
41
- >
42
- </a><a href="https://www.patreon.com/dworddesign">
43
- <img
44
- src="https://sebastianlandwehr.com/images/patreon.svg"
45
- alt="Patreon"
46
- width="163"
47
- >
48
- </a>
6
+ <p>
7
+ <a href="https://npmjs.org/package/@dword-design/base-config-app">
8
+ <img
9
+ src="https://img.shields.io/npm/v/@dword-design/base-config-app.svg"
10
+ alt="npm version"
11
+ >
12
+ </a><img src="https://img.shields.io/badge/os-linux%20%7C%C2%A0macos%20%7C%C2%A0windows-blue" alt="Linux macOS Windows compatible"><a href="https://github.com/dword-design/base-config-app/actions">
13
+ <img
14
+ src="https://github.com/dword-design/base-config-app/workflows/build/badge.svg"
15
+ alt="Build status"
16
+ >
17
+ </a><a href="https://codecov.io/gh/dword-design/base-config-app">
18
+ <img
19
+ src="https://codecov.io/gh/dword-design/base-config-app/branch/master/graph/badge.svg"
20
+ alt="Coverage status"
21
+ >
22
+ </a><a href="https://david-dm.org/dword-design/base-config-app">
23
+ <img src="https://img.shields.io/david/dword-design/base-config-app" alt="Dependency status">
24
+ </a><img src="https://img.shields.io/badge/renovate-enabled-brightgreen" alt="Renovate enabled"><br/><a href="https://gitpod.io/#https://github.com/dword-design/base-config-app">
25
+ <img
26
+ src="https://gitpod.io/button/open-in-gitpod.svg"
27
+ alt="Open in Gitpod"
28
+ width="114"
29
+ >
30
+ </a><a href="https://www.buymeacoffee.com/dword">
31
+ <img
32
+ src="https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-2.svg"
33
+ alt="Buy Me a Coffee"
34
+ width="114"
35
+ >
36
+ </a><a href="https://paypal.me/SebastianLandwehr">
37
+ <img
38
+ src="https://sebastianlandwehr.com/images/paypal.svg"
39
+ alt="PayPal"
40
+ width="163"
41
+ >
42
+ </a><a href="https://www.patreon.com/dworddesign">
43
+ <img
44
+ src="https://sebastianlandwehr.com/images/patreon.svg"
45
+ alt="Patreon"
46
+ width="163"
47
+ >
48
+ </a>
49
49
  </p>
50
50
  <!-- /BADGES -->
51
51
 
@@ -0,0 +1,20 @@
1
+ declare const _default: {
2
+ services: {
3
+ proxy: {
4
+ depends_on: string[];
5
+ image: string;
6
+ ports: string[];
7
+ volumes: string[];
8
+ };
9
+ web: {
10
+ command: string;
11
+ environment: string[];
12
+ image: string;
13
+ ports: string[];
14
+ volumes: string[];
15
+ working_dir: string;
16
+ };
17
+ };
18
+ version: string;
19
+ };
20
+ export default _default;
@@ -1,20 +1,20 @@
1
- import nodejsVersion from 'tagged-template-noop';
1
+ import nodejsVersion from "tagged-template-noop";
2
2
  export default {
3
3
  services: {
4
4
  proxy: {
5
- depends_on: ['web'],
6
- image: 'nginx:1',
7
- ports: ['80:80'],
8
- volumes: ['./nginx:/etc/nginx/conf.d']
5
+ depends_on: ["web"],
6
+ image: "nginx:1",
7
+ ports: ["80:80"],
8
+ volumes: ["./nginx:/etc/nginx/conf.d"]
9
9
  },
10
10
  web: {
11
11
  command: 'bash -c "pnpm install --frozen-lockfile && pnpm dev"',
12
- environment: ['HOST=0.0.0.0'],
12
+ environment: ["HOST=0.0.0.0"],
13
13
  image: `node:${nodejsVersion`22`}`,
14
- ports: ['3000:3000'],
15
- volumes: ['.:/app', '/app/node_modules'],
16
- working_dir: '/app'
14
+ ports: ["3000:3000"],
15
+ volumes: [".:/app", "/app/node_modules"],
16
+ working_dir: "/app"
17
17
  }
18
18
  },
19
- version: '3'
19
+ version: "3"
20
20
  };
@@ -0,0 +1,15 @@
1
+ declare const _default: (packageConfig: any, { cwd }?: {
2
+ cwd?: string | undefined;
3
+ }) => {
4
+ apps: {
5
+ args: string;
6
+ exec_mode: string;
7
+ instances: string;
8
+ name: any;
9
+ script: string;
10
+ }[];
11
+ deploy: {
12
+ production: any;
13
+ };
14
+ };
15
+ export default _default;
@@ -1,37 +1,37 @@
1
- import pathLib from 'node:path';
2
- import fs from 'fs-extra';
3
- import hostedGitInfo from 'hosted-git-info';
4
- import parseGitConfig from 'parse-git-config';
5
- import parsePackagejsonName from 'parse-packagejson-name';
1
+ import pathLib from "node:path";
2
+ import fs from "fs-extra";
3
+ import hostedGitInfo from "hosted-git-info";
4
+ import parseGitConfig from "parse-git-config";
5
+ import parsePackagejsonName from "parse-packagejson-name";
6
6
  export default (packageConfig, {
7
- cwd = '.'
7
+ cwd = "."
8
8
  } = {}) => {
9
- const repositoryUrl = fs.existsSync(pathLib.join(cwd, '.git')) ? parseGitConfig.sync({
9
+ const repositoryUrl = fs.existsSync(pathLib.join(cwd, ".git")) ? parseGitConfig.sync({
10
10
  cwd
11
- })['remote "origin"']?.url : undefined;
11
+ })['remote "origin"']?.url : void 0;
12
12
  const gitInfo = hostedGitInfo.fromUrl(repositoryUrl) || {};
13
- if (repositoryUrl !== undefined && gitInfo.type !== 'github') {
14
- throw new Error('Only GitHub repositories are supported.');
13
+ if (repositoryUrl !== void 0 && gitInfo.type !== "github") {
14
+ throw new Error("Only GitHub repositories are supported.");
15
15
  }
16
16
  const packageName = parsePackagejsonName(packageConfig.name).fullName;
17
17
  return {
18
18
  apps: [{
19
- args: 'start',
20
- exec_mode: 'cluster',
21
- instances: 'max',
19
+ args: "start",
20
+ exec_mode: "cluster",
21
+ instances: "max",
22
22
  name: packageName,
23
- script: 'npm'
23
+ script: "npm"
24
24
  }],
25
25
  deploy: {
26
26
  production: {
27
- host: ['sebastianlandwehr.com'],
27
+ host: ["sebastianlandwehr.com"],
28
28
  path: `/var/www/${packageName}`,
29
- user: 'root',
29
+ user: "root",
30
30
  ...(repositoryUrl && {
31
31
  repo: `git@github.com:${gitInfo.user}/${gitInfo.project}.git`
32
32
  }),
33
- 'post-deploy': 'source ~/.nvm/nvm.sh && pnpm install --frozen-lockfile && pnpm checkUnknownFiles && pnpm prepublishOnly && pm2 startOrReload ecosystem.json',
34
- ref: 'origin/master'
33
+ "post-deploy": "source ~/.nvm/nvm.sh && pnpm install --frozen-lockfile && pnpm checkUnknownFiles && pnpm prepublishOnly && pm2 startOrReload ecosystem.json",
34
+ ref: "origin/master"
35
35
  }
36
36
  }
37
37
  };
@@ -0,0 +1,2 @@
1
+ declare const _default: (packageConfig: any) => any;
2
+ export default _default;
@@ -1,8 +1,8 @@
1
- import dedent from 'dedent';
2
- import parsePackagejsonName from 'parse-packagejson-name';
1
+ import endent from "endent";
2
+ import parsePackagejsonName from "parse-packagejson-name";
3
3
  export default packageConfig => {
4
4
  const packageName = parsePackagejsonName(packageConfig.name).fullName;
5
- return dedent`
5
+ return endent`
6
6
  upstream web {
7
7
  server web:3000;
8
8
  }
@@ -0,0 +1 @@
1
+ export default function (config: any): any;
package/dist/index.js CHANGED
@@ -1,37 +1,43 @@
1
- import getBaseConfigNuxt from '@dword-design/base-config-nuxt';
2
- import packageName from 'depcheck-package-name';
3
- import { execaCommand } from 'execa';
4
- import loadPkg from 'load-pkg';
5
- import outputFiles from 'output-files';
6
- import yaml from 'yaml';
1
+ import getBaseConfigNuxt, { getEslintConfig } from "@dword-design/base-config-nuxt";
2
+ import packageName from "depcheck-package-name";
3
+ import { execaCommand } from "execa";
4
+ import loadPkg from "load-pkg";
5
+ import outputFiles from "output-files";
6
+ import yaml from "yaml";
7
7
  import dockerCompose from "./docker-compose.js";
8
8
  import getEcosystemConfig from "./get-ecosystem-config.js";
9
9
  import getNginxConfig from "./get-nginx-config.js";
10
10
  export default function (config) {
11
- const packageConfig = loadPkg.sync();
11
+ const packageConfig = loadPkg.sync({
12
+ cwd: this.cwd
13
+ });
12
14
  const baseConfigNuxt = getBaseConfigNuxt.call(this, config);
13
15
  return {
14
16
  ...baseConfigNuxt,
15
- allowedMatches: [...baseConfigNuxt.allowedMatches, 'docker-compose.yml', 'ecosystem.json', 'nginx'],
16
- editorIgnore: [...baseConfigNuxt.editorIgnore, 'docker-compose.yml', 'ecosystem.json', 'nginx'],
17
- gitignore: [...baseConfigNuxt.gitignore, '/.ceilingrc.json', '/nginx/default.config'],
17
+ allowedMatches: [...baseConfigNuxt.allowedMatches, "docker-compose.yml", "ecosystem.json", "nginx"],
18
+ editorIgnore: [...baseConfigNuxt.editorIgnore, "docker-compose.yml", "ecosystem.json", "nginx"],
19
+ eslintConfig: getEslintConfig({
20
+ ignore: ["ecosystem.json"],
21
+ virtualImports: config.virtualImports
22
+ }),
23
+ gitignore: [...baseConfigNuxt.gitignore, "/.ceilingrc.json", "/nginx/default.config"],
18
24
  isLockFileFixCommitType: true,
19
25
  npmPublish: false,
20
26
  packageConfig: {
21
- main: 'dist/index.js'
27
+ main: "dist/index.js"
22
28
  },
23
29
  prepare: async () => {
24
30
  await baseConfigNuxt.prepare();
25
31
  return outputFiles(this.cwd, {
26
- 'docker-compose.yml': yaml.stringify(dockerCompose),
27
- 'ecosystem.json': JSON.stringify(getEcosystemConfig(packageConfig, {
32
+ "docker-compose.yml": yaml.stringify(dockerCompose),
33
+ "ecosystem.json": JSON.stringify(getEcosystemConfig(packageConfig, {
28
34
  cwd: this.cwd
29
- }), undefined, 2),
30
- 'nginx/default.config': getNginxConfig(packageConfig)
35
+ }), void 0, 2),
36
+ "nginx/default.config": getNginxConfig(packageConfig)
31
37
  });
32
38
  },
33
39
  renovateConfig: {
34
- ignorePaths: ['docker-compose.yml']
40
+ ignorePaths: ["docker-compose.yml"]
35
41
  },
36
42
  useJobMatrix: false,
37
43
  ...(!packageConfig.private && {
@@ -39,31 +45,31 @@ export default function (config) {
39
45
  publishCmd: `${packageName`pm2`} deploy production --force`
40
46
  }]],
41
47
  preDeploySteps: [{
42
- uses: 'webfactory/ssh-agent@v0.5.1',
48
+ uses: "webfactory/ssh-agent@v0.5.1",
43
49
  with: {
44
- 'ssh-private-key': '${{ secrets.SSH_PRIVATE_KEY }}'
50
+ "ssh-private-key": "${{ secrets.SSH_PRIVATE_KEY }}"
45
51
  }
46
52
  }, {
47
- run: 'ssh-keyscan sebastianlandwehr.com >> ~/.ssh/known_hosts'
53
+ run: "ssh-keyscan sebastianlandwehr.com >> ~/.ssh/known_hosts"
48
54
  }]
49
55
  }),
50
56
  commands: {
51
57
  ...baseConfigNuxt.commands,
52
58
  pull: {
53
- arguments: '<endpoint>',
59
+ arguments: "<endpoint>",
54
60
  handler: endpoint => execaCommand(`ceiling pull ${endpoint}`, {
55
- stdio: 'inherit'
61
+ stdio: "inherit"
56
62
  })
57
63
  },
58
64
  push: {
59
- arguments: '<endpoint>',
65
+ arguments: "<endpoint>",
60
66
  handler: endpoint => execaCommand(`ceiling push ${endpoint}`, {
61
- stdio: 'inherit'
67
+ stdio: "inherit"
62
68
  })
63
69
  },
64
70
  setupDeploy: {
65
- handler: () => execaCommand('pm2 deploy production setup', {
66
- stdio: 'inherit'
71
+ handler: () => execaCommand("pm2 deploy production setup", {
72
+ stdio: "inherit"
67
73
  })
68
74
  }
69
75
  }
package/package.json CHANGED
@@ -1,12 +1,19 @@
1
1
  {
2
2
  "name": "@dword-design/base-config-app",
3
- "version": "5.0.7",
3
+ "version": "6.0.0",
4
4
  "repository": "dword-design/base-config-app",
5
5
  "funding": "https://github.com/sponsors/dword-design",
6
6
  "license": "MIT",
7
7
  "author": "Sebastian Landwehr <info@sebastianlandwehr.com>",
8
8
  "type": "module",
9
- "exports": "./dist/index.js",
9
+ "exports": {
10
+ ".": {
11
+ "import": {
12
+ "default": "./dist/index.js",
13
+ "types": "./dist/index.d.ts"
14
+ }
15
+ }
16
+ },
10
17
  "main": "dist/index.js",
11
18
  "files": [
12
19
  "dist"
@@ -22,11 +29,11 @@
22
29
  "test": "base test"
23
30
  },
24
31
  "dependencies": {
25
- "@dword-design/base-config-nuxt": "^6.2.7",
32
+ "@dword-design/base-config-nuxt": "^7.0.0",
26
33
  "@semantic-release/exec": "^6.0.3",
27
34
  "ceiling": "^4.0.0",
28
- "dedent": "^1.6.0",
29
35
  "depcheck-package-name": "^3.0.1",
36
+ "endent": "npm:@dword-design/endent@^1.4.1",
30
37
  "execa": "^9.6.0",
31
38
  "fs-extra": "^11.3.0",
32
39
  "hosted-git-info": "^7.0.2",
@@ -39,12 +46,12 @@
39
46
  "yaml": "^2.8.0"
40
47
  },
41
48
  "devDependencies": {
42
- "@dword-design/base": "^12.0.19",
43
- "@playwright/test": "^1.52.0",
49
+ "@dword-design/base": "^13.0.7",
50
+ "@playwright/test": "^1.53.0",
44
51
  "get-port": "^7.1.0",
45
- "nuxt-dev-ready": "^3.0.0",
46
- "playwright": "^1.52.0",
47
- "playwright-chromium": "^1.52.0",
52
+ "nuxt-dev-ready": "^4.0.1",
53
+ "playwright": "^1.53.0",
54
+ "playwright-chromium": "^1.53.0",
48
55
  "tree-kill-promise": "^3.0.14"
49
56
  },
50
57
  "packageManager": "pnpm@10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977",