@pinegrow/vite-plugin 3.0.72 → 3.0.73-alpha.1
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/astro-runtime.d.ts +60 -0
- package/astro.d.ts +16 -0
- package/dist/adapters/astro/astro-runtime-bridge.js +326 -0
- package/dist/astro/index.cjs +2 -0
- package/dist/astro/index.cjs.LICENSE.txt +838 -0
- package/dist/astro/index.mjs +15 -0
- package/dist/astro/runtime.cjs +1 -0
- package/dist/astro/runtime.mjs +7 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.LICENSE.txt +12 -0
- package/dist/index.mjs +6 -2
- package/dist/vue/index.js +21 -6
- package/package.json +25 -7
|
@@ -154,6 +154,10 @@
|
|
|
154
154
|
|
|
155
155
|
/*! ./permessage-deflate */
|
|
156
156
|
|
|
157
|
+
/*! ./plugin-watch-policy.js */
|
|
158
|
+
|
|
159
|
+
/*! ./plugin-watched-files.js */
|
|
160
|
+
|
|
157
161
|
/*! ./polling.js */
|
|
158
162
|
|
|
159
163
|
/*! ./receiver */
|
|
@@ -380,10 +384,18 @@
|
|
|
380
384
|
!*** external "child_process" ***!
|
|
381
385
|
\********************************/
|
|
382
386
|
|
|
387
|
+
/*!************************************!*\
|
|
388
|
+
!*** ./src/plugin-watch-policy.js ***!
|
|
389
|
+
\************************************/
|
|
390
|
+
|
|
383
391
|
/*!*************************************!*\
|
|
384
392
|
!*** ./node_modules/ws/wrapper.mjs ***!
|
|
385
393
|
\*************************************/
|
|
386
394
|
|
|
395
|
+
/*!*************************************!*\
|
|
396
|
+
!*** ./src/plugin-watched-files.js ***!
|
|
397
|
+
\*************************************/
|
|
398
|
+
|
|
387
399
|
/*!**************************************!*\
|
|
388
400
|
!*** ../../node_modules/ms/index.js ***!
|
|
389
401
|
\**************************************/
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { createRequire } from 'node:module'
|
|
2
|
+
|
|
3
|
+
const require = createRequire(import.meta.url)
|
|
4
|
+
const pkg = require('./index.cjs')
|
|
5
|
+
const liveDesigner = pkg.liveDesigner
|
|
6
|
+
|
|
3
7
|
export { liveDesigner }
|
|
4
8
|
export default pkg
|
package/dist/vue/index.js
CHANGED
|
@@ -16,10 +16,26 @@ export function usePinegrow() {
|
|
|
16
16
|
const winObj = window
|
|
17
17
|
|
|
18
18
|
if (!(winObj?.process?.client && winObj.process.client !== true)) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const isMapLike = value =>
|
|
20
|
+
value &&
|
|
21
|
+
typeof value.get === 'function' &&
|
|
22
|
+
typeof value.set === 'function' &&
|
|
23
|
+
typeof value.delete === 'function' &&
|
|
24
|
+
typeof value.entries === 'function'
|
|
25
|
+
|
|
26
|
+
const existingPinegrow = winObj.pinegrow || {}
|
|
27
|
+
const existingElCache = isMapLike(existingPinegrow.elCache) ? existingPinegrow.elCache : new Map()
|
|
28
|
+
const elCache = reactive(existingElCache)
|
|
22
29
|
|
|
30
|
+
if (
|
|
31
|
+
!winObj.pinegrow ||
|
|
32
|
+
winObj.pinegrow.elCache !== elCache ||
|
|
33
|
+
winObj.pinegrow.reactiveFromContext !== reactive ||
|
|
34
|
+
winObj.pinegrow.refFromContext !== ref ||
|
|
35
|
+
winObj.pinegrow.computedFromContext !== computed ||
|
|
36
|
+
winObj.pinegrow.watchFromContext !== watch
|
|
37
|
+
) {
|
|
38
|
+
// console.log('Cache initialized by Vue Plugin!')
|
|
23
39
|
const enrichWithComponentName = (elCacheObj, localFile) => {
|
|
24
40
|
return {
|
|
25
41
|
name: elCacheObj.instance.type.__name || '',
|
|
@@ -28,7 +44,7 @@ export function usePinegrow() {
|
|
|
28
44
|
}
|
|
29
45
|
}
|
|
30
46
|
|
|
31
|
-
winObj.pinegrow = {
|
|
47
|
+
winObj.pinegrow = Object.assign(existingPinegrow, {
|
|
32
48
|
elCache,
|
|
33
49
|
// pgIdToElComputed,
|
|
34
50
|
// localComponentToElComputed,
|
|
@@ -40,7 +56,7 @@ export function usePinegrow() {
|
|
|
40
56
|
// // Uncomment these two to test locally
|
|
41
57
|
// elCacheErrHandlerFn,
|
|
42
58
|
// elUpdateHanderFn,
|
|
43
|
-
}
|
|
59
|
+
})
|
|
44
60
|
}
|
|
45
61
|
}
|
|
46
62
|
}
|
|
@@ -316,4 +332,3 @@ export function usePinegrow() {
|
|
|
316
332
|
|
|
317
333
|
return { pgUpdateElCache }
|
|
318
334
|
}
|
|
319
|
-
|
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pinegrow/vite-plugin",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.73-alpha.1",
|
|
4
4
|
"description": "Pinegrow Vite Plugin",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
8
|
-
"./types.d.ts"
|
|
8
|
+
"./types.d.ts",
|
|
9
|
+
"./astro.d.ts",
|
|
10
|
+
"./astro-runtime.d.ts"
|
|
9
11
|
],
|
|
10
12
|
"main": "./dist/index.cjs",
|
|
11
13
|
"module": "./dist/index.mjs",
|
|
@@ -15,13 +17,23 @@
|
|
|
15
17
|
"types": "./types.d.ts",
|
|
16
18
|
"import": "./dist/index.mjs",
|
|
17
19
|
"require": "./dist/index.cjs"
|
|
18
|
-
},
|
|
19
|
-
"./dev": {
|
|
20
|
-
"import": "./src/index.dev.js",
|
|
21
|
-
"require": "./src/index.dev.js"
|
|
22
|
-
},
|
|
20
|
+
},
|
|
21
|
+
"./dev": {
|
|
22
|
+
"import": "./src/index.dev.js",
|
|
23
|
+
"require": "./src/index.dev.js"
|
|
24
|
+
},
|
|
23
25
|
"./vue": {
|
|
24
26
|
"import": "./dist/vue/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./astro": {
|
|
29
|
+
"types": "./astro.d.ts",
|
|
30
|
+
"import": "./dist/astro/index.mjs",
|
|
31
|
+
"require": "./dist/astro/index.cjs"
|
|
32
|
+
},
|
|
33
|
+
"./astro/runtime": {
|
|
34
|
+
"types": "./astro-runtime.d.ts",
|
|
35
|
+
"import": "./dist/astro/runtime.mjs",
|
|
36
|
+
"require": "./dist/astro/runtime.cjs"
|
|
25
37
|
}
|
|
26
38
|
},
|
|
27
39
|
"keywords": [
|
|
@@ -38,6 +50,9 @@
|
|
|
38
50
|
"build": "webpack -- --env mode=production vite",
|
|
39
51
|
"build:vite-plugin": "webpack -- --env mode=production vite",
|
|
40
52
|
"build:vite-plugin:dev": "webpack -- --env mode=development vite",
|
|
53
|
+
"test": "node --test test/*.test.mjs",
|
|
54
|
+
"publish-alpha": "npm run increment-alpha-version && npm publish --tag alpha",
|
|
55
|
+
"increment-alpha-version": "npm version prerelease --preid=alpha",
|
|
41
56
|
"publish-beta": "npm run increment-beta-version && npm publish --tag beta",
|
|
42
57
|
"increment-beta-version": "npm version prerelease --preid=beta",
|
|
43
58
|
"publish-patch": "npm run increment-version && npm publish",
|
|
@@ -46,5 +61,8 @@
|
|
|
46
61
|
"dependencies": {
|
|
47
62
|
"@vue/compiler-sfc": "^3.2.45",
|
|
48
63
|
"magic-string": "^0.27.0"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@astrojs/compiler": "^2.2.1"
|
|
49
67
|
}
|
|
50
68
|
}
|