@tailor-platform/create-sdk 2.22.0 → 2.24.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.
Files changed (74) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +79 -17
  3. package/dist/index.js +1 -1
  4. package/package.json +6 -4
  5. package/templates/executor/README.md +4 -3
  6. package/templates/executor/node_modules/.bin/oxfmt +52 -14
  7. package/templates/executor/node_modules/.bin/oxlint +52 -14
  8. package/templates/executor/node_modules/.bin/tailor +52 -14
  9. package/templates/executor/node_modules/.bin/tsc +52 -14
  10. package/templates/executor/node_modules/.bin/tsgolint +52 -14
  11. package/templates/executor/node_modules/.bin/tsserver +52 -14
  12. package/templates/executor/node_modules/.bin/vitest +52 -14
  13. package/templates/executor/package.json +3 -3
  14. package/templates/generators/node_modules/.bin/oxfmt +52 -14
  15. package/templates/generators/node_modules/.bin/oxlint +52 -14
  16. package/templates/generators/node_modules/.bin/tailor +52 -14
  17. package/templates/generators/node_modules/.bin/tailor-seed +52 -14
  18. package/templates/generators/node_modules/.bin/tsc +52 -14
  19. package/templates/generators/node_modules/.bin/tsgolint +52 -14
  20. package/templates/generators/node_modules/.bin/tsserver +52 -14
  21. package/templates/generators/node_modules/.bin/vitest +52 -14
  22. package/templates/generators/package.json +4 -4
  23. package/templates/hello-world/node_modules/.bin/oxfmt +52 -14
  24. package/templates/hello-world/node_modules/.bin/oxlint +52 -14
  25. package/templates/hello-world/node_modules/.bin/tailor +52 -14
  26. package/templates/hello-world/node_modules/.bin/tsc +52 -14
  27. package/templates/hello-world/node_modules/.bin/tsgolint +52 -14
  28. package/templates/hello-world/node_modules/.bin/tsserver +52 -14
  29. package/templates/hello-world/package.json +3 -3
  30. package/templates/inventory-management/node_modules/.bin/oxfmt +52 -14
  31. package/templates/inventory-management/node_modules/.bin/oxlint +52 -14
  32. package/templates/inventory-management/node_modules/.bin/tailor +52 -14
  33. package/templates/inventory-management/node_modules/.bin/tsc +52 -14
  34. package/templates/inventory-management/node_modules/.bin/tsgolint +52 -14
  35. package/templates/inventory-management/node_modules/.bin/tsserver +52 -14
  36. package/templates/inventory-management/package.json +3 -3
  37. package/templates/multi-application/node_modules/.bin/oxfmt +52 -14
  38. package/templates/multi-application/node_modules/.bin/oxlint +52 -14
  39. package/templates/multi-application/node_modules/.bin/tailor +52 -14
  40. package/templates/multi-application/node_modules/.bin/tsc +52 -14
  41. package/templates/multi-application/node_modules/.bin/tsgolint +52 -14
  42. package/templates/multi-application/node_modules/.bin/tsserver +52 -14
  43. package/templates/multi-application/package.json +3 -3
  44. package/templates/resolver/node_modules/.bin/oxfmt +52 -14
  45. package/templates/resolver/node_modules/.bin/oxlint +52 -14
  46. package/templates/resolver/node_modules/.bin/tailor +52 -14
  47. package/templates/resolver/node_modules/.bin/tsc +52 -14
  48. package/templates/resolver/node_modules/.bin/tsgolint +52 -14
  49. package/templates/resolver/node_modules/.bin/tsserver +52 -14
  50. package/templates/resolver/node_modules/.bin/vitest +52 -14
  51. package/templates/resolver/package.json +3 -3
  52. package/templates/static-web-site/node_modules/.bin/oxfmt +52 -14
  53. package/templates/static-web-site/node_modules/.bin/oxlint +52 -14
  54. package/templates/static-web-site/node_modules/.bin/tailor +52 -14
  55. package/templates/static-web-site/node_modules/.bin/tsc +52 -14
  56. package/templates/static-web-site/node_modules/.bin/tsgolint +52 -14
  57. package/templates/static-web-site/node_modules/.bin/tsserver +52 -14
  58. package/templates/static-web-site/package.json +3 -3
  59. package/templates/tailordb/node_modules/.bin/oxfmt +52 -14
  60. package/templates/tailordb/node_modules/.bin/oxlint +52 -14
  61. package/templates/tailordb/node_modules/.bin/tailor +52 -14
  62. package/templates/tailordb/node_modules/.bin/tsc +52 -14
  63. package/templates/tailordb/node_modules/.bin/tsgolint +52 -14
  64. package/templates/tailordb/node_modules/.bin/tsserver +52 -14
  65. package/templates/tailordb/node_modules/.bin/vitest +52 -14
  66. package/templates/tailordb/package.json +3 -3
  67. package/templates/workflow/node_modules/.bin/oxfmt +52 -14
  68. package/templates/workflow/node_modules/.bin/oxlint +52 -14
  69. package/templates/workflow/node_modules/.bin/tailor +52 -14
  70. package/templates/workflow/node_modules/.bin/tsc +52 -14
  71. package/templates/workflow/node_modules/.bin/tsgolint +52 -14
  72. package/templates/workflow/node_modules/.bin/tsserver +52 -14
  73. package/templates/workflow/node_modules/.bin/vitest +52 -14
  74. package/templates/workflow/package.json +3 -3
