@bubblydoo/uxp-test-framework-plugin 0.0.2 → 0.0.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.
Files changed (47) hide show
  1. package/README.md +5 -0
  2. package/dist-vite/cli-CHBMTgYc.js +108296 -0
  3. package/dist-vite/cli-CHBMTgYc.js.map +1 -0
  4. package/dist-vite/cli.d.ts +1 -0
  5. package/dist-vite/cli.js +35 -0
  6. package/dist-vite/cli.js.map +1 -0
  7. package/dist-vite/index-B82GTETV.js +66056 -0
  8. package/dist-vite/index-B82GTETV.js.map +1 -0
  9. package/index.html +1 -1
  10. package/package.json +33 -22
  11. package/{src/bolt-uxp-ws-listener.js → src-plugin/bolt-uxp-ws-listener.ts} +15 -2
  12. package/.npmignore +0 -4
  13. package/.turbo/daemon/b38c7656669412eb-turbo.log.2026-01-28 +0 -0
  14. package/.turbo/turbo-build.log +0 -14
  15. package/CHANGELOG.md +0 -11
  16. package/create-vite-config.ts +0 -91
  17. package/dist/create-vite-config.js +0 -13965
  18. package/postcss.config.cjs +0 -8
  19. package/src/assets/bolt-uxp-quickstart.gif +0 -0
  20. package/src/assets/bolt-uxp.png +0 -0
  21. package/src/assets/bolt-uxp.svg +0 -55
  22. package/src/assets/built-with-bolt-uxp/Built_With_BOLT_UXP_Logo_Black_V01.png +0 -0
  23. package/src/assets/built-with-bolt-uxp/Built_With_BOLT_UXP_Logo_Black_V01.svg +0 -78
  24. package/src/assets/built-with-bolt-uxp/Built_With_BOLT_UXP_Logo_White_V01.png +0 -0
  25. package/src/assets/built-with-bolt-uxp/Built_With_BOLT_UXP_Logo_White_V01.svg +0 -81
  26. package/src/assets/react.png +0 -0
  27. package/src/assets/react.svg +0 -36
  28. package/src/assets/sass.png +0 -0
  29. package/src/assets/sass.svg +0 -45
  30. package/src/assets/svelte.png +0 -0
  31. package/src/assets/svelte.svg +0 -1
  32. package/src/assets/typescript.png +0 -0
  33. package/src/assets/typescript.svg +0 -6
  34. package/src/assets/vite.png +0 -0
  35. package/src/assets/vite.svg +0 -1
  36. package/src/assets/vue.png +0 -0
  37. package/src/assets/vue.svg +0 -2
  38. package/tailwind.config.js +0 -15
  39. package/tsup.config.ts +0 -11
  40. package/uxp.config.ts +0 -109
  41. /package/{src → src-plugin}/components/ErrorView.tsx +0 -0
  42. /package/{src → src-plugin}/index-react.tsx +0 -0
  43. /package/{src → src-plugin}/index.css +0 -0
  44. /package/{src → src-plugin}/lib/resolvePath.ts +0 -0
  45. /package/{src → src-plugin}/main.tsx +0 -0
  46. /package/{public-zip → src-plugin/public-zip}/readme.txt +0 -0
  47. /package/{src → src-plugin}/tests.d.ts +0 -0
package/index.html CHANGED
@@ -7,6 +7,6 @@
7
7
  </head>
8
8
  <body>
9
9
  <div id="app"></div>
10
- <script type="module" src="/src/index-react.tsx"></script>
10
+ <script type="module" src="./src-plugin/index-react.tsx"></script>
11
11
  </body>
12
12
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bubblydoo/uxp-test-framework-plugin",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Hans Otto Wirtz <hansottowirtz@gmail.com>",
@@ -10,9 +10,9 @@
10
10
  },
11
11
  "homepage": "https://github.com/bubblydoo/uxp-toolkit/tree/main/packages/uxp-test-framework-plugin",
12
12
  "exports": {
13
- "./create-vite-config": {
14
- "types": "./dist/create-vite-config.d.ts",
15
- "import": "./dist/create-vite-config.js"
13
+ "./cli": {
14
+ "types": "./dist-vite/cli.d.ts",
15
+ "default": "./dist-vite/cli.js"
16
16
  },
17
17
  "./package.json": "./package.json"
18
18
  },
@@ -20,44 +20,55 @@
20
20
  "access": "public"
21
21
  },
22
22
  "files": [
23
- "*"
23
+ "dist-vite",
24
+ "src-plugin",
25
+ "index.html"
24
26
  ],
25
27
  "peerDependencies": {
26
- "@bubblydoo/uxp-toolkit": "0.0.2"
28
+ "@bubblydoo/uxp-toolkit": "0.0.4"
27
29
  },
