@gxp-dev/tools 2.0.6 → 2.0.8
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/bin/lib/commands/build.js +18 -12
- package/browser-extensions/README.md +1 -0
- package/browser-extensions/chrome/background.js +857 -0
- package/browser-extensions/chrome/content.js +51 -0
- package/browser-extensions/chrome/devtools.html +9 -0
- package/browser-extensions/chrome/devtools.js +23 -0
- package/browser-extensions/chrome/icons/gx_off_128.png +0 -0
- package/browser-extensions/chrome/icons/gx_off_16.png +0 -0
- package/browser-extensions/chrome/icons/gx_off_32.png +0 -0
- package/browser-extensions/chrome/icons/gx_off_64.png +0 -0
- package/browser-extensions/chrome/icons/gx_on_128.png +0 -0
- package/browser-extensions/chrome/icons/gx_on_16.png +0 -0
- package/browser-extensions/chrome/icons/gx_on_32.png +0 -0
- package/browser-extensions/chrome/icons/gx_on_64.png +0 -0
- package/browser-extensions/chrome/inspector.js +1087 -0
- package/browser-extensions/chrome/manifest.json +70 -0
- package/browser-extensions/chrome/panel.html +638 -0
- package/browser-extensions/chrome/panel.js +862 -0
- package/browser-extensions/chrome/popup.html +399 -0
- package/browser-extensions/chrome/popup.js +515 -0
- package/browser-extensions/chrome/rules.json +1 -0
- package/browser-extensions/chrome/test-chrome.html +145 -0
- package/browser-extensions/chrome/test-mixed-content.html +190 -0
- package/browser-extensions/chrome/test-uri-pattern.html +199 -0
- package/browser-extensions/firefox/README.md +134 -0
- package/browser-extensions/firefox/background.js +804 -0
- package/browser-extensions/firefox/content.js +120 -0
- package/browser-extensions/firefox/debug-errors.html +229 -0
- package/browser-extensions/firefox/debug-https.html +113 -0
- package/browser-extensions/firefox/devtools.html +9 -0
- package/browser-extensions/firefox/devtools.js +24 -0
- package/browser-extensions/firefox/icons/gx_off_128.png +0 -0
- package/browser-extensions/firefox/icons/gx_off_16.png +0 -0
- package/browser-extensions/firefox/icons/gx_off_32.png +0 -0
- package/browser-extensions/firefox/icons/gx_off_64.png +0 -0
- package/browser-extensions/firefox/icons/gx_on_128.png +0 -0
- package/browser-extensions/firefox/icons/gx_on_16.png +0 -0
- package/browser-extensions/firefox/icons/gx_on_32.png +0 -0
- package/browser-extensions/firefox/icons/gx_on_64.png +0 -0
- package/browser-extensions/firefox/inspector.js +1087 -0
- package/browser-extensions/firefox/manifest.json +67 -0
- package/browser-extensions/firefox/panel.html +638 -0
- package/browser-extensions/firefox/panel.js +862 -0
- package/browser-extensions/firefox/popup.html +525 -0
- package/browser-extensions/firefox/popup.js +536 -0
- package/browser-extensions/firefox/test-gramercy.html +126 -0
- package/browser-extensions/firefox/test-imports.html +58 -0
- package/browser-extensions/firefox/test-masking.html +147 -0
- package/browser-extensions/firefox/test-uri-pattern.html +199 -0
- package/package.json +7 -2
- package/runtime/PortalContainer.vue +326 -0
- package/runtime/dev-tools/DevToolsModal.vue +217 -0
- package/runtime/dev-tools/LayoutSwitcher.vue +221 -0
- package/runtime/dev-tools/MockDataEditor.vue +621 -0
- package/runtime/dev-tools/SocketSimulator.vue +562 -0
- package/runtime/dev-tools/StoreInspector.vue +644 -0
- package/runtime/dev-tools/index.js +6 -0
- package/runtime/gxpStringsPlugin.js +428 -0
- package/runtime/index.html +22 -0
- package/runtime/main.js +32 -0
- package/runtime/mock-api/auth-middleware.js +97 -0
- package/runtime/mock-api/image-generator.js +221 -0
- package/runtime/mock-api/index.js +197 -0
- package/runtime/mock-api/response-generator.js +394 -0
- package/runtime/mock-api/route-generator.js +323 -0
- package/runtime/mock-api/socket-triggers.js +371 -0
- package/runtime/mock-api/spec-loader.js +300 -0
- package/runtime/server.js +180 -0
- package/runtime/stores/gxpPortalConfigStore.js +554 -0
- package/runtime/stores/index.js +6 -0
- package/runtime/vite-inspector-plugin.js +749 -0
- package/runtime/vite-source-tracker-plugin.js +232 -0
- package/runtime/vite.config.js +402 -0
- package/scripts/launch-chrome.js +90 -0
- package/scripts/pack-chrome.js +91 -0
- package/socket-events/AiSessionMessageCreated.json +18 -0
- package/socket-events/SocialStreamPostCreated.json +24 -0
- package/socket-events/SocialStreamPostVariantCompleted.json +23 -0
- package/template/README.md +332 -0
- package/template/app-manifest.json +32 -0
- package/template/dev-assets/images/avatar-placeholder.png +0 -0
- package/template/dev-assets/images/background-placeholder.jpg +0 -0
- package/template/dev-assets/images/banner-placeholder.jpg +0 -0
- package/template/dev-assets/images/icon-placeholder.png +0 -0
- package/template/dev-assets/images/logo-placeholder.png +0 -0
- package/template/dev-assets/images/product-placeholder.jpg +0 -0
- package/template/dev-assets/images/thumbnail-placeholder.jpg +0 -0
- package/template/env.example +51 -0
- package/template/gitignore +53 -0
- package/template/index.html +22 -0
- package/template/main.js +28 -0
- package/template/src/DemoPage.vue +459 -0
- package/template/src/Plugin.vue +38 -0
- package/template/src/stores/index.js +9 -0
- package/template/src/stores/test-data.json +173 -0
- package/template/theme-layouts/AdditionalStyling.css +0 -0
- package/template/theme-layouts/PrivateLayout.vue +39 -0
- package/template/theme-layouts/PublicLayout.vue +39 -0
- package/template/theme-layouts/SystemLayout.vue +39 -0
- package/template/vite.config.js +333 -0
|
@@ -32,10 +32,10 @@ function getPluginName(projectPath) {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* Package the built plugin into a .
|
|
35
|
+
* Package the built plugin into a .gxpapp file
|
|
36
36
|
* @param {string} projectPath - Project root path
|
|
37
37
|
* @param {string} buildPath - Path where built files are (dist/build/)
|
|
38
|
-
* @param {string} outputPath - Path where .
|
|
38
|
+
* @param {string} outputPath - Path where .gxpapp file should be created (dist/)
|
|
39
39
|
*/
|
|
40
40
|
async function packagePlugin(projectPath, buildPath, outputPath) {
|
|
41
41
|
const pluginName = getPluginName(projectPath);
|
|
@@ -53,7 +53,9 @@ async function packagePlugin(projectPath, buildPath, outputPath) {
|
|
|
53
53
|
assetDir = manifest.asset_dir;
|
|
54
54
|
}
|
|
55
55
|
} catch (error) {
|
|
56
|
-
console.warn(
|
|
56
|
+
console.warn(
|
|
57
|
+
"⚠️ Could not parse app-manifest.json, using default asset_dir"
|
|
58
|
+
);
|
|
57
59
|
}
|
|
58
60
|
} else {
|
|
59
61
|
console.warn("⚠️ app-manifest.json not found");
|
|
@@ -66,7 +68,9 @@ async function packagePlugin(projectPath, buildPath, outputPath) {
|
|
|
66
68
|
|
|
67
69
|
// Copy assets to dist/build/assets
|
|
68
70
|
if (fs.existsSync(assetSourcePath)) {
|
|
69
|
-
console.log(
|
|
71
|
+
console.log(
|
|
72
|
+
`📂 Copying assets from ${assetDirClean}/ to dist/build/assets/`
|
|
73
|
+
);
|
|
70
74
|
|
|
71
75
|
// Create assets directory in build
|
|
72
76
|
if (!fs.existsSync(assetDestPath)) {
|
|
@@ -88,7 +92,7 @@ async function packagePlugin(projectPath, buildPath, outputPath) {
|
|
|
88
92
|
}
|
|
89
93
|
|
|
90
94
|
// Create the .gxp package (zip file) in dist/
|
|
91
|
-
const gxpFileName = `${pluginName}.
|
|
95
|
+
const gxpFileName = `${pluginName}.gxpapp`;
|
|
92
96
|
const gxpFilePath = path.join(outputPath, gxpFileName);
|
|
93
97
|
|
|
94
98
|
console.log(`📦 Creating ${gxpFileName}...`);
|
|
@@ -134,7 +138,7 @@ function createGxpPackage(distPath, outputPath) {
|
|
|
134
138
|
return new Promise((resolve, reject) => {
|
|
135
139
|
const output = fs.createWriteStream(outputPath);
|
|
136
140
|
const archive = archiver("zip", {
|
|
137
|
-
zlib: { level: 9 } // Maximum compression
|
|
141
|
+
zlib: { level: 9 }, // Maximum compression
|
|
138
142
|
});
|
|
139
143
|
|
|
140
144
|
output.on("close", () => {
|
|
@@ -150,14 +154,14 @@ function createGxpPackage(distPath, outputPath) {
|
|
|
150
154
|
archive.pipe(output);
|
|
151
155
|
|
|
152
156
|
// Add all JS files from dist
|
|
153
|
-
const jsFiles = fs.readdirSync(distPath).filter(f => f.endsWith(".js"));
|
|
154
|
-
jsFiles.forEach(file => {
|
|
157
|
+
const jsFiles = fs.readdirSync(distPath).filter((f) => f.endsWith(".js"));
|
|
158
|
+
jsFiles.forEach((file) => {
|
|
155
159
|
archive.file(path.join(distPath, file), { name: file });
|
|
156
160
|
});
|
|
157
161
|
|
|
158
162
|
// Add all CSS files from dist
|
|
159
|
-
const cssFiles = fs.readdirSync(distPath).filter(f => f.endsWith(".css"));
|
|
160
|
-
cssFiles.forEach(file => {
|
|
163
|
+
const cssFiles = fs.readdirSync(distPath).filter((f) => f.endsWith(".css"));
|
|
164
|
+
cssFiles.forEach((file) => {
|
|
161
165
|
archive.file(path.join(distPath, file), { name: file });
|
|
162
166
|
});
|
|
163
167
|
|
|
@@ -206,7 +210,9 @@ async function buildCommand(argv) {
|
|
|
206
210
|
}
|
|
207
211
|
if (!process.env.COMPONENT_PATH) {
|
|
208
212
|
envVars.push(
|
|
209
|
-
`${exportCmd} COMPONENT_PATH=${
|
|
213
|
+
`${exportCmd} COMPONENT_PATH=${
|
|
214
|
+
argv["component-path"] || "./src/Plugin.vue"
|
|
215
|
+
}`
|
|
210
216
|
);
|
|
211
217
|
}
|
|
212
218
|
|
|
@@ -222,7 +228,7 @@ async function buildCommand(argv) {
|
|
|
222
228
|
try {
|
|
223
229
|
// Move built files from dist/ to dist/build/
|
|
224
230
|
await moveBuildFiles(distPath, buildPath);
|
|
225
|
-
// Package the plugin (reads from buildPath, outputs .
|
|
231
|
+
// Package the plugin (reads from buildPath, outputs .gxpapp to distPath)
|
|
226
232
|
await packagePlugin(projectPath, buildPath, distPath);
|
|
227
233
|
} catch (error) {
|
|
228
234
|
console.error("❌ Error packaging plugin:", error.message);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|