@@ -1,31 +1,67 @@
1
1
  #!/bin/sh
2
2
  # Resolve $0 through symlinks so basedir is the shim's real directory.
3
3
  # Cap hops at the kernel's ELOOP limit so a cycle cannot hang the shim.
4
+ #
5
+ # A shim runs with node_modules/.bin at the front of PATH, so readlink, sed,
6
+ # uname, and printf go through `command -p`, which searches the system default
7
+ # path instead. A dependency's bin cannot stand in for one of them and take over
8
+ # the shim before it reaches its target. Directories come from `${link%/*}`,
9
+ # which needs no helper at all.
10
+ #
11
+ # Where no default path is compiled in, as on Nix, `command -p` searches PATH
12
+ # instead, so the helpers run with node_modules and relative entries dropped from
13
+ # PATH.
14
+ caller_path_set=${PATH+set}
15
+ caller_path=${PATH-}
16
+ helper_path=
17
+ rest=$caller_path:
18
+ while [ -n "$rest" ]; do
19
+ dir=${rest%%:*}
20
+ rest=${rest#*:}
21
+ case "$dir" in
22
+ */node_modules/*|*/node_modules) ;;
23
+ /*) helper_path=${helper_path:+$helper_path:}$dir ;;
24
+ esac
25
+ done
26
+ # An empty PATH searches the current directory.
27
+ PATH=${helper_path:-/}
4
28
  link="$0"
29
+ # `${link%/*}` needs a separator to strip. A bare name came from a PATH lookup
30
+ # and stands for a file in the current directory.
31
+ case "$link" in
32
+ */*|*\\*) ;;
33
+ *) link="./$link" ;;
34
+ esac
5
35
  hops=0
6
36
  while [ -L "$link" ] && [ "$hops" -lt 40 ]; do
7
37
  hops=$((hops+1))
8
- target=$(readlink "$link")
38
+ target=$(command -p readlink "$link")
9
39
  case "$target" in