28
30
  "dependencies": {
29
- "@tanstack/react-query": "^5.90.20",
30
- "error-stack-parser": "^2.1.4",
31
- "react": "^19.1.0",
32
- "react-dom": "^19.1.0",
33
- "source-map-js": "^1.2.1",
34
- "vite-plugin-static-copy": "^3.1.6",
35
- "vite-tsconfig-paths": "^6.0.5",
36
- "@bubblydoo/uxp-polyfills": "0.0.2",
37
- "@bubblydoo/uxp-test-framework-base": "0.0.2"
31
+ "chokidar": "^5.0.0",
32
+ "typescript": "^5.9.3",
33
+ "vite": "^6.4.1",
34
+ "tailwindcss": "^3.4.17"
38
35
  },
39
36
  "devDependencies": {
40
37
  "@adobe/cc-ext-uxp-types": "https://github.com/justintaylor-dev/cc-ext-uxp-types.git",
38
+ "@babel/preset-typescript": "^7.28.5",
39
+ "@rollup/plugin-commonjs": "^29.0.0",
40
+ "@rollup/plugin-json": "^6.1.0",
41
+ "@rollup/plugin-node-resolve": "^16.0.0",
42
+ "@rollup/plugin-typescript": "^12.1.2",
43
+ "@tanstack/react-query": "^5.90.20",
41
44
  "@types/node": "^20.8.7",
42
45
  "@types/photoshop": "^25.0.2",
43
46
  "@types/react": "^19.1.6",
44
47
  "@types/react-dom": "^19.1.6",
45
48
  "@types/ws": "^8.5.8",
46
49
  "@vitejs/plugin-react": "^5.1.2",
47
- "tailwindcss": "^3",
48
- "postcss": "^8",
50
+ "arg": "^5.0.2",
49
51
  "autoprefixer": "^10",
50
52
  "cross-env": "^7.0.3",
53
+ "error-stack-parser": "^2.1.4",
51
54
  "npm-run-all": "^4.1.5",
52
- "tsup": "^8.5.1",
53
- "typescript": "^5.9.3",
54
- "vite": "^7.3.1",
55
+ "postcss": "^8",
56
+ "react": "^19.1.0",
57
+ "react-dom": "^19.1.0",
58
+ "rollup": "^4.57.0",
59
+ "rollup-plugin-dts": "^6.3.0",
60
+ "source-map-js": "^1.2.1",
61
+ "tslib": "^2.8.1",
62
+ "vite-plugin-static-copy": "^3.1.6",
63
+ "vite-tsconfig-paths": "^6.0.5",
55
64
  "vite-uxp-plugin": "^1.2.5",
56
65
  "ws": "^8.14.2",
57
66
  "zod": "^4.3.6",
58
- "@bubblydoo/tsconfig": "0.0.1"
67
+ "@bubblydoo/tsconfig": "0.0.3",
68
+ "@bubblydoo/uxp-test-framework-base": "0.0.4",
69
+ "@bubblydoo/uxp-polyfills": "0.0.4"
59
70
  },
60
71
  "scripts": {
61
- "build": "tsup"
72
+ "build": "rm -rf dist-vite && pnpm exec rollup -c && cp cli.d.ts dist-vite/cli.d.ts"
62
73
  }
63
74
  }
@@ -1,9 +1,22 @@
1
+ import { uxpEntrypointsSchema } from "@bubblydoo/uxp-toolkit";
2
+ import { entrypoints } from "uxp";
3
+
4
+ const manifestId = uxpEntrypointsSchema.parse(entrypoints)._pluginInfo.id;
5
+
6
+ declare global {
7
+ var BOLT_UXP_HOT_RELOAD_PORT: number;
8
+ }
9
+
1
10
  const prefix = "[⚡ Bolt Hot Reload]";
2
11
 
3
12
  const log = console.log.bind(console, prefix);
4
13
 
