@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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @tailor-platform/create-sdk
2
2
 
3
+ ## 2.24.0
4
+
5
+ No changes in this release.
6
+
7
+ ## 2.23.0
8
+
9
+ ### Patch Changes
10
+
11
+ - [#2422](https://github.com/tailor-platform/sdk/pull/2422) [`e5509ba`](https://github.com/tailor-platform/sdk/commit/e5509baacf431faa46ada16cbf0b4bb9a4821a3c) Thanks [@toiroakr](https://github.com/toiroakr)! - List every template `--template` accepts in the create-sdk README. The list named a `testing` template that no longer exists and left out `tailordb`, `resolver`, `workflow`, `executor`, `static-web-site`, and `generators`. The `executor` template's description now matches what it ships: IdP user and auth access token triggers are included, and the `graphql` and `webhook` operation kinds it never contained are no longer listed.
12
+
3
13
  ## 2.22.0
4
14
 
5
15
  No changes in this release.
package/README.md CHANGED
@@ -26,12 +26,17 @@ Note: npm 7+ requires `--` before create-sdk options (for example, `--template`)
26
26
 
27
27
  ## Available Templates
28
28
 
29
- | Template | Description | Features |
30
- | ---------------------- | -------------------------------- | ----------------------------------------- |
31
- | `hello-world` | Minimal starter project | Simple resolver example |
32
- | `inventory-management` | Full-featured sample application | TailorDB, Resolver, Executor, Permissions |
33
- | `testing` | Testing patterns guide | Unit tests, E2E tests, Vitest setup |
34
- | `multi-application` | Multi-app architecture | Shared databases, multiple applications |
29
+ | Template | Description | Features |
30
+ | ---------------------- | -------------------------------- | ------------------------------------------------------------- |
31
+ | `hello-world` | Minimal starter project | Simple resolver example |
32
+ | `inventory-management` | Full-featured sample application | TailorDB, Resolver, Executor, Permissions |
33
+ | `multi-application` | Multi-app architecture | Shared databases, multiple applications |
34
+ | `tailordb` | TailorDB table definitions | Field types, relations, validations, hooks |
35
+ | `resolver` | Resolver patterns | Query and mutation resolvers, Vitest setup |
36
+ | `workflow` | Workflow patterns | Job chaining, `runWorkflowLocally()` tests |
37
+ | `executor` | Executor trigger types | Record, resolver, IdP, auth token, schedule, webhook triggers |
38
+ | `static-web-site` | Static website with auth | Static website, IdP, OAuth2 login page |
39
+ | `generators` | Built-in generator plugins | Kysely types, enum constants, file utils, seed |
35
40
 
36
41
  ### hello-world
37
42
 
@@ -54,17 +59,6 @@ A complete inventory management system demonstrating real-world patterns.
54
59
  - Executor for inventory threshold monitoring
55
60
  - Machine users for API access
56
61
 
57
- ### testing
58
-
59
- A comprehensive guide to testing patterns with Vitest.
60
-
61
- **Includes:**
62
-
63
- - Unit test examples (simple resolver, mock TailorDB, dependency injection)
64
- - E2E test setup with deployed application
65
- - CI/CD integration patterns
66
- - Global setup for test credentials
67
-
68
62
  ### multi-application
69
63
 
70
64
  Demonstrates multiple applications sharing databases within a workspace.
@@ -75,6 +69,74 @@ Demonstrates multiple applications sharing databases within a workspace.
75
69
  - Admin application (references shared database as external)
76
70
  - Coordinated deployment scripts
77
71
 
72
+ ### tailordb
73
+
74
+ Comprehensive TailorDB table definitions demonstrating the features of `db.table()`.
75
+
76
+ **Includes:**
77
+
78
+ - All field types, relations, and nested objects
79
+ - Field-level and table-level validations
80
+ - Hooks, file attachments, and composite indexes
81
+ - Role-based permissions
82
+ - Vitest setup
83
+
84
+ ### resolver
85
+
86
+ Resolver patterns with testing approaches for each.
87
+
88
+ **Includes:**
89
+
90
+ - Simple query, database query, and database mutation resolvers
91
+ - Environment variable, caller, and invoker context access
92
+ - Tests using direct `body()` calls, `mockTailordb`, and dependency injection
93
+
94
+ ### workflow
95
+
96
+ Workflow patterns with job chaining and dependency injection.
97
+
98
+ **Includes:**
99
+
100
+ - Workflow with multiple jobs (`createWorkflow`, `createWorkflowJob`)
101
+ - Job chaining via `.start()`
102
+ - Database operations in workflow jobs
103
+ - Approval wait points (`createWaitPoints`) resolved from a resolver
104
+ - Integration tests with `runWorkflowLocally()` and E2E tests with `startWorkflow()`
105
+
106
+ ### executor
107
+
108
+ Demonstrates executor triggers with supporting infrastructure.
109
+
110
+ **Includes:**
111
+
112
+ - Record created, updated, and deleted, resolver executed, schedule, and incoming webhook triggers
113
+ - IdP user created, updated, and deleted triggers
114
+ - Auth access token issued, refreshed, and revoked triggers
115
+ - `function` and `workflow` operation kinds
116
+ - Vitest setup
117
+
118
+ ### static-web-site
119
+
120
+ Static website configuration with authentication and identity provider integration.
121
+
122
+ **Includes:**
123
+
124
+ - Static website definition (`defineStaticWebSite`)
125
+ - Identity provider and auth setup with machine users and OAuth2 clients
126
+ - Simple HTML login page with OAuth2 callback handler
127
+
128
+ ### generators
129
+
130
+ Demonstrates the built-in generator plugins.
131
+
132
+ **Includes:**
133
+
134
+ - Kysely type definitions (`kyselyTypePlugin`)
135
+ - Enum constants (`enumConstantsPlugin`)
136
+ - File upload and download utilities (`fileUtilsPlugin`)
137
+ - Seed data templates (`seedPlugin`)
138
+ - Vitest setup
139
+
78
140
  ## What it does
79
141
 
80
142
  This tool will:
package/dist/index.js CHANGED
@@ -21,7 +21,7 @@ const templateHints = {
21
21
  tailordb: "Comprehensive TailorDB table definitions with all features",
22
22
  resolver: "Resolver patterns with testing (simple, DB, env, user)",
23
23
  workflow: "Workflow patterns with job chaining and testing",
24
- executor: "Executor trigger types (record, resolver, schedule, webhook)",
24
+ executor: "Executor triggers (record, resolver, IdP, auth token, schedule, webhook)",
25
25
  "static-web-site": "Static website with auth and IdP integration",
26
26
  generators: "Built-in generation plugins: kysely, enums, files, seed"
27
27
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailor-platform/create-sdk",
3
- "version": "2.22.0",
3
+ "version": "2.24.0",
4
4
  "description": "A CLI tool to quickly create a new Tailor Platform SDK project",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -28,12 +28,13 @@
28
28
  "zod": "4.6.5"
29
29
  },
30
30
  "devDependencies": {
31
- "@types/node": "24.13.6",
31
+ "@types/node": "24.19.0",
32
32
  "eslint-plugin-zod": "4.14.2",
33
33
  "oxlint": "1.85.0",
34
- "oxlint-tsgolint": "7.0.2002",
34
+ "oxlint-tsgolint": "7.0.2003",
35
35
  "tsdown": "0.23.0",
36
- "typescript": "6.0.3"
36
+ "typescript": "6.0.3",
37
+ "vitest": "5.0.1"
37
38
  },
38
39
  "scripts": {
39
40
  "build": "tsdown",
@@ -41,6 +42,7 @@
41
42
  "lint:fix": "oxlint --type-aware . --ignore-pattern \"templates/**\" --fix",
42
43
  "knip": "knip",
43
44
  "typecheck": "tsc --noEmit",
45
+ "test": "vitest",
44
46
  "publint": "publint --strict"
45
47
  }
46
48
  }