10
40
  /*) link="$target" ;;
11
- *) link="$(dirname "$link")/$target" ;;
41
+ *) link="${link%/*}/$target" ;;
12
42
  esac
13
43
  done
14
- basedir=$(dirname "$(echo "$link" | sed -e 's,\\,/,g')")
44
+ basedir=$(command -p printf '%s\n' "$link" | command -p sed -e 's,\\,/,g')
45
+ basedir="${basedir%/*}"
15
46
  basedir_win="$basedir"
16
47
  exe=""
17
48
  msys=""
18
49
 
19
- case `uname -a` in
50
+ case `command -p uname -a` in
20
51
  *CYGWIN*|*MINGW*|*MSYS*)
21
- if command -v cygpath > /dev/null 2>&1; then
52
+ if converted=$(command -p cygpath -w "$basedir" 2>/dev/null) && [ -n "$converted" ]; then
53
+ basedir_win="$converted"
54
+ elif command -v cygpath > /dev/null 2>&1; then
22
55
  basedir_win=`cygpath -w "$basedir"`
23
56
  fi
24
57
  exe=".exe"
25
58
  msys="true"
26
59
  ;;
27
60
  *WSL2*)
28
- if command -v wslpath > /dev/null 2>&1; then
61
+ if converted=$(command -p wslpath -w "$basedir" 2>/dev/null) && [ -n "$converted" ]; then
62
+ basedir_win="$converted"
63
+ exe=".exe"
64
+ elif command -v wslpath > /dev/null 2>&1; then
29
65
  basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
30
66
  if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
31
67
  basedir_win="$basedir"
@@ -35,21 +71,23 @@ case `uname -a` in
35
71
  fi
36
72
  ;;
37
73
  esac
74
+ if [ -n "$caller_path_set" ]; then PATH=$caller_path; else unset PATH; fi
38
75
 
76
+ basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
39
77
  if [ -z "$NODE_PATH" ]; then
40
- export NODE_PATH="/home/runner/work/sdk/sdk/node_modules/.pnpm/vitest@5.0.1_@opentelemetry+api@1.9.1_@types+node@24.13.6_@vitest+coverage-v8@5.0.1_vit_16406cb23ebd1c0a63d8c9b509531083/node_modules/vitest/node_modules:/home/runner/work/sdk/sdk/node_modules/.pnpm/vitest@5.0.1_@opentelemetry+api@1.9.1_@types+node@24.13.6_@vitest+coverage-v8@5.0.1_vit_16406cb23ebd1c0a63d8c9b509531083/node_modules:/home/runner/work/sdk/sdk/node_modules/.pnpm/node_modules"
78
+ export NODE_PATH="$basedir_abs/../../../../../../node_modules/.pnpm/vitest@5.0.1_@opentelemetry+api@1.9.1_@types+node@24.19.0_@vitest+coverage-v8@5.0.1_vit_cafeabb58de02b1474fb782f08525647/node_modules/vitest/node_modules:$basedir_abs/../../../../../../node_modules/.pnpm/vitest@5.0.1_@opentelemetry+api@1.9.1_@types+node@24.19.0_@vitest+coverage-v8@5.0.1_vit_cafeabb58de02b1474fb782f08525647/node_modules:$basedir_abs/../../../../../../node_modules/.pnpm/node_modules"
41
79
  else
42
- export NODE_PATH="/home/runner/work/sdk/sdk/node_modules/.pnpm/vitest@5.0.1_@opentelemetry+api@1.9.1_@types+node@24.13.6_@vitest+coverage-v8@5.0.1_vit_16406cb23ebd1c0a63d8c9b509531083/node_modules/vitest/node_modules:/home/runner/work/sdk/sdk/node_modules/.pnpm/vitest@5.0.1_@opentelemetry+api@1.9.1_@types+node@24.13.6_@vitest+coverage-v8@5.0.1_vit_16406cb23ebd1c0a63d8c9b509531083/node_modules:/home/runner/work/sdk/sdk/node_modules/.pnpm/node_modules:$NODE_PATH"
80
+ export NODE_PATH="$basedir_abs/../../../../../../node_modules/.pnpm/vitest@5.0.1_@opentelemetry+api@1.9.1_@types+node@24.19.0_@vitest+coverage-v8@5.0.1_vit_cafeabb58de02b1474fb782f08525647/node_modules/vitest/node_modules:$basedir_abs/../../../../../../node_modules/.pnpm/vitest@5.0.1_@opentelemetry+api@1.9.1_@types+node@24.19.0_@vitest+coverage-v8@5.0.1_vit_cafeabb58de02b1474fb782f08525647/node_modules:$basedir_abs/../../../../../../node_modules/.pnpm/node_modules:$NODE_PATH"
43
81
  fi
44
82
  if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
45
- exec "$basedir/node.exe" "$basedir_win/../vitest/vitest.mjs" "$@"
83
+ exec "$basedir/node.exe" "$basedir_win/../../../../../../node_modules/.pnpm/vitest@5.0.1_@opentelemetry+api@1.9.1_@types+node@24.19.0_@vitest+coverage-v8@5.0.1_vit_cafeabb58de02b1474fb782f08525647/node_modules/vitest/vitest.mjs" "$@"
46
84
  elif [ -x "$basedir/node" ]; then
47
- exec "$basedir/node" "$basedir/../vitest/vitest.mjs" "$@"
85
+ exec "$basedir/node" "$basedir_abs/../../../../../../node_modules/.pnpm/vitest@5.0.1_@opentelemetry+api@1.9.1_@types+node@24.19.0_@vitest+coverage-v8@5.0.1_vit_cafeabb58de02b1474fb782f08525647/node_modules/vitest/vitest.mjs" "$@"
48
86
  elif command -v node >/dev/null 2>&1; then
49
- exec node "$basedir/../vitest/vitest.mjs" "$@"
87
+ exec node "$basedir_abs/../../../../../../node_modules/.pnpm/vitest@5.0.1_@opentelemetry+api@1.9.1_@types+node@24.19.0_@vitest+coverage-v8@5.0.1_vit_cafeabb58de02b1474fb782f08525647/node_modules/vitest/vitest.mjs" "$@"
50
88
  elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
51
- exec node.exe "$basedir_win/../vitest/vitest.mjs" "$@"
89
+ exec node.exe "$basedir_win/../../../../../../node_modules/.pnpm/vitest@5.0.1_@opentelemetry+api@1.9.1_@types+node@24.19.0_@vitest+coverage-v8@5.0.1_vit_cafeabb58de02b1474fb782f08525647/node_modules/vitest/vitest.mjs" "$@"
52
90
  else
53
- exec node "$basedir/../vitest/vitest.mjs" "$@"
91
+ exec node "$basedir_abs/../../../../../../node_modules/.pnpm/vitest@5.0.1_@opentelemetry+api@1.9.1_@types+node@24.19.0_@vitest+coverage-v8@5.0.1_vit_cafeabb58de02b1474fb782f08525647/node_modules/vitest/vitest.mjs" "$@"
54
92
  fi
55
- # cmd-shim-target=/home/runner/work/sdk/sdk/packages/create-sdk/templates/generators/node_modules/vitest/./vitest.mjs
93
+ # cmd-shim-target=../../../../../../node_modules/.pnpm/vitest@5.0.1_@opentelemetry+api@1.9.1_@types+node@24.19.0_@vitest+coverage-v8@5.0.1_vit_cafeabb58de02b1474fb782f08525647/node_modules/vitest/vitest.mjs
@@ -18,12 +18,12 @@
18
18
  },
19
19
  "devDependencies": {
20
20
  "@tailor-platform/eslint-plugin-sdk": "0.3.0",
21
- "@tailor-platform/sdk": "2.22.0",
22
- "@tailor-platform/sdk-plugin-seed": "0.3.5",
23
- "@types/node": "24.13.6",
21
+ "@tailor-platform/sdk": "2.24.0",
22
+ "@tailor-platform/sdk-plugin-seed": "0.3.6",
23
+ "@types/node": "24.19.0",
24
24
  "oxfmt": "0.70.0",
25
25
  "oxlint": "1.85.0",
26
- "oxlint-tsgolint": "7.0.2002",
26
+ "oxlint-tsgolint": "7.0.2003",
27
27
  "typescript": "6.0.3",
28
28
  "vitest": "5.0.1"
29
29
  }
@@ -1,31 +1,67 @@
1
1
  #!/bin/sh
2
2
  # Resolve $0 through symlinks so basedir is the shim's real directory.
3
3
  # Cap hops at the kernel's ELOOP limit so a cycle cannot hang the shim.
4
+ #
5
+ # A shim runs with node_modules/.bin at the front of PATH, so readlink, sed,
6
+ # uname, and printf go through `command -p`, which searches the system default
7
+ # path instead. A dependency's bin cannot stand in for one of them and take over
8
+ # the shim before it reaches its target. Directories come from `${link%/*}`,
9
+ # which needs no helper at all.
10
+ #
11
+ # Where no default path is compiled in, as on Nix, `command -p` searches PATH
12
+ # instead, so the helpers run with node_modules and relative entries dropped from
13
+ # PATH.
14
+ caller_path_set=${PATH+set}
15
+ caller_path=${PATH-}
16
+ helper_path=
17
+ rest=$caller_path:
18
+ while [ -n "$rest" ]; do
19
+ dir=${rest%%:*}
20
+ rest=${rest#*:}
21
+ case "$dir" in
22
+ */node_modules/*|*/node_modules) ;;
23
+ /*) helper_path=${helper_path:+$helper_path:}$dir ;;
24
+ esac
25
+ done
26
+ # An empty PATH searches the current directory.
27
+ PATH=${helper_path:-/}
4
28
  link="$0"
29
+ # `${link%/*}` needs a separator to strip. A bare name came from a PATH lookup
30
+ # and stands for a file in the current directory.
31
+ case "$link" in
32
+ */*|*\\*) ;;
33
+ *) link="./$link" ;;
34
+ esac
5
35
  hops=0