5
14
  const listenForHotReload = () => {
6
- const reconnect = (reason) => {
15
+ if (typeof BOLT_UXP_HOT_RELOAD_PORT === "undefined") {
16
+ log("BOLT_UXP_HOT_RELOAD_PORT is not defined");
17
+ return;
18
+ }
19
+ const reconnect = (reason: string) => {
7
20
  log(
8
21
  `Disconnected from hot reload server (${reason}). Attempting to reconnect in 3 seconds...`,
9
22
  );
@@ -13,7 +26,7 @@ const listenForHotReload = () => {
13
26
  ws.onclose = () => reconnect("closed");
14
27
  ws.onmessage = (event) => {
15
28
  const data = JSON.parse(event.data);
16
- if (data.id === BOLT_UXP_MANIFEST_ID && data.status === "updated") {
29
+ if (data.id === manifestId && data.status === "updated") {
17
30
  log("Hot reloading...");
18
31
  location.reload();
19
32
  }
package/.npmignore DELETED
@@ -1,4 +0,0 @@
1
- .gitignore
2
- tsconfig.json
3
- turbo.json
4
- .DS_Store
@@ -1,14 +0,0 @@
1
-
2
- 
3
- > @bubblydoo/uxp-test-framework-plugin@0.0.2 build /Users/otto/Code/projects/bubbly/uxp-toolkit/packages/uxp-test-framework-plugin
4
- > tsup
5
-
6
- CLI Building entry: create-vite-config.ts
7
- CLI Using tsconfig: tsconfig.json
8
- CLI tsup v8.5.1
9
- CLI Using tsup config: /Users/otto/Code/projects/bubbly/uxp-toolkit/packages/uxp-test-framework-plugin/tsup.config.ts
10
- CLI Target: node20
11
- CLI Cleaning output folder
12
- ESM Build start
13
- ESM dist/create-vite-config.js 511.65 KB
14
- ESM ⚡️ Build success in 40ms
package/CHANGELOG.md DELETED
@@ -1,11 +0,0 @@
1
- # @bubblydoo/uxp-test-framework-plugin
2
-
3
- ## 0.0.2
4
-
5
- ### Patch Changes
6
-
7
- - 3cafb8e: Initial setup
8
- - Updated dependencies [3cafb8e]
9
- - @bubblydoo/uxp-polyfills@0.0.2
10
- - @bubblydoo/uxp-test-framework-base@0.0.2
11
- - @bubblydoo/uxp-toolkit@0.0.2
@@ -1,91 +0,0 @@
1
- import { uxp } from "vite-uxp-plugin";
2
- import { createUxpConfig } from "./uxp.config";
3
- import path from "path";
4
- import { defineConfig } from "vite";
5
- import react from "@vitejs/plugin-react";
6
- import { createRequire } from "module";
7
- import { viteStaticCopy } from "vite-plugin-static-copy";
8
- import tsconfigPaths from "vite-tsconfig-paths";
9
- import z from "zod";
10
-
11
- const require = createRequire(import.meta.url);
12
- const pkg =
13
- require.resolve("@bubblydoo/uxp-test-framework-plugin/package.json");
14
- const root = path.dirname(pkg);
15
-
16
- const resolvedConfigSchema = z.object({
17
- plugin: z.object({
18
- id: z.string(),
19
- name: z.string(),
20
- }),
21
- outDir: z.string().refine((val) => path.isAbsolute(val), "Path must be absolute"),
22
- testsFile: z.string().refine((val) => path.isAbsolute(val), "Path must be absolute"),
23
- testFixturesDir: z.string().refine((val) => path.isAbsolute(val), "Path must be absolute").optional(),
24
- vite: z.object({
25
- enableTsconfigPathsPlugin: z.boolean().optional().default(false),
26
- alias: z.record(z.string(), z.string().refine((val) => path.isAbsolute(val), "Path must be absolute")).optional().default({}),
27
- }).optional().default({ enableTsconfigPathsPlugin: false, alias: {} }),
28
- });
29
-
30
- type ResolvedConfig = z.infer<typeof resolvedConfigSchema>;
31
-
32
- const nativeModules = ["photoshop", "uxp", "fs", "os", "path", "process", "shell"];
33
-
34
- export function createViteConfig(opts: ResolvedConfig, mode: "dev" | "build") {
35
- resolvedConfigSchema.parse(opts);
36
-
37
- const uxpConfig = createUxpConfig({
38
- id: opts.plugin.id,
39
- name: opts.plugin.name + " - UXP Test Framework Plugin",
40
- version: "0.0.1",
41
- });
42
-
43
- return defineConfig({
44
- root,
45
- define: {
46
- BOLT_UXP_HOT_RELOAD_PORT: uxpConfig.hotReloadPort,
47
- BOLT_UXP_MANIFEST_ID: JSON.stringify(uxpConfig.manifest.id),
48
- },
49
- plugins: [
50
- uxp(uxpConfig, mode, { disablePolyfills: true }) as any,
51
- react(),
52
- ...(opts.vite.enableTsconfigPathsPlugin ? [tsconfigPaths()] : []),
53
- // copy the test fixtures to the dist directory
54
- ...(opts.testFixturesDir
55
- ? [
56
- viteStaticCopy({
57
- targets: [
58
- {
59
- src: opts.testFixturesDir,
60
- dest: ".",
61
- },
62
- ],
63
- }),
64
- ]
65
- : []),
66
- ],
67
- resolve: {
68
- alias: {
69
- ...opts.vite.alias,
70
- TESTS: opts.testsFile,
71
- },
72
- },
73
- build: {
74
- sourcemap: true,
75
- outDir: opts.outDir,
76
- watch: mode === 'dev' ? {} : undefined,
77
- minify: false,
78
- emptyOutDir: true,
79
- rollupOptions: {
80
- external: nativeModules.map((module) => new RegExp(`^${module}\\b`)),
81
- output: {
82
- format: "cjs",
83
- },
84
- },
85
- },
86
- publicDir: "public",
87
- optimizeDeps: {
88
- exclude: nativeModules,
89
- }
90
- });
91
- }