@object-ui/create-plugin 2.0.0 → 3.0.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 (2) hide show
  1. package/dist/index.js +38 -0
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -318,6 +318,44 @@ describe('${pascalCaseName}', () => {
318
318
  path.join(targetDir, "src", `${pascalCaseName}Impl.test.tsx`),
319
319
  testFile
320
320
  );
321
+ const storyFile = `/**
322
+ * ObjectUI
323
+ * Copyright (c) ${vars.YEAR}-present ObjectStack Inc.
324
+ *
325
+ * This source code is licensed under the MIT license found in the
326
+ * LICENSE file in the root directory of this source tree.
327
+ */
328
+
329
+ import type { Meta, StoryObj } from '@storybook/react';
330
+ import React from 'react';
331
+ import { ${pascalCaseName} } from './${pascalCaseName}Impl';
332
+
333
+ const meta = {
334
+ title: 'Plugins/${pascalCaseName}',
335
+ component: ${pascalCaseName},
336
+ parameters: {
337
+ layout: 'padded',
338
+ },
339
+ tags: ['autodocs'],
340
+ } satisfies Meta<typeof ${pascalCaseName}>;
341
+
342
+ export default meta;
343
+ type Story = StoryObj<typeof meta>;
344
+
345
+ export const Default: Story = {
346
+ args: {},
347
+ };
348
+
349
+ export const WithClassName: Story = {
350
+ args: {
351
+ className: 'p-4 border rounded',
352
+ },
353
+ };
354
+ `;
355
+ fs.writeFileSync(
356
+ path.join(targetDir, "src", `${pascalCaseName}.stories.tsx`),
357
+ storyFile
358
+ );
321
359
  console.log(chalk.green("\u2705 Plugin created successfully!\n"));
322
360
  console.log(chalk.blue("Next steps:\n"));
323
361
  console.log(chalk.gray(` cd packages/${fullPackageName}`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@object-ui/create-plugin",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "CLI tool to scaffold ObjectUI plugins",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -12,16 +12,16 @@
12
12
  "templates"
13
13
  ],
14
14
  "dependencies": {
15
- "chalk": "^5.4.1",
15
+ "chalk": "^5.6.2",
16
16
  "commander": "^14.0.3",
17
- "fs-extra": "^11.2.0",
17
+ "fs-extra": "^11.3.3",
18
18
  "prompts": "^2.4.2"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/fs-extra": "^11.0.4",
22
- "@types/node": "^25.2.2",
22
+ "@types/node": "^25.2.3",
23
23
  "@types/prompts": "^2.4.9",
24
- "tsup": "^8.0.0",
24
+ "tsup": "^8.5.1",
25
25
  "typescript": "^5.9.3",
26
26
  "vitest": "^4.0.18"
27
27
  },