6
36
  while [ -L "$link" ] && [ "$hops" -lt 40 ]; do
7
37
  hops=$((hops+1))
8
- target=$(readlink "$link")
38
+ target=$(command -p readlink "$link")
9
39
  case "$target" in
10
40
  /*) link="$target" ;;
11
- *) link="$(dirname "$link")/$target" ;;
41
+ *) link="${link%/*}/$target" ;;
12
42
  esac
13
43
  done
14
- basedir=$(dirname "$(echo "$link" | sed -e 's,\\,/,g')")
44
+ basedir=$(command -p printf '%s\n' "$link" | command -p sed -e 's,\\,/,g')
45
+ basedir="${basedir%/*}"
15
46
  basedir_win="$basedir"
16
47
  exe=""
17
48
  msys=""
18
49
 
19
- case `uname -a` in
50
+ case `command -p uname -a` in
20
51
  *CYGWIN*|*MINGW*|*MSYS*)
21
- if command -v cygpath > /dev/null 2>&1; then
52
+ if converted=$(command -p cygpath -w "$basedir" 2>/dev/null) && [ -n "$converted" ]; then
53
+ basedir_win="$converted"
54
+ elif command -v cygpath > /dev/null 2>&1; then
22
55
  basedir_win=`cygpath -w "$basedir"`
23
56
  fi
24
57
  exe=".exe"
25
58
  msys="true"
26
59
  ;;
27
60
  *WSL2*)
28
- if command -v wslpath > /dev/null 2>&1; then
61
+ if converted=$(command -p wslpath -w "$basedir" 2>/dev/null) && [ -n "$converted" ]; then
62
+ basedir_win="$converted"
63
+ exe=".exe"
64
+ elif command -v wslpath > /dev/null 2>&1; then
29
65
  basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
30
66
  if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
31
67
  basedir_win="$basedir"
@@ -35,21 +71,23 @@ case `uname -a` in
35
71
  fi
36
72
  ;;
37
73
  esac
74
+ if [ -n "$caller_path_set" ]; then PATH=$caller_path; else unset PATH; fi
38
75
 
76
+ basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
39
77
  if [ -z "$NODE_PATH" ]; then
40
- export NODE_PATH="/home/runner/work/sdk/sdk/node_modules/.pnpm/oxfmt@0.70.0/node_modules/oxfmt/node_modules:/home/runner/work/sdk/sdk/node_modules/.pnpm/oxfmt@0.70.0/node_modules:/home/runner/work/sdk/sdk/node_modules/.pnpm/node_modules"
78
+ export NODE_PATH="$basedir_abs/../../../../../../node_modules/.pnpm/oxfmt@0.70.0/node_modules/oxfmt/node_modules:$basedir_abs/../../../../../../node_modules/.pnpm/oxfmt@0.70.0/node_modules:$basedir_abs/../../../../../../node_modules/.pnpm/node_modules"
41
79
  else
42
- export NODE_PATH="/home/runner/work/sdk/sdk/node_modules/.pnpm/oxfmt@0.70.0/node_modules/oxfmt/node_modules:/home/runner/work/sdk/sdk/node_modules/.pnpm/oxfmt@0.70.0/node_modules:/home/runner/work/sdk/sdk/node_modules/.pnpm/node_modules:$NODE_PATH"
80
+ export NODE_PATH="$basedir_abs/../../../../../../node_modules/.pnpm/oxfmt@0.70.0/node_modules/oxfmt/node_modules:$basedir_abs/../../../../../../node_modules/.pnpm/oxfmt@0.70.0/node_modules:$basedir_abs/../../../../../../node_modules/.pnpm/node_modules:$NODE_PATH"
43
81
  fi
44
82
  if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
45
- exec "$basedir/node.exe" "$basedir_win/../oxfmt/bin/oxfmt" "$@"
83
+ exec "$basedir/node.exe" "$basedir_win/../../../../../../node_modules/.pnpm/oxfmt@0.70.0/node_modules/oxfmt/bin/oxfmt" "$@"
46
84
  elif [ -x "$basedir/node" ]; then
47
- exec "$basedir/node" "$basedir/../oxfmt/bin/oxfmt" "$@"
85
+ exec "$basedir/node" "$basedir_abs/../../../../../../node_modules/.pnpm/oxfmt@0.70.0/node_modules/oxfmt/bin/oxfmt" "$@"
48
86
  elif command -v node >/dev/null 2>&1; then
49
- exec node "$basedir/../oxfmt/bin/oxfmt" "$@"
87
+ exec node "$basedir_abs/../../../../../../node_modules/.pnpm/oxfmt@0.70.0/node_modules/oxfmt/bin/oxfmt" "$@"
50
88
  elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
51
- exec node.exe "$basedir_win/../oxfmt/bin/oxfmt" "$@"
89
+ exec node.exe "$basedir_win/../../../../../../node_modules/.pnpm/oxfmt@0.70.0/node_modules/oxfmt/bin/oxfmt" "$@"
52
90
  else
53
- exec node "$basedir/../oxfmt/bin/oxfmt" "$@"
91
+ exec node "$basedir_abs/../../../../../../node_modules/.pnpm/oxfmt@0.70.0/node_modules/oxfmt/bin/oxfmt" "$@"
54
92
  fi
55
- # cmd-shim-target=/home/runner/work/sdk/sdk/packages/create-sdk/templates/hello-world/node_modules/oxfmt/bin/oxfmt
93
+ # cmd-shim-target=../../../../../../node_modules/.pnpm/oxfmt@0.70.0/node_modules/oxfmt/bin/oxfmt
@@ -1,31 +1,67 @@
1
1
  #!/bin/sh
2
2
  # Resolve $0 through symlinks so basedir is the shim's real directory.
3
3
  # Cap hops at the kernel's ELOOP limit so a cycle cannot hang the shim.
4
+ #
5
+ # A shim runs with node_modules/.bin at the front of PATH, so readlink, sed,
6
+ # uname, and printf go through `command -p`, which searches the system default
7
+ # path instead. A dependency's bin cannot stand in for one of them and take over
8
+ # the shim before it reaches its target. Directories come from `${link%/*}`,
9
+ # which needs no helper at all.
10
+ #
11
+ # Where no default path is compiled in, as on Nix, `command -p` searches PATH
12
+ # instead, so the helpers run with node_modules and relative entries dropped from
13
+ # PATH.
14
+ caller_path_set=${PATH+set}
15
+ caller_path=${PATH-}
16
+ helper_path=
17
+ rest=$caller_path:
18
+ while [ -n "$rest" ]; do
19
+ dir=${rest%%:*}
20
+ rest=${rest#*:}
21
+ case "$dir" in
22
+ */node_modules/*|*/node_modules) ;;
23
+ /*) helper_path=${helper_path:+$helper_path:}$dir ;;
24
+ esac
25
+ done
26
+ # An empty PATH searches the current directory.
27
+ PATH=${helper_path:-/}
4
28
  link="$0"
29
+ # `${link%/*}` needs a separator to strip. A bare name came from a PATH lookup
30
+ # and stands for a file in the current directory.
31
+ case "$link" in
32
+ */*|*\\*) ;;
33
+ *) link="./$link" ;;
34
+ esac
5
35
  hops=0
