@x-titan/fetcher 0.0.1

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.
Files changed (139) hide show
  1. package/.obsidian/app.json +7 -0
  2. package/.obsidian/appearance.json +5 -0
  3. package/.obsidian/community-plugins.json +7 -0
  4. package/.obsidian/core-plugins.json +33 -0
  5. package/.obsidian/hotkeys.json +19 -0
  6. package/.obsidian/icons/boxicons.zip +0 -0
  7. package/.obsidian/icons/font-awesome-brands.zip +0 -0
  8. package/.obsidian/icons/font-awesome-regular.zip +0 -0
  9. package/.obsidian/icons/font-awesome-solid.zip +0 -0
  10. package/.obsidian/icons/simple-icons.zip +0 -0
  11. package/.obsidian/plugins/advanced-canvas/main.js +7372 -0
  12. package/.obsidian/plugins/advanced-canvas/manifest.json +11 -0
  13. package/.obsidian/plugins/advanced-canvas/styles.css +508 -0
  14. package/.obsidian/plugins/canvas-mindmap/main.js +8 -0
  15. package/.obsidian/plugins/canvas-mindmap/manifest.json +15 -0
  16. package/.obsidian/plugins/canvas-mindmap/styles.css +29 -0
  17. package/.obsidian/plugins/custom-sidebar-icons/main.js +37831 -0
  18. package/.obsidian/plugins/custom-sidebar-icons/manifest.json +15 -0
  19. package/.obsidian/plugins/custom-sidebar-icons/styles.css +1 -0
  20. package/.obsidian/plugins/iconic/data.json +38 -0
  21. package/.obsidian/plugins/iconic/main.js +9 -0
  22. package/.obsidian/plugins/iconic/manifest.json +10 -0
  23. package/.obsidian/plugins/iconic/styles.css +609 -0
  24. package/.obsidian/plugins/obsidian-excalidraw-plugin/main.js +10 -0
  25. package/.obsidian/plugins/obsidian-excalidraw-plugin/manifest.json +12 -0
  26. package/.obsidian/plugins/obsidian-excalidraw-plugin/styles.css +1 -0
  27. package/.obsidian/plugins/obsidian-icon-folder/data.json +31 -0
  28. package/.obsidian/plugins/obsidian-icon-folder/main.js +7158 -0
  29. package/.obsidian/plugins/obsidian-icon-folder/manifest.json +10 -0
  30. package/.obsidian/plugins/obsidian-icon-folder/styles.css +120 -0
  31. package/.obsidian/plugins/obsidian-kanban/main.js +153 -0
  32. package/.obsidian/plugins/obsidian-kanban/manifest.json +11 -0
  33. package/.obsidian/plugins/obsidian-kanban/styles.css +1 -0
  34. package/.obsidian/plugins/table-editor-obsidian/data.json +6 -0
  35. package/.obsidian/plugins/table-editor-obsidian/main.js +236 -0
  36. package/.obsidian/plugins/table-editor-obsidian/manifest.json +17 -0
  37. package/.obsidian/plugins/table-editor-obsidian/styles.css +78 -0
  38. package/.obsidian/snippets/CustomIcon-AutoGen.css +17 -0
  39. package/.obsidian/templates.json +3 -0
  40. package/.obsidian/themes/ASET Simple/.editorconfig +10 -0
  41. package/.obsidian/themes/ASET Simple/.git1/HEAD +1 -0
  42. package/.obsidian/themes/ASET Simple/.git1/config +13 -0
  43. package/.obsidian/themes/ASET Simple/.git1/description +1 -0
  44. package/.obsidian/themes/ASET Simple/.git1/hooks/applypatch-msg.sample +15 -0
  45. package/.obsidian/themes/ASET Simple/.git1/hooks/commit-msg.sample +24 -0
  46. package/.obsidian/themes/ASET Simple/.git1/hooks/fsmonitor-watchman.sample +174 -0
  47. package/.obsidian/themes/ASET Simple/.git1/hooks/post-update.sample +8 -0
  48. package/.obsidian/themes/ASET Simple/.git1/hooks/pre-applypatch.sample +14 -0
  49. package/.obsidian/themes/ASET Simple/.git1/hooks/pre-commit.sample +49 -0
  50. package/.obsidian/themes/ASET Simple/.git1/hooks/pre-merge-commit.sample +13 -0
  51. package/.obsidian/themes/ASET Simple/.git1/hooks/pre-push.sample +53 -0
  52. package/.obsidian/themes/ASET Simple/.git1/hooks/pre-rebase.sample +169 -0
  53. package/.obsidian/themes/ASET Simple/.git1/hooks/pre-receive.sample +24 -0
  54. package/.obsidian/themes/ASET Simple/.git1/hooks/prepare-commit-msg.sample +42 -0
  55. package/.obsidian/themes/ASET Simple/.git1/hooks/push-to-checkout.sample +78 -0
  56. package/.obsidian/themes/ASET Simple/.git1/hooks/sendemail-validate.sample +77 -0
  57. package/.obsidian/themes/ASET Simple/.git1/hooks/update.sample +128 -0
  58. package/.obsidian/themes/ASET Simple/.git1/index +0 -0
  59. package/.obsidian/themes/ASET Simple/.git1/info/exclude +6 -0
  60. package/.obsidian/themes/ASET Simple/.git1/objects/pack/pack-37b1d733e37d8c14f634edcfb396cffa341c1de9.idx +0 -0
  61. package/.obsidian/themes/ASET Simple/.git1/objects/pack/pack-37b1d733e37d8c14f634edcfb396cffa341c1de9.pack +0 -0
  62. package/.obsidian/themes/ASET Simple/.git1/objects/pack/pack-37b1d733e37d8c14f634edcfb396cffa341c1de9.rev +0 -0
  63. package/.obsidian/themes/ASET Simple/.git1/packed-refs +2 -0
  64. package/.obsidian/themes/ASET Simple/.git1/refs/heads/master +1 -0
  65. package/.obsidian/themes/ASET Simple/.git1/refs/remotes/origin/HEAD +1 -0
  66. package/.obsidian/themes/ASET Simple/.github/workflows/release-version.yml +50 -0
  67. package/.obsidian/themes/ASET Simple/README.md +95 -0
  68. package/.obsidian/themes/ASET Simple/manifest.json +7 -0
  69. package/.obsidian/themes/ASET Simple/package.json +7 -0
  70. package/.obsidian/themes/ASET Simple/theme.css +164 -0
  71. package/.obsidian/themes/ASET Simple/version-bump.mjs +26 -0
  72. package/.obsidian/themes/ASET Simple/versions.json +3 -0
  73. package/.obsidian/themes/Atom/manifest.json +6 -0
  74. package/.obsidian/themes/Atom/theme.css +339 -0
  75. package/.obsidian/themes/Borealis/manifest.json +7 -0
  76. package/.obsidian/themes/Borealis/theme.css +1164 -0
  77. package/.obsidian/themes/Cupertino/manifest.json +8 -0
  78. package/.obsidian/themes/Cupertino/theme.css +107 -0
  79. package/.obsidian/themes/Flexoki/manifest.json +7 -0
  80. package/.obsidian/themes/Flexoki/theme.css +82 -0
  81. package/.obsidian/themes/Focus/manifest.json +7 -0
  82. package/.obsidian/themes/Focus/theme.css +1047 -0
  83. package/.obsidian/themes/GitHub Theme/manifest.json +7 -0
  84. package/.obsidian/themes/GitHub Theme/theme.css +1245 -0
  85. package/.obsidian/themes/Minimal/manifest.json +8 -0
  86. package/.obsidian/themes/Minimal/theme.css +2223 -0
  87. package/.obsidian/themes/Notation/manifest.json +6 -0
  88. package/.obsidian/themes/Notation/theme.css +831 -0
  89. package/.obsidian/themes/Notation 2/manifest.json +7 -0
  90. package/.obsidian/themes/Notation 2/theme.css +1887 -0
  91. package/.obsidian/themes/Oreo/manifest.json +7 -0
  92. package/.obsidian/themes/Oreo/theme.css +2242 -0
  93. package/.obsidian/themes/Pure/manifest.json +6 -0
  94. package/.obsidian/themes/Pure/theme.css +288 -0
  95. package/.obsidian/themes/Simple/manifest.json +7 -0
  96. package/.obsidian/themes/Simple/theme.css +1005 -0
  97. package/.obsidian/themes/Sodalite/manifest.json +7 -0
  98. package/.obsidian/themes/Sodalite/theme.css +905 -0
  99. package/.obsidian/themes/Things/manifest.json +7 -0
  100. package/.obsidian/themes/Things/theme.css +1628 -0
  101. package/.obsidian/themes/Vanilla AMOLED/manifest.json +7 -0
  102. package/.obsidian/themes/Vanilla AMOLED/theme.css +25 -0
  103. package/.obsidian/themes/Vanilla AMOLED Color/manifest.json +7 -0
  104. package/.obsidian/themes/Vanilla AMOLED Color/theme.css +49 -0
  105. package/.obsidian/themes/Wikipedia/manifest.json +7 -0
  106. package/.obsidian/themes/Wikipedia/theme.css +1134 -0
  107. package/.obsidian/themes/mono black (monochrome, charcoal)/manifest.json +7 -0
  108. package/.obsidian/themes/mono black (monochrome, charcoal)/theme.css +17 -0
  109. package/.obsidian/workspace.json +218 -0
  110. package/LICENCE +21 -0
  111. package/dist/fetcher.d.ts +17 -0
  112. package/dist/fetcher.d.ts.map +1 -0
  113. package/dist/fetcher.js +54 -0
  114. package/dist/fetcher.js.map +1 -0
  115. package/dist/index.d.ts +6 -0
  116. package/dist/index.d.ts.map +1 -0
  117. package/dist/index.js +25 -0
  118. package/dist/index.js.map +1 -0
  119. package/dist/responses.d.ts +6 -0
  120. package/dist/responses.d.ts.map +1 -0
  121. package/dist/responses.js +23 -0
  122. package/dist/responses.js.map +1 -0
  123. package/dist/types.d.ts +9 -0
  124. package/dist/types.d.ts.map +1 -0
  125. package/dist/types.js +3 -0
  126. package/dist/types.js.map +1 -0
  127. package/dist/utils.d.ts +3 -0
  128. package/dist/utils.d.ts.map +1 -0
  129. package/dist/utils.js +9 -0
  130. package/dist/utils.js.map +1 -0
  131. package/nodemon.json +6 -0
  132. package/package.json +38 -0
  133. package/src/fetcher.ts +68 -0
  134. package/src/index.ts +7 -0
  135. package/src/responses.ts +19 -0
  136. package/src/types.ts +15 -0
  137. package/src/utils.ts +9 -0
  138. package/tsconfig.json +49 -0
  139. package/tsup.config.ts +11 -0
