tempo-sdk 0.0.66 → 0.0.75
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/dist/assets/index.js +27 -5
- package/dist/assets/index.js.map +1 -1
- package/dist/astro/asset-preview-client.js +2 -2
- package/dist/astro.js +96 -31
- package/dist/astro.js.map +1 -1
- package/dist/canvas/astro.d.ts +1 -1
- package/dist/canvas/astro.js +2 -2
- package/dist/canvas/editor.d.ts +15 -5
- package/dist/canvas/editor.js +13 -8
- package/dist/canvas/editor.js.map +1 -1
- package/dist/canvas/flutter-preview.d.ts +18 -0
- package/dist/canvas/flutter-preview.js +9 -0
- package/dist/canvas/flutter-preview.js.map +1 -0
- package/dist/canvas/index.d.ts +33 -2
- package/dist/canvas/index.js +1134 -26
- package/dist/canvas/index.js.map +1 -1
- package/dist/canvas/interact-projection.js +5 -4
- package/dist/canvas/parser.d.ts +142 -3
- package/dist/canvas/parser.js +14 -1
- package/dist/canvas/svelte.d.ts +1 -1
- package/dist/canvas/svelte.js +2 -2
- package/dist/canvas/vue.d.ts +74 -0
- package/dist/canvas/vue.js +264 -0
- package/dist/canvas/vue.js.map +1 -0
- package/dist/{chunk-6W6UKDSY.js → chunk-2YX4WVFH.js} +49 -7
- package/dist/chunk-2YX4WVFH.js.map +1 -0
- package/dist/chunk-5HIIF354.js +67 -0
- package/dist/chunk-5HIIF354.js.map +1 -0
- package/dist/{chunk-FE6TYCLF.js → chunk-5VIBKVFO.js} +2 -2
- package/dist/{chunk-FE6TYCLF.js.map → chunk-5VIBKVFO.js.map} +1 -1
- package/dist/{chunk-77DZCV5Z.js → chunk-CXIW4IKC.js} +2 -2
- package/dist/chunk-CYQE3TLC.js +37 -0
- package/dist/chunk-CYQE3TLC.js.map +1 -0
- package/dist/{chunk-DELFOKU3.js → chunk-DNSCVLKV.js} +1571 -1410
- package/dist/chunk-DNSCVLKV.js.map +1 -0
- package/dist/chunk-EGRHWZRV.js +1 -0
- package/dist/chunk-EGRHWZRV.js.map +1 -0
- package/dist/{chunk-EYKOOLPL.js → chunk-GKDDNDG3.js} +1039 -134
- package/dist/chunk-GKDDNDG3.js.map +1 -0
- package/dist/{chunk-KOSJXE4G.js → chunk-H6BQZOAW.js} +4 -3
- package/dist/chunk-HOBTDB6G.js +112 -0
- package/dist/chunk-HOBTDB6G.js.map +1 -0
- package/dist/chunk-HZXQPM4W.js +285 -0
- package/dist/chunk-HZXQPM4W.js.map +1 -0
- package/dist/chunk-SGN7BDRE.js +16 -0
- package/dist/chunk-SGN7BDRE.js.map +1 -0
- package/dist/{chunk-F23JGM4U.js → chunk-UBTL6JUF.js} +6 -2
- package/dist/{chunk-F23JGM4U.js.map → chunk-UBTL6JUF.js.map} +1 -1
- package/dist/{chunk-2JRAG36X.js → chunk-WBMO4ZYO.js} +2 -2
- package/dist/chunk-WBMO4ZYO.js.map +1 -0
- package/dist/{chunk-K3EYTZLL.js → chunk-WTXOWQ7N.js} +3 -1
- package/dist/chunk-WTXOWQ7N.js.map +1 -0
- package/dist/{chunk-Q2A46HHW.js → chunk-XFPFWTWX.js} +276 -43
- package/dist/chunk-XFPFWTWX.js.map +1 -0
- package/dist/chunk-XMFVWJUY.js +342 -0
- package/dist/chunk-XMFVWJUY.js.map +1 -0
- package/dist/{chunk-PXDTH36X.js → chunk-Y72PIE3I.js} +212 -20
- package/dist/chunk-Y72PIE3I.js.map +1 -0
- package/dist/{chunk-6IR5JY6W.js → chunk-YECMP34I.js} +41 -9
- package/dist/chunk-YECMP34I.js.map +1 -0
- package/dist/{chunk-NSKYOKG5.js → chunk-ZXC7SZIT.js} +278 -26
- package/dist/chunk-ZXC7SZIT.js.map +1 -0
- package/dist/{controls-reader-SNMI2UY7.js → controls-reader-Z7OQWYWQ.js} +4 -3
- package/dist/{controls-reader-SNMI2UY7.js.map → controls-reader-Z7OQWYWQ.js.map} +1 -1
- package/dist/expo/plugin.cjs +301 -58
- package/dist/expo/plugin.cjs.map +1 -1
- package/dist/expo/plugin.js +1 -1
- package/dist/expo-babel-plugin.cjs +301 -58
- package/dist/expo-babel-plugin.cjs.map +1 -1
- package/dist/expo-babel-plugin.js +1 -1
- package/dist/flutter-preview-path.d.ts +9 -0
- package/dist/flutter-preview-path.js +16 -0
- package/dist/flutter-preview-path.js.map +1 -0
- package/dist/index.d.ts +16 -15
- package/dist/index.js +9 -6
- package/dist/nextjs/plugin.cjs +46 -5
- package/dist/nextjs/plugin.cjs.map +1 -1
- package/dist/nextjs/plugin.js +1 -1
- package/dist/nextjs-loader.cjs +343 -68
- package/dist/nextjs-loader.cjs.map +1 -1
- package/dist/nextjs.cjs +48 -6
- package/dist/nextjs.cjs.map +1 -1
- package/dist/nextjs.d.cts +9 -1
- package/dist/nextjs.d.ts +9 -1
- package/dist/nextjs.js +1 -1
- package/dist/nuxt/runtime/identity.d.ts +24 -0
- package/dist/nuxt/runtime/identity.js +18 -0
- package/dist/nuxt/runtime/identity.js.map +1 -0
- package/dist/nuxt.d.ts +102 -0
- package/dist/nuxt.js +5673 -0
- package/dist/nuxt.js.map +1 -0
- package/dist/{storyboard-4YdTYq_e.d.ts → storyboard-CMJVBSXn.d.ts} +9 -3
- package/dist/svelte.d.ts +4 -2
- package/dist/svelte.js +21 -88
- package/dist/svelte.js.map +1 -1
- package/dist/vue.d.ts +66 -0
- package/dist/vue.js +1403 -0
- package/dist/vue.js.map +1 -0
- package/package.json +48 -5
- package/dist/chunk-2JRAG36X.js.map +0 -1
- package/dist/chunk-6IR5JY6W.js.map +0 -1
- package/dist/chunk-6W6UKDSY.js.map +0 -1
- package/dist/chunk-DELFOKU3.js.map +0 -1
- package/dist/chunk-EYKOOLPL.js.map +0 -1
- package/dist/chunk-K3EYTZLL.js.map +0 -1
- package/dist/chunk-NSKYOKG5.js.map +0 -1
- package/dist/chunk-PXDTH36X.js.map +0 -1
- package/dist/chunk-Q2A46HHW.js.map +0 -1
- /package/dist/{chunk-77DZCV5Z.js.map → chunk-CXIW4IKC.js.map} +0 -0
- /package/dist/{chunk-KOSJXE4G.js.map → chunk-H6BQZOAW.js.map} +0 -0
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
// host-identity.ts
|
|
2
|
+
import { readFileSync } from "fs";
|
|
3
|
+
import { resolve } from "path";
|
|
4
|
+
|
|
5
|
+
// package.json
|
|
6
|
+
var package_default = {
|
|
7
|
+
name: "tempo-sdk",
|
|
8
|
+
version: "0.0.75",
|
|
9
|
+
publishConfig: {
|
|
10
|
+
tag: "sdk-v2-latest"
|
|
11
|
+
},
|
|
12
|
+
type: "module",
|
|
13
|
+
description: "Tempo SDK \u2014 Vite, Next.js, Nuxt, Expo, Svelte, Vue and Astro canvas integration, source annotations and storyboard types",
|
|
14
|
+
repository: {
|
|
15
|
+
type: "git",
|
|
16
|
+
url: "git+https://github.com/TempoLabsAI/tempo-monorepo.git",
|
|
17
|
+
directory: "tempo-modules/tempo-sdk"
|
|
18
|
+
},
|
|
19
|
+
exports: {
|
|
20
|
+
"./astro/controls": {
|
|
21
|
+
types: "./dist/astro/controls.d.ts",
|
|
22
|
+
import: "./dist/astro/controls.js",
|
|
23
|
+
default: "./dist/astro/controls.js"
|
|
24
|
+
},
|
|
25
|
+
"./astro": {
|
|
26
|
+
types: "./dist/astro.d.ts",
|
|
27
|
+
import: "./dist/astro.js"
|
|
28
|
+
},
|
|
29
|
+
"./astro/client": {
|
|
30
|
+
types: "./astro/client.d.ts"
|
|
31
|
+
},
|
|
32
|
+
"./canvas/astro": {
|
|
33
|
+
types: "./dist/canvas/astro.d.ts",
|
|
34
|
+
import: "./dist/canvas/astro.js"
|
|
35
|
+
},
|
|
36
|
+
"./canvas/astro-contract": {
|
|
37
|
+
types: "./dist/canvas/astro-contract.d.ts",
|
|
38
|
+
import: "./dist/canvas/astro-contract.js"
|
|
39
|
+
},
|
|
40
|
+
".": {
|
|
41
|
+
types: "./dist/index.d.ts",
|
|
42
|
+
import: "./dist/index.js"
|
|
43
|
+
},
|
|
44
|
+
"./canvas": {
|
|
45
|
+
types: "./dist/canvas/index.d.ts",
|
|
46
|
+
import: "./dist/canvas/index.js"
|
|
47
|
+
},
|
|
48
|
+
"./canvas/svelte": {
|
|
49
|
+
types: "./dist/canvas/svelte.d.ts",
|
|
50
|
+
import: "./dist/canvas/svelte.js"
|
|
51
|
+
},
|
|
52
|
+
"./canvas/vue": {
|
|
53
|
+
types: "./dist/canvas/vue.d.ts",
|
|
54
|
+
import: "./dist/canvas/vue.js"
|
|
55
|
+
},
|
|
56
|
+
"./canvas/interact-projection": {
|
|
57
|
+
types: "./dist/canvas/interact-projection.d.ts",
|
|
58
|
+
import: "./dist/canvas/interact-projection.js"
|
|
59
|
+
},
|
|
60
|
+
"./canvas/parser": {
|
|
61
|
+
types: "./dist/canvas/parser.d.ts",
|
|
62
|
+
import: "./dist/canvas/parser.js"
|
|
63
|
+
},
|
|
64
|
+
"./canvas/editor": {
|
|
65
|
+
types: "./dist/canvas/editor.d.ts",
|
|
66
|
+
import: "./dist/canvas/editor.js"
|
|
67
|
+
},
|
|
68
|
+
"./assets": {
|
|
69
|
+
types: "./dist/assets/index.d.ts",
|
|
70
|
+
import: "./dist/assets/index.js"
|
|
71
|
+
},
|
|
72
|
+
"./assets/parser": {
|
|
73
|
+
types: "./dist/assets/parser.d.ts",
|
|
74
|
+
import: "./dist/assets/parser.js"
|
|
75
|
+
},
|
|
76
|
+
"./assets/editor": {
|
|
77
|
+
types: "./dist/assets/editor.d.ts",
|
|
78
|
+
import: "./dist/assets/editor.js"
|
|
79
|
+
},
|
|
80
|
+
"./nextjs": {
|
|
81
|
+
types: "./dist/nextjs.d.ts",
|
|
82
|
+
import: "./dist/nextjs.js",
|
|
83
|
+
require: "./dist/nextjs.cjs"
|
|
84
|
+
},
|
|
85
|
+
"./nextjs/plugin": {
|
|
86
|
+
types: "./dist/nextjs/plugin.d.ts",
|
|
87
|
+
import: "./dist/nextjs/plugin.js"
|
|
88
|
+
},
|
|
89
|
+
"./nuxt": {
|
|
90
|
+
types: "./dist/nuxt.d.ts",
|
|
91
|
+
import: "./dist/nuxt.js"
|
|
92
|
+
},
|
|
93
|
+
"./expo": {
|
|
94
|
+
types: "./dist/expo-babel-plugin.d.ts",
|
|
95
|
+
import: "./dist/expo-babel-plugin.js",
|
|
96
|
+
require: "./dist/expo-babel-plugin.cjs"
|
|
97
|
+
},
|
|
98
|
+
"./expo/plugin": {
|
|
99
|
+
types: "./dist/expo/plugin.d.ts",
|
|
100
|
+
import: "./dist/expo/plugin.js",
|
|
101
|
+
require: "./dist/expo/plugin.cjs"
|
|
102
|
+
},
|
|
103
|
+
"./svelte": {
|
|
104
|
+
types: "./dist/svelte.d.ts",
|
|
105
|
+
import: "./dist/svelte.js"
|
|
106
|
+
},
|
|
107
|
+
"./vue": {
|
|
108
|
+
types: "./dist/vue.d.ts",
|
|
109
|
+
import: "./dist/vue.js"
|
|
110
|
+
},
|
|
111
|
+
"./astro/asset-preview-client": {
|
|
112
|
+
types: "./dist/astro/asset-preview-client.d.ts",
|
|
113
|
+
import: "./dist/astro/asset-preview-client.js"
|
|
114
|
+
},
|
|
115
|
+
"./flutter-preview-path": {
|
|
116
|
+
types: "./dist/flutter-preview-path.d.ts",
|
|
117
|
+
import: "./dist/flutter-preview-path.js"
|
|
118
|
+
},
|
|
119
|
+
"./canvas/flutter-preview": {
|
|
120
|
+
types: "./dist/canvas/flutter-preview.d.ts",
|
|
121
|
+
import: "./dist/canvas/flutter-preview.js"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
files: [
|
|
125
|
+
"dist",
|
|
126
|
+
"astro/client.d.ts"
|
|
127
|
+
],
|
|
128
|
+
scripts: {
|
|
129
|
+
clean: "rm -rf dist",
|
|
130
|
+
build: "pnpm run clean && tsup",
|
|
131
|
+
"build:if-missing": "test -f dist/index.js || pnpm run build",
|
|
132
|
+
prepare: "pnpm run build",
|
|
133
|
+
prepublishOnly: "pnpm build",
|
|
134
|
+
demo: "TEMPO=true pnpm --filter @tempo-modules/vite-annotate-plugin-demo dev",
|
|
135
|
+
"demo:nextjs": "TEMPO=true pnpm --filter @tempo-modules/tempo-sdk-nextjs-demo dev",
|
|
136
|
+
"demo:nuxt": "pnpm --filter @tempo-modules/tempo-sdk-nuxt-demo dev",
|
|
137
|
+
test: "vitest run",
|
|
138
|
+
"test:browser": "vitest run canvas-dependency-scan-browser.test.ts pruned-module-deletion-browser.test.ts asset-live-preview-browser.test.ts asset-popover-lifecycle-browser.test.ts component-controls-browser.test.ts canvas-controls-browser.test.ts canvas-capture-determinism-browser.test.ts flutter-storyboard-browser.test.ts canvas-host-vite-e2e.test.ts canvas-host-packed-sdk-e2e.test.ts error-tracking-e2e.test.ts astro-integration.test.ts astro-storyboard-routing.test.ts astro-react-integration.test.ts astro-descriptor-browser.test.ts astro-packed.test.ts",
|
|
139
|
+
"test:watch": "vitest",
|
|
140
|
+
"test:nextjs:unit": "vitest run nextjs-loader.test.ts nextjs-wrapper.test.ts nextjs-fixtures.test.ts nextjs-published.test.ts",
|
|
141
|
+
"test:nextjs:integration": "vitest run nextjs-e2e-correctness.test.ts",
|
|
142
|
+
"test:nextjs:production": "vitest run nextjs-production.test.ts",
|
|
143
|
+
"test:nextjs": "vitest run nextjs-loader.test.ts nextjs-wrapper.test.ts nextjs-fixtures.test.ts nextjs-published.test.ts nextjs-e2e-correctness.test.ts nextjs-production.test.ts"
|
|
144
|
+
},
|
|
145
|
+
dependencies: {
|
|
146
|
+
"@rollup/pluginutils": "^5.1.0",
|
|
147
|
+
"oxc-parser": "^0.110.0"
|
|
148
|
+
},
|
|
149
|
+
optionalDependencies: {
|
|
150
|
+
"@astrojs/compiler-rs": "0.5.1"
|
|
151
|
+
},
|
|
152
|
+
peerDependencies: {
|
|
153
|
+
astro: "^7.0.0",
|
|
154
|
+
"@babel/core": "^7.0.0",
|
|
155
|
+
h3: "^1.12.0",
|
|
156
|
+
next: "^13 || ^14 || ^15 || ^16",
|
|
157
|
+
nuxt: "^3.18.0 || ^4.0.0",
|
|
158
|
+
react: "^18 || ^19",
|
|
159
|
+
svelte: "^5.0.0",
|
|
160
|
+
vite: "^5 || ^6 || ^7 || ^8",
|
|
161
|
+
vue: "^3.3.0"
|
|
162
|
+
},
|
|
163
|
+
peerDependenciesMeta: {
|
|
164
|
+
astro: {
|
|
165
|
+
optional: true
|
|
166
|
+
},
|
|
167
|
+
react: {
|
|
168
|
+
optional: true
|
|
169
|
+
},
|
|
170
|
+
"@babel/core": {
|
|
171
|
+
optional: true
|
|
172
|
+
},
|
|
173
|
+
h3: {
|
|
174
|
+
optional: true
|
|
175
|
+
},
|
|
176
|
+
next: {
|
|
177
|
+
optional: true
|
|
178
|
+
},
|
|
179
|
+
nuxt: {
|
|
180
|
+
optional: true
|
|
181
|
+
},
|
|
182
|
+
svelte: {
|
|
183
|
+
optional: true
|
|
184
|
+
},
|
|
185
|
+
vite: {
|
|
186
|
+
optional: true
|
|
187
|
+
},
|
|
188
|
+
vue: {
|
|
189
|
+
optional: true
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
devDependencies: {
|
|
193
|
+
"@astrojs/react": "7.0.1",
|
|
194
|
+
"@babel/core": "^7.29.0",
|
|
195
|
+
"@babel/types": "^7.29.0",
|
|
196
|
+
"@modules/annotation": "workspace:*",
|
|
197
|
+
"@modules/astro-editor": "workspace:*",
|
|
198
|
+
"@modules/file-parser": "workspace:*",
|
|
199
|
+
"@modules/frame-pool": "workspace:*",
|
|
200
|
+
"@modules/iframe-projection": "workspace:*",
|
|
201
|
+
"@modules/svelte-editor": "workspace:*",
|
|
202
|
+
"@modules/vue-editor": "workspace:*",
|
|
203
|
+
"@nuxt/kit": "^4.6.2",
|
|
204
|
+
"@types/babel__core": "^7.20.5",
|
|
205
|
+
"@types/node": "^25.0.8",
|
|
206
|
+
"@types/react": "catalog:",
|
|
207
|
+
"@types/react-dom": "catalog:",
|
|
208
|
+
"@vitejs/plugin-react": "catalog:",
|
|
209
|
+
"@vitejs/plugin-vue": "6.0.10",
|
|
210
|
+
astro: "7.3.8",
|
|
211
|
+
h3: "^1.15.11",
|
|
212
|
+
"magic-string": "^0.30.21",
|
|
213
|
+
nuxt: "^4.6.2",
|
|
214
|
+
playwright: "^1.58.2",
|
|
215
|
+
"react-dom": "catalog:",
|
|
216
|
+
"react-dom18": "npm:react-dom@18.3.1",
|
|
217
|
+
react18: "npm:react@18.3.1",
|
|
218
|
+
svelte: "5.56.9",
|
|
219
|
+
tsup: "^8.5.1",
|
|
220
|
+
typescript: "catalog:",
|
|
221
|
+
vite: "catalog:",
|
|
222
|
+
vitest: "catalog:",
|
|
223
|
+
vue: "3.5.44"
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
// release-channel.ts
|
|
228
|
+
var TEMPO_SDK_CHANNEL = package_default.publishConfig.tag;
|
|
229
|
+
function sdkChannelGeneration(channel) {
|
|
230
|
+
if (typeof channel !== "string") return null;
|
|
231
|
+
const match = /^sdk-v([1-9]\d*)-latest$/.exec(channel);
|
|
232
|
+
return match ? Number(match[1]) : null;
|
|
233
|
+
}
|
|
234
|
+
if (sdkChannelGeneration(TEMPO_SDK_CHANNEL) === null) {
|
|
235
|
+
throw new Error("tempo-sdk publishConfig.tag must be sdk-v<N>-latest");
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// host-identity.ts
|
|
239
|
+
var TEMPO_HOST_IDENTITY_ENDPOINT = "/__tempo/identity";
|
|
240
|
+
var TEMPO_HOST_IDENTITY_CAPABILITY_HEADER = "x-tempo-host-identity";
|
|
241
|
+
var TEMPO_HOST_IDENTITY_CONTRACT_VERSION = 1;
|
|
242
|
+
var TEMPO_WORKSPACE_NONCE_ENV = "TEMPO_WORKSPACE_NONCE";
|
|
243
|
+
var TEMPO_WORKSPACE_NONCE_META_NAME = "tempo-workspace-nonce";
|
|
244
|
+
var WORKSPACE_NONCE_RELATIVE_PATH = ".tempo/workspace-nonce";
|
|
245
|
+
var MAX_WORKSPACE_NONCE_LENGTH = 128;
|
|
246
|
+
var TEMPO_VUE_ANNOTATION_PLUGIN_NAME = "tempo-vue-source-annotation";
|
|
247
|
+
function normalizeWorkspaceNonce(value) {
|
|
248
|
+
const nonce = value?.trim() ?? "";
|
|
249
|
+
return nonce.length > 0 && nonce.length <= MAX_WORKSPACE_NONCE_LENGTH ? nonce : "";
|
|
250
|
+
}
|
|
251
|
+
function readTempoWorkspaceNonce(root = process.cwd()) {
|
|
252
|
+
const fromEnvironment = normalizeWorkspaceNonce(
|
|
253
|
+
process.env[TEMPO_WORKSPACE_NONCE_ENV]
|
|
254
|
+
);
|
|
255
|
+
if (fromEnvironment) return fromEnvironment;
|
|
256
|
+
try {
|
|
257
|
+
return normalizeWorkspaceNonce(
|
|
258
|
+
readFileSync(resolve(root, WORKSPACE_NONCE_RELATIVE_PATH), "utf-8")
|
|
259
|
+
);
|
|
260
|
+
} catch {
|
|
261
|
+
return "";
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
function createTempoHostIdentity(framework, options = {}) {
|
|
265
|
+
return {
|
|
266
|
+
tempoHost: true,
|
|
267
|
+
contractVersion: TEMPO_HOST_IDENTITY_CONTRACT_VERSION,
|
|
268
|
+
workspaceNonce: readTempoWorkspaceNonce(options.root),
|
|
269
|
+
sdkVersion: package_default.version,
|
|
270
|
+
sdkChannel: TEMPO_SDK_CHANNEL,
|
|
271
|
+
pluginActive: options.pluginActive ?? Boolean(process.env.TEMPO),
|
|
272
|
+
framework,
|
|
273
|
+
...options.capabilities ? { capabilities: options.capabilities } : {}
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// sdk-package-files.ts
|
|
278
|
+
import { readFileSync as readFileSync2, realpathSync } from "fs";
|
|
279
|
+
import { dirname, join } from "path";
|
|
280
|
+
var SDK_PACKAGE_NAME = "tempo-sdk";
|
|
281
|
+
var SDK_NODE_MODULES_SEGMENT = `/node_modules/${SDK_PACKAGE_NAME}/`;
|
|
282
|
+
function createSdkFileMatcher() {
|
|
283
|
+
const ownerIsSdkByDirectory = /* @__PURE__ */ new Map();
|
|
284
|
+
const nearestPackageIsSdk = (startDirectory) => {
|
|
285
|
+
const visited = [];
|
|
286
|
+
let directory = startDirectory;
|
|
287
|
+
let isSdk = false;
|
|
288
|
+
while (true) {
|
|
289
|
+
const cached = ownerIsSdkByDirectory.get(directory);
|
|
290
|
+
if (cached !== void 0) {
|
|
291
|
+
isSdk = cached;
|
|
292
|
+
break;
|
|
293
|
+
}
|
|
294
|
+
visited.push(directory);
|
|
295
|
+
const manifest = readPackageManifest(directory);
|
|
296
|
+
if (manifest !== void 0) {
|
|
297
|
+
isSdk = manifest?.name === SDK_PACKAGE_NAME;
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
const parent = dirname(directory);
|
|
301
|
+
if (parent === directory) break;
|
|
302
|
+
directory = parent;
|
|
303
|
+
}
|
|
304
|
+
for (const entry of visited) ownerIsSdkByDirectory.set(entry, isSdk);
|
|
305
|
+
return isSdk;
|
|
306
|
+
};
|
|
307
|
+
return (file) => {
|
|
308
|
+
if (file.replace(/\\/g, "/").includes(SDK_NODE_MODULES_SEGMENT)) {
|
|
309
|
+
return true;
|
|
310
|
+
}
|
|
311
|
+
let realFile = file;
|
|
312
|
+
try {
|
|
313
|
+
realFile = realpathSync.native(file);
|
|
314
|
+
} catch {
|
|
315
|
+
}
|
|
316
|
+
return nearestPackageIsSdk(dirname(realFile));
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
function readPackageManifest(directory) {
|
|
320
|
+
let text;
|
|
321
|
+
try {
|
|
322
|
+
text = readFileSync2(join(directory, "package.json"), "utf8");
|
|
323
|
+
} catch {
|
|
324
|
+
return void 0;
|
|
325
|
+
}
|
|
326
|
+
try {
|
|
327
|
+
const manifest = JSON.parse(text);
|
|
328
|
+
return manifest && typeof manifest === "object" ? manifest : null;
|
|
329
|
+
} catch {
|
|
330
|
+
return null;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export {
|
|
335
|
+
TEMPO_HOST_IDENTITY_ENDPOINT,
|
|
336
|
+
TEMPO_HOST_IDENTITY_CAPABILITY_HEADER,
|
|
337
|
+
TEMPO_WORKSPACE_NONCE_META_NAME,
|
|
338
|
+
TEMPO_VUE_ANNOTATION_PLUGIN_NAME,
|
|
339
|
+
createTempoHostIdentity,
|
|
340
|
+
createSdkFileMatcher
|
|
341
|
+
};
|
|
342
|
+
//# sourceMappingURL=chunk-XMFVWJUY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../host-identity.ts","../package.json","../release-channel.ts","../sdk-package-files.ts"],"sourcesContent":["import { readFileSync } from \"node:fs\";\nimport { resolve } from \"node:path\";\n\nimport { TEMPO_SDK_CHANNEL } from \"./release-channel\";\n\nimport sdkPackage from \"./package.json\" with { type: \"json\" };\n\nexport const TEMPO_HOST_IDENTITY_ENDPOINT = \"/__tempo/identity\";\nexport const TEMPO_HOST_IDENTITY_CAPABILITY_HEADER = \"x-tempo-host-identity\";\nexport const TEMPO_HOST_IDENTITY_CONTRACT_VERSION = 1;\nexport const TEMPO_WORKSPACE_NONCE_ENV = \"TEMPO_WORKSPACE_NONCE\";\nexport const TEMPO_WORKSPACE_NONCE_META_NAME = \"tempo-workspace-nonce\";\n\nconst WORKSPACE_NONCE_RELATIVE_PATH = \".tempo/workspace-nonce\";\nconst MAX_WORKSPACE_NONCE_LENGTH = 128;\n\nexport type TempoHostFramework = \"vite\" | \"nextjs\" | \"nuxt\" | \"astro\";\n\n/**\n * The name of `tempoVuePlugin()`'s annotating plugin. A Vite server that runs\n * it reports the `vueSourceAnnotation` capability, which is what proves an\n * app's Vue templates are stamped: `pluginActive` only proves\n * `tempoVitePlugin()`, and a Vue app with that alone serves route documents\n * whose layers carry no `.vue` source.\n */\nexport const TEMPO_VUE_ANNOTATION_PLUGIN_NAME = \"tempo-vue-source-annotation\";\n\n/** Optional features a host's served identity vouches for. */\nexport interface TempoHostIdentityCapabilities {\n /** 1 when the server renders Astro components for the canvas. */\n astroComponents?: number;\n /** 1 when `tempoVuePlugin()` annotates this Vite server's `.vue` files. */\n vueSourceAnnotation?: number;\n}\n\nexport interface TempoHostIdentity<\n Framework extends TempoHostFramework = TempoHostFramework,\n> {\n tempoHost: true;\n contractVersion: number;\n workspaceNonce: string;\n sdkVersion: string;\n sdkChannel: string;\n pluginActive: boolean;\n framework: Framework;\n capabilities?: TempoHostIdentityCapabilities;\n}\n\nfunction normalizeWorkspaceNonce(value: string | undefined): string {\n const nonce = value?.trim() ?? \"\";\n return nonce.length > 0 && nonce.length <= MAX_WORKSPACE_NONCE_LENGTH\n ? nonce\n : \"\";\n}\n\nexport function readTempoWorkspaceNonce(root = process.cwd()): string {\n const fromEnvironment = normalizeWorkspaceNonce(\n process.env[TEMPO_WORKSPACE_NONCE_ENV],\n );\n if (fromEnvironment) return fromEnvironment;\n try {\n return normalizeWorkspaceNonce(\n readFileSync(resolve(root, WORKSPACE_NONCE_RELATIVE_PATH), \"utf-8\"),\n );\n } catch {\n return \"\";\n }\n}\n\nexport function createTempoHostIdentity<Framework extends TempoHostFramework>(\n framework: Framework,\n options: {\n root?: string;\n pluginActive?: boolean;\n capabilities?: TempoHostIdentityCapabilities;\n } = {},\n): TempoHostIdentity<Framework> {\n return {\n tempoHost: true,\n contractVersion: TEMPO_HOST_IDENTITY_CONTRACT_VERSION,\n workspaceNonce: readTempoWorkspaceNonce(options.root),\n sdkVersion: sdkPackage.version,\n sdkChannel: TEMPO_SDK_CHANNEL,\n pluginActive: options.pluginActive ?? Boolean(process.env.TEMPO),\n framework,\n ...(options.capabilities ? { capabilities: options.capabilities } : {}),\n };\n}\n","{\n \"name\": \"tempo-sdk\",\n \"version\": \"0.0.75\",\n\n \"publishConfig\": {\n \"tag\": \"sdk-v2-latest\"\n },\n \"type\": \"module\",\n \"description\": \"Tempo SDK \\u2014 Vite, Next.js, Nuxt, Expo, Svelte, Vue and Astro canvas integration, source annotations and storyboard types\",\n\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/TempoLabsAI/tempo-monorepo.git\",\n \"directory\": \"tempo-modules/tempo-sdk\"\n },\n \"exports\": {\n \"./astro/controls\": {\n \"types\": \"./dist/astro/controls.d.ts\",\n \"import\": \"./dist/astro/controls.js\",\n \"default\": \"./dist/astro/controls.js\"\n },\n \"./astro\": {\n \"types\": \"./dist/astro.d.ts\",\n \"import\": \"./dist/astro.js\"\n },\n \"./astro/client\": {\n \"types\": \"./astro/client.d.ts\"\n },\n \"./canvas/astro\": {\n \"types\": \"./dist/canvas/astro.d.ts\",\n \"import\": \"./dist/canvas/astro.js\"\n },\n \"./canvas/astro-contract\": {\n \"types\": \"./dist/canvas/astro-contract.d.ts\",\n \"import\": \"./dist/canvas/astro-contract.js\"\n },\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\"\n },\n \"./canvas\": {\n \"types\": \"./dist/canvas/index.d.ts\",\n \"import\": \"./dist/canvas/index.js\"\n },\n \"./canvas/svelte\": {\n \"types\": \"./dist/canvas/svelte.d.ts\",\n \"import\": \"./dist/canvas/svelte.js\"\n },\n \"./canvas/vue\": {\n \"types\": \"./dist/canvas/vue.d.ts\",\n \"import\": \"./dist/canvas/vue.js\"\n },\n \"./canvas/interact-projection\": {\n \"types\": \"./dist/canvas/interact-projection.d.ts\",\n \"import\": \"./dist/canvas/interact-projection.js\"\n },\n \"./canvas/parser\": {\n \"types\": \"./dist/canvas/parser.d.ts\",\n \"import\": \"./dist/canvas/parser.js\"\n },\n \"./canvas/editor\": {\n \"types\": \"./dist/canvas/editor.d.ts\",\n \"import\": \"./dist/canvas/editor.js\"\n },\n \"./assets\": {\n \"types\": \"./dist/assets/index.d.ts\",\n \"import\": \"./dist/assets/index.js\"\n },\n \"./assets/parser\": {\n \"types\": \"./dist/assets/parser.d.ts\",\n \"import\": \"./dist/assets/parser.js\"\n },\n \"./assets/editor\": {\n \"types\": \"./dist/assets/editor.d.ts\",\n \"import\": \"./dist/assets/editor.js\"\n },\n \"./nextjs\": {\n \"types\": \"./dist/nextjs.d.ts\",\n \"import\": \"./dist/nextjs.js\",\n \"require\": \"./dist/nextjs.cjs\"\n },\n \"./nextjs/plugin\": {\n \"types\": \"./dist/nextjs/plugin.d.ts\",\n \"import\": \"./dist/nextjs/plugin.js\"\n },\n \"./nuxt\": {\n \"types\": \"./dist/nuxt.d.ts\",\n \"import\": \"./dist/nuxt.js\"\n },\n \"./expo\": {\n \"types\": \"./dist/expo-babel-plugin.d.ts\",\n \"import\": \"./dist/expo-babel-plugin.js\",\n \"require\": \"./dist/expo-babel-plugin.cjs\"\n },\n \"./expo/plugin\": {\n \"types\": \"./dist/expo/plugin.d.ts\",\n \"import\": \"./dist/expo/plugin.js\",\n \"require\": \"./dist/expo/plugin.cjs\"\n },\n \"./svelte\": {\n \"types\": \"./dist/svelte.d.ts\",\n \"import\": \"./dist/svelte.js\"\n },\n \"./vue\": {\n \"types\": \"./dist/vue.d.ts\",\n \"import\": \"./dist/vue.js\"\n },\n \"./astro/asset-preview-client\": {\n \"types\": \"./dist/astro/asset-preview-client.d.ts\",\n \"import\": \"./dist/astro/asset-preview-client.js\"\n },\n \"./flutter-preview-path\": {\n \"types\": \"./dist/flutter-preview-path.d.ts\",\n \"import\": \"./dist/flutter-preview-path.js\"\n },\n \"./canvas/flutter-preview\": {\n \"types\": \"./dist/canvas/flutter-preview.d.ts\",\n \"import\": \"./dist/canvas/flutter-preview.js\"\n }\n },\n \"files\": [\n \"dist\",\n \"astro/client.d.ts\"\n ],\n \"scripts\": {\n \"clean\": \"rm -rf dist\",\n \"build\": \"pnpm run clean && tsup\",\n \"build:if-missing\": \"test -f dist/index.js || pnpm run build\",\n \"prepare\": \"pnpm run build\",\n \"prepublishOnly\": \"pnpm build\",\n \"demo\": \"TEMPO=true pnpm --filter @tempo-modules/vite-annotate-plugin-demo dev\",\n \"demo:nextjs\": \"TEMPO=true pnpm --filter @tempo-modules/tempo-sdk-nextjs-demo dev\",\n \"demo:nuxt\": \"pnpm --filter @tempo-modules/tempo-sdk-nuxt-demo dev\",\n \"test\": \"vitest run\",\n \"test:browser\": \"vitest run canvas-dependency-scan-browser.test.ts pruned-module-deletion-browser.test.ts asset-live-preview-browser.test.ts asset-popover-lifecycle-browser.test.ts component-controls-browser.test.ts canvas-controls-browser.test.ts canvas-capture-determinism-browser.test.ts flutter-storyboard-browser.test.ts canvas-host-vite-e2e.test.ts canvas-host-packed-sdk-e2e.test.ts error-tracking-e2e.test.ts astro-integration.test.ts astro-storyboard-routing.test.ts astro-react-integration.test.ts astro-descriptor-browser.test.ts astro-packed.test.ts\",\n \"test:watch\": \"vitest\",\n \"test:nextjs:unit\": \"vitest run nextjs-loader.test.ts nextjs-wrapper.test.ts nextjs-fixtures.test.ts nextjs-published.test.ts\",\n \"test:nextjs:integration\": \"vitest run nextjs-e2e-correctness.test.ts\",\n \"test:nextjs:production\": \"vitest run nextjs-production.test.ts\",\n \"test:nextjs\": \"vitest run nextjs-loader.test.ts nextjs-wrapper.test.ts nextjs-fixtures.test.ts nextjs-published.test.ts nextjs-e2e-correctness.test.ts nextjs-production.test.ts\"\n },\n \"dependencies\": {\n \"@rollup/pluginutils\": \"^5.1.0\",\n \"oxc-parser\": \"^0.110.0\"\n },\n \"optionalDependencies\": {\n \"@astrojs/compiler-rs\": \"0.5.1\"\n },\n \"peerDependencies\": {\n \"astro\": \"^7.0.0\",\n \"@babel/core\": \"^7.0.0\",\n \"h3\": \"^1.12.0\",\n \"next\": \"^13 || ^14 || ^15 || ^16\",\n \"nuxt\": \"^3.18.0 || ^4.0.0\",\n \"react\": \"^18 || ^19\",\n \"svelte\": \"^5.0.0\",\n \"vite\": \"^5 || ^6 || ^7 || ^8\",\n \"vue\": \"^3.3.0\"\n },\n \"peerDependenciesMeta\": {\n \"astro\": {\n \"optional\": true\n },\n \"react\": {\n \"optional\": true\n },\n \"@babel/core\": {\n \"optional\": true\n },\n \"h3\": {\n \"optional\": true\n },\n \"next\": {\n \"optional\": true\n },\n \"nuxt\": {\n \"optional\": true\n },\n \"svelte\": {\n \"optional\": true\n },\n \"vite\": {\n \"optional\": true\n },\n \"vue\": {\n \"optional\": true\n }\n },\n \"devDependencies\": {\n \"@astrojs/react\": \"7.0.1\",\n \"@babel/core\": \"^7.29.0\",\n \"@babel/types\": \"^7.29.0\",\n \"@modules/annotation\": \"workspace:*\",\n \"@modules/astro-editor\": \"workspace:*\",\n \"@modules/file-parser\": \"workspace:*\",\n \"@modules/frame-pool\": \"workspace:*\",\n \"@modules/iframe-projection\": \"workspace:*\",\n \"@modules/svelte-editor\": \"workspace:*\",\n \"@modules/vue-editor\": \"workspace:*\",\n \"@nuxt/kit\": \"^4.6.2\",\n \"@types/babel__core\": \"^7.20.5\",\n \"@types/node\": \"^25.0.8\",\n \"@types/react\": \"catalog:\",\n \"@types/react-dom\": \"catalog:\",\n \"@vitejs/plugin-react\": \"catalog:\",\n \"@vitejs/plugin-vue\": \"6.0.10\",\n \"astro\": \"7.3.8\",\n \"h3\": \"^1.15.11\",\n \"magic-string\": \"^0.30.21\",\n \"nuxt\": \"^4.6.2\",\n \"playwright\": \"^1.58.2\",\n \"react-dom\": \"catalog:\",\n \"react-dom18\": \"npm:react-dom@18.3.1\",\n \"react18\": \"npm:react@18.3.1\",\n \"svelte\": \"5.56.9\",\n \"tsup\": \"^8.5.1\",\n \"typescript\": \"catalog:\",\n \"vite\": \"catalog:\",\n \"vitest\": \"catalog:\",\n \"vue\": \"3.5.44\"\n }\n}\n","import sdkPackage from \"./package.json\" with { type: \"json\" };\n\n/** Shared by the app, generated projects and the SDK host identity. */\nexport const TEMPO_SDK_CHANNEL = sdkPackage.publishConfig.tag;\n\nexport function sdkChannelGeneration(channel: unknown): number | null {\n if (typeof channel !== \"string\") return null;\n const match = /^sdk-v([1-9]\\d*)-latest$/.exec(channel);\n return match ? Number(match[1]) : null;\n}\n\nif (sdkChannelGeneration(TEMPO_SDK_CHANNEL) === null) {\n throw new Error(\"tempo-sdk publishConfig.tag must be sdk-v<N>-latest\");\n}\n\n/** Preserve local development links; registry installs follow the app channel. */\nexport function managedTempoSdkSpec(spec: string): string {\n const generation = sdkChannelGeneration(spec);\n if (\n generation !== null &&\n generation > sdkChannelGeneration(TEMPO_SDK_CHANNEL)!\n ) {\n throw new Error(\n `This project requires tempo-sdk@${spec}. Update Tempo before opening it; this app supports ${TEMPO_SDK_CHANNEL}.`,\n );\n }\n if (/^(workspace:|file:|link:|portal:|git|https?:|ssh:|github:)/.test(spec))\n return spec;\n return TEMPO_SDK_CHANNEL;\n}\n","import { readFileSync, realpathSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\n\n/** This package's published name, as declared in its package.json. */\nexport const SDK_PACKAGE_NAME = \"tempo-sdk\";\n\nconst SDK_NODE_MODULES_SEGMENT = `/node_modules/${SDK_PACKAGE_NAME}/`;\n\n/**\n * A predicate for \"this file belongs to tempo-sdk itself\". The SDK's own\n * components (storyboard shells, error boundaries, admission gates) are\n * canvas plumbing, never authored UI, so no annotation entry point may stamp\n * source locations on them — the canvas treats every stamped element as user\n * code.\n *\n * A project can reach SDK files under many spellings: a published copy in\n * node_modules, a pnpm store path, a workspace link, a symlink, or a source\n * alias into a checkout. Ownership is therefore decided by where the file\n * really lives — the nearest package.json above its real path declares this\n * package — and not by the id's spelling or the caller's include/exclude\n * patterns. A package nested inside the SDK checkout (the demo apps) has its\n * own package.json and stays annotatable.\n */\nexport function createSdkFileMatcher(): (file: string) => boolean {\n // Directory → whether its nearest enclosing package.json is this package.\n const ownerIsSdkByDirectory = new Map<string, boolean>();\n\n const nearestPackageIsSdk = (startDirectory: string): boolean => {\n const visited: string[] = [];\n let directory = startDirectory;\n let isSdk = false;\n while (true) {\n const cached = ownerIsSdkByDirectory.get(directory);\n if (cached !== undefined) {\n isSdk = cached;\n break;\n }\n visited.push(directory);\n const manifest = readPackageManifest(directory);\n if (manifest !== undefined) {\n isSdk = manifest?.name === SDK_PACKAGE_NAME;\n break;\n }\n const parent = dirname(directory);\n if (parent === directory) break;\n directory = parent;\n }\n for (const entry of visited) ownerIsSdkByDirectory.set(entry, isSdk);\n return isSdk;\n };\n\n return (file) => {\n if (file.replace(/\\\\/g, \"/\").includes(SDK_NODE_MODULES_SEGMENT)) {\n return true;\n }\n let realFile = file;\n try {\n realFile = realpathSync.native(file);\n } catch {\n // Virtual or not-yet-written ids keep their authored spelling.\n }\n return nearestPackageIsSdk(dirname(realFile));\n };\n}\n\n/** The package.json in `directory`: `undefined` when there is none, `null`\n * when one exists but cannot be read as a manifest (still a package\n * boundary, just not this package). */\nfunction readPackageManifest(\n directory: string,\n): { name?: unknown } | null | undefined {\n let text: string;\n try {\n text = readFileSync(join(directory, \"package.json\"), \"utf8\");\n } catch {\n return undefined;\n }\n try {\n const manifest: unknown = JSON.parse(text);\n return manifest && typeof manifest === \"object\" ? manifest : null;\n } catch {\n return null;\n }\n}\n"],"mappings":";AAAA,SAAS,oBAAoB;AAC7B,SAAS,eAAe;;;ACDxB;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EAEX,eAAiB;AAAA,IACf,KAAO;AAAA,EACT;AAAA,EACA,MAAQ;AAAA,EACR,aAAe;AAAA,EAEf,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,IACP,WAAa;AAAA,EACf;AAAA,EACA,SAAW;AAAA,IACT,oBAAoB;AAAA,MAClB,OAAS;AAAA,MACT,QAAU;AAAA,MACV,SAAW;AAAA,IACb;AAAA,IACA,WAAW;AAAA,MACT,OAAS;AAAA,MACT,QAAU;AAAA,IACZ;AAAA,IACA,kBAAkB;AAAA,MAChB,OAAS;AAAA,IACX;AAAA,IACA,kBAAkB;AAAA,MAChB,OAAS;AAAA,MACT,QAAU;AAAA,IACZ;AAAA,IACA,2BAA2B;AAAA,MACzB,OAAS;AAAA,MACT,QAAU;AAAA,IACZ;AAAA,IACA,KAAK;AAAA,MACH,OAAS;AAAA,MACT,QAAU;AAAA,IACZ;AAAA,IACA,YAAY;AAAA,MACV,OAAS;A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