6
36
  while [ -L "$link" ] && [ "$hops" -lt 40 ]; do
7
37
  hops=$((hops+1))
8
- target=$(readlink "$link")
38
+ target=$(command -p readlink "$link")
9
39
  case "$target" in
10
40
  /*) link="$target" ;;
11
- *) link="$(dirname "$link")/$target" ;;
41
+ *) link="${link%/*}/$target" ;;
12
42
  esac
13
43
  done
14
- basedir=$(dirname "$(echo "$link" | sed -e 's,\\,/,g')")
44
+ basedir=$(command -p printf '%s\n' "$link" | command -p sed -e 's,\\,/,g')
45
+ basedir="${basedir%/*}"
15
46
  basedir_win="$basedir"
16
47
  exe=""
17
48
  msys=""
18
49
 
19
- case `uname -a` in
50
+ case `command -p uname -a` in
20
51
  *CYGWIN*|*MINGW*|*MSYS*)
21
- if command -v cygpath > /dev/null 2>&1; then
52
+ if converted=$(command -p cygpath -w "$basedir" 2>/dev/null) && [ -n "$converted" ]; then
53
+ basedir_win="$converted"
54
+ elif command -v cygpath > /dev/null 2>&1; then
22
55
  basedir_win=`cygpath -w "$basedir"`
23
56
  fi
24
57
  exe=".exe"
25
58
  msys="true"
26
59
  ;;
27
60
  *WSL2*)
28
- if command -v wslpath > /dev/null 2>&1; then
61
+ if converted=$(command -p wslpath -w "$basedir" 2>/dev/null) && [ -n "$converted" ]; then
62
+ basedir_win="$converted"
63
+ exe=".exe"
64
+ elif command -v wslpath > /dev/null 2>&1; then
29
65
  basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
30
66
  if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
31
67
  basedir_win="$basedir"
@@ -35,21 +71,23 @@ case `uname -a` in
35
71
  fi
36
72
  ;;
37
73
  esac
74
+ if [ -n "$caller_path_set" ]; then PATH=$caller_path; else unset PATH; fi
38
75
 
76
+ basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
39
77
  if [ -z "$NODE_PATH" ]; then
40
- export NODE_PATH="/home/runner/work/sdk/sdk/node_modules/.pnpm/oxlint@1.85.0_oxlint-tsgolint@7.0.2002/node_modules/oxlint/node_modules:/home/runner/work/sdk/sdk/node_modules/.pnpm/oxlint@1.85.0_oxlint-tsgolint@7.0.2002/node_modules:/home/runner/work/sdk/sdk/node_modules/.pnpm/node_modules"
78
+ export NODE_PATH="$basedir_abs/../../../../../../node_modules/.pnpm/oxlint@1.85.0_oxlint-tsgolint@7.0.2003/node_modules/oxlint/node_modules:$basedir_abs/../../../../../../node_modules/.pnpm/oxlint@1.85.0_oxlint-tsgolint@7.0.2003/node_modules:$basedir_abs/../../../../../../node_modules/.pnpm/node_modules"
41
79
  else
42
- export NODE_PATH="/home/runner/work/sdk/sdk/node_modules/.pnpm/oxlint@1.85.0_oxlint-tsgolint@7.0.2002/node_modules/oxlint/node_modules:/home/runner/work/sdk/sdk/node_modules/.pnpm/oxlint@1.85.0_oxlint-tsgolint@7.0.2002/node_modules:/home/runner/work/sdk/sdk/node_modules/.pnpm/node_modules:$NODE_PATH"
80
+ export NODE_PATH="$basedir_abs/../../../../../../node_modules/.pnpm/oxlint@1.85.0_oxlint-tsgolint@7.0.2003/node_modules/oxlint/node_modules:$basedir_abs/../../../../../../node_modules/.pnpm/oxlint@1.85.0_oxlint-tsgolint@7.0.2003/node_modules:$basedir_abs/../../../../../../node_modules/.pnpm/node_modules:$NODE_PATH"
43
81
  fi
44
82
  if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
45
- exec "$basedir/node.exe" "$basedir_win/../oxlint/bin/oxlint" "$@"
83
+ exec "$basedir/node.exe" "$basedir_win/../../../../../../node_modules/.pnpm/oxlint@1.85.0_oxlint-tsgolint@7.0.2003/node_modules/oxlint/bin/oxlint" "$@"
46
84
  elif [ -x "$basedir/node" ]; then
47
- exec "$basedir/node" "$basedir/../oxlint/bin/oxlint" "$@"
85
+ exec "$basedir/node" "$basedir_abs/../../../../../../node_modules/.pnpm/oxlint@1.85.0_oxlint-tsgolint@7.0.2003/node_modules/oxlint/bin/oxlint" "$@"
48
86
  elif command -v node >/dev/null 2>&1; then
49
- exec node "$basedir/../oxlint/bin/oxlint" "$@"
87
+ exec node "$basedir_abs/../../../../../../node_modules/.pnpm/oxlint@1.85.0_oxlint-tsgolint@7.0.2003/node_modules/oxlint/bin/oxlint" "$@"
50
88
  elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
51
- exec node.exe "$basedir_win/../oxlint/bin/oxlint" "$@"
89
+ exec node.exe "$basedir_win/../../../../../../node_modules/.pnpm/oxlint@1.85.0_oxlint-tsgolint@7.0.2003/node_modules/oxlint/bin/oxlint" "$@"
52
90
  else
53
- exec node "$basedir/../oxlint/bin/oxlint" "$@"
91
+ exec node "$basedir_abs/../../../../../../node_modules/.pnpm/oxlint@1.85.0_oxlint-tsgolint@7.0.2003/node_modules/oxlint/bin/oxlint" "$@"
54
92
  fi
55
- # cmd-shim-target=/home/runner/work/sdk/sdk/packages/create-sdk/templates/hello-world/node_modules/oxlint/bin/oxlint
93
+ # cmd-shim-target=../../../../../../node_modules/.pnpm/oxlint@1.85.0_oxlint-tsgolint@7.0.2003/node_modules/oxlint/bin/oxlint
@@ -1,31 +1,67 @@
1
1
  #!/bin/sh
2
2
  # Resolve $0 through symlinks so basedir is the shim's real directory.
3
3
  # Cap hops at the kernel's ELOOP limit so a cycle cannot hang the shim.
4
+ #
5
+ # A shim runs with node_modules/.bin at the front of PATH, so readlink, sed,
6
+ # uname, and printf go through `command -p`, which searches the system default
7
+ # path instead. A dependency's bin cannot stand in for one of them and take over
8
+ # the shim before it reaches its target. Directories come from `${link%/*}`,
9
+ # which needs no helper at all.
10
+ #
11
+ # Where no default path is compiled in, as on Nix, `command -p` searches PATH
12
+ # instead, so the helpers run with node_modules and relative entries dropped from
13
+ # PATH.
14
+ caller_path_set=${PATH+set}
15
+ caller_path=${PATH-}
16
+ helper_path=
17
+ rest=$caller_path:
18
+ while [ -n "$rest" ]; do
19
+ dir=${rest%%:*}
20
+ rest=${rest#*:}
21
+ case "$dir" in
22
+ */node_modules/*|*/node_modules) ;;
23
+ /*) helper_path=${helper_path:+$helper_path:}$dir ;;
24
+ esac
25
+ done
26
+ # An empty PATH searches the current directory.
27
+ PATH=${helper_path:-/}
4
28
  link="$0"
29
+ # `${link%/*}` needs a separator to strip. A bare name came from a PATH lookup
30
+ # and stands for a file in the current directory.
31
+ case "$link" in
32
+ */*|*\\*) ;;
33
+ *) link="./$link" ;;
34
+ esac
5
35
  hops=0