@@ -0,0 +1,24 @@
1
+ #!/bin/sh
2
+ #
3
+ # An example hook script to make use of push options.
4
+ # The example simply echoes all push options that start with 'echoback='
5
+ # and rejects all pushes when the "reject" push option is used.
6
+ #
7
+ # To enable this hook, rename this file to "pre-receive".
8
+
9
+ if test -n "$GIT_PUSH_OPTION_COUNT"
10
+ then
11
+ i=0
12
+ while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"
13
+ do
14
+ eval "value=\$GIT_PUSH_OPTION_$i"
15
+ case "$value" in
16
+ echoback=*)
17
+ echo "echo from the pre-receive-hook: ${value#*=}" >&2
18
+ ;;
19
+ reject)
20
+ exit 1
21
+ esac
22
+ i=$((i + 1))
23
+ done
24
+ fi
@@ -0,0 +1,42 @@
1
+ #!/bin/sh
2
+ #
3
+ # An example hook script to prepare the commit log message.
4
+ # Called by "git commit" with the name of the file that has the
5
+ # commit message, followed by the description of the commit
6
+ # message's source. The hook's purpose is to edit the commit
7
+ # message file. If the hook fails with a non-zero status,
8
+ # the commit is aborted.
9
+ #
10
+ # To enable this hook, rename this file to "prepare-commit-msg".
11
+
12
+ # This hook includes three examples. The first one removes the
13
+ # "# Please enter the commit message..." help message.
14
+ #
15
+ # The second includes the output of "git diff --name-status -r"
16
+ # into the message, just before the "git status" output. It is
17
+ # commented because it doesn't cope with --amend or with squashed
18
+ # commits.
19
+ #
20
+ # The third example adds a Signed-off-by line to the message, that can
21
+ # still be edited. This is rarely a good idea.
22
+
23
+ COMMIT_MSG_FILE=$1
24
+ COMMIT_SOURCE=$2
25
+ SHA1=$3
26
+
27
+ /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"
28
+
29
+ # case "$COMMIT_SOURCE,$SHA1" in
30
+ # ,|template,)
31
+ # /usr/bin/perl -i.bak -pe '
32
+ # print "\n" . `git diff --cached --name-status -r`
33
+ # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;;
34
+ # *) ;;
35
+ # esac
36
+
37
+ # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
38
+ # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"
39
+ # if test -z "$COMMIT_SOURCE"
40
+ # then
41
+ # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"
42
+ # fi
@@ -0,0 +1,78 @@
1
+ #!/bin/sh
2
+
3
+ # An example hook script to update a checked-out tree on a git push.
4
+ #
5
+ # This hook is invoked by git-receive-pack(1) when it reacts to git
6
+ # push and updates reference(s) in its repository, and when the push
7
+ # tries to update the branch that is currently checked out and the
8
+ # receive.denyCurrentBranch configuration variable is set to
9
+ # updateInstead.
10
+ #
11
+ # By default, such a push is refused if the working tree and the index
12
+ # of the remote repository has any difference from the currently
13
+ # checked out commit; when both the working tree and the index match
14
+ # the current commit, they are updated to match the newly pushed tip
15
+ # of the branch. This hook is to be used to override the default
16
+ # behaviour; however the code below reimplements the default behaviour
17
+ # as a starting point for convenient modification.
18
+ #
19
+ # The hook receives the commit with which the tip of the current
20
+ # branch is going to be updated:
21
+ commit=$1
22
+
23
+ # It can exit with a non-zero status to refuse the push (when it does
24
+ # so, it must not modify the index or the working tree).
25
+ die () {
26
+ echo >&2 "$*"
27
+ exit 1
28
+ }
29
+
30
+ # Or it can make any necessary changes to the working tree and to the
31
+ # index to bring them to the desired state when the tip of the current
32
+ # branch is updated to the new commit, and exit with a zero status.
33
+ #
34
+ # For example, the hook can simply run git read-tree -u -m HEAD "$1"
35
+ # in order to emulate git fetch that is run in the reverse direction
36
+ # with git push, as the two-tree form of git read-tree -u -m is
37
+ # essentially the same as git switch or git checkout that switches
38
+ # branches while keeping the local changes in the working tree that do
39
+ # not interfere with the difference between the branches.
40
+
41
+ # The below is a more-or-less exact translation to shell of the C code
42
+ # for the default behaviour for git's push-to-checkout hook defined in
43
+ # the push_to_deploy() function in builtin/receive-pack.c.
44
+ #
45
+ # Note that the hook will be executed from the repository directory,
46
+ # not from the working tree, so if you want to perform operations on
47
+ # the working tree, you will have to adapt your code accordingly, e.g.
48
+ # by adding "cd .." or using relative paths.
49
+
50
+ if ! git update-index -q --ignore-submodules --refresh
51
+ then
52
+ die "Up-to-date check failed"
53
+ fi
54
+
55
+ if ! git diff-files --quiet --ignore-submodules --
56
+ then
57
+ die "Working directory has unstaged changes"
58
+ fi
59
+
60
+ # This is a rough translation of:
61
+ #
62
+ # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX
63
+ if git cat-file -e HEAD 2>/dev/null
64
+ then
65
+ head=HEAD
66
+ else
67
+ head=$(git hash-object -t tree --stdin </dev/null)
68
+ fi
69
+
70
+ if ! git diff-index --quiet --cached --ignore-submodules $head --
71
+ then
72
+ die "Working directory has staged changes"
73
+ fi
74
+
75
+ if ! git read-tree -u -m "$commit"
76
+ then
77
+ die "Could not update working tree to new HEAD"
78
+ fi
@@ -0,0 +1,77 @@
1
+ #!/bin/sh
2
+
3
+ # An example hook script to validate a patch (and/or patch series) before
4
+ # sending it via email.
5
+ #
6
+ # The hook should exit with non-zero status after issuing an appropriate
7
+ # message if it wants to prevent the email(s) from being sent.
8
+ #
9
+ # To enable this hook, rename this file to "sendemail-validate".
10
+ #
11
+ # By default, it will only check that the patch(es) can be applied on top of
12
+ # the default upstream branch without conflicts in a secondary worktree. After
13
+ # validation (successful or not) of the last patch of a series, the worktree
14
+ # will be deleted.
15
+ #
16
+ # The following config variables can be set to change the default remote and
17
+ # remote ref that are used to apply the patches against:
18
+ #
19
+ # sendemail.validateRemote (default: origin)
20
+ # sendemail.validateRemoteRef (default: HEAD)
21
+ #
22
+ # Replace the TODO placeholders with appropriate checks according to your
23
+ # needs.
24
+
25
+ validate_cover_letter () {
26
+ file="$1"
27
+ # TODO: Replace with appropriate checks (e.g. spell checking).
28
+ true
29
+ }
30
+
31
+ validate_patch () {
32
+ file="$1"
33
+ # Ensure that the patch applies without conflicts.
34
+ git am -3 "$file" || return
35
+ # TODO: Replace with appropriate checks for this patch
36
+ # (e.g. checkpatch.pl).
37
+ true
38
+ }
39
+
40
+ validate_series () {
41
+ # TODO: Replace with appropriate checks for the whole series
42
+ # (e.g. quick build, coding style checks, etc.).
43
+ true
44
+ }
45
+
46
+ # main -------------------------------------------------------------------------
47
+
48
+ if test "$GIT_SENDEMAIL_FILE_COUNTER" = 1
49
+ then
50
+ remote=$(git config --default origin --get sendemail.validateRemote) &&
51
+ ref=$(git config --default HEAD --get sendemail.validateRemoteRef) &&
52
+ worktree=$(mktemp --tmpdir -d sendemail-validate.XXXXXXX) &&
53
+ git worktree add -fd --checkout "$worktree" "refs/remotes/$remote/$ref" &&
54
+ git config --replace-all sendemail.validateWorktree "$worktree"
55
+ else
56
+ worktree=$(git config --get sendemail.validateWorktree)
57
+ fi || {
58
+ echo "sendemail-validate: error: failed to prepare worktree" >&2
59
+ exit 1
60
+ }
61
+
62
+ unset GIT_DIR GIT_WORK_TREE
63
+ cd "$worktree" &&
64
+
65
+ if grep -q "^diff --git " "$1"
66
+ then
67
+ validate_patch "$1"
68
+ else
69
+ validate_cover_letter "$1"
70
+ fi &&
71
+
72
+ if test "$GIT_SENDEMAIL_FILE_COUNTER" = "$GIT_SENDEMAIL_FILE_TOTAL"
73
+ then
74
+ git config --unset-all sendemail.validateWorktree &&
75
+ trap 'git worktree remove -ff "$worktree"' EXIT &&
76
+ validate_series
77
+ fi
@@ -0,0 +1,128 @@
1
+ #!/bin/sh
2
+ #
3
+ # An example hook script to block unannotated tags from entering.
4
+ # Called by "git receive-pack" with arguments: refname sha1-old sha1-new
5
+ #
6
+ # To enable this hook, rename this file to "update".
7
+ #
8
+ # Config
9
+ # ------
10
+ # hooks.allowunannotated
11
+ # This boolean sets whether unannotated tags will be allowed into the
12
+ # repository. By default they won't be.
13
+ # hooks.allowdeletetag
14
+ # This boolean sets whether deleting tags will be allowed in the
15
+ # repository. By default they won't be.
16
+ # hooks.allowmodifytag
17
+ # This boolean sets whether a tag may be modified after creation. By default
18
+ # it won't be.
19
+ # hooks.allowdeletebranch
20
+ # This boolean sets whether deleting branches will be allowed in the
21
+ # repository. By default they won't be.
22
+ # hooks.denycreatebranch
23
+ # This boolean sets whether remotely creating branches will be denied
24
+ # in the repository. By default this is allowed.
25
+ #
26
+
27
+ # --- Command line
28
+ refname="$1"
29
+ oldrev="$2"
30
+ newrev="$3"
31
+
32
+ # --- Safety check
33
+ if [ -z "$GIT_DIR" ]; then
34
+ echo "Don't run this script from the command line." >&2
35
+ echo " (if you want, you could supply GIT_DIR then run" >&2
36
+ echo " $0 <ref> <oldrev> <newrev>)" >&2
37
+ exit 1
38
+ fi
39
+
40
+ if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
41
+ echo "usage: $0 <ref> <oldrev> <newrev>" >&2
42
+ exit 1
43
+ fi
44
+
45
+ # --- Config
46
+ allowunannotated=$(git config --type=bool hooks.allowunannotated)
47
+ allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch)
48
+ denycreatebranch=$(git config --type=bool hooks.denycreatebranch)
49
+ allowdeletetag=$(git config --type=bool hooks.allowdeletetag)
50
+ allowmodifytag=$(git config --type=bool hooks.allowmodifytag)
51
+
52
+ # check for no description
53
+ projectdesc=$(sed -e '1q' "$GIT_DIR/description")
54
+ case "$projectdesc" in
55
+ "Unnamed repository"* | "")
56
+ echo "*** Project description file hasn't been set" >&2
57
+ exit 1
58
+ ;;
59
+ esac
60
+
61
+ # --- Check types
62
+ # if $newrev is 0000...0000, it's a commit to delete a ref.
63
+ zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
64
+ if [ "$newrev" = "$zero" ]; then
65
+ newrev_type=delete
66
+ else
67
+ newrev_type=$(git cat-file -t $newrev)
68
+ fi
69
+
70
+ case "$refname","$newrev_type" in
71
+ refs/tags/*,commit)
72
+ # un-annotated tag
73
+ short_refname=${refname##refs/tags/}
74
+ if [ "$allowunannotated" != "true" ]; then
75
+ echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
76
+ echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
77
+ exit 1
78
+ fi
79
+ ;;
80
+ refs/tags/*,delete)
81
+ # delete tag
82
+ if [ "$allowdeletetag" != "true" ]; then
83
+ echo "*** Deleting a tag is not allowed in this repository" >&2
84
+ exit 1
85
+ fi
86
+ ;;
87
+ refs/tags/*,tag)
88
+ # annotated tag
89
+ if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
90
+ then
91
+ echo "*** Tag '$refname' already exists." >&2
92
+ echo "*** Modifying a tag is not allowed in this repository." >&2
93
+ exit 1
94
+ fi
95
+ ;;
96
+ refs/heads/*,commit)
97
+ # branch
98
+ if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
99
+ echo "*** Creating a branch is not allowed in this repository" >&2
100
+ exit 1
101
+ fi
102
+ ;;
103
+ refs/heads/*,delete)
104
+ # delete branch
105
+ if [ "$allowdeletebranch" != "true" ]; then
106
+ echo "*** Deleting a branch is not allowed in this repository" >&2
107
+ exit 1
108
+ fi
109
+ ;;
110
+ refs/remotes/*,commit)
111
+ # tracking branch
112
+ ;;
113
+ refs/remotes/*,delete)
114
+ # delete tracking branch
115
+ if [ "$allowdeletebranch" != "true" ]; then
116
+ echo "*** Deleting a tracking branch is not allowed in this repository" >&2
117
+ exit 1
118
+ fi
119
+ ;;
120
+ *)
121
+ # Anything else (is there anything else?)
122
+ echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
123
+ exit 1
124
+ ;;
125
+ esac
126
+
127
+ # --- Finished
128
+ exit 0
@@ -0,0 +1,6 @@
1
+ # git ls-files --others --exclude-from=.git/info/exclude
2
+ # Lines that start with '#' are comments.
3
+ # For a project mostly in C, the following would be a good set of
4
+ # exclude patterns (uncomment them if you want to use them):
5
+ # *.[oa]
6
+ # *~
@@ -0,0 +1,2 @@
1
+ # pack-refs with: peeled fully-peeled sorted
2
+ be9db886ee504a5b261304a072efed8dd95477d9 refs/remotes/origin/master
@@ -0,0 +1 @@
1
+ be9db886ee504a5b261304a072efed8dd95477d9
@@ -0,0 +1 @@
1
+ ref: refs/remotes/origin/master
@@ -0,0 +1,50 @@
1
+ name: Publish new theme version
2
+
3
+ on:
4
+ push:
5
+ # Sequence of patterns matched against refs/tags
6
+ tags:
7
+ - "*" # Push events to matching any tag format, i.e. 1.0, 20.15.10
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ - name: Bundle
16
+ id: bundle
17
+ run: |
18
+ ls
19
+ echo "::set-output name=tag_name::$(git tag --sort version:refname | tail -n 1)"
20
+ - name: Create Release
21
+ id: create_release
22
+ uses: actions/create-release@v1
23
+ env:
24
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25
+ VERSION: ${{ github.ref }}
26
+ with:
27
+ tag_name: ${{ github.ref }}
28
+ release_name: ${{ github.ref }}
29
+ draft: false
30
+ prerelease: false
31
+ - name: Upload manifest.json
32
+ id: upload-manifest
33
+ uses: actions/upload-release-asset@v1
34
+ env:
35
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36
+ with:
37
+ upload_url: ${{ steps.create_release.outputs.upload_url }}
38
+ asset_path: ./manifest.json
39
+ asset_name: manifest.json
40
+ asset_content_type: application/json
41
+ - name: Upload theme.css
42
+ id: upload-css
43
+ uses: actions/upload-release-asset@v1
44
+ env:
45
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46
+ with:
47
+ upload_url: ${{ steps.create_release.outputs.upload_url }}
48
+ asset_path: ./theme.css
49
+ asset_name: theme.css
50
+ asset_content_type: text/css
@@ -0,0 +1,95 @@
1
+ This is a sample theme for Obsidian ([https://obsidian.md](https://obsidian.md/)).
2
+
3
+ ## First Time publishing a theme?
4
+
5
+ ### Quick start
6
+
7
+ <img width="244" alt="Pasted image 20220822135601" src="https://user-images.githubusercontent.com/693981/186000386-4f4da987-fcaf-4aa5-aed4-e34b5901255d.png">
8
+
9
+ First, choose **Use this template**. That will create a copy of this repository (repo) under your Github profile. Then, you will want to _clone_ your new repository to your computer.
10
+
11
+ Once you have the repo locally on your computer, there are a couple of placeholder fields you will need to fill in.
12
+
13
+ 1. Inside the `manifest.json` file, change the "name" field to whatever you want the name of your theme to be. For example:
14
+
15
+ ```json
16
+ {
17
+ "name": "Moonstone",
18
+ "version": "0.0.0",
19
+ "minAppVersion": "1.0.0"
20
+ }
21
+ ```
22
+
23
+ 2. Also inside the manifest.json file, you can include your name under next to the "author" field.
24
+
25
+ After you have those fields configured, all that's left to do is add your styles! All of your CSS needs to be inside the file `theme.css` which is located at root of your repository.
26
+
27
+ ## Adding your theme to the Theme Gallery
28
+
29
+ ### Add a screenshot thumbnail
30
+
31
+ Inside the repository, include a screenshot thumbnail of your theme. You can name the file anything, for example `screenshot.png`. This image will be used for the small preview in the theme list.
32
+
33
+ Your screenshot file should be `16:9` aspect ratio.
34
+ The recommended size is 512x288.
35
+
36
+ ### Submit your theme for review
37
+
38
+ To have your theme included in the Theme Gallery, you will need to submit a Pull Request to [`obsidianmd/obsidian-releases`](https://github.com/obsidianmd/obsidian-releases#community-theme).
39
+
40
+ ## Releasing Versions _(Optional)_
41
+
42
+ If your theme is getting more and more complex, you might want to start thinking about how your theme will stay compatible with different versions of Obsidian. Introduced in v0.16 of Obsidian, themes support [Github Releases](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository). This means that you can specify which versions of your theme are compatible with which versions of Obsidian.
43
+
44
+ ### Steps for releasing the initial version of your theme (1.0.0)
45
+
46
+ 1. From your theme's repository, click on "Releases".
47
+
48
+ <img width="235" alt="Pasted image 20220822145001" src="https://user-images.githubusercontent.com/693981/186000441-287a1a97-65f6-4b5f-ba66-810ceae91cd3.png">
49
+
50
+ 2. On the Releases page, there should be a button to **Draft a new Release**. Press it.
51
+
52
+ <img width="202" alt="Pasted image 20220822145048" src="https://user-images.githubusercontent.com/693981/186000664-6c63ae14-f685-4d39-bfe6-324f95cd9669.png">
53
+
54
+ 3. Fill out the Release information form.
55
+ - **Choose a Tag**: Type in the name of the version number here. At the bottom of the dropdown should be a button to create a new tag with your latest theme changes. Choose this option.
56
+ <img width="340" alt="Pasted image 20220822145648" src="https://user-images.githubusercontent.com/693981/186000848-bd1c2619-ea09-4e70-a886-40769cda6921.png">
57
+ - **Release Title**: This can be the version number.
58
+ - **Description** _Optional_: Anything that changed
59
+ - **Files:** The most important part of this form is uploading the files. You can do this by dragging 'n dropping the `manifest.json` file and the `theme.css` file your for theme inside the file upload field.
60
+
61
+ <img width="946" alt="Pasted image 20220822145356" src="https://user-images.githubusercontent.com/693981/186000772-e689ecea-c3b7-4e9d-9204-7ad62c0123aa.png">
62
+
63
+ 4. Click "Publish Release."
64
+ 5. Make sure that `versions.json` is set up correctly. This file is a map.
65
+ ```json
66
+ {
67
+ "1.0.0": "0.16.0"
68
+ }
69
+ ```
70
+
71
+ This means that version 1.0.0 of your theme is compatible with version 0.16.0 of Obsidian. For the initial release of your theme, you shouldn't need to make any changes to this file.
72
+
73
+ ### Steps for releasing new versions
74
+
75
+ Releasing a new version of your theme is the same as releasing the initial version.
76
+
77
+ 1. From your theme's repository, click on "Releases."
78
+ 2. On the Releases page, there should be a button to **Draft a new Release**. Press it.
79
+ 3. Fill out the Release information form.
80
+ - **Choose a Tag**: Type in the name of the version number here. At the bottom of the dropdown should be a button to create a new tag with your latest theme changes. Choose this option.
81
+ <img width="333" alt="Pasted image 20220822145812" src="https://user-images.githubusercontent.com/693981/186000912-f494def9-0f67-4662-92bf-bd278082455f.png">
82
+ - **Release Title**: This can be the version number.
83
+ - **Description** _Optional_: Anything that changed
84
+ - **Files:** The most important part of this form is uploading the files. You can do this by dragging 'n dropping the `manifest.json` file and the `theme.css` file your for theme inside the file upload field.
85
+
86
+ 4. Click "Publish Release."
87
+ 5. Update the `versions.json` file in your repository. For the initial release of your theme, you probably didn't need to make any changes to the `versions.json` file. When you release subsequent versions of your theme; however, it's best practice to include the new version as entry in the versions.json file. So this might look like:
88
+ ```json
89
+ {
90
+ "1.0.0": "0.16.0",
91
+ "1.0.1": "0.16.0"
92
+ }
93
+ ```
94
+
95
+ What's important to note here is: the new version is included as the "key" and the "value" is the minimum version of Obsidian that your theme compatible with. So if the new version of your theme is only compatible with an Insider version of Obsidian, it's important to set this value accordingly. This will prevent users on older versions of Obsidian from updating to the newer version of your theme.
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "ASET Simple",
3
+ "version": "1.0.0",
4
+ "minAppVersion": "1.0.0",
5
+ "author": "Obsidian",
6
+ "authorUrl": "https://obsidian.md"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "sample-obsidian-theme",
3
+ "version": "1.0.0",
4
+ "scripts": {
5
+ "version": "node version-bump.mjs && git add manifest.json versions.json"
6
+ }
7
+ }