itiger 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,13 +10,14 @@ npx itiger install -g @tiger/example
10
10
 
11
11
  `skills add owner/repo` is translated to
12
12
  `https://git.tigerbrokers.net/owner/repo.git`; Git authentication remains under
13
- the user's normal SSH keys or Git credential helper. Other `skills` arguments
14
- and output are passed through unchanged.
13
+ the user's normal SSH keys or Git credential helper. All other `skills`
14
+ commands, arguments, output, and exit codes are passed through unchanged.
15
15
 
16
16
  When installing an `@tiger/*` package, `itiger` adds
17
17
  `--@tiger:registry=http://r.npm.tigerfintech.com` unless `--registry` or an
18
18
  explicit `--@tiger:registry` option is already present. Non-Tiger packages are
19
- delegated without registry changes.
19
+ delegated without registry changes. Other npm commands are delegated with all
20
+ arguments, output, and exit codes unchanged.
20
21
 
21
22
  Requirements: Node.js 18 or newer, plus npm for package installation. For
22
23
  `skills` commands, the locally installed `skills` CLI is used when available;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itiger",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "A thin adapter for internal skills and @tiger npm packages.",
5
5
  "type": "commonjs",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -8,12 +8,12 @@ async function main() {
8
8
  if (args[0] === 'skills') {
9
9
  return runSkills(args.slice(1));
10
10
  }
11
- if (args[0] === 'install' || args[0] === 'i') {
11
+ if (args.length > 0) {
12
12
  return runNpm(args);
13
13
  }
14
14
 
15
- process.stderr.write('Usage: itiger skills add <owner/repo> [skills options...]\n');
16
- process.stderr.write(' itiger install [npm options...] <package...>\n');
15
+ process.stderr.write('Usage: itiger skills <skills command> [skills options...]\n');
16
+ process.stderr.write(' itiger <npm command> [npm options...]\n');
17
17
  return 2;
18
18
  }
19
19
 
@@ -16,6 +16,7 @@ function hasTigerPackage(args) {
16
16
  }
17
17
 
18
18
  function transformArgs(args) {
19
+ if (args[0] !== 'install' && args[0] !== 'i') return [...args];
19
20
  if (!hasTigerPackage(args) || hasExplicitRegistry(args)) return [...args];
20
21
  return [...args, `--@tiger:registry=${TIGER_REGISTRY}`];
21
22
  }
@@ -28,10 +28,6 @@ function transformArgs(args) {
28
28
  }
29
29
 
30
30
  function runSkills(args) {
31
- if (args.length === 0 || args[0] !== 'add') {
32
- process.stderr.write('itiger: only "skills add" is supported through this adapter\n');
33
- return Promise.resolve(2);
34
- }
35
31
  const transformedArgs = transformArgs(args);
36
32
  return runCommand('skills', transformedArgs, {
37
33
  command: 'npx',