6
36
  while [ -L "$link" ] && [ "$hops" -lt 40 ]; do
7
37
  hops=$((hops+1))
8
- target=$(readlink "$link")
38
+ target=$(command -p readlink "$link")
9
39
  case "$target" in
10
40
  /*) link="$target" ;;
11
- *) link="$(dirname "$link")/$target" ;;
41
+ *) link="${link%/*}/$target" ;;
12
42
  esac
13
43
  done
14
- basedir=$(dirname "$(echo "$link" | sed -e 's,\\,/,g')")
44
+ basedir=$(command -p printf '%s\n' "$link" | command -p sed -e 's,\\,/,g')
45
+ basedir="${basedir%/*}"
15
46
  basedir_win="$basedir"
16
47
  exe=""
17
48
  msys=""
18
49
 
19
- case `uname -a` in
50
+ case `command -p uname -a` in
20
51
  *CYGWIN*|*MINGW*|*MSYS*)
21
- if command -v cygpath > /dev/null 2>&1; then
52
+ if converted=$(command -p cygpath -w "$basedir" 2>/dev/null) && [ -n "$converted" ]; then
53
+ basedir_win="$converted"
54
+ elif command -v cygpath > /dev/null 2>&1; then
22
55
  basedir_win=`cygpath -w "$basedir"`
23
56
  fi
24
57
  exe=".exe"
25
58
  msys="true"
26
59
  ;;
27
60
  *WSL2*)
28
- if command -v wslpath > /dev/null 2>&1; then
61
+ if converted=$(command -p wslpath -w "$basedir" 2>/dev/null) && [ -n "$converted" ]; then
62
+ basedir_win="$converted"
63
+ exe=".exe"
64
+ elif command -v wslpath > /dev/null 2>&1; then
29
65
  basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
30
66
  if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
31
67
  basedir_win="$basedir"
@@ -35,21 +71,23 @@ case `uname -a` in
35
71
  fi
36
72
  ;;
37
73
  esac
74
+ if [ -n "$caller_path_set" ]; then PATH=$caller_path; else unset PATH; fi
38
75
 
76
+ basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
39
77
  if [ -z "$NODE_PATH" ]; then
40
- export NODE_PATH="/home/runner/work/sdk/sdk/node_modules/.pnpm/node_modules"
78
+ export NODE_PATH="$basedir_abs/../../../../../../node_modules/.pnpm/node_modules"
41
79
  else
42
- export NODE_PATH="/home/runner/work/sdk/sdk/node_modules/.pnpm/node_modules:$NODE_PATH"
80
+ export NODE_PATH="$basedir_abs/../../../../../../node_modules/.pnpm/node_modules:$NODE_PATH"
43
81
  fi
44
82
  if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
45
- exec "$basedir/node.exe" "$basedir_win/../@tailor-platform/sdk/bin/tailor.mjs" "$@"
83
+ exec "$basedir/node.exe" "$basedir_win/../../../../../sdk/bin/tailor.mjs" "$@"
46
84
  elif [ -x "$basedir/node" ]; then
47
- exec "$basedir/node" "$basedir/../@tailor-platform/sdk/bin/tailor.mjs" "$@"
85
+ exec "$basedir/node" "$basedir_abs/../../../../../sdk/bin/tailor.mjs" "$@"
48
86
  elif command -v node >/dev/null 2>&1; then
49
- exec node "$basedir/../@tailor-platform/sdk/bin/tailor.mjs" "$@"
87
+ exec node "$basedir_abs/../../../../../sdk/bin/tailor.mjs" "$@"
50
88
  elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
51
- exec node.exe "$basedir_win/../@tailor-platform/sdk/bin/tailor.mjs" "$@"
89
+ exec node.exe "$basedir_win/../../../../../sdk/bin/tailor.mjs" "$@"
52
90
  else
53
- exec node "$basedir/../@tailor-platform/sdk/bin/tailor.mjs" "$@"
91
+ exec node "$basedir_abs/../../../../../sdk/bin/tailor.mjs" "$@"
54
92
  fi
55
- # cmd-shim-target=/home/runner/work/sdk/sdk/packages/create-sdk/templates/hello-world/node_modules/@tailor-platform/sdk/./bin/tailor.mjs
93
+ # cmd-shim-target=../../../../../sdk/bin/tailor.mjs
@@ -1,31 +1,67 @@
1
1
  #!/bin/sh
2
2
  # Resolve $0 through symlinks so basedir is the shim's real directory.
3
3
  # Cap hops at the kernel's ELOOP limit so a cycle cannot hang the shim.
4
+ #
5
+ # A shim runs with node_modules/.bin at the front of PATH, so readlink, sed,
6
+ # uname, and printf go through `command -p`, which searches the system default
7
+ # path instead. A dependency's bin cannot stand in for one of them and take over
8
+ # the shim before it reaches its target. Directories come from `${link%/*}`,
9
+ # which needs no helper at all.
10
+ #
11
+ # Where no default path is compiled in, as on Nix, `command -p` searches PATH
12
+ # instead, so the helpers run with node_modules and relative entries dropped from
13
+ # PATH.
14
+ caller_path_set=${PATH+set}
15
+ caller_path=${PATH-}
16
+ helper_path=
17
+ rest=$caller_path:
18
+ while [ -n "$rest" ]; do
19
+ dir=${rest%%:*}
20
+ rest=${rest#*:}
21
+ case "$dir" in
22
+ */node_modules/*|*/node_modules) ;;
23
+ /*) helper_path=${helper_path:+$helper_path:}$dir ;;
24
+ esac
25
+ done
26
+ # An empty PATH searches the current directory.
27
+ PATH=${helper_path:-/}
4
28
  link="$0"
29
+ # `${link%/*}` needs a separator to strip. A bare name came from a PATH lookup
30
+ # and stands for a file in the current directory.
31
+ case "$link" in
32
+ */*|*\\*) ;;
33
+ *) link="./$link" ;;
34
+ esac
5
35
  hops=0