@@ -1,20 +1,21 @@
1
1
  # Executor Template
2
2
 
3
- Demonstrates all executor trigger types with supporting infrastructure.
3
+ Demonstrates executor triggers with supporting infrastructure.
4
4
 
5
5
  ## Trigger Types
6
6
 
7
7
  - `recordCreatedTrigger` - React to new record creation (with condition)
8
8
  - `recordUpdatedTrigger` - React to record updates
9
+ - `recordDeletedTrigger` - React to record deletion
9
10
  - `resolverExecutedTrigger` - React to resolver execution
10
11
  - `scheduleTrigger` - CRON-based scheduled execution
11
12
  - `incomingWebhookTrigger` - React to external webhook calls
13
+ - `idpUserCreatedTrigger` / `idpUserUpdatedTrigger` / `idpUserDeletedTrigger` - React to IdP user changes
14
+ - `authAccessTokenIssuedTrigger` / `authAccessTokenRefreshedTrigger` / `authAccessTokenRevokedTrigger` - React to auth access token events
12
15
 
13
16
  ## Operation Kinds
14
17
 
15
18
  - `function` - Custom function body
16
- - `graphql` - Execute GraphQL mutations
17
- - `webhook` - Send HTTP requests
18
19
  - `workflow` - Trigger a workflow
19
20
 
20
21
  ## Getting Started
@@ -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/executor/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/executor/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/executor/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/executor/node_modules/typescript/./bin/tsc
93
+ # cmd-shim-target=../../../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/bin/tsc