@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.
- package/README.md +5 -0
- package/dist-vite/cli-CHBMTgYc.js +108296 -0
- package/dist-vite/cli-CHBMTgYc.js.map +1 -0
- package/dist-vite/cli.d.ts +1 -0
- package/dist-vite/cli.js +35 -0
- package/dist-vite/cli.js.map +1 -0
- package/dist-vite/index-B82GTETV.js +66056 -0
- package/dist-vite/index-B82GTETV.js.map +1 -0
- package/index.html +1 -1
- package/package.json +33 -22
- package/{src/bolt-uxp-ws-listener.js → src-plugin/bolt-uxp-ws-listener.ts} +15 -2
- package/.npmignore +0 -4
- package/.turbo/daemon/b38c7656669412eb-turbo.log.2026-01-28 +0 -0
- package/.turbo/turbo-build.log +0 -14
- package/CHANGELOG.md +0 -11
- package/create-vite-config.ts +0 -91
- package/dist/create-vite-config.js +0 -13965
- package/postcss.config.cjs +0 -8
- package/src/assets/bolt-uxp-quickstart.gif +0 -0
- package/src/assets/bolt-uxp.png +0 -0
- package/src/assets/bolt-uxp.svg +0 -55
- package/src/assets/built-with-bolt-uxp/Built_With_BOLT_UXP_Logo_Black_V01.png +0 -0
- package/src/assets/built-with-bolt-uxp/Built_With_BOLT_UXP_Logo_Black_V01.svg +0 -78
- package/src/assets/built-with-bolt-uxp/Built_With_BOLT_UXP_Logo_White_V01.png +0 -0
- package/src/assets/built-with-bolt-uxp/Built_With_BOLT_UXP_Logo_White_V01.svg +0 -81
- package/src/assets/react.png +0 -0
- package/src/assets/react.svg +0 -36
- package/src/assets/sass.png +0 -0
- package/src/assets/sass.svg +0 -45
- package/src/assets/svelte.png +0 -0
- package/src/assets/svelte.svg +0 -1
- package/src/assets/typescript.png +0 -0
- package/src/assets/typescript.svg +0 -6
- package/src/assets/vite.png +0 -0
- package/src/assets/vite.svg +0 -1
- package/src/assets/vue.png +0 -0
- package/src/assets/vue.svg +0 -2
- package/tailwind.config.js +0 -15
- package/tsup.config.ts +0 -11
- package/uxp.config.ts +0 -109
- /package/{src → src-plugin}/components/ErrorView.tsx +0 -0
- /package/{src → src-plugin}/index-react.tsx +0 -0
- /package/{src → src-plugin}/index.css +0 -0
- /package/{src → src-plugin}/lib/resolvePath.ts +0 -0
- /package/{src → src-plugin}/main.tsx +0 -0
- /package/{public-zip → src-plugin/public-zip}/readme.txt +0 -0
- /package/{src → src-plugin}/tests.d.ts +0 -0
package/index.html
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bubblydoo/uxp-test-framework-plugin",
|
|
3
|
-
"version": "0.0.
|
|
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
|
-
"./
|
|
14
|
-
"types": "./dist
|
|
15
|
-
"
|
|
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.
|
|
28
|
+
"@bubblydoo/uxp-toolkit": "0.0.4"
|
|
27
29
|
},
|
|
28
30
|
"dependencies": {
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
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
|
-
"
|
|
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
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
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.
|
|
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": "
|
|
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
|
-
|
|
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 ===
|
|
29
|
+
if (data.id === manifestId && data.status === "updated") {
|
|
17
30
|
log("Hot reloading...");
|
|
18
31
|
location.reload();
|
|
19
32
|
}
|
package/.npmignore
DELETED
|
File without changes
|
package/.turbo/turbo-build.log
DELETED
|
@@ -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
|
-
[34mCLI[39m Building entry: create-vite-config.ts
|
|
7
|
-
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
8
|
-
[34mCLI[39m tsup v8.5.1
|
|
9
|
-
[34mCLI[39m Using tsup config: /Users/otto/Code/projects/bubbly/uxp-toolkit/packages/uxp-test-framework-plugin/tsup.config.ts
|
|
10
|
-
[34mCLI[39m Target: node20
|
|
11
|
-
[34mCLI[39m Cleaning output folder
|
|
12
|
-
[34mESM[39m Build start
|
|
13
|
-
[32mESM[39m [1mdist/create-vite-config.js [22m[32m511.65 KB[39m
|
|
14
|
-
[32mESM[39m ⚡️ Build success in 40ms
|
package/CHANGELOG.md
DELETED
package/create-vite-config.ts
DELETED
|
@@ -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
|
-
}
|