mktcms 0.2.9 → 0.2.11

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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mktcms",
3
3
  "configKey": "mktcms",
4
- "version": "0.2.9",
4
+ "version": "0.2.11",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -41,50 +41,52 @@ async function login() {
41
41
 
42
42
  <template>
43
43
  <Admin>
44
- <h1 class="text-3xl font-bold">
45
- Anmelden
46
- </h1>
47
- <h2 class="text-gray-500">
48
- Administration: {{ siteUrl.replace(/https?:\/\//, "") }}
49
- </h2>
50
- <div class="mt-6">
51
- <label
52
- for="adminAuthKey"
53
- class="text-gray-700"
54
- >
55
- Schlüssel:
56
- </label>
57
- <div class="flex gap-2 mt-2">
58
- <input
59
- id="adminAuthKey"
60
- v-model="adminAuthKey"
61
- type="password"
62
- class="border border-gray-300 rounded-md p-2 flex-1"
63
- autocomplete="one-time-code"
64
- @keyup.enter="login"
65
- >
66
- <input
67
- ref="adminAuthKeyFileInput"
68
- type="file"
69
- accept=".txt,text/plain"
70
- class="hidden"
71
- @change="onAdminAuthKeyFileSelected"
44
+ <div class="boxed">
45
+ <h1 class="text-3xl font-bold">
46
+ Anmelden
47
+ </h1>
48
+ <h2 class="text-gray-500">
49
+ Administration: {{ siteUrl.replace(/https?:\/\//, "") }}
50
+ </h2>
51
+ <div class="mt-6">
52
+ <label
53
+ for="adminAuthKey"
54
+ class="text-gray-700"
72
55
  >
56
+ Schlüssel:
57
+ </label>
58
+ <div class="flex gap-2 mt-2">
59
+ <input
60
+ id="adminAuthKey"
61
+ v-model="adminAuthKey"
62
+ type="password"
63
+ class="border border-gray-300 rounded-md p-2 flex-1"
64
+ autocomplete="one-time-code"
65
+ @keyup.enter="login"
66
+ >
67
+ <input
68
+ ref="adminAuthKeyFileInput"
69
+ type="file"
70
+ accept=".txt,text/plain"
71
+ class="hidden"
72
+ @change="onAdminAuthKeyFileSelected"
73
+ >
74
+ <button
75
+ type="button"
76
+ class="button secondary"
77
+ @click="openAdminAuthKeyFilePicker"
78
+ >
79
+ Datei wählen
80
+ </button>
81
+ </div>
73
82
  <button
74
83
  type="button"
75
- class="button secondary"
76
- @click="openAdminAuthKeyFilePicker"
84
+ class="button w-full justify-center mt-2.5"
85
+ @click="login"
77
86
  >
78
- Datei wählen
87
+ Anmelden
79
88
  </button>
80
89
  </div>
81
- <button
82
- type="button"
83
- class="button w-full justify-center mt-2.5"
84
- @click="login"
85
- >
86
- Anmelden
87
- </button>
88
90
  </div>
89
91
  </Admin>
90
92
  </template>
@@ -31,4 +31,14 @@ export default async function syncGitContent(commitMessage, files) {
31
31
  } catch (error) {
32
32
  throw new Error(toGitErrorMessage(error, "Git push failed"));
33
33
  }
34
+ try {
35
+ const currentBranch = (await git.branchLocal()).current;
36
+ const remotes = await git.getRemotes(true);
37
+ const hasOriginRemote = remotes.some((remote) => remote.name === "origin");
38
+ if (hasOriginRemote) {
39
+ await git.fetch(["--prune", "origin", currentBranch]);
40
+ }
41
+ } catch (error) {
42
+ throw new Error(toGitErrorMessage(error, "Git status refresh failed"));
43
+ }
34
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mktcms",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
4
  "description": "Simple CMS module for Nuxt",
5
5
  "repository": "mktcode/mktcms",
6
6
  "license": "MIT",
@@ -28,8 +28,6 @@
28
28
  "dev:build": "nuxi build playground",
29
29
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
30
30
  "release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
31
- "release:minor": "npm run lint && npm run test && npm run prepack && changelogen --release --minor && npm publish && git push --follow-tags",
32
- "release:major": "npm run lint && npm run test && npm run prepack && changelogen --release --major && npm publish && git push --follow-tags",
33
31
  "lint": "eslint .",
34
32
  "lint:fix": "eslint . --fix",
35
33
  "test": "vitest run",