@opentabs-dev/create-plugin 0.0.17

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.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bun
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env bun
2
+ import { scaffoldPlugin, promptForMissingArgs, ScaffoldError } from '@opentabs-dev/cli/scaffold';
3
+ import { Command } from 'commander';
4
+ import pc from 'picocolors';
5
+ import { dirname, join } from 'node:path';
6
+ import { fileURLToPath } from 'node:url';
7
+ const cliDir = dirname(fileURLToPath(import.meta.url));
8
+ const pkgJson = JSON.parse(await Bun.file(join(cliDir, '..', 'package.json')).text());
9
+ const program = new Command('create-opentabs-plugin')
10
+ .version(pkgJson.version, '-V, --version')
11
+ .description('Scaffold a new OpenTabs plugin project')
12
+ .argument('[name]', 'Plugin name (lowercase alphanumeric + hyphens)')
13
+ .option('--domain <domain>', 'Target domain (e.g., .slack.com or github.com)')
14
+ .option('--display <name>', 'Display name (e.g., Slack)')
15
+ .option('--description <desc>', 'Plugin description')
16
+ .action(async (name, options) => {
17
+ try {
18
+ const args = await promptForMissingArgs({
19
+ name,
20
+ domain: options.domain,
21
+ display: options.display,
22
+ description: options.description,
23
+ });
24
+ await scaffoldPlugin(args);
25
+ }
26
+ catch (err) {
27
+ if (err instanceof ScaffoldError) {
28
+ console.error(pc.red(`Error: ${err.message}`));
29
+ process.exit(1);
30
+ }
31
+ throw err;
32
+ }
33
+ });
34
+ await program.parseAsync();
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,aA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,CAAC,EAAE,CAAC,GAAG,CAAC,UAAU,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;YAC/C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC"}
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@opentabs-dev/create-plugin",
3
+ "version": "0.0.17",
4
+ "type": "module",
5
+ "bin": {
6
+ "create-opentabs-plugin": "./dist/index.js"
7
+ },
8
+ "publishConfig": {
9
+ "access": "restricted"
10
+ },
11
+ "files": [
12
+ "dist"
13
+ ],
14
+ "scripts": {
15
+ "build": "tsc --build"
16
+ },
17
+ "dependencies": {
18
+ "@opentabs-dev/cli": "^0.0.17",
19
+ "commander": "^14.0.3",
20
+ "picocolors": "^1.1.1"
21
+ },
22
+ "devDependencies": {
23
+ "bun-types": "^1.3.9"
24
+ }
25
+ }