6
36
  while [ -L "$link" ] && [ "$hops" -lt 40 ]; do
7
37
  hops=$((hops+1))
8
- target=$(readlink "$link")
38
+ target=$(command -p readlink "$link")
9
39
  case "$target" in
10
40
  /*) link="$target" ;;
11
- *) link="$(dirname "$link")/$target" ;;
41
+ *) link="${link%/*}/$target" ;;
12
42
  esac
13
43
  done
14
- basedir=$(dirname "$(echo "$link" | sed -e 's,\\,/,g')")
44
+ basedir=$(command -p printf '%s\n' "$link" | command -p sed -e 's,\\,/,g')
45
+ basedir="${basedir%/*}"
15
46
  basedir_win="$basedir"
16
47
  exe=""
17
48
  msys=""
18
49
 
19
- case `uname -a` in
50
+ case `command -p uname -a` in
20
51
  *CYGWIN*|*MINGW*|*MSYS*)
21
- if command -v cygpath > /dev/null 2>&1; then
52
+ if converted=$(command -p cygpath -w "$basedir" 2>/dev/null) && [ -n "$converted" ]; then
53
+ basedir_win="$converted"
54
+ elif command -v cygpath > /dev/null 2>&1; then
22
55
  basedir_win=`cygpath -w "$basedir"`
23
56
  fi
24
57
  exe=".exe"
25
58
  msys="true"
26
59
  ;;
27
60
  *WSL2*)
28
- if command -v wslpath > /dev/null 2>&1; then
61
+ if converted=$(command -p wslpath -w "$basedir" 2>/dev/null) && [ -n "$converted" ]; then
62
+ basedir_win="$converted"
63
+ exe=".exe"
64
+ elif command -v wslpath > /dev/null 2>&1; then
29
65
  basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
30
66
  if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
31
67
  basedir_win="$basedir"
@@ -35,21 +71,23 @@ case `uname -a` in
35
71
  fi
36
72
  ;;
37
73
  esac
74
+ if [ -n "$caller_path_set" ]; then PATH=$caller_path; else unset PATH; fi
38
75
 
76
+ basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
39
77
  if [ -z "$NODE_PATH" ]; then
40
- export NODE_PATH="/home/runner/work/sdk/sdk/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/node_modules:/home/runner/work/sdk/sdk/node_modules/.pnpm/typescript@6.0.3/node_modules:/home/runner/work/sdk/sdk/node_modules/.pnpm/node_modules"
78
+ export NODE_PATH="$basedir_abs/../../../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/node_modules:$basedir_abs/../../../../../../node_modules/.pnpm/typescript@6.0.3/node_modules:$basedir_abs/../../../../../../node_modules/.pnpm/node_modules"
41
79
  else
42
- export NODE_PATH="/home/runner/work/sdk/sdk/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/node_modules:/home/runner/work/sdk/sdk/node_modules/.pnpm/typescript@6.0.3/node_modules:/home/runner/work/sdk/sdk/node_modules/.pnpm/node_modules:$NODE_PATH"
80
+ export NODE_PATH="$basedir_abs/../../../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/node_modules:$basedir_abs/../../../../../../node_modules/.pnpm/typescript@6.0.3/node_modules:$basedir_abs/../../../../../../node_modules/.pnpm/node_modules:$NODE_PATH"
43
81
  fi
44
82
  if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
45
- exec "$basedir/node.exe" "$basedir_win/../typescript/bin/tsc" "$@"
83
+ exec "$basedir/node.exe" "$basedir_win/../../../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/bin/tsc" "$@"
46
84
  elif [ -x "$basedir/node" ]; then
47
- exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
85
+ exec "$basedir/node" "$basedir_abs/../../../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/bin/tsc" "$@"
48
86
  elif command -v node >/dev/null 2>&1; then
49
- exec node "$basedir/../typescript/bin/tsc" "$@"
87
+ exec node "$basedir_abs/../../../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/bin/tsc" "$@"
50
88
  elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
51
- exec node.exe "$basedir_win/../typescript/bin/tsc" "$@"
89
+ exec node.exe "$basedir_win/../../../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/bin/tsc" "$@"
52
90
  else
53
- exec node "$basedir/../typescript/bin/tsc" "$@"
91
+ exec node "$basedir_abs/../../../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/bin/tsc" "$@"
54
92
  fi
55
- # cmd-shim-target=/home/runner/work/sdk/sdk/packages/create-sdk/templates/hello-world/node_modules/typescript/./bin/tsc
93
+ # cmd-shim-target=../../../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/bin/tsc