itiger 0.1.3 → 0.1.4
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 +18 -0
- package/package.json +1 -1
- package/src/app-adapter.js +19 -0
- package/src/cli.js +5 -0
package/README.md
CHANGED
|
@@ -6,6 +6,8 @@ all work to the locally installed CLIs and never stores or manages credentials.
|
|
|
6
6
|
```bash
|
|
7
7
|
npx itiger skills add fed/skills
|
|
8
8
|
npx itiger install -g @tiger/example
|
|
9
|
+
npx itiger app publish -p my-app -d ./dist
|
|
10
|
+
npx itiger app rollback -p my-app -t v1
|
|
9
11
|
```
|
|
10
12
|
|
|
11
13
|
`skills add owner/repo` is translated to
|
|
@@ -24,6 +26,22 @@ Requirements: Node.js 18 or newer, plus npm for package installation. For
|
|
|
24
26
|
otherwise `npx --yes skills` downloads and runs the public CLI without
|
|
25
27
|
persisting credentials or changing the user's global installation.
|
|
26
28
|
|
|
29
|
+
## App publishing
|
|
30
|
+
|
|
31
|
+
`itiger app ...` runs the private `@tiger/oss-publish` CLI through `npx`, using
|
|
32
|
+
the Tiger scope registry. It does not whitelist or reinterpret commands: every
|
|
33
|
+
argument after `app` is forwarded unchanged. Therefore it supports all current
|
|
34
|
+
and future `oss-publish` commands and options, including the default publish
|
|
35
|
+
form, `access` subcommands, and any `--`-separated arguments:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npx itiger app -p my-app -d ./dist
|
|
39
|
+
npx itiger app publish -p my-app -d ./dist
|
|
40
|
+
npx itiger app rollback -p my-app -t v1
|
|
41
|
+
npx itiger app history -p my-app --json
|
|
42
|
+
npx itiger app access add -p my-app -m teammate
|
|
43
|
+
```
|
|
44
|
+
|
|
27
45
|
## Development
|
|
28
46
|
|
|
29
47
|
```bash
|
package/package.json
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const { runCommand } = require('./process');
|
|
2
|
+
const { TIGER_REGISTRY } = require('./npm-adapter');
|
|
3
|
+
|
|
4
|
+
const OSS_PUBLISH_PACKAGE = '@tiger/oss-publish';
|
|
5
|
+
|
|
6
|
+
function transformArgs(args) {
|
|
7
|
+
return [
|
|
8
|
+
'--yes',
|
|
9
|
+
`--@tiger:registry=${TIGER_REGISTRY}`,
|
|
10
|
+
OSS_PUBLISH_PACKAGE,
|
|
11
|
+
...args,
|
|
12
|
+
];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function runApp(args) {
|
|
16
|
+
return runCommand('npx', transformArgs(args));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
module.exports = { OSS_PUBLISH_PACKAGE, transformArgs, runApp };
|
package/src/cli.js
CHANGED
|
@@ -2,17 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
const { runSkills } = require('./skills-adapter');
|
|
4
4
|
const { runNpm } = require('./npm-adapter');
|
|
5
|
+
const { runApp } = require('./app-adapter');
|
|
5
6
|
|
|
6
7
|
async function main() {
|
|
7
8
|
const args = process.argv.slice(2);
|
|
8
9
|
if (args[0] === 'skills') {
|
|
9
10
|
return runSkills(args.slice(1));
|
|
10
11
|
}
|
|
12
|
+
if (args[0] === 'app') {
|
|
13
|
+
return runApp(args.slice(1));
|
|
14
|
+
}
|
|
11
15
|
if (args.length > 0) {
|
|
12
16
|
return runNpm(args);
|
|
13
17
|
}
|
|
14
18
|
|
|
15
19
|
process.stderr.write('Usage: itiger skills <skills command> [skills options...]\n');
|
|
20
|
+
process.stderr.write(' itiger app [oss-publish command] [app options...]\n');
|
|
16
21
|
process.stderr.write(' itiger <npm command> [npm options...]\n');
|
|
17
22
|
return 2;
|
|
18
23
|
}
|