@ubox-tools/deploy-xperience 1.1.22 → 1.1.23

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 (3) hide show
  1. package/README.md +3 -2
  2. package/deploy.js +1 -9
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -106,15 +106,16 @@ When `--ubox-id` is provided, the search/create step is skipped entirely and the
106
106
 
107
107
  ## Proxy / Source Transformation
108
108
 
109
- Before injecting source files, `generateProxy()` applies three transforms to each file:
109
+ Before injecting source files, `generateProxy()` applies transforms to each file:
110
110
 
111
111
  | Transform | Applies to | What it does |
112
112
  |---|---|---|
113
- | Parameter substitution | JS | Replaces `const KEY = "value"` with `const KEY = "{parameter:KEY}"` for every key in `parameters.json` |
114
113
  | Asset path substitution | JS, CSS | Replaces `../assets/file.ext` references with `{resources:type/file.ext}` tokens |
115
114
  | Emoji escaping | JS | Converts non-ASCII characters to `\uXXXX` Unicode escape sequences |
116
115
  | Local tag stripping | HTML | Removes local `<link href>` and `<script src>` tags (CDN URLs are kept) |
117
116
 
117
+ > **Parameter tokens are embedded at authoring time** — `data.js` uses inline `{parameter:key}` tokens with local fallbacks. No deploy-time regex substitution is performed.
118
+
118
119
  ## Project Layout Expected
119
120
 
120
121
  ```
package/deploy.js CHANGED
@@ -238,15 +238,7 @@ function generateProxy(appName) {
238
238
  const isHTML = ext === 'html';
239
239
 
240
240
  if (isJS || isCSS) {
241
- // 1. Parameter token substitution (JS only — parameters live in JS files)
242
- if (isJS) {
243
- for (const key of Object.keys(params)) {
244
- const re = new RegExp(`((?:const|let|var)\\s+${key}\\s*=\\s*)(?:"[^"]*"|'[^']*')`, 'g');
245
- content = content.replace(re, `$1"{parameter:${key}}"`);
246
- }
247
- }
248
-
249
- // 2. Asset path substitution: "...assets/file.ext" → "{resources:type/file.ext}"
241
+ // 1. Asset path substitution: "...assets/file.ext" "{resources:type/file.ext}"
250
242
  const assetInStringRe = /(['"])(?:\.\.\/)*assets\/([^'"]+)\1/g;
251
243
  content = content.replace(assetInStringRe, (match, quote, assetFile) => {
252
244
  const assetExt = path.extname(assetFile).slice(1).toLowerCase();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ubox-tools/deploy-xperience",
3
- "version": "1.1.22",
3
+ "version": "1.1.23",
4
4
  "description": "Deploy a Ubox experience to studio.ubox.world",
5
5
  "bin": { "deploy-xperience": "./deploy.js" },
6
6
  "dependencies": { "puppeteer": "*" },