@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.
Files changed (100) hide show
  1. package/bin/lib/commands/build.js +18 -12
  2. package/browser-extensions/README.md +1 -0
  3. package/browser-extensions/chrome/background.js +857 -0
  4. package/browser-extensions/chrome/content.js +51 -0
  5. package/browser-extensions/chrome/devtools.html +9 -0
  6. package/browser-extensions/chrome/devtools.js +23 -0
  7. package/browser-extensions/chrome/icons/gx_off_128.png +0 -0
  8. package/browser-extensions/chrome/icons/gx_off_16.png +0 -0
  9. package/browser-extensions/chrome/icons/gx_off_32.png +0 -0
  10. package/browser-extensions/chrome/icons/gx_off_64.png +0 -0
  11. package/browser-extensions/chrome/icons/gx_on_128.png +0 -0
  12. package/browser-extensions/chrome/icons/gx_on_16.png +0 -0
  13. package/browser-extensions/chrome/icons/gx_on_32.png +0 -0
  14. package/browser-extensions/chrome/icons/gx_on_64.png +0 -0
  15. package/browser-extensions/chrome/inspector.js +1087 -0
  16. package/browser-extensions/chrome/manifest.json +70 -0
  17. package/browser-extensions/chrome/panel.html +638 -0
  18. package/browser-extensions/chrome/panel.js +862 -0
  19. package/browser-extensions/chrome/popup.html +399 -0
  20. package/browser-extensions/chrome/popup.js +515 -0
  21. package/browser-extensions/chrome/rules.json +1 -0
  22. package/browser-extensions/chrome/test-chrome.html +145 -0
  23. package/browser-extensions/chrome/test-mixed-content.html +190 -0
  24. package/browser-extensions/chrome/test-uri-pattern.html +199 -0
  25. package/browser-extensions/firefox/README.md +134 -0
  26. package/browser-extensions/firefox/background.js +804 -0
  27. package/browser-extensions/firefox/content.js +120 -0
  28. package/browser-extensions/firefox/debug-errors.html +229 -0
  29. package/browser-extensions/firefox/debug-https.html +113 -0
  30. package/browser-extensions/firefox/devtools.html +9 -0
  31. package/browser-extensions/firefox/devtools.js +24 -0
  32. package/browser-extensions/firefox/icons/gx_off_128.png +0 -0
  33. package/browser-extensions/firefox/icons/gx_off_16.png +0 -0
  34. package/browser-extensions/firefox/icons/gx_off_32.png +0 -0
  35. package/browser-extensions/firefox/icons/gx_off_64.png +0 -0
  36. package/browser-extensions/firefox/icons/gx_on_128.png +0 -0
  37. package/browser-extensions/firefox/icons/gx_on_16.png +0 -0
  38. package/browser-extensions/firefox/icons/gx_on_32.png +0 -0
  39. package/browser-extensions/firefox/icons/gx_on_64.png +0 -0
  40. package/browser-extensions/firefox/inspector.js +1087 -0
  41. package/browser-extensions/firefox/manifest.json +67 -0
  42. package/browser-extensions/firefox/panel.html +638 -0
  43. package/browser-extensions/firefox/panel.js +862 -0
  44. package/browser-extensions/firefox/popup.html +525 -0
  45. package/browser-extensions/firefox/popup.js +536 -0
  46. package/browser-extensions/firefox/test-gramercy.html +126 -0
  47. package/browser-extensions/firefox/test-imports.html +58 -0
  48. package/browser-extensions/firefox/test-masking.html +147 -0
  49. package/browser-extensions/firefox/test-uri-pattern.html +199 -0
  50. package/package.json +7 -2
  51. package/runtime/PortalContainer.vue +326 -0
  52. package/runtime/dev-tools/DevToolsModal.vue +217 -0
  53. package/runtime/dev-tools/LayoutSwitcher.vue +221 -0
  54. package/runtime/dev-tools/MockDataEditor.vue +621 -0
  55. package/runtime/dev-tools/SocketSimulator.vue +562 -0
  56. package/runtime/dev-tools/StoreInspector.vue +644 -0
  57. package/runtime/dev-tools/index.js +6 -0
  58. package/runtime/gxpStringsPlugin.js +428 -0
  59. package/runtime/index.html +22 -0
  60. package/runtime/main.js +32 -0
  61. package/runtime/mock-api/auth-middleware.js +97 -0
  62. package/runtime/mock-api/image-generator.js +221 -0
  63. package/runtime/mock-api/index.js +197 -0
  64. package/runtime/mock-api/response-generator.js +394 -0
  65. package/runtime/mock-api/route-generator.js +323 -0
  66. package/runtime/mock-api/socket-triggers.js +371 -0
  67. package/runtime/mock-api/spec-loader.js +300 -0
  68. package/runtime/server.js +180 -0
  69. package/runtime/stores/gxpPortalConfigStore.js +554 -0
  70. package/runtime/stores/index.js +6 -0
  71. package/runtime/vite-inspector-plugin.js +749 -0
  72. package/runtime/vite-source-tracker-plugin.js +232 -0
  73. package/runtime/vite.config.js +402 -0
  74. package/scripts/launch-chrome.js +90 -0
  75. package/scripts/pack-chrome.js +91 -0
  76. package/socket-events/AiSessionMessageCreated.json +18 -0
  77. package/socket-events/SocialStreamPostCreated.json +24 -0
  78. package/socket-events/SocialStreamPostVariantCompleted.json +23 -0
  79. package/template/README.md +332 -0
  80. package/template/app-manifest.json +32 -0
  81. package/template/dev-assets/images/avatar-placeholder.png +0 -0
  82. package/template/dev-assets/images/background-placeholder.jpg +0 -0
  83. package/template/dev-assets/images/banner-placeholder.jpg +0 -0
  84. package/template/dev-assets/images/icon-placeholder.png +0 -0
  85. package/template/dev-assets/images/logo-placeholder.png +0 -0
  86. package/template/dev-assets/images/product-placeholder.jpg +0 -0
  87. package/template/dev-assets/images/thumbnail-placeholder.jpg +0 -0
  88. package/template/env.example +51 -0
  89. package/template/gitignore +53 -0
  90. package/template/index.html +22 -0
  91. package/template/main.js +28 -0
  92. package/template/src/DemoPage.vue +459 -0
  93. package/template/src/Plugin.vue +38 -0
  94. package/template/src/stores/index.js +9 -0
  95. package/template/src/stores/test-data.json +173 -0
  96. package/template/theme-layouts/AdditionalStyling.css +0 -0
  97. package/template/theme-layouts/PrivateLayout.vue +39 -0
  98. package/template/theme-layouts/PublicLayout.vue +39 -0
  99. package/template/theme-layouts/SystemLayout.vue +39 -0
  100. 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 .gxp file
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 .gxp file should be created (dist/)
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("⚠️ Could not parse app-manifest.json, using default asset_dir");
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(`📂 Copying assets from ${assetDirClean}/ to dist/build/assets/`);
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}.gxp`;
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=${argv["component-path"] || "./src/Plugin.vue"}`
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 .gxp to distPath)
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
+