@lotics/cli 0.33.0 → 0.34.0
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.
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The wrapper page is served at http://localhost:<port>/ and embeds the
|
|
5
5
|
* project's Vite dev server in an iframe with the same
|
|
6
|
-
* sandbox="allow-scripts allow-same-origin" attribute
|
|
7
|
-
* safe because the Vite iframe is cross-origin to this
|
|
8
|
-
* port), so the app gets its own real origin (and Web
|
|
9
|
-
* being able to reach the wrapper.
|
|
6
|
+
* sandbox="allow-scripts allow-same-origin allow-downloads" attribute
|
|
7
|
+
* production uses — safe because the Vite iframe is cross-origin to this
|
|
8
|
+
* wrapper (different port), so the app gets its own real origin (and Web
|
|
9
|
+
* Storage) without being able to reach the wrapper. `allow-downloads` lets
|
|
10
|
+
* apps trigger file downloads (generated xlsx / pdf etc.) — Chrome blocks
|
|
11
|
+
* every download path from sandboxed iframes without it. The iframe sends postMessage RPCs to
|
|
10
12
|
* this wrapper, which forwards them to the local /_rpc endpoint, which
|
|
11
13
|
* dispatches to api.lotics.ai with the CLI's API key.
|
|
12
14
|
*
|
package/dist/dev/wrapper_page.js
CHANGED
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The wrapper page is served at http://localhost:<port>/ and embeds the
|
|
5
5
|
* project's Vite dev server in an iframe with the same
|
|
6
|
-
* sandbox="allow-scripts allow-same-origin" attribute
|
|
7
|
-
* safe because the Vite iframe is cross-origin to this
|
|
8
|
-
* port), so the app gets its own real origin (and Web
|
|
9
|
-
* being able to reach the wrapper.
|
|
6
|
+
* sandbox="allow-scripts allow-same-origin allow-downloads" attribute
|
|
7
|
+
* production uses — safe because the Vite iframe is cross-origin to this
|
|
8
|
+
* wrapper (different port), so the app gets its own real origin (and Web
|
|
9
|
+
* Storage) without being able to reach the wrapper. `allow-downloads` lets
|
|
10
|
+
* apps trigger file downloads (generated xlsx / pdf etc.) — Chrome blocks
|
|
11
|
+
* every download path from sandboxed iframes without it. The iframe sends postMessage RPCs to
|
|
10
12
|
* this wrapper, which forwards them to the local /_rpc endpoint, which
|
|
11
13
|
* dispatches to api.lotics.ai with the CLI's API key.
|
|
12
14
|
*
|
|
@@ -58,7 +60,7 @@ export function buildWrapperPage(args) {
|
|
|
58
60
|
<span>workspace <code>${escapeHtml(workspace_id)}</code></span>
|
|
59
61
|
<span>RPC → <code>${escapeHtml(api_url)}</code></span>
|
|
60
62
|
</header>
|
|
61
|
-
<iframe id="app" sandbox="allow-scripts allow-same-origin" allow="clipboard-write"></iframe>
|
|
63
|
+
<iframe id="app" sandbox="allow-scripts allow-same-origin allow-downloads" allow="clipboard-write"></iframe>
|
|
62
64
|
<script>
|
|
63
65
|
(function () {
|
|
64
66
|
const APP_ID = ${JSON.stringify(app_id)};
|
package/dist/src/cli.js
CHANGED
|
@@ -31678,7 +31678,7 @@ import { tmpdir } from "node:os";
|
|
|
31678
31678
|
|
|
31679
31679
|
// src/starter_template.ts
|
|
31680
31680
|
var STARTER_FALLBACK_UI_VERSION = "1.8.0";
|
|
31681
|
-
var STARTER_FALLBACK_SDK_VERSION = "0.
|
|
31681
|
+
var STARTER_FALLBACK_SDK_VERSION = "0.11.0";
|
|
31682
31682
|
function buildStarterTemplate(args) {
|
|
31683
31683
|
const uiVersion = args.ui_version ?? `^${STARTER_FALLBACK_UI_VERSION}`;
|
|
31684
31684
|
const sdkVersion = args.sdk_version ?? `^${STARTER_FALLBACK_SDK_VERSION}`;
|
|
@@ -32217,7 +32217,7 @@ function buildWrapperPage(args) {
|
|
|
32217
32217
|
<span>workspace <code>${escapeHtml2(workspace_id)}</code></span>
|
|
32218
32218
|
<span>RPC \u2192 <code>${escapeHtml2(api_url)}</code></span>
|
|
32219
32219
|
</header>
|
|
32220
|
-
<iframe id="app" sandbox="allow-scripts allow-same-origin" allow="clipboard-write"></iframe>
|
|
32220
|
+
<iframe id="app" sandbox="allow-scripts allow-same-origin allow-downloads" allow="clipboard-write"></iframe>
|
|
32221
32221
|
<script>
|
|
32222
32222
|
(function () {
|
|
32223
32223
|
const APP_ID = ${JSON.stringify(app_id)};
|
|
@@ -40,7 +40,7 @@ export interface StarterFile {
|
|
|
40
40
|
* fall back here when the lookup fails.
|
|
41
41
|
*/
|
|
42
42
|
export declare const STARTER_FALLBACK_UI_VERSION = "1.8.0";
|
|
43
|
-
export declare const STARTER_FALLBACK_SDK_VERSION = "0.
|
|
43
|
+
export declare const STARTER_FALLBACK_SDK_VERSION = "0.11.0";
|
|
44
44
|
export declare function buildStarterTemplate(args: {
|
|
45
45
|
app_name: string;
|
|
46
46
|
app_id: string;
|
package/dist/starter_template.js
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* fall back here when the lookup fails.
|
|
37
37
|
*/
|
|
38
38
|
export const STARTER_FALLBACK_UI_VERSION = "1.8.0";
|
|
39
|
-
export const STARTER_FALLBACK_SDK_VERSION = "0.
|
|
39
|
+
export const STARTER_FALLBACK_SDK_VERSION = "0.11.0";
|
|
40
40
|
export function buildStarterTemplate(args) {
|
|
41
41
|
const uiVersion = args.ui_version ?? `^${STARTER_FALLBACK_UI_VERSION}`;
|
|
42
42
|
const sdkVersion = args.sdk_version ?? `^${STARTER_FALLBACK_SDK_VERSION}`;
|