@dword-design/base-config-app 9.0.1 → 9.0.2

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.
@@ -1,7 +1,5 @@
1
1
  declare const _default: (packageConfig: {
2
2
  name: string;
3
- }, { cwd }?: {
4
- cwd?: string | undefined;
5
3
  }) => {
6
4
  apps: {
7
5
  args: string;
@@ -10,8 +8,5 @@ declare const _default: (packageConfig: {
10
8
  name: any;
11
9
  script: string;
12
10
  }[];
13
- deploy: {
14
- production: any;
15
- };
16
11
  };
17
12
  export default _default;
@@ -1,38 +1,13 @@
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
1
  import parsePackagejsonName from "parse-packagejson-name";
6
- export default (packageConfig, {
7
- cwd = "."
8
- } = {}) => {
9
- const repositoryUrl = fs.existsSync(pathLib.join(cwd, ".git")) ? parseGitConfig.sync({
10
- cwd
11
- })['remote "origin"']?.url : void 0;
12
- const gitInfo = hostedGitInfo.fromUrl(repositoryUrl);
13
- if (repositoryUrl !== void 0 && gitInfo?.type !== "github") {
14
- throw new Error("Only GitHub repositories are supported.");
15
- }
2
+ export default packageConfig => {
16
3
  const packageName = parsePackagejsonName(packageConfig.name).fullName;
17
4
  return {
18
5
  apps: [{
19
- args: "start",
6
+ args: "-- node .output/server/index.mjs",
20
7
  exec_mode: "cluster",
21
8
  instances: "max",
22
9
  name: packageName,
23
- script: "pnpm"
24
- }],
25
- deploy: {
26
- production: {
27
- host: ["sebastianlandwehr.com"],
28
- path: `/var/www/${packageName}`,
29
- "post-deploy": "source ~/.nvm/nvm.sh && pnpm install --frozen-lockfile && pnpm checkUnknownFiles && pnpm build && pm2 startOrReload ecosystem.json",
30
- ...(gitInfo && {
31
- repo: `git@github.com:${gitInfo.user}/${gitInfo.project}.git`
32
- }),
33
- ref: "origin/master",
34
- user: "root"
35
- }
36
- }
10
+ script: "dotenv-json-extended"
11
+ }]
37
12
  };
38
13
  };
package/dist/index.js CHANGED
@@ -34,9 +34,7 @@ export default defineBaseConfig(function (config) {
34
34
  await baseConfigNuxt.prepare();
35
35
  return outputFiles(this.cwd, {
36
36
  "docker-compose.yml": yaml.stringify(dockerCompose),
37
- "ecosystem.json": JSON.stringify(getEcosystemConfig(packageConfig, {
38
- cwd: this.cwd
39
- }), void 0, 2),
37
+ "ecosystem.json": JSON.stringify(getEcosystemConfig(packageConfig), void 0, 2),
40
38
  "nginx/default.config": getNginxConfig(packageConfig),
41
39
  "playbook.yml": playbookYml,
42
40
  "requirements.yml": requirementsYml
@@ -54,7 +52,7 @@ export default defineBaseConfig(function (config) {
54
52
  run: "pnpm build"
55
53
  }, {
56
54
  name: "Create deploy artifact",
57
- run: "tar -czf deploy.tgz .output"
55
+ run: "tar -czf deploy.tgz .output ecosystem.json"
58
56
  }, {
59
57
  name: "Install Python",
60
58
  uses: "actions/setup-python@v4",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dword-design/base-config-app",
3
- "version": "9.0.1",
3
+ "version": "9.0.2",
4
4
  "repository": "dword-design/base-config-app",
5
5
  "funding": "https://github.com/sponsors/dword-design",
6
6
  "license": "MIT",
@@ -37,9 +37,7 @@
37
37
  "endent": "npm:@dword-design/endent@^1.4.7",
38
38
  "execa": "^9.6.1",
39
39
  "fs-extra": "^11.3.2",
40
- "hosted-git-info": "^9.0.2",
41
40
  "output-files": "^3.0.0",
42
- "parse-git-config": "npm:@dword-design/parse-git-config@^0.0.1",
43
41
  "parse-packagejson-name": "npm:@dword-design/parse-packagejson-name-fork@^0.0.2",
44
42
  "pm2": "^6.0.14",
45
43
  "read-pkg": "^10.0.0",
@@ -50,8 +48,6 @@
50
48
  "@playwright/browser-chromium": "^1.57.0",
51
49
  "@playwright/test": "^1.57.0",
52
50
  "@types/fs-extra": "^11.0.4",
53
- "@types/hosted-git-info": "^3.0.5",
54
- "@types/parse-git-config": "^3.0.4",
55
51
  "get-port": "^7.1.0",
56
52
  "nuxt-dev-ready": "^5.0.1",
57
53
  "tree-kill-promise": "^4